
kernel/bin-x86_64/kernel:     file format elf64-x86-64


Disassembly of section .text:

ffffffff80001000 <sgr>:
    if (ctx->autoflush) {
        ctx->double_buffer_flush(ctx);
    }
}

static void sgr(struct flanterm_context *ctx) {
ffffffff80001000:	55                   	push   %rbp
ffffffff80001001:	48 89 e5             	mov    %rsp,%rbp
ffffffff80001004:	41 55                	push   %r13
ffffffff80001006:	41 54                	push   %r12
ffffffff80001008:	41 bc 01 00 00 00    	mov    $0x1,%r12d
ffffffff8000100e:	53                   	push   %rbx
ffffffff8000100f:	48 89 fb             	mov    %rdi,%rbx
ffffffff80001012:	48 83 ec 08          	sub    $0x8,%rsp
    size_t i = 0;

    if (!ctx->esc_values_i)
ffffffff80001016:	48 8b 87 50 01 00 00 	mov    0x150(%rdi),%rax
ffffffff8000101d:	48 85 c0             	test   %rax,%rax
ffffffff80001020:	74 1e                	je     ffffffff80001040 <sgr+0x40>
    size_t i = 0;
ffffffff80001022:	45 31 ed             	xor    %r13d,%r13d
        goto def;

    for (; i < ctx->esc_values_i; i++) {
        size_t offset;

        if (ctx->esc_values[i] == 0) {
ffffffff80001025:	42 8b 94 ab 88 01 00 	mov    0x188(%rbx,%r13,4),%edx
ffffffff8000102c:	00 
ffffffff8000102d:	83 fa 6b             	cmp    $0x6b,%edx
ffffffff80001030:	77 76                	ja     ffffffff800010a8 <sgr+0xa8>
ffffffff80001032:	89 d6                	mov    %edx,%esi
ffffffff80001034:	ff 24 f5 00 50 02 80 	jmp    *-0x7ffdb000(,%rsi,8)
ffffffff8000103b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
def:
            if (ctx->reverse_video) {
ffffffff80001040:	80 bb 24 01 00 00 00 	cmpb   $0x0,0x124(%rbx)
ffffffff80001047:	74 10                	je     ffffffff80001059 <sgr+0x59>
                ctx->reverse_video = false;
ffffffff80001049:	c6 83 24 01 00 00 00 	movb   $0x0,0x124(%rbx)
                ctx->swap_palette(ctx);
ffffffff80001050:	48 89 df             	mov    %rbx,%rdi
ffffffff80001053:	ff 93 88 02 00 00    	call   *0x288(%rbx)
            }
            ctx->bold = false;
            ctx->bg_bold = false;
            ctx->current_primary = (size_t)-1;
ffffffff80001059:	48 c7 83 68 01 00 00 	movq   $0xffffffffffffffff,0x168(%rbx)
ffffffff80001060:	ff ff ff ff 
            ctx->bold = false;
ffffffff80001064:	31 c0                	xor    %eax,%eax
            ctx->current_bg = (size_t)-1;
            ctx->set_text_bg_default(ctx);
ffffffff80001066:	48 89 df             	mov    %rbx,%rdi
            ctx->bold = false;
ffffffff80001069:	66 89 83 22 01 00 00 	mov    %ax,0x122(%rbx)
            ctx->current_bg = (size_t)-1;
ffffffff80001070:	48 c7 83 70 01 00 00 	movq   $0xffffffffffffffff,0x170(%rbx)
ffffffff80001077:	ff ff ff ff 
            ctx->set_text_bg_default(ctx);
ffffffff8000107b:	ff 93 58 02 00 00    	call   *0x258(%rbx)
            ctx->set_text_fg_default(ctx);
ffffffff80001081:	48 89 df             	mov    %rbx,%rdi
ffffffff80001084:	ff 93 50 02 00 00    	call   *0x250(%rbx)
    for (; i < ctx->esc_values_i; i++) {
ffffffff8000108a:	48 8b 83 50 01 00 00 	mov    0x150(%rbx),%rax
ffffffff80001091:	49 39 c4             	cmp    %rax,%r12
ffffffff80001094:	0f 82 de 04 00 00    	jb     ffffffff80001578 <sgr+0x578>
            }
        }
    }

out:;
}
ffffffff8000109a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8000109e:	5b                   	pop    %rbx
ffffffff8000109f:	41 5c                	pop    %r12
ffffffff800010a1:	41 5d                	pop    %r13
ffffffff800010a3:	5d                   	pop    %rbp
ffffffff800010a4:	c3                   	ret
ffffffff800010a5:	0f 1f 00             	nopl   (%rax)
        else if (ctx->esc_values[i] == 38 || ctx->esc_values[i] == 48) {
ffffffff800010a8:	83 fa 26             	cmp    $0x26,%edx
ffffffff800010ab:	0f 94 c1             	sete   %cl
ffffffff800010ae:	83 fa 30             	cmp    $0x30,%edx
ffffffff800010b1:	74 04                	je     ffffffff800010b7 <sgr+0xb7>
ffffffff800010b3:	84 c9                	test   %cl,%cl
ffffffff800010b5:	74 d3                	je     ffffffff8000108a <sgr+0x8a>
            if (i >= ctx->esc_values_i) {
ffffffff800010b7:	49 39 c4             	cmp    %rax,%r12
ffffffff800010ba:	73 de                	jae    ffffffff8000109a <sgr+0x9a>
            switch (ctx->esc_values[i]) {
ffffffff800010bc:	42 8b 94 a3 88 01 00 	mov    0x188(%rbx,%r12,4),%edx
ffffffff800010c3:	00 
            if (ctx->reverse_video) {
ffffffff800010c4:	0f b6 b3 24 01 00 00 	movzbl 0x124(%rbx),%esi
            switch (ctx->esc_values[i]) {
ffffffff800010cb:	83 fa 02             	cmp    $0x2,%edx
ffffffff800010ce:	0f 84 9f 03 00 00    	je     ffffffff80001473 <sgr+0x473>
    for (; i < ctx->esc_values_i; i++) {
ffffffff800010d4:	49 83 c4 01          	add    $0x1,%r12
            switch (ctx->esc_values[i]) {
ffffffff800010d8:	83 fa 05             	cmp    $0x5,%edx
ffffffff800010db:	75 ad                	jne    ffffffff8000108a <sgr+0x8a>
                    if (i + 1 >= ctx->esc_values_i) {
ffffffff800010dd:	49 8d 55 02          	lea    0x2(%r13),%rdx
ffffffff800010e1:	48 39 c2             	cmp    %rax,%rdx
ffffffff800010e4:	73 b4                	jae    ffffffff8000109a <sgr+0x9a>
                    uint32_t col = ctx->esc_values[i + 1];
ffffffff800010e6:	42 8b 84 ab 90 01 00 	mov    0x190(%rbx,%r13,4),%eax
ffffffff800010ed:	00 
    for (; i < ctx->esc_values_i; i++) {
ffffffff800010ee:	4d 8d 65 03          	lea    0x3(%r13),%r12
                    if (col < 8) {
ffffffff800010f2:	83 f8 07             	cmp    $0x7,%eax
ffffffff800010f5:	0f 87 d7 03 00 00    	ja     ffffffff800014d2 <sgr+0x4d2>
                        if (fg) {
ffffffff800010fb:	40 38 f1             	cmp    %sil,%cl
ffffffff800010fe:	0f 84 3a 04 00 00    	je     ffffffff8000153e <sgr+0x53e>
                            ctx->current_primary = col;
ffffffff80001104:	48 89 83 68 01 00 00 	mov    %rax,0x168(%rbx)
                        (fg ? ctx->set_text_fg : ctx->set_text_bg)(ctx, col);
ffffffff8000110b:	48 8b 93 20 02 00 00 	mov    0x220(%rbx),%rdx
                        (fg ? ctx->set_text_fg_bright : ctx->set_text_bg_bright)(ctx, col - 8);
ffffffff80001112:	48 89 c6             	mov    %rax,%rsi
ffffffff80001115:	48 89 df             	mov    %rbx,%rdi
ffffffff80001118:	ff d2                	call   *%rdx
ffffffff8000111a:	e9 6b ff ff ff       	jmp    ffffffff8000108a <sgr+0x8a>
ffffffff8000111f:	90                   	nop
            ctx->current_primary = ctx->esc_values[i] - offset;
ffffffff80001120:	48 83 ee 5a          	sub    $0x5a,%rsi
            if (ctx->reverse_video) {
ffffffff80001124:	80 bb 24 01 00 00 00 	cmpb   $0x0,0x124(%rbx)
            ctx->current_primary = ctx->esc_values[i] - offset;
ffffffff8000112b:	48 89 b3 68 01 00 00 	mov    %rsi,0x168(%rbx)
            if (ctx->reverse_video) {
ffffffff80001132:	0f 85 9f 00 00 00    	jne    ffffffff800011d7 <sgr+0x1d7>
                ctx->set_text_fg_bright(ctx, ctx->esc_values[i] - offset);
ffffffff80001138:	48 89 df             	mov    %rbx,%rdi
ffffffff8000113b:	ff 93 30 02 00 00    	call   *0x230(%rbx)
ffffffff80001141:	e9 44 ff ff ff       	jmp    ffffffff8000108a <sgr+0x8a>
ffffffff80001146:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000114d:	00 00 00 
            ctx->current_primary = ctx->esc_values[i] - offset;
ffffffff80001150:	48 8d 46 e2          	lea    -0x1e(%rsi),%rax
            if (ctx->reverse_video) {
ffffffff80001154:	80 bb 24 01 00 00 00 	cmpb   $0x0,0x124(%rbx)
            if ((ctx->bold && ctx->reverse_video)
ffffffff8000115b:	0f b6 93 22 01 00 00 	movzbl 0x122(%rbx),%edx
            ctx->current_primary = ctx->esc_values[i] - offset;
ffffffff80001162:	48 89 83 68 01 00 00 	mov    %rax,0x168(%rbx)
            if (ctx->reverse_video) {
ffffffff80001169:	0f 85 31 02 00 00    	jne    ffffffff800013a0 <sgr+0x3a0>
            if ((ctx->bold && !ctx->reverse_video)
ffffffff8000116f:	84 d2                	test   %dl,%dl
ffffffff80001171:	0f 85 8a 02 00 00    	jne    ffffffff80001401 <sgr+0x401>
             || (ctx->bg_bold && ctx->reverse_video)) {
ffffffff80001177:	80 bb 23 01 00 00 00 	cmpb   $0x0,0x123(%rbx)
            offset = 30;
ffffffff8000117e:	ba 1e 00 00 00       	mov    $0x1e,%edx
             || (ctx->bg_bold && ctx->reverse_video)) {
ffffffff80001183:	75 06                	jne    ffffffff8000118b <sgr+0x18b>
                ctx->set_text_fg(ctx, ctx->esc_values[i] - offset);
ffffffff80001185:	48 89 f0             	mov    %rsi,%rax
ffffffff80001188:	48 29 d0             	sub    %rdx,%rax
ffffffff8000118b:	48 89 c6             	mov    %rax,%rsi
ffffffff8000118e:	48 89 df             	mov    %rbx,%rdi
ffffffff80001191:	ff 93 20 02 00 00    	call   *0x220(%rbx)
ffffffff80001197:	e9 ee fe ff ff       	jmp    ffffffff8000108a <sgr+0x8a>
ffffffff8000119c:	0f 1f 40 00          	nopl   0x0(%rax)
            ctx->current_bg = ctx->esc_values[i] - offset;
ffffffff800011a0:	48 8d 46 d8          	lea    -0x28(%rsi),%rax
            if (ctx->reverse_video) {
ffffffff800011a4:	80 bb 24 01 00 00 00 	cmpb   $0x0,0x124(%rbx)
            if ((ctx->bold && !ctx->reverse_video)
ffffffff800011ab:	0f b6 93 22 01 00 00 	movzbl 0x122(%rbx),%edx
            ctx->current_bg = ctx->esc_values[i] - offset;
ffffffff800011b2:	48 89 83 70 01 00 00 	mov    %rax,0x170(%rbx)
            if (ctx->reverse_video) {
ffffffff800011b9:	0f 85 31 02 00 00    	jne    ffffffff800013f0 <sgr+0x3f0>
            if ((ctx->bold && ctx->reverse_video)
ffffffff800011bf:	84 d2                	test   %dl,%dl
ffffffff800011c1:	0f 84 49 02 00 00    	je     ffffffff80001410 <sgr+0x410>
             || (ctx->bg_bold && !ctx->reverse_video)) {
ffffffff800011c7:	80 bb 23 01 00 00 00 	cmpb   $0x0,0x123(%rbx)
ffffffff800011ce:	0f 84 e8 01 00 00    	je     ffffffff800013bc <sgr+0x3bc>
                ctx->set_text_bg_bright(ctx, ctx->esc_values[i] - offset);
ffffffff800011d4:	48 89 c6             	mov    %rax,%rsi
ffffffff800011d7:	48 89 df             	mov    %rbx,%rdi
ffffffff800011da:	ff 93 38 02 00 00    	call   *0x238(%rbx)
ffffffff800011e0:	e9 a5 fe ff ff       	jmp    ffffffff8000108a <sgr+0x8a>
ffffffff800011e5:	0f 1f 00             	nopl   (%rax)
            ctx->current_bg = ctx->esc_values[i] - offset;
ffffffff800011e8:	48 83 ee 64          	sub    $0x64,%rsi
            if (ctx->reverse_video) {
ffffffff800011ec:	80 bb 24 01 00 00 00 	cmpb   $0x0,0x124(%rbx)
            ctx->current_bg = ctx->esc_values[i] - offset;
ffffffff800011f3:	48 89 b3 70 01 00 00 	mov    %rsi,0x170(%rbx)
            if (ctx->reverse_video) {
ffffffff800011fa:	74 db                	je     ffffffff800011d7 <sgr+0x1d7>
ffffffff800011fc:	e9 37 ff ff ff       	jmp    ffffffff80001138 <sgr+0x138>
            if (!ctx->reverse_video) {
ffffffff80001201:	80 bb 24 01 00 00 00 	cmpb   $0x0,0x124(%rbx)
ffffffff80001208:	0f 85 7c fe ff ff    	jne    ffffffff8000108a <sgr+0x8a>
                ctx->reverse_video = true;
ffffffff8000120e:	c6 83 24 01 00 00 01 	movb   $0x1,0x124(%rbx)
                ctx->swap_palette(ctx);
ffffffff80001215:	48 89 df             	mov    %rbx,%rdi
ffffffff80001218:	ff 93 88 02 00 00    	call   *0x288(%rbx)
ffffffff8000121e:	e9 67 fe ff ff       	jmp    ffffffff8000108a <sgr+0x8a>
            if (ctx->current_primary == (size_t)-2) {
ffffffff80001223:	48 8b b3 68 01 00 00 	mov    0x168(%rbx),%rsi
            ctx->bold = false;
ffffffff8000122a:	c6 83 22 01 00 00 00 	movb   $0x0,0x122(%rbx)
            if (ctx->current_primary == (size_t)-2) {
ffffffff80001231:	48 83 fe fe          	cmp    $0xfffffffffffffffe,%rsi
ffffffff80001235:	0f 84 4f fe ff ff    	je     ffffffff8000108a <sgr+0x8a>
                if (!ctx->reverse_video) {
ffffffff8000123b:	0f b6 83 24 01 00 00 	movzbl 0x124(%rbx),%eax
                    ctx->set_text_fg(ctx, ctx->current_primary);
ffffffff80001242:	48 89 df             	mov    %rbx,%rdi
            } else if (ctx->current_primary != (size_t)-1) {
ffffffff80001245:	48 83 fe ff          	cmp    $0xffffffffffffffff,%rsi
ffffffff80001249:	0f 84 e4 01 00 00    	je     ffffffff80001433 <sgr+0x433>
                if (!ctx->reverse_video) {
ffffffff8000124f:	84 c0                	test   %al,%al
ffffffff80001251:	0f 84 3a ff ff ff    	je     ffffffff80001191 <sgr+0x191>
                ctx->set_text_bg(ctx, ctx->esc_values[i] - offset);
ffffffff80001257:	ff 93 28 02 00 00    	call   *0x228(%rbx)
ffffffff8000125d:	e9 28 fe ff ff       	jmp    ffffffff8000108a <sgr+0x8a>
            if (ctx->current_bg == (size_t)-2) {
ffffffff80001262:	48 8b b3 70 01 00 00 	mov    0x170(%rbx),%rsi
            ctx->bg_bold = false;
ffffffff80001269:	c6 83 23 01 00 00 00 	movb   $0x0,0x123(%rbx)
            if (ctx->current_bg == (size_t)-2) {
ffffffff80001270:	48 83 fe fe          	cmp    $0xfffffffffffffffe,%rsi
ffffffff80001274:	0f 84 10 fe ff ff    	je     ffffffff8000108a <sgr+0x8a>
                if (!ctx->reverse_video) {
ffffffff8000127a:	0f b6 83 24 01 00 00 	movzbl 0x124(%rbx),%eax
                    ctx->set_text_bg(ctx, ctx->current_bg);
ffffffff80001281:	48 89 df             	mov    %rbx,%rdi
            } else if (ctx->current_bg != (size_t)-1) {
ffffffff80001284:	48 83 fe ff          	cmp    $0xffffffffffffffff,%rsi
ffffffff80001288:	0f 84 c3 01 00 00    	je     ffffffff80001451 <sgr+0x451>
                if (!ctx->reverse_video) {
ffffffff8000128e:	84 c0                	test   %al,%al
ffffffff80001290:	0f 85 fb fe ff ff    	jne    ffffffff80001191 <sgr+0x191>
ffffffff80001296:	eb bf                	jmp    ffffffff80001257 <sgr+0x257>
            if (ctx->reverse_video) {
ffffffff80001298:	80 bb 24 01 00 00 00 	cmpb   $0x0,0x124(%rbx)
ffffffff8000129f:	0f 84 e5 fd ff ff    	je     ffffffff8000108a <sgr+0x8a>
                ctx->reverse_video = false;
ffffffff800012a5:	c6 83 24 01 00 00 00 	movb   $0x0,0x124(%rbx)
                ctx->swap_palette(ctx);
ffffffff800012ac:	48 89 df             	mov    %rbx,%rdi
ffffffff800012af:	ff 93 88 02 00 00    	call   *0x288(%rbx)
ffffffff800012b5:	e9 d0 fd ff ff       	jmp    ffffffff8000108a <sgr+0x8a>
            if (ctx->current_primary == (size_t)-2) {
ffffffff800012ba:	48 8b b3 68 01 00 00 	mov    0x168(%rbx),%rsi
            ctx->bold = true;
ffffffff800012c1:	c6 83 22 01 00 00 01 	movb   $0x1,0x122(%rbx)
            if (ctx->current_primary == (size_t)-2) {
ffffffff800012c8:	48 83 fe fe          	cmp    $0xfffffffffffffffe,%rsi
ffffffff800012cc:	0f 84 b8 fd ff ff    	je     ffffffff8000108a <sgr+0x8a>
                if (!ctx->reverse_video) {
ffffffff800012d2:	0f b6 83 24 01 00 00 	movzbl 0x124(%rbx),%eax
                    ctx->set_text_fg_bright(ctx, ctx->current_primary);
ffffffff800012d9:	48 89 df             	mov    %rbx,%rdi
            } else if (ctx->current_primary != (size_t)-1) {
ffffffff800012dc:	48 83 fe ff          	cmp    $0xffffffffffffffff,%rsi
ffffffff800012e0:	0f 84 5c 01 00 00    	je     ffffffff80001442 <sgr+0x442>
                if (!ctx->reverse_video) {
ffffffff800012e6:	84 c0                	test   %al,%al
ffffffff800012e8:	0f 85 ec fe ff ff    	jne    ffffffff800011da <sgr+0x1da>
ffffffff800012ee:	e9 48 fe ff ff       	jmp    ffffffff8000113b <sgr+0x13b>
            if (ctx->current_bg == (size_t)-2) {
ffffffff800012f3:	48 8b b3 70 01 00 00 	mov    0x170(%rbx),%rsi
            ctx->bg_bold = true;
ffffffff800012fa:	c6 83 23 01 00 00 01 	movb   $0x1,0x123(%rbx)
            if (ctx->current_bg == (size_t)-2) {
ffffffff80001301:	48 83 fe fe          	cmp    $0xfffffffffffffffe,%rsi
ffffffff80001305:	0f 84 7f fd ff ff    	je     ffffffff8000108a <sgr+0x8a>
                if (!ctx->reverse_video) {
ffffffff8000130b:	0f b6 83 24 01 00 00 	movzbl 0x124(%rbx),%eax
                    ctx->set_text_bg_bright(ctx, ctx->current_bg);
ffffffff80001312:	48 89 df             	mov    %rbx,%rdi
            } else if (ctx->current_bg != (size_t)-1) {
ffffffff80001315:	48 83 fe ff          	cmp    $0xffffffffffffffff,%rsi
ffffffff80001319:	0f 84 05 01 00 00    	je     ffffffff80001424 <sgr+0x424>
                if (!ctx->reverse_video) {
ffffffff8000131f:	84 c0                	test   %al,%al
ffffffff80001321:	0f 85 14 fe ff ff    	jne    ffffffff8000113b <sgr+0x13b>
ffffffff80001327:	e9 ae fe ff ff       	jmp    ffffffff800011da <sgr+0x1da>
            if (ctx->reverse_video) {
ffffffff8000132c:	80 bb 24 01 00 00 00 	cmpb   $0x0,0x124(%rbx)
            ctx->current_bg = (size_t)-1;
ffffffff80001333:	48 c7 83 70 01 00 00 	movq   $0xffffffffffffffff,0x170(%rbx)
ffffffff8000133a:	ff ff ff ff 
            if (ctx->reverse_video) {
ffffffff8000133e:	74 09                	je     ffffffff80001349 <sgr+0x349>
                ctx->swap_palette(ctx);
ffffffff80001340:	48 89 df             	mov    %rbx,%rdi
ffffffff80001343:	ff 93 88 02 00 00    	call   *0x288(%rbx)
            if (!ctx->bg_bold) {
ffffffff80001349:	80 bb 23 01 00 00 00 	cmpb   $0x0,0x123(%rbx)
                ctx->set_text_bg_default(ctx);
ffffffff80001350:	48 89 df             	mov    %rbx,%rdi
            if (!ctx->bg_bold) {
ffffffff80001353:	75 7b                	jne    ffffffff800013d0 <sgr+0x3d0>
                ctx->set_text_bg_default(ctx);
ffffffff80001355:	ff 93 58 02 00 00    	call   *0x258(%rbx)
            if (ctx->reverse_video) {
ffffffff8000135b:	80 bb 24 01 00 00 00 	cmpb   $0x0,0x124(%rbx)
ffffffff80001362:	0f 84 22 fd ff ff    	je     ffffffff8000108a <sgr+0x8a>
ffffffff80001368:	e9 3f ff ff ff       	jmp    ffffffff800012ac <sgr+0x2ac>
            if (ctx->reverse_video) {
ffffffff8000136d:	80 bb 24 01 00 00 00 	cmpb   $0x0,0x124(%rbx)
            ctx->current_primary = (size_t)-1;
ffffffff80001374:	48 c7 83 68 01 00 00 	movq   $0xffffffffffffffff,0x168(%rbx)
ffffffff8000137b:	ff ff ff ff 
            if (ctx->reverse_video) {
ffffffff8000137f:	74 09                	je     ffffffff8000138a <sgr+0x38a>
                ctx->swap_palette(ctx);
ffffffff80001381:	48 89 df             	mov    %rbx,%rdi
ffffffff80001384:	ff 93 88 02 00 00    	call   *0x288(%rbx)
            if (!ctx->bold) {
ffffffff8000138a:	80 bb 22 01 00 00 00 	cmpb   $0x0,0x122(%rbx)
                ctx->set_text_fg_default(ctx);
ffffffff80001391:	48 89 df             	mov    %rbx,%rdi
            if (!ctx->bold) {
ffffffff80001394:	75 4a                	jne    ffffffff800013e0 <sgr+0x3e0>
                ctx->set_text_fg_default(ctx);
ffffffff80001396:	ff 93 50 02 00 00    	call   *0x250(%rbx)
ffffffff8000139c:	eb bd                	jmp    ffffffff8000135b <sgr+0x35b>
ffffffff8000139e:	66 90                	xchg   %ax,%ax
            if ((ctx->bold && ctx->reverse_video)
ffffffff800013a0:	84 d2                	test   %dl,%dl
ffffffff800013a2:	0f 85 2c fe ff ff    	jne    ffffffff800011d4 <sgr+0x1d4>
             || (ctx->bg_bold && !ctx->reverse_video)) {
ffffffff800013a8:	80 bb 23 01 00 00 00 	cmpb   $0x0,0x123(%rbx)
ffffffff800013af:	75 0b                	jne    ffffffff800013bc <sgr+0x3bc>
            offset = 30;
ffffffff800013b1:	ba 1e 00 00 00       	mov    $0x1e,%edx
                ctx->set_text_bg(ctx, ctx->esc_values[i] - offset);
ffffffff800013b6:	48 89 f0             	mov    %rsi,%rax
ffffffff800013b9:	48 29 d0             	sub    %rdx,%rax
ffffffff800013bc:	48 89 c6             	mov    %rax,%rsi
ffffffff800013bf:	48 89 df             	mov    %rbx,%rdi
ffffffff800013c2:	e9 90 fe ff ff       	jmp    ffffffff80001257 <sgr+0x257>
ffffffff800013c7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff800013ce:	00 00 
                ctx->set_text_bg_default_bright(ctx);
ffffffff800013d0:	ff 93 68 02 00 00    	call   *0x268(%rbx)
ffffffff800013d6:	eb 83                	jmp    ffffffff8000135b <sgr+0x35b>
ffffffff800013d8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff800013df:	00 
                ctx->set_text_fg_default_bright(ctx);
ffffffff800013e0:	ff 93 60 02 00 00    	call   *0x260(%rbx)
            if (ctx->reverse_video) {
ffffffff800013e6:	e9 70 ff ff ff       	jmp    ffffffff8000135b <sgr+0x35b>
ffffffff800013eb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            if ((ctx->bold && !ctx->reverse_video)
ffffffff800013f0:	84 d2                	test   %dl,%dl
ffffffff800013f2:	74 6c                	je     ffffffff80001460 <sgr+0x460>
             || (ctx->bg_bold && ctx->reverse_video)) {
ffffffff800013f4:	80 bb 23 01 00 00 00 	cmpb   $0x0,0x123(%rbx)
ffffffff800013fb:	0f 84 8a fd ff ff    	je     ffffffff8000118b <sgr+0x18b>
                ctx->set_text_fg_bright(ctx, ctx->esc_values[i] - offset);
ffffffff80001401:	48 89 c6             	mov    %rax,%rsi
ffffffff80001404:	e9 2f fd ff ff       	jmp    ffffffff80001138 <sgr+0x138>
ffffffff80001409:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
             || (ctx->bg_bold && !ctx->reverse_video)) {
ffffffff80001410:	80 bb 23 01 00 00 00 	cmpb   $0x0,0x123(%rbx)
ffffffff80001417:	0f 85 b7 fd ff ff    	jne    ffffffff800011d4 <sgr+0x1d4>
ffffffff8000141d:	ba 28 00 00 00       	mov    $0x28,%edx
ffffffff80001422:	eb 92                	jmp    ffffffff800013b6 <sgr+0x3b6>
                if (!ctx->reverse_video) {
ffffffff80001424:	84 c0                	test   %al,%al
ffffffff80001426:	75 1e                	jne    ffffffff80001446 <sgr+0x446>
                    ctx->set_text_bg_default_bright(ctx);
ffffffff80001428:	ff 93 68 02 00 00    	call   *0x268(%rbx)
ffffffff8000142e:	e9 57 fc ff ff       	jmp    ffffffff8000108a <sgr+0x8a>
                if (!ctx->reverse_video) {
ffffffff80001433:	84 c0                	test   %al,%al
ffffffff80001435:	75 1e                	jne    ffffffff80001455 <sgr+0x455>
                    ctx->set_text_fg_default(ctx);
ffffffff80001437:	ff 93 50 02 00 00    	call   *0x250(%rbx)
ffffffff8000143d:	e9 48 fc ff ff       	jmp    ffffffff8000108a <sgr+0x8a>
                if (!ctx->reverse_video) {
ffffffff80001442:	84 c0                	test   %al,%al
ffffffff80001444:	75 e2                	jne    ffffffff80001428 <sgr+0x428>
                    ctx->set_text_fg_default_bright(ctx);
ffffffff80001446:	ff 93 60 02 00 00    	call   *0x260(%rbx)
ffffffff8000144c:	e9 39 fc ff ff       	jmp    ffffffff8000108a <sgr+0x8a>
                if (!ctx->reverse_video) {
ffffffff80001451:	84 c0                	test   %al,%al
ffffffff80001453:	75 e2                	jne    ffffffff80001437 <sgr+0x437>
                    ctx->set_text_bg_default(ctx);
ffffffff80001455:	ff 93 58 02 00 00    	call   *0x258(%rbx)
ffffffff8000145b:	e9 2a fc ff ff       	jmp    ffffffff8000108a <sgr+0x8a>
             || (ctx->bg_bold && ctx->reverse_video)) {
ffffffff80001460:	80 bb 23 01 00 00 00 	cmpb   $0x0,0x123(%rbx)
ffffffff80001467:	ba 28 00 00 00       	mov    $0x28,%edx
ffffffff8000146c:	75 93                	jne    ffffffff80001401 <sgr+0x401>
ffffffff8000146e:	e9 12 fd ff ff       	jmp    ffffffff80001185 <sgr+0x185>
                    if (i + 3 >= ctx->esc_values_i) {
ffffffff80001473:	49 8d 55 04          	lea    0x4(%r13),%rdx
ffffffff80001477:	48 39 c2             	cmp    %rax,%rdx
ffffffff8000147a:	0f 83 1a fc ff ff    	jae    ffffffff8000109a <sgr+0x9a>
                    rgb_value |= (ctx->esc_values[i + 1] & 0xff) << 16;
ffffffff80001480:	42 8b 84 ab 90 01 00 	mov    0x190(%rbx,%r13,4),%eax
ffffffff80001487:	00 
                    rgb_value |= (ctx->esc_values[i + 2] & 0xff) << 8;
ffffffff80001488:	42 8b 94 ab 94 01 00 	mov    0x194(%rbx,%r13,4),%edx
ffffffff8000148f:	00 
                    rgb_value |= (ctx->esc_values[i + 1] & 0xff) << 16;
ffffffff80001490:	c1 e0 10             	shl    $0x10,%eax
                    rgb_value |= (ctx->esc_values[i + 2] & 0xff) << 8;
ffffffff80001493:	c1 e2 08             	shl    $0x8,%edx
ffffffff80001496:	0f b7 d2             	movzwl %dx,%edx
                    rgb_value |= (ctx->esc_values[i + 1] & 0xff) << 16;
ffffffff80001499:	25 00 00 ff 00       	and    $0xff0000,%eax
                    rgb_value |= (ctx->esc_values[i + 2] & 0xff) << 8;
ffffffff8000149e:	09 d0                	or     %edx,%eax
                    rgb_value |= (ctx->esc_values[i + 3] & 0xff);
ffffffff800014a0:	42 0f b6 94 ab 98 01 	movzbl 0x198(%rbx,%r13,4),%edx
ffffffff800014a7:	00 00 
ffffffff800014a9:	09 d0                	or     %edx,%eax
                    if (fg) {
ffffffff800014ab:	40 38 f1             	cmp    %sil,%cl
ffffffff800014ae:	74 42                	je     ffffffff800014f2 <sgr+0x4f2>
                        ctx->current_primary = (size_t)-2;
ffffffff800014b0:	48 c7 83 68 01 00 00 	movq   $0xfffffffffffffffe,0x168(%rbx)
ffffffff800014b7:	fe ff ff ff 
                    (fg ? ctx->set_text_fg_rgb : ctx->set_text_bg_rgb)(ctx, rgb_value);
ffffffff800014bb:	48 8b 93 40 02 00 00 	mov    0x240(%rbx),%rdx
ffffffff800014c2:	89 c6                	mov    %eax,%esi
ffffffff800014c4:	48 89 df             	mov    %rbx,%rdi
    for (; i < ctx->esc_values_i; i++) {
ffffffff800014c7:	4d 8d 65 05          	lea    0x5(%r13),%r12
                    (fg ? ctx->set_text_fg_rgb : ctx->set_text_bg_rgb)(ctx, rgb_value);
ffffffff800014cb:	ff d2                	call   *%rdx
                    break;
ffffffff800014cd:	e9 b8 fb ff ff       	jmp    ffffffff8000108a <sgr+0x8a>
                    } else if (col < 16) {
ffffffff800014d2:	83 f8 0f             	cmp    $0xf,%eax
ffffffff800014d5:	77 2f                	ja     ffffffff80001506 <sgr+0x506>
                            ctx->current_primary = col - 8;
ffffffff800014d7:	83 e8 08             	sub    $0x8,%eax
                        if (fg) {
ffffffff800014da:	40 38 f1             	cmp    %sil,%cl
ffffffff800014dd:	74 72                	je     ffffffff80001551 <sgr+0x551>
                            ctx->current_primary = col - 8;
ffffffff800014df:	48 89 83 68 01 00 00 	mov    %rax,0x168(%rbx)
                        (fg ? ctx->set_text_fg_bright : ctx->set_text_bg_bright)(ctx, col - 8);
ffffffff800014e6:	48 8b 93 30 02 00 00 	mov    0x230(%rbx),%rdx
ffffffff800014ed:	e9 20 fc ff ff       	jmp    ffffffff80001112 <sgr+0x112>
                        ctx->current_bg = (size_t)-2;
ffffffff800014f2:	48 c7 83 70 01 00 00 	movq   $0xfffffffffffffffe,0x170(%rbx)
ffffffff800014f9:	fe ff ff ff 
                    (fg ? ctx->set_text_fg_rgb : ctx->set_text_bg_rgb)(ctx, rgb_value);
ffffffff800014fd:	48 8b 93 48 02 00 00 	mov    0x248(%rbx),%rdx
ffffffff80001504:	eb bc                	jmp    ffffffff800014c2 <sgr+0x4c2>
                    } else if (col < 256) {
ffffffff80001506:	3d ff 00 00 00       	cmp    $0xff,%eax
ffffffff8000150b:	0f 87 79 fb ff ff    	ja     ffffffff8000108a <sgr+0x8a>
                        uint32_t rgb_value = col256[col - 16];
ffffffff80001511:	83 e8 10             	sub    $0x10,%eax
ffffffff80001514:	8b 14 85 a0 8c 02 80 	mov    -0x7ffd7360(,%rax,4),%edx
                        if (fg) {
ffffffff8000151b:	40 38 f1             	cmp    %sil,%cl
ffffffff8000151e:	74 44                	je     ffffffff80001564 <sgr+0x564>
                            ctx->current_primary = (size_t)-2;
ffffffff80001520:	48 c7 83 68 01 00 00 	movq   $0xfffffffffffffffe,0x168(%rbx)
ffffffff80001527:	fe ff ff ff 
                        (fg ? ctx->set_text_fg_rgb : ctx->set_text_bg_rgb)(ctx, rgb_value);
ffffffff8000152b:	48 8b 83 40 02 00 00 	mov    0x240(%rbx),%rax
ffffffff80001532:	89 d6                	mov    %edx,%esi
ffffffff80001534:	48 89 df             	mov    %rbx,%rdi
ffffffff80001537:	ff d0                	call   *%rax
ffffffff80001539:	e9 4c fb ff ff       	jmp    ffffffff8000108a <sgr+0x8a>
                            ctx->current_bg = col;
ffffffff8000153e:	48 89 83 70 01 00 00 	mov    %rax,0x170(%rbx)
                        (fg ? ctx->set_text_fg : ctx->set_text_bg)(ctx, col);
ffffffff80001545:	48 8b 93 28 02 00 00 	mov    0x228(%rbx),%rdx
ffffffff8000154c:	e9 c1 fb ff ff       	jmp    ffffffff80001112 <sgr+0x112>
                            ctx->current_bg = col - 8;
ffffffff80001551:	48 89 83 70 01 00 00 	mov    %rax,0x170(%rbx)
                        (fg ? ctx->set_text_fg_bright : ctx->set_text_bg_bright)(ctx, col - 8);
ffffffff80001558:	48 8b 93 38 02 00 00 	mov    0x238(%rbx),%rdx
ffffffff8000155f:	e9 ae fb ff ff       	jmp    ffffffff80001112 <sgr+0x112>
                            ctx->current_bg = (size_t)-2;
ffffffff80001564:	48 c7 83 70 01 00 00 	movq   $0xfffffffffffffffe,0x170(%rbx)
ffffffff8000156b:	fe ff ff ff 
                        (fg ? ctx->set_text_fg_rgb : ctx->set_text_bg_rgb)(ctx, rgb_value);
ffffffff8000156f:	48 8b 83 48 02 00 00 	mov    0x248(%rbx),%rax
ffffffff80001576:	eb ba                	jmp    ffffffff80001532 <sgr+0x532>
            i++;
ffffffff80001578:	4d 89 e5             	mov    %r12,%r13
ffffffff8000157b:	49 83 c4 01          	add    $0x1,%r12
ffffffff8000157f:	e9 a1 fa ff ff       	jmp    ffffffff80001025 <sgr+0x25>
ffffffff80001584:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000158b:	00 00 00 
ffffffff8000158e:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80001595:	00 00 00 
ffffffff80001598:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000159f:	00 00 00 
ffffffff800015a2:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800015a9:	00 00 00 
ffffffff800015ac:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800015b3:	00 00 00 
ffffffff800015b6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800015bd:	00 00 00 

ffffffff800015c0 <osc_finalize>:
        ctx->callback(ctx, FLANTERM_CB_MODE, ctx->esc_values_i, (uintptr_t)ctx->esc_values, c);
    }
}

static void osc_finalize(struct flanterm_context *ctx) {
    if (ctx->callback != NULL) {
ffffffff800015c0:	4c 8b 8f b8 02 00 00 	mov    0x2b8(%rdi),%r9
ffffffff800015c7:	4d 85 c9             	test   %r9,%r9
ffffffff800015ca:	0f 84 80 00 00 00    	je     ffffffff80001650 <osc_finalize+0x90>
        // Parse the leading OSC number and skip past the semicolon.
        uint64_t osc_num = 0;
        size_t i = 0;
        while (i < ctx->osc_buf_i && ctx->osc_buf[i] >= '0' && ctx->osc_buf[i] <= '9') {
ffffffff800015d0:	4c 8b 57 18          	mov    0x18(%rdi),%r10
        size_t i = 0;
ffffffff800015d4:	31 d2                	xor    %edx,%edx
        uint64_t osc_num = 0;
ffffffff800015d6:	31 f6                	xor    %esi,%esi
        while (i < ctx->osc_buf_i && ctx->osc_buf[i] >= '0' && ctx->osc_buf[i] <= '9') {
ffffffff800015d8:	41 b8 20 00 00 00    	mov    $0x20,%r8d
ffffffff800015de:	4d 85 d2             	test   %r10,%r10
ffffffff800015e1:	75 33                	jne    ffffffff80001616 <osc_finalize+0x56>
ffffffff800015e3:	eb 51                	jmp    ffffffff80001636 <osc_finalize+0x76>
ffffffff800015e5:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800015ec:	00 00 00 00 
ffffffff800015f0:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800015f7:	00 00 00 00 
ffffffff800015fb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            osc_num = osc_num * 10 + (ctx->osc_buf[i] - '0');
ffffffff80001600:	83 e8 30             	sub    $0x30,%eax
ffffffff80001603:	48 8d 0c b6          	lea    (%rsi,%rsi,4),%rcx
            i++;
ffffffff80001607:	48 83 c2 01          	add    $0x1,%rdx
            osc_num = osc_num * 10 + (ctx->osc_buf[i] - '0');
ffffffff8000160b:	48 98                	cltq
ffffffff8000160d:	48 8d 34 48          	lea    (%rax,%rcx,2),%rsi
        while (i < ctx->osc_buf_i && ctx->osc_buf[i] >= '0' && ctx->osc_buf[i] <= '9') {
ffffffff80001611:	4c 39 d2             	cmp    %r10,%rdx
ffffffff80001614:	74 19                	je     ffffffff8000162f <osc_finalize+0x6f>
ffffffff80001616:	0f b6 44 17 20       	movzbl 0x20(%rdi,%rdx,1),%eax
ffffffff8000161b:	8d 48 d0             	lea    -0x30(%rax),%ecx
ffffffff8000161e:	80 f9 09             	cmp    $0x9,%cl
ffffffff80001621:	76 dd                	jbe    ffffffff80001600 <osc_finalize+0x40>
        }
        if (i < ctx->osc_buf_i && ctx->osc_buf[i] == ';') {
ffffffff80001623:	4c 39 d2             	cmp    %r10,%rdx
ffffffff80001626:	73 07                	jae    ffffffff8000162f <osc_finalize+0x6f>
ffffffff80001628:	80 7c 17 20 3b       	cmpb   $0x3b,0x20(%rdi,%rdx,1)
ffffffff8000162d:	74 29                	je     ffffffff80001658 <osc_finalize+0x98>
ffffffff8000162f:	4c 8d 42 20          	lea    0x20(%rdx),%r8
            i++;
        }
        ctx->callback(ctx, FLANTERM_CB_OSC, osc_num, ctx->osc_buf_i - i, (uintptr_t)&ctx->osc_buf[i]);
ffffffff80001633:	49 29 d2             	sub    %rdx,%r10
ffffffff80001636:	48 89 f2             	mov    %rsi,%rdx
ffffffff80001639:	49 01 f8             	add    %rdi,%r8
ffffffff8000163c:	4c 89 d1             	mov    %r10,%rcx
ffffffff8000163f:	be 5a 00 00 00       	mov    $0x5a,%esi
ffffffff80001644:	41 ff e1             	jmp    *%r9
ffffffff80001647:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8000164e:	00 00 
    }
}
ffffffff80001650:	c3                   	ret
ffffffff80001651:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            i++;
ffffffff80001658:	4c 8d 42 21          	lea    0x21(%rdx),%r8
ffffffff8000165c:	48 83 c2 01          	add    $0x1,%rdx
        ctx->callback(ctx, FLANTERM_CB_OSC, osc_num, ctx->osc_buf_i - i, (uintptr_t)&ctx->osc_buf[i]);
ffffffff80001660:	49 29 d2             	sub    %rdx,%r10
ffffffff80001663:	eb d1                	jmp    ffffffff80001636 <osc_finalize+0x76>
ffffffff80001665:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000166c:	00 00 00 
ffffffff8000166f:	90                   	nop

ffffffff80001670 <flanterm_context_reinit>:
    ctx->g_select = 0;
ffffffff80001670:	31 c0                	xor    %eax,%eax
    ctx->last_printed_char = ' ';
ffffffff80001672:	ba 20 00 00 00       	mov    $0x20,%edx
    ctx->osc_escape = false;
ffffffff80001677:	c6 47 10 00          	movb   $0x0,0x10(%rdi)
    ctx->g_select = 0;
ffffffff8000167b:	66 89 87 38 01 00 00 	mov    %ax,0x138(%rdi)
    ctx->scroll_bottom_margin = ctx->rows;
ffffffff80001682:	48 8b 87 f0 01 00 00 	mov    0x1f0(%rdi),%rax
    ctx->tab_size = 8;
ffffffff80001689:	48 c7 07 08 00 00 00 	movq   $0x8,(%rdi)
    ctx->autoflush = true;
ffffffff80001690:	48 c7 47 08 01 01 01 	movq   $0x1010101,0x8(%rdi)
ffffffff80001697:	01 
    ctx->rrr = false;
ffffffff80001698:	48 c7 87 20 01 00 00 	movq   $0x0,0x120(%rdi)
ffffffff8000169f:	00 00 00 00 
    ctx->unicode_remaining = 0;
ffffffff800016a3:	48 c7 87 30 01 00 00 	movq   $0x0,0x130(%rdi)
ffffffff800016aa:	00 00 00 00 
    ctx->charsets[1] = CHARSET_DEC_SPECIAL;
ffffffff800016ae:	c6 87 3a 01 00 00 01 	movb   $0x1,0x13a(%rdi)
    ctx->current_charset = 0;
ffffffff800016b5:	48 c7 87 40 01 00 00 	movq   $0x0,0x140(%rdi)
ffffffff800016bc:	00 00 00 00 
    ctx->escape_offset = 0;
ffffffff800016c0:	48 c7 87 48 01 00 00 	movq   $0x0,0x148(%rdi)
ffffffff800016c7:	00 00 00 00 
    ctx->esc_values_i = 0;
ffffffff800016cb:	48 c7 87 50 01 00 00 	movq   $0x0,0x150(%rdi)
ffffffff800016d2:	00 00 00 00 
    ctx->saved_cursor_x = 0;
ffffffff800016d6:	48 c7 87 58 01 00 00 	movq   $0x0,0x158(%rdi)
ffffffff800016dd:	00 00 00 00 
    ctx->saved_cursor_y = 0;
ffffffff800016e1:	48 c7 87 60 01 00 00 	movq   $0x0,0x160(%rdi)
ffffffff800016e8:	00 00 00 00 
    ctx->current_primary = (size_t)-1;
ffffffff800016ec:	48 c7 87 68 01 00 00 	movq   $0xffffffffffffffff,0x168(%rdi)
ffffffff800016f3:	ff ff ff ff 
    ctx->current_bg = (size_t)-1;
ffffffff800016f7:	48 c7 87 70 01 00 00 	movq   $0xffffffffffffffff,0x170(%rdi)
ffffffff800016fe:	ff ff ff ff 
    ctx->saved_state_current_primary = (size_t)-1;
ffffffff80001702:	48 c7 87 e0 01 00 00 	movq   $0xffffffffffffffff,0x1e0(%rdi)
ffffffff80001709:	ff ff ff ff 
    ctx->saved_state_current_bg = (size_t)-1;
ffffffff8000170d:	48 c7 87 e8 01 00 00 	movq   $0xffffffffffffffff,0x1e8(%rdi)
ffffffff80001714:	ff ff ff ff 
    ctx->last_printed_char = ' ';
ffffffff80001718:	66 89 97 c8 01 00 00 	mov    %dx,0x1c8(%rdi)
    ctx->scroll_top_margin = 0;
ffffffff8000171f:	48 c7 87 78 01 00 00 	movq   $0x0,0x178(%rdi)
ffffffff80001726:	00 00 00 00 
    ctx->scroll_bottom_margin = ctx->rows;
ffffffff8000172a:	48 89 87 80 01 00 00 	mov    %rax,0x180(%rdi)
}
ffffffff80001731:	c3                   	ret
ffffffff80001732:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80001739:	00 00 00 
ffffffff8000173c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff80001740 <flanterm_write>:
void flanterm_write(struct flanterm_context *ctx, const char *buf, size_t count) {
ffffffff80001740:	55                   	push   %rbp
ffffffff80001741:	48 89 e5             	mov    %rsp,%rbp
ffffffff80001744:	41 57                	push   %r15
ffffffff80001746:	41 56                	push   %r14
ffffffff80001748:	41 55                	push   %r13
ffffffff8000174a:	49 89 f5             	mov    %rsi,%r13
ffffffff8000174d:	41 54                	push   %r12
ffffffff8000174f:	49 89 fc             	mov    %rdi,%r12
ffffffff80001752:	53                   	push   %rbx
ffffffff80001753:	48 8d 1c 16          	lea    (%rsi,%rdx,1),%rbx
ffffffff80001757:	48 83 ec 38          	sub    $0x38,%rsp
    for (size_t i = 0; i < count; i++) {
ffffffff8000175b:	48 85 d2             	test   %rdx,%rdx
ffffffff8000175e:	0f 84 ec 00 00 00    	je     ffffffff80001850 <flanterm_write+0x110>
ffffffff80001764:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000176b:	00 00 00 00 
ffffffff8000176f:	90                   	nop

    return -1;
}

static void flanterm_putchar(struct flanterm_context *ctx, uint8_t c) {
    if (ctx->discard_next || (c == 0x18 || c == 0x1a)) {
ffffffff80001770:	41 80 bc 24 21 01 00 	cmpb   $0x0,0x121(%r12)
ffffffff80001777:	00 00 
ffffffff80001779:	0f 85 61 01 00 00    	jne    ffffffff800018e0 <flanterm_write+0x1a0>
        flanterm_putchar(ctx, buf[i]);
ffffffff8000177f:	45 0f b6 7d 00       	movzbl 0x0(%r13),%r15d
    if (ctx->discard_next || (c == 0x18 || c == 0x1a)) {
ffffffff80001784:	44 89 f8             	mov    %r15d,%eax
ffffffff80001787:	83 e0 fd             	and    $0xfffffffd,%eax
ffffffff8000178a:	3c 18                	cmp    $0x18,%al
ffffffff8000178c:	0f 84 4e 01 00 00    	je     ffffffff800018e0 <flanterm_write+0x1a0>
        ctx->g_select = 0;
        ctx->last_was_graphic = false;
        return;
    }

    if (ctx->unicode_remaining != 0) {
ffffffff80001792:	49 8b 84 24 30 01 00 	mov    0x130(%r12),%rax
ffffffff80001799:	00 
ffffffff8000179a:	48 85 c0             	test   %rax,%rax
ffffffff8000179d:	74 2b                	je     ffffffff800017ca <flanterm_write+0x8a>
        if ((c & 0xc0) != 0x80) {
ffffffff8000179f:	44 89 fa             	mov    %r15d,%edx
ffffffff800017a2:	83 e2 c0             	and    $0xffffffc0,%edx
ffffffff800017a5:	80 fa 80             	cmp    $0x80,%dl
ffffffff800017a8:	0f 84 c2 01 00 00    	je     ffffffff80001970 <flanterm_write+0x230>
            ctx->unicode_remaining = 0;
ffffffff800017ae:	49 c7 84 24 30 01 00 	movq   $0x0,0x130(%r12)
ffffffff800017b5:	00 00 00 00 00 
            ctx->raw_putchar(ctx, 0xfe);
ffffffff800017ba:	be fe 00 00 00       	mov    $0xfe,%esi
ffffffff800017bf:	4c 89 e7             	mov    %r12,%rdi
ffffffff800017c2:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff800017c9:	00 
        }
        return;
    }

unicode_error:
    if (c >= 0xc2 && c <= 0xf4) {
ffffffff800017ca:	41 8d 57 3e          	lea    0x3e(%r15),%edx
ffffffff800017ce:	80 fa 32             	cmp    $0x32,%dl
ffffffff800017d1:	0f 86 51 01 00 00    	jbe    ffffffff80001928 <flanterm_write+0x1e8>
            ctx->code_point = (uint64_t)(c & 0x07) << (6 * 3);
        }
        return;
    }

    if (ctx->escape == true) {
ffffffff800017d7:	45 0f b6 74 24 0e    	movzbl 0xe(%r12),%r14d
ffffffff800017dd:	45 84 f6             	test   %r14b,%r14b
ffffffff800017e0:	0f 85 8a 03 00 00    	jne    ffffffff80001b70 <flanterm_write+0x430>
        escape_parse(ctx, c);
        return;
    }

    if (ctx->g_select) {
ffffffff800017e6:	41 0f b6 84 24 38 01 	movzbl 0x138(%r12),%eax
ffffffff800017ed:	00 00 
    if (c < 0x20 && c != 0x1b) {
ffffffff800017ef:	41 80 ff 1f          	cmp    $0x1f,%r15b
ffffffff800017f3:	0f 96 c2             	setbe  %dl
        if (c <= 0x1f || c == 0x7f) {
ffffffff800017f6:	41 80 ff 7f          	cmp    $0x7f,%r15b
ffffffff800017fa:	0f 94 c1             	sete   %cl
    if (ctx->g_select) {
ffffffff800017fd:	84 c0                	test   %al,%al
ffffffff800017ff:	0f 84 84 00 00 00    	je     ffffffff80001889 <flanterm_write+0x149>
        if (c <= 0x1f || c == 0x7f) {
ffffffff80001805:	84 d2                	test   %dl,%dl
ffffffff80001807:	75 77                	jne    ffffffff80001880 <flanterm_write+0x140>
ffffffff80001809:	84 c9                	test   %cl,%cl
ffffffff8000180b:	75 73                	jne    ffffffff80001880 <flanterm_write+0x140>
            ctx->g_select = 0;
        } else {
            ctx->g_select--;
ffffffff8000180d:	83 e8 01             	sub    $0x1,%eax
            switch (c) {
ffffffff80001810:	41 80 ff 30          	cmp    $0x30,%r15b
ffffffff80001814:	0f 84 1e 05 00 00    	je     ffffffff80001d38 <flanterm_write+0x5f8>
ffffffff8000181a:	41 80 ff 42          	cmp    $0x42,%r15b
ffffffff8000181e:	75 0c                	jne    ffffffff8000182c <flanterm_write+0xec>
                case 'B':
                    ctx->charsets[ctx->g_select] = CHARSET_DEFAULT; break;
ffffffff80001820:	0f b6 c0             	movzbl %al,%eax
ffffffff80001823:	41 c6 84 04 39 01 00 	movb   $0x0,0x139(%r12,%rax,1)
ffffffff8000182a:	00 00 
                case '0':
                    ctx->charsets[ctx->g_select] = CHARSET_DEC_SPECIAL; break;
            }
            ctx->g_select = 0;
ffffffff8000182c:	41 c6 84 24 38 01 00 	movb   $0x0,0x138(%r12)
ffffffff80001833:	00 00 
            return;
ffffffff80001835:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000183c:	00 00 00 00 
    for (size_t i = 0; i < count; i++) {
ffffffff80001840:	49 83 c5 01          	add    $0x1,%r13
ffffffff80001844:	49 39 dd             	cmp    %rbx,%r13
ffffffff80001847:	0f 85 23 ff ff ff    	jne    ffffffff80001770 <flanterm_write+0x30>
ffffffff8000184d:	0f 1f 00             	nopl   (%rax)
    if (ctx->autoflush) {
ffffffff80001850:	41 80 7c 24 08 00    	cmpb   $0x0,0x8(%r12)
ffffffff80001856:	0f 84 a4 02 00 00    	je     ffffffff80001b00 <flanterm_write+0x3c0>
        ctx->double_buffer_flush(ctx);
ffffffff8000185c:	49 8b 84 24 a0 02 00 	mov    0x2a0(%r12),%rax
ffffffff80001863:	00 
}
ffffffff80001864:	48 83 c4 38          	add    $0x38,%rsp
        ctx->double_buffer_flush(ctx);
ffffffff80001868:	4c 89 e7             	mov    %r12,%rdi
}
ffffffff8000186b:	5b                   	pop    %rbx
ffffffff8000186c:	41 5c                	pop    %r12
ffffffff8000186e:	41 5d                	pop    %r13
ffffffff80001870:	41 5e                	pop    %r14
ffffffff80001872:	41 5f                	pop    %r15
ffffffff80001874:	5d                   	pop    %rbp
        ctx->double_buffer_flush(ctx);
ffffffff80001875:	ff e0                	jmp    *%rax
ffffffff80001877:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8000187e:	00 00 
            ctx->g_select = 0;
ffffffff80001880:	41 c6 84 24 38 01 00 	movb   $0x0,0x138(%r12)
ffffffff80001887:	00 00 
        }
    }

    if ((c <= 0x1f && c != 0x1b) || c == 0x7f) {
ffffffff80001889:	41 80 ff 1b          	cmp    $0x1b,%r15b
ffffffff8000188d:	0f 95 c0             	setne  %al
ffffffff80001890:	84 d0                	test   %dl,%al
ffffffff80001892:	75 04                	jne    ffffffff80001898 <flanterm_write+0x158>
ffffffff80001894:	84 c9                	test   %cl,%cl
ffffffff80001896:	74 09                	je     ffffffff800018a1 <flanterm_write+0x161>
        ctx->last_was_graphic = false;
ffffffff80001898:	41 c6 84 24 c9 01 00 	movb   $0x0,0x1c9(%r12)
ffffffff8000189f:	00 00 
    }

    size_t x, y;
    ctx->get_cursor_pos(ctx, &x, &y);
ffffffff800018a1:	48 8d 75 c0          	lea    -0x40(%rbp),%rsi
ffffffff800018a5:	48 8d 55 c8          	lea    -0x38(%rbp),%rdx
ffffffff800018a9:	4c 89 e7             	mov    %r12,%rdi
ffffffff800018ac:	41 ff 94 24 18 02 00 	call   *0x218(%r12)
ffffffff800018b3:	00 

    switch (c) {
ffffffff800018b4:	41 80 ff 1b          	cmp    $0x1b,%r15b
ffffffff800018b8:	0f 8f 92 03 00 00    	jg     ffffffff80001c50 <flanterm_write+0x510>
ffffffff800018be:	45 84 ff             	test   %r15b,%r15b
ffffffff800018c1:	0f 88 a6 06 00 00    	js     ffffffff80001f6d <flanterm_write+0x82d>
ffffffff800018c7:	41 80 ff 1b          	cmp    $0x1b,%r15b
ffffffff800018cb:	0f 87 8f 03 00 00    	ja     ffffffff80001c60 <flanterm_write+0x520>
ffffffff800018d1:	41 0f b6 c7          	movzbl %r15b,%eax
ffffffff800018d5:	ff 24 c5 60 53 02 80 	jmp    *-0x7ffdaca0(,%rax,8)
ffffffff800018dc:	0f 1f 40 00          	nopl   0x0(%rax)
        ctx->discard_next = false;
ffffffff800018e0:	41 c6 84 24 21 01 00 	movb   $0x0,0x121(%r12)
ffffffff800018e7:	00 00 
    for (size_t i = 0; i < count; i++) {
ffffffff800018e9:	49 83 c5 01          	add    $0x1,%r13
        ctx->unicode_remaining = 0;
ffffffff800018ed:	49 c7 84 24 30 01 00 	movq   $0x0,0x130(%r12)
ffffffff800018f4:	00 00 00 00 00 
        ctx->control_sequence = false;
ffffffff800018f9:	41 c7 44 24 0d 00 00 	movl   $0x0,0xd(%r12)
ffffffff80001900:	00 00 
        ctx->g_select = 0;
ffffffff80001902:	41 c6 84 24 38 01 00 	movb   $0x0,0x138(%r12)
ffffffff80001909:	00 00 
        ctx->last_was_graphic = false;
ffffffff8000190b:	41 c6 84 24 c9 01 00 	movb   $0x0,0x1c9(%r12)
ffffffff80001912:	00 00 
    for (size_t i = 0; i < count; i++) {
ffffffff80001914:	49 39 dd             	cmp    %rbx,%r13
ffffffff80001917:	0f 85 53 fe ff ff    	jne    ffffffff80001770 <flanterm_write+0x30>
ffffffff8000191d:	e9 2e ff ff ff       	jmp    ffffffff80001850 <flanterm_write+0x110>
ffffffff80001922:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        ctx->g_select = 0;
ffffffff80001928:	41 c6 84 24 38 01 00 	movb   $0x0,0x138(%r12)
ffffffff8000192f:	00 00 
            ctx->code_point = (uint64_t)(c & 0x1f) << 6;
ffffffff80001931:	41 0f b6 c7          	movzbl %r15b,%eax
        if (c >= 0xc2 && c <= 0xdf) {
ffffffff80001935:	80 fa 1d             	cmp    $0x1d,%dl
ffffffff80001938:	0f 87 82 01 00 00    	ja     ffffffff80001ac0 <flanterm_write+0x380>
            ctx->code_point = (uint64_t)(c & 0x1f) << 6;
ffffffff8000193e:	48 c1 e0 06          	shl    $0x6,%rax
    for (size_t i = 0; i < count; i++) {
ffffffff80001942:	49 83 c5 01          	add    $0x1,%r13
            ctx->unicode_remaining = 1;
ffffffff80001946:	49 c7 84 24 30 01 00 	movq   $0x1,0x130(%r12)
ffffffff8000194d:	00 01 00 00 00 
            ctx->code_point = (uint64_t)(c & 0x1f) << 6;
ffffffff80001952:	25 c0 07 00 00       	and    $0x7c0,%eax
ffffffff80001957:	49 89 84 24 28 01 00 	mov    %rax,0x128(%r12)
ffffffff8000195e:	00 
    for (size_t i = 0; i < count; i++) {
ffffffff8000195f:	49 39 dd             	cmp    %rbx,%r13
ffffffff80001962:	0f 85 08 fe ff ff    	jne    ffffffff80001770 <flanterm_write+0x30>
ffffffff80001968:	e9 e3 fe ff ff       	jmp    ffffffff80001850 <flanterm_write+0x110>
ffffffff8000196d:	0f 1f 00             	nopl   (%rax)
        ctx->unicode_remaining--;
ffffffff80001970:	48 83 e8 01          	sub    $0x1,%rax
        ctx->code_point |= (uint64_t)(c & 0x3f) << (6 * ctx->unicode_remaining);
ffffffff80001974:	4c 89 fa             	mov    %r15,%rdx
ffffffff80001977:	8d 0c 40             	lea    (%rax,%rax,2),%ecx
ffffffff8000197a:	83 e2 3f             	and    $0x3f,%edx
        ctx->unicode_remaining--;
ffffffff8000197d:	49 89 84 24 30 01 00 	mov    %rax,0x130(%r12)
ffffffff80001984:	00 
        ctx->code_point |= (uint64_t)(c & 0x3f) << (6 * ctx->unicode_remaining);
ffffffff80001985:	01 c9                	add    %ecx,%ecx
ffffffff80001987:	48 d3 e2             	shl    %cl,%rdx
ffffffff8000198a:	49 0b 94 24 28 01 00 	or     0x128(%r12),%rdx
ffffffff80001991:	00 
ffffffff80001992:	49 89 94 24 28 01 00 	mov    %rdx,0x128(%r12)
ffffffff80001999:	00 
        if (ctx->unicode_remaining == 1 && ctx->code_point < 0x800) {
ffffffff8000199a:	48 83 f8 01          	cmp    $0x1,%rax
ffffffff8000199e:	0f 84 8c 02 00 00    	je     ffffffff80001c30 <flanterm_write+0x4f0>
        if (ctx->unicode_remaining == 2 && ctx->code_point < 0x10000) {
ffffffff800019a4:	48 83 f8 02          	cmp    $0x2,%rax
ffffffff800019a8:	0f 84 92 01 00 00    	je     ffffffff80001b40 <flanterm_write+0x400>
        if (ctx->unicode_remaining != 0) {
ffffffff800019ae:	48 85 c0             	test   %rax,%rax
ffffffff800019b1:	0f 85 89 fe ff ff    	jne    ffffffff80001840 <flanterm_write+0x100>
        if (ctx->code_point >= 0xd800 && ctx->code_point <= 0xdfff) {
ffffffff800019b7:	48 8d 82 00 28 ff ff 	lea    -0xd800(%rdx),%rax
ffffffff800019be:	48 3d ff 07 00 00    	cmp    $0x7ff,%rax
ffffffff800019c4:	0f 86 0d fe ff ff    	jbe    ffffffff800017d7 <flanterm_write+0x97>
    if (code_point >= 0x2800 && code_point <= 0x28ff) {
ffffffff800019ca:	48 8d 82 00 d8 ff ff 	lea    -0x2800(%rdx),%rax
ffffffff800019d1:	48 3d ff 00 00 00    	cmp    $0xff,%rax
ffffffff800019d7:	0f 87 23 05 00 00    	ja     ffffffff80001f00 <flanterm_write+0x7c0>
        if (dots == 0) return 0x20;
ffffffff800019dd:	89 d0                	mov    %edx,%eax
ffffffff800019df:	2d 00 28 00 00       	sub    $0x2800,%eax
ffffffff800019e4:	0f 84 d8 0b 00 00    	je     ffffffff800025c2 <flanterm_write+0xe82>
        if (dots == 0xff) return 0xdb;
ffffffff800019ea:	3d ff 00 00 00       	cmp    $0xff,%eax
ffffffff800019ef:	0f 84 ee 0d 00 00    	je     ffffffff800027e3 <flanterm_write+0x10a3>
        bool has_bottom = dots & 0xe4;
ffffffff800019f5:	89 c1                	mov    %eax,%ecx
        if (has_top && !has_bottom) return 0xdf; // ▀
ffffffff800019f7:	41 89 c0             	mov    %eax,%r8d
        bool has_bottom = dots & 0xe4;
ffffffff800019fa:	81 e1 e4 00 00 00    	and    $0xe4,%ecx
ffffffff80001a00:	40 0f 95 c6          	setne  %sil
        if (has_top && !has_bottom) return 0xdf; // ▀
ffffffff80001a04:	41 83 e0 1b          	and    $0x1b,%r8d
ffffffff80001a08:	0f 84 f2 05 00 00    	je     ffffffff80002000 <flanterm_write+0x8c0>
ffffffff80001a0e:	85 c9                	test   %ecx,%ecx
ffffffff80001a10:	0f 84 8a 0d 00 00    	je     ffffffff800027a0 <flanterm_write+0x1060>
        if (has_bottom && !has_top) return 0xdc; // ▄
ffffffff80001a16:	45 85 c0             	test   %r8d,%r8d
ffffffff80001a19:	0f 84 e1 05 00 00    	je     ffffffff80002000 <flanterm_write+0x8c0>
        bool has_right = dots & 0xb8;
ffffffff80001a1f:	89 c1                	mov    %eax,%ecx
        if (has_left && !has_right) return 0xdd; // ▌
ffffffff80001a21:	89 c6                	mov    %eax,%esi
        bool has_right = dots & 0xb8;
ffffffff80001a23:	81 e1 b8 00 00 00    	and    $0xb8,%ecx
        if (has_left && !has_right) return 0xdd; // ▌
ffffffff80001a29:	83 e6 47             	and    $0x47,%esi
ffffffff80001a2c:	0f 84 de 0c 00 00    	je     ffffffff80002710 <flanterm_write+0xfd0>
ffffffff80001a32:	85 c9                	test   %ecx,%ecx
ffffffff80001a34:	0f 84 b8 0d 00 00    	je     ffffffff800027f2 <flanterm_write+0x10b2>
        if (has_right && !has_left) return 0xde; // ▐
ffffffff80001a3a:	85 f6                	test   %esi,%esi
ffffffff80001a3c:	0f 84 e6 0e 00 00    	je     ffffffff80002928 <flanterm_write+0x11e8>
        uint32_t n = dots - ((dots >> 1) & 0x55);
ffffffff80001a42:	d1 ea                	shr    $1,%edx
ffffffff80001a44:	83 e2 55             	and    $0x55,%edx
ffffffff80001a47:	29 d0                	sub    %edx,%eax
        n = (n & 0x33) + ((n >> 2) & 0x33);
ffffffff80001a49:	89 c2                	mov    %eax,%edx
ffffffff80001a4b:	c1 e8 02             	shr    $0x2,%eax
ffffffff80001a4e:	83 e0 33             	and    $0x33,%eax
ffffffff80001a51:	83 e2 33             	and    $0x33,%edx
ffffffff80001a54:	01 c2                	add    %eax,%edx
        n = (n + (n >> 4)) & 0x0f;
ffffffff80001a56:	89 d0                	mov    %edx,%eax
ffffffff80001a58:	c1 e8 04             	shr    $0x4,%eax
ffffffff80001a5b:	01 d0                	add    %edx,%eax
ffffffff80001a5d:	83 e0 0f             	and    $0xf,%eax
        if (n <= 2) return 0xb0; // ░
ffffffff80001a60:	83 f8 02             	cmp    $0x2,%eax
ffffffff80001a63:	0f 86 67 0f 00 00    	jbe    ffffffff800029d0 <flanterm_write+0x1290>
        if (n <= 4) return 0xb1; // ▒
ffffffff80001a69:	83 f8 04             	cmp    $0x4,%eax
ffffffff80001a6c:	0f 86 60 10 00 00    	jbe    ffffffff80002ad2 <flanterm_write+0x1392>
        if (n <= 6) return 0xb2; // ▓
ffffffff80001a72:	83 f8 06             	cmp    $0x6,%eax
ffffffff80001a75:	0f 86 61 0e 00 00    	jbe    ffffffff800028dc <flanterm_write+0x119c>
ffffffff80001a7b:	b8 db ff ff ff       	mov    $0xffffffdb,%eax
        if (dots == 0xff) return 0xdb;
ffffffff80001a80:	be db 00 00 00       	mov    $0xdb,%esi
ffffffff80001a85:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80001a8c:	00 00 00 00 
    for (size_t i = 0; i < count; i++) {
ffffffff80001a90:	49 83 c5 01          	add    $0x1,%r13
            ctx->last_printed_char = cc;
ffffffff80001a94:	41 88 84 24 c8 01 00 	mov    %al,0x1c8(%r12)
ffffffff80001a9b:	00 
            ctx->raw_putchar(ctx, cc);
ffffffff80001a9c:	4c 89 e7             	mov    %r12,%rdi
            ctx->last_was_graphic = true;
ffffffff80001a9f:	41 c6 84 24 c9 01 00 	movb   $0x1,0x1c9(%r12)
ffffffff80001aa6:	00 01 
            ctx->raw_putchar(ctx, cc);
ffffffff80001aa8:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80001aaf:	00 
    for (size_t i = 0; i < count; i++) {
ffffffff80001ab0:	49 39 dd             	cmp    %rbx,%r13
ffffffff80001ab3:	0f 85 b7 fc ff ff    	jne    ffffffff80001770 <flanterm_write+0x30>
ffffffff80001ab9:	e9 92 fd ff ff       	jmp    ffffffff80001850 <flanterm_write+0x110>
ffffffff80001abe:	66 90                	xchg   %ax,%ax
        } else if (c >= 0xe0 && c <= 0xef) {
ffffffff80001ac0:	41 83 c7 20          	add    $0x20,%r15d
ffffffff80001ac4:	41 80 ff 0f          	cmp    $0xf,%r15b
ffffffff80001ac8:	77 46                	ja     ffffffff80001b10 <flanterm_write+0x3d0>
            ctx->code_point = (uint64_t)(c & 0x0f) << (6 * 2);
ffffffff80001aca:	48 c1 e0 0c          	shl    $0xc,%rax
    for (size_t i = 0; i < count; i++) {
ffffffff80001ace:	49 83 c5 01          	add    $0x1,%r13
            ctx->unicode_remaining = 2;
ffffffff80001ad2:	49 c7 84 24 30 01 00 	movq   $0x2,0x130(%r12)
ffffffff80001ad9:	00 02 00 00 00 
            ctx->code_point = (uint64_t)(c & 0x0f) << (6 * 2);
ffffffff80001ade:	25 ff ff 00 00       	and    $0xffff,%eax
ffffffff80001ae3:	49 89 84 24 28 01 00 	mov    %rax,0x128(%r12)
ffffffff80001aea:	00 
    for (size_t i = 0; i < count; i++) {
ffffffff80001aeb:	49 39 dd             	cmp    %rbx,%r13
ffffffff80001aee:	0f 85 7c fc ff ff    	jne    ffffffff80001770 <flanterm_write+0x30>
ffffffff80001af4:	e9 57 fd ff ff       	jmp    ffffffff80001850 <flanterm_write+0x110>
ffffffff80001af9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
}
ffffffff80001b00:	48 83 c4 38          	add    $0x38,%rsp
ffffffff80001b04:	5b                   	pop    %rbx
ffffffff80001b05:	41 5c                	pop    %r12
ffffffff80001b07:	41 5d                	pop    %r13
ffffffff80001b09:	41 5e                	pop    %r14
ffffffff80001b0b:	41 5f                	pop    %r15
ffffffff80001b0d:	5d                   	pop    %rbp
ffffffff80001b0e:	c3                   	ret
ffffffff80001b0f:	90                   	nop
            ctx->code_point = (uint64_t)(c & 0x07) << (6 * 3);
ffffffff80001b10:	48 c1 e0 12          	shl    $0x12,%rax
    for (size_t i = 0; i < count; i++) {
ffffffff80001b14:	49 83 c5 01          	add    $0x1,%r13
            ctx->unicode_remaining = 3;
ffffffff80001b18:	49 c7 84 24 30 01 00 	movq   $0x3,0x130(%r12)
ffffffff80001b1f:	00 03 00 00 00 
            ctx->code_point = (uint64_t)(c & 0x07) << (6 * 3);
ffffffff80001b24:	25 00 00 1c 00       	and    $0x1c0000,%eax
ffffffff80001b29:	49 89 84 24 28 01 00 	mov    %rax,0x128(%r12)
ffffffff80001b30:	00 
    for (size_t i = 0; i < count; i++) {
ffffffff80001b31:	49 39 dd             	cmp    %rbx,%r13
ffffffff80001b34:	0f 85 36 fc ff ff    	jne    ffffffff80001770 <flanterm_write+0x30>
ffffffff80001b3a:	e9 11 fd ff ff       	jmp    ffffffff80001850 <flanterm_write+0x110>
ffffffff80001b3f:	90                   	nop
        if (ctx->unicode_remaining == 2 && ctx->code_point < 0x10000) {
ffffffff80001b40:	48 81 ea 00 00 01 00 	sub    $0x10000,%rdx
ffffffff80001b47:	48 81 fa ff ff 0f 00 	cmp    $0xfffff,%rdx
ffffffff80001b4e:	0f 86 ec fc ff ff    	jbe    ffffffff80001840 <flanterm_write+0x100>
    if (ctx->escape == true) {
ffffffff80001b54:	45 0f b6 74 24 0e    	movzbl 0xe(%r12),%r14d
            ctx->unicode_remaining = 0;
ffffffff80001b5a:	49 c7 84 24 30 01 00 	movq   $0x0,0x130(%r12)
ffffffff80001b61:	00 00 00 00 00 
    if (ctx->escape == true) {
ffffffff80001b66:	45 84 f6             	test   %r14b,%r14b
ffffffff80001b69:	0f 84 77 fc ff ff    	je     ffffffff800017e6 <flanterm_write+0xa6>
ffffffff80001b6f:	90                   	nop
    ctx->escape_offset++;
ffffffff80001b70:	49 8b 84 24 48 01 00 	mov    0x148(%r12),%rax
ffffffff80001b77:	00 
ffffffff80001b78:	48 83 c0 01          	add    $0x1,%rax
    if (ctx->osc == true) {
ffffffff80001b7c:	41 80 7c 24 0f 00    	cmpb   $0x0,0xf(%r12)
    ctx->escape_offset++;
ffffffff80001b82:	49 89 84 24 48 01 00 	mov    %rax,0x148(%r12)
ffffffff80001b89:	00 
    if (ctx->osc == true) {
ffffffff80001b8a:	0f 85 c8 02 00 00    	jne    ffffffff80001e58 <flanterm_write+0x718>
    if (ctx->control_sequence == true) {
ffffffff80001b90:	41 80 7c 24 0d 00    	cmpb   $0x0,0xd(%r12)
ffffffff80001b96:	0f 85 03 04 00 00    	jne    ffffffff80001f9f <flanterm_write+0x85f>
    ctx->get_cursor_pos(ctx, &x, &y);
ffffffff80001b9c:	48 8d 55 c8          	lea    -0x38(%rbp),%rdx
ffffffff80001ba0:	48 8d 75 c0          	lea    -0x40(%rbp),%rsi
ffffffff80001ba4:	4c 89 e7             	mov    %r12,%rdi
ffffffff80001ba7:	41 ff 94 24 18 02 00 	call   *0x218(%r12)
ffffffff80001bae:	00 
    switch (c) {
ffffffff80001baf:	41 8d 47 e5          	lea    -0x1b(%r15),%eax
ffffffff80001bb3:	3c 48                	cmp    $0x48,%al
ffffffff80001bb5:	77 59                	ja     ffffffff80001c10 <flanterm_write+0x4d0>
ffffffff80001bb7:	0f b6 c0             	movzbl %al,%eax
ffffffff80001bba:	ff 24 c5 40 54 02 80 	jmp    *-0x7ffdabc0(,%rax,8)
            if (ctx->reverse_video) {
ffffffff80001bc1:	41 80 bc 24 24 01 00 	cmpb   $0x0,0x124(%r12)
ffffffff80001bc8:	00 00 
ffffffff80001bca:	74 0b                	je     ffffffff80001bd7 <flanterm_write+0x497>
                ctx->swap_palette(ctx);
ffffffff80001bcc:	4c 89 e7             	mov    %r12,%rdi
ffffffff80001bcf:	41 ff 94 24 88 02 00 	call   *0x288(%r12)
ffffffff80001bd6:	00 
            flanterm_context_reinit(ctx);
ffffffff80001bd7:	4c 89 e7             	mov    %r12,%rdi
ffffffff80001bda:	e8 91 fa ff ff       	call   ffffffff80001670 <flanterm_context_reinit>
            ctx->set_text_bg_default(ctx);
ffffffff80001bdf:	41 ff 94 24 58 02 00 	call   *0x258(%r12)
ffffffff80001be6:	00 
            ctx->set_text_fg_default(ctx);
ffffffff80001be7:	4c 89 e7             	mov    %r12,%rdi
ffffffff80001bea:	41 ff 94 24 50 02 00 	call   *0x250(%r12)
ffffffff80001bf1:	00 
            ctx->clear(ctx, true);
ffffffff80001bf2:	be 01 00 00 00       	mov    $0x1,%esi
ffffffff80001bf7:	4c 89 e7             	mov    %r12,%rdi
ffffffff80001bfa:	41 ff 94 24 08 02 00 	call   *0x208(%r12)
ffffffff80001c01:	00 
            break;
ffffffff80001c02:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80001c09:	00 00 00 00 
ffffffff80001c0d:	0f 1f 00             	nopl   (%rax)
    for (size_t i = 0; i < count; i++) {
ffffffff80001c10:	49 83 c5 01          	add    $0x1,%r13
    ctx->escape = false;
ffffffff80001c14:	41 c6 44 24 0e 00    	movb   $0x0,0xe(%r12)
    for (size_t i = 0; i < count; i++) {
ffffffff80001c1a:	49 39 dd             	cmp    %rbx,%r13
ffffffff80001c1d:	0f 85 4d fb ff ff    	jne    ffffffff80001770 <flanterm_write+0x30>
ffffffff80001c23:	e9 28 fc ff ff       	jmp    ffffffff80001850 <flanterm_write+0x110>
ffffffff80001c28:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80001c2f:	00 
        if (ctx->unicode_remaining == 1 && ctx->code_point < 0x800) {
ffffffff80001c30:	48 81 fa ff 07 00 00 	cmp    $0x7ff,%rdx
ffffffff80001c37:	0f 86 17 ff ff ff    	jbe    ffffffff80001b54 <flanterm_write+0x414>
    for (size_t i = 0; i < count; i++) {
ffffffff80001c3d:	49 83 c5 01          	add    $0x1,%r13
ffffffff80001c41:	49 39 dd             	cmp    %rbx,%r13
ffffffff80001c44:	0f 85 26 fb ff ff    	jne    ffffffff80001770 <flanterm_write+0x30>
ffffffff80001c4a:	e9 01 fc ff ff       	jmp    ffffffff80001850 <flanterm_write+0x110>
ffffffff80001c4f:	90                   	nop
    switch (c) {
ffffffff80001c50:	41 80 ff 7f          	cmp    $0x7f,%r15b
ffffffff80001c54:	0f 84 e6 fb ff ff    	je     ffffffff80001840 <flanterm_write+0x100>
ffffffff80001c5a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            // Move to G0 set
            ctx->current_charset = 0;
            return;
    }

    if (ctx->insert_mode == true) {
ffffffff80001c60:	41 80 bc 24 26 01 00 	cmpb   $0x0,0x126(%r12)
ffffffff80001c67:	00 00 
ffffffff80001c69:	0f 84 69 03 00 00    	je     ffffffff80001fd8 <flanterm_write+0x898>
        for (size_t i = ctx->cols - 1; i > x; i--) {
ffffffff80001c6f:	49 8b 84 24 f8 01 00 	mov    0x1f8(%r12),%rax
ffffffff80001c76:	00 
ffffffff80001c77:	4c 8d 70 ff          	lea    -0x1(%rax),%r14
ffffffff80001c7b:	4c 39 75 c0          	cmp    %r14,-0x40(%rbp)
ffffffff80001c7f:	73 31                	jae    ffffffff80001cb2 <flanterm_write+0x572>
ffffffff80001c81:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80001c88:	00 00 00 00 
ffffffff80001c8c:	0f 1f 40 00          	nopl   0x0(%rax)
            ctx->move_character(ctx, i, y, i - 1, y);
ffffffff80001c90:	48 8b 55 c8          	mov    -0x38(%rbp),%rdx
ffffffff80001c94:	4c 89 f6             	mov    %r14,%rsi
ffffffff80001c97:	49 83 ee 01          	sub    $0x1,%r14
ffffffff80001c9b:	4c 89 e7             	mov    %r12,%rdi
ffffffff80001c9e:	4c 89 f1             	mov    %r14,%rcx
ffffffff80001ca1:	49 89 d0             	mov    %rdx,%r8
ffffffff80001ca4:	41 ff 94 24 70 02 00 	call   *0x270(%r12)
ffffffff80001cab:	00 
        for (size_t i = ctx->cols - 1; i > x; i--) {
ffffffff80001cac:	4c 39 75 c0          	cmp    %r14,-0x40(%rbp)
ffffffff80001cb0:	72 de                	jb     ffffffff80001c90 <flanterm_write+0x550>
        }
    }

    // Translate character set
    switch (ctx->charsets[ctx->current_charset]) {
ffffffff80001cb2:	49 8b 84 24 40 01 00 	mov    0x140(%r12),%rax
ffffffff80001cb9:	00 
ffffffff80001cba:	41 80 bc 04 39 01 00 	cmpb   $0x1,0x139(%r12,%rax,1)
ffffffff80001cc1:	00 01 
ffffffff80001cc3:	0f 84 08 09 00 00    	je     ffffffff800025d1 <flanterm_write+0xe91>
                return;
            }
            break;
    }

    if (c >= 0x20 && c <= 0x7e) {
ffffffff80001cc9:	41 8d 47 e0          	lea    -0x20(%r15),%eax
ffffffff80001ccd:	3c 5e                	cmp    $0x5e,%al
ffffffff80001ccf:	0f 87 79 03 00 00    	ja     ffffffff8000204e <flanterm_write+0x90e>
        ctx->last_printed_char = c;
ffffffff80001cd5:	45 88 bc 24 c8 01 00 	mov    %r15b,0x1c8(%r12)
ffffffff80001cdc:	00 
        ctx->last_was_graphic = true;
        ctx->raw_putchar(ctx, c);
ffffffff80001cdd:	41 0f be f7          	movsbl %r15b,%esi
ffffffff80001ce1:	4c 89 e7             	mov    %r12,%rdi
        ctx->last_was_graphic = true;
ffffffff80001ce4:	41 c6 84 24 c9 01 00 	movb   $0x1,0x1c9(%r12)
ffffffff80001ceb:	00 01 
        ctx->raw_putchar(ctx, c);
ffffffff80001ced:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80001cf4:	00 
ffffffff80001cf5:	e9 46 fb ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
ffffffff80001cfa:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            if (y == ctx->scroll_bottom_margin - 1) {
ffffffff80001d00:	49 8b 84 24 80 01 00 	mov    0x180(%r12),%rax
ffffffff80001d07:	00 
ffffffff80001d08:	48 8b 55 c8          	mov    -0x38(%rbp),%rdx
ffffffff80001d0c:	48 83 e8 01          	sub    $0x1,%rax
ffffffff80001d10:	48 39 d0             	cmp    %rdx,%rax
ffffffff80001d13:	0f 84 97 07 00 00    	je     ffffffff800024b0 <flanterm_write+0xd70>
                ctx->set_cursor_pos(ctx, x, y + 1);
ffffffff80001d19:	48 8b 75 c0          	mov    -0x40(%rbp),%rsi
ffffffff80001d1d:	48 83 c2 01          	add    $0x1,%rdx
ffffffff80001d21:	4c 89 e7             	mov    %r12,%rdi
ffffffff80001d24:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80001d2b:	00 
ffffffff80001d2c:	e9 0f fb ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
ffffffff80001d31:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
                    ctx->charsets[ctx->g_select] = CHARSET_DEC_SPECIAL; break;
ffffffff80001d38:	0f b6 c0             	movzbl %al,%eax
ffffffff80001d3b:	41 c6 84 04 39 01 00 	movb   $0x1,0x139(%r12,%rax,1)
ffffffff80001d42:	00 01 
ffffffff80001d44:	e9 e3 fa ff ff       	jmp    ffffffff8000182c <flanterm_write+0xec>
            ctx->current_charset = 1;
ffffffff80001d49:	49 c7 84 24 40 01 00 	movq   $0x1,0x140(%r12)
ffffffff80001d50:	00 01 00 00 00 
    for (size_t i = 0; i < count; i++) {
ffffffff80001d55:	49 83 c5 01          	add    $0x1,%r13
ffffffff80001d59:	49 39 dd             	cmp    %rbx,%r13
ffffffff80001d5c:	0f 85 0e fa ff ff    	jne    ffffffff80001770 <flanterm_write+0x30>
ffffffff80001d62:	e9 e9 fa ff ff       	jmp    ffffffff80001850 <flanterm_write+0x110>
            ctx->current_charset = 0;
ffffffff80001d67:	49 c7 84 24 40 01 00 	movq   $0x0,0x140(%r12)
ffffffff80001d6e:	00 00 00 00 00 
    for (size_t i = 0; i < count; i++) {
ffffffff80001d73:	49 83 c5 01          	add    $0x1,%r13
ffffffff80001d77:	49 39 dd             	cmp    %rbx,%r13
ffffffff80001d7a:	0f 85 f0 f9 ff ff    	jne    ffffffff80001770 <flanterm_write+0x30>
ffffffff80001d80:	e9 cb fa ff ff       	jmp    ffffffff80001850 <flanterm_write+0x110>
            if (ctx->callback != NULL) {
ffffffff80001d85:	49 8b 84 24 b8 02 00 	mov    0x2b8(%r12),%rax
ffffffff80001d8c:	00 
ffffffff80001d8d:	48 85 c0             	test   %rax,%rax
ffffffff80001d90:	0f 84 aa fa ff ff    	je     ffffffff80001840 <flanterm_write+0x100>
                ctx->callback(ctx, FLANTERM_CB_BELL, 0, 0, 0);
ffffffff80001d96:	45 31 c0             	xor    %r8d,%r8d
ffffffff80001d99:	31 c9                	xor    %ecx,%ecx
ffffffff80001d9b:	31 d2                	xor    %edx,%edx
ffffffff80001d9d:	be 14 00 00 00       	mov    $0x14,%esi
ffffffff80001da2:	4c 89 e7             	mov    %r12,%rdi
ffffffff80001da5:	ff d0                	call   *%rax
ffffffff80001da7:	e9 94 fa ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
    for (size_t i = 0; i < count; i++) {
ffffffff80001dac:	49 83 c5 01          	add    $0x1,%r13
            ctx->escape = true;
ffffffff80001db0:	41 c6 44 24 0e 01    	movb   $0x1,0xe(%r12)
            ctx->escape_offset = 0;
ffffffff80001db6:	49 c7 84 24 48 01 00 	movq   $0x0,0x148(%r12)
ffffffff80001dbd:	00 00 00 00 00 
    for (size_t i = 0; i < count; i++) {
ffffffff80001dc2:	49 39 dd             	cmp    %rbx,%r13
ffffffff80001dc5:	0f 85 a5 f9 ff ff    	jne    ffffffff80001770 <flanterm_write+0x30>
ffffffff80001dcb:	e9 80 fa ff ff       	jmp    ffffffff80001850 <flanterm_write+0x110>
            if (x > 0) {
ffffffff80001dd0:	48 8b 45 c0          	mov    -0x40(%rbp),%rax
ffffffff80001dd4:	48 85 c0             	test   %rax,%rax
ffffffff80001dd7:	0f 84 63 fa ff ff    	je     ffffffff80001840 <flanterm_write+0x100>
                ctx->set_cursor_pos(ctx, x - 1, y);
ffffffff80001ddd:	48 8d 70 ff          	lea    -0x1(%rax),%rsi
ffffffff80001de1:	48 8b 55 c8          	mov    -0x38(%rbp),%rdx
ffffffff80001de5:	4c 89 e7             	mov    %r12,%rdi
ffffffff80001de8:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80001def:	00 
ffffffff80001df0:	e9 4b fa ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
            size_t next_tab = (x / ctx->tab_size + 1) * ctx->tab_size;
ffffffff80001df5:	49 8b 0c 24          	mov    (%r12),%rcx
ffffffff80001df9:	48 8b 45 c0          	mov    -0x40(%rbp),%rax
ffffffff80001dfd:	31 d2                	xor    %edx,%edx
ffffffff80001dff:	48 f7 f1             	div    %rcx
                ctx->set_cursor_pos(ctx, ctx->cols - 1, y);
ffffffff80001e02:	48 8b 55 c8          	mov    -0x38(%rbp),%rdx
            size_t next_tab = (x / ctx->tab_size + 1) * ctx->tab_size;
ffffffff80001e06:	48 8d 70 01          	lea    0x1(%rax),%rsi
            if (next_tab >= ctx->cols) {
ffffffff80001e0a:	49 8b 84 24 f8 01 00 	mov    0x1f8(%r12),%rax
ffffffff80001e11:	00 
            size_t next_tab = (x / ctx->tab_size + 1) * ctx->tab_size;
ffffffff80001e12:	48 0f af f1          	imul   %rcx,%rsi
                ctx->set_cursor_pos(ctx, ctx->cols - 1, y);
ffffffff80001e16:	49 8b 8c 24 10 02 00 	mov    0x210(%r12),%rcx
ffffffff80001e1d:	00 
            if (next_tab >= ctx->cols) {
ffffffff80001e1e:	48 39 c6             	cmp    %rax,%rsi
ffffffff80001e21:	0f 83 69 07 00 00    	jae    ffffffff80002590 <flanterm_write+0xe50>
            ctx->set_cursor_pos(ctx, next_tab, y);
ffffffff80001e27:	4c 89 e7             	mov    %r12,%rdi
ffffffff80001e2a:	ff d1                	call   *%rcx
            return;
ffffffff80001e2c:	e9 0f fa ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
    for (size_t i = 0; i < count; i++) {
ffffffff80001e31:	49 83 c5 01          	add    $0x1,%r13
            ctx->set_cursor_pos(ctx, 0, y);
ffffffff80001e35:	48 8b 55 c8          	mov    -0x38(%rbp),%rdx
ffffffff80001e39:	31 f6                	xor    %esi,%esi
ffffffff80001e3b:	4c 89 e7             	mov    %r12,%rdi
ffffffff80001e3e:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80001e45:	00 
    for (size_t i = 0; i < count; i++) {
ffffffff80001e46:	49 39 dd             	cmp    %rbx,%r13
ffffffff80001e49:	0f 85 21 f9 ff ff    	jne    ffffffff80001770 <flanterm_write+0x30>
ffffffff80001e4f:	e9 fc f9 ff ff       	jmp    ffffffff80001850 <flanterm_write+0x110>
ffffffff80001e54:	0f 1f 40 00          	nopl   0x0(%rax)
    if (ctx->osc_escape) {
ffffffff80001e58:	41 80 7c 24 10 00    	cmpb   $0x0,0x10(%r12)
ffffffff80001e5e:	0f 84 ea 00 00 00    	je     ffffffff80001f4e <flanterm_write+0x80e>
        if (c == '\\') {
ffffffff80001e64:	41 80 ff 5c          	cmp    $0x5c,%r15b
ffffffff80001e68:	0f 84 aa 01 00 00    	je     ffffffff80002018 <flanterm_write+0x8d8>
        ctx->escape_offset = 1;
ffffffff80001e6e:	49 c7 84 24 48 01 00 	movq   $0x1,0x148(%r12)
ffffffff80001e75:	00 01 00 00 00 
            ctx->osc = false;
ffffffff80001e7a:	31 c0                	xor    %eax,%eax
    if (ctx->control_sequence == true) {
ffffffff80001e7c:	41 80 7c 24 0d 00    	cmpb   $0x0,0xd(%r12)
            ctx->osc = false;
ffffffff80001e82:	66 41 89 44 24 0f    	mov    %ax,0xf(%r12)
    if (ctx->control_sequence == true) {
ffffffff80001e88:	0f 84 0e fd ff ff    	je     ffffffff80001b9c <flanterm_write+0x45c>
    if (c < 0x20 && c != 0x1b) {
ffffffff80001e8e:	41 80 ff 1f          	cmp    $0x1f,%r15b
ffffffff80001e92:	0f 96 c2             	setbe  %dl
ffffffff80001e95:	41 80 ff 1b          	cmp    $0x1b,%r15b
ffffffff80001e99:	0f 95 c0             	setne  %al
ffffffff80001e9c:	84 c2                	test   %al,%dl
ffffffff80001e9e:	0f 85 90 01 00 00    	jne    ffffffff80002034 <flanterm_write+0x8f4>
    if (c >= '0' && c <= '9') {
ffffffff80001ea4:	41 8d 57 d0          	lea    -0x30(%r15),%edx
        if (ctx->esc_values_i == FLANTERM_MAX_ESC_VALUES) {
ffffffff80001ea8:	49 8b 84 24 50 01 00 	mov    0x150(%r12),%rax
ffffffff80001eaf:	00 
    if (c >= '0' && c <= '9') {
ffffffff80001eb0:	80 fa 09             	cmp    $0x9,%dl
ffffffff80001eb3:	0f 87 2e 07 00 00    	ja     ffffffff800025e7 <flanterm_write+0xea7>
        if (ctx->esc_values_i == FLANTERM_MAX_ESC_VALUES) {
ffffffff80001eb9:	48 83 f8 10          	cmp    $0x10,%rax
ffffffff80001ebd:	0f 84 7d f9 ff ff    	je     ffffffff80001840 <flanterm_write+0x100>
        ctx->rrr = true;
ffffffff80001ec3:	41 c6 84 24 20 01 00 	movb   $0x1,0x120(%r12)
ffffffff80001eca:	00 01 
        if (ctx->esc_values[ctx->esc_values_i] > UINT32_MAX / 10) {
ffffffff80001ecc:	48 83 c0 60          	add    $0x60,%rax
ffffffff80001ed0:	41 8b 54 84 08       	mov    0x8(%r12,%rax,4),%edx
ffffffff80001ed5:	81 fa 99 99 99 19    	cmp    $0x19999999,%edx
ffffffff80001edb:	0f 87 5f f9 ff ff    	ja     ffffffff80001840 <flanterm_write+0x100>
        ctx->esc_values[ctx->esc_values_i] *= 10;
ffffffff80001ee1:	8d 14 92             	lea    (%rdx,%rdx,4),%edx
        ctx->esc_values[ctx->esc_values_i] += c - '0';
ffffffff80001ee4:	45 0f be ff          	movsbl %r15b,%r15d
ffffffff80001ee8:	41 8d 54 57 d0       	lea    -0x30(%r15,%rdx,2),%edx
ffffffff80001eed:	41 89 54 84 08       	mov    %edx,0x8(%r12,%rax,4)
        return;
ffffffff80001ef2:	e9 49 f9 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
ffffffff80001ef7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff80001efe:	00 00 
    switch (code_point) {
ffffffff80001f00:	48 81 fa d5 21 00 00 	cmp    $0x21d5,%rdx
ffffffff80001f07:	0f 87 c6 05 00 00    	ja     ffffffff800024d3 <flanterm_write+0xd93>
ffffffff80001f0d:	48 81 fa 8f 21 00 00 	cmp    $0x218f,%rdx
ffffffff80001f14:	0f 87 89 04 00 00    	ja     ffffffff800023a3 <flanterm_write+0xc63>
ffffffff80001f1a:	48 81 fa 92 01 00 00 	cmp    $0x192,%rdx
ffffffff80001f21:	0f 87 da 08 00 00    	ja     ffffffff80002801 <flanterm_write+0x10c1>
ffffffff80001f27:	48 81 fa 9f 00 00 00 	cmp    $0x9f,%rdx
ffffffff80001f2e:	0f 86 09 25 00 00    	jbe    ffffffff8000443d <flanterm_write+0x2cfd>
ffffffff80001f34:	48 8d 82 60 ff ff ff 	lea    -0xa0(%rdx),%rax
ffffffff80001f3b:	48 3d f2 00 00 00    	cmp    $0xf2,%rax
ffffffff80001f41:	0f 87 19 01 00 00    	ja     ffffffff80002060 <flanterm_write+0x920>
ffffffff80001f47:	ff 24 c5 88 56 02 80 	jmp    *-0x7ffda978(,%rax,8)
    switch (c) {
ffffffff80001f4e:	41 80 ff 07          	cmp    $0x7,%r15b
ffffffff80001f52:	0f 84 c0 00 00 00    	je     ffffffff80002018 <flanterm_write+0x8d8>
ffffffff80001f58:	41 80 ff 1b          	cmp    $0x1b,%r15b
ffffffff80001f5c:	0f 85 3c 06 00 00    	jne    ffffffff8000259e <flanterm_write+0xe5e>
            ctx->osc_escape = true;
ffffffff80001f62:	41 c6 44 24 10 01    	movb   $0x1,0x10(%r12)
            break;
ffffffff80001f68:	e9 d3 f8 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
    if (ctx->insert_mode == true) {
ffffffff80001f6d:	41 80 bc 24 26 01 00 	cmpb   $0x0,0x126(%r12)
ffffffff80001f74:	00 00 
ffffffff80001f76:	0f 85 f3 fc ff ff    	jne    ffffffff80001c6f <flanterm_write+0x52f>
    } else if (c >= 0x80) {
        ctx->last_printed_char = 0xfe;
ffffffff80001f7c:	ba fe 01 00 00       	mov    $0x1fe,%edx
        ctx->last_was_graphic = true;
        ctx->raw_putchar(ctx, 0xfe);
ffffffff80001f81:	be fe 00 00 00       	mov    $0xfe,%esi
ffffffff80001f86:	4c 89 e7             	mov    %r12,%rdi
        ctx->last_printed_char = 0xfe;
ffffffff80001f89:	66 41 89 94 24 c8 01 	mov    %dx,0x1c8(%r12)
ffffffff80001f90:	00 00 
        ctx->raw_putchar(ctx, 0xfe);
ffffffff80001f92:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80001f99:	00 
ffffffff80001f9a:	e9 a1 f8 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
    if (ctx->escape_offset == 2) {
ffffffff80001f9f:	48 83 f8 02          	cmp    $0x2,%rax
ffffffff80001fa3:	0f 85 e5 fe ff ff    	jne    ffffffff80001e8e <flanterm_write+0x74e>
        switch (c) {
ffffffff80001fa9:	41 80 ff 3f          	cmp    $0x3f,%r15b
ffffffff80001fad:	0f 84 b1 08 00 00    	je     ffffffff80002864 <flanterm_write+0x1124>
ffffffff80001fb3:	41 80 ff 5b          	cmp    $0x5b,%r15b
ffffffff80001fb7:	0f 85 d1 fe ff ff    	jne    ffffffff80001e8e <flanterm_write+0x74e>
                ctx->discard_next = true;
ffffffff80001fbd:	41 c6 84 24 21 01 00 	movb   $0x1,0x121(%r12)
ffffffff80001fc4:	00 01 
                goto cleanup;
ffffffff80001fc6:	0f b7 05 93 70 02 00 	movzwl 0x27093(%rip),%eax        # ffffffff80029060 <col256+0x3c0>
    ctx->control_sequence = false;
ffffffff80001fcd:	66 41 89 44 24 0d    	mov    %ax,0xd(%r12)
ffffffff80001fd3:	e9 68 f8 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
    switch (ctx->charsets[ctx->current_charset]) {
ffffffff80001fd8:	49 8b 84 24 40 01 00 	mov    0x140(%r12),%rax
ffffffff80001fdf:	00 
ffffffff80001fe0:	41 80 bc 04 39 01 00 	cmpb   $0x1,0x139(%r12,%rax,1)
ffffffff80001fe7:	00 01 
ffffffff80001fe9:	0f 84 e2 05 00 00    	je     ffffffff800025d1 <flanterm_write+0xe91>
    if (c >= 0x20 && c <= 0x7e) {
ffffffff80001fef:	41 8d 47 e0          	lea    -0x20(%r15),%eax
ffffffff80001ff3:	3c 5e                	cmp    $0x5e,%al
ffffffff80001ff5:	0f 86 da fc ff ff    	jbe    ffffffff80001cd5 <flanterm_write+0x595>
ffffffff80001ffb:	e9 40 f8 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        if (has_bottom && !has_top) return 0xdc; // ▄
ffffffff80002000:	40 84 f6             	test   %sil,%sil
ffffffff80002003:	0f 84 16 fa ff ff    	je     ffffffff80001a1f <flanterm_write+0x2df>
ffffffff80002009:	b8 dc ff ff ff       	mov    $0xffffffdc,%eax
ffffffff8000200e:	be dc 00 00 00       	mov    $0xdc,%esi
ffffffff80002013:	e9 78 fa ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
            osc_finalize(ctx);
ffffffff80002018:	4c 89 e7             	mov    %r12,%rdi
            ctx->escape = false;
ffffffff8000201b:	45 31 f6             	xor    %r14d,%r14d
            osc_finalize(ctx);
ffffffff8000201e:	e8 9d f5 ff ff       	call   ffffffff800015c0 <osc_finalize>
            ctx->osc_escape = false;
ffffffff80002023:	41 c6 44 24 10 00    	movb   $0x0,0x10(%r12)
            ctx->escape = false;
ffffffff80002029:	66 45 89 74 24 0e    	mov    %r14w,0xe(%r12)
            break;
ffffffff8000202f:	e9 0c f8 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        switch (c) {
ffffffff80002034:	41 83 ef 07          	sub    $0x7,%r15d
ffffffff80002038:	41 80 ff 08          	cmp    $0x8,%r15b
ffffffff8000203c:	0f 87 fe f7 ff ff    	ja     ffffffff80001840 <flanterm_write+0x100>
ffffffff80002042:	45 0f b6 ff          	movzbl %r15b,%r15d
ffffffff80002046:	42 ff 24 fd 20 5e 02 	jmp    *-0x7ffda1e0(,%r15,8)
ffffffff8000204d:	80 
    } else if (c >= 0x80) {
ffffffff8000204e:	45 84 ff             	test   %r15b,%r15b
ffffffff80002051:	0f 89 e9 f7 ff ff    	jns    ffffffff80001840 <flanterm_write+0x100>
ffffffff80002057:	e9 20 ff ff ff       	jmp    ffffffff80001f7c <flanterm_write+0x83c>
ffffffff8000205c:	0f 1f 40 00          	nopl   0x0(%rax)
            int replacement_width = mk_wcwidth(ctx->code_point);
ffffffff80002060:	89 d1                	mov    %edx,%ecx
  if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0))
ffffffff80002062:	8d 41 81             	lea    -0x7f(%rcx),%eax
ffffffff80002065:	83 f8 20             	cmp    $0x20,%eax
ffffffff80002068:	0f 86 d2 f7 ff ff    	jbe    ffffffff80001840 <flanterm_write+0x100>
  if (ucs < table[0].first || ucs > table[max].last)
ffffffff8000206e:	8d 81 00 fd ff ff    	lea    -0x300(%rcx),%eax
ffffffff80002074:	3d ff 0c 0e 00       	cmp    $0xe0cff,%eax
ffffffff80002079:	0f 87 fd fe ff ff    	ja     ffffffff80001f7c <flanterm_write+0x83c>
void flanterm_write(struct flanterm_context *ctx, const char *buf, size_t count) {
ffffffff8000207f:	31 f6                	xor    %esi,%esi
ffffffff80002081:	41 b8 73 01 00 00    	mov    $0x173,%r8d
ffffffff80002087:	eb 0c                	jmp    ffffffff80002095 <flanterm_write+0x955>
      min = mid + 1;
ffffffff80002089:	8d 70 01             	lea    0x1(%rax),%esi
  while (max >= min) {
ffffffff8000208c:	41 39 f0             	cmp    %esi,%r8d
ffffffff8000208f:	0f 8c 4a 09 00 00    	jl     ffffffff800029df <flanterm_write+0x129f>
    mid = (min + max) / 2;
ffffffff80002095:	42 8d 14 06          	lea    (%rsi,%r8,1),%edx
ffffffff80002099:	89 d0                	mov    %edx,%eax
ffffffff8000209b:	c1 e8 1f             	shr    $0x1f,%eax
ffffffff8000209e:	01 d0                	add    %edx,%eax
ffffffff800020a0:	d1 f8                	sar    $1,%eax
    if (ucs > table[mid].last)
ffffffff800020a2:	48 63 d0             	movslq %eax,%rdx
ffffffff800020a5:	39 0c d5 04 81 02 80 	cmp    %ecx,-0x7ffd7efc(,%rdx,8)
ffffffff800020ac:	72 db                	jb     ffffffff80002089 <flanterm_write+0x949>
    else if (ucs < table[mid].first)
ffffffff800020ae:	3b 0c d5 00 81 02 80 	cmp    -0x7ffd7f00(,%rdx,8),%ecx
ffffffff800020b5:	0f 83 85 f7 ff ff    	jae    ffffffff80001840 <flanterm_write+0x100>
      max = mid - 1;
ffffffff800020bb:	44 8d 40 ff          	lea    -0x1(%rax),%r8d
ffffffff800020bf:	eb cb                	jmp    ffffffff8000208c <flanterm_write+0x94c>
            ctx->g_select = c - '\'';
ffffffff800020c1:	41 83 ef 27          	sub    $0x27,%r15d
ffffffff800020c5:	45 88 bc 24 38 01 00 	mov    %r15b,0x138(%r12)
ffffffff800020cc:	00 
            break;
ffffffff800020cd:	e9 3e fb ff ff       	jmp    ffffffff80001c10 <flanterm_write+0x4d0>
                ctx->get_cursor_pos(ctx, &x, &y);
ffffffff800020d2:	48 8d 55 c8          	lea    -0x38(%rbp),%rdx
ffffffff800020d6:	4c 89 e7             	mov    %r12,%rdi
ffffffff800020d9:	48 8d 75 c0          	lea    -0x40(%rbp),%rsi
ffffffff800020dd:	41 ff 94 24 18 02 00 	call   *0x218(%r12)
ffffffff800020e4:	00 
                if (y == ctx->scroll_bottom_margin - 1) {
ffffffff800020e5:	49 8b bc 24 80 01 00 	mov    0x180(%r12),%rdi
ffffffff800020ec:	00 
ffffffff800020ed:	48 8b 45 c8          	mov    -0x38(%rbp),%rax
ffffffff800020f1:	48 8d 57 ff          	lea    -0x1(%rdi),%rdx
ffffffff800020f5:	48 39 c2             	cmp    %rax,%rdx
ffffffff800020f8:	0f 84 b2 03 00 00    	je     ffffffff800024b0 <flanterm_write+0xd70>
                    ctx->set_cursor_pos(ctx, x, y + 1);
ffffffff800020fe:	48 8b 75 c0          	mov    -0x40(%rbp),%rsi
ffffffff80002102:	48 8d 50 01          	lea    0x1(%rax),%rdx
ffffffff80002106:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002109:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80002110:	00 
ffffffff80002111:	e9 2a f7 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
ffffffff80002116:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000211d:	00 00 00 
            ctx->osc_buf_i = 0;
ffffffff80002120:	49 c7 44 24 18 00 00 	movq   $0x0,0x18(%r12)
ffffffff80002127:	00 00 
            ctx->osc = true;
ffffffff80002129:	b9 01 00 00 00       	mov    $0x1,%ecx
ffffffff8000212e:	66 41 89 4c 24 0f    	mov    %cx,0xf(%r12)
            return;
ffffffff80002134:	e9 07 f7 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
ffffffff80002139:	49 8d 84 24 88 01 00 	lea    0x188(%r12),%rax
ffffffff80002140:	00 
ffffffff80002141:	49 8d 94 24 c8 01 00 	lea    0x1c8(%r12),%rdx
ffffffff80002148:	00 
                ctx->esc_values[i] = 0;
ffffffff80002149:	48 c7 00 00 00 00 00 	movq   $0x0,(%rax)
ffffffff80002150:	48 83 c0 10          	add    $0x10,%rax
ffffffff80002154:	48 c7 40 f8 00 00 00 	movq   $0x0,-0x8(%rax)
ffffffff8000215b:	00 
            for (size_t i = 0; i < FLANTERM_MAX_ESC_VALUES; i++)
ffffffff8000215c:	48 39 d0             	cmp    %rdx,%rax
ffffffff8000215f:	75 e8                	jne    ffffffff80002149 <flanterm_write+0xa09>
            ctx->esc_values_i = 0;
ffffffff80002161:	49 c7 84 24 50 01 00 	movq   $0x0,0x150(%r12)
ffffffff80002168:	00 00 00 00 00 
            ctx->rrr = false;
ffffffff8000216d:	41 c6 84 24 20 01 00 	movb   $0x0,0x120(%r12)
ffffffff80002174:	00 00 
            ctx->csi_unhandled = false;
ffffffff80002176:	41 c6 84 24 27 01 00 	movb   $0x0,0x127(%r12)
ffffffff8000217d:	00 00 
            ctx->control_sequence = true;
ffffffff8000217f:	41 c6 44 24 0d 01    	movb   $0x1,0xd(%r12)
            return;
ffffffff80002185:	e9 b6 f6 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
            if (ctx->callback != NULL) {
ffffffff8000218a:	49 8b 84 24 b8 02 00 	mov    0x2b8(%r12),%rax
ffffffff80002191:	00 
ffffffff80002192:	48 85 c0             	test   %rax,%rax
ffffffff80002195:	0f 84 75 fa ff ff    	je     ffffffff80001c10 <flanterm_write+0x4d0>
                ctx->callback(ctx, FLANTERM_CB_PRIVATE_ID, 0, 0, 0);
ffffffff8000219b:	45 31 c0             	xor    %r8d,%r8d
ffffffff8000219e:	31 c9                	xor    %ecx,%ecx
ffffffff800021a0:	31 d2                	xor    %edx,%edx
ffffffff800021a2:	be 1e 00 00 00       	mov    $0x1e,%esi
ffffffff800021a7:	4c 89 e7             	mov    %r12,%rdi
ffffffff800021aa:	ff d0                	call   *%rax
ffffffff800021ac:	e9 5f fa ff ff       	jmp    ffffffff80001c10 <flanterm_write+0x4d0>
    ctx->save_state(ctx);
ffffffff800021b1:	4c 89 e7             	mov    %r12,%rdi
ffffffff800021b4:	41 ff 94 24 90 02 00 	call   *0x290(%r12)
ffffffff800021bb:	00 
    ctx->saved_state_reverse_video = ctx->reverse_video;
ffffffff800021bc:	41 0f b6 84 24 24 01 	movzbl 0x124(%r12),%eax
ffffffff800021c3:	00 00 
    ctx->saved_state_bold = ctx->bold;
ffffffff800021c5:	41 0f b7 94 24 22 01 	movzwl 0x122(%r12),%edx
ffffffff800021cc:	00 00 
    ctx->saved_state_reverse_video = ctx->reverse_video;
ffffffff800021ce:	41 88 84 24 cc 01 00 	mov    %al,0x1cc(%r12)
ffffffff800021d5:	00 
    ctx->saved_state_origin_mode = ctx->origin_mode;
ffffffff800021d6:	41 0f b6 44 24 0c    	movzbl 0xc(%r12),%eax
    ctx->saved_state_bold = ctx->bold;
ffffffff800021dc:	66 41 89 94 24 ca 01 	mov    %dx,0x1ca(%r12)
ffffffff800021e3:	00 00 
    ctx->saved_state_current_primary = ctx->current_primary;
ffffffff800021e5:	49 8b 94 24 68 01 00 	mov    0x168(%r12),%rdx
ffffffff800021ec:	00 
    ctx->saved_state_origin_mode = ctx->origin_mode;
ffffffff800021ed:	41 88 84 24 cd 01 00 	mov    %al,0x1cd(%r12)
ffffffff800021f4:	00 
    ctx->saved_state_wrap_enabled = ctx->wrap_enabled;
ffffffff800021f5:	41 0f b6 44 24 0b    	movzbl 0xb(%r12),%eax
    ctx->saved_state_current_primary = ctx->current_primary;
ffffffff800021fb:	49 89 94 24 e0 01 00 	mov    %rdx,0x1e0(%r12)
ffffffff80002202:	00 
    ctx->saved_state_wrap_enabled = ctx->wrap_enabled;
ffffffff80002203:	41 88 84 24 ce 01 00 	mov    %al,0x1ce(%r12)
ffffffff8000220a:	00 
    ctx->saved_state_current_charset = ctx->current_charset;
ffffffff8000220b:	49 8b 84 24 40 01 00 	mov    0x140(%r12),%rax
ffffffff80002212:	00 
ffffffff80002213:	49 89 84 24 d0 01 00 	mov    %rax,0x1d0(%r12)
ffffffff8000221a:	00 
    ctx->saved_state_charsets[0] = ctx->charsets[0];
ffffffff8000221b:	41 0f b7 84 24 39 01 	movzwl 0x139(%r12),%eax
ffffffff80002222:	00 00 
ffffffff80002224:	66 41 89 84 24 d8 01 	mov    %ax,0x1d8(%r12)
ffffffff8000222b:	00 00 
    ctx->saved_state_current_primary = ctx->current_primary;
ffffffff8000222d:	49 8b 84 24 70 01 00 	mov    0x170(%r12),%rax
ffffffff80002234:	00 
ffffffff80002235:	49 89 84 24 e8 01 00 	mov    %rax,0x1e8(%r12)
ffffffff8000223c:	00 
}
ffffffff8000223d:	e9 ce f9 ff ff       	jmp    ffffffff80001c10 <flanterm_write+0x4d0>
            ctx->escape_offset = 0;
ffffffff80002242:	49 c7 84 24 48 01 00 	movq   $0x0,0x148(%r12)
ffffffff80002249:	00 00 00 00 00 
            return;
ffffffff8000224e:	e9 ed f5 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
            if (y == ctx->scroll_top_margin) {
ffffffff80002253:	48 8b 45 c8          	mov    -0x38(%rbp),%rax
ffffffff80002257:	49 39 84 24 78 01 00 	cmp    %rax,0x178(%r12)
ffffffff8000225e:	00 
ffffffff8000225f:	0f 84 33 06 00 00    	je     ffffffff80002898 <flanterm_write+0x1158>
            } else if (y > 0) {
ffffffff80002265:	48 85 c0             	test   %rax,%rax
ffffffff80002268:	0f 84 a2 f9 ff ff    	je     ffffffff80001c10 <flanterm_write+0x4d0>
                ctx->set_cursor_pos(ctx, x, y - 1);
ffffffff8000226e:	48 8b 75 c0          	mov    -0x40(%rbp),%rsi
ffffffff80002272:	48 8d 50 ff          	lea    -0x1(%rax),%rdx
ffffffff80002276:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002279:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80002280:	00 
ffffffff80002281:	e9 8a f9 ff ff       	jmp    ffffffff80001c10 <flanterm_write+0x4d0>
            if (y == ctx->scroll_bottom_margin - 1) {
ffffffff80002286:	49 8b 84 24 80 01 00 	mov    0x180(%r12),%rax
ffffffff8000228d:	00 
ffffffff8000228e:	48 8b 55 c8          	mov    -0x38(%rbp),%rdx
ffffffff80002292:	48 83 e8 01          	sub    $0x1,%rax
ffffffff80002296:	48 39 d0             	cmp    %rdx,%rax
ffffffff80002299:	0f 84 1c 06 00 00    	je     ffffffff800028bb <flanterm_write+0x117b>
            } else if (y < ctx->rows - 1) {
ffffffff8000229f:	49 8b 84 24 f0 01 00 	mov    0x1f0(%r12),%rax
ffffffff800022a6:	00 
                ctx->set_cursor_pos(ctx, x, y + 1);
ffffffff800022a7:	49 8b 8c 24 10 02 00 	mov    0x210(%r12),%rcx
ffffffff800022ae:	00 
            } else if (y < ctx->rows - 1) {
ffffffff800022af:	48 83 e8 01          	sub    $0x1,%rax
ffffffff800022b3:	48 39 c2             	cmp    %rax,%rdx
ffffffff800022b6:	0f 83 d0 05 00 00    	jae    ffffffff8000288c <flanterm_write+0x114c>
                ctx->set_cursor_pos(ctx, 0, y + 1);
ffffffff800022bc:	48 83 c2 01          	add    $0x1,%rdx
ffffffff800022c0:	31 f6                	xor    %esi,%esi
ffffffff800022c2:	4c 89 e7             	mov    %r12,%rdi
ffffffff800022c5:	ff d1                	call   *%rcx
ffffffff800022c7:	e9 44 f9 ff ff       	jmp    ffffffff80001c10 <flanterm_write+0x4d0>
            if (y == ctx->scroll_bottom_margin - 1) {
ffffffff800022cc:	49 8b bc 24 80 01 00 	mov    0x180(%r12),%rdi
ffffffff800022d3:	00 
ffffffff800022d4:	48 8b 45 c8          	mov    -0x38(%rbp),%rax
ffffffff800022d8:	48 8d 57 ff          	lea    -0x1(%rdi),%rdx
ffffffff800022dc:	48 39 c2             	cmp    %rax,%rdx
ffffffff800022df:	0f 84 06 06 00 00    	je     ffffffff800028eb <flanterm_write+0x11ab>
            } else if (y < ctx->rows - 1) {
ffffffff800022e5:	49 8b bc 24 f0 01 00 	mov    0x1f0(%r12),%rdi
ffffffff800022ec:	00 
ffffffff800022ed:	48 8d 57 ff          	lea    -0x1(%rdi),%rdx
ffffffff800022f1:	48 39 d0             	cmp    %rdx,%rax
ffffffff800022f4:	0f 83 16 f9 ff ff    	jae    ffffffff80001c10 <flanterm_write+0x4d0>
                ctx->set_cursor_pos(ctx, x, y + 1);
ffffffff800022fa:	48 8b 75 c0          	mov    -0x40(%rbp),%rsi
ffffffff800022fe:	48 8d 50 01          	lea    0x1(%rax),%rdx
ffffffff80002302:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002305:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff8000230c:	00 
ffffffff8000230d:	e9 fe f8 ff ff       	jmp    ffffffff80001c10 <flanterm_write+0x4d0>
    ctx->bold = ctx->saved_state_bold;
ffffffff80002312:	41 0f b7 84 24 ca 01 	movzwl 0x1ca(%r12),%eax
ffffffff80002319:	00 00 
    ctx->current_primary = ctx->saved_state_current_primary;
ffffffff8000231b:	49 8b 94 24 e0 01 00 	mov    0x1e0(%r12),%rdx
ffffffff80002322:	00 
    ctx->restore_state(ctx);
ffffffff80002323:	4c 89 e7             	mov    %r12,%rdi
    ctx->bold = ctx->saved_state_bold;
ffffffff80002326:	66 41 89 84 24 22 01 	mov    %ax,0x122(%r12)
ffffffff8000232d:	00 00 
    ctx->reverse_video = ctx->saved_state_reverse_video;
ffffffff8000232f:	41 0f b6 84 24 cc 01 	movzbl 0x1cc(%r12),%eax
ffffffff80002336:	00 00 
    ctx->current_primary = ctx->saved_state_current_primary;
ffffffff80002338:	49 89 94 24 68 01 00 	mov    %rdx,0x168(%r12)
ffffffff8000233f:	00 
    ctx->reverse_video = ctx->saved_state_reverse_video;
ffffffff80002340:	41 88 84 24 24 01 00 	mov    %al,0x124(%r12)
ffffffff80002347:	00 
    ctx->origin_mode = ctx->saved_state_origin_mode;
ffffffff80002348:	41 0f b6 84 24 cd 01 	movzbl 0x1cd(%r12),%eax
ffffffff8000234f:	00 00 
ffffffff80002351:	41 88 44 24 0c       	mov    %al,0xc(%r12)
    ctx->wrap_enabled = ctx->saved_state_wrap_enabled;
ffffffff80002356:	41 0f b6 84 24 ce 01 	movzbl 0x1ce(%r12),%eax
ffffffff8000235d:	00 00 
ffffffff8000235f:	41 88 44 24 0b       	mov    %al,0xb(%r12)
    ctx->current_charset = ctx->saved_state_current_charset;
ffffffff80002364:	49 8b 84 24 d0 01 00 	mov    0x1d0(%r12),%rax
ffffffff8000236b:	00 
ffffffff8000236c:	49 89 84 24 40 01 00 	mov    %rax,0x140(%r12)
ffffffff80002373:	00 
    ctx->charsets[0] = ctx->saved_state_charsets[0];
ffffffff80002374:	41 0f b7 84 24 d8 01 	movzwl 0x1d8(%r12),%eax
ffffffff8000237b:	00 00 
ffffffff8000237d:	66 41 89 84 24 39 01 	mov    %ax,0x139(%r12)
ffffffff80002384:	00 00 
    ctx->current_primary = ctx->saved_state_current_primary;
ffffffff80002386:	49 8b 84 24 e8 01 00 	mov    0x1e8(%r12),%rax
ffffffff8000238d:	00 
ffffffff8000238e:	49 89 84 24 70 01 00 	mov    %rax,0x170(%r12)
ffffffff80002395:	00 
    ctx->restore_state(ctx);
ffffffff80002396:	41 ff 94 24 98 02 00 	call   *0x298(%r12)
ffffffff8000239d:	00 
}
ffffffff8000239e:	e9 6d f8 ff ff       	jmp    ffffffff80001c10 <flanterm_write+0x4d0>
    switch (code_point) {
ffffffff800023a3:	48 8d 82 70 de ff ff 	lea    -0x2190(%rdx),%rax
ffffffff800023aa:	48 83 f8 45          	cmp    $0x45,%rax
ffffffff800023ae:	77 07                	ja     ffffffff800023b7 <flanterm_write+0xc77>
ffffffff800023b0:	ff 24 c5 68 5e 02 80 	jmp    *-0x7ffda198(,%rax,8)
            int replacement_width = mk_wcwidth(ctx->code_point);
ffffffff800023b7:	89 d1                	mov    %edx,%ecx
  if (ucs == 0)
ffffffff800023b9:	83 fa 1f             	cmp    $0x1f,%edx
ffffffff800023bc:	0f 86 7e f4 ff ff    	jbe    ffffffff80001840 <flanterm_write+0x100>
ffffffff800023c2:	e9 9b fc ff ff       	jmp    ffffffff80002062 <flanterm_write+0x922>
                ctx->get_cursor_pos(ctx, &x, &y);
ffffffff800023c7:	48 8d 55 c8          	lea    -0x38(%rbp),%rdx
ffffffff800023cb:	48 8d 75 c0          	lea    -0x40(%rbp),%rsi
ffffffff800023cf:	4c 89 e7             	mov    %r12,%rdi
ffffffff800023d2:	41 ff 94 24 18 02 00 	call   *0x218(%r12)
ffffffff800023d9:	00 
                x = (x / ctx->tab_size + 1) * ctx->tab_size;
ffffffff800023da:	49 8b 0c 24          	mov    (%r12),%rcx
ffffffff800023de:	48 8b 45 c0          	mov    -0x40(%rbp),%rax
ffffffff800023e2:	31 d2                	xor    %edx,%edx
ffffffff800023e4:	48 f7 f1             	div    %rcx
ffffffff800023e7:	48 83 c0 01          	add    $0x1,%rax
ffffffff800023eb:	48 0f af c1          	imul   %rcx,%rax
ffffffff800023ef:	48 89 45 c0          	mov    %rax,-0x40(%rbp)
ffffffff800023f3:	48 89 c6             	mov    %rax,%rsi
                if (x >= ctx->cols) {
ffffffff800023f6:	49 8b 84 24 f8 01 00 	mov    0x1f8(%r12),%rax
ffffffff800023fd:	00 
ffffffff800023fe:	48 39 c6             	cmp    %rax,%rsi
ffffffff80002401:	0f 82 da f9 ff ff    	jb     ffffffff80001de1 <flanterm_write+0x6a1>
                    x = ctx->cols - 1;
ffffffff80002407:	48 8d 70 ff          	lea    -0x1(%rax),%rsi
ffffffff8000240b:	48 89 75 c0          	mov    %rsi,-0x40(%rbp)
                ctx->set_cursor_pos(ctx, x, y);
ffffffff8000240f:	e9 cd f9 ff ff       	jmp    ffffffff80001de1 <flanterm_write+0x6a1>
                ctx->get_cursor_pos(ctx, &x, &y);
ffffffff80002414:	48 8d 55 c8          	lea    -0x38(%rbp),%rdx
ffffffff80002418:	48 8d 75 c0          	lea    -0x40(%rbp),%rsi
ffffffff8000241c:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000241f:	41 ff 94 24 18 02 00 	call   *0x218(%r12)
ffffffff80002426:	00 
                if (x > 0) {
ffffffff80002427:	48 8b 45 c0          	mov    -0x40(%rbp),%rax
ffffffff8000242b:	48 85 c0             	test   %rax,%rax
ffffffff8000242e:	0f 84 0c f4 ff ff    	je     ffffffff80001840 <flanterm_write+0x100>
ffffffff80002434:	e9 a4 f9 ff ff       	jmp    ffffffff80001ddd <flanterm_write+0x69d>
                ctx->get_cursor_pos(ctx, &x, &y);
ffffffff80002439:	48 8d 55 c8          	lea    -0x38(%rbp),%rdx
ffffffff8000243d:	48 8d 75 c0          	lea    -0x40(%rbp),%rsi
ffffffff80002441:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002444:	41 ff 94 24 18 02 00 	call   *0x218(%r12)
ffffffff8000244b:	00 
                ctx->set_cursor_pos(ctx, 0, y);
ffffffff8000244c:	48 8b 55 c8          	mov    -0x38(%rbp),%rdx
ffffffff80002450:	31 f6                	xor    %esi,%esi
ffffffff80002452:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002455:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff8000245c:	00 
                break;
ffffffff8000245d:	e9 de f3 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
    switch (code_point) {
ffffffff80002462:	b8 41 00 00 00       	mov    $0x41,%eax
        case 0x00c0: return 0x41;
ffffffff80002467:	be 41 00 00 00       	mov    $0x41,%esi
ffffffff8000246c:	e9 1f f6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80002471:	b8 55 00 00 00       	mov    $0x55,%eax
        case 0x00d9: return 0x55;
ffffffff80002476:	be 55 00 00 00       	mov    $0x55,%esi
ffffffff8000247b:	e9 10 f6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80002480:	b8 4f 00 00 00       	mov    $0x4f,%eax
        case 0x00d2: return 0x4f;
ffffffff80002485:	be 4f 00 00 00       	mov    $0x4f,%esi
ffffffff8000248a:	e9 01 f6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000248f:	b8 49 00 00 00       	mov    $0x49,%eax
        case 0x00cc: return 0x49;
ffffffff80002494:	be 49 00 00 00       	mov    $0x49,%esi
ffffffff80002499:	e9 f2 f5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000249e:	b8 45 00 00 00       	mov    $0x45,%eax
        case 0x00c8: return 0x45;
ffffffff800024a3:	be 45 00 00 00       	mov    $0x45,%esi
ffffffff800024a8:	e9 e3 f5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
ffffffff800024ad:	0f 1f 00             	nopl   (%rax)
                ctx->scroll(ctx);
ffffffff800024b0:	4c 89 e7             	mov    %r12,%rdi
ffffffff800024b3:	41 ff 94 24 78 02 00 	call   *0x278(%r12)
ffffffff800024ba:	00 
                ctx->set_cursor_pos(ctx, x, y);
ffffffff800024bb:	48 8b 55 c8          	mov    -0x38(%rbp),%rdx
ffffffff800024bf:	48 8b 75 c0          	mov    -0x40(%rbp),%rsi
ffffffff800024c3:	4c 89 e7             	mov    %r12,%rdi
ffffffff800024c6:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff800024cd:	00 
ffffffff800024ce:	e9 6d f3 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
    switch (code_point) {
ffffffff800024d3:	48 81 fa 72 25 00 00 	cmp    $0x2572,%rdx
ffffffff800024da:	0f 87 3d 02 00 00    	ja     ffffffff8000271d <flanterm_write+0xfdd>
ffffffff800024e0:	48 81 fa 09 25 00 00 	cmp    $0x2509,%rdx
ffffffff800024e7:	0f 86 c2 02 00 00    	jbe    ffffffff800027af <flanterm_write+0x106f>
ffffffff800024ed:	48 8d 82 f6 da ff ff 	lea    -0x250a(%rdx),%rax
ffffffff800024f4:	48 83 f8 68          	cmp    $0x68,%rax
ffffffff800024f8:	0f 87 b9 fe ff ff    	ja     ffffffff800023b7 <flanterm_write+0xc77>
ffffffff800024fe:	ff 24 c5 98 60 02 80 	jmp    *-0x7ffd9f68(,%rax,8)
ffffffff80002505:	b8 c5 ff ff ff       	mov    $0xffffffc5,%eax
        case 0x253c: return 197;
ffffffff8000250a:	be c5 00 00 00       	mov    $0xc5,%esi
ffffffff8000250f:	e9 7c f5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80002514:	b8 b4 ff ff ff       	mov    $0xffffffb4,%eax
        case 0x2524: return 180;
ffffffff80002519:	be b4 00 00 00       	mov    $0xb4,%esi
ffffffff8000251e:	e9 6d f5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80002523:	b8 c3 ff ff ff       	mov    $0xffffffc3,%eax
        case 0x251c: return 195;
ffffffff80002528:	be c3 00 00 00       	mov    $0xc3,%esi
ffffffff8000252d:	e9 5e f5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80002532:	b8 c1 ff ff ff       	mov    $0xffffffc1,%eax
        case 0x2534: return 193;
ffffffff80002537:	be c1 00 00 00       	mov    $0xc1,%esi
ffffffff8000253c:	e9 4f f5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80002541:	b8 c2 ff ff ff       	mov    $0xffffffc2,%eax
        case 0x252c: return 194;
ffffffff80002546:	be c2 00 00 00       	mov    $0xc2,%esi
ffffffff8000254b:	e9 40 f5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80002550:	b8 d9 ff ff ff       	mov    $0xffffffd9,%eax
        case 0x2518: return 217;
ffffffff80002555:	be d9 00 00 00       	mov    $0xd9,%esi
ffffffff8000255a:	e9 31 f5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000255f:	b8 c0 ff ff ff       	mov    $0xffffffc0,%eax
        case 0x2514: return 192;
ffffffff80002564:	be c0 00 00 00       	mov    $0xc0,%esi
ffffffff80002569:	e9 22 f5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000256e:	b8 bf ff ff ff       	mov    $0xffffffbf,%eax
        case 0x2510: return 191;
ffffffff80002573:	be bf 00 00 00       	mov    $0xbf,%esi
ffffffff80002578:	e9 13 f5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000257d:	b8 da ff ff ff       	mov    $0xffffffda,%eax
        case 0x250c: return 218;
ffffffff80002582:	be da 00 00 00       	mov    $0xda,%esi
ffffffff80002587:	e9 04 f5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
ffffffff8000258c:	0f 1f 40 00          	nopl   0x0(%rax)
                ctx->set_cursor_pos(ctx, ctx->cols - 1, y);
ffffffff80002590:	48 8d 70 ff          	lea    -0x1(%rax),%rsi
ffffffff80002594:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002597:	ff d1                	call   *%rcx
                return;
ffffffff80002599:	e9 a2 f2 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
            if (ctx->osc_buf_i < sizeof(ctx->osc_buf)) {
ffffffff8000259e:	49 8b 44 24 18       	mov    0x18(%r12),%rax
ffffffff800025a3:	48 3d ff 00 00 00    	cmp    $0xff,%rax
ffffffff800025a9:	0f 87 91 f2 ff ff    	ja     ffffffff80001840 <flanterm_write+0x100>
                ctx->osc_buf[ctx->osc_buf_i++] = c;
ffffffff800025af:	48 8d 50 01          	lea    0x1(%rax),%rdx
ffffffff800025b3:	49 89 54 24 18       	mov    %rdx,0x18(%r12)
ffffffff800025b8:	45 88 7c 04 20       	mov    %r15b,0x20(%r12,%rax,1)
ffffffff800025bd:	e9 7e f2 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
ffffffff800025c2:	b8 20 00 00 00       	mov    $0x20,%eax
        if (dots == 0) return 0x20;
ffffffff800025c7:	be 20 00 00 00       	mov    $0x20,%esi
ffffffff800025cc:	e9 bf f4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (c) {
ffffffff800025d1:	41 8d 47 d5          	lea    -0x2b(%r15),%eax
ffffffff800025d5:	3c 53                	cmp    $0x53,%al
ffffffff800025d7:	0f 87 ec f6 ff ff    	ja     ffffffff80001cc9 <flanterm_write+0x589>
ffffffff800025dd:	0f b6 c0             	movzbl %al,%eax
ffffffff800025e0:	ff 24 c5 e0 63 02 80 	jmp    *-0x7ffd9c20(,%rax,8)
    if (ctx->rrr == true) {
ffffffff800025e7:	41 80 bc 24 20 01 00 	cmpb   $0x0,0x120(%r12)
ffffffff800025ee:	00 00 
ffffffff800025f0:	0f 84 3d 02 00 00    	je     ffffffff80002833 <flanterm_write+0x10f3>
        ctx->rrr = false;
ffffffff800025f6:	41 c6 84 24 20 01 00 	movb   $0x0,0x120(%r12)
ffffffff800025fd:	00 00 
        ctx->esc_values_i++;
ffffffff800025ff:	48 83 c0 01          	add    $0x1,%rax
ffffffff80002603:	49 89 84 24 50 01 00 	mov    %rax,0x150(%r12)
ffffffff8000260a:	00 
        if (c == ';')
ffffffff8000260b:	41 80 ff 3b          	cmp    $0x3b,%r15b
ffffffff8000260f:	0f 84 2b f2 ff ff    	je     ffffffff80001840 <flanterm_write+0x100>
    if (ctx->dec_private == true) {
ffffffff80002615:	41 0f b6 b4 24 25 01 	movzbl 0x125(%r12),%esi
ffffffff8000261c:	00 00 
    switch (c) {
ffffffff8000261e:	41 8d 57 b6          	lea    -0x4a(%r15),%edx
ffffffff80002622:	80 fa 27             	cmp    $0x27,%dl
ffffffff80002625:	0f 87 e3 02 00 00    	ja     ffffffff8000290e <flanterm_write+0x11ce>
ffffffff8000262b:	48 b9 03 00 08 02 88 	movabs $0x8802080003,%rcx
ffffffff80002632:	00 00 00 
ffffffff80002635:	48 0f a3 d1          	bt     %rdx,%rcx
ffffffff80002639:	0f 83 cf 02 00 00    	jae    ffffffff8000290e <flanterm_write+0x11ce>
    for (size_t i = ctx->esc_values_i; i < FLANTERM_MAX_ESC_VALUES; i++) {
ffffffff8000263f:	48 83 f8 0f          	cmp    $0xf,%rax
ffffffff80002643:	0f 87 15 03 00 00    	ja     ffffffff8000295e <flanterm_write+0x121e>
ffffffff80002649:	31 c9                	xor    %ecx,%ecx
ffffffff8000264b:	45 31 c0             	xor    %r8d,%r8d
ffffffff8000264e:	48 89 c2             	mov    %rax,%rdx
ffffffff80002651:	a8 01                	test   $0x1,%al
ffffffff80002653:	74 12                	je     ffffffff80002667 <flanterm_write+0xf27>
        ctx->esc_values[i] = esc_default;
ffffffff80002655:	41 89 8c 84 88 01 00 	mov    %ecx,0x188(%r12,%rax,4)
ffffffff8000265c:	00 
    for (size_t i = ctx->esc_values_i; i < FLANTERM_MAX_ESC_VALUES; i++) {
ffffffff8000265d:	48 8d 50 01          	lea    0x1(%rax),%rdx
ffffffff80002661:	48 83 f8 0f          	cmp    $0xf,%rax
ffffffff80002665:	74 1a                	je     ffffffff80002681 <flanterm_write+0xf41>
        ctx->esc_values[i] = esc_default;
ffffffff80002667:	41 89 8c 94 88 01 00 	mov    %ecx,0x188(%r12,%rdx,4)
ffffffff8000266e:	00 
ffffffff8000266f:	41 89 8c 94 8c 01 00 	mov    %ecx,0x18c(%r12,%rdx,4)
ffffffff80002676:	00 
    for (size_t i = ctx->esc_values_i; i < FLANTERM_MAX_ESC_VALUES; i++) {
ffffffff80002677:	48 83 c2 02          	add    $0x2,%rdx
ffffffff8000267b:	48 83 fa 10          	cmp    $0x10,%rdx
ffffffff8000267f:	75 e6                	jne    ffffffff80002667 <flanterm_write+0xf27>
    if (esc_default != 0) {
ffffffff80002681:	4d 85 c0             	test   %r8,%r8
ffffffff80002684:	0f 84 ad 02 00 00    	je     ffffffff80002937 <flanterm_write+0x11f7>
        for (size_t i = 0; i < ctx->esc_values_i; i++) {
ffffffff8000268a:	48 85 c0             	test   %rax,%rax
ffffffff8000268d:	74 5f                	je     ffffffff800026ee <flanterm_write+0xfae>
ffffffff8000268f:	31 d2                	xor    %edx,%edx
            if (ctx->esc_values[i] == 0) {
ffffffff80002691:	45 8b 9c 94 88 01 00 	mov    0x188(%r12,%rdx,4),%r11d
ffffffff80002698:	00 
ffffffff80002699:	45 85 db             	test   %r11d,%r11d
ffffffff8000269c:	75 0c                	jne    ffffffff800026aa <flanterm_write+0xf6a>
                ctx->esc_values[i] = esc_default;
ffffffff8000269e:	41 c7 84 94 88 01 00 	movl   $0x1,0x188(%r12,%rdx,4)
ffffffff800026a5:	00 01 00 00 00 
        for (size_t i = 0; i < ctx->esc_values_i; i++) {
ffffffff800026aa:	48 83 c2 01          	add    $0x1,%rdx
ffffffff800026ae:	48 39 c2             	cmp    %rax,%rdx
ffffffff800026b1:	72 de                	jb     ffffffff80002691 <flanterm_write+0xf51>
    if (ctx->dec_private == true) {
ffffffff800026b3:	40 84 f6             	test   %sil,%sil
ffffffff800026b6:	0f 85 ac 04 00 00    	jne    ffffffff80002b68 <flanterm_write+0x1428>
    if (ctx->csi_unhandled) {
ffffffff800026bc:	41 80 bc 24 27 01 00 	cmpb   $0x0,0x127(%r12)
ffffffff800026c3:	00 00 
ffffffff800026c5:	0f 84 ab 02 00 00    	je     ffffffff80002976 <flanterm_write+0x1236>
        if (c >= 0x40 && c <= 0x7E) {
ffffffff800026cb:	41 83 ef 40          	sub    $0x40,%r15d
ffffffff800026cf:	41 80 ff 3e          	cmp    $0x3e,%r15b
ffffffff800026d3:	0f 87 67 f1 ff ff    	ja     ffffffff80001840 <flanterm_write+0x100>
            ctx->csi_unhandled = false;
ffffffff800026d9:	41 c6 84 24 27 01 00 	movb   $0x0,0x127(%r12)
ffffffff800026e0:	00 00 
            goto cleanup;
ffffffff800026e2:	0f b7 05 77 69 02 00 	movzwl 0x26977(%rip),%eax        # ffffffff80029060 <col256+0x3c0>
ffffffff800026e9:	e9 df f8 ff ff       	jmp    ffffffff80001fcd <flanterm_write+0x88d>
    if (ctx->dec_private == true) {
ffffffff800026ee:	40 84 f6             	test   %sil,%sil
ffffffff800026f1:	74 c9                	je     ffffffff800026bc <flanterm_write+0xf7c>
    ctx->dec_private = false;
ffffffff800026f3:	41 c6 84 24 25 01 00 	movb   $0x0,0x125(%r12)
ffffffff800026fa:	00 00 
    if (ctx->esc_values_i == 0) {
ffffffff800026fc:	0f b7 05 5d 69 02 00 	movzwl 0x2695d(%rip),%eax        # ffffffff80029060 <col256+0x3c0>
ffffffff80002703:	e9 c5 f8 ff ff       	jmp    ffffffff80001fcd <flanterm_write+0x88d>
ffffffff80002708:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000270f:	00 
        if (has_right && !has_left) return 0xde; // ▐
ffffffff80002710:	85 c9                	test   %ecx,%ecx
ffffffff80002712:	0f 84 2a f3 ff ff    	je     ffffffff80001a42 <flanterm_write+0x302>
ffffffff80002718:	e9 1d f3 ff ff       	jmp    ffffffff80001a3a <flanterm_write+0x2fa>
    switch (code_point) {
ffffffff8000271d:	48 81 fa 6b 26 00 00 	cmp    $0x266b,%rdx
ffffffff80002724:	0f 87 4b 1f 00 00    	ja     ffffffff80004675 <flanterm_write+0x2f35>
ffffffff8000272a:	48 81 fa bf 25 00 00 	cmp    $0x25bf,%rdx
ffffffff80002731:	0f 87 3b 01 00 00    	ja     ffffffff80002872 <flanterm_write+0x1132>
ffffffff80002737:	48 81 fa 97 25 00 00 	cmp    $0x2597,%rdx
ffffffff8000273e:	0f 87 c4 03 00 00    	ja     ffffffff80002b08 <flanterm_write+0x13c8>
ffffffff80002744:	48 81 fa 7e 25 00 00 	cmp    $0x257e,%rdx
ffffffff8000274b:	0f 86 f0 0a 00 00    	jbe    ffffffff80003241 <flanterm_write+0x1b01>
ffffffff80002751:	48 81 ea 80 25 00 00 	sub    $0x2580,%rdx
ffffffff80002758:	48 83 fa 17          	cmp    $0x17,%rdx
ffffffff8000275c:	0f 87 ef 12 00 00    	ja     ffffffff80003a51 <flanterm_write+0x2311>
ffffffff80002762:	ff 24 d5 80 66 02 80 	jmp    *-0x7ffd9980(,%rdx,8)
ffffffff80002769:	b8 dd ff ff ff       	mov    $0xffffffdd,%eax
        if (has_left && !has_right) return 0xdd; // ▌
ffffffff8000276e:	be dd 00 00 00       	mov    $0xdd,%esi
ffffffff80002773:	e9 18 f3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80002778:	b8 db ff ff ff       	mov    $0xffffffdb,%eax
        if (dots == 0xff) return 0xdb;
ffffffff8000277d:	be db 00 00 00       	mov    $0xdb,%esi
ffffffff80002782:	e9 09 f3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80002787:	b8 dc ff ff ff       	mov    $0xffffffdc,%eax
        if (has_bottom && !has_top) return 0xdc; // ▄
ffffffff8000278c:	be dc 00 00 00       	mov    $0xdc,%esi
ffffffff80002791:	e9 fa f2 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
ffffffff80002796:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000279d:	00 00 00 
ffffffff800027a0:	b8 df ff ff ff       	mov    $0xffffffdf,%eax
        if (has_top && !has_bottom) return 0xdf; // ▀
ffffffff800027a5:	be df 00 00 00       	mov    $0xdf,%esi
ffffffff800027aa:	e9 e1 f2 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800027af:	48 81 fa fa 23 00 00 	cmp    $0x23fa,%rdx
ffffffff800027b6:	0f 87 dd 1f 00 00    	ja     ffffffff80004799 <flanterm_write+0x3059>
ffffffff800027bc:	48 81 fa 01 23 00 00 	cmp    $0x2301,%rdx
ffffffff800027c3:	0f 86 f1 02 00 00    	jbe    ffffffff80002aba <flanterm_write+0x137a>
ffffffff800027c9:	48 8d 82 fe dc ff ff 	lea    -0x2302(%rdx),%rax
ffffffff800027d0:	48 3d f8 00 00 00    	cmp    $0xf8,%rax
ffffffff800027d6:	0f 87 db fb ff ff    	ja     ffffffff800023b7 <flanterm_write+0xc77>
ffffffff800027dc:	ff 24 c5 40 67 02 80 	jmp    *-0x7ffd98c0(,%rax,8)
ffffffff800027e3:	b8 db ff ff ff       	mov    $0xffffffdb,%eax
        if (dots == 0xff) return 0xdb;
ffffffff800027e8:	be db 00 00 00       	mov    $0xdb,%esi
ffffffff800027ed:	e9 9e f2 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
ffffffff800027f2:	b8 dd ff ff ff       	mov    $0xffffffdd,%eax
        if (has_left && !has_right) return 0xdd; // ▌
ffffffff800027f7:	be dd 00 00 00       	mov    $0xdd,%esi
ffffffff800027fc:	e9 8f f2 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80002801:	48 81 fa c6 03 00 00 	cmp    $0x3c6,%rdx
ffffffff80002808:	0f 87 d3 02 00 00    	ja     ffffffff80002ae1 <flanterm_write+0x13a1>
ffffffff8000280e:	48 81 fa 92 03 00 00 	cmp    $0x392,%rdx
ffffffff80002815:	0f 86 ad 1f 00 00    	jbe    ffffffff800047c8 <flanterm_write+0x3088>
ffffffff8000281b:	48 8d 82 6d fc ff ff 	lea    -0x393(%rdx),%rax
ffffffff80002822:	48 83 f8 33          	cmp    $0x33,%rax
ffffffff80002826:	0f 87 8b fb ff ff    	ja     ffffffff800023b7 <flanterm_write+0xc77>
ffffffff8000282c:	ff 24 c5 08 6f 02 80 	jmp    *-0x7ffd90f8(,%rax,8)
    } else if (c == ';') {
ffffffff80002833:	41 80 ff 3b          	cmp    $0x3b,%r15b
ffffffff80002837:	0f 85 d8 fd ff ff    	jne    ffffffff80002615 <flanterm_write+0xed5>
        if (ctx->esc_values_i == FLANTERM_MAX_ESC_VALUES) {
ffffffff8000283d:	48 83 f8 10          	cmp    $0x10,%rax
ffffffff80002841:	0f 84 f9 ef ff ff    	je     ffffffff80001840 <flanterm_write+0x100>
        ctx->esc_values[ctx->esc_values_i] = 0;
ffffffff80002847:	41 c7 84 84 88 01 00 	movl   $0x0,0x188(%r12,%rax,4)
ffffffff8000284e:	00 00 00 00 00 
        ctx->esc_values_i++;
ffffffff80002853:	48 83 c0 01          	add    $0x1,%rax
ffffffff80002857:	49 89 84 24 50 01 00 	mov    %rax,0x150(%r12)
ffffffff8000285e:	00 
        return;
ffffffff8000285f:	e9 dc ef ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
                ctx->dec_private = true;
ffffffff80002864:	41 c6 84 24 25 01 00 	movb   $0x1,0x125(%r12)
ffffffff8000286b:	00 01 
                return;
ffffffff8000286d:	e9 ce ef ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
    switch (code_point) {
ffffffff80002872:	48 8d 82 40 da ff ff 	lea    -0x25c0(%rdx),%rax
ffffffff80002879:	48 3d ab 00 00 00    	cmp    $0xab,%rax
ffffffff8000287f:	0f 87 32 fb ff ff    	ja     ffffffff800023b7 <flanterm_write+0xc77>
ffffffff80002885:	ff 24 c5 a8 70 02 80 	jmp    *-0x7ffd8f58(,%rax,8)
                ctx->set_cursor_pos(ctx, 0, y);
ffffffff8000288c:	31 f6                	xor    %esi,%esi
ffffffff8000288e:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002891:	ff d1                	call   *%rcx
ffffffff80002893:	e9 78 f3 ff ff       	jmp    ffffffff80001c10 <flanterm_write+0x4d0>
                ctx->revscroll(ctx);
ffffffff80002898:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000289b:	41 ff 94 24 80 02 00 	call   *0x280(%r12)
ffffffff800028a2:	00 
                ctx->set_cursor_pos(ctx, x, y);
ffffffff800028a3:	48 8b 55 c8          	mov    -0x38(%rbp),%rdx
ffffffff800028a7:	48 8b 75 c0          	mov    -0x40(%rbp),%rsi
ffffffff800028ab:	4c 89 e7             	mov    %r12,%rdi
ffffffff800028ae:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff800028b5:	00 
ffffffff800028b6:	e9 55 f3 ff ff       	jmp    ffffffff80001c10 <flanterm_write+0x4d0>
                ctx->scroll(ctx);
ffffffff800028bb:	4c 89 e7             	mov    %r12,%rdi
ffffffff800028be:	41 ff 94 24 78 02 00 	call   *0x278(%r12)
ffffffff800028c5:	00 
                ctx->set_cursor_pos(ctx, 0, y);
ffffffff800028c6:	48 8b 55 c8          	mov    -0x38(%rbp),%rdx
ffffffff800028ca:	31 f6                	xor    %esi,%esi
ffffffff800028cc:	4c 89 e7             	mov    %r12,%rdi
ffffffff800028cf:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff800028d6:	00 
ffffffff800028d7:	e9 34 f3 ff ff       	jmp    ffffffff80001c10 <flanterm_write+0x4d0>
ffffffff800028dc:	b8 b2 ff ff ff       	mov    $0xffffffb2,%eax
        if (n <= 6) return 0xb2; // ▓
ffffffff800028e1:	be b2 00 00 00       	mov    $0xb2,%esi
ffffffff800028e6:	e9 a5 f1 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
                ctx->scroll(ctx);
ffffffff800028eb:	4c 89 e7             	mov    %r12,%rdi
ffffffff800028ee:	41 ff 94 24 78 02 00 	call   *0x278(%r12)
ffffffff800028f5:	00 
                ctx->set_cursor_pos(ctx, x, y);
ffffffff800028f6:	48 8b 55 c8          	mov    -0x38(%rbp),%rdx
ffffffff800028fa:	48 8b 75 c0          	mov    -0x40(%rbp),%rsi
ffffffff800028fe:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002901:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80002908:	00 
ffffffff80002909:	e9 02 f3 ff ff       	jmp    ffffffff80001c10 <flanterm_write+0x4d0>
    for (size_t i = ctx->esc_values_i; i < FLANTERM_MAX_ESC_VALUES; i++) {
ffffffff8000290e:	b9 01 00 00 00       	mov    $0x1,%ecx
            esc_default = 1; break;
ffffffff80002913:	41 b8 01 00 00 00    	mov    $0x1,%r8d
    for (size_t i = ctx->esc_values_i; i < FLANTERM_MAX_ESC_VALUES; i++) {
ffffffff80002919:	48 83 f8 0f          	cmp    $0xf,%rax
ffffffff8000291d:	0f 86 2b fd ff ff    	jbe    ffffffff8000264e <flanterm_write+0xf0e>
ffffffff80002923:	e9 67 fd ff ff       	jmp    ffffffff8000268f <flanterm_write+0xf4f>
ffffffff80002928:	b8 de ff ff ff       	mov    $0xffffffde,%eax
        if (has_right && !has_left) return 0xde; // ▐
ffffffff8000292d:	be de 00 00 00       	mov    $0xde,%esi
ffffffff80002932:	e9 59 f1 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    if (ctx->dec_private == true) {
ffffffff80002937:	40 84 f6             	test   %sil,%sil
ffffffff8000293a:	0f 84 7c fd ff ff    	je     ffffffff800026bc <flanterm_write+0xf7c>
    ctx->dec_private = false;
ffffffff80002940:	41 c6 84 24 25 01 00 	movb   $0x0,0x125(%r12)
ffffffff80002947:	00 00 
    if (ctx->esc_values_i == 0) {
ffffffff80002949:	48 85 c0             	test   %rax,%rax
ffffffff8000294c:	0f 85 1f 02 00 00    	jne    ffffffff80002b71 <flanterm_write+0x1431>
ffffffff80002952:	0f b7 05 07 67 02 00 	movzwl 0x26707(%rip),%eax        # ffffffff80029060 <col256+0x3c0>
ffffffff80002959:	e9 6f f6 ff ff       	jmp    ffffffff80001fcd <flanterm_write+0x88d>
    if (ctx->dec_private == true) {
ffffffff8000295e:	40 84 f6             	test   %sil,%sil
ffffffff80002961:	0f 85 01 02 00 00    	jne    ffffffff80002b68 <flanterm_write+0x1428>
    if (ctx->csi_unhandled) {
ffffffff80002967:	41 80 bc 24 27 01 00 	cmpb   $0x0,0x127(%r12)
ffffffff8000296e:	00 00 
ffffffff80002970:	0f 85 63 fd ff ff    	jne    ffffffff800026d9 <flanterm_write+0xf99>
    bool r = ctx->scroll_enabled;
ffffffff80002976:	41 0f b6 44 24 0a    	movzbl 0xa(%r12),%eax
    ctx->get_cursor_pos(ctx, &x, &y);
ffffffff8000297c:	48 8d 55 b8          	lea    -0x48(%rbp),%rdx
    ctx->scroll_enabled = false;
ffffffff80002980:	41 c6 44 24 0a 00    	movb   $0x0,0xa(%r12)
    ctx->get_cursor_pos(ctx, &x, &y);
ffffffff80002986:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002989:	48 8d 75 b0          	lea    -0x50(%rbp),%rsi
    bool r = ctx->scroll_enabled;
ffffffff8000298d:	88 45 a8             	mov    %al,-0x58(%rbp)
    ctx->get_cursor_pos(ctx, &x, &y);
ffffffff80002990:	41 ff 94 24 18 02 00 	call   *0x218(%r12)
ffffffff80002997:	00 
    switch (c) {
ffffffff80002998:	41 8d 47 e5          	lea    -0x1b(%r15),%eax
ffffffff8000299c:	3c 5a                	cmp    $0x5a,%al
ffffffff8000299e:	77 0a                	ja     ffffffff800029aa <flanterm_write+0x126a>
ffffffff800029a0:	0f b6 c0             	movzbl %al,%eax
ffffffff800029a3:	ff 24 c5 08 76 02 80 	jmp    *-0x7ffd89f8(,%rax,8)
            if (c >= 0x40 && c <= 0x7E) {
ffffffff800029aa:	41 83 ef 40          	sub    $0x40,%r15d
ffffffff800029ae:	41 80 ff 3e          	cmp    $0x3e,%r15b
ffffffff800029b2:	0f 86 f4 00 00 00    	jbe    ffffffff80002aac <flanterm_write+0x136c>
            ctx->csi_unhandled = true;
ffffffff800029b8:	41 c6 84 24 27 01 00 	movb   $0x1,0x127(%r12)
ffffffff800029bf:	00 01 
            ctx->scroll_enabled = r;
ffffffff800029c1:	0f b6 45 a8          	movzbl -0x58(%rbp),%eax
ffffffff800029c5:	41 88 44 24 0a       	mov    %al,0xa(%r12)
            return;
ffffffff800029ca:	e9 71 ee ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
ffffffff800029cf:	90                   	nop
ffffffff800029d0:	b8 b0 ff ff ff       	mov    $0xffffffb0,%eax
        if (n <= 2) return 0xb0; // ░
ffffffff800029d5:	be b0 00 00 00       	mov    $0xb0,%esi
ffffffff800029da:	e9 b1 f0 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
  if (ucs < table[0].first || ucs > table[max].last)
ffffffff800029df:	8d 81 00 ef ff ff    	lea    -0x1100(%rcx),%eax
ffffffff800029e5:	3d fd ee 03 00       	cmp    $0x3eefd,%eax
ffffffff800029ea:	0f 87 8c f5 ff ff    	ja     ffffffff80001f7c <flanterm_write+0x83c>
  int min = 0;
ffffffff800029f0:	45 31 c0             	xor    %r8d,%r8d
ffffffff800029f3:	be 7a 00 00 00       	mov    $0x7a,%esi
ffffffff800029f8:	eb 0d                	jmp    ffffffff80002a07 <flanterm_write+0x12c7>
      min = mid + 1;
ffffffff800029fa:	44 8d 40 01          	lea    0x1(%rax),%r8d
  while (max >= min) {
ffffffff800029fe:	44 39 c6             	cmp    %r8d,%esi
ffffffff80002a01:	0f 8c 75 f5 ff ff    	jl     ffffffff80001f7c <flanterm_write+0x83c>
    mid = (min + max) / 2;
ffffffff80002a07:	41 8d 14 30          	lea    (%r8,%rsi,1),%edx
ffffffff80002a0b:	89 d0                	mov    %edx,%eax
ffffffff80002a0d:	c1 e8 1f             	shr    $0x1f,%eax
ffffffff80002a10:	01 d0                	add    %edx,%eax
ffffffff80002a12:	d1 f8                	sar    $1,%eax
    if (ucs > table[mid].last)
ffffffff80002a14:	48 63 d0             	movslq %eax,%rdx
ffffffff80002a17:	39 0c d5 24 7d 02 80 	cmp    %ecx,-0x7ffd82dc(,%rdx,8)
ffffffff80002a1e:	72 da                	jb     ffffffff800029fa <flanterm_write+0x12ba>
    else if (ucs < table[mid].first)
ffffffff80002a20:	3b 0c d5 20 7d 02 80 	cmp    -0x7ffd82e0(,%rdx,8),%ecx
ffffffff80002a27:	73 05                	jae    ffffffff80002a2e <flanterm_write+0x12ee>
      max = mid - 1;
ffffffff80002a29:	8d 70 ff             	lea    -0x1(%rax),%esi
ffffffff80002a2c:	eb d0                	jmp    ffffffff800029fe <flanterm_write+0x12be>
                ctx->last_printed_char = 0xfe;
ffffffff80002a2e:	b8 fe 01 00 00       	mov    $0x1fe,%eax
                ctx->raw_putchar(ctx, 0xfe);
ffffffff80002a33:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002a36:	be fe 00 00 00       	mov    $0xfe,%esi
                ctx->last_printed_char = 0xfe;
ffffffff80002a3b:	66 41 89 84 24 c8 01 	mov    %ax,0x1c8(%r12)
ffffffff80002a42:	00 00 
                ctx->raw_putchar(ctx, 0xfe);
ffffffff80002a44:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80002a4b:	00 
                ctx->raw_putchar(ctx, ' ');
ffffffff80002a4c:	be 20 00 00 00       	mov    $0x20,%esi
ffffffff80002a51:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002a54:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80002a5b:	00 
            for (int i = 1; i < replacement_width; i++) {
ffffffff80002a5c:	e9 df ed ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
            x = 0;
ffffffff80002a61:	45 31 c9             	xor    %r9d,%r9d
ffffffff80002a64:	4c 89 4d b0          	mov    %r9,-0x50(%rbp)
            if (ctx->esc_values[0] > y)
ffffffff80002a68:	48 8b 55 b8          	mov    -0x48(%rbp),%rdx
ffffffff80002a6c:	41 8b 84 24 88 01 00 	mov    0x188(%r12),%eax
ffffffff80002a73:	00 
ffffffff80002a74:	48 39 c2             	cmp    %rax,%rdx
ffffffff80002a77:	73 0a                	jae    ffffffff80002a83 <flanterm_write+0x1343>
                ctx->esc_values[0] = y;
ffffffff80002a79:	41 89 94 24 88 01 00 	mov    %edx,0x188(%r12)
ffffffff80002a80:	00 
ffffffff80002a81:	89 d0                	mov    %edx,%eax
            size_t dest_y = y - ctx->esc_values[0];
ffffffff80002a83:	48 29 c2             	sub    %rax,%rdx
            size_t min_y = ctx->origin_mode ? ctx->scroll_top_margin : 0;
ffffffff80002a86:	41 80 7c 24 0c 00    	cmpb   $0x0,0xc(%r12)
ffffffff80002a8c:	74 0f                	je     ffffffff80002a9d <flanterm_write+0x135d>
            if (dest_y < min_y) {
ffffffff80002a8e:	49 8b 84 24 78 01 00 	mov    0x178(%r12),%rax
ffffffff80002a95:	00 
ffffffff80002a96:	48 39 c2             	cmp    %rax,%rdx
ffffffff80002a99:	48 0f 42 d0          	cmovb  %rax,%rdx
            ctx->set_cursor_pos(ctx, x, ctx->esc_values[0] + row_offset);
ffffffff80002a9d:	48 8b 75 b0          	mov    -0x50(%rbp),%rsi
ffffffff80002aa1:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002aa4:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80002aab:	00 
    ctx->scroll_enabled = r;
ffffffff80002aac:	0f b6 45 a8          	movzbl -0x58(%rbp),%eax
ffffffff80002ab0:	41 88 44 24 0a       	mov    %al,0xa(%r12)
ffffffff80002ab5:	e9 98 fe ff ff       	jmp    ffffffff80002952 <flanterm_write+0x1212>
    switch (code_point) {
ffffffff80002aba:	48 8d 82 f8 dd ff ff 	lea    -0x2208(%rdx),%rax
ffffffff80002ac1:	48 83 f8 5d          	cmp    $0x5d,%rax
ffffffff80002ac5:	0f 87 92 00 00 00    	ja     ffffffff80002b5d <flanterm_write+0x141d>
ffffffff80002acb:	ff 24 c5 e0 78 02 80 	jmp    *-0x7ffd8720(,%rax,8)
ffffffff80002ad2:	b8 b1 ff ff ff       	mov    $0xffffffb1,%eax
        if (n <= 4) return 0xb1; // ▒
ffffffff80002ad7:	be b1 00 00 00       	mov    $0xb1,%esi
ffffffff80002adc:	e9 af ef ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80002ae1:	48 81 fa 7f 20 00 00 	cmp    $0x207f,%rdx
ffffffff80002ae8:	0f 84 7a 01 00 00    	je     ffffffff80002c68 <flanterm_write+0x1528>
ffffffff80002aee:	0f 87 49 01 00 00    	ja     ffffffff80002c3d <flanterm_write+0x14fd>
ffffffff80002af4:	48 8d 82 ed df ff ff 	lea    -0x2013(%rdx),%rax
ffffffff80002afb:	48 83 f8 29          	cmp    $0x29,%rax
ffffffff80002aff:	77 5c                	ja     ffffffff80002b5d <flanterm_write+0x141d>
ffffffff80002b01:	ff 24 c5 d0 7b 02 80 	jmp    *-0x7ffd8430(,%rax,8)
ffffffff80002b08:	48 81 fa ac 25 00 00 	cmp    $0x25ac,%rdx
ffffffff80002b0f:	0f 84 ac 07 00 00    	je     ffffffff800032c1 <flanterm_write+0x1b81>
ffffffff80002b15:	0f 87 5c 07 00 00    	ja     ffffffff80003277 <flanterm_write+0x1b37>
ffffffff80002b1b:	48 81 fa 9e 25 00 00 	cmp    $0x259e,%rdx
ffffffff80002b22:	0f 87 40 18 00 00    	ja     ffffffff80004368 <flanterm_write+0x2c28>
ffffffff80002b28:	48 8d 8a 68 da ff ff 	lea    -0x2598(%rdx),%rcx
ffffffff80002b2f:	b8 01 00 00 00       	mov    $0x1,%eax
ffffffff80002b34:	48 d3 e0             	shl    %cl,%rax
ffffffff80002b37:	48 89 c1             	mov    %rax,%rcx
ffffffff80002b3a:	a8 1a                	test   $0x1a,%al
ffffffff80002b3c:	0f 85 17 18 00 00    	jne    ffffffff80004359 <flanterm_write+0x2c19>
ffffffff80002b42:	a8 21                	test   $0x21,%al
ffffffff80002b44:	0f 85 4b 19 00 00    	jne    ffffffff80004495 <flanterm_write+0x2d55>
ffffffff80002b4a:	80 e1 44             	and    $0x44,%cl
ffffffff80002b4d:	b8 b1 ff ff ff       	mov    $0xffffffb1,%eax
        if (n <= 4) return 0xb1; // ▒
ffffffff80002b52:	be b1 00 00 00       	mov    $0xb1,%esi
    switch (code_point) {
ffffffff80002b57:	0f 85 33 ef ff ff    	jne    ffffffff80001a90 <flanterm_write+0x350>
            int replacement_width = mk_wcwidth(ctx->code_point);
ffffffff80002b5d:	89 d1                	mov    %edx,%ecx
  if (ucs < table[0].first || ucs > table[max].last)
ffffffff80002b5f:	e9 1b f5 ff ff       	jmp    ffffffff8000207f <flanterm_write+0x93f>
ffffffff80002b64:	0f 1f 40 00          	nopl   0x0(%rax)
    ctx->dec_private = false;
ffffffff80002b68:	41 c6 84 24 25 01 00 	movb   $0x0,0x125(%r12)
ffffffff80002b6f:	00 00 
    switch (c) {
ffffffff80002b71:	41 80 ff 68          	cmp    $0x68,%r15b
ffffffff80002b75:	74 14                	je     ffffffff80002b8b <flanterm_write+0x144b>
ffffffff80002b77:	0f b7 05 e2 64 02 00 	movzwl 0x264e2(%rip),%eax        # ffffffff80029060 <col256+0x3c0>
ffffffff80002b7e:	41 80 ff 6c          	cmp    $0x6c,%r15b
ffffffff80002b82:	0f 85 45 f4 ff ff    	jne    ffffffff80001fcd <flanterm_write+0x88d>
ffffffff80002b88:	45 31 f6             	xor    %r14d,%r14d
    for (size_t i = 0; i < ctx->esc_values_i; i++) {
ffffffff80002b8b:	48 c7 45 a8 00 00 00 	movq   $0x0,-0x58(%rbp)
ffffffff80002b92:	00 
ffffffff80002b93:	0f b7 05 c6 64 02 00 	movzwl 0x264c6(%rip),%eax        # ffffffff80029060 <col256+0x3c0>
ffffffff80002b9a:	eb 29                	jmp    ffffffff80002bc5 <flanterm_write+0x1485>
        switch (ctx->esc_values[i]) {
ffffffff80002b9c:	83 fa 06             	cmp    $0x6,%edx
ffffffff80002b9f:	74 62                	je     ffffffff80002c03 <flanterm_write+0x14c3>
ffffffff80002ba1:	83 fa 07             	cmp    $0x7,%edx
ffffffff80002ba4:	75 05                	jne    ffffffff80002bab <flanterm_write+0x146b>
                ctx->wrap_enabled = set;
ffffffff80002ba6:	45 88 74 24 0b       	mov    %r14b,0xb(%r12)
    for (size_t i = 0; i < ctx->esc_values_i; i++) {
ffffffff80002bab:	48 83 45 a8 01       	addq   $0x1,-0x58(%rbp)
ffffffff80002bb0:	49 8b 94 24 50 01 00 	mov    0x150(%r12),%rdx
ffffffff80002bb7:	00 
ffffffff80002bb8:	48 8b 7d a8          	mov    -0x58(%rbp),%rdi
ffffffff80002bbc:	48 39 d7             	cmp    %rdx,%rdi
ffffffff80002bbf:	0f 83 3c 01 00 00    	jae    ffffffff80002d01 <flanterm_write+0x15c1>
        switch (ctx->esc_values[i]) {
ffffffff80002bc5:	48 8b 7d a8          	mov    -0x58(%rbp),%rdi
ffffffff80002bc9:	41 8b 94 bc 88 01 00 	mov    0x188(%r12,%rdi,4),%edx
ffffffff80002bd0:	00 
ffffffff80002bd1:	83 fa 19             	cmp    $0x19,%edx
ffffffff80002bd4:	74 5d                	je     ffffffff80002c33 <flanterm_write+0x14f3>
ffffffff80002bd6:	76 c4                	jbe    ffffffff80002b9c <flanterm_write+0x145c>
ffffffff80002bd8:	81 fa 19 04 00 00    	cmp    $0x419,%edx
ffffffff80002bde:	75 cb                	jne    ffffffff80002bab <flanterm_write+0x146b>
                if (set) {
ffffffff80002be0:	45 84 f6             	test   %r14b,%r14b
ffffffff80002be3:	0f 84 9d 00 00 00    	je     ffffffff80002c86 <flanterm_write+0x1546>
ffffffff80002be9:	66 89 45 a0          	mov    %ax,-0x60(%rbp)
                    ctx->clear(ctx, true);
ffffffff80002bed:	be 01 00 00 00       	mov    $0x1,%esi
ffffffff80002bf2:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002bf5:	41 ff 94 24 08 02 00 	call   *0x208(%r12)
ffffffff80002bfc:	00 
ffffffff80002bfd:	0f b7 45 a0          	movzwl -0x60(%rbp),%eax
ffffffff80002c01:	eb a8                	jmp    ffffffff80002bab <flanterm_write+0x146b>
                ctx->origin_mode = set;
ffffffff80002c03:	45 88 74 24 0c       	mov    %r14b,0xc(%r12)
                ctx->set_cursor_pos(ctx, 0, set ? ctx->scroll_top_margin : 0);
ffffffff80002c08:	49 8b 8c 24 10 02 00 	mov    0x210(%r12),%rcx
ffffffff80002c0f:	00 
ffffffff80002c10:	31 d2                	xor    %edx,%edx
ffffffff80002c12:	45 84 f6             	test   %r14b,%r14b
ffffffff80002c15:	74 08                	je     ffffffff80002c1f <flanterm_write+0x14df>
ffffffff80002c17:	49 8b 94 24 78 01 00 	mov    0x178(%r12),%rdx
ffffffff80002c1e:	00 
ffffffff80002c1f:	66 89 45 a0          	mov    %ax,-0x60(%rbp)
ffffffff80002c23:	31 f6                	xor    %esi,%esi
ffffffff80002c25:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002c28:	ff d1                	call   *%rcx
                break;
ffffffff80002c2a:	0f b7 45 a0          	movzwl -0x60(%rbp),%eax
ffffffff80002c2e:	e9 78 ff ff ff       	jmp    ffffffff80002bab <flanterm_write+0x146b>
                ctx->cursor_enabled = set;
ffffffff80002c33:	45 88 74 24 09       	mov    %r14b,0x9(%r12)
                break;
ffffffff80002c38:	e9 6e ff ff ff       	jmp    ffffffff80002bab <flanterm_write+0x146b>
    switch (code_point) {
ffffffff80002c3d:	48 81 fa 2a 21 00 00 	cmp    $0x212a,%rdx
ffffffff80002c44:	74 31                	je     ffffffff80002c77 <flanterm_write+0x1537>
ffffffff80002c46:	0f 87 a3 18 00 00    	ja     ffffffff800044ef <flanterm_write+0x2daf>
ffffffff80002c4c:	48 81 fa a7 20 00 00 	cmp    $0x20a7,%rdx
ffffffff80002c53:	0f 85 78 18 00 00    	jne    ffffffff800044d1 <flanterm_write+0x2d91>
ffffffff80002c59:	b8 9e ff ff ff       	mov    $0xffffff9e,%eax
        case 0x20a7: return 158;
ffffffff80002c5e:	be 9e 00 00 00       	mov    $0x9e,%esi
ffffffff80002c63:	e9 28 ee ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80002c68:	b8 fc ff ff ff       	mov    $0xfffffffc,%eax
        case 0x207f: return 252;
ffffffff80002c6d:	be fc 00 00 00       	mov    $0xfc,%esi
ffffffff80002c72:	e9 19 ee ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80002c77:	b8 4b 00 00 00       	mov    $0x4b,%eax
        case 0x212a: return 0x4b;
ffffffff80002c7c:	be 4b 00 00 00       	mov    $0x4b,%esi
ffffffff80002c81:	e9 0a ee ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
                    if (ctx->reverse_video) {
ffffffff80002c86:	41 80 bc 24 24 01 00 	cmpb   $0x0,0x124(%r12)
ffffffff80002c8d:	00 00 
ffffffff80002c8f:	74 1c                	je     ffffffff80002cad <flanterm_write+0x156d>
ffffffff80002c91:	66 89 45 a0          	mov    %ax,-0x60(%rbp)
                        ctx->swap_palette(ctx);
ffffffff80002c95:	4c 89 e7             	mov    %r12,%rdi
                        ctx->reverse_video = false;
ffffffff80002c98:	41 c6 84 24 24 01 00 	movb   $0x0,0x124(%r12)
ffffffff80002c9f:	00 00 
                        ctx->swap_palette(ctx);
ffffffff80002ca1:	41 ff 94 24 88 02 00 	call   *0x288(%r12)
ffffffff80002ca8:	00 
ffffffff80002ca9:	0f b7 45 a0          	movzwl -0x60(%rbp),%eax
                    ctx->bold = false;
ffffffff80002cad:	66 41 89 84 24 22 01 	mov    %ax,0x122(%r12)
ffffffff80002cb4:	00 00 
                    ctx->set_text_bg_default(ctx);
ffffffff80002cb6:	4c 89 e7             	mov    %r12,%rdi
                    ctx->bold = false;
ffffffff80002cb9:	66 89 45 a0          	mov    %ax,-0x60(%rbp)
                    ctx->current_primary = (size_t)-1;
ffffffff80002cbd:	49 c7 84 24 68 01 00 	movq   $0xffffffffffffffff,0x168(%r12)
ffffffff80002cc4:	00 ff ff ff ff 
                    ctx->current_bg = (size_t)-1;
ffffffff80002cc9:	49 c7 84 24 70 01 00 	movq   $0xffffffffffffffff,0x170(%r12)
ffffffff80002cd0:	00 ff ff ff ff 
                    ctx->set_text_bg_default(ctx);
ffffffff80002cd5:	41 ff 94 24 58 02 00 	call   *0x258(%r12)
ffffffff80002cdc:	00 
                    ctx->set_text_fg_default(ctx);
ffffffff80002cdd:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002ce0:	41 ff 94 24 50 02 00 	call   *0x250(%r12)
ffffffff80002ce7:	00 
                    ctx->clear(ctx, true);
ffffffff80002ce8:	be 01 00 00 00       	mov    $0x1,%esi
ffffffff80002ced:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002cf0:	41 ff 94 24 08 02 00 	call   *0x208(%r12)
ffffffff80002cf7:	00 
ffffffff80002cf8:	0f b7 45 a0          	movzwl -0x60(%rbp),%eax
ffffffff80002cfc:	e9 aa fe ff ff       	jmp    ffffffff80002bab <flanterm_write+0x146b>
    if (ctx->callback != NULL) {
ffffffff80002d01:	4d 8b 94 24 b8 02 00 	mov    0x2b8(%r12),%r10
ffffffff80002d08:	00 
ffffffff80002d09:	4d 85 d2             	test   %r10,%r10
ffffffff80002d0c:	0f 84 bb f2 ff ff    	je     ffffffff80001fcd <flanterm_write+0x88d>
ffffffff80002d12:	66 89 45 a8          	mov    %ax,-0x58(%rbp)
        ctx->callback(ctx, FLANTERM_CB_DEC, ctx->esc_values_i, (uintptr_t)ctx->esc_values, c);
ffffffff80002d16:	4d 0f be c7          	movsbq %r15b,%r8
ffffffff80002d1a:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80002d1f:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002d22:	49 8d 8c 24 88 01 00 	lea    0x188(%r12),%rcx
ffffffff80002d29:	00 
ffffffff80002d2a:	41 ff d2             	call   *%r10
ffffffff80002d2d:	0f b7 45 a8          	movzwl -0x58(%rbp),%eax
ffffffff80002d31:	e9 97 f2 ff ff       	jmp    ffffffff80001fcd <flanterm_write+0x88d>
        case 0x2567: return 207;
ffffffff80002d36:	b8 cf ff ff ff       	mov    $0xffffffcf,%eax
ffffffff80002d3b:	be cf 00 00 00       	mov    $0xcf,%esi
ffffffff80002d40:	e9 4b ed ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2566: return 203;
ffffffff80002d45:	b8 cb ff ff ff       	mov    $0xffffffcb,%eax
ffffffff80002d4a:	be cb 00 00 00       	mov    $0xcb,%esi
ffffffff80002d4f:	e9 3c ed ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2565: return 210;
ffffffff80002d54:	b8 d2 ff ff ff       	mov    $0xffffffd2,%eax
ffffffff80002d59:	be d2 00 00 00       	mov    $0xd2,%esi
ffffffff80002d5e:	e9 2d ed ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2564: return 209;
ffffffff80002d63:	b8 d1 ff ff ff       	mov    $0xffffffd1,%eax
ffffffff80002d68:	be d1 00 00 00       	mov    $0xd1,%esi
ffffffff80002d6d:	e9 1e ed ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2563: return 185;
ffffffff80002d72:	b8 b9 ff ff ff       	mov    $0xffffffb9,%eax
ffffffff80002d77:	be b9 00 00 00       	mov    $0xb9,%esi
ffffffff80002d7c:	e9 0f ed ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2560: return 204;
ffffffff80002d81:	b8 cc ff ff ff       	mov    $0xffffffcc,%eax
ffffffff80002d86:	be cc 00 00 00       	mov    $0xcc,%esi
ffffffff80002d8b:	e9 00 ed ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x255f: return 199;
ffffffff80002d90:	b8 c7 ff ff ff       	mov    $0xffffffc7,%eax
ffffffff80002d95:	be c7 00 00 00       	mov    $0xc7,%esi
ffffffff80002d9a:	e9 f1 ec ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x255e: return 198;
ffffffff80002d9f:	b8 c6 ff ff ff       	mov    $0xffffffc6,%eax
ffffffff80002da4:	be c6 00 00 00       	mov    $0xc6,%esi
ffffffff80002da9:	e9 e2 ec ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x255d: return 188;
ffffffff80002dae:	b8 bc ff ff ff       	mov    $0xffffffbc,%eax
ffffffff80002db3:	be bc 00 00 00       	mov    $0xbc,%esi
ffffffff80002db8:	e9 d3 ec ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x255c: return 189;
ffffffff80002dbd:	b8 bd ff ff ff       	mov    $0xffffffbd,%eax
ffffffff80002dc2:	be bd 00 00 00       	mov    $0xbd,%esi
ffffffff80002dc7:	e9 c4 ec ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x255b: return 190;
ffffffff80002dcc:	b8 be ff ff ff       	mov    $0xffffffbe,%eax
ffffffff80002dd1:	be be 00 00 00       	mov    $0xbe,%esi
ffffffff80002dd6:	e9 b5 ec ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x255a: return 200;
ffffffff80002ddb:	b8 c8 ff ff ff       	mov    $0xffffffc8,%eax
ffffffff80002de0:	be c8 00 00 00       	mov    $0xc8,%esi
ffffffff80002de5:	e9 a6 ec ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2559: return 211;
ffffffff80002dea:	b8 d3 ff ff ff       	mov    $0xffffffd3,%eax
ffffffff80002def:	be d3 00 00 00       	mov    $0xd3,%esi
ffffffff80002df4:	e9 97 ec ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2558: return 212;
ffffffff80002df9:	b8 d4 ff ff ff       	mov    $0xffffffd4,%eax
ffffffff80002dfe:	be d4 00 00 00       	mov    $0xd4,%esi
ffffffff80002e03:	e9 88 ec ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2557: return 187;
ffffffff80002e08:	b8 bb ff ff ff       	mov    $0xffffffbb,%eax
ffffffff80002e0d:	be bb 00 00 00       	mov    $0xbb,%esi
ffffffff80002e12:	e9 79 ec ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2556: return 183;
ffffffff80002e17:	b8 b7 ff ff ff       	mov    $0xffffffb7,%eax
ffffffff80002e1c:	be b7 00 00 00       	mov    $0xb7,%esi
ffffffff80002e21:	e9 6a ec ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2555: return 184;
ffffffff80002e26:	b8 b8 ff ff ff       	mov    $0xffffffb8,%eax
ffffffff80002e2b:	be b8 00 00 00       	mov    $0xb8,%esi
ffffffff80002e30:	e9 5b ec ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2554: return 201;
ffffffff80002e35:	b8 c9 ff ff ff       	mov    $0xffffffc9,%eax
ffffffff80002e3a:	be c9 00 00 00       	mov    $0xc9,%esi
ffffffff80002e3f:	e9 4c ec ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2553: return 214;
ffffffff80002e44:	b8 d6 ff ff ff       	mov    $0xffffffd6,%eax
ffffffff80002e49:	be d6 00 00 00       	mov    $0xd6,%esi
ffffffff80002e4e:	e9 3d ec ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2552: return 213;
ffffffff80002e53:	b8 d5 ff ff ff       	mov    $0xffffffd5,%eax
ffffffff80002e58:	be d5 00 00 00       	mov    $0xd5,%esi
ffffffff80002e5d:	e9 2e ec ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2550: return 205;
ffffffff80002e62:	b8 cd ff ff ff       	mov    $0xffffffcd,%eax
ffffffff80002e67:	be cd 00 00 00       	mov    $0xcd,%esi
ffffffff80002e6c:	e9 1f ec ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80002e71:	b8 1d 00 00 00       	mov    $0x1d,%eax
        case 0x2194: return 29;
ffffffff80002e76:	be 1d 00 00 00       	mov    $0x1d,%esi
ffffffff80002e7b:	e9 10 ec ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2310: return 169;
ffffffff80002e80:	b8 a9 ff ff ff       	mov    $0xffffffa9,%eax
ffffffff80002e85:	be a9 00 00 00       	mov    $0xa9,%esi
ffffffff80002e8a:	e9 01 ec ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2321: return 245;
ffffffff80002e8f:	b8 f5 ff ff ff       	mov    $0xfffffff5,%eax
ffffffff80002e94:	be f5 00 00 00       	mov    $0xf5,%esi
ffffffff80002e99:	e9 f2 eb ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2320: return 244;
ffffffff80002e9e:	b8 f4 ff ff ff       	mov    $0xfffffff4,%eax
ffffffff80002ea3:	be f4 00 00 00       	mov    $0xf4,%esi
ffffffff80002ea8:	e9 e3 eb ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2572: return 0x5c; // ╲ → \ (backslash)
ffffffff80002ead:	b8 5c 00 00 00       	mov    $0x5c,%eax
ffffffff80002eb2:	be 5c 00 00 00       	mov    $0x5c,%esi
ffffffff80002eb7:	e9 d4 eb ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x0192: return 159;
ffffffff80002ebc:	b8 9f ff ff ff       	mov    $0xffffff9f,%eax
ffffffff80002ec1:	be 9f 00 00 00       	mov    $0x9f,%esi
ffffffff80002ec6:	e9 c5 eb ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 'y': FLANTERM_DEC_SPCL_PRN(0xf3)
ffffffff80002ecb:	66 41 c7 84 24 c8 01 	movw   $0x1f3,0x1c8(%r12)
ffffffff80002ed2:	00 00 f3 01 
ffffffff80002ed6:	be f3 00 00 00       	mov    $0xf3,%esi
ffffffff80002edb:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002ede:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80002ee5:	00 
ffffffff80002ee6:	e9 55 e9 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case 'x': FLANTERM_DEC_SPCL_PRN(0xb3)
ffffffff80002eeb:	66 41 c7 84 24 c8 01 	movw   $0x1b3,0x1c8(%r12)
ffffffff80002ef2:	00 00 b3 01 
ffffffff80002ef6:	be b3 00 00 00       	mov    $0xb3,%esi
ffffffff80002efb:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002efe:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80002f05:	00 
ffffffff80002f06:	e9 35 e9 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case 'w': FLANTERM_DEC_SPCL_PRN(0xc2)
ffffffff80002f0b:	66 41 c7 84 24 c8 01 	movw   $0x1c2,0x1c8(%r12)
ffffffff80002f12:	00 00 c2 01 
ffffffff80002f16:	be c2 00 00 00       	mov    $0xc2,%esi
ffffffff80002f1b:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002f1e:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80002f25:	00 
ffffffff80002f26:	e9 15 e9 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case 'v': FLANTERM_DEC_SPCL_PRN(0xc1)
ffffffff80002f2b:	66 41 c7 84 24 c8 01 	movw   $0x1c1,0x1c8(%r12)
ffffffff80002f32:	00 00 c1 01 
ffffffff80002f36:	be c1 00 00 00       	mov    $0xc1,%esi
ffffffff80002f3b:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002f3e:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80002f45:	00 
ffffffff80002f46:	e9 f5 e8 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case 'u': FLANTERM_DEC_SPCL_PRN(0xb4)
ffffffff80002f4b:	66 41 c7 84 24 c8 01 	movw   $0x1b4,0x1c8(%r12)
ffffffff80002f52:	00 00 b4 01 
ffffffff80002f56:	be b4 00 00 00       	mov    $0xb4,%esi
ffffffff80002f5b:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002f5e:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80002f65:	00 
ffffffff80002f66:	e9 d5 e8 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case 't': FLANTERM_DEC_SPCL_PRN(0xc3)
ffffffff80002f6b:	66 41 c7 84 24 c8 01 	movw   $0x1c3,0x1c8(%r12)
ffffffff80002f72:	00 00 c3 01 
ffffffff80002f76:	be c3 00 00 00       	mov    $0xc3,%esi
ffffffff80002f7b:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002f7e:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80002f85:	00 
ffffffff80002f86:	e9 b5 e8 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case 's': FLANTERM_DEC_SPCL_PRN(0x5f)
ffffffff80002f8b:	66 41 c7 84 24 c8 01 	movw   $0x15f,0x1c8(%r12)
ffffffff80002f92:	00 00 5f 01 
ffffffff80002f96:	be 5f 00 00 00       	mov    $0x5f,%esi
ffffffff80002f9b:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002f9e:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80002fa5:	00 
ffffffff80002fa6:	e9 95 e8 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case 'q': FLANTERM_DEC_SPCL_PRN(0xc4)
ffffffff80002fab:	66 41 c7 84 24 c8 01 	movw   $0x1c4,0x1c8(%r12)
ffffffff80002fb2:	00 00 c4 01 
ffffffff80002fb6:	be c4 00 00 00       	mov    $0xc4,%esi
ffffffff80002fbb:	4c 89 e7             	mov    %r12,%rdi
ffffffff80002fbe:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80002fc5:	00 
ffffffff80002fc6:	e9 75 e8 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case 0x0398: return 233;
ffffffff80002fcb:	b8 e9 ff ff ff       	mov    $0xffffffe9,%eax
ffffffff80002fd0:	be e9 00 00 00       	mov    $0xe9,%esi
ffffffff80002fd5:	e9 b6 ea ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x03c4: return 231;
ffffffff80002fda:	b8 e7 ff ff ff       	mov    $0xffffffe7,%eax
ffffffff80002fdf:	be e7 00 00 00       	mov    $0xe7,%esi
ffffffff80002fe4:	e9 a7 ea ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x03c3: return 229;
ffffffff80002fe9:	b8 e5 ff ff ff       	mov    $0xffffffe5,%eax
ffffffff80002fee:	be e5 00 00 00       	mov    $0xe5,%esi
ffffffff80002ff3:	e9 98 ea ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x03c0: return 227;
ffffffff80002ff8:	b8 e3 ff ff ff       	mov    $0xffffffe3,%eax
ffffffff80002ffd:	be e3 00 00 00       	mov    $0xe3,%esi
ffffffff80003002:	e9 89 ea ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00ee: return 140;
ffffffff80003007:	b8 8c ff ff ff       	mov    $0xffffff8c,%eax
ffffffff8000300c:	be 8c 00 00 00       	mov    $0x8c,%esi
ffffffff80003011:	e9 7a ea ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00ed: return 161;
ffffffff80003016:	b8 a1 ff ff ff       	mov    $0xffffffa1,%eax
ffffffff8000301b:	be a1 00 00 00       	mov    $0xa1,%esi
ffffffff80003020:	e9 6b ea ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00ec: return 141;
ffffffff80003025:	b8 8d ff ff ff       	mov    $0xffffff8d,%eax
ffffffff8000302a:	be 8d 00 00 00       	mov    $0x8d,%esi
ffffffff8000302f:	e9 5c ea ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00eb: return 137;
ffffffff80003034:	b8 89 ff ff ff       	mov    $0xffffff89,%eax
ffffffff80003039:	be 89 00 00 00       	mov    $0x89,%esi
ffffffff8000303e:	e9 4d ea ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00ea: return 136;
ffffffff80003043:	b8 88 ff ff ff       	mov    $0xffffff88,%eax
ffffffff80003048:	be 88 00 00 00       	mov    $0x88,%esi
ffffffff8000304d:	e9 3e ea ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00e9: return 130;
ffffffff80003052:	b8 82 ff ff ff       	mov    $0xffffff82,%eax
ffffffff80003057:	be 82 00 00 00       	mov    $0x82,%esi
ffffffff8000305c:	e9 2f ea ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00e8: return 138;
ffffffff80003061:	b8 8a ff ff ff       	mov    $0xffffff8a,%eax
ffffffff80003066:	be 8a 00 00 00       	mov    $0x8a,%esi
ffffffff8000306b:	e9 20 ea ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00e7: return 135;
ffffffff80003070:	b8 87 ff ff ff       	mov    $0xffffff87,%eax
ffffffff80003075:	be 87 00 00 00       	mov    $0x87,%esi
ffffffff8000307a:	e9 11 ea ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00e6: return 145;
ffffffff8000307f:	b8 91 ff ff ff       	mov    $0xffffff91,%eax
ffffffff80003084:	be 91 00 00 00       	mov    $0x91,%esi
ffffffff80003089:	e9 02 ea ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00e5: return 134;
ffffffff8000308e:	b8 86 ff ff ff       	mov    $0xffffff86,%eax
ffffffff80003093:	be 86 00 00 00       	mov    $0x86,%esi
ffffffff80003098:	e9 f3 e9 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00e4: return 132;
ffffffff8000309d:	b8 84 ff ff ff       	mov    $0xffffff84,%eax
ffffffff800030a2:	be 84 00 00 00       	mov    $0x84,%esi
ffffffff800030a7:	e9 e4 e9 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00e3: return 0x61;
ffffffff800030ac:	b8 61 00 00 00       	mov    $0x61,%eax
ffffffff800030b1:	be 61 00 00 00       	mov    $0x61,%esi
ffffffff800030b6:	e9 d5 e9 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00e2: return 131;
ffffffff800030bb:	b8 83 ff ff ff       	mov    $0xffffff83,%eax
ffffffff800030c0:	be 83 00 00 00       	mov    $0x83,%esi
ffffffff800030c5:	e9 c6 e9 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00e1: return 160;
ffffffff800030ca:	b8 a0 ff ff ff       	mov    $0xffffffa0,%eax
ffffffff800030cf:	be a0 00 00 00       	mov    $0xa0,%esi
ffffffff800030d4:	e9 b7 e9 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00e0: return 133;
ffffffff800030d9:	b8 85 ff ff ff       	mov    $0xffffff85,%eax
ffffffff800030de:	be 85 00 00 00       	mov    $0x85,%esi
ffffffff800030e3:	e9 a8 e9 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00c7: return 128;
ffffffff800030e8:	b8 80 ff ff ff       	mov    $0xffffff80,%eax
ffffffff800030ed:	be 80 00 00 00       	mov    $0x80,%esi
ffffffff800030f2:	e9 99 e9 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00c6: return 146;
ffffffff800030f7:	b8 92 ff ff ff       	mov    $0xffffff92,%eax
ffffffff800030fc:	be 92 00 00 00       	mov    $0x92,%esi
ffffffff80003101:	e9 8a e9 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00c4: return 142;
ffffffff80003106:	b8 8e ff ff ff       	mov    $0xffffff8e,%eax
ffffffff8000310b:	be 8e 00 00 00       	mov    $0x8e,%esi
ffffffff80003110:	e9 7b e9 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00a3: return 156;
ffffffff80003115:	b8 9c ff ff ff       	mov    $0xffffff9c,%eax
ffffffff8000311a:	be 9c 00 00 00       	mov    $0x9c,%esi
ffffffff8000311f:	e9 6c e9 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00a2: return 155;
ffffffff80003124:	b8 9b ff ff ff       	mov    $0xffffff9b,%eax
ffffffff80003129:	be 9b 00 00 00       	mov    $0x9b,%esi
ffffffff8000312e:	e9 5d e9 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00a1: return 173;
ffffffff80003133:	b8 ad ff ff ff       	mov    $0xffffffad,%eax
ffffffff80003138:	be ad 00 00 00       	mov    $0xad,%esi
ffffffff8000313d:	e9 4e e9 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00ac: return 170;
ffffffff80003142:	b8 aa ff ff ff       	mov    $0xffffffaa,%eax
ffffffff80003147:	be aa 00 00 00       	mov    $0xaa,%esi
ffffffff8000314c:	e9 3f e9 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00ab: return 174;
ffffffff80003151:	b8 ae ff ff ff       	mov    $0xffffffae,%eax
ffffffff80003156:	be ae 00 00 00       	mov    $0xae,%esi
ffffffff8000315b:	e9 30 e9 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00aa: return 166;
ffffffff80003160:	b8 a6 ff ff ff       	mov    $0xffffffa6,%eax
ffffffff80003165:	be a6 00 00 00       	mov    $0xa6,%esi
ffffffff8000316a:	e9 21 e9 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00a9: return 0x43;
ffffffff8000316f:	b8 43 00 00 00       	mov    $0x43,%eax
ffffffff80003174:	be 43 00 00 00       	mov    $0x43,%esi
ffffffff80003179:	e9 12 e9 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00a6: return 0x7c;
ffffffff8000317e:	b8 7c 00 00 00       	mov    $0x7c,%eax
ffffffff80003183:	be 7c 00 00 00       	mov    $0x7c,%esi
ffffffff80003188:	e9 03 e9 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00a5: return 157;
ffffffff8000318d:	b8 9d ff ff ff       	mov    $0xffffff9d,%eax
ffffffff80003192:	be 9d 00 00 00       	mov    $0x9d,%esi
ffffffff80003197:	e9 f4 e8 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000319c:	b8 19 00 00 00       	mov    $0x19,%eax
        case 0x2193: return 25;
ffffffff800031a1:	be 19 00 00 00       	mov    $0x19,%esi
ffffffff800031a6:	e9 e5 e8 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800031ab:	b8 1a 00 00 00       	mov    $0x1a,%eax
        case 0x2192: return 26;
ffffffff800031b0:	be 1a 00 00 00       	mov    $0x1a,%esi
ffffffff800031b5:	e9 d6 e8 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800031ba:	b8 18 00 00 00       	mov    $0x18,%eax
        case 0x2191: return 24;
ffffffff800031bf:	be 18 00 00 00       	mov    $0x18,%esi
ffffffff800031c4:	e9 c7 e8 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800031c9:	b8 1b 00 00 00       	mov    $0x1b,%eax
        case 0x2190: return 27;
ffffffff800031ce:	be 1b 00 00 00       	mov    $0x1b,%esi
ffffffff800031d3:	e9 b8 e8 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00bb: return 175;
ffffffff800031d8:	b8 af ff ff ff       	mov    $0xffffffaf,%eax
ffffffff800031dd:	be af 00 00 00       	mov    $0xaf,%esi
ffffffff800031e2:	e9 a9 e8 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00ba: return 167;
ffffffff800031e7:	b8 a7 ff ff ff       	mov    $0xffffffa7,%eax
ffffffff800031ec:	be a7 00 00 00       	mov    $0xa7,%esi
ffffffff800031f1:	e9 9a e8 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00b8: return 0x2c;
ffffffff800031f6:	b8 2c 00 00 00       	mov    $0x2c,%eax
ffffffff800031fb:	be 2c 00 00 00       	mov    $0x2c,%esi
ffffffff80003200:	e9 8b e8 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00b2: return 253;
ffffffff80003205:	b8 fd ff ff ff       	mov    $0xfffffffd,%eax
ffffffff8000320a:	be fd 00 00 00       	mov    $0xfd,%esi
ffffffff8000320f:	e9 7c e8 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00b1: return 241;
ffffffff80003214:	b8 f1 ff ff ff       	mov    $0xfffffff1,%eax
ffffffff80003219:	be f1 00 00 00       	mov    $0xf1,%esi
ffffffff8000321e:	e9 6d e8 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00b0: return 248;
ffffffff80003223:	b8 f8 ff ff ff       	mov    $0xfffffff8,%eax
ffffffff80003228:	be f8 00 00 00       	mov    $0xf8,%esi
ffffffff8000322d:	e9 5e e8 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00ae: return 0x52;
ffffffff80003232:	b8 52 00 00 00       	mov    $0x52,%eax
ffffffff80003237:	be 52 00 00 00       	mov    $0x52,%esi
ffffffff8000323c:	e9 4f e8 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80003241:	48 81 ea 73 25 00 00 	sub    $0x2573,%rdx
ffffffff80003248:	b8 01 00 00 00       	mov    $0x1,%eax
ffffffff8000324d:	89 d1                	mov    %edx,%ecx
ffffffff8000324f:	48 d3 e0             	shl    %cl,%rax
ffffffff80003252:	a9 aa 0a 00 00       	test   $0xaaa,%eax
ffffffff80003257:	0f 85 4a 11 00 00    	jne    ffffffff800043a7 <flanterm_write+0x2c67>
ffffffff8000325d:	a9 54 05 00 00       	test   $0x554,%eax
ffffffff80003262:	0f 85 30 11 00 00    	jne    ffffffff80004398 <flanterm_write+0x2c58>
ffffffff80003268:	b8 58 00 00 00       	mov    $0x58,%eax
        case 0x2573: return 0x58; // ╳ → X
ffffffff8000326d:	be 58 00 00 00       	mov    $0x58,%esi
ffffffff80003272:	e9 19 e8 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80003277:	48 8d 8a 4e da ff ff 	lea    -0x25b2(%rdx),%rcx
ffffffff8000327e:	48 83 f9 0d          	cmp    $0xd,%rcx
ffffffff80003282:	0f 87 d5 f8 ff ff    	ja     ffffffff80002b5d <flanterm_write+0x141d>
ffffffff80003288:	b8 01 00 00 00       	mov    $0x1,%eax
ffffffff8000328d:	48 d3 e0             	shl    %cl,%rax
ffffffff80003290:	48 89 c1             	mov    %rax,%rcx
ffffffff80003293:	a9 b0 01 00 00       	test   $0x1b0,%eax
ffffffff80003298:	0f 85 e8 11 00 00    	jne    ffffffff80004486 <flanterm_write+0x2d46>
ffffffff8000329e:	f6 c4 2c             	test   $0x2c,%ah
ffffffff800032a1:	0f 85 d0 11 00 00    	jne    ffffffff80004477 <flanterm_write+0x2d37>
ffffffff800032a7:	80 e1 0b             	and    $0xb,%cl
ffffffff800032aa:	b8 1e 00 00 00       	mov    $0x1e,%eax
        case 0x25b2: return 30;
ffffffff800032af:	be 1e 00 00 00       	mov    $0x1e,%esi
    switch (code_point) {
ffffffff800032b4:	0f 85 d6 e7 ff ff    	jne    ffffffff80001a90 <flanterm_write+0x350>
            int replacement_width = mk_wcwidth(ctx->code_point);
ffffffff800032ba:	89 d1                	mov    %edx,%ecx
  if (ucs < table[0].first || ucs > table[max].last)
ffffffff800032bc:	e9 be ed ff ff       	jmp    ffffffff8000207f <flanterm_write+0x93f>
    switch (code_point) {
ffffffff800032c1:	b8 16 00 00 00       	mov    $0x16,%eax
        case 0x25ac: return 22;
ffffffff800032c6:	be 16 00 00 00       	mov    $0x16,%esi
ffffffff800032cb:	e9 c0 e7 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00ff: return 152;
ffffffff800032d0:	b8 98 ff ff ff       	mov    $0xffffff98,%eax
ffffffff800032d5:	be 98 00 00 00       	mov    $0x98,%esi
ffffffff800032da:	e9 b1 e7 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00fd: return 0x79;
ffffffff800032df:	b8 79 00 00 00       	mov    $0x79,%eax
ffffffff800032e4:	be 79 00 00 00       	mov    $0x79,%esi
ffffffff800032e9:	e9 a2 e7 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00fc: return 129;
ffffffff800032ee:	b8 81 ff ff ff       	mov    $0xffffff81,%eax
ffffffff800032f3:	be 81 00 00 00       	mov    $0x81,%esi
ffffffff800032f8:	e9 93 e7 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00fb: return 150;
ffffffff800032fd:	b8 96 ff ff ff       	mov    $0xffffff96,%eax
ffffffff80003302:	be 96 00 00 00       	mov    $0x96,%esi
ffffffff80003307:	e9 84 e7 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00fa: return 163;
ffffffff8000330c:	b8 a3 ff ff ff       	mov    $0xffffffa3,%eax
ffffffff80003311:	be a3 00 00 00       	mov    $0xa3,%esi
ffffffff80003316:	e9 75 e7 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00f9: return 151;
ffffffff8000331b:	b8 97 ff ff ff       	mov    $0xffffff97,%eax
ffffffff80003320:	be 97 00 00 00       	mov    $0x97,%esi
ffffffff80003325:	e9 66 e7 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00f7: return 246;
ffffffff8000332a:	b8 f6 ff ff ff       	mov    $0xfffffff6,%eax
ffffffff8000332f:	be f6 00 00 00       	mov    $0xf6,%esi
ffffffff80003334:	e9 57 e7 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00f6: return 148;
ffffffff80003339:	b8 94 ff ff ff       	mov    $0xffffff94,%eax
ffffffff8000333e:	be 94 00 00 00       	mov    $0x94,%esi
ffffffff80003343:	e9 48 e7 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00f5: return 0x6f;
ffffffff80003348:	b8 6f 00 00 00       	mov    $0x6f,%eax
ffffffff8000334d:	be 6f 00 00 00       	mov    $0x6f,%esi
ffffffff80003352:	e9 39 e7 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00f4: return 147;
ffffffff80003357:	b8 93 ff ff ff       	mov    $0xffffff93,%eax
ffffffff8000335c:	be 93 00 00 00       	mov    $0x93,%esi
ffffffff80003361:	e9 2a e7 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00f3: return 162;
ffffffff80003366:	b8 a2 ff ff ff       	mov    $0xffffffa2,%eax
ffffffff8000336b:	be a2 00 00 00       	mov    $0xa2,%esi
ffffffff80003370:	e9 1b e7 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00f2: return 149;
ffffffff80003375:	b8 95 ff ff ff       	mov    $0xffffff95,%eax
ffffffff8000337a:	be 95 00 00 00       	mov    $0x95,%esi
ffffffff8000337f:	e9 0c e7 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00f1: return 164;
ffffffff80003384:	b8 a4 ff ff ff       	mov    $0xffffffa4,%eax
ffffffff80003389:	be a4 00 00 00       	mov    $0xa4,%esi
ffffffff8000338e:	e9 fd e6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00ef: return 139;
ffffffff80003393:	b8 8b ff ff ff       	mov    $0xffffff8b,%eax
ffffffff80003398:	be 8b 00 00 00       	mov    $0x8b,%esi
ffffffff8000339d:	e9 ee e6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x266a: return 13;
ffffffff800033a2:	b8 0d 00 00 00       	mov    $0xd,%eax
ffffffff800033a7:	be 0d 00 00 00       	mov    $0xd,%esi
ffffffff800033ac:	e9 df e6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2663: return 5;
ffffffff800033b1:	b8 05 00 00 00       	mov    $0x5,%eax
ffffffff800033b6:	be 05 00 00 00       	mov    $0x5,%esi
ffffffff800033bb:	e9 d0 e6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2660: return 6;
ffffffff800033c0:	b8 06 00 00 00       	mov    $0x6,%eax
ffffffff800033c5:	be 06 00 00 00       	mov    $0x6,%esi
ffffffff800033ca:	e9 c1 e6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2642: return 11;
ffffffff800033cf:	b8 0b 00 00 00       	mov    $0xb,%eax
ffffffff800033d4:	be 0b 00 00 00       	mov    $0xb,%esi
ffffffff800033d9:	e9 b2 e6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2640: return 12;
ffffffff800033de:	b8 0c 00 00 00       	mov    $0xc,%eax
ffffffff800033e3:	be 0c 00 00 00       	mov    $0xc,%esi
ffffffff800033e8:	e9 a3 e6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x25d8: return 8;
ffffffff800033ed:	b8 08 00 00 00       	mov    $0x8,%eax
ffffffff800033f2:	be 08 00 00 00       	mov    $0x8,%esi
ffffffff800033f7:	e9 94 e6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800033fc:	b8 09 00 00 00       	mov    $0x9,%eax
        case 0x25cb: return 9;
ffffffff80003401:	be 09 00 00 00       	mov    $0x9,%esi
ffffffff80003406:	e9 85 e6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000340b:	b8 0a 00 00 00       	mov    $0xa,%eax
        case 0x25d9: return 10;
ffffffff80003410:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80003415:	e9 76 e6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000341a:	b8 04 00 00 00       	mov    $0x4,%eax
        case 0x2666: return 4;
ffffffff8000341f:	be 04 00 00 00       	mov    $0x4,%esi
ffffffff80003424:	e9 67 e6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 'n': FLANTERM_DEC_SPCL_PRN(0xc5)
ffffffff80003429:	66 41 c7 84 24 c8 01 	movw   $0x1c5,0x1c8(%r12)
ffffffff80003430:	00 00 c5 01 
ffffffff80003434:	be c5 00 00 00       	mov    $0xc5,%esi
ffffffff80003439:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000343c:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80003443:	00 
ffffffff80003444:	e9 f7 e3 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case 'm': FLANTERM_DEC_SPCL_PRN(0xc0)
ffffffff80003449:	66 41 c7 84 24 c8 01 	movw   $0x1c0,0x1c8(%r12)
ffffffff80003450:	00 00 c0 01 
ffffffff80003454:	be c0 00 00 00       	mov    $0xc0,%esi
ffffffff80003459:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000345c:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80003463:	00 
ffffffff80003464:	e9 d7 e3 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case 'l': FLANTERM_DEC_SPCL_PRN(0xda)
ffffffff80003469:	66 41 c7 84 24 c8 01 	movw   $0x1da,0x1c8(%r12)
ffffffff80003470:	00 00 da 01 
ffffffff80003474:	be da 00 00 00       	mov    $0xda,%esi
ffffffff80003479:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000347c:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80003483:	00 
ffffffff80003484:	e9 b7 e3 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case 'k': FLANTERM_DEC_SPCL_PRN(0xbf)
ffffffff80003489:	66 41 c7 84 24 c8 01 	movw   $0x1bf,0x1c8(%r12)
ffffffff80003490:	00 00 bf 01 
ffffffff80003494:	be bf 00 00 00       	mov    $0xbf,%esi
ffffffff80003499:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000349c:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff800034a3:	00 
ffffffff800034a4:	e9 97 e3 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case 'j': FLANTERM_DEC_SPCL_PRN(0xd9)
ffffffff800034a9:	66 41 c7 84 24 c8 01 	movw   $0x1d9,0x1c8(%r12)
ffffffff800034b0:	00 00 d9 01 
ffffffff800034b4:	be d9 00 00 00       	mov    $0xd9,%esi
ffffffff800034b9:	4c 89 e7             	mov    %r12,%rdi
ffffffff800034bc:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff800034c3:	00 
ffffffff800034c4:	e9 77 e3 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case 'h': FLANTERM_DEC_SPCL_PRN(0xb0)
ffffffff800034c9:	66 41 c7 84 24 c8 01 	movw   $0x1b0,0x1c8(%r12)
ffffffff800034d0:	00 00 b0 01 
ffffffff800034d4:	be b0 00 00 00       	mov    $0xb0,%esi
ffffffff800034d9:	4c 89 e7             	mov    %r12,%rdi
ffffffff800034dc:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff800034e3:	00 
ffffffff800034e4:	e9 57 e3 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case 'g': FLANTERM_DEC_SPCL_PRN(0xf1)
ffffffff800034e9:	66 41 c7 84 24 c8 01 	movw   $0x1f1,0x1c8(%r12)
ffffffff800034f0:	00 00 f1 01 
ffffffff800034f4:	be f1 00 00 00       	mov    $0xf1,%esi
ffffffff800034f9:	4c 89 e7             	mov    %r12,%rdi
ffffffff800034fc:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80003503:	00 
ffffffff80003504:	e9 37 e3 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case 'f': FLANTERM_DEC_SPCL_PRN(0xf8)
ffffffff80003509:	66 41 c7 84 24 c8 01 	movw   $0x1f8,0x1c8(%r12)
ffffffff80003510:	00 00 f8 01 
ffffffff80003514:	be f8 00 00 00       	mov    $0xf8,%esi
ffffffff80003519:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000351c:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80003523:	00 
ffffffff80003524:	e9 17 e3 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case 'a': FLANTERM_DEC_SPCL_PRN(0xb1)
ffffffff80003529:	66 41 c7 84 24 c8 01 	movw   $0x1b1,0x1c8(%r12)
ffffffff80003530:	00 00 b1 01 
ffffffff80003534:	be b1 00 00 00       	mov    $0xb1,%esi
ffffffff80003539:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000353c:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80003543:	00 
ffffffff80003544:	e9 f7 e2 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case '`': FLANTERM_DEC_SPCL_PRN(0x04)
ffffffff80003549:	66 41 c7 84 24 c8 01 	movw   $0x104,0x1c8(%r12)
ffffffff80003550:	00 00 04 01 
ffffffff80003554:	be 04 00 00 00       	mov    $0x4,%esi
ffffffff80003559:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000355c:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80003563:	00 
ffffffff80003564:	e9 d7 e2 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case '_': FLANTERM_DEC_SPCL_PRN(0xff)
ffffffff80003569:	66 41 c7 84 24 c8 01 	movw   $0x1ff,0x1c8(%r12)
ffffffff80003570:	00 00 ff 01 
ffffffff80003574:	be ff 00 00 00       	mov    $0xff,%esi
ffffffff80003579:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000357c:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80003583:	00 
ffffffff80003584:	e9 b7 e2 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case '0': FLANTERM_DEC_SPCL_PRN(0xdb)
ffffffff80003589:	66 41 c7 84 24 c8 01 	movw   $0x1db,0x1c8(%r12)
ffffffff80003590:	00 00 db 01 
ffffffff80003594:	be db 00 00 00       	mov    $0xdb,%esi
ffffffff80003599:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000359c:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff800035a3:	00 
ffffffff800035a4:	e9 97 e2 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case '.': FLANTERM_DEC_SPCL_PRN(0x19)
ffffffff800035a9:	66 41 c7 84 24 c8 01 	movw   $0x119,0x1c8(%r12)
ffffffff800035b0:	00 00 19 01 
ffffffff800035b4:	be 19 00 00 00       	mov    $0x19,%esi
ffffffff800035b9:	4c 89 e7             	mov    %r12,%rdi
ffffffff800035bc:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff800035c3:	00 
ffffffff800035c4:	e9 77 e2 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case '-': FLANTERM_DEC_SPCL_PRN(0x18)
ffffffff800035c9:	66 41 c7 84 24 c8 01 	movw   $0x118,0x1c8(%r12)
ffffffff800035d0:	00 00 18 01 
ffffffff800035d4:	be 18 00 00 00       	mov    $0x18,%esi
ffffffff800035d9:	4c 89 e7             	mov    %r12,%rdi
ffffffff800035dc:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff800035e3:	00 
ffffffff800035e4:	e9 57 e2 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case ',': FLANTERM_DEC_SPCL_PRN(0x1b)
ffffffff800035e9:	66 41 c7 84 24 c8 01 	movw   $0x11b,0x1c8(%r12)
ffffffff800035f0:	00 00 1b 01 
ffffffff800035f4:	be 1b 00 00 00       	mov    $0x1b,%esi
ffffffff800035f9:	4c 89 e7             	mov    %r12,%rdi
ffffffff800035fc:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80003603:	00 
ffffffff80003604:	e9 37 e2 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case '+': FLANTERM_DEC_SPCL_PRN(0x1a)
ffffffff80003609:	66 41 c7 84 24 c8 01 	movw   $0x11a,0x1c8(%r12)
ffffffff80003610:	00 00 1a 01 
ffffffff80003614:	be 1a 00 00 00       	mov    $0x1a,%esi
ffffffff80003619:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000361c:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80003623:	00 
ffffffff80003624:	e9 17 e2 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case 0x00d1: return 165;
ffffffff80003629:	b8 a5 ff ff ff       	mov    $0xffffffa5,%eax
ffffffff8000362e:	be a5 00 00 00       	mov    $0xa5,%esi
ffffffff80003633:	e9 58 e4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00d0: return 0x44;
ffffffff80003638:	b8 44 00 00 00       	mov    $0x44,%eax
ffffffff8000363d:	be 44 00 00 00       	mov    $0x44,%esi
ffffffff80003642:	e9 49 e4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2265: return 242;
ffffffff80003647:	b8 f2 ff ff ff       	mov    $0xfffffff2,%eax
ffffffff8000364c:	be f2 00 00 00       	mov    $0xf2,%esi
ffffffff80003651:	e9 3a e4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2264: return 243;
ffffffff80003656:	b8 f3 ff ff ff       	mov    $0xfffffff3,%eax
ffffffff8000365b:	be f3 00 00 00       	mov    $0xf3,%esi
ffffffff80003660:	e9 2b e4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2261: return 240;
ffffffff80003665:	b8 f0 ff ff ff       	mov    $0xfffffff0,%eax
ffffffff8000366a:	be f0 00 00 00       	mov    $0xf0,%esi
ffffffff8000366f:	e9 1c e4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2248: return 247;
ffffffff80003674:	b8 f7 ff ff ff       	mov    $0xfffffff7,%eax
ffffffff80003679:	be f7 00 00 00       	mov    $0xf7,%esi
ffffffff8000367e:	e9 0d e4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2229: return 239;
ffffffff80003683:	b8 ef ff ff ff       	mov    $0xffffffef,%eax
ffffffff80003688:	be ef 00 00 00       	mov    $0xef,%esi
ffffffff8000368d:	e9 fe e3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2219: return 249;
ffffffff80003692:	b8 f9 ff ff ff       	mov    $0xfffffff9,%eax
ffffffff80003697:	be f9 00 00 00       	mov    $0xf9,%esi
ffffffff8000369c:	e9 ef e3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x256b: return 215;
ffffffff800036a1:	b8 d7 ff ff ff       	mov    $0xffffffd7,%eax
ffffffff800036a6:	be d7 00 00 00       	mov    $0xd7,%esi
ffffffff800036ab:	e9 e0 e3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x256a: return 216;
ffffffff800036b0:	b8 d8 ff ff ff       	mov    $0xffffffd8,%eax
ffffffff800036b5:	be d8 00 00 00       	mov    $0xd8,%esi
ffffffff800036ba:	e9 d1 e3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2569: return 202;
ffffffff800036bf:	b8 ca ff ff ff       	mov    $0xffffffca,%eax
ffffffff800036c4:	be ca 00 00 00       	mov    $0xca,%esi
ffffffff800036c9:	e9 c2 e3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2568: return 208;
ffffffff800036ce:	b8 d0 ff ff ff       	mov    $0xffffffd0,%eax
ffffffff800036d3:	be d0 00 00 00       	mov    $0xd0,%esi
ffffffff800036d8:	e9 b3 e3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00bd: return 171;
ffffffff800036dd:	b8 ab ff ff ff       	mov    $0xffffffab,%eax
ffffffff800036e2:	be ab 00 00 00       	mov    $0xab,%esi
ffffffff800036e7:	e9 a4 e3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00bc: return 172;
ffffffff800036ec:	b8 ac ff ff ff       	mov    $0xffffffac,%eax
ffffffff800036f1:	be ac 00 00 00       	mov    $0xac,%esi
ffffffff800036f6:	e9 95 e3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00d7: return 0x78;
ffffffff800036fb:	b8 78 00 00 00       	mov    $0x78,%eax
ffffffff80003700:	be 78 00 00 00       	mov    $0x78,%esi
ffffffff80003705:	e9 86 e3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00d6: return 153;
ffffffff8000370a:	b8 99 ff ff ff       	mov    $0xffffff99,%eax
ffffffff8000370f:	be 99 00 00 00       	mov    $0x99,%esi
ffffffff80003714:	e9 77 e3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00bf: return 168;
ffffffff80003719:	b8 a8 ff ff ff       	mov    $0xffffffa8,%eax
ffffffff8000371e:	be a8 00 00 00       	mov    $0xa8,%esi
ffffffff80003723:	e9 68 e3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00dd: return 0x59;
ffffffff80003728:	b8 59 00 00 00       	mov    $0x59,%eax
ffffffff8000372d:	be 59 00 00 00       	mov    $0x59,%esi
ffffffff80003732:	e9 59 e3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00dc: return 154;
ffffffff80003737:	b8 9a ff ff ff       	mov    $0xffffff9a,%eax
ffffffff8000373c:	be 9a 00 00 00       	mov    $0x9a,%esi
ffffffff80003741:	e9 4a e3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x2571: return 0x2f; // ╱ → /
ffffffff80003746:	b8 2f 00 00 00       	mov    $0x2f,%eax
ffffffff8000374b:	be 2f 00 00 00       	mov    $0x2f,%esi
ffffffff80003750:	e9 3b e3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x256c: return 206;
ffffffff80003755:	b8 ce ff ff ff       	mov    $0xffffffce,%eax
ffffffff8000375a:	be ce 00 00 00       	mov    $0xce,%esi
ffffffff8000375f:	e9 2c e3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00a0: return 255;
ffffffff80003764:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
ffffffff80003769:	be ff 00 00 00       	mov    $0xff,%esi
ffffffff8000376e:	e9 1d e3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x266b: return 14;
ffffffff80003773:	b8 0e 00 00 00       	mov    $0xe,%eax
ffffffff80003778:	be 0e 00 00 00       	mov    $0xe,%esi
ffffffff8000377d:	e9 0e e3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case 0x00c9: return 144;
ffffffff80003782:	b8 90 ff ff ff       	mov    $0xffffff90,%eax
ffffffff80003787:	be 90 00 00 00       	mov    $0x90,%esi
ffffffff8000378c:	e9 ff e2 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
        case '~': FLANTERM_DEC_SPCL_PRN(0xfa)
ffffffff80003791:	66 41 c7 84 24 c8 01 	movw   $0x1fa,0x1c8(%r12)
ffffffff80003798:	00 00 fa 01 
ffffffff8000379c:	be fa 00 00 00       	mov    $0xfa,%esi
ffffffff800037a1:	4c 89 e7             	mov    %r12,%rdi
ffffffff800037a4:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff800037ab:	00 
ffffffff800037ac:	e9 8f e0 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case '}': FLANTERM_DEC_SPCL_PRN(0x9c)
ffffffff800037b1:	66 41 c7 84 24 c8 01 	movw   $0x19c,0x1c8(%r12)
ffffffff800037b8:	00 00 9c 01 
ffffffff800037bc:	be 9c 00 00 00       	mov    $0x9c,%esi
ffffffff800037c1:	4c 89 e7             	mov    %r12,%rdi
ffffffff800037c4:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff800037cb:	00 
ffffffff800037cc:	e9 6f e0 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case '{': FLANTERM_DEC_SPCL_PRN(0xe3)
ffffffff800037d1:	66 41 c7 84 24 c8 01 	movw   $0x1e3,0x1c8(%r12)
ffffffff800037d8:	00 00 e3 01 
ffffffff800037dc:	be e3 00 00 00       	mov    $0xe3,%esi
ffffffff800037e1:	4c 89 e7             	mov    %r12,%rdi
ffffffff800037e4:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff800037eb:	00 
ffffffff800037ec:	e9 4f e0 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
        case 'z': FLANTERM_DEC_SPCL_PRN(0xf2)
ffffffff800037f1:	66 41 c7 84 24 c8 01 	movw   $0x1f2,0x1c8(%r12)
ffffffff800037f8:	00 00 f2 01 
ffffffff800037fc:	be f2 00 00 00       	mov    $0xf2,%esi
ffffffff80003801:	4c 89 e7             	mov    %r12,%rdi
ffffffff80003804:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff8000380b:	00 
ffffffff8000380c:	e9 2f e0 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
    switch (code_point) {
ffffffff80003811:	b8 07 00 00 00       	mov    $0x7,%eax
        case 0x2022: return 7;
ffffffff80003816:	be 07 00 00 00       	mov    $0x7,%esi
ffffffff8000381b:	e9 70 e2 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80003820:	b8 11 00 00 00       	mov    $0x11,%eax
        case 0x25c4: return 17;
ffffffff80003825:	be 11 00 00 00       	mov    $0x11,%esi
ffffffff8000382a:	e9 61 e2 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000382f:	b8 e8 ff ff ff       	mov    $0xffffffe8,%eax
        case 0x03a6: return 232;
ffffffff80003834:	be e8 00 00 00       	mov    $0xe8,%esi
ffffffff80003839:	e9 52 e2 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000383e:	b8 b3 ff ff ff       	mov    $0xffffffb3,%eax
        case 0x2502: return 179;
ffffffff80003843:	be b3 00 00 00       	mov    $0xb3,%esi
ffffffff80003848:	e9 43 e2 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000384d:	b8 b0 ff ff ff       	mov    $0xffffffb0,%eax
        if (n <= 2) return 0xb0; // ░
ffffffff80003852:	be b0 00 00 00       	mov    $0xb0,%esi
ffffffff80003857:	e9 34 e2 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000385c:	b8 de ff ff ff       	mov    $0xffffffde,%eax
        if (has_right && !has_left) return 0xde; // ▐
ffffffff80003861:	be de 00 00 00       	mov    $0xde,%esi
ffffffff80003866:	e9 25 e2 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
            ctx->get_cursor_pos(ctx, &ctx->saved_cursor_x, &ctx->saved_cursor_y);
ffffffff8000386b:	49 8d 94 24 60 01 00 	lea    0x160(%r12),%rdx
ffffffff80003872:	00 
ffffffff80003873:	49 8d b4 24 58 01 00 	lea    0x158(%r12),%rsi
ffffffff8000387a:	00 
ffffffff8000387b:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000387e:	41 ff 94 24 18 02 00 	call   *0x218(%r12)
ffffffff80003885:	00 
            break;
ffffffff80003886:	e9 21 f2 ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
            ctx->scroll_bottom_margin = ctx->rows;
ffffffff8000388b:	49 8b 94 24 f0 01 00 	mov    0x1f0(%r12),%rdx
ffffffff80003892:	00 
            if (ctx->esc_values_i > 0) {
ffffffff80003893:	49 8b 84 24 50 01 00 	mov    0x150(%r12),%rax
ffffffff8000389a:	00 
            ctx->scroll_top_margin = 0;
ffffffff8000389b:	31 ff                	xor    %edi,%edi
ffffffff8000389d:	49 89 bc 24 78 01 00 	mov    %rdi,0x178(%r12)
ffffffff800038a4:	00 
            ctx->scroll_bottom_margin = ctx->rows;
ffffffff800038a5:	49 89 94 24 80 01 00 	mov    %rdx,0x180(%r12)
ffffffff800038ac:	00 
            if (ctx->esc_values_i > 0) {
ffffffff800038ad:	48 85 c0             	test   %rax,%rax
ffffffff800038b0:	74 6b                	je     ffffffff8000391d <flanterm_write+0x21dd>
                ctx->scroll_top_margin = ctx->esc_values[0] - 1;
ffffffff800038b2:	41 8b 8c 24 88 01 00 	mov    0x188(%r12),%ecx
ffffffff800038b9:	00 
ffffffff800038ba:	83 e9 01             	sub    $0x1,%ecx
            if (ctx->esc_values_i > 1) {
ffffffff800038bd:	48 83 e8 01          	sub    $0x1,%rax
                ctx->scroll_top_margin = ctx->esc_values[0] - 1;
ffffffff800038c1:	49 89 8c 24 78 01 00 	mov    %rcx,0x178(%r12)
ffffffff800038c8:	00 
            if (ctx->esc_values_i > 1) {
ffffffff800038c9:	74 54                	je     ffffffff8000391f <flanterm_write+0x21df>
                ctx->scroll_bottom_margin = ctx->esc_values[1];
ffffffff800038cb:	41 8b 84 24 8c 01 00 	mov    0x18c(%r12),%eax
ffffffff800038d2:	00 
ffffffff800038d3:	49 89 84 24 80 01 00 	mov    %rax,0x180(%r12)
ffffffff800038da:	00 
            if (ctx->scroll_top_margin >= ctx->rows
ffffffff800038db:	48 39 d1             	cmp    %rdx,%rcx
ffffffff800038de:	73 05                	jae    ffffffff800038e5 <flanterm_write+0x21a5>
             || ctx->scroll_bottom_margin > ctx->rows
ffffffff800038e0:	48 39 c2             	cmp    %rax,%rdx
ffffffff800038e3:	73 42                	jae    ffffffff80003927 <flanterm_write+0x21e7>
                ctx->scroll_top_margin = 0;
ffffffff800038e5:	31 f6                	xor    %esi,%esi
                ctx->scroll_bottom_margin = ctx->rows;
ffffffff800038e7:	49 89 94 24 80 01 00 	mov    %rdx,0x180(%r12)
ffffffff800038ee:	00 
                ctx->scroll_top_margin = 0;
ffffffff800038ef:	49 89 b4 24 78 01 00 	mov    %rsi,0x178(%r12)
ffffffff800038f6:	00 
            ctx->set_cursor_pos(ctx, 0, ctx->origin_mode ? ctx->scroll_top_margin : 0);
ffffffff800038f7:	31 d2                	xor    %edx,%edx
ffffffff800038f9:	41 80 7c 24 0c 00    	cmpb   $0x0,0xc(%r12)
ffffffff800038ff:	49 8b 84 24 10 02 00 	mov    0x210(%r12),%rax
ffffffff80003906:	00 
ffffffff80003907:	74 08                	je     ffffffff80003911 <flanterm_write+0x21d1>
ffffffff80003909:	49 8b 94 24 78 01 00 	mov    0x178(%r12),%rdx
ffffffff80003910:	00 
ffffffff80003911:	31 f6                	xor    %esi,%esi
ffffffff80003913:	4c 89 e7             	mov    %r12,%rdi
ffffffff80003916:	ff d0                	call   *%rax
            break;
ffffffff80003918:	e9 8f f1 ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
ffffffff8000391d:	31 c9                	xor    %ecx,%ecx
             || ctx->scroll_bottom_margin > ctx->rows
ffffffff8000391f:	48 89 d0             	mov    %rdx,%rax
            if (ctx->scroll_top_margin >= ctx->rows
ffffffff80003922:	48 39 d1             	cmp    %rdx,%rcx
ffffffff80003925:	73 be                	jae    ffffffff800038e5 <flanterm_write+0x21a5>
             || ctx->scroll_top_margin >= (ctx->scroll_bottom_margin - 1)) {
ffffffff80003927:	48 83 e8 01          	sub    $0x1,%rax
ffffffff8000392b:	48 39 c1             	cmp    %rax,%rcx
ffffffff8000392e:	73 b5                	jae    ffffffff800038e5 <flanterm_write+0x21a5>
ffffffff80003930:	eb c5                	jmp    ffffffff800038f7 <flanterm_write+0x21b7>
            if (ctx->callback != NULL) {
ffffffff80003932:	49 8b 84 24 b8 02 00 	mov    0x2b8(%r12),%rax
ffffffff80003939:	00 
ffffffff8000393a:	48 85 c0             	test   %rax,%rax
ffffffff8000393d:	0f 84 69 f1 ff ff    	je     ffffffff80002aac <flanterm_write+0x136c>
                ctx->callback(ctx, FLANTERM_CB_KBD_LEDS, ctx->esc_values[0], 0, 0);
ffffffff80003943:	41 8b 94 24 88 01 00 	mov    0x188(%r12),%edx
ffffffff8000394a:	00 
ffffffff8000394b:	45 31 c0             	xor    %r8d,%r8d
ffffffff8000394e:	31 c9                	xor    %ecx,%ecx
ffffffff80003950:	4c 89 e7             	mov    %r12,%rdi
ffffffff80003953:	be 3c 00 00 00       	mov    $0x3c,%esi
ffffffff80003958:	ff d0                	call   *%rax
ffffffff8000395a:	e9 4d f1 ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
            switch (ctx->esc_values[0]) {
ffffffff8000395f:	41 8b 84 24 88 01 00 	mov    0x188(%r12),%eax
ffffffff80003966:	00 
ffffffff80003967:	83 f8 05             	cmp    $0x5,%eax
ffffffff8000396a:	74 55                	je     ffffffff800039c1 <flanterm_write+0x2281>
ffffffff8000396c:	83 f8 06             	cmp    $0x6,%eax
ffffffff8000396f:	0f 85 37 f1 ff ff    	jne    ffffffff80002aac <flanterm_write+0x136c>
                    if (ctx->callback != NULL) {
ffffffff80003975:	4d 8b 94 24 b8 02 00 	mov    0x2b8(%r12),%r10
ffffffff8000397c:	00 
ffffffff8000397d:	4d 85 d2             	test   %r10,%r10
ffffffff80003980:	0f 84 26 f1 ff ff    	je     ffffffff80002aac <flanterm_write+0x136c>
                            ? y - ctx->scroll_top_margin : y;
ffffffff80003986:	41 80 7c 24 0c 00    	cmpb   $0x0,0xc(%r12)
            if (ctx->esc_values[0] > y)
ffffffff8000398c:	48 8b 45 b8          	mov    -0x48(%rbp),%rax
                            ? y - ctx->scroll_top_margin : y;
ffffffff80003990:	74 10                	je     ffffffff800039a2 <flanterm_write+0x2262>
                        size_t report_y = ctx->origin_mode && y >= ctx->scroll_top_margin
ffffffff80003992:	49 8b 94 24 78 01 00 	mov    0x178(%r12),%rdx
ffffffff80003999:	00 
ffffffff8000399a:	48 39 d0             	cmp    %rdx,%rax
ffffffff8000399d:	72 03                	jb     ffffffff800039a2 <flanterm_write+0x2262>
                            ? y - ctx->scroll_top_margin : y;
ffffffff8000399f:	48 29 d0             	sub    %rdx,%rax
                        ctx->callback(ctx, FLANTERM_CB_POS_REPORT, x + 1, report_y + 1, 0);
ffffffff800039a2:	48 8d 48 01          	lea    0x1(%rax),%rcx
ffffffff800039a6:	48 8b 45 b0          	mov    -0x50(%rbp),%rax
ffffffff800039aa:	45 31 c0             	xor    %r8d,%r8d
ffffffff800039ad:	be 32 00 00 00       	mov    $0x32,%esi
ffffffff800039b2:	4c 89 e7             	mov    %r12,%rdi
ffffffff800039b5:	48 8d 50 01          	lea    0x1(%rax),%rdx
ffffffff800039b9:	41 ff d2             	call   *%r10
ffffffff800039bc:	e9 eb f0 ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
                    if (ctx->callback != NULL) {
ffffffff800039c1:	49 8b 84 24 b8 02 00 	mov    0x2b8(%r12),%rax
ffffffff800039c8:	00 
ffffffff800039c9:	48 85 c0             	test   %rax,%rax
ffffffff800039cc:	0f 84 da f0 ff ff    	je     ffffffff80002aac <flanterm_write+0x136c>
                        ctx->callback(ctx, FLANTERM_CB_STATUS_REPORT, 0, 0, 0);
ffffffff800039d2:	45 31 c0             	xor    %r8d,%r8d
ffffffff800039d5:	31 c9                	xor    %ecx,%ecx
ffffffff800039d7:	31 d2                	xor    %edx,%edx
ffffffff800039d9:	be 28 00 00 00       	mov    $0x28,%esi
ffffffff800039de:	4c 89 e7             	mov    %r12,%rdi
ffffffff800039e1:	ff d0                	call   *%rax
ffffffff800039e3:	e9 c4 f0 ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
    switch (code_point) {
ffffffff800039e8:	b8 0f 00 00 00       	mov    $0xf,%eax
        case 0x263c: return 15;
ffffffff800039ed:	be 0f 00 00 00       	mov    $0xf,%esi
ffffffff800039f2:	e9 99 e0 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800039f7:	b8 02 00 00 00       	mov    $0x2,%eax
ffffffff800039fc:	be 02 00 00 00       	mov    $0x2,%esi
ffffffff80003a01:	e9 8a e0 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
ffffffff80003a06:	b8 01 00 00 00       	mov    $0x1,%eax
ffffffff80003a0b:	be 01 00 00 00       	mov    $0x1,%esi
ffffffff80003a10:	e9 7b e0 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
ffffffff80003a15:	b8 fe ff ff ff       	mov    $0xfffffffe,%eax
        case 0x25a0: return 254;
ffffffff80003a1a:	be fe 00 00 00       	mov    $0xfe,%esi
ffffffff80003a1f:	e9 6c e0 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80003a24:	b8 df ff ff ff       	mov    $0xffffffdf,%eax
        if (has_top && !has_bottom) return 0xdf; // ▀
ffffffff80003a29:	be df 00 00 00       	mov    $0xdf,%esi
ffffffff80003a2e:	e9 5d e0 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80003a33:	b8 b1 ff ff ff       	mov    $0xffffffb1,%eax
        if (n <= 4) return 0xb1; // ▒
ffffffff80003a38:	be b1 00 00 00       	mov    $0xb1,%esi
ffffffff80003a3d:	e9 4e e0 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80003a42:	b8 b2 ff ff ff       	mov    $0xffffffb2,%eax
        if (n <= 6) return 0xb2; // ▓
ffffffff80003a47:	be b2 00 00 00       	mov    $0xb2,%esi
ffffffff80003a4c:	e9 3f e0 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80003a51:	b8 b3 ff ff ff       	mov    $0xffffffb3,%eax
        case 0x2502: return 179;
ffffffff80003a56:	be b3 00 00 00       	mov    $0xb3,%esi
ffffffff80003a5b:	e9 30 e0 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
            size_t region = ctx->scroll_bottom_margin - ctx->scroll_top_margin;
ffffffff80003a60:	49 8b 84 24 80 01 00 	mov    0x180(%r12),%rax
ffffffff80003a67:	00 
ffffffff80003a68:	49 2b 84 24 78 01 00 	sub    0x178(%r12),%rax
ffffffff80003a6f:	00 
ffffffff80003a70:	48 89 c2             	mov    %rax,%rdx
            size_t count = ctx->esc_values[0] > region ? region : ctx->esc_values[0];
ffffffff80003a73:	41 8b 84 24 88 01 00 	mov    0x188(%r12),%eax
ffffffff80003a7a:	00 
ffffffff80003a7b:	48 39 c2             	cmp    %rax,%rdx
ffffffff80003a7e:	48 0f 46 c2          	cmovbe %rdx,%rax
ffffffff80003a82:	49 89 c6             	mov    %rax,%r14
            for (size_t i = 0; i < count; i++) {
ffffffff80003a85:	48 85 c0             	test   %rax,%rax
ffffffff80003a88:	0f 84 1e f0 ff ff    	je     ffffffff80002aac <flanterm_write+0x136c>
ffffffff80003a8e:	45 31 ff             	xor    %r15d,%r15d
ffffffff80003a91:	49 83 c7 01          	add    $0x1,%r15
                ctx->scroll(ctx);
ffffffff80003a95:	4c 89 e7             	mov    %r12,%rdi
ffffffff80003a98:	41 ff 94 24 78 02 00 	call   *0x278(%r12)
ffffffff80003a9f:	00 
            for (size_t i = 0; i < count; i++) {
ffffffff80003aa0:	4d 39 fe             	cmp    %r15,%r14
ffffffff80003aa3:	75 ec                	jne    ffffffff80003a91 <flanterm_write+0x2351>
ffffffff80003aa5:	e9 02 f0 ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
            if (ctx->esc_values[0] > ctx->cols - x)
ffffffff80003aaa:	49 8b 84 24 f8 01 00 	mov    0x1f8(%r12),%rax
ffffffff80003ab1:	00 
ffffffff80003ab2:	48 8b 55 b0          	mov    -0x50(%rbp),%rdx
ffffffff80003ab6:	41 8b b4 24 88 01 00 	mov    0x188(%r12),%esi
ffffffff80003abd:	00 
ffffffff80003abe:	48 89 c1             	mov    %rax,%rcx
ffffffff80003ac1:	48 29 d1             	sub    %rdx,%rcx
ffffffff80003ac4:	48 39 f1             	cmp    %rsi,%rcx
ffffffff80003ac7:	73 0e                	jae    ffffffff80003ad7 <flanterm_write+0x2397>
                ctx->esc_values[0] = ctx->cols - x;
ffffffff80003ac9:	89 c1                	mov    %eax,%ecx
ffffffff80003acb:	29 d1                	sub    %edx,%ecx
ffffffff80003acd:	41 89 8c 24 88 01 00 	mov    %ecx,0x188(%r12)
ffffffff80003ad4:	00 
ffffffff80003ad5:	89 ce                	mov    %ecx,%esi
            for (size_t i = x + ctx->esc_values[0]; i < ctx->cols; i++)
ffffffff80003ad7:	4c 8d 34 16          	lea    (%rsi,%rdx,1),%r14
ffffffff80003adb:	49 39 c6             	cmp    %rax,%r14
ffffffff80003ade:	73 34                	jae    ffffffff80003b14 <flanterm_write+0x23d4>
                ctx->move_character(ctx, i - ctx->esc_values[0], y, i, y);
ffffffff80003ae0:	48 8b 55 b8          	mov    -0x48(%rbp),%rdx
ffffffff80003ae4:	4c 89 f6             	mov    %r14,%rsi
ffffffff80003ae7:	4c 89 f1             	mov    %r14,%rcx
ffffffff80003aea:	4c 89 e7             	mov    %r12,%rdi
ffffffff80003aed:	41 8b 84 24 88 01 00 	mov    0x188(%r12),%eax
ffffffff80003af4:	00 
            for (size_t i = x + ctx->esc_values[0]; i < ctx->cols; i++)
ffffffff80003af5:	49 83 c6 01          	add    $0x1,%r14
                ctx->move_character(ctx, i - ctx->esc_values[0], y, i, y);
ffffffff80003af9:	49 89 d0             	mov    %rdx,%r8
ffffffff80003afc:	48 29 c6             	sub    %rax,%rsi
ffffffff80003aff:	41 ff 94 24 70 02 00 	call   *0x270(%r12)
ffffffff80003b06:	00 
            for (size_t i = x + ctx->esc_values[0]; i < ctx->cols; i++)
ffffffff80003b07:	49 8b 84 24 f8 01 00 	mov    0x1f8(%r12),%rax
ffffffff80003b0e:	00 
ffffffff80003b0f:	49 39 c6             	cmp    %rax,%r14
ffffffff80003b12:	72 cc                	jb     ffffffff80003ae0 <flanterm_write+0x23a0>
            ctx->set_cursor_pos(ctx, ctx->cols - ctx->esc_values[0], y);
ffffffff80003b14:	41 8b 94 24 88 01 00 	mov    0x188(%r12),%edx
ffffffff80003b1b:	00 
ffffffff80003b1c:	4c 89 e7             	mov    %r12,%rdi
ffffffff80003b1f:	48 29 d0             	sub    %rdx,%rax
ffffffff80003b22:	48 8b 55 b8          	mov    -0x48(%rbp),%rdx
ffffffff80003b26:	48 89 c6             	mov    %rax,%rsi
ffffffff80003b29:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80003b30:	00 
            ctx->get_cursor_pos(ctx, &cx, &cy);
ffffffff80003b31:	48 8d 55 c8          	lea    -0x38(%rbp),%rdx
ffffffff80003b35:	48 8d 75 c0          	lea    -0x40(%rbp),%rsi
ffffffff80003b39:	4c 89 e7             	mov    %r12,%rdi
ffffffff80003b3c:	41 ff 94 24 18 02 00 	call   *0x218(%r12)
ffffffff80003b43:	00 
            ctx->set_cursor_pos(ctx, cx, cy);
ffffffff80003b44:	48 8b 55 c8          	mov    -0x38(%rbp),%rdx
ffffffff80003b48:	48 8b 75 c0          	mov    -0x40(%rbp),%rsi
ffffffff80003b4c:	4c 89 e7             	mov    %r12,%rdi
ffffffff80003b4f:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80003b56:	00 
            size_t remaining = ctx->cols - cx;
ffffffff80003b57:	49 8b 84 24 f8 01 00 	mov    0x1f8(%r12),%rax
ffffffff80003b5e:	00 
ffffffff80003b5f:	48 2b 45 c0          	sub    -0x40(%rbp),%rax
ffffffff80003b63:	48 89 c2             	mov    %rax,%rdx
            size_t count = ctx->esc_values[0] > remaining ? remaining : ctx->esc_values[0];
ffffffff80003b66:	41 8b 84 24 88 01 00 	mov    0x188(%r12),%eax
ffffffff80003b6d:	00 
ffffffff80003b6e:	48 39 c2             	cmp    %rax,%rdx
ffffffff80003b71:	48 0f 46 c2          	cmovbe %rdx,%rax
            for (size_t i = 0; i < count; i++)
ffffffff80003b75:	45 31 ff             	xor    %r15d,%r15d
            size_t count = ctx->esc_values[0] > remaining ? remaining : ctx->esc_values[0];
ffffffff80003b78:	49 89 c6             	mov    %rax,%r14
            for (size_t i = 0; i < count; i++)
ffffffff80003b7b:	48 85 c0             	test   %rax,%rax
ffffffff80003b7e:	74 19                	je     ffffffff80003b99 <flanterm_write+0x2459>
ffffffff80003b80:	49 83 c7 01          	add    $0x1,%r15
                ctx->raw_putchar(ctx, ' ');
ffffffff80003b84:	be 20 00 00 00       	mov    $0x20,%esi
ffffffff80003b89:	4c 89 e7             	mov    %r12,%rdi
ffffffff80003b8c:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80003b93:	00 
            for (size_t i = 0; i < count; i++)
ffffffff80003b94:	4d 39 fe             	cmp    %r15,%r14
ffffffff80003b97:	75 e7                	jne    ffffffff80003b80 <flanterm_write+0x2440>
                    ctx->set_cursor_pos(ctx, x, y);
ffffffff80003b99:	48 8b 55 b8          	mov    -0x48(%rbp),%rdx
ffffffff80003b9d:	48 8b 75 b0          	mov    -0x50(%rbp),%rsi
ffffffff80003ba1:	4c 89 e7             	mov    %r12,%rdi
ffffffff80003ba4:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80003bab:	00 
                    break;
ffffffff80003bac:	e9 fb ee ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
            if (y < ctx->scroll_top_margin || y >= ctx->scroll_bottom_margin) {
ffffffff80003bb1:	4d 8b b4 24 78 01 00 	mov    0x178(%r12),%r14
ffffffff80003bb8:	00 
ffffffff80003bb9:	48 8b 45 b8          	mov    -0x48(%rbp),%rax
ffffffff80003bbd:	4c 39 f0             	cmp    %r14,%rax
ffffffff80003bc0:	0f 82 e6 ee ff ff    	jb     ffffffff80002aac <flanterm_write+0x136c>
ffffffff80003bc6:	49 8b 94 24 80 01 00 	mov    0x180(%r12),%rdx
ffffffff80003bcd:	00 
ffffffff80003bce:	48 39 d0             	cmp    %rdx,%rax
ffffffff80003bd1:	0f 83 d5 ee ff ff    	jae    ffffffff80002aac <flanterm_write+0x136c>
            size_t max_count = ctx->scroll_bottom_margin - y;
ffffffff80003bd7:	48 29 c2             	sub    %rax,%rdx
            ctx->scroll_top_margin = y;
ffffffff80003bda:	49 89 84 24 78 01 00 	mov    %rax,0x178(%r12)
ffffffff80003be1:	00 
            size_t count = ctx->esc_values[0] > max_count ? max_count : ctx->esc_values[0];
ffffffff80003be2:	41 8b 84 24 88 01 00 	mov    0x188(%r12),%eax
ffffffff80003be9:	00 
ffffffff80003bea:	48 39 c2             	cmp    %rax,%rdx
ffffffff80003bed:	48 0f 46 c2          	cmovbe %rdx,%rax
            for (size_t i = 0; i < count; i++) {
ffffffff80003bf1:	45 31 ff             	xor    %r15d,%r15d
            size_t count = ctx->esc_values[0] > max_count ? max_count : ctx->esc_values[0];
ffffffff80003bf4:	48 89 45 a0          	mov    %rax,-0x60(%rbp)
            for (size_t i = 0; i < count; i++) {
ffffffff80003bf8:	eb 0f                	jmp    ffffffff80003c09 <flanterm_write+0x24c9>
                ctx->scroll(ctx);
ffffffff80003bfa:	4c 89 e7             	mov    %r12,%rdi
            for (size_t i = 0; i < count; i++) {
ffffffff80003bfd:	49 83 c7 01          	add    $0x1,%r15
                ctx->scroll(ctx);
ffffffff80003c01:	41 ff 94 24 78 02 00 	call   *0x278(%r12)
ffffffff80003c08:	00 
            for (size_t i = 0; i < count; i++) {
ffffffff80003c09:	4c 39 7d a0          	cmp    %r15,-0x60(%rbp)
ffffffff80003c0d:	75 eb                	jne    ffffffff80003bfa <flanterm_write+0x24ba>
            ctx->scroll_top_margin = old_scroll_top_margin;
ffffffff80003c0f:	4d 89 b4 24 78 01 00 	mov    %r14,0x178(%r12)
ffffffff80003c16:	00 
            break;
ffffffff80003c17:	e9 90 ee ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
            if (y < ctx->scroll_top_margin || y >= ctx->scroll_bottom_margin) {
ffffffff80003c1c:	4d 8b b4 24 78 01 00 	mov    0x178(%r12),%r14
ffffffff80003c23:	00 
ffffffff80003c24:	48 8b 45 b8          	mov    -0x48(%rbp),%rax
ffffffff80003c28:	4c 39 f0             	cmp    %r14,%rax
ffffffff80003c2b:	0f 82 7b ee ff ff    	jb     ffffffff80002aac <flanterm_write+0x136c>
ffffffff80003c31:	49 8b 94 24 80 01 00 	mov    0x180(%r12),%rdx
ffffffff80003c38:	00 
ffffffff80003c39:	48 39 d0             	cmp    %rdx,%rax
ffffffff80003c3c:	0f 83 6a ee ff ff    	jae    ffffffff80002aac <flanterm_write+0x136c>
            size_t max_count = ctx->scroll_bottom_margin - y;
ffffffff80003c42:	48 29 c2             	sub    %rax,%rdx
            ctx->scroll_top_margin = y;
ffffffff80003c45:	49 89 84 24 78 01 00 	mov    %rax,0x178(%r12)
ffffffff80003c4c:	00 
            size_t count = ctx->esc_values[0] > max_count ? max_count : ctx->esc_values[0];
ffffffff80003c4d:	41 8b 84 24 88 01 00 	mov    0x188(%r12),%eax
ffffffff80003c54:	00 
ffffffff80003c55:	48 39 c2             	cmp    %rax,%rdx
ffffffff80003c58:	48 0f 46 c2          	cmovbe %rdx,%rax
            for (size_t i = 0; i < count; i++) {
ffffffff80003c5c:	45 31 ff             	xor    %r15d,%r15d
            size_t count = ctx->esc_values[0] > max_count ? max_count : ctx->esc_values[0];
ffffffff80003c5f:	48 89 45 a0          	mov    %rax,-0x60(%rbp)
            for (size_t i = 0; i < count; i++) {
ffffffff80003c63:	eb 0f                	jmp    ffffffff80003c74 <flanterm_write+0x2534>
                ctx->revscroll(ctx);
ffffffff80003c65:	4c 89 e7             	mov    %r12,%rdi
            for (size_t i = 0; i < count; i++) {
ffffffff80003c68:	49 83 c7 01          	add    $0x1,%r15
                ctx->revscroll(ctx);
ffffffff80003c6c:	41 ff 94 24 80 02 00 	call   *0x280(%r12)
ffffffff80003c73:	00 
            for (size_t i = 0; i < count; i++) {
ffffffff80003c74:	4c 39 7d a0          	cmp    %r15,-0x60(%rbp)
ffffffff80003c78:	75 eb                	jne    ffffffff80003c65 <flanterm_write+0x2525>
ffffffff80003c7a:	eb 93                	jmp    ffffffff80003c0f <flanterm_write+0x24cf>
            size_t region = ctx->scroll_bottom_margin - ctx->scroll_top_margin;
ffffffff80003c7c:	49 8b 84 24 80 01 00 	mov    0x180(%r12),%rax
ffffffff80003c83:	00 
ffffffff80003c84:	49 2b 84 24 78 01 00 	sub    0x178(%r12),%rax
ffffffff80003c8b:	00 
ffffffff80003c8c:	48 89 c2             	mov    %rax,%rdx
            size_t count = ctx->esc_values[0] > region ? region : ctx->esc_values[0];
ffffffff80003c8f:	41 8b 84 24 88 01 00 	mov    0x188(%r12),%eax
ffffffff80003c96:	00 
ffffffff80003c97:	48 39 c2             	cmp    %rax,%rdx
ffffffff80003c9a:	48 0f 46 c2          	cmovbe %rdx,%rax
ffffffff80003c9e:	49 89 c6             	mov    %rax,%r14
            for (size_t i = 0; i < count; i++) {
ffffffff80003ca1:	48 85 c0             	test   %rax,%rax
ffffffff80003ca4:	0f 84 02 ee ff ff    	je     ffffffff80002aac <flanterm_write+0x136c>
ffffffff80003caa:	45 31 ff             	xor    %r15d,%r15d
ffffffff80003cad:	49 83 c7 01          	add    $0x1,%r15
                ctx->revscroll(ctx);
ffffffff80003cb1:	4c 89 e7             	mov    %r12,%rdi
ffffffff80003cb4:	41 ff 94 24 80 02 00 	call   *0x280(%r12)
ffffffff80003cbb:	00 
            for (size_t i = 0; i < count; i++) {
ffffffff80003cbc:	4d 39 fe             	cmp    %r15,%r14
ffffffff80003cbf:	75 ec                	jne    ffffffff80003cad <flanterm_write+0x256d>
ffffffff80003cc1:	e9 e6 ed ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
            switch (ctx->esc_values[0]) {
ffffffff80003cc6:	41 8b 84 24 88 01 00 	mov    0x188(%r12),%eax
ffffffff80003ccd:	00 
ffffffff80003cce:	83 f8 01             	cmp    $0x1,%eax
ffffffff80003cd1:	0f 84 03 02 00 00    	je     ffffffff80003eda <flanterm_write+0x279a>
ffffffff80003cd7:	83 f8 02             	cmp    $0x2,%eax
ffffffff80003cda:	0f 84 ec 00 00 00    	je     ffffffff80003dcc <flanterm_write+0x268c>
ffffffff80003ce0:	85 c0                	test   %eax,%eax
ffffffff80003ce2:	0f 85 c4 ed ff ff    	jne    ffffffff80002aac <flanterm_write+0x136c>
                    ctx->set_cursor_pos(ctx, x, y);
ffffffff80003ce8:	48 8b 55 b8          	mov    -0x48(%rbp),%rdx
ffffffff80003cec:	48 8b 75 b0          	mov    -0x50(%rbp),%rsi
ffffffff80003cf0:	4c 89 e7             	mov    %r12,%rdi
ffffffff80003cf3:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80003cfa:	00 
                    for (size_t i = x; i < ctx->cols; i++)
ffffffff80003cfb:	4c 8b 75 b0          	mov    -0x50(%rbp),%r14
ffffffff80003cff:	eb 14                	jmp    ffffffff80003d15 <flanterm_write+0x25d5>
                        ctx->raw_putchar(ctx, ' ');
ffffffff80003d01:	be 20 00 00 00       	mov    $0x20,%esi
ffffffff80003d06:	4c 89 e7             	mov    %r12,%rdi
                    for (size_t i = x; i < ctx->cols; i++)
ffffffff80003d09:	49 83 c6 01          	add    $0x1,%r14
                        ctx->raw_putchar(ctx, ' ');
ffffffff80003d0d:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80003d14:	00 
                    for (size_t i = x; i < ctx->cols; i++)
ffffffff80003d15:	4d 3b b4 24 f8 01 00 	cmp    0x1f8(%r12),%r14
ffffffff80003d1c:	00 
ffffffff80003d1d:	72 e2                	jb     ffffffff80003d01 <flanterm_write+0x25c1>
ffffffff80003d1f:	e9 75 fe ff ff       	jmp    ffffffff80003b99 <flanterm_write+0x2459>
            switch (ctx->esc_values[0]) {
ffffffff80003d24:	41 8b 84 24 88 01 00 	mov    0x188(%r12),%eax
ffffffff80003d2b:	00 
ffffffff80003d2c:	83 f8 01             	cmp    $0x1,%eax
ffffffff80003d2f:	0f 84 f8 01 00 00    	je     ffffffff80003f2d <flanterm_write+0x27ed>
ffffffff80003d35:	0f 87 d4 01 00 00    	ja     ffffffff80003f0f <flanterm_write+0x27cf>
                    ctx->set_cursor_pos(ctx, x, y);
ffffffff80003d3b:	48 8b 55 b8          	mov    -0x48(%rbp),%rdx
ffffffff80003d3f:	48 8b 75 b0          	mov    -0x50(%rbp),%rsi
ffffffff80003d43:	4c 89 e7             	mov    %r12,%rdi
ffffffff80003d46:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80003d4d:	00 
                    for (size_t xc = x; xc < ctx->cols; xc++) {
ffffffff80003d4e:	4c 8b 75 b0          	mov    -0x50(%rbp),%r14
ffffffff80003d52:	eb 14                	jmp    ffffffff80003d68 <flanterm_write+0x2628>
                        ctx->raw_putchar(ctx, ' ');
ffffffff80003d54:	be 20 00 00 00       	mov    $0x20,%esi
ffffffff80003d59:	4c 89 e7             	mov    %r12,%rdi
                    for (size_t xc = x; xc < ctx->cols; xc++) {
ffffffff80003d5c:	49 83 c6 01          	add    $0x1,%r14
                        ctx->raw_putchar(ctx, ' ');
ffffffff80003d60:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80003d67:	00 
                    for (size_t xc = x; xc < ctx->cols; xc++) {
ffffffff80003d68:	4d 3b b4 24 f8 01 00 	cmp    0x1f8(%r12),%r14
ffffffff80003d6f:	00 
ffffffff80003d70:	72 e2                	jb     ffffffff80003d54 <flanterm_write+0x2614>
                    for (size_t yc = y + 1; yc < ctx->rows; yc++) {
ffffffff80003d72:	48 8b 45 b8          	mov    -0x48(%rbp),%rax
ffffffff80003d76:	4c 8d 70 01          	lea    0x1(%rax),%r14
                        ctx->set_cursor_pos(ctx, 0, yc);
ffffffff80003d7a:	49 8b 84 24 10 02 00 	mov    0x210(%r12),%rax
ffffffff80003d81:	00 
                    for (size_t yc = y + 1; yc < ctx->rows; yc++) {
ffffffff80003d82:	4d 3b b4 24 f0 01 00 	cmp    0x1f0(%r12),%r14
ffffffff80003d89:	00 
ffffffff80003d8a:	0f 83 ed 01 00 00    	jae    ffffffff80003f7d <flanterm_write+0x283d>
                        ctx->set_cursor_pos(ctx, 0, yc);
ffffffff80003d90:	31 f6                	xor    %esi,%esi
ffffffff80003d92:	4c 89 f2             	mov    %r14,%rdx
ffffffff80003d95:	4c 89 e7             	mov    %r12,%rdi
                        for (size_t xc = 0; xc < ctx->cols; xc++) {
ffffffff80003d98:	45 31 ff             	xor    %r15d,%r15d
                        ctx->set_cursor_pos(ctx, 0, yc);
ffffffff80003d9b:	ff d0                	call   *%rax
                        for (size_t xc = 0; xc < ctx->cols; xc++) {
ffffffff80003d9d:	49 83 bc 24 f8 01 00 	cmpq   $0x0,0x1f8(%r12)
ffffffff80003da4:	00 00 
ffffffff80003da6:	74 1e                	je     ffffffff80003dc6 <flanterm_write+0x2686>
                            ctx->raw_putchar(ctx, ' ');
ffffffff80003da8:	be 20 00 00 00       	mov    $0x20,%esi
ffffffff80003dad:	4c 89 e7             	mov    %r12,%rdi
                        for (size_t xc = 0; xc < ctx->cols; xc++) {
ffffffff80003db0:	49 83 c7 01          	add    $0x1,%r15
                            ctx->raw_putchar(ctx, ' ');
ffffffff80003db4:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80003dbb:	00 
                        for (size_t xc = 0; xc < ctx->cols; xc++) {
ffffffff80003dbc:	4d 3b bc 24 f8 01 00 	cmp    0x1f8(%r12),%r15
ffffffff80003dc3:	00 
ffffffff80003dc4:	72 e2                	jb     ffffffff80003da8 <flanterm_write+0x2668>
                    for (size_t yc = y + 1; yc < ctx->rows; yc++) {
ffffffff80003dc6:	49 83 c6 01          	add    $0x1,%r14
ffffffff80003dca:	eb ae                	jmp    ffffffff80003d7a <flanterm_write+0x263a>
                    ctx->set_cursor_pos(ctx, 0, y);
ffffffff80003dcc:	48 8b 55 b8          	mov    -0x48(%rbp),%rdx
ffffffff80003dd0:	31 f6                	xor    %esi,%esi
ffffffff80003dd2:	4c 89 e7             	mov    %r12,%rdi
                    for (size_t i = 0; i < ctx->cols; i++)
ffffffff80003dd5:	45 31 f6             	xor    %r14d,%r14d
                    ctx->set_cursor_pos(ctx, 0, y);
ffffffff80003dd8:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80003ddf:	00 
                    for (size_t i = 0; i < ctx->cols; i++)
ffffffff80003de0:	eb 14                	jmp    ffffffff80003df6 <flanterm_write+0x26b6>
                        ctx->raw_putchar(ctx, ' ');
ffffffff80003de2:	be 20 00 00 00       	mov    $0x20,%esi
ffffffff80003de7:	4c 89 e7             	mov    %r12,%rdi
                    for (size_t i = 0; i < ctx->cols; i++)
ffffffff80003dea:	49 83 c6 01          	add    $0x1,%r14
                        ctx->raw_putchar(ctx, ' ');
ffffffff80003dee:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80003df5:	00 
                    for (size_t i = 0; i < ctx->cols; i++)
ffffffff80003df6:	4d 3b b4 24 f8 01 00 	cmp    0x1f8(%r12),%r14
ffffffff80003dfd:	00 
ffffffff80003dfe:	72 e2                	jb     ffffffff80003de2 <flanterm_write+0x26a2>
ffffffff80003e00:	e9 94 fd ff ff       	jmp    ffffffff80003b99 <flanterm_write+0x2459>
            if (ctx->esc_values[0] != 0) {
ffffffff80003e05:	41 8b 84 24 88 01 00 	mov    0x188(%r12),%eax
ffffffff80003e0c:	00 
ffffffff80003e0d:	85 c0                	test   %eax,%eax
ffffffff80003e0f:	74 0b                	je     ffffffff80003e1c <flanterm_write+0x26dc>
                ctx->esc_values[0]--;
ffffffff80003e11:	83 e8 01             	sub    $0x1,%eax
ffffffff80003e14:	41 89 84 24 88 01 00 	mov    %eax,0x188(%r12)
ffffffff80003e1b:	00 
            if (ctx->esc_values[1] != 0) {
ffffffff80003e1c:	41 8b b4 24 8c 01 00 	mov    0x18c(%r12),%esi
ffffffff80003e23:	00 
ffffffff80003e24:	85 f6                	test   %esi,%esi
ffffffff80003e26:	74 0b                	je     ffffffff80003e33 <flanterm_write+0x26f3>
                ctx->esc_values[1]--;
ffffffff80003e28:	83 ee 01             	sub    $0x1,%esi
ffffffff80003e2b:	41 89 b4 24 8c 01 00 	mov    %esi,0x18c(%r12)
ffffffff80003e32:	00 
            if (ctx->origin_mode) {
ffffffff80003e33:	41 80 7c 24 0c 00    	cmpb   $0x0,0xc(%r12)
ffffffff80003e39:	75 47                	jne    ffffffff80003e82 <flanterm_write+0x2742>
            size_t max_row = ctx->rows;
ffffffff80003e3b:	49 8b 94 24 f0 01 00 	mov    0x1f0(%r12),%rdx
ffffffff80003e42:	00 
            size_t row_offset = 0;
ffffffff80003e43:	31 c9                	xor    %ecx,%ecx
            if (ctx->esc_values[1] >= ctx->cols) {
ffffffff80003e45:	4d 8b 84 24 f8 01 00 	mov    0x1f8(%r12),%r8
ffffffff80003e4c:	00 
ffffffff80003e4d:	4c 39 c6             	cmp    %r8,%rsi
ffffffff80003e50:	72 0c                	jb     ffffffff80003e5e <flanterm_write+0x271e>
                ctx->esc_values[1] = ctx->cols - 1;
ffffffff80003e52:	41 8d 70 ff          	lea    -0x1(%r8),%esi
ffffffff80003e56:	41 89 b4 24 8c 01 00 	mov    %esi,0x18c(%r12)
ffffffff80003e5d:	00 
            if (ctx->esc_values[0] >= max_row) {
ffffffff80003e5e:	48 39 d0             	cmp    %rdx,%rax
ffffffff80003e61:	72 0b                	jb     ffffffff80003e6e <flanterm_write+0x272e>
                ctx->esc_values[0] = max_row - 1;
ffffffff80003e63:	8d 42 ff             	lea    -0x1(%rdx),%eax
ffffffff80003e66:	41 89 84 24 88 01 00 	mov    %eax,0x188(%r12)
ffffffff80003e6d:	00 
            ctx->set_cursor_pos(ctx, ctx->esc_values[1], ctx->esc_values[0] + row_offset);
ffffffff80003e6e:	48 8d 14 08          	lea    (%rax,%rcx,1),%rdx
ffffffff80003e72:	4c 89 e7             	mov    %r12,%rdi
ffffffff80003e75:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80003e7c:	00 
            break;
ffffffff80003e7d:	e9 2a ec ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
                max_row = ctx->scroll_bottom_margin - ctx->scroll_top_margin;
ffffffff80003e82:	49 8b 8c 24 78 01 00 	mov    0x178(%r12),%rcx
ffffffff80003e89:	00 
ffffffff80003e8a:	49 8b 94 24 80 01 00 	mov    0x180(%r12),%rdx
ffffffff80003e91:	00 
ffffffff80003e92:	48 29 ca             	sub    %rcx,%rdx
                row_offset = ctx->scroll_top_margin;
ffffffff80003e95:	eb ae                	jmp    ffffffff80003e45 <flanterm_write+0x2705>
            if (ctx->esc_values[0] != 0) {
ffffffff80003e97:	41 8b b4 24 88 01 00 	mov    0x188(%r12),%esi
ffffffff80003e9e:	00 
ffffffff80003e9f:	85 f6                	test   %esi,%esi
ffffffff80003ea1:	74 0b                	je     ffffffff80003eae <flanterm_write+0x276e>
                ctx->esc_values[0]--;
ffffffff80003ea3:	83 ee 01             	sub    $0x1,%esi
ffffffff80003ea6:	41 89 b4 24 88 01 00 	mov    %esi,0x188(%r12)
ffffffff80003ead:	00 
            if (ctx->esc_values[0] >= ctx->cols)
ffffffff80003eae:	49 8b 84 24 f8 01 00 	mov    0x1f8(%r12),%rax
ffffffff80003eb5:	00 
ffffffff80003eb6:	48 39 c6             	cmp    %rax,%rsi
ffffffff80003eb9:	72 0b                	jb     ffffffff80003ec6 <flanterm_write+0x2786>
                ctx->esc_values[0] = ctx->cols - 1;
ffffffff80003ebb:	8d 70 ff             	lea    -0x1(%rax),%esi
ffffffff80003ebe:	41 89 b4 24 88 01 00 	mov    %esi,0x188(%r12)
ffffffff80003ec5:	00 
                    ctx->set_cursor_pos(ctx, x, y);
ffffffff80003ec6:	48 8b 55 b8          	mov    -0x48(%rbp),%rdx
ffffffff80003eca:	4c 89 e7             	mov    %r12,%rdi
ffffffff80003ecd:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80003ed4:	00 
                    break;
ffffffff80003ed5:	e9 d2 eb ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
                    ctx->set_cursor_pos(ctx, 0, y);
ffffffff80003eda:	48 8b 55 b8          	mov    -0x48(%rbp),%rdx
ffffffff80003ede:	31 f6                	xor    %esi,%esi
ffffffff80003ee0:	4c 89 e7             	mov    %r12,%rdi
                    for (size_t i = 0; i <= x; i++)
ffffffff80003ee3:	45 31 f6             	xor    %r14d,%r14d
                    ctx->set_cursor_pos(ctx, 0, y);
ffffffff80003ee6:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80003eed:	00 
                    for (size_t i = 0; i <= x; i++)
ffffffff80003eee:	eb 14                	jmp    ffffffff80003f04 <flanterm_write+0x27c4>
                        ctx->raw_putchar(ctx, ' ');
ffffffff80003ef0:	be 20 00 00 00       	mov    $0x20,%esi
ffffffff80003ef5:	4c 89 e7             	mov    %r12,%rdi
                    for (size_t i = 0; i <= x; i++)
ffffffff80003ef8:	49 83 c6 01          	add    $0x1,%r14
                        ctx->raw_putchar(ctx, ' ');
ffffffff80003efc:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80003f03:	00 
                    for (size_t i = 0; i <= x; i++)
ffffffff80003f04:	48 8b 75 b0          	mov    -0x50(%rbp),%rsi
ffffffff80003f08:	4c 39 f6             	cmp    %r14,%rsi
ffffffff80003f0b:	73 e3                	jae    ffffffff80003ef0 <flanterm_write+0x27b0>
ffffffff80003f0d:	eb b7                	jmp    ffffffff80003ec6 <flanterm_write+0x2786>
            switch (ctx->esc_values[0]) {
ffffffff80003f0f:	83 e8 02             	sub    $0x2,%eax
ffffffff80003f12:	83 f8 01             	cmp    $0x1,%eax
ffffffff80003f15:	0f 87 91 eb ff ff    	ja     ffffffff80002aac <flanterm_write+0x136c>
                    ctx->clear(ctx, false);
ffffffff80003f1b:	31 f6                	xor    %esi,%esi
ffffffff80003f1d:	4c 89 e7             	mov    %r12,%rdi
ffffffff80003f20:	41 ff 94 24 08 02 00 	call   *0x208(%r12)
ffffffff80003f27:	00 
                    break;
ffffffff80003f28:	e9 7f eb ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
            switch (ctx->esc_values[0]) {
ffffffff80003f2d:	45 31 f6             	xor    %r14d,%r14d
                    for (size_t yc = 0; yc < y; yc++) {
ffffffff80003f30:	48 8b 55 b8          	mov    -0x48(%rbp),%rdx
                        ctx->set_cursor_pos(ctx, 0, yc);
ffffffff80003f34:	49 8b 84 24 10 02 00 	mov    0x210(%r12),%rax
ffffffff80003f3b:	00 
                    for (size_t yc = 0; yc < y; yc++) {
ffffffff80003f3c:	49 39 d6             	cmp    %rdx,%r14
ffffffff80003f3f:	73 4e                	jae    ffffffff80003f8f <flanterm_write+0x284f>
                        ctx->set_cursor_pos(ctx, 0, yc);
ffffffff80003f41:	31 f6                	xor    %esi,%esi
ffffffff80003f43:	4c 89 f2             	mov    %r14,%rdx
ffffffff80003f46:	4c 89 e7             	mov    %r12,%rdi
                        for (size_t xc = 0; xc < ctx->cols; xc++) {
ffffffff80003f49:	45 31 ff             	xor    %r15d,%r15d
                        ctx->set_cursor_pos(ctx, 0, yc);
ffffffff80003f4c:	ff d0                	call   *%rax
                        for (size_t xc = 0; xc < ctx->cols; xc++) {
ffffffff80003f4e:	49 83 bc 24 f8 01 00 	cmpq   $0x0,0x1f8(%r12)
ffffffff80003f55:	00 00 
ffffffff80003f57:	74 1e                	je     ffffffff80003f77 <flanterm_write+0x2837>
                            ctx->raw_putchar(ctx, ' ');
ffffffff80003f59:	be 20 00 00 00       	mov    $0x20,%esi
ffffffff80003f5e:	4c 89 e7             	mov    %r12,%rdi
                        for (size_t xc = 0; xc < ctx->cols; xc++) {
ffffffff80003f61:	49 83 c7 01          	add    $0x1,%r15
                            ctx->raw_putchar(ctx, ' ');
ffffffff80003f65:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80003f6c:	00 
                        for (size_t xc = 0; xc < ctx->cols; xc++) {
ffffffff80003f6d:	4d 3b bc 24 f8 01 00 	cmp    0x1f8(%r12),%r15
ffffffff80003f74:	00 
ffffffff80003f75:	72 e2                	jb     ffffffff80003f59 <flanterm_write+0x2819>
                    for (size_t yc = 0; yc < y; yc++) {
ffffffff80003f77:	49 83 c6 01          	add    $0x1,%r14
ffffffff80003f7b:	eb b3                	jmp    ffffffff80003f30 <flanterm_write+0x27f0>
                    ctx->set_cursor_pos(ctx, x, y);
ffffffff80003f7d:	48 8b 55 b8          	mov    -0x48(%rbp),%rdx
ffffffff80003f81:	48 8b 75 b0          	mov    -0x50(%rbp),%rsi
ffffffff80003f85:	4c 89 e7             	mov    %r12,%rdi
ffffffff80003f88:	ff d0                	call   *%rax
                    break;
ffffffff80003f8a:	e9 1d eb ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
                    ctx->set_cursor_pos(ctx, 0, y);
ffffffff80003f8f:	31 f6                	xor    %esi,%esi
ffffffff80003f91:	4c 89 e7             	mov    %r12,%rdi
                    for (size_t xc = 0; xc <= x; xc++) {
ffffffff80003f94:	45 31 f6             	xor    %r14d,%r14d
                    ctx->set_cursor_pos(ctx, 0, y);
ffffffff80003f97:	ff d0                	call   *%rax
                    for (size_t xc = 0; xc <= x; xc++) {
ffffffff80003f99:	eb 14                	jmp    ffffffff80003faf <flanterm_write+0x286f>
                        ctx->raw_putchar(ctx, ' ');
ffffffff80003f9b:	be 20 00 00 00       	mov    $0x20,%esi
ffffffff80003fa0:	4c 89 e7             	mov    %r12,%rdi
                    for (size_t xc = 0; xc <= x; xc++) {
ffffffff80003fa3:	49 83 c6 01          	add    $0x1,%r14
                        ctx->raw_putchar(ctx, ' ');
ffffffff80003fa7:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff80003fae:	00 
                    for (size_t xc = 0; xc <= x; xc++) {
ffffffff80003faf:	48 8b 75 b0          	mov    -0x50(%rbp),%rsi
ffffffff80003fb3:	4c 39 f6             	cmp    %r14,%rsi
ffffffff80003fb6:	73 e3                	jae    ffffffff80003f9b <flanterm_write+0x285b>
ffffffff80003fb8:	e9 09 ff ff ff       	jmp    ffffffff80003ec6 <flanterm_write+0x2786>
            x = 0;
ffffffff80003fbd:	45 31 c0             	xor    %r8d,%r8d
ffffffff80003fc0:	4c 89 45 b0          	mov    %r8,-0x50(%rbp)
            if (y + ctx->esc_values[0] > ctx->rows - 1)
ffffffff80003fc4:	48 8b 4d b8          	mov    -0x48(%rbp),%rcx
ffffffff80003fc8:	49 8b 84 24 f0 01 00 	mov    0x1f0(%r12),%rax
ffffffff80003fcf:	00 
ffffffff80003fd0:	41 8b 94 24 88 01 00 	mov    0x188(%r12),%edx
ffffffff80003fd7:	00 
ffffffff80003fd8:	4c 8d 40 ff          	lea    -0x1(%rax),%r8
ffffffff80003fdc:	48 8d 34 0a          	lea    (%rdx,%rcx,1),%rsi
ffffffff80003fe0:	49 39 f0             	cmp    %rsi,%r8
ffffffff80003fe3:	73 0f                	jae    ffffffff80003ff4 <flanterm_write+0x28b4>
                ctx->esc_values[0] = (ctx->rows - 1) - y;
ffffffff80003fe5:	89 c2                	mov    %eax,%edx
ffffffff80003fe7:	29 ca                	sub    %ecx,%edx
ffffffff80003fe9:	83 ea 01             	sub    $0x1,%edx
ffffffff80003fec:	41 89 94 24 88 01 00 	mov    %edx,0x188(%r12)
ffffffff80003ff3:	00 
            size_t dest_y = y + ctx->esc_values[0];
ffffffff80003ff4:	48 01 ca             	add    %rcx,%rdx
            size_t max_y = ctx->origin_mode ? ctx->scroll_bottom_margin : ctx->rows;
ffffffff80003ff7:	41 80 7c 24 0c 00    	cmpb   $0x0,0xc(%r12)
ffffffff80003ffd:	74 08                	je     ffffffff80004007 <flanterm_write+0x28c7>
ffffffff80003fff:	49 8b 84 24 80 01 00 	mov    0x180(%r12),%rax
ffffffff80004006:	00 
            if (dest_y >= max_y) {
ffffffff80004007:	48 39 c2             	cmp    %rax,%rdx
ffffffff8000400a:	0f 82 8d ea ff ff    	jb     ffffffff80002a9d <flanterm_write+0x135d>
                dest_y = max_y - 1;
ffffffff80004010:	48 8d 50 ff          	lea    -0x1(%rax),%rdx
            ctx->set_cursor_pos(ctx, x, dest_y);
ffffffff80004014:	e9 84 ea ff ff       	jmp    ffffffff80002a9d <flanterm_write+0x135d>
            if (ctx->esc_values[0] > x)
ffffffff80004019:	48 8b 45 b0          	mov    -0x50(%rbp),%rax
ffffffff8000401d:	41 8b 94 24 88 01 00 	mov    0x188(%r12),%edx
ffffffff80004024:	00 
ffffffff80004025:	48 39 d0             	cmp    %rdx,%rax
ffffffff80004028:	73 0a                	jae    ffffffff80004034 <flanterm_write+0x28f4>
                ctx->esc_values[0] = x;
ffffffff8000402a:	41 89 84 24 88 01 00 	mov    %eax,0x188(%r12)
ffffffff80004031:	00 
ffffffff80004032:	89 c2                	mov    %eax,%edx
            ctx->set_cursor_pos(ctx, x - ctx->esc_values[0], y);
ffffffff80004034:	48 29 d0             	sub    %rdx,%rax
ffffffff80004037:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000403a:	48 8b 55 b8          	mov    -0x48(%rbp),%rdx
ffffffff8000403e:	48 89 c6             	mov    %rax,%rsi
ffffffff80004041:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80004048:	00 
            break;
ffffffff80004049:	e9 5e ea ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
            if (x + ctx->esc_values[0] > ctx->cols - 1)
ffffffff8000404e:	48 8b 4d b0          	mov    -0x50(%rbp),%rcx
ffffffff80004052:	49 8b 84 24 f8 01 00 	mov    0x1f8(%r12),%rax
ffffffff80004059:	00 
ffffffff8000405a:	41 8b 94 24 88 01 00 	mov    0x188(%r12),%edx
ffffffff80004061:	00 
ffffffff80004062:	4c 8d 40 ff          	lea    -0x1(%rax),%r8
ffffffff80004066:	48 8d 34 0a          	lea    (%rdx,%rcx,1),%rsi
ffffffff8000406a:	49 39 f0             	cmp    %rsi,%r8
ffffffff8000406d:	73 0d                	jae    ffffffff8000407c <flanterm_write+0x293c>
                ctx->esc_values[0] = (ctx->cols - 1) - x;
ffffffff8000406f:	29 c8                	sub    %ecx,%eax
ffffffff80004071:	8d 50 ff             	lea    -0x1(%rax),%edx
ffffffff80004074:	41 89 94 24 88 01 00 	mov    %edx,0x188(%r12)
ffffffff8000407b:	00 
            ctx->set_cursor_pos(ctx, x + ctx->esc_values[0], y);
ffffffff8000407c:	48 8d 34 0a          	lea    (%rdx,%rcx,1),%rsi
ffffffff80004080:	4c 89 e7             	mov    %r12,%rdi
ffffffff80004083:	48 8b 55 b8          	mov    -0x48(%rbp),%rdx
ffffffff80004087:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff8000408e:	00 
            break;
ffffffff8000408f:	e9 18 ea ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
            if (n > ctx->cols - x) {
ffffffff80004094:	4d 8b bc 24 f8 01 00 	mov    0x1f8(%r12),%r15
ffffffff8000409b:	00 
ffffffff8000409c:	48 8b 75 b0          	mov    -0x50(%rbp),%rsi
            size_t n = ctx->esc_values[0];
ffffffff800040a0:	41 8b 94 24 88 01 00 	mov    0x188(%r12),%edx
ffffffff800040a7:	00 
            if (n > ctx->cols - x) {
ffffffff800040a8:	4c 89 f8             	mov    %r15,%rax
ffffffff800040ab:	48 29 f0             	sub    %rsi,%rax
ffffffff800040ae:	48 39 c2             	cmp    %rax,%rdx
ffffffff800040b1:	48 0f 46 c2          	cmovbe %rdx,%rax
            for (size_t i = ctx->cols - 1; i >= x + n; i--) {
ffffffff800040b5:	49 83 ef 01          	sub    $0x1,%r15
            if (n > ctx->cols - x) {
ffffffff800040b9:	49 89 c6             	mov    %rax,%r14
            for (size_t i = ctx->cols - 1; i >= x + n; i--) {
ffffffff800040bc:	48 8d 04 06          	lea    (%rsi,%rax,1),%rax
ffffffff800040c0:	49 39 c7             	cmp    %rax,%r15
ffffffff800040c3:	72 2c                	jb     ffffffff800040f1 <flanterm_write+0x29b1>
                ctx->move_character(ctx, i, y, i - n, y);
ffffffff800040c5:	48 8b 55 b8          	mov    -0x48(%rbp),%rdx
ffffffff800040c9:	4c 89 f9             	mov    %r15,%rcx
ffffffff800040cc:	4c 89 fe             	mov    %r15,%rsi
ffffffff800040cf:	4c 89 e7             	mov    %r12,%rdi
ffffffff800040d2:	4c 29 f1             	sub    %r14,%rcx
            for (size_t i = ctx->cols - 1; i >= x + n; i--) {
ffffffff800040d5:	49 83 ef 01          	sub    $0x1,%r15
                ctx->move_character(ctx, i, y, i - n, y);
ffffffff800040d9:	49 89 d0             	mov    %rdx,%r8
ffffffff800040dc:	41 ff 94 24 70 02 00 	call   *0x270(%r12)
ffffffff800040e3:	00 
            for (size_t i = ctx->cols - 1; i >= x + n; i--) {
ffffffff800040e4:	48 8b 75 b0          	mov    -0x50(%rbp),%rsi
ffffffff800040e8:	49 8d 04 36          	lea    (%r14,%rsi,1),%rax
ffffffff800040ec:	49 39 c7             	cmp    %rax,%r15
ffffffff800040ef:	73 d4                	jae    ffffffff800040c5 <flanterm_write+0x2985>
            ctx->set_cursor_pos(ctx, x, y);
ffffffff800040f1:	48 8b 55 b8          	mov    -0x48(%rbp),%rdx
ffffffff800040f5:	4c 89 e7             	mov    %r12,%rdi
            for (size_t i = 0; i < n; i++) {
ffffffff800040f8:	45 31 ff             	xor    %r15d,%r15d
            ctx->set_cursor_pos(ctx, x, y);
ffffffff800040fb:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80004102:	00 
            for (size_t i = 0; i < n; i++) {
ffffffff80004103:	4d 85 f6             	test   %r14,%r14
ffffffff80004106:	0f 84 8d fa ff ff    	je     ffffffff80003b99 <flanterm_write+0x2459>
ffffffff8000410c:	49 83 c7 01          	add    $0x1,%r15
                ctx->raw_putchar(ctx, ' ');
ffffffff80004110:	be 20 00 00 00       	mov    $0x20,%esi
ffffffff80004115:	4c 89 e7             	mov    %r12,%rdi
ffffffff80004118:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff8000411f:	00 
            for (size_t i = 0; i < n; i++) {
ffffffff80004120:	4d 39 fe             	cmp    %r15,%r14
ffffffff80004123:	75 e7                	jne    ffffffff8000410c <flanterm_write+0x29cc>
ffffffff80004125:	e9 6f fa ff ff       	jmp    ffffffff80003b99 <flanterm_write+0x2459>
            ctx->scroll_enabled = r;
ffffffff8000412a:	0f b6 45 a8          	movzbl -0x58(%rbp),%eax
            ctx->escape_offset = 0;
ffffffff8000412e:	45 31 d2             	xor    %r10d,%r10d
            ctx->control_sequence = false;
ffffffff80004131:	41 c6 44 24 0d 00    	movb   $0x0,0xd(%r12)
            ctx->escape_offset = 0;
ffffffff80004137:	4d 89 94 24 48 01 00 	mov    %r10,0x148(%r12)
ffffffff8000413e:	00 
            ctx->scroll_enabled = r;
ffffffff8000413f:	41 88 44 24 0a       	mov    %al,0xa(%r12)
            return;
ffffffff80004144:	e9 f7 d6 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
            sgr(ctx);
ffffffff80004149:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000414c:	e8 af ce ff ff       	call   ffffffff80001000 <sgr>
            break;
ffffffff80004151:	e9 56 e9 ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
    if (ctx->esc_values_i == 0) {
ffffffff80004156:	49 8b 94 24 50 01 00 	mov    0x150(%r12),%rdx
ffffffff8000415d:	00 
ffffffff8000415e:	48 85 d2             	test   %rdx,%rdx
ffffffff80004161:	0f 84 45 e9 ff ff    	je     ffffffff80002aac <flanterm_write+0x136c>
    switch (c) {
ffffffff80004167:	41 80 ff 68          	cmp    $0x68,%r15b
ffffffff8000416b:	0f 94 c0             	sete   %al
    switch (ctx->esc_values[0]) {
ffffffff8000416e:	41 83 bc 24 88 01 00 	cmpl   $0x4,0x188(%r12)
ffffffff80004175:	00 04 
ffffffff80004177:	0f 84 6c 01 00 00    	je     ffffffff800042e9 <flanterm_write+0x2ba9>
    if (ctx->callback != NULL) {
ffffffff8000417d:	49 8b 84 24 b8 02 00 	mov    0x2b8(%r12),%rax
ffffffff80004184:	00 
ffffffff80004185:	48 85 c0             	test   %rax,%rax
ffffffff80004188:	0f 84 1e e9 ff ff    	je     ffffffff80002aac <flanterm_write+0x136c>
        ctx->callback(ctx, FLANTERM_CB_MODE, ctx->esc_values_i, (uintptr_t)ctx->esc_values, c);
ffffffff8000418e:	49 8d 8c 24 88 01 00 	lea    0x188(%r12),%rcx
ffffffff80004195:	00 
ffffffff80004196:	4d 0f be c7          	movsbq %r15b,%r8
ffffffff8000419a:	be 46 00 00 00       	mov    $0x46,%esi
ffffffff8000419f:	4c 89 e7             	mov    %r12,%rdi
ffffffff800041a2:	ff d0                	call   *%rax
ffffffff800041a4:	e9 03 e9 ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
            if (!ctx->last_was_graphic) {
ffffffff800041a9:	41 80 bc 24 c9 01 00 	cmpb   $0x0,0x1c9(%r12)
ffffffff800041b0:	00 00 
ffffffff800041b2:	0f 84 f4 e8 ff ff    	je     ffffffff80002aac <flanterm_write+0x136c>
            ctx->scroll_enabled = r;
ffffffff800041b8:	0f b6 45 a8          	movzbl -0x58(%rbp),%eax
            size_t count = ctx->esc_values[0] > 65535 ? 65535 : ctx->esc_values[0];
ffffffff800041bc:	ba ff ff 00 00       	mov    $0xffff,%edx
            ctx->scroll_enabled = r;
ffffffff800041c1:	41 88 44 24 0a       	mov    %al,0xa(%r12)
            size_t count = ctx->esc_values[0] > 65535 ? 65535 : ctx->esc_values[0];
ffffffff800041c6:	41 8b 84 24 88 01 00 	mov    0x188(%r12),%eax
ffffffff800041cd:	00 
ffffffff800041ce:	39 d0                	cmp    %edx,%eax
ffffffff800041d0:	48 0f 47 c2          	cmova  %rdx,%rax
            for (size_t i = 0; i < count; i++) {
ffffffff800041d4:	45 31 ff             	xor    %r15d,%r15d
            size_t count = ctx->esc_values[0] > 65535 ? 65535 : ctx->esc_values[0];
ffffffff800041d7:	48 89 45 a0          	mov    %rax,-0x60(%rbp)
            for (size_t i = 0; i < count; i++) {
ffffffff800041db:	eb 18                	jmp    ffffffff800041f5 <flanterm_write+0x2ab5>
                ctx->raw_putchar(ctx, ctx->last_printed_char);
ffffffff800041dd:	41 0f b6 b4 24 c8 01 	movzbl 0x1c8(%r12),%esi
ffffffff800041e4:	00 00 
ffffffff800041e6:	4c 89 e7             	mov    %r12,%rdi
            for (size_t i = 0; i < count; i++) {
ffffffff800041e9:	49 83 c7 01          	add    $0x1,%r15
                ctx->raw_putchar(ctx, ctx->last_printed_char);
ffffffff800041ed:	41 ff 94 24 00 02 00 	call   *0x200(%r12)
ffffffff800041f4:	00 
            for (size_t i = 0; i < count; i++) {
ffffffff800041f5:	48 8b 45 a0          	mov    -0x60(%rbp),%rax
ffffffff800041f9:	49 39 c7             	cmp    %rax,%r15
ffffffff800041fc:	0f 83 aa e8 ff ff    	jae    ffffffff80002aac <flanterm_write+0x136c>
                if (ctx->insert_mode == true) {
ffffffff80004202:	41 80 bc 24 26 01 00 	cmpb   $0x0,0x126(%r12)
ffffffff80004209:	00 00 
ffffffff8000420b:	74 d0                	je     ffffffff800041dd <flanterm_write+0x2a9d>
                    ctx->get_cursor_pos(ctx, &ix, &iy);
ffffffff8000420d:	48 8d 75 c0          	lea    -0x40(%rbp),%rsi
ffffffff80004211:	48 8d 55 c8          	lea    -0x38(%rbp),%rdx
ffffffff80004215:	4c 89 e7             	mov    %r12,%rdi
ffffffff80004218:	41 ff 94 24 18 02 00 	call   *0x218(%r12)
ffffffff8000421f:	00 
                    for (size_t j = ctx->cols - 1; j > ix; j--) {
ffffffff80004220:	49 8b 84 24 f8 01 00 	mov    0x1f8(%r12),%rax
ffffffff80004227:	00 
ffffffff80004228:	4c 8d 70 ff          	lea    -0x1(%rax),%r14
ffffffff8000422c:	4c 39 75 c0          	cmp    %r14,-0x40(%rbp)
ffffffff80004230:	73 ab                	jae    ffffffff800041dd <flanterm_write+0x2a9d>
                        ctx->move_character(ctx, j, iy, j - 1, iy);
ffffffff80004232:	48 8b 55 c8          	mov    -0x38(%rbp),%rdx
ffffffff80004236:	4c 89 f6             	mov    %r14,%rsi
ffffffff80004239:	49 83 ee 01          	sub    $0x1,%r14
ffffffff8000423d:	4c 89 e7             	mov    %r12,%rdi
ffffffff80004240:	4c 89 f1             	mov    %r14,%rcx
ffffffff80004243:	49 89 d0             	mov    %rdx,%r8
ffffffff80004246:	41 ff 94 24 70 02 00 	call   *0x270(%r12)
ffffffff8000424d:	00 
                    for (size_t j = ctx->cols - 1; j > ix; j--) {
ffffffff8000424e:	4c 39 75 c0          	cmp    %r14,-0x40(%rbp)
ffffffff80004252:	72 de                	jb     ffffffff80004232 <flanterm_write+0x2af2>
ffffffff80004254:	eb 87                	jmp    ffffffff800041dd <flanterm_write+0x2a9d>
            if (ctx->esc_values[0] != 0) {
ffffffff80004256:	41 8b 84 24 88 01 00 	mov    0x188(%r12),%eax
ffffffff8000425d:	00 
ffffffff8000425e:	85 c0                	test   %eax,%eax
ffffffff80004260:	74 0b                	je     ffffffff8000426d <flanterm_write+0x2b2d>
                ctx->esc_values[0]--;
ffffffff80004262:	83 e8 01             	sub    $0x1,%eax
ffffffff80004265:	41 89 84 24 88 01 00 	mov    %eax,0x188(%r12)
ffffffff8000426c:	00 
            if (ctx->origin_mode) {
ffffffff8000426d:	41 80 7c 24 0c 00    	cmpb   $0x0,0xc(%r12)
ffffffff80004273:	75 23                	jne    ffffffff80004298 <flanterm_write+0x2b58>
            size_t max_row = ctx->rows;
ffffffff80004275:	49 8b 94 24 f0 01 00 	mov    0x1f0(%r12),%rdx
ffffffff8000427c:	00 
            size_t row_offset = 0;
ffffffff8000427d:	31 c9                	xor    %ecx,%ecx
            if (ctx->esc_values[0] >= max_row)
ffffffff8000427f:	48 39 d0             	cmp    %rdx,%rax
ffffffff80004282:	72 0b                	jb     ffffffff8000428f <flanterm_write+0x2b4f>
                ctx->esc_values[0] = max_row - 1;
ffffffff80004284:	8d 42 ff             	lea    -0x1(%rdx),%eax
ffffffff80004287:	41 89 84 24 88 01 00 	mov    %eax,0x188(%r12)
ffffffff8000428e:	00 
            ctx->set_cursor_pos(ctx, x, ctx->esc_values[0] + row_offset);
ffffffff8000428f:	48 8d 14 08          	lea    (%rax,%rcx,1),%rdx
ffffffff80004293:	e9 05 e8 ff ff       	jmp    ffffffff80002a9d <flanterm_write+0x135d>
                max_row = ctx->scroll_bottom_margin - ctx->scroll_top_margin;
ffffffff80004298:	49 8b 8c 24 78 01 00 	mov    0x178(%r12),%rcx
ffffffff8000429f:	00 
ffffffff800042a0:	49 8b 94 24 80 01 00 	mov    0x180(%r12),%rdx
ffffffff800042a7:	00 
ffffffff800042a8:	48 29 ca             	sub    %rcx,%rdx
                row_offset = ctx->scroll_top_margin;
ffffffff800042ab:	eb d2                	jmp    ffffffff8000427f <flanterm_write+0x2b3f>
    if (ctx->esc_values_i == 0) {
ffffffff800042ad:	49 8b 94 24 50 01 00 	mov    0x150(%r12),%rdx
ffffffff800042b4:	00 
ffffffff800042b5:	48 85 d2             	test   %rdx,%rdx
ffffffff800042b8:	0f 84 ee e7 ff ff    	je     ffffffff80002aac <flanterm_write+0x136c>
    if (ctx->callback != NULL) {
ffffffff800042be:	49 8b 84 24 b8 02 00 	mov    0x2b8(%r12),%rax
ffffffff800042c5:	00 
ffffffff800042c6:	48 85 c0             	test   %rax,%rax
ffffffff800042c9:	0f 84 dd e7 ff ff    	je     ffffffff80002aac <flanterm_write+0x136c>
        ctx->callback(ctx, FLANTERM_CB_LINUX, ctx->esc_values_i, (uintptr_t)ctx->esc_values, 0);
ffffffff800042cf:	49 8d 8c 24 88 01 00 	lea    0x188(%r12),%rcx
ffffffff800042d6:	00 
ffffffff800042d7:	45 31 c0             	xor    %r8d,%r8d
ffffffff800042da:	be 50 00 00 00       	mov    $0x50,%esi
ffffffff800042df:	4c 89 e7             	mov    %r12,%rdi
ffffffff800042e2:	ff d0                	call   *%rax
ffffffff800042e4:	e9 c3 e7 ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
            ctx->insert_mode = set; return;
ffffffff800042e9:	41 88 84 24 26 01 00 	mov    %al,0x126(%r12)
ffffffff800042f0:	00 
ffffffff800042f1:	e9 b6 e7 ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
            if (ctx->callback != NULL) {
ffffffff800042f6:	49 8b 84 24 b8 02 00 	mov    0x2b8(%r12),%rax
ffffffff800042fd:	00 
ffffffff800042fe:	48 85 c0             	test   %rax,%rax
ffffffff80004301:	0f 84 a5 e7 ff ff    	je     ffffffff80002aac <flanterm_write+0x136c>
                ctx->callback(ctx, FLANTERM_CB_PRIVATE_ID, 0, 0, 0);
ffffffff80004307:	45 31 c0             	xor    %r8d,%r8d
ffffffff8000430a:	31 c9                	xor    %ecx,%ecx
ffffffff8000430c:	31 d2                	xor    %edx,%edx
ffffffff8000430e:	be 1e 00 00 00       	mov    $0x1e,%esi
ffffffff80004313:	4c 89 e7             	mov    %r12,%rdi
ffffffff80004316:	ff d0                	call   *%rax
ffffffff80004318:	e9 8f e7 ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
    switch (code_point) {
ffffffff8000431d:	b8 27 00 00 00       	mov    $0x27,%eax
        case 0x00b4: return 0x27;
ffffffff80004322:	be 27 00 00 00       	mov    $0x27,%esi
ffffffff80004327:	e9 64 d7 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000432c:	b8 2d 00 00 00       	mov    $0x2d,%eax
        case 0x00ad: return 0x2d;
ffffffff80004331:	be 2d 00 00 00       	mov    $0x2d,%esi
ffffffff80004336:	e9 55 d7 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000433b:	b8 14 00 00 00       	mov    $0x14,%eax
        case 0x00b6: return 20;
ffffffff80004340:	be 14 00 00 00       	mov    $0x14,%esi
ffffffff80004345:	e9 46 d7 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000434a:	b8 e6 ff ff ff       	mov    $0xffffffe6,%eax
        case 0x00b5: return 230;
ffffffff8000434f:	be e6 00 00 00       	mov    $0xe6,%esi
ffffffff80004354:	e9 37 d7 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004359:	b8 db ff ff ff       	mov    $0xffffffdb,%eax
        if (dots == 0xff) return 0xdb;
ffffffff8000435e:	be db 00 00 00       	mov    $0xdb,%esi
ffffffff80004363:	e9 28 d7 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004368:	48 81 fa a0 25 00 00 	cmp    $0x25a0,%rdx
ffffffff8000436f:	74 54                	je     ffffffff800043c5 <flanterm_write+0x2c85>
ffffffff80004371:	48 81 fa aa 25 00 00 	cmp    $0x25aa,%rdx
ffffffff80004378:	74 3c                	je     ffffffff800043b6 <flanterm_write+0x2c76>
ffffffff8000437a:	b8 db ff ff ff       	mov    $0xffffffdb,%eax
        if (dots == 0xff) return 0xdb;
ffffffff8000437f:	be db 00 00 00       	mov    $0xdb,%esi
    switch (code_point) {
ffffffff80004384:	48 81 fa 9f 25 00 00 	cmp    $0x259f,%rdx
ffffffff8000438b:	0f 84 ff d6 ff ff    	je     ffffffff80001a90 <flanterm_write+0x350>
            int replacement_width = mk_wcwidth(ctx->code_point);
ffffffff80004391:	89 d1                	mov    %edx,%ecx
  if (ucs < table[0].first || ucs > table[max].last)
ffffffff80004393:	e9 e7 dc ff ff       	jmp    ffffffff8000207f <flanterm_write+0x93f>
    switch (code_point) {
ffffffff80004398:	b8 b3 ff ff ff       	mov    $0xffffffb3,%eax
        case 0x2502: return 179;
ffffffff8000439d:	be b3 00 00 00       	mov    $0xb3,%esi
ffffffff800043a2:	e9 e9 d6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800043a7:	b8 c4 ff ff ff       	mov    $0xffffffc4,%eax
        case 0x2500: return 196;
ffffffff800043ac:	be c4 00 00 00       	mov    $0xc4,%esi
ffffffff800043b1:	e9 da d6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800043b6:	b8 fe ff ff ff       	mov    $0xfffffffe,%eax
        case 0x25a0: return 254;
ffffffff800043bb:	be fe 00 00 00       	mov    $0xfe,%esi
ffffffff800043c0:	e9 cb d6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800043c5:	b8 fe ff ff ff       	mov    $0xfffffffe,%eax
        case 0x25a0: return 254;
ffffffff800043ca:	be fe 00 00 00       	mov    $0xfe,%esi
ffffffff800043cf:	e9 bc d6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800043d4:	b8 17 00 00 00       	mov    $0x17,%eax
        case 0x21a8: return 23;
ffffffff800043d9:	be 17 00 00 00       	mov    $0x17,%esi
ffffffff800043de:	e9 ad d6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800043e3:	b8 fb ff ff ff       	mov    $0xfffffffb,%eax
        case 0x221a: return 251;
ffffffff800043e8:	be fb 00 00 00       	mov    $0xfb,%esi
ffffffff800043ed:	e9 9e d6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800043f2:	b8 1c 00 00 00       	mov    $0x1c,%eax
        case 0x221f: return 28;
ffffffff800043f7:	be 1c 00 00 00       	mov    $0x1c,%esi
ffffffff800043fc:	e9 8f d6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004401:	b8 ec ff ff ff       	mov    $0xffffffec,%eax
        case 0x221e: return 236;
ffffffff80004406:	be ec 00 00 00       	mov    $0xec,%esi
ffffffff8000440b:	e9 80 d6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004410:	b8 2d 00 00 00       	mov    $0x2d,%eax
        case 0x00ad: return 0x2d;
ffffffff80004415:	be 2d 00 00 00       	mov    $0x2d,%esi
ffffffff8000441a:	e9 71 d6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000441f:	b8 e4 ff ff ff       	mov    $0xffffffe4,%eax
        case 0x03a3: return 228;
ffffffff80004424:	be e4 00 00 00       	mov    $0xe4,%esi
ffffffff80004429:	e9 62 d6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000442e:	b8 ee ff ff ff       	mov    $0xffffffee,%eax
        case 0x03b5: return 238;
ffffffff80004433:	be ee 00 00 00       	mov    $0xee,%esi
ffffffff80004438:	e9 53 d6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
  if (ucs == 0)
ffffffff8000443d:	83 fa 1f             	cmp    $0x1f,%edx
ffffffff80004440:	0f 86 fa d3 ff ff    	jbe    ffffffff80001840 <flanterm_write+0x100>
  if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0))
ffffffff80004446:	83 ea 7f             	sub    $0x7f,%edx
ffffffff80004449:	83 fa 20             	cmp    $0x20,%edx
ffffffff8000444c:	0f 87 2a db ff ff    	ja     ffffffff80001f7c <flanterm_write+0x83c>
ffffffff80004452:	e9 e9 d3 ff ff       	jmp    ffffffff80001840 <flanterm_write+0x100>
            ctx->set_cursor_pos(ctx, ctx->saved_cursor_x, ctx->saved_cursor_y);
ffffffff80004457:	49 8b 94 24 60 01 00 	mov    0x160(%r12),%rdx
ffffffff8000445e:	00 
ffffffff8000445f:	49 8b b4 24 58 01 00 	mov    0x158(%r12),%rsi
ffffffff80004466:	00 
ffffffff80004467:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000446a:	41 ff 94 24 10 02 00 	call   *0x210(%r12)
ffffffff80004471:	00 
            break;
ffffffff80004472:	e9 35 e6 ff ff       	jmp    ffffffff80002aac <flanterm_write+0x136c>
    switch (code_point) {
ffffffff80004477:	b8 1f 00 00 00       	mov    $0x1f,%eax
        case 0x25bc: return 31;
ffffffff8000447c:	be 1f 00 00 00       	mov    $0x1f,%esi
ffffffff80004481:	e9 0a d6 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004486:	b8 10 00 00 00       	mov    $0x10,%eax
        case 0x25ba: return 16;
ffffffff8000448b:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80004490:	e9 fb d5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004495:	b8 df ff ff ff       	mov    $0xffffffdf,%eax
        if (has_top && !has_bottom) return 0xdf; // ▀
ffffffff8000449a:	be df 00 00 00       	mov    $0xdf,%esi
ffffffff8000449f:	e9 ec d5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800044a4:	b8 ed ff ff ff       	mov    $0xffffffed,%eax
        case 0x03c6: return 237;
ffffffff800044a9:	be ed 00 00 00       	mov    $0xed,%esi
ffffffff800044ae:	e9 dd d5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800044b3:	b8 eb ff ff ff       	mov    $0xffffffeb,%eax
        case 0x03b4: return 235;
ffffffff800044b8:	be eb 00 00 00       	mov    $0xeb,%esi
ffffffff800044bd:	e9 ce d5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800044c2:	b8 03 00 00 00       	mov    $0x3,%eax
        case 0x2665: return 3;
ffffffff800044c7:	be 03 00 00 00       	mov    $0x3,%esi
ffffffff800044cc:	e9 bf d5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800044d1:	b8 ea ff ff ff       	mov    $0xffffffea,%eax
        case 0x03a9: return 234;
ffffffff800044d6:	be ea 00 00 00       	mov    $0xea,%esi
    switch (code_point) {
ffffffff800044db:	48 81 fa 26 21 00 00 	cmp    $0x2126,%rdx
ffffffff800044e2:	0f 84 a8 d5 ff ff    	je     ffffffff80001a90 <flanterm_write+0x350>
            int replacement_width = mk_wcwidth(ctx->code_point);
ffffffff800044e8:	89 d1                	mov    %edx,%ecx
  if (ucs < table[0].first || ucs > table[max].last)
ffffffff800044ea:	e9 90 db ff ff       	jmp    ffffffff8000207f <flanterm_write+0x93f>
    switch (code_point) {
ffffffff800044ef:	b8 8f ff ff ff       	mov    $0xffffff8f,%eax
        case 0x00c5: return 143;
ffffffff800044f4:	be 8f 00 00 00       	mov    $0x8f,%esi
    switch (code_point) {
ffffffff800044f9:	48 81 fa 2b 21 00 00 	cmp    $0x212b,%rdx
ffffffff80004500:	0f 84 8a d5 ff ff    	je     ffffffff80001a90 <flanterm_write+0x350>
            int replacement_width = mk_wcwidth(ctx->code_point);
ffffffff80004506:	89 d1                	mov    %edx,%ecx
  if (ucs < table[0].first || ucs > table[max].last)
ffffffff80004508:	e9 72 db ff ff       	jmp    ffffffff8000207f <flanterm_write+0x93f>
    switch (code_point) {
ffffffff8000450d:	b8 27 00 00 00       	mov    $0x27,%eax
        case 0x00b4: return 0x27;
ffffffff80004512:	be 27 00 00 00       	mov    $0x27,%esi
ffffffff80004517:	e9 74 d5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000451c:	b8 2d 00 00 00       	mov    $0x2d,%eax
        case 0x00ad: return 0x2d;
ffffffff80004521:	be 2d 00 00 00       	mov    $0x2d,%esi
ffffffff80004526:	e9 65 d5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000452b:	b8 13 00 00 00       	mov    $0x13,%eax
        case 0x203c: return 19;
ffffffff80004530:	be 13 00 00 00       	mov    $0x13,%esi
ffffffff80004535:	e9 56 d5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000453a:	b8 fa ff ff ff       	mov    $0xfffffffa,%eax
        case 0x00b7: return 250;
ffffffff8000453f:	be fa 00 00 00       	mov    $0xfa,%esi
ffffffff80004544:	e9 47 d5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004549:	b8 07 00 00 00       	mov    $0x7,%eax
        case 0x2022: return 7;
ffffffff8000454e:	be 07 00 00 00       	mov    $0x7,%esi
ffffffff80004553:	e9 38 d5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004558:	b8 22 00 00 00       	mov    $0x22,%eax
        case 0x00a8: return 0x22;
ffffffff8000455d:	be 22 00 00 00       	mov    $0x22,%esi
ffffffff80004562:	e9 29 d5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004567:	b8 0f 00 00 00       	mov    $0xf,%eax
        case 0x263c: return 15;
ffffffff8000456c:	be 0f 00 00 00       	mov    $0xf,%esi
ffffffff80004571:	e9 1a d5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004576:	b8 fa ff ff ff       	mov    $0xfffffffa,%eax
        case 0x00b7: return 250;
ffffffff8000457b:	be fa 00 00 00       	mov    $0xfa,%esi
ffffffff80004580:	e9 0b d5 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004585:	b8 22 00 00 00       	mov    $0x22,%eax
        case 0x00a8: return 0x22;
ffffffff8000458a:	be 22 00 00 00       	mov    $0x22,%esi
ffffffff8000458f:	e9 fc d4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004594:	b8 15 00 00 00       	mov    $0x15,%eax
        case 0x00a7: return 21;
ffffffff80004599:	be 15 00 00 00       	mov    $0x15,%esi
ffffffff8000459e:	e9 ed d4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800045a3:	b8 e1 ff ff ff       	mov    $0xffffffe1,%eax
        case 0x00df: return 225;
ffffffff800045a8:	be e1 00 00 00       	mov    $0xe1,%esi
ffffffff800045ad:	e9 de d4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800045b2:	b8 8f ff ff ff       	mov    $0xffffff8f,%eax
        case 0x00c5: return 143;
ffffffff800045b7:	be 8f 00 00 00       	mov    $0x8f,%esi
ffffffff800045bc:	e9 cf d4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800045c1:	b8 e2 ff ff ff       	mov    $0xffffffe2,%eax
        case 0x0393: return 226;
ffffffff800045c6:	be e2 00 00 00       	mov    $0xe2,%esi
ffffffff800045cb:	e9 c0 d4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800045d0:	b8 ed ff ff ff       	mov    $0xffffffed,%eax
        case 0x03c6: return 237;
ffffffff800045d5:	be ed 00 00 00       	mov    $0xed,%esi
ffffffff800045da:	e9 b1 d4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800045df:	b8 12 00 00 00       	mov    $0x12,%eax
        case 0x2195: return 18;
ffffffff800045e4:	be 12 00 00 00       	mov    $0x12,%esi
ffffffff800045e9:	e9 a2 d4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800045ee:	b8 7f 00 00 00       	mov    $0x7f,%eax
        case 0x2302: return 127;
ffffffff800045f3:	be 7f 00 00 00       	mov    $0x7f,%esi
ffffffff800045f8:	e9 93 d4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800045fd:	b8 c3 ff ff ff       	mov    $0xffffffc3,%eax
        case 0x251c: return 195;
ffffffff80004602:	be c3 00 00 00       	mov    $0xc3,%esi
ffffffff80004607:	e9 84 d4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000460c:	b8 b3 ff ff ff       	mov    $0xffffffb3,%eax
        case 0x2502: return 179;
ffffffff80004611:	be b3 00 00 00       	mov    $0xb3,%esi
ffffffff80004616:	e9 75 d4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000461b:	b8 11 00 00 00       	mov    $0x11,%eax
        case 0x25c4: return 17;
ffffffff80004620:	be 11 00 00 00       	mov    $0x11,%esi
ffffffff80004625:	e9 66 d4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000462a:	b8 5f 00 00 00       	mov    $0x5f,%eax
        case 0x23bd: return 0x5f;
ffffffff8000462f:	be 5f 00 00 00       	mov    $0x5f,%esi
ffffffff80004634:	e9 57 d4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004639:	b8 c4 ff ff ff       	mov    $0xffffffc4,%eax
        case 0x2500: return 196;
ffffffff8000463e:	be c4 00 00 00       	mov    $0xc4,%esi
ffffffff80004643:	e9 48 d4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004648:	b8 b4 ff ff ff       	mov    $0xffffffb4,%eax
        case 0x2524: return 180;
ffffffff8000464d:	be b4 00 00 00       	mov    $0xb4,%esi
ffffffff80004652:	e9 39 d4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004657:	b8 b5 ff ff ff       	mov    $0xffffffb5,%eax
        case 0x2561: return 181;
ffffffff8000465c:	be b5 00 00 00       	mov    $0xb5,%esi
ffffffff80004661:	e9 2a d4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004666:	b8 ba ff ff ff       	mov    $0xffffffba,%eax
        case 0x2551: return 186;
ffffffff8000466b:	be ba 00 00 00       	mov    $0xba,%esi
ffffffff80004670:	e9 1b d4 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004675:	48 81 fa 14 27 00 00 	cmp    $0x2714,%rdx
ffffffff8000467c:	77 2d                	ja     ffffffff800046ab <flanterm_write+0x2f6b>
ffffffff8000467e:	b8 fb ff ff ff       	mov    $0xfffffffb,%eax
        case 0x221a: return 251;
ffffffff80004683:	be fb 00 00 00       	mov    $0xfb,%esi
    switch (code_point) {
ffffffff80004688:	48 81 fa 12 27 00 00 	cmp    $0x2712,%rdx
ffffffff8000468f:	0f 87 fb d3 ff ff    	ja     ffffffff80001a90 <flanterm_write+0x350>
            int replacement_width = mk_wcwidth(ctx->code_point);
ffffffff80004695:	89 d1                	mov    %edx,%ecx
  if (ucs < table[0].first || ucs > table[max].last)
ffffffff80004697:	e9 e3 d9 ff ff       	jmp    ffffffff8000207f <flanterm_write+0x93f>
    switch (code_point) {
ffffffff8000469c:	b8 b6 ff ff ff       	mov    $0xffffffb6,%eax
        case 0x2562: return 182;
ffffffff800046a1:	be b6 00 00 00       	mov    $0xb6,%esi
ffffffff800046a6:	e9 e5 d3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800046ab:	48 81 fa fd ff 00 00 	cmp    $0xfffd,%rdx
ffffffff800046b2:	0f 85 ff dc ff ff    	jne    ffffffff800023b7 <flanterm_write+0xc77>
ffffffff800046b8:	b8 fe ff ff ff       	mov    $0xfffffffe,%eax
        case 0x25a0: return 254;
ffffffff800046bd:	be fe 00 00 00       	mov    $0xfe,%esi
        if (cc == -1) {
ffffffff800046c2:	e9 c9 d3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800046c7:	b8 d9 ff ff ff       	mov    $0xffffffd9,%eax
        case 0x2518: return 217;
ffffffff800046cc:	be d9 00 00 00       	mov    $0xd9,%esi
ffffffff800046d1:	e9 ba d3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800046d6:	b8 c0 ff ff ff       	mov    $0xffffffc0,%eax
        case 0x2514: return 192;
ffffffff800046db:	be c0 00 00 00       	mov    $0xc0,%esi
ffffffff800046e0:	e9 ab d3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800046e5:	b8 bf ff ff ff       	mov    $0xffffffbf,%eax
        case 0x2510: return 191;
ffffffff800046ea:	be bf 00 00 00       	mov    $0xbf,%esi
ffffffff800046ef:	e9 9c d3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800046f4:	b8 da ff ff ff       	mov    $0xffffffda,%eax
        case 0x250c: return 218;
ffffffff800046f9:	be da 00 00 00       	mov    $0xda,%esi
ffffffff800046fe:	e9 8d d3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004703:	b8 ba ff ff ff       	mov    $0xffffffba,%eax
        case 0x2551: return 186;
ffffffff80004708:	be ba 00 00 00       	mov    $0xba,%esi
ffffffff8000470d:	e9 7e d3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004712:	b8 1f 00 00 00       	mov    $0x1f,%eax
        case 0x25bc: return 31;
ffffffff80004717:	be 1f 00 00 00       	mov    $0x1f,%esi
ffffffff8000471c:	e9 6f d3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004721:	b8 1e 00 00 00       	mov    $0x1e,%eax
        case 0x25b2: return 30;
ffffffff80004726:	be 1e 00 00 00       	mov    $0x1e,%esi
ffffffff8000472b:	e9 60 d3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004730:	b8 10 00 00 00       	mov    $0x10,%eax
        case 0x25ba: return 16;
ffffffff80004735:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000473a:	e9 51 d3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000473f:	b8 e6 ff ff ff       	mov    $0xffffffe6,%eax
        case 0x00b5: return 230;
ffffffff80004744:	be e6 00 00 00       	mov    $0xe6,%esi
ffffffff80004749:	e9 42 d3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000474e:	b8 ee ff ff ff       	mov    $0xffffffee,%eax
        case 0x03b5: return 238;
ffffffff80004753:	be ee 00 00 00       	mov    $0xee,%esi
ffffffff80004758:	e9 33 d3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000475d:	b8 eb ff ff ff       	mov    $0xffffffeb,%eax
        case 0x03b4: return 235;
ffffffff80004762:	be eb 00 00 00       	mov    $0xeb,%esi
ffffffff80004767:	e9 24 d3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000476c:	b8 e1 ff ff ff       	mov    $0xffffffe1,%eax
        case 0x00df: return 225;
ffffffff80004771:	be e1 00 00 00       	mov    $0xe1,%esi
ffffffff80004776:	e9 15 d3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000477b:	b8 07 00 00 00       	mov    $0x7,%eax
        case 0x2022: return 7;
ffffffff80004780:	be 07 00 00 00       	mov    $0x7,%esi
ffffffff80004785:	e9 06 d3 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff8000478a:	b8 fe ff ff ff       	mov    $0xfffffffe,%eax
        case 0x25a0: return 254;
ffffffff8000478f:	be fe 00 00 00       	mov    $0xfe,%esi
ffffffff80004794:	e9 f7 d2 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004799:	48 8d 8a 00 db ff ff 	lea    -0x2500(%rdx),%rcx
ffffffff800047a0:	48 83 f9 09          	cmp    $0x9,%rcx
ffffffff800047a4:	0f 87 b3 e3 ff ff    	ja     ffffffff80002b5d <flanterm_write+0x141d>
ffffffff800047aa:	b8 01 00 00 00       	mov    $0x1,%eax
ffffffff800047af:	48 d3 e0             	shl    %cl,%rax
ffffffff800047b2:	a9 33 03 00 00       	test   $0x333,%eax
ffffffff800047b7:	74 16                	je     ffffffff800047cf <flanterm_write+0x308f>
ffffffff800047b9:	b8 c4 ff ff ff       	mov    $0xffffffc4,%eax
        case 0x2500: return 196;
ffffffff800047be:	be c4 00 00 00       	mov    $0xc4,%esi
ffffffff800047c3:	e9 c8 d2 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
            int replacement_width = mk_wcwidth(ctx->code_point);
ffffffff800047c8:	89 d1                	mov    %edx,%ecx
  if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0))
ffffffff800047ca:	e9 9f d8 ff ff       	jmp    ffffffff8000206e <flanterm_write+0x92e>
    switch (code_point) {
ffffffff800047cf:	a8 cc                	test   $0xcc,%al
ffffffff800047d1:	0f 84 86 e3 ff ff    	je     ffffffff80002b5d <flanterm_write+0x141d>
ffffffff800047d7:	b8 b3 ff ff ff       	mov    $0xffffffb3,%eax
        case 0x2502: return 179;
ffffffff800047dc:	be b3 00 00 00       	mov    $0xb3,%esi
ffffffff800047e1:	e9 aa d2 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800047e6:	b8 e0 ff ff ff       	mov    $0xffffffe0,%eax
        case 0x03b1: return 224;
ffffffff800047eb:	be e0 00 00 00       	mov    $0xe0,%esi
ffffffff800047f0:	e9 9b d2 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff800047f5:	b8 ea ff ff ff       	mov    $0xffffffea,%eax
        case 0x03a9: return 234;
ffffffff800047fa:	be ea 00 00 00       	mov    $0xea,%esi
ffffffff800047ff:	e9 8c d2 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004804:	b8 e8 ff ff ff       	mov    $0xffffffe8,%eax
        case 0x03a6: return 232;
ffffffff80004809:	be e8 00 00 00       	mov    $0xe8,%esi
ffffffff8000480e:	e9 7d d2 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
    switch (code_point) {
ffffffff80004813:	b8 e4 ff ff ff       	mov    $0xffffffe4,%eax
        case 0x03a3: return 228;
ffffffff80004818:	be e4 00 00 00       	mov    $0xe4,%esi
ffffffff8000481d:	e9 6e d2 ff ff       	jmp    ffffffff80001a90 <flanterm_write+0x350>
ffffffff80004822:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80004829:	00 00 00 
ffffffff8000482c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff80004830 <flanterm_full_refresh>:
void flanterm_flush(struct flanterm_context *ctx) {
    ctx->double_buffer_flush(ctx);
}

void flanterm_full_refresh(struct flanterm_context *ctx) {
    ctx->full_refresh(ctx);
ffffffff80004830:	ff a7 a8 02 00 00    	jmp    *0x2a8(%rdi)
ffffffff80004836:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000483d:	00 00 00 

ffffffff80004840 <flanterm_get_dimensions>:
void flanterm_deinit(struct flanterm_context *ctx, void (*_free)(void *, size_t)) {
    ctx->deinit(ctx, _free);
}

void flanterm_get_dimensions(struct flanterm_context *ctx, size_t *cols, size_t *rows) {
    *cols = ctx->cols;
ffffffff80004840:	48 8b 87 f8 01 00 00 	mov    0x1f8(%rdi),%rax
ffffffff80004847:	48 89 06             	mov    %rax,(%rsi)
    *rows = ctx->rows;
ffffffff8000484a:	48 8b 87 f0 01 00 00 	mov    0x1f0(%rdi),%rax
ffffffff80004851:	48 89 02             	mov    %rax,(%rdx)
}
ffffffff80004854:	c3                   	ret
ffffffff80004855:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000485c:	00 00 00 
ffffffff8000485f:	90                   	nop

ffffffff80004860 <bump_alloc>:
static uint8_t bump_alloc_pool[FLANTERM_FB_BUMP_ALLOC_POOL_SIZE];
static size_t bump_alloc_ptr = 0;
static bool bump_alloc_base_offset_added = false;

static void *bump_alloc(size_t s) {
    if (!bump_alloc_base_offset_added) {
ffffffff80004860:	80 3d 9a 9a 02 00 00 	cmpb   $0x0,0x29a9a(%rip)        # ffffffff8002e301 <bump_alloc_base_offset_added>
ffffffff80004867:	75 07                	jne    ffffffff80004870 <bump_alloc+0x10>
        if ((uintptr_t)bump_alloc_pool & 0xf) {
            bump_alloc_ptr += 0x10 - ((uintptr_t)bump_alloc_pool & 0xf);
        }
        bump_alloc_base_offset_added = true;
ffffffff80004869:	c6 05 91 9a 02 00 01 	movb   $0x1,0x29a91(%rip)        # ffffffff8002e301 <bump_alloc_base_offset_added>
    }

    if ((s & 0xf) != 0) {
        s += 0x10;
        s &= ~(size_t)0xf;
ffffffff80004870:	48 8d 47 10          	lea    0x10(%rdi),%rax
ffffffff80004874:	48 83 e0 f0          	and    $0xfffffffffffffff0,%rax
ffffffff80004878:	40 f6 c7 0f          	test   $0xf,%dil
ffffffff8000487c:	48 0f 45 f8          	cmovne %rax,%rdi
    }

    size_t next_ptr = bump_alloc_ptr + s;
ffffffff80004880:	48 8b 05 81 9a 02 00 	mov    0x29a81(%rip),%rax        # ffffffff8002e308 <bump_alloc_ptr>
ffffffff80004887:	48 01 c7             	add    %rax,%rdi
    if (next_ptr > FLANTERM_FB_BUMP_ALLOC_POOL_SIZE) {
ffffffff8000488a:	48 81 ff 28 52 0d 00 	cmp    $0xd5228,%rdi
ffffffff80004891:	77 15                	ja     ffffffff800048a8 <bump_alloc+0x48>
        return NULL;
    }
    void *ret = &bump_alloc_pool[bump_alloc_ptr];
    bump_alloc_ptr = next_ptr;
ffffffff80004893:	48 89 3d 6e 9a 02 00 	mov    %rdi,0x29a6e(%rip)        # ffffffff8002e308 <bump_alloc_ptr>
    void *ret = &bump_alloc_pool[bump_alloc_ptr];
ffffffff8000489a:	48 05 20 e3 02 80    	add    $0xffffffff8002e320,%rax
    return ret;
ffffffff800048a0:	c3                   	ret
ffffffff800048a1:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        return NULL;
ffffffff800048a8:	31 c0                	xor    %eax,%eax
}
ffffffff800048aa:	c3                   	ret
ffffffff800048ab:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff800048b0 <flanterm_fb_save_state>:
    return ret;
}

static void flanterm_fb_save_state(struct flanterm_context *_ctx) {
    struct flanterm_fb_context *ctx = (void *)_ctx;
    ctx->saved_state_text_fg = ctx->text_fg;
ffffffff800048b0:	48 8b 87 08 04 00 00 	mov    0x408(%rdi),%rax
    ctx->saved_state_text_bg = ctx->text_bg;
    ctx->saved_state_cursor_x = ctx->cursor_x;
ffffffff800048b7:	48 8b 97 10 04 00 00 	mov    0x410(%rdi),%rdx
    ctx->saved_state_text_fg = ctx->text_fg;
ffffffff800048be:	48 89 87 20 04 00 00 	mov    %rax,0x420(%rdi)
    ctx->saved_state_cursor_x = ctx->cursor_x;
ffffffff800048c5:	48 8b 87 18 04 00 00 	mov    0x418(%rdi),%rax
ffffffff800048cc:	48 89 97 28 04 00 00 	mov    %rdx,0x428(%rdi)
ffffffff800048d3:	48 89 87 30 04 00 00 	mov    %rax,0x430(%rdi)
    ctx->saved_state_cursor_y = ctx->cursor_y;
}
ffffffff800048da:	c3                   	ret
ffffffff800048db:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff800048e0 <flanterm_fb_restore_state>:

static void flanterm_fb_restore_state(struct flanterm_context *_ctx) {
    struct flanterm_fb_context *ctx = (void *)_ctx;
    ctx->text_fg = ctx->saved_state_text_fg;
ffffffff800048e0:	48 8b 87 20 04 00 00 	mov    0x420(%rdi),%rax
    ctx->text_bg = ctx->saved_state_text_bg;
    ctx->cursor_x = ctx->saved_state_cursor_x;
ffffffff800048e7:	48 8b 97 28 04 00 00 	mov    0x428(%rdi),%rdx
    ctx->text_fg = ctx->saved_state_text_fg;
ffffffff800048ee:	48 89 87 08 04 00 00 	mov    %rax,0x408(%rdi)
    ctx->cursor_x = ctx->saved_state_cursor_x;
ffffffff800048f5:	48 8b 87 30 04 00 00 	mov    0x430(%rdi),%rax
ffffffff800048fc:	48 89 97 10 04 00 00 	mov    %rdx,0x410(%rdi)
ffffffff80004903:	48 89 87 18 04 00 00 	mov    %rax,0x418(%rdi)
    ctx->cursor_y = ctx->saved_state_cursor_y;
}
ffffffff8000490a:	c3                   	ret
ffffffff8000490b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80004910 <flanterm_fb_swap_palette>:

static void flanterm_fb_swap_palette(struct flanterm_context *_ctx) {
    struct flanterm_fb_context *ctx = (void *)_ctx;
    uint32_t tmp = ctx->text_bg;
ffffffff80004910:	8b 97 0c 04 00 00    	mov    0x40c(%rdi),%edx
    ctx->text_bg = ctx->text_fg;
    ctx->text_fg = tmp;
    if (ctx->text_fg == 0xffffffff) {
        ctx->text_fg = ctx->default_bg;
ffffffff80004916:	8b 8f b4 03 00 00    	mov    0x3b4(%rdi),%ecx
    ctx->text_bg = ctx->text_fg;
ffffffff8000491c:	8b 87 08 04 00 00    	mov    0x408(%rdi),%eax
        ctx->text_fg = ctx->default_bg;
ffffffff80004922:	83 fa ff             	cmp    $0xffffffff,%edx
ffffffff80004925:	0f 44 d1             	cmove  %ecx,%edx
    }
    if (ctx->text_bg == ctx->default_bg) {
        ctx->text_bg = 0xffffffff;
ffffffff80004928:	39 c8                	cmp    %ecx,%eax
        ctx->text_fg = ctx->default_bg;
ffffffff8000492a:	89 97 08 04 00 00    	mov    %edx,0x408(%rdi)
        ctx->text_bg = 0xffffffff;
ffffffff80004930:	ba ff ff ff ff       	mov    $0xffffffff,%edx
ffffffff80004935:	0f 44 c2             	cmove  %edx,%eax
ffffffff80004938:	89 87 0c 04 00 00    	mov    %eax,0x40c(%rdi)
    }
}
ffffffff8000493e:	c3                   	ret
ffffffff8000493f:	90                   	nop

ffffffff80004940 <push_to_queue>:

static inline bool compare_char(struct flanterm_fb_char *a, struct flanterm_fb_char *b) {
    return !(a->c != b->c || a->bg != b->bg || a->fg != b->fg);
}

static void push_to_queue(struct flanterm_context *_ctx, struct flanterm_fb_char *c, size_t x, size_t y) {
ffffffff80004940:	49 89 f1             	mov    %rsi,%r9
    struct flanterm_fb_context *ctx = (void *)_ctx;

    if (x >= _ctx->cols || y >= _ctx->rows) {
ffffffff80004943:	48 8b b7 f8 01 00 00 	mov    0x1f8(%rdi),%rsi
static void push_to_queue(struct flanterm_context *_ctx, struct flanterm_fb_char *c, size_t x, size_t y) {
ffffffff8000494a:	48 89 f8             	mov    %rdi,%rax
    if (x >= _ctx->cols || y >= _ctx->rows) {
ffffffff8000494d:	48 39 f2             	cmp    %rsi,%rdx
ffffffff80004950:	73 37                	jae    ffffffff80004989 <push_to_queue+0x49>
ffffffff80004952:	4c 8b 97 f0 01 00 00 	mov    0x1f0(%rdi),%r10
ffffffff80004959:	4c 39 d1             	cmp    %r10,%rcx
ffffffff8000495c:	73 2b                	jae    ffffffff80004989 <push_to_queue+0x49>
        return;
    }

    size_t i = y * _ctx->cols + x;
ffffffff8000495e:	49 89 f0             	mov    %rsi,%r8

    struct flanterm_fb_queue_item *q = ctx->map[i];
ffffffff80004961:	48 8b bf 00 04 00 00 	mov    0x400(%rdi),%rdi
    size_t i = y * _ctx->cols + x;
ffffffff80004968:	4c 0f af c1          	imul   %rcx,%r8
ffffffff8000496c:	49 01 d0             	add    %rdx,%r8
    struct flanterm_fb_queue_item *q = ctx->map[i];
ffffffff8000496f:	4e 8d 1c c7          	lea    (%rdi,%r8,8),%r11
ffffffff80004973:	49 8b 3b             	mov    (%r11),%rdi

    if (q == NULL) {
ffffffff80004976:	48 85 ff             	test   %rdi,%rdi
ffffffff80004979:	74 15                	je     ffffffff80004990 <push_to_queue+0x50>
        q->x = x;
        q->y = y;
        ctx->map[i] = q;
    }

    q->c = *c;
ffffffff8000497b:	49 8b 01             	mov    (%r9),%rax
ffffffff8000497e:	48 89 47 10          	mov    %rax,0x10(%rdi)
ffffffff80004982:	41 8b 41 08          	mov    0x8(%r9),%eax
ffffffff80004986:	89 47 18             	mov    %eax,0x18(%rdi)
}
ffffffff80004989:	c3                   	ret
ffffffff8000498a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        if (compare_char(&ctx->grid[i], c)) {
ffffffff80004990:	48 8b b8 e8 03 00 00 	mov    0x3e8(%rax),%rdi
ffffffff80004997:	4f 8d 04 40          	lea    (%r8,%r8,2),%r8
ffffffff8000499b:	4a 8d 3c 87          	lea    (%rdi,%r8,4),%rdi
    return !(a->c != b->c || a->bg != b->bg || a->fg != b->fg);
ffffffff8000499f:	45 8b 01             	mov    (%r9),%r8d
ffffffff800049a2:	44 39 07             	cmp    %r8d,(%rdi)
ffffffff800049a5:	74 39                	je     ffffffff800049e0 <push_to_queue+0xa0>
        if (ctx->queue_i == _ctx->rows * _ctx->cols) {
ffffffff800049a7:	49 0f af f2          	imul   %r10,%rsi
ffffffff800049ab:	48 8b b8 f8 03 00 00 	mov    0x3f8(%rax),%rdi
ffffffff800049b2:	48 39 f7             	cmp    %rsi,%rdi
ffffffff800049b5:	74 d2                	je     ffffffff80004989 <push_to_queue+0x49>
        q = &ctx->queue[ctx->queue_i++];
ffffffff800049b7:	48 8d 77 01          	lea    0x1(%rdi),%rsi
ffffffff800049bb:	48 c1 e7 05          	shl    $0x5,%rdi
ffffffff800049bf:	48 03 b8 f0 03 00 00 	add    0x3f0(%rax),%rdi
ffffffff800049c6:	48 89 b0 f8 03 00 00 	mov    %rsi,0x3f8(%rax)
        q->x = x;
ffffffff800049cd:	48 89 17             	mov    %rdx,(%rdi)
        q->y = y;
ffffffff800049d0:	48 89 4f 08          	mov    %rcx,0x8(%rdi)
        ctx->map[i] = q;
ffffffff800049d4:	49 89 3b             	mov    %rdi,(%r11)
ffffffff800049d7:	eb a2                	jmp    ffffffff8000497b <push_to_queue+0x3b>
ffffffff800049d9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
    return !(a->c != b->c || a->bg != b->bg || a->fg != b->fg);
ffffffff800049e0:	45 8b 41 08          	mov    0x8(%r9),%r8d
ffffffff800049e4:	44 39 47 08          	cmp    %r8d,0x8(%rdi)
ffffffff800049e8:	75 bd                	jne    ffffffff800049a7 <push_to_queue+0x67>
ffffffff800049ea:	45 8b 41 04          	mov    0x4(%r9),%r8d
ffffffff800049ee:	44 39 47 04          	cmp    %r8d,0x4(%rdi)
ffffffff800049f2:	75 b3                	jne    ffffffff800049a7 <push_to_queue+0x67>
}
ffffffff800049f4:	c3                   	ret
ffffffff800049f5:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800049fc:	00 00 00 
ffffffff800049ff:	90                   	nop

ffffffff80004a00 <flanterm_fb_revscroll>:

static void flanterm_fb_revscroll(struct flanterm_context *_ctx) {
ffffffff80004a00:	55                   	push   %rbp
ffffffff80004a01:	48 89 e5             	mov    %rsp,%rbp
ffffffff80004a04:	41 57                	push   %r15
ffffffff80004a06:	41 56                	push   %r14
ffffffff80004a08:	41 55                	push   %r13
ffffffff80004a0a:	41 54                	push   %r12
ffffffff80004a0c:	49 89 fc             	mov    %rdi,%r12
ffffffff80004a0f:	53                   	push   %rbx
ffffffff80004a10:	48 83 ec 28          	sub    $0x28,%rsp
    struct flanterm_fb_context *ctx = (void *)_ctx;

    size_t start = _ctx->scroll_top_margin * _ctx->cols;
ffffffff80004a14:	48 8b 87 78 01 00 00 	mov    0x178(%rdi),%rax
ffffffff80004a1b:	48 8b 9f f8 01 00 00 	mov    0x1f8(%rdi),%rbx
ffffffff80004a22:	49 89 c6             	mov    %rax,%r14
ffffffff80004a25:	48 89 45 b8          	mov    %rax,-0x48(%rbp)
    size_t end = (_ctx->scroll_bottom_margin - 1) * _ctx->cols;
ffffffff80004a29:	48 8b 87 80 01 00 00 	mov    0x180(%rdi),%rax
    size_t start = _ctx->scroll_top_margin * _ctx->cols;
ffffffff80004a30:	4c 0f af f3          	imul   %rbx,%r14
    size_t end = (_ctx->scroll_bottom_margin - 1) * _ctx->cols;
ffffffff80004a34:	4c 8d 40 ff          	lea    -0x1(%rax),%r8
ffffffff80004a38:	4c 0f af c3          	imul   %rbx,%r8
    for (size_t i = end; i > start; ) {
ffffffff80004a3c:	4d 39 c6             	cmp    %r8,%r14
ffffffff80004a3f:	73 4f                	jae    ffffffff80004a90 <flanterm_fb_revscroll+0x90>
        i--;
        struct flanterm_fb_char *c;
        struct flanterm_fb_queue_item *q = ctx->map[i];
ffffffff80004a41:	4c 8b bf 00 04 00 00 	mov    0x400(%rdi),%r15
ffffffff80004a48:	4d 89 c5             	mov    %r8,%r13
ffffffff80004a4b:	eb 20                	jmp    ffffffff80004a6d <flanterm_fb_revscroll+0x6d>
ffffffff80004a4d:	0f 1f 00             	nopl   (%rax)
        if (q != NULL) {
            c = &q->c;
ffffffff80004a50:	48 83 c6 10          	add    $0x10,%rsi
        } else {
            c = &ctx->grid[i];
        }
        push_to_queue(_ctx, c, (i + _ctx->cols) % _ctx->cols, (i + _ctx->cols) / _ctx->cols);
ffffffff80004a54:	31 d2                	xor    %edx,%edx
ffffffff80004a56:	4a 8d 04 2b          	lea    (%rbx,%r13,1),%rax
ffffffff80004a5a:	4c 89 e7             	mov    %r12,%rdi
ffffffff80004a5d:	48 f7 f3             	div    %rbx
ffffffff80004a60:	48 89 c1             	mov    %rax,%rcx
ffffffff80004a63:	e8 d8 fe ff ff       	call   ffffffff80004940 <push_to_queue>
    for (size_t i = end; i > start; ) {
ffffffff80004a68:	4d 39 ee             	cmp    %r13,%r14
ffffffff80004a6b:	74 23                	je     ffffffff80004a90 <flanterm_fb_revscroll+0x90>
        i--;
ffffffff80004a6d:	49 83 ed 01          	sub    $0x1,%r13
        struct flanterm_fb_queue_item *q = ctx->map[i];
ffffffff80004a71:	4b 8b 34 ef          	mov    (%r15,%r13,8),%rsi
        if (q != NULL) {
ffffffff80004a75:	48 85 f6             	test   %rsi,%rsi
ffffffff80004a78:	75 d6                	jne    ffffffff80004a50 <flanterm_fb_revscroll+0x50>
            c = &ctx->grid[i];
ffffffff80004a7a:	49 8b 94 24 e8 03 00 	mov    0x3e8(%r12),%rdx
ffffffff80004a81:	00 
ffffffff80004a82:	4b 8d 44 6d 00       	lea    0x0(%r13,%r13,2),%rax
ffffffff80004a87:	48 8d 34 82          	lea    (%rdx,%rax,4),%rsi
ffffffff80004a8b:	eb c7                	jmp    ffffffff80004a54 <flanterm_fb_revscroll+0x54>
ffffffff80004a8d:	0f 1f 00             	nopl   (%rax)
    }

    // Clear the first line of the screen.
    struct flanterm_fb_char empty;
    empty.c  = ' ';
    empty.fg = ctx->text_fg;
ffffffff80004a90:	49 8b 84 24 08 04 00 	mov    0x408(%r12),%rax
ffffffff80004a97:	00 
    empty.c  = ' ';
ffffffff80004a98:	c7 45 c4 20 00 00 00 	movl   $0x20,-0x3c(%rbp)
    empty.bg = ctx->text_bg;
    for (size_t i = 0; i < _ctx->cols; i++) {
ffffffff80004a9f:	31 d2                	xor    %edx,%edx
ffffffff80004aa1:	4c 8d 75 c4          	lea    -0x3c(%rbp),%r14
    empty.fg = ctx->text_fg;
ffffffff80004aa5:	48 89 45 c8          	mov    %rax,-0x38(%rbp)
    for (size_t i = 0; i < _ctx->cols; i++) {
ffffffff80004aa9:	48 85 db             	test   %rbx,%rbx
ffffffff80004aac:	74 1a                	je     ffffffff80004ac8 <flanterm_fb_revscroll+0xc8>
ffffffff80004aae:	66 90                	xchg   %ax,%ax
        push_to_queue(_ctx, &empty, i, _ctx->scroll_top_margin);
ffffffff80004ab0:	48 8b 4d b8          	mov    -0x48(%rbp),%rcx
ffffffff80004ab4:	4c 89 f6             	mov    %r14,%rsi
ffffffff80004ab7:	4c 89 e7             	mov    %r12,%rdi
ffffffff80004aba:	e8 81 fe ff ff       	call   ffffffff80004940 <push_to_queue>
    for (size_t i = 0; i < _ctx->cols; i++) {
ffffffff80004abf:	48 83 c2 01          	add    $0x1,%rdx
ffffffff80004ac3:	48 39 d3             	cmp    %rdx,%rbx
ffffffff80004ac6:	75 e8                	jne    ffffffff80004ab0 <flanterm_fb_revscroll+0xb0>
    }
}
ffffffff80004ac8:	48 83 c4 28          	add    $0x28,%rsp
ffffffff80004acc:	5b                   	pop    %rbx
ffffffff80004acd:	41 5c                	pop    %r12
ffffffff80004acf:	41 5d                	pop    %r13
ffffffff80004ad1:	41 5e                	pop    %r14
ffffffff80004ad3:	41 5f                	pop    %r15
ffffffff80004ad5:	5d                   	pop    %rbp
ffffffff80004ad6:	c3                   	ret
ffffffff80004ad7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff80004ade:	00 00 

ffffffff80004ae0 <flanterm_fb_scroll>:

static void flanterm_fb_scroll(struct flanterm_context *_ctx) {
ffffffff80004ae0:	55                   	push   %rbp
ffffffff80004ae1:	48 89 e5             	mov    %rsp,%rbp
ffffffff80004ae4:	41 57                	push   %r15
ffffffff80004ae6:	41 56                	push   %r14
ffffffff80004ae8:	41 55                	push   %r13
ffffffff80004aea:	41 54                	push   %r12
ffffffff80004aec:	49 89 fc             	mov    %rdi,%r12
ffffffff80004aef:	53                   	push   %rbx
ffffffff80004af0:	48 83 ec 28          	sub    $0x28,%rsp
    struct flanterm_fb_context *ctx = (void *)_ctx;

    for (size_t i = (_ctx->scroll_top_margin + 1) * _ctx->cols;
ffffffff80004af4:	48 8b 9f f8 01 00 00 	mov    0x1f8(%rdi),%rbx
ffffffff80004afb:	48 8b 87 78 01 00 00 	mov    0x178(%rdi),%rax
         i < _ctx->scroll_bottom_margin * _ctx->cols; i++) {
ffffffff80004b02:	48 8b bf 80 01 00 00 	mov    0x180(%rdi),%rdi
    for (size_t i = (_ctx->scroll_top_margin + 1) * _ctx->cols;
ffffffff80004b09:	48 83 c0 01          	add    $0x1,%rax
         i < _ctx->scroll_bottom_margin * _ctx->cols; i++) {
ffffffff80004b0d:	49 89 fe             	mov    %rdi,%r14
    for (size_t i = (_ctx->scroll_top_margin + 1) * _ctx->cols;
ffffffff80004b10:	48 0f af c3          	imul   %rbx,%rax
         i < _ctx->scroll_bottom_margin * _ctx->cols; i++) {
ffffffff80004b14:	48 89 7d b0          	mov    %rdi,-0x50(%rbp)
ffffffff80004b18:	4c 0f af f3          	imul   %rbx,%r14
ffffffff80004b1c:	4c 39 f0             	cmp    %r14,%rax
ffffffff80004b1f:	73 6f                	jae    ffffffff80004b90 <flanterm_fb_scroll+0xb0>
ffffffff80004b21:	49 89 c7             	mov    %rax,%r15
ffffffff80004b24:	4c 8d 0c 40          	lea    (%rax,%rax,2),%r9
ffffffff80004b28:	49 8b 84 24 00 04 00 	mov    0x400(%r12),%rax
ffffffff80004b2f:	00 
ffffffff80004b30:	49 29 de             	sub    %rbx,%r14
ffffffff80004b33:	49 29 df             	sub    %rbx,%r15
ffffffff80004b36:	4e 8d 2c 8d 00 00 00 	lea    0x0(,%r9,4),%r13
ffffffff80004b3d:	00 
ffffffff80004b3e:	48 8d 04 d8          	lea    (%rax,%rbx,8),%rax
ffffffff80004b42:	48 89 45 b8          	mov    %rax,-0x48(%rbp)
ffffffff80004b46:	eb 2c                	jmp    ffffffff80004b74 <flanterm_fb_scroll+0x94>
ffffffff80004b48:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80004b4f:	00 
        struct flanterm_fb_char *c;
        struct flanterm_fb_queue_item *q = ctx->map[i];
        if (q != NULL) {
            c = &q->c;
ffffffff80004b50:	48 83 c6 10          	add    $0x10,%rsi
        } else {
            c = &ctx->grid[i];
        }
        push_to_queue(_ctx, c, (i - _ctx->cols) % _ctx->cols, (i - _ctx->cols) / _ctx->cols);
ffffffff80004b54:	4c 89 f8             	mov    %r15,%rax
ffffffff80004b57:	31 d2                	xor    %edx,%edx
ffffffff80004b59:	4c 89 e7             	mov    %r12,%rdi
         i < _ctx->scroll_bottom_margin * _ctx->cols; i++) {
ffffffff80004b5c:	49 83 c7 01          	add    $0x1,%r15
ffffffff80004b60:	48 f7 f3             	div    %rbx
ffffffff80004b63:	49 83 c5 0c          	add    $0xc,%r13
ffffffff80004b67:	48 89 c1             	mov    %rax,%rcx
        push_to_queue(_ctx, c, (i - _ctx->cols) % _ctx->cols, (i - _ctx->cols) / _ctx->cols);
ffffffff80004b6a:	e8 d1 fd ff ff       	call   ffffffff80004940 <push_to_queue>
         i < _ctx->scroll_bottom_margin * _ctx->cols; i++) {
ffffffff80004b6f:	4d 39 fe             	cmp    %r15,%r14
ffffffff80004b72:	74 1c                	je     ffffffff80004b90 <flanterm_fb_scroll+0xb0>
        struct flanterm_fb_queue_item *q = ctx->map[i];
ffffffff80004b74:	48 8b 45 b8          	mov    -0x48(%rbp),%rax
ffffffff80004b78:	4a 8b 34 f8          	mov    (%rax,%r15,8),%rsi
        if (q != NULL) {
ffffffff80004b7c:	48 85 f6             	test   %rsi,%rsi
ffffffff80004b7f:	75 cf                	jne    ffffffff80004b50 <flanterm_fb_scroll+0x70>
            c = &ctx->grid[i];
ffffffff80004b81:	49 8b b4 24 e8 03 00 	mov    0x3e8(%r12),%rsi
ffffffff80004b88:	00 
ffffffff80004b89:	4c 01 ee             	add    %r13,%rsi
ffffffff80004b8c:	eb c6                	jmp    ffffffff80004b54 <flanterm_fb_scroll+0x74>
ffffffff80004b8e:	66 90                	xchg   %ax,%ax
    }

    // Clear the last line of the screen.
    struct flanterm_fb_char empty;
    empty.c  = ' ';
    empty.fg = ctx->text_fg;
ffffffff80004b90:	49 8b 84 24 08 04 00 	mov    0x408(%r12),%rax
ffffffff80004b97:	00 
    empty.bg = ctx->text_bg;
    for (size_t i = 0; i < _ctx->cols; i++) {
        push_to_queue(_ctx, &empty, i, _ctx->scroll_bottom_margin - 1);
ffffffff80004b98:	4c 8b 6d b0          	mov    -0x50(%rbp),%r13
    empty.c  = ' ';
ffffffff80004b9c:	c7 45 c4 20 00 00 00 	movl   $0x20,-0x3c(%rbp)
    for (size_t i = 0; i < _ctx->cols; i++) {
ffffffff80004ba3:	31 d2                	xor    %edx,%edx
ffffffff80004ba5:	4c 8d 75 c4          	lea    -0x3c(%rbp),%r14
    empty.fg = ctx->text_fg;
ffffffff80004ba9:	48 89 45 c8          	mov    %rax,-0x38(%rbp)
        push_to_queue(_ctx, &empty, i, _ctx->scroll_bottom_margin - 1);
ffffffff80004bad:	49 83 ed 01          	sub    $0x1,%r13
    for (size_t i = 0; i < _ctx->cols; i++) {
ffffffff80004bb1:	48 85 db             	test   %rbx,%rbx
ffffffff80004bb4:	74 21                	je     ffffffff80004bd7 <flanterm_fb_scroll+0xf7>
ffffffff80004bb6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80004bbd:	00 00 00 
        push_to_queue(_ctx, &empty, i, _ctx->scroll_bottom_margin - 1);
ffffffff80004bc0:	4c 89 e9             	mov    %r13,%rcx
ffffffff80004bc3:	4c 89 f6             	mov    %r14,%rsi
ffffffff80004bc6:	4c 89 e7             	mov    %r12,%rdi
ffffffff80004bc9:	e8 72 fd ff ff       	call   ffffffff80004940 <push_to_queue>
    for (size_t i = 0; i < _ctx->cols; i++) {
ffffffff80004bce:	48 83 c2 01          	add    $0x1,%rdx
ffffffff80004bd2:	48 39 d3             	cmp    %rdx,%rbx
ffffffff80004bd5:	75 e9                	jne    ffffffff80004bc0 <flanterm_fb_scroll+0xe0>
    }
}
ffffffff80004bd7:	48 83 c4 28          	add    $0x28,%rsp
ffffffff80004bdb:	5b                   	pop    %rbx
ffffffff80004bdc:	41 5c                	pop    %r12
ffffffff80004bde:	41 5d                	pop    %r13
ffffffff80004be0:	41 5e                	pop    %r14
ffffffff80004be2:	41 5f                	pop    %r15
ffffffff80004be4:	5d                   	pop    %rbp
ffffffff80004be5:	c3                   	ret
ffffffff80004be6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80004bed:	00 00 00 

ffffffff80004bf0 <flanterm_fb_clear>:

static void flanterm_fb_clear(struct flanterm_context *_ctx, bool move) {
ffffffff80004bf0:	55                   	push   %rbp
ffffffff80004bf1:	48 89 e5             	mov    %rsp,%rbp
ffffffff80004bf4:	41 57                	push   %r15
ffffffff80004bf6:	41 56                	push   %r14
ffffffff80004bf8:	41 55                	push   %r13
ffffffff80004bfa:	41 54                	push   %r12
ffffffff80004bfc:	49 89 fc             	mov    %rdi,%r12
ffffffff80004bff:	53                   	push   %rbx
ffffffff80004c00:	48 83 ec 28          	sub    $0x28,%rsp

    struct flanterm_fb_char empty;
    empty.c  = ' ';
    empty.fg = ctx->text_fg;
    empty.bg = ctx->text_bg;
    for (size_t i = 0; i < _ctx->rows * _ctx->cols; i++) {
ffffffff80004c04:	48 8b 9f f8 01 00 00 	mov    0x1f8(%rdi),%rbx
ffffffff80004c0b:	4c 8b af f0 01 00 00 	mov    0x1f0(%rdi),%r13
static void flanterm_fb_clear(struct flanterm_context *_ctx, bool move) {
ffffffff80004c12:	89 75 bc             	mov    %esi,-0x44(%rbp)
    empty.fg = ctx->text_fg;
ffffffff80004c15:	48 8b 87 08 04 00 00 	mov    0x408(%rdi),%rax
    empty.c  = ' ';
ffffffff80004c1c:	c7 45 c4 20 00 00 00 	movl   $0x20,-0x3c(%rbp)
    for (size_t i = 0; i < _ctx->rows * _ctx->cols; i++) {
ffffffff80004c23:	4c 0f af eb          	imul   %rbx,%r13
    empty.fg = ctx->text_fg;
ffffffff80004c27:	48 89 45 c8          	mov    %rax,-0x38(%rbp)
    for (size_t i = 0; i < _ctx->rows * _ctx->cols; i++) {
ffffffff80004c2b:	4d 85 ed             	test   %r13,%r13
ffffffff80004c2e:	74 2f                	je     ffffffff80004c5f <flanterm_fb_clear+0x6f>
ffffffff80004c30:	45 31 ff             	xor    %r15d,%r15d
ffffffff80004c33:	4c 8d 75 c4          	lea    -0x3c(%rbp),%r14
ffffffff80004c37:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff80004c3e:	00 00 
        push_to_queue(_ctx, &empty, i % _ctx->cols, i / _ctx->cols);
ffffffff80004c40:	4c 89 f8             	mov    %r15,%rax
ffffffff80004c43:	31 d2                	xor    %edx,%edx
ffffffff80004c45:	4c 89 f6             	mov    %r14,%rsi
ffffffff80004c48:	4c 89 e7             	mov    %r12,%rdi
ffffffff80004c4b:	48 f7 f3             	div    %rbx
    for (size_t i = 0; i < _ctx->rows * _ctx->cols; i++) {
ffffffff80004c4e:	49 83 c7 01          	add    $0x1,%r15
ffffffff80004c52:	48 89 c1             	mov    %rax,%rcx
        push_to_queue(_ctx, &empty, i % _ctx->cols, i / _ctx->cols);
ffffffff80004c55:	e8 e6 fc ff ff       	call   ffffffff80004940 <push_to_queue>
    for (size_t i = 0; i < _ctx->rows * _ctx->cols; i++) {
ffffffff80004c5a:	4d 39 ef             	cmp    %r13,%r15
ffffffff80004c5d:	75 e1                	jne    ffffffff80004c40 <flanterm_fb_clear+0x50>
    }

    if (move) {
ffffffff80004c5f:	80 7d bc 00          	cmpb   $0x0,-0x44(%rbp)
ffffffff80004c63:	74 18                	je     ffffffff80004c7d <flanterm_fb_clear+0x8d>
        ctx->cursor_x = 0;
ffffffff80004c65:	49 c7 84 24 10 04 00 	movq   $0x0,0x410(%r12)
ffffffff80004c6c:	00 00 00 00 00 
        ctx->cursor_y = 0;
ffffffff80004c71:	49 c7 84 24 18 04 00 	movq   $0x0,0x418(%r12)
ffffffff80004c78:	00 00 00 00 00 
    }
}
ffffffff80004c7d:	48 83 c4 28          	add    $0x28,%rsp
ffffffff80004c81:	5b                   	pop    %rbx
ffffffff80004c82:	41 5c                	pop    %r12
ffffffff80004c84:	41 5d                	pop    %r13
ffffffff80004c86:	41 5e                	pop    %r14
ffffffff80004c88:	41 5f                	pop    %r15
ffffffff80004c8a:	5d                   	pop    %rbp
ffffffff80004c8b:	c3                   	ret
ffffffff80004c8c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff80004c90 <flanterm_fb_set_cursor_pos>:

static void flanterm_fb_set_cursor_pos(struct flanterm_context *_ctx, size_t x, size_t y) {
    struct flanterm_fb_context *ctx = (void *)_ctx;

    if (x >= _ctx->cols) {
ffffffff80004c90:	48 8b 87 f8 01 00 00 	mov    0x1f8(%rdi),%rax
ffffffff80004c97:	48 39 c6             	cmp    %rax,%rsi
ffffffff80004c9a:	72 10                	jb     ffffffff80004cac <flanterm_fb_set_cursor_pos+0x1c>
        if (x > SIZE_MAX / 2) {
            x = 0;
        } else {
            x = _ctx->cols - 1;
ffffffff80004c9c:	48 83 e8 01          	sub    $0x1,%rax
ffffffff80004ca0:	48 85 f6             	test   %rsi,%rsi
ffffffff80004ca3:	be 00 00 00 00       	mov    $0x0,%esi
ffffffff80004ca8:	48 0f 49 f0          	cmovns %rax,%rsi
        }
    }
    if (y >= _ctx->rows) {
ffffffff80004cac:	48 8b 87 f0 01 00 00 	mov    0x1f0(%rdi),%rax
ffffffff80004cb3:	48 39 c2             	cmp    %rax,%rdx
ffffffff80004cb6:	72 10                	jb     ffffffff80004cc8 <flanterm_fb_set_cursor_pos+0x38>
        if (y > SIZE_MAX / 2) {
            y = 0;
        } else {
            y = _ctx->rows - 1;
ffffffff80004cb8:	48 83 e8 01          	sub    $0x1,%rax
ffffffff80004cbc:	48 85 d2             	test   %rdx,%rdx
ffffffff80004cbf:	ba 00 00 00 00       	mov    $0x0,%edx
ffffffff80004cc4:	48 0f 49 d0          	cmovns %rax,%rdx
        }
    }
    ctx->cursor_x = x;
ffffffff80004cc8:	48 89 b7 10 04 00 00 	mov    %rsi,0x410(%rdi)
    ctx->cursor_y = y;
ffffffff80004ccf:	48 89 97 18 04 00 00 	mov    %rdx,0x418(%rdi)
}
ffffffff80004cd6:	c3                   	ret
ffffffff80004cd7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff80004cde:	00 00 

ffffffff80004ce0 <flanterm_fb_get_cursor_pos>:

static void flanterm_fb_get_cursor_pos(struct flanterm_context *_ctx, size_t *x, size_t *y) {
    struct flanterm_fb_context *ctx = (void *)_ctx;

    *x = ctx->cursor_x >= _ctx->cols ? _ctx->cols - 1 : ctx->cursor_x;
ffffffff80004ce0:	48 8b 87 10 04 00 00 	mov    0x410(%rdi),%rax
static void flanterm_fb_get_cursor_pos(struct flanterm_context *_ctx, size_t *x, size_t *y) {
ffffffff80004ce7:	48 89 d1             	mov    %rdx,%rcx
    *x = ctx->cursor_x >= _ctx->cols ? _ctx->cols - 1 : ctx->cursor_x;
ffffffff80004cea:	48 8b 97 f8 01 00 00 	mov    0x1f8(%rdi),%rdx
ffffffff80004cf1:	48 39 d0             	cmp    %rdx,%rax
ffffffff80004cf4:	4c 8d 42 ff          	lea    -0x1(%rdx),%r8
ffffffff80004cf8:	49 0f 43 c0          	cmovae %r8,%rax
ffffffff80004cfc:	48 89 06             	mov    %rax,(%rsi)
    *y = ctx->cursor_y >= _ctx->rows ? _ctx->rows - 1 : ctx->cursor_y;
ffffffff80004cff:	48 8b 87 18 04 00 00 	mov    0x418(%rdi),%rax
ffffffff80004d06:	48 8b 97 f0 01 00 00 	mov    0x1f0(%rdi),%rdx
ffffffff80004d0d:	48 8d 72 ff          	lea    -0x1(%rdx),%rsi
ffffffff80004d11:	48 39 d0             	cmp    %rdx,%rax
ffffffff80004d14:	48 0f 43 c6          	cmovae %rsi,%rax
ffffffff80004d18:	48 89 01             	mov    %rax,(%rcx)
}
ffffffff80004d1b:	c3                   	ret
ffffffff80004d1c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff80004d20 <flanterm_fb_move_character>:

static void flanterm_fb_move_character(struct flanterm_context *_ctx, size_t new_x, size_t new_y, size_t old_x, size_t old_y) {
    struct flanterm_fb_context *ctx = (void *)_ctx;

    if (old_x >= _ctx->cols || old_y >= _ctx->rows
ffffffff80004d20:	48 8b 87 f8 01 00 00 	mov    0x1f8(%rdi),%rax
ffffffff80004d27:	48 39 c1             	cmp    %rax,%rcx
ffffffff80004d2a:	73 1f                	jae    ffffffff80004d4b <flanterm_fb_move_character+0x2b>
ffffffff80004d2c:	4c 8b 97 f0 01 00 00 	mov    0x1f0(%rdi),%r10
     || new_x >= _ctx->cols || new_y >= _ctx->rows) {
ffffffff80004d33:	48 39 c6             	cmp    %rax,%rsi
ffffffff80004d36:	41 0f 93 c1          	setae  %r9b
    if (old_x >= _ctx->cols || old_y >= _ctx->rows
ffffffff80004d3a:	4d 39 d0             	cmp    %r10,%r8
ffffffff80004d3d:	41 0f 93 c3          	setae  %r11b
     || new_x >= _ctx->cols || new_y >= _ctx->rows) {
ffffffff80004d41:	45 08 d9             	or     %r11b,%r9b
ffffffff80004d44:	75 05                	jne    ffffffff80004d4b <flanterm_fb_move_character+0x2b>
ffffffff80004d46:	4c 39 d2             	cmp    %r10,%rdx
ffffffff80004d49:	72 05                	jb     ffffffff80004d50 <flanterm_fb_move_character+0x30>
    } else {
        c = &ctx->grid[i];
    }

    push_to_queue(_ctx, c, new_x, new_y);
}
ffffffff80004d4b:	c3                   	ret
ffffffff80004d4c:	0f 1f 40 00          	nopl   0x0(%rax)
    size_t i = old_x + old_y * _ctx->cols;
ffffffff80004d50:	49 0f af c0          	imul   %r8,%rax
ffffffff80004d54:	48 01 c8             	add    %rcx,%rax
    struct flanterm_fb_queue_item *q = ctx->map[i];
ffffffff80004d57:	48 8b 8f 00 04 00 00 	mov    0x400(%rdi),%rcx
ffffffff80004d5e:	48 8b 0c c1          	mov    (%rcx,%rax,8),%rcx
    if (q != NULL) {
ffffffff80004d62:	48 85 c9             	test   %rcx,%rcx
ffffffff80004d65:	74 19                	je     ffffffff80004d80 <flanterm_fb_move_character+0x60>
        c = &q->c;
ffffffff80004d67:	48 8d 41 10          	lea    0x10(%rcx),%rax
    push_to_queue(_ctx, c, new_x, new_y);
ffffffff80004d6b:	48 89 d1             	mov    %rdx,%rcx
ffffffff80004d6e:	48 89 f2             	mov    %rsi,%rdx
ffffffff80004d71:	48 89 c6             	mov    %rax,%rsi
ffffffff80004d74:	e9 c7 fb ff ff       	jmp    ffffffff80004940 <push_to_queue>
ffffffff80004d79:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        c = &ctx->grid[i];
ffffffff80004d80:	48 8d 0c 40          	lea    (%rax,%rax,2),%rcx
ffffffff80004d84:	48 8b 87 e8 03 00 00 	mov    0x3e8(%rdi),%rax
ffffffff80004d8b:	48 8d 04 88          	lea    (%rax,%rcx,4),%rax
ffffffff80004d8f:	eb da                	jmp    ffffffff80004d6b <flanterm_fb_move_character+0x4b>
ffffffff80004d91:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80004d98:	00 00 00 
ffffffff80004d9b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80004da0 <flanterm_fb_set_text_fg>:

static void flanterm_fb_set_text_fg(struct flanterm_context *_ctx, size_t fg) {
    struct flanterm_fb_context *ctx = (void *)_ctx;

    ctx->text_fg = ctx->ansi_colours[fg];
ffffffff80004da0:	8b 84 b7 70 03 00 00 	mov    0x370(%rdi,%rsi,4),%eax
ffffffff80004da7:	89 87 08 04 00 00    	mov    %eax,0x408(%rdi)
}
ffffffff80004dad:	c3                   	ret
ffffffff80004dae:	66 90                	xchg   %ax,%ax

ffffffff80004db0 <flanterm_fb_set_text_bg>:

static void flanterm_fb_set_text_bg(struct flanterm_context *_ctx, size_t bg) {
    struct flanterm_fb_context *ctx = (void *)_ctx;

    ctx->text_bg = ctx->ansi_colours[bg];
ffffffff80004db0:	8b 84 b7 70 03 00 00 	mov    0x370(%rdi,%rsi,4),%eax
ffffffff80004db7:	89 87 0c 04 00 00    	mov    %eax,0x40c(%rdi)
}
ffffffff80004dbd:	c3                   	ret
ffffffff80004dbe:	66 90                	xchg   %ax,%ax

ffffffff80004dc0 <flanterm_fb_set_text_fg_bright>:

static void flanterm_fb_set_text_fg_bright(struct flanterm_context *_ctx, size_t fg) {
    struct flanterm_fb_context *ctx = (void *)_ctx;

    ctx->text_fg = ctx->ansi_bright_colours[fg];
ffffffff80004dc0:	8b 84 b7 90 03 00 00 	mov    0x390(%rdi,%rsi,4),%eax
ffffffff80004dc7:	89 87 08 04 00 00    	mov    %eax,0x408(%rdi)
}
ffffffff80004dcd:	c3                   	ret
ffffffff80004dce:	66 90                	xchg   %ax,%ax

ffffffff80004dd0 <flanterm_fb_set_text_bg_bright>:

static void flanterm_fb_set_text_bg_bright(struct flanterm_context *_ctx, size_t bg) {
    struct flanterm_fb_context *ctx = (void *)_ctx;

    ctx->text_bg = ctx->ansi_bright_colours[bg];
ffffffff80004dd0:	8b 84 b7 90 03 00 00 	mov    0x390(%rdi,%rsi,4),%eax
ffffffff80004dd7:	89 87 0c 04 00 00    	mov    %eax,0x40c(%rdi)
}
ffffffff80004ddd:	c3                   	ret
ffffffff80004dde:	66 90                	xchg   %ax,%ax

ffffffff80004de0 <flanterm_fb_set_text_fg_rgb>:

static void flanterm_fb_set_text_fg_rgb(struct flanterm_context *_ctx, uint32_t fg) {
ffffffff80004de0:	55                   	push   %rbp
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80004de1:	89 f0                	mov    %esi,%eax
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80004de3:	44 0f b6 97 41 03 00 	movzbl 0x341(%rdi),%r10d
ffffffff80004dea:	00 
static void flanterm_fb_set_text_fg_rgb(struct flanterm_context *_ctx, uint32_t fg) {
ffffffff80004deb:	89 f2                	mov    %esi,%edx
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80004ded:	c1 e8 10             	shr    $0x10,%eax
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80004df0:	44 0f b6 8f 43 03 00 	movzbl 0x343(%rdi),%r9d
ffffffff80004df7:	00 
ffffffff80004df8:	44 0f b6 87 45 03 00 	movzbl 0x345(%rdi),%r8d
ffffffff80004dff:	00 
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80004e00:	0f b6 c0             	movzbl %al,%eax
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80004e03:	44 89 d1             	mov    %r10d,%ecx
static void flanterm_fb_set_text_fg_rgb(struct flanterm_context *_ctx, uint32_t fg) {
ffffffff80004e06:	48 89 e5             	mov    %rsp,%rbp
ffffffff80004e09:	53                   	push   %rbx
    uint32_t g = (colour >> 8) & 0xff;
ffffffff80004e0a:	0f b6 de             	movzbl %dh,%ebx
    uint32_t b =  colour & 0xff;
ffffffff80004e0d:	40 0f b6 d6          	movzbl %sil,%edx
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80004e11:	89 c6                	mov    %eax,%esi
ffffffff80004e13:	41 89 db             	mov    %ebx,%r11d
ffffffff80004e16:	d3 e6                	shl    %cl,%esi
ffffffff80004e18:	44 89 c9             	mov    %r9d,%ecx
ffffffff80004e1b:	41 d3 e3             	shl    %cl,%r11d
ffffffff80004e1e:	44 89 c1             	mov    %r8d,%ecx
ffffffff80004e21:	44 09 de             	or     %r11d,%esi
ffffffff80004e24:	41 89 d3             	mov    %edx,%r11d
ffffffff80004e27:	41 d3 e3             	shl    %cl,%r11d
ffffffff80004e2a:	44 09 de             	or     %r11d,%esi
    if (ctx->red_mask_size > 8) {
ffffffff80004e2d:	44 0f b6 9f 40 03 00 	movzbl 0x340(%rdi),%r11d
ffffffff80004e34:	00 
ffffffff80004e35:	41 80 fb 08          	cmp    $0x8,%r11b
ffffffff80004e39:	76 12                	jbe    ffffffff80004e4d <flanterm_fb_set_text_fg_rgb+0x6d>
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80004e3b:	b9 10 00 00 00       	mov    $0x10,%ecx
ffffffff80004e40:	44 29 d9             	sub    %r11d,%ecx
ffffffff80004e43:	d3 e8                	shr    %cl,%eax
ffffffff80004e45:	41 8d 4a 08          	lea    0x8(%r10),%ecx
ffffffff80004e49:	d3 e0                	shl    %cl,%eax
ffffffff80004e4b:	09 c6                	or     %eax,%esi
    if (ctx->green_mask_size > 8) {
ffffffff80004e4d:	0f b6 87 42 03 00 00 	movzbl 0x342(%rdi),%eax
ffffffff80004e54:	3c 08                	cmp    $0x8,%al
ffffffff80004e56:	76 13                	jbe    ffffffff80004e6b <flanterm_fb_set_text_fg_rgb+0x8b>
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80004e58:	b9 10 00 00 00       	mov    $0x10,%ecx
ffffffff80004e5d:	29 c1                	sub    %eax,%ecx
ffffffff80004e5f:	89 d8                	mov    %ebx,%eax
ffffffff80004e61:	d3 e8                	shr    %cl,%eax
ffffffff80004e63:	41 8d 49 08          	lea    0x8(%r9),%ecx
ffffffff80004e67:	d3 e0                	shl    %cl,%eax
ffffffff80004e69:	09 c6                	or     %eax,%esi
    if (ctx->blue_mask_size > 8) {
ffffffff80004e6b:	0f b6 87 44 03 00 00 	movzbl 0x344(%rdi),%eax
ffffffff80004e72:	3c 08                	cmp    $0x8,%al
ffffffff80004e74:	76 11                	jbe    ffffffff80004e87 <flanterm_fb_set_text_fg_rgb+0xa7>
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80004e76:	b9 10 00 00 00       	mov    $0x10,%ecx
ffffffff80004e7b:	29 c1                	sub    %eax,%ecx
ffffffff80004e7d:	d3 ea                	shr    %cl,%edx
ffffffff80004e7f:	41 8d 48 08          	lea    0x8(%r8),%ecx
ffffffff80004e83:	d3 e2                	shl    %cl,%edx
ffffffff80004e85:	09 d6                	or     %edx,%esi
    struct flanterm_fb_context *ctx = (void *)_ctx;

    ctx->text_fg = convert_colour(_ctx, fg);
ffffffff80004e87:	89 b7 08 04 00 00    	mov    %esi,0x408(%rdi)
}
ffffffff80004e8d:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff80004e91:	c9                   	leave
ffffffff80004e92:	c3                   	ret
ffffffff80004e93:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80004e9a:	00 00 00 
ffffffff80004e9d:	0f 1f 00             	nopl   (%rax)

ffffffff80004ea0 <flanterm_fb_set_text_bg_rgb>:

static void flanterm_fb_set_text_bg_rgb(struct flanterm_context *_ctx, uint32_t bg) {
ffffffff80004ea0:	55                   	push   %rbp
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80004ea1:	89 f0                	mov    %esi,%eax
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80004ea3:	44 0f b6 97 41 03 00 	movzbl 0x341(%rdi),%r10d
ffffffff80004eaa:	00 
static void flanterm_fb_set_text_bg_rgb(struct flanterm_context *_ctx, uint32_t bg) {
ffffffff80004eab:	89 f2                	mov    %esi,%edx
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80004ead:	c1 e8 10             	shr    $0x10,%eax
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80004eb0:	44 0f b6 8f 43 03 00 	movzbl 0x343(%rdi),%r9d
ffffffff80004eb7:	00 
ffffffff80004eb8:	44 0f b6 87 45 03 00 	movzbl 0x345(%rdi),%r8d
ffffffff80004ebf:	00 
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80004ec0:	0f b6 c0             	movzbl %al,%eax
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80004ec3:	44 89 d1             	mov    %r10d,%ecx
static void flanterm_fb_set_text_bg_rgb(struct flanterm_context *_ctx, uint32_t bg) {
ffffffff80004ec6:	48 89 e5             	mov    %rsp,%rbp
ffffffff80004ec9:	53                   	push   %rbx
    uint32_t g = (colour >> 8) & 0xff;
ffffffff80004eca:	0f b6 de             	movzbl %dh,%ebx
    uint32_t b =  colour & 0xff;
ffffffff80004ecd:	40 0f b6 d6          	movzbl %sil,%edx
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80004ed1:	89 c6                	mov    %eax,%esi
ffffffff80004ed3:	41 89 db             	mov    %ebx,%r11d
ffffffff80004ed6:	d3 e6                	shl    %cl,%esi
ffffffff80004ed8:	44 89 c9             	mov    %r9d,%ecx
ffffffff80004edb:	41 d3 e3             	shl    %cl,%r11d
ffffffff80004ede:	44 89 c1             	mov    %r8d,%ecx
ffffffff80004ee1:	44 09 de             	or     %r11d,%esi
ffffffff80004ee4:	41 89 d3             	mov    %edx,%r11d
ffffffff80004ee7:	41 d3 e3             	shl    %cl,%r11d
ffffffff80004eea:	44 09 de             	or     %r11d,%esi
    if (ctx->red_mask_size > 8) {
ffffffff80004eed:	44 0f b6 9f 40 03 00 	movzbl 0x340(%rdi),%r11d
ffffffff80004ef4:	00 
ffffffff80004ef5:	41 80 fb 08          	cmp    $0x8,%r11b
ffffffff80004ef9:	76 12                	jbe    ffffffff80004f0d <flanterm_fb_set_text_bg_rgb+0x6d>
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80004efb:	b9 10 00 00 00       	mov    $0x10,%ecx
ffffffff80004f00:	44 29 d9             	sub    %r11d,%ecx
ffffffff80004f03:	d3 e8                	shr    %cl,%eax
ffffffff80004f05:	41 8d 4a 08          	lea    0x8(%r10),%ecx
ffffffff80004f09:	d3 e0                	shl    %cl,%eax
ffffffff80004f0b:	09 c6                	or     %eax,%esi
    if (ctx->green_mask_size > 8) {
ffffffff80004f0d:	0f b6 87 42 03 00 00 	movzbl 0x342(%rdi),%eax
ffffffff80004f14:	3c 08                	cmp    $0x8,%al
ffffffff80004f16:	76 13                	jbe    ffffffff80004f2b <flanterm_fb_set_text_bg_rgb+0x8b>
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80004f18:	b9 10 00 00 00       	mov    $0x10,%ecx
ffffffff80004f1d:	29 c1                	sub    %eax,%ecx
ffffffff80004f1f:	89 d8                	mov    %ebx,%eax
ffffffff80004f21:	d3 e8                	shr    %cl,%eax
ffffffff80004f23:	41 8d 49 08          	lea    0x8(%r9),%ecx
ffffffff80004f27:	d3 e0                	shl    %cl,%eax
ffffffff80004f29:	09 c6                	or     %eax,%esi
    if (ctx->blue_mask_size > 8) {
ffffffff80004f2b:	0f b6 87 44 03 00 00 	movzbl 0x344(%rdi),%eax
ffffffff80004f32:	3c 08                	cmp    $0x8,%al
ffffffff80004f34:	76 11                	jbe    ffffffff80004f47 <flanterm_fb_set_text_bg_rgb+0xa7>
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80004f36:	b9 10 00 00 00       	mov    $0x10,%ecx
ffffffff80004f3b:	29 c1                	sub    %eax,%ecx
ffffffff80004f3d:	d3 ea                	shr    %cl,%edx
ffffffff80004f3f:	41 8d 48 08          	lea    0x8(%r8),%ecx
ffffffff80004f43:	d3 e2                	shl    %cl,%edx
ffffffff80004f45:	09 d6                	or     %edx,%esi
    struct flanterm_fb_context *ctx = (void *)_ctx;

    ctx->text_bg = convert_colour(_ctx, bg);
ffffffff80004f47:	89 b7 0c 04 00 00    	mov    %esi,0x40c(%rdi)
}
ffffffff80004f4d:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff80004f51:	c9                   	leave
ffffffff80004f52:	c3                   	ret
ffffffff80004f53:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80004f5a:	00 00 00 
ffffffff80004f5d:	0f 1f 00             	nopl   (%rax)

ffffffff80004f60 <flanterm_fb_set_text_fg_default>:

static void flanterm_fb_set_text_fg_default(struct flanterm_context *_ctx) {
    struct flanterm_fb_context *ctx = (void *)_ctx;

    ctx->text_fg = ctx->default_fg;
ffffffff80004f60:	8b 87 b0 03 00 00    	mov    0x3b0(%rdi),%eax
ffffffff80004f66:	89 87 08 04 00 00    	mov    %eax,0x408(%rdi)
}
ffffffff80004f6c:	c3                   	ret
ffffffff80004f6d:	0f 1f 00             	nopl   (%rax)

ffffffff80004f70 <flanterm_fb_set_text_bg_default>:

static void flanterm_fb_set_text_bg_default(struct flanterm_context *_ctx) {
    struct flanterm_fb_context *ctx = (void *)_ctx;

    ctx->text_bg = 0xffffffff;
ffffffff80004f70:	c7 87 0c 04 00 00 ff 	movl   $0xffffffff,0x40c(%rdi)
ffffffff80004f77:	ff ff ff 
}
ffffffff80004f7a:	c3                   	ret
ffffffff80004f7b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80004f80 <flanterm_fb_set_text_fg_default_bright>:

static void flanterm_fb_set_text_fg_default_bright(struct flanterm_context *_ctx) {
    struct flanterm_fb_context *ctx = (void *)_ctx;

    ctx->text_fg = ctx->default_fg_bright;
ffffffff80004f80:	8b 87 b8 03 00 00    	mov    0x3b8(%rdi),%eax
ffffffff80004f86:	89 87 08 04 00 00    	mov    %eax,0x408(%rdi)
}
ffffffff80004f8c:	c3                   	ret
ffffffff80004f8d:	0f 1f 00             	nopl   (%rax)

ffffffff80004f90 <flanterm_fb_set_text_bg_default_bright>:

static void flanterm_fb_set_text_bg_default_bright(struct flanterm_context *_ctx) {
    struct flanterm_fb_context *ctx = (void *)_ctx;

    ctx->text_bg = ctx->default_bg_bright;
ffffffff80004f90:	8b 87 bc 03 00 00    	mov    0x3bc(%rdi),%eax
ffffffff80004f96:	89 87 0c 04 00 00    	mov    %eax,0x40c(%rdi)
}
ffffffff80004f9c:	c3                   	ret
ffffffff80004f9d:	0f 1f 00             	nopl   (%rax)

ffffffff80004fa0 <draw_cursor>:

static void draw_cursor(struct flanterm_context *_ctx) {
    struct flanterm_fb_context *ctx = (void *)_ctx;

    if (ctx->cursor_x >= _ctx->cols || ctx->cursor_y >= _ctx->rows) {
ffffffff80004fa0:	48 8b 97 10 04 00 00 	mov    0x410(%rdi),%rdx
ffffffff80004fa7:	48 8b 87 f8 01 00 00 	mov    0x1f8(%rdi),%rax
ffffffff80004fae:	48 39 c2             	cmp    %rax,%rdx
ffffffff80004fb1:	0f 83 a1 00 00 00    	jae    ffffffff80005058 <draw_cursor+0xb8>
static void draw_cursor(struct flanterm_context *_ctx) {
ffffffff80004fb7:	55                   	push   %rbp
ffffffff80004fb8:	48 89 e5             	mov    %rsp,%rbp
ffffffff80004fbb:	41 56                	push   %r14
ffffffff80004fbd:	41 55                	push   %r13
ffffffff80004fbf:	41 54                	push   %r12
ffffffff80004fc1:	53                   	push   %rbx
ffffffff80004fc2:	48 89 fb             	mov    %rdi,%rbx
ffffffff80004fc5:	48 83 ec 10          	sub    $0x10,%rsp
    if (ctx->cursor_x >= _ctx->cols || ctx->cursor_y >= _ctx->rows) {
ffffffff80004fc9:	48 8b 8f 18 04 00 00 	mov    0x418(%rdi),%rcx
ffffffff80004fd0:	48 3b 8f f0 01 00 00 	cmp    0x1f0(%rdi),%rcx
ffffffff80004fd7:	73 6e                	jae    ffffffff80005047 <draw_cursor+0xa7>
        return;
    }

    size_t i = ctx->cursor_x + ctx->cursor_y * _ctx->cols;
ffffffff80004fd9:	48 0f af c1          	imul   %rcx,%rax
        c = ctx->grid[i];
    }
    uint32_t tmp = c.fg;
    c.fg = c.bg;
    c.bg = tmp;
    ctx->plot_char(_ctx, &c, ctx->cursor_x, ctx->cursor_y);
ffffffff80004fdd:	4c 8b 87 c0 02 00 00 	mov    0x2c0(%rdi),%r8
    size_t i = ctx->cursor_x + ctx->cursor_y * _ctx->cols;
ffffffff80004fe4:	4c 8d 24 10          	lea    (%rax,%rdx,1),%r12
    struct flanterm_fb_queue_item *q = ctx->map[i];
ffffffff80004fe8:	48 8b 87 00 04 00 00 	mov    0x400(%rdi),%rax
    if (q != NULL) {
        ctx->grid[i] = q->c;
ffffffff80004fef:	4f 8d 2c 64          	lea    (%r12,%r12,2),%r13
    struct flanterm_fb_queue_item *q = ctx->map[i];
ffffffff80004ff3:	4e 8b 34 e0          	mov    (%rax,%r12,8),%r14
        ctx->grid[i] = q->c;
ffffffff80004ff7:	49 c1 e5 02          	shl    $0x2,%r13
    if (q != NULL) {
ffffffff80004ffb:	4d 85 f6             	test   %r14,%r14
ffffffff80004ffe:	74 60                	je     ffffffff80005060 <draw_cursor+0xc0>
        c = q->c;
ffffffff80005000:	49 8b 46 10          	mov    0x10(%r14),%rax
ffffffff80005004:	48 89 45 d4          	mov    %rax,-0x2c(%rbp)
ffffffff80005008:	48 89 c6             	mov    %rax,%rsi
ffffffff8000500b:	41 8b 46 18          	mov    0x18(%r14),%eax
ffffffff8000500f:	48 c1 ee 20          	shr    $0x20,%rsi
    c.fg = c.bg;
ffffffff80005013:	89 45 d8             	mov    %eax,-0x28(%rbp)
    c.bg = tmp;
ffffffff80005016:	89 75 dc             	mov    %esi,-0x24(%rbp)
    ctx->plot_char(_ctx, &c, ctx->cursor_x, ctx->cursor_y);
ffffffff80005019:	48 8d 75 d4          	lea    -0x2c(%rbp),%rsi
ffffffff8000501d:	41 ff d0             	call   *%r8
        ctx->grid[i] = q->c;
ffffffff80005020:	48 8b 83 e8 03 00 00 	mov    0x3e8(%rbx),%rax
ffffffff80005027:	49 8b 56 10          	mov    0x10(%r14),%rdx
ffffffff8000502b:	4a 89 14 28          	mov    %rdx,(%rax,%r13,1)
ffffffff8000502f:	41 8b 56 18          	mov    0x18(%r14),%edx
ffffffff80005033:	42 89 54 28 08       	mov    %edx,0x8(%rax,%r13,1)
        ctx->map[i] = NULL;
ffffffff80005038:	48 8b 83 00 04 00 00 	mov    0x400(%rbx),%rax
ffffffff8000503f:	4a c7 04 e0 00 00 00 	movq   $0x0,(%rax,%r12,8)
ffffffff80005046:	00 
    }
}
ffffffff80005047:	48 83 c4 10          	add    $0x10,%rsp
ffffffff8000504b:	5b                   	pop    %rbx
ffffffff8000504c:	41 5c                	pop    %r12
ffffffff8000504e:	41 5d                	pop    %r13
ffffffff80005050:	41 5e                	pop    %r14
ffffffff80005052:	5d                   	pop    %rbp
ffffffff80005053:	c3                   	ret
ffffffff80005054:	0f 1f 40 00          	nopl   0x0(%rax)
ffffffff80005058:	c3                   	ret
ffffffff80005059:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        c = ctx->grid[i];
ffffffff80005060:	48 8b 87 e8 03 00 00 	mov    0x3e8(%rdi),%rax
ffffffff80005067:	4a 8b 34 28          	mov    (%rax,%r13,1),%rsi
ffffffff8000506b:	48 89 75 d4          	mov    %rsi,-0x2c(%rbp)
ffffffff8000506f:	42 8b 74 28 08       	mov    0x8(%rax,%r13,1),%esi
    uint32_t tmp = c.fg;
ffffffff80005074:	8b 45 d8             	mov    -0x28(%rbp),%eax
    c.fg = c.bg;
ffffffff80005077:	89 75 d8             	mov    %esi,-0x28(%rbp)
    ctx->plot_char(_ctx, &c, ctx->cursor_x, ctx->cursor_y);
ffffffff8000507a:	48 8d 75 d4          	lea    -0x2c(%rbp),%rsi
    c.bg = tmp;
ffffffff8000507e:	89 45 dc             	mov    %eax,-0x24(%rbp)
    ctx->plot_char(_ctx, &c, ctx->cursor_x, ctx->cursor_y);
ffffffff80005081:	41 ff d0             	call   *%r8
}
ffffffff80005084:	48 83 c4 10          	add    $0x10,%rsp
ffffffff80005088:	5b                   	pop    %rbx
ffffffff80005089:	41 5c                	pop    %r12
ffffffff8000508b:	41 5d                	pop    %r13
ffffffff8000508d:	41 5e                	pop    %r14
ffffffff8000508f:	5d                   	pop    %rbp
ffffffff80005090:	c3                   	ret
ffffffff80005091:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80005098:	00 00 00 
ffffffff8000509b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff800050a0 <flanterm_fb_double_buffer_flush>:

static void flanterm_fb_double_buffer_flush(struct flanterm_context *_ctx) {
ffffffff800050a0:	55                   	push   %rbp
ffffffff800050a1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800050a4:	41 56                	push   %r14
ffffffff800050a6:	41 55                	push   %r13
ffffffff800050a8:	41 54                	push   %r12
ffffffff800050aa:	53                   	push   %rbx
    struct flanterm_fb_context *ctx = (void *)_ctx;

    if (_ctx->cursor_enabled) {
ffffffff800050ab:	80 7f 09 00          	cmpb   $0x0,0x9(%rdi)
static void flanterm_fb_double_buffer_flush(struct flanterm_context *_ctx) {
ffffffff800050af:	48 89 fb             	mov    %rdi,%rbx
    if (_ctx->cursor_enabled) {
ffffffff800050b2:	0f 85 78 01 00 00    	jne    ffffffff80005230 <flanterm_fb_double_buffer_flush+0x190>
        draw_cursor(_ctx);
    }

    for (size_t i = 0; i < ctx->queue_i; i++) {
ffffffff800050b8:	48 83 bb f8 03 00 00 	cmpq   $0x0,0x3f8(%rbx)
ffffffff800050bf:	00 
ffffffff800050c0:	0f 84 80 00 00 00    	je     ffffffff80005146 <flanterm_fb_double_buffer_flush+0xa6>
ffffffff800050c6:	48 8b 83 00 04 00 00 	mov    0x400(%rbx),%rax
ffffffff800050cd:	45 31 f6             	xor    %r14d,%r14d
        struct flanterm_fb_queue_item *q = &ctx->queue[i];
ffffffff800050d0:	4d 89 f4             	mov    %r14,%r12
        size_t offset = q->y * _ctx->cols + q->x;
ffffffff800050d3:	4c 8b ab f8 01 00 00 	mov    0x1f8(%rbx),%r13
        struct flanterm_fb_queue_item *q = &ctx->queue[i];
ffffffff800050da:	49 c1 e4 05          	shl    $0x5,%r12
ffffffff800050de:	4c 03 a3 f0 03 00 00 	add    0x3f0(%rbx),%r12
        size_t offset = q->y * _ctx->cols + q->x;
ffffffff800050e5:	49 8b 4c 24 08       	mov    0x8(%r12),%rcx
ffffffff800050ea:	49 8b 14 24          	mov    (%r12),%rdx
ffffffff800050ee:	4c 0f af e9          	imul   %rcx,%r13
ffffffff800050f2:	49 01 d5             	add    %rdx,%r13
        if (ctx->map[offset] == NULL) {
ffffffff800050f5:	4a 83 3c e8 00       	cmpq   $0x0,(%rax,%r13,8)
ffffffff800050fa:	74 3d                	je     ffffffff80005139 <flanterm_fb_double_buffer_flush+0x99>
            continue;
        }
        ctx->plot_char(_ctx, &q->c, q->x, q->y);
ffffffff800050fc:	49 8d 74 24 10       	lea    0x10(%r12),%rsi
ffffffff80005101:	48 89 df             	mov    %rbx,%rdi
ffffffff80005104:	ff 93 c0 02 00 00    	call   *0x2c0(%rbx)
        ctx->grid[offset] = q->c;
ffffffff8000510a:	48 8b 93 e8 03 00 00 	mov    0x3e8(%rbx),%rdx
ffffffff80005111:	4b 8d 44 6d 00       	lea    0x0(%r13,%r13,2),%rax
ffffffff80005116:	48 8d 04 82          	lea    (%rdx,%rax,4),%rax
ffffffff8000511a:	49 8b 54 24 10       	mov    0x10(%r12),%rdx
ffffffff8000511f:	48 89 10             	mov    %rdx,(%rax)
ffffffff80005122:	41 8b 54 24 18       	mov    0x18(%r12),%edx
ffffffff80005127:	89 50 08             	mov    %edx,0x8(%rax)
        ctx->map[offset] = NULL;
ffffffff8000512a:	48 8b 83 00 04 00 00 	mov    0x400(%rbx),%rax
ffffffff80005131:	4a c7 04 e8 00 00 00 	movq   $0x0,(%rax,%r13,8)
ffffffff80005138:	00 
    for (size_t i = 0; i < ctx->queue_i; i++) {
ffffffff80005139:	49 83 c6 01          	add    $0x1,%r14
ffffffff8000513d:	4c 3b b3 f8 03 00 00 	cmp    0x3f8(%rbx),%r14
ffffffff80005144:	72 8a                	jb     ffffffff800050d0 <flanterm_fb_double_buffer_flush+0x30>
    }

    if ((ctx->old_cursor_x != ctx->cursor_x || ctx->old_cursor_y != ctx->cursor_y) || _ctx->cursor_enabled == false) {
ffffffff80005146:	48 8b 93 38 04 00 00 	mov    0x438(%rbx),%rdx
ffffffff8000514d:	48 8b 8b 10 04 00 00 	mov    0x410(%rbx),%rcx
ffffffff80005154:	48 39 ca             	cmp    %rcx,%rdx
ffffffff80005157:	0f 84 ab 00 00 00    	je     ffffffff80005208 <flanterm_fb_double_buffer_flush+0x168>
        if (ctx->old_cursor_x < _ctx->cols && ctx->old_cursor_y < _ctx->rows) {
ffffffff8000515d:	48 8b 83 f8 01 00 00 	mov    0x1f8(%rbx),%rax
ffffffff80005164:	48 39 c2             	cmp    %rax,%rdx
ffffffff80005167:	72 57                	jb     ffffffff800051c0 <flanterm_fb_double_buffer_flush+0x120>
            ctx->plot_char(_ctx, &ctx->grid[ctx->old_cursor_x + ctx->old_cursor_y * _ctx->cols], ctx->old_cursor_x, ctx->old_cursor_y);
        }
    }

    ctx->old_cursor_x = ctx->cursor_x;
    ctx->old_cursor_y = ctx->cursor_y;
ffffffff80005169:	48 8b 83 18 04 00 00 	mov    0x418(%rbx),%rax
ffffffff80005170:	48 89 83 40 04 00 00 	mov    %rax,0x440(%rbx)

    ctx->queue_i = 0;

    if (ctx->flush_callback) {
ffffffff80005177:	48 8b 83 c8 02 00 00 	mov    0x2c8(%rbx),%rax
    ctx->old_cursor_x = ctx->cursor_x;
ffffffff8000517e:	48 89 8b 38 04 00 00 	mov    %rcx,0x438(%rbx)
    ctx->queue_i = 0;
ffffffff80005185:	48 c7 83 f8 03 00 00 	movq   $0x0,0x3f8(%rbx)
ffffffff8000518c:	00 00 00 00 
    if (ctx->flush_callback) {
ffffffff80005190:	48 85 c0             	test   %rax,%rax
ffffffff80005193:	0f 84 a7 00 00 00    	je     ffffffff80005240 <flanterm_fb_double_buffer_flush+0x1a0>
        ctx->flush_callback(ctx->framebuffer, ctx->pitch * ctx->phys_height);
ffffffff80005199:	48 8b b3 18 03 00 00 	mov    0x318(%rbx),%rsi
ffffffff800051a0:	48 8b bb 10 03 00 00 	mov    0x310(%rbx),%rdi
ffffffff800051a7:	48 0f af b3 30 03 00 	imul   0x330(%rbx),%rsi
ffffffff800051ae:	00 
    }
}
ffffffff800051af:	5b                   	pop    %rbx
ffffffff800051b0:	41 5c                	pop    %r12
ffffffff800051b2:	41 5d                	pop    %r13
ffffffff800051b4:	41 5e                	pop    %r14
ffffffff800051b6:	5d                   	pop    %rbp
        ctx->flush_callback(ctx->framebuffer, ctx->pitch * ctx->phys_height);
ffffffff800051b7:	ff e0                	jmp    *%rax
ffffffff800051b9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        if (ctx->old_cursor_x < _ctx->cols && ctx->old_cursor_y < _ctx->rows) {
ffffffff800051c0:	48 8b b3 40 04 00 00 	mov    0x440(%rbx),%rsi
ffffffff800051c7:	48 3b b3 f0 01 00 00 	cmp    0x1f0(%rbx),%rsi
ffffffff800051ce:	73 99                	jae    ffffffff80005169 <flanterm_fb_double_buffer_flush+0xc9>
            ctx->plot_char(_ctx, &ctx->grid[ctx->old_cursor_x + ctx->old_cursor_y * _ctx->cols], ctx->old_cursor_x, ctx->old_cursor_y);
ffffffff800051d0:	48 0f af c6          	imul   %rsi,%rax
ffffffff800051d4:	48 89 df             	mov    %rbx,%rdi
ffffffff800051d7:	48 01 d0             	add    %rdx,%rax
ffffffff800051da:	48 8d 0c 40          	lea    (%rax,%rax,2),%rcx
ffffffff800051de:	48 8b 83 e8 03 00 00 	mov    0x3e8(%rbx),%rax
ffffffff800051e5:	48 8d 04 88          	lea    (%rax,%rcx,4),%rax
ffffffff800051e9:	48 89 f1             	mov    %rsi,%rcx
ffffffff800051ec:	48 89 c6             	mov    %rax,%rsi
ffffffff800051ef:	ff 93 c0 02 00 00    	call   *0x2c0(%rbx)
    ctx->old_cursor_x = ctx->cursor_x;
ffffffff800051f5:	48 8b 8b 10 04 00 00 	mov    0x410(%rbx),%rcx
ffffffff800051fc:	e9 68 ff ff ff       	jmp    ffffffff80005169 <flanterm_fb_double_buffer_flush+0xc9>
ffffffff80005201:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
    if ((ctx->old_cursor_x != ctx->cursor_x || ctx->old_cursor_y != ctx->cursor_y) || _ctx->cursor_enabled == false) {
ffffffff80005208:	48 8b 83 18 04 00 00 	mov    0x418(%rbx),%rax
ffffffff8000520f:	48 39 83 40 04 00 00 	cmp    %rax,0x440(%rbx)
ffffffff80005216:	0f 85 41 ff ff ff    	jne    ffffffff8000515d <flanterm_fb_double_buffer_flush+0xbd>
ffffffff8000521c:	80 7b 09 00          	cmpb   $0x0,0x9(%rbx)
ffffffff80005220:	0f 85 4a ff ff ff    	jne    ffffffff80005170 <flanterm_fb_double_buffer_flush+0xd0>
ffffffff80005226:	e9 32 ff ff ff       	jmp    ffffffff8000515d <flanterm_fb_double_buffer_flush+0xbd>
ffffffff8000522b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        draw_cursor(_ctx);
ffffffff80005230:	e8 6b fd ff ff       	call   ffffffff80004fa0 <draw_cursor>
ffffffff80005235:	e9 7e fe ff ff       	jmp    ffffffff800050b8 <flanterm_fb_double_buffer_flush+0x18>
ffffffff8000523a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
}
ffffffff80005240:	5b                   	pop    %rbx
ffffffff80005241:	41 5c                	pop    %r12
ffffffff80005243:	41 5d                	pop    %r13
ffffffff80005245:	41 5e                	pop    %r14
ffffffff80005247:	5d                   	pop    %rbp
ffffffff80005248:	c3                   	ret
ffffffff80005249:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff80005250 <flanterm_fb_raw_putchar>:

static void flanterm_fb_raw_putchar(struct flanterm_context *_ctx, uint8_t c) {
ffffffff80005250:	55                   	push   %rbp
ffffffff80005251:	48 89 e5             	mov    %rsp,%rbp
ffffffff80005254:	53                   	push   %rbx
ffffffff80005255:	48 83 ec 28          	sub    $0x28,%rsp
    struct flanterm_fb_context *ctx = (void *)_ctx;

    if (ctx->cursor_x >= _ctx->cols) {
ffffffff80005259:	48 8b 97 10 04 00 00 	mov    0x410(%rdi),%rdx
ffffffff80005260:	48 8b 8f f8 01 00 00 	mov    0x1f8(%rdi),%rcx
        if (_ctx->wrap_enabled && (ctx->cursor_y < _ctx->scroll_bottom_margin - 1 || _ctx->scroll_enabled)) {
ffffffff80005267:	48 8b 9f 18 04 00 00 	mov    0x418(%rdi),%rbx
    if (ctx->cursor_x >= _ctx->cols) {
ffffffff8000526e:	48 39 ca             	cmp    %rcx,%rdx
ffffffff80005271:	73 3d                	jae    ffffffff800052b0 <flanterm_fb_raw_putchar+0x60>

    struct flanterm_fb_char ch;
    ch.c  = c;
    ch.fg = ctx->text_fg;
    ch.bg = ctx->text_bg;
    push_to_queue(_ctx, &ch, ctx->cursor_x++, ctx->cursor_y);
ffffffff80005273:	48 8d 4a 01          	lea    0x1(%rdx),%rcx
    ch.c  = c;
ffffffff80005277:	8b 87 08 04 00 00    	mov    0x408(%rdi),%eax
    push_to_queue(_ctx, &ch, ctx->cursor_x++, ctx->cursor_y);
ffffffff8000527d:	48 89 8f 10 04 00 00 	mov    %rcx,0x410(%rdi)
    ch.c  = c;
ffffffff80005284:	40 0f b6 f6          	movzbl %sil,%esi
    push_to_queue(_ctx, &ch, ctx->cursor_x++, ctx->cursor_y);
ffffffff80005288:	48 89 d9             	mov    %rbx,%rcx
    ch.c  = c;
ffffffff8000528b:	48 c1 e0 20          	shl    $0x20,%rax
ffffffff8000528f:	48 09 c6             	or     %rax,%rsi
    ch.bg = ctx->text_bg;
ffffffff80005292:	8b 87 0c 04 00 00    	mov    0x40c(%rdi),%eax
    ch.c  = c;
ffffffff80005298:	48 89 75 e0          	mov    %rsi,-0x20(%rbp)
    push_to_queue(_ctx, &ch, ctx->cursor_x++, ctx->cursor_y);
ffffffff8000529c:	48 8d 75 e0          	lea    -0x20(%rbp),%rsi
    ch.bg = ctx->text_bg;
ffffffff800052a0:	89 45 e8             	mov    %eax,-0x18(%rbp)
    push_to_queue(_ctx, &ch, ctx->cursor_x++, ctx->cursor_y);
ffffffff800052a3:	e8 98 f6 ff ff       	call   ffffffff80004940 <push_to_queue>
}
ffffffff800052a8:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff800052ac:	c9                   	leave
ffffffff800052ad:	c3                   	ret
ffffffff800052ae:	66 90                	xchg   %ax,%ax
        if (_ctx->wrap_enabled && (ctx->cursor_y < _ctx->scroll_bottom_margin - 1 || _ctx->scroll_enabled)) {
ffffffff800052b0:	80 7f 0b 00          	cmpb   $0x0,0xb(%rdi)
ffffffff800052b4:	74 60                	je     ffffffff80005316 <flanterm_fb_raw_putchar+0xc6>
ffffffff800052b6:	48 8b 87 80 01 00 00 	mov    0x180(%rdi),%rax
ffffffff800052bd:	48 8d 50 ff          	lea    -0x1(%rax),%rdx
ffffffff800052c1:	48 39 d3             	cmp    %rdx,%rbx
ffffffff800052c4:	73 4a                	jae    ffffffff80005310 <flanterm_fb_raw_putchar+0xc0>
            ctx->cursor_x = 0;
ffffffff800052c6:	48 c7 87 10 04 00 00 	movq   $0x0,0x410(%rdi)
ffffffff800052cd:	00 00 00 00 
            ctx->cursor_y++;
ffffffff800052d1:	48 8d 53 01          	lea    0x1(%rbx),%rdx
            if (ctx->cursor_y == _ctx->scroll_bottom_margin) {
ffffffff800052d5:	48 39 d0             	cmp    %rdx,%rax
ffffffff800052d8:	74 56                	je     ffffffff80005330 <flanterm_fb_raw_putchar+0xe0>
            ctx->cursor_y++;
ffffffff800052da:	48 89 97 18 04 00 00 	mov    %rdx,0x418(%rdi)
ffffffff800052e1:	48 89 d3             	mov    %rdx,%rbx
            if (ctx->cursor_y >= _ctx->rows) {
ffffffff800052e4:	48 8b 87 f0 01 00 00 	mov    0x1f0(%rdi),%rax
ffffffff800052eb:	48 39 c3             	cmp    %rax,%rbx
ffffffff800052ee:	72 30                	jb     ffffffff80005320 <flanterm_fb_raw_putchar+0xd0>
                ctx->cursor_y = _ctx->rows - 1;
ffffffff800052f0:	48 8d 58 ff          	lea    -0x1(%rax),%rbx
ffffffff800052f4:	b9 01 00 00 00       	mov    $0x1,%ecx
ffffffff800052f9:	31 d2                	xor    %edx,%edx
ffffffff800052fb:	48 89 9f 18 04 00 00 	mov    %rbx,0x418(%rdi)
ffffffff80005302:	e9 70 ff ff ff       	jmp    ffffffff80005277 <flanterm_fb_raw_putchar+0x27>
ffffffff80005307:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8000530e:	00 00 
        if (_ctx->wrap_enabled && (ctx->cursor_y < _ctx->scroll_bottom_margin - 1 || _ctx->scroll_enabled)) {
ffffffff80005310:	80 7f 0a 00          	cmpb   $0x0,0xa(%rdi)
ffffffff80005314:	75 b0                	jne    ffffffff800052c6 <flanterm_fb_raw_putchar+0x76>
            ctx->cursor_x = _ctx->cols - 1;
ffffffff80005316:	48 8d 51 ff          	lea    -0x1(%rcx),%rdx
ffffffff8000531a:	e9 58 ff ff ff       	jmp    ffffffff80005277 <flanterm_fb_raw_putchar+0x27>
ffffffff8000531f:	90                   	nop
ffffffff80005320:	b9 01 00 00 00       	mov    $0x1,%ecx
ffffffff80005325:	31 d2                	xor    %edx,%edx
ffffffff80005327:	e9 4b ff ff ff       	jmp    ffffffff80005277 <flanterm_fb_raw_putchar+0x27>
ffffffff8000532c:	0f 1f 40 00          	nopl   0x0(%rax)
ffffffff80005330:	89 75 d4             	mov    %esi,-0x2c(%rbp)
                flanterm_fb_scroll(_ctx);
ffffffff80005333:	48 89 7d d8          	mov    %rdi,-0x28(%rbp)
ffffffff80005337:	e8 a4 f7 ff ff       	call   ffffffff80004ae0 <flanterm_fb_scroll>
ffffffff8000533c:	8b 75 d4             	mov    -0x2c(%rbp),%esi
ffffffff8000533f:	48 8b 7d d8          	mov    -0x28(%rbp),%rdi
ffffffff80005343:	eb 9f                	jmp    ffffffff800052e4 <flanterm_fb_raw_putchar+0x94>
ffffffff80005345:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000534c:	00 00 00 
ffffffff8000534f:	90                   	nop

ffffffff80005350 <flanterm_fb_full_refresh>:

static void flanterm_fb_full_refresh(struct flanterm_context *_ctx) {
ffffffff80005350:	55                   	push   %rbp
ffffffff80005351:	48 89 e5             	mov    %rsp,%rbp
ffffffff80005354:	41 57                	push   %r15
ffffffff80005356:	41 56                	push   %r14
ffffffff80005358:	41 55                	push   %r13
ffffffff8000535a:	41 54                	push   %r12
ffffffff8000535c:	53                   	push   %rbx
ffffffff8000535d:	48 89 fb             	mov    %rdi,%rbx
ffffffff80005360:	48 83 ec 28          	sub    $0x28,%rsp
    struct flanterm_fb_context *ctx = (void *)_ctx;

    uint32_t default_bg = ctx->default_bg;

    for (size_t y = 0; y < ctx->height; y++) {
ffffffff80005364:	4c 8b bf 28 03 00 00 	mov    0x328(%rdi),%r15
ffffffff8000536b:	4d 85 ff             	test   %r15,%r15
ffffffff8000536e:	0f 84 0c 01 00 00    	je     ffffffff80005480 <flanterm_fb_full_refresh+0x130>
        for (size_t x = 0; x < ctx->width; x++) {
ffffffff80005374:	4c 8b 87 20 03 00 00 	mov    0x320(%rdi),%r8
ffffffff8000537b:	4d 8d 5f ff          	lea    -0x1(%r15),%r11
ffffffff8000537f:	4a 8d 04 85 00 00 00 	lea    0x0(,%r8,4),%rax
ffffffff80005386:	00 
ffffffff80005387:	48 89 45 c0          	mov    %rax,-0x40(%rbp)
ffffffff8000538b:	4d 85 c0             	test   %r8,%r8
ffffffff8000538e:	0f 84 ec 00 00 00    	je     ffffffff80005480 <flanterm_fb_full_refresh+0x130>
ffffffff80005394:	49 8d 40 ff          	lea    -0x1(%r8),%rax
                    px = y; py = ctx->width - 1 - x;
                    break;
            }

            if (ctx->canvas != NULL) {
                ctx->framebuffer[py * (ctx->pitch / sizeof(uint32_t)) + px] = ctx->canvas[y * ctx->width + x];
ffffffff80005398:	4c 8b 8b 18 03 00 00 	mov    0x318(%rbx),%r9
    uint32_t default_bg = ctx->default_bg;
ffffffff8000539f:	45 31 ed             	xor    %r13d,%r13d
ffffffff800053a2:	31 f6                	xor    %esi,%esi
ffffffff800053a4:	48 89 45 b8          	mov    %rax,-0x48(%rbp)
ffffffff800053a8:	44 8b b7 b4 03 00 00 	mov    0x3b4(%rdi),%r14d
                ctx->framebuffer[py * (ctx->pitch / sizeof(uint32_t)) + px] = ctx->canvas[y * ctx->width + x];
ffffffff800053af:	4d 89 fc             	mov    %r15,%r12
ffffffff800053b2:	48 8b bf c8 03 00 00 	mov    0x3c8(%rdi),%rdi
ffffffff800053b9:	4c 8b 93 10 03 00 00 	mov    0x310(%rbx),%r10
ffffffff800053c0:	49 c1 e9 02          	shr    $0x2,%r9
ffffffff800053c4:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800053cb:	00 00 00 00 
ffffffff800053cf:	90                   	nop
ffffffff800053d0:	48 89 75 c8          	mov    %rsi,-0x38(%rbp)
ffffffff800053d4:	48 8b 4d b8          	mov    -0x48(%rbp),%rcx
        for (size_t x = 0; x < ctx->width; x++) {
ffffffff800053d8:	31 d2                	xor    %edx,%edx
                ctx->framebuffer[py * (ctx->pitch / sizeof(uint32_t)) + px] = ctx->canvas[y * ctx->width + x];
ffffffff800053da:	4c 8d 3c 37          	lea    (%rdi,%rsi,1),%r15
ffffffff800053de:	eb 13                	jmp    ffffffff800053f3 <flanterm_fb_full_refresh+0xa3>
ffffffff800053e0:	41 8b 34 97          	mov    (%r15,%rdx,4),%esi
        for (size_t x = 0; x < ctx->width; x++) {
ffffffff800053e4:	48 83 c2 01          	add    $0x1,%rdx
ffffffff800053e8:	48 83 e9 01          	sub    $0x1,%rcx
                ctx->framebuffer[py * (ctx->pitch / sizeof(uint32_t)) + px] = ctx->canvas[y * ctx->width + x];
ffffffff800053ec:	89 30                	mov    %esi,(%rax)
        for (size_t x = 0; x < ctx->width; x++) {
ffffffff800053ee:	4c 39 c2             	cmp    %r8,%rdx
ffffffff800053f1:	74 3b                	je     ffffffff8000542e <flanterm_fb_full_refresh+0xde>
            switch (ctx->rotation) {
ffffffff800053f3:	8b 83 48 03 00 00    	mov    0x348(%rbx),%eax
ffffffff800053f9:	83 f8 02             	cmp    $0x2,%eax
ffffffff800053fc:	74 72                	je     ffffffff80005470 <flanterm_fb_full_refresh+0x120>
ffffffff800053fe:	83 f8 03             	cmp    $0x3,%eax
ffffffff80005401:	74 5d                	je     ffffffff80005460 <flanterm_fb_full_refresh+0x110>
ffffffff80005403:	83 f8 01             	cmp    $0x1,%eax
ffffffff80005406:	75 48                	jne    ffffffff80005450 <flanterm_fb_full_refresh+0x100>
                    px = ctx->height - 1 - y; py = x;
ffffffff80005408:	48 89 d0             	mov    %rdx,%rax
ffffffff8000540b:	4c 89 de             	mov    %r11,%rsi
                ctx->framebuffer[py * (ctx->pitch / sizeof(uint32_t)) + px] = ctx->canvas[y * ctx->width + x];
ffffffff8000540e:	49 0f af c1          	imul   %r9,%rax
ffffffff80005412:	48 01 f0             	add    %rsi,%rax
ffffffff80005415:	49 8d 04 82          	lea    (%r10,%rax,4),%rax
            if (ctx->canvas != NULL) {
ffffffff80005419:	48 85 ff             	test   %rdi,%rdi
ffffffff8000541c:	75 c2                	jne    ffffffff800053e0 <flanterm_fb_full_refresh+0x90>
        for (size_t x = 0; x < ctx->width; x++) {
ffffffff8000541e:	48 83 c2 01          	add    $0x1,%rdx
            } else {
                ctx->framebuffer[py * (ctx->pitch / sizeof(uint32_t)) + px] = default_bg;
ffffffff80005422:	44 89 30             	mov    %r14d,(%rax)
        for (size_t x = 0; x < ctx->width; x++) {
ffffffff80005425:	48 83 e9 01          	sub    $0x1,%rcx
ffffffff80005429:	4c 39 c2             	cmp    %r8,%rdx
ffffffff8000542c:	75 c5                	jne    ffffffff800053f3 <flanterm_fb_full_refresh+0xa3>
    for (size_t y = 0; y < ctx->height; y++) {
ffffffff8000542e:	48 8b 45 c0          	mov    -0x40(%rbp),%rax
ffffffff80005432:	48 8b 75 c8          	mov    -0x38(%rbp),%rsi
ffffffff80005436:	48 01 c6             	add    %rax,%rsi
ffffffff80005439:	49 8d 43 ff          	lea    -0x1(%r11),%rax
ffffffff8000543d:	4d 85 db             	test   %r11,%r11
ffffffff80005440:	74 3e                	je     ffffffff80005480 <flanterm_fb_full_refresh+0x130>
ffffffff80005442:	4d 89 e5             	mov    %r12,%r13
ffffffff80005445:	4d 29 dd             	sub    %r11,%r13
ffffffff80005448:	49 89 c3             	mov    %rax,%r11
ffffffff8000544b:	eb 83                	jmp    ffffffff800053d0 <flanterm_fb_full_refresh+0x80>
ffffffff8000544d:	0f 1f 00             	nopl   (%rax)
            switch (ctx->rotation) {
ffffffff80005450:	4c 89 e8             	mov    %r13,%rax
ffffffff80005453:	48 89 d6             	mov    %rdx,%rsi
ffffffff80005456:	eb b6                	jmp    ffffffff8000540e <flanterm_fb_full_refresh+0xbe>
ffffffff80005458:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000545f:	00 
                    px = y; py = ctx->width - 1 - x;
ffffffff80005460:	48 89 c8             	mov    %rcx,%rax
ffffffff80005463:	4c 89 ee             	mov    %r13,%rsi
ffffffff80005466:	eb a6                	jmp    ffffffff8000540e <flanterm_fb_full_refresh+0xbe>
ffffffff80005468:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000546f:	00 
                    px = ctx->width - 1 - x; py = ctx->height - 1 - y;
ffffffff80005470:	4c 89 d8             	mov    %r11,%rax
ffffffff80005473:	48 89 ce             	mov    %rcx,%rsi
ffffffff80005476:	eb 96                	jmp    ffffffff8000540e <flanterm_fb_full_refresh+0xbe>
ffffffff80005478:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000547f:	00 
            }
        }
    }

    for (size_t i = 0; i < (size_t)_ctx->rows * _ctx->cols; i++) {
ffffffff80005480:	48 8b 8b f8 01 00 00 	mov    0x1f8(%rbx),%rcx
ffffffff80005487:	48 8b 83 f0 01 00 00 	mov    0x1f0(%rbx),%rax
ffffffff8000548e:	45 31 e4             	xor    %r12d,%r12d
ffffffff80005491:	48 0f af c1          	imul   %rcx,%rax
ffffffff80005495:	48 85 c0             	test   %rax,%rax
ffffffff80005498:	74 44                	je     ffffffff800054de <flanterm_fb_full_refresh+0x18e>
ffffffff8000549a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        size_t x = i % _ctx->cols;
ffffffff800054a0:	4c 89 e0             	mov    %r12,%rax
ffffffff800054a3:	31 d2                	xor    %edx,%edx
        size_t y = i / _ctx->cols;

        ctx->plot_char(_ctx, &ctx->grid[i], x, y);
ffffffff800054a5:	4b 8d 34 64          	lea    (%r12,%r12,2),%rsi
ffffffff800054a9:	48 89 df             	mov    %rbx,%rdi
ffffffff800054ac:	48 f7 f1             	div    %rcx
    for (size_t i = 0; i < (size_t)_ctx->rows * _ctx->cols; i++) {
ffffffff800054af:	49 83 c4 01          	add    $0x1,%r12
ffffffff800054b3:	48 89 c1             	mov    %rax,%rcx
        ctx->plot_char(_ctx, &ctx->grid[i], x, y);
ffffffff800054b6:	48 8b 83 e8 03 00 00 	mov    0x3e8(%rbx),%rax
ffffffff800054bd:	48 8d 34 b0          	lea    (%rax,%rsi,4),%rsi
ffffffff800054c1:	ff 93 c0 02 00 00    	call   *0x2c0(%rbx)
    for (size_t i = 0; i < (size_t)_ctx->rows * _ctx->cols; i++) {
ffffffff800054c7:	48 8b 8b f8 01 00 00 	mov    0x1f8(%rbx),%rcx
ffffffff800054ce:	48 8b 83 f0 01 00 00 	mov    0x1f0(%rbx),%rax
ffffffff800054d5:	48 0f af c1          	imul   %rcx,%rax
ffffffff800054d9:	49 39 c4             	cmp    %rax,%r12
ffffffff800054dc:	72 c2                	jb     ffffffff800054a0 <flanterm_fb_full_refresh+0x150>
    }

    if (_ctx->cursor_enabled) {
ffffffff800054de:	80 7b 09 00          	cmpb   $0x0,0x9(%rbx)
ffffffff800054e2:	75 32                	jne    ffffffff80005516 <flanterm_fb_full_refresh+0x1c6>
        draw_cursor(_ctx);
    }

    if (ctx->flush_callback) {
ffffffff800054e4:	48 8b 83 c8 02 00 00 	mov    0x2c8(%rbx),%rax
ffffffff800054eb:	48 85 c0             	test   %rax,%rax
ffffffff800054ee:	74 3a                	je     ffffffff8000552a <flanterm_fb_full_refresh+0x1da>
        ctx->flush_callback(ctx->framebuffer, ctx->pitch * ctx->phys_height);
ffffffff800054f0:	48 8b b3 18 03 00 00 	mov    0x318(%rbx),%rsi
ffffffff800054f7:	48 8b bb 10 03 00 00 	mov    0x310(%rbx),%rdi
ffffffff800054fe:	48 0f af b3 30 03 00 	imul   0x330(%rbx),%rsi
ffffffff80005505:	00 
    }
}
ffffffff80005506:	48 83 c4 28          	add    $0x28,%rsp
ffffffff8000550a:	5b                   	pop    %rbx
ffffffff8000550b:	41 5c                	pop    %r12
ffffffff8000550d:	41 5d                	pop    %r13
ffffffff8000550f:	41 5e                	pop    %r14
ffffffff80005511:	41 5f                	pop    %r15
ffffffff80005513:	5d                   	pop    %rbp
        ctx->flush_callback(ctx->framebuffer, ctx->pitch * ctx->phys_height);
ffffffff80005514:	ff e0                	jmp    *%rax
        draw_cursor(_ctx);
ffffffff80005516:	48 89 df             	mov    %rbx,%rdi
ffffffff80005519:	e8 82 fa ff ff       	call   ffffffff80004fa0 <draw_cursor>
    if (ctx->flush_callback) {
ffffffff8000551e:	48 8b 83 c8 02 00 00 	mov    0x2c8(%rbx),%rax
ffffffff80005525:	48 85 c0             	test   %rax,%rax
ffffffff80005528:	75 c6                	jne    ffffffff800054f0 <flanterm_fb_full_refresh+0x1a0>
}
ffffffff8000552a:	48 83 c4 28          	add    $0x28,%rsp
ffffffff8000552e:	5b                   	pop    %rbx
ffffffff8000552f:	41 5c                	pop    %r12
ffffffff80005531:	41 5d                	pop    %r13
ffffffff80005533:	41 5e                	pop    %r14
ffffffff80005535:	41 5f                	pop    %r15
ffffffff80005537:	5d                   	pop    %rbp
ffffffff80005538:	c3                   	ret
ffffffff80005539:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff80005540 <flanterm_fb_deinit>:

static void flanterm_fb_deinit(struct flanterm_context *_ctx, void (*_free)(void *, size_t)) {
    struct flanterm_fb_context *ctx = (void *)_ctx;

    if (_free == NULL) {
ffffffff80005540:	48 85 f6             	test   %rsi,%rsi
ffffffff80005543:	0f 84 8f 00 00 00    	je     ffffffff800055d8 <flanterm_fb_deinit+0x98>
static void flanterm_fb_deinit(struct flanterm_context *_ctx, void (*_free)(void *, size_t)) {
ffffffff80005549:	55                   	push   %rbp
ffffffff8000554a:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000554d:	41 54                	push   %r12
ffffffff8000554f:	49 89 f4             	mov    %rsi,%r12
ffffffff80005552:	53                   	push   %rbx
ffffffff80005553:	48 89 fb             	mov    %rdi,%rbx
        }
#endif
        return;
    }

    _free(ctx->font_bits, ctx->font_bits_size);
ffffffff80005556:	48 8b b7 50 03 00 00 	mov    0x350(%rdi),%rsi
ffffffff8000555d:	48 8b bf 58 03 00 00 	mov    0x358(%rdi),%rdi
ffffffff80005564:	41 ff d4             	call   *%r12
    _free(ctx->font_bool, ctx->font_bool_size);
ffffffff80005567:	48 8b b3 60 03 00 00 	mov    0x360(%rbx),%rsi
ffffffff8000556e:	48 8b bb 68 03 00 00 	mov    0x368(%rbx),%rdi
ffffffff80005575:	41 ff d4             	call   *%r12
    _free(ctx->grid, ctx->grid_size);
ffffffff80005578:	48 8b b3 d0 03 00 00 	mov    0x3d0(%rbx),%rsi
ffffffff8000557f:	48 8b bb e8 03 00 00 	mov    0x3e8(%rbx),%rdi
ffffffff80005586:	41 ff d4             	call   *%r12
    _free(ctx->queue, ctx->queue_size);
ffffffff80005589:	48 8b b3 d8 03 00 00 	mov    0x3d8(%rbx),%rsi
ffffffff80005590:	48 8b bb f0 03 00 00 	mov    0x3f0(%rbx),%rdi
ffffffff80005597:	41 ff d4             	call   *%r12
    _free(ctx->map, ctx->map_size);
ffffffff8000559a:	48 8b bb 00 04 00 00 	mov    0x400(%rbx),%rdi
ffffffff800055a1:	48 8b b3 e0 03 00 00 	mov    0x3e0(%rbx),%rsi
ffffffff800055a8:	41 ff d4             	call   *%r12

    if (ctx->canvas != NULL) {
ffffffff800055ab:	48 8b bb c8 03 00 00 	mov    0x3c8(%rbx),%rdi
ffffffff800055b2:	48 85 ff             	test   %rdi,%rdi
ffffffff800055b5:	74 0a                	je     ffffffff800055c1 <flanterm_fb_deinit+0x81>
        _free(ctx->canvas, ctx->canvas_size);
ffffffff800055b7:	48 8b b3 c0 03 00 00 	mov    0x3c0(%rbx),%rsi
ffffffff800055be:	41 ff d4             	call   *%r12
    }

    _free(ctx, sizeof(struct flanterm_fb_context));
ffffffff800055c1:	48 89 df             	mov    %rbx,%rdi
ffffffff800055c4:	4c 89 e0             	mov    %r12,%rax
}
ffffffff800055c7:	5b                   	pop    %rbx
    _free(ctx, sizeof(struct flanterm_fb_context));
ffffffff800055c8:	be 48 04 00 00       	mov    $0x448,%esi
}
ffffffff800055cd:	41 5c                	pop    %r12
ffffffff800055cf:	5d                   	pop    %rbp
    _free(ctx, sizeof(struct flanterm_fb_context));
ffffffff800055d0:	ff e0                	jmp    *%rax
ffffffff800055d2:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        if (bump_allocated_instance == true) {
ffffffff800055d8:	80 3d 21 8d 02 00 00 	cmpb   $0x0,0x28d21(%rip)        # ffffffff8002e300 <bump_allocated_instance>
ffffffff800055df:	74 1f                	je     ffffffff80005600 <flanterm_fb_deinit+0xc0>
            bump_alloc_ptr = 0;
ffffffff800055e1:	48 c7 05 1c 8d 02 00 	movq   $0x0,0x28d1c(%rip)        # ffffffff8002e308 <bump_alloc_ptr>
ffffffff800055e8:	00 00 00 00 
            bump_alloc_base_offset_added = false;
ffffffff800055ec:	c6 05 0e 8d 02 00 00 	movb   $0x0,0x28d0e(%rip)        # ffffffff8002e301 <bump_alloc_base_offset_added>
            bump_allocated_instance = false;
ffffffff800055f3:	c6 05 06 8d 02 00 00 	movb   $0x0,0x28d06(%rip)        # ffffffff8002e300 <bump_allocated_instance>
ffffffff800055fa:	c3                   	ret
ffffffff800055fb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff80005600:	c3                   	ret
ffffffff80005601:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80005608:	00 00 00 
ffffffff8000560b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80005610 <plot_char_scaled_canvas>:
static void plot_char_scaled_canvas(struct flanterm_context *_ctx, struct flanterm_fb_char *c, size_t x, size_t y) {
ffffffff80005610:	49 89 f9             	mov    %rdi,%r9
    if (x >= _ctx->cols || y >= _ctx->rows) {
ffffffff80005613:	48 3b 97 f8 01 00 00 	cmp    0x1f8(%rdi),%rdx
ffffffff8000561a:	0f 83 07 02 00 00    	jae    ffffffff80005827 <plot_char_scaled_canvas+0x217>
ffffffff80005620:	48 3b 8f f0 01 00 00 	cmp    0x1f0(%rdi),%rcx
ffffffff80005627:	0f 83 fa 01 00 00    	jae    ffffffff80005827 <plot_char_scaled_canvas+0x217>
static void plot_char_scaled_canvas(struct flanterm_context *_ctx, struct flanterm_fb_char *c, size_t x, size_t y) {
ffffffff8000562d:	55                   	push   %rbp
ffffffff8000562e:	48 89 f7             	mov    %rsi,%rdi
ffffffff80005631:	48 89 e5             	mov    %rsp,%rbp
ffffffff80005634:	41 57                	push   %r15
ffffffff80005636:	41 56                	push   %r14
ffffffff80005638:	41 55                	push   %r13
ffffffff8000563a:	41 54                	push   %r12
ffffffff8000563c:	53                   	push   %rbx
ffffffff8000563d:	48 83 ec 58          	sub    $0x58,%rsp
    y = ctx->offset_y + y * ctx->glyph_height;
ffffffff80005641:	49 8b 81 e8 02 00 00 	mov    0x2e8(%r9),%rax
    bool *glyph = &ctx->font_bool[c->c * ctx->font_height * ctx->font_width];
ffffffff80005648:	49 8b b1 68 03 00 00 	mov    0x368(%r9),%rsi
    x = ctx->offset_x + x * ctx->glyph_width;
ffffffff8000564f:	49 0f af 91 e0 02 00 	imul   0x2e0(%r9),%rdx
ffffffff80005656:	00 
    bool *glyph = &ctx->font_bool[c->c * ctx->font_height * ctx->font_width];
ffffffff80005657:	4d 8b b9 d0 02 00 00 	mov    0x2d0(%r9),%r15
    y = ctx->offset_y + y * ctx->glyph_height;
ffffffff8000565e:	48 89 45 b0          	mov    %rax,-0x50(%rbp)
ffffffff80005662:	48 0f af c1          	imul   %rcx,%rax
    bool *glyph = &ctx->font_bool[c->c * ctx->font_height * ctx->font_width];
ffffffff80005666:	8b 0f                	mov    (%rdi),%ecx
ffffffff80005668:	49 0f af 89 d8 02 00 	imul   0x2d8(%r9),%rcx
ffffffff8000566f:	00 
ffffffff80005670:	48 89 75 a8          	mov    %rsi,-0x58(%rbp)
    switch (ctx->rotation) {
ffffffff80005674:	41 8b b1 48 03 00 00 	mov    0x348(%r9),%esi
            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
ffffffff8000567b:	4d 8b 81 10 03 00 00 	mov    0x310(%r9),%r8
    x = ctx->offset_x + x * ctx->glyph_width;
ffffffff80005682:	49 03 91 00 03 00 00 	add    0x300(%r9),%rdx
    y = ctx->offset_y + y * ctx->glyph_height;
ffffffff80005689:	49 03 81 08 03 00 00 	add    0x308(%r9),%rax
    bool *glyph = &ctx->font_bool[c->c * ctx->font_height * ctx->font_width];
ffffffff80005690:	48 89 4d a0          	mov    %rcx,-0x60(%rbp)
            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
ffffffff80005694:	49 8b 89 18 03 00 00 	mov    0x318(%r9),%rcx
ffffffff8000569b:	48 c1 e9 02          	shr    $0x2,%rcx
    switch (ctx->rotation) {
ffffffff8000569f:	83 fe 02             	cmp    $0x2,%esi
ffffffff800056a2:	0f 84 c6 01 00 00    	je     ffffffff8000586e <plot_char_scaled_canvas+0x25e>
ffffffff800056a8:	83 fe 03             	cmp    $0x3,%esi
ffffffff800056ab:	0f 84 95 01 00 00    	je     ffffffff80005846 <plot_char_scaled_canvas+0x236>
ffffffff800056b1:	83 fe 01             	cmp    $0x1,%esi
ffffffff800056b4:	0f 85 6e 01 00 00    	jne    ffffffff80005828 <plot_char_scaled_canvas+0x218>
            dest = ctx->framebuffer + (ctx->height - 1 - y) + x * (ctx->pitch / 4);
ffffffff800056ba:	48 89 d6             	mov    %rdx,%rsi
ffffffff800056bd:	4d 8b 91 28 03 00 00 	mov    0x328(%r9),%r10
ffffffff800056c4:	48 0f af f1          	imul   %rcx,%rsi
ffffffff800056c8:	49 8d 74 32 ff       	lea    -0x1(%r10,%rsi,1),%rsi
            outer_stride = -1;
ffffffff800056cd:	41 ba ff ff ff ff    	mov    $0xffffffff,%r10d
            dest = ctx->framebuffer + (ctx->height - 1 - y) + x * (ctx->pitch / 4);
ffffffff800056d3:	48 29 c6             	sub    %rax,%rsi
ffffffff800056d6:	49 8d 34 b0          	lea    (%r8,%rsi,4),%rsi
ffffffff800056da:	49 89 f6             	mov    %rsi,%r14
    for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
ffffffff800056dd:	48 83 7d b0 00       	cmpq   $0x0,-0x50(%rbp)
ffffffff800056e2:	0f 84 30 01 00 00    	je     ffffffff80005818 <plot_char_scaled_canvas+0x208>
        uint8_t fy = gy / ctx->font_scale_y;
ffffffff800056e8:	49 8b b1 f8 02 00 00 	mov    0x2f8(%r9),%rsi
        dest += outer_stride;
ffffffff800056ef:	4d 63 d2             	movslq %r10d,%r10
                fb_line += inner_stride;
ffffffff800056f2:	48 63 c9             	movslq %ecx,%rcx
    for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
ffffffff800056f5:	4c 89 4d 80          	mov    %r9,-0x80(%rbp)
        dest += outer_stride;
ffffffff800056f9:	4a 8d 1c 95 00 00 00 	lea    0x0(,%r10,4),%rbx
ffffffff80005700:	00 
                fb_line += inner_stride;
ffffffff80005701:	4c 8d 04 8d 00 00 00 	lea    0x0(,%rcx,4),%r8
ffffffff80005708:	00 
        uint8_t fy = gy / ctx->font_scale_y;
ffffffff80005709:	48 89 75 90          	mov    %rsi,-0x70(%rbp)
        uint32_t *canvas_line = ctx->canvas + x + (y + gy) * ctx->width;
ffffffff8000570d:	49 8b b1 20 03 00 00 	mov    0x320(%r9),%rsi
        dest += outer_stride;
ffffffff80005714:	48 89 5d 88          	mov    %rbx,-0x78(%rbp)
ffffffff80005718:	48 0f af c6          	imul   %rsi,%rax
ffffffff8000571c:	48 8d 1c b5 00 00 00 	lea    0x0(,%rsi,4),%rbx
ffffffff80005723:	00 
    for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
ffffffff80005724:	31 f6                	xor    %esi,%esi
ffffffff80005726:	48 89 5d 98          	mov    %rbx,-0x68(%rbp)
ffffffff8000572a:	48 01 d0             	add    %rdx,%rax
ffffffff8000572d:	49 8b 91 c8 03 00 00 	mov    0x3c8(%r9),%rdx
ffffffff80005734:	4d 89 f1             	mov    %r14,%r9
ffffffff80005737:	48 8d 04 82          	lea    (%rdx,%rax,4),%rax
ffffffff8000573b:	48 89 45 c8          	mov    %rax,-0x38(%rbp)
ffffffff8000573f:	90                   	nop
        uint8_t fy = gy / ctx->font_scale_y;
ffffffff80005740:	48 89 f0             	mov    %rsi,%rax
ffffffff80005743:	31 d2                	xor    %edx,%edx
ffffffff80005745:	48 f7 75 90          	divq   -0x70(%rbp)
        bool *glyph_pointer = glyph + (fy * ctx->font_width);
ffffffff80005749:	0f b6 c8             	movzbl %al,%ecx
ffffffff8000574c:	48 8b 45 a0          	mov    -0x60(%rbp),%rax
ffffffff80005750:	48 01 c1             	add    %rax,%rcx
ffffffff80005753:	48 8b 45 a8          	mov    -0x58(%rbp),%rax
ffffffff80005757:	49 0f af cf          	imul   %r15,%rcx
ffffffff8000575b:	48 01 c1             	add    %rax,%rcx
        for (size_t fx = 0; fx < ctx->font_width; fx++) {
ffffffff8000575e:	4d 85 ff             	test   %r15,%r15
ffffffff80005761:	0f 84 94 00 00 00    	je     ffffffff800057fb <plot_char_scaled_canvas+0x1eb>
            for (size_t i = 0; i < ctx->font_scale_x; i++) {
ffffffff80005767:	48 8b 45 80          	mov    -0x80(%rbp),%rax
ffffffff8000576b:	4e 8d 2c 39          	lea    (%rcx,%r15,1),%r13
ffffffff8000576f:	4c 8b 90 f0 02 00 00 	mov    0x2f0(%rax),%r10
ffffffff80005776:	4d 8d 62 ff          	lea    -0x1(%r10),%r12
ffffffff8000577a:	4e 8d 34 95 00 00 00 	lea    0x0(,%r10,4),%r14
ffffffff80005781:	00 
ffffffff80005782:	4d 0f af e0          	imul   %r8,%r12
ffffffff80005786:	4d 85 d2             	test   %r10,%r10
ffffffff80005789:	74 70                	je     ffffffff800057fb <plot_char_scaled_canvas+0x1eb>
ffffffff8000578b:	4c 89 7d c0          	mov    %r15,-0x40(%rbp)
ffffffff8000578f:	4c 8b 5d c8          	mov    -0x38(%rbp),%r11
ffffffff80005793:	4c 89 cb             	mov    %r9,%rbx
ffffffff80005796:	4c 89 4d b8          	mov    %r9,-0x48(%rbp)
ffffffff8000579a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff800057a0:	48 89 4d d0          	mov    %rcx,-0x30(%rbp)
                *fb_line = *glyph_pointer ? fg : bg;
ffffffff800057a4:	44 0f b6 39          	movzbl (%rcx),%r15d
ffffffff800057a8:	49 89 d9             	mov    %rbx,%r9
            for (size_t i = 0; i < ctx->font_scale_x; i++) {
ffffffff800057ab:	31 d2                	xor    %edx,%edx
ffffffff800057ad:	0f 1f 00             	nopl   (%rax)
                uint32_t bg = c->bg == 0xffffffff ? canvas_line[gx] : c->bg;
ffffffff800057b0:	8b 47 08             	mov    0x8(%rdi),%eax
ffffffff800057b3:	83 f8 ff             	cmp    $0xffffffff,%eax
ffffffff800057b6:	75 04                	jne    ffffffff800057bc <plot_char_scaled_canvas+0x1ac>
ffffffff800057b8:	41 8b 04 93          	mov    (%r11,%rdx,4),%eax
                uint32_t fg = c->fg == 0xffffffff ? canvas_line[gx] : c->fg;
ffffffff800057bc:	8b 4f 04             	mov    0x4(%rdi),%ecx
ffffffff800057bf:	83 f9 ff             	cmp    $0xffffffff,%ecx
ffffffff800057c2:	75 04                	jne    ffffffff800057c8 <plot_char_scaled_canvas+0x1b8>
ffffffff800057c4:	41 8b 0c 93          	mov    (%r11,%rdx,4),%ecx
                *fb_line = *glyph_pointer ? fg : bg;
ffffffff800057c8:	45 84 ff             	test   %r15b,%r15b
ffffffff800057cb:	0f 45 c1             	cmovne %ecx,%eax
            for (size_t i = 0; i < ctx->font_scale_x; i++) {
ffffffff800057ce:	48 83 c2 01          	add    $0x1,%rdx
                *fb_line = *glyph_pointer ? fg : bg;
ffffffff800057d2:	41 89 01             	mov    %eax,(%r9)
                fb_line += inner_stride;
ffffffff800057d5:	4d 01 c1             	add    %r8,%r9
            for (size_t i = 0; i < ctx->font_scale_x; i++) {
ffffffff800057d8:	4c 39 d2             	cmp    %r10,%rdx
ffffffff800057db:	75 d3                	jne    ffffffff800057b0 <plot_char_scaled_canvas+0x1a0>
ffffffff800057dd:	48 8b 4d d0          	mov    -0x30(%rbp),%rcx
ffffffff800057e1:	4c 01 c3             	add    %r8,%rbx
        for (size_t fx = 0; fx < ctx->font_width; fx++) {
ffffffff800057e4:	4d 01 f3             	add    %r14,%r11
ffffffff800057e7:	4c 01 e3             	add    %r12,%rbx
            glyph_pointer++;
ffffffff800057ea:	48 83 c1 01          	add    $0x1,%rcx
        for (size_t fx = 0; fx < ctx->font_width; fx++) {
ffffffff800057ee:	49 39 cd             	cmp    %rcx,%r13
ffffffff800057f1:	75 ad                	jne    ffffffff800057a0 <plot_char_scaled_canvas+0x190>
ffffffff800057f3:	4c 8b 7d c0          	mov    -0x40(%rbp),%r15
ffffffff800057f7:	4c 8b 4d b8          	mov    -0x48(%rbp),%r9
        dest += outer_stride;
ffffffff800057fb:	48 8b 45 88          	mov    -0x78(%rbp),%rax
    for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
ffffffff800057ff:	48 8b 5d 98          	mov    -0x68(%rbp),%rbx
ffffffff80005803:	48 83 c6 01          	add    $0x1,%rsi
ffffffff80005807:	48 01 5d c8          	add    %rbx,-0x38(%rbp)
        dest += outer_stride;
ffffffff8000580b:	49 01 c1             	add    %rax,%r9
    for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
ffffffff8000580e:	48 39 75 b0          	cmp    %rsi,-0x50(%rbp)
ffffffff80005812:	0f 85 28 ff ff ff    	jne    ffffffff80005740 <plot_char_scaled_canvas+0x130>
}
ffffffff80005818:	48 83 c4 58          	add    $0x58,%rsp
ffffffff8000581c:	5b                   	pop    %rbx
ffffffff8000581d:	41 5c                	pop    %r12
ffffffff8000581f:	41 5d                	pop    %r13
ffffffff80005821:	41 5e                	pop    %r14
ffffffff80005823:	41 5f                	pop    %r15
ffffffff80005825:	5d                   	pop    %rbp
ffffffff80005826:	c3                   	ret
ffffffff80005827:	c3                   	ret
            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
ffffffff80005828:	48 89 c6             	mov    %rax,%rsi
            outer_stride = ctx->pitch / 4;
ffffffff8000582b:	41 89 ca             	mov    %ecx,%r10d
            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
ffffffff8000582e:	48 0f af f1          	imul   %rcx,%rsi
            inner_stride = 1;
ffffffff80005832:	b9 01 00 00 00       	mov    $0x1,%ecx
            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
ffffffff80005837:	48 01 d6             	add    %rdx,%rsi
ffffffff8000583a:	49 8d 34 b0          	lea    (%r8,%rsi,4),%rsi
ffffffff8000583e:	49 89 f6             	mov    %rsi,%r14
            break;
ffffffff80005841:	e9 97 fe ff ff       	jmp    ffffffff800056dd <plot_char_scaled_canvas+0xcd>
            dest = ctx->framebuffer + y + (ctx->width - 1 - x) * (ctx->pitch / 4);
ffffffff80005846:	48 89 d6             	mov    %rdx,%rsi
            outer_stride = 1;
ffffffff80005849:	41 ba 01 00 00 00    	mov    $0x1,%r10d
            dest = ctx->framebuffer + y + (ctx->width - 1 - x) * (ctx->pitch / 4);
ffffffff8000584f:	48 f7 d6             	not    %rsi
ffffffff80005852:	49 03 b1 20 03 00 00 	add    0x320(%r9),%rsi
ffffffff80005859:	48 0f af f1          	imul   %rcx,%rsi
            inner_stride = -(ctx->pitch / 4);
ffffffff8000585d:	f7 d9                	neg    %ecx
            dest = ctx->framebuffer + y + (ctx->width - 1 - x) * (ctx->pitch / 4);
ffffffff8000585f:	48 01 c6             	add    %rax,%rsi
ffffffff80005862:	49 8d 34 b0          	lea    (%r8,%rsi,4),%rsi
ffffffff80005866:	49 89 f6             	mov    %rsi,%r14
            break;
ffffffff80005869:	e9 6f fe ff ff       	jmp    ffffffff800056dd <plot_char_scaled_canvas+0xcd>
            dest = ctx->framebuffer + (ctx->width - 1 - x) + (ctx->height - 1 - y) * (ctx->pitch / 4);
ffffffff8000586e:	48 89 c6             	mov    %rax,%rsi
ffffffff80005871:	49 89 d2             	mov    %rdx,%r10
ffffffff80005874:	48 f7 d6             	not    %rsi
ffffffff80005877:	49 03 b1 28 03 00 00 	add    0x328(%r9),%rsi
ffffffff8000587e:	49 f7 d2             	not    %r10
ffffffff80005881:	4d 03 91 20 03 00 00 	add    0x320(%r9),%r10
ffffffff80005888:	48 0f af f1          	imul   %rcx,%rsi
ffffffff8000588c:	4c 01 d6             	add    %r10,%rsi
            outer_stride = -(ctx->pitch / 4);
ffffffff8000588f:	41 89 ca             	mov    %ecx,%r10d
            inner_stride = -1;
ffffffff80005892:	b9 ff ff ff ff       	mov    $0xffffffff,%ecx
            dest = ctx->framebuffer + (ctx->width - 1 - x) + (ctx->height - 1 - y) * (ctx->pitch / 4);
ffffffff80005897:	49 8d 34 b0          	lea    (%r8,%rsi,4),%rsi
            outer_stride = -(ctx->pitch / 4);
ffffffff8000589b:	41 f7 da             	neg    %r10d
            dest = ctx->framebuffer + (ctx->width - 1 - x) + (ctx->height - 1 - y) * (ctx->pitch / 4);
ffffffff8000589e:	49 89 f6             	mov    %rsi,%r14
            break;
ffffffff800058a1:	e9 37 fe ff ff       	jmp    ffffffff800056dd <plot_char_scaled_canvas+0xcd>
ffffffff800058a6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800058ad:	00 00 00 

ffffffff800058b0 <plot_char_unscaled_canvas>:
static void plot_char_unscaled_canvas(struct flanterm_context *_ctx, struct flanterm_fb_char *c, size_t x, size_t y) {
ffffffff800058b0:	48 89 f8             	mov    %rdi,%rax
    if (x >= _ctx->cols || y >= _ctx->rows) {
ffffffff800058b3:	48 3b 97 f8 01 00 00 	cmp    0x1f8(%rdi),%rdx
ffffffff800058ba:	0f 83 70 01 00 00    	jae    ffffffff80005a30 <plot_char_unscaled_canvas+0x180>
ffffffff800058c0:	48 3b 8f f0 01 00 00 	cmp    0x1f0(%rdi),%rcx
ffffffff800058c7:	0f 83 63 01 00 00    	jae    ffffffff80005a30 <plot_char_unscaled_canvas+0x180>
static void plot_char_unscaled_canvas(struct flanterm_context *_ctx, struct flanterm_fb_char *c, size_t x, size_t y) {
ffffffff800058cd:	55                   	push   %rbp
ffffffff800058ce:	48 89 f7             	mov    %rsi,%rdi
ffffffff800058d1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800058d4:	41 57                	push   %r15
ffffffff800058d6:	41 56                	push   %r14
ffffffff800058d8:	41 55                	push   %r13
ffffffff800058da:	41 54                	push   %r12
ffffffff800058dc:	53                   	push   %rbx
ffffffff800058dd:	48 83 ec 10          	sub    $0x10,%rsp
    y = ctx->offset_y + y * ctx->glyph_height;
ffffffff800058e1:	4c 8b b0 e8 02 00 00 	mov    0x2e8(%rax),%r14
    bool *glyph = &ctx->font_bool[c->c * ctx->font_height * ctx->font_width];
ffffffff800058e8:	44 8b 1f             	mov    (%rdi),%r11d
ffffffff800058eb:	4c 8b 88 d0 02 00 00 	mov    0x2d0(%rax),%r9
ffffffff800058f2:	4c 8b a0 d8 02 00 00 	mov    0x2d8(%rax),%r12
    y = ctx->offset_y + y * ctx->glyph_height;
ffffffff800058f9:	49 0f af ce          	imul   %r14,%rcx
ffffffff800058fd:	48 03 88 08 03 00 00 	add    0x308(%rax),%rcx
            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
ffffffff80005904:	4c 8b 90 18 03 00 00 	mov    0x318(%rax),%r10
    y = ctx->offset_y + y * ctx->glyph_height;
ffffffff8000590b:	48 89 ce             	mov    %rcx,%rsi
    switch (ctx->rotation) {
ffffffff8000590e:	8b 88 48 03 00 00    	mov    0x348(%rax),%ecx
    x = ctx->offset_x + x * ctx->glyph_width;
ffffffff80005914:	48 0f af 90 e0 02 00 	imul   0x2e0(%rax),%rdx
ffffffff8000591b:	00 
ffffffff8000591c:	4d 0f af e1          	imul   %r9,%r12
    bool *glyph = &ctx->font_bool[c->c * ctx->font_height * ctx->font_width];
ffffffff80005920:	4c 8b 80 68 03 00 00 	mov    0x368(%rax),%r8
            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
ffffffff80005927:	48 8b 98 10 03 00 00 	mov    0x310(%rax),%rbx
ffffffff8000592e:	49 c1 ea 02          	shr    $0x2,%r10
    x = ctx->offset_x + x * ctx->glyph_width;
ffffffff80005932:	48 03 90 00 03 00 00 	add    0x300(%rax),%rdx
    switch (ctx->rotation) {
ffffffff80005939:	83 f9 02             	cmp    $0x2,%ecx
ffffffff8000593c:	0f 84 43 01 00 00    	je     ffffffff80005a85 <plot_char_unscaled_canvas+0x1d5>
ffffffff80005942:	83 f9 03             	cmp    $0x3,%ecx
ffffffff80005945:	0f 84 14 01 00 00    	je     ffffffff80005a5f <plot_char_unscaled_canvas+0x1af>
ffffffff8000594b:	83 f9 01             	cmp    $0x1,%ecx
ffffffff8000594e:	0f 85 dd 00 00 00    	jne    ffffffff80005a31 <plot_char_unscaled_canvas+0x181>
            dest = ctx->framebuffer + (ctx->height - 1 - y) + x * (ctx->pitch / 4);
ffffffff80005954:	4c 89 d1             	mov    %r10,%rcx
ffffffff80005957:	4c 8b a8 28 03 00 00 	mov    0x328(%rax),%r13
ffffffff8000595e:	48 0f af ca          	imul   %rdx,%rcx
ffffffff80005962:	49 8d 4c 0d ff       	lea    -0x1(%r13,%rcx,1),%rcx
            outer_stride = -1;
ffffffff80005967:	41 bd ff ff ff ff    	mov    $0xffffffff,%r13d
            dest = ctx->framebuffer + (ctx->height - 1 - y) + x * (ctx->pitch / 4);
ffffffff8000596d:	48 29 f1             	sub    %rsi,%rcx
ffffffff80005970:	48 8d 0c 8b          	lea    (%rbx,%rcx,4),%rcx
    for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
ffffffff80005974:	4d 85 f6             	test   %r14,%r14
ffffffff80005977:	0f 84 d3 00 00 00    	je     ffffffff80005a50 <plot_char_unscaled_canvas+0x1a0>
        uint32_t *canvas_line = ctx->canvas + x + (y + gy) * ctx->width;
ffffffff8000597d:	48 8b 98 20 03 00 00 	mov    0x320(%rax),%rbx
ffffffff80005984:	4d 0f af dc          	imul   %r12,%r11
        dest += outer_stride;
ffffffff80005988:	4d 63 ed             	movslq %r13d,%r13
            fb_line += inner_stride;
ffffffff8000598b:	4d 63 d2             	movslq %r10d,%r10
ffffffff8000598e:	48 8b 80 c8 03 00 00 	mov    0x3c8(%rax),%rax
        dest += outer_stride;
ffffffff80005995:	4e 8d 3c ad 00 00 00 	lea    0x0(,%r13,4),%r15
ffffffff8000599c:	00 
            fb_line += inner_stride;
ffffffff8000599d:	49 c1 e2 02          	shl    $0x2,%r10
ffffffff800059a1:	48 0f af f3          	imul   %rbx,%rsi
        dest += outer_stride;
ffffffff800059a5:	4c 89 7d d0          	mov    %r15,-0x30(%rbp)
ffffffff800059a9:	4c 8d 3c 9d 00 00 00 	lea    0x0(,%rbx,4),%r15
ffffffff800059b0:	00 
ffffffff800059b1:	4d 01 d8             	add    %r11,%r8
ffffffff800059b4:	4d 89 c5             	mov    %r8,%r13
ffffffff800059b7:	48 01 f2             	add    %rsi,%rdx
ffffffff800059ba:	4c 8d 1c 90          	lea    (%rax,%rdx,4),%r11
ffffffff800059be:	4d 89 dc             	mov    %r11,%r12
        for (size_t fx = 0; fx < ctx->font_width; fx++) {
ffffffff800059c1:	4d 85 c9             	test   %r9,%r9
ffffffff800059c4:	0f 84 86 00 00 00    	je     ffffffff80005a50 <plot_char_unscaled_canvas+0x1a0>
ffffffff800059ca:	4c 89 75 c8          	mov    %r14,-0x38(%rbp)
ffffffff800059ce:	31 db                	xor    %ebx,%ebx
        volatile uint32_t *fb_line = dest;
ffffffff800059d0:	49 89 ce             	mov    %rcx,%r14
        for (size_t fx = 0; fx < ctx->font_width; fx++) {
ffffffff800059d3:	31 d2                	xor    %edx,%edx
ffffffff800059d5:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800059dc:	00 00 00 00 
            uint32_t bg = c->bg == 0xffffffff ? canvas_line[fx] : c->bg;
ffffffff800059e0:	8b 47 08             	mov    0x8(%rdi),%eax
ffffffff800059e3:	83 f8 ff             	cmp    $0xffffffff,%eax
ffffffff800059e6:	75 04                	jne    ffffffff800059ec <plot_char_unscaled_canvas+0x13c>
ffffffff800059e8:	41 8b 04 93          	mov    (%r11,%rdx,4),%eax
            uint32_t fg = c->fg == 0xffffffff ? canvas_line[fx] : c->fg;
ffffffff800059ec:	8b 77 04             	mov    0x4(%rdi),%esi
ffffffff800059ef:	83 fe ff             	cmp    $0xffffffff,%esi
ffffffff800059f2:	75 04                	jne    ffffffff800059f8 <plot_char_unscaled_canvas+0x148>
ffffffff800059f4:	41 8b 34 93          	mov    (%r11,%rdx,4),%esi
            *fb_line = *(glyph_pointer++) ? fg : bg;
ffffffff800059f8:	41 80 3c 10 00       	cmpb   $0x0,(%r8,%rdx,1)
ffffffff800059fd:	0f 45 c6             	cmovne %esi,%eax
        for (size_t fx = 0; fx < ctx->font_width; fx++) {
ffffffff80005a00:	48 83 c2 01          	add    $0x1,%rdx
            *fb_line = *(glyph_pointer++) ? fg : bg;
ffffffff80005a04:	41 89 06             	mov    %eax,(%r14)
            fb_line += inner_stride;
ffffffff80005a07:	4d 01 d6             	add    %r10,%r14
        for (size_t fx = 0; fx < ctx->font_width; fx++) {
ffffffff80005a0a:	49 39 d1             	cmp    %rdx,%r9
ffffffff80005a0d:	75 d1                	jne    ffffffff800059e0 <plot_char_unscaled_canvas+0x130>
        dest += outer_stride;
ffffffff80005a0f:	48 8b 45 d0          	mov    -0x30(%rbp),%rax
    for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
ffffffff80005a13:	48 83 c3 01          	add    $0x1,%rbx
ffffffff80005a17:	4d 01 cd             	add    %r9,%r13
ffffffff80005a1a:	4d 01 fc             	add    %r15,%r12
        dest += outer_stride;
ffffffff80005a1d:	48 01 c1             	add    %rax,%rcx
    for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
ffffffff80005a20:	48 39 5d c8          	cmp    %rbx,-0x38(%rbp)
ffffffff80005a24:	74 2a                	je     ffffffff80005a50 <plot_char_unscaled_canvas+0x1a0>
        uint32_t *canvas_line = ctx->canvas + x + (y + gy) * ctx->width;
ffffffff80005a26:	4d 89 e3             	mov    %r12,%r11
        bool *glyph_pointer = glyph + (gy * ctx->font_width);
ffffffff80005a29:	4d 89 e8             	mov    %r13,%r8
        for (size_t fx = 0; fx < ctx->font_width; fx++) {
ffffffff80005a2c:	eb a2                	jmp    ffffffff800059d0 <plot_char_unscaled_canvas+0x120>
ffffffff80005a2e:	66 90                	xchg   %ax,%ax
ffffffff80005a30:	c3                   	ret
            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
ffffffff80005a31:	4c 89 d1             	mov    %r10,%rcx
            outer_stride = ctx->pitch / 4;
ffffffff80005a34:	45 89 d5             	mov    %r10d,%r13d
            inner_stride = 1;
ffffffff80005a37:	41 ba 01 00 00 00    	mov    $0x1,%r10d
            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
ffffffff80005a3d:	48 0f af ce          	imul   %rsi,%rcx
ffffffff80005a41:	48 01 d1             	add    %rdx,%rcx
ffffffff80005a44:	48 8d 0c 8b          	lea    (%rbx,%rcx,4),%rcx
            break;
ffffffff80005a48:	e9 27 ff ff ff       	jmp    ffffffff80005974 <plot_char_unscaled_canvas+0xc4>
ffffffff80005a4d:	0f 1f 00             	nopl   (%rax)
}
ffffffff80005a50:	48 83 c4 10          	add    $0x10,%rsp
ffffffff80005a54:	5b                   	pop    %rbx
ffffffff80005a55:	41 5c                	pop    %r12
ffffffff80005a57:	41 5d                	pop    %r13
ffffffff80005a59:	41 5e                	pop    %r14
ffffffff80005a5b:	41 5f                	pop    %r15
ffffffff80005a5d:	5d                   	pop    %rbp
ffffffff80005a5e:	c3                   	ret
            dest = ctx->framebuffer + y + (ctx->width - 1 - x) * (ctx->pitch / 4);
ffffffff80005a5f:	48 89 d1             	mov    %rdx,%rcx
            outer_stride = 1;
ffffffff80005a62:	41 bd 01 00 00 00    	mov    $0x1,%r13d
            dest = ctx->framebuffer + y + (ctx->width - 1 - x) * (ctx->pitch / 4);
ffffffff80005a68:	48 f7 d1             	not    %rcx
ffffffff80005a6b:	48 03 88 20 03 00 00 	add    0x320(%rax),%rcx
ffffffff80005a72:	49 0f af ca          	imul   %r10,%rcx
            inner_stride = -(ctx->pitch / 4);
ffffffff80005a76:	41 f7 da             	neg    %r10d
            dest = ctx->framebuffer + y + (ctx->width - 1 - x) * (ctx->pitch / 4);
ffffffff80005a79:	48 01 f1             	add    %rsi,%rcx
ffffffff80005a7c:	48 8d 0c 8b          	lea    (%rbx,%rcx,4),%rcx
            break;
ffffffff80005a80:	e9 ef fe ff ff       	jmp    ffffffff80005974 <plot_char_unscaled_canvas+0xc4>
            dest = ctx->framebuffer + (ctx->width - 1 - x) + (ctx->height - 1 - y) * (ctx->pitch / 4);
ffffffff80005a85:	48 89 f1             	mov    %rsi,%rcx
ffffffff80005a88:	49 89 d5             	mov    %rdx,%r13
ffffffff80005a8b:	48 f7 d1             	not    %rcx
ffffffff80005a8e:	48 03 88 28 03 00 00 	add    0x328(%rax),%rcx
ffffffff80005a95:	49 f7 d5             	not    %r13
ffffffff80005a98:	4c 03 a8 20 03 00 00 	add    0x320(%rax),%r13
ffffffff80005a9f:	49 0f af ca          	imul   %r10,%rcx
ffffffff80005aa3:	4c 01 e9             	add    %r13,%rcx
            outer_stride = -(ctx->pitch / 4);
ffffffff80005aa6:	45 89 d5             	mov    %r10d,%r13d
            inner_stride = -1;
ffffffff80005aa9:	41 ba ff ff ff ff    	mov    $0xffffffff,%r10d
            dest = ctx->framebuffer + (ctx->width - 1 - x) + (ctx->height - 1 - y) * (ctx->pitch / 4);
ffffffff80005aaf:	48 8d 0c 8b          	lea    (%rbx,%rcx,4),%rcx
            outer_stride = -(ctx->pitch / 4);
ffffffff80005ab3:	41 f7 dd             	neg    %r13d
            break;
ffffffff80005ab6:	e9 b9 fe ff ff       	jmp    ffffffff80005974 <plot_char_unscaled_canvas+0xc4>
ffffffff80005abb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80005ac0 <plot_char_unscaled_uncanvas>:
    if (x >= _ctx->cols || y >= _ctx->rows) {
ffffffff80005ac0:	48 3b 97 f8 01 00 00 	cmp    0x1f8(%rdi),%rdx
ffffffff80005ac7:	0f 83 03 01 00 00    	jae    ffffffff80005bd0 <plot_char_unscaled_uncanvas+0x110>
ffffffff80005acd:	48 89 f8             	mov    %rdi,%rax
ffffffff80005ad0:	48 3b 8f f0 01 00 00 	cmp    0x1f0(%rdi),%rcx
ffffffff80005ad7:	0f 83 f3 00 00 00    	jae    ffffffff80005bd0 <plot_char_unscaled_uncanvas+0x110>
static void plot_char_unscaled_uncanvas(struct flanterm_context *_ctx, struct flanterm_fb_char *c, size_t x, size_t y) {
ffffffff80005add:	55                   	push   %rbp
ffffffff80005ade:	48 89 e5             	mov    %rsp,%rbp
ffffffff80005ae1:	41 55                	push   %r13
ffffffff80005ae3:	41 54                	push   %r12
ffffffff80005ae5:	53                   	push   %rbx
ffffffff80005ae6:	44 8b 4e 08          	mov    0x8(%rsi),%r9d
    uint32_t bg = c->bg == 0xffffffff ? default_bg : c->bg;
ffffffff80005aea:	44 8b 16             	mov    (%rsi),%r10d
ffffffff80005aed:	44 8b 46 04          	mov    0x4(%rsi),%r8d
ffffffff80005af1:	41 83 f9 ff          	cmp    $0xffffffff,%r9d
ffffffff80005af5:	75 07                	jne    ffffffff80005afe <plot_char_unscaled_uncanvas+0x3e>
    uint32_t default_bg = ctx->default_bg;
ffffffff80005af7:	44 8b 8f b4 03 00 00 	mov    0x3b4(%rdi),%r9d
    uint32_t fg = c->fg == 0xffffffff ? ctx->default_fg : c->fg;
ffffffff80005afe:	41 83 f8 ff          	cmp    $0xffffffff,%r8d
ffffffff80005b02:	75 07                	jne    ffffffff80005b0b <plot_char_unscaled_uncanvas+0x4b>
ffffffff80005b04:	44 8b 80 b0 03 00 00 	mov    0x3b0(%rax),%r8d
    y = ctx->offset_y + y * ctx->glyph_height;
ffffffff80005b0b:	48 8b 98 e8 02 00 00 	mov    0x2e8(%rax),%rbx
            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
ffffffff80005b12:	48 8b b8 18 03 00 00 	mov    0x318(%rax),%rdi
    switch (ctx->rotation) {
ffffffff80005b19:	44 8b a8 48 03 00 00 	mov    0x348(%rax),%r13d
    x = ctx->offset_x + x * ctx->glyph_width;
ffffffff80005b20:	48 0f af 90 e0 02 00 	imul   0x2e0(%rax),%rdx
ffffffff80005b27:	00 
    y = ctx->offset_y + y * ctx->glyph_height;
ffffffff80005b28:	48 0f af cb          	imul   %rbx,%rcx
    bool *glyph = &ctx->font_bool[c->c * ctx->font_height * ctx->font_width];
ffffffff80005b2c:	48 8b b0 68 03 00 00 	mov    0x368(%rax),%rsi
ffffffff80005b33:	4c 8b a0 d0 02 00 00 	mov    0x2d0(%rax),%r12
            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
ffffffff80005b3a:	48 c1 ef 02          	shr    $0x2,%rdi
    bool *glyph = &ctx->font_bool[c->c * ctx->font_height * ctx->font_width];
ffffffff80005b3e:	4c 0f af 90 d8 02 00 	imul   0x2d8(%rax),%r10
ffffffff80005b45:	00 
            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
ffffffff80005b46:	4c 8b 98 10 03 00 00 	mov    0x310(%rax),%r11
    x = ctx->offset_x + x * ctx->glyph_width;
ffffffff80005b4d:	48 03 90 00 03 00 00 	add    0x300(%rax),%rdx
    y = ctx->offset_y + y * ctx->glyph_height;
ffffffff80005b54:	48 03 88 08 03 00 00 	add    0x308(%rax),%rcx
    switch (ctx->rotation) {
ffffffff80005b5b:	41 83 fd 02          	cmp    $0x2,%r13d
ffffffff80005b5f:	0f 84 f0 00 00 00    	je     ffffffff80005c55 <plot_char_unscaled_uncanvas+0x195>
ffffffff80005b65:	41 83 fd 03          	cmp    $0x3,%r13d
ffffffff80005b69:	0f 84 c1 00 00 00    	je     ffffffff80005c30 <plot_char_unscaled_uncanvas+0x170>
ffffffff80005b6f:	41 83 fd 01          	cmp    $0x1,%r13d
ffffffff80005b73:	75 5c                	jne    ffffffff80005bd1 <plot_char_unscaled_uncanvas+0x111>
            dest = ctx->framebuffer + (ctx->height - 1 - y) + x * (ctx->pitch / 4);
ffffffff80005b75:	48 0f af d7          	imul   %rdi,%rdx
ffffffff80005b79:	48 8b 80 28 03 00 00 	mov    0x328(%rax),%rax
            outer_stride = -1;
ffffffff80005b80:	41 bd ff ff ff ff    	mov    $0xffffffff,%r13d
            dest = ctx->framebuffer + (ctx->height - 1 - y) + x * (ctx->pitch / 4);
ffffffff80005b86:	48 8d 44 10 ff       	lea    -0x1(%rax,%rdx,1),%rax
ffffffff80005b8b:	48 29 c8             	sub    %rcx,%rax
ffffffff80005b8e:	4d 8d 1c 83          	lea    (%r11,%rax,4),%r11
    for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
ffffffff80005b92:	48 85 db             	test   %rbx,%rbx
ffffffff80005b95:	74 2a                	je     ffffffff80005bc1 <plot_char_unscaled_uncanvas+0x101>
ffffffff80005b97:	49 83 c2 01          	add    $0x1,%r10
            fb_line += inner_stride;
ffffffff80005b9b:	48 63 ff             	movslq %edi,%rdi
        dest += outer_stride;
ffffffff80005b9e:	4d 63 ed             	movslq %r13d,%r13
ffffffff80005ba1:	4d 0f af d4          	imul   %r12,%r10
            fb_line += inner_stride;
ffffffff80005ba5:	48 c1 e7 02          	shl    $0x2,%rdi
        dest += outer_stride;
ffffffff80005ba9:	49 c1 e5 02          	shl    $0x2,%r13
ffffffff80005bad:	4c 01 d6             	add    %r10,%rsi
    for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
ffffffff80005bb0:	45 31 d2             	xor    %r10d,%r10d
        for (size_t fx = 0; fx < ctx->font_width; fx++) {
ffffffff80005bb3:	4d 85 e4             	test   %r12,%r12
ffffffff80005bb6:	75 2f                	jne    ffffffff80005be7 <plot_char_unscaled_uncanvas+0x127>
    for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
ffffffff80005bb8:	49 83 c2 01          	add    $0x1,%r10
ffffffff80005bbc:	4c 39 d3             	cmp    %r10,%rbx
ffffffff80005bbf:	75 f7                	jne    ffffffff80005bb8 <plot_char_unscaled_uncanvas+0xf8>
}
ffffffff80005bc1:	5b                   	pop    %rbx
ffffffff80005bc2:	41 5c                	pop    %r12
ffffffff80005bc4:	41 5d                	pop    %r13
ffffffff80005bc6:	5d                   	pop    %rbp
ffffffff80005bc7:	c3                   	ret
ffffffff80005bc8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80005bcf:	00 
ffffffff80005bd0:	c3                   	ret
            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
ffffffff80005bd1:	48 0f af cf          	imul   %rdi,%rcx
            outer_stride = ctx->pitch / 4;
ffffffff80005bd5:	41 89 fd             	mov    %edi,%r13d
            inner_stride = 1;
ffffffff80005bd8:	bf 01 00 00 00       	mov    $0x1,%edi
            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
ffffffff80005bdd:	48 8d 04 11          	lea    (%rcx,%rdx,1),%rax
ffffffff80005be1:	4d 8d 1c 83          	lea    (%r11,%rax,4),%r11
            break;
ffffffff80005be5:	eb ab                	jmp    ffffffff80005b92 <plot_char_unscaled_uncanvas+0xd2>
        bool *glyph_pointer = glyph + (gy * ctx->font_width);
ffffffff80005be7:	48 89 f0             	mov    %rsi,%rax
ffffffff80005bea:	4c 29 e0             	sub    %r12,%rax
ffffffff80005bed:	0f 1f 00             	nopl   (%rax)
        volatile uint32_t *fb_line = dest;
ffffffff80005bf0:	4c 89 da             	mov    %r11,%rdx
ffffffff80005bf3:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80005bfa:	00 00 00 00 
ffffffff80005bfe:	66 90                	xchg   %ax,%ax
            *fb_line = *(glyph_pointer++) ? fg : bg;
ffffffff80005c00:	48 83 c0 01          	add    $0x1,%rax
ffffffff80005c04:	44 89 c9             	mov    %r9d,%ecx
ffffffff80005c07:	80 78 ff 00          	cmpb   $0x0,-0x1(%rax)
ffffffff80005c0b:	41 0f 45 c8          	cmovne %r8d,%ecx
ffffffff80005c0f:	89 0a                	mov    %ecx,(%rdx)
            fb_line += inner_stride;
ffffffff80005c11:	48 01 fa             	add    %rdi,%rdx
        for (size_t fx = 0; fx < ctx->font_width; fx++) {
ffffffff80005c14:	48 39 f0             	cmp    %rsi,%rax
ffffffff80005c17:	75 e7                	jne    ffffffff80005c00 <plot_char_unscaled_uncanvas+0x140>
    for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
ffffffff80005c19:	49 83 c2 01          	add    $0x1,%r10
        dest += outer_stride;
ffffffff80005c1d:	4d 01 eb             	add    %r13,%r11
    for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
ffffffff80005c20:	49 8d 34 04          	lea    (%r12,%rax,1),%rsi
ffffffff80005c24:	4c 39 d3             	cmp    %r10,%rbx
ffffffff80005c27:	75 c7                	jne    ffffffff80005bf0 <plot_char_unscaled_uncanvas+0x130>
}
ffffffff80005c29:	5b                   	pop    %rbx
ffffffff80005c2a:	41 5c                	pop    %r12
ffffffff80005c2c:	41 5d                	pop    %r13
ffffffff80005c2e:	5d                   	pop    %rbp
ffffffff80005c2f:	c3                   	ret
            dest = ctx->framebuffer + y + (ctx->width - 1 - x) * (ctx->pitch / 4);
ffffffff80005c30:	48 f7 d2             	not    %rdx
ffffffff80005c33:	48 03 90 20 03 00 00 	add    0x320(%rax),%rdx
            outer_stride = 1;
ffffffff80005c3a:	41 bd 01 00 00 00    	mov    $0x1,%r13d
            dest = ctx->framebuffer + y + (ctx->width - 1 - x) * (ctx->pitch / 4);
ffffffff80005c40:	48 89 d0             	mov    %rdx,%rax
ffffffff80005c43:	48 0f af c7          	imul   %rdi,%rax
            inner_stride = -(ctx->pitch / 4);
ffffffff80005c47:	f7 df                	neg    %edi
            dest = ctx->framebuffer + y + (ctx->width - 1 - x) * (ctx->pitch / 4);
ffffffff80005c49:	48 01 c8             	add    %rcx,%rax
ffffffff80005c4c:	4d 8d 1c 83          	lea    (%r11,%rax,4),%r11
            break;
ffffffff80005c50:	e9 3d ff ff ff       	jmp    ffffffff80005b92 <plot_char_unscaled_uncanvas+0xd2>
            dest = ctx->framebuffer + (ctx->width - 1 - x) + (ctx->height - 1 - y) * (ctx->pitch / 4);
ffffffff80005c55:	48 f7 d1             	not    %rcx
ffffffff80005c58:	48 03 88 28 03 00 00 	add    0x328(%rax),%rcx
ffffffff80005c5f:	48 f7 d2             	not    %rdx
            outer_stride = -(ctx->pitch / 4);
ffffffff80005c62:	41 89 fd             	mov    %edi,%r13d
            dest = ctx->framebuffer + (ctx->width - 1 - x) + (ctx->height - 1 - y) * (ctx->pitch / 4);
ffffffff80005c65:	48 0f af cf          	imul   %rdi,%rcx
ffffffff80005c69:	48 03 90 20 03 00 00 	add    0x320(%rax),%rdx
            outer_stride = -(ctx->pitch / 4);
ffffffff80005c70:	41 f7 dd             	neg    %r13d
            inner_stride = -1;
ffffffff80005c73:	bf ff ff ff ff       	mov    $0xffffffff,%edi
            dest = ctx->framebuffer + (ctx->width - 1 - x) + (ctx->height - 1 - y) * (ctx->pitch / 4);
ffffffff80005c78:	48 8d 04 11          	lea    (%rcx,%rdx,1),%rax
ffffffff80005c7c:	4d 8d 1c 83          	lea    (%r11,%rax,4),%r11
            break;
ffffffff80005c80:	e9 0d ff ff ff       	jmp    ffffffff80005b92 <plot_char_unscaled_uncanvas+0xd2>
ffffffff80005c85:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80005c8c:	00 00 00 
ffffffff80005c8f:	90                   	nop

ffffffff80005c90 <plot_char_scaled_uncanvas>:
    if (x >= _ctx->cols || y >= _ctx->rows) {
ffffffff80005c90:	48 3b 97 f8 01 00 00 	cmp    0x1f8(%rdi),%rdx
ffffffff80005c97:	0f 83 b9 01 00 00    	jae    ffffffff80005e56 <plot_char_scaled_uncanvas+0x1c6>
static void plot_char_scaled_uncanvas(struct flanterm_context *_ctx, struct flanterm_fb_char *c, size_t x, size_t y) {
ffffffff80005c9d:	55                   	push   %rbp
ffffffff80005c9e:	48 89 e5             	mov    %rsp,%rbp
ffffffff80005ca1:	41 57                	push   %r15
ffffffff80005ca3:	41 56                	push   %r14
ffffffff80005ca5:	41 55                	push   %r13
ffffffff80005ca7:	41 54                	push   %r12
ffffffff80005ca9:	53                   	push   %rbx
ffffffff80005caa:	48 89 fb             	mov    %rdi,%rbx
ffffffff80005cad:	48 83 ec 30          	sub    $0x30,%rsp
    if (x >= _ctx->cols || y >= _ctx->rows) {
ffffffff80005cb1:	48 3b 8f f0 01 00 00 	cmp    0x1f0(%rdi),%rcx
ffffffff80005cb8:	0f 83 89 01 00 00    	jae    ffffffff80005e47 <plot_char_scaled_uncanvas+0x1b7>
ffffffff80005cbe:	44 8b 76 08          	mov    0x8(%rsi),%r14d
    uint32_t bg = c->bg == 0xffffffff ? default_bg : c->bg;
ffffffff80005cc2:	8b 06                	mov    (%rsi),%eax
ffffffff80005cc4:	44 8b 6e 04          	mov    0x4(%rsi),%r13d
ffffffff80005cc8:	41 83 fe ff          	cmp    $0xffffffff,%r14d
ffffffff80005ccc:	75 07                	jne    ffffffff80005cd5 <plot_char_scaled_uncanvas+0x45>
    uint32_t default_bg = ctx->default_bg;
ffffffff80005cce:	44 8b b7 b4 03 00 00 	mov    0x3b4(%rdi),%r14d
    uint32_t fg = c->fg == 0xffffffff ? ctx->default_fg : c->fg;
ffffffff80005cd5:	41 83 fd ff          	cmp    $0xffffffff,%r13d
ffffffff80005cd9:	75 07                	jne    ffffffff80005ce2 <plot_char_scaled_uncanvas+0x52>
ffffffff80005cdb:	44 8b ab b0 03 00 00 	mov    0x3b0(%rbx),%r13d
    y = ctx->offset_y + y * ctx->glyph_height;
ffffffff80005ce2:	48 8b bb e8 02 00 00 	mov    0x2e8(%rbx),%rdi
    bool *glyph = &ctx->font_bool[c->c * ctx->font_height * ctx->font_width];
ffffffff80005ce9:	48 0f af 83 d8 02 00 	imul   0x2d8(%rbx),%rax
ffffffff80005cf0:	00 
    x = ctx->offset_x + x * ctx->glyph_width;
ffffffff80005cf1:	48 0f af 93 e0 02 00 	imul   0x2e0(%rbx),%rdx
ffffffff80005cf8:	00 
    bool *glyph = &ctx->font_bool[c->c * ctx->font_height * ctx->font_width];
ffffffff80005cf9:	4c 8b a3 d0 02 00 00 	mov    0x2d0(%rbx),%r12
    y = ctx->offset_y + y * ctx->glyph_height;
ffffffff80005d00:	48 0f af cf          	imul   %rdi,%rcx
ffffffff80005d04:	48 89 7d c8          	mov    %rdi,-0x38(%rbp)
    bool *glyph = &ctx->font_bool[c->c * ctx->font_height * ctx->font_width];
ffffffff80005d08:	48 8b bb 68 03 00 00 	mov    0x368(%rbx),%rdi
ffffffff80005d0f:	48 89 45 b8          	mov    %rax,-0x48(%rbp)
            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
ffffffff80005d13:	48 8b 83 18 03 00 00 	mov    0x318(%rbx),%rax
    bool *glyph = &ctx->font_bool[c->c * ctx->font_height * ctx->font_width];
ffffffff80005d1a:	48 89 7d c0          	mov    %rdi,-0x40(%rbp)
    switch (ctx->rotation) {
ffffffff80005d1e:	8b bb 48 03 00 00    	mov    0x348(%rbx),%edi
            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
ffffffff80005d24:	48 8b b3 10 03 00 00 	mov    0x310(%rbx),%rsi
    x = ctx->offset_x + x * ctx->glyph_width;
ffffffff80005d2b:	48 03 93 00 03 00 00 	add    0x300(%rbx),%rdx
            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
ffffffff80005d32:	48 c1 e8 02          	shr    $0x2,%rax
    y = ctx->offset_y + y * ctx->glyph_height;
ffffffff80005d36:	48 03 8b 08 03 00 00 	add    0x308(%rbx),%rcx
    switch (ctx->rotation) {
ffffffff80005d3d:	83 ff 02             	cmp    $0x2,%edi
ffffffff80005d40:	0f 84 49 01 00 00    	je     ffffffff80005e8f <plot_char_scaled_uncanvas+0x1ff>
ffffffff80005d46:	83 ff 03             	cmp    $0x3,%edi
ffffffff80005d49:	0f 84 1f 01 00 00    	je     ffffffff80005e6e <plot_char_scaled_uncanvas+0x1de>
ffffffff80005d4f:	83 ff 01             	cmp    $0x1,%edi
ffffffff80005d52:	0f 85 ff 00 00 00    	jne    ffffffff80005e57 <plot_char_scaled_uncanvas+0x1c7>
            dest = ctx->framebuffer + (ctx->height - 1 - y) + x * (ctx->pitch / 4);
ffffffff80005d58:	48 0f af d0          	imul   %rax,%rdx
ffffffff80005d5c:	48 8b bb 28 03 00 00 	mov    0x328(%rbx),%rdi
ffffffff80005d63:	48 8d 54 17 ff       	lea    -0x1(%rdi,%rdx,1),%rdx
ffffffff80005d68:	48 29 ca             	sub    %rcx,%rdx
ffffffff80005d6b:	4c 8d 3c 96          	lea    (%rsi,%rdx,4),%r15
            outer_stride = -1;
ffffffff80005d6f:	ba ff ff ff ff       	mov    $0xffffffff,%edx
    for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
ffffffff80005d74:	48 83 7d c8 00       	cmpq   $0x0,-0x38(%rbp)
ffffffff80005d79:	0f 84 c8 00 00 00    	je     ffffffff80005e47 <plot_char_scaled_uncanvas+0x1b7>
                fb_line += inner_stride;
ffffffff80005d7f:	48 98                	cltq
        dest += outer_stride;
ffffffff80005d81:	48 63 d2             	movslq %edx,%rdx
        uint8_t fy = gy / ctx->font_scale_y;
ffffffff80005d84:	48 8b bb f8 02 00 00 	mov    0x2f8(%rbx),%rdi
    for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
ffffffff80005d8b:	31 f6                	xor    %esi,%esi
                fb_line += inner_stride;
ffffffff80005d8d:	48 8d 0c 85 00 00 00 	lea    0x0(,%rax,4),%rcx
ffffffff80005d94:	00 
        dest += outer_stride;
ffffffff80005d95:	48 8d 04 95 00 00 00 	lea    0x0(,%rdx,4),%rax
ffffffff80005d9c:	00 
ffffffff80005d9d:	48 89 45 a8          	mov    %rax,-0x58(%rbp)
        uint8_t fy = gy / ctx->font_scale_y;
ffffffff80005da1:	48 89 7d b0          	mov    %rdi,-0x50(%rbp)
    for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
ffffffff80005da5:	48 89 df             	mov    %rbx,%rdi
ffffffff80005da8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80005daf:	00 
        uint8_t fy = gy / ctx->font_scale_y;
ffffffff80005db0:	48 89 f0             	mov    %rsi,%rax
ffffffff80005db3:	31 d2                	xor    %edx,%edx
ffffffff80005db5:	48 f7 75 b0          	divq   -0x50(%rbp)
        bool *glyph_pointer = glyph + (fy * ctx->font_width);
ffffffff80005db9:	44 0f b6 c8          	movzbl %al,%r9d
ffffffff80005dbd:	48 8b 45 b8          	mov    -0x48(%rbp),%rax
ffffffff80005dc1:	49 01 c1             	add    %rax,%r9
ffffffff80005dc4:	48 8b 45 c0          	mov    -0x40(%rbp),%rax
ffffffff80005dc8:	4d 0f af cc          	imul   %r12,%r9
ffffffff80005dcc:	49 01 c1             	add    %rax,%r9
        for (size_t fx = 0; fx < ctx->font_width; fx++) {
ffffffff80005dcf:	4d 85 e4             	test   %r12,%r12
ffffffff80005dd2:	74 5e                	je     ffffffff80005e32 <plot_char_scaled_uncanvas+0x1a2>
            for (size_t i = 0; i < ctx->font_scale_x; i++) {
ffffffff80005dd4:	4c 8b 87 f0 02 00 00 	mov    0x2f0(%rdi),%r8
ffffffff80005ddb:	4b 8d 1c 21          	lea    (%r9,%r12,1),%rbx
ffffffff80005ddf:	4d 8d 58 ff          	lea    -0x1(%r8),%r11
ffffffff80005de3:	4c 0f af d9          	imul   %rcx,%r11
ffffffff80005de7:	4d 85 c0             	test   %r8,%r8
ffffffff80005dea:	74 46                	je     ffffffff80005e32 <plot_char_scaled_uncanvas+0x1a2>
ffffffff80005dec:	4c 89 65 d0          	mov    %r12,-0x30(%rbp)
ffffffff80005df0:	4d 89 fa             	mov    %r15,%r10
ffffffff80005df3:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80005dfa:	00 00 00 00 
ffffffff80005dfe:	66 90                	xchg   %ax,%ax
ffffffff80005e00:	41 80 39 00          	cmpb   $0x0,(%r9)
ffffffff80005e04:	45 89 f4             	mov    %r14d,%r12d
                *fb_line = *glyph_pointer ? fg : bg;
ffffffff80005e07:	4c 89 d2             	mov    %r10,%rdx
ffffffff80005e0a:	45 0f 45 e5          	cmovne %r13d,%r12d
            for (size_t i = 0; i < ctx->font_scale_x; i++) {
ffffffff80005e0e:	31 c0                	xor    %eax,%eax
ffffffff80005e10:	48 83 c0 01          	add    $0x1,%rax
                *fb_line = *glyph_pointer ? fg : bg;
ffffffff80005e14:	44 89 22             	mov    %r12d,(%rdx)
                fb_line += inner_stride;
ffffffff80005e17:	48 01 ca             	add    %rcx,%rdx
            for (size_t i = 0; i < ctx->font_scale_x; i++) {
ffffffff80005e1a:	4c 39 c0             	cmp    %r8,%rax
ffffffff80005e1d:	75 f1                	jne    ffffffff80005e10 <plot_char_scaled_uncanvas+0x180>
ffffffff80005e1f:	49 01 ca             	add    %rcx,%r10
            glyph_pointer++;
ffffffff80005e22:	49 83 c1 01          	add    $0x1,%r9
ffffffff80005e26:	4d 01 da             	add    %r11,%r10
        for (size_t fx = 0; fx < ctx->font_width; fx++) {
ffffffff80005e29:	49 39 d9             	cmp    %rbx,%r9
ffffffff80005e2c:	75 d2                	jne    ffffffff80005e00 <plot_char_scaled_uncanvas+0x170>
ffffffff80005e2e:	4c 8b 65 d0          	mov    -0x30(%rbp),%r12
        dest += outer_stride;
ffffffff80005e32:	48 8b 45 a8          	mov    -0x58(%rbp),%rax
    for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
ffffffff80005e36:	48 83 c6 01          	add    $0x1,%rsi
        dest += outer_stride;
ffffffff80005e3a:	49 01 c7             	add    %rax,%r15
    for (size_t gy = 0; gy < ctx->glyph_height; gy++) {
ffffffff80005e3d:	48 39 75 c8          	cmp    %rsi,-0x38(%rbp)
ffffffff80005e41:	0f 85 69 ff ff ff    	jne    ffffffff80005db0 <plot_char_scaled_uncanvas+0x120>
}
ffffffff80005e47:	48 83 c4 30          	add    $0x30,%rsp
ffffffff80005e4b:	5b                   	pop    %rbx
ffffffff80005e4c:	41 5c                	pop    %r12
ffffffff80005e4e:	41 5d                	pop    %r13
ffffffff80005e50:	41 5e                	pop    %r14
ffffffff80005e52:	41 5f                	pop    %r15
ffffffff80005e54:	5d                   	pop    %rbp
ffffffff80005e55:	c3                   	ret
ffffffff80005e56:	c3                   	ret
            dest = ctx->framebuffer + x + y * (ctx->pitch / 4);
ffffffff80005e57:	48 0f af c8          	imul   %rax,%rcx
ffffffff80005e5b:	48 01 ca             	add    %rcx,%rdx
ffffffff80005e5e:	4c 8d 3c 96          	lea    (%rsi,%rdx,4),%r15
            outer_stride = ctx->pitch / 4;
ffffffff80005e62:	89 c2                	mov    %eax,%edx
            inner_stride = 1;
ffffffff80005e64:	b8 01 00 00 00       	mov    $0x1,%eax
            break;
ffffffff80005e69:	e9 06 ff ff ff       	jmp    ffffffff80005d74 <plot_char_scaled_uncanvas+0xe4>
            dest = ctx->framebuffer + y + (ctx->width - 1 - x) * (ctx->pitch / 4);
ffffffff80005e6e:	48 f7 d2             	not    %rdx
ffffffff80005e71:	48 03 93 20 03 00 00 	add    0x320(%rbx),%rdx
ffffffff80005e78:	48 0f af d0          	imul   %rax,%rdx
            inner_stride = -(ctx->pitch / 4);
ffffffff80005e7c:	f7 d8                	neg    %eax
            dest = ctx->framebuffer + y + (ctx->width - 1 - x) * (ctx->pitch / 4);
ffffffff80005e7e:	48 01 ca             	add    %rcx,%rdx
ffffffff80005e81:	4c 8d 3c 96          	lea    (%rsi,%rdx,4),%r15
            outer_stride = 1;
ffffffff80005e85:	ba 01 00 00 00       	mov    $0x1,%edx
            break;
ffffffff80005e8a:	e9 e5 fe ff ff       	jmp    ffffffff80005d74 <plot_char_scaled_uncanvas+0xe4>
            dest = ctx->framebuffer + (ctx->width - 1 - x) + (ctx->height - 1 - y) * (ctx->pitch / 4);
ffffffff80005e8f:	48 f7 d1             	not    %rcx
ffffffff80005e92:	48 03 8b 28 03 00 00 	add    0x328(%rbx),%rcx
ffffffff80005e99:	48 f7 d2             	not    %rdx
ffffffff80005e9c:	48 03 93 20 03 00 00 	add    0x320(%rbx),%rdx
ffffffff80005ea3:	48 0f af c8          	imul   %rax,%rcx
ffffffff80005ea7:	48 01 ca             	add    %rcx,%rdx
ffffffff80005eaa:	4c 8d 3c 96          	lea    (%rsi,%rdx,4),%r15
            outer_stride = -(ctx->pitch / 4);
ffffffff80005eae:	89 c2                	mov    %eax,%edx
            inner_stride = -1;
ffffffff80005eb0:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
            outer_stride = -(ctx->pitch / 4);
ffffffff80005eb5:	f7 da                	neg    %edx
            break;
ffffffff80005eb7:	e9 b8 fe ff ff       	jmp    ffffffff80005d74 <plot_char_scaled_uncanvas+0xe4>
ffffffff80005ebc:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff80005ec0 <flanterm_fb_init>:
    uint32_t *default_bg_bright, uint32_t *default_fg_bright,
    void *font, size_t font_width, size_t font_height, size_t font_spacing,
    size_t font_scale_x, size_t font_scale_y,
    size_t margin,
    int rotation
) {
ffffffff80005ec0:	55                   	push   %rbp
ffffffff80005ec1:	48 89 e5             	mov    %rsp,%rbp
ffffffff80005ec4:	41 57                	push   %r15
ffffffff80005ec6:	49 89 ff             	mov    %rdi,%r15
ffffffff80005ec9:	41 56                	push   %r14
ffffffff80005ecb:	41 55                	push   %r13
ffffffff80005ecd:	41 54                	push   %r12
ffffffff80005ecf:	53                   	push   %rbx
ffffffff80005ed0:	48 81 ec 98 00 00 00 	sub    $0x98,%rsp
ffffffff80005ed7:	8b 45 18             	mov    0x18(%rbp),%eax
ffffffff80005eda:	44 8b 6d 10          	mov    0x10(%rbp),%r13d
ffffffff80005ede:	48 89 75 a0          	mov    %rsi,-0x60(%rbp)
ffffffff80005ee2:	44 8b 5d 20          	mov    0x20(%rbp),%r11d
ffffffff80005ee6:	44 8b 75 30          	mov    0x30(%rbp),%r14d
ffffffff80005eea:	48 89 4d 98          	mov    %rcx,-0x68(%rbp)
ffffffff80005eee:	89 45 c8             	mov    %eax,-0x38(%rbp)
ffffffff80005ef1:	8b 45 28             	mov    0x28(%rbp),%eax
ffffffff80005ef4:	48 89 95 50 ff ff ff 	mov    %rdx,-0xb0(%rbp)
ffffffff80005efb:	4c 8b a5 88 00 00 00 	mov    0x88(%rbp),%r12
ffffffff80005f02:	89 45 c0             	mov    %eax,-0x40(%rbp)
ffffffff80005f05:	8b 45 38             	mov    0x38(%rbp),%eax
ffffffff80005f08:	4c 89 85 40 ff ff ff 	mov    %r8,-0xc0(%rbp)
ffffffff80005f0f:	4c 89 8d 48 ff ff ff 	mov    %r9,-0xb8(%rbp)
ffffffff80005f16:	89 45 b0             	mov    %eax,-0x50(%rbp)
ffffffff80005f19:	44 88 6d 90          	mov    %r13b,-0x70(%rbp)
ffffffff80005f1d:	44 88 9d 7c ff ff ff 	mov    %r11b,-0x84(%rbp)
ffffffff80005f24:	44 88 b5 78 ff ff ff 	mov    %r14b,-0x88(%rbp)
    size_t phys_height = height;

    if (rotation == FLANTERM_FB_ROTATE_90 || rotation == FLANTERM_FB_ROTATE_270) {
ffffffff80005f2b:	8b 85 b0 00 00 00    	mov    0xb0(%rbp),%eax
        size_t tmp = width;
        width = height;
ffffffff80005f31:	4c 89 45 a8          	mov    %r8,-0x58(%rbp)
    if (rotation == FLANTERM_FB_ROTATE_90 || rotation == FLANTERM_FB_ROTATE_270) {
ffffffff80005f35:	83 e0 fd             	and    $0xfffffffd,%eax
ffffffff80005f38:	83 f8 01             	cmp    $0x1,%eax
ffffffff80005f3b:	74 08                	je     ffffffff80005f45 <flanterm_fb_init+0x85>
ffffffff80005f3d:	48 89 4d a8          	mov    %rcx,-0x58(%rbp)
ffffffff80005f41:	4c 89 45 98          	mov    %r8,-0x68(%rbp)
        height = tmp;
    }

    if (font_scale_x == 0 || font_scale_y == 0) {
ffffffff80005f45:	48 83 bd 98 00 00 00 	cmpq   $0x0,0x98(%rbp)
ffffffff80005f4c:	00 
ffffffff80005f4d:	0f 84 54 0a 00 00    	je     ffffffff800069a7 <flanterm_fb_init+0xae7>
ffffffff80005f53:	48 83 bd a0 00 00 00 	cmpq   $0x0,0xa0(%rbp)
ffffffff80005f5a:	00 
ffffffff80005f5b:	0f 84 46 0a 00 00    	je     ffffffff800069a7 <flanterm_fb_init+0xae7>
            font_scale_x = 4;
            font_scale_y = 4;
        }
    }

    if (red_mask_size < 8 || red_mask_size != green_mask_size || red_mask_size != blue_mask_size) {
ffffffff80005f61:	41 80 fd 07          	cmp    $0x7,%r13b
ffffffff80005f65:	0f 96 c0             	setbe  %al
ffffffff80005f68:	45 38 dd             	cmp    %r11b,%r13b
ffffffff80005f6b:	0f 95 c2             	setne  %dl
ffffffff80005f6e:	08 d0                	or     %dl,%al
ffffffff80005f70:	0f 85 1a 0a 00 00    	jne    ffffffff80006990 <flanterm_fb_init+0xad0>
ffffffff80005f76:	45 38 f5             	cmp    %r14b,%r13b
ffffffff80005f79:	0f 85 11 0a 00 00    	jne    ffffffff80006990 <flanterm_fb_init+0xad0>
        return NULL;
    }

    if (_malloc == NULL) {
ffffffff80005f7f:	4d 85 ff             	test   %r15,%r15
ffffffff80005f82:	0f 84 6d 0b 00 00    	je     ffffffff80006af5 <flanterm_fb_init+0xc35>
ffffffff80005f88:	44 89 5d b8          	mov    %r11d,-0x48(%rbp)
        return NULL;
#endif
    }

    struct flanterm_fb_context *ctx = NULL;
    ctx = _malloc(sizeof(struct flanterm_fb_context));
ffffffff80005f8c:	bf 48 04 00 00       	mov    $0x448,%edi
ffffffff80005f91:	41 ff d7             	call   *%r15
ffffffff80005f94:	48 89 c3             	mov    %rax,%rbx
    if (ctx == NULL) {
ffffffff80005f97:	48 85 c0             	test   %rax,%rax
ffffffff80005f9a:	0f 84 f0 09 00 00    	je     ffffffff80006990 <flanterm_fb_init+0xad0>
        goto fail;
    }

    struct flanterm_context *_ctx = (void *)ctx;
    memset(ctx, 0, sizeof(struct flanterm_fb_context));
ffffffff80005fa0:	31 f6                	xor    %esi,%esi
ffffffff80005fa2:	ba 48 04 00 00       	mov    $0x448,%edx
ffffffff80005fa7:	48 89 c7             	mov    %rax,%rdi
ffffffff80005faa:	e8 71 42 01 00       	call   ffffffff8001a220 <memset>

    ctx->red_mask_size = red_mask_size;
    ctx->red_mask_shift = red_mask_shift + (red_mask_size - 8);
ffffffff80005faf:	0f b6 45 c8          	movzbl -0x38(%rbp),%eax
    ctx->green_mask_size = green_mask_size;
    ctx->green_mask_shift = green_mask_shift + (green_mask_size - 8);
ffffffff80005fb3:	44 8b 5d b8          	mov    -0x48(%rbp),%r11d
    ctx->blue_mask_size = blue_mask_size;
ffffffff80005fb7:	44 88 b3 44 03 00 00 	mov    %r14b,0x344(%rbx)
    ctx->red_mask_shift = red_mask_shift + (red_mask_size - 8);
ffffffff80005fbe:	42 8d 7c 28 f8       	lea    -0x8(%rax,%r13,1),%edi
    ctx->green_mask_shift = green_mask_shift + (green_mask_size - 8);
ffffffff80005fc3:	0f b6 45 c0          	movzbl -0x40(%rbp),%eax
    ctx->red_mask_size = red_mask_size;
ffffffff80005fc7:	89 fa                	mov    %edi,%edx
    ctx->red_mask_shift = red_mask_shift + (red_mask_size - 8);
ffffffff80005fc9:	40 88 7d b4          	mov    %dil,-0x4c(%rbp)
    ctx->green_mask_shift = green_mask_shift + (green_mask_size - 8);
ffffffff80005fcd:	46 8d 44 18 f8       	lea    -0x8(%rax,%r11,1),%r8d
    ctx->red_mask_size = red_mask_size;
ffffffff80005fd2:	31 c0                	xor    %eax,%eax
ffffffff80005fd4:	45 0f b6 db          	movzbl %r11b,%r11d
ffffffff80005fd8:	44 88 e8             	mov    %r13b,%al
ffffffff80005fdb:	44 89 de             	mov    %r11d,%esi
ffffffff80005fde:	44 89 c1             	mov    %r8d,%ecx
ffffffff80005fe1:	c1 e6 10             	shl    $0x10,%esi
ffffffff80005fe4:	88 d4                	mov    %dl,%ah
ffffffff80005fe6:	c1 e1 18             	shl    $0x18,%ecx
ffffffff80005fe9:	41 0f b6 d0          	movzbl %r8b,%edx
ffffffff80005fed:	0f b7 c0             	movzwl %ax,%eax
ffffffff80005ff0:	89 55 b8             	mov    %edx,-0x48(%rbp)
ffffffff80005ff3:	09 f0                	or     %esi,%eax
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80005ff5:	40 0f b6 f7          	movzbl %dil,%esi
    ctx->red_mask_size = red_mask_size;
ffffffff80005ff9:	09 c8                	or     %ecx,%eax
    ctx->blue_mask_shift = blue_mask_shift + (blue_mask_size - 8);

    if (ansi_colours != NULL) {
ffffffff80005ffb:	48 83 7d 48 00       	cmpq   $0x0,0x48(%rbp)
    ctx->red_mask_size = red_mask_size;
ffffffff80006000:	89 83 40 03 00 00    	mov    %eax,0x340(%rbx)
    ctx->blue_mask_shift = blue_mask_shift + (blue_mask_size - 8);
ffffffff80006006:	0f b6 45 b0          	movzbl -0x50(%rbp),%eax
ffffffff8000600a:	42 8d 44 30 f8       	lea    -0x8(%rax,%r14,1),%eax
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff8000600f:	0f b6 d0             	movzbl %al,%edx
    ctx->blue_mask_shift = blue_mask_shift + (blue_mask_size - 8);
ffffffff80006012:	88 45 c0             	mov    %al,-0x40(%rbp)
ffffffff80006015:	88 83 45 03 00 00    	mov    %al,0x345(%rbx)
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff8000601b:	89 55 c8             	mov    %edx,-0x38(%rbp)
    if (ansi_colours != NULL) {
ffffffff8000601e:	0f 84 65 0d 00 00    	je     ffffffff80006d89 <flanterm_fb_init+0xec9>
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006024:	b9 10 00 00 00       	mov    $0x10,%ecx
ffffffff80006029:	45 0f b6 cd          	movzbl %r13b,%r9d
        for (size_t i = 0; i < 8; i++) {
ffffffff8000602d:	31 c0                	xor    %eax,%eax
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff8000602f:	89 cf                	mov    %ecx,%edi
ffffffff80006031:	44 29 cf             	sub    %r9d,%edi
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006034:	44 0f b6 8d 7c ff ff 	movzbl -0x84(%rbp),%r9d
ffffffff8000603b:	ff 
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff8000603c:	89 7d 8c             	mov    %edi,-0x74(%rbp)
ffffffff8000603f:	8d 7e 08             	lea    0x8(%rsi),%edi
ffffffff80006042:	89 7d 88             	mov    %edi,-0x78(%rbp)
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006045:	89 cf                	mov    %ecx,%edi
ffffffff80006047:	44 29 cf             	sub    %r9d,%edi
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff8000604a:	44 0f b6 8d 78 ff ff 	movzbl -0x88(%rbp),%r9d
ffffffff80006051:	ff 
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006052:	89 7d 84             	mov    %edi,-0x7c(%rbp)
ffffffff80006055:	41 0f b6 f8          	movzbl %r8b,%edi
ffffffff80006059:	83 c7 08             	add    $0x8,%edi
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff8000605c:	44 29 c9             	sub    %r9d,%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff8000605f:	89 7d 80             	mov    %edi,-0x80(%rbp)
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80006062:	8d 7a 08             	lea    0x8(%rdx),%edi
ffffffff80006065:	89 8d 74 ff ff ff    	mov    %ecx,-0x8c(%rbp)
ffffffff8000606b:	89 bd 70 ff ff ff    	mov    %edi,-0x90(%rbp)
            ctx->ansi_colours[i] = convert_colour(_ctx, ansi_colours[i]);
ffffffff80006071:	48 8b 55 48          	mov    0x48(%rbp),%rdx
ffffffff80006075:	8b 0c 82             	mov    (%rdx,%rax,4),%ecx
    uint32_t g = (colour >> 8) & 0xff;
ffffffff80006078:	0f b6 d5             	movzbl %ch,%edx
    uint32_t r = (colour >> 16) & 0xff;
ffffffff8000607b:	89 cf                	mov    %ecx,%edi
    uint32_t g = (colour >> 8) & 0xff;
ffffffff8000607d:	41 89 d1             	mov    %edx,%r9d
    uint32_t b =  colour & 0xff;
ffffffff80006080:	0f b6 d1             	movzbl %cl,%edx
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006083:	0f b6 4d b8          	movzbl -0x48(%rbp),%ecx
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80006087:	c1 ef 10             	shr    $0x10,%edi
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff8000608a:	45 89 ca             	mov    %r9d,%r10d
    uint32_t r = (colour >> 16) & 0xff;
ffffffff8000608d:	40 0f b6 ff          	movzbl %dil,%edi
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006091:	41 d3 e2             	shl    %cl,%r10d
ffffffff80006094:	89 f1                	mov    %esi,%ecx
ffffffff80006096:	89 7d b0             	mov    %edi,-0x50(%rbp)
ffffffff80006099:	d3 e7                	shl    %cl,%edi
ffffffff8000609b:	0f b6 4d c8          	movzbl -0x38(%rbp),%ecx
ffffffff8000609f:	41 09 fa             	or     %edi,%r10d
ffffffff800060a2:	89 d7                	mov    %edx,%edi
ffffffff800060a4:	d3 e7                	shl    %cl,%edi
ffffffff800060a6:	41 09 fa             	or     %edi,%r10d
    if (ctx->red_mask_size > 8) {
ffffffff800060a9:	80 7d 90 08          	cmpb   $0x8,-0x70(%rbp)
ffffffff800060ad:	74 3f                	je     ffffffff800060ee <flanterm_fb_init+0x22e>
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff800060af:	0f b6 4d 8c          	movzbl -0x74(%rbp),%ecx
ffffffff800060b3:	8b 7d b0             	mov    -0x50(%rbp),%edi
ffffffff800060b6:	d3 ef                	shr    %cl,%edi
ffffffff800060b8:	0f b6 4d 88          	movzbl -0x78(%rbp),%ecx
ffffffff800060bc:	d3 e7                	shl    %cl,%edi
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800060be:	0f b6 4d 84          	movzbl -0x7c(%rbp),%ecx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff800060c2:	44 09 d7             	or     %r10d,%edi
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800060c5:	41 d3 e9             	shr    %cl,%r9d
ffffffff800060c8:	0f b6 4d 80          	movzbl -0x80(%rbp),%ecx
ffffffff800060cc:	41 d3 e1             	shl    %cl,%r9d
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800060cf:	0f b6 8d 74 ff ff ff 	movzbl -0x8c(%rbp),%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800060d6:	44 09 cf             	or     %r9d,%edi
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800060d9:	d3 ea                	shr    %cl,%edx
ffffffff800060db:	0f b6 8d 70 ff ff ff 	movzbl -0x90(%rbp),%ecx
ffffffff800060e2:	41 89 d1             	mov    %edx,%r9d
ffffffff800060e5:	41 d3 e1             	shl    %cl,%r9d
ffffffff800060e8:	45 89 ca             	mov    %r9d,%r10d
ffffffff800060eb:	41 09 fa             	or     %edi,%r10d
            ctx->ansi_colours[i] = convert_colour(_ctx, ansi_colours[i]);
ffffffff800060ee:	44 89 94 83 70 03 00 	mov    %r10d,0x370(%rbx,%rax,4)
ffffffff800060f5:	00 
        for (size_t i = 0; i < 8; i++) {
ffffffff800060f6:	48 83 c0 01          	add    $0x1,%rax
ffffffff800060fa:	48 83 f8 08          	cmp    $0x8,%rax
ffffffff800060fe:	0f 85 6d ff ff ff    	jne    ffffffff80006071 <flanterm_fb_init+0x1b1>
        ctx->ansi_colours[5] = convert_colour(_ctx, 0x00aa00aa); // magenta
        ctx->ansi_colours[6] = convert_colour(_ctx, 0x0000aaaa); // cyan
        ctx->ansi_colours[7] = convert_colour(_ctx, 0x00aaaaaa); // grey
    }

    if (ansi_bright_colours != NULL) {
ffffffff80006104:	48 83 7d 50 00       	cmpq   $0x0,0x50(%rbp)
ffffffff80006109:	0f 84 1e 0d 00 00    	je     ffffffff80006e2d <flanterm_fb_init+0xf6d>
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff8000610f:	41 b9 10 00 00 00    	mov    $0x10,%r9d
ffffffff80006115:	0f b6 4d 90          	movzbl -0x70(%rbp),%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006119:	8b 55 b8             	mov    -0x48(%rbp),%edx
        for (size_t i = 0; i < 8; i++) {
ffffffff8000611c:	31 c0                	xor    %eax,%eax
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff8000611e:	44 89 cf             	mov    %r9d,%edi
ffffffff80006121:	29 cf                	sub    %ecx,%edi
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006123:	0f b6 8d 7c ff ff ff 	movzbl -0x84(%rbp),%ecx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff8000612a:	89 7d 8c             	mov    %edi,-0x74(%rbp)
ffffffff8000612d:	8d 7e 08             	lea    0x8(%rsi),%edi
ffffffff80006130:	89 7d 88             	mov    %edi,-0x78(%rbp)
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006133:	44 89 cf             	mov    %r9d,%edi
ffffffff80006136:	29 cf                	sub    %ecx,%edi
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80006138:	0f b6 8d 78 ff ff ff 	movzbl -0x88(%rbp),%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff8000613f:	89 7d 84             	mov    %edi,-0x7c(%rbp)
ffffffff80006142:	8d 7a 08             	lea    0x8(%rdx),%edi
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80006145:	8b 55 c8             	mov    -0x38(%rbp),%edx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006148:	89 7d 80             	mov    %edi,-0x80(%rbp)
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff8000614b:	41 29 c9             	sub    %ecx,%r9d
ffffffff8000614e:	8d 7a 08             	lea    0x8(%rdx),%edi
ffffffff80006151:	44 89 8d 7c ff ff ff 	mov    %r9d,-0x84(%rbp)
ffffffff80006158:	89 bd 78 ff ff ff    	mov    %edi,-0x88(%rbp)
            ctx->ansi_bright_colours[i] = convert_colour(_ctx, ansi_bright_colours[i]);
ffffffff8000615e:	48 8b 55 50          	mov    0x50(%rbp),%rdx
ffffffff80006162:	8b 0c 82             	mov    (%rdx,%rax,4),%ecx
    uint32_t g = (colour >> 8) & 0xff;
ffffffff80006165:	0f b6 d5             	movzbl %ch,%edx
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80006168:	89 cf                	mov    %ecx,%edi
    uint32_t g = (colour >> 8) & 0xff;
ffffffff8000616a:	41 89 d1             	mov    %edx,%r9d
    uint32_t b =  colour & 0xff;
ffffffff8000616d:	0f b6 d1             	movzbl %cl,%edx
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006170:	0f b6 4d b8          	movzbl -0x48(%rbp),%ecx
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80006174:	c1 ef 10             	shr    $0x10,%edi
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006177:	45 89 ca             	mov    %r9d,%r10d
    uint32_t r = (colour >> 16) & 0xff;
ffffffff8000617a:	40 0f b6 ff          	movzbl %dil,%edi
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff8000617e:	41 d3 e2             	shl    %cl,%r10d
ffffffff80006181:	89 f1                	mov    %esi,%ecx
ffffffff80006183:	89 7d b0             	mov    %edi,-0x50(%rbp)
ffffffff80006186:	d3 e7                	shl    %cl,%edi
ffffffff80006188:	0f b6 4d c8          	movzbl -0x38(%rbp),%ecx
ffffffff8000618c:	41 09 fa             	or     %edi,%r10d
ffffffff8000618f:	89 d7                	mov    %edx,%edi
ffffffff80006191:	d3 e7                	shl    %cl,%edi
ffffffff80006193:	41 09 fa             	or     %edi,%r10d
    if (ctx->red_mask_size > 8) {
ffffffff80006196:	80 7d 90 08          	cmpb   $0x8,-0x70(%rbp)
ffffffff8000619a:	74 3f                	je     ffffffff800061db <flanterm_fb_init+0x31b>
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff8000619c:	0f b6 4d 8c          	movzbl -0x74(%rbp),%ecx
ffffffff800061a0:	8b 7d b0             	mov    -0x50(%rbp),%edi
ffffffff800061a3:	d3 ef                	shr    %cl,%edi
ffffffff800061a5:	0f b6 4d 88          	movzbl -0x78(%rbp),%ecx
ffffffff800061a9:	d3 e7                	shl    %cl,%edi
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800061ab:	0f b6 4d 84          	movzbl -0x7c(%rbp),%ecx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff800061af:	44 09 d7             	or     %r10d,%edi
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800061b2:	41 d3 e9             	shr    %cl,%r9d
ffffffff800061b5:	0f b6 4d 80          	movzbl -0x80(%rbp),%ecx
ffffffff800061b9:	41 d3 e1             	shl    %cl,%r9d
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800061bc:	0f b6 8d 7c ff ff ff 	movzbl -0x84(%rbp),%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800061c3:	44 09 cf             	or     %r9d,%edi
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800061c6:	d3 ea                	shr    %cl,%edx
ffffffff800061c8:	0f b6 8d 78 ff ff ff 	movzbl -0x88(%rbp),%ecx
ffffffff800061cf:	41 89 d1             	mov    %edx,%r9d
ffffffff800061d2:	41 d3 e1             	shl    %cl,%r9d
ffffffff800061d5:	45 89 ca             	mov    %r9d,%r10d
ffffffff800061d8:	41 09 fa             	or     %edi,%r10d
            ctx->ansi_bright_colours[i] = convert_colour(_ctx, ansi_bright_colours[i]);
ffffffff800061db:	44 89 94 83 90 03 00 	mov    %r10d,0x390(%rbx,%rax,4)
ffffffff800061e2:	00 
        for (size_t i = 0; i < 8; i++) {
ffffffff800061e3:	48 83 c0 01          	add    $0x1,%rax
ffffffff800061e7:	48 83 f8 08          	cmp    $0x8,%rax
ffffffff800061eb:	0f 85 6d ff ff ff    	jne    ffffffff8000615e <flanterm_fb_init+0x29e>
        ctx->ansi_bright_colours[5] = convert_colour(_ctx, 0x00ff55ff); // magenta
        ctx->ansi_bright_colours[6] = convert_colour(_ctx, 0x0055ffff); // cyan
        ctx->ansi_bright_colours[7] = convert_colour(_ctx, 0x00ffffff); // grey
    }

    if (default_bg != NULL) {
ffffffff800061f1:	45 31 c9             	xor    %r9d,%r9d
ffffffff800061f4:	48 83 7d 58 00       	cmpq   $0x0,0x58(%rbp)
ffffffff800061f9:	74 41                	je     ffffffff8000623c <flanterm_fb_init+0x37c>
        ctx->default_bg = convert_colour(_ctx, *default_bg);
ffffffff800061fb:	48 8b 45 58          	mov    0x58(%rbp),%rax
ffffffff800061ff:	8b 08                	mov    (%rax),%ecx
    uint32_t g = (colour >> 8) & 0xff;
ffffffff80006201:	0f b6 fd             	movzbl %ch,%edi
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80006204:	41 89 c9             	mov    %ecx,%r9d
    uint32_t b =  colour & 0xff;
ffffffff80006207:	0f b6 c1             	movzbl %cl,%eax
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff8000620a:	44 89 c1             	mov    %r8d,%ecx
    uint32_t r = (colour >> 16) & 0xff;
ffffffff8000620d:	41 c1 e9 10          	shr    $0x10,%r9d
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006211:	89 fa                	mov    %edi,%edx
ffffffff80006213:	d3 e7                	shl    %cl,%edi
ffffffff80006215:	0f b6 4d c0          	movzbl -0x40(%rbp),%ecx
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80006219:	45 0f b6 d1          	movzbl %r9b,%r10d
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff8000621d:	41 89 c1             	mov    %eax,%r9d
ffffffff80006220:	41 d3 e1             	shl    %cl,%r9d
ffffffff80006223:	0f b6 4d b4          	movzbl -0x4c(%rbp),%ecx
ffffffff80006227:	41 09 f9             	or     %edi,%r9d
ffffffff8000622a:	44 89 d7             	mov    %r10d,%edi
ffffffff8000622d:	d3 e7                	shl    %cl,%edi
ffffffff8000622f:	41 09 f9             	or     %edi,%r9d
    if (ctx->red_mask_size > 8) {
ffffffff80006232:	41 80 fd 08          	cmp    $0x8,%r13b
ffffffff80006236:	0f 85 7b 0a 00 00    	jne    ffffffff80006cb7 <flanterm_fb_init+0xdf7>
    } else {
        ctx->default_bg = 0x00000000; // background (black)
    }

    if (default_fg != NULL) {
ffffffff8000623c:	48 83 7d 60 00       	cmpq   $0x0,0x60(%rbp)
        ctx->default_bg = convert_colour(_ctx, *default_bg);
ffffffff80006241:	44 89 8b b4 03 00 00 	mov    %r9d,0x3b4(%rbx)
    if (default_fg != NULL) {
ffffffff80006248:	0f 84 c3 0a 00 00    	je     ffffffff80006d11 <flanterm_fb_init+0xe51>
        ctx->default_fg = convert_colour(_ctx, *default_fg);
ffffffff8000624e:	48 8b 45 60          	mov    0x60(%rbp),%rax
ffffffff80006252:	8b 08                	mov    (%rax),%ecx
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80006254:	41 89 c9             	mov    %ecx,%r9d
    uint32_t g = (colour >> 8) & 0xff;
ffffffff80006257:	0f b6 fd             	movzbl %ch,%edi
    uint32_t r = (colour >> 16) & 0xff;
ffffffff8000625a:	41 c1 e9 10          	shr    $0x10,%r9d
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff8000625e:	41 89 fa             	mov    %edi,%r10d
ffffffff80006261:	89 7d 90             	mov    %edi,-0x70(%rbp)
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80006264:	41 0f b6 c1          	movzbl %r9b,%eax
    uint32_t b =  colour & 0xff;
ffffffff80006268:	44 0f b6 c9          	movzbl %cl,%r9d
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff8000626c:	44 89 c1             	mov    %r8d,%ecx
ffffffff8000626f:	41 d3 e2             	shl    %cl,%r10d
ffffffff80006272:	0f b6 4d c0          	movzbl -0x40(%rbp),%ecx
ffffffff80006276:	44 89 ca             	mov    %r9d,%edx
ffffffff80006279:	89 c7                	mov    %eax,%edi
ffffffff8000627b:	41 d3 e1             	shl    %cl,%r9d
ffffffff8000627e:	0f b6 4d b4          	movzbl -0x4c(%rbp),%ecx
ffffffff80006282:	45 09 d1             	or     %r10d,%r9d
ffffffff80006285:	d3 e0                	shl    %cl,%eax
ffffffff80006287:	89 c1                	mov    %eax,%ecx
ffffffff80006289:	44 89 c8             	mov    %r9d,%eax
ffffffff8000628c:	09 c8                	or     %ecx,%eax
ffffffff8000628e:	89 45 b0             	mov    %eax,-0x50(%rbp)
    if (ctx->red_mask_size > 8) {
ffffffff80006291:	41 80 fd 08          	cmp    $0x8,%r13b
ffffffff80006295:	74 50                	je     ffffffff800062e7 <flanterm_fb_init+0x427>
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006297:	41 ba 10 00 00 00    	mov    $0x10,%r10d
ffffffff8000629d:	41 89 f9             	mov    %edi,%r9d
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800062a0:	8b 7d 90             	mov    -0x70(%rbp),%edi
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff800062a3:	44 89 d1             	mov    %r10d,%ecx
ffffffff800062a6:	44 29 e9             	sub    %r13d,%ecx
ffffffff800062a9:	41 d3 e9             	shr    %cl,%r9d
ffffffff800062ac:	8d 4e 08             	lea    0x8(%rsi),%ecx
ffffffff800062af:	41 d3 e1             	shl    %cl,%r9d
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800062b2:	44 89 d1             	mov    %r10d,%ecx
ffffffff800062b5:	44 29 d9             	sub    %r11d,%ecx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff800062b8:	44 09 c8             	or     %r9d,%eax
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800062bb:	d3 ef                	shr    %cl,%edi
ffffffff800062bd:	41 89 f9             	mov    %edi,%r9d
ffffffff800062c0:	8b 7d b8             	mov    -0x48(%rbp),%edi
ffffffff800062c3:	8d 4f 08             	lea    0x8(%rdi),%ecx
ffffffff800062c6:	41 d3 e1             	shl    %cl,%r9d
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800062c9:	44 89 d1             	mov    %r10d,%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800062cc:	44 09 c8             	or     %r9d,%eax
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800062cf:	44 29 f1             	sub    %r14d,%ecx
ffffffff800062d2:	41 89 d1             	mov    %edx,%r9d
ffffffff800062d5:	41 d3 e9             	shr    %cl,%r9d
ffffffff800062d8:	8b 55 c8             	mov    -0x38(%rbp),%edx
ffffffff800062db:	8d 4a 08             	lea    0x8(%rdx),%ecx
ffffffff800062de:	41 d3 e1             	shl    %cl,%r9d
ffffffff800062e1:	44 09 c8             	or     %r9d,%eax
ffffffff800062e4:	89 45 b0             	mov    %eax,-0x50(%rbp)
        ctx->default_fg = convert_colour(_ctx, *default_fg);
ffffffff800062e7:	8b 45 b0             	mov    -0x50(%rbp),%eax
    } else {
        ctx->default_fg = convert_colour(_ctx, 0x00aaaaaa); // foreground (grey)
    }

    if (default_bg_bright != NULL) {
ffffffff800062ea:	48 83 7d 68 00       	cmpq   $0x0,0x68(%rbp)
        ctx->default_fg = convert_colour(_ctx, *default_fg);
ffffffff800062ef:	89 83 b0 03 00 00    	mov    %eax,0x3b0(%rbx)
    if (default_bg_bright != NULL) {
ffffffff800062f5:	0f 84 bd 0c 00 00    	je     ffffffff80006fb8 <flanterm_fb_init+0x10f8>
        ctx->default_bg_bright = convert_colour(_ctx, *default_bg_bright);
ffffffff800062fb:	48 8b 45 68          	mov    0x68(%rbp),%rax
ffffffff800062ff:	8b 08                	mov    (%rax),%ecx
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80006301:	41 89 c9             	mov    %ecx,%r9d
    uint32_t g = (colour >> 8) & 0xff;
ffffffff80006304:	0f b6 fd             	movzbl %ch,%edi
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80006307:	41 c1 e9 10          	shr    $0x10,%r9d
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff8000630b:	41 89 fa             	mov    %edi,%r10d
ffffffff8000630e:	89 fa                	mov    %edi,%edx
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80006310:	41 0f b6 c1          	movzbl %r9b,%eax
    uint32_t b =  colour & 0xff;
ffffffff80006314:	44 0f b6 c9          	movzbl %cl,%r9d
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006318:	44 89 c1             	mov    %r8d,%ecx
ffffffff8000631b:	41 d3 e2             	shl    %cl,%r10d
ffffffff8000631e:	0f b6 4d c0          	movzbl -0x40(%rbp),%ecx
ffffffff80006322:	44 89 cf             	mov    %r9d,%edi
ffffffff80006325:	41 d3 e1             	shl    %cl,%r9d
ffffffff80006328:	0f b6 4d b4          	movzbl -0x4c(%rbp),%ecx
ffffffff8000632c:	45 09 d1             	or     %r10d,%r9d
ffffffff8000632f:	41 89 c2             	mov    %eax,%r10d
ffffffff80006332:	41 d3 e2             	shl    %cl,%r10d
ffffffff80006335:	45 09 d1             	or     %r10d,%r9d
ffffffff80006338:	45 89 ca             	mov    %r9d,%r10d
    if (ctx->red_mask_size > 8) {
ffffffff8000633b:	41 80 fd 08          	cmp    $0x8,%r13b
ffffffff8000633f:	0f 85 a4 08 00 00    	jne    ffffffff80006be9 <flanterm_fb_init+0xd29>
    } else {
        ctx->default_bg_bright = convert_colour(_ctx, 0x00555555); // background (black)
    }

    if (default_fg_bright != NULL) {
ffffffff80006345:	48 83 7d 70 00       	cmpq   $0x0,0x70(%rbp)
        ctx->default_bg_bright = convert_colour(_ctx, *default_bg_bright);
ffffffff8000634a:	44 89 93 bc 03 00 00 	mov    %r10d,0x3bc(%rbx)
    if (default_fg_bright != NULL) {
ffffffff80006351:	0f 84 ed 08 00 00    	je     ffffffff80006c44 <flanterm_fb_init+0xd84>
        ctx->default_fg_bright = convert_colour(_ctx, *default_fg_bright);
ffffffff80006357:	48 8b 45 70          	mov    0x70(%rbp),%rax
ffffffff8000635b:	8b 08                	mov    (%rax),%ecx
    uint32_t g = (colour >> 8) & 0xff;
ffffffff8000635d:	0f b6 fd             	movzbl %ch,%edi
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80006360:	41 89 c9             	mov    %ecx,%r9d
    uint32_t b =  colour & 0xff;
ffffffff80006363:	0f b6 c1             	movzbl %cl,%eax
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006366:	44 89 c1             	mov    %r8d,%ecx
ffffffff80006369:	89 fa                	mov    %edi,%edx
ffffffff8000636b:	d3 e7                	shl    %cl,%edi
ffffffff8000636d:	0f b6 4d c0          	movzbl -0x40(%rbp),%ecx
ffffffff80006371:	41 89 f8             	mov    %edi,%r8d
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80006374:	41 c1 e9 10          	shr    $0x10,%r9d
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006378:	89 c7                	mov    %eax,%edi
ffffffff8000637a:	d3 e7                	shl    %cl,%edi
    uint32_t r = (colour >> 16) & 0xff;
ffffffff8000637c:	45 0f b6 d1          	movzbl %r9b,%r10d
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006380:	0f b6 4d b4          	movzbl -0x4c(%rbp),%ecx
ffffffff80006384:	44 09 c7             	or     %r8d,%edi
ffffffff80006387:	45 89 d0             	mov    %r10d,%r8d
ffffffff8000638a:	41 d3 e0             	shl    %cl,%r8d
ffffffff8000638d:	44 89 c1             	mov    %r8d,%ecx
ffffffff80006390:	41 89 f8             	mov    %edi,%r8d
ffffffff80006393:	41 09 c8             	or     %ecx,%r8d
    if (ctx->red_mask_size > 8) {
ffffffff80006396:	41 80 fd 08          	cmp    $0x8,%r13b
ffffffff8000639a:	0f 85 f9 07 00 00    	jne    ffffffff80006b99 <flanterm_fb_init+0xcd9>
    } else {
        ctx->default_fg_bright = convert_colour(_ctx, 0x00ffffff); // foreground (grey)
    }

    ctx->text_fg = ctx->default_fg;
ffffffff800063a0:	8b 45 b0             	mov    -0x50(%rbp),%eax
    ctx->pitch = pitch;

    // VGA fonts are always one byte per scanline regardless of font_width
#define FONT_BYTES (font_height * FLANTERM_FB_FONT_GLYPHS)

    if (font != NULL) {
ffffffff800063a3:	48 83 7d 78 00       	cmpq   $0x0,0x78(%rbp)
        ctx->default_fg_bright = convert_colour(_ctx, *default_fg_bright);
ffffffff800063a8:	44 89 83 b8 03 00 00 	mov    %r8d,0x3b8(%rbx)
    ctx->text_bg = 0xffffffff;
ffffffff800063af:	c7 83 0c 04 00 00 ff 	movl   $0xffffffff,0x40c(%rbx)
ffffffff800063b6:	ff ff ff 
    ctx->text_fg = ctx->default_fg;
ffffffff800063b9:	89 83 08 04 00 00    	mov    %eax,0x408(%rbx)
    ctx->rotation = rotation;
ffffffff800063bf:	8b 85 b0 00 00 00    	mov    0xb0(%rbp),%eax
ffffffff800063c5:	89 83 48 03 00 00    	mov    %eax,0x348(%rbx)
    ctx->framebuffer = (void *)framebuffer;
ffffffff800063cb:	48 8b 85 50 ff ff ff 	mov    -0xb0(%rbp),%rax
ffffffff800063d2:	48 89 83 10 03 00 00 	mov    %rax,0x310(%rbx)
    ctx->width = width;
ffffffff800063d9:	48 8b 45 a8          	mov    -0x58(%rbp),%rax
ffffffff800063dd:	48 89 83 20 03 00 00 	mov    %rax,0x320(%rbx)
    ctx->height = height;
ffffffff800063e4:	48 8b 45 98          	mov    -0x68(%rbp),%rax
ffffffff800063e8:	48 89 83 28 03 00 00 	mov    %rax,0x328(%rbx)
    ctx->phys_height = phys_height;
ffffffff800063ef:	48 8b 85 40 ff ff ff 	mov    -0xc0(%rbp),%rax
ffffffff800063f6:	48 89 83 30 03 00 00 	mov    %rax,0x330(%rbx)
    ctx->pitch = pitch;
ffffffff800063fd:	48 8b 85 48 ff ff ff 	mov    -0xb8(%rbp),%rax
ffffffff80006404:	48 89 83 18 03 00 00 	mov    %rax,0x318(%rbx)
    if (font != NULL) {
ffffffff8000640b:	0f 84 42 0b 00 00    	je     ffffffff80006f53 <flanterm_fb_init+0x1093>
        ctx->font_width = font_width;
ffffffff80006411:	48 8b 85 80 00 00 00 	mov    0x80(%rbp),%rax
        ctx->font_height = font_height;
        ctx->font_bits_size = FONT_BYTES;
ffffffff80006418:	4c 89 e7             	mov    %r12,%rdi
        ctx->font_height = font_height;
ffffffff8000641b:	4c 89 a3 d8 02 00 00 	mov    %r12,0x2d8(%rbx)
        ctx->font_bits_size = FONT_BYTES;
ffffffff80006422:	48 c1 e7 08          	shl    $0x8,%rdi
ffffffff80006426:	48 89 bb 50 03 00 00 	mov    %rdi,0x350(%rbx)
        ctx->font_width = font_width;
ffffffff8000642d:	48 89 83 d0 02 00 00 	mov    %rax,0x2d0(%rbx)
        ctx->font_bits = _malloc(ctx->font_bits_size);
ffffffff80006434:	41 ff d7             	call   *%r15
ffffffff80006437:	48 89 83 58 03 00 00 	mov    %rax,0x358(%rbx)
ffffffff8000643e:	48 89 c7             	mov    %rax,%rdi
        if (ctx->font_bits == NULL) {
ffffffff80006441:	48 85 c0             	test   %rax,%rax
ffffffff80006444:	0f 84 8c 04 00 00    	je     ffffffff800068d6 <flanterm_fb_init+0xa16>
            goto fail;
        }
        memcpy(ctx->font_bits, font, ctx->font_bits_size);
ffffffff8000644a:	48 8b 93 50 03 00 00 	mov    0x350(%rbx),%rdx
ffffffff80006451:	48 8b 75 78          	mov    0x78(%rbp),%rsi
ffffffff80006455:	e8 86 3d 01 00       	call   ffffffff8001a1e0 <memcpy>
        memcpy(ctx->font_bits, builtin_font, ctx->font_bits_size);
    }

#undef FONT_BYTES

    ctx->font_width += font_spacing;
ffffffff8000645a:	48 8b 85 90 00 00 00 	mov    0x90(%rbp),%rax
ffffffff80006461:	48 03 83 d0 02 00 00 	add    0x2d0(%rbx),%rax
ffffffff80006468:	48 89 83 d0 02 00 00 	mov    %rax,0x2d0(%rbx)

    ctx->font_bool_size = FLANTERM_FB_FONT_GLYPHS * font_height * ctx->font_width * sizeof(bool);
ffffffff8000646f:	49 0f af c4          	imul   %r12,%rax
ffffffff80006473:	48 c1 e0 08          	shl    $0x8,%rax
ffffffff80006477:	48 89 83 60 03 00 00 	mov    %rax,0x360(%rbx)
ffffffff8000647e:	48 89 c7             	mov    %rax,%rdi
    ctx->font_bool = _malloc(ctx->font_bool_size);
ffffffff80006481:	41 ff d7             	call   *%r15
ffffffff80006484:	48 89 83 68 03 00 00 	mov    %rax,0x368(%rbx)
ffffffff8000648b:	48 89 c2             	mov    %rax,%rdx
    if (ctx->font_bool == NULL) {
ffffffff8000648e:	48 85 c0             	test   %rax,%rax
ffffffff80006491:	0f 84 3f 04 00 00    	je     ffffffff800068d6 <flanterm_fb_init+0xa16>
    }

    ctx->font_scale_x = font_scale_x;
    ctx->font_scale_y = font_scale_y;

    ctx->glyph_width = ctx->font_width * font_scale_x;
ffffffff80006497:	4c 8b 93 d0 02 00 00 	mov    0x2d0(%rbx),%r10
ffffffff8000649e:	4c 8b b3 58 03 00 00 	mov    0x358(%rbx),%r14
ffffffff800064a5:	4c 89 e0             	mov    %r12,%rax
ffffffff800064a8:	49 c7 c1 40 ff ff ff 	mov    $0xffffffffffffff40,%r9
        for (size_t y = 0; y < font_height; y++) {
ffffffff800064af:	49 0f af c2          	imul   %r10,%rax
ffffffff800064b3:	4f 8d 1c 34          	lea    (%r12,%r14,1),%r11
ffffffff800064b7:	4d 85 e4             	test   %r12,%r12
ffffffff800064ba:	0f 85 47 05 00 00    	jne    ffffffff80006a07 <flanterm_fb_init+0xb47>
    for (size_t i = 0; i < FLANTERM_FB_FONT_GLYPHS; i++) {
ffffffff800064c0:	49 83 c1 01          	add    $0x1,%r9
ffffffff800064c4:	49 83 f9 40          	cmp    $0x40,%r9
ffffffff800064c8:	75 f6                	jne    ffffffff800064c0 <flanterm_fb_init+0x600>
    ctx->font_scale_x = font_scale_x;
ffffffff800064ca:	48 8b 85 98 00 00 00 	mov    0x98(%rbp),%rax
    ctx->glyph_width = ctx->font_width * font_scale_x;
ffffffff800064d1:	4c 0f af 95 98 00 00 	imul   0x98(%rbp),%r10
ffffffff800064d8:	00 
ffffffff800064d9:	31 d2                	xor    %edx,%edx
    ctx->font_scale_x = font_scale_x;
ffffffff800064db:	48 89 83 f0 02 00 00 	mov    %rax,0x2f0(%rbx)
    ctx->font_scale_y = font_scale_y;
ffffffff800064e2:	48 8b 85 a0 00 00 00 	mov    0xa0(%rbp),%rax
    ctx->glyph_width = ctx->font_width * font_scale_x;
ffffffff800064e9:	4c 89 93 e0 02 00 00 	mov    %r10,0x2e0(%rbx)
    ctx->glyph_height = font_height * font_scale_y;
ffffffff800064f0:	4c 0f af e0          	imul   %rax,%r12
    ctx->font_scale_y = font_scale_y;
ffffffff800064f4:	48 89 83 f8 02 00 00 	mov    %rax,0x2f8(%rbx)

    _ctx->cols = (ctx->width - margin * 2) / ctx->glyph_width;
ffffffff800064fb:	48 8b 85 a8 00 00 00 	mov    0xa8(%rbp),%rax
ffffffff80006502:	48 8d 3c 00          	lea    (%rax,%rax,1),%rdi
ffffffff80006506:	48 8b 83 20 03 00 00 	mov    0x320(%rbx),%rax
    ctx->glyph_height = font_height * font_scale_y;
ffffffff8000650d:	4c 89 a3 e8 02 00 00 	mov    %r12,0x2e8(%rbx)
    _ctx->cols = (ctx->width - margin * 2) / ctx->glyph_width;
ffffffff80006514:	48 29 f8             	sub    %rdi,%rax
ffffffff80006517:	49 f7 f2             	div    %r10
ffffffff8000651a:	48 89 83 f8 01 00 00 	mov    %rax,0x1f8(%rbx)
    _ctx->rows = (ctx->height - margin * 2) / ctx->glyph_height;
ffffffff80006521:	48 89 c1             	mov    %rax,%rcx
ffffffff80006524:	48 89 d6             	mov    %rdx,%rsi
ffffffff80006527:	31 d2                	xor    %edx,%edx
ffffffff80006529:	48 8b 83 28 03 00 00 	mov    0x328(%rbx),%rax

    ctx->offset_x = margin + ((ctx->width - margin * 2) % ctx->glyph_width) / 2;
ffffffff80006530:	48 d1 ee             	shr    $1,%rsi
ffffffff80006533:	48 03 b5 a8 00 00 00 	add    0xa8(%rbp),%rsi
ffffffff8000653a:	48 89 b3 00 03 00 00 	mov    %rsi,0x300(%rbx)
    _ctx->rows = (ctx->height - margin * 2) / ctx->glyph_height;
ffffffff80006541:	48 29 f8             	sub    %rdi,%rax
ffffffff80006544:	49 f7 f4             	div    %r12
    ctx->offset_y = margin + ((ctx->height - margin * 2) % ctx->glyph_height) / 2;

    ctx->grid_size = _ctx->rows * _ctx->cols * sizeof(struct flanterm_fb_char);
ffffffff80006547:	48 0f af c8          	imul   %rax,%rcx
    ctx->offset_y = margin + ((ctx->height - margin * 2) % ctx->glyph_height) / 2;
ffffffff8000654b:	48 d1 ea             	shr    $1,%rdx
ffffffff8000654e:	48 03 95 a8 00 00 00 	add    0xa8(%rbp),%rdx
    _ctx->rows = (ctx->height - margin * 2) / ctx->glyph_height;
ffffffff80006555:	48 89 83 f0 01 00 00 	mov    %rax,0x1f0(%rbx)
    ctx->offset_y = margin + ((ctx->height - margin * 2) % ctx->glyph_height) / 2;
ffffffff8000655c:	48 89 93 08 03 00 00 	mov    %rdx,0x308(%rbx)
    ctx->grid_size = _ctx->rows * _ctx->cols * sizeof(struct flanterm_fb_char);
ffffffff80006563:	48 8d 3c 49          	lea    (%rcx,%rcx,2),%rdi
ffffffff80006567:	48 c1 e7 02          	shl    $0x2,%rdi
ffffffff8000656b:	48 89 bb d0 03 00 00 	mov    %rdi,0x3d0(%rbx)
    ctx->grid = _malloc(ctx->grid_size);
ffffffff80006572:	41 ff d7             	call   *%r15
ffffffff80006575:	48 89 83 e8 03 00 00 	mov    %rax,0x3e8(%rbx)
    if (ctx->grid == NULL) {
ffffffff8000657c:	48 85 c0             	test   %rax,%rax
ffffffff8000657f:	0f 84 51 03 00 00    	je     ffffffff800068d6 <flanterm_fb_init+0xa16>
        goto fail;
    }
    for (size_t i = 0; i < _ctx->rows * _ctx->cols; i++) {
ffffffff80006585:	48 8b bb f8 01 00 00 	mov    0x1f8(%rbx),%rdi
ffffffff8000658c:	48 0f af bb f0 01 00 	imul   0x1f0(%rbx),%rdi
ffffffff80006593:	00 
ffffffff80006594:	48 85 ff             	test   %rdi,%rdi
ffffffff80006597:	74 2d                	je     ffffffff800065c6 <flanterm_fb_init+0x706>
ffffffff80006599:	48 8d 14 7f          	lea    (%rdi,%rdi,2),%rdx
        ctx->grid[i].c = ' ';
        ctx->grid[i].fg = ctx->text_fg;
ffffffff8000659d:	8b b3 08 04 00 00    	mov    0x408(%rbx),%esi
        ctx->grid[i].bg = ctx->text_bg;
ffffffff800065a3:	8b 8b 0c 04 00 00    	mov    0x40c(%rbx),%ecx
ffffffff800065a9:	48 8d 14 90          	lea    (%rax,%rdx,4),%rdx
        ctx->grid[i].c = ' ';
ffffffff800065ad:	c7 00 20 00 00 00    	movl   $0x20,(%rax)
    for (size_t i = 0; i < _ctx->rows * _ctx->cols; i++) {
ffffffff800065b3:	48 83 c0 0c          	add    $0xc,%rax
        ctx->grid[i].fg = ctx->text_fg;
ffffffff800065b7:	89 70 f8             	mov    %esi,-0x8(%rax)
        ctx->grid[i].bg = ctx->text_bg;
ffffffff800065ba:	89 48 fc             	mov    %ecx,-0x4(%rax)
    for (size_t i = 0; i < _ctx->rows * _ctx->cols; i++) {
ffffffff800065bd:	48 39 c2             	cmp    %rax,%rdx
ffffffff800065c0:	75 eb                	jne    ffffffff800065ad <flanterm_fb_init+0x6ed>
    }

    ctx->queue_size = _ctx->rows * _ctx->cols * sizeof(struct flanterm_fb_queue_item);
ffffffff800065c2:	48 c1 e7 05          	shl    $0x5,%rdi
ffffffff800065c6:	48 89 bb d8 03 00 00 	mov    %rdi,0x3d8(%rbx)
    ctx->queue = _malloc(ctx->queue_size);
ffffffff800065cd:	41 ff d7             	call   *%r15
ffffffff800065d0:	48 89 83 f0 03 00 00 	mov    %rax,0x3f0(%rbx)
ffffffff800065d7:	48 89 c7             	mov    %rax,%rdi
    if (ctx->queue == NULL) {
ffffffff800065da:	48 85 c0             	test   %rax,%rax
ffffffff800065dd:	0f 84 f3 02 00 00    	je     ffffffff800068d6 <flanterm_fb_init+0xa16>
        goto fail;
    }
    ctx->queue_i = 0;
ffffffff800065e3:	48 c7 83 f8 03 00 00 	movq   $0x0,0x3f8(%rbx)
ffffffff800065ea:	00 00 00 00 
    memset(ctx->queue, 0, ctx->queue_size);
ffffffff800065ee:	48 8b 93 d8 03 00 00 	mov    0x3d8(%rbx),%rdx
ffffffff800065f5:	31 f6                	xor    %esi,%esi
ffffffff800065f7:	e8 24 3c 01 00       	call   ffffffff8001a220 <memset>

    ctx->map_size = _ctx->rows * _ctx->cols * sizeof(struct flanterm_fb_queue_item *);
ffffffff800065fc:	48 8b bb f0 01 00 00 	mov    0x1f0(%rbx),%rdi
ffffffff80006603:	48 0f af bb f8 01 00 	imul   0x1f8(%rbx),%rdi
ffffffff8000660a:	00 
ffffffff8000660b:	48 c1 e7 03          	shl    $0x3,%rdi
ffffffff8000660f:	48 89 bb e0 03 00 00 	mov    %rdi,0x3e0(%rbx)
    ctx->map = _malloc(ctx->map_size);
ffffffff80006616:	41 ff d7             	call   *%r15
ffffffff80006619:	48 89 83 00 04 00 00 	mov    %rax,0x400(%rbx)
ffffffff80006620:	48 89 c7             	mov    %rax,%rdi
    if (ctx->map == NULL) {
ffffffff80006623:	48 85 c0             	test   %rax,%rax
ffffffff80006626:	0f 84 aa 02 00 00    	je     ffffffff800068d6 <flanterm_fb_init+0xa16>
        goto fail;
    }
    memset(ctx->map, 0, ctx->map_size);
ffffffff8000662c:	48 8b 93 e0 03 00 00 	mov    0x3e0(%rbx),%rdx
ffffffff80006633:	31 f6                	xor    %esi,%esi
ffffffff80006635:	e8 e6 3b 01 00       	call   ffffffff8001a220 <memset>

    if (canvas != NULL) {
ffffffff8000663a:	48 83 7d 40 00       	cmpq   $0x0,0x40(%rbp)
ffffffff8000663f:	0f 84 a9 0c 00 00    	je     ffffffff800072ee <flanterm_fb_init+0x142e>
        ctx->canvas_size = ctx->width * ctx->height * sizeof(uint32_t);
ffffffff80006645:	48 8b bb 20 03 00 00 	mov    0x320(%rbx),%rdi
ffffffff8000664c:	48 0f af bb 28 03 00 	imul   0x328(%rbx),%rdi
ffffffff80006653:	00 
ffffffff80006654:	48 c1 e7 02          	shl    $0x2,%rdi
ffffffff80006658:	48 89 bb c0 03 00 00 	mov    %rdi,0x3c0(%rbx)
        ctx->canvas = _malloc(ctx->canvas_size);
ffffffff8000665f:	41 ff d7             	call   *%r15
ffffffff80006662:	48 89 83 c8 03 00 00 	mov    %rax,0x3c8(%rbx)
ffffffff80006669:	48 89 c6             	mov    %rax,%rsi
        if (ctx->canvas == NULL) {
ffffffff8000666c:	48 85 c0             	test   %rax,%rax
ffffffff8000666f:	0f 84 61 02 00 00    	je     ffffffff800068d6 <flanterm_fb_init+0xa16>
            goto fail;
        }
        for (size_t i = 0; i < ctx->width * ctx->height; i++) {
ffffffff80006675:	48 8b 83 28 03 00 00 	mov    0x328(%rbx),%rax
ffffffff8000667c:	48 0f af 83 20 03 00 	imul   0x320(%rbx),%rax
ffffffff80006683:	00 
ffffffff80006684:	48 85 c0             	test   %rax,%rax
ffffffff80006687:	0f 84 f9 00 00 00    	je     ffffffff80006786 <flanterm_fb_init+0x8c6>
    if (ctx->red_mask_size > 8) {
ffffffff8000668d:	0f b6 8b 40 03 00 00 	movzbl 0x340(%rbx),%ecx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006694:	ba 10 00 00 00       	mov    $0x10,%edx
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006699:	44 0f b6 9b 41 03 00 	movzbl 0x341(%rbx),%r11d
ffffffff800066a0:	00 
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff800066a1:	89 d7                	mov    %edx,%edi
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff800066a3:	44 0f b6 93 43 03 00 	movzbl 0x343(%rbx),%r10d
ffffffff800066aa:	00 
ffffffff800066ab:	44 0f b6 8b 45 03 00 	movzbl 0x345(%rbx),%r9d
ffffffff800066b2:	00 
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff800066b3:	29 cf                	sub    %ecx,%edi
    if (ctx->red_mask_size > 8) {
ffffffff800066b5:	41 89 cd             	mov    %ecx,%r13d
    if (ctx->green_mask_size > 8) {
ffffffff800066b8:	0f b6 8b 42 03 00 00 	movzbl 0x342(%rbx),%ecx
ffffffff800066bf:	4c 8b 65 40          	mov    0x40(%rbp),%r12
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff800066c3:	89 7d c0             	mov    %edi,-0x40(%rbp)
ffffffff800066c6:	41 8d 7b 08          	lea    0x8(%r11),%edi
ffffffff800066ca:	89 7d b8             	mov    %edi,-0x48(%rbp)
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800066cd:	89 d7                	mov    %edx,%edi
    if (ctx->green_mask_size > 8) {
ffffffff800066cf:	41 89 ce             	mov    %ecx,%r14d
ffffffff800066d2:	49 8d 04 84          	lea    (%r12,%rax,4),%rax
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800066d6:	29 cf                	sub    %ecx,%edi
    if (ctx->blue_mask_size > 8) {
ffffffff800066d8:	0f b6 8b 44 03 00 00 	movzbl 0x344(%rbx),%ecx
ffffffff800066df:	48 89 45 90          	mov    %rax,-0x70(%rbp)
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800066e3:	89 7d b4             	mov    %edi,-0x4c(%rbp)
ffffffff800066e6:	41 8d 7a 08          	lea    0x8(%r10),%edi
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800066ea:	29 ca                	sub    %ecx,%edx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800066ec:	89 7d a8             	mov    %edi,-0x58(%rbp)
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800066ef:	89 55 98             	mov    %edx,-0x68(%rbp)
ffffffff800066f2:	41 8d 51 08          	lea    0x8(%r9),%edx
    if (ctx->blue_mask_size > 8) {
ffffffff800066f6:	88 4d a0             	mov    %cl,-0x60(%rbp)
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800066f9:	89 55 b0             	mov    %edx,-0x50(%rbp)
            ctx->canvas[i] = convert_colour(_ctx, canvas[i]);
ffffffff800066fc:	41 8b 14 24          	mov    (%r12),%edx
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006700:	44 89 d9             	mov    %r11d,%ecx
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80006703:	89 d7                	mov    %edx,%edi
    uint32_t g = (colour >> 8) & 0xff;
ffffffff80006705:	0f b6 c6             	movzbl %dh,%eax
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80006708:	c1 ef 10             	shr    $0x10,%edi
    uint32_t g = (colour >> 8) & 0xff;
ffffffff8000670b:	41 89 c0             	mov    %eax,%r8d
    uint32_t b =  colour & 0xff;
ffffffff8000670e:	0f b6 c2             	movzbl %dl,%eax
    uint32_t r = (colour >> 16) & 0xff;
ffffffff80006711:	40 0f b6 ff          	movzbl %dil,%edi
    uint32_t b =  colour & 0xff;
ffffffff80006715:	89 45 c8             	mov    %eax,-0x38(%rbp)
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006718:	44 89 c2             	mov    %r8d,%edx
ffffffff8000671b:	89 f8                	mov    %edi,%eax
ffffffff8000671d:	d3 e0                	shl    %cl,%eax
ffffffff8000671f:	44 89 d1             	mov    %r10d,%ecx
ffffffff80006722:	d3 e2                	shl    %cl,%edx
ffffffff80006724:	44 89 c9             	mov    %r9d,%ecx
ffffffff80006727:	09 d0                	or     %edx,%eax
ffffffff80006729:	8b 55 c8             	mov    -0x38(%rbp),%edx
ffffffff8000672c:	d3 e2                	shl    %cl,%edx
ffffffff8000672e:	09 d0                	or     %edx,%eax
    if (ctx->red_mask_size > 8) {
ffffffff80006730:	41 80 fd 08          	cmp    $0x8,%r13b
ffffffff80006734:	76 0e                	jbe    ffffffff80006744 <flanterm_fb_init+0x884>
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006736:	0f b6 4d c0          	movzbl -0x40(%rbp),%ecx
ffffffff8000673a:	d3 ef                	shr    %cl,%edi
ffffffff8000673c:	0f b6 4d b8          	movzbl -0x48(%rbp),%ecx
ffffffff80006740:	d3 e7                	shl    %cl,%edi
ffffffff80006742:	09 f8                	or     %edi,%eax
    if (ctx->green_mask_size > 8) {
ffffffff80006744:	41 80 fe 08          	cmp    $0x8,%r14b
ffffffff80006748:	76 11                	jbe    ffffffff8000675b <flanterm_fb_init+0x89b>
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff8000674a:	0f b6 4d b4          	movzbl -0x4c(%rbp),%ecx
ffffffff8000674e:	41 d3 e8             	shr    %cl,%r8d
ffffffff80006751:	0f b6 4d a8          	movzbl -0x58(%rbp),%ecx
ffffffff80006755:	41 d3 e0             	shl    %cl,%r8d
ffffffff80006758:	44 09 c0             	or     %r8d,%eax
    if (ctx->blue_mask_size > 8) {
ffffffff8000675b:	80 7d a0 08          	cmpb   $0x8,-0x60(%rbp)
ffffffff8000675f:	76 11                	jbe    ffffffff80006772 <flanterm_fb_init+0x8b2>
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80006761:	0f b6 4d 98          	movzbl -0x68(%rbp),%ecx
ffffffff80006765:	8b 55 c8             	mov    -0x38(%rbp),%edx
ffffffff80006768:	d3 ea                	shr    %cl,%edx
ffffffff8000676a:	0f b6 4d b0          	movzbl -0x50(%rbp),%ecx
ffffffff8000676e:	d3 e2                	shl    %cl,%edx
ffffffff80006770:	09 d0                	or     %edx,%eax
            ctx->canvas[i] = convert_colour(_ctx, canvas[i]);
ffffffff80006772:	89 06                	mov    %eax,(%rsi)
        for (size_t i = 0; i < ctx->width * ctx->height; i++) {
ffffffff80006774:	49 83 c4 04          	add    $0x4,%r12
ffffffff80006778:	48 83 c6 04          	add    $0x4,%rsi
ffffffff8000677c:	4c 39 65 90          	cmp    %r12,-0x70(%rbp)
ffffffff80006780:	0f 85 76 ff ff ff    	jne    ffffffff800066fc <flanterm_fb_init+0x83c>
        }
    }

    if (font_scale_x == 1 && font_scale_y == 1) {
ffffffff80006786:	48 83 bd 98 00 00 00 	cmpq   $0x1,0x98(%rbp)
ffffffff8000678d:	01 
ffffffff8000678e:	0f 85 b4 08 00 00    	jne    ffffffff80007048 <flanterm_fb_init+0x1188>
ffffffff80006794:	48 83 bd a0 00 00 00 	cmpq   $0x1,0xa0(%rbp)
ffffffff8000679b:	01 
ffffffff8000679c:	48 c7 c0 b0 58 00 80 	mov    $0xffffffff800058b0,%rax
ffffffff800067a3:	0f 85 9f 08 00 00    	jne    ffffffff80007048 <flanterm_fb_init+0x1188>
        if (canvas == NULL) {
            ctx->plot_char = plot_char_unscaled_uncanvas;
        } else {
            ctx->plot_char = plot_char_unscaled_canvas;
ffffffff800067a9:	48 89 83 c0 02 00 00 	mov    %rax,0x2c0(%rbx)
    _ctx->restore_state = flanterm_fb_restore_state;
    _ctx->double_buffer_flush = flanterm_fb_double_buffer_flush;
    _ctx->full_refresh = flanterm_fb_full_refresh;
    _ctx->deinit = flanterm_fb_deinit;

    flanterm_context_reinit(_ctx);
ffffffff800067b0:	48 89 df             	mov    %rbx,%rdi
    _ctx->raw_putchar = flanterm_fb_raw_putchar;
ffffffff800067b3:	48 c7 83 00 02 00 00 	movq   $0xffffffff80005250,0x200(%rbx)
ffffffff800067ba:	50 52 00 80 
    _ctx->clear = flanterm_fb_clear;
ffffffff800067be:	48 c7 83 08 02 00 00 	movq   $0xffffffff80004bf0,0x208(%rbx)
ffffffff800067c5:	f0 4b 00 80 
    _ctx->set_cursor_pos = flanterm_fb_set_cursor_pos;
ffffffff800067c9:	48 c7 83 10 02 00 00 	movq   $0xffffffff80004c90,0x210(%rbx)
ffffffff800067d0:	90 4c 00 80 
    _ctx->get_cursor_pos = flanterm_fb_get_cursor_pos;
ffffffff800067d4:	48 c7 83 18 02 00 00 	movq   $0xffffffff80004ce0,0x218(%rbx)
ffffffff800067db:	e0 4c 00 80 
    _ctx->set_text_fg = flanterm_fb_set_text_fg;
ffffffff800067df:	48 c7 83 20 02 00 00 	movq   $0xffffffff80004da0,0x220(%rbx)
ffffffff800067e6:	a0 4d 00 80 
    _ctx->set_text_bg = flanterm_fb_set_text_bg;
ffffffff800067ea:	48 c7 83 28 02 00 00 	movq   $0xffffffff80004db0,0x228(%rbx)
ffffffff800067f1:	b0 4d 00 80 
    _ctx->set_text_fg_bright = flanterm_fb_set_text_fg_bright;
ffffffff800067f5:	48 c7 83 30 02 00 00 	movq   $0xffffffff80004dc0,0x230(%rbx)
ffffffff800067fc:	c0 4d 00 80 
    _ctx->set_text_bg_bright = flanterm_fb_set_text_bg_bright;
ffffffff80006800:	48 c7 83 38 02 00 00 	movq   $0xffffffff80004dd0,0x238(%rbx)
ffffffff80006807:	d0 4d 00 80 
    _ctx->set_text_fg_rgb = flanterm_fb_set_text_fg_rgb;
ffffffff8000680b:	48 c7 83 40 02 00 00 	movq   $0xffffffff80004de0,0x240(%rbx)
ffffffff80006812:	e0 4d 00 80 
    _ctx->set_text_bg_rgb = flanterm_fb_set_text_bg_rgb;
ffffffff80006816:	48 c7 83 48 02 00 00 	movq   $0xffffffff80004ea0,0x248(%rbx)
ffffffff8000681d:	a0 4e 00 80 
    _ctx->set_text_fg_default = flanterm_fb_set_text_fg_default;
ffffffff80006821:	48 c7 83 50 02 00 00 	movq   $0xffffffff80004f60,0x250(%rbx)
ffffffff80006828:	60 4f 00 80 
    _ctx->set_text_bg_default = flanterm_fb_set_text_bg_default;
ffffffff8000682c:	48 c7 83 58 02 00 00 	movq   $0xffffffff80004f70,0x258(%rbx)
ffffffff80006833:	70 4f 00 80 
    _ctx->set_text_fg_default_bright = flanterm_fb_set_text_fg_default_bright;
ffffffff80006837:	48 c7 83 60 02 00 00 	movq   $0xffffffff80004f80,0x260(%rbx)
ffffffff8000683e:	80 4f 00 80 
    _ctx->set_text_bg_default_bright = flanterm_fb_set_text_bg_default_bright;
ffffffff80006842:	48 c7 83 68 02 00 00 	movq   $0xffffffff80004f90,0x268(%rbx)
ffffffff80006849:	90 4f 00 80 
    _ctx->move_character = flanterm_fb_move_character;
ffffffff8000684d:	48 c7 83 70 02 00 00 	movq   $0xffffffff80004d20,0x270(%rbx)
ffffffff80006854:	20 4d 00 80 
    _ctx->scroll = flanterm_fb_scroll;
ffffffff80006858:	48 c7 83 78 02 00 00 	movq   $0xffffffff80004ae0,0x278(%rbx)
ffffffff8000685f:	e0 4a 00 80 
    _ctx->revscroll = flanterm_fb_revscroll;
ffffffff80006863:	48 c7 83 80 02 00 00 	movq   $0xffffffff80004a00,0x280(%rbx)
ffffffff8000686a:	00 4a 00 80 
    _ctx->swap_palette = flanterm_fb_swap_palette;
ffffffff8000686e:	48 c7 83 88 02 00 00 	movq   $0xffffffff80004910,0x288(%rbx)
ffffffff80006875:	10 49 00 80 
    _ctx->save_state = flanterm_fb_save_state;
ffffffff80006879:	48 c7 83 90 02 00 00 	movq   $0xffffffff800048b0,0x290(%rbx)
ffffffff80006880:	b0 48 00 80 
    _ctx->restore_state = flanterm_fb_restore_state;
ffffffff80006884:	48 c7 83 98 02 00 00 	movq   $0xffffffff800048e0,0x298(%rbx)
ffffffff8000688b:	e0 48 00 80 
    _ctx->double_buffer_flush = flanterm_fb_double_buffer_flush;
ffffffff8000688f:	48 c7 83 a0 02 00 00 	movq   $0xffffffff800050a0,0x2a0(%rbx)
ffffffff80006896:	a0 50 00 80 
    _ctx->full_refresh = flanterm_fb_full_refresh;
ffffffff8000689a:	48 c7 83 a8 02 00 00 	movq   $0xffffffff80005350,0x2a8(%rbx)
ffffffff800068a1:	50 53 00 80 
    _ctx->deinit = flanterm_fb_deinit;
ffffffff800068a5:	48 c7 83 b0 02 00 00 	movq   $0xffffffff80005540,0x2b0(%rbx)
ffffffff800068ac:	40 55 00 80 
    flanterm_context_reinit(_ctx);
ffffffff800068b0:	e8 bb ad ff ff       	call   ffffffff80001670 <flanterm_context_reinit>
    flanterm_fb_full_refresh(_ctx);
ffffffff800068b5:	48 89 df             	mov    %rbx,%rdi
ffffffff800068b8:	e8 93 ea ff ff       	call   ffffffff80005350 <flanterm_fb_full_refresh>

#ifndef FLANTERM_FB_DISABLE_BUMP_ALLOC
    if (_malloc == bump_alloc) {
ffffffff800068bd:	49 81 ff 60 48 00 80 	cmp    $0xffffffff80004860,%r15
ffffffff800068c4:	0f 85 c8 00 00 00    	jne    ffffffff80006992 <flanterm_fb_init+0xad2>
        bump_allocated_instance = true;
ffffffff800068ca:	c6 05 2f 7a 02 00 01 	movb   $0x1,0x27a2f(%rip)        # ffffffff8002e300 <bump_allocated_instance>
ffffffff800068d1:	e9 bc 00 00 00       	jmp    ffffffff80006992 <flanterm_fb_init+0xad2>
    if (ctx == NULL) {
        return NULL;
    }

#ifndef FLANTERM_FB_DISABLE_BUMP_ALLOC
    if (_malloc == bump_alloc) {
ffffffff800068d6:	49 81 ff 60 48 00 80 	cmp    $0xffffffff80004860,%r15
ffffffff800068dd:	0f 84 36 0a 00 00    	je     ffffffff80007319 <flanterm_fb_init+0x1459>
        bump_alloc_ptr = 0;
        return NULL;
    }
#endif

    if (_free == NULL) {
ffffffff800068e3:	48 8b 45 a0          	mov    -0x60(%rbp),%rax
ffffffff800068e7:	48 85 c0             	test   %rax,%rax
ffffffff800068ea:	0f 84 a0 00 00 00    	je     ffffffff80006990 <flanterm_fb_init+0xad0>
        return NULL;
    }

    if (ctx->canvas != NULL) {
ffffffff800068f0:	48 8b bb c8 03 00 00 	mov    0x3c8(%rbx),%rdi
ffffffff800068f7:	48 85 ff             	test   %rdi,%rdi
ffffffff800068fa:	74 09                	je     ffffffff80006905 <flanterm_fb_init+0xa45>
        _free(ctx->canvas, ctx->canvas_size);
ffffffff800068fc:	48 8b b3 c0 03 00 00 	mov    0x3c0(%rbx),%rsi
ffffffff80006903:	ff d0                	call   *%rax
    }
    if (ctx->map != NULL) {
ffffffff80006905:	48 8b bb 00 04 00 00 	mov    0x400(%rbx),%rdi
ffffffff8000690c:	48 85 ff             	test   %rdi,%rdi
ffffffff8000690f:	74 0d                	je     ffffffff8000691e <flanterm_fb_init+0xa5e>
        _free(ctx->map, ctx->map_size);
ffffffff80006911:	48 8b b3 e0 03 00 00 	mov    0x3e0(%rbx),%rsi
ffffffff80006918:	48 8b 45 a0          	mov    -0x60(%rbp),%rax
ffffffff8000691c:	ff d0                	call   *%rax
    }
    if (ctx->queue != NULL) {
ffffffff8000691e:	48 8b bb f0 03 00 00 	mov    0x3f0(%rbx),%rdi
ffffffff80006925:	48 85 ff             	test   %rdi,%rdi
ffffffff80006928:	74 0d                	je     ffffffff80006937 <flanterm_fb_init+0xa77>
        _free(ctx->queue, ctx->queue_size);
ffffffff8000692a:	48 8b b3 d8 03 00 00 	mov    0x3d8(%rbx),%rsi
ffffffff80006931:	48 8b 45 a0          	mov    -0x60(%rbp),%rax
ffffffff80006935:	ff d0                	call   *%rax
    }
    if (ctx->grid != NULL) {
ffffffff80006937:	48 8b bb e8 03 00 00 	mov    0x3e8(%rbx),%rdi
ffffffff8000693e:	48 85 ff             	test   %rdi,%rdi
ffffffff80006941:	74 0d                	je     ffffffff80006950 <flanterm_fb_init+0xa90>
        _free(ctx->grid, ctx->grid_size);
ffffffff80006943:	48 8b b3 d0 03 00 00 	mov    0x3d0(%rbx),%rsi
ffffffff8000694a:	48 8b 45 a0          	mov    -0x60(%rbp),%rax
ffffffff8000694e:	ff d0                	call   *%rax
    }
    if (ctx->font_bool != NULL) {
ffffffff80006950:	48 8b bb 68 03 00 00 	mov    0x368(%rbx),%rdi
ffffffff80006957:	48 85 ff             	test   %rdi,%rdi
ffffffff8000695a:	74 0d                	je     ffffffff80006969 <flanterm_fb_init+0xaa9>
        _free(ctx->font_bool, ctx->font_bool_size);
ffffffff8000695c:	48 8b b3 60 03 00 00 	mov    0x360(%rbx),%rsi
ffffffff80006963:	48 8b 45 a0          	mov    -0x60(%rbp),%rax
ffffffff80006967:	ff d0                	call   *%rax
    }
    if (ctx->font_bits != NULL) {
ffffffff80006969:	48 8b bb 58 03 00 00 	mov    0x358(%rbx),%rdi
ffffffff80006970:	48 85 ff             	test   %rdi,%rdi
ffffffff80006973:	74 0d                	je     ffffffff80006982 <flanterm_fb_init+0xac2>
        _free(ctx->font_bits, ctx->font_bits_size);
ffffffff80006975:	48 8b b3 50 03 00 00 	mov    0x350(%rbx),%rsi
ffffffff8000697c:	48 8b 45 a0          	mov    -0x60(%rbp),%rax
ffffffff80006980:	ff d0                	call   *%rax
    }
    if (ctx != NULL) {
        _free(ctx, sizeof(struct flanterm_fb_context));
ffffffff80006982:	48 8b 45 a0          	mov    -0x60(%rbp),%rax
ffffffff80006986:	be 48 04 00 00       	mov    $0x448,%esi
ffffffff8000698b:	48 89 df             	mov    %rbx,%rdi
ffffffff8000698e:	ff d0                	call   *%rax
        return NULL;
ffffffff80006990:	31 db                	xor    %ebx,%ebx
    }

    return NULL;
}
ffffffff80006992:	48 81 c4 98 00 00 00 	add    $0x98,%rsp
ffffffff80006999:	48 89 d8             	mov    %rbx,%rax
ffffffff8000699c:	5b                   	pop    %rbx
ffffffff8000699d:	41 5c                	pop    %r12
ffffffff8000699f:	41 5d                	pop    %r13
ffffffff800069a1:	41 5e                	pop    %r14
ffffffff800069a3:	41 5f                	pop    %r15
ffffffff800069a5:	5d                   	pop    %rbp
ffffffff800069a6:	c3                   	ret
        if (width >= (3840 + 3840 / 3) && height >= (2160 + 2160 / 3)) {
ffffffff800069a7:	48 81 7d a8 ff 13 00 	cmpq   $0x13ff,-0x58(%rbp)
ffffffff800069ae:	00 
ffffffff800069af:	76 24                	jbe    ffffffff800069d5 <flanterm_fb_init+0xb15>
ffffffff800069b1:	48 81 7d 98 3f 0b 00 	cmpq   $0xb3f,-0x68(%rbp)
ffffffff800069b8:	00 
            font_scale_y = 4;
ffffffff800069b9:	48 c7 85 a0 00 00 00 	movq   $0x4,0xa0(%rbp)
ffffffff800069c0:	04 00 00 00 
            font_scale_x = 4;
ffffffff800069c4:	48 c7 85 98 00 00 00 	movq   $0x4,0x98(%rbp)
ffffffff800069cb:	04 00 00 00 
        if (width >= (3840 + 3840 / 3) && height >= (2160 + 2160 / 3)) {
ffffffff800069cf:	0f 87 8c f5 ff ff    	ja     ffffffff80005f61 <flanterm_fb_init+0xa1>
        if (width >= (1920 + 1920 / 3) && height >= (1080 + 1080 / 3)) {
ffffffff800069d5:	48 81 7d a8 ff 09 00 	cmpq   $0x9ff,-0x58(%rbp)
ffffffff800069dc:	00 
ffffffff800069dd:	0f 97 c2             	seta   %dl
ffffffff800069e0:	31 c0                	xor    %eax,%eax
ffffffff800069e2:	48 81 7d 98 9f 05 00 	cmpq   $0x59f,-0x68(%rbp)
ffffffff800069e9:	00 
ffffffff800069ea:	0f 97 c0             	seta   %al
ffffffff800069ed:	48 21 d0             	and    %rdx,%rax
ffffffff800069f0:	48 83 c0 01          	add    $0x1,%rax
ffffffff800069f4:	48 89 85 98 00 00 00 	mov    %rax,0x98(%rbp)
ffffffff800069fb:	48 89 85 a0 00 00 00 	mov    %rax,0xa0(%rbp)
ffffffff80006a02:	e9 5a f5 ff ff       	jmp    ffffffff80005f61 <flanterm_fb_init+0xa1>
                if ((glyph[y] & (0x80 >> x))) {
ffffffff80006a07:	4c 89 75 c0          	mov    %r14,-0x40(%rbp)
        for (size_t y = 0; y < font_height; y++) {
ffffffff80006a0b:	45 31 ed             	xor    %r13d,%r13d
                if ((glyph[y] & (0x80 >> x))) {
ffffffff80006a0e:	41 b8 80 00 00 00    	mov    $0x80,%r8d
ffffffff80006a14:	48 89 c6             	mov    %rax,%rsi
ffffffff80006a17:	48 89 5d b8          	mov    %rbx,-0x48(%rbp)
ffffffff80006a1b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff80006a20:	48 8b 45 c0          	mov    -0x40(%rbp),%rax
ffffffff80006a24:	4a 8d 3c 12          	lea    (%rdx,%r10,1),%rdi
        for (size_t y = 0; y < font_height; y++) {
ffffffff80006a28:	48 89 d3             	mov    %rdx,%rbx
ffffffff80006a2b:	49 89 f6             	mov    %rsi,%r14
ffffffff80006a2e:	4c 01 e8             	add    %r13,%rax
ffffffff80006a31:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80006a38:	00 00 00 00 
ffffffff80006a3c:	0f 1f 40 00          	nopl   0x0(%rax)
            for (size_t x = 0; x < 8; x++) {
ffffffff80006a40:	48 89 7d c8          	mov    %rdi,-0x38(%rbp)
ffffffff80006a44:	31 c9                	xor    %ecx,%ecx
ffffffff80006a46:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80006a4d:	00 00 00 00 
ffffffff80006a51:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80006a58:	00 00 00 00 
ffffffff80006a5c:	0f 1f 40 00          	nopl   0x0(%rax)
                if ((glyph[y] & (0x80 >> x))) {
ffffffff80006a60:	0f b6 30             	movzbl (%rax),%esi
ffffffff80006a63:	44 89 c7             	mov    %r8d,%edi
ffffffff80006a66:	d3 ff                	sar    %cl,%edi
ffffffff80006a68:	85 f7                	test   %esi,%edi
                    ctx->font_bool[offset] = true;
ffffffff80006a6a:	0f 95 04 0b          	setne  (%rbx,%rcx,1)
            for (size_t x = 0; x < 8; x++) {
ffffffff80006a6e:	48 83 c1 01          	add    $0x1,%rcx
ffffffff80006a72:	48 83 f9 08          	cmp    $0x8,%rcx
ffffffff80006a76:	75 e8                	jne    ffffffff80006a60 <flanterm_fb_init+0xba0>
ffffffff80006a78:	48 8b 7d c8          	mov    -0x38(%rbp),%rdi
            for (size_t x = 8; x < ctx->font_width; x++) {
ffffffff80006a7c:	48 8d 4b 08          	lea    0x8(%rbx),%rcx
ffffffff80006a80:	49 83 fa 08          	cmp    $0x8,%r10
ffffffff80006a84:	76 12                	jbe    ffffffff80006a98 <flanterm_fb_init+0xbd8>
                if (i >= 0xc0 && i <= 0xdf) {
ffffffff80006a86:	49 83 f9 1f          	cmp    $0x1f,%r9
ffffffff80006a8a:	76 54                	jbe    ffffffff80006ae0 <flanterm_fb_init+0xc20>
                    ctx->font_bool[offset] = (glyph[y] & 1);
ffffffff80006a8c:	c6 01 00             	movb   $0x0,(%rcx)
            for (size_t x = 8; x < ctx->font_width; x++) {
ffffffff80006a8f:	48 83 c1 01          	add    $0x1,%rcx
ffffffff80006a93:	48 39 cf             	cmp    %rcx,%rdi
ffffffff80006a96:	75 ee                	jne    ffffffff80006a86 <flanterm_fb_init+0xbc6>
        for (size_t y = 0; y < font_height; y++) {
ffffffff80006a98:	48 83 c0 01          	add    $0x1,%rax
ffffffff80006a9c:	4c 01 d7             	add    %r10,%rdi
ffffffff80006a9f:	4c 01 d3             	add    %r10,%rbx
ffffffff80006aa2:	4c 39 d8             	cmp    %r11,%rax
ffffffff80006aa5:	75 99                	jne    ffffffff80006a40 <flanterm_fb_init+0xb80>
    for (size_t i = 0; i < FLANTERM_FB_FONT_GLYPHS; i++) {
ffffffff80006aa7:	49 83 c1 01          	add    $0x1,%r9
ffffffff80006aab:	4c 89 f6             	mov    %r14,%rsi
ffffffff80006aae:	4d 01 e3             	add    %r12,%r11
ffffffff80006ab1:	4c 01 f2             	add    %r14,%rdx
ffffffff80006ab4:	4d 01 e5             	add    %r12,%r13
ffffffff80006ab7:	49 83 f9 40          	cmp    $0x40,%r9
ffffffff80006abb:	0f 85 5f ff ff ff    	jne    ffffffff80006a20 <flanterm_fb_init+0xb60>
ffffffff80006ac1:	48 8b 5d b8          	mov    -0x48(%rbp),%rbx
ffffffff80006ac5:	e9 00 fa ff ff       	jmp    ffffffff800064ca <flanterm_fb_init+0x60a>
ffffffff80006aca:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80006ad1:	00 00 00 00 
ffffffff80006ad5:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80006adc:	00 00 00 00 
                    ctx->font_bool[offset] = (glyph[y] & 1);
ffffffff80006ae0:	0f b6 30             	movzbl (%rax),%esi
            for (size_t x = 8; x < ctx->font_width; x++) {
ffffffff80006ae3:	48 83 c1 01          	add    $0x1,%rcx
                    ctx->font_bool[offset] = (glyph[y] & 1);
ffffffff80006ae7:	83 e6 01             	and    $0x1,%esi
ffffffff80006aea:	40 88 71 ff          	mov    %sil,-0x1(%rcx)
            for (size_t x = 8; x < ctx->font_width; x++) {
ffffffff80006aee:	48 39 cf             	cmp    %rcx,%rdi
ffffffff80006af1:	75 ed                	jne    ffffffff80006ae0 <flanterm_fb_init+0xc20>
ffffffff80006af3:	eb a3                	jmp    ffffffff80006a98 <flanterm_fb_init+0xbd8>
        if (bump_allocated_instance == true) {
ffffffff80006af5:	80 3d 04 78 02 00 00 	cmpb   $0x0,0x27804(%rip)        # ffffffff8002e300 <bump_allocated_instance>
ffffffff80006afc:	0f 85 8e fe ff ff    	jne    ffffffff80006990 <flanterm_fb_init+0xad0>
        if (width > FLANTERM_FB_WIDTH_LIMIT || height > FLANTERM_FB_HEIGHT_LIMIT) {
ffffffff80006b02:	48 81 7d a8 80 07 00 	cmpq   $0x780,-0x58(%rbp)
ffffffff80006b09:	00 
ffffffff80006b0a:	77 1d                	ja     ffffffff80006b29 <flanterm_fb_init+0xc69>
ffffffff80006b0c:	48 81 7d 98 b0 04 00 	cmpq   $0x4b0,-0x68(%rbp)
ffffffff80006b13:	00 
        canvas = NULL;
ffffffff80006b14:	48 c7 45 40 00 00 00 	movq   $0x0,0x40(%rbp)
ffffffff80006b1b:	00 
        _malloc = bump_alloc;
ffffffff80006b1c:	49 c7 c7 60 48 00 80 	mov    $0xffffffff80004860,%r15
        if (width > FLANTERM_FB_WIDTH_LIMIT || height > FLANTERM_FB_HEIGHT_LIMIT) {
ffffffff80006b23:	0f 86 5f f4 ff ff    	jbe    ffffffff80005f88 <flanterm_fb_init+0xc8>
            size_t width_limit = width > FLANTERM_FB_WIDTH_LIMIT ? FLANTERM_FB_WIDTH_LIMIT : width;
ffffffff80006b29:	48 8b 5d a8          	mov    -0x58(%rbp),%rbx
ffffffff80006b2d:	b8 80 07 00 00       	mov    $0x780,%eax
            size_t height_limit = height > FLANTERM_FB_HEIGHT_LIMIT ? FLANTERM_FB_HEIGHT_LIMIT : height;
ffffffff80006b32:	48 8b 55 98          	mov    -0x68(%rbp),%rdx
        canvas = NULL;
ffffffff80006b36:	48 c7 45 40 00 00 00 	movq   $0x0,0x40(%rbp)
ffffffff80006b3d:	00 
        _malloc = bump_alloc;
ffffffff80006b3e:	49 c7 c7 60 48 00 80 	mov    $0xffffffff80004860,%r15
            size_t width_limit = width > FLANTERM_FB_WIDTH_LIMIT ? FLANTERM_FB_WIDTH_LIMIT : width;
ffffffff80006b45:	48 39 c3             	cmp    %rax,%rbx
ffffffff80006b48:	48 0f 46 c3          	cmovbe %rbx,%rax
ffffffff80006b4c:	49 89 c0             	mov    %rax,%r8
            size_t height_limit = height > FLANTERM_FB_HEIGHT_LIMIT ? FLANTERM_FB_HEIGHT_LIMIT : height;
ffffffff80006b4f:	b8 b0 04 00 00       	mov    $0x4b0,%eax
ffffffff80006b54:	48 39 c2             	cmp    %rax,%rdx
            framebuffer = (uint32_t *)((uintptr_t)framebuffer + ((((height / 2) - (height_limit / 2)) * pitch) + (((width / 2) - (width_limit / 2)) * 4)));
ffffffff80006b57:	4c 89 c7             	mov    %r8,%rdi
            width = width_limit;
ffffffff80006b5a:	4c 89 45 a8          	mov    %r8,-0x58(%rbp)
            size_t height_limit = height > FLANTERM_FB_HEIGHT_LIMIT ? FLANTERM_FB_HEIGHT_LIMIT : height;
ffffffff80006b5e:	48 0f 46 c2          	cmovbe %rdx,%rax
            framebuffer = (uint32_t *)((uintptr_t)framebuffer + ((((height / 2) - (height_limit / 2)) * pitch) + (((width / 2) - (width_limit / 2)) * 4)));
ffffffff80006b62:	48 d1 ea             	shr    $1,%rdx
ffffffff80006b65:	48 d1 eb             	shr    $1,%rbx
ffffffff80006b68:	48 89 c6             	mov    %rax,%rsi
ffffffff80006b6b:	48 d1 ef             	shr    $1,%rdi
            height = height_limit;
ffffffff80006b6e:	48 89 45 98          	mov    %rax,-0x68(%rbp)
            framebuffer = (uint32_t *)((uintptr_t)framebuffer + ((((height / 2) - (height_limit / 2)) * pitch) + (((width / 2) - (width_limit / 2)) * 4)));
ffffffff80006b72:	48 d1 ee             	shr    $1,%rsi
ffffffff80006b75:	48 29 f2             	sub    %rsi,%rdx
ffffffff80006b78:	48 8b b5 48 ff ff ff 	mov    -0xb8(%rbp),%rsi
ffffffff80006b7f:	48 0f af d6          	imul   %rsi,%rdx
ffffffff80006b83:	48 89 de             	mov    %rbx,%rsi
ffffffff80006b86:	48 29 fe             	sub    %rdi,%rsi
ffffffff80006b89:	48 8d 14 b2          	lea    (%rdx,%rsi,4),%rdx
ffffffff80006b8d:	48 01 95 50 ff ff ff 	add    %rdx,-0xb0(%rbp)
ffffffff80006b94:	e9 ef f3 ff ff       	jmp    ffffffff80005f88 <flanterm_fb_init+0xc8>
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006b99:	41 b9 10 00 00 00    	mov    $0x10,%r9d
ffffffff80006b9f:	44 89 c9             	mov    %r9d,%ecx
ffffffff80006ba2:	44 29 e9             	sub    %r13d,%ecx
ffffffff80006ba5:	41 d3 ea             	shr    %cl,%r10d
ffffffff80006ba8:	8d 4e 08             	lea    0x8(%rsi),%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006bab:	89 d6                	mov    %edx,%esi
ffffffff80006bad:	8b 55 b8             	mov    -0x48(%rbp),%edx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006bb0:	44 89 d7             	mov    %r10d,%edi
ffffffff80006bb3:	d3 e7                	shl    %cl,%edi
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006bb5:	44 89 c9             	mov    %r9d,%ecx
ffffffff80006bb8:	83 c2 08             	add    $0x8,%edx
ffffffff80006bbb:	44 29 d9             	sub    %r11d,%ecx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006bbe:	44 09 c7             	or     %r8d,%edi
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006bc1:	d3 ee                	shr    %cl,%esi
ffffffff80006bc3:	89 d1                	mov    %edx,%ecx
ffffffff80006bc5:	d3 e6                	shl    %cl,%esi
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80006bc7:	44 89 c9             	mov    %r9d,%ecx
ffffffff80006bca:	44 29 f1             	sub    %r14d,%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006bcd:	89 f2                	mov    %esi,%edx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80006bcf:	d3 e8                	shr    %cl,%eax
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006bd1:	09 fa                	or     %edi,%edx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80006bd3:	89 c6                	mov    %eax,%esi
ffffffff80006bd5:	8b 45 c8             	mov    -0x38(%rbp),%eax
ffffffff80006bd8:	83 c0 08             	add    $0x8,%eax
ffffffff80006bdb:	89 c1                	mov    %eax,%ecx
ffffffff80006bdd:	d3 e6                	shl    %cl,%esi
ffffffff80006bdf:	09 d6                	or     %edx,%esi
ffffffff80006be1:	41 89 f0             	mov    %esi,%r8d
    return ret;
ffffffff80006be4:	e9 b7 f7 ff ff       	jmp    ffffffff800063a0 <flanterm_fb_init+0x4e0>
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006be9:	b9 10 00 00 00       	mov    $0x10,%ecx
ffffffff80006bee:	44 29 e9             	sub    %r13d,%ecx
ffffffff80006bf1:	d3 e8                	shr    %cl,%eax
ffffffff80006bf3:	8d 4e 08             	lea    0x8(%rsi),%ecx
ffffffff80006bf6:	41 89 c1             	mov    %eax,%r9d
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006bf9:	8b 45 b8             	mov    -0x48(%rbp),%eax
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006bfc:	41 d3 e1             	shl    %cl,%r9d
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006bff:	b9 10 00 00 00       	mov    $0x10,%ecx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006c04:	45 09 ca             	or     %r9d,%r10d
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006c07:	44 29 d9             	sub    %r11d,%ecx
ffffffff80006c0a:	41 89 d1             	mov    %edx,%r9d
ffffffff80006c0d:	41 d3 e9             	shr    %cl,%r9d
ffffffff80006c10:	8d 48 08             	lea    0x8(%rax),%ecx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80006c13:	8b 45 c8             	mov    -0x38(%rbp),%eax
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006c16:	41 d3 e1             	shl    %cl,%r9d
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80006c19:	b9 10 00 00 00       	mov    $0x10,%ecx
ffffffff80006c1e:	44 29 f1             	sub    %r14d,%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006c21:	45 09 ca             	or     %r9d,%r10d
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80006c24:	d3 ef                	shr    %cl,%edi
ffffffff80006c26:	8d 48 08             	lea    0x8(%rax),%ecx
ffffffff80006c29:	41 89 f9             	mov    %edi,%r9d
ffffffff80006c2c:	41 d3 e1             	shl    %cl,%r9d
ffffffff80006c2f:	45 09 ca             	or     %r9d,%r10d
    if (default_fg_bright != NULL) {
ffffffff80006c32:	48 83 7d 70 00       	cmpq   $0x0,0x70(%rbp)
        ctx->default_bg_bright = convert_colour(_ctx, *default_bg_bright);
ffffffff80006c37:	44 89 93 bc 03 00 00 	mov    %r10d,0x3bc(%rbx)
    if (default_fg_bright != NULL) {
ffffffff80006c3e:	0f 85 13 f7 ff ff    	jne    ffffffff80006357 <flanterm_fb_init+0x497>
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006c44:	41 b9 ff 00 00 00    	mov    $0xff,%r9d
ffffffff80006c4a:	44 89 c1             	mov    %r8d,%ecx
ffffffff80006c4d:	44 89 c8             	mov    %r9d,%eax
ffffffff80006c50:	44 89 cf             	mov    %r9d,%edi
ffffffff80006c53:	d3 e0                	shl    %cl,%eax
ffffffff80006c55:	0f b6 4d c0          	movzbl -0x40(%rbp),%ecx
ffffffff80006c59:	d3 e7                	shl    %cl,%edi
ffffffff80006c5b:	0f b6 4d b4          	movzbl -0x4c(%rbp),%ecx
ffffffff80006c5f:	09 c7                	or     %eax,%edi
ffffffff80006c61:	44 89 c8             	mov    %r9d,%eax
ffffffff80006c64:	d3 e0                	shl    %cl,%eax
ffffffff80006c66:	09 c7                	or     %eax,%edi
ffffffff80006c68:	41 89 f8             	mov    %edi,%r8d
    if (ctx->red_mask_size > 8) {
ffffffff80006c6b:	41 80 fd 08          	cmp    $0x8,%r13b
ffffffff80006c6f:	0f 84 2b f7 ff ff    	je     ffffffff800063a0 <flanterm_fb_init+0x4e0>
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006c75:	41 ba 10 00 00 00    	mov    $0x10,%r10d
ffffffff80006c7b:	44 89 cf             	mov    %r9d,%edi
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006c7e:	8b 55 b8             	mov    -0x48(%rbp),%edx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006c81:	44 89 d1             	mov    %r10d,%ecx
ffffffff80006c84:	44 29 e9             	sub    %r13d,%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006c87:	83 c2 08             	add    $0x8,%edx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006c8a:	d3 ef                	shr    %cl,%edi
ffffffff80006c8c:	8d 4e 08             	lea    0x8(%rsi),%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006c8f:	44 89 ce             	mov    %r9d,%esi
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006c92:	d3 e7                	shl    %cl,%edi
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006c94:	44 89 d1             	mov    %r10d,%ecx
ffffffff80006c97:	44 29 d9             	sub    %r11d,%ecx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006c9a:	44 09 c7             	or     %r8d,%edi
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006c9d:	d3 ee                	shr    %cl,%esi
ffffffff80006c9f:	89 d1                	mov    %edx,%ecx
ffffffff80006ca1:	d3 e6                	shl    %cl,%esi
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80006ca3:	44 89 d1             	mov    %r10d,%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006ca6:	89 f2                	mov    %esi,%edx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80006ca8:	44 29 f1             	sub    %r14d,%ecx
ffffffff80006cab:	44 89 ce             	mov    %r9d,%esi
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006cae:	09 fa                	or     %edi,%edx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80006cb0:	d3 ee                	shr    %cl,%esi
ffffffff80006cb2:	e9 1e ff ff ff       	jmp    ffffffff80006bd5 <flanterm_fb_init+0xd15>
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006cb7:	b9 10 00 00 00       	mov    $0x10,%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006cbc:	89 d7                	mov    %edx,%edi
ffffffff80006cbe:	8b 55 b8             	mov    -0x48(%rbp),%edx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006cc1:	44 29 e9             	sub    %r13d,%ecx
ffffffff80006cc4:	41 d3 ea             	shr    %cl,%r10d
ffffffff80006cc7:	8d 4e 08             	lea    0x8(%rsi),%ecx
ffffffff80006cca:	41 d3 e2             	shl    %cl,%r10d
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006ccd:	b9 10 00 00 00       	mov    $0x10,%ecx
ffffffff80006cd2:	44 29 d9             	sub    %r11d,%ecx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006cd5:	45 09 ca             	or     %r9d,%r10d
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006cd8:	d3 ef                	shr    %cl,%edi
ffffffff80006cda:	8d 4a 08             	lea    0x8(%rdx),%ecx
ffffffff80006cdd:	41 89 f9             	mov    %edi,%r9d
ffffffff80006ce0:	41 d3 e1             	shl    %cl,%r9d
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80006ce3:	b9 10 00 00 00       	mov    $0x10,%ecx
ffffffff80006ce8:	44 29 f1             	sub    %r14d,%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006ceb:	45 09 ca             	or     %r9d,%r10d
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80006cee:	d3 e8                	shr    %cl,%eax
ffffffff80006cf0:	41 89 c1             	mov    %eax,%r9d
ffffffff80006cf3:	8b 45 c8             	mov    -0x38(%rbp),%eax
ffffffff80006cf6:	8d 48 08             	lea    0x8(%rax),%ecx
ffffffff80006cf9:	41 d3 e1             	shl    %cl,%r9d
ffffffff80006cfc:	45 09 d1             	or     %r10d,%r9d
    if (default_fg != NULL) {
ffffffff80006cff:	48 83 7d 60 00       	cmpq   $0x0,0x60(%rbp)
        ctx->default_bg = convert_colour(_ctx, *default_bg);
ffffffff80006d04:	44 89 8b b4 03 00 00 	mov    %r9d,0x3b4(%rbx)
    if (default_fg != NULL) {
ffffffff80006d0b:	0f 85 3d f5 ff ff    	jne    ffffffff8000624e <flanterm_fb_init+0x38e>
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006d11:	41 ba aa 00 00 00    	mov    $0xaa,%r10d
ffffffff80006d17:	44 89 c1             	mov    %r8d,%ecx
ffffffff80006d1a:	44 89 d7             	mov    %r10d,%edi
ffffffff80006d1d:	45 89 d1             	mov    %r10d,%r9d
ffffffff80006d20:	44 89 d0             	mov    %r10d,%eax
ffffffff80006d23:	d3 e7                	shl    %cl,%edi
ffffffff80006d25:	0f b6 4d c0          	movzbl -0x40(%rbp),%ecx
ffffffff80006d29:	41 d3 e1             	shl    %cl,%r9d
ffffffff80006d2c:	0f b6 4d b4          	movzbl -0x4c(%rbp),%ecx
ffffffff80006d30:	41 09 f9             	or     %edi,%r9d
ffffffff80006d33:	d3 e0                	shl    %cl,%eax
ffffffff80006d35:	89 c1                	mov    %eax,%ecx
ffffffff80006d37:	44 89 c8             	mov    %r9d,%eax
ffffffff80006d3a:	09 c8                	or     %ecx,%eax
ffffffff80006d3c:	89 45 b0             	mov    %eax,-0x50(%rbp)
    if (ctx->red_mask_size > 8) {
ffffffff80006d3f:	41 80 fd 08          	cmp    $0x8,%r13b
ffffffff80006d43:	0f 84 9e f5 ff ff    	je     ffffffff800062e7 <flanterm_fb_init+0x427>
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006d49:	bf 10 00 00 00       	mov    $0x10,%edi
ffffffff80006d4e:	45 89 d1             	mov    %r10d,%r9d
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006d51:	8b 55 b8             	mov    -0x48(%rbp),%edx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006d54:	89 f9                	mov    %edi,%ecx
ffffffff80006d56:	44 29 e9             	sub    %r13d,%ecx
ffffffff80006d59:	41 d3 e9             	shr    %cl,%r9d
ffffffff80006d5c:	8d 4e 08             	lea    0x8(%rsi),%ecx
ffffffff80006d5f:	41 d3 e1             	shl    %cl,%r9d
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006d62:	89 f9                	mov    %edi,%ecx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006d64:	44 09 c8             	or     %r9d,%eax
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006d67:	44 29 d9             	sub    %r11d,%ecx
ffffffff80006d6a:	45 89 d1             	mov    %r10d,%r9d
ffffffff80006d6d:	41 d3 e9             	shr    %cl,%r9d
ffffffff80006d70:	8d 4a 08             	lea    0x8(%rdx),%ecx
ffffffff80006d73:	41 d3 e1             	shl    %cl,%r9d
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80006d76:	89 f9                	mov    %edi,%ecx
ffffffff80006d78:	44 29 f1             	sub    %r14d,%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006d7b:	44 09 c8             	or     %r9d,%eax
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80006d7e:	41 d3 ea             	shr    %cl,%r10d
ffffffff80006d81:	45 89 d1             	mov    %r10d,%r9d
ffffffff80006d84:	e9 4f f5 ff ff       	jmp    ffffffff800062d8 <flanterm_fb_init+0x418>
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006d89:	0f b6 4d b4          	movzbl -0x4c(%rbp),%ecx
ffffffff80006d8d:	41 b9 aa 00 00 00    	mov    $0xaa,%r9d
ffffffff80006d93:	bf 55 00 00 00       	mov    $0x55,%edi
ffffffff80006d98:	45 89 ca             	mov    %r9d,%r10d
ffffffff80006d9b:	44 89 c8             	mov    %r9d,%eax
ffffffff80006d9e:	41 d3 e2             	shl    %cl,%r10d
ffffffff80006da1:	44 89 c1             	mov    %r8d,%ecx
ffffffff80006da4:	d3 e0                	shl    %cl,%eax
ffffffff80006da6:	d3 e7                	shl    %cl,%edi
ffffffff80006da8:	89 45 b0             	mov    %eax,-0x50(%rbp)
ffffffff80006dab:	89 7d 88             	mov    %edi,-0x78(%rbp)
    if (ctx->red_mask_size > 8) {
ffffffff80006dae:	41 80 fd 08          	cmp    $0x8,%r13b
ffffffff80006db2:	0f 85 64 04 00 00    	jne    ffffffff8000721c <flanterm_fb_init+0x135c>
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006db8:	0f b6 4d c0          	movzbl -0x40(%rbp),%ecx
ffffffff80006dbc:	44 09 d7             	or     %r10d,%edi
ffffffff80006dbf:	89 7d 88             	mov    %edi,-0x78(%rbp)
ffffffff80006dc2:	89 c7                	mov    %eax,%edi
ffffffff80006dc4:	41 d3 e1             	shl    %cl,%r9d
ffffffff80006dc7:	44 89 d1             	mov    %r10d,%ecx
ffffffff80006dca:	44 09 cf             	or     %r9d,%edi
ffffffff80006dcd:	44 09 c9             	or     %r9d,%ecx
ffffffff80006dd0:	44 89 4d 80          	mov    %r9d,-0x80(%rbp)
ffffffff80006dd4:	89 7d 84             	mov    %edi,-0x7c(%rbp)
ffffffff80006dd7:	09 c8                	or     %ecx,%eax
ffffffff80006dd9:	89 4d 8c             	mov    %ecx,-0x74(%rbp)
ffffffff80006ddc:	89 c1                	mov    %eax,%ecx
        ctx->ansi_colours[2] = convert_colour(_ctx, 0x0000aa00); // green
ffffffff80006dde:	8b 45 b0             	mov    -0x50(%rbp),%eax
    if (ansi_bright_colours != NULL) {
ffffffff80006de1:	48 83 7d 50 00       	cmpq   $0x0,0x50(%rbp)
        ctx->ansi_colours[0] = convert_colour(_ctx, 0x00000000); // black
ffffffff80006de6:	c7 83 70 03 00 00 00 	movl   $0x0,0x370(%rbx)
ffffffff80006ded:	00 00 00 
        ctx->ansi_colours[1] = convert_colour(_ctx, 0x00aa0000); // red
ffffffff80006df0:	44 89 93 74 03 00 00 	mov    %r10d,0x374(%rbx)
        ctx->ansi_colours[2] = convert_colour(_ctx, 0x0000aa00); // green
ffffffff80006df7:	89 83 78 03 00 00    	mov    %eax,0x378(%rbx)
        ctx->ansi_colours[3] = convert_colour(_ctx, 0x00aa5500); // brown
ffffffff80006dfd:	8b 45 88             	mov    -0x78(%rbp),%eax
        ctx->ansi_colours[7] = convert_colour(_ctx, 0x00aaaaaa); // grey
ffffffff80006e00:	89 8b 8c 03 00 00    	mov    %ecx,0x38c(%rbx)
        ctx->ansi_colours[3] = convert_colour(_ctx, 0x00aa5500); // brown
ffffffff80006e06:	89 83 7c 03 00 00    	mov    %eax,0x37c(%rbx)
        ctx->ansi_colours[4] = convert_colour(_ctx, 0x000000aa); // blue
ffffffff80006e0c:	8b 45 80             	mov    -0x80(%rbp),%eax
ffffffff80006e0f:	89 83 80 03 00 00    	mov    %eax,0x380(%rbx)
        ctx->ansi_colours[5] = convert_colour(_ctx, 0x00aa00aa); // magenta
ffffffff80006e15:	8b 45 8c             	mov    -0x74(%rbp),%eax
ffffffff80006e18:	89 83 84 03 00 00    	mov    %eax,0x384(%rbx)
        ctx->ansi_colours[6] = convert_colour(_ctx, 0x0000aaaa); // cyan
ffffffff80006e1e:	8b 45 84             	mov    -0x7c(%rbp),%eax
ffffffff80006e21:	89 83 88 03 00 00    	mov    %eax,0x388(%rbx)
    if (ansi_bright_colours != NULL) {
ffffffff80006e27:	0f 85 e2 f2 ff ff    	jne    ffffffff8000610f <flanterm_fb_init+0x24f>
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006e2d:	0f b6 4d b4          	movzbl -0x4c(%rbp),%ecx
ffffffff80006e31:	bf 55 00 00 00       	mov    $0x55,%edi
ffffffff80006e36:	b8 ff 00 00 00       	mov    $0xff,%eax
ffffffff80006e3b:	41 b9 55 00 00 00    	mov    $0x55,%r9d
ffffffff80006e41:	41 ba 55 00 00 00    	mov    $0x55,%r10d
ffffffff80006e47:	d3 e7                	shl    %cl,%edi
ffffffff80006e49:	44 89 c1             	mov    %r8d,%ecx
ffffffff80006e4c:	41 d3 e1             	shl    %cl,%r9d
ffffffff80006e4f:	0f b6 4d c0          	movzbl -0x40(%rbp),%ecx
ffffffff80006e53:	89 7d b0             	mov    %edi,-0x50(%rbp)
ffffffff80006e56:	44 09 cf             	or     %r9d,%edi
ffffffff80006e59:	41 d3 e2             	shl    %cl,%r10d
ffffffff80006e5c:	89 7d 88             	mov    %edi,-0x78(%rbp)
ffffffff80006e5f:	44 89 d1             	mov    %r10d,%ecx
ffffffff80006e62:	41 89 fa             	mov    %edi,%r10d
ffffffff80006e65:	41 09 ca             	or     %ecx,%r10d
ffffffff80006e68:	89 cf                	mov    %ecx,%edi
ffffffff80006e6a:	0f b6 4d c0          	movzbl -0x40(%rbp),%ecx
ffffffff80006e6e:	44 89 55 80          	mov    %r10d,-0x80(%rbp)
ffffffff80006e72:	41 ba ff 00 00 00    	mov    $0xff,%r10d
ffffffff80006e78:	d3 e0                	shl    %cl,%eax
ffffffff80006e7a:	0f b6 4d b4          	movzbl -0x4c(%rbp),%ecx
ffffffff80006e7e:	89 7d 84             	mov    %edi,-0x7c(%rbp)
ffffffff80006e81:	89 85 6c ff ff ff    	mov    %eax,-0x94(%rbp)
ffffffff80006e87:	41 d3 e2             	shl    %cl,%r10d
ffffffff80006e8a:	44 89 c1             	mov    %r8d,%ecx
ffffffff80006e8d:	45 09 d1             	or     %r10d,%r9d
ffffffff80006e90:	44 89 d2             	mov    %r10d,%edx
ffffffff80006e93:	41 89 c2             	mov    %eax,%r10d
ffffffff80006e96:	45 09 ca             	or     %r9d,%r10d
ffffffff80006e99:	44 89 95 70 ff ff ff 	mov    %r10d,-0x90(%rbp)
ffffffff80006ea0:	41 ba ff 00 00 00    	mov    $0xff,%r10d
ffffffff80006ea6:	41 d3 e2             	shl    %cl,%r10d
ffffffff80006ea9:	8b 4d b0             	mov    -0x50(%rbp),%ecx
ffffffff80006eac:	44 09 d1             	or     %r10d,%ecx
ffffffff80006eaf:	09 c8                	or     %ecx,%eax
ffffffff80006eb1:	89 85 78 ff ff ff    	mov    %eax,-0x88(%rbp)
ffffffff80006eb7:	89 f8                	mov    %edi,%eax
ffffffff80006eb9:	09 c8                	or     %ecx,%eax
ffffffff80006ebb:	89 85 74 ff ff ff    	mov    %eax,-0x8c(%rbp)
ffffffff80006ec1:	89 f8                	mov    %edi,%eax
ffffffff80006ec3:	44 09 c8             	or     %r9d,%eax
ffffffff80006ec6:	41 89 d1             	mov    %edx,%r9d
ffffffff80006ec9:	45 09 d1             	or     %r10d,%r9d
ffffffff80006ecc:	89 85 7c ff ff ff    	mov    %eax,-0x84(%rbp)
ffffffff80006ed2:	44 89 4d 8c          	mov    %r9d,-0x74(%rbp)
ffffffff80006ed6:	44 89 c8             	mov    %r9d,%eax
    if (ctx->red_mask_size > 8) {
ffffffff80006ed9:	41 80 fd 08          	cmp    $0x8,%r13b
ffffffff80006edd:	0f 85 71 01 00 00    	jne    ffffffff80007054 <flanterm_fb_init+0x1194>
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006ee3:	8b 7d 84             	mov    -0x7c(%rbp),%edi
ffffffff80006ee6:	8b 45 8c             	mov    -0x74(%rbp),%eax
ffffffff80006ee9:	44 8b 55 88          	mov    -0x78(%rbp),%r10d
ffffffff80006eed:	09 c7                	or     %eax,%edi
ffffffff80006eef:	89 7d 84             	mov    %edi,-0x7c(%rbp)
ffffffff80006ef2:	8b bd 6c ff ff ff    	mov    -0x94(%rbp),%edi
ffffffff80006ef8:	09 f8                	or     %edi,%eax
ffffffff80006efa:	41 09 fa             	or     %edi,%r10d
ffffffff80006efd:	89 c1                	mov    %eax,%ecx
        ctx->ansi_bright_colours[0] = convert_colour(_ctx, 0x00555555); // black
ffffffff80006eff:	8b 45 80             	mov    -0x80(%rbp),%eax
        ctx->ansi_bright_colours[4] = convert_colour(_ctx, 0x005555ff); // blue
ffffffff80006f02:	44 89 93 a0 03 00 00 	mov    %r10d,0x3a0(%rbx)
        ctx->ansi_bright_colours[7] = convert_colour(_ctx, 0x00ffffff); // grey
ffffffff80006f09:	89 8b ac 03 00 00    	mov    %ecx,0x3ac(%rbx)
        ctx->ansi_bright_colours[0] = convert_colour(_ctx, 0x00555555); // black
ffffffff80006f0f:	89 83 90 03 00 00    	mov    %eax,0x390(%rbx)
        ctx->ansi_bright_colours[1] = convert_colour(_ctx, 0x00ff5555); // red
ffffffff80006f15:	8b 85 7c ff ff ff    	mov    -0x84(%rbp),%eax
ffffffff80006f1b:	89 83 94 03 00 00    	mov    %eax,0x394(%rbx)
        ctx->ansi_bright_colours[2] = convert_colour(_ctx, 0x0055ff55); // green
ffffffff80006f21:	8b 85 74 ff ff ff    	mov    -0x8c(%rbp),%eax
ffffffff80006f27:	89 83 98 03 00 00    	mov    %eax,0x398(%rbx)
        ctx->ansi_bright_colours[3] = convert_colour(_ctx, 0x00ffff55); // brown
ffffffff80006f2d:	8b 45 84             	mov    -0x7c(%rbp),%eax
ffffffff80006f30:	89 83 9c 03 00 00    	mov    %eax,0x39c(%rbx)
        ctx->ansi_bright_colours[5] = convert_colour(_ctx, 0x00ff55ff); // magenta
ffffffff80006f36:	8b 85 70 ff ff ff    	mov    -0x90(%rbp),%eax
ffffffff80006f3c:	89 83 a4 03 00 00    	mov    %eax,0x3a4(%rbx)
        ctx->ansi_bright_colours[6] = convert_colour(_ctx, 0x0055ffff); // cyan
ffffffff80006f42:	8b 85 78 ff ff ff    	mov    -0x88(%rbp),%eax
ffffffff80006f48:	89 83 a8 03 00 00    	mov    %eax,0x3a8(%rbx)
    return ret;
ffffffff80006f4e:	e9 9e f2 ff ff       	jmp    ffffffff800061f1 <flanterm_fb_init+0x331>
        ctx->font_width = font_width = 8;
ffffffff80006f53:	48 c7 83 d0 02 00 00 	movq   $0x8,0x2d0(%rbx)
ffffffff80006f5a:	08 00 00 00 
        ctx->font_bits = _malloc(ctx->font_bits_size);
ffffffff80006f5e:	bf 00 10 00 00       	mov    $0x1000,%edi
        ctx->font_height = font_height = 16;
ffffffff80006f63:	48 c7 83 d8 02 00 00 	movq   $0x10,0x2d8(%rbx)
ffffffff80006f6a:	10 00 00 00 
        ctx->font_bits_size = FONT_BYTES;
ffffffff80006f6e:	48 c7 83 50 03 00 00 	movq   $0x1000,0x350(%rbx)
ffffffff80006f75:	00 10 00 00 
        ctx->font_bits = _malloc(ctx->font_bits_size);
ffffffff80006f79:	41 ff d7             	call   *%r15
ffffffff80006f7c:	48 89 83 58 03 00 00 	mov    %rax,0x358(%rbx)
ffffffff80006f83:	48 89 c7             	mov    %rax,%rdi
        if (ctx->font_bits == NULL) {
ffffffff80006f86:	48 85 c0             	test   %rax,%rax
ffffffff80006f89:	0f 84 47 f9 ff ff    	je     ffffffff800068d6 <flanterm_fb_init+0xa16>
        memcpy(ctx->font_bits, builtin_font, ctx->font_bits_size);
ffffffff80006f8f:	48 8b 93 50 03 00 00 	mov    0x350(%rbx),%rdx
ffffffff80006f96:	48 c7 c6 80 90 02 80 	mov    $0xffffffff80029080,%rsi
        ctx->font_height = font_height = 16;
ffffffff80006f9d:	41 bc 10 00 00 00    	mov    $0x10,%r12d
        memcpy(ctx->font_bits, builtin_font, ctx->font_bits_size);
ffffffff80006fa3:	e8 38 32 01 00       	call   ffffffff8001a1e0 <memcpy>
        font_spacing = 1;
ffffffff80006fa8:	48 c7 85 90 00 00 00 	movq   $0x1,0x90(%rbp)
ffffffff80006faf:	01 00 00 00 
ffffffff80006fb3:	e9 a2 f4 ff ff       	jmp    ffffffff8000645a <flanterm_fb_init+0x59a>
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80006fb8:	44 89 c1             	mov    %r8d,%ecx
ffffffff80006fbb:	41 ba 55 00 00 00    	mov    $0x55,%r10d
ffffffff80006fc1:	41 b9 55 00 00 00    	mov    $0x55,%r9d
ffffffff80006fc7:	b8 55 00 00 00       	mov    $0x55,%eax
ffffffff80006fcc:	41 d3 e2             	shl    %cl,%r10d
ffffffff80006fcf:	0f b6 4d c0          	movzbl -0x40(%rbp),%ecx
ffffffff80006fd3:	41 d3 e1             	shl    %cl,%r9d
ffffffff80006fd6:	0f b6 4d b4          	movzbl -0x4c(%rbp),%ecx
ffffffff80006fda:	45 09 d1             	or     %r10d,%r9d
ffffffff80006fdd:	d3 e0                	shl    %cl,%eax
ffffffff80006fdf:	45 89 ca             	mov    %r9d,%r10d
ffffffff80006fe2:	41 09 c2             	or     %eax,%r10d
    if (ctx->red_mask_size > 8) {
ffffffff80006fe5:	41 80 fd 08          	cmp    $0x8,%r13b
ffffffff80006fe9:	0f 84 56 f3 ff ff    	je     ffffffff80006345 <flanterm_fb_init+0x485>
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006fef:	b9 10 00 00 00       	mov    $0x10,%ecx
ffffffff80006ff4:	41 b9 55 00 00 00    	mov    $0x55,%r9d
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80006ffa:	8b 45 b8             	mov    -0x48(%rbp),%eax
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80006ffd:	44 29 e9             	sub    %r13d,%ecx
ffffffff80007000:	41 d3 e9             	shr    %cl,%r9d
ffffffff80007003:	8d 4e 08             	lea    0x8(%rsi),%ecx
ffffffff80007006:	41 d3 e1             	shl    %cl,%r9d
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80007009:	b9 10 00 00 00       	mov    $0x10,%ecx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff8000700e:	45 09 ca             	or     %r9d,%r10d
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80007011:	44 29 d9             	sub    %r11d,%ecx
ffffffff80007014:	41 b9 55 00 00 00    	mov    $0x55,%r9d
ffffffff8000701a:	41 d3 e9             	shr    %cl,%r9d
ffffffff8000701d:	8d 48 08             	lea    0x8(%rax),%ecx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80007020:	8b 45 c8             	mov    -0x38(%rbp),%eax
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80007023:	41 d3 e1             	shl    %cl,%r9d
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80007026:	b9 10 00 00 00       	mov    $0x10,%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff8000702b:	45 09 ca             	or     %r9d,%r10d
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff8000702e:	44 29 f1             	sub    %r14d,%ecx
ffffffff80007031:	41 b9 55 00 00 00    	mov    $0x55,%r9d
ffffffff80007037:	41 d3 e9             	shr    %cl,%r9d
ffffffff8000703a:	8d 48 08             	lea    0x8(%rax),%ecx
ffffffff8000703d:	41 d3 e1             	shl    %cl,%r9d
ffffffff80007040:	45 09 ca             	or     %r9d,%r10d
    return ret;
ffffffff80007043:	e9 fd f2 ff ff       	jmp    ffffffff80006345 <flanterm_fb_init+0x485>
    if (font_scale_x == 1 && font_scale_y == 1) {
ffffffff80007048:	48 c7 c0 10 56 00 80 	mov    $0xffffffff80005610,%rax
ffffffff8000704f:	e9 55 f7 ff ff       	jmp    ffffffff800067a9 <flanterm_fb_init+0x8e9>
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80007054:	41 ba 10 00 00 00    	mov    $0x10,%r10d
ffffffff8000705a:	41 0f b6 cd          	movzbl %r13b,%ecx
ffffffff8000705e:	44 8d 4e 08          	lea    0x8(%rsi),%r9d
ffffffff80007062:	44 89 d7             	mov    %r10d,%edi
ffffffff80007065:	44 89 ca             	mov    %r9d,%edx
ffffffff80007068:	41 b9 55 00 00 00    	mov    $0x55,%r9d
ffffffff8000706e:	29 cf                	sub    %ecx,%edi
ffffffff80007070:	89 55 8c             	mov    %edx,-0x74(%rbp)
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80007073:	8b 55 b8             	mov    -0x48(%rbp),%edx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80007076:	89 7d b0             	mov    %edi,-0x50(%rbp)
ffffffff80007079:	0f b6 4d b0          	movzbl -0x50(%rbp),%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff8000707d:	44 89 d7             	mov    %r10d,%edi
ffffffff80007080:	44 29 df             	sub    %r11d,%edi
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80007083:	41 d3 e9             	shr    %cl,%r9d
ffffffff80007086:	0f b6 4d 8c          	movzbl -0x74(%rbp),%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff8000708a:	89 bd 68 ff ff ff    	mov    %edi,-0x98(%rbp)
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80007090:	41 d3 e1             	shl    %cl,%r9d
ffffffff80007093:	8b 4d 80             	mov    -0x80(%rbp),%ecx
ffffffff80007096:	44 89 4d 90          	mov    %r9d,-0x70(%rbp)
ffffffff8000709a:	44 09 c9             	or     %r9d,%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff8000709d:	44 8d 4a 08          	lea    0x8(%rdx),%r9d
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff800070a1:	89 4d 80             	mov    %ecx,-0x80(%rbp)
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800070a4:	0f b6 8d 68 ff ff ff 	movzbl -0x98(%rbp),%ecx
ffffffff800070ab:	44 89 ca             	mov    %r9d,%edx
ffffffff800070ae:	41 b9 55 00 00 00    	mov    $0x55,%r9d
ffffffff800070b4:	89 95 64 ff ff ff    	mov    %edx,-0x9c(%rbp)
ffffffff800070ba:	41 d3 e9             	shr    %cl,%r9d
ffffffff800070bd:	0f b6 8d 64 ff ff ff 	movzbl -0x9c(%rbp),%ecx
ffffffff800070c4:	44 89 cf             	mov    %r9d,%edi
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800070c7:	44 8b 4d c8          	mov    -0x38(%rbp),%r9d
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800070cb:	d3 e7                	shl    %cl,%edi
ffffffff800070cd:	8b 4d 80             	mov    -0x80(%rbp),%ecx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800070d0:	41 83 c1 08          	add    $0x8,%r9d
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800070d4:	09 f9                	or     %edi,%ecx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800070d6:	44 89 ca             	mov    %r9d,%edx
ffffffff800070d9:	41 b9 55 00 00 00    	mov    $0x55,%r9d
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800070df:	89 4d 80             	mov    %ecx,-0x80(%rbp)
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800070e2:	41 0f b6 ce          	movzbl %r14b,%ecx
ffffffff800070e6:	41 29 ca             	sub    %ecx,%r10d
ffffffff800070e9:	89 95 5c ff ff ff    	mov    %edx,-0xa4(%rbp)
ffffffff800070ef:	89 fa                	mov    %edi,%edx
ffffffff800070f1:	44 89 95 60 ff ff ff 	mov    %r10d,-0xa0(%rbp)
ffffffff800070f8:	0f b6 8d 60 ff ff ff 	movzbl -0xa0(%rbp),%ecx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff800070ff:	41 ba ff 00 00 00    	mov    $0xff,%r10d
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80007105:	41 d3 e9             	shr    %cl,%r9d
ffffffff80007108:	0f b6 8d 5c ff ff ff 	movzbl -0xa4(%rbp),%ecx
ffffffff8000710f:	41 d3 e1             	shl    %cl,%r9d
ffffffff80007112:	8b 4d 80             	mov    -0x80(%rbp),%ecx
ffffffff80007115:	44 09 c9             	or     %r9d,%ecx
ffffffff80007118:	89 4d 80             	mov    %ecx,-0x80(%rbp)
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff8000711b:	0f b6 4d b0          	movzbl -0x50(%rbp),%ecx
ffffffff8000711f:	41 d3 ea             	shr    %cl,%r10d
ffffffff80007122:	0f b6 4d 8c          	movzbl -0x74(%rbp),%ecx
ffffffff80007126:	41 d3 e2             	shl    %cl,%r10d
ffffffff80007129:	44 89 55 b0          	mov    %r10d,-0x50(%rbp)
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff8000712d:	44 8b 95 7c ff ff ff 	mov    -0x84(%rbp),%r10d
ffffffff80007134:	45 09 ca             	or     %r9d,%r10d
ffffffff80007137:	44 89 d1             	mov    %r10d,%ecx
ffffffff8000713a:	44 8b 55 b0          	mov    -0x50(%rbp),%r10d
ffffffff8000713e:	09 f9                	or     %edi,%ecx
ffffffff80007140:	8b 7d 90             	mov    -0x70(%rbp),%edi
ffffffff80007143:	41 09 ca             	or     %ecx,%r10d
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80007146:	0f b6 8d 68 ff ff ff 	movzbl -0x98(%rbp),%ecx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff8000714d:	44 89 95 7c ff ff ff 	mov    %r10d,-0x84(%rbp)
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80007154:	41 ba ff 00 00 00    	mov    $0xff,%r10d
ffffffff8000715a:	41 d3 ea             	shr    %cl,%r10d
ffffffff8000715d:	0f b6 8d 64 ff ff ff 	movzbl -0x9c(%rbp),%ecx
ffffffff80007164:	41 d3 e2             	shl    %cl,%r10d
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80007167:	8b 8d 74 ff ff ff    	mov    -0x8c(%rbp),%ecx
ffffffff8000716d:	44 09 c9             	or     %r9d,%ecx
ffffffff80007170:	09 f9                	or     %edi,%ecx
ffffffff80007172:	44 89 d7             	mov    %r10d,%edi
ffffffff80007175:	41 09 ca             	or     %ecx,%r10d
ffffffff80007178:	44 89 95 74 ff ff ff 	mov    %r10d,-0x8c(%rbp)
ffffffff8000717f:	8b 4d 84             	mov    -0x7c(%rbp),%ecx
ffffffff80007182:	41 89 fa             	mov    %edi,%r10d
ffffffff80007185:	89 45 8c             	mov    %eax,-0x74(%rbp)
ffffffff80007188:	44 09 c9             	or     %r9d,%ecx
ffffffff8000718b:	44 8b 4d b0          	mov    -0x50(%rbp),%r9d
ffffffff8000718f:	89 bd 68 ff ff ff    	mov    %edi,-0x98(%rbp)
ffffffff80007195:	09 c1                	or     %eax,%ecx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80007197:	8b 7d 88             	mov    -0x78(%rbp),%edi
ffffffff8000719a:	8b 85 6c ff ff ff    	mov    -0x94(%rbp),%eax
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800071a0:	44 09 c9             	or     %r9d,%ecx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff800071a3:	44 8b 4d 90          	mov    -0x70(%rbp),%r9d
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800071a7:	41 09 ca             	or     %ecx,%r10d
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff800071aa:	09 c7                	or     %eax,%edi
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800071ac:	0f b6 8d 60 ff ff ff 	movzbl -0xa0(%rbp),%ecx
ffffffff800071b3:	44 89 55 84          	mov    %r10d,-0x7c(%rbp)
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff800071b7:	41 89 fa             	mov    %edi,%r10d
ffffffff800071ba:	8b 7d b0             	mov    -0x50(%rbp),%edi
ffffffff800071bd:	45 09 ca             	or     %r9d,%r10d
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800071c0:	41 b9 ff 00 00 00    	mov    $0xff,%r9d
ffffffff800071c6:	41 d3 e9             	shr    %cl,%r9d
ffffffff800071c9:	0f b6 8d 5c ff ff ff 	movzbl -0xa4(%rbp),%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800071d0:	41 09 d2             	or     %edx,%r10d
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800071d3:	41 d3 e1             	shl    %cl,%r9d
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff800071d6:	8b 8d 70 ff ff ff    	mov    -0x90(%rbp),%ecx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800071dc:	45 09 ca             	or     %r9d,%r10d
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff800071df:	09 f9                	or     %edi,%ecx
ffffffff800071e1:	8b 7d 90             	mov    -0x70(%rbp),%edi
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800071e4:	09 d1                	or     %edx,%ecx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800071e6:	44 09 c9             	or     %r9d,%ecx
ffffffff800071e9:	89 8d 70 ff ff ff    	mov    %ecx,-0x90(%rbp)
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff800071ef:	8b 8d 78 ff ff ff    	mov    -0x88(%rbp),%ecx
ffffffff800071f5:	09 f9                	or     %edi,%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800071f7:	8b bd 68 ff ff ff    	mov    -0x98(%rbp),%edi
ffffffff800071fd:	09 f9                	or     %edi,%ecx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800071ff:	44 09 c9             	or     %r9d,%ecx
ffffffff80007202:	89 8d 78 ff ff ff    	mov    %ecx,-0x88(%rbp)
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80007208:	8b 4d 8c             	mov    -0x74(%rbp),%ecx
ffffffff8000720b:	09 c1                	or     %eax,%ecx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff8000720d:	8b 45 b0             	mov    -0x50(%rbp),%eax
ffffffff80007210:	09 c1                	or     %eax,%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80007212:	09 f9                	or     %edi,%ecx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80007214:	44 09 c9             	or     %r9d,%ecx
ffffffff80007217:	e9 e3 fc ff ff       	jmp    ffffffff80006eff <flanterm_fb_init+0x103f>
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff8000721c:	b9 10 00 00 00       	mov    $0x10,%ecx
ffffffff80007221:	44 89 cf             	mov    %r9d,%edi
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80007224:	41 0f b6 d0          	movzbl %r8b,%edx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff80007228:	44 29 e9             	sub    %r13d,%ecx
ffffffff8000722b:	d3 ef                	shr    %cl,%edi
ffffffff8000722d:	8d 4e 08             	lea    0x8(%rsi),%ecx
ffffffff80007230:	d3 e7                	shl    %cl,%edi
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff80007232:	b9 10 00 00 00       	mov    $0x10,%ecx
ffffffff80007237:	44 29 d9             	sub    %r11d,%ecx
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff8000723a:	89 f8                	mov    %edi,%eax
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff8000723c:	8d 7a 08             	lea    0x8(%rdx),%edi
ffffffff8000723f:	89 4d 8c             	mov    %ecx,-0x74(%rbp)
ffffffff80007242:	0f b6 4d 8c          	movzbl -0x74(%rbp),%ecx
ffffffff80007246:	89 fa                	mov    %edi,%edx
ffffffff80007248:	44 89 cf             	mov    %r9d,%edi
ffffffff8000724b:	d3 ef                	shr    %cl,%edi
ffffffff8000724d:	89 d1                	mov    %edx,%ecx
ffffffff8000724f:	d3 e7                	shl    %cl,%edi
ffffffff80007251:	0f b6 4d 8c          	movzbl -0x74(%rbp),%ecx
ffffffff80007255:	89 45 8c             	mov    %eax,-0x74(%rbp)
ffffffff80007258:	89 bd 74 ff ff ff    	mov    %edi,-0x8c(%rbp)
ffffffff8000725e:	bf 55 00 00 00       	mov    $0x55,%edi
ffffffff80007263:	d3 ef                	shr    %cl,%edi
ffffffff80007265:	89 d1                	mov    %edx,%ecx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80007267:	8b 55 c8             	mov    -0x38(%rbp),%edx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff8000726a:	d3 e7                	shl    %cl,%edi
ffffffff8000726c:	89 f9                	mov    %edi,%ecx
ffffffff8000726e:	8b 7d 88             	mov    -0x78(%rbp),%edi
ffffffff80007271:	44 09 d1             	or     %r10d,%ecx
ffffffff80007274:	09 f9                	or     %edi,%ecx
ffffffff80007276:	89 c7                	mov    %eax,%edi
ffffffff80007278:	09 cf                	or     %ecx,%edi
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff8000727a:	0f b6 4d c0          	movzbl -0x40(%rbp),%ecx
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff8000727e:	89 7d 88             	mov    %edi,-0x78(%rbp)
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff80007281:	44 89 cf             	mov    %r9d,%edi
ffffffff80007284:	d3 e7                	shl    %cl,%edi
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff80007286:	b9 10 00 00 00       	mov    $0x10,%ecx
ffffffff8000728b:	44 29 f1             	sub    %r14d,%ecx
ffffffff8000728e:	89 7d 84             	mov    %edi,-0x7c(%rbp)
ffffffff80007291:	41 d3 e9             	shr    %cl,%r9d
ffffffff80007294:	8d 4a 08             	lea    0x8(%rdx),%ecx
ffffffff80007297:	44 89 c8             	mov    %r9d,%eax
ffffffff8000729a:	41 89 f9             	mov    %edi,%r9d
ffffffff8000729d:	d3 e0                	shl    %cl,%eax
ffffffff8000729f:	41 09 c1             	or     %eax,%r9d
ffffffff800072a2:	89 c2                	mov    %eax,%edx
ffffffff800072a4:	8b 45 8c             	mov    -0x74(%rbp),%eax
ffffffff800072a7:	44 89 c9             	mov    %r9d,%ecx
ffffffff800072aa:	44 89 4d 80          	mov    %r9d,-0x80(%rbp)
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800072ae:	44 8b 8d 74 ff ff ff 	mov    -0x8c(%rbp),%r9d
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800072b5:	44 09 d1             	or     %r10d,%ecx
ffffffff800072b8:	89 c7                	mov    %eax,%edi
ffffffff800072ba:	09 cf                	or     %ecx,%edi
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff800072bc:	8b 4d b0             	mov    -0x50(%rbp),%ecx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800072bf:	89 7d 8c             	mov    %edi,-0x74(%rbp)
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff800072c2:	8b 7d 84             	mov    -0x7c(%rbp),%edi
ffffffff800072c5:	09 f9                	or     %edi,%ecx
ffffffff800072c7:	44 09 d7             	or     %r10d,%edi
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800072ca:	41 09 c2             	or     %eax,%r10d
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800072cd:	44 09 c9             	or     %r9d,%ecx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800072d0:	09 d1                	or     %edx,%ecx
ffffffff800072d2:	89 4d 84             	mov    %ecx,-0x7c(%rbp)
    uint32_t ret = (r << ctx->red_mask_shift) | (g << ctx->green_mask_shift) | (b << ctx->blue_mask_shift);
ffffffff800072d5:	89 f9                	mov    %edi,%ecx
ffffffff800072d7:	8b 7d b0             	mov    -0x50(%rbp),%edi
ffffffff800072da:	09 f9                	or     %edi,%ecx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800072dc:	44 09 cf             	or     %r9d,%edi
        ret |= (r >> (16 - ctx->red_mask_size)) << (ctx->red_mask_shift + 8);
ffffffff800072df:	09 c1                	or     %eax,%ecx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800072e1:	89 7d b0             	mov    %edi,-0x50(%rbp)
        ret |= (g >> (16 - ctx->green_mask_size)) << (ctx->green_mask_shift + 8);
ffffffff800072e4:	44 09 c9             	or     %r9d,%ecx
        ret |= (b >> (16 - ctx->blue_mask_size)) << (ctx->blue_mask_shift + 8);
ffffffff800072e7:	09 d1                	or     %edx,%ecx
ffffffff800072e9:	e9 f0 fa ff ff       	jmp    ffffffff80006dde <flanterm_fb_init+0xf1e>
    if (font_scale_x == 1 && font_scale_y == 1) {
ffffffff800072ee:	48 83 bd 98 00 00 00 	cmpq   $0x1,0x98(%rbp)
ffffffff800072f5:	01 
ffffffff800072f6:	75 15                	jne    ffffffff8000730d <flanterm_fb_init+0x144d>
ffffffff800072f8:	48 83 bd a0 00 00 00 	cmpq   $0x1,0xa0(%rbp)
ffffffff800072ff:	01 
ffffffff80007300:	48 c7 c0 c0 5a 00 80 	mov    $0xffffffff80005ac0,%rax
ffffffff80007307:	0f 84 9c f4 ff ff    	je     ffffffff800067a9 <flanterm_fb_init+0x8e9>
ffffffff8000730d:	48 c7 c0 90 5c 00 80 	mov    $0xffffffff80005c90,%rax
ffffffff80007314:	e9 90 f4 ff ff       	jmp    ffffffff800067a9 <flanterm_fb_init+0x8e9>
        bump_alloc_ptr = 0;
ffffffff80007319:	48 c7 05 e4 6f 02 00 	movq   $0x0,0x26fe4(%rip)        # ffffffff8002e308 <bump_alloc_ptr>
ffffffff80007320:	00 00 00 00 
        return NULL;
ffffffff80007324:	e9 67 f6 ff ff       	jmp    ffffffff80006990 <flanterm_fb_init+0xad0>
ffffffff80007329:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff80007330 <_ZN3Hal4ACPI12TestChecksumEPNS0_15CommonSDTHeaderE>:
    }

    bool ACPI::TestChecksum(ACPI::CommonSDTHeader* header) {
        std::uint8_t sum = 0;

        for (std::size_t i = 0; i < header->Length; i++) {
ffffffff80007330:	8b 57 04             	mov    0x4(%rdi),%edx
ffffffff80007333:	85 d2                	test   %edx,%edx
ffffffff80007335:	74 21                	je     ffffffff80007358 <_ZN3Hal4ACPI12TestChecksumEPNS0_15CommonSDTHeaderE+0x28>
ffffffff80007337:	48 01 fa             	add    %rdi,%rdx
        std::uint8_t sum = 0;
ffffffff8000733a:	31 c0                	xor    %eax,%eax
ffffffff8000733c:	0f 1f 40 00          	nopl   0x0(%rax)
            sum += ((char*)header)[i];
ffffffff80007340:	02 07                	add    (%rdi),%al
        for (std::size_t i = 0; i < header->Length; i++) {
ffffffff80007342:	48 83 c7 01          	add    $0x1,%rdi
ffffffff80007346:	48 39 fa             	cmp    %rdi,%rdx
ffffffff80007349:	75 f5                	jne    ffffffff80007340 <_ZN3Hal4ACPI12TestChecksumEPNS0_15CommonSDTHeaderE+0x10>
        }

        return sum == 0;
ffffffff8000734b:	84 c0                	test   %al,%al
ffffffff8000734d:	0f 94 c0             	sete   %al
ffffffff80007350:	c3                   	ret
ffffffff80007351:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        for (std::size_t i = 0; i < header->Length; i++) {
ffffffff80007358:	b8 01 00 00 00       	mov    $0x1,%eax
    }
ffffffff8000735d:	c3                   	ret
ffffffff8000735e:	66 90                	xchg   %ax,%ax

ffffffff80007360 <_ZN3Hal4ACPI4XSDP8GetOEMIDEv>:

    const char* ACPI::XSDP::GetOEMID() {
ffffffff80007360:	55                   	push   %rbp
ffffffff80007361:	48 89 e5             	mov    %rsp,%rbp
ffffffff80007364:	41 54                	push   %r12
ffffffff80007366:	53                   	push   %rbx
        kcp::cstringstream oemIdStream{};
ffffffff80007367:	4c 8d 65 d8          	lea    -0x28(%rbp),%r12
    const char* ACPI::XSDP::GetOEMID() {
ffffffff8000736b:	48 89 fb             	mov    %rdi,%rbx
        kcp::cstringstream oemIdStream{};
ffffffff8000736e:	4c 89 e7             	mov    %r12,%rdi
    const char* ACPI::XSDP::GetOEMID() {
ffffffff80007371:	48 83 ec 20          	sub    $0x20,%rsp
        kcp::cstringstream oemIdStream{};
ffffffff80007375:	e8 66 4d 00 00       	call   ffffffff8000c0e0 <_ZN3kcp13cstringstreamC1Ev>

        oemIdStream << this->OEMID[0]
ffffffff8000737a:	0f be 73 09          	movsbl 0x9(%rbx),%esi
ffffffff8000737e:	4c 89 e7             	mov    %r12,%rdi
ffffffff80007381:	e8 9a 4d 00 00       	call   ffffffff8000c120 <_ZN3kcp13cstringstreamlsEc>
                    << this->OEMID[1]
ffffffff80007386:	0f be 73 0a          	movsbl 0xa(%rbx),%esi
        oemIdStream << this->OEMID[0]
ffffffff8000738a:	48 89 c7             	mov    %rax,%rdi
                    << this->OEMID[1]
ffffffff8000738d:	e8 8e 4d 00 00       	call   ffffffff8000c120 <_ZN3kcp13cstringstreamlsEc>
                    << this->OEMID[2]
ffffffff80007392:	0f be 73 0b          	movsbl 0xb(%rbx),%esi
                    << this->OEMID[1]
ffffffff80007396:	48 89 c7             	mov    %rax,%rdi
                    << this->OEMID[2]
ffffffff80007399:	e8 82 4d 00 00       	call   ffffffff8000c120 <_ZN3kcp13cstringstreamlsEc>
                    << this->OEMID[3]
ffffffff8000739e:	0f be 73 0c          	movsbl 0xc(%rbx),%esi
                    << this->OEMID[2]
ffffffff800073a2:	48 89 c7             	mov    %rax,%rdi
                    << this->OEMID[3]
ffffffff800073a5:	e8 76 4d 00 00       	call   ffffffff8000c120 <_ZN3kcp13cstringstreamlsEc>
                    << this->OEMID[4]
ffffffff800073aa:	0f be 73 0d          	movsbl 0xd(%rbx),%esi
                    << this->OEMID[3]
ffffffff800073ae:	48 89 c7             	mov    %rax,%rdi
                    << this->OEMID[4]
ffffffff800073b1:	e8 6a 4d 00 00       	call   ffffffff8000c120 <_ZN3kcp13cstringstreamlsEc>
                    << this->OEMID[5];
ffffffff800073b6:	0f be 73 0e          	movsbl 0xe(%rbx),%esi
                    << this->OEMID[4]
ffffffff800073ba:	48 89 c7             	mov    %rax,%rdi
                    << this->OEMID[5];
ffffffff800073bd:	e8 5e 4d 00 00       	call   ffffffff8000c120 <_ZN3kcp13cstringstreamlsEc>

        return oemIdStream.c_str();
ffffffff800073c2:	4c 89 e7             	mov    %r12,%rdi
ffffffff800073c5:	e8 96 4e 00 00       	call   ffffffff8000c260 <_ZN3kcp13cstringstream5c_strEv>
    }
ffffffff800073ca:	4c 89 e7             	mov    %r12,%rdi
        return oemIdStream.c_str();
ffffffff800073cd:	48 89 c3             	mov    %rax,%rbx
    }
ffffffff800073d0:	e8 2b 4d 00 00       	call   ffffffff8000c100 <_ZN3kcp13cstringstreamD1Ev>
ffffffff800073d5:	48 83 c4 20          	add    $0x20,%rsp
ffffffff800073d9:	48 89 d8             	mov    %rbx,%rax
ffffffff800073dc:	5b                   	pop    %rbx
ffffffff800073dd:	41 5c                	pop    %r12
ffffffff800073df:	5d                   	pop    %rbp
ffffffff800073e0:	c3                   	ret
ffffffff800073e1:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800073e8:	00 00 00 
ffffffff800073eb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff800073f0 <_ZN3Hal4ACPI10HandleRSDTEPNS0_15CommonSDTHeaderE>:

        kcp::vector<CommonSDTHeader*> discoveredTables{};
        auto currentTable = sdtHeader;
    }

    void ACPI::HandleRSDT(CommonSDTHeader* sdtHeader) {
ffffffff800073f0:	55                   	push   %rbp
        base streamBaseType = base::dec;

        // C++ streaming operator like cout
        friend KernelOutStream &operator<<(KernelOutStream &t, const char *string)
        {
            Print(string);
ffffffff800073f1:	48 c7 c7 80 a0 02 80 	mov    $0xffffffff8002a080,%rdi
                    return "UNKNOWN";
            }
        }

        KernelLogStream(KernelLogLevel level, const char* desiredComponentName) { /* level for potential future rich event logging */
            g_kernelLogDepth++;
ffffffff800073f8:	83 05 a5 80 1d 00 01 	addl   $0x1,0x1d80a5(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800073ff:	48 89 e5             	mov    %rsp,%rbp
            Print(string);
ffffffff80007402:	e8 b9 bd 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007407:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000740e:	e8 ad bd 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007413:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000741a:	e8 a1 bd 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000741f:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80007426:	e8 95 bd 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000742b:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80007432:	e8 89 bd 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007437:	48 c7 c7 9b a0 02 80 	mov    $0xffffffff8002a09b,%rdi
ffffffff8000743e:	e8 7d bd 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007443:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000744a:	e8 71 bd 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            localStream << componentName << ": " << "[" << LogLevelToStringWithColor(level) << "] ";
        }

        ~KernelLogStream() {
            localStream << newline;
            g_kernelLogDepth--;
ffffffff8000744f:	83 2d 4e 80 1d 00 01 	subl   $0x1,0x1d804e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        KernelLogStream(ERROR, "ACPI") << "Unimplemented - HandleRSDT";
    }
ffffffff80007456:	5d                   	pop    %rbp
ffffffff80007457:	c3                   	ret
ffffffff80007458:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000745f:	00 

ffffffff80007460 <_ZN3Hal4ACPIC1EPNS0_4XSDPE>:

    ACPI::ACPI(XSDP* xsdp) {
ffffffff80007460:	55                   	push   %rbp
ffffffff80007461:	48 89 e5             	mov    %rsp,%rbp
ffffffff80007464:	41 54                	push   %r12
ffffffff80007466:	49 89 fc             	mov    %rdi,%r12
ffffffff80007469:	53                   	push   %rbx
        for (std::size_t i = 0; i < this->Length; i++) {
ffffffff8000746a:	8b 4e 14             	mov    0x14(%rsi),%ecx
    ACPI::ACPI(XSDP* xsdp) {
ffffffff8000746d:	48 89 f3             	mov    %rsi,%rbx
ffffffff80007470:	48 c7 07 00 00 00 00 	movq   $0x0,(%rdi)
        for (std::size_t i = 0; i < this->Length; i++) {
ffffffff80007477:	85 c9                	test   %ecx,%ecx
ffffffff80007479:	74 28                	je     ffffffff800074a3 <_ZN3Hal4ACPIC1EPNS0_4XSDPE+0x43>
ffffffff8000747b:	48 89 f0             	mov    %rsi,%rax
ffffffff8000747e:	48 01 f1             	add    %rsi,%rcx
        std::uint8_t sum = 0;
ffffffff80007481:	31 d2                	xor    %edx,%edx
ffffffff80007483:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000748a:	00 00 00 00 
ffffffff8000748e:	66 90                	xchg   %ax,%ax
            sum += ((char*)this)[i];
ffffffff80007490:	02 10                	add    (%rax),%dl
        for (std::size_t i = 0; i < this->Length; i++) {
ffffffff80007492:	48 83 c0 01          	add    $0x1,%rax
ffffffff80007496:	48 39 c8             	cmp    %rcx,%rax
ffffffff80007499:	75 f5                	jne    ffffffff80007490 <_ZN3Hal4ACPIC1EPNS0_4XSDPE+0x30>
        if (xsdp->TestChecksum() != true) {
ffffffff8000749b:	84 d2                	test   %dl,%dl
ffffffff8000749d:	0f 85 55 01 00 00    	jne    ffffffff800075f8 <_ZN3Hal4ACPIC1EPNS0_4XSDPE+0x198>
            Print(string);
ffffffff800074a3:	48 c7 c7 80 a0 02 80 	mov    $0xffffffff8002a080,%rdi
            g_kernelLogDepth++;
ffffffff800074aa:	83 05 f3 7f 1d 00 01 	addl   $0x1,0x1d7ff3(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800074b1:	e8 0a bd 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800074b6:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800074bd:	e8 fe bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800074c2:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800074c9:	e8 f2 bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800074ce:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff800074d5:	e8 e6 bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800074da:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800074e1:	e8 da bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800074e6:	48 c7 c7 e0 a0 02 80 	mov    $0xffffffff8002a0e0,%rdi
ffffffff800074ed:	e8 ce bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800074f2:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800074f9:	e8 c2 bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800074fe:	48 c7 c7 80 a0 02 80 	mov    $0xffffffff8002a080,%rdi
ffffffff80007505:	e8 b6 bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000750a:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80007511:	e8 aa bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007516:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000751d:	e8 9e bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007522:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff80007529:	e8 92 bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000752e:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80007535:	e8 86 bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000753a:	48 c7 c7 08 a1 02 80 	mov    $0xffffffff8002a108,%rdi
ffffffff80007541:	e8 7a bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        }

        KernelLogStream(OK, "ACPI") << "Checksum passed for SDT";


        KernelLogStream(INFO, "ACPI") << "OEM ID: " << xsdp->GetOEMID();
ffffffff80007546:	48 89 df             	mov    %rbx,%rdi
ffffffff80007549:	e8 12 fe ff ff       	call   ffffffff80007360 <_ZN3Hal4ACPI4XSDP8GetOEMIDEv>
ffffffff8000754e:	48 89 c7             	mov    %rax,%rdi
ffffffff80007551:	e8 6a bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007556:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000755d:	e8 5e bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007562:	48 c7 c7 80 a0 02 80 	mov    $0xffffffff8002a080,%rdi
ffffffff80007569:	e8 52 bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000756e:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80007575:	e8 46 bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000757a:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80007581:	e8 3a bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007586:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000758d:	e8 2e bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007592:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80007599:	e8 22 bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000759e:	48 c7 c7 11 a1 02 80 	mov    $0xffffffff8002a111,%rdi
ffffffff800075a5:	e8 16 bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        }

        template<typename T>
        KernelLogStream &operator<<(T item) {
            localStream << item;
ffffffff800075aa:	0f b6 7b 0f          	movzbl 0xf(%rbx),%edi
            Print(Lib::int2basestr(number, t.streamBaseType));
ffffffff800075ae:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800075b3:	e8 c8 2d 01 00       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
ffffffff800075b8:	48 89 c7             	mov    %rax,%rdi
ffffffff800075bb:	e8 00 bc 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800075c0:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800075c7:	e8 f4 bb 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff800075cc:	83 2d d1 7e 1d 00 01 	subl   $0x1,0x1d7ed1(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        KernelLogStream(INFO, "ACPI") << "ACPI version: " << xsdp->Revision;

        std::uint64_t nextTableAddress;
        
        if (xsdp->Revision >= 2) {
ffffffff800075d3:	80 7b 0f 01          	cmpb   $0x1,0xf(%rbx)

namespace Memory {
    extern std::uint64_t HHDMBase;

    inline uint64_t HHDM(uint64_t address) {
        return HHDMBase + address;
ffffffff800075d7:	48 8b 05 ca 53 14 00 	mov    0x1453ca(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff800075de:	0f 86 7c 00 00 00    	jbe    ffffffff80007660 <_ZN3Hal4ACPIC1EPNS0_4XSDPE+0x200>
ffffffff800075e4:	48 03 43 18          	add    0x18(%rbx),%rax
            nextTableAddress = xsdp->XSDTAddress;
            m_xsdt = (CommonSDTHeader*)Memory::HHDM(nextTableAddress);
ffffffff800075e8:	49 89 04 24          	mov    %rax,(%r12)
        else
        {
            nextTableAddress = xsdp->RSDTAddress;
            HandleRSDT((CommonSDTHeader*)Memory::HHDM(nextTableAddress));
        }
    }
ffffffff800075ec:	5b                   	pop    %rbx
ffffffff800075ed:	41 5c                	pop    %r12
ffffffff800075ef:	5d                   	pop    %rbp
ffffffff800075f0:	c3                   	ret
ffffffff800075f1:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            Print(string);
ffffffff800075f8:	48 c7 c7 80 a0 02 80 	mov    $0xffffffff8002a080,%rdi
            g_kernelLogDepth++;
ffffffff800075ff:	83 05 9e 7e 1d 00 01 	addl   $0x1,0x1d7e9e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80007606:	e8 b5 bb 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000760b:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80007612:	e8 a9 bb 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007617:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000761e:	e8 9d bb 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007623:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff8000762a:	e8 91 bb 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000762f:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80007636:	e8 85 bb 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000763b:	48 c7 c7 b9 a0 02 80 	mov    $0xffffffff8002a0b9,%rdi
ffffffff80007642:	e8 79 bb 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007647:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000764e:	e8 6d bb 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007653:	5b                   	pop    %rbx
            g_kernelLogDepth--;
ffffffff80007654:	83 2d 49 7e 1d 00 01 	subl   $0x1,0x1d7e49(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000765b:	41 5c                	pop    %r12
ffffffff8000765d:	5d                   	pop    %rbp
ffffffff8000765e:	c3                   	ret
ffffffff8000765f:	90                   	nop
            nextTableAddress = xsdp->RSDTAddress;
ffffffff80007660:	8b 73 10             	mov    0x10(%rbx),%esi
            HandleRSDT((CommonSDTHeader*)Memory::HHDM(nextTableAddress));
ffffffff80007663:	4c 89 e7             	mov    %r12,%rdi
    }
ffffffff80007666:	5b                   	pop    %rbx
ffffffff80007667:	41 5c                	pop    %r12
ffffffff80007669:	5d                   	pop    %rbp
ffffffff8000766a:	48 01 c6             	add    %rax,%rsi
            HandleRSDT((CommonSDTHeader*)Memory::HHDM(nextTableAddress));
ffffffff8000766d:	e9 7e fd ff ff       	jmp    ffffffff800073f0 <_ZN3Hal4ACPI10HandleRSDTEPNS0_15CommonSDTHeaderE>
ffffffff80007672:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80007679:	00 00 00 
ffffffff8000767c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff80007680 <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE>:
            }

            return nullptr;
        }

        bool Parse(ACPI::CommonSDTHeader* xsdt, ParsedMADT& result) {
ffffffff80007680:	55                   	push   %rbp
ffffffff80007681:	48 89 e5             	mov    %rsp,%rbp
ffffffff80007684:	41 57                	push   %r15
ffffffff80007686:	41 56                	push   %r14
ffffffff80007688:	41 55                	push   %r13
ffffffff8000768a:	41 54                	push   %r12
ffffffff8000768c:	53                   	push   %rbx
ffffffff8000768d:	48 83 ec 18          	sub    $0x18,%rsp
            uint32_t entryCount = (xsdt->Length - sizeof(ACPI::CommonSDTHeader)) / 8;
ffffffff80007691:	8b 47 04             	mov    0x4(%rdi),%eax
ffffffff80007694:	48 83 e8 24          	sub    $0x24,%rax
ffffffff80007698:	48 c1 e8 03          	shr    $0x3,%rax
            for (uint32_t i = 0; i < entryCount; i++) {
ffffffff8000769c:	85 c0                	test   %eax,%eax
ffffffff8000769e:	0f 84 29 03 00 00    	je     ffffffff800079cd <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE+0x34d>
ffffffff800076a4:	49 89 f4             	mov    %rsi,%r12
ffffffff800076a7:	83 e8 01             	sub    $0x1,%eax
ffffffff800076aa:	48 8b 35 f7 52 14 00 	mov    0x1452f7(%rip),%rsi        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff800076b1:	48 8d 4f 24          	lea    0x24(%rdi),%rcx
ffffffff800076b5:	48 8d 7c c7 2c       	lea    0x2c(%rdi,%rax,8),%rdi
ffffffff800076ba:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff800076c0:	4c 8b 29             	mov    (%rcx),%r13
ffffffff800076c3:	48 c7 c0 23 a3 02 80 	mov    $0xffffffff8002a323,%rax
ffffffff800076ca:	49 01 f5             	add    %rsi,%r13
                if (sig[i] != target[i]) return false;
ffffffff800076cd:	4c 89 ea             	mov    %r13,%rdx
ffffffff800076d0:	48 29 c2             	sub    %rax,%rdx
ffffffff800076d3:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800076da:	00 00 00 00 
ffffffff800076de:	66 90                	xchg   %ax,%ax
ffffffff800076e0:	0f b6 18             	movzbl (%rax),%ebx
ffffffff800076e3:	38 1c 02             	cmp    %bl,(%rdx,%rax,1)
ffffffff800076e6:	0f 85 d4 02 00 00    	jne    ffffffff800079c0 <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE+0x340>
            for (int i = 0; i < len; i++) {
ffffffff800076ec:	48 83 c0 01          	add    $0x1,%rax
ffffffff800076f0:	48 3d 27 a3 02 80    	cmp    $0xffffffff8002a327,%rax
ffffffff800076f6:	75 e8                	jne    ffffffff800076e0 <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE+0x60>
            auto* madtHeader = FindMADTInXSDT(xsdt);
            if (madtHeader == nullptr) {
ffffffff800076f8:	4d 85 ed             	test   %r13,%r13
ffffffff800076fb:	0f 84 cc 02 00 00    	je     ffffffff800079cd <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE+0x34d>
                KernelLogStream(ERROR, "MADT") << "MADT table not found in XSDT";
                return false;
            }

            if (!ACPI::TestChecksum(madtHeader)) {
ffffffff80007701:	4c 89 ef             	mov    %r13,%rdi
ffffffff80007704:	e8 27 fc ff ff       	call   ffffffff80007330 <_ZN3Hal4ACPI12TestChecksumEPNS0_15CommonSDTHeaderE>
            Print(string);
ffffffff80007709:	48 c7 c7 93 b7 02 80 	mov    $0xffffffff8002b793,%rdi
ffffffff80007710:	88 45 cf             	mov    %al,-0x31(%rbp)
ffffffff80007713:	89 c6                	mov    %eax,%esi
            g_kernelLogDepth++;
ffffffff80007715:	8b 05 89 7d 1d 00    	mov    0x1d7d89(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000771b:	83 c0 01             	add    $0x1,%eax
ffffffff8000771e:	89 05 80 7d 1d 00    	mov    %eax,0x1d7d80(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80007724:	40 84 f6             	test   %sil,%sil
ffffffff80007727:	0f 84 4c 06 00 00    	je     ffffffff80007d79 <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE+0x6f9>
            Print(string);
ffffffff8000772d:	e8 8e ba 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007732:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80007739:	e8 82 ba 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000773e:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80007745:	e8 76 ba 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000774a:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80007751:	e8 6a ba 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007756:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000775d:	e8 5e ba 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007762:	48 c7 c7 52 a1 02 80 	mov    $0xffffffff8002a152,%rdi
ffffffff80007769:	e8 52 ba 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000776e:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80007775:	e8 46 ba 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            }

            KernelLogStream(OK, "MADT") << "Found MADT table";

            auto* madt = (Header*)madtHeader;
            result.LocalApicAddress = madt->LocalApicAddress;
ffffffff8000777a:	41 8b 45 24          	mov    0x24(%r13),%eax
            result.OverrideCount = 0;
            result.LocalApicCount = 0;
            result.IoApicAddress = 0;
            result.IoApicId = 0;
ffffffff8000777e:	41 c6 44 24 10 00    	movb   $0x0,0x10(%r12)
ffffffff80007784:	48 c7 c7 93 b7 02 80 	mov    $0xffffffff8002b793,%rdi
            result.OverrideCount = 0;
ffffffff8000778b:	41 c7 84 24 b8 00 00 	movl   $0x0,0xb8(%r12)
ffffffff80007792:	00 00 00 00 00 
            result.LocalApicAddress = madt->LocalApicAddress;
ffffffff80007797:	49 89 04 24          	mov    %rax,(%r12)
            result.LocalApicCount = 0;
ffffffff8000779b:	41 c7 84 24 bc 02 00 	movl   $0x0,0x2bc(%r12)
ffffffff800077a2:	00 00 00 00 00 
            result.IoApicAddress = 0;
ffffffff800077a7:	49 c7 44 24 08 00 00 	movq   $0x0,0x8(%r12)
ffffffff800077ae:	00 00 
            result.IoApicGsiBase = 0;
ffffffff800077b0:	41 c7 44 24 14 00 00 	movl   $0x0,0x14(%r12)
ffffffff800077b7:	00 00 
ffffffff800077b9:	e8 02 ba 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800077be:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800077c5:	e8 f6 b9 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800077ca:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800077d1:	e8 ea b9 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800077d6:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff800077dd:	e8 de b9 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800077e2:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800077e9:	e8 d2 b9 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800077ee:	48 c7 c7 63 a1 02 80 	mov    $0xffffffff8002a163,%rdi
ffffffff800077f5:	e8 c6 b9 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800077fa:	49 8b 3c 24          	mov    (%r12),%rdi
ffffffff800077fe:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80007803:	e8 88 2c 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80007808:	48 89 c7             	mov    %rax,%rdi
ffffffff8000780b:	e8 b0 b9 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80007810:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80007817:	e8 a4 b9 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000781c:	8b 15 82 7c 1d 00    	mov    0x1d7c82(%rip),%edx        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

            KernelLogStream(INFO, "MADT") << "Local APIC address: " << base::hex << (uint64_t)result.LocalApicAddress;

            uint32_t offset = sizeof(Header);
            uint32_t length = madt->SDTHeader.Length;
ffffffff80007822:	45 8b 75 04          	mov    0x4(%r13),%r14d
ffffffff80007826:	8d 42 ff             	lea    -0x1(%rdx),%eax
ffffffff80007829:	89 05 75 7c 1d 00    	mov    %eax,0x1d7c75(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

            while (offset < length) {
ffffffff8000782f:	41 83 fe 2c          	cmp    $0x2c,%r14d
ffffffff80007833:	0f 86 bf 00 00 00    	jbe    ffffffff800078f8 <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE+0x278>
            uint32_t offset = sizeof(Header);
ffffffff80007839:	41 bf 2c 00 00 00    	mov    $0x2c,%r15d
ffffffff8000783f:	90                   	nop
                auto* entry = (EntryHeader*)((uint64_t)madt + offset);
ffffffff80007840:	44 89 fb             	mov    %r15d,%ebx
            g_kernelLogDepth++;
ffffffff80007843:	83 c0 01             	add    $0x1,%eax
ffffffff80007846:	4c 01 eb             	add    %r13,%rbx

                switch (entry->Type) {
ffffffff80007849:	80 3b 05             	cmpb   $0x5,(%rbx)
ffffffff8000784c:	0f 87 d1 04 00 00    	ja     ffffffff80007d23 <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE+0x6a3>
ffffffff80007852:	0f b6 13             	movzbl (%rbx),%edx
ffffffff80007855:	ff 24 d5 e0 c1 02 80 	jmp    *-0x7ffd3e20(,%rdx,8)
                        break;
                    }

                    case 5: { // Local APIC Address Override
                        auto* override = (LocalApicAddressOverride*)entry;
                        result.LocalApicAddress = override->LocalApicAddress;
ffffffff8000785c:	48 8b 53 04          	mov    0x4(%rbx),%rdx
            Print(string);
ffffffff80007860:	48 c7 c7 93 b7 02 80 	mov    $0xffffffff8002b793,%rdi
            g_kernelLogDepth++;
ffffffff80007867:	89 05 37 7c 1d 00    	mov    %eax,0x1d7c37(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000786d:	49 89 14 24          	mov    %rdx,(%r12)
            Print(string);
ffffffff80007871:	e8 4a b9 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007876:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000787d:	e8 3e b9 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007882:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80007889:	e8 32 b9 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000788e:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff80007895:	e8 26 b9 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000789a:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800078a1:	e8 1a b9 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800078a6:	48 c7 c7 02 a2 02 80 	mov    $0xffffffff8002a202,%rdi
ffffffff800078ad:	e8 0e b9 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800078b2:	49 8b 3c 24          	mov    (%r12),%rdi
ffffffff800078b6:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff800078bb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff800078c0:	e8 cb 2b 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800078c5:	48 89 c7             	mov    %rax,%rdi
ffffffff800078c8:	e8 f3 b8 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800078cd:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800078d4:	e8 e7 b8 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff800078d9:	8b 15 c5 7b 1d 00    	mov    0x1d7bc5(%rip),%edx        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800078df:	8d 42 ff             	lea    -0x1(%rdx),%eax
ffffffff800078e2:	89 05 bc 7b 1d 00    	mov    %eax,0x1d7bbc(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
                    default:
                        KernelLogStream(DEBUG, "MADT") << "Unknown MADT entry type: " << (uint64_t)entry->Type;
                        break;
                }

                offset += entry->Length;
ffffffff800078e8:	0f b6 4b 01          	movzbl 0x1(%rbx),%ecx
ffffffff800078ec:	41 01 cf             	add    %ecx,%r15d
            while (offset < length) {
ffffffff800078ef:	45 39 f7             	cmp    %r14d,%r15d
ffffffff800078f2:	0f 82 48 ff ff ff    	jb     ffffffff80007840 <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE+0x1c0>
            Print(string);
ffffffff800078f8:	48 c7 c7 93 b7 02 80 	mov    $0xffffffff8002b793,%rdi
            g_kernelLogDepth++;
ffffffff800078ff:	89 15 9f 7b 1d 00    	mov    %edx,0x1d7b9f(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80007905:	e8 b6 b8 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000790a:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80007911:	e8 aa b8 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007916:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000791d:	e8 9e b8 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007922:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80007929:	e8 92 b8 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000792e:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80007935:	e8 86 b8 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000793a:	48 c7 c7 3a a2 02 80 	mov    $0xffffffff8002a23a,%rdi
ffffffff80007941:	e8 7a b8 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            }

            KernelLogStream(OK, "MADT") << "Parsed " << base::dec
                << (uint64_t)result.LocalApicCount << " local APICs, "
ffffffff80007946:	49 63 bc 24 bc 02 00 	movslq 0x2bc(%r12),%rdi
ffffffff8000794d:	00 
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000794e:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80007953:	e8 38 2b 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80007958:	48 89 c7             	mov    %rax,%rdi
ffffffff8000795b:	e8 60 b8 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80007960:	48 c7 c7 42 a2 02 80 	mov    $0xffffffff8002a242,%rdi
ffffffff80007967:	e8 54 b8 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << (uint64_t)result.OverrideCount << " overrides";
ffffffff8000796c:	49 63 bc 24 b8 00 00 	movslq 0xb8(%r12),%rdi
ffffffff80007973:	00 
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80007974:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80007979:	e8 12 2b 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000797e:	48 89 c7             	mov    %rax,%rdi
ffffffff80007981:	e8 3a b8 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80007986:	48 c7 c7 51 a2 02 80 	mov    $0xffffffff8002a251,%rdi
ffffffff8000798d:	e8 2e b8 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007992:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80007999:	e8 22 b8 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000799e:	8b 05 00 7b 1d 00    	mov    0x1d7b00(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800079a4:	83 e8 01             	sub    $0x1,%eax
ffffffff800079a7:	89 05 f7 7a 1d 00    	mov    %eax,0x1d7af7(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

            return true;
        }
ffffffff800079ad:	0f b6 45 cf          	movzbl -0x31(%rbp),%eax
ffffffff800079b1:	48 83 c4 18          	add    $0x18,%rsp
ffffffff800079b5:	5b                   	pop    %rbx
ffffffff800079b6:	41 5c                	pop    %r12
ffffffff800079b8:	41 5d                	pop    %r13
ffffffff800079ba:	41 5e                	pop    %r14
ffffffff800079bc:	41 5f                	pop    %r15
ffffffff800079be:	5d                   	pop    %rbp
ffffffff800079bf:	c3                   	ret
            for (uint32_t i = 0; i < entryCount; i++) {
ffffffff800079c0:	48 83 c1 08          	add    $0x8,%rcx
ffffffff800079c4:	48 39 cf             	cmp    %rcx,%rdi
ffffffff800079c7:	0f 85 f3 fc ff ff    	jne    ffffffff800076c0 <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE+0x40>
            Print(string);
ffffffff800079cd:	48 c7 c7 93 b7 02 80 	mov    $0xffffffff8002b793,%rdi
            g_kernelLogDepth++;
ffffffff800079d4:	83 05 c9 7a 1d 00 01 	addl   $0x1,0x1d7ac9(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800079db:	e8 e0 b7 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800079e0:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800079e7:	e8 d4 b7 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800079ec:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800079f3:	e8 c8 b7 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800079f8:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff800079ff:	e8 bc b7 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007a04:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80007a0b:	e8 b0 b7 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007a10:	48 c7 c7 20 a1 02 80 	mov    $0xffffffff8002a120,%rdi
ffffffff80007a17:	e8 a4 b7 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007a1c:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80007a23:	e8 98 b7 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80007a28:	8b 05 76 7a 1d 00    	mov    0x1d7a76(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
                return false;
ffffffff80007a2e:	c6 45 cf 00          	movb   $0x0,-0x31(%rbp)
ffffffff80007a32:	83 e8 01             	sub    $0x1,%eax
ffffffff80007a35:	e9 6d ff ff ff       	jmp    ffffffff800079a7 <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE+0x327>
            Print(string);
ffffffff80007a3a:	48 c7 c7 93 b7 02 80 	mov    $0xffffffff8002b793,%rdi
            g_kernelLogDepth++;
ffffffff80007a41:	89 05 5d 7a 1d 00    	mov    %eax,0x1d7a5d(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80007a47:	e8 74 b7 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007a4c:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80007a53:	e8 68 b7 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007a58:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80007a5f:	e8 5c b7 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007a64:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff80007a6b:	e8 50 b7 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007a70:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80007a77:	e8 44 b7 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007a7c:	48 c7 c7 eb a1 02 80 	mov    $0xffffffff8002a1eb,%rdi
ffffffff80007a83:	e8 38 b7 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                        KernelLogStream(DEBUG, "MADT") << "NMI: processor=" << (uint64_t)nmi->ProcessorId
ffffffff80007a88:	0f b6 7b 02          	movzbl 0x2(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80007a8c:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80007a91:	e8 fa 29 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80007a96:	48 89 c7             	mov    %rax,%rdi
ffffffff80007a99:	e8 22 b7 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80007a9e:	48 c7 c7 fb a1 02 80 	mov    $0xffffffff8002a1fb,%rdi
ffffffff80007aa5:	e8 16 b7 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                            << " lint=" << (uint64_t)nmi->Lint;
ffffffff80007aaa:	0f b6 7b 05          	movzbl 0x5(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80007aae:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80007ab3:	e9 08 fe ff ff       	jmp    ffffffff800078c0 <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE+0x240>
                        if (result.OverrideCount < ParsedMADT::MaxOverrides) {
ffffffff80007ab8:	41 8b 94 24 b8 00 00 	mov    0xb8(%r12),%edx
ffffffff80007abf:	00 
ffffffff80007ac0:	83 fa 0f             	cmp    $0xf,%edx
ffffffff80007ac3:	7f 26                	jg     ffffffff80007aeb <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE+0x46b>
                            result.Overrides[result.OverrideCount] = *iso;
ffffffff80007ac5:	48 63 ca             	movslq %edx,%rcx
ffffffff80007ac8:	48 8b 33             	mov    (%rbx),%rsi
                            result.OverrideCount++;
ffffffff80007acb:	83 c2 01             	add    $0x1,%edx
                            result.Overrides[result.OverrideCount] = *iso;
ffffffff80007ace:	48 8d 0c 89          	lea    (%rcx,%rcx,4),%rcx
ffffffff80007ad2:	49 8d 4c 4c 10       	lea    0x10(%r12,%rcx,2),%rcx
ffffffff80007ad7:	48 89 71 08          	mov    %rsi,0x8(%rcx)
ffffffff80007adb:	0f b7 73 08          	movzwl 0x8(%rbx),%esi
ffffffff80007adf:	66 89 71 10          	mov    %si,0x10(%rcx)
                            result.OverrideCount++;
ffffffff80007ae3:	41 89 94 24 b8 00 00 	mov    %edx,0xb8(%r12)
ffffffff80007aea:	00 
            Print(string);
ffffffff80007aeb:	48 c7 c7 93 b7 02 80 	mov    $0xffffffff8002b793,%rdi
            g_kernelLogDepth++;
ffffffff80007af2:	89 05 ac 79 1d 00    	mov    %eax,0x1d79ac(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80007af8:	e8 c3 b6 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007afd:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80007b04:	e8 b7 b6 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007b09:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80007b10:	e8 ab b6 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007b15:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff80007b1c:	e8 9f b6 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007b21:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80007b28:	e8 93 b6 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007b2d:	48 c7 c7 c9 a1 02 80 	mov    $0xffffffff8002a1c9,%rdi
ffffffff80007b34:	e8 87 b6 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                        KernelLogStream(DEBUG, "MADT") << "IRQ Override: bus=" << (uint64_t)iso->BusSource
ffffffff80007b39:	0f b6 7b 02          	movzbl 0x2(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80007b3d:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80007b42:	e8 49 29 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80007b47:	48 89 c7             	mov    %rax,%rdi
ffffffff80007b4a:	e8 71 b6 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80007b4f:	48 c7 c7 dc a1 02 80 	mov    $0xffffffff8002a1dc,%rdi
ffffffff80007b56:	e8 65 b6 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                            << " irq=" << (uint64_t)iso->IrqSource
ffffffff80007b5b:	0f b6 7b 03          	movzbl 0x3(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80007b5f:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80007b64:	e8 27 29 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80007b69:	48 89 c7             	mov    %rax,%rdi
ffffffff80007b6c:	e8 4f b6 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80007b71:	48 c7 c7 e2 a1 02 80 	mov    $0xffffffff8002a1e2,%rdi
ffffffff80007b78:	e8 43 b6 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                            << " -> GSI " << (uint64_t)iso->GlobalSystemInterrupt
ffffffff80007b7d:	8b 7b 04             	mov    0x4(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80007b80:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80007b85:	e8 06 29 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80007b8a:	48 89 c7             	mov    %rax,%rdi
ffffffff80007b8d:	e8 2e b6 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80007b92:	48 c7 c7 a0 a1 02 80 	mov    $0xffffffff8002a1a0,%rdi
ffffffff80007b99:	e8 22 b6 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                            << " flags=" << base::hex << (uint64_t)iso->Flags;
ffffffff80007b9e:	0f b7 7b 08          	movzwl 0x8(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80007ba2:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80007ba7:	e9 14 fd ff ff       	jmp    ffffffff800078c0 <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE+0x240>
                        result.IoApicAddress = ioapic->IoApicAddress;
ffffffff80007bac:	8b 73 04             	mov    0x4(%rbx),%esi
            Print(string);
ffffffff80007baf:	48 c7 c7 93 b7 02 80 	mov    $0xffffffff8002b793,%rdi
ffffffff80007bb6:	49 89 74 24 08       	mov    %rsi,0x8(%r12)
                        result.IoApicId = ioapic->IoApicId;
ffffffff80007bbb:	0f b6 53 02          	movzbl 0x2(%rbx),%edx
            g_kernelLogDepth++;
ffffffff80007bbf:	89 05 df 78 1d 00    	mov    %eax,0x1d78df(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80007bc5:	41 88 54 24 10       	mov    %dl,0x10(%r12)
                        result.IoApicGsiBase = ioapic->GlobalSystemInterruptBase;
ffffffff80007bca:	8b 53 08             	mov    0x8(%rbx),%edx
ffffffff80007bcd:	41 89 54 24 14       	mov    %edx,0x14(%r12)
            Print(string);
ffffffff80007bd2:	e8 e9 b5 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007bd7:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80007bde:	e8 dd b5 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007be3:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80007bea:	e8 d1 b5 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007bef:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff80007bf6:	e8 c5 b5 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007bfb:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80007c02:	e8 b9 b5 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007c07:	48 c7 c7 a8 a1 02 80 	mov    $0xffffffff8002a1a8,%rdi
ffffffff80007c0e:	e8 ad b5 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                        KernelLogStream(DEBUG, "MADT") << "IOAPIC: id=" << (uint64_t)ioapic->IoApicId
ffffffff80007c13:	0f b6 7b 02          	movzbl 0x2(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80007c17:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80007c1c:	e8 6f 28 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80007c21:	48 89 c7             	mov    %rax,%rdi
ffffffff80007c24:	e8 97 b5 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80007c29:	48 c7 c7 b4 a1 02 80 	mov    $0xffffffff8002a1b4,%rdi
ffffffff80007c30:	e8 8b b5 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                            << " address=" << base::hex << (uint64_t)ioapic->IoApicAddress
ffffffff80007c35:	8b 7b 04             	mov    0x4(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80007c38:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80007c3d:	e8 4e 28 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80007c42:	48 89 c7             	mov    %rax,%rdi
ffffffff80007c45:	e8 76 b5 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80007c4a:	48 c7 c7 be a1 02 80 	mov    $0xffffffff8002a1be,%rdi
ffffffff80007c51:	e8 6a b5 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                            << " GSI base=" << base::dec << (uint64_t)ioapic->GlobalSystemInterruptBase;
ffffffff80007c56:	8b 7b 08             	mov    0x8(%rbx),%edi
ffffffff80007c59:	e9 50 fe ff ff       	jmp    ffffffff80007aae <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE+0x42e>
                        if (result.LocalApicCount < ParsedMADT::MaxLocalApics) {
ffffffff80007c5e:	41 8b 94 24 bc 02 00 	mov    0x2bc(%r12),%edx
ffffffff80007c65:	00 
ffffffff80007c66:	83 fa 3f             	cmp    $0x3f,%edx
ffffffff80007c69:	7f 19                	jg     ffffffff80007c84 <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE+0x604>
                            result.LocalApics[result.LocalApicCount] = *lapic;
ffffffff80007c6b:	48 8b 33             	mov    (%rbx),%rsi
ffffffff80007c6e:	48 63 ca             	movslq %edx,%rcx
                            result.LocalApicCount++;
ffffffff80007c71:	83 c2 01             	add    $0x1,%edx
                            result.LocalApics[result.LocalApicCount] = *lapic;
ffffffff80007c74:	49 89 b4 cc bc 00 00 	mov    %rsi,0xbc(%r12,%rcx,8)
ffffffff80007c7b:	00 
                            result.LocalApicCount++;
ffffffff80007c7c:	41 89 94 24 bc 02 00 	mov    %edx,0x2bc(%r12)
ffffffff80007c83:	00 
ffffffff80007c84:	48 c7 c7 93 b7 02 80 	mov    $0xffffffff8002b793,%rdi
            g_kernelLogDepth++;
ffffffff80007c8b:	89 05 13 78 1d 00    	mov    %eax,0x1d7813(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80007c91:	e8 2a b5 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007c96:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80007c9d:	e8 1e b5 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007ca2:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80007ca9:	e8 12 b5 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007cae:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff80007cb5:	e8 06 b5 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007cba:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80007cc1:	e8 fa b4 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007cc6:	48 c7 c7 89 a1 02 80 	mov    $0xffffffff8002a189,%rdi
ffffffff80007ccd:	e8 ee b4 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                        KernelLogStream(DEBUG, "MADT") << "Local APIC: processor=" << (uint64_t)lapic->ProcessorId
ffffffff80007cd2:	0f b6 7b 02          	movzbl 0x2(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80007cd6:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80007cdb:	e8 b0 27 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80007ce0:	48 89 c7             	mov    %rax,%rdi
ffffffff80007ce3:	e8 d8 b4 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80007ce8:	48 c7 c7 af a1 02 80 	mov    $0xffffffff8002a1af,%rdi
ffffffff80007cef:	e8 cc b4 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                            << " id=" << (uint64_t)lapic->ApicId
ffffffff80007cf4:	0f b6 7b 03          	movzbl 0x3(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80007cf8:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80007cfd:	e8 8e 27 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80007d02:	48 89 c7             	mov    %rax,%rdi
ffffffff80007d05:	e8 b6 b4 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80007d0a:	48 c7 c7 a0 a1 02 80 	mov    $0xffffffff8002a1a0,%rdi
ffffffff80007d11:	e8 aa b4 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                            << " flags=" << base::hex << (uint64_t)lapic->Flags;
ffffffff80007d16:	8b 7b 04             	mov    0x4(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80007d19:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80007d1e:	e9 9d fb ff ff       	jmp    ffffffff800078c0 <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE+0x240>
            Print(string);
ffffffff80007d23:	48 c7 c7 93 b7 02 80 	mov    $0xffffffff8002b793,%rdi
            g_kernelLogDepth++;
ffffffff80007d2a:	89 05 74 77 1d 00    	mov    %eax,0x1d7774(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80007d30:	e8 8b b4 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007d35:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80007d3c:	e8 7f b4 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007d41:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80007d48:	e8 73 b4 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007d4d:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff80007d54:	e8 67 b4 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007d59:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80007d60:	e8 5b b4 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007d65:	48 c7 c7 20 a2 02 80 	mov    $0xffffffff8002a220,%rdi
ffffffff80007d6c:	e8 4f b4 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                        KernelLogStream(DEBUG, "MADT") << "Unknown MADT entry type: " << (uint64_t)entry->Type;
ffffffff80007d71:	0f b6 3b             	movzbl (%rbx),%edi
ffffffff80007d74:	e9 35 fd ff ff       	jmp    ffffffff80007aae <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE+0x42e>
ffffffff80007d79:	e8 42 b4 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007d7e:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80007d85:	e8 36 b4 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007d8a:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80007d91:	e8 2a b4 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007d96:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80007d9d:	e8 1e b4 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007da2:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80007da9:	e8 12 b4 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80007dae:	48 c7 c7 3d a1 02 80 	mov    $0xffffffff8002a13d,%rdi
ffffffff80007db5:	e9 d3 fb ff ff       	jmp    ffffffff8000798d <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE+0x30d>
ffffffff80007dba:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)

ffffffff80007dc0 <_ZN6ZenithL11Sys_ReadDirEPKcPS1_i>:

    static void Sys_Close(int handle) {
        Fs::Vfs::VfsClose(handle);
    }

    static int Sys_ReadDir(const char* path, const char** outNames, int maxEntries) {
ffffffff80007dc0:	55                   	push   %rbp
        // Get entries from VFS into a kernel-local array
        const char* kernelNames[64];
        int max = maxEntries;
        if (max > 64) max = 64;
ffffffff80007dc1:	b8 40 00 00 00       	mov    $0x40,%eax
    static int Sys_ReadDir(const char* path, const char** outNames, int maxEntries) {
ffffffff80007dc6:	48 89 e5             	mov    %rsp,%rbp
ffffffff80007dc9:	41 57                	push   %r15
ffffffff80007dcb:	41 56                	push   %r14
ffffffff80007dcd:	41 55                	push   %r13
        int count = Fs::Vfs::VfsReadDir(path, kernelNames, max);
ffffffff80007dcf:	4c 8d ad d0 fd ff ff 	lea    -0x230(%rbp),%r13
    static int Sys_ReadDir(const char* path, const char** outNames, int maxEntries) {
ffffffff80007dd6:	41 54                	push   %r12
ffffffff80007dd8:	53                   	push   %rbx
ffffffff80007dd9:	48 81 ec 28 02 00 00 	sub    $0x228,%rsp
        if (max > 64) max = 64;
ffffffff80007de0:	39 c2                	cmp    %eax,%edx
    static int Sys_ReadDir(const char* path, const char** outNames, int maxEntries) {
ffffffff80007de2:	48 89 b5 c8 fd ff ff 	mov    %rsi,-0x238(%rbp)
        int count = Fs::Vfs::VfsReadDir(path, kernelNames, max);
ffffffff80007de9:	4c 89 ee             	mov    %r13,%rsi
        if (max > 64) max = 64;
ffffffff80007dec:	0f 4f d0             	cmovg  %eax,%edx
        int count = Fs::Vfs::VfsReadDir(path, kernelNames, max);
ffffffff80007def:	e8 4c ff 00 00       	call   ffffffff80017d40 <_ZN2Fs3Vfs10VfsReadDirEPKcPS2_i>
ffffffff80007df4:	41 89 c7             	mov    %eax,%r15d
        if (count <= 0) return count;
ffffffff80007df7:	85 c0                	test   %eax,%eax
ffffffff80007df9:	0f 8e fe 00 00 00    	jle    ffffffff80007efd <_ZN6ZenithL11Sys_ReadDirEPKcPS1_i+0x13d>

        // Allocate a user-accessible page for string data via process heap
        auto* proc = Sched::GetCurrentProcessPtr();
ffffffff80007dff:	e8 ec a0 01 00       	call   ffffffff80021ef0 <_ZN5Sched20GetCurrentProcessPtrEv>
        if (proc == nullptr) return -1;
ffffffff80007e04:	48 85 c0             	test   %rax,%rax
ffffffff80007e07:	0f 84 12 01 00 00    	je     ffffffff80007f1f <_ZN6ZenithL11Sys_ReadDirEPKcPS1_i+0x15f>

        void* page = Memory::g_pfa->AllocateZeroed();
ffffffff80007e0d:	48 8b 3d 9c 4b 14 00 	mov    0x144b9c(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff80007e14:	48 89 85 c0 fd ff ff 	mov    %rax,-0x240(%rbp)
ffffffff80007e1b:	e8 f0 33 01 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff80007e20:	48 89 c3             	mov    %rax,%rbx
        if (page == nullptr) return -1;
ffffffff80007e23:	48 85 c0             	test   %rax,%rax
ffffffff80007e26:	0f 84 f3 00 00 00    	je     ffffffff80007f1f <_ZN6ZenithL11Sys_ReadDirEPKcPS1_i+0x15f>
        uint64_t physAddr = Memory::SubHHDM((uint64_t)page);
        uint64_t userVa = proc->heapNext;
ffffffff80007e2c:	48 8b 95 c0 fd ff ff 	mov    -0x240(%rbp),%rdx
    inline uint64_t HHDM(void* address) {
        return HHDMBase + (uint64_t)address;
    }

    inline uint64_t SubHHDM(uint64_t address) {
        return address - HHDMBase;
ffffffff80007e33:	48 2b 1d 6e 4b 14 00 	sub    0x144b6e(%rip),%rbx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        proc->heapNext += 0x1000;
        Memory::VMM::Paging::MapUserIn(proc->pml4Phys, physAddr, userVa);
ffffffff80007e3a:	48 89 de             	mov    %rbx,%rsi
        uint64_t userVa = proc->heapNext;
ffffffff80007e3d:	4c 8b b2 80 00 00 00 	mov    0x80(%rdx),%r14
        Memory::VMM::Paging::MapUserIn(proc->pml4Phys, physAddr, userVa);
ffffffff80007e44:	48 8b 7a 68          	mov    0x68(%rdx),%rdi
        proc->heapNext += 0x1000;
ffffffff80007e48:	49 8d 86 00 10 00 00 	lea    0x1000(%r14),%rax
ffffffff80007e4f:	48 89 82 80 00 00 00 	mov    %rax,0x80(%rdx)
        Memory::VMM::Paging::MapUserIn(proc->pml4Phys, physAddr, userVa);
ffffffff80007e56:	4c 89 f2             	mov    %r14,%rdx
ffffffff80007e59:	e8 02 3d 01 00       	call   ffffffff8001bb60 <_ZN6Memory3VMM6Paging9MapUserInEmmm>
        return HHDMBase + address;
ffffffff80007e5e:	49 63 c7             	movslq %r15d,%rax
ffffffff80007e61:	48 03 1d 40 4b 14 00 	add    0x144b40(%rip),%rbx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>

        // Copy strings into the user page and write pointers to outNames
        uint64_t offset = 0;
        uint8_t* pageBuf = (uint8_t*)Memory::HHDM(physAddr);
ffffffff80007e68:	45 31 ff             	xor    %r15d,%r15d
ffffffff80007e6b:	48 89 85 c0 fd ff ff 	mov    %rax,-0x240(%rbp)
ffffffff80007e72:	48 89 9d b8 fd ff ff 	mov    %rbx,-0x248(%rbp)
        uint64_t offset = 0;
ffffffff80007e79:	31 db                	xor    %ebx,%ebx
ffffffff80007e7b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        int copied = 0;
        for (int i = 0; i < count; i++) {
            int len = Lib::strlen(kernelNames[i]) + 1;
ffffffff80007e80:	4b 8b 74 fd 00       	mov    0x0(%r13,%r15,8),%rsi
ffffffff80007e85:	44 89 bd b4 fd ff ff 	mov    %r15d,-0x24c(%rbp)

namespace Lib {
    inline int strlen(const char *string) {
        int c = 0;

        while (*string != '\0') {
ffffffff80007e8c:	80 3e 00             	cmpb   $0x0,(%rsi)
ffffffff80007e8f:	0f 84 83 00 00 00    	je     ffffffff80007f18 <_ZN6ZenithL11Sys_ReadDirEPKcPS1_i+0x158>
ffffffff80007e95:	48 89 f1             	mov    %rsi,%rcx
        int c = 0;
ffffffff80007e98:	31 c0                	xor    %eax,%eax
ffffffff80007e9a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            string++;
ffffffff80007ea0:	48 83 c1 01          	add    $0x1,%rcx
            c++;            
ffffffff80007ea4:	89 c2                	mov    %eax,%edx
ffffffff80007ea6:	83 c0 01             	add    $0x1,%eax
        while (*string != '\0') {
ffffffff80007ea9:	80 39 00             	cmpb   $0x0,(%rcx)
ffffffff80007eac:	75 f2                	jne    ffffffff80007ea0 <_ZN6ZenithL11Sys_ReadDirEPKcPS1_i+0xe0>
ffffffff80007eae:	83 c2 02             	add    $0x2,%edx
            if (offset + len > 0x1000) break;
ffffffff80007eb1:	48 63 d2             	movslq %edx,%rdx
ffffffff80007eb4:	4c 8d 24 1a          	lea    (%rdx,%rbx,1),%r12
ffffffff80007eb8:	49 81 fc 00 10 00 00 	cmp    $0x1000,%r12
ffffffff80007ebf:	77 3c                	ja     ffffffff80007efd <_ZN6ZenithL11Sys_ReadDirEPKcPS1_i+0x13d>
            memcpy(pageBuf + offset, kernelNames[i], len);
ffffffff80007ec1:	48 8b 85 b8 fd ff ff 	mov    -0x248(%rbp),%rax
ffffffff80007ec8:	48 8d 3c 18          	lea    (%rax,%rbx,1),%rdi
ffffffff80007ecc:	e8 0f 23 01 00       	call   ffffffff8001a1e0 <memcpy>
            outNames[i] = (const char*)(userVa + offset);
ffffffff80007ed1:	48 8b 85 c8 fd ff ff 	mov    -0x238(%rbp),%rax
ffffffff80007ed8:	4d 8d 0c 1e          	lea    (%r14,%rbx,1),%r9
ffffffff80007edc:	4e 89 0c f8          	mov    %r9,(%rax,%r15,8)
        for (int i = 0; i < count; i++) {
ffffffff80007ee0:	49 83 c7 01          	add    $0x1,%r15
ffffffff80007ee4:	4c 39 bd c0 fd ff ff 	cmp    %r15,-0x240(%rbp)
ffffffff80007eeb:	74 05                	je     ffffffff80007ef2 <_ZN6ZenithL11Sys_ReadDirEPKcPS1_i+0x132>
ffffffff80007eed:	4c 89 e3             	mov    %r12,%rbx
ffffffff80007ef0:	eb 8e                	jmp    ffffffff80007e80 <_ZN6ZenithL11Sys_ReadDirEPKcPS1_i+0xc0>
            offset += len;
            copied++;
ffffffff80007ef2:	44 8b bd b4 fd ff ff 	mov    -0x24c(%rbp),%r15d
ffffffff80007ef9:	41 83 c7 01          	add    $0x1,%r15d
        }

        return copied;
    }
ffffffff80007efd:	48 81 c4 28 02 00 00 	add    $0x228,%rsp
ffffffff80007f04:	44 89 f8             	mov    %r15d,%eax
ffffffff80007f07:	5b                   	pop    %rbx
ffffffff80007f08:	41 5c                	pop    %r12
ffffffff80007f0a:	41 5d                	pop    %r13
ffffffff80007f0c:	41 5e                	pop    %r14
ffffffff80007f0e:	41 5f                	pop    %r15
ffffffff80007f10:	5d                   	pop    %rbp
ffffffff80007f11:	c3                   	ret
ffffffff80007f12:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff80007f18:	ba 01 00 00 00       	mov    $0x1,%edx
ffffffff80007f1d:	eb 95                	jmp    ffffffff80007eb4 <_ZN6ZenithL11Sys_ReadDirEPKcPS1_i+0xf4>
        if (proc == nullptr) return -1;
ffffffff80007f1f:	41 bf ff ff ff ff    	mov    $0xffffffff,%r15d
ffffffff80007f25:	eb d6                	jmp    ffffffff80007efd <_ZN6ZenithL11Sys_ReadDirEPKcPS1_i+0x13d>
ffffffff80007f27:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80007f2e:	00 00 00 
ffffffff80007f31:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80007f38:	00 00 00 
ffffffff80007f3b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80007f40 <_ZN6ZenithL13dl_append_decEPciii.constprop.0>:
        for (int i = 0; i < digits && pos < max - 1; i++) dst[pos++] = tmp[i];
        dst[pos] = '\0';
        return pos;
    }

    static int dl_append_dec(char* dst, int pos, int val, int max) {
ffffffff80007f40:	89 f0                	mov    %esi,%eax
        if (val == 0) { if (pos < max - 1) dst[pos++] = '0'; dst[pos] = '\0'; return pos; }
ffffffff80007f42:	85 d2                	test   %edx,%edx
ffffffff80007f44:	0f 84 a6 00 00 00    	je     ffffffff80007ff0 <_ZN6ZenithL13dl_append_decEPciii.constprop.0+0xb0>
    static int dl_append_dec(char* dst, int pos, int val, int max) {
ffffffff80007f4a:	55                   	push   %rbp
ffffffff80007f4b:	be 01 00 00 00       	mov    $0x1,%esi
ffffffff80007f50:	41 b9 cd cc cc cc    	mov    $0xcccccccd,%r9d
ffffffff80007f56:	48 89 e5             	mov    %rsp,%rbp
ffffffff80007f59:	48 83 ec 10          	sub    $0x10,%rsp
ffffffff80007f5d:	4c 8d 55 f3          	lea    -0xd(%rbp),%r10
ffffffff80007f61:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80007f68:	00 00 00 00 
ffffffff80007f6c:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80007f73:	00 00 00 00 
ffffffff80007f77:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff80007f7e:	00 00 
        char tmp[12]; int i = 0;
        while (val > 0) { tmp[i++] = '0' + (val % 10); val /= 10; }
ffffffff80007f80:	89 d1                	mov    %edx,%ecx
ffffffff80007f82:	49 0f af c9          	imul   %r9,%rcx
ffffffff80007f86:	48 c1 e9 23          	shr    $0x23,%rcx
ffffffff80007f8a:	44 8d 04 89          	lea    (%rcx,%rcx,4),%r8d
ffffffff80007f8e:	45 01 c0             	add    %r8d,%r8d
ffffffff80007f91:	44 29 c2             	sub    %r8d,%edx
ffffffff80007f94:	83 c2 30             	add    $0x30,%edx
ffffffff80007f97:	41 88 14 32          	mov    %dl,(%r10,%rsi,1)
ffffffff80007f9b:	89 ca                	mov    %ecx,%edx
ffffffff80007f9d:	48 89 f1             	mov    %rsi,%rcx
ffffffff80007fa0:	48 83 c6 01          	add    $0x1,%rsi
ffffffff80007fa4:	85 d2                	test   %edx,%edx
ffffffff80007fa6:	75 d8                	jne    ffffffff80007f80 <_ZN6ZenithL13dl_append_decEPciii.constprop.0+0x40>
        while (i > 0 && pos < max - 1) dst[pos++] = tmp[--i];
ffffffff80007fa8:	83 f8 2e             	cmp    $0x2e,%eax
ffffffff80007fab:	7f 39                	jg     ffffffff80007fe6 <_ZN6ZenithL13dl_append_decEPciii.constprop.0+0xa6>
ffffffff80007fad:	8d 51 ff             	lea    -0x1(%rcx),%edx
ffffffff80007fb0:	8d 48 01             	lea    0x1(%rax),%ecx
ffffffff80007fb3:	48 63 d2             	movslq %edx,%rdx
ffffffff80007fb6:	48 63 c9             	movslq %ecx,%rcx
ffffffff80007fb9:	4c 8d 4d f4          	lea    -0xc(%rbp),%r9
ffffffff80007fbd:	0f 1f 00             	nopl   (%rax)
ffffffff80007fc0:	85 d2                	test   %edx,%edx
ffffffff80007fc2:	41 0f b6 04 11       	movzbl (%r9,%rdx,1),%eax
ffffffff80007fc7:	41 0f 95 c0          	setne  %r8b
ffffffff80007fcb:	83 f9 2e             	cmp    $0x2e,%ecx
ffffffff80007fce:	40 0f 9e c6          	setle  %sil
ffffffff80007fd2:	88 44 0f ff          	mov    %al,-0x1(%rdi,%rcx,1)
ffffffff80007fd6:	48 83 ea 01          	sub    $0x1,%rdx
ffffffff80007fda:	48 89 c8             	mov    %rcx,%rax
ffffffff80007fdd:	48 83 c1 01          	add    $0x1,%rcx
ffffffff80007fe1:	41 84 f0             	test   %sil,%r8b
ffffffff80007fe4:	75 da                	jne    ffffffff80007fc0 <_ZN6ZenithL13dl_append_decEPciii.constprop.0+0x80>
        dst[pos] = '\0';
ffffffff80007fe6:	48 63 d0             	movslq %eax,%rdx
ffffffff80007fe9:	c6 04 17 00          	movb   $0x0,(%rdi,%rdx,1)
        return pos;
    }
ffffffff80007fed:	c9                   	leave
ffffffff80007fee:	c3                   	ret
ffffffff80007fef:	90                   	nop
        if (val == 0) { if (pos < max - 1) dst[pos++] = '0'; dst[pos] = '\0'; return pos; }
ffffffff80007ff0:	83 fe 2e             	cmp    $0x2e,%esi
ffffffff80007ff3:	7f 0a                	jg     ffffffff80007fff <_ZN6ZenithL13dl_append_decEPciii.constprop.0+0xbf>
ffffffff80007ff5:	48 63 d6             	movslq %esi,%rdx
ffffffff80007ff8:	83 c0 01             	add    $0x1,%eax
ffffffff80007ffb:	c6 04 17 30          	movb   $0x30,(%rdi,%rdx,1)
ffffffff80007fff:	48 63 d0             	movslq %eax,%rdx
ffffffff80008002:	c6 04 17 00          	movb   $0x0,(%rdi,%rdx,1)
    }
ffffffff80008006:	c3                   	ret
ffffffff80008007:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000800e:	00 00 00 
ffffffff80008011:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80008018:	00 00 00 
ffffffff8000801b:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80008022:	00 00 00 
ffffffff80008025:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000802c:	00 00 00 
ffffffff8000802f:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80008036:	00 00 00 
ffffffff80008039:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff80008040 <SyscallDispatch>:
    }

    // ---- Dispatch ----

    extern "C" int64_t SyscallDispatch(SyscallFrame* frame) {
        switch (frame->syscall_nr) {
ffffffff80008040:	48 83 7f 60 44       	cmpq   $0x44,0x60(%rdi)
ffffffff80008045:	0f 87 eb 20 00 00    	ja     ffffffff8000a136 <SyscallDispatch+0x20f6>
    extern "C" int64_t SyscallDispatch(SyscallFrame* frame) {
ffffffff8000804b:	55                   	push   %rbp
ffffffff8000804c:	48 89 f8             	mov    %rdi,%rax
ffffffff8000804f:	48 89 e5             	mov    %rsp,%rbp
ffffffff80008052:	41 57                	push   %r15
ffffffff80008054:	41 56                	push   %r14
ffffffff80008056:	41 55                	push   %r13
ffffffff80008058:	41 54                	push   %r12
ffffffff8000805a:	53                   	push   %rbx
ffffffff8000805b:	48 83 ec 68          	sub    $0x68,%rsp
        switch (frame->syscall_nr) {
ffffffff8000805f:	48 8b 57 60          	mov    0x60(%rdi),%rdx
ffffffff80008063:	ff 24 d5 10 c2 02 80 	jmp    *-0x7ffd3df0(,%rdx,8)
ffffffff8000806a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        Sched::Schedule();
ffffffff80008070:	e8 4b 9c 01 00       	call   ffffffff80021cc0 <_ZN5Sched8ScheduleEv>
            case SYS_EXIT:
                Sys_Exit((int)frame->arg1);
                return 0;
            case SYS_YIELD:
                Sys_Yield();
                return 0;
ffffffff80008075:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000807c:	00 00 00 00 
ffffffff80008080:	31 c0                	xor    %eax,%eax
            case SYS_CPUINFO:
                return (int64_t)Sys_CpuInfo((CpuInfo*)frame->arg1, (int)frame->arg2);
            default:
                return -1;
        }
    }
ffffffff80008082:	48 8d 65 d8          	lea    -0x28(%rbp),%rsp
ffffffff80008086:	5b                   	pop    %rbx
ffffffff80008087:	41 5c                	pop    %r12
ffffffff80008089:	41 5d                	pop    %r13
ffffffff8000808b:	41 5e                	pop    %r14
ffffffff8000808d:	41 5f                	pop    %r15
ffffffff8000808f:	5d                   	pop    %rbp
ffffffff80008090:	c3                   	ret
ffffffff80008091:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
                return (int64_t)Sys_Alloc(frame->arg1);
ffffffff80008098:	48 8b 5f 58          	mov    0x58(%rdi),%rbx
        auto* proc = Sched::GetCurrentProcessPtr();
ffffffff8000809c:	e8 4f 9e 01 00       	call   ffffffff80021ef0 <_ZN5Sched20GetCurrentProcessPtrEv>
ffffffff800080a1:	49 89 c6             	mov    %rax,%r14
        if (proc == nullptr) return 0;
ffffffff800080a4:	48 85 c0             	test   %rax,%rax
ffffffff800080a7:	74 d7                	je     ffffffff80008080 <SyscallDispatch+0x40>
        size = (size + 0xFFF) & ~0xFFFULL;
ffffffff800080a9:	48 8d 83 ff 0f 00 00 	lea    0xfff(%rbx),%rax
        if (size == 0) size = 0x1000;
ffffffff800080b0:	48 25 00 f0 ff ff    	and    $0xfffffffffffff000,%rax
ffffffff800080b6:	49 89 c7             	mov    %rax,%r15
ffffffff800080b9:	0f 84 85 16 00 00    	je     ffffffff80009744 <SyscallDispatch+0x1704>
        uint64_t numPages = size / 0x1000;
ffffffff800080bf:	49 89 c5             	mov    %rax,%r13
ffffffff800080c2:	49 c1 ed 0c          	shr    $0xc,%r13
        uint64_t userVa = proc->heapNext;
ffffffff800080c6:	49 8b 9e 80 00 00 00 	mov    0x80(%r14),%rbx
        for (uint64_t i = 0; i < numPages; i++) {
ffffffff800080cd:	49 c1 e5 0c          	shl    $0xc,%r13
ffffffff800080d1:	49 01 dd             	add    %rbx,%r13
        uint64_t userVa = proc->heapNext;
ffffffff800080d4:	49 89 dc             	mov    %rbx,%r12
ffffffff800080d7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff800080de:	00 00 
            void* page = Memory::g_pfa->AllocateZeroed();
ffffffff800080e0:	48 8b 3d c9 48 14 00 	mov    0x1448c9(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff800080e7:	e8 24 31 01 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
            if (page == nullptr) return 0;
ffffffff800080ec:	48 85 c0             	test   %rax,%rax
ffffffff800080ef:	74 8f                	je     ffffffff80008080 <SyscallDispatch+0x40>
        return address - HHDMBase;
ffffffff800080f1:	48 2b 05 b0 48 14 00 	sub    0x1448b0(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            Memory::VMM::Paging::MapUserIn(proc->pml4Phys, physAddr, userVa + i * 0x1000);
ffffffff800080f8:	49 8b 7e 68          	mov    0x68(%r14),%rdi
ffffffff800080fc:	4c 89 e2             	mov    %r12,%rdx
        for (uint64_t i = 0; i < numPages; i++) {
ffffffff800080ff:	49 81 c4 00 10 00 00 	add    $0x1000,%r12
ffffffff80008106:	48 89 c6             	mov    %rax,%rsi
            Memory::VMM::Paging::MapUserIn(proc->pml4Phys, physAddr, userVa + i * 0x1000);
ffffffff80008109:	e8 52 3a 01 00       	call   ffffffff8001bb60 <_ZN6Memory3VMM6Paging9MapUserInEmmm>
        for (uint64_t i = 0; i < numPages; i++) {
ffffffff8000810e:	4d 39 e5             	cmp    %r12,%r13
ffffffff80008111:	75 cd                	jne    ffffffff800080e0 <SyscallDispatch+0xa0>
        proc->heapNext += size;
ffffffff80008113:	4d 01 be 80 00 00 00 	add    %r15,0x80(%r14)
                return (int64_t)Sys_Alloc(frame->arg1);
ffffffff8000811a:	48 89 d8             	mov    %rbx,%rax
ffffffff8000811d:	e9 60 ff ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80008122:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
                return (int64_t)Sys_ReadDir((const char*)frame->arg1,
ffffffff80008128:	48 8b 77 50          	mov    0x50(%rdi),%rsi
ffffffff8000812c:	8b 50 48             	mov    0x48(%rax),%edx
ffffffff8000812f:	48 8b 7f 58          	mov    0x58(%rdi),%rdi
ffffffff80008133:	e8 88 fc ff ff       	call   ffffffff80007dc0 <_ZN6ZenithL11Sys_ReadDirEPKcPS1_i>
                                            (int)frame->arg3);
ffffffff80008138:	48 98                	cltq
ffffffff8000813a:	e9 43 ff ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff8000813f:	90                   	nop
        Fs::Vfs::VfsClose(handle);
ffffffff80008140:	8b 7f 58             	mov    0x58(%rdi),%edi
ffffffff80008143:	e8 f8 f8 00 00       	call   ffffffff80017a40 <_ZN2Fs3Vfs8VfsCloseEi>
                return 0;
ffffffff80008148:	e9 33 ff ff ff       	jmp    ffffffff80008080 <SyscallDispatch+0x40>
ffffffff8000814d:	0f 1f 00             	nopl   (%rax)
        return Fs::Vfs::VfsGetSize(handle);
ffffffff80008150:	8b 7f 58             	mov    0x58(%rdi),%edi
    }
ffffffff80008153:	48 8d 65 d8          	lea    -0x28(%rbp),%rsp
ffffffff80008157:	5b                   	pop    %rbx
ffffffff80008158:	41 5c                	pop    %r12
ffffffff8000815a:	41 5d                	pop    %r13
ffffffff8000815c:	41 5e                	pop    %r14
ffffffff8000815e:	41 5f                	pop    %r15
ffffffff80008160:	5d                   	pop    %rbp
        return Fs::Vfs::VfsGetSize(handle);
ffffffff80008161:	e9 9a f8 00 00       	jmp    ffffffff80017a00 <_ZN2Fs3Vfs10VfsGetSizeEi>
ffffffff80008166:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000816d:	00 00 00 
        return Fs::Vfs::VfsRead(handle, buffer, offset, size);
ffffffff80008170:	48 8b 4f 40          	mov    0x40(%rdi),%rcx
ffffffff80008174:	48 8b 57 48          	mov    0x48(%rdi),%rdx
ffffffff80008178:	48 8b 77 50          	mov    0x50(%rdi),%rsi
ffffffff8000817c:	8b 7f 58             	mov    0x58(%rdi),%edi
ffffffff8000817f:	e8 3c f8 00 00       	call   ffffffff800179c0 <_ZN2Fs3Vfs7VfsReadEiPhmm>
                                         frame->arg3, frame->arg4);
ffffffff80008184:	48 98                	cltq
ffffffff80008186:	e9 f7 fe ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff8000818b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        return Fs::Vfs::VfsOpen(path);
ffffffff80008190:	48 8b 7f 58          	mov    0x58(%rdi),%rdi
ffffffff80008194:	e8 e7 f5 00 00       	call   ffffffff80017780 <_ZN2Fs3Vfs7VfsOpenEPKc>
                return (int64_t)Sys_Open((const char*)frame->arg1);
ffffffff80008199:	48 98                	cltq
ffffffff8000819b:	e9 e2 fe ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
                Sys_Putchar((char)frame->arg1);
ffffffff800081a0:	48 8b 5f 58          	mov    0x58(%rdi),%rbx
        auto* proc = Sched::GetCurrentProcessPtr();
ffffffff800081a4:	e8 47 9d 01 00       	call   ffffffff80021ef0 <_ZN5Sched20GetCurrentProcessPtrEv>
        if (proc && proc->redirected) {
ffffffff800081a9:	48 85 c0             	test   %rax,%rax
ffffffff800081ac:	74 0d                	je     ffffffff800081bb <SyscallDispatch+0x17b>
ffffffff800081ae:	80 b8 88 01 00 00 00 	cmpb   $0x0,0x188(%rax)
ffffffff800081b5:	0f 85 92 19 00 00    	jne    ffffffff80009b4d <SyscallDispatch+0x1b0d>
        Kt::Putchar(c);
ffffffff800081bb:	0f be fb             	movsbl %bl,%edi
ffffffff800081be:	e8 1d ad 01 00       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
ffffffff800081c3:	e9 b8 fe ff ff       	jmp    ffffffff80008080 <SyscallDispatch+0x40>
ffffffff800081c8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff800081cf:	00 
                Sys_Print((const char*)frame->arg1);
ffffffff800081d0:	48 8b 5f 58          	mov    0x58(%rdi),%rbx
        auto* proc = Sched::GetCurrentProcessPtr();
ffffffff800081d4:	e8 17 9d 01 00       	call   ffffffff80021ef0 <_ZN5Sched20GetCurrentProcessPtrEv>
        if (proc && proc->redirected) {
ffffffff800081d9:	48 85 c0             	test   %rax,%rax
ffffffff800081dc:	74 0d                	je     ffffffff800081eb <SyscallDispatch+0x1ab>
ffffffff800081de:	80 b8 88 01 00 00 00 	cmpb   $0x0,0x188(%rax)
ffffffff800081e5:	0f 85 ea 19 00 00    	jne    ffffffff80009bd5 <SyscallDispatch+0x1b95>
        Kt::Print(text);
ffffffff800081eb:	48 89 df             	mov    %rbx,%rdi
ffffffff800081ee:	e8 cd af 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800081f3:	e9 88 fe ff ff       	jmp    ffffffff80008080 <SyscallDispatch+0x40>
ffffffff800081f8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff800081ff:	00 
        return Sched::GetCurrentPid();
ffffffff80008200:	e8 bb 9c 01 00       	call   ffffffff80021ec0 <_ZN5Sched13GetCurrentPidEv>
                return (int64_t)Sys_GetPid();
ffffffff80008205:	48 98                	cltq
ffffffff80008207:	e9 76 fe ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff8000820c:	0f 1f 40 00          	nopl   0x0(%rax)
        Timekeeping::Sleep(ms);
ffffffff80008210:	48 8b 7f 58          	mov    0x58(%rdi),%rdi
ffffffff80008214:	e8 17 b4 01 00       	call   ffffffff80023630 <_ZN11Timekeeping5SleepEm>
                return 0;
ffffffff80008219:	e9 62 fe ff ff       	jmp    ffffffff80008080 <SyscallDispatch+0x40>
ffffffff8000821e:	66 90                	xchg   %ax,%ax
        Sched::ExitProcess();
ffffffff80008220:	e8 fb 9c 01 00       	call   ffffffff80021f20 <_ZN5Sched11ExitProcessEv>
                return 0;
ffffffff80008225:	e9 56 fe ff ff       	jmp    ffffffff80008080 <SyscallDispatch+0x40>
ffffffff8000822a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
                return (int64_t)Sys_CpuInfo((CpuInfo*)frame->arg1, (int)frame->arg2);
ffffffff80008230:	48 8b 77 50          	mov    0x50(%rdi),%rsi
ffffffff80008234:	48 8b 57 58          	mov    0x58(%rdi),%rdx
ffffffff80008238:	89 f1                	mov    %esi,%ecx
        if (buf == nullptr || maxCount <= 0) return 0;
ffffffff8000823a:	48 85 d2             	test   %rdx,%rdx
ffffffff8000823d:	0f 84 3d fe ff ff    	je     ffffffff80008080 <SyscallDispatch+0x40>
ffffffff80008243:	85 f6                	test   %esi,%esi
ffffffff80008245:	0f 8e 35 fe ff ff    	jle    ffffffff80008080 <SyscallDispatch+0x40>
        if (count > maxCount) count = maxCount;
ffffffff8000824b:	8b 05 13 32 1c 00    	mov    0x1c3213(%rip),%eax        # ffffffff801cb464 <_ZN3Smp10g_cpuCountE>
ffffffff80008251:	39 c6                	cmp    %eax,%esi
ffffffff80008253:	0f 4f c8             	cmovg  %eax,%ecx
                return (int64_t)Sys_CpuInfo((CpuInfo*)frame->arg1, (int)frame->arg2);
ffffffff80008256:	48 63 c1             	movslq %ecx,%rax
        for (int i = 0; i < count; i++) {
ffffffff80008259:	85 c9                	test   %ecx,%ecx
ffffffff8000825b:	0f 8e 21 fe ff ff    	jle    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80008261:	48 89 c7             	mov    %rax,%rdi
ffffffff80008264:	48 c7 c1 90 b4 1c 80 	mov    $0xffffffff801cb490,%rcx
ffffffff8000826b:	48 c1 e7 04          	shl    $0x4,%rdi
ffffffff8000826f:	48 01 d7             	add    %rdx,%rdi
ffffffff80008272:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80008279:	00 00 00 00 
ffffffff8000827d:	0f 1f 00             	nopl   (%rax)
            buf[i].cpuIndex = Smp::g_perCpu[i].cpuIndex;
ffffffff80008280:	8b 71 04             	mov    0x4(%rcx),%esi
        for (int i = 0; i < count; i++) {
ffffffff80008283:	48 83 c2 10          	add    $0x10,%rdx
ffffffff80008287:	48 81 c1 00 01 00 00 	add    $0x100,%rcx
            buf[i].cpuIndex = Smp::g_perCpu[i].cpuIndex;
ffffffff8000828e:	89 72 f0             	mov    %esi,-0x10(%rdx)
            buf[i].lapicId = Smp::g_perCpu[i].lapicId;
ffffffff80008291:	8b b1 10 ff ff ff    	mov    -0xf0(%rcx),%esi
ffffffff80008297:	89 72 f4             	mov    %esi,-0xc(%rdx)
            buf[i].currentSlot = Smp::g_perCpu[i].currentSlot;
ffffffff8000829a:	8b b1 00 ff ff ff    	mov    -0x100(%rcx),%esi
ffffffff800082a0:	89 72 f8             	mov    %esi,-0x8(%rdx)
            buf[i].ready = Smp::g_perCpu[i].ready ? 1 : 0;
ffffffff800082a3:	0f b6 71 be          	movzbl -0x42(%rcx),%esi
            buf[i]._pad[0] = 0;
ffffffff800082a7:	c6 42 fd 00          	movb   $0x0,-0x3(%rdx)
            buf[i].ready = Smp::g_perCpu[i].ready ? 1 : 0;
ffffffff800082ab:	40 88 72 fc          	mov    %sil,-0x4(%rdx)
            buf[i]._pad[1] = 0;
ffffffff800082af:	31 f6                	xor    %esi,%esi
ffffffff800082b1:	66 89 72 fe          	mov    %si,-0x2(%rdx)
        for (int i = 0; i < count; i++) {
ffffffff800082b5:	48 39 fa             	cmp    %rdi,%rdx
ffffffff800082b8:	75 c6                	jne    ffffffff80008280 <SyscallDispatch+0x240>
ffffffff800082ba:	e9 c3 fd ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff800082bf:	90                   	nop
                Sys_MemStats((MemStats*)frame->arg1);
ffffffff800082c0:	48 8b 77 58          	mov    0x58(%rdi),%rsi
        if (out == nullptr) return;
ffffffff800082c4:	48 85 f6             	test   %rsi,%rsi
ffffffff800082c7:	0f 84 b3 fd ff ff    	je     ffffffff80008080 <SyscallDispatch+0x40>
        Memory::g_pfa->GetStats(out);
ffffffff800082cd:	48 8b 3d dc 46 14 00 	mov    0x1446dc(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff800082d4:	e8 97 30 01 00       	call   ffffffff8001b370 <_ZN6Memory18PageFrameAllocator8GetStatsEPN6Zenith8MemStatsE>
ffffffff800082d9:	e9 a2 fd ff ff       	jmp    ffffffff80008080 <SyscallDispatch+0x40>
ffffffff800082de:	66 90                	xchg   %ax,%ax
        return WinServer::GetScale();
ffffffff800082e0:	e8 bb 29 00 00       	call   ffffffff8000aca0 <_ZN9WinServer8GetScaleEv>
                return (int64_t)Sys_WinGetScale();
ffffffff800082e5:	48 98                	cltq
ffffffff800082e7:	e9 96 fd ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff800082ec:	0f 1f 40 00          	nopl   0x0(%rax)
        return WinServer::SetScale(scale);
ffffffff800082f0:	8b 7f 58             	mov    0x58(%rdi),%edi
ffffffff800082f3:	e8 08 29 00 00       	call   ffffffff8000ac00 <_ZN9WinServer8SetScaleEi>
                return (int64_t)Sys_WinSetScale((int)frame->arg1);
ffffffff800082f8:	48 98                	cltq
ffffffff800082fa:	e9 83 fd ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff800082ff:	90                   	nop
                return (int64_t)Sys_WinResize((int)frame->arg1, (int)frame->arg2, (int)frame->arg3);
ffffffff80008300:	4c 8b 67 48          	mov    0x48(%rdi),%r12
ffffffff80008304:	48 8b 5f 50          	mov    0x50(%rdi),%rbx
ffffffff80008308:	4c 8b 6f 58          	mov    0x58(%rdi),%r13
        auto* proc = Sched::GetCurrentProcessPtr();
ffffffff8000830c:	e8 df 9b 01 00       	call   ffffffff80021ef0 <_ZN5Sched20GetCurrentProcessPtrEv>
        if (proc == nullptr) return 0;
ffffffff80008311:	48 85 c0             	test   %rax,%rax
ffffffff80008314:	0f 84 66 fd ff ff    	je     ffffffff80008080 <SyscallDispatch+0x40>
        int r = WinServer::Resize(windowId, proc->pid, proc->pml4Phys, newW, newH,
ffffffff8000831a:	48 83 ec 08          	sub    $0x8,%rsp
ffffffff8000831e:	48 8d 4d a0          	lea    -0x60(%rbp),%rcx
ffffffff80008322:	8b 30                	mov    (%rax),%esi
ffffffff80008324:	45 89 e0             	mov    %r12d,%r8d
        uint64_t outVa = 0;
ffffffff80008327:	48 c7 45 a0 00 00 00 	movq   $0x0,-0x60(%rbp)
ffffffff8000832e:	00 
        int r = WinServer::Resize(windowId, proc->pid, proc->pml4Phys, newW, newH,
ffffffff8000832f:	48 8b 50 68          	mov    0x68(%rax),%rdx
ffffffff80008333:	4c 8d 88 80 00 00 00 	lea    0x80(%rax),%r9
ffffffff8000833a:	44 89 ef             	mov    %r13d,%edi
ffffffff8000833d:	51                   	push   %rcx
ffffffff8000833e:	89 d9                	mov    %ebx,%ecx
ffffffff80008340:	e8 6b 26 00 00       	call   ffffffff8000a9b0 <_ZN9WinServer6ResizeEiimiiRmS0_>
        return (r == 0) ? outVa : 0;
ffffffff80008345:	41 5a                	pop    %r10
ffffffff80008347:	41 5b                	pop    %r11
ffffffff80008349:	85 c0                	test   %eax,%eax
ffffffff8000834b:	0f 85 2f fd ff ff    	jne    ffffffff80008080 <SyscallDispatch+0x40>
                return (int64_t)Sys_WinResize((int)frame->arg1, (int)frame->arg2, (int)frame->arg3);
ffffffff80008351:	48 8b 45 a0          	mov    -0x60(%rbp),%rax
ffffffff80008355:	e9 28 fd ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff8000835a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
                return (int64_t)Sys_DevList((DevInfo*)frame->arg1, (int)frame->arg2);
ffffffff80008360:	4c 8b 77 50          	mov    0x50(%rdi),%r14
ffffffff80008364:	4c 8b 6f 58          	mov    0x58(%rdi),%r13
ffffffff80008368:	44 89 75 84          	mov    %r14d,-0x7c(%rbp)
        if (buf == nullptr || maxCount <= 0) return 0;
ffffffff8000836c:	4d 85 ed             	test   %r13,%r13
ffffffff8000836f:	0f 84 0b fd ff ff    	je     ffffffff80008080 <SyscallDispatch+0x40>
ffffffff80008375:	45 85 f6             	test   %r14d,%r14d
ffffffff80008378:	0f 8e 02 fd ff ff    	jle    ffffffff80008080 <SyscallDispatch+0x40>
        int cpuCount = Hal::GetDetectedCpuCount();
ffffffff8000837e:	e8 8d ff 00 00       	call   ffffffff80018310 <_ZN3Hal19GetDetectedCpuCountEv>
        if (cpuCount > 0) {
ffffffff80008383:	85 c0                	test   %eax,%eax
ffffffff80008385:	0f 8e a5 18 00 00    	jle    ffffffff80009c30 <SyscallDispatch+0x1bf0>
ffffffff8000838b:	ba 01 00 00 00       	mov    $0x1,%edx
        for (int i = 0; src[i] && pos < max - 1; i++) dst[pos++] = src[i];
ffffffff80008390:	b9 78 00 00 00       	mov    $0x78,%ecx
ffffffff80008395:	4c 8d 5d 9f          	lea    -0x61(%rbp),%r11
ffffffff80008399:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
ffffffff800083a0:	41 88 0c 13          	mov    %cl,(%r11,%rdx,1)
ffffffff800083a4:	0f b6 8a db a2 02 80 	movzbl -0x7ffd5d25(%rdx),%ecx
ffffffff800083ab:	84 c9                	test   %cl,%cl
ffffffff800083ad:	0f 84 6d 1c 00 00    	je     ffffffff8000a020 <SyscallDispatch+0x1fe0>
ffffffff800083b3:	48 83 c2 01          	add    $0x1,%rdx
ffffffff800083b7:	48 83 fa 30          	cmp    $0x30,%rdx
ffffffff800083bb:	75 e3                	jne    ffffffff800083a0 <SyscallDispatch+0x360>
ffffffff800083bd:	be 2f 00 00 00       	mov    $0x2f,%esi
ffffffff800083c2:	ba 2f 00 00 00       	mov    $0x2f,%edx
        dst[pos] = '\0';
ffffffff800083c7:	c6 44 15 a0 00       	movb   $0x0,-0x60(%rbp,%rdx,1)
            p = dl_append_dec(detail, p, cpuCount, 48);
ffffffff800083cc:	48 8d 7d a0          	lea    -0x60(%rbp),%rdi
ffffffff800083d0:	89 c2                	mov    %eax,%edx
ffffffff800083d2:	e8 69 fb ff ff       	call   ffffffff80007f40 <_ZN6ZenithL13dl_append_decEPciii.constprop.0>
        for (int i = 0; src[i] && pos < max - 1; i++) dst[pos++] = src[i];
ffffffff800083d7:	83 f8 2e             	cmp    $0x2e,%eax
ffffffff800083da:	7f 46                	jg     ffffffff80008422 <SyscallDispatch+0x3e2>
ffffffff800083dc:	8d 50 01             	lea    0x1(%rax),%edx
ffffffff800083df:	49 c7 c1 e4 a2 02 80 	mov    $0xffffffff8002a2e4,%r9
ffffffff800083e6:	48 98                	cltq
ffffffff800083e8:	b9 20 00 00 00       	mov    $0x20,%ecx
ffffffff800083ed:	48 63 d2             	movslq %edx,%rdx
ffffffff800083f0:	49 29 c1             	sub    %rax,%r9
ffffffff800083f3:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800083fa:	00 00 00 00 
ffffffff800083fe:	66 90                	xchg   %ax,%ax
ffffffff80008400:	41 88 0c 13          	mov    %cl,(%r11,%rdx,1)
ffffffff80008404:	41 0f b6 0c 11       	movzbl (%r9,%rdx,1),%ecx
ffffffff80008409:	48 89 d0             	mov    %rdx,%rax
ffffffff8000840c:	84 c9                	test   %cl,%cl
ffffffff8000840e:	41 0f 95 c0          	setne  %r8b
ffffffff80008412:	83 fa 2e             	cmp    $0x2e,%edx
ffffffff80008415:	40 0f 9e c6          	setle  %sil
ffffffff80008419:	48 83 c2 01          	add    $0x1,%rdx
ffffffff8000841d:	41 84 f0             	test   %sil,%r8b
ffffffff80008420:	75 de                	jne    ffffffff80008400 <SyscallDispatch+0x3c0>
            buf[count].category = cat;
ffffffff80008422:	41 c7 45 00 00 00 00 	movl   $0x0,0x0(%r13)
ffffffff80008429:	00 
        dst[pos] = '\0';
ffffffff8000842a:	48 98                	cltq
ffffffff8000842c:	49 8d 75 04          	lea    0x4(%r13),%rsi
ffffffff80008430:	c6 44 05 a0 00       	movb   $0x0,-0x60(%rbp,%rax,1)
            buf[count].category = cat;
ffffffff80008435:	31 c0                	xor    %eax,%eax
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80008437:	0f b6 90 ed a2 02 80 	movzbl -0x7ffd5d13(%rax),%edx
ffffffff8000843e:	48 8d 0c 06          	lea    (%rsi,%rax,1),%rcx
ffffffff80008442:	84 d2                	test   %dl,%dl
ffffffff80008444:	74 0c                	je     ffffffff80008452 <SyscallDispatch+0x412>
ffffffff80008446:	48 83 c0 01          	add    $0x1,%rax
ffffffff8000844a:	88 11                	mov    %dl,(%rcx)
ffffffff8000844c:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80008450:	75 e5                	jne    ffffffff80008437 <SyscallDispatch+0x3f7>
        dst[i] = '\0';
ffffffff80008452:	41 c6 44 05 04 00    	movb   $0x0,0x4(%r13,%rax,1)
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80008458:	49 8d 75 34          	lea    0x34(%r13),%rsi
            dl_strcpy(buf[count].detail, detail, 48);
ffffffff8000845c:	31 c0                	xor    %eax,%eax
ffffffff8000845e:	66 90                	xchg   %ax,%ax
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80008460:	0f b6 14 07          	movzbl (%rdi,%rax,1),%edx
ffffffff80008464:	48 8d 0c 06          	lea    (%rsi,%rax,1),%rcx
ffffffff80008468:	84 d2                	test   %dl,%dl
ffffffff8000846a:	74 0c                	je     ffffffff80008478 <SyscallDispatch+0x438>
ffffffff8000846c:	48 83 c0 01          	add    $0x1,%rax
ffffffff80008470:	88 11                	mov    %dl,(%rcx)
ffffffff80008472:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80008476:	75 e8                	jne    ffffffff80008460 <SyscallDispatch+0x420>
        dst[i] = '\0';
ffffffff80008478:	41 c6 44 05 34 00    	movb   $0x0,0x34(%r13,%rax,1)
            count++;
ffffffff8000847e:	41 bf 01 00 00 00    	mov    $0x1,%r15d
            if (count >= maxCount) return;
ffffffff80008484:	41 83 fe 01          	cmp    $0x1,%r14d
ffffffff80008488:	0f 85 8a 1c 00 00    	jne    ffffffff8000a118 <SyscallDispatch+0x20d8>
        if (Drivers::PS2::IsDualChannel()) {
ffffffff8000848e:	e8 2d 93 00 00       	call   ffffffff800117c0 <_ZN7Drivers3PS213IsDualChannelEv>
        if (Drivers::USB::Xhci::IsInitialized()) {
ffffffff80008493:	e8 a8 cb 00 00       	call   ffffffff80015040 <_ZN7Drivers3USB4Xhci13IsInitializedEv>
ffffffff80008498:	84 c0                	test   %al,%al
ffffffff8000849a:	0f 84 c0 12 00 00    	je     ffffffff80009760 <SyscallDispatch+0x1720>
ffffffff800084a0:	4c 89 6d 88          	mov    %r13,-0x78(%rbp)
ffffffff800084a4:	41 bc 01 00 00 00    	mov    $0x1,%r12d
ffffffff800084aa:	4c 89 b5 78 ff ff ff 	mov    %r14,-0x88(%rbp)
ffffffff800084b1:	eb 13                	jmp    ffffffff800084c6 <SyscallDispatch+0x486>
ffffffff800084b3:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            for (uint8_t slot = 1; slot <= Drivers::USB::Xhci::MAX_SLOTS && count < maxCount; slot++) {
ffffffff800084b8:	41 83 c4 01          	add    $0x1,%r12d
ffffffff800084bc:	41 83 fc 11          	cmp    $0x11,%r12d
ffffffff800084c0:	0f 84 8f 12 00 00    	je     ffffffff80009755 <SyscallDispatch+0x1715>
ffffffff800084c6:	44 39 7d 84          	cmp    %r15d,-0x7c(%rbp)
ffffffff800084ca:	0f 8e e4 1b 00 00    	jle    ffffffff8000a0b4 <SyscallDispatch+0x2074>
                auto* dev = Drivers::USB::Xhci::GetDevice(slot);
ffffffff800084d0:	44 89 e7             	mov    %r12d,%edi
ffffffff800084d3:	e8 38 cb 00 00       	call   ffffffff80015010 <_ZN7Drivers3USB4Xhci9GetDeviceEh>
ffffffff800084d8:	48 89 c3             	mov    %rax,%rbx
                if (!dev || !dev->Active) continue;
ffffffff800084db:	48 85 c0             	test   %rax,%rax
ffffffff800084de:	74 d8                	je     ffffffff800084b8 <SyscallDispatch+0x478>
ffffffff800084e0:	80 38 00             	cmpb   $0x0,(%rax)
ffffffff800084e3:	74 d3                	je     ffffffff800084b8 <SyscallDispatch+0x478>
                if (dev->InterfaceClass == 3) {
ffffffff800084e5:	0f b6 40 0c          	movzbl 0xc(%rax),%eax
ffffffff800084e9:	3c 03                	cmp    $0x3,%al
ffffffff800084eb:	0f 84 d7 15 00 00    	je     ffffffff80009ac8 <SyscallDispatch+0x1a88>
                    devName = "USB Mass Storage";
ffffffff800084f1:	49 c7 c5 8a a2 02 80 	mov    $0xffffffff8002a28a,%r13
                } else if (dev->InterfaceClass == 8) {
ffffffff800084f8:	3c 08                	cmp    $0x8,%al
ffffffff800084fa:	74 14                	je     ffffffff80008510 <SyscallDispatch+0x4d0>
                const char* devName = "USB Device";
ffffffff800084fc:	3c 09                	cmp    $0x9,%al
ffffffff800084fe:	49 c7 c5 a6 a2 02 80 	mov    $0xffffffff8002a2a6,%r13
ffffffff80008505:	48 c7 c0 9b a2 02 80 	mov    $0xffffffff8002a29b,%rax
ffffffff8000850c:	4c 0f 45 e8          	cmovne %rax,%r13
                    devName = "USB Hub";
ffffffff80008510:	b8 01 00 00 00       	mov    $0x1,%eax
ffffffff80008515:	4c 8d 5d 9f          	lea    -0x61(%rbp),%r11
        for (int i = 0; src[i] && pos < max - 1; i++) dst[pos++] = src[i];
ffffffff80008519:	ba 50 00 00 00       	mov    $0x50,%edx
ffffffff8000851e:	66 90                	xchg   %ax,%ax
ffffffff80008520:	41 88 14 03          	mov    %dl,(%r11,%rax,1)
ffffffff80008524:	0f b6 90 b0 a3 02 80 	movzbl -0x7ffd5c50(%rax),%edx
ffffffff8000852b:	84 d2                	test   %dl,%dl
ffffffff8000852d:	0f 84 8e 15 00 00    	je     ffffffff80009ac1 <SyscallDispatch+0x1a81>
ffffffff80008533:	48 83 c0 01          	add    $0x1,%rax
ffffffff80008537:	48 83 f8 30          	cmp    $0x30,%rax
ffffffff8000853b:	75 e3                	jne    ffffffff80008520 <SyscallDispatch+0x4e0>
ffffffff8000853d:	be 2f 00 00 00       	mov    $0x2f,%esi
ffffffff80008542:	b8 2f 00 00 00       	mov    $0x2f,%eax
        dst[pos] = '\0';
ffffffff80008547:	c6 44 05 a0 00       	movb   $0x0,-0x60(%rbp,%rax,1)
                p = dl_append_dec(detail, p, dev->PortId, 48);
ffffffff8000854c:	0f b6 53 01          	movzbl 0x1(%rbx),%edx
ffffffff80008550:	48 8d 7d a0          	lea    -0x60(%rbp),%rdi
ffffffff80008554:	e8 e7 f9 ff ff       	call   ffffffff80007f40 <_ZN6ZenithL13dl_append_decEPciii.constprop.0>
        for (int i = 0; src[i] && pos < max - 1; i++) dst[pos++] = src[i];
ffffffff80008559:	83 f8 2e             	cmp    $0x2e,%eax
ffffffff8000855c:	7f 44                	jg     ffffffff800085a2 <SyscallDispatch+0x562>
ffffffff8000855e:	8d 50 01             	lea    0x1(%rax),%edx
ffffffff80008561:	49 c7 c1 b6 a3 02 80 	mov    $0xffffffff8002a3b6,%r9
ffffffff80008568:	48 98                	cltq
ffffffff8000856a:	b9 2c 00 00 00       	mov    $0x2c,%ecx
ffffffff8000856f:	48 63 d2             	movslq %edx,%rdx
ffffffff80008572:	49 29 c1             	sub    %rax,%r9
ffffffff80008575:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000857c:	00 00 00 00 
ffffffff80008580:	41 88 0c 13          	mov    %cl,(%r11,%rdx,1)
ffffffff80008584:	41 0f b6 0c 11       	movzbl (%r9,%rdx,1),%ecx
ffffffff80008589:	48 89 d0             	mov    %rdx,%rax
ffffffff8000858c:	84 c9                	test   %cl,%cl
ffffffff8000858e:	41 0f 95 c0          	setne  %r8b
ffffffff80008592:	83 fa 2e             	cmp    $0x2e,%edx
ffffffff80008595:	40 0f 9e c6          	setle  %sil
ffffffff80008599:	48 83 c2 01          	add    $0x1,%rdx
ffffffff8000859d:	41 84 f0             	test   %sil,%r8b
ffffffff800085a0:	75 de                	jne    ffffffff80008580 <SyscallDispatch+0x540>
        dst[pos] = '\0';
ffffffff800085a2:	48 63 f0             	movslq %eax,%rsi
ffffffff800085a5:	48 8d 4d 98          	lea    -0x68(%rbp),%rcx
                p = dl_append_hex(detail, p, dev->VendorId, 4, 48);
ffffffff800085a9:	44 0f b7 4b 08       	movzwl 0x8(%rbx),%r9d
ffffffff800085ae:	4c 8d 45 94          	lea    -0x6c(%rbp),%r8
        dst[pos] = '\0';
ffffffff800085b2:	48 01 fe             	add    %rdi,%rsi
ffffffff800085b5:	48 89 ca             	mov    %rcx,%rdx
ffffffff800085b8:	c6 06 00             	movb   $0x0,(%rsi)
        for (int i = digits - 1; i >= 0; i--) { tmp[i] = hex[val & 0xF]; val >>= 4; }
ffffffff800085bb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff800085c0:	45 89 ca             	mov    %r9d,%r10d
ffffffff800085c3:	48 83 ea 01          	sub    $0x1,%rdx
ffffffff800085c7:	41 c1 e9 04          	shr    $0x4,%r9d
ffffffff800085cb:	41 83 e2 0f          	and    $0xf,%r10d
ffffffff800085cf:	45 0f b6 92 bd a3 02 	movzbl -0x7ffd5c43(%r10),%r10d
ffffffff800085d6:	80 
ffffffff800085d7:	44 88 52 04          	mov    %r10b,0x4(%rdx)
ffffffff800085db:	49 39 d0             	cmp    %rdx,%r8
ffffffff800085de:	75 e0                	jne    ffffffff800085c0 <SyscallDispatch+0x580>
        for (int i = 0; i < digits && pos < max - 1; i++) dst[pos++] = tmp[i];
ffffffff800085e0:	83 f8 2e             	cmp    $0x2e,%eax
ffffffff800085e3:	0f 8f c3 00 00 00    	jg     ffffffff800086ac <SyscallDispatch+0x66c>
ffffffff800085e9:	83 c0 01             	add    $0x1,%eax
ffffffff800085ec:	be 01 00 00 00       	mov    $0x1,%esi
ffffffff800085f1:	4c 8d 4d 97          	lea    -0x69(%rbp),%r9
ffffffff800085f5:	48 98                	cltq
ffffffff800085f7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff800085fe:	00 00 
ffffffff80008600:	48 83 fe 04          	cmp    $0x4,%rsi
ffffffff80008604:	41 0f b6 14 31       	movzbl (%r9,%rsi,1),%edx
ffffffff80008609:	41 0f 95 c6          	setne  %r14b
ffffffff8000860d:	83 f8 2e             	cmp    $0x2e,%eax
ffffffff80008610:	41 0f 9e c2          	setle  %r10b
ffffffff80008614:	41 88 14 03          	mov    %dl,(%r11,%rax,1)
ffffffff80008618:	48 83 c6 01          	add    $0x1,%rsi
ffffffff8000861c:	48 89 c2             	mov    %rax,%rdx
ffffffff8000861f:	48 83 c0 01          	add    $0x1,%rax
ffffffff80008623:	45 84 d6             	test   %r10b,%r14b
ffffffff80008626:	75 d8                	jne    ffffffff80008600 <SyscallDispatch+0x5c0>
        dst[pos] = '\0';
ffffffff80008628:	4c 63 ca             	movslq %edx,%r9
        for (int i = 0; i < digits && pos < max - 1; i++) dst[pos++] = tmp[i];
ffffffff8000862b:	89 d0                	mov    %edx,%eax
        dst[pos] = '\0';
ffffffff8000862d:	4a 8d 34 0f          	lea    (%rdi,%r9,1),%rsi
ffffffff80008631:	c6 06 00             	movb   $0x0,(%rsi)
        for (int i = 0; src[i] && pos < max - 1; i++) dst[pos++] = src[i];
ffffffff80008634:	83 fa 2f             	cmp    $0x2f,%edx
ffffffff80008637:	74 73                	je     ffffffff800086ac <SyscallDispatch+0x66c>
ffffffff80008639:	8d 42 01             	lea    0x1(%rdx),%eax
ffffffff8000863c:	49 c7 c6 ce a3 02 80 	mov    $0xffffffff8002a3ce,%r14
ffffffff80008643:	be 20 00 00 00       	mov    $0x20,%esi
ffffffff80008648:	48 98                	cltq
ffffffff8000864a:	4d 29 ce             	sub    %r9,%r14
ffffffff8000864d:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80008654:	00 00 00 00 
ffffffff80008658:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000865f:	00 00 00 00 
ffffffff80008663:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000866a:	00 00 00 00 
ffffffff8000866e:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80008675:	00 00 00 00 
ffffffff80008679:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
ffffffff80008680:	41 88 34 03          	mov    %sil,(%r11,%rax,1)
ffffffff80008684:	41 0f b6 34 06       	movzbl (%r14,%rax,1),%esi
ffffffff80008689:	83 f8 2e             	cmp    $0x2e,%eax
ffffffff8000868c:	48 89 c2             	mov    %rax,%rdx
ffffffff8000868f:	41 0f 9e c2          	setle  %r10b
ffffffff80008693:	40 84 f6             	test   %sil,%sil
ffffffff80008696:	41 0f 95 c1          	setne  %r9b
ffffffff8000869a:	48 83 c0 01          	add    $0x1,%rax
ffffffff8000869e:	45 84 ca             	test   %r9b,%r10b
ffffffff800086a1:	75 dd                	jne    ffffffff80008680 <SyscallDispatch+0x640>
ffffffff800086a3:	89 d0                	mov    %edx,%eax
        dst[pos] = '\0';
ffffffff800086a5:	48 63 d2             	movslq %edx,%rdx
ffffffff800086a8:	48 8d 34 17          	lea    (%rdi,%rdx,1),%rsi
ffffffff800086ac:	c6 06 00             	movb   $0x0,(%rsi)
                p = dl_append_hex(detail, p, dev->ProductId, 4, 48);
ffffffff800086af:	0f b7 53 0a          	movzwl 0xa(%rbx),%edx
        for (int i = digits - 1; i >= 0; i--) { tmp[i] = hex[val & 0xF]; val >>= 4; }
ffffffff800086b3:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800086ba:	00 00 00 00 
ffffffff800086be:	66 90                	xchg   %ax,%ax
ffffffff800086c0:	41 89 d1             	mov    %edx,%r9d
ffffffff800086c3:	48 83 e9 01          	sub    $0x1,%rcx
ffffffff800086c7:	c1 ea 04             	shr    $0x4,%edx
ffffffff800086ca:	41 83 e1 0f          	and    $0xf,%r9d
ffffffff800086ce:	45 0f b6 89 bd a3 02 	movzbl -0x7ffd5c43(%r9),%r9d
ffffffff800086d5:	80 
ffffffff800086d6:	44 88 49 04          	mov    %r9b,0x4(%rcx)
ffffffff800086da:	49 39 c8             	cmp    %rcx,%r8
ffffffff800086dd:	75 e1                	jne    ffffffff800086c0 <SyscallDispatch+0x680>
        for (int i = 0; i < digits && pos < max - 1; i++) dst[pos++] = tmp[i];
ffffffff800086df:	83 f8 2e             	cmp    $0x2e,%eax
ffffffff800086e2:	7f 49                	jg     ffffffff8000872d <SyscallDispatch+0x6ed>
ffffffff800086e4:	83 c0 01             	add    $0x1,%eax
ffffffff800086e7:	ba 01 00 00 00       	mov    $0x1,%edx
ffffffff800086ec:	4c 8d 4d 97          	lea    -0x69(%rbp),%r9
ffffffff800086f0:	48 98                	cltq
ffffffff800086f2:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800086f9:	00 00 00 00 
ffffffff800086fd:	0f 1f 00             	nopl   (%rax)
ffffffff80008700:	41 0f b6 0c 11       	movzbl (%r9,%rdx,1),%ecx
ffffffff80008705:	48 83 fa 04          	cmp    $0x4,%rdx
ffffffff80008709:	49 89 c0             	mov    %rax,%r8
ffffffff8000870c:	40 0f 95 c6          	setne  %sil
ffffffff80008710:	83 f8 2e             	cmp    $0x2e,%eax
ffffffff80008713:	41 88 0c 03          	mov    %cl,(%r11,%rax,1)
ffffffff80008717:	0f 9e c1             	setle  %cl
ffffffff8000871a:	48 83 c0 01          	add    $0x1,%rax
ffffffff8000871e:	48 83 c2 01          	add    $0x1,%rdx
ffffffff80008722:	40 84 ce             	test   %cl,%sil
ffffffff80008725:	75 d9                	jne    ffffffff80008700 <SyscallDispatch+0x6c0>
        dst[pos] = '\0';
ffffffff80008727:	49 63 f0             	movslq %r8d,%rsi
ffffffff8000872a:	48 01 fe             	add    %rdi,%rsi
            buf[count].category = cat;
ffffffff8000872d:	49 63 c7             	movslq %r15d,%rax
ffffffff80008730:	48 8b 5d 88          	mov    -0x78(%rbp),%rbx
        dst[pos] = '\0';
ffffffff80008734:	c6 06 00             	movb   $0x0,(%rsi)
            buf[count].category = cat;
ffffffff80008737:	48 8d 04 80          	lea    (%rax,%rax,4),%rax
ffffffff8000873b:	48 8d 04 80          	lea    (%rax,%rax,4),%rax
ffffffff8000873f:	48 8d 0c 83          	lea    (%rbx,%rax,4),%rcx
ffffffff80008743:	31 c0                	xor    %eax,%eax
ffffffff80008745:	c7 01 04 00 00 00    	movl   $0x4,(%rcx)
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff8000874b:	41 0f b6 54 05 00    	movzbl 0x0(%r13,%rax,1),%edx
ffffffff80008751:	84 d2                	test   %dl,%dl
ffffffff80008753:	74 0e                	je     ffffffff80008763 <SyscallDispatch+0x723>
ffffffff80008755:	88 54 01 04          	mov    %dl,0x4(%rcx,%rax,1)
ffffffff80008759:	48 83 c0 01          	add    $0x1,%rax
ffffffff8000875d:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80008761:	75 e8                	jne    ffffffff8000874b <SyscallDispatch+0x70b>
        dst[i] = '\0';
ffffffff80008763:	c6 44 01 04 00       	movb   $0x0,0x4(%rcx,%rax,1)
            dl_strcpy(buf[count].detail, detail, 48);
ffffffff80008768:	31 c0                	xor    %eax,%eax
ffffffff8000876a:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80008771:	00 00 00 00 
ffffffff80008775:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000877c:	00 00 00 00 
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80008780:	0f b6 14 07          	movzbl (%rdi,%rax,1),%edx
ffffffff80008784:	84 d2                	test   %dl,%dl
ffffffff80008786:	74 0e                	je     ffffffff80008796 <SyscallDispatch+0x756>
ffffffff80008788:	88 54 01 34          	mov    %dl,0x34(%rcx,%rax,1)
ffffffff8000878c:	48 83 c0 01          	add    $0x1,%rax
ffffffff80008790:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80008794:	75 ea                	jne    ffffffff80008780 <SyscallDispatch+0x740>
        dst[i] = '\0';
ffffffff80008796:	c6 44 01 34 00       	movb   $0x0,0x34(%rcx,%rax,1)
            count++;
ffffffff8000879b:	41 83 c7 01          	add    $0x1,%r15d
ffffffff8000879f:	e9 14 fd ff ff       	jmp    ffffffff800084b8 <SyscallDispatch+0x478>
ffffffff800087a4:	0f 1f 40 00          	nopl   0x0(%rax)
                return (int64_t)Sys_Kill((int)frame->arg1);
ffffffff800087a8:	48 8b 5f 58          	mov    0x58(%rdi),%rbx
ffffffff800087ac:	41 89 dc             	mov    %ebx,%r12d
        if (pid == 0) return -1;
ffffffff800087af:	85 db                	test   %ebx,%ebx
ffffffff800087b1:	0f 84 69 0f 00 00    	je     ffffffff80009720 <SyscallDispatch+0x16e0>
        if (pid == Sched::GetCurrentPid()) return -1;
ffffffff800087b7:	e8 04 97 01 00       	call   ffffffff80021ec0 <_ZN5Sched13GetCurrentPidEv>
ffffffff800087bc:	39 d8                	cmp    %ebx,%eax
ffffffff800087be:	0f 84 5c 0f 00 00    	je     ffffffff80009720 <SyscallDispatch+0x16e0>
        auto* proc = Sched::GetProcessByPid(pid);
ffffffff800087c4:	89 df                	mov    %ebx,%edi
ffffffff800087c6:	e8 b5 99 01 00       	call   ffffffff80022180 <_ZN5Sched15GetProcessByPidEi>
ffffffff800087cb:	48 89 c3             	mov    %rax,%rbx
        if (!proc) return -1;
ffffffff800087ce:	48 85 c0             	test   %rax,%rax
ffffffff800087d1:	0f 84 49 0f 00 00    	je     ffffffff80009720 <SyscallDispatch+0x16e0>
        WinServer::CleanupProcess(pid);
ffffffff800087d7:	44 89 e7             	mov    %r12d,%edi
ffffffff800087da:	e8 d1 24 00 00       	call   ffffffff8000acb0 <_ZN9WinServer14CleanupProcessEi>
        proc->state = Sched::ProcessState::Terminated;
ffffffff800087df:	c7 43 04 03 00 00 00 	movl   $0x3,0x4(%rbx)
        return 0;
ffffffff800087e6:	31 c0                	xor    %eax,%eax
                return (int64_t)Sys_Kill((int)frame->arg1);
ffffffff800087e8:	e9 95 f8 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff800087ed:	0f 1f 00             	nopl   (%rax)
                return (int64_t)Sys_WinSendEvent((int)frame->arg1, (const WinEvent*)frame->arg2);
ffffffff800087f0:	48 8b 77 50          	mov    0x50(%rdi),%rsi
ffffffff800087f4:	8b 7f 58             	mov    0x58(%rdi),%edi
        if (event == nullptr) return -1;
ffffffff800087f7:	48 85 f6             	test   %rsi,%rsi
ffffffff800087fa:	0f 84 2c 19 00 00    	je     ffffffff8000a12c <SyscallDispatch+0x20ec>
        return WinServer::SendEvent(windowId, event);
ffffffff80008800:	e8 2b 21 00 00       	call   ffffffff8000a930 <_ZN9WinServer9SendEventEiPKN6Zenith8WinEventE>
                return (int64_t)Sys_WinGetScale();
ffffffff80008805:	48 98                	cltq
ffffffff80008807:	e9 76 f8 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff8000880c:	0f 1f 40 00          	nopl   0x0(%rax)
                return (int64_t)Sys_WinMap((int)frame->arg1);
ffffffff80008810:	48 8b 5f 58          	mov    0x58(%rdi),%rbx
        auto* proc = Sched::GetCurrentProcessPtr();
ffffffff80008814:	e8 d7 96 01 00       	call   ffffffff80021ef0 <_ZN5Sched20GetCurrentProcessPtrEv>
        if (proc == nullptr) return 0;
ffffffff80008819:	48 85 c0             	test   %rax,%rax
ffffffff8000881c:	0f 84 5e f8 ff ff    	je     ffffffff80008080 <SyscallDispatch+0x40>
        return WinServer::Map(windowId, proc->pid, proc->pml4Phys, proc->heapNext);
ffffffff80008822:	48 8b 50 68          	mov    0x68(%rax),%rdx
ffffffff80008826:	8b 30                	mov    (%rax),%esi
    }
ffffffff80008828:	48 8d 65 d8          	lea    -0x28(%rbp),%rsp
        return WinServer::Map(windowId, proc->pid, proc->pml4Phys, proc->heapNext);
ffffffff8000882c:	89 df                	mov    %ebx,%edi
ffffffff8000882e:	48 8d 88 80 00 00 00 	lea    0x80(%rax),%rcx
    }
ffffffff80008835:	5b                   	pop    %rbx
ffffffff80008836:	41 5c                	pop    %r12
ffffffff80008838:	41 5d                	pop    %r13
ffffffff8000883a:	41 5e                	pop    %r14
ffffffff8000883c:	41 5f                	pop    %r15
ffffffff8000883e:	5d                   	pop    %rbp
        return WinServer::Map(windowId, proc->pid, proc->pml4Phys, proc->heapNext);
ffffffff8000883f:	e9 7c 1f 00 00       	jmp    ffffffff8000a7c0 <_ZN9WinServer3MapEiimRm>
ffffffff80008844:	0f 1f 40 00          	nopl   0x0(%rax)
                                              (int)frame->arg3, (WinCreateResult*)frame->arg4);
ffffffff80008848:	48 8b 5f 40          	mov    0x40(%rdi),%rbx
                return (int64_t)Sys_WinCreate((const char*)frame->arg1, (int)frame->arg2,
ffffffff8000884c:	4c 8b 6f 48          	mov    0x48(%rdi),%r13
ffffffff80008850:	44 8b 67 50          	mov    0x50(%rdi),%r12d
ffffffff80008854:	4c 8b 77 58          	mov    0x58(%rdi),%r14
        if (result == nullptr || title == nullptr) return -1;
ffffffff80008858:	48 85 db             	test   %rbx,%rbx
ffffffff8000885b:	0f 84 bf 0e 00 00    	je     ffffffff80009720 <SyscallDispatch+0x16e0>
ffffffff80008861:	4d 85 f6             	test   %r14,%r14
ffffffff80008864:	0f 84 b6 0e 00 00    	je     ffffffff80009720 <SyscallDispatch+0x16e0>
        auto* proc = Sched::GetCurrentProcessPtr();
ffffffff8000886a:	e8 81 96 01 00       	call   ffffffff80021ef0 <_ZN5Sched20GetCurrentProcessPtrEv>
        if (proc == nullptr) return -1;
ffffffff8000886f:	48 85 c0             	test   %rax,%rax
ffffffff80008872:	0f 84 a8 0e 00 00    	je     ffffffff80009720 <SyscallDispatch+0x16e0>
        int id = WinServer::Create(proc->pid, proc->pml4Phys, title, w, h,
ffffffff80008878:	48 83 ec 08          	sub    $0x8,%rsp
ffffffff8000887c:	48 8d 55 a0          	lea    -0x60(%rbp),%rdx
ffffffff80008880:	8b 38                	mov    (%rax),%edi
ffffffff80008882:	45 89 e8             	mov    %r13d,%r8d
        uint64_t outVa = 0;
ffffffff80008885:	48 c7 45 a0 00 00 00 	movq   $0x0,-0x60(%rbp)
ffffffff8000888c:	00 
        int id = WinServer::Create(proc->pid, proc->pml4Phys, title, w, h,
ffffffff8000888d:	48 8b 70 68          	mov    0x68(%rax),%rsi
ffffffff80008891:	4c 8d 88 80 00 00 00 	lea    0x80(%rax),%r9
ffffffff80008898:	44 89 e1             	mov    %r12d,%ecx
ffffffff8000889b:	52                   	push   %rdx
ffffffff8000889c:	4c 89 f2             	mov    %r14,%rdx
ffffffff8000889f:	e8 7c 19 00 00       	call   ffffffff8000a220 <_ZN9WinServer6CreateEimPKciiRmS2_>
        result->id = id;
ffffffff800088a4:	89 03                	mov    %eax,(%rbx)
        result->pixelVa = (id >= 0) ? outVa : 0;
ffffffff800088a6:	41 5d                	pop    %r13
ffffffff800088a8:	41 5e                	pop    %r14
ffffffff800088aa:	85 c0                	test   %eax,%eax
ffffffff800088ac:	0f 88 65 0e 00 00    	js     ffffffff80009717 <SyscallDispatch+0x16d7>
ffffffff800088b2:	48 8b 45 a0          	mov    -0x60(%rbp),%rax
ffffffff800088b6:	48 89 43 08          	mov    %rax,0x8(%rbx)
        return id >= 0 ? 0 : -1;
ffffffff800088ba:	31 c0                	xor    %eax,%eax
                                              (int)frame->arg3, (WinCreateResult*)frame->arg4);
ffffffff800088bc:	e9 c1 f7 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff800088c1:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
                return (int64_t)Sys_ChildIoSetTermsz((int)frame->arg1, (int)frame->arg2, (int)frame->arg3);
ffffffff800088c8:	48 8b 5f 48          	mov    0x48(%rdi),%rbx
ffffffff800088cc:	4c 8b 67 50          	mov    0x50(%rdi),%r12
        auto* child = Sched::GetProcessByPid(childPid);
ffffffff800088d0:	8b 7f 58             	mov    0x58(%rdi),%edi
ffffffff800088d3:	e8 a8 98 01 00       	call   ffffffff80022180 <_ZN5Sched15GetProcessByPidEi>
        if (child == nullptr || !child->redirected) return -1;
ffffffff800088d8:	48 85 c0             	test   %rax,%rax
ffffffff800088db:	0f 84 3f 0e 00 00    	je     ffffffff80009720 <SyscallDispatch+0x16e0>
ffffffff800088e1:	80 b8 88 01 00 00 00 	cmpb   $0x0,0x188(%rax)
ffffffff800088e8:	0f 84 32 0e 00 00    	je     ffffffff80009720 <SyscallDispatch+0x16e0>
        child->termCols = cols;
ffffffff800088ee:	44 89 a0 38 03 00 00 	mov    %r12d,0x338(%rax)
        child->termRows = rows;
ffffffff800088f5:	89 98 3c 03 00 00    	mov    %ebx,0x33c(%rax)
        return 0;
ffffffff800088fb:	31 c0                	xor    %eax,%eax
ffffffff800088fd:	e9 80 f7 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80008902:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
                return (int64_t)Sys_ChildIoWriteKey((int)frame->arg1, (const KeyEvent*)frame->arg2);
ffffffff80008908:	48 8b 5f 50          	mov    0x50(%rdi),%rbx
ffffffff8000890c:	8b 7f 58             	mov    0x58(%rdi),%edi
        if (key == nullptr) return -1;
ffffffff8000890f:	48 85 db             	test   %rbx,%rbx
ffffffff80008912:	0f 84 08 0e 00 00    	je     ffffffff80009720 <SyscallDispatch+0x16e0>
        auto* child = Sched::GetProcessByPid(childPid);
ffffffff80008918:	e8 63 98 01 00       	call   ffffffff80022180 <_ZN5Sched15GetProcessByPidEi>
        if (child == nullptr || !child->redirected) return -1;
ffffffff8000891d:	48 85 c0             	test   %rax,%rax
ffffffff80008920:	0f 84 fa 0d 00 00    	je     ffffffff80009720 <SyscallDispatch+0x16e0>
ffffffff80008926:	80 b8 88 01 00 00 00 	cmpb   $0x0,0x188(%rax)
ffffffff8000892d:	0f 84 ed 0d 00 00    	je     ffffffff80009720 <SyscallDispatch+0x16e0>
        child->keyBuf[child->keyHead] = *key;
ffffffff80008933:	8b 88 30 03 00 00    	mov    0x330(%rax),%ecx
ffffffff80008939:	8b 33                	mov    (%rbx),%esi
ffffffff8000893b:	48 89 ca             	mov    %rcx,%rdx
ffffffff8000893e:	48 8d 0c 49          	lea    (%rcx,%rcx,2),%rcx
ffffffff80008942:	48 8d 0c 48          	lea    (%rax,%rcx,2),%rcx
        child->keyHead = (child->keyHead + 1) % 64;
ffffffff80008946:	83 c2 01             	add    $0x1,%edx
        child->keyBuf[child->keyHead] = *key;
ffffffff80008949:	89 b1 b0 01 00 00    	mov    %esi,0x1b0(%rcx)
ffffffff8000894f:	0f b7 73 04          	movzwl 0x4(%rbx),%esi
        child->keyHead = (child->keyHead + 1) % 64;
ffffffff80008953:	83 e2 3f             	and    $0x3f,%edx
        child->keyBuf[child->keyHead] = *key;
ffffffff80008956:	66 89 b1 b4 01 00 00 	mov    %si,0x1b4(%rcx)
        child->keyHead = (child->keyHead + 1) % 64;
ffffffff8000895d:	89 90 30 03 00 00    	mov    %edx,0x330(%rax)
        return 0;
ffffffff80008963:	31 c0                	xor    %eax,%eax
                return (int64_t)Sys_ChildIoWriteKey((int)frame->arg1, (const KeyEvent*)frame->arg2);
ffffffff80008965:	e9 18 f7 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff8000896a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
                return (int64_t)Sys_ChildIoWrite((int)frame->arg1, (const char*)frame->arg2, (int)frame->arg3);
ffffffff80008970:	4c 8b 67 48          	mov    0x48(%rdi),%r12
ffffffff80008974:	4c 8b 6f 50          	mov    0x50(%rdi),%r13
        auto* child = Sched::GetProcessByPid(childPid);
ffffffff80008978:	8b 7f 58             	mov    0x58(%rdi),%edi
                return (int64_t)Sys_ChildIoWrite((int)frame->arg1, (const char*)frame->arg2, (int)frame->arg3);
ffffffff8000897b:	44 89 e3             	mov    %r12d,%ebx
        auto* child = Sched::GetProcessByPid(childPid);
ffffffff8000897e:	e8 fd 97 01 00       	call   ffffffff80022180 <_ZN5Sched15GetProcessByPidEi>
ffffffff80008983:	48 89 c2             	mov    %rax,%rdx
        if (child == nullptr || !child->redirected || !child->inBuf) return -1;
ffffffff80008986:	48 85 c0             	test   %rax,%rax
ffffffff80008989:	0f 84 6d 17 00 00    	je     ffffffff8000a0fc <SyscallDispatch+0x20bc>
ffffffff8000898f:	80 b8 88 01 00 00 00 	cmpb   $0x0,0x188(%rax)
ffffffff80008996:	0f 84 60 17 00 00    	je     ffffffff8000a0fc <SyscallDispatch+0x20bc>
ffffffff8000899c:	48 8b 80 a0 01 00 00 	mov    0x1a0(%rax),%rax
ffffffff800089a3:	48 85 c0             	test   %rax,%rax
ffffffff800089a6:	0f 84 50 17 00 00    	je     ffffffff8000a0fc <SyscallDispatch+0x20bc>
        for (int i = 0; i < len; i++) {
ffffffff800089ac:	45 85 e4             	test   %r12d,%r12d
ffffffff800089af:	0f 8e f4 01 00 00    	jle    ffffffff80008ba9 <SyscallDispatch+0xb69>
        buf[head] = byte;
ffffffff800089b5:	8b 8a a8 01 00 00    	mov    0x1a8(%rdx),%ecx
ffffffff800089bb:	41 0f b6 75 00       	movzbl 0x0(%r13),%esi
ffffffff800089c0:	40 88 34 08          	mov    %sil,(%rax,%rcx,1)
        head = (head + 1) % size;
ffffffff800089c4:	8b 82 a8 01 00 00    	mov    0x1a8(%rdx),%eax
ffffffff800089ca:	83 c0 01             	add    $0x1,%eax
ffffffff800089cd:	25 ff 0f 00 00       	and    $0xfff,%eax
ffffffff800089d2:	89 82 a8 01 00 00    	mov    %eax,0x1a8(%rdx)
        for (int i = 0; i < len; i++) {
ffffffff800089d8:	41 83 fc 01          	cmp    $0x1,%r12d
ffffffff800089dc:	0f 84 c7 01 00 00    	je     ffffffff80008ba9 <SyscallDispatch+0xb69>
ffffffff800089e2:	41 8d 74 24 fe       	lea    -0x2(%r12),%esi
ffffffff800089e7:	49 8d 4d 01          	lea    0x1(%r13),%rcx
ffffffff800089eb:	4d 8d 44 35 02       	lea    0x2(%r13,%rsi,1),%r8
ffffffff800089f0:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800089f7:	00 00 00 00 
ffffffff800089fb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        buf[head] = byte;
ffffffff80008a00:	0f b6 39             	movzbl (%rcx),%edi
ffffffff80008a03:	48 8b b2 a0 01 00 00 	mov    0x1a0(%rdx),%rsi
        for (int i = 0; i < len; i++) {
ffffffff80008a0a:	48 83 c1 01          	add    $0x1,%rcx
        buf[head] = byte;
ffffffff80008a0e:	40 88 3c 06          	mov    %dil,(%rsi,%rax,1)
        head = (head + 1) % size;
ffffffff80008a12:	8b 82 a8 01 00 00    	mov    0x1a8(%rdx),%eax
ffffffff80008a18:	83 c0 01             	add    $0x1,%eax
ffffffff80008a1b:	25 ff 0f 00 00       	and    $0xfff,%eax
ffffffff80008a20:	89 82 a8 01 00 00    	mov    %eax,0x1a8(%rdx)
        for (int i = 0; i < len; i++) {
ffffffff80008a26:	4c 39 c1             	cmp    %r8,%rcx
ffffffff80008a29:	75 d5                	jne    ffffffff80008a00 <SyscallDispatch+0x9c0>
ffffffff80008a2b:	e9 79 01 00 00       	jmp    ffffffff80008ba9 <SyscallDispatch+0xb69>
                return (int64_t)Sys_ChildIoRead((int)frame->arg1, (char*)frame->arg2, (int)frame->arg3);
ffffffff80008a30:	4c 8b 6f 48          	mov    0x48(%rdi),%r13
ffffffff80008a34:	4c 8b 67 50          	mov    0x50(%rdi),%r12
        auto* child = Sched::GetProcessByPid(childPid);
ffffffff80008a38:	8b 7f 58             	mov    0x58(%rdi),%edi
                return (int64_t)Sys_ChildIoRead((int)frame->arg1, (char*)frame->arg2, (int)frame->arg3);
ffffffff80008a3b:	44 89 eb             	mov    %r13d,%ebx
        auto* child = Sched::GetProcessByPid(childPid);
ffffffff80008a3e:	e8 3d 97 01 00       	call   ffffffff80022180 <_ZN5Sched15GetProcessByPidEi>
        if (child == nullptr || !child->redirected || !child->outBuf) return -1;
ffffffff80008a43:	48 85 c0             	test   %rax,%rax
ffffffff80008a46:	0f 84 d4 0c 00 00    	je     ffffffff80009720 <SyscallDispatch+0x16e0>
ffffffff80008a4c:	80 b8 88 01 00 00 00 	cmpb   $0x0,0x188(%rax)
ffffffff80008a53:	0f 84 c7 0c 00 00    	je     ffffffff80009720 <SyscallDispatch+0x16e0>
ffffffff80008a59:	4c 8b 88 90 01 00 00 	mov    0x190(%rax),%r9
ffffffff80008a60:	4d 85 c9             	test   %r9,%r9
ffffffff80008a63:	0f 84 b7 0c 00 00    	je     ffffffff80009720 <SyscallDispatch+0x16e0>
        while (tail != head && count < maxLen) {
ffffffff80008a69:	8b 88 9c 01 00 00    	mov    0x19c(%rax),%ecx
ffffffff80008a6f:	39 88 98 01 00 00    	cmp    %ecx,0x198(%rax)
ffffffff80008a75:	0f 84 05 f6 ff ff    	je     ffffffff80008080 <SyscallDispatch+0x40>
ffffffff80008a7b:	45 85 ed             	test   %r13d,%r13d
ffffffff80008a7e:	0f 8e fc f5 ff ff    	jle    ffffffff80008080 <SyscallDispatch+0x40>
ffffffff80008a84:	be 01 00 00 00       	mov    $0x1,%esi
ffffffff80008a89:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80008a90:	00 00 00 00 
ffffffff80008a94:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80008a9b:	00 00 00 00 
ffffffff80008a9f:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80008aa6:	00 00 00 00 
ffffffff80008aaa:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80008ab1:	00 00 00 00 
ffffffff80008ab5:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80008abc:	00 00 00 00 
            out[count++] = buf[tail];
ffffffff80008ac0:	41 0f b6 14 09       	movzbl (%r9,%rcx,1),%edx
ffffffff80008ac5:	41 88 54 34 ff       	mov    %dl,-0x1(%r12,%rsi,1)
            tail = (tail + 1) % size;
ffffffff80008aca:	8b 88 9c 01 00 00    	mov    0x19c(%rax),%ecx
ffffffff80008ad0:	48 89 f2             	mov    %rsi,%rdx
ffffffff80008ad3:	83 c1 01             	add    $0x1,%ecx
ffffffff80008ad6:	81 e1 ff 0f 00 00    	and    $0xfff,%ecx
        while (tail != head && count < maxLen) {
ffffffff80008adc:	39 88 98 01 00 00    	cmp    %ecx,0x198(%rax)
ffffffff80008ae2:	41 0f 95 c0          	setne  %r8b
ffffffff80008ae6:	39 f3                	cmp    %esi,%ebx
            tail = (tail + 1) % size;
ffffffff80008ae8:	89 88 9c 01 00 00    	mov    %ecx,0x19c(%rax)
        while (tail != head && count < maxLen) {
ffffffff80008aee:	40 0f 9f c7          	setg   %dil
ffffffff80008af2:	48 83 c6 01          	add    $0x1,%rsi
ffffffff80008af6:	41 84 f8             	test   %dil,%r8b
ffffffff80008af9:	75 c5                	jne    ffffffff80008ac0 <SyscallDispatch+0xa80>
                return (int64_t)Sys_ChildIoRead((int)frame->arg1, (char*)frame->arg2, (int)frame->arg3);
ffffffff80008afb:	48 63 c2             	movslq %edx,%rax
ffffffff80008afe:	e9 7f f5 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80008b03:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        int childPid = Sched::Spawn(path, args);
ffffffff80008b08:	48 8b 77 50          	mov    0x50(%rdi),%rsi
ffffffff80008b0c:	48 8b 7f 58          	mov    0x58(%rdi),%rdi
ffffffff80008b10:	e8 2b 8b 01 00       	call   ffffffff80021640 <_ZN5Sched5SpawnEPKcS1_>
ffffffff80008b15:	89 c3                	mov    %eax,%ebx
        if (childPid < 0) return -1;
ffffffff80008b17:	85 c0                	test   %eax,%eax
ffffffff80008b19:	0f 88 dd 15 00 00    	js     ffffffff8000a0fc <SyscallDispatch+0x20bc>
        auto* child = Sched::GetProcessByPid(childPid);
ffffffff80008b1f:	89 c7                	mov    %eax,%edi
ffffffff80008b21:	e8 5a 96 01 00       	call   ffffffff80022180 <_ZN5Sched15GetProcessByPidEi>
ffffffff80008b26:	49 89 c4             	mov    %rax,%r12
        if (child == nullptr) return -1;
ffffffff80008b29:	48 85 c0             	test   %rax,%rax
ffffffff80008b2c:	0f 84 ca 15 00 00    	je     ffffffff8000a0fc <SyscallDispatch+0x20bc>
        void* outPage = Memory::g_pfa->AllocateZeroed();
ffffffff80008b32:	48 8b 3d 77 3e 14 00 	mov    0x143e77(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff80008b39:	e8 d2 26 01 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
        void* inPage = Memory::g_pfa->AllocateZeroed();
ffffffff80008b3e:	48 8b 3d 6b 3e 14 00 	mov    0x143e6b(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
        void* outPage = Memory::g_pfa->AllocateZeroed();
ffffffff80008b45:	49 89 c5             	mov    %rax,%r13
        void* inPage = Memory::g_pfa->AllocateZeroed();
ffffffff80008b48:	e8 c3 26 01 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
        if (!outPage || !inPage) return -1;
ffffffff80008b4d:	4d 85 ed             	test   %r13,%r13
ffffffff80008b50:	0f 84 a6 15 00 00    	je     ffffffff8000a0fc <SyscallDispatch+0x20bc>
ffffffff80008b56:	48 85 c0             	test   %rax,%rax
ffffffff80008b59:	0f 84 9d 15 00 00    	je     ffffffff8000a0fc <SyscallDispatch+0x20bc>
        child->outBuf = (uint8_t*)outPage;
ffffffff80008b5f:	4d 89 ac 24 90 01 00 	mov    %r13,0x190(%r12)
ffffffff80008b66:	00 
        child->inBuf = (uint8_t*)inPage;
ffffffff80008b67:	49 89 84 24 a0 01 00 	mov    %rax,0x1a0(%r12)
ffffffff80008b6e:	00 
        child->outHead = 0;
ffffffff80008b6f:	49 c7 84 24 98 01 00 	movq   $0x0,0x198(%r12)
ffffffff80008b76:	00 00 00 00 00 
        child->inHead = 0;
ffffffff80008b7b:	49 c7 84 24 a8 01 00 	movq   $0x0,0x1a8(%r12)
ffffffff80008b82:	00 00 00 00 00 
        child->keyHead = 0;
ffffffff80008b87:	49 c7 84 24 30 03 00 	movq   $0x0,0x330(%r12)
ffffffff80008b8e:	00 00 00 00 00 
        child->redirected = true;
ffffffff80008b93:	41 c6 84 24 88 01 00 	movb   $0x1,0x188(%r12)
ffffffff80008b9a:	00 01 
        child->parentPid = Sched::GetCurrentPid();
ffffffff80008b9c:	e8 1f 93 01 00       	call   ffffffff80021ec0 <_ZN5Sched13GetCurrentPidEv>
ffffffff80008ba1:	41 89 84 24 8c 01 00 	mov    %eax,0x18c(%r12)
ffffffff80008ba8:	00 
                return (int64_t)Sys_ProcList((ProcInfo*)frame->arg1, (int)frame->arg2);
ffffffff80008ba9:	48 63 c3             	movslq %ebx,%rax
ffffffff80008bac:	e9 d1 f4 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80008bb1:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        Drivers::PS2::Mouse::SetBounds(maxX, maxY);
ffffffff80008bb8:	8b 77 50             	mov    0x50(%rdi),%esi
ffffffff80008bbb:	8b 7f 58             	mov    0x58(%rdi),%edi
ffffffff80008bbe:	e8 8d 8a 00 00       	call   ffffffff80011650 <_ZN7Drivers3PS25Mouse9SetBoundsEii>
                return 0;
ffffffff80008bc3:	e9 b8 f4 ff ff       	jmp    ffffffff80008080 <SyscallDispatch+0x40>
ffffffff80008bc8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80008bcf:	00 
                Sys_MouseState((MouseState*)frame->arg1);
ffffffff80008bd0:	48 8b 5f 58          	mov    0x58(%rdi),%rbx
        if (out == nullptr) return;
ffffffff80008bd4:	48 85 db             	test   %rbx,%rbx
ffffffff80008bd7:	0f 84 a3 f4 ff ff    	je     ffffffff80008080 <SyscallDispatch+0x40>
        auto state = Drivers::PS2::Mouse::GetMouseState();
ffffffff80008bdd:	e8 de 89 00 00       	call   ffffffff800115c0 <_ZN7Drivers3PS25Mouse13GetMouseStateEv>
ffffffff80008be2:	48 89 c1             	mov    %rax,%rcx
        out->buttons = state.Buttons;
ffffffff80008be5:	48 89 d0             	mov    %rdx,%rax
        out->scrollDelta = state.ScrollDelta;
ffffffff80008be8:	89 53 08             	mov    %edx,0x8(%rbx)
        out->buttons = state.Buttons;
ffffffff80008beb:	48 c1 e8 20          	shr    $0x20,%rax
        out->x = state.X;
ffffffff80008bef:	48 89 0b             	mov    %rcx,(%rbx)
        out->buttons = state.Buttons;
ffffffff80008bf2:	88 43 0c             	mov    %al,0xc(%rbx)
ffffffff80008bf5:	e9 86 f4 ff ff       	jmp    ffffffff80008080 <SyscallDispatch+0x40>
ffffffff80008bfa:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
                return (int64_t)Sys_WinEnum((WinInfo*)frame->arg1, (int)frame->arg2);
ffffffff80008c00:	48 8b 57 50          	mov    0x50(%rdi),%rdx
ffffffff80008c04:	48 8b 7f 58          	mov    0x58(%rdi),%rdi
ffffffff80008c08:	89 d6                	mov    %edx,%esi
        if (outArray == nullptr || maxCount <= 0) return 0;
ffffffff80008c0a:	48 85 ff             	test   %rdi,%rdi
ffffffff80008c0d:	0f 84 6d f4 ff ff    	je     ffffffff80008080 <SyscallDispatch+0x40>
ffffffff80008c13:	85 d2                	test   %edx,%edx
ffffffff80008c15:	0f 8e 65 f4 ff ff    	jle    ffffffff80008080 <SyscallDispatch+0x40>
        return WinServer::Enumerate(outArray, maxCount);
ffffffff80008c1b:	e8 e0 1a 00 00       	call   ffffffff8000a700 <_ZN9WinServer9EnumerateEPN6Zenith7WinInfoEi>
                return (int64_t)Sys_WinEnum((WinInfo*)frame->arg1, (int)frame->arg2);
ffffffff80008c20:	48 98                	cltq
        return WinServer::Enumerate(outArray, maxCount);
ffffffff80008c22:	e9 5b f4 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80008c27:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff80008c2e:	00 00 
                return (int64_t)Sys_WinPoll((int)frame->arg1, (WinEvent*)frame->arg2);
ffffffff80008c30:	48 8b 5f 50          	mov    0x50(%rdi),%rbx
ffffffff80008c34:	44 8b 67 58          	mov    0x58(%rdi),%r12d
        if (outEvent == nullptr) return -1;
ffffffff80008c38:	48 85 db             	test   %rbx,%rbx
ffffffff80008c3b:	0f 84 eb 14 00 00    	je     ffffffff8000a12c <SyscallDispatch+0x20ec>
        return WinServer::Poll(windowId, Sched::GetCurrentPid(), outEvent);
ffffffff80008c41:	e8 7a 92 01 00       	call   ffffffff80021ec0 <_ZN5Sched13GetCurrentPidEv>
ffffffff80008c46:	48 89 da             	mov    %rbx,%rdx
ffffffff80008c49:	44 89 e7             	mov    %r12d,%edi
ffffffff80008c4c:	89 c6                	mov    %eax,%esi
ffffffff80008c4e:	e8 1d 1a 00 00       	call   ffffffff8000a670 <_ZN9WinServer4PollEiiPN6Zenith8WinEventE>
                return (int64_t)Sys_WinGetScale();
ffffffff80008c53:	48 98                	cltq
ffffffff80008c55:	e9 28 f4 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80008c5a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
                return (int64_t)Sys_WinPresent((int)frame->arg1);
ffffffff80008c60:	8b 5f 58             	mov    0x58(%rdi),%ebx
        return WinServer::Present(windowId, Sched::GetCurrentPid());
ffffffff80008c63:	e8 58 92 01 00       	call   ffffffff80021ec0 <_ZN5Sched13GetCurrentPidEv>
    }
ffffffff80008c68:	48 8d 65 d8          	lea    -0x28(%rbp),%rsp
        return WinServer::Present(windowId, Sched::GetCurrentPid());
ffffffff80008c6c:	89 df                	mov    %ebx,%edi
ffffffff80008c6e:	89 c6                	mov    %eax,%esi
    }
ffffffff80008c70:	5b                   	pop    %rbx
ffffffff80008c71:	41 5c                	pop    %r12
ffffffff80008c73:	41 5d                	pop    %r13
ffffffff80008c75:	41 5e                	pop    %r14
ffffffff80008c77:	41 5f                	pop    %r15
ffffffff80008c79:	5d                   	pop    %rbp
        return WinServer::Present(windowId, Sched::GetCurrentPid());
ffffffff80008c7a:	e9 91 19 00 00       	jmp    ffffffff8000a610 <_ZN9WinServer7PresentEii>
ffffffff80008c7f:	90                   	nop
                return (int64_t)Sys_WinDestroy((int)frame->arg1);
ffffffff80008c80:	8b 5f 58             	mov    0x58(%rdi),%ebx
        return WinServer::Destroy(windowId, Sched::GetCurrentPid());
ffffffff80008c83:	e8 38 92 01 00       	call   ffffffff80021ec0 <_ZN5Sched13GetCurrentPidEv>
ffffffff80008c88:	89 c6                	mov    %eax,%esi
ffffffff80008c8a:	89 df                	mov    %ebx,%edi
ffffffff80008c8c:	e8 3f 19 00 00       	call   ffffffff8000a5d0 <_ZN9WinServer7DestroyEii>
                return (int64_t)Sys_WinDestroy((int)frame->arg1);
ffffffff80008c91:	48 98                	cltq
ffffffff80008c93:	e9 ea f3 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80008c98:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80008c9f:	00 
                return (int64_t)Sys_ProcList((ProcInfo*)frame->arg1, (int)frame->arg2);
ffffffff80008ca0:	48 8b 57 50          	mov    0x50(%rdi),%rdx
ffffffff80008ca4:	4c 8b 77 58          	mov    0x58(%rdi),%r14
ffffffff80008ca8:	41 89 d5             	mov    %edx,%r13d
        if (buf == nullptr || maxCount <= 0) return 0;
ffffffff80008cab:	4d 85 f6             	test   %r14,%r14
ffffffff80008cae:	0f 84 cc f3 ff ff    	je     ffffffff80008080 <SyscallDispatch+0x40>
ffffffff80008cb4:	85 d2                	test   %edx,%edx
ffffffff80008cb6:	0f 8e c4 f3 ff ff    	jle    ffffffff80008080 <SyscallDispatch+0x40>
        int count = 0;
ffffffff80008cbc:	31 db                	xor    %ebx,%ebx
        for (int i = 0; i < Sched::MaxProcesses && count < maxCount; i++) {
ffffffff80008cbe:	45 31 e4             	xor    %r12d,%r12d
ffffffff80008cc1:	eb 1f                	jmp    ffffffff80008ce2 <SyscallDispatch+0xca2>
ffffffff80008cc3:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff80008cc8:	41 83 c4 01          	add    $0x1,%r12d
ffffffff80008ccc:	41 81 fc 00 01 00 00 	cmp    $0x100,%r12d
ffffffff80008cd3:	0f 84 d0 fe ff ff    	je     ffffffff80008ba9 <SyscallDispatch+0xb69>
ffffffff80008cd9:	41 39 dd             	cmp    %ebx,%r13d
ffffffff80008cdc:	0f 8e c7 fe ff ff    	jle    ffffffff80008ba9 <SyscallDispatch+0xb69>
            auto* proc = Sched::GetProcessSlot(i);
ffffffff80008ce2:	44 89 e7             	mov    %r12d,%edi
ffffffff80008ce5:	e8 f6 94 01 00       	call   ffffffff800221e0 <_ZN5Sched14GetProcessSlotEi>
ffffffff80008cea:	48 89 c1             	mov    %rax,%rcx
            if (!proc || proc->state == Sched::ProcessState::Free) continue;
ffffffff80008ced:	48 85 c0             	test   %rax,%rax
ffffffff80008cf0:	74 d6                	je     ffffffff80008cc8 <SyscallDispatch+0xc88>
ffffffff80008cf2:	8b 40 04             	mov    0x4(%rax),%eax
ffffffff80008cf5:	85 c0                	test   %eax,%eax
ffffffff80008cf7:	74 cf                	je     ffffffff80008cc8 <SyscallDispatch+0xc88>
            buf[count].pid = (int32_t)proc->pid;
ffffffff80008cf9:	48 63 d3             	movslq %ebx,%rdx
            buf[count]._pad[1] = 0;
ffffffff80008cfc:	45 31 c9             	xor    %r9d,%r9d
            buf[count].pid = (int32_t)proc->pid;
ffffffff80008cff:	48 8d 34 92          	lea    (%rdx,%rdx,4),%rsi
ffffffff80008d03:	48 8d 14 72          	lea    (%rdx,%rsi,2),%rdx
ffffffff80008d07:	49 8d 34 d6          	lea    (%r14,%rdx,8),%rsi
ffffffff80008d0b:	8b 11                	mov    (%rcx),%edx
ffffffff80008d0d:	89 16                	mov    %edx,(%rsi)
            buf[count].parentPid = (int32_t)proc->parentPid;
ffffffff80008d0f:	8b 91 8c 01 00 00    	mov    0x18c(%rcx),%edx
            buf[count].state = (uint8_t)proc->state;
ffffffff80008d15:	88 46 08             	mov    %al,0x8(%rsi)
            buf[count]._pad[1] = 0;
ffffffff80008d18:	31 c0                	xor    %eax,%eax
            buf[count].parentPid = (int32_t)proc->parentPid;
ffffffff80008d1a:	89 56 04             	mov    %edx,0x4(%rsi)
            buf[count]._pad[0] = 0;
ffffffff80008d1d:	c6 46 09 00          	movb   $0x0,0x9(%rsi)
            buf[count]._pad[1] = 0;
ffffffff80008d21:	66 44 89 4e 0a       	mov    %r9w,0xa(%rsi)
                for (; j < 63 && proc->name[j]; j++)
ffffffff80008d26:	eb 2a                	jmp    ffffffff80008d52 <SyscallDispatch+0xd12>
ffffffff80008d28:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80008d2f:	00 00 00 00 
ffffffff80008d33:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80008d3a:	00 00 00 00 
ffffffff80008d3e:	66 90                	xchg   %ax,%ax
                    buf[count].name[j] = proc->name[j];
ffffffff80008d40:	88 54 06 0c          	mov    %dl,0xc(%rsi,%rax,1)
                for (; j < 63 && proc->name[j]; j++)
ffffffff80008d44:	48 83 c0 01          	add    $0x1,%rax
ffffffff80008d48:	48 83 f8 3f          	cmp    $0x3f,%rax
ffffffff80008d4c:	0f 84 e8 09 00 00    	je     ffffffff8000973a <SyscallDispatch+0x16fa>
ffffffff80008d52:	0f b6 54 01 08       	movzbl 0x8(%rcx,%rax,1),%edx
ffffffff80008d57:	84 d2                	test   %dl,%dl
ffffffff80008d59:	75 e5                	jne    ffffffff80008d40 <SyscallDispatch+0xd00>
                buf[count].name[j] = '\0';
ffffffff80008d5b:	48 98                	cltq
                ? proc->heapNext - Sched::UserHeapBase : 0;
ffffffff80008d5d:	ba 00 00 00 40       	mov    $0x40000000,%edx
                buf[count].name[j] = '\0';
ffffffff80008d62:	c6 44 06 0c 00       	movb   $0x0,0xc(%rsi,%rax,1)
                ? proc->heapNext - Sched::UserHeapBase : 0;
ffffffff80008d67:	48 8b 81 80 00 00 00 	mov    0x80(%rcx),%rax
ffffffff80008d6e:	48 39 d0             	cmp    %rdx,%rax
ffffffff80008d71:	48 0f 42 c2          	cmovb  %rdx,%rax
            count++;
ffffffff80008d75:	83 c3 01             	add    $0x1,%ebx
                ? proc->heapNext - Sched::UserHeapBase : 0;
ffffffff80008d78:	48 2d 00 00 00 40    	sub    $0x40000000,%rax
ffffffff80008d7e:	48 89 46 50          	mov    %rax,0x50(%rsi)
            count++;
ffffffff80008d82:	e9 41 ff ff ff       	jmp    ffffffff80008cc8 <SyscallDispatch+0xc88>
ffffffff80008d87:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff80008d8e:	00 00 
                return Kt::ReadKernelLog((char*)frame->arg1, frame->arg2);
ffffffff80008d90:	48 8b 77 50          	mov    0x50(%rdi),%rsi
ffffffff80008d94:	48 8b 7f 58          	mov    0x58(%rdi),%rdi
    }
ffffffff80008d98:	48 8d 65 d8          	lea    -0x28(%rbp),%rsp
ffffffff80008d9c:	5b                   	pop    %rbx
ffffffff80008d9d:	41 5c                	pop    %r12
ffffffff80008d9f:	41 5d                	pop    %r13
ffffffff80008da1:	41 5e                	pop    %r14
ffffffff80008da3:	41 5f                	pop    %r15
ffffffff80008da5:	5d                   	pop    %rbp
                return Kt::ReadKernelLog((char*)frame->arg1, frame->arg2);
ffffffff80008da6:	e9 75 a4 01 00       	jmp    ffffffff80023220 <_ZN2Kt13ReadKernelLogEPcm>
ffffffff80008dab:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
                return Sys_GetRandom((uint8_t*)frame->arg1, frame->arg2);
ffffffff80008db0:	48 8b 77 50          	mov    0x50(%rdi),%rsi
ffffffff80008db4:	4c 8b 57 58          	mov    0x58(%rdi),%r10
        asm volatile("rdtsc; shl $32, %%rdx; or %%rdx, %%rax" : "=a"(tsc) :: "rdx");
ffffffff80008db8:	0f 31                	rdtsc
ffffffff80008dba:	48 c1 e2 20          	shl    $0x20,%rdx
ffffffff80008dbe:	48 09 d0             	or     %rdx,%rax
            uint64_t val = state * 0x2545F4914F6CDD1DULL;
ffffffff80008dc1:	49 b9 1d dd 6c 4f 91 	movabs $0x2545f4914f6cdd1d,%r9
ffffffff80008dc8:	f4 45 25 
        asm volatile("rdtsc; shl $32, %%rdx; or %%rdx, %%rax" : "=a"(tsc) :: "rdx");
ffffffff80008dcb:	49 89 c0             	mov    %rax,%r8
        for (uint64_t i = 0; i < len; i += 8) {
ffffffff80008dce:	45 31 db             	xor    %r11d,%r11d
ffffffff80008dd1:	48 85 f6             	test   %rsi,%rsi
ffffffff80008dd4:	0f 84 84 00 00 00    	je     ffffffff80008e5e <SyscallDispatch+0xe1e>
ffffffff80008dda:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            asm volatile("rdtsc; shl $32, %%rdx; or %%rdx, %%rax" : "=a"(tsc) :: "rdx");
ffffffff80008de0:	0f 31                	rdtsc
ffffffff80008de2:	48 c1 e2 20          	shl    $0x20,%rdx
ffffffff80008de6:	48 09 d0             	or     %rdx,%rax
            state ^= tsc;
ffffffff80008de9:	4c 31 c0             	xor    %r8,%rax
            uint64_t remaining = len - i;
ffffffff80008dec:	48 89 f3             	mov    %rsi,%rbx
            state ^= state >> 12;
ffffffff80008def:	48 89 c2             	mov    %rax,%rdx
            uint64_t remaining = len - i;
ffffffff80008df2:	4c 29 db             	sub    %r11,%rbx
            state ^= state >> 12;
ffffffff80008df5:	48 c1 ea 0c          	shr    $0xc,%rdx
ffffffff80008df9:	48 31 d0             	xor    %rdx,%rax
            state ^= state << 25;
ffffffff80008dfc:	48 89 c2             	mov    %rax,%rdx
ffffffff80008dff:	48 c1 e2 19          	shl    $0x19,%rdx
ffffffff80008e03:	48 31 d0             	xor    %rdx,%rax
            uint64_t toCopy = remaining < 8 ? remaining : 8;
ffffffff80008e06:	ba 08 00 00 00       	mov    $0x8,%edx
            state ^= state >> 27;
ffffffff80008e0b:	49 89 c0             	mov    %rax,%r8
ffffffff80008e0e:	49 c1 e8 1b          	shr    $0x1b,%r8
ffffffff80008e12:	49 31 c0             	xor    %rax,%r8
            uint64_t val = state * 0x2545F4914F6CDD1DULL;
ffffffff80008e15:	4c 89 c0             	mov    %r8,%rax
ffffffff80008e18:	49 0f af c1          	imul   %r9,%rax
            uint64_t toCopy = remaining < 8 ? remaining : 8;
ffffffff80008e1c:	48 39 d3             	cmp    %rdx,%rbx
ffffffff80008e1f:	48 0f 47 da          	cmova  %rdx,%rbx
            for (uint64_t j = 0; j < toCopy; j++)
ffffffff80008e23:	4b 8d 14 1a          	lea    (%r10,%r11,1),%rdx
ffffffff80008e27:	31 c9                	xor    %ecx,%ecx
ffffffff80008e29:	c1 e3 03             	shl    $0x3,%ebx
ffffffff80008e2c:	4c 39 de             	cmp    %r11,%rsi
ffffffff80008e2f:	74 24                	je     ffffffff80008e55 <SyscallDispatch+0xe15>
ffffffff80008e31:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80008e38:	00 00 00 00 
ffffffff80008e3c:	0f 1f 40 00          	nopl   0x0(%rax)
                buf[i + j] = (uint8_t)(val >> (j * 8));
ffffffff80008e40:	48 89 c7             	mov    %rax,%rdi
            for (uint64_t j = 0; j < toCopy; j++)
ffffffff80008e43:	48 83 c2 01          	add    $0x1,%rdx
                buf[i + j] = (uint8_t)(val >> (j * 8));
ffffffff80008e47:	48 d3 ef             	shr    %cl,%rdi
            for (uint64_t j = 0; j < toCopy; j++)
ffffffff80008e4a:	83 c1 08             	add    $0x8,%ecx
                buf[i + j] = (uint8_t)(val >> (j * 8));
ffffffff80008e4d:	40 88 7a ff          	mov    %dil,-0x1(%rdx)
            for (uint64_t j = 0; j < toCopy; j++)
ffffffff80008e51:	39 d9                	cmp    %ebx,%ecx
ffffffff80008e53:	75 eb                	jne    ffffffff80008e40 <SyscallDispatch+0xe00>
        for (uint64_t i = 0; i < len; i += 8) {
ffffffff80008e55:	49 83 c3 08          	add    $0x8,%r11
ffffffff80008e59:	49 39 f3             	cmp    %rsi,%r11
ffffffff80008e5c:	72 82                	jb     ffffffff80008de0 <SyscallDispatch+0xda0>
        return (int64_t)len;
ffffffff80008e5e:	48 89 f0             	mov    %rsi,%rax
                return Sys_GetRandom((uint8_t*)frame->arg1, frame->arg2);
ffffffff80008e61:	e9 1c f2 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80008e66:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80008e6d:	00 00 00 
        uint32_t ip = Net::Dns::Resolve(hostname);
ffffffff80008e70:	48 8b 7f 58          	mov    0x58(%rdi),%rdi
ffffffff80008e74:	be 88 13 00 00       	mov    $0x1388,%esi
ffffffff80008e79:	e8 22 39 01 00       	call   ffffffff8001c7a0 <_ZN3Net3Dns7ResolveEPKcj>
        return (int64_t)ip;
ffffffff80008e7e:	89 c0                	mov    %eax,%eax
                return Sys_Resolve((const char*)frame->arg1);
ffffffff80008e80:	e9 fd f1 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80008e85:	0f 1f 00             	nopl   (%rax)
                return Sys_TermScale(frame->arg1, frame->arg2);
ffffffff80008e88:	48 8b 7f 58          	mov    0x58(%rdi),%rdi
        if (scale_x == 0) {
ffffffff80008e8c:	48 85 ff             	test   %rdi,%rdi
ffffffff80008e8f:	0f 85 97 08 00 00    	jne    ffffffff8000972c <SyscallDispatch+0x16ec>
            return (int64_t)((Kt::GetFontScaleY() << 32) | (Kt::GetFontScaleX() & 0xFFFFFFFF));
ffffffff80008e95:	e8 36 a0 01 00       	call   ffffffff80022ed0 <_ZN2Kt13GetFontScaleYEv>
ffffffff80008e9a:	48 89 c3             	mov    %rax,%rbx
ffffffff80008e9d:	e8 1e a0 01 00       	call   ffffffff80022ec0 <_ZN2Kt13GetFontScaleXEv>
ffffffff80008ea2:	48 89 c2             	mov    %rax,%rdx
ffffffff80008ea5:	48 89 d8             	mov    %rbx,%rax
ffffffff80008ea8:	48 c1 e0 20          	shl    $0x20,%rax
ffffffff80008eac:	89 d2                	mov    %edx,%edx
ffffffff80008eae:	48 09 d0             	or     %rdx,%rax
ffffffff80008eb1:	e9 cc f1 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80008eb6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80008ebd:	00 00 00 
        return Fs::Vfs::VfsCreate(path);
ffffffff80008ec0:	48 8b 7f 58          	mov    0x58(%rdi),%rdi
ffffffff80008ec4:	e8 37 ec 00 00       	call   ffffffff80017b00 <_ZN2Fs3Vfs9VfsCreateEPKc>
                return (int64_t)Sys_FCreate((const char*)frame->arg1);
ffffffff80008ec9:	48 98                	cltq
ffffffff80008ecb:	e9 b2 f1 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
                return (int64_t)Sys_Connect((int)frame->arg1, (uint32_t)frame->arg2, (uint16_t)frame->arg3);
ffffffff80008ed0:	48 8b 5f 48          	mov    0x48(%rdi),%rbx
ffffffff80008ed4:	44 8b 67 50          	mov    0x50(%rdi),%r12d
ffffffff80008ed8:	44 8b 6f 58          	mov    0x58(%rdi),%r13d
        return Net::Socket::Connect(fd, ip, port, Sched::GetCurrentPid());
ffffffff80008edc:	e8 df 8f 01 00       	call   ffffffff80021ec0 <_ZN5Sched13GetCurrentPidEv>
ffffffff80008ee1:	0f b7 d3             	movzwl %bx,%edx
ffffffff80008ee4:	44 89 e6             	mov    %r12d,%esi
ffffffff80008ee7:	89 c1                	mov    %eax,%ecx
ffffffff80008ee9:	44 89 ef             	mov    %r13d,%edi
ffffffff80008eec:	e8 1f 4f 01 00       	call   ffffffff8001de10 <_ZN3Net6Socket7ConnectEijti>
                return (int64_t)Sys_Connect((int)frame->arg1, (uint32_t)frame->arg2, (uint16_t)frame->arg3);
ffffffff80008ef1:	48 98                	cltq
ffffffff80008ef3:	e9 8a f1 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80008ef8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80008eff:	00 
                return (int64_t)Sys_Socket((int)frame->arg1);
ffffffff80008f00:	8b 5f 58             	mov    0x58(%rdi),%ebx
        return Net::Socket::Create(type, Sched::GetCurrentPid());
ffffffff80008f03:	e8 b8 8f 01 00       	call   ffffffff80021ec0 <_ZN5Sched13GetCurrentPidEv>
ffffffff80008f08:	89 c6                	mov    %eax,%esi
ffffffff80008f0a:	89 df                	mov    %ebx,%edi
ffffffff80008f0c:	e8 ef 4d 01 00       	call   ffffffff8001dd00 <_ZN3Net6Socket6CreateEii>
                return (int64_t)Sys_Socket((int)frame->arg1);
ffffffff80008f11:	48 98                	cltq
ffffffff80008f13:	e9 6a f1 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80008f18:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80008f1f:	00 
                Sys_GetTime((DateTime*)frame->arg1);
ffffffff80008f20:	48 8b 5f 58          	mov    0x58(%rdi),%rbx
        if (out == nullptr) return;
ffffffff80008f24:	48 85 db             	test   %rbx,%rbx
ffffffff80008f27:	0f 84 53 f1 ff ff    	je     ffffffff80008080 <SyscallDispatch+0x40>
        Timekeeping::DateTime dt = Timekeeping::GetDateTime();
ffffffff80008f2d:	e8 8e ab 01 00       	call   ffffffff80023ac0 <_ZN11Timekeeping11GetDateTimeEv>
        out->Second = dt.Second;
ffffffff80008f32:	48 89 c2             	mov    %rax,%rdx
        out->Year   = dt.Year;
ffffffff80008f35:	89 03                	mov    %eax,(%rbx)
        out->Hour   = dt.Hour;
ffffffff80008f37:	48 c1 e8 20          	shr    $0x20,%rax
        out->Second = dt.Second;
ffffffff80008f3b:	48 c1 ea 30          	shr    $0x30,%rdx
        out->Hour   = dt.Hour;
ffffffff80008f3f:	66 89 43 04          	mov    %ax,0x4(%rbx)
        out->Second = dt.Second;
ffffffff80008f43:	88 53 06             	mov    %dl,0x6(%rbx)
ffffffff80008f46:	e9 35 f1 ff ff       	jmp    ffffffff80008080 <SyscallDispatch+0x40>
ffffffff80008f4b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
                return (int64_t)Sys_GetArgs((char*)frame->arg1, frame->arg2);
ffffffff80008f50:	4c 8b 67 58          	mov    0x58(%rdi),%r12
ffffffff80008f54:	48 8b 5f 50          	mov    0x50(%rdi),%rbx
        auto* proc = Sched::GetCurrentProcessPtr();
ffffffff80008f58:	e8 93 8f 01 00       	call   ffffffff80021ef0 <_ZN5Sched20GetCurrentProcessPtrEv>
        if (proc == nullptr || buf == nullptr || maxLen == 0) return -1;
ffffffff80008f5d:	4d 85 e4             	test   %r12,%r12
ffffffff80008f60:	0f 94 c2             	sete   %dl
ffffffff80008f63:	48 85 db             	test   %rbx,%rbx
ffffffff80008f66:	0f 94 c1             	sete   %cl
ffffffff80008f69:	08 ca                	or     %cl,%dl
ffffffff80008f6b:	0f 85 af 07 00 00    	jne    ffffffff80009720 <SyscallDispatch+0x16e0>
ffffffff80008f71:	48 85 c0             	test   %rax,%rax
ffffffff80008f74:	0f 84 a6 07 00 00    	je     ffffffff80009720 <SyscallDispatch+0x16e0>
        for (; i < (int)maxLen - 1 && proc->args[i]; i++) {
ffffffff80008f7a:	83 fb 01             	cmp    $0x1,%ebx
ffffffff80008f7d:	0f 8e 81 11 00 00    	jle    ffffffff8000a104 <SyscallDispatch+0x20c4>
ffffffff80008f83:	8d 7b ff             	lea    -0x1(%rbx),%edi
ffffffff80008f86:	4c 89 e1             	mov    %r12,%rcx
        int i = 0;
ffffffff80008f89:	31 d2                	xor    %edx,%edx
        for (; i < (int)maxLen - 1 && proc->args[i]; i++) {
ffffffff80008f8b:	4c 29 e0             	sub    %r12,%rax
ffffffff80008f8e:	eb 1e                	jmp    ffffffff80008fae <SyscallDispatch+0xf6e>
ffffffff80008f90:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80008f97:	00 00 00 00 
ffffffff80008f9b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff80008fa0:	83 c2 01             	add    $0x1,%edx
            buf[i] = proc->args[i];
ffffffff80008fa3:	40 88 31             	mov    %sil,(%rcx)
        for (; i < (int)maxLen - 1 && proc->args[i]; i++) {
ffffffff80008fa6:	48 83 c1 01          	add    $0x1,%rcx
ffffffff80008faa:	39 fa                	cmp    %edi,%edx
ffffffff80008fac:	74 0d                	je     ffffffff80008fbb <SyscallDispatch+0xf7b>
ffffffff80008fae:	0f b6 b4 08 88 00 00 	movzbl 0x88(%rax,%rcx,1),%esi
ffffffff80008fb5:	00 
ffffffff80008fb6:	40 84 f6             	test   %sil,%sil
ffffffff80008fb9:	75 e5                	jne    ffffffff80008fa0 <SyscallDispatch+0xf60>
        buf[i] = '\0';
ffffffff80008fbb:	48 63 c2             	movslq %edx,%rax
ffffffff80008fbe:	41 c6 04 04 00       	movb   $0x0,(%r12,%rax,1)
        return i;
ffffffff80008fc3:	e9 ba f0 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80008fc8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80008fcf:	00 
        auto* proc = Sched::GetCurrentProcessPtr();
ffffffff80008fd0:	e8 1b 8f 01 00       	call   ffffffff80021ef0 <_ZN5Sched20GetCurrentProcessPtrEv>
        if (proc && proc->redirected) {
ffffffff80008fd5:	48 85 c0             	test   %rax,%rax
ffffffff80008fd8:	74 0d                	je     ffffffff80008fe7 <SyscallDispatch+0xfa7>
ffffffff80008fda:	80 b8 88 01 00 00 00 	cmpb   $0x0,0x188(%rax)
ffffffff80008fe1:	0f 85 2f 0b 00 00    	jne    ffffffff80009b16 <SyscallDispatch+0x1ad6>
        flanterm_get_dimensions(Kt::ctx, &cols, &rows);
ffffffff80008fe7:	48 8b 3d c2 64 1d 00 	mov    0x1d64c2(%rip),%rdi        # ffffffff801df4b0 <_ZN2Kt3ctxE>
ffffffff80008fee:	48 8d 55 a0          	lea    -0x60(%rbp),%rdx
ffffffff80008ff2:	48 8d 75 98          	lea    -0x68(%rbp),%rsi
        size_t cols = 0, rows = 0;
ffffffff80008ff6:	48 c7 45 98 00 00 00 	movq   $0x0,-0x68(%rbp)
ffffffff80008ffd:	00 
ffffffff80008ffe:	48 c7 45 a0 00 00 00 	movq   $0x0,-0x60(%rbp)
ffffffff80009005:	00 
        flanterm_get_dimensions(Kt::ctx, &cols, &rows);
ffffffff80009006:	e8 35 b8 ff ff       	call   ffffffff80004840 <flanterm_get_dimensions>
        return (int64_t)((rows << 32) | (cols & 0xFFFFFFFF));
ffffffff8000900b:	48 8b 45 a0          	mov    -0x60(%rbp),%rax
ffffffff8000900f:	8b 55 98             	mov    -0x68(%rbp),%edx
ffffffff80009012:	48 c1 e0 20          	shl    $0x20,%rax
ffffffff80009016:	48 09 d0             	or     %rdx,%rax
                return Sys_TermScale(frame->arg1, frame->arg2);
ffffffff80009019:	e9 64 f0 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff8000901e:	66 90                	xchg   %ax,%ax
                Sys_WaitPid((int)frame->arg1);
ffffffff80009020:	8b 5f 58             	mov    0x58(%rdi),%ebx
        while (Sched::IsAlive(pid)) {
ffffffff80009023:	eb 08                	jmp    ffffffff8000902d <SyscallDispatch+0xfed>
ffffffff80009025:	0f 1f 00             	nopl   (%rax)
            Sched::Schedule();  // yield until the process exits
ffffffff80009028:	e8 93 8c 01 00       	call   ffffffff80021cc0 <_ZN5Sched8ScheduleEv>
        while (Sched::IsAlive(pid)) {
ffffffff8000902d:	89 df                	mov    %ebx,%edi
ffffffff8000902f:	e8 ec 90 01 00       	call   ffffffff80022120 <_ZN5Sched7IsAliveEi>
ffffffff80009034:	84 c0                	test   %al,%al
ffffffff80009036:	75 f0                	jne    ffffffff80009028 <SyscallDispatch+0xfe8>
ffffffff80009038:	e9 43 f0 ff ff       	jmp    ffffffff80008080 <SyscallDispatch+0x40>
ffffffff8000903d:	0f 1f 00             	nopl   (%rax)
        auto* proc = Sched::GetCurrentProcessPtr();
ffffffff80009040:	e8 ab 8e 01 00       	call   ffffffff80021ef0 <_ZN5Sched20GetCurrentProcessPtrEv>
ffffffff80009045:	48 89 c3             	mov    %rax,%rbx
        if (proc == nullptr) return 0;
ffffffff80009048:	48 85 c0             	test   %rax,%rax
ffffffff8000904b:	0f 84 2f f0 ff ff    	je     ffffffff80008080 <SyscallDispatch+0x40>
        uint32_t* fbBase = Graphics::Cursor::GetFramebufferBase();
ffffffff80009051:	e8 3a ef 00 00       	call   ffffffff80017f90 <_ZN8Graphics6Cursor18GetFramebufferBaseEv>
ffffffff80009056:	49 89 c6             	mov    %rax,%r14
        if (fbBase == nullptr) return 0;
ffffffff80009059:	48 85 c0             	test   %rax,%rax
ffffffff8000905c:	0f 84 1e f0 ff ff    	je     ffffffff80008080 <SyscallDispatch+0x40>
ffffffff80009062:	48 8b 15 3f 39 14 00 	mov    0x14393f(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff80009069:	49 89 c7             	mov    %rax,%r15
ffffffff8000906c:	49 29 d7             	sub    %rdx,%r15
ffffffff8000906f:	48 89 55 88          	mov    %rdx,-0x78(%rbp)
        uint64_t fbSize = Graphics::Cursor::GetFramebufferHeight()
ffffffff80009073:	e8 38 ef 00 00       	call   ffffffff80017fb0 <_ZN8Graphics6Cursor20GetFramebufferHeightEv>
ffffffff80009078:	49 89 c4             	mov    %rax,%r12
                        * Graphics::Cursor::GetFramebufferPitch();
ffffffff8000907b:	e8 40 ef 00 00       	call   ffffffff80017fc0 <_ZN8Graphics6Cursor19GetFramebufferPitchEv>
ffffffff80009080:	48 c7 c7 bd a2 02 80 	mov    $0xffffffff8002a2bd,%rdi
            g_kernelLogDepth++;
ffffffff80009087:	83 05 16 64 1d 00 01 	addl   $0x1,0x1d6416(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000908e:	4c 0f af e0          	imul   %rax,%r12
            Print(string);
ffffffff80009092:	e8 29 a1 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80009097:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000909e:	e8 1d a1 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800090a3:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800090aa:	e8 11 a1 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800090af:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
        uint64_t numPages = (fbSize + 0xFFF) / 0x1000;
ffffffff800090b6:	4d 8d ac 24 ff 0f 00 	lea    0xfff(%r12),%r13
ffffffff800090bd:	00 
ffffffff800090be:	e8 fd a0 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800090c3:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800090ca:	49 c1 ed 0c          	shr    $0xc,%r13
ffffffff800090ce:	e8 ed a0 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800090d3:	48 c7 c7 c3 a2 02 80 	mov    $0xffffffff8002a2c3,%rdi
ffffffff800090da:	e8 e1 a0 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800090df:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff800090e4:	4c 89 ff             	mov    %r15,%rdi
ffffffff800090e7:	e8 a4 13 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800090ec:	48 89 c7             	mov    %rax,%rdi
ffffffff800090ef:	e8 cc a0 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800090f4:	48 c7 c7 31 bb 02 80 	mov    $0xffffffff8002bb31,%rdi
ffffffff800090fb:	e8 c0 a0 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80009100:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80009105:	4c 89 e7             	mov    %r12,%rdi
ffffffff80009108:	4d 89 ec             	mov    %r13,%r12
ffffffff8000910b:	e8 80 13 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80009110:	48 89 c7             	mov    %rax,%rdi
ffffffff80009113:	e8 a8 a0 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80009118:	48 c7 c7 cb a2 02 80 	mov    $0xffffffff8002a2cb,%rdi
ffffffff8000911f:	e8 9c a0 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80009124:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80009129:	4c 89 ef             	mov    %r13,%rdi
ffffffff8000912c:	e8 5f 13 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80009131:	48 89 c7             	mov    %rax,%rdi
ffffffff80009134:	e8 87 a0 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80009139:	48 c7 c7 10 b7 02 80 	mov    $0xffffffff8002b710,%rdi
ffffffff80009140:	e8 7b a0 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << " (" << Graphics::Cursor::GetFramebufferWidth()
ffffffff80009145:	e8 56 ee 00 00       	call   ffffffff80017fa0 <_ZN8Graphics6Cursor19GetFramebufferWidthEv>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000914a:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000914f:	48 89 c7             	mov    %rax,%rdi
ffffffff80009152:	e8 39 13 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80009157:	48 89 c7             	mov    %rax,%rdi
ffffffff8000915a:	e8 61 a0 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000915f:	48 c7 c7 d8 a4 02 80 	mov    $0xffffffff8002a4d8,%rdi
ffffffff80009166:	e8 55 a0 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << "x" << Graphics::Cursor::GetFramebufferHeight()
ffffffff8000916b:	e8 40 ee 00 00       	call   ffffffff80017fb0 <_ZN8Graphics6Cursor20GetFramebufferHeightEv>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80009170:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80009175:	48 89 c7             	mov    %rax,%rdi
ffffffff80009178:	e8 13 13 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000917d:	48 89 c7             	mov    %rax,%rdi
ffffffff80009180:	e8 3b a0 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80009185:	48 c7 c7 d3 a2 02 80 	mov    $0xffffffff8002a2d3,%rdi
ffffffff8000918c:	e8 2f a0 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << " pitch=" << Graphics::Cursor::GetFramebufferPitch() << ")";
ffffffff80009191:	e8 2a ee 00 00       	call   ffffffff80017fc0 <_ZN8Graphics6Cursor19GetFramebufferPitchEv>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80009196:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000919b:	48 89 c7             	mov    %rax,%rdi
ffffffff8000919e:	e8 ed 12 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800091a3:	48 89 c7             	mov    %rax,%rdi
ffffffff800091a6:	e8 15 a0 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800091ab:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff800091b2:	e8 09 a0 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800091b7:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800091be:	49 c1 e4 0c          	shl    $0xc,%r12
ffffffff800091c2:	e8 f9 9f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Memory::VMM::Paging::MapUserInWC(
ffffffff800091c7:	48 8b 45 88          	mov    -0x78(%rbp),%rax
ffffffff800091cb:	4d 01 fc             	add    %r15,%r12
            g_kernelLogDepth--;
ffffffff800091ce:	83 2d cf 62 1d 00 01 	subl   $0x1,0x1d62cf(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800091d5:	4c 29 f0             	sub    %r14,%rax
ffffffff800091d8:	4c 8d b0 00 00 00 50 	lea    0x50000000(%rax),%r14
        for (uint64_t i = 0; i < numPages; i++) {
ffffffff800091df:	4d 85 ed             	test   %r13,%r13
ffffffff800091e2:	74 28                	je     ffffffff8000920c <SyscallDispatch+0x11cc>
ffffffff800091e4:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800091eb:	00 00 00 00 
ffffffff800091ef:	90                   	nop
            Memory::VMM::Paging::MapUserInWC(
ffffffff800091f0:	48 8b 7b 68          	mov    0x68(%rbx),%rdi
ffffffff800091f4:	4b 8d 14 3e          	lea    (%r14,%r15,1),%rdx
ffffffff800091f8:	4c 89 fe             	mov    %r15,%rsi
        for (uint64_t i = 0; i < numPages; i++) {
ffffffff800091fb:	49 81 c7 00 10 00 00 	add    $0x1000,%r15
            Memory::VMM::Paging::MapUserInWC(
ffffffff80009202:	e8 a9 2b 01 00       	call   ffffffff8001bdb0 <_ZN6Memory3VMM6Paging11MapUserInWCEmmm>
        for (uint64_t i = 0; i < numPages; i++) {
ffffffff80009207:	4d 39 e7             	cmp    %r12,%r15
ffffffff8000920a:	75 e4                	jne    ffffffff800091f0 <SyscallDispatch+0x11b0>
ffffffff8000920c:	b8 00 00 00 50       	mov    $0x50000000,%eax
ffffffff80009211:	e9 6c ee ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80009216:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000921d:	00 00 00 
                Sys_FbInfo((FbInfo*)frame->arg1);
ffffffff80009220:	48 8b 5f 58          	mov    0x58(%rdi),%rbx
        if (out == nullptr) return;
ffffffff80009224:	48 85 db             	test   %rbx,%rbx
ffffffff80009227:	0f 84 53 ee ff ff    	je     ffffffff80008080 <SyscallDispatch+0x40>
        out->width    = Graphics::Cursor::GetFramebufferWidth();
ffffffff8000922d:	e8 6e ed 00 00       	call   ffffffff80017fa0 <_ZN8Graphics6Cursor19GetFramebufferWidthEv>
ffffffff80009232:	48 89 03             	mov    %rax,(%rbx)
        out->height   = Graphics::Cursor::GetFramebufferHeight();
ffffffff80009235:	e8 76 ed 00 00       	call   ffffffff80017fb0 <_ZN8Graphics6Cursor20GetFramebufferHeightEv>
ffffffff8000923a:	48 89 43 08          	mov    %rax,0x8(%rbx)
        out->pitch    = Graphics::Cursor::GetFramebufferPitch();
ffffffff8000923e:	e8 7d ed 00 00       	call   ffffffff80017fc0 <_ZN8Graphics6Cursor19GetFramebufferPitchEv>
        out->bpp      = 32;
ffffffff80009243:	48 c7 43 18 20 00 00 	movq   $0x20,0x18(%rbx)
ffffffff8000924a:	00 
        out->pitch    = Graphics::Cursor::GetFramebufferPitch();
ffffffff8000924b:	48 89 43 10          	mov    %rax,0x10(%rbx)
        out->userAddr = 0;
ffffffff8000924f:	48 c7 43 20 00 00 00 	movq   $0x0,0x20(%rbx)
ffffffff80009256:	00 
ffffffff80009257:	e9 24 ee ff ff       	jmp    ffffffff80008080 <SyscallDispatch+0x40>
ffffffff8000925c:	0f 1f 40 00          	nopl   0x0(%rax)
                return (int64_t)Sys_Spawn((const char*)frame->arg1, (const char*)frame->arg2);
ffffffff80009260:	4c 8b 6f 50          	mov    0x50(%rdi),%r13
ffffffff80009264:	48 8b 5f 58          	mov    0x58(%rdi),%rbx
        auto* parent = Sched::GetCurrentProcessPtr();
ffffffff80009268:	e8 83 8c 01 00       	call   ffffffff80021ef0 <_ZN5Sched20GetCurrentProcessPtrEv>
        int childPid = Sched::Spawn(path, args);
ffffffff8000926d:	48 89 df             	mov    %rbx,%rdi
ffffffff80009270:	4c 89 ee             	mov    %r13,%rsi
        auto* parent = Sched::GetCurrentProcessPtr();
ffffffff80009273:	49 89 c4             	mov    %rax,%r12
        int childPid = Sched::Spawn(path, args);
ffffffff80009276:	e8 c5 83 01 00       	call   ffffffff80021640 <_ZN5Sched5SpawnEPKcS1_>
ffffffff8000927b:	89 c3                	mov    %eax,%ebx
        if (childPid < 0) return childPid;
ffffffff8000927d:	85 c0                	test   %eax,%eax
ffffffff8000927f:	0f 88 24 f9 ff ff    	js     ffffffff80008ba9 <SyscallDispatch+0xb69>
        auto* child = Sched::GetProcessByPid(childPid);
ffffffff80009285:	89 c7                	mov    %eax,%edi
ffffffff80009287:	e8 f4 8e 01 00       	call   ffffffff80022180 <_ZN5Sched15GetProcessByPidEi>
        if (child && parent) {
ffffffff8000928c:	48 85 c0             	test   %rax,%rax
ffffffff8000928f:	0f 84 14 f9 ff ff    	je     ffffffff80008ba9 <SyscallDispatch+0xb69>
ffffffff80009295:	4d 85 e4             	test   %r12,%r12
ffffffff80009298:	0f 84 0b f9 ff ff    	je     ffffffff80008ba9 <SyscallDispatch+0xb69>
            if (parent->redirected) {
ffffffff8000929e:	41 80 bc 24 88 01 00 	cmpb   $0x0,0x188(%r12)
ffffffff800092a5:	00 00 
            child->parentPid = parent->pid;
ffffffff800092a7:	41 8b 14 24          	mov    (%r12),%edx
ffffffff800092ab:	89 90 8c 01 00 00    	mov    %edx,0x18c(%rax)
            if (parent->redirected) {
ffffffff800092b1:	0f 84 f2 f8 ff ff    	je     ffffffff80008ba9 <SyscallDispatch+0xb69>
                child->parentPid = parent->outBuf ? parent->pid : parent->parentPid;
ffffffff800092b7:	49 83 bc 24 90 01 00 	cmpq   $0x0,0x190(%r12)
ffffffff800092be:	00 00 
                child->redirected = true;
ffffffff800092c0:	c6 80 88 01 00 00 01 	movb   $0x1,0x188(%rax)
                child->parentPid = parent->outBuf ? parent->pid : parent->parentPid;
ffffffff800092c7:	0f 84 3e 0e 00 00    	je     ffffffff8000a10b <SyscallDispatch+0x20cb>
ffffffff800092cd:	89 90 8c 01 00 00    	mov    %edx,0x18c(%rax)
ffffffff800092d3:	e9 d1 f8 ff ff       	jmp    ffffffff80008ba9 <SyscallDispatch+0xb69>
ffffffff800092d8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff800092df:	00 
        uint16_t seq = g_pingSeq++;
ffffffff800092e0:	44 0f b7 25 60 a2 0f 	movzwl 0xfa260(%rip),%r12d        # ffffffff80103548 <_ZN6ZenithL9g_pingSeqE>
ffffffff800092e7:	00 
                return (int64_t)Sys_Ping((uint32_t)frame->arg1, (uint32_t)frame->arg2);
ffffffff800092e8:	8b 5f 58             	mov    0x58(%rdi),%ebx
ffffffff800092eb:	4c 8b 6f 50          	mov    0x50(%rdi),%r13
        uint16_t seq = g_pingSeq++;
ffffffff800092ef:	41 8d 44 24 01       	lea    0x1(%r12),%eax
ffffffff800092f4:	66 89 05 4d a2 0f 00 	mov    %ax,0xfa24d(%rip)        # ffffffff80103548 <_ZN6ZenithL9g_pingSeqE>
            if (Timekeeping::GetMilliseconds() - start >= timeoutMs) {
ffffffff800092fb:	45 89 ed             	mov    %r13d,%r13d
        Net::Icmp::ResetReply();
ffffffff800092fe:	e8 4d 3d 01 00       	call   ffffffff8001d050 <_ZN3Net4Icmp10ResetReplyEv>
        Net::Icmp::SendEchoRequest(ipAddr, PING_ID, seq);
ffffffff80009303:	89 df                	mov    %ebx,%edi
ffffffff80009305:	44 89 e2             	mov    %r12d,%edx
ffffffff80009308:	be 01 2e 00 00       	mov    $0x2e01,%esi
ffffffff8000930d:	e8 7e 3d 01 00       	call   ffffffff8001d090 <_ZN3Net4Icmp15SendEchoRequestEjtt>
        uint64_t start = Timekeeping::GetMilliseconds();
ffffffff80009312:	e8 f9 a2 01 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff80009317:	48 89 c3             	mov    %rax,%rbx
        while (!Net::Icmp::HasReply(PING_ID, seq)) {
ffffffff8000931a:	eb 1a                	jmp    ffffffff80009336 <SyscallDispatch+0x12f6>
ffffffff8000931c:	0f 1f 40 00          	nopl   0x0(%rax)
            if (Timekeeping::GetMilliseconds() - start >= timeoutMs) {
ffffffff80009320:	e8 eb a2 01 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff80009325:	48 29 d8             	sub    %rbx,%rax
ffffffff80009328:	4c 39 e8             	cmp    %r13,%rax
ffffffff8000932b:	0f 83 ef 03 00 00    	jae    ffffffff80009720 <SyscallDispatch+0x16e0>
            Sched::Schedule();
ffffffff80009331:	e8 8a 89 01 00       	call   ffffffff80021cc0 <_ZN5Sched8ScheduleEv>
        while (!Net::Icmp::HasReply(PING_ID, seq)) {
ffffffff80009336:	44 89 e6             	mov    %r12d,%esi
ffffffff80009339:	bf 01 2e 00 00       	mov    $0x2e01,%edi
ffffffff8000933e:	e8 1d 3d 01 00       	call   ffffffff8001d060 <_ZN3Net4Icmp8HasReplyEtt>
ffffffff80009343:	84 c0                	test   %al,%al
ffffffff80009345:	74 d9                	je     ffffffff80009320 <SyscallDispatch+0x12e0>
        return (int32_t)(Timekeeping::GetMilliseconds() - start);
ffffffff80009347:	e8 c4 a2 01 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff8000934c:	29 d8                	sub    %ebx,%eax
                return (int64_t)Sys_Ping((uint32_t)frame->arg1, (uint32_t)frame->arg2);
ffffffff8000934e:	48 98                	cltq
        return (int32_t)(Timekeeping::GetMilliseconds() - start);
ffffffff80009350:	e9 2d ed ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80009355:	0f 1f 00             	nopl   (%rax)
                return (int64_t)Sys_SetNetCfg((const NetCfg*)frame->arg1);
ffffffff80009358:	48 8b 5f 58          	mov    0x58(%rdi),%rbx
        if (in == nullptr) return -1;
ffffffff8000935c:	48 85 db             	test   %rbx,%rbx
ffffffff8000935f:	0f 84 bb 03 00 00    	je     ffffffff80009720 <SyscallDispatch+0x16e0>
        Net::SetIpAddress(in->ipAddress);
ffffffff80009365:	8b 3b                	mov    (%rbx),%edi
ffffffff80009367:	e8 a4 46 01 00       	call   ffffffff8001da10 <_ZN3Net12SetIpAddressEj>
        Net::SetSubnetMask(in->subnetMask);
ffffffff8000936c:	8b 7b 04             	mov    0x4(%rbx),%edi
ffffffff8000936f:	e8 bc 46 01 00       	call   ffffffff8001da30 <_ZN3Net13SetSubnetMaskEj>
        Net::SetGateway(in->gateway);
ffffffff80009374:	8b 7b 08             	mov    0x8(%rbx),%edi
ffffffff80009377:	e8 d4 46 01 00       	call   ffffffff8001da50 <_ZN3Net10SetGatewayEj>
        Net::SetDnsServer(in->dnsServer);
ffffffff8000937c:	8b 7b 14             	mov    0x14(%rbx),%edi
ffffffff8000937f:	e8 ec 46 01 00       	call   ffffffff8001da70 <_ZN3Net12SetDnsServerEj>
        return 0;
ffffffff80009384:	31 c0                	xor    %eax,%eax
ffffffff80009386:	e9 f7 ec ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff8000938b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        auto* proc = Sched::GetCurrentProcessPtr();
ffffffff80009390:	e8 5b 8b 01 00       	call   ffffffff80021ef0 <_ZN5Sched20GetCurrentProcessPtrEv>
        if (proc && proc->redirected) {
ffffffff80009395:	48 85 c0             	test   %rax,%rax
ffffffff80009398:	74 0d                	je     ffffffff800093a7 <SyscallDispatch+0x1367>
ffffffff8000939a:	80 b8 88 01 00 00 00 	cmpb   $0x0,0x188(%rax)
ffffffff800093a1:	0f 85 4d 07 00 00    	jne    ffffffff80009af4 <SyscallDispatch+0x1ab4>
        return Drivers::PS2::Keyboard::IsKeyAvailable();
ffffffff800093a7:	e8 b4 7a 00 00       	call   ffffffff80010e60 <_ZN7Drivers3PS28Keyboard14IsKeyAvailableEv>
                return (int64_t)Sys_IsKeyAvailable();
ffffffff800093ac:	0f b6 c0             	movzbl %al,%eax
ffffffff800093af:	e9 ce ec ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff800093b4:	0f 1f 40 00          	nopl   0x0(%rax)
                Sys_GetInfo((SysInfo*)frame->arg1);
ffffffff800093b8:	48 8b 4f 58          	mov    0x58(%rdi),%rcx
        if (outInfo == nullptr) return;
ffffffff800093bc:	48 85 c9             	test   %rcx,%rcx
ffffffff800093bf:	0f 84 bb ec ff ff    	je     ffffffff80008080 <SyscallDispatch+0x40>
ffffffff800093c5:	31 c0                	xor    %eax,%eax
        for (int i = 0; name[i]; i++) outInfo->osName[i] = name[i];
ffffffff800093c7:	ba 5a 00 00 00       	mov    $0x5a,%edx
ffffffff800093cc:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800093d3:	00 00 00 00 
ffffffff800093d7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff800093de:	00 00 
ffffffff800093e0:	88 14 01             	mov    %dl,(%rcx,%rax,1)
ffffffff800093e3:	0f b6 90 af a2 02 80 	movzbl -0x7ffd5d51(%rax),%edx
ffffffff800093ea:	48 83 c0 01          	add    $0x1,%rax
ffffffff800093ee:	84 d2                	test   %dl,%dl
ffffffff800093f0:	75 ee                	jne    ffffffff800093e0 <SyscallDispatch+0x13a0>
        outInfo->osName[8] = '\0';
ffffffff800093f2:	c6 41 08 00          	movb   $0x0,0x8(%rcx)
ffffffff800093f6:	b8 01 00 00 00       	mov    $0x1,%eax
        for (int i = 0; ver[i]; i++) outInfo->osVersion[i] = ver[i];
ffffffff800093fb:	ba 30 00 00 00       	mov    $0x30,%edx
ffffffff80009400:	48 be b6 a2 02 80 ff 	movabs $0xffffffff8002a2b6,%rsi
ffffffff80009407:	ff ff ff 
ffffffff8000940a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff80009410:	88 54 01 1f          	mov    %dl,0x1f(%rcx,%rax,1)
ffffffff80009414:	48 83 c0 01          	add    $0x1,%rax
ffffffff80009418:	0f b6 14 06          	movzbl (%rsi,%rax,1),%edx
ffffffff8000941c:	84 d2                	test   %dl,%dl
ffffffff8000941e:	75 f0                	jne    ffffffff80009410 <SyscallDispatch+0x13d0>
        outInfo->apiVersion = 2;
ffffffff80009420:	48 b8 02 00 00 00 00 	movabs $0x10000000002,%rax
ffffffff80009427:	01 00 00 
        outInfo->osVersion[5] = '\0';
ffffffff8000942a:	c6 41 25 00          	movb   $0x0,0x25(%rcx)
        outInfo->apiVersion = 2;
ffffffff8000942e:	48 89 41 40          	mov    %rax,0x40(%rcx)
ffffffff80009432:	e9 49 ec ff ff       	jmp    ffffffff80008080 <SyscallDispatch+0x40>
ffffffff80009437:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8000943e:	00 00 
    }
ffffffff80009440:	48 8d 65 d8          	lea    -0x28(%rbp),%rsp
ffffffff80009444:	5b                   	pop    %rbx
ffffffff80009445:	41 5c                	pop    %r12
ffffffff80009447:	41 5d                	pop    %r13
ffffffff80009449:	41 5e                	pop    %r14
ffffffff8000944b:	41 5f                	pop    %r15
ffffffff8000944d:	5d                   	pop    %rbp
        return Timekeeping::GetMilliseconds();
ffffffff8000944e:	e9 bd a1 01 00       	jmp    ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff80009453:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
                return (int64_t)Sys_RecvFrom((int)frame->arg1, (uint8_t*)frame->arg2,
ffffffff80009458:	4c 8b 7f 38          	mov    0x38(%rdi),%r15
ffffffff8000945c:	4c 8b 77 40          	mov    0x40(%rdi),%r14
ffffffff80009460:	44 8b 6f 48          	mov    0x48(%rdi),%r13d
ffffffff80009464:	4c 8b 67 50          	mov    0x50(%rdi),%r12
ffffffff80009468:	8b 5f 58             	mov    0x58(%rdi),%ebx
        return Net::Socket::RecvFrom(fd, buf, maxLen, srcIp, srcPort, Sched::GetCurrentPid());
ffffffff8000946b:	e8 50 8a 01 00       	call   ffffffff80021ec0 <_ZN5Sched13GetCurrentPidEv>
ffffffff80009470:	4d 89 f8             	mov    %r15,%r8
ffffffff80009473:	4c 89 f1             	mov    %r14,%rcx
ffffffff80009476:	44 89 ea             	mov    %r13d,%edx
ffffffff80009479:	41 89 c1             	mov    %eax,%r9d
ffffffff8000947c:	4c 89 e6             	mov    %r12,%rsi
ffffffff8000947f:	89 df                	mov    %ebx,%edi
ffffffff80009481:	e8 fa 4d 01 00       	call   ffffffff8001e280 <_ZN3Net6Socket8RecvFromEiPhjPjPti>
                                             (uint16_t*)frame->arg5);
ffffffff80009486:	48 98                	cltq
ffffffff80009488:	e9 f5 eb ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff8000948d:	0f 1f 00             	nopl   (%rax)
                return (int64_t)Sys_SendTo((int)frame->arg1, (const uint8_t*)frame->arg2,
ffffffff80009490:	4c 8b 77 38          	mov    0x38(%rdi),%r14
ffffffff80009494:	44 8b 7f 40          	mov    0x40(%rdi),%r15d
ffffffff80009498:	44 8b 6f 48          	mov    0x48(%rdi),%r13d
ffffffff8000949c:	4c 8b 67 50          	mov    0x50(%rdi),%r12
ffffffff800094a0:	8b 5f 58             	mov    0x58(%rdi),%ebx
        return Net::Socket::SendTo(fd, data, len, destIp, destPort, Sched::GetCurrentPid());
ffffffff800094a3:	e8 18 8a 01 00       	call   ffffffff80021ec0 <_ZN5Sched13GetCurrentPidEv>
ffffffff800094a8:	45 0f b7 c6          	movzwl %r14w,%r8d
ffffffff800094ac:	44 89 f9             	mov    %r15d,%ecx
ffffffff800094af:	44 89 ea             	mov    %r13d,%edx
ffffffff800094b2:	41 89 c1             	mov    %eax,%r9d
ffffffff800094b5:	4c 89 e6             	mov    %r12,%rsi
ffffffff800094b8:	89 df                	mov    %ebx,%edi
ffffffff800094ba:	e8 c1 4c 01 00       	call   ffffffff8001e180 <_ZN3Net6Socket6SendToEiPKhjjti>
                                           (uint16_t)frame->arg5);
ffffffff800094bf:	48 98                	cltq
ffffffff800094c1:	e9 bc eb ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff800094c6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800094cd:	00 00 00 
        return Fs::Vfs::VfsWrite(handle, data, offset, size);
ffffffff800094d0:	48 8b 4f 40          	mov    0x40(%rdi),%rcx
ffffffff800094d4:	48 8b 57 48          	mov    0x48(%rdi),%rdx
ffffffff800094d8:	48 8b 77 50          	mov    0x50(%rdi),%rsi
ffffffff800094dc:	8b 7f 58             	mov    0x58(%rdi),%edi
ffffffff800094df:	e8 bc e5 00 00       	call   ffffffff80017aa0 <_ZN2Fs3Vfs8VfsWriteEiPKhmm>
                                           frame->arg3, frame->arg4);
ffffffff800094e4:	48 98                	cltq
ffffffff800094e6:	e9 97 eb ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff800094eb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
                return (int64_t)Sys_Send((int)frame->arg1, (const uint8_t*)frame->arg2, (uint32_t)frame->arg3);
ffffffff800094f0:	44 8b 6f 48          	mov    0x48(%rdi),%r13d
ffffffff800094f4:	4c 8b 67 50          	mov    0x50(%rdi),%r12
ffffffff800094f8:	8b 5f 58             	mov    0x58(%rdi),%ebx
        return Net::Socket::Send(fd, data, len, Sched::GetCurrentPid());
ffffffff800094fb:	e8 c0 89 01 00       	call   ffffffff80021ec0 <_ZN5Sched13GetCurrentPidEv>
ffffffff80009500:	44 89 ea             	mov    %r13d,%edx
ffffffff80009503:	4c 89 e6             	mov    %r12,%rsi
ffffffff80009506:	89 c1                	mov    %eax,%ecx
ffffffff80009508:	89 df                	mov    %ebx,%edi
ffffffff8000950a:	e8 d1 4b 01 00       	call   ffffffff8001e0e0 <_ZN3Net6Socket4SendEiPKhji>
                return (int64_t)Sys_Send((int)frame->arg1, (const uint8_t*)frame->arg2, (uint32_t)frame->arg3);
ffffffff8000950f:	48 98                	cltq
ffffffff80009511:	e9 6c eb ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80009516:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000951d:	00 00 00 
                return (int64_t)Sys_Accept((int)frame->arg1);
ffffffff80009520:	8b 5f 58             	mov    0x58(%rdi),%ebx
        return Net::Socket::Accept(fd, Sched::GetCurrentPid());
ffffffff80009523:	e8 98 89 01 00       	call   ffffffff80021ec0 <_ZN5Sched13GetCurrentPidEv>
ffffffff80009528:	89 c6                	mov    %eax,%esi
ffffffff8000952a:	89 df                	mov    %ebx,%edi
ffffffff8000952c:	e8 af 4a 01 00       	call   ffffffff8001dfe0 <_ZN3Net6Socket6AcceptEii>
                return (int64_t)Sys_Accept((int)frame->arg1);
ffffffff80009531:	48 98                	cltq
ffffffff80009533:	e9 4a eb ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80009538:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000953f:	00 
                return (int64_t)Sys_Listen((int)frame->arg1);
ffffffff80009540:	8b 5f 58             	mov    0x58(%rdi),%ebx
        return Net::Socket::Listen(fd, Sched::GetCurrentPid());
ffffffff80009543:	e8 78 89 01 00       	call   ffffffff80021ec0 <_ZN5Sched13GetCurrentPidEv>
ffffffff80009548:	89 c6                	mov    %eax,%esi
ffffffff8000954a:	89 df                	mov    %ebx,%edi
ffffffff8000954c:	e8 ef 49 01 00       	call   ffffffff8001df40 <_ZN3Net6Socket6ListenEii>
                return (int64_t)Sys_Listen((int)frame->arg1);
ffffffff80009551:	48 98                	cltq
ffffffff80009553:	e9 2a eb ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80009558:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000955f:	00 
                return (int64_t)Sys_Bind((int)frame->arg1, (uint16_t)frame->arg2);
ffffffff80009560:	48 8b 5f 50          	mov    0x50(%rdi),%rbx
ffffffff80009564:	44 8b 67 58          	mov    0x58(%rdi),%r12d
        return Net::Socket::Bind(fd, port, Sched::GetCurrentPid());
ffffffff80009568:	e8 53 89 01 00       	call   ffffffff80021ec0 <_ZN5Sched13GetCurrentPidEv>
ffffffff8000956d:	89 c2                	mov    %eax,%edx
ffffffff8000956f:	0f b7 f3             	movzwl %bx,%esi
ffffffff80009572:	44 89 e7             	mov    %r12d,%edi
ffffffff80009575:	e8 46 49 01 00       	call   ffffffff8001dec0 <_ZN3Net6Socket4BindEiti>
                return (int64_t)Sys_Bind((int)frame->arg1, (uint16_t)frame->arg2);
ffffffff8000957a:	48 98                	cltq
ffffffff8000957c:	e9 01 eb ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80009581:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
                Sys_CloseSock((int)frame->arg1);
ffffffff80009588:	8b 5f 58             	mov    0x58(%rdi),%ebx
        Net::Socket::Close(fd, Sched::GetCurrentPid());
ffffffff8000958b:	e8 30 89 01 00       	call   ffffffff80021ec0 <_ZN5Sched13GetCurrentPidEv>
ffffffff80009590:	89 c6                	mov    %eax,%esi
ffffffff80009592:	89 df                	mov    %ebx,%edi
ffffffff80009594:	e8 87 4e 01 00       	call   ffffffff8001e420 <_ZN3Net6Socket5CloseEii>
    }
ffffffff80009599:	e9 e2 ea ff ff       	jmp    ffffffff80008080 <SyscallDispatch+0x40>
ffffffff8000959e:	66 90                	xchg   %ax,%ax
                return (int64_t)Sys_Recv((int)frame->arg1, (uint8_t*)frame->arg2, (uint32_t)frame->arg3);
ffffffff800095a0:	44 8b 6f 48          	mov    0x48(%rdi),%r13d
ffffffff800095a4:	4c 8b 67 50          	mov    0x50(%rdi),%r12
ffffffff800095a8:	8b 5f 58             	mov    0x58(%rdi),%ebx
        return Net::Socket::Recv(fd, buf, maxLen, Sched::GetCurrentPid());
ffffffff800095ab:	e8 10 89 01 00       	call   ffffffff80021ec0 <_ZN5Sched13GetCurrentPidEv>
ffffffff800095b0:	44 89 ea             	mov    %r13d,%edx
ffffffff800095b3:	4c 89 e6             	mov    %r12,%rsi
ffffffff800095b6:	89 c1                	mov    %eax,%ecx
ffffffff800095b8:	89 df                	mov    %ebx,%edi
ffffffff800095ba:	e8 71 4b 01 00       	call   ffffffff8001e130 <_ZN3Net6Socket4RecvEiPhji>
                return (int64_t)Sys_Recv((int)frame->arg1, (uint8_t*)frame->arg2, (uint32_t)frame->arg3);
ffffffff800095bf:	48 98                	cltq
ffffffff800095c1:	e9 bc ea ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff800095c6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800095cd:	00 00 00 
                Sys_GetNetCfg((NetCfg*)frame->arg1);
ffffffff800095d0:	48 8b 5f 58          	mov    0x58(%rdi),%rbx
        if (out == nullptr) return;
ffffffff800095d4:	48 85 db             	test   %rbx,%rbx
ffffffff800095d7:	0f 84 a3 ea ff ff    	je     ffffffff80008080 <SyscallDispatch+0x40>
        out->ipAddress  = Net::GetIpAddress();
ffffffff800095dd:	e8 1e 44 01 00       	call   ffffffff8001da00 <_ZN3Net12GetIpAddressEv>
ffffffff800095e2:	89 03                	mov    %eax,(%rbx)
        out->subnetMask = Net::GetSubnetMask();
ffffffff800095e4:	e8 37 44 01 00       	call   ffffffff8001da20 <_ZN3Net13GetSubnetMaskEv>
ffffffff800095e9:	89 43 04             	mov    %eax,0x4(%rbx)
        out->gateway    = Net::GetGateway();
ffffffff800095ec:	e8 4f 44 01 00       	call   ffffffff8001da40 <_ZN3Net10GetGatewayEv>
ffffffff800095f1:	89 43 08             	mov    %eax,0x8(%rbx)
        if (Drivers::Net::E1000::IsInitialized()) {
ffffffff800095f4:	e8 a7 57 00 00       	call   ffffffff8000eda0 <_ZN7Drivers3Net5E100013IsInitializedEv>
ffffffff800095f9:	84 c0                	test   %al,%al
ffffffff800095fb:	0f 84 9c 04 00 00    	je     ffffffff80009a9d <SyscallDispatch+0x1a5d>
            mac = Drivers::Net::E1000::GetMacAddress();
ffffffff80009601:	e8 8a 57 00 00       	call   ffffffff8000ed90 <_ZN7Drivers3Net5E100013GetMacAddressEv>
        if (mac) {
ffffffff80009606:	48 85 c0             	test   %rax,%rax
ffffffff80009609:	0f 84 9b 04 00 00    	je     ffffffff80009aaa <SyscallDispatch+0x1a6a>
ffffffff8000960f:	31 d2                	xor    %edx,%edx
ffffffff80009611:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80009618:	00 00 00 00 
ffffffff8000961c:	0f 1f 40 00          	nopl   0x0(%rax)
            for (int i = 0; i < 6; i++) out->macAddress[i] = mac[i];
ffffffff80009620:	0f b6 0c 10          	movzbl (%rax,%rdx,1),%ecx
ffffffff80009624:	88 4c 13 0c          	mov    %cl,0xc(%rbx,%rdx,1)
ffffffff80009628:	48 83 c2 01          	add    $0x1,%rdx
ffffffff8000962c:	48 83 fa 06          	cmp    $0x6,%rdx
ffffffff80009630:	75 ee                	jne    ffffffff80009620 <SyscallDispatch+0x15e0>
ffffffff80009632:	0f b7 05 27 fa 01 00 	movzwl 0x1fa27(%rip),%eax        # ffffffff80029060 <col256+0x3c0>
        out->_pad[0] = 0;
ffffffff80009639:	66 89 43 12          	mov    %ax,0x12(%rbx)
        out->dnsServer = Net::GetDnsServer();
ffffffff8000963d:	e8 1e 44 01 00       	call   ffffffff8001da60 <_ZN3Net12GetDnsServerEv>
ffffffff80009642:	89 43 14             	mov    %eax,0x14(%rbx)
ffffffff80009645:	e9 36 ea ff ff       	jmp    ffffffff80008080 <SyscallDispatch+0x40>
ffffffff8000964a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        auto* proc = Sched::GetCurrentProcessPtr();
ffffffff80009650:	e8 9b 88 01 00       	call   ffffffff80021ef0 <_ZN5Sched20GetCurrentProcessPtrEv>
ffffffff80009655:	48 89 c3             	mov    %rax,%rbx
        if (proc && proc->redirected) {
ffffffff80009658:	48 85 c0             	test   %rax,%rax
ffffffff8000965b:	74 0d                	je     ffffffff8000966a <SyscallDispatch+0x162a>
ffffffff8000965d:	80 b8 88 01 00 00 00 	cmpb   $0x0,0x188(%rax)
ffffffff80009664:	0f 85 16 05 00 00    	jne    ffffffff80009b80 <SyscallDispatch+0x1b40>
        return Drivers::PS2::Keyboard::GetChar();
ffffffff8000966a:	e8 31 79 00 00       	call   ffffffff80010fa0 <_ZN7Drivers3PS28Keyboard7GetCharEv>
                return (int64_t)Sys_GetChar();
ffffffff8000966f:	48 0f be c0          	movsbq %al,%rax
ffffffff80009673:	e9 0a ea ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
ffffffff80009678:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000967f:	00 
    }
ffffffff80009680:	48 8d 65 d8          	lea    -0x28(%rbp),%rsp
ffffffff80009684:	5b                   	pop    %rbx
ffffffff80009685:	41 5c                	pop    %r12
ffffffff80009687:	41 5d                	pop    %r13
ffffffff80009689:	41 5e                	pop    %r14
ffffffff8000968b:	41 5f                	pop    %r15
ffffffff8000968d:	5d                   	pop    %rbp
        return Timekeeping::GetTicks();
ffffffff8000968e:	e9 6d 9f 01 00       	jmp    ffffffff80023600 <_ZN11Timekeeping8GetTicksEv>
ffffffff80009693:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
                Sys_GetKey((KeyEvent*)frame->arg1);
ffffffff80009698:	4c 8b 67 58          	mov    0x58(%rdi),%r12
        if (outEvent == nullptr) return;
ffffffff8000969c:	4d 85 e4             	test   %r12,%r12
ffffffff8000969f:	0f 84 db e9 ff ff    	je     ffffffff80008080 <SyscallDispatch+0x40>
        auto* proc = Sched::GetCurrentProcessPtr();
ffffffff800096a5:	e8 46 88 01 00       	call   ffffffff80021ef0 <_ZN5Sched20GetCurrentProcessPtrEv>
ffffffff800096aa:	48 89 c3             	mov    %rax,%rbx
        if (proc && proc->redirected) {
ffffffff800096ad:	48 85 c0             	test   %rax,%rax
ffffffff800096b0:	74 0d                	je     ffffffff800096bf <SyscallDispatch+0x167f>
ffffffff800096b2:	80 b8 88 01 00 00 00 	cmpb   $0x0,0x188(%rax)
ffffffff800096b9:	0f 85 21 08 00 00    	jne    ffffffff80009ee0 <SyscallDispatch+0x1ea0>
        auto k = Drivers::PS2::Keyboard::GetKey();
ffffffff800096bf:	e8 bc 77 00 00       	call   ffffffff80010e80 <_ZN7Drivers3PS28Keyboard6GetKeyEv>
ffffffff800096c4:	48 89 c2             	mov    %rax,%rdx
ffffffff800096c7:	88 45 a0             	mov    %al,-0x60(%rbp)
ffffffff800096ca:	48 c1 ea 10          	shr    $0x10,%rdx
ffffffff800096ce:	88 65 a1             	mov    %ah,-0x5f(%rbp)
ffffffff800096d1:	88 55 a2             	mov    %dl,-0x5e(%rbp)
ffffffff800096d4:	48 89 c2             	mov    %rax,%rdx
ffffffff800096d7:	48 c1 ea 18          	shr    $0x18,%rdx
ffffffff800096db:	88 55 a3             	mov    %dl,-0x5d(%rbp)
ffffffff800096de:	48 89 c2             	mov    %rax,%rdx
ffffffff800096e1:	48 c1 e8 28          	shr    $0x28,%rax
ffffffff800096e5:	88 45 a5             	mov    %al,-0x5b(%rbp)
        outEvent->scancode = k.Scancode;
ffffffff800096e8:	8b 45 a0             	mov    -0x60(%rbp),%eax
        auto k = Drivers::PS2::Keyboard::GetKey();
ffffffff800096eb:	48 c1 ea 20          	shr    $0x20,%rdx
ffffffff800096ef:	88 55 a4             	mov    %dl,-0x5c(%rbp)
        outEvent->scancode = k.Scancode;
ffffffff800096f2:	41 89 04 24          	mov    %eax,(%r12)
        outEvent->ctrl     = k.Ctrl;
ffffffff800096f6:	0f b7 45 a4          	movzwl -0x5c(%rbp),%eax
ffffffff800096fa:	66 41 89 44 24 04    	mov    %ax,0x4(%r12)
ffffffff80009700:	e9 7b e9 ff ff       	jmp    ffffffff80008080 <SyscallDispatch+0x40>
        struct [[gnu::packed]] { uint16_t limit; uint64_t base; } nullIdt = {0, 0};
ffffffff80009705:	45 31 ff             	xor    %r15d,%r15d
ffffffff80009708:	66 c7 45 a0 00 00    	movw   $0x0,-0x60(%rbp)
ffffffff8000970e:	4c 89 7d a2          	mov    %r15,-0x5e(%rbp)
        asm volatile("lidt %0; int $0x03" :: "m"(nullIdt));
ffffffff80009712:	0f 01 5d a0          	lidt   -0x60(%rbp)
ffffffff80009716:	cc                   	int3
        result->pixelVa = (id >= 0) ? outVa : 0;
ffffffff80009717:	45 31 e4             	xor    %r12d,%r12d
ffffffff8000971a:	4c 89 63 08          	mov    %r12,0x8(%rbx)
        return id >= 0 ? 0 : -1;
ffffffff8000971e:	66 90                	xchg   %ax,%ax
        switch (frame->syscall_nr) {
ffffffff80009720:	48 c7 c0 ff ff ff ff 	mov    $0xffffffffffffffff,%rax
ffffffff80009727:	e9 56 e9 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
        Kt::Rescale((size_t)scale_x, (size_t)scale_y);
ffffffff8000972c:	48 8b 70 50          	mov    0x50(%rax),%rsi
ffffffff80009730:	e8 8b 95 01 00       	call   ffffffff80022cc0 <_ZN2Kt7RescaleEmm>
ffffffff80009735:	e9 ad f8 ff ff       	jmp    ffffffff80008fe7 <SyscallDispatch+0xfa7>
ffffffff8000973a:	b8 3f 00 00 00       	mov    $0x3f,%eax
ffffffff8000973f:	e9 17 f6 ff ff       	jmp    ffffffff80008d5b <SyscallDispatch+0xd1b>
ffffffff80009744:	41 bd 01 00 00 00    	mov    $0x1,%r13d
        if (size == 0) size = 0x1000;
ffffffff8000974a:	41 bf 00 10 00 00    	mov    $0x1000,%r15d
ffffffff80009750:	e9 71 e9 ff ff       	jmp    ffffffff800080c6 <SyscallDispatch+0x86>
ffffffff80009755:	4c 8b 6d 88          	mov    -0x78(%rbp),%r13
ffffffff80009759:	4c 8b b5 78 ff ff ff 	mov    -0x88(%rbp),%r14
        if (Drivers::Net::E1000::IsInitialized()) {
ffffffff80009760:	e8 3b 56 00 00       	call   ffffffff8000eda0 <_ZN7Drivers3Net5E100013IsInitializedEv>
ffffffff80009765:	84 c0                	test   %al,%al
ffffffff80009767:	0f 85 e3 08 00 00    	jne    ffffffff8000a050 <SyscallDispatch+0x2010>
        if (Drivers::Net::E1000E::IsInitialized()) {
ffffffff8000976d:	e8 5e 6f 00 00       	call   ffffffff800106d0 <_ZN7Drivers3Net6E1000E13IsInitializedEv>
ffffffff80009772:	84 c0                	test   %al,%al
ffffffff80009774:	0f 85 bb 07 00 00    	jne    ffffffff80009f35 <SyscallDispatch+0x1ef5>
        if (Drivers::Graphics::IntelGPU::IsInitialized()) {
ffffffff8000977a:	e8 21 47 00 00       	call   ffffffff8000dea0 <_ZN7Drivers8Graphics8IntelGPU13IsInitializedEv>
ffffffff8000977f:	84 c0                	test   %al,%al
ffffffff80009781:	0f 85 e8 06 00 00    	jne    ffffffff80009e6f <SyscallDispatch+0x1e2f>
        auto& pciDevs = Pci::GetDevices();
ffffffff80009787:	e8 64 6a 01 00       	call   ffffffff800201f0 <_ZN3Pci10GetDevicesEv>
        for (int i = 0; i < (int)pciDevs.size() && count < maxCount; i++) {
ffffffff8000978c:	44 8b 40 08          	mov    0x8(%rax),%r8d
        auto& pciDevs = Pci::GetDevices();
ffffffff80009790:	49 89 c2             	mov    %rax,%r10
        for (int i = 0; i < (int)pciDevs.size() && count < maxCount; i++) {
ffffffff80009793:	45 85 c0             	test   %r8d,%r8d
ffffffff80009796:	0f 8e f9 02 00 00    	jle    ffffffff80009a95 <SyscallDispatch+0x1a55>
ffffffff8000979c:	49 63 c7             	movslq %r15d,%rax
ffffffff8000979f:	44 89 7d 88          	mov    %r15d,-0x78(%rbp)
ffffffff800097a3:	45 31 e4             	xor    %r12d,%r12d
ffffffff800097a6:	48 8d 04 80          	lea    (%rax,%rax,4),%rax
ffffffff800097aa:	48 8d 04 80          	lea    (%rax,%rax,4),%rax
ffffffff800097ae:	49 8d 5c 85 00       	lea    0x0(%r13,%rax,4),%rbx
ffffffff800097b3:	4d 89 d5             	mov    %r10,%r13
ffffffff800097b6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800097bd:	00 00 00 
ffffffff800097c0:	8b 75 88             	mov    -0x78(%rbp),%esi
ffffffff800097c3:	39 75 84             	cmp    %esi,-0x7c(%rbp)
ffffffff800097c6:	0f 8e c5 02 00 00    	jle    ffffffff80009a91 <SyscallDispatch+0x1a51>
            }
        }

        T& operator[](std::size_t position)
        {
            if (position > (capacity - 1)) {
ffffffff800097cc:	49 8b 45 10          	mov    0x10(%r13),%rax
ffffffff800097d0:	4d 89 e6             	mov    %r12,%r14
ffffffff800097d3:	49 c1 e6 04          	shl    $0x4,%r14
ffffffff800097d7:	48 83 e8 01          	sub    $0x1,%rax
ffffffff800097db:	4c 39 e0             	cmp    %r12,%rax
ffffffff800097de:	73 4b                	jae    ffffffff8000982b <SyscallDispatch+0x17eb>
            Print(string);
ffffffff800097e0:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff800097e7:	45 31 f6             	xor    %r14d,%r14d
ffffffff800097ea:	e8 d1 99 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800097ef:	48 c7 c7 44 a4 02 80 	mov    $0xffffffff8002a444,%rdi
ffffffff800097f6:	e8 c5 99 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800097fb:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff80009802:	e8 b9 99 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80009807:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000980e:	e8 ad 99 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80009813:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000981a:	e8 a1 99 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000981f:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff80009826:	e8 95 99 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                
                return at(0);
            }
            else
            {
                return array[position];
ffffffff8000982b:	4d 03 75 00          	add    0x0(%r13),%r14
            p = dl_append_dec(detail, p, d.Function, 48);
ffffffff8000982f:	4c 8d 7d a0          	lea    -0x60(%rbp),%r15
            const char* className = Pci::GetClassName(d.ClassCode, d.SubClass);
ffffffff80009833:	41 0f b6 76 0b       	movzbl 0xb(%r14),%esi
ffffffff80009838:	41 0f b6 7e 0a       	movzbl 0xa(%r14),%edi
ffffffff8000983d:	e8 de 64 01 00       	call   ffffffff8001fd20 <_ZN3Pci12GetClassNameEhh>
        for (int i = 0; src[i] && pos < max - 1; i++) dst[pos++] = src[i];
ffffffff80009842:	bf 2e 00 00 00       	mov    $0x2e,%edi
            p = dl_append_dec(detail, p, d.Function, 48);
ffffffff80009847:	be 06 00 00 00       	mov    $0x6,%esi
            const char* className = Pci::GetClassName(d.ClassCode, d.SubClass);
ffffffff8000984c:	49 89 c3             	mov    %rax,%r11
            p = dl_append_hex(detail, p, d.Bus, 2, 48);
ffffffff8000984f:	41 0f b6 46 02       	movzbl 0x2(%r14),%eax
        for (int i = 0; src[i] && pos < max - 1; i++) dst[pos++] = src[i];
ffffffff80009854:	c6 45 a2 3a          	movb   $0x3a,-0x5e(%rbp)
        for (int i = digits - 1; i >= 0; i--) { tmp[i] = hex[val & 0xF]; val >>= 4; }
ffffffff80009858:	48 89 c2             	mov    %rax,%rdx
ffffffff8000985b:	48 c1 e8 04          	shr    $0x4,%rax
ffffffff8000985f:	83 e2 0f             	and    $0xf,%edx
ffffffff80009862:	83 e0 0f             	and    $0xf,%eax
ffffffff80009865:	0f b6 92 bd a3 02 80 	movzbl -0x7ffd5c43(%rdx),%edx
        for (int i = 0; i < digits && pos < max - 1; i++) dst[pos++] = tmp[i];
ffffffff8000986c:	0f b6 80 bd a3 02 80 	movzbl -0x7ffd5c43(%rax),%eax
ffffffff80009873:	88 55 a1             	mov    %dl,-0x5f(%rbp)
ffffffff80009876:	88 45 a0             	mov    %al,-0x60(%rbp)
            p = dl_append_hex(detail, p, d.Device, 2, 48);
ffffffff80009879:	41 0f b6 46 03       	movzbl 0x3(%r14),%eax
        for (int i = 0; src[i] && pos < max - 1; i++) dst[pos++] = src[i];
ffffffff8000987e:	66 89 7d a5          	mov    %di,-0x5b(%rbp)
            p = dl_append_dec(detail, p, d.Function, 48);
ffffffff80009882:	4c 89 ff             	mov    %r15,%rdi
        for (int i = digits - 1; i >= 0; i--) { tmp[i] = hex[val & 0xF]; val >>= 4; }
ffffffff80009885:	48 89 c2             	mov    %rax,%rdx
ffffffff80009888:	48 c1 e8 04          	shr    $0x4,%rax
ffffffff8000988c:	83 e2 0f             	and    $0xf,%edx
ffffffff8000988f:	83 e0 0f             	and    $0xf,%eax
ffffffff80009892:	0f b6 92 bd a3 02 80 	movzbl -0x7ffd5c43(%rdx),%edx
        for (int i = 0; i < digits && pos < max - 1; i++) dst[pos++] = tmp[i];
ffffffff80009899:	0f b6 80 bd a3 02 80 	movzbl -0x7ffd5c43(%rax),%eax
ffffffff800098a0:	88 55 a4             	mov    %dl,-0x5c(%rbp)
ffffffff800098a3:	88 45 a3             	mov    %al,-0x5d(%rbp)
            p = dl_append_dec(detail, p, d.Function, 48);
ffffffff800098a6:	41 0f b6 56 04       	movzbl 0x4(%r14),%edx
ffffffff800098ab:	e8 90 e6 ff ff       	call   ffffffff80007f40 <_ZN6ZenithL13dl_append_decEPciii.constprop.0>
        for (int i = 0; src[i] && pos < max - 1; i++) dst[pos++] = src[i];
ffffffff800098b0:	48 63 c8             	movslq %eax,%rcx
ffffffff800098b3:	49 8d 14 0f          	lea    (%r15,%rcx,1),%rdx
ffffffff800098b7:	83 f8 2e             	cmp    $0x2e,%eax
ffffffff800098ba:	7f 09                	jg     ffffffff800098c5 <SyscallDispatch+0x1885>
ffffffff800098bc:	c6 02 20             	movb   $0x20,(%rdx)
ffffffff800098bf:	83 c0 01             	add    $0x1,%eax
ffffffff800098c2:	48 63 c8             	movslq %eax,%rcx
        dst[pos] = '\0';
ffffffff800098c5:	4c 01 f9             	add    %r15,%rcx
ffffffff800098c8:	4c 8d 4d 98          	lea    -0x68(%rbp),%r9
            p = dl_append_hex(detail, p, d.VendorId, 4, 48);
ffffffff800098cc:	41 0f b7 76 06       	movzwl 0x6(%r14),%esi
ffffffff800098d1:	48 8d 7d 94          	lea    -0x6c(%rbp),%rdi
        dst[pos] = '\0';
ffffffff800098d5:	c6 01 00             	movb   $0x0,(%rcx)
        for (int i = digits - 1; i >= 0; i--) { tmp[i] = hex[val & 0xF]; val >>= 4; }
ffffffff800098d8:	4c 89 ca             	mov    %r9,%rdx
ffffffff800098db:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff800098e0:	41 89 f0             	mov    %esi,%r8d
ffffffff800098e3:	48 83 ea 01          	sub    $0x1,%rdx
ffffffff800098e7:	c1 ee 04             	shr    $0x4,%esi
ffffffff800098ea:	41 83 e0 0f          	and    $0xf,%r8d
ffffffff800098ee:	45 0f b6 80 bd a3 02 	movzbl -0x7ffd5c43(%r8),%r8d
ffffffff800098f5:	80 
ffffffff800098f6:	44 88 42 04          	mov    %r8b,0x4(%rdx)
ffffffff800098fa:	48 39 d7             	cmp    %rdx,%rdi
ffffffff800098fd:	75 e1                	jne    ffffffff800098e0 <SyscallDispatch+0x18a0>
        for (int i = 0; i < digits && pos < max - 1; i++) dst[pos++] = tmp[i];
ffffffff800098ff:	83 f8 2e             	cmp    $0x2e,%eax
ffffffff80009902:	0f 8f 82 00 00 00    	jg     ffffffff8000998a <SyscallDispatch+0x194a>
ffffffff80009908:	4c 89 ad 78 ff ff ff 	mov    %r13,-0x88(%rbp)
ffffffff8000990f:	ba 01 00 00 00       	mov    $0x1,%edx
ffffffff80009914:	48 8d 75 97          	lea    -0x69(%rbp),%rsi
ffffffff80009918:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000991f:	00 00 00 00 
ffffffff80009923:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000992a:	00 00 00 00 
ffffffff8000992e:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80009935:	00 00 00 00 
ffffffff80009939:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
ffffffff80009940:	44 0f b6 04 16       	movzbl (%rsi,%rdx,1),%r8d
ffffffff80009945:	41 89 c2             	mov    %eax,%r10d
ffffffff80009948:	83 c0 01             	add    $0x1,%eax
ffffffff8000994b:	48 83 fa 04          	cmp    $0x4,%rdx
ffffffff8000994f:	41 0f 95 c5          	setne  %r13b
ffffffff80009953:	83 f8 2f             	cmp    $0x2f,%eax
ffffffff80009956:	44 88 44 11 ff       	mov    %r8b,-0x1(%rcx,%rdx,1)
ffffffff8000995b:	41 0f 95 c0          	setne  %r8b
ffffffff8000995f:	48 83 c2 01          	add    $0x1,%rdx
ffffffff80009963:	45 84 c5             	test   %r8b,%r13b
ffffffff80009966:	75 d8                	jne    ffffffff80009940 <SyscallDispatch+0x1900>
        dst[pos] = '\0';
ffffffff80009968:	48 63 c8             	movslq %eax,%rcx
ffffffff8000996b:	4c 8b ad 78 ff ff ff 	mov    -0x88(%rbp),%r13
ffffffff80009972:	4c 01 f9             	add    %r15,%rcx
ffffffff80009975:	c6 01 00             	movb   $0x0,(%rcx)
        for (int i = 0; src[i] && pos < max - 1; i++) dst[pos++] = src[i];
ffffffff80009978:	83 f8 2f             	cmp    $0x2f,%eax
ffffffff8000997b:	74 0d                	je     ffffffff8000998a <SyscallDispatch+0x194a>
ffffffff8000997d:	41 8d 42 02          	lea    0x2(%r10),%eax
ffffffff80009981:	c6 01 3a             	movb   $0x3a,(%rcx)
        dst[pos] = '\0';
ffffffff80009984:	48 63 c8             	movslq %eax,%rcx
ffffffff80009987:	4c 01 f9             	add    %r15,%rcx
ffffffff8000998a:	c6 01 00             	movb   $0x0,(%rcx)
            p = dl_append_hex(detail, p, d.DeviceId, 4, 48);
ffffffff8000998d:	41 0f b7 76 08       	movzwl 0x8(%r14),%esi
        for (int i = digits - 1; i >= 0; i--) { tmp[i] = hex[val & 0xF]; val >>= 4; }
ffffffff80009992:	4c 89 ca             	mov    %r9,%rdx
ffffffff80009995:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000999c:	00 00 00 00 
ffffffff800099a0:	41 89 f0             	mov    %esi,%r8d
ffffffff800099a3:	48 83 ea 01          	sub    $0x1,%rdx
ffffffff800099a7:	c1 ee 04             	shr    $0x4,%esi
ffffffff800099aa:	41 83 e0 0f          	and    $0xf,%r8d
ffffffff800099ae:	45 0f b6 80 bd a3 02 	movzbl -0x7ffd5c43(%r8),%r8d
ffffffff800099b5:	80 
ffffffff800099b6:	44 88 42 04          	mov    %r8b,0x4(%rdx)
ffffffff800099ba:	48 39 d7             	cmp    %rdx,%rdi
ffffffff800099bd:	75 e1                	jne    ffffffff800099a0 <SyscallDispatch+0x1960>
        for (int i = 0; i < digits && pos < max - 1; i++) dst[pos++] = tmp[i];
ffffffff800099bf:	83 f8 2e             	cmp    $0x2e,%eax
ffffffff800099c2:	7f 69                	jg     ffffffff80009a2d <SyscallDispatch+0x19ed>
ffffffff800099c4:	83 c0 01             	add    $0x1,%eax
ffffffff800099c7:	4c 8d 4d 9f          	lea    -0x61(%rbp),%r9
ffffffff800099cb:	48 8d 75 97          	lea    -0x69(%rbp),%rsi
ffffffff800099cf:	ba 01 00 00 00       	mov    $0x1,%edx
ffffffff800099d4:	48 98                	cltq
ffffffff800099d6:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800099dd:	00 00 00 00 
ffffffff800099e1:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800099e8:	00 00 00 00 
ffffffff800099ec:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800099f3:	00 00 00 00 
ffffffff800099f7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff800099fe:	00 00 
ffffffff80009a00:	83 f8 2e             	cmp    $0x2e,%eax
ffffffff80009a03:	0f b6 0c 16          	movzbl (%rsi,%rdx,1),%ecx
ffffffff80009a07:	41 0f 9e c0          	setle  %r8b
ffffffff80009a0b:	48 83 fa 04          	cmp    $0x4,%rdx
ffffffff80009a0f:	40 0f 95 c7          	setne  %dil
ffffffff80009a13:	41 88 0c 01          	mov    %cl,(%r9,%rax,1)
ffffffff80009a17:	48 83 c2 01          	add    $0x1,%rdx
ffffffff80009a1b:	48 89 c1             	mov    %rax,%rcx
ffffffff80009a1e:	48 83 c0 01          	add    $0x1,%rax
ffffffff80009a22:	41 84 f8             	test   %dil,%r8b
ffffffff80009a25:	75 d9                	jne    ffffffff80009a00 <SyscallDispatch+0x19c0>
        dst[pos] = '\0';
ffffffff80009a27:	48 63 c9             	movslq %ecx,%rcx
ffffffff80009a2a:	4c 01 f9             	add    %r15,%rcx
ffffffff80009a2d:	c6 01 00             	movb   $0x0,(%rcx)
            buf[count].category = cat;
ffffffff80009a30:	31 c0                	xor    %eax,%eax
ffffffff80009a32:	c7 03 07 00 00 00    	movl   $0x7,(%rbx)
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80009a38:	41 0f b6 14 03       	movzbl (%r11,%rax,1),%edx
ffffffff80009a3d:	84 d2                	test   %dl,%dl
ffffffff80009a3f:	74 0e                	je     ffffffff80009a4f <SyscallDispatch+0x1a0f>
ffffffff80009a41:	88 54 03 04          	mov    %dl,0x4(%rbx,%rax,1)
ffffffff80009a45:	48 83 c0 01          	add    $0x1,%rax
ffffffff80009a49:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80009a4d:	75 e9                	jne    ffffffff80009a38 <SyscallDispatch+0x19f8>
        dst[i] = '\0';
ffffffff80009a4f:	c6 44 03 04 00       	movb   $0x0,0x4(%rbx,%rax,1)
            dl_strcpy(buf[count].detail, detail, 48);
ffffffff80009a54:	48 8d 4b 34          	lea    0x34(%rbx),%rcx
ffffffff80009a58:	31 c0                	xor    %eax,%eax
ffffffff80009a5a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80009a60:	41 0f b6 14 07       	movzbl (%r15,%rax,1),%edx
ffffffff80009a65:	84 d2                	test   %dl,%dl
ffffffff80009a67:	74 0e                	je     ffffffff80009a77 <SyscallDispatch+0x1a37>
ffffffff80009a69:	88 54 03 34          	mov    %dl,0x34(%rbx,%rax,1)
ffffffff80009a6d:	48 83 c0 01          	add    $0x1,%rax
ffffffff80009a71:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80009a75:	75 e9                	jne    ffffffff80009a60 <SyscallDispatch+0x1a20>
            count++;
ffffffff80009a77:	83 45 88 01          	addl   $0x1,-0x78(%rbp)
        for (int i = 0; i < (int)pciDevs.size() && count < maxCount; i++) {
ffffffff80009a7b:	49 83 c4 01          	add    $0x1,%r12
ffffffff80009a7f:	48 83 c3 64          	add    $0x64,%rbx
        dst[i] = '\0';
ffffffff80009a83:	c6 04 01 00          	movb   $0x0,(%rcx,%rax,1)
        for (int i = 0; i < (int)pciDevs.size() && count < maxCount; i++) {
ffffffff80009a87:	45 39 65 08          	cmp    %r12d,0x8(%r13)
ffffffff80009a8b:	0f 8f 2f fd ff ff    	jg     ffffffff800097c0 <SyscallDispatch+0x1780>
ffffffff80009a91:	44 8b 7d 88          	mov    -0x78(%rbp),%r15d
                return (int64_t)Sys_DevList((DevInfo*)frame->arg1, (int)frame->arg2);
ffffffff80009a95:	49 63 c7             	movslq %r15d,%rax
        return count;
ffffffff80009a98:	e9 e5 e5 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
        } else if (Drivers::Net::E1000E::IsInitialized()) {
ffffffff80009a9d:	e8 2e 6c 00 00       	call   ffffffff800106d0 <_ZN7Drivers3Net6E1000E13IsInitializedEv>
ffffffff80009aa2:	84 c0                	test   %al,%al
ffffffff80009aa4:	0f 85 2c 06 00 00    	jne    ffffffff8000a0d6 <SyscallDispatch+0x2096>
            for (int i = 0; i < 6; i++) out->macAddress[i] = 0;
ffffffff80009aaa:	0f b7 05 af f5 01 00 	movzwl 0x1f5af(%rip),%eax        # ffffffff80029060 <col256+0x3c0>
ffffffff80009ab1:	c7 43 0c 00 00 00 00 	movl   $0x0,0xc(%rbx)
ffffffff80009ab8:	66 89 43 10          	mov    %ax,0x10(%rbx)
ffffffff80009abc:	e9 78 fb ff ff       	jmp    ffffffff80009639 <SyscallDispatch+0x15f9>
        for (int i = 0; src[i] && pos < max - 1; i++) dst[pos++] = src[i];
ffffffff80009ac1:	89 c6                	mov    %eax,%esi
ffffffff80009ac3:	e9 7f ea ff ff       	jmp    ffffffff80008547 <SyscallDispatch+0x507>
                    if (dev->InterfaceProtocol == 1) devName = "USB HID Keyboard";
ffffffff80009ac8:	0f b6 43 0e          	movzbl 0xe(%rbx),%eax
ffffffff80009acc:	49 c7 c5 5c a2 02 80 	mov    $0xffffffff8002a25c,%r13
ffffffff80009ad3:	3c 01                	cmp    $0x1,%al
ffffffff80009ad5:	0f 84 35 ea ff ff    	je     ffffffff80008510 <SyscallDispatch+0x4d0>
                    else if (dev->InterfaceProtocol == 2) devName = "USB HID Mouse";
ffffffff80009adb:	3c 02                	cmp    $0x2,%al
ffffffff80009add:	49 c7 c5 7b a2 02 80 	mov    $0xffffffff8002a27b,%r13
ffffffff80009ae4:	48 c7 c0 6d a2 02 80 	mov    $0xffffffff8002a26d,%rax
ffffffff80009aeb:	4c 0f 44 e8          	cmove  %rax,%r13
ffffffff80009aef:	e9 1c ea ff ff       	jmp    ffffffff80008510 <SyscallDispatch+0x4d0>
        if (proc->outBuf) return proc;  // owns buffers
ffffffff80009af4:	48 83 b8 90 01 00 00 	cmpq   $0x0,0x190(%rax)
ffffffff80009afb:	00 
ffffffff80009afc:	0f 84 d0 04 00 00    	je     ffffffff80009fd2 <SyscallDispatch+0x1f92>
            if (target) return target->keyHead != target->keyTail;
ffffffff80009b02:	8b 98 34 03 00 00    	mov    0x334(%rax),%ebx
ffffffff80009b08:	39 98 30 03 00 00    	cmp    %ebx,0x330(%rax)
ffffffff80009b0e:	0f 95 c0             	setne  %al
ffffffff80009b11:	e9 96 f8 ff ff       	jmp    ffffffff800093ac <SyscallDispatch+0x136c>
        if (proc->outBuf) return proc;  // owns buffers
ffffffff80009b16:	48 83 b8 90 01 00 00 	cmpq   $0x0,0x190(%rax)
ffffffff80009b1d:	00 
ffffffff80009b1e:	0f 84 79 04 00 00    	je     ffffffff80009f9d <SyscallDispatch+0x1f5d>
            if (target && target->termCols > 0 && target->termRows > 0) {
ffffffff80009b24:	48 63 90 38 03 00 00 	movslq 0x338(%rax),%rdx
ffffffff80009b2b:	85 d2                	test   %edx,%edx
ffffffff80009b2d:	0f 8e b4 f4 ff ff    	jle    ffffffff80008fe7 <SyscallDispatch+0xfa7>
ffffffff80009b33:	8b 80 3c 03 00 00    	mov    0x33c(%rax),%eax
ffffffff80009b39:	85 c0                	test   %eax,%eax
ffffffff80009b3b:	0f 8e a6 f4 ff ff    	jle    ffffffff80008fe7 <SyscallDispatch+0xfa7>
                return ((uint64_t)target->termRows << 32) | ((uint64_t)target->termCols & 0xFFFFFFFF);
ffffffff80009b41:	48 c1 e0 20          	shl    $0x20,%rax
ffffffff80009b45:	48 09 d0             	or     %rdx,%rax
ffffffff80009b48:	e9 35 e5 ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
        if (proc->outBuf) return proc;  // owns buffers
ffffffff80009b4d:	48 8b 90 90 01 00 00 	mov    0x190(%rax),%rdx
ffffffff80009b54:	48 85 d2             	test   %rdx,%rdx
ffffffff80009b57:	0f 84 93 04 00 00    	je     ffffffff80009ff0 <SyscallDispatch+0x1fb0>
        buf[head] = byte;
ffffffff80009b5d:	8b 88 98 01 00 00    	mov    0x198(%rax),%ecx
                RingWrite(target->outBuf, target->outHead, target->outTail, Sched::Process::IoBufSize, (uint8_t)c);
ffffffff80009b63:	88 1c 0a             	mov    %bl,(%rdx,%rcx,1)
        head = (head + 1) % size;
ffffffff80009b66:	8b 98 98 01 00 00    	mov    0x198(%rax),%ebx
ffffffff80009b6c:	8d 53 01             	lea    0x1(%rbx),%edx
ffffffff80009b6f:	81 e2 ff 0f 00 00    	and    $0xfff,%edx
ffffffff80009b75:	89 90 98 01 00 00    	mov    %edx,0x198(%rax)
                return;
ffffffff80009b7b:	e9 00 e5 ff ff       	jmp    ffffffff80008080 <SyscallDispatch+0x40>
        if (proc->outBuf) return proc;  // owns buffers
ffffffff80009b80:	48 83 b8 90 01 00 00 	cmpq   $0x0,0x190(%rax)
ffffffff80009b87:	00 
ffffffff80009b88:	0f 84 28 04 00 00    	je     ffffffff80009fb6 <SyscallDispatch+0x1f76>
            if (target && target->inBuf) {
ffffffff80009b8e:	48 83 bb a0 01 00 00 	cmpq   $0x0,0x1a0(%rbx)
ffffffff80009b95:	00 
ffffffff80009b96:	75 0d                	jne    ffffffff80009ba5 <SyscallDispatch+0x1b65>
ffffffff80009b98:	e9 cd fa ff ff       	jmp    ffffffff8000966a <SyscallDispatch+0x162a>
ffffffff80009b9d:	0f 1f 00             	nopl   (%rax)
                    Sched::Schedule(); // yield until parent writes
ffffffff80009ba0:	e8 1b 81 01 00       	call   ffffffff80021cc0 <_ZN5Sched8ScheduleEv>
                while (target->inTail == target->inHead) {
ffffffff80009ba5:	8b 83 ac 01 00 00    	mov    0x1ac(%rbx),%eax
ffffffff80009bab:	3b 83 a8 01 00 00    	cmp    0x1a8(%rbx),%eax
ffffffff80009bb1:	74 ed                	je     ffffffff80009ba0 <SyscallDispatch+0x1b60>
                uint8_t c = target->inBuf[target->inTail];
ffffffff80009bb3:	48 8b 8b a0 01 00 00 	mov    0x1a0(%rbx),%rcx
ffffffff80009bba:	89 c2                	mov    %eax,%edx
                target->inTail = (target->inTail + 1) % Sched::Process::IoBufSize;
ffffffff80009bbc:	83 c0 01             	add    $0x1,%eax
ffffffff80009bbf:	25 ff 0f 00 00       	and    $0xfff,%eax
                uint8_t c = target->inBuf[target->inTail];
ffffffff80009bc4:	0f b6 14 11          	movzbl (%rcx,%rdx,1),%edx
                target->inTail = (target->inTail + 1) % Sched::Process::IoBufSize;
ffffffff80009bc8:	89 83 ac 01 00 00    	mov    %eax,0x1ac(%rbx)
                return (char)c;
ffffffff80009bce:	89 d0                	mov    %edx,%eax
ffffffff80009bd0:	e9 9a fa ff ff       	jmp    ffffffff8000966f <SyscallDispatch+0x162f>
        if (proc->outBuf) return proc;  // owns buffers
ffffffff80009bd5:	48 83 b8 90 01 00 00 	cmpq   $0x0,0x190(%rax)
ffffffff80009bdc:	00 
ffffffff80009bdd:	0f 84 44 04 00 00    	je     ffffffff8000a027 <SyscallDispatch+0x1fe7>
                for (int i = 0; text[i]; i++) {
ffffffff80009be3:	0f b6 0b             	movzbl (%rbx),%ecx
ffffffff80009be6:	84 c9                	test   %cl,%cl
ffffffff80009be8:	0f 84 92 e4 ff ff    	je     ffffffff80008080 <SyscallDispatch+0x40>
        buf[head] = byte;
ffffffff80009bee:	8b 90 98 01 00 00    	mov    0x198(%rax),%edx
ffffffff80009bf4:	48 83 c3 01          	add    $0x1,%rbx
ffffffff80009bf8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80009bff:	00 
ffffffff80009c00:	48 8b b0 90 01 00 00 	mov    0x190(%rax),%rsi
                for (int i = 0; text[i]; i++) {
ffffffff80009c07:	48 83 c3 01          	add    $0x1,%rbx
        buf[head] = byte;
ffffffff80009c0b:	88 0c 16             	mov    %cl,(%rsi,%rdx,1)
        head = (head + 1) % size;
ffffffff80009c0e:	8b b0 98 01 00 00    	mov    0x198(%rax),%esi
ffffffff80009c14:	8d 56 01             	lea    0x1(%rsi),%edx
ffffffff80009c17:	81 e2 ff 0f 00 00    	and    $0xfff,%edx
ffffffff80009c1d:	89 90 98 01 00 00    	mov    %edx,0x198(%rax)
                for (int i = 0; text[i]; i++) {
ffffffff80009c23:	0f b6 4b ff          	movzbl -0x1(%rbx),%ecx
ffffffff80009c27:	84 c9                	test   %cl,%cl
ffffffff80009c29:	75 d5                	jne    ffffffff80009c00 <SyscallDispatch+0x1bc0>
ffffffff80009c2b:	e9 50 e4 ff ff       	jmp    ffffffff80008080 <SyscallDispatch+0x40>
        if (cpuCount > 0) {
ffffffff80009c30:	4c 89 e9             	mov    %r13,%rcx
ffffffff80009c33:	41 bf 01 00 00 00    	mov    $0x1,%r15d
            if (count >= maxCount) return;
ffffffff80009c39:	31 db                	xor    %ebx,%ebx
            buf[count].category = cat;
ffffffff80009c3b:	c7 01 01 00 00 00    	movl   $0x1,(%rcx)
            dl_strcpy(buf[count].name, name, 48);
ffffffff80009c41:	48 8d 71 04          	lea    0x4(%rcx),%rsi
ffffffff80009c45:	31 c0                	xor    %eax,%eax
ffffffff80009c47:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80009c4e:	00 00 00 00 
ffffffff80009c52:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80009c59:	00 00 00 00 
ffffffff80009c5d:	0f 1f 00             	nopl   (%rax)
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80009c60:	0f b6 90 f7 a2 02 80 	movzbl -0x7ffd5d09(%rax),%edx
ffffffff80009c67:	84 d2                	test   %dl,%dl
ffffffff80009c69:	74 0e                	je     ffffffff80009c79 <SyscallDispatch+0x1c39>
ffffffff80009c6b:	88 54 01 04          	mov    %dl,0x4(%rcx,%rax,1)
ffffffff80009c6f:	48 83 c0 01          	add    $0x1,%rax
ffffffff80009c73:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80009c77:	75 e7                	jne    ffffffff80009c60 <SyscallDispatch+0x1c20>
        dst[i] = '\0';
ffffffff80009c79:	c6 04 06 00          	movb   $0x0,(%rsi,%rax,1)
            dl_strcpy(buf[count].detail, detail, 48);
ffffffff80009c7d:	48 8d 71 34          	lea    0x34(%rcx),%rsi
ffffffff80009c81:	31 c0                	xor    %eax,%eax
ffffffff80009c83:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80009c8a:	00 00 00 00 
ffffffff80009c8e:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80009c95:	00 00 00 00 
ffffffff80009c99:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80009ca0:	0f b6 90 02 a3 02 80 	movzbl -0x7ffd5cfe(%rax),%edx
ffffffff80009ca7:	84 d2                	test   %dl,%dl
ffffffff80009ca9:	74 0e                	je     ffffffff80009cb9 <SyscallDispatch+0x1c79>
ffffffff80009cab:	88 54 01 34          	mov    %dl,0x34(%rcx,%rax,1)
ffffffff80009caf:	48 83 c0 01          	add    $0x1,%rax
ffffffff80009cb3:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80009cb7:	75 e7                	jne    ffffffff80009ca0 <SyscallDispatch+0x1c60>
        dst[i] = '\0';
ffffffff80009cb9:	c6 04 06 00          	movb   $0x0,(%rsi,%rax,1)
            if (count >= maxCount) return;
ffffffff80009cbd:	45 39 fe             	cmp    %r15d,%r14d
ffffffff80009cc0:	0f 8e c8 e7 ff ff    	jle    ffffffff8000848e <SyscallDispatch+0x44e>
            buf[count].category = cat;
ffffffff80009cc6:	49 63 c7             	movslq %r15d,%rax
ffffffff80009cc9:	48 8d 04 80          	lea    (%rax,%rax,4),%rax
ffffffff80009ccd:	48 8d 04 80          	lea    (%rax,%rax,4),%rax
ffffffff80009cd1:	49 8d 4c 85 00       	lea    0x0(%r13,%rax,4),%rcx
            dl_strcpy(buf[count].name, name, 48);
ffffffff80009cd6:	31 c0                	xor    %eax,%eax
            buf[count].category = cat;
ffffffff80009cd8:	c7 01 01 00 00 00    	movl   $0x1,(%rcx)
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80009cde:	66 90                	xchg   %ax,%ax
ffffffff80009ce0:	0f b6 90 1f a3 02 80 	movzbl -0x7ffd5ce1(%rax),%edx
ffffffff80009ce7:	84 d2                	test   %dl,%dl
ffffffff80009ce9:	74 0e                	je     ffffffff80009cf9 <SyscallDispatch+0x1cb9>
ffffffff80009ceb:	88 54 01 04          	mov    %dl,0x4(%rcx,%rax,1)
ffffffff80009cef:	48 83 c0 01          	add    $0x1,%rax
ffffffff80009cf3:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80009cf7:	75 e7                	jne    ffffffff80009ce0 <SyscallDispatch+0x1ca0>
        dst[i] = '\0';
ffffffff80009cf9:	c6 44 01 04 00       	movb   $0x0,0x4(%rcx,%rax,1)
            dl_strcpy(buf[count].detail, detail, 48);
ffffffff80009cfe:	31 c0                	xor    %eax,%eax
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80009d00:	0f b6 90 28 a3 02 80 	movzbl -0x7ffd5cd8(%rax),%edx
ffffffff80009d07:	84 d2                	test   %dl,%dl
ffffffff80009d09:	74 0e                	je     ffffffff80009d19 <SyscallDispatch+0x1cd9>
ffffffff80009d0b:	88 54 01 34          	mov    %dl,0x34(%rcx,%rax,1)
ffffffff80009d0f:	48 83 c0 01          	add    $0x1,%rax
ffffffff80009d13:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80009d17:	75 e7                	jne    ffffffff80009d00 <SyscallDispatch+0x1cc0>
            count++;
ffffffff80009d19:	44 8d 7b 02          	lea    0x2(%rbx),%r15d
        dst[i] = '\0';
ffffffff80009d1d:	c6 44 01 34 00       	movb   $0x0,0x34(%rcx,%rax,1)
            if (count >= maxCount) return;
ffffffff80009d22:	45 39 fe             	cmp    %r15d,%r14d
ffffffff80009d25:	0f 8e 63 e7 ff ff    	jle    ffffffff8000848e <SyscallDispatch+0x44e>
            buf[count].category = cat;
ffffffff80009d2b:	49 63 c7             	movslq %r15d,%rax
ffffffff80009d2e:	48 8d 04 80          	lea    (%rax,%rax,4),%rax
ffffffff80009d32:	4c 8d 24 80          	lea    (%rax,%rax,4),%r12
            dl_strcpy(buf[count].name, name, 48);
ffffffff80009d36:	31 c0                	xor    %eax,%eax
            buf[count].category = cat;
ffffffff80009d38:	49 c1 e4 02          	shl    $0x2,%r12
ffffffff80009d3c:	4b 8d 4c 25 00       	lea    0x0(%r13,%r12,1),%rcx
ffffffff80009d41:	c7 01 02 00 00 00    	movl   $0x2,(%rcx)
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80009d47:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80009d4e:	00 00 00 00 
ffffffff80009d52:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80009d59:	00 00 00 00 
ffffffff80009d5d:	0f 1f 00             	nopl   (%rax)
ffffffff80009d60:	0f b6 90 40 a3 02 80 	movzbl -0x7ffd5cc0(%rax),%edx
ffffffff80009d67:	84 d2                	test   %dl,%dl
ffffffff80009d69:	74 0e                	je     ffffffff80009d79 <SyscallDispatch+0x1d39>
ffffffff80009d6b:	88 54 01 04          	mov    %dl,0x4(%rcx,%rax,1)
ffffffff80009d6f:	48 83 c0 01          	add    $0x1,%rax
ffffffff80009d73:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80009d77:	75 e7                	jne    ffffffff80009d60 <SyscallDispatch+0x1d20>
        dst[i] = '\0';
ffffffff80009d79:	c6 44 01 04 00       	movb   $0x0,0x4(%rcx,%rax,1)
            dl_strcpy(buf[count].detail, detail, 48);
ffffffff80009d7e:	31 c0                	xor    %eax,%eax
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80009d80:	0f b6 90 4c a3 02 80 	movzbl -0x7ffd5cb4(%rax),%edx
ffffffff80009d87:	84 d2                	test   %dl,%dl
ffffffff80009d89:	74 0e                	je     ffffffff80009d99 <SyscallDispatch+0x1d59>
ffffffff80009d8b:	88 54 01 34          	mov    %dl,0x34(%rcx,%rax,1)
ffffffff80009d8f:	48 83 c0 01          	add    $0x1,%rax
ffffffff80009d93:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80009d97:	75 e7                	jne    ffffffff80009d80 <SyscallDispatch+0x1d40>
            count++;
ffffffff80009d99:	44 8d 7b 03          	lea    0x3(%rbx),%r15d
        dst[i] = '\0';
ffffffff80009d9d:	c6 44 01 34 00       	movb   $0x0,0x34(%rcx,%rax,1)
            if (count >= maxCount) return;
ffffffff80009da2:	45 39 fe             	cmp    %r15d,%r14d
ffffffff80009da5:	0f 8e e3 e6 ff ff    	jle    ffffffff8000848e <SyscallDispatch+0x44e>
            buf[count].category = cat;
ffffffff80009dab:	4b 8d 4c 25 64       	lea    0x64(%r13,%r12,1),%rcx
            dl_strcpy(buf[count].name, name, 48);
ffffffff80009db0:	31 c0                	xor    %eax,%eax
            buf[count].category = cat;
ffffffff80009db2:	c7 01 03 00 00 00    	movl   $0x3,(%rcx)
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80009db8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80009dbf:	00 
ffffffff80009dc0:	0f b6 90 66 a3 02 80 	movzbl -0x7ffd5c9a(%rax),%edx
ffffffff80009dc7:	84 d2                	test   %dl,%dl
ffffffff80009dc9:	74 0e                	je     ffffffff80009dd9 <SyscallDispatch+0x1d99>
ffffffff80009dcb:	88 54 01 04          	mov    %dl,0x4(%rcx,%rax,1)
ffffffff80009dcf:	48 83 c0 01          	add    $0x1,%rax
ffffffff80009dd3:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80009dd7:	75 e7                	jne    ffffffff80009dc0 <SyscallDispatch+0x1d80>
        dst[i] = '\0';
ffffffff80009dd9:	c6 44 01 04 00       	movb   $0x0,0x4(%rcx,%rax,1)
            dl_strcpy(buf[count].detail, detail, 48);
ffffffff80009dde:	31 c0                	xor    %eax,%eax
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80009de0:	0f b6 90 74 a3 02 80 	movzbl -0x7ffd5c8c(%rax),%edx
ffffffff80009de7:	84 d2                	test   %dl,%dl
ffffffff80009de9:	74 0e                	je     ffffffff80009df9 <SyscallDispatch+0x1db9>
ffffffff80009deb:	88 54 01 34          	mov    %dl,0x34(%rcx,%rax,1)
ffffffff80009def:	48 83 c0 01          	add    $0x1,%rax
ffffffff80009df3:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80009df7:	75 e7                	jne    ffffffff80009de0 <SyscallDispatch+0x1da0>
        dst[i] = '\0';
ffffffff80009df9:	c6 44 01 34 00       	movb   $0x0,0x34(%rcx,%rax,1)
            count++;
ffffffff80009dfe:	44 8d 7b 04          	lea    0x4(%rbx),%r15d
        if (Drivers::PS2::IsDualChannel()) {
ffffffff80009e02:	e8 b9 79 00 00       	call   ffffffff800117c0 <_ZN7Drivers3PS213IsDualChannelEv>
ffffffff80009e07:	84 c0                	test   %al,%al
ffffffff80009e09:	0f 84 84 e6 ff ff    	je     ffffffff80008493 <SyscallDispatch+0x453>
            if (count >= maxCount) return;
ffffffff80009e0f:	45 39 fe             	cmp    %r15d,%r14d
ffffffff80009e12:	0f 8e 7b e6 ff ff    	jle    ffffffff80008493 <SyscallDispatch+0x453>
            buf[count].category = cat;
ffffffff80009e18:	4b 8d 8c 25 c8 00 00 	lea    0xc8(%r13,%r12,1),%rcx
ffffffff80009e1f:	00 
            dl_strcpy(buf[count].name, name, 48);
ffffffff80009e20:	31 c0                	xor    %eax,%eax
            buf[count].category = cat;
ffffffff80009e22:	c7 01 03 00 00 00    	movl   $0x3,(%rcx)
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80009e28:	0f b6 90 8b a3 02 80 	movzbl -0x7ffd5c75(%rax),%edx
ffffffff80009e2f:	84 d2                	test   %dl,%dl
ffffffff80009e31:	74 0e                	je     ffffffff80009e41 <SyscallDispatch+0x1e01>
ffffffff80009e33:	88 54 01 04          	mov    %dl,0x4(%rcx,%rax,1)
ffffffff80009e37:	48 83 c0 01          	add    $0x1,%rax
ffffffff80009e3b:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80009e3f:	75 e7                	jne    ffffffff80009e28 <SyscallDispatch+0x1de8>
        dst[i] = '\0';
ffffffff80009e41:	c6 44 01 04 00       	movb   $0x0,0x4(%rcx,%rax,1)
            dl_strcpy(buf[count].detail, detail, 48);
ffffffff80009e46:	31 c0                	xor    %eax,%eax
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80009e48:	0f b6 90 96 a3 02 80 	movzbl -0x7ffd5c6a(%rax),%edx
ffffffff80009e4f:	84 d2                	test   %dl,%dl
ffffffff80009e51:	74 0e                	je     ffffffff80009e61 <SyscallDispatch+0x1e21>
ffffffff80009e53:	88 54 01 34          	mov    %dl,0x34(%rcx,%rax,1)
ffffffff80009e57:	48 83 c0 01          	add    $0x1,%rax
ffffffff80009e5b:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80009e5f:	75 e7                	jne    ffffffff80009e48 <SyscallDispatch+0x1e08>
        dst[i] = '\0';
ffffffff80009e61:	c6 44 01 34 00       	movb   $0x0,0x34(%rcx,%rax,1)
            count++;
ffffffff80009e66:	44 8d 7b 05          	lea    0x5(%rbx),%r15d
ffffffff80009e6a:	e9 24 e6 ff ff       	jmp    ffffffff80008493 <SyscallDispatch+0x453>
            auto* gpu = Drivers::Graphics::IntelGPU::GetGpuInfo();
ffffffff80009e6f:	e8 3c 40 00 00       	call   ffffffff8000deb0 <_ZN7Drivers8Graphics8IntelGPU10GetGpuInfoEv>
            if (gpu) {
ffffffff80009e74:	48 85 c0             	test   %rax,%rax
ffffffff80009e77:	0f 84 0a f9 ff ff    	je     ffffffff80009787 <SyscallDispatch+0x1747>
            if (count >= maxCount) return;
ffffffff80009e7d:	45 39 fe             	cmp    %r15d,%r14d
ffffffff80009e80:	0f 8e 01 f9 ff ff    	jle    ffffffff80009787 <SyscallDispatch+0x1747>
            buf[count].category = cat;
ffffffff80009e86:	49 63 d7             	movslq %r15d,%rdx
                add(6, gpu->name, "Intel Integrated Graphics");
ffffffff80009e89:	48 8b 70 08          	mov    0x8(%rax),%rsi
            dl_strcpy(buf[count].name, name, 48);
ffffffff80009e8d:	31 c0                	xor    %eax,%eax
            buf[count].category = cat;
ffffffff80009e8f:	48 6b d2 64          	imul   $0x64,%rdx,%rdx
ffffffff80009e93:	4c 01 ea             	add    %r13,%rdx
ffffffff80009e96:	c7 02 06 00 00 00    	movl   $0x6,(%rdx)
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80009e9c:	0f b6 0c 06          	movzbl (%rsi,%rax,1),%ecx
ffffffff80009ea0:	84 c9                	test   %cl,%cl
ffffffff80009ea2:	74 0e                	je     ffffffff80009eb2 <SyscallDispatch+0x1e72>
ffffffff80009ea4:	88 4c 02 04          	mov    %cl,0x4(%rdx,%rax,1)
ffffffff80009ea8:	48 83 c0 01          	add    $0x1,%rax
ffffffff80009eac:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80009eb0:	75 ea                	jne    ffffffff80009e9c <SyscallDispatch+0x1e5c>
        dst[i] = '\0';
ffffffff80009eb2:	c6 44 02 04 00       	movb   $0x0,0x4(%rdx,%rax,1)
            dl_strcpy(buf[count].detail, detail, 48);
ffffffff80009eb7:	31 c0                	xor    %eax,%eax
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80009eb9:	0f b6 88 22 a4 02 80 	movzbl -0x7ffd5bde(%rax),%ecx
ffffffff80009ec0:	84 c9                	test   %cl,%cl
ffffffff80009ec2:	74 0e                	je     ffffffff80009ed2 <SyscallDispatch+0x1e92>
ffffffff80009ec4:	88 4c 02 34          	mov    %cl,0x34(%rdx,%rax,1)
ffffffff80009ec8:	48 83 c0 01          	add    $0x1,%rax
ffffffff80009ecc:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80009ed0:	75 e7                	jne    ffffffff80009eb9 <SyscallDispatch+0x1e79>
        dst[i] = '\0';
ffffffff80009ed2:	c6 44 02 34 00       	movb   $0x0,0x34(%rdx,%rax,1)
            count++;
ffffffff80009ed7:	41 83 c7 01          	add    $0x1,%r15d
ffffffff80009edb:	e9 a7 f8 ff ff       	jmp    ffffffff80009787 <SyscallDispatch+0x1747>
        if (proc->outBuf) return proc;  // owns buffers
ffffffff80009ee0:	48 83 b8 90 01 00 00 	cmpq   $0x0,0x190(%rax)
ffffffff80009ee7:	00 
ffffffff80009ee8:	75 0b                	jne    ffffffff80009ef5 <SyscallDispatch+0x1eb5>
ffffffff80009eea:	e9 f1 01 00 00       	jmp    ffffffff8000a0e0 <SyscallDispatch+0x20a0>
ffffffff80009eef:	90                   	nop
                    Sched::Schedule();
ffffffff80009ef0:	e8 cb 7d 01 00       	call   ffffffff80021cc0 <_ZN5Sched8ScheduleEv>
                while (target->keyHead == target->keyTail) {
ffffffff80009ef5:	8b 83 34 03 00 00    	mov    0x334(%rbx),%eax
ffffffff80009efb:	39 83 30 03 00 00    	cmp    %eax,0x330(%rbx)
ffffffff80009f01:	74 ed                	je     ffffffff80009ef0 <SyscallDispatch+0x1eb0>
                *outEvent = target->keyBuf[target->keyTail];
ffffffff80009f03:	89 c2                	mov    %eax,%edx
                target->keyTail = (target->keyTail + 1) % 64;
ffffffff80009f05:	83 c0 01             	add    $0x1,%eax
                *outEvent = target->keyBuf[target->keyTail];
ffffffff80009f08:	48 8d 14 52          	lea    (%rdx,%rdx,2),%rdx
                target->keyTail = (target->keyTail + 1) % 64;
ffffffff80009f0c:	83 e0 3f             	and    $0x3f,%eax
                *outEvent = target->keyBuf[target->keyTail];
ffffffff80009f0f:	48 8d 14 53          	lea    (%rbx,%rdx,2),%rdx
ffffffff80009f13:	8b 8a b0 01 00 00    	mov    0x1b0(%rdx),%ecx
ffffffff80009f19:	41 89 0c 24          	mov    %ecx,(%r12)
ffffffff80009f1d:	0f b7 92 b4 01 00 00 	movzwl 0x1b4(%rdx),%edx
ffffffff80009f24:	66 41 89 54 24 04    	mov    %dx,0x4(%r12)
                target->keyTail = (target->keyTail + 1) % 64;
ffffffff80009f2a:	89 83 34 03 00 00    	mov    %eax,0x334(%rbx)
                return;
ffffffff80009f30:	e9 4b e1 ff ff       	jmp    ffffffff80008080 <SyscallDispatch+0x40>
            if (count >= maxCount) return;
ffffffff80009f35:	45 39 fe             	cmp    %r15d,%r14d
ffffffff80009f38:	0f 8e 3c f8 ff ff    	jle    ffffffff8000977a <SyscallDispatch+0x173a>
            buf[count].category = cat;
ffffffff80009f3e:	49 63 c7             	movslq %r15d,%rax
ffffffff80009f41:	48 8d 04 80          	lea    (%rax,%rax,4),%rax
ffffffff80009f45:	48 8d 04 80          	lea    (%rax,%rax,4),%rax
ffffffff80009f49:	49 8d 4c 85 00       	lea    0x0(%r13,%rax,4),%rcx
            dl_strcpy(buf[count].name, name, 48);
ffffffff80009f4e:	31 c0                	xor    %eax,%eax
            buf[count].category = cat;
ffffffff80009f50:	c7 01 05 00 00 00    	movl   $0x5,(%rcx)
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80009f56:	0f b6 90 fb a3 02 80 	movzbl -0x7ffd5c05(%rax),%edx
ffffffff80009f5d:	84 d2                	test   %dl,%dl
ffffffff80009f5f:	74 0e                	je     ffffffff80009f6f <SyscallDispatch+0x1f2f>
ffffffff80009f61:	88 54 01 04          	mov    %dl,0x4(%rcx,%rax,1)
ffffffff80009f65:	48 83 c0 01          	add    $0x1,%rax
ffffffff80009f69:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80009f6d:	75 e7                	jne    ffffffff80009f56 <SyscallDispatch+0x1f16>
        dst[i] = '\0';
ffffffff80009f6f:	c6 44 01 04 00       	movb   $0x0,0x4(%rcx,%rax,1)
            dl_strcpy(buf[count].detail, detail, 48);
ffffffff80009f74:	31 c0                	xor    %eax,%eax
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff80009f76:	0f b6 90 08 a4 02 80 	movzbl -0x7ffd5bf8(%rax),%edx
ffffffff80009f7d:	84 d2                	test   %dl,%dl
ffffffff80009f7f:	74 0e                	je     ffffffff80009f8f <SyscallDispatch+0x1f4f>
ffffffff80009f81:	88 54 01 34          	mov    %dl,0x34(%rcx,%rax,1)
ffffffff80009f85:	48 83 c0 01          	add    $0x1,%rax
ffffffff80009f89:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff80009f8d:	75 e7                	jne    ffffffff80009f76 <SyscallDispatch+0x1f36>
        dst[i] = '\0';
ffffffff80009f8f:	c6 44 01 34 00       	movb   $0x0,0x34(%rcx,%rax,1)
            count++;
ffffffff80009f94:	41 83 c7 01          	add    $0x1,%r15d
ffffffff80009f98:	e9 dd f7 ff ff       	jmp    ffffffff8000977a <SyscallDispatch+0x173a>
        return Sched::GetProcessByPid(proc->parentPid);
ffffffff80009f9d:	8b b8 8c 01 00 00    	mov    0x18c(%rax),%edi
ffffffff80009fa3:	e8 d8 81 01 00       	call   ffffffff80022180 <_ZN5Sched15GetProcessByPidEi>
            if (target && target->termCols > 0 && target->termRows > 0) {
ffffffff80009fa8:	48 85 c0             	test   %rax,%rax
ffffffff80009fab:	0f 84 36 f0 ff ff    	je     ffffffff80008fe7 <SyscallDispatch+0xfa7>
ffffffff80009fb1:	e9 6e fb ff ff       	jmp    ffffffff80009b24 <SyscallDispatch+0x1ae4>
        return Sched::GetProcessByPid(proc->parentPid);
ffffffff80009fb6:	8b b8 8c 01 00 00    	mov    0x18c(%rax),%edi
ffffffff80009fbc:	e8 bf 81 01 00       	call   ffffffff80022180 <_ZN5Sched15GetProcessByPidEi>
ffffffff80009fc1:	48 89 c3             	mov    %rax,%rbx
            if (target && target->inBuf) {
ffffffff80009fc4:	48 85 c0             	test   %rax,%rax
ffffffff80009fc7:	0f 84 9d f6 ff ff    	je     ffffffff8000966a <SyscallDispatch+0x162a>
ffffffff80009fcd:	e9 bc fb ff ff       	jmp    ffffffff80009b8e <SyscallDispatch+0x1b4e>
        return Sched::GetProcessByPid(proc->parentPid);
ffffffff80009fd2:	8b b8 8c 01 00 00    	mov    0x18c(%rax),%edi
ffffffff80009fd8:	e8 a3 81 01 00       	call   ffffffff80022180 <_ZN5Sched15GetProcessByPidEi>
            if (target) return target->keyHead != target->keyTail;
ffffffff80009fdd:	48 85 c0             	test   %rax,%rax
ffffffff80009fe0:	0f 84 c1 f3 ff ff    	je     ffffffff800093a7 <SyscallDispatch+0x1367>
ffffffff80009fe6:	e9 17 fb ff ff       	jmp    ffffffff80009b02 <SyscallDispatch+0x1ac2>
ffffffff80009feb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        return Sched::GetProcessByPid(proc->parentPid);
ffffffff80009ff0:	8b b8 8c 01 00 00    	mov    0x18c(%rax),%edi
ffffffff80009ff6:	e8 85 81 01 00       	call   ffffffff80022180 <_ZN5Sched15GetProcessByPidEi>
            if (target && target->outBuf) {
ffffffff80009ffb:	48 85 c0             	test   %rax,%rax
ffffffff80009ffe:	0f 84 b7 e1 ff ff    	je     ffffffff800081bb <SyscallDispatch+0x17b>
ffffffff8000a004:	48 8b 90 90 01 00 00 	mov    0x190(%rax),%rdx
ffffffff8000a00b:	48 85 d2             	test   %rdx,%rdx
ffffffff8000a00e:	0f 84 a7 e1 ff ff    	je     ffffffff800081bb <SyscallDispatch+0x17b>
ffffffff8000a014:	e9 44 fb ff ff       	jmp    ffffffff80009b5d <SyscallDispatch+0x1b1d>
ffffffff8000a019:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        for (int i = 0; src[i] && pos < max - 1; i++) dst[pos++] = src[i];
ffffffff8000a020:	89 d6                	mov    %edx,%esi
ffffffff8000a022:	e9 a0 e3 ff ff       	jmp    ffffffff800083c7 <SyscallDispatch+0x387>
        return Sched::GetProcessByPid(proc->parentPid);
ffffffff8000a027:	8b b8 8c 01 00 00    	mov    0x18c(%rax),%edi
ffffffff8000a02d:	e8 4e 81 01 00       	call   ffffffff80022180 <_ZN5Sched15GetProcessByPidEi>
            if (target && target->outBuf) {
ffffffff8000a032:	48 85 c0             	test   %rax,%rax
ffffffff8000a035:	0f 84 b0 e1 ff ff    	je     ffffffff800081eb <SyscallDispatch+0x1ab>
ffffffff8000a03b:	48 83 b8 90 01 00 00 	cmpq   $0x0,0x190(%rax)
ffffffff8000a042:	00 
ffffffff8000a043:	0f 84 a2 e1 ff ff    	je     ffffffff800081eb <SyscallDispatch+0x1ab>
ffffffff8000a049:	e9 95 fb ff ff       	jmp    ffffffff80009be3 <SyscallDispatch+0x1ba3>
ffffffff8000a04e:	66 90                	xchg   %ax,%ax
            if (count >= maxCount) return;
ffffffff8000a050:	45 39 fe             	cmp    %r15d,%r14d
ffffffff8000a053:	7e 77                	jle    ffffffff8000a0cc <SyscallDispatch+0x208c>
            buf[count].category = cat;
ffffffff8000a055:	49 63 c7             	movslq %r15d,%rax
ffffffff8000a058:	48 8d 04 80          	lea    (%rax,%rax,4),%rax
ffffffff8000a05c:	48 8d 04 80          	lea    (%rax,%rax,4),%rax
ffffffff8000a060:	49 8d 4c 85 00       	lea    0x0(%r13,%rax,4),%rcx
            dl_strcpy(buf[count].name, name, 48);
ffffffff8000a065:	31 c0                	xor    %eax,%eax
            buf[count].category = cat;
ffffffff8000a067:	c7 01 05 00 00 00    	movl   $0x5,(%rcx)
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff8000a06d:	0f b6 90 d4 a3 02 80 	movzbl -0x7ffd5c2c(%rax),%edx
ffffffff8000a074:	84 d2                	test   %dl,%dl
ffffffff8000a076:	74 0e                	je     ffffffff8000a086 <SyscallDispatch+0x2046>
ffffffff8000a078:	88 54 01 04          	mov    %dl,0x4(%rcx,%rax,1)
ffffffff8000a07c:	48 83 c0 01          	add    $0x1,%rax
ffffffff8000a080:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff8000a084:	75 e7                	jne    ffffffff8000a06d <SyscallDispatch+0x202d>
        dst[i] = '\0';
ffffffff8000a086:	c6 44 01 04 00       	movb   $0x0,0x4(%rcx,%rax,1)
            dl_strcpy(buf[count].detail, detail, 48);
ffffffff8000a08b:	31 c0                	xor    %eax,%eax
        for (; i < max - 1 && src[i]; i++) dst[i] = src[i];
ffffffff8000a08d:	0f b6 90 e0 a3 02 80 	movzbl -0x7ffd5c20(%rax),%edx
ffffffff8000a094:	84 d2                	test   %dl,%dl
ffffffff8000a096:	74 0e                	je     ffffffff8000a0a6 <SyscallDispatch+0x2066>
ffffffff8000a098:	88 54 01 34          	mov    %dl,0x34(%rcx,%rax,1)
ffffffff8000a09c:	48 83 c0 01          	add    $0x1,%rax
ffffffff8000a0a0:	48 83 f8 2f          	cmp    $0x2f,%rax
ffffffff8000a0a4:	75 e7                	jne    ffffffff8000a08d <SyscallDispatch+0x204d>
        dst[i] = '\0';
ffffffff8000a0a6:	c6 44 01 34 00       	movb   $0x0,0x34(%rcx,%rax,1)
            count++;
ffffffff8000a0ab:	41 83 c7 01          	add    $0x1,%r15d
ffffffff8000a0af:	e9 b9 f6 ff ff       	jmp    ffffffff8000976d <SyscallDispatch+0x172d>
ffffffff8000a0b4:	4c 8b 6d 88          	mov    -0x78(%rbp),%r13
ffffffff8000a0b8:	4c 8b b5 78 ff ff ff 	mov    -0x88(%rbp),%r14
        if (Drivers::Net::E1000::IsInitialized()) {
ffffffff8000a0bf:	e8 dc 4c 00 00       	call   ffffffff8000eda0 <_ZN7Drivers3Net5E100013IsInitializedEv>
ffffffff8000a0c4:	84 c0                	test   %al,%al
ffffffff8000a0c6:	0f 84 a1 f6 ff ff    	je     ffffffff8000976d <SyscallDispatch+0x172d>
        if (Drivers::Net::E1000E::IsInitialized()) {
ffffffff8000a0cc:	e8 ff 65 00 00       	call   ffffffff800106d0 <_ZN7Drivers3Net6E1000E13IsInitializedEv>
            if (count >= maxCount) return;
ffffffff8000a0d1:	e9 a4 f6 ff ff       	jmp    ffffffff8000977a <SyscallDispatch+0x173a>
            mac = Drivers::Net::E1000E::GetMacAddress();
ffffffff8000a0d6:	e8 e5 65 00 00       	call   ffffffff800106c0 <_ZN7Drivers3Net6E1000E13GetMacAddressEv>
ffffffff8000a0db:	e9 26 f5 ff ff       	jmp    ffffffff80009606 <SyscallDispatch+0x15c6>
        return Sched::GetProcessByPid(proc->parentPid);
ffffffff8000a0e0:	8b b8 8c 01 00 00    	mov    0x18c(%rax),%edi
ffffffff8000a0e6:	e8 95 80 01 00       	call   ffffffff80022180 <_ZN5Sched15GetProcessByPidEi>
ffffffff8000a0eb:	48 89 c3             	mov    %rax,%rbx
            if (target) {
ffffffff8000a0ee:	48 85 c0             	test   %rax,%rax
ffffffff8000a0f1:	0f 84 c8 f5 ff ff    	je     ffffffff800096bf <SyscallDispatch+0x167f>
ffffffff8000a0f7:	e9 f9 fd ff ff       	jmp    ffffffff80009ef5 <SyscallDispatch+0x1eb5>
        if (child == nullptr || !child->redirected || !child->inBuf) return -1;
ffffffff8000a0fc:	83 cb ff             	or     $0xffffffff,%ebx
ffffffff8000a0ff:	e9 a5 ea ff ff       	jmp    ffffffff80008ba9 <SyscallDispatch+0xb69>
        int i = 0;
ffffffff8000a104:	31 d2                	xor    %edx,%edx
ffffffff8000a106:	e9 b0 ee ff ff       	jmp    ffffffff80008fbb <SyscallDispatch+0xf7b>
                child->parentPid = parent->outBuf ? parent->pid : parent->parentPid;
ffffffff8000a10b:	41 8b 94 24 8c 01 00 	mov    0x18c(%r12),%edx
ffffffff8000a112:	00 
ffffffff8000a113:	e9 b5 f1 ff ff       	jmp    ffffffff800092cd <SyscallDispatch+0x128d>
            buf[count].category = cat;
ffffffff8000a118:	49 8d 4d 64          	lea    0x64(%r13),%rcx
ffffffff8000a11c:	41 bf 02 00 00 00    	mov    $0x2,%r15d
            if (count >= maxCount) return;
ffffffff8000a122:	bb 01 00 00 00       	mov    $0x1,%ebx
ffffffff8000a127:	e9 0f fb ff ff       	jmp    ffffffff80009c3b <SyscallDispatch+0x1bfb>
        if (event == nullptr) return -1;
ffffffff8000a12c:	83 c8 ff             	or     $0xffffffff,%eax
                return (int64_t)Sys_WinGetScale();
ffffffff8000a12f:	48 98                	cltq
ffffffff8000a131:	e9 4c df ff ff       	jmp    ffffffff80008082 <SyscallDispatch+0x42>
        switch (frame->syscall_nr) {
ffffffff8000a136:	48 83 c8 ff          	or     $0xffffffffffffffff,%rax
    }
ffffffff8000a13a:	c3                   	ret
ffffffff8000a13b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff8000a140 <_ZN6Zenith18InitializeSyscallsEv>:

    // ---- SYSCALL MSR initialization ----

    void InitializeSyscalls() {
ffffffff8000a140:	55                   	push   %rbp

namespace Hal {

    inline uint64_t ReadMSR(uint32_t msr) {
        uint32_t lo, hi;
        asm volatile("rdmsr" : "=a"(lo), "=d"(hi) : "c"(msr));
ffffffff8000a141:	b9 80 00 00 c0       	mov    $0xc0000080,%ecx
ffffffff8000a146:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000a149:	0f 32                	rdmsr
        return ((uint64_t)hi << 32) | lo;
ffffffff8000a14b:	48 c1 e2 20          	shl    $0x20,%rdx
ffffffff8000a14f:	89 c0                	mov    %eax,%eax
ffffffff8000a151:	48 09 c2             	or     %rax,%rdx
        // Enable SYSCALL/SYSRET in EFER
        uint64_t efer = Hal::ReadMSR(Hal::IA32_EFER);
        efer |= 1;  // SCE bit (Syscall Enable)
ffffffff8000a154:	48 89 d0             	mov    %rdx,%rax
    }

    inline void WriteMSR(uint32_t msr, uint64_t value) {
        uint32_t lo = (uint32_t)(value & 0xFFFFFFFF);
        uint32_t hi = (uint32_t)(value >> 32);
ffffffff8000a157:	48 c1 ea 20          	shr    $0x20,%rdx
ffffffff8000a15b:	48 83 c8 01          	or     $0x1,%rax
        asm volatile("wrmsr" : : "a"(lo), "d"(hi), "c"(msr));
ffffffff8000a15f:	0f 30                	wrmsr
ffffffff8000a161:	31 f6                	xor    %esi,%esi
ffffffff8000a163:	ba 08 00 10 00       	mov    $0x100008,%edx
ffffffff8000a168:	b9 81 00 00 c0       	mov    $0xc0000081,%ecx
ffffffff8000a16d:	89 f0                	mov    %esi,%eax
ffffffff8000a16f:	0f 30                	wrmsr
        // SYSRET:  CS=0x10+16=0x20|RPL3=0x23, SS=0x10+8=0x18|RPL3=0x1B
        uint64_t star = (0x0010ULL << 48) | (0x0008ULL << 32);
        Hal::WriteMSR(Hal::IA32_STAR, star);

        // LSTAR: SYSCALL entry point
        Hal::WriteMSR(Hal::IA32_LSTAR, (uint64_t)SyscallEntry);
ffffffff8000a171:	48 c7 c0 60 3f 02 80 	mov    $0xffffffff80023f60,%rax
ffffffff8000a178:	b9 82 00 00 c0       	mov    $0xc0000082,%ecx
        uint32_t hi = (uint32_t)(value >> 32);
ffffffff8000a17d:	48 89 c2             	mov    %rax,%rdx
ffffffff8000a180:	48 c1 ea 20          	shr    $0x20,%rdx
        asm volatile("wrmsr" : : "a"(lo), "d"(hi), "c"(msr));
ffffffff8000a184:	0f 30                	wrmsr
ffffffff8000a186:	b8 00 02 00 00       	mov    $0x200,%eax
ffffffff8000a18b:	b9 84 00 00 c0       	mov    $0xc0000084,%ecx
ffffffff8000a190:	89 f2                	mov    %esi,%edx
ffffffff8000a192:	0f 30                	wrmsr
ffffffff8000a194:	48 c7 c7 61 a4 02 80 	mov    $0xffffffff8002a461,%rdi
            g_kernelLogDepth++;
ffffffff8000a19b:	83 05 02 53 1d 00 01 	addl   $0x1,0x1d5302(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000a1a2:	e8 19 90 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000a1a7:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000a1ae:	e8 0d 90 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000a1b3:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000a1ba:	e8 01 90 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000a1bf:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000a1c6:	e8 f5 8f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000a1cb:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000a1d2:	e8 e9 8f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000a1d7:	48 c7 c7 38 c4 02 80 	mov    $0xffffffff8002c438,%rdi
ffffffff8000a1de:	e8 dd 8f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000a1e3:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000a1e8:	48 c7 c7 60 3f 02 80 	mov    $0xffffffff80023f60,%rdi
ffffffff8000a1ef:	e8 9c 02 01 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000a1f4:	48 89 c7             	mov    %rax,%rdi
ffffffff8000a1f7:	e8 c4 8f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000a1fc:	48 c7 c7 69 a4 02 80 	mov    $0xffffffff8002a469,%rdi
ffffffff8000a203:	e8 b8 8f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000a208:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000a20f:	e8 ac 8f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000a214:	83 2d 89 52 1d 00 01 	subl   $0x1,0x1d5289(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        // FMASK: mask IF on SYSCALL entry (bit 9 = IF)
        Hal::WriteMSR(Hal::IA32_FMASK, 0x200);

        Kt::KernelLogStream(Kt::OK, "Syscall") << "SYSCALL/SYSRET initialized (LSTAR="
            << kcp::hex << (uint64_t)SyscallEntry << kcp::dec << ", 64 syscalls)";
    }
ffffffff8000a21b:	5d                   	pop    %rbp
ffffffff8000a21c:	c3                   	ret
ffffffff8000a21d:	0f 1f 00             	nopl   (%rax)

ffffffff8000a220 <_ZN9WinServer6CreateEimPKciiRmS2_>:

    static WindowSlot g_slots[MaxWindows];
    static int g_uiScale = 1;

    int Create(int ownerPid, uint64_t ownerPml4, const char* title, int w, int h,
               uint64_t& heapNext, uint64_t& outVa) {
ffffffff8000a220:	55                   	push   %rbp
ffffffff8000a221:	48 c7 c0 60 35 10 80 	mov    $0xffffffff80103560,%rax
ffffffff8000a228:	49 89 d2             	mov    %rdx,%r10
ffffffff8000a22b:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000a22e:	41 57                	push   %r15
ffffffff8000a230:	45 89 c7             	mov    %r8d,%r15d
ffffffff8000a233:	41 56                	push   %r14
ffffffff8000a235:	49 89 f6             	mov    %rsi,%r14
ffffffff8000a238:	41 55                	push   %r13
ffffffff8000a23a:	41 54                	push   %r12
ffffffff8000a23c:	41 89 fc             	mov    %edi,%r12d
ffffffff8000a23f:	53                   	push   %rbx
ffffffff8000a240:	89 cb                	mov    %ecx,%ebx
        // Find a free slot
        int slotIdx = -1;
        for (int i = 0; i < MaxWindows; i++) {
ffffffff8000a242:	31 c9                	xor    %ecx,%ecx
               uint64_t& heapNext, uint64_t& outVa) {
ffffffff8000a244:	48 83 ec 58          	sub    $0x58,%rsp
            if (!g_slots[i].used) {
ffffffff8000a248:	80 38 00             	cmpb   $0x0,(%rax)
               uint64_t& heapNext, uint64_t& outVa) {
ffffffff8000a24b:	4c 89 4d c0          	mov    %r9,-0x40(%rbp)
            if (!g_slots[i].used) {
ffffffff8000a24f:	74 26                	je     ffffffff8000a277 <_ZN9WinServer6CreateEimPKciiRmS2_+0x57>
ffffffff8000a251:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000a258:	00 00 00 00 
ffffffff8000a25c:	0f 1f 40 00          	nopl   0x0(%rax)
        for (int i = 0; i < MaxWindows; i++) {
ffffffff8000a260:	83 c1 01             	add    $0x1,%ecx
ffffffff8000a263:	48 05 88 85 00 00    	add    $0x8588,%rax
ffffffff8000a269:	83 f9 08             	cmp    $0x8,%ecx
ffffffff8000a26c:	0f 84 ce 01 00 00    	je     ffffffff8000a440 <_ZN9WinServer6CreateEimPKciiRmS2_+0x220>
            if (!g_slots[i].used) {
ffffffff8000a272:	80 38 00             	cmpb   $0x0,(%rax)
ffffffff8000a275:	75 e9                	jne    ffffffff8000a260 <_ZN9WinServer6CreateEimPKciiRmS2_+0x40>
            }
        }
        if (slotIdx < 0) return -1;

        // Validate dimensions
        if (w <= 0 || h <= 0) return -1;
ffffffff8000a277:	85 db                	test   %ebx,%ebx
ffffffff8000a279:	0f 8e c1 01 00 00    	jle    ffffffff8000a440 <_ZN9WinServer6CreateEimPKciiRmS2_+0x220>
ffffffff8000a27f:	45 85 ff             	test   %r15d,%r15d
ffffffff8000a282:	0f 8e b8 01 00 00    	jle    ffffffff8000a440 <_ZN9WinServer6CreateEimPKciiRmS2_+0x220>
        uint64_t bufSize = (uint64_t)w * h * 4;
ffffffff8000a288:	48 63 c3             	movslq %ebx,%rax
ffffffff8000a28b:	49 63 d7             	movslq %r15d,%rdx
ffffffff8000a28e:	4c 89 55 b0          	mov    %r10,-0x50(%rbp)
ffffffff8000a292:	48 0f af c2          	imul   %rdx,%rax
        int numPages = (int)((bufSize + 0xFFF) / 0x1000);
ffffffff8000a296:	4c 8d 0c 85 ff 0f 00 	lea    0xfff(,%rax,4),%r9
ffffffff8000a29d:	00 
ffffffff8000a29e:	49 c1 e9 0c          	shr    $0xc,%r9
        if (numPages > MaxPixelPages) return -1;
ffffffff8000a2a2:	41 81 f9 00 08 00 00 	cmp    $0x800,%r9d
        int numPages = (int)((bufSize + 0xFFF) / 0x1000);
ffffffff8000a2a9:	44 89 4d cc          	mov    %r9d,-0x34(%rbp)
        if (numPages > MaxPixelPages) return -1;
ffffffff8000a2ad:	4c 89 4d b8          	mov    %r9,-0x48(%rbp)
ffffffff8000a2b1:	0f 8f 89 01 00 00    	jg     ffffffff8000a440 <_ZN9WinServer6CreateEimPKciiRmS2_+0x220>

        WindowSlot& slot = g_slots[slotIdx];
ffffffff8000a2b7:	4c 63 e9             	movslq %ecx,%r13
        memset(&slot, 0, sizeof(WindowSlot));
ffffffff8000a2ba:	ba 88 85 00 00       	mov    $0x8588,%edx
ffffffff8000a2bf:	31 f6                	xor    %esi,%esi
ffffffff8000a2c1:	89 4d c8             	mov    %ecx,-0x38(%rbp)
ffffffff8000a2c4:	4d 69 c5 88 85 00 00 	imul   $0x8588,%r13,%r8
        WindowSlot& slot = g_slots[slotIdx];
ffffffff8000a2cb:	49 8d b8 60 35 10 80 	lea    -0x7fefcaa0(%r8),%rdi
ffffffff8000a2d2:	4c 89 45 a0          	mov    %r8,-0x60(%rbp)
        memset(&slot, 0, sizeof(WindowSlot));
ffffffff8000a2d6:	48 89 7d a8          	mov    %rdi,-0x58(%rbp)
ffffffff8000a2da:	e8 41 ff 00 00       	call   ffffffff8001a220 <memset>
        slot.used = true;
        slot.ownerPid = ownerPid;
ffffffff8000a2df:	48 8b 7d a8          	mov    -0x58(%rbp),%rdi
        slot.used = true;
ffffffff8000a2e3:	4c 8b 45 a0          	mov    -0x60(%rbp),%r8
        slot.width = w;
        slot.height = h;
        slot.pixelNumPages = numPages;
ffffffff8000a2e7:	4c 8b 4d b8          	mov    -0x48(%rbp),%r9
        slot.desktopVa[1] = 0;
        slot.desktopPid = 0;

        // Copy title
        int tlen = 0;
        while (title[tlen] && tlen < 63) {
ffffffff8000a2eb:	4c 8b 55 b0          	mov    -0x50(%rbp),%r10
        slot.used = true;
ffffffff8000a2ef:	41 c6 80 60 35 10 80 	movb   $0x1,-0x7fefcaa0(%r8)
ffffffff8000a2f6:	01 
        while (title[tlen] && tlen < 63) {
ffffffff8000a2f7:	8b 4d c8             	mov    -0x38(%rbp),%ecx
        slot.ownerPid = ownerPid;
ffffffff8000a2fa:	44 89 67 04          	mov    %r12d,0x4(%rdi)
        slot.width = w;
ffffffff8000a2fe:	89 5f 48             	mov    %ebx,0x48(%rdi)
        slot.height = h;
ffffffff8000a301:	44 89 7f 4c          	mov    %r15d,0x4c(%rdi)
        slot.pixelNumPages = numPages;
ffffffff8000a305:	44 89 8f 54 80 00 00 	mov    %r9d,0x8054(%rdi)
        slot.eventHead = 0;
ffffffff8000a30c:	48 c7 87 7c 85 00 00 	movq   $0x0,0x857c(%rdi)
ffffffff8000a313:	00 00 00 00 
        slot.dirty = false;
ffffffff8000a317:	c6 87 84 85 00 00 00 	movb   $0x0,0x8584(%rdi)
        slot.frontIdx = 0;
ffffffff8000a31e:	c7 87 50 80 00 00 00 	movl   $0x0,0x8050(%rdi)
ffffffff8000a325:	00 00 00 
        slot.desktopVa[0] = 0;
ffffffff8000a328:	48 c7 87 68 80 00 00 	movq   $0x0,0x8068(%rdi)
ffffffff8000a32f:	00 00 00 00 
        slot.desktopVa[1] = 0;
ffffffff8000a333:	48 c7 87 70 80 00 00 	movq   $0x0,0x8070(%rdi)
ffffffff8000a33a:	00 00 00 00 
        slot.desktopPid = 0;
ffffffff8000a33e:	c7 87 78 80 00 00 00 	movl   $0x0,0x8078(%rdi)
ffffffff8000a345:	00 00 00 
        while (title[tlen] && tlen < 63) {
ffffffff8000a348:	41 0f b6 12          	movzbl (%r10),%edx
ffffffff8000a34c:	84 d2                	test   %dl,%dl
ffffffff8000a34e:	0f 84 66 02 00 00    	je     ffffffff8000a5ba <_ZN9WinServer6CreateEimPKciiRmS2_+0x39a>
ffffffff8000a354:	b8 01 00 00 00       	mov    $0x1,%eax
ffffffff8000a359:	eb 13                	jmp    ffffffff8000a36e <_ZN9WinServer6CreateEimPKciiRmS2_+0x14e>
ffffffff8000a35b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff8000a360:	48 83 c0 01          	add    $0x1,%rax
ffffffff8000a364:	48 83 f8 40          	cmp    $0x40,%rax
ffffffff8000a368:	0f 84 42 02 00 00    	je     ffffffff8000a5b0 <_ZN9WinServer6CreateEimPKciiRmS2_+0x390>
            slot.title[tlen] = title[tlen];
ffffffff8000a36e:	41 88 94 00 67 35 10 	mov    %dl,-0x7fefca99(%r8,%rax,1)
ffffffff8000a375:	80 
        while (title[tlen] && tlen < 63) {
ffffffff8000a376:	41 0f b6 14 02       	movzbl (%r10,%rax,1),%edx
ffffffff8000a37b:	84 d2                	test   %dl,%dl
ffffffff8000a37d:	75 e1                	jne    ffffffff8000a360 <_ZN9WinServer6CreateEimPKciiRmS2_+0x140>
            tlen++;
        }
        slot.title[tlen] = '\0';
ffffffff8000a37f:	49 69 d5 88 85 00 00 	imul   $0x8588,%r13,%rdx
ffffffff8000a386:	48 98                	cltq

        // Allocate two sets of physical pages and map both into owner.
        // Buffer 0 starts as front (compositor reads), buffer 1 as back (app writes).
        for (int b = 0; b < 2; b++) {
            uint64_t va = heapNext;
ffffffff8000a388:	4c 89 45 b0          	mov    %r8,-0x50(%rbp)
ffffffff8000a38c:	4d 89 eb             	mov    %r13,%r11
ffffffff8000a38f:	49 8d b0 b0 35 10 80 	lea    -0x7fefca50(%r8),%rsi
ffffffff8000a396:	44 89 65 a8          	mov    %r12d,-0x58(%rbp)
ffffffff8000a39a:	31 ff                	xor    %edi,%edi
ffffffff8000a39c:	48 89 75 b8          	mov    %rsi,-0x48(%rbp)
        slot.title[tlen] = '\0';
ffffffff8000a3a0:	c6 84 10 68 35 10 80 	movb   $0x0,-0x7fefca98(%rax,%rdx,1)
ffffffff8000a3a7:	00 
            uint64_t va = heapNext;
ffffffff8000a3a8:	48 8b 45 c0          	mov    -0x40(%rbp),%rax
ffffffff8000a3ac:	89 5d a0             	mov    %ebx,-0x60(%rbp)
ffffffff8000a3af:	48 8b 10             	mov    (%rax),%rdx
ffffffff8000a3b2:	44 89 7d c8          	mov    %r15d,-0x38(%rbp)
ffffffff8000a3b6:	4d 89 f7             	mov    %r14,%r15
ffffffff8000a3b9:	49 89 d5             	mov    %rdx,%r13
            for (int i = 0; i < numPages; i++) {
ffffffff8000a3bc:	8b 45 cc             	mov    -0x34(%rbp),%eax
ffffffff8000a3bf:	85 c0                	test   %eax,%eax
ffffffff8000a3c1:	0f 8e 9b 00 00 00    	jle    ffffffff8000a462 <_ZN9WinServer6CreateEimPKciiRmS2_+0x242>
ffffffff8000a3c7:	45 8d 61 ff          	lea    -0x1(%r9),%r12d
ffffffff8000a3cb:	4c 89 6d 90          	mov    %r13,-0x70(%rbp)
ffffffff8000a3cf:	4d 89 ee             	mov    %r13,%r14
ffffffff8000a3d2:	48 8b 5d b8          	mov    -0x48(%rbp),%rbx
ffffffff8000a3d6:	49 83 c4 01          	add    $0x1,%r12
ffffffff8000a3da:	4c 89 4d 98          	mov    %r9,-0x68(%rbp)
ffffffff8000a3de:	49 c1 e4 0c          	shl    $0xc,%r12
ffffffff8000a3e2:	48 89 7d 88          	mov    %rdi,-0x78(%rbp)
ffffffff8000a3e6:	4d 01 ec             	add    %r13,%r12
ffffffff8000a3e9:	89 4d 84             	mov    %ecx,-0x7c(%rbp)
ffffffff8000a3ec:	4d 89 dd             	mov    %r11,%r13
ffffffff8000a3ef:	eb 30                	jmp    ffffffff8000a421 <_ZN9WinServer6CreateEimPKciiRmS2_+0x201>
ffffffff8000a3f1:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
ffffffff8000a3f8:	48 2b 05 a9 25 14 00 	sub    0x1425a9(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
                    slot.used = false;
                    return -1;
                }
                uint64_t physAddr = Memory::SubHHDM((uint64_t)page);
                slot.bufPhysPages[b][i] = physAddr;
                Memory::VMM::Paging::MapUserIn(ownerPml4, physAddr, va + (uint64_t)i * 0x1000);
ffffffff8000a3ff:	4c 89 f2             	mov    %r14,%rdx
ffffffff8000a402:	4c 89 ff             	mov    %r15,%rdi
            for (int i = 0; i < numPages; i++) {
ffffffff8000a405:	48 83 c3 08          	add    $0x8,%rbx
                slot.bufPhysPages[b][i] = physAddr;
ffffffff8000a409:	48 89 43 f8          	mov    %rax,-0x8(%rbx)
ffffffff8000a40d:	48 89 c6             	mov    %rax,%rsi
            for (int i = 0; i < numPages; i++) {
ffffffff8000a410:	49 81 c6 00 10 00 00 	add    $0x1000,%r14
                Memory::VMM::Paging::MapUserIn(ownerPml4, physAddr, va + (uint64_t)i * 0x1000);
ffffffff8000a417:	e8 44 17 01 00       	call   ffffffff8001bb60 <_ZN6Memory3VMM6Paging9MapUserInEmmm>
            for (int i = 0; i < numPages; i++) {
ffffffff8000a41c:	4d 39 e6             	cmp    %r12,%r14
ffffffff8000a41f:	74 2f                	je     ffffffff8000a450 <_ZN9WinServer6CreateEimPKciiRmS2_+0x230>
                void* page = Memory::g_pfa->AllocateZeroed();
ffffffff8000a421:	48 8b 3d 88 25 14 00 	mov    0x142588(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff8000a428:	e8 e3 0d 01 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
                if (page == nullptr) {
ffffffff8000a42d:	48 85 c0             	test   %rax,%rax
ffffffff8000a430:	75 c6                	jne    ffffffff8000a3f8 <_ZN9WinServer6CreateEimPKciiRmS2_+0x1d8>
                    slot.used = false;
ffffffff8000a432:	49 69 c5 88 85 00 00 	imul   $0x8588,%r13,%rax
ffffffff8000a439:	c6 80 60 35 10 80 00 	movb   $0x0,-0x7fefcaa0(%rax)
        if (slotIdx < 0) return -1;
ffffffff8000a440:	b9 ff ff ff ff       	mov    $0xffffffff,%ecx
ffffffff8000a445:	e9 50 01 00 00       	jmp    ffffffff8000a59a <_ZN9WinServer6CreateEimPKciiRmS2_+0x37a>
ffffffff8000a44a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff8000a450:	4d 89 eb             	mov    %r13,%r11
ffffffff8000a453:	4c 8b 4d 98          	mov    -0x68(%rbp),%r9
ffffffff8000a457:	48 8b 7d 88          	mov    -0x78(%rbp),%rdi
ffffffff8000a45b:	8b 4d 84             	mov    -0x7c(%rbp),%ecx
ffffffff8000a45e:	4c 8b 6d 90          	mov    -0x70(%rbp),%r13
            }
            slot.ownerVa[b] = va;
ffffffff8000a462:	48 8b 45 b0          	mov    -0x50(%rbp),%rax
ffffffff8000a466:	48 8d 77 01          	lea    0x1(%rdi),%rsi
        for (int b = 0; b < 2; b++) {
ffffffff8000a46a:	48 81 45 b8 00 40 00 	addq   $0x4000,-0x48(%rbp)
ffffffff8000a471:	00 
            slot.ownerVa[b] = va;
ffffffff8000a472:	4c 89 ac f8 b8 b5 10 	mov    %r13,-0x7fef4a48(%rax,%rdi,8)
ffffffff8000a479:	80 
            heapNext += (uint64_t)numPages * 0x1000;
ffffffff8000a47a:	48 8b 45 c0          	mov    -0x40(%rbp),%rax
ffffffff8000a47e:	bf 01 00 00 00       	mov    $0x1,%edi
ffffffff8000a483:	4c 63 6d cc          	movslq -0x34(%rbp),%r13
ffffffff8000a487:	49 c1 e5 0c          	shl    $0xc,%r13
ffffffff8000a48b:	4c 03 28             	add    (%rax),%r13
ffffffff8000a48e:	4c 89 28             	mov    %r13,(%rax)
        for (int b = 0; b < 2; b++) {
ffffffff8000a491:	48 83 fe 02          	cmp    $0x2,%rsi
ffffffff8000a495:	0f 85 21 ff ff ff    	jne    ffffffff8000a3bc <_ZN9WinServer6CreateEimPKciiRmS2_+0x19c>
        }

        // App starts writing to the back buffer (1 - frontIdx = 1)
        outVa = slot.ownerVa[1];
ffffffff8000a49b:	4d 69 eb 88 85 00 00 	imul   $0x8588,%r11,%r13
ffffffff8000a4a2:	48 8b 45 10          	mov    0x10(%rbp),%rax
ffffffff8000a4a6:	44 8b 65 a8          	mov    -0x58(%rbp),%r12d
ffffffff8000a4aa:	89 4d cc             	mov    %ecx,-0x34(%rbp)
            Print(string);
ffffffff8000a4ad:	48 c7 c7 78 a4 02 80 	mov    $0xffffffff8002a478,%rdi
ffffffff8000a4b4:	8b 5d a0             	mov    -0x60(%rbp),%ebx
ffffffff8000a4b7:	44 8b 7d c8          	mov    -0x38(%rbp),%r15d
            g_kernelLogDepth++;
ffffffff8000a4bb:	83 05 e2 4f 1d 00 01 	addl   $0x1,0x1d4fe2(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000a4c2:	49 8b 95 c0 b5 10 80 	mov    -0x7fef4a40(%r13),%rdx
ffffffff8000a4c9:	48 89 10             	mov    %rdx,(%rax)
            Print(string);
ffffffff8000a4cc:	e8 ef 8c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000a4d1:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000a4d8:	e8 e3 8c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000a4dd:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000a4e4:	e8 d7 8c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000a4e9:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000a4f0:	e8 cb 8c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000a4f5:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000a4fc:	e8 bf 8c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000a501:	48 c7 c7 82 a4 02 80 	mov    $0xffffffff8002a482,%rdi
ffffffff8000a508:	e8 b3 8c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::int2basestr(number, t.streamBaseType));
ffffffff8000a50d:	8b 7d cc             	mov    -0x34(%rbp),%edi
ffffffff8000a510:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000a515:	e8 66 fe 00 00       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
ffffffff8000a51a:	48 89 c7             	mov    %rax,%rdi
ffffffff8000a51d:	e8 9e 8c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000a522:	48 c7 c7 10 b7 02 80 	mov    $0xffffffff8002b710,%rdi
ffffffff8000a529:	e8 92 8c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::int2basestr(number, t.streamBaseType));
ffffffff8000a52e:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000a533:	89 df                	mov    %ebx,%edi
ffffffff8000a535:	e8 46 fe 00 00       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
ffffffff8000a53a:	48 89 c7             	mov    %rax,%rdi
ffffffff8000a53d:	e8 7e 8c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000a542:	48 c7 c7 d8 a4 02 80 	mov    $0xffffffff8002a4d8,%rdi
ffffffff8000a549:	e8 72 8c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::int2basestr(number, t.streamBaseType));
ffffffff8000a54e:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000a553:	44 89 ff             	mov    %r15d,%edi
ffffffff8000a556:	e8 25 fe 00 00       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
ffffffff8000a55b:	48 89 c7             	mov    %rax,%rdi
ffffffff8000a55e:	e8 5d 8c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000a563:	48 c7 c7 92 a4 02 80 	mov    $0xffffffff8002a492,%rdi
ffffffff8000a56a:	e8 51 8c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::int2basestr(number, t.streamBaseType));
ffffffff8000a56f:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000a574:	44 89 e7             	mov    %r12d,%edi
ffffffff8000a577:	e8 04 fe 00 00       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
ffffffff8000a57c:	48 89 c7             	mov    %rax,%rdi
ffffffff8000a57f:	e8 3c 8c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000a584:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000a58b:	e8 30 8c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000a590:	83 2d 0d 4f 1d 00 01 	subl   $0x1,0x1d4f0d(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

        Kt::KernelLogStream(Kt::OK, "WinServer") << "Created window " << slotIdx
            << " (" << w << "x" << h << ") for PID " << ownerPid;

        return slotIdx;
ffffffff8000a597:	8b 4d cc             	mov    -0x34(%rbp),%ecx
    }
ffffffff8000a59a:	48 83 c4 58          	add    $0x58,%rsp
ffffffff8000a59e:	89 c8                	mov    %ecx,%eax
ffffffff8000a5a0:	5b                   	pop    %rbx
ffffffff8000a5a1:	41 5c                	pop    %r12
ffffffff8000a5a3:	41 5d                	pop    %r13
ffffffff8000a5a5:	41 5e                	pop    %r14
ffffffff8000a5a7:	41 5f                	pop    %r15
ffffffff8000a5a9:	5d                   	pop    %rbp
ffffffff8000a5aa:	c3                   	ret
ffffffff8000a5ab:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff8000a5b0:	b8 3f 00 00 00       	mov    $0x3f,%eax
ffffffff8000a5b5:	e9 c5 fd ff ff       	jmp    ffffffff8000a37f <_ZN9WinServer6CreateEimPKciiRmS2_+0x15f>
        int tlen = 0;
ffffffff8000a5ba:	31 c0                	xor    %eax,%eax
ffffffff8000a5bc:	e9 be fd ff ff       	jmp    ffffffff8000a37f <_ZN9WinServer6CreateEimPKciiRmS2_+0x15f>
ffffffff8000a5c1:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000a5c8:	00 00 00 
ffffffff8000a5cb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff8000a5d0 <_ZN9WinServer7DestroyEii>:

    int Destroy(int windowId, int callerPid) {
        if (windowId < 0 || windowId >= MaxWindows) return -1;
ffffffff8000a5d0:	83 ff 07             	cmp    $0x7,%edi
ffffffff8000a5d3:	77 2b                	ja     ffffffff8000a600 <_ZN9WinServer7DestroyEii+0x30>
        WindowSlot& slot = g_slots[windowId];
        if (!slot.used || slot.ownerPid != callerPid) return -1;
ffffffff8000a5d5:	48 63 ff             	movslq %edi,%rdi
ffffffff8000a5d8:	48 69 ff 88 85 00 00 	imul   $0x8588,%rdi,%rdi
ffffffff8000a5df:	80 bf 60 35 10 80 00 	cmpb   $0x0,-0x7fefcaa0(%rdi)
ffffffff8000a5e6:	74 18                	je     ffffffff8000a600 <_ZN9WinServer7DestroyEii+0x30>
ffffffff8000a5e8:	39 b7 64 35 10 80    	cmp    %esi,-0x7fefca9c(%rdi)
ffffffff8000a5ee:	75 10                	jne    ffffffff8000a600 <_ZN9WinServer7DestroyEii+0x30>

        slot.used = false;
ffffffff8000a5f0:	c6 87 60 35 10 80 00 	movb   $0x0,-0x7fefcaa0(%rdi)
        return 0;
ffffffff8000a5f7:	31 c0                	xor    %eax,%eax
ffffffff8000a5f9:	c3                   	ret
ffffffff8000a5fa:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        if (windowId < 0 || windowId >= MaxWindows) return -1;
ffffffff8000a600:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
    }
ffffffff8000a605:	c3                   	ret
ffffffff8000a606:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000a60d:	00 00 00 

ffffffff8000a610 <_ZN9WinServer7PresentEii>:

    uint64_t Present(int windowId, int callerPid) {
        if (windowId < 0 || windowId >= MaxWindows) return 0;
ffffffff8000a610:	31 c0                	xor    %eax,%eax
ffffffff8000a612:	83 ff 07             	cmp    $0x7,%edi
ffffffff8000a615:	77 54                	ja     ffffffff8000a66b <_ZN9WinServer7PresentEii+0x5b>
        WindowSlot& slot = g_slots[windowId];
        if (!slot.used || slot.ownerPid != callerPid) return 0;
ffffffff8000a617:	48 63 ff             	movslq %edi,%rdi
ffffffff8000a61a:	48 69 d7 88 85 00 00 	imul   $0x8588,%rdi,%rdx
ffffffff8000a621:	80 ba 60 35 10 80 00 	cmpb   $0x0,-0x7fefcaa0(%rdx)
ffffffff8000a628:	48 8d 8a 60 35 10 80 	lea    -0x7fefcaa0(%rdx),%rcx
ffffffff8000a62f:	74 3a                	je     ffffffff8000a66b <_ZN9WinServer7PresentEii+0x5b>
ffffffff8000a631:	39 b2 64 35 10 80    	cmp    %esi,-0x7fefca9c(%rdx)
ffffffff8000a637:	75 32                	jne    ffffffff8000a66b <_ZN9WinServer7PresentEii+0x5b>

        // Swap ownership: the buffer the app just finished rendering becomes
        // the new front buffer (compositor reads it), and the old front buffer
        // becomes the new back buffer (app renders to it next).
        // Zero-copy — no memcpy, just an index flip.
        slot.frontIdx = 1 - slot.frontIdx;
ffffffff8000a639:	48 63 82 b0 b5 10 80 	movslq -0x7fef4a50(%rdx),%rax
        // Set dirty AFTER the swap so the compositor (on another CPU) sees
        // the updated frontIdx when it observes dirty==true (x86 TSO).
        slot.dirty = true;

        // Return the new back buffer VA for the app to render into next.
        return slot.ownerVa[1 - slot.frontIdx];
ffffffff8000a640:	48 69 ff b1 10 00 00 	imul   $0x10b1,%rdi,%rdi
        slot.frontIdx = 1 - slot.frontIdx;
ffffffff8000a647:	ba 01 00 00 00       	mov    $0x1,%edx
        slot.dirty = true;
ffffffff8000a64c:	c6 81 84 85 00 00 01 	movb   $0x1,0x8584(%rcx)
        slot.frontIdx = 1 - slot.frontIdx;
ffffffff8000a653:	29 c2                	sub    %eax,%edx
ffffffff8000a655:	89 91 50 80 00 00    	mov    %edx,0x8050(%rcx)
        return slot.ownerVa[1 - slot.frontIdx];
ffffffff8000a65b:	48 8d 84 38 0a 10 00 	lea    0x100a(%rax,%rdi,1),%rax
ffffffff8000a662:	00 
ffffffff8000a663:	48 8b 04 c5 68 35 10 	mov    -0x7fefca98(,%rax,8),%rax
ffffffff8000a66a:	80 
    }
ffffffff8000a66b:	c3                   	ret
ffffffff8000a66c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8000a670 <_ZN9WinServer4PollEiiPN6Zenith8WinEventE>:

    int Poll(int windowId, int callerPid, Zenith::WinEvent* outEvent) {
        if (windowId < 0 || windowId >= MaxWindows) return -1;
ffffffff8000a670:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
ffffffff8000a675:	83 ff 07             	cmp    $0x7,%edi
ffffffff8000a678:	77 6c                	ja     ffffffff8000a6e6 <_ZN9WinServer4PollEiiPN6Zenith8WinEventE+0x76>
        WindowSlot& slot = g_slots[windowId];
        if (!slot.used || slot.ownerPid != callerPid) return -1;
ffffffff8000a67a:	48 63 ff             	movslq %edi,%rdi
ffffffff8000a67d:	48 69 ff 88 85 00 00 	imul   $0x8588,%rdi,%rdi
ffffffff8000a684:	80 bf 60 35 10 80 00 	cmpb   $0x0,-0x7fefcaa0(%rdi)
ffffffff8000a68b:	74 59                	je     ffffffff8000a6e6 <_ZN9WinServer4PollEiiPN6Zenith8WinEventE+0x76>
ffffffff8000a68d:	39 b7 64 35 10 80    	cmp    %esi,-0x7fefca9c(%rdi)
ffffffff8000a693:	75 51                	jne    ffffffff8000a6e6 <_ZN9WinServer4PollEiiPN6Zenith8WinEventE+0x76>

        if (slot.eventHead == slot.eventTail) return 0; // no events
ffffffff8000a695:	48 63 b7 e0 ba 10 80 	movslq -0x7fef4520(%rdi),%rsi
ffffffff8000a69c:	31 c0                	xor    %eax,%eax
ffffffff8000a69e:	39 b7 dc ba 10 80    	cmp    %esi,-0x7fef4524(%rdi)
ffffffff8000a6a4:	74 40                	je     ffffffff8000a6e6 <_ZN9WinServer4PollEiiPN6Zenith8WinEventE+0x76>

        *outEvent = slot.events[slot.eventTail];
ffffffff8000a6a6:	48 8d 04 b6          	lea    (%rsi,%rsi,4),%rax
ffffffff8000a6aa:	48 8d 84 87 d0 b5 10 	lea    -0x7fef4a30(%rdi,%rax,4),%rax
ffffffff8000a6b1:	80 
ffffffff8000a6b2:	48 8b 70 0c          	mov    0xc(%rax),%rsi
ffffffff8000a6b6:	48 89 32             	mov    %rsi,(%rdx)
ffffffff8000a6b9:	48 8b 70 14          	mov    0x14(%rax),%rsi
ffffffff8000a6bd:	48 89 72 08          	mov    %rsi,0x8(%rdx)
ffffffff8000a6c1:	8b 40 1c             	mov    0x1c(%rax),%eax
ffffffff8000a6c4:	89 42 10             	mov    %eax,0x10(%rdx)
        slot.eventTail = (slot.eventTail + 1) % MaxEvents;
ffffffff8000a6c7:	8b 87 e0 ba 10 80    	mov    -0x7fef4520(%rdi),%eax
ffffffff8000a6cd:	83 c0 01             	add    $0x1,%eax
ffffffff8000a6d0:	99                   	cltd
ffffffff8000a6d1:	c1 ea 1a             	shr    $0x1a,%edx
ffffffff8000a6d4:	01 d0                	add    %edx,%eax
ffffffff8000a6d6:	83 e0 3f             	and    $0x3f,%eax
ffffffff8000a6d9:	29 d0                	sub    %edx,%eax
ffffffff8000a6db:	89 87 e0 ba 10 80    	mov    %eax,-0x7fef4520(%rdi)
        return 1;
ffffffff8000a6e1:	b8 01 00 00 00       	mov    $0x1,%eax
    }
ffffffff8000a6e6:	c3                   	ret
ffffffff8000a6e7:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000a6ee:	00 00 00 
ffffffff8000a6f1:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000a6f8:	00 00 00 
ffffffff8000a6fb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff8000a700 <_ZN9WinServer9EnumerateEPN6Zenith7WinInfoEi>:

    int Enumerate(Zenith::WinInfo* outArray, int maxCount) {
ffffffff8000a700:	49 89 fa             	mov    %rdi,%r10
ffffffff8000a703:	41 89 f1             	mov    %esi,%r9d
        int count = 0;
        for (int i = 0; i < MaxWindows && count < maxCount; i++) {
ffffffff8000a706:	85 f6                	test   %esi,%esi
ffffffff8000a708:	0f 8e a2 00 00 00    	jle    ffffffff8000a7b0 <_ZN9WinServer9EnumerateEPN6Zenith7WinInfoEi+0xb0>
ffffffff8000a70e:	31 c9                	xor    %ecx,%ecx
ffffffff8000a710:	31 ff                	xor    %edi,%edi
        int count = 0;
ffffffff8000a712:	45 31 c0             	xor    %r8d,%r8d
ffffffff8000a715:	eb 1d                	jmp    ffffffff8000a734 <_ZN9WinServer9EnumerateEPN6Zenith7WinInfoEi+0x34>
ffffffff8000a717:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8000a71e:	00 00 
        for (int i = 0; i < MaxWindows && count < maxCount; i++) {
ffffffff8000a720:	83 c7 01             	add    $0x1,%edi
ffffffff8000a723:	48 81 c1 88 85 00 00 	add    $0x8588,%rcx
ffffffff8000a72a:	83 ff 08             	cmp    $0x8,%edi
ffffffff8000a72d:	74 7d                	je     ffffffff8000a7ac <_ZN9WinServer9EnumerateEPN6Zenith7WinInfoEi+0xac>
ffffffff8000a72f:	45 39 c8             	cmp    %r9d,%r8d
ffffffff8000a732:	7d 78                	jge    ffffffff8000a7ac <_ZN9WinServer9EnumerateEPN6Zenith7WinInfoEi+0xac>
            if (!g_slots[i].used) continue;
ffffffff8000a734:	80 b9 60 35 10 80 00 	cmpb   $0x0,-0x7fefcaa0(%rcx)
ffffffff8000a73b:	74 e3                	je     ffffffff8000a720 <_ZN9WinServer9EnumerateEPN6Zenith7WinInfoEi+0x20>
            Zenith::WinInfo& info = outArray[count];
ffffffff8000a73d:	49 63 c0             	movslq %r8d,%rax
ffffffff8000a740:	48 8d 14 80          	lea    (%rax,%rax,4),%rdx
ffffffff8000a744:	48 8d 04 90          	lea    (%rax,%rdx,4),%rax
ffffffff8000a748:	49 8d 34 82          	lea    (%r10,%rax,4),%rsi
            info.id = i;
ffffffff8000a74c:	89 3e                	mov    %edi,(%rsi)
            info.ownerPid = g_slots[i].ownerPid;
ffffffff8000a74e:	8b 81 64 35 10 80    	mov    -0x7fefca9c(%rcx),%eax
ffffffff8000a754:	89 46 04             	mov    %eax,0x4(%rsi)
ffffffff8000a757:	31 c0                	xor    %eax,%eax
ffffffff8000a759:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            for (int j = 0; j < 64; j++) info.title[j] = g_slots[i].title[j];
ffffffff8000a760:	0f b6 94 01 68 35 10 	movzbl -0x7fefca98(%rcx,%rax,1),%edx
ffffffff8000a767:	80 
ffffffff8000a768:	88 54 06 08          	mov    %dl,0x8(%rsi,%rax,1)
ffffffff8000a76c:	48 83 c0 01          	add    $0x1,%rax
ffffffff8000a770:	48 83 f8 40          	cmp    $0x40,%rax
ffffffff8000a774:	75 ea                	jne    ffffffff8000a760 <_ZN9WinServer9EnumerateEPN6Zenith7WinInfoEi+0x60>
            info.width = g_slots[i].width;
ffffffff8000a776:	8b 81 a8 35 10 80    	mov    -0x7fefca58(%rcx),%eax
        for (int i = 0; i < MaxWindows && count < maxCount; i++) {
ffffffff8000a77c:	83 c7 01             	add    $0x1,%edi
            info.height = g_slots[i].height;
            info.dirty = g_slots[i].dirty ? 1 : 0;
            g_slots[i].dirty = false; // clear dirty after read
            count++;
ffffffff8000a77f:	41 83 c0 01          	add    $0x1,%r8d
            info.width = g_slots[i].width;
ffffffff8000a783:	89 46 48             	mov    %eax,0x48(%rsi)
            info.height = g_slots[i].height;
ffffffff8000a786:	8b 81 ac 35 10 80    	mov    -0x7fefca54(%rcx),%eax
ffffffff8000a78c:	89 46 4c             	mov    %eax,0x4c(%rsi)
            info.dirty = g_slots[i].dirty ? 1 : 0;
ffffffff8000a78f:	0f b6 81 e4 ba 10 80 	movzbl -0x7fef451c(%rcx),%eax
ffffffff8000a796:	88 46 50             	mov    %al,0x50(%rsi)
            g_slots[i].dirty = false; // clear dirty after read
ffffffff8000a799:	c6 81 e4 ba 10 80 00 	movb   $0x0,-0x7fef451c(%rcx)
        for (int i = 0; i < MaxWindows && count < maxCount; i++) {
ffffffff8000a7a0:	48 81 c1 88 85 00 00 	add    $0x8588,%rcx
ffffffff8000a7a7:	83 ff 08             	cmp    $0x8,%edi
ffffffff8000a7aa:	75 83                	jne    ffffffff8000a72f <_ZN9WinServer9EnumerateEPN6Zenith7WinInfoEi+0x2f>
        }
        return count;
    }
ffffffff8000a7ac:	44 89 c0             	mov    %r8d,%eax
ffffffff8000a7af:	c3                   	ret
        int count = 0;
ffffffff8000a7b0:	45 31 c0             	xor    %r8d,%r8d
    }
ffffffff8000a7b3:	44 89 c0             	mov    %r8d,%eax
ffffffff8000a7b6:	c3                   	ret
ffffffff8000a7b7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8000a7be:	00 00 

ffffffff8000a7c0 <_ZN9WinServer3MapEiimRm>:

    uint64_t Map(int windowId, int callerPid, uint64_t callerPml4, uint64_t& heapNext) {
ffffffff8000a7c0:	55                   	push   %rbp
        if (windowId < 0 || windowId >= MaxWindows) return 0;
ffffffff8000a7c1:	31 c0                	xor    %eax,%eax
    uint64_t Map(int windowId, int callerPid, uint64_t callerPml4, uint64_t& heapNext) {
ffffffff8000a7c3:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000a7c6:	41 57                	push   %r15
ffffffff8000a7c8:	41 56                	push   %r14
ffffffff8000a7ca:	41 55                	push   %r13
ffffffff8000a7cc:	41 54                	push   %r12
ffffffff8000a7ce:	53                   	push   %rbx
ffffffff8000a7cf:	48 83 ec 38          	sub    $0x38,%rsp
ffffffff8000a7d3:	89 75 ac             	mov    %esi,-0x54(%rbp)
ffffffff8000a7d6:	48 89 4d c0          	mov    %rcx,-0x40(%rbp)
        if (windowId < 0 || windowId >= MaxWindows) return 0;
ffffffff8000a7da:	83 ff 07             	cmp    $0x7,%edi
ffffffff8000a7dd:	0f 87 06 01 00 00    	ja     ffffffff8000a8e9 <_ZN9WinServer3MapEiimRm+0x129>
ffffffff8000a7e3:	48 89 d3             	mov    %rdx,%rbx
        WindowSlot& slot = g_slots[windowId];
        if (!slot.used) return 0;
ffffffff8000a7e6:	48 63 d7             	movslq %edi,%rdx
ffffffff8000a7e9:	48 89 55 b0          	mov    %rdx,-0x50(%rbp)
ffffffff8000a7ed:	48 69 d2 88 85 00 00 	imul   $0x8588,%rdx,%rdx
ffffffff8000a7f4:	80 ba 60 35 10 80 00 	cmpb   $0x0,-0x7fefcaa0(%rdx)
ffffffff8000a7fb:	48 8d 8a 60 35 10 80 	lea    -0x7fefcaa0(%rdx),%rcx
ffffffff8000a802:	0f 84 e1 00 00 00    	je     ffffffff8000a8e9 <_ZN9WinServer3MapEiimRm+0x129>

        // If already mapped into this process, return current front buffer VA
        if (slot.desktopPid == callerPid && slot.desktopVa[0] != 0) {
ffffffff8000a808:	39 b1 78 80 00 00    	cmp    %esi,0x8078(%rcx)
ffffffff8000a80e:	0f 84 ec 00 00 00    	je     ffffffff8000a900 <_ZN9WinServer3MapEiimRm+0x140>

        // Map BOTH buffers into the compositor's address space.
        // The compositor calls Map() on every dirty frame to get the
        // current front buffer VA — no page table work after first call.
        for (int b = 0; b < 2; b++) {
            uint64_t va = heapNext;
ffffffff8000a814:	48 8b 45 c0          	mov    -0x40(%rbp),%rax
ffffffff8000a818:	4c 69 7d b0 88 85 00 	imul   $0x8588,-0x50(%rbp),%r15
ffffffff8000a81f:	00 
ffffffff8000a820:	48 8b 00             	mov    (%rax),%rax
ffffffff8000a823:	4d 8d a7 60 35 10 80 	lea    -0x7fefcaa0(%r15),%r12
ffffffff8000a82a:	48 89 45 c8          	mov    %rax,-0x38(%rbp)
ffffffff8000a82e:	49 8d 87 00 80 00 00 	lea    0x8000(%r15),%rax
ffffffff8000a835:	4c 89 65 b8          	mov    %r12,-0x48(%rbp)
ffffffff8000a839:	48 89 45 a0          	mov    %rax,-0x60(%rbp)
            for (int i = 0; i < slot.pixelNumPages; i++) {
ffffffff8000a83d:	49 63 8c 24 54 80 00 	movslq 0x8054(%r12),%rcx
ffffffff8000a844:	00 
ffffffff8000a845:	85 c9                	test   %ecx,%ecx
ffffffff8000a847:	7e 32                	jle    ffffffff8000a87b <_ZN9WinServer3MapEiimRm+0xbb>
ffffffff8000a849:	4c 8b 75 c8          	mov    -0x38(%rbp),%r14
ffffffff8000a84d:	45 31 ed             	xor    %r13d,%r13d
                Memory::VMM::Paging::MapUserIn(callerPml4, slot.bufPhysPages[b][i],
ffffffff8000a850:	4b 8b b4 ef b0 35 10 	mov    -0x7fefca50(%r15,%r13,8),%rsi
ffffffff8000a857:	80 
ffffffff8000a858:	4c 89 f2             	mov    %r14,%rdx
ffffffff8000a85b:	48 89 df             	mov    %rbx,%rdi
            for (int i = 0; i < slot.pixelNumPages; i++) {
ffffffff8000a85e:	49 83 c5 01          	add    $0x1,%r13
ffffffff8000a862:	49 81 c6 00 10 00 00 	add    $0x1000,%r14
                Memory::VMM::Paging::MapUserIn(callerPml4, slot.bufPhysPages[b][i],
ffffffff8000a869:	e8 f2 12 01 00       	call   ffffffff8001bb60 <_ZN6Memory3VMM6Paging9MapUserInEmmm>
            for (int i = 0; i < slot.pixelNumPages; i++) {
ffffffff8000a86e:	49 63 8c 24 54 80 00 	movslq 0x8054(%r12),%rcx
ffffffff8000a875:	00 
ffffffff8000a876:	44 39 e9             	cmp    %r13d,%ecx
ffffffff8000a879:	7f d5                	jg     ffffffff8000a850 <_ZN9WinServer3MapEiimRm+0x90>
                                               va + (uint64_t)i * 0x1000);
            }
            slot.desktopVa[b] = va;
ffffffff8000a87b:	48 8b 45 b8          	mov    -0x48(%rbp),%rax
ffffffff8000a87f:	48 8b 7d c8          	mov    -0x38(%rbp),%rdi
            heapNext += (uint64_t)slot.pixelNumPages * 0x1000;
ffffffff8000a883:	48 c1 e1 0c          	shl    $0xc,%rcx
        for (int b = 0; b < 2; b++) {
ffffffff8000a887:	49 81 c7 00 40 00 00 	add    $0x4000,%r15
            heapNext += (uint64_t)slot.pixelNumPages * 0x1000;
ffffffff8000a88e:	48 8b 55 c0          	mov    -0x40(%rbp),%rdx
            slot.desktopVa[b] = va;
ffffffff8000a892:	48 89 b8 68 80 00 00 	mov    %rdi,0x8068(%rax)
        for (int b = 0; b < 2; b++) {
ffffffff8000a899:	48 83 c0 08          	add    $0x8,%rax
            heapNext += (uint64_t)slot.pixelNumPages * 0x1000;
ffffffff8000a89d:	48 8b 3a             	mov    (%rdx),%rdi
        for (int b = 0; b < 2; b++) {
ffffffff8000a8a0:	48 89 45 b8          	mov    %rax,-0x48(%rbp)
ffffffff8000a8a4:	48 8b 45 a0          	mov    -0x60(%rbp),%rax
            heapNext += (uint64_t)slot.pixelNumPages * 0x1000;
ffffffff8000a8a8:	48 01 cf             	add    %rcx,%rdi
ffffffff8000a8ab:	48 89 7d c8          	mov    %rdi,-0x38(%rbp)
ffffffff8000a8af:	48 89 3a             	mov    %rdi,(%rdx)
        for (int b = 0; b < 2; b++) {
ffffffff8000a8b2:	49 39 c7             	cmp    %rax,%r15
ffffffff8000a8b5:	75 86                	jne    ffffffff8000a83d <_ZN9WinServer3MapEiimRm+0x7d>
        }

        slot.desktopPid = callerPid;
ffffffff8000a8b7:	48 8b 5d b0          	mov    -0x50(%rbp),%rbx
ffffffff8000a8bb:	8b 7d ac             	mov    -0x54(%rbp),%edi
ffffffff8000a8be:	48 69 c3 88 85 00 00 	imul   $0x8588,%rbx,%rax
        return slot.desktopVa[slot.frontIdx];
ffffffff8000a8c5:	48 63 90 b0 b5 10 80 	movslq -0x7fef4a50(%rax),%rdx
        slot.desktopPid = callerPid;
ffffffff8000a8cc:	89 b8 d8 b5 10 80    	mov    %edi,-0x7fef4a28(%rax)
        return slot.desktopVa[slot.frontIdx];
ffffffff8000a8d2:	48 69 c3 b1 10 00 00 	imul   $0x10b1,%rbx,%rax
ffffffff8000a8d9:	48 8d 84 02 0c 10 00 	lea    0x100c(%rdx,%rax,1),%rax
ffffffff8000a8e0:	00 
ffffffff8000a8e1:	48 8b 04 c5 68 35 10 	mov    -0x7fefca98(,%rax,8),%rax
ffffffff8000a8e8:	80 
    }
ffffffff8000a8e9:	48 83 c4 38          	add    $0x38,%rsp
ffffffff8000a8ed:	5b                   	pop    %rbx
ffffffff8000a8ee:	41 5c                	pop    %r12
ffffffff8000a8f0:	41 5d                	pop    %r13
ffffffff8000a8f2:	41 5e                	pop    %r14
ffffffff8000a8f4:	41 5f                	pop    %r15
ffffffff8000a8f6:	5d                   	pop    %rbp
ffffffff8000a8f7:	c3                   	ret
ffffffff8000a8f8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000a8ff:	00 
        if (slot.desktopPid == callerPid && slot.desktopVa[0] != 0) {
ffffffff8000a900:	48 83 b9 68 80 00 00 	cmpq   $0x0,0x8068(%rcx)
ffffffff8000a907:	00 
ffffffff8000a908:	0f 84 06 ff ff ff    	je     ffffffff8000a814 <_ZN9WinServer3MapEiimRm+0x54>
            return slot.desktopVa[slot.frontIdx];
ffffffff8000a90e:	48 69 45 b0 b1 10 00 	imul   $0x10b1,-0x50(%rbp),%rax
ffffffff8000a915:	00 
ffffffff8000a916:	48 63 91 50 80 00 00 	movslq 0x8050(%rcx),%rdx
ffffffff8000a91d:	48 8d 84 02 0c 10 00 	lea    0x100c(%rdx,%rax,1),%rax
ffffffff8000a924:	00 
ffffffff8000a925:	48 8b 04 c5 68 35 10 	mov    -0x7fefca98(,%rax,8),%rax
ffffffff8000a92c:	80 
ffffffff8000a92d:	eb ba                	jmp    ffffffff8000a8e9 <_ZN9WinServer3MapEiimRm+0x129>
ffffffff8000a92f:	90                   	nop

ffffffff8000a930 <_ZN9WinServer9SendEventEiPKN6Zenith8WinEventE>:

    int SendEvent(int windowId, const Zenith::WinEvent* event) {
ffffffff8000a930:	48 89 f2             	mov    %rsi,%rdx
        if (windowId < 0 || windowId >= MaxWindows) return -1;
ffffffff8000a933:	83 ff 07             	cmp    $0x7,%edi
ffffffff8000a936:	77 68                	ja     ffffffff8000a9a0 <_ZN9WinServer9SendEventEiPKN6Zenith8WinEventE+0x70>
        WindowSlot& slot = g_slots[windowId];
        if (!slot.used) return -1;
ffffffff8000a938:	48 63 ff             	movslq %edi,%rdi
ffffffff8000a93b:	48 69 ff 88 85 00 00 	imul   $0x8588,%rdi,%rdi
ffffffff8000a942:	80 bf 60 35 10 80 00 	cmpb   $0x0,-0x7fefcaa0(%rdi)
ffffffff8000a949:	74 55                	je     ffffffff8000a9a0 <_ZN9WinServer9SendEventEiPKN6Zenith8WinEventE+0x70>

        int nextHead = (slot.eventHead + 1) % MaxEvents;
ffffffff8000a94b:	48 63 8f dc ba 10 80 	movslq -0x7fef4524(%rdi),%rcx
ffffffff8000a952:	8d 41 01             	lea    0x1(%rcx),%eax
ffffffff8000a955:	89 c6                	mov    %eax,%esi
ffffffff8000a957:	c1 fe 1f             	sar    $0x1f,%esi
ffffffff8000a95a:	c1 ee 1a             	shr    $0x1a,%esi
ffffffff8000a95d:	01 f0                	add    %esi,%eax
ffffffff8000a95f:	83 e0 3f             	and    $0x3f,%eax
ffffffff8000a962:	29 f0                	sub    %esi,%eax
        if (nextHead == slot.eventTail) return -1; // queue full, drop event
ffffffff8000a964:	39 87 e0 ba 10 80    	cmp    %eax,-0x7fef4520(%rdi)
ffffffff8000a96a:	74 34                	je     ffffffff8000a9a0 <_ZN9WinServer9SendEventEiPKN6Zenith8WinEventE+0x70>

        slot.events[slot.eventHead] = *event;
ffffffff8000a96c:	48 8b 32             	mov    (%rdx),%rsi
ffffffff8000a96f:	48 8d 0c 89          	lea    (%rcx,%rcx,4),%rcx
ffffffff8000a973:	48 8d 8c 8f d0 b5 10 	lea    -0x7fef4a30(%rdi,%rcx,4),%rcx
ffffffff8000a97a:	80 
ffffffff8000a97b:	48 89 71 0c          	mov    %rsi,0xc(%rcx)
ffffffff8000a97f:	48 8b 72 08          	mov    0x8(%rdx),%rsi
ffffffff8000a983:	48 89 71 14          	mov    %rsi,0x14(%rcx)
ffffffff8000a987:	8b 52 10             	mov    0x10(%rdx),%edx
        slot.eventHead = nextHead;
ffffffff8000a98a:	89 87 dc ba 10 80    	mov    %eax,-0x7fef4524(%rdi)
        return 0;
ffffffff8000a990:	31 c0                	xor    %eax,%eax
        slot.events[slot.eventHead] = *event;
ffffffff8000a992:	89 51 1c             	mov    %edx,0x1c(%rcx)
        return 0;
ffffffff8000a995:	c3                   	ret
ffffffff8000a996:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000a99d:	00 00 00 
        if (windowId < 0 || windowId >= MaxWindows) return -1;
ffffffff8000a9a0:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
    }
ffffffff8000a9a5:	c3                   	ret
ffffffff8000a9a6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000a9ad:	00 00 00 

ffffffff8000a9b0 <_ZN9WinServer6ResizeEiimiiRmS0_>:

    int Resize(int windowId, int callerPid, uint64_t ownerPml4, int newW, int newH,
               uint64_t& heapNext, uint64_t& outVa) {
ffffffff8000a9b0:	55                   	push   %rbp
ffffffff8000a9b1:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000a9b4:	41 57                	push   %r15
ffffffff8000a9b6:	41 56                	push   %r14
ffffffff8000a9b8:	41 55                	push   %r13
ffffffff8000a9ba:	41 54                	push   %r12
ffffffff8000a9bc:	53                   	push   %rbx
ffffffff8000a9bd:	48 63 df             	movslq %edi,%rbx
ffffffff8000a9c0:	48 83 ec 48          	sub    $0x48,%rsp
        if (windowId < 0 || windowId >= MaxWindows) return -1;
ffffffff8000a9c4:	83 fb 07             	cmp    $0x7,%ebx
ffffffff8000a9c7:	0f 87 1d 01 00 00    	ja     ffffffff8000aaea <_ZN9WinServer6ResizeEiimiiRmS0_+0x13a>
ffffffff8000a9cd:	41 89 cf             	mov    %ecx,%r15d
        WindowSlot& slot = g_slots[windowId];
        if (!slot.used || slot.ownerPid != callerPid) return -1;
ffffffff8000a9d0:	48 69 cb 88 85 00 00 	imul   $0x8588,%rbx,%rcx
ffffffff8000a9d7:	80 b9 60 35 10 80 00 	cmpb   $0x0,-0x7fefcaa0(%rcx)
ffffffff8000a9de:	0f 84 06 01 00 00    	je     ffffffff8000aaea <_ZN9WinServer6ResizeEiimiiRmS0_+0x13a>
ffffffff8000a9e4:	39 b1 64 35 10 80    	cmp    %esi,-0x7fefca9c(%rcx)
ffffffff8000a9ea:	0f 85 fa 00 00 00    	jne    ffffffff8000aaea <_ZN9WinServer6ResizeEiimiiRmS0_+0x13a>
        if (newW <= 0 || newH <= 0) return -1;
ffffffff8000a9f0:	45 85 ff             	test   %r15d,%r15d
ffffffff8000a9f3:	0f 8e f1 00 00 00    	jle    ffffffff8000aaea <_ZN9WinServer6ResizeEiimiiRmS0_+0x13a>
ffffffff8000a9f9:	45 89 c5             	mov    %r8d,%r13d
ffffffff8000a9fc:	45 85 c0             	test   %r8d,%r8d
ffffffff8000a9ff:	0f 8e e5 00 00 00    	jle    ffffffff8000aaea <_ZN9WinServer6ResizeEiimiiRmS0_+0x13a>
ffffffff8000aa05:	49 89 d6             	mov    %rdx,%r14
        if (newW == slot.width && newH == slot.height) {
ffffffff8000aa08:	44 39 b9 a8 35 10 80 	cmp    %r15d,-0x7fefca58(%rcx)
ffffffff8000aa0f:	0f 84 a3 01 00 00    	je     ffffffff8000abb8 <_ZN9WinServer6ResizeEiimiiRmS0_+0x208>
            outVa = slot.ownerVa[1 - slot.frontIdx];
            return 0;
        }

        uint64_t bufSize = (uint64_t)newW * newH * 4;
ffffffff8000aa15:	49 63 d5             	movslq %r13d,%rdx
ffffffff8000aa18:	49 63 c7             	movslq %r15d,%rax
ffffffff8000aa1b:	48 0f af c2          	imul   %rdx,%rax
        int numPages = (int)((bufSize + 0xFFF) / 0x1000);
ffffffff8000aa1f:	48 8d 14 85 ff 0f 00 	lea    0xfff(,%rax,4),%rdx
ffffffff8000aa26:	00 
ffffffff8000aa27:	48 c1 ea 0c          	shr    $0xc,%rdx
ffffffff8000aa2b:	41 89 d2             	mov    %edx,%r10d
        if (numPages > MaxPixelPages) return -1;
ffffffff8000aa2e:	81 fa 00 08 00 00    	cmp    $0x800,%edx
ffffffff8000aa34:	0f 8f b0 00 00 00    	jg     ffffffff8000aaea <_ZN9WinServer6ResizeEiimiiRmS0_+0x13a>

        // Allocate two new sets of pages and map both into owner
        slot.frontIdx = 0;
ffffffff8000aa3a:	48 69 cb 88 85 00 00 	imul   $0x8588,%rbx,%rcx
        for (int b = 0; b < 2; b++) {
            uint64_t va = heapNext;
ffffffff8000aa41:	49 8b 01             	mov    (%r9),%rax
ffffffff8000aa44:	48 89 5d c0          	mov    %rbx,-0x40(%rbp)
ffffffff8000aa48:	45 31 c0             	xor    %r8d,%r8d
ffffffff8000aa4b:	44 89 7d cc          	mov    %r15d,-0x34(%rbp)
ffffffff8000aa4f:	44 89 6d c8          	mov    %r13d,-0x38(%rbp)
ffffffff8000aa53:	49 89 c7             	mov    %rax,%r15
ffffffff8000aa56:	4d 89 f5             	mov    %r14,%r13
        slot.frontIdx = 0;
ffffffff8000aa59:	c7 81 b0 b5 10 80 00 	movl   $0x0,-0x7fef4a50(%rcx)
ffffffff8000aa60:	00 00 00 
        for (int b = 0; b < 2; b++) {
ffffffff8000aa63:	48 8d b9 b0 35 10 80 	lea    -0x7fefca50(%rcx),%rdi
            uint64_t va = heapNext;
ffffffff8000aa6a:	48 89 c8             	mov    %rcx,%rax
            for (int i = 0; i < numPages; i++) {
ffffffff8000aa6d:	45 85 d2             	test   %r10d,%r10d
ffffffff8000aa70:	0f 8e a5 00 00 00    	jle    ffffffff8000ab1b <_ZN9WinServer6ResizeEiimiiRmS0_+0x16b>
ffffffff8000aa76:	8d 5a ff             	lea    -0x1(%rdx),%ebx
ffffffff8000aa79:	4c 89 7d b0          	mov    %r15,-0x50(%rbp)
ffffffff8000aa7d:	4d 89 fc             	mov    %r15,%r12
ffffffff8000aa80:	49 89 fe             	mov    %rdi,%r14
ffffffff8000aa83:	48 83 c3 01          	add    $0x1,%rbx
ffffffff8000aa87:	48 89 55 b8          	mov    %rdx,-0x48(%rbp)
ffffffff8000aa8b:	48 c1 e3 0c          	shl    $0xc,%rbx
ffffffff8000aa8f:	44 89 55 ac          	mov    %r10d,-0x54(%rbp)
ffffffff8000aa93:	4c 01 fb             	add    %r15,%rbx
ffffffff8000aa96:	4c 89 45 a0          	mov    %r8,-0x60(%rbp)
ffffffff8000aa9a:	49 89 c7             	mov    %rax,%r15
ffffffff8000aa9d:	48 89 7d 98          	mov    %rdi,-0x68(%rbp)
ffffffff8000aaa1:	4c 89 4d 90          	mov    %r9,-0x70(%rbp)
ffffffff8000aaa5:	eb 32                	jmp    ffffffff8000aad9 <_ZN9WinServer6ResizeEiimiiRmS0_+0x129>
ffffffff8000aaa7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8000aaae:	00 00 
ffffffff8000aab0:	48 2b 05 f1 1e 14 00 	sub    0x141ef1(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
                void* page = Memory::g_pfa->AllocateZeroed();
                if (page == nullptr) return -1;
                uint64_t physAddr = Memory::SubHHDM((uint64_t)page);
                slot.bufPhysPages[b][i] = physAddr;
                Memory::VMM::Paging::MapUserIn(ownerPml4, physAddr, va + (uint64_t)i * 0x1000);
ffffffff8000aab7:	4c 89 e2             	mov    %r12,%rdx
ffffffff8000aaba:	4c 89 ef             	mov    %r13,%rdi
            for (int i = 0; i < numPages; i++) {
ffffffff8000aabd:	49 83 c6 08          	add    $0x8,%r14
                slot.bufPhysPages[b][i] = physAddr;
ffffffff8000aac1:	49 89 46 f8          	mov    %rax,-0x8(%r14)
ffffffff8000aac5:	48 89 c6             	mov    %rax,%rsi
            for (int i = 0; i < numPages; i++) {
ffffffff8000aac8:	49 81 c4 00 10 00 00 	add    $0x1000,%r12
                Memory::VMM::Paging::MapUserIn(ownerPml4, physAddr, va + (uint64_t)i * 0x1000);
ffffffff8000aacf:	e8 8c 10 01 00       	call   ffffffff8001bb60 <_ZN6Memory3VMM6Paging9MapUserInEmmm>
            for (int i = 0; i < numPages; i++) {
ffffffff8000aad4:	49 39 dc             	cmp    %rbx,%r12
ffffffff8000aad7:	74 27                	je     ffffffff8000ab00 <_ZN9WinServer6ResizeEiimiiRmS0_+0x150>
                void* page = Memory::g_pfa->AllocateZeroed();
ffffffff8000aad9:	48 8b 3d d0 1e 14 00 	mov    0x141ed0(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff8000aae0:	e8 2b 07 01 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
                if (page == nullptr) return -1;
ffffffff8000aae5:	48 85 c0             	test   %rax,%rax
ffffffff8000aae8:	75 c6                	jne    ffffffff8000aab0 <_ZN9WinServer6ResizeEiimiiRmS0_+0x100>
        slot.desktopVa[1] = 0;
        slot.desktopPid = 0;

        outVa = slot.ownerVa[1]; // back buffer
        return 0;
    }
ffffffff8000aaea:	48 83 c4 48          	add    $0x48,%rsp
        if (windowId < 0 || windowId >= MaxWindows) return -1;
ffffffff8000aaee:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
    }
ffffffff8000aaf3:	5b                   	pop    %rbx
ffffffff8000aaf4:	41 5c                	pop    %r12
ffffffff8000aaf6:	41 5d                	pop    %r13
ffffffff8000aaf8:	41 5e                	pop    %r14
ffffffff8000aafa:	41 5f                	pop    %r15
ffffffff8000aafc:	5d                   	pop    %rbp
ffffffff8000aafd:	c3                   	ret
ffffffff8000aafe:	66 90                	xchg   %ax,%ax
ffffffff8000ab00:	4c 89 f8             	mov    %r15,%rax
ffffffff8000ab03:	48 8b 55 b8          	mov    -0x48(%rbp),%rdx
ffffffff8000ab07:	44 8b 55 ac          	mov    -0x54(%rbp),%r10d
ffffffff8000ab0b:	4c 8b 45 a0          	mov    -0x60(%rbp),%r8
ffffffff8000ab0f:	48 8b 7d 98          	mov    -0x68(%rbp),%rdi
ffffffff8000ab13:	4c 8b 4d 90          	mov    -0x70(%rbp),%r9
ffffffff8000ab17:	4c 8b 7d b0          	mov    -0x50(%rbp),%r15
            slot.ownerVa[b] = va;
ffffffff8000ab1b:	4e 89 bc c0 b8 b5 10 	mov    %r15,-0x7fef4a48(%rax,%r8,8)
ffffffff8000ab22:	80 
            heapNext += (uint64_t)numPages * 0x1000;
ffffffff8000ab23:	4d 63 fa             	movslq %r10d,%r15
ffffffff8000ab26:	49 8d 70 01          	lea    0x1(%r8),%rsi
        for (int b = 0; b < 2; b++) {
ffffffff8000ab2a:	48 81 c7 00 40 00 00 	add    $0x4000,%rdi
            heapNext += (uint64_t)numPages * 0x1000;
ffffffff8000ab31:	49 c1 e7 0c          	shl    $0xc,%r15
ffffffff8000ab35:	4d 03 39             	add    (%r9),%r15
ffffffff8000ab38:	41 b8 01 00 00 00    	mov    $0x1,%r8d
ffffffff8000ab3e:	4d 89 39             	mov    %r15,(%r9)
        for (int b = 0; b < 2; b++) {
ffffffff8000ab41:	48 83 fe 02          	cmp    $0x2,%rsi
ffffffff8000ab45:	0f 85 22 ff ff ff    	jne    ffffffff8000aa6d <_ZN9WinServer6ResizeEiimiiRmS0_+0xbd>
        slot.width = newW;
ffffffff8000ab4b:	48 8b 5d c0          	mov    -0x40(%rbp),%rbx
ffffffff8000ab4f:	44 8b 7d cc          	mov    -0x34(%rbp),%r15d
ffffffff8000ab53:	44 8b 6d c8          	mov    -0x38(%rbp),%r13d
ffffffff8000ab57:	48 69 db 88 85 00 00 	imul   $0x8588,%rbx,%rbx
ffffffff8000ab5e:	44 89 bb a8 35 10 80 	mov    %r15d,-0x7fefca58(%rbx)
        outVa = slot.ownerVa[1]; // back buffer
ffffffff8000ab65:	48 8b 83 c0 b5 10 80 	mov    -0x7fef4a40(%rbx),%rax
        slot.height = newH;
ffffffff8000ab6c:	44 89 ab ac 35 10 80 	mov    %r13d,-0x7fefca54(%rbx)
        slot.pixelNumPages = numPages;
ffffffff8000ab73:	89 93 b4 b5 10 80    	mov    %edx,-0x7fef4a4c(%rbx)
        slot.desktopVa[0] = 0;
ffffffff8000ab79:	48 c7 83 c8 b5 10 80 	movq   $0x0,-0x7fef4a38(%rbx)
ffffffff8000ab80:	00 00 00 00 
        slot.desktopVa[1] = 0;
ffffffff8000ab84:	48 c7 83 d0 b5 10 80 	movq   $0x0,-0x7fef4a30(%rbx)
ffffffff8000ab8b:	00 00 00 00 
        slot.desktopPid = 0;
ffffffff8000ab8f:	c7 83 d8 b5 10 80 00 	movl   $0x0,-0x7fef4a28(%rbx)
ffffffff8000ab96:	00 00 00 
            outVa = slot.ownerVa[1 - slot.frontIdx];
ffffffff8000ab99:	48 8b 55 10          	mov    0x10(%rbp),%rdx
ffffffff8000ab9d:	48 89 02             	mov    %rax,(%rdx)
    }
ffffffff8000aba0:	48 83 c4 48          	add    $0x48,%rsp
            return 0;
ffffffff8000aba4:	31 c0                	xor    %eax,%eax
    }
ffffffff8000aba6:	5b                   	pop    %rbx
ffffffff8000aba7:	41 5c                	pop    %r12
ffffffff8000aba9:	41 5d                	pop    %r13
ffffffff8000abab:	41 5e                	pop    %r14
ffffffff8000abad:	41 5f                	pop    %r15
ffffffff8000abaf:	5d                   	pop    %rbp
ffffffff8000abb0:	c3                   	ret
ffffffff8000abb1:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        if (newW == slot.width && newH == slot.height) {
ffffffff8000abb8:	44 39 81 ac 35 10 80 	cmp    %r8d,-0x7fefca54(%rcx)
ffffffff8000abbf:	0f 85 50 fe ff ff    	jne    ffffffff8000aa15 <_ZN9WinServer6ResizeEiimiiRmS0_+0x65>
            outVa = slot.ownerVa[1 - slot.frontIdx];
ffffffff8000abc5:	48 69 db b1 10 00 00 	imul   $0x10b1,%rbx,%rbx
ffffffff8000abcc:	b8 01 00 00 00       	mov    $0x1,%eax
ffffffff8000abd1:	2b 81 b0 b5 10 80    	sub    -0x7fef4a50(%rcx),%eax
ffffffff8000abd7:	48 98                	cltq
ffffffff8000abd9:	48 8d 84 18 0a 10 00 	lea    0x100a(%rax,%rbx,1),%rax
ffffffff8000abe0:	00 
ffffffff8000abe1:	48 8b 04 c5 68 35 10 	mov    -0x7fefca98(,%rax,8),%rax
ffffffff8000abe8:	80 
            return 0;
ffffffff8000abe9:	eb ae                	jmp    ffffffff8000ab99 <_ZN9WinServer6ResizeEiimiiRmS0_+0x1e9>
ffffffff8000abeb:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000abf2:	00 00 00 
ffffffff8000abf5:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000abfc:	00 00 00 
ffffffff8000abff:	90                   	nop

ffffffff8000ac00 <_ZN9WinServer8SetScaleEi>:

    int SetScale(int scale) {
ffffffff8000ac00:	55                   	push   %rbp
        if (scale < 0) scale = 0;
        if (scale > 2) scale = 2;
ffffffff8000ac01:	b8 02 00 00 00       	mov    $0x2,%eax
        g_uiScale = scale;

        // Broadcast scale event to all active windows
        Zenith::WinEvent ev;
        memset(&ev, 0, sizeof(ev));
ffffffff8000ac06:	ba 14 00 00 00       	mov    $0x14,%edx
    int SetScale(int scale) {
ffffffff8000ac0b:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000ac0e:	41 54                	push   %r12
ffffffff8000ac10:	53                   	push   %rbx
        memset(&ev, 0, sizeof(ev));
ffffffff8000ac11:	4c 8d 65 dc          	lea    -0x24(%rbp),%r12
    int SetScale(int scale) {
ffffffff8000ac15:	48 83 ec 20          	sub    $0x20,%rsp
        if (scale > 2) scale = 2;
ffffffff8000ac19:	39 c7                	cmp    %eax,%edi
ffffffff8000ac1b:	0f 4e c7             	cmovle %edi,%eax
        memset(&ev, 0, sizeof(ev));
ffffffff8000ac1e:	4c 89 e7             	mov    %r12,%rdi
        if (scale > 2) scale = 2;
ffffffff8000ac21:	89 c3                	mov    %eax,%ebx
        if (scale < 0) scale = 0;
ffffffff8000ac23:	31 c0                	xor    %eax,%eax
ffffffff8000ac25:	85 db                	test   %ebx,%ebx
ffffffff8000ac27:	0f 48 d8             	cmovs  %eax,%ebx
        memset(&ev, 0, sizeof(ev));
ffffffff8000ac2a:	31 f6                	xor    %esi,%esi
        g_uiScale = scale;
ffffffff8000ac2c:	89 1d ce 33 02 00    	mov    %ebx,0x233ce(%rip)        # ffffffff8002e000 <_ZN9WinServerL9g_uiScaleE>
        memset(&ev, 0, sizeof(ev));
ffffffff8000ac32:	e8 e9 f5 00 00       	call   ffffffff8001a220 <memset>
        ev.type = 4;
ffffffff8000ac37:	c6 45 dc 04          	movb   $0x4,-0x24(%rbp)
        ev.scale.scale = scale;
ffffffff8000ac3b:	49 c7 c1 60 35 10 80 	mov    $0xffffffff80103560,%r9
        for (int i = 0; i < MaxWindows; i++) {
ffffffff8000ac42:	45 31 c0             	xor    %r8d,%r8d
        ev.scale.scale = scale;
ffffffff8000ac45:	89 5d e0             	mov    %ebx,-0x20(%rbp)
        for (int i = 0; i < MaxWindows; i++) {
ffffffff8000ac48:	eb 27                	jmp    ffffffff8000ac71 <_ZN9WinServer8SetScaleEi+0x71>
ffffffff8000ac4a:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000ac51:	00 00 00 00 
ffffffff8000ac55:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000ac5c:	00 00 00 00 
ffffffff8000ac60:	41 83 c0 01          	add    $0x1,%r8d
ffffffff8000ac64:	49 81 c1 88 85 00 00 	add    $0x8588,%r9
ffffffff8000ac6b:	41 83 f8 08          	cmp    $0x8,%r8d
ffffffff8000ac6f:	74 17                	je     ffffffff8000ac88 <_ZN9WinServer8SetScaleEi+0x88>
            if (g_slots[i].used) {
ffffffff8000ac71:	41 80 39 00          	cmpb   $0x0,(%r9)
ffffffff8000ac75:	74 e9                	je     ffffffff8000ac60 <_ZN9WinServer8SetScaleEi+0x60>
                SendEvent(i, &ev);
ffffffff8000ac77:	4c 89 e6             	mov    %r12,%rsi
ffffffff8000ac7a:	44 89 c7             	mov    %r8d,%edi
ffffffff8000ac7d:	e8 ae fc ff ff       	call   ffffffff8000a930 <_ZN9WinServer9SendEventEiPKN6Zenith8WinEventE>
ffffffff8000ac82:	eb dc                	jmp    ffffffff8000ac60 <_ZN9WinServer8SetScaleEi+0x60>
ffffffff8000ac84:	0f 1f 40 00          	nopl   0x0(%rax)
            }
        }
        return 0;
    }
ffffffff8000ac88:	48 83 c4 20          	add    $0x20,%rsp
ffffffff8000ac8c:	31 c0                	xor    %eax,%eax
ffffffff8000ac8e:	5b                   	pop    %rbx
ffffffff8000ac8f:	41 5c                	pop    %r12
ffffffff8000ac91:	5d                   	pop    %rbp
ffffffff8000ac92:	c3                   	ret
ffffffff8000ac93:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000ac9a:	00 00 00 
ffffffff8000ac9d:	0f 1f 00             	nopl   (%rax)

ffffffff8000aca0 <_ZN9WinServer8GetScaleEv>:

    int GetScale() {
        return g_uiScale;
    }
ffffffff8000aca0:	8b 05 5a 33 02 00    	mov    0x2335a(%rip),%eax        # ffffffff8002e000 <_ZN9WinServerL9g_uiScaleE>
ffffffff8000aca6:	c3                   	ret
ffffffff8000aca7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8000acae:	00 00 

ffffffff8000acb0 <_ZN9WinServer14CleanupProcessEi>:

    void CleanupProcess(int pid) {
ffffffff8000acb0:	55                   	push   %rbp
ffffffff8000acb1:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000acb4:	41 55                	push   %r13
ffffffff8000acb6:	41 89 fd             	mov    %edi,%r13d
ffffffff8000acb9:	41 54                	push   %r12
        for (int i = 0; i < MaxWindows; i++) {
ffffffff8000acbb:	45 31 e4             	xor    %r12d,%r12d
    void CleanupProcess(int pid) {
ffffffff8000acbe:	53                   	push   %rbx
ffffffff8000acbf:	48 c7 c3 60 35 10 80 	mov    $0xffffffff80103560,%rbx
ffffffff8000acc6:	48 83 ec 08          	sub    $0x8,%rsp
ffffffff8000acca:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            if (g_slots[i].used && g_slots[i].ownerPid == pid) {
ffffffff8000acd0:	80 3b 00             	cmpb   $0x0,(%rbx)
ffffffff8000acd3:	74 06                	je     ffffffff8000acdb <_ZN9WinServer14CleanupProcessEi+0x2b>
ffffffff8000acd5:	44 39 6b 04          	cmp    %r13d,0x4(%rbx)
ffffffff8000acd9:	74 25                	je     ffffffff8000ad00 <_ZN9WinServer14CleanupProcessEi+0x50>
        for (int i = 0; i < MaxWindows; i++) {
ffffffff8000acdb:	41 83 c4 01          	add    $0x1,%r12d
ffffffff8000acdf:	48 81 c3 88 85 00 00 	add    $0x8588,%rbx
ffffffff8000ace6:	41 83 fc 08          	cmp    $0x8,%r12d
ffffffff8000acea:	75 e4                	jne    ffffffff8000acd0 <_ZN9WinServer14CleanupProcessEi+0x20>
                Kt::KernelLogStream(Kt::INFO, "WinServer") << "Cleaning up window "
                    << i << " for exited PID " << pid;
                g_slots[i].used = false;
            }
        }
    }
ffffffff8000acec:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8000acf0:	5b                   	pop    %rbx
ffffffff8000acf1:	41 5c                	pop    %r12
ffffffff8000acf3:	41 5d                	pop    %r13
ffffffff8000acf5:	5d                   	pop    %rbp
ffffffff8000acf6:	c3                   	ret
ffffffff8000acf7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8000acfe:	00 00 
            Print(string);
ffffffff8000ad00:	48 c7 c7 78 a4 02 80 	mov    $0xffffffff8002a478,%rdi
            g_kernelLogDepth++;
ffffffff8000ad07:	83 05 96 47 1d 00 01 	addl   $0x1,0x1d4796(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000ad0e:	e8 ad 84 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ad13:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000ad1a:	e8 a1 84 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ad1f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000ad26:	e8 95 84 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ad2b:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000ad32:	e8 89 84 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ad37:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000ad3e:	e8 7d 84 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ad43:	48 c7 c7 9d a4 02 80 	mov    $0xffffffff8002a49d,%rdi
ffffffff8000ad4a:	e8 71 84 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::int2basestr(number, t.streamBaseType));
ffffffff8000ad4f:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000ad54:	44 89 e7             	mov    %r12d,%edi
ffffffff8000ad57:	e8 24 f6 00 00       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
ffffffff8000ad5c:	48 89 c7             	mov    %rax,%rdi
ffffffff8000ad5f:	e8 5c 84 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000ad64:	48 c7 c7 b1 a4 02 80 	mov    $0xffffffff8002a4b1,%rdi
ffffffff8000ad6b:	e8 50 84 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::int2basestr(number, t.streamBaseType));
ffffffff8000ad70:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000ad75:	44 89 ef             	mov    %r13d,%edi
ffffffff8000ad78:	e8 03 f6 00 00       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
ffffffff8000ad7d:	48 89 c7             	mov    %rax,%rdi
ffffffff8000ad80:	e8 3b 84 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000ad85:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000ad8c:	e8 2f 84 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000ad91:	83 2d 0c 47 1d 00 01 	subl   $0x1,0x1d470c(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
                g_slots[i].used = false;
ffffffff8000ad98:	c6 03 00             	movb   $0x0,(%rbx)
ffffffff8000ad9b:	e9 3b ff ff ff       	jmp    ffffffff8000acdb <_ZN9WinServer14CleanupProcessEi+0x2b>

ffffffff8000ada0 <_ZN2KtlsIPKcEERNS_17KernelErrorStreamES4_T_>:
{
    class KernelErrorStream
    {
    public:
        template <typename T>
        friend KernelErrorStream &operator<<(KernelErrorStream &t, T value)
ffffffff8000ada0:	55                   	push   %rbp
ffffffff8000ada1:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000ada4:	41 54                	push   %r12
ffffffff8000ada6:	49 89 f4             	mov    %rsi,%r12
ffffffff8000ada9:	53                   	push   %rbx
ffffffff8000adaa:	48 89 fb             	mov    %rdi,%rbx
            Print(string);
ffffffff8000adad:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000adb4:	e8 07 84 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000adb9:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000adbc:	e8 ff 83 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000adc1:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000adc8:	e8 f3 83 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        {
            kout << "\e[0;31m" << value << "\e[0m";

            return t;
        }
ffffffff8000adcd:	48 89 d8             	mov    %rbx,%rax
ffffffff8000add0:	5b                   	pop    %rbx
ffffffff8000add1:	41 5c                	pop    %r12
ffffffff8000add3:	5d                   	pop    %rbp
ffffffff8000add4:	c3                   	ret
ffffffff8000add5:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000addc:	00 00 00 
ffffffff8000addf:	90                   	nop

ffffffff8000ade0 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_>:
#define BOXUI_BR                "┘"

constexpr int BOXUI_LABEL_WIDTH = 28;

// Print a boxed line with padding and optional bold
inline void PrintBoxedLine(auto& out, const char* content, int width, bool bold = false, const char* bg = nullptr) {
ffffffff8000ade0:	55                   	push   %rbp
            Print(string);
ffffffff8000ade1:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000ade8:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000adeb:	41 57                	push   %r15
ffffffff8000aded:	41 56                	push   %r14
ffffffff8000adef:	41 89 ce             	mov    %ecx,%r14d
ffffffff8000adf2:	41 55                	push   %r13
ffffffff8000adf4:	41 54                	push   %r12
ffffffff8000adf6:	49 89 f4             	mov    %rsi,%r12
ffffffff8000adf9:	53                   	push   %rbx
ffffffff8000adfa:	48 83 ec 18          	sub    $0x18,%rsp
ffffffff8000adfe:	89 55 cc             	mov    %edx,-0x34(%rbp)
ffffffff8000ae01:	4c 89 45 c0          	mov    %r8,-0x40(%rbp)
ffffffff8000ae05:	e8 b6 83 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ae0a:	48 c7 c7 c2 a4 02 80 	mov    $0xffffffff8002a4c2,%rdi
ffffffff8000ae11:	e8 aa 83 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ae16:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000ae1d:	e8 9e 83 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ae22:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000ae29:	e8 92 83 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ae2e:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000ae35:	e8 86 83 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ae3a:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000ae41:	e8 7a 83 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    out << BOXUI_V << " ";
    int len = 0;
    if (bold) out << BOXUI_ANSI_BOLD;
ffffffff8000ae46:	45 84 f6             	test   %r14b,%r14b
ffffffff8000ae49:	0f 85 21 01 00 00    	jne    ffffffff8000af70 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_+0x190>
    for (const char* p = content; *p && len < width - 6; ++p, ++len) out << *p;
ffffffff8000ae4f:	45 0f b6 3c 24       	movzbl (%r12),%r15d
ffffffff8000ae54:	31 db                	xor    %ebx,%ebx
ffffffff8000ae56:	45 84 ff             	test   %r15b,%r15b
ffffffff8000ae59:	74 55                	je     ffffffff8000aeb0 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_+0xd0>
ffffffff8000ae5b:	8b 45 cc             	mov    -0x34(%rbp),%eax
ffffffff8000ae5e:	31 db                	xor    %ebx,%ebx
ffffffff8000ae60:	44 8d 68 fa          	lea    -0x6(%rax),%r13d
ffffffff8000ae64:	eb 3c                	jmp    ffffffff8000aea2 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_+0xc2>
ffffffff8000ae66:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000ae6d:	00 00 00 
ffffffff8000ae70:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000ae77:	49 83 c4 01          	add    $0x1,%r12
ffffffff8000ae7b:	83 c3 01             	add    $0x1,%ebx
ffffffff8000ae7e:	e8 3d 83 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Putchar(chr);
ffffffff8000ae83:	41 0f be ff          	movsbl %r15b,%edi
ffffffff8000ae87:	e8 54 80 01 00       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
            Print(string);
ffffffff8000ae8c:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000ae93:	e8 28 83 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ae98:	45 0f b6 3c 24       	movzbl (%r12),%r15d
ffffffff8000ae9d:	45 84 ff             	test   %r15b,%r15b
ffffffff8000aea0:	74 05                	je     ffffffff8000aea7 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_+0xc7>
ffffffff8000aea2:	44 39 eb             	cmp    %r13d,%ebx
ffffffff8000aea5:	7c c9                	jl     ffffffff8000ae70 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_+0x90>
    if (bold) {
ffffffff8000aea7:	45 84 f6             	test   %r14b,%r14b
ffffffff8000aeaa:	0f 85 00 01 00 00    	jne    ffffffff8000afb0 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_+0x1d0>
        out << BOXUI_ANSI_RESET;
        if (bg) out << bg << BOXUI_ANSI_WHITE_FG;
    }
    for (int i = len; i < width - 4; ++i) out << " ";
ffffffff8000aeb0:	44 8b 65 cc          	mov    -0x34(%rbp),%r12d
ffffffff8000aeb4:	41 83 ec 04          	sub    $0x4,%r12d
ffffffff8000aeb8:	41 39 dc             	cmp    %ebx,%r12d
ffffffff8000aebb:	7e 2f                	jle    ffffffff8000aeec <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_+0x10c>
ffffffff8000aebd:	0f 1f 00             	nopl   (%rax)
ffffffff8000aec0:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000aec7:	83 c3 01             	add    $0x1,%ebx
ffffffff8000aeca:	e8 f1 82 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000aecf:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000aed6:	e8 e5 82 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000aedb:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000aee2:	e8 d9 82 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000aee7:	44 39 e3             	cmp    %r12d,%ebx
ffffffff8000aeea:	75 d4                	jne    ffffffff8000aec0 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_+0xe0>
ffffffff8000aeec:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000aef3:	e8 c8 82 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000aef8:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000aeff:	e8 bc 82 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000af04:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000af0b:	e8 b0 82 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000af10:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000af17:	e8 a4 82 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000af1c:	48 c7 c7 c2 a4 02 80 	mov    $0xffffffff8002a4c2,%rdi
ffffffff8000af23:	e8 98 82 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000af28:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000af2f:	e8 8c 82 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000af34:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000af3b:	e8 80 82 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000af40:	48 c7 c7 e6 c0 02 80 	mov    $0xffffffff8002c0e6,%rdi
ffffffff8000af47:	e8 74 82 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    out << " " << BOXUI_V << "\n";
}
ffffffff8000af4c:	48 83 c4 18          	add    $0x18,%rsp
ffffffff8000af50:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000af57:	5b                   	pop    %rbx
ffffffff8000af58:	41 5c                	pop    %r12
ffffffff8000af5a:	41 5d                	pop    %r13
ffffffff8000af5c:	41 5e                	pop    %r14
ffffffff8000af5e:	41 5f                	pop    %r15
ffffffff8000af60:	5d                   	pop    %rbp
ffffffff8000af61:	e9 5a 82 01 00       	jmp    ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000af66:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000af6d:	00 00 00 
ffffffff8000af70:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000af77:	e8 44 82 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000af7c:	48 c7 c7 c6 a4 02 80 	mov    $0xffffffff8002a4c6,%rdi
ffffffff8000af83:	e8 38 82 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000af88:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000af8f:	e8 2c 82 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    for (const char* p = content; *p && len < width - 6; ++p, ++len) out << *p;
ffffffff8000af94:	45 0f b6 3c 24       	movzbl (%r12),%r15d
ffffffff8000af99:	45 84 ff             	test   %r15b,%r15b
ffffffff8000af9c:	0f 85 b9 fe ff ff    	jne    ffffffff8000ae5b <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_+0x7b>
ffffffff8000afa2:	31 db                	xor    %ebx,%ebx
ffffffff8000afa4:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000afab:	00 00 00 00 
ffffffff8000afaf:	90                   	nop
ffffffff8000afb0:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000afb7:	e8 04 82 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000afbc:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000afc3:	e8 f8 81 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000afc8:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000afcf:	e8 ec 81 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        if (bg) out << bg << BOXUI_ANSI_WHITE_FG;
ffffffff8000afd4:	4c 8b 75 c0          	mov    -0x40(%rbp),%r14
ffffffff8000afd8:	4d 85 f6             	test   %r14,%r14
ffffffff8000afdb:	0f 84 cf fe ff ff    	je     ffffffff8000aeb0 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_+0xd0>
ffffffff8000afe1:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000afe8:	e8 d3 81 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000afed:	4c 89 f7             	mov    %r14,%rdi
ffffffff8000aff0:	e8 cb 81 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000aff5:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000affc:	e8 bf 81 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b001:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b008:	e8 b3 81 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b00d:	48 c7 c7 cb a4 02 80 	mov    $0xffffffff8002a4cb,%rdi
ffffffff8000b014:	e8 a7 81 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b019:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b020:	e8 9b 81 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            return t;
ffffffff8000b025:	e9 86 fe ff ff       	jmp    ffffffff8000aeb0 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_+0xd0>
ffffffff8000b02a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)

ffffffff8000b030 <_Z19PrintBoxedSeparatorIN2Kt17KernelErrorStreamEEvRT_i>:

// Print a boxed separator line
inline void PrintBoxedSeparator(auto& out, int width) {
ffffffff8000b030:	55                   	push   %rbp
            Print(string);
ffffffff8000b031:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b038:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000b03b:	41 54                	push   %r12
ffffffff8000b03d:	41 89 f4             	mov    %esi,%r12d
ffffffff8000b040:	53                   	push   %rbx
ffffffff8000b041:	e8 7a 81 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b046:	48 c7 c7 c2 a4 02 80 	mov    $0xffffffff8002a4c2,%rdi
ffffffff8000b04d:	e8 6e 81 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b052:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b059:	e8 62 81 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b05e:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b065:	e8 56 81 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b06a:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000b071:	e8 4a 81 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b076:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b07d:	e8 3e 81 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    out << BOXUI_V << " ";
    for (int i = 0; i < width - 4; ++i) out << BOXUI_H;
ffffffff8000b082:	41 83 fc 04          	cmp    $0x4,%r12d
ffffffff8000b086:	7e 34                	jle    ffffffff8000b0bc <_Z19PrintBoxedSeparatorIN2Kt17KernelErrorStreamEEvRT_i+0x8c>
ffffffff8000b088:	41 83 ec 04          	sub    $0x4,%r12d
ffffffff8000b08c:	31 db                	xor    %ebx,%ebx
ffffffff8000b08e:	66 90                	xchg   %ax,%ax
ffffffff8000b090:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b097:	83 c3 01             	add    $0x1,%ebx
ffffffff8000b09a:	e8 21 81 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b09f:	48 c7 c7 d1 a4 02 80 	mov    $0xffffffff8002a4d1,%rdi
ffffffff8000b0a6:	e8 15 81 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b0ab:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b0b2:	e8 09 81 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b0b7:	41 39 dc             	cmp    %ebx,%r12d
ffffffff8000b0ba:	75 d4                	jne    ffffffff8000b090 <_Z19PrintBoxedSeparatorIN2Kt17KernelErrorStreamEEvRT_i+0x60>
ffffffff8000b0bc:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b0c3:	e8 f8 80 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b0c8:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000b0cf:	e8 ec 80 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b0d4:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b0db:	e8 e0 80 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b0e0:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b0e7:	e8 d4 80 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b0ec:	48 c7 c7 c2 a4 02 80 	mov    $0xffffffff8002a4c2,%rdi
ffffffff8000b0f3:	e8 c8 80 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b0f8:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b0ff:	e8 bc 80 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b104:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b10b:	e8 b0 80 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b110:	48 c7 c7 e6 c0 02 80 	mov    $0xffffffff8002c0e6,%rdi
ffffffff8000b117:	e8 a4 80 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    out << " " << BOXUI_V << "\n";
}
ffffffff8000b11c:	5b                   	pop    %rbx
ffffffff8000b11d:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b124:	41 5c                	pop    %r12
ffffffff8000b126:	5d                   	pop    %rbp
ffffffff8000b127:	e9 94 80 01 00       	jmp    ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b12c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8000b130 <_Z13PrintBoxedHexIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i>:

// Print a boxed line with a label and a hex value, aligned
template<typename T>
inline void PrintBoxedHex(auto& out, const char* label, T value, int width) {
ffffffff8000b130:	55                   	push   %rbp
ffffffff8000b131:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b138:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000b13b:	41 57                	push   %r15
ffffffff8000b13d:	49 89 f7             	mov    %rsi,%r15
ffffffff8000b140:	41 56                	push   %r14
ffffffff8000b142:	41 89 d6             	mov    %edx,%r14d
ffffffff8000b145:	41 55                	push   %r13
ffffffff8000b147:	41 89 cd             	mov    %ecx,%r13d
ffffffff8000b14a:	41 54                	push   %r12
    out << BOXUI_V << " ";
    int len = 0;
ffffffff8000b14c:	45 31 e4             	xor    %r12d,%r12d
inline void PrintBoxedHex(auto& out, const char* label, T value, int width) {
ffffffff8000b14f:	53                   	push   %rbx
ffffffff8000b150:	48 83 ec 08          	sub    $0x8,%rsp
ffffffff8000b154:	e8 67 80 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b159:	48 c7 c7 c2 a4 02 80 	mov    $0xffffffff8002a4c2,%rdi
ffffffff8000b160:	e8 5b 80 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b165:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b16c:	e8 4f 80 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b171:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b178:	e8 43 80 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b17d:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000b184:	e8 37 80 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b189:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b190:	e8 2b 80 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    for (const char* p = label; *p; ++p, ++len) out << *p;
ffffffff8000b195:	41 0f b6 1f          	movzbl (%r15),%ebx
ffffffff8000b199:	84 db                	test   %bl,%bl
ffffffff8000b19b:	74 43                	je     ffffffff8000b1e0 <_Z13PrintBoxedHexIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0xb0>
ffffffff8000b19d:	0f 1f 00             	nopl   (%rax)
ffffffff8000b1a0:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b1a7:	49 83 c7 01          	add    $0x1,%r15
ffffffff8000b1ab:	41 83 c4 01          	add    $0x1,%r12d
ffffffff8000b1af:	e8 0c 80 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Putchar(chr);
ffffffff8000b1b4:	0f be fb             	movsbl %bl,%edi
ffffffff8000b1b7:	e8 24 7d 01 00       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
            Print(string);
ffffffff8000b1bc:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b1c3:	e8 f8 7f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b1c8:	41 0f b6 1f          	movzbl (%r15),%ebx
ffffffff8000b1cc:	84 db                	test   %bl,%bl
ffffffff8000b1ce:	75 d0                	jne    ffffffff8000b1a0 <_Z13PrintBoxedHexIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x70>
    for (; len < BOXUI_LABEL_WIDTH; ++len) out << " ";
ffffffff8000b1d0:	41 83 fc 1b          	cmp    $0x1b,%r12d
ffffffff8000b1d4:	7f 38                	jg     ffffffff8000b20e <_Z13PrintBoxedHexIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0xde>
ffffffff8000b1d6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000b1dd:	00 00 00 
ffffffff8000b1e0:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b1e7:	41 83 c4 01          	add    $0x1,%r12d
ffffffff8000b1eb:	e8 d0 7f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b1f0:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000b1f7:	e8 c4 7f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b1fc:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b203:	e8 b8 7f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b208:	41 83 fc 1c          	cmp    $0x1c,%r12d
ffffffff8000b20c:	75 d2                	jne    ffffffff8000b1e0 <_Z13PrintBoxedHexIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0xb0>
ffffffff8000b20e:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
    len += 4 + (BOXUI_LABEL_WIDTH - len);
    bool started = false;
    int hexLen = 0;
    for (int i = (sizeof(T) * 2) - 1; i >= 0; --i) {
        char c = ((value >> (i * 4)) & 0xF);
        if (c || started || i == 0) {
ffffffff8000b215:	bb 21 00 00 00       	mov    $0x21,%ebx
ffffffff8000b21a:	e8 a1 7f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b21f:	48 c7 c7 d5 a4 02 80 	mov    $0xffffffff8002a4d5,%rdi
ffffffff8000b226:	e8 95 7f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b22b:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b232:	e8 89 7f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        char c = ((value >> (i * 4)) & 0xF);
ffffffff8000b237:	41 0f b6 c6          	movzbl %r14b,%eax
        if (c || started || i == 0) {
ffffffff8000b23b:	c1 f8 04             	sar    $0x4,%eax
ffffffff8000b23e:	74 31                	je     ffffffff8000b271 <_Z13PrintBoxedHexIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x141>
            started = true;
            out << (char)(c < 10 ? '0' + c : 'A' + (c - 10));
ffffffff8000b240:	8d 50 37             	lea    0x37(%rax),%edx
ffffffff8000b243:	8d 58 30             	lea    0x30(%rax),%ebx
ffffffff8000b246:	83 f8 0a             	cmp    $0xa,%eax
ffffffff8000b249:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b250:	0f 4d da             	cmovge %edx,%ebx
ffffffff8000b253:	e8 68 7f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Putchar(chr);
ffffffff8000b258:	0f b6 fb             	movzbl %bl,%edi
            Print(string);
ffffffff8000b25b:	bb 22 00 00 00       	mov    $0x22,%ebx
            Putchar(chr);
ffffffff8000b260:	e8 7b 7c 01 00       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
            Print(string);
ffffffff8000b265:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b26c:	e8 4f 7f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    for (int i = (sizeof(T) * 2) - 1; i >= 0; --i) {
ffffffff8000b271:	41 83 e6 0f          	and    $0xf,%r14d
ffffffff8000b275:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
            out << (char)(c < 10 ? '0' + c : 'A' + (c - 10));
ffffffff8000b27c:	41 80 fe 0a          	cmp    $0xa,%r14b
ffffffff8000b280:	41 8d 46 37          	lea    0x37(%r14),%eax
ffffffff8000b284:	45 8d 66 30          	lea    0x30(%r14),%r12d
ffffffff8000b288:	44 0f 43 e0          	cmovae %eax,%r12d
            ++hexLen;
        }
    }
    len += hexLen;
    for (int i = len; i < width - 4; ++i) out << " ";
ffffffff8000b28c:	41 83 ed 04          	sub    $0x4,%r13d
ffffffff8000b290:	e8 2b 7f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Putchar(chr);
ffffffff8000b295:	41 0f b6 fc          	movzbl %r12b,%edi
ffffffff8000b299:	e8 42 7c 01 00       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
            Print(string);
ffffffff8000b29e:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b2a5:	e8 16 7f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b2aa:	44 39 eb             	cmp    %r13d,%ebx
ffffffff8000b2ad:	7d 2d                	jge    ffffffff8000b2dc <_Z13PrintBoxedHexIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x1ac>
ffffffff8000b2af:	90                   	nop
ffffffff8000b2b0:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b2b7:	83 c3 01             	add    $0x1,%ebx
ffffffff8000b2ba:	e8 01 7f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b2bf:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000b2c6:	e8 f5 7e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b2cb:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b2d2:	e8 e9 7e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b2d7:	44 39 eb             	cmp    %r13d,%ebx
ffffffff8000b2da:	75 d4                	jne    ffffffff8000b2b0 <_Z13PrintBoxedHexIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x180>
ffffffff8000b2dc:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b2e3:	e8 d8 7e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b2e8:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000b2ef:	e8 cc 7e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b2f4:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b2fb:	e8 c0 7e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b300:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b307:	e8 b4 7e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b30c:	48 c7 c7 c2 a4 02 80 	mov    $0xffffffff8002a4c2,%rdi
ffffffff8000b313:	e8 a8 7e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b318:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b31f:	e8 9c 7e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b324:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b32b:	e8 90 7e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b330:	48 c7 c7 e6 c0 02 80 	mov    $0xffffffff8002c0e6,%rdi
ffffffff8000b337:	e8 84 7e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    out << " " << BOXUI_V << "\n";
}
ffffffff8000b33c:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8000b340:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b347:	5b                   	pop    %rbx
ffffffff8000b348:	41 5c                	pop    %r12
ffffffff8000b34a:	41 5d                	pop    %r13
ffffffff8000b34c:	41 5e                	pop    %r14
ffffffff8000b34e:	41 5f                	pop    %r15
ffffffff8000b350:	5d                   	pop    %rbp
ffffffff8000b351:	e9 6a 7e 01 00       	jmp    ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b356:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000b35d:	00 00 00 

ffffffff8000b360 <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i>:
inline void PrintBoxedHex(auto& out, const char* label, T value, int width) {
ffffffff8000b360:	55                   	push   %rbp
ffffffff8000b361:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b368:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000b36b:	41 57                	push   %r15
ffffffff8000b36d:	49 89 f7             	mov    %rsi,%r15
ffffffff8000b370:	41 56                	push   %r14
    int len = 0;
ffffffff8000b372:	45 31 f6             	xor    %r14d,%r14d
inline void PrintBoxedHex(auto& out, const char* label, T value, int width) {
ffffffff8000b375:	41 55                	push   %r13
ffffffff8000b377:	41 54                	push   %r12
ffffffff8000b379:	41 89 cc             	mov    %ecx,%r12d
ffffffff8000b37c:	53                   	push   %rbx
ffffffff8000b37d:	48 89 d3             	mov    %rdx,%rbx
ffffffff8000b380:	48 83 ec 08          	sub    $0x8,%rsp
ffffffff8000b384:	e8 37 7e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b389:	48 c7 c7 c2 a4 02 80 	mov    $0xffffffff8002a4c2,%rdi
ffffffff8000b390:	e8 2b 7e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b395:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b39c:	e8 1f 7e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b3a1:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b3a8:	e8 13 7e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b3ad:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000b3b4:	e8 07 7e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b3b9:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b3c0:	e8 fb 7d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    for (const char* p = label; *p; ++p, ++len) out << *p;
ffffffff8000b3c5:	45 0f b6 2f          	movzbl (%r15),%r13d
ffffffff8000b3c9:	45 84 ed             	test   %r13b,%r13b
ffffffff8000b3cc:	74 42                	je     ffffffff8000b410 <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0xb0>
ffffffff8000b3ce:	66 90                	xchg   %ax,%ax
ffffffff8000b3d0:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b3d7:	49 83 c7 01          	add    $0x1,%r15
ffffffff8000b3db:	41 83 c6 01          	add    $0x1,%r14d
ffffffff8000b3df:	e8 dc 7d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Putchar(chr);
ffffffff8000b3e4:	41 0f be fd          	movsbl %r13b,%edi
ffffffff8000b3e8:	e8 f3 7a 01 00       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
            Print(string);
ffffffff8000b3ed:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b3f4:	e8 c7 7d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b3f9:	45 0f b6 2f          	movzbl (%r15),%r13d
ffffffff8000b3fd:	45 84 ed             	test   %r13b,%r13b
ffffffff8000b400:	75 ce                	jne    ffffffff8000b3d0 <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x70>
    for (; len < BOXUI_LABEL_WIDTH; ++len) out << " ";
ffffffff8000b402:	41 83 fe 1b          	cmp    $0x1b,%r14d
ffffffff8000b406:	7f 36                	jg     ffffffff8000b43e <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0xde>
ffffffff8000b408:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000b40f:	00 
ffffffff8000b410:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b417:	41 83 c6 01          	add    $0x1,%r14d
ffffffff8000b41b:	e8 a0 7d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b420:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000b427:	e8 94 7d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b42c:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b433:	e8 88 7d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b438:	41 83 fe 1c          	cmp    $0x1c,%r14d
ffffffff8000b43c:	75 d2                	jne    ffffffff8000b410 <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0xb0>
ffffffff8000b43e:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
    for (int i = (sizeof(T) * 2) - 1; i >= 0; --i) {
ffffffff8000b445:	41 bd 0f 00 00 00    	mov    $0xf,%r13d
ffffffff8000b44b:	e8 70 7d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b450:	48 c7 c7 d5 a4 02 80 	mov    $0xffffffff8002a4d5,%rdi
ffffffff8000b457:	e8 64 7d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b45c:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b463:	e8 58 7d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b468:	eb 1a                	jmp    ffffffff8000b484 <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x124>
ffffffff8000b46a:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000b471:	00 00 00 00 
ffffffff8000b475:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000b47c:	00 00 00 00 
ffffffff8000b480:	41 83 ed 01          	sub    $0x1,%r13d
        char c = ((value >> (i * 4)) & 0xF);
ffffffff8000b484:	42 8d 0c ad 00 00 00 	lea    0x0(,%r13,4),%ecx
ffffffff8000b48b:	00 
ffffffff8000b48c:	48 89 d8             	mov    %rbx,%rax
ffffffff8000b48f:	48 d3 e8             	shr    %cl,%rax
        if (c || started || i == 0) {
ffffffff8000b492:	83 e0 0f             	and    $0xf,%eax
ffffffff8000b495:	75 59                	jne    ffffffff8000b4f0 <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x190>
ffffffff8000b497:	45 85 ed             	test   %r13d,%r13d
ffffffff8000b49a:	75 e4                	jne    ffffffff8000b480 <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x120>
ffffffff8000b49c:	45 31 ff             	xor    %r15d,%r15d
            out << (char)(c < 10 ? '0' + c : 'A' + (c - 10));
ffffffff8000b49f:	44 8d 70 30          	lea    0x30(%rax),%r14d
ffffffff8000b4a3:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
    for (int i = (sizeof(T) * 2) - 1; i >= 0; --i) {
ffffffff8000b4aa:	41 83 ef 01          	sub    $0x1,%r15d
ffffffff8000b4ae:	e8 0d 7d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Putchar(chr);
ffffffff8000b4b3:	41 0f b6 fe          	movzbl %r14b,%edi
ffffffff8000b4b7:	e8 24 7a 01 00       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
            Print(string);
ffffffff8000b4bc:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b4c3:	e8 f8 7c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        char c = ((value >> (i * 4)) & 0xF);
ffffffff8000b4c8:	42 8d 0c bd 00 00 00 	lea    0x0(,%r15,4),%ecx
ffffffff8000b4cf:	00 
ffffffff8000b4d0:	48 89 d8             	mov    %rbx,%rax
            ++hexLen;
ffffffff8000b4d3:	41 8d 55 01          	lea    0x1(%r13),%edx
        char c = ((value >> (i * 4)) & 0xF);
ffffffff8000b4d7:	48 d3 e8             	shr    %cl,%rax
ffffffff8000b4da:	83 e0 0f             	and    $0xf,%eax
    for (int i = (sizeof(T) * 2) - 1; i >= 0; --i) {
ffffffff8000b4dd:	41 83 ff ff          	cmp    $0xffffffff,%r15d
ffffffff8000b4e1:	74 1d                	je     ffffffff8000b500 <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x1a0>
            out << (char)(c < 10 ? '0' + c : 'A' + (c - 10));
ffffffff8000b4e3:	44 8d 70 37          	lea    0x37(%rax),%r14d
ffffffff8000b4e7:	41 89 d5             	mov    %edx,%r13d
ffffffff8000b4ea:	3c 09                	cmp    $0x9,%al
ffffffff8000b4ec:	7f b5                	jg     ffffffff8000b4a3 <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x143>
ffffffff8000b4ee:	eb af                	jmp    ffffffff8000b49f <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x13f>
ffffffff8000b4f0:	45 89 ef             	mov    %r13d,%r15d
ffffffff8000b4f3:	31 d2                	xor    %edx,%edx
ffffffff8000b4f5:	eb ec                	jmp    ffffffff8000b4e3 <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x183>
ffffffff8000b4f7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8000b4fe:	00 00 
    len += hexLen;
ffffffff8000b500:	41 83 c5 21          	add    $0x21,%r13d
    for (int i = len; i < width - 4; ++i) out << " ";
ffffffff8000b504:	41 83 ec 04          	sub    $0x4,%r12d
ffffffff8000b508:	45 39 e5             	cmp    %r12d,%r13d
ffffffff8000b50b:	7d 30                	jge    ffffffff8000b53d <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x1dd>
ffffffff8000b50d:	0f 1f 00             	nopl   (%rax)
ffffffff8000b510:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b517:	41 83 c5 01          	add    $0x1,%r13d
ffffffff8000b51b:	e8 a0 7c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b520:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000b527:	e8 94 7c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b52c:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b533:	e8 88 7c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b538:	45 39 e5             	cmp    %r12d,%r13d
ffffffff8000b53b:	75 d3                	jne    ffffffff8000b510 <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x1b0>
ffffffff8000b53d:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b544:	e8 77 7c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b549:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000b550:	e8 6b 7c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b555:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b55c:	e8 5f 7c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b561:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b568:	e8 53 7c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b56d:	48 c7 c7 c2 a4 02 80 	mov    $0xffffffff8002a4c2,%rdi
ffffffff8000b574:	e8 47 7c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b579:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b580:	e8 3b 7c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b585:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b58c:	e8 2f 7c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b591:	48 c7 c7 e6 c0 02 80 	mov    $0xffffffff8002c0e6,%rdi
ffffffff8000b598:	e8 23 7c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
}
ffffffff8000b59d:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8000b5a1:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b5a8:	5b                   	pop    %rbx
ffffffff8000b5a9:	41 5c                	pop    %r12
ffffffff8000b5ab:	41 5d                	pop    %r13
ffffffff8000b5ad:	41 5e                	pop    %r14
ffffffff8000b5af:	41 5f                	pop    %r15
ffffffff8000b5b1:	5d                   	pop    %rbp
ffffffff8000b5b2:	e9 09 7c 01 00       	jmp    ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b5b7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8000b5be:	00 00 

ffffffff8000b5c0 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i>:

// Print a boxed line with a label and a decimal value, aligned
template<typename T>
inline void PrintBoxedDec(auto& out, const char* label, T value, int width) {
ffffffff8000b5c0:	55                   	push   %rbp
ffffffff8000b5c1:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b5c8:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000b5cb:	41 57                	push   %r15
    out << BOXUI_V << " ";
    int len = 0;
ffffffff8000b5cd:	45 31 ff             	xor    %r15d,%r15d
inline void PrintBoxedDec(auto& out, const char* label, T value, int width) {
ffffffff8000b5d0:	41 56                	push   %r14
ffffffff8000b5d2:	41 89 d6             	mov    %edx,%r14d
ffffffff8000b5d5:	41 55                	push   %r13
ffffffff8000b5d7:	41 89 d5             	mov    %edx,%r13d
ffffffff8000b5da:	41 54                	push   %r12
ffffffff8000b5dc:	49 89 f4             	mov    %rsi,%r12
ffffffff8000b5df:	53                   	push   %rbx
ffffffff8000b5e0:	48 83 ec 58          	sub    $0x58,%rsp
ffffffff8000b5e4:	89 4d 8c             	mov    %ecx,-0x74(%rbp)
ffffffff8000b5e7:	e8 d4 7b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b5ec:	48 c7 c7 c2 a4 02 80 	mov    $0xffffffff8002a4c2,%rdi
ffffffff8000b5f3:	e8 c8 7b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b5f8:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b5ff:	e8 bc 7b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b604:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b60b:	e8 b0 7b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b610:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000b617:	e8 a4 7b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b61c:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b623:	e8 98 7b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    for (const char* p = label; *p; ++p, ++len) out << *p;
ffffffff8000b628:	41 0f b6 1c 24       	movzbl (%r12),%ebx
ffffffff8000b62d:	84 db                	test   %bl,%bl
ffffffff8000b62f:	74 4f                	je     ffffffff8000b680 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0xc0>
ffffffff8000b631:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000b638:	00 00 00 00 
ffffffff8000b63c:	0f 1f 40 00          	nopl   0x0(%rax)
ffffffff8000b640:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b647:	49 83 c4 01          	add    $0x1,%r12
ffffffff8000b64b:	41 83 c7 01          	add    $0x1,%r15d
ffffffff8000b64f:	e8 6c 7b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Putchar(chr);
ffffffff8000b654:	0f be fb             	movsbl %bl,%edi
ffffffff8000b657:	e8 84 78 01 00       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
            Print(string);
ffffffff8000b65c:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b663:	e8 58 7b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b668:	41 0f b6 1c 24       	movzbl (%r12),%ebx
ffffffff8000b66d:	84 db                	test   %bl,%bl
ffffffff8000b66f:	75 cf                	jne    ffffffff8000b640 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x80>
    for (; len < BOXUI_LABEL_WIDTH; ++len) out << " ";
ffffffff8000b671:	41 83 ff 1b          	cmp    $0x1b,%r15d
ffffffff8000b675:	7f 37                	jg     ffffffff8000b6ae <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0xee>
ffffffff8000b677:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8000b67e:	00 00 
ffffffff8000b680:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b687:	41 83 c7 01          	add    $0x1,%r15d
ffffffff8000b68b:	e8 30 7b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b690:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000b697:	e8 24 7b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b69c:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b6a3:	e8 18 7b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b6a8:	41 83 ff 1c          	cmp    $0x1c,%r15d
ffffffff8000b6ac:	75 d2                	jne    ffffffff8000b680 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0xc0>
ffffffff8000b6ae:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b6b5:	e8 06 7b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b6ba:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000b6c1:	e8 fa 7a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b6c6:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b6cd:	e8 ee 7a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    out << ": ";
    len += 2 + (BOXUI_LABEL_WIDTH - len);
    char buf[32];
    int idx = 0;
    T v = value;
    if (v == 0) {
ffffffff8000b6d2:	45 84 f6             	test   %r14b,%r14b
ffffffff8000b6d5:	0f 85 15 01 00 00    	jne    ffffffff8000b7f0 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x230>
        buf[idx++] = '0';
ffffffff8000b6db:	b8 30 00 00 00       	mov    $0x30,%eax
ffffffff8000b6e0:	bb 01 00 00 00       	mov    $0x1,%ebx
ffffffff8000b6e5:	4c 8d 6d 90          	lea    -0x70(%rbp),%r13
ffffffff8000b6e9:	41 bf 01 00 00 00    	mov    $0x1,%r15d
ffffffff8000b6ef:	66 89 45 90          	mov    %ax,-0x70(%rbp)
            v /= 10;
        }
        for (int i = t - 1; i >= 0; --i) buf[idx++] = tmp[i];
    }
    buf[idx] = 0;
    for (int i = 0; i < idx; ++i, ++len) out << buf[i];
ffffffff8000b6f3:	4d 01 ef             	add    %r13,%r15
ffffffff8000b6f6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000b6fd:	00 00 00 
ffffffff8000b700:	45 0f b6 75 00       	movzbl 0x0(%r13),%r14d
ffffffff8000b705:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b70c:	49 83 c5 01          	add    $0x1,%r13
ffffffff8000b710:	e8 ab 7a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Putchar(chr);
ffffffff8000b715:	41 0f be fe          	movsbl %r14b,%edi
ffffffff8000b719:	e8 c2 77 01 00       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
            Print(string);
ffffffff8000b71e:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b725:	e8 96 7a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b72a:	4d 39 ef             	cmp    %r13,%r15
ffffffff8000b72d:	75 d1                	jne    ffffffff8000b700 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x140>
    for (int i = len; i < width - 4; ++i) out << " ";
ffffffff8000b72f:	44 8b 65 8c          	mov    -0x74(%rbp),%r12d
ffffffff8000b733:	83 c3 1e             	add    $0x1e,%ebx
ffffffff8000b736:	41 83 ec 04          	sub    $0x4,%r12d
ffffffff8000b73a:	44 39 e3             	cmp    %r12d,%ebx
ffffffff8000b73d:	7d 2d                	jge    ffffffff8000b76c <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x1ac>
ffffffff8000b73f:	90                   	nop
ffffffff8000b740:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b747:	83 c3 01             	add    $0x1,%ebx
ffffffff8000b74a:	e8 71 7a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b74f:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000b756:	e8 65 7a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b75b:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b762:	e8 59 7a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b767:	44 39 e3             	cmp    %r12d,%ebx
ffffffff8000b76a:	7c d4                	jl     ffffffff8000b740 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x180>
ffffffff8000b76c:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b773:	e8 48 7a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b778:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000b77f:	e8 3c 7a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b784:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b78b:	e8 30 7a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b790:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b797:	e8 24 7a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b79c:	48 c7 c7 c2 a4 02 80 	mov    $0xffffffff8002a4c2,%rdi
ffffffff8000b7a3:	e8 18 7a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b7a8:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b7af:	e8 0c 7a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b7b4:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b7bb:	e8 00 7a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b7c0:	48 c7 c7 e6 c0 02 80 	mov    $0xffffffff8002c0e6,%rdi
ffffffff8000b7c7:	e8 f4 79 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    out << " " << BOXUI_V << "\n";
ffffffff8000b7cc:	48 83 c4 58          	add    $0x58,%rsp
ffffffff8000b7d0:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b7d7:	5b                   	pop    %rbx
ffffffff8000b7d8:	41 5c                	pop    %r12
ffffffff8000b7da:	41 5d                	pop    %r13
ffffffff8000b7dc:	41 5e                	pop    %r14
ffffffff8000b7de:	41 5f                	pop    %r15
ffffffff8000b7e0:	5d                   	pop    %rbp
ffffffff8000b7e1:	e9 da 79 01 00       	jmp    ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b7e6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000b7ed:	00 00 00 
ffffffff8000b7f0:	48 8d 75 b0          	lea    -0x50(%rbp),%rsi
        int t = 0;
ffffffff8000b7f4:	31 db                	xor    %ebx,%ebx
            tmp[t++] = '0' + (v % 10);
ffffffff8000b7f6:	41 b9 cd ff ff ff    	mov    $0xffffffcd,%r9d
ffffffff8000b7fc:	48 89 f7             	mov    %rsi,%rdi
ffffffff8000b7ff:	90                   	nop
ffffffff8000b800:	44 89 e8             	mov    %r13d,%eax
ffffffff8000b803:	44 89 ea             	mov    %r13d,%edx
ffffffff8000b806:	4c 63 c3             	movslq %ebx,%r8
        while (v > 0 && t < 31) {
ffffffff8000b809:	48 83 c7 01          	add    $0x1,%rdi
            tmp[t++] = '0' + (v % 10);
ffffffff8000b80d:	41 f6 e1             	mul    %r9b
ffffffff8000b810:	83 c3 01             	add    $0x1,%ebx
ffffffff8000b813:	66 c1 e8 0b          	shr    $0xb,%ax
ffffffff8000b817:	8d 0c 80             	lea    (%rax,%rax,4),%ecx
ffffffff8000b81a:	01 c9                	add    %ecx,%ecx
ffffffff8000b81c:	29 ca                	sub    %ecx,%edx
ffffffff8000b81e:	83 c2 30             	add    $0x30,%edx
ffffffff8000b821:	88 57 ff             	mov    %dl,-0x1(%rdi)
ffffffff8000b824:	44 89 ea             	mov    %r13d,%edx
            v /= 10;
ffffffff8000b827:	41 89 c5             	mov    %eax,%r13d
        while (v > 0 && t < 31) {
ffffffff8000b82a:	80 fa 09             	cmp    $0x9,%dl
ffffffff8000b82d:	76 05                	jbe    ffffffff8000b834 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x274>
ffffffff8000b82f:	83 fb 1f             	cmp    $0x1f,%ebx
ffffffff8000b832:	75 cc                	jne    ffffffff8000b800 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x240>
ffffffff8000b834:	4c 8d 6d 90          	lea    -0x70(%rbp),%r13
ffffffff8000b838:	4a 8d 14 06          	lea    (%rsi,%r8,1),%rdx
ffffffff8000b83c:	4c 89 e8             	mov    %r13,%rax
ffffffff8000b83f:	4a 8d 74 05 91       	lea    -0x6f(%rbp,%r8,1),%rsi
ffffffff8000b844:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000b84b:	00 00 00 00 
ffffffff8000b84f:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000b856:	00 00 00 00 
ffffffff8000b85a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        for (int i = t - 1; i >= 0; --i) buf[idx++] = tmp[i];
ffffffff8000b860:	0f b6 0a             	movzbl (%rdx),%ecx
ffffffff8000b863:	48 83 c0 01          	add    $0x1,%rax
ffffffff8000b867:	48 83 ea 01          	sub    $0x1,%rdx
ffffffff8000b86b:	88 48 ff             	mov    %cl,-0x1(%rax)
ffffffff8000b86e:	48 39 f0             	cmp    %rsi,%rax
ffffffff8000b871:	75 ed                	jne    ffffffff8000b860 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x2a0>
    buf[idx] = 0;
ffffffff8000b873:	4c 63 fb             	movslq %ebx,%r15
ffffffff8000b876:	42 c6 44 3d 90 00    	movb   $0x0,-0x70(%rbp,%r15,1)
    for (int i = 0; i < idx; ++i, ++len) out << buf[i];
ffffffff8000b87c:	e9 72 fe ff ff       	jmp    ffffffff8000b6f3 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x133>
ffffffff8000b881:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000b888:	00 00 00 
ffffffff8000b88b:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000b892:	00 00 00 
ffffffff8000b895:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000b89c:	00 00 00 
ffffffff8000b89f:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000b8a6:	00 00 00 
ffffffff8000b8a9:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000b8b0:	00 00 00 
ffffffff8000b8b3:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000b8ba:	00 00 00 
ffffffff8000b8bd:	0f 1f 00             	nopl   (%rax)

ffffffff8000b8c0 <_Z13PrintBoxedDecImN2Kt17KernelErrorStreamEEvRT0_PKcT_i>:
inline void PrintBoxedDec(auto& out, const char* label, T value, int width) {
ffffffff8000b8c0:	55                   	push   %rbp
ffffffff8000b8c1:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b8c8:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000b8cb:	41 57                	push   %r15
ffffffff8000b8cd:	49 89 f7             	mov    %rsi,%r15
ffffffff8000b8d0:	41 56                	push   %r14
    int len = 0;
ffffffff8000b8d2:	45 31 f6             	xor    %r14d,%r14d
inline void PrintBoxedDec(auto& out, const char* label, T value, int width) {
ffffffff8000b8d5:	41 55                	push   %r13
ffffffff8000b8d7:	49 89 d5             	mov    %rdx,%r13
ffffffff8000b8da:	41 54                	push   %r12
ffffffff8000b8dc:	41 89 cc             	mov    %ecx,%r12d
ffffffff8000b8df:	53                   	push   %rbx
ffffffff8000b8e0:	48 83 ec 48          	sub    $0x48,%rsp
ffffffff8000b8e4:	e8 d7 78 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b8e9:	48 c7 c7 c2 a4 02 80 	mov    $0xffffffff8002a4c2,%rdi
ffffffff8000b8f0:	e8 cb 78 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b8f5:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b8fc:	e8 bf 78 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b901:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b908:	e8 b3 78 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b90d:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000b914:	e8 a7 78 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b919:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b920:	e8 9b 78 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    for (const char* p = label; *p; ++p, ++len) out << *p;
ffffffff8000b925:	41 0f b6 1f          	movzbl (%r15),%ebx
ffffffff8000b929:	84 db                	test   %bl,%bl
ffffffff8000b92b:	74 43                	je     ffffffff8000b970 <_Z13PrintBoxedDecImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0xb0>
ffffffff8000b92d:	0f 1f 00             	nopl   (%rax)
ffffffff8000b930:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b937:	49 83 c7 01          	add    $0x1,%r15
ffffffff8000b93b:	41 83 c6 01          	add    $0x1,%r14d
ffffffff8000b93f:	e8 7c 78 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Putchar(chr);
ffffffff8000b944:	0f be fb             	movsbl %bl,%edi
ffffffff8000b947:	e8 94 75 01 00       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
            Print(string);
ffffffff8000b94c:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b953:	e8 68 78 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b958:	41 0f b6 1f          	movzbl (%r15),%ebx
ffffffff8000b95c:	84 db                	test   %bl,%bl
ffffffff8000b95e:	75 d0                	jne    ffffffff8000b930 <_Z13PrintBoxedDecImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x70>
    for (; len < BOXUI_LABEL_WIDTH; ++len) out << " ";
ffffffff8000b960:	41 83 fe 1b          	cmp    $0x1b,%r14d
ffffffff8000b964:	7f 38                	jg     ffffffff8000b99e <_Z13PrintBoxedDecImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0xde>
ffffffff8000b966:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000b96d:	00 00 00 
ffffffff8000b970:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b977:	41 83 c6 01          	add    $0x1,%r14d
ffffffff8000b97b:	e8 40 78 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b980:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000b987:	e8 34 78 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b98c:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b993:	e8 28 78 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b998:	41 83 fe 1c          	cmp    $0x1c,%r14d
ffffffff8000b99c:	75 d2                	jne    ffffffff8000b970 <_Z13PrintBoxedDecImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0xb0>
ffffffff8000b99e:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b9a5:	e8 16 78 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b9aa:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000b9b1:	e8 0a 78 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000b9b6:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000b9bd:	e8 fe 77 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    if (v == 0) {
ffffffff8000b9c2:	4d 85 ed             	test   %r13,%r13
ffffffff8000b9c5:	0f 85 15 01 00 00    	jne    ffffffff8000bae0 <_Z13PrintBoxedDecImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x220>
        buf[idx++] = '0';
ffffffff8000b9cb:	b8 30 00 00 00       	mov    $0x30,%eax
ffffffff8000b9d0:	bb 01 00 00 00       	mov    $0x1,%ebx
ffffffff8000b9d5:	4c 8d 6d 90          	lea    -0x70(%rbp),%r13
ffffffff8000b9d9:	41 bf 01 00 00 00    	mov    $0x1,%r15d
ffffffff8000b9df:	66 89 45 90          	mov    %ax,-0x70(%rbp)
    for (int i = 0; i < idx; ++i, ++len) out << buf[i];
ffffffff8000b9e3:	4d 01 ef             	add    %r13,%r15
ffffffff8000b9e6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000b9ed:	00 00 00 
ffffffff8000b9f0:	45 0f b6 75 00       	movzbl 0x0(%r13),%r14d
ffffffff8000b9f5:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000b9fc:	49 83 c5 01          	add    $0x1,%r13
ffffffff8000ba00:	e8 bb 77 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Putchar(chr);
ffffffff8000ba05:	41 0f be fe          	movsbl %r14b,%edi
ffffffff8000ba09:	e8 d2 74 01 00       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
            Print(string);
ffffffff8000ba0e:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000ba15:	e8 a6 77 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ba1a:	4d 39 ef             	cmp    %r13,%r15
ffffffff8000ba1d:	75 d1                	jne    ffffffff8000b9f0 <_Z13PrintBoxedDecImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x130>
ffffffff8000ba1f:	83 c3 1e             	add    $0x1e,%ebx
    for (int i = len; i < width - 4; ++i) out << " ";
ffffffff8000ba22:	41 83 ec 04          	sub    $0x4,%r12d
ffffffff8000ba26:	41 39 dc             	cmp    %ebx,%r12d
ffffffff8000ba29:	7e 31                	jle    ffffffff8000ba5c <_Z13PrintBoxedDecImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x19c>
ffffffff8000ba2b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff8000ba30:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000ba37:	83 c3 01             	add    $0x1,%ebx
ffffffff8000ba3a:	e8 81 77 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ba3f:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000ba46:	e8 75 77 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ba4b:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000ba52:	e8 69 77 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ba57:	44 39 e3             	cmp    %r12d,%ebx
ffffffff8000ba5a:	7c d4                	jl     ffffffff8000ba30 <_Z13PrintBoxedDecImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x170>
ffffffff8000ba5c:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000ba63:	e8 58 77 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ba68:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8000ba6f:	e8 4c 77 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ba74:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000ba7b:	e8 40 77 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ba80:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000ba87:	e8 34 77 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ba8c:	48 c7 c7 c2 a4 02 80 	mov    $0xffffffff8002a4c2,%rdi
ffffffff8000ba93:	e8 28 77 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ba98:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000ba9f:	e8 1c 77 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000baa4:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000baab:	e8 10 77 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000bab0:	48 c7 c7 e6 c0 02 80 	mov    $0xffffffff8002c0e6,%rdi
ffffffff8000bab7:	e8 04 77 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000babc:	48 83 c4 48          	add    $0x48,%rsp
ffffffff8000bac0:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000bac7:	5b                   	pop    %rbx
ffffffff8000bac8:	41 5c                	pop    %r12
ffffffff8000baca:	41 5d                	pop    %r13
ffffffff8000bacc:	41 5e                	pop    %r14
ffffffff8000bace:	41 5f                	pop    %r15
ffffffff8000bad0:	5d                   	pop    %rbp
ffffffff8000bad1:	e9 ea 76 01 00       	jmp    ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000bad6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000badd:	00 00 00 
            tmp[t++] = '0' + (v % 10);
ffffffff8000bae0:	49 b9 cd cc cc cc cc 	movabs $0xcccccccccccccccd,%r9
ffffffff8000bae7:	cc cc cc 
ffffffff8000baea:	48 8d 75 b0          	lea    -0x50(%rbp),%rsi
        int t = 0;
ffffffff8000baee:	31 db                	xor    %ebx,%ebx
ffffffff8000baf0:	48 89 f7             	mov    %rsi,%rdi
ffffffff8000baf3:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000bafa:	00 00 00 00 
ffffffff8000bafe:	66 90                	xchg   %ax,%ax
            tmp[t++] = '0' + (v % 10);
ffffffff8000bb00:	4c 89 e8             	mov    %r13,%rax
ffffffff8000bb03:	4c 63 c3             	movslq %ebx,%r8
        while (v > 0 && t < 31) {
ffffffff8000bb06:	48 83 c7 01          	add    $0x1,%rdi
            tmp[t++] = '0' + (v % 10);
ffffffff8000bb0a:	83 c3 01             	add    $0x1,%ebx
ffffffff8000bb0d:	49 f7 e1             	mul    %r9
ffffffff8000bb10:	4c 89 e8             	mov    %r13,%rax
ffffffff8000bb13:	48 c1 ea 03          	shr    $0x3,%rdx
ffffffff8000bb17:	48 8d 0c 92          	lea    (%rdx,%rdx,4),%rcx
ffffffff8000bb1b:	48 01 c9             	add    %rcx,%rcx
ffffffff8000bb1e:	48 29 c8             	sub    %rcx,%rax
ffffffff8000bb21:	83 c0 30             	add    $0x30,%eax
ffffffff8000bb24:	88 47 ff             	mov    %al,-0x1(%rdi)
ffffffff8000bb27:	4c 89 e8             	mov    %r13,%rax
            v /= 10;
ffffffff8000bb2a:	49 89 d5             	mov    %rdx,%r13
        while (v > 0 && t < 31) {
ffffffff8000bb2d:	48 83 f8 09          	cmp    $0x9,%rax
ffffffff8000bb31:	76 05                	jbe    ffffffff8000bb38 <_Z13PrintBoxedDecImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x278>
ffffffff8000bb33:	83 fb 1f             	cmp    $0x1f,%ebx
ffffffff8000bb36:	75 c8                	jne    ffffffff8000bb00 <_Z13PrintBoxedDecImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x240>
ffffffff8000bb38:	4c 8d 6d 90          	lea    -0x70(%rbp),%r13
ffffffff8000bb3c:	4c 01 c6             	add    %r8,%rsi
ffffffff8000bb3f:	4a 8d 4c 05 91       	lea    -0x6f(%rbp,%r8,1),%rcx
ffffffff8000bb44:	4c 89 e8             	mov    %r13,%rax
ffffffff8000bb47:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000bb4e:	00 00 00 00 
ffffffff8000bb52:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000bb59:	00 00 00 00 
ffffffff8000bb5d:	0f 1f 00             	nopl   (%rax)
        for (int i = t - 1; i >= 0; --i) buf[idx++] = tmp[i];
ffffffff8000bb60:	0f b6 16             	movzbl (%rsi),%edx
ffffffff8000bb63:	48 83 c0 01          	add    $0x1,%rax
ffffffff8000bb67:	48 83 ee 01          	sub    $0x1,%rsi
ffffffff8000bb6b:	88 50 ff             	mov    %dl,-0x1(%rax)
ffffffff8000bb6e:	48 39 c8             	cmp    %rcx,%rax
ffffffff8000bb71:	75 ed                	jne    ffffffff8000bb60 <_Z13PrintBoxedDecImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x2a0>
    buf[idx] = 0;
ffffffff8000bb73:	4c 63 fb             	movslq %ebx,%r15
ffffffff8000bb76:	42 c6 44 3d 90 00    	movb   $0x0,-0x70(%rbp,%r15,1)
    for (int i = 0; i < idx; ++i, ++len) out << buf[i];
ffffffff8000bb7c:	e9 62 fe ff ff       	jmp    ffffffff8000b9e3 <_Z13PrintBoxedDecImN2Kt17KernelErrorStreamEEvRT0_PKcT_i+0x123>
ffffffff8000bb81:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000bb88:	00 00 00 
ffffffff8000bb8b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>:
*/

#include "Panic.hpp"
#include "../CppLib/BoxUI.hpp"

void Panic(const char *meditationString, System::PanicFrame* frame) {
ffffffff8000bb90:	55                   	push   %rbp
ffffffff8000bb91:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000bb94:	41 55                	push   %r13
ffffffff8000bb96:	49 89 fd             	mov    %rdi,%r13
    const int boxWidth = 72;

    // Header
    kerr << BOXUI_ANSI_RED_BG << BOXUI_ANSI_WHITE_FG << BOXUI_ANSI_BOLD << "\n";
ffffffff8000bb99:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
void Panic(const char *meditationString, System::PanicFrame* frame) {
ffffffff8000bba0:	41 54                	push   %r12
ffffffff8000bba2:	49 89 f4             	mov    %rsi,%r12
    kerr << BOXUI_ANSI_RED_BG << BOXUI_ANSI_WHITE_FG << BOXUI_ANSI_BOLD << "\n";
ffffffff8000bba5:	48 c7 c6 da a4 02 80 	mov    $0xffffffff8002a4da,%rsi
void Panic(const char *meditationString, System::PanicFrame* frame) {
ffffffff8000bbac:	53                   	push   %rbx
    kerr << BOXUI_TL;
ffffffff8000bbad:	bb 46 00 00 00       	mov    $0x46,%ebx
void Panic(const char *meditationString, System::PanicFrame* frame) {
ffffffff8000bbb2:	48 83 ec 08          	sub    $0x8,%rsp
    kerr << BOXUI_ANSI_RED_BG << BOXUI_ANSI_WHITE_FG << BOXUI_ANSI_BOLD << "\n";
ffffffff8000bbb6:	e8 e5 f1 ff ff       	call   ffffffff8000ada0 <_ZN2KtlsIPKcEERNS_17KernelErrorStreamES4_T_>
ffffffff8000bbbb:	48 c7 c6 cb a4 02 80 	mov    $0xffffffff8002a4cb,%rsi
ffffffff8000bbc2:	48 89 c7             	mov    %rax,%rdi
ffffffff8000bbc5:	e8 d6 f1 ff ff       	call   ffffffff8000ada0 <_ZN2KtlsIPKcEERNS_17KernelErrorStreamES4_T_>
ffffffff8000bbca:	48 c7 c6 c6 a4 02 80 	mov    $0xffffffff8002a4c6,%rsi
ffffffff8000bbd1:	48 89 c7             	mov    %rax,%rdi
ffffffff8000bbd4:	e8 c7 f1 ff ff       	call   ffffffff8000ada0 <_ZN2KtlsIPKcEERNS_17KernelErrorStreamES4_T_>
ffffffff8000bbd9:	48 c7 c6 e6 c0 02 80 	mov    $0xffffffff8002c0e6,%rsi
ffffffff8000bbe0:	48 89 c7             	mov    %rax,%rdi
ffffffff8000bbe3:	e8 b8 f1 ff ff       	call   ffffffff8000ada0 <_ZN2KtlsIPKcEERNS_17KernelErrorStreamES4_T_>
    kerr << BOXUI_TL;
ffffffff8000bbe8:	48 c7 c6 e0 a4 02 80 	mov    $0xffffffff8002a4e0,%rsi
ffffffff8000bbef:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bbf6:	e8 a5 f1 ff ff       	call   ffffffff8000ada0 <_ZN2KtlsIPKcEERNS_17KernelErrorStreamES4_T_>
    for (int i = 0; i < boxWidth - 2; ++i) kerr << BOXUI_H;
ffffffff8000bbfb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff8000bc00:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000bc07:	e8 b4 75 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000bc0c:	48 c7 c7 d1 a4 02 80 	mov    $0xffffffff8002a4d1,%rdi
ffffffff8000bc13:	e8 a8 75 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000bc18:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000bc1f:	e8 9c 75 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000bc24:	83 eb 01             	sub    $0x1,%ebx
ffffffff8000bc27:	75 d7                	jne    ffffffff8000bc00 <_Z5PanicPKcPN6System10PanicFrameE+0x70>
    kerr << BOXUI_TR << "\n";
ffffffff8000bc29:	48 c7 c6 e4 a4 02 80 	mov    $0xffffffff8002a4e4,%rsi
ffffffff8000bc30:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bc37:	e8 64 f1 ff ff       	call   ffffffff8000ada0 <_ZN2KtlsIPKcEERNS_17KernelErrorStreamES4_T_>
ffffffff8000bc3c:	48 c7 c6 e6 c0 02 80 	mov    $0xffffffff8002c0e6,%rsi
ffffffff8000bc43:	48 89 c7             	mov    %rax,%rdi
ffffffff8000bc46:	e8 55 f1 ff ff       	call   ffffffff8000ada0 <_ZN2KtlsIPKcEERNS_17KernelErrorStreamES4_T_>
    PrintBoxedLine(kerr, "!!! KERNEL PANIC !!!", boxWidth, true);
ffffffff8000bc4b:	45 31 c0             	xor    %r8d,%r8d
ffffffff8000bc4e:	b9 01 00 00 00       	mov    $0x1,%ecx
ffffffff8000bc53:	ba 48 00 00 00       	mov    $0x48,%edx
ffffffff8000bc58:	48 c7 c6 e8 a4 02 80 	mov    $0xffffffff8002a4e8,%rsi
ffffffff8000bc5f:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bc66:	e8 75 f1 ff ff       	call   ffffffff8000ade0 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_>
    PrintBoxedLine(kerr, "", boxWidth);
ffffffff8000bc6b:	45 31 c0             	xor    %r8d,%r8d
ffffffff8000bc6e:	31 c9                	xor    %ecx,%ecx
ffffffff8000bc70:	ba 48 00 00 00       	mov    $0x48,%edx
ffffffff8000bc75:	48 c7 c6 e7 c0 02 80 	mov    $0xffffffff8002c0e7,%rsi
ffffffff8000bc7c:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bc83:	e8 58 f1 ff ff       	call   ffffffff8000ade0 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_>
    PrintBoxedLine(kerr, "System halted. Please reboot.", boxWidth, true);
ffffffff8000bc88:	45 31 c0             	xor    %r8d,%r8d
ffffffff8000bc8b:	b9 01 00 00 00       	mov    $0x1,%ecx
ffffffff8000bc90:	ba 48 00 00 00       	mov    $0x48,%edx
ffffffff8000bc95:	48 c7 c6 fd a4 02 80 	mov    $0xffffffff8002a4fd,%rsi
ffffffff8000bc9c:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bca3:	e8 38 f1 ff ff       	call   ffffffff8000ade0 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_>
    PrintBoxedLine(kerr, "", boxWidth);
ffffffff8000bca8:	45 31 c0             	xor    %r8d,%r8d
ffffffff8000bcab:	31 c9                	xor    %ecx,%ecx
ffffffff8000bcad:	ba 48 00 00 00       	mov    $0x48,%edx
ffffffff8000bcb2:	48 c7 c6 e7 c0 02 80 	mov    $0xffffffff8002c0e7,%rsi
ffffffff8000bcb9:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bcc0:	e8 1b f1 ff ff       	call   ffffffff8000ade0 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_>
    PrintBoxedSeparator(kerr, boxWidth);
ffffffff8000bcc5:	be 48 00 00 00       	mov    $0x48,%esi
ffffffff8000bcca:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bcd1:	e8 5a f3 ff ff       	call   ffffffff8000b030 <_Z19PrintBoxedSeparatorIN2Kt17KernelErrorStreamEEvRT_i>
    PrintBoxedLine(kerr, "Meditation:", boxWidth, true);
ffffffff8000bcd6:	45 31 c0             	xor    %r8d,%r8d
ffffffff8000bcd9:	b9 01 00 00 00       	mov    $0x1,%ecx
ffffffff8000bcde:	ba 48 00 00 00       	mov    $0x48,%edx
ffffffff8000bce3:	48 c7 c6 1b a5 02 80 	mov    $0xffffffff8002a51b,%rsi
ffffffff8000bcea:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bcf1:	e8 ea f0 ff ff       	call   ffffffff8000ade0 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_>
    PrintBoxedLine(kerr, meditationString, boxWidth);
ffffffff8000bcf6:	45 31 c0             	xor    %r8d,%r8d
ffffffff8000bcf9:	31 c9                	xor    %ecx,%ecx
ffffffff8000bcfb:	ba 48 00 00 00       	mov    $0x48,%edx
ffffffff8000bd00:	4c 89 ee             	mov    %r13,%rsi
ffffffff8000bd03:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bd0a:	e8 d1 f0 ff ff       	call   ffffffff8000ade0 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_>
    PrintBoxedLine(kerr, "", boxWidth);
ffffffff8000bd0f:	45 31 c0             	xor    %r8d,%r8d
ffffffff8000bd12:	31 c9                	xor    %ecx,%ecx
ffffffff8000bd14:	ba 48 00 00 00       	mov    $0x48,%edx
ffffffff8000bd19:	48 c7 c6 e7 c0 02 80 	mov    $0xffffffff8002c0e7,%rsi
ffffffff8000bd20:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bd27:	e8 b4 f0 ff ff       	call   ffffffff8000ade0 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_>

#if defined (__x86_64__)
    if (frame != nullptr) {
ffffffff8000bd2c:	4d 85 e4             	test   %r12,%r12
ffffffff8000bd2f:	0f 84 26 01 00 00    	je     ffffffff8000be5b <_Z5PanicPKcPN6System10PanicFrameE+0x2cb>
        PrintBoxedSeparator(kerr, boxWidth);
ffffffff8000bd35:	be 48 00 00 00       	mov    $0x48,%esi
ffffffff8000bd3a:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bd41:	e8 ea f2 ff ff       	call   ffffffff8000b030 <_Z19PrintBoxedSeparatorIN2Kt17KernelErrorStreamEEvRT_i>
        PrintBoxedLine(kerr, "CPU State:", boxWidth, true);
ffffffff8000bd46:	45 31 c0             	xor    %r8d,%r8d
ffffffff8000bd49:	b9 01 00 00 00       	mov    $0x1,%ecx
ffffffff8000bd4e:	ba 48 00 00 00       	mov    $0x48,%edx
ffffffff8000bd53:	48 c7 c6 27 a5 02 80 	mov    $0xffffffff8002a527,%rsi
ffffffff8000bd5a:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bd61:	e8 7a f0 ff ff       	call   ffffffff8000ade0 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_>
        PrintBoxedHex(kerr, "Interrupt Vector", frame->InterruptVector, boxWidth);
ffffffff8000bd66:	41 0f b6 54 24 28    	movzbl 0x28(%r12),%edx
ffffffff8000bd6c:	b9 48 00 00 00       	mov    $0x48,%ecx
ffffffff8000bd71:	48 c7 c6 32 a5 02 80 	mov    $0xffffffff8002a532,%rsi
ffffffff8000bd78:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bd7f:	e8 ac f3 ff ff       	call   ffffffff8000b130 <_Z13PrintBoxedHexIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i>

        if (frame->InterruptVector == 0xE) {
ffffffff8000bd84:	41 0f b6 44 24 28    	movzbl 0x28(%r12),%eax
ffffffff8000bd8a:	3c 0e                	cmp    $0xe,%al
ffffffff8000bd8c:	0f 84 62 01 00 00    	je     ffffffff8000bef4 <_Z5PanicPKcPN6System10PanicFrameE+0x364>
            PrintBoxedDec(kerr, "Reserved Write", pf_frame->PageFaultError.ReservedWrite, boxWidth);
            PrintBoxedDec(kerr, "Instruction Fetch", pf_frame->PageFaultError.InstructionFetch, boxWidth);
            PrintBoxedDec(kerr, "Protection Key", pf_frame->PageFaultError.ProtectionKey, boxWidth);
            PrintBoxedDec(kerr, "Shadow Stack", pf_frame->PageFaultError.ShadowStack, boxWidth);
            PrintBoxedDec(kerr, "SGX", pf_frame->PageFaultError.SGX, boxWidth);
        } else if (frame->InterruptVector == 0xD) {
ffffffff8000bd92:	3c 0d                	cmp    $0xd,%al
ffffffff8000bd94:	0f 84 b6 02 00 00    	je     ffffffff8000c050 <_Z5PanicPKcPN6System10PanicFrameE+0x4c0>
            frame = (System::PanicFrame*)&frame->IP;
            PrintBoxedLine(kerr, "General Protection Fault:", boxWidth, true);
            PrintBoxedDec(kerr, "Error Code", gpf_frame->GeneralProtectionFaultError, boxWidth);
        }

        PrintBoxedSeparator(kerr, boxWidth);
ffffffff8000bd9a:	be 48 00 00 00       	mov    $0x48,%esi
ffffffff8000bd9f:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bda6:	e8 85 f2 ff ff       	call   ffffffff8000b030 <_Z19PrintBoxedSeparatorIN2Kt17KernelErrorStreamEEvRT_i>
        PrintBoxedLine(kerr, "Registers:", boxWidth, true);
ffffffff8000bdab:	45 31 c0             	xor    %r8d,%r8d
ffffffff8000bdae:	b9 01 00 00 00       	mov    $0x1,%ecx
ffffffff8000bdb3:	ba 48 00 00 00       	mov    $0x48,%edx
ffffffff8000bdb8:	48 c7 c6 d7 a5 02 80 	mov    $0xffffffff8002a5d7,%rsi
ffffffff8000bdbf:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bdc6:	e8 15 f0 ff ff       	call   ffffffff8000ade0 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_>
        PrintBoxedHex(kerr, "Instruction Pointer", frame->IP, boxWidth);
ffffffff8000bdcb:	49 8b 14 24          	mov    (%r12),%rdx
ffffffff8000bdcf:	b9 48 00 00 00       	mov    $0x48,%ecx
ffffffff8000bdd4:	48 c7 c6 e2 a5 02 80 	mov    $0xffffffff8002a5e2,%rsi
ffffffff8000bddb:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bde2:	e8 79 f5 ff ff       	call   ffffffff8000b360 <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i>
        PrintBoxedHex(kerr, "Code Segment", frame->CS, boxWidth);
ffffffff8000bde7:	49 8b 54 24 08       	mov    0x8(%r12),%rdx
ffffffff8000bdec:	b9 48 00 00 00       	mov    $0x48,%ecx
ffffffff8000bdf1:	48 c7 c6 f6 a5 02 80 	mov    $0xffffffff8002a5f6,%rsi
ffffffff8000bdf8:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bdff:	e8 5c f5 ff ff       	call   ffffffff8000b360 <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i>
        PrintBoxedHex(kerr, "Flags", frame->Flags, boxWidth);
ffffffff8000be04:	49 8b 54 24 10       	mov    0x10(%r12),%rdx
ffffffff8000be09:	b9 48 00 00 00       	mov    $0x48,%ecx
ffffffff8000be0e:	48 c7 c6 03 a6 02 80 	mov    $0xffffffff8002a603,%rsi
ffffffff8000be15:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000be1c:	e8 3f f5 ff ff       	call   ffffffff8000b360 <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i>
        PrintBoxedHex(kerr, "Stack Pointer", frame->SP, boxWidth);
ffffffff8000be21:	49 8b 54 24 18       	mov    0x18(%r12),%rdx
ffffffff8000be26:	b9 48 00 00 00       	mov    $0x48,%ecx
ffffffff8000be2b:	48 c7 c6 09 a6 02 80 	mov    $0xffffffff8002a609,%rsi
ffffffff8000be32:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000be39:	e8 22 f5 ff ff       	call   ffffffff8000b360 <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i>
        PrintBoxedHex(kerr, "Stack Segment", frame->SS, boxWidth);
ffffffff8000be3e:	49 8b 54 24 20       	mov    0x20(%r12),%rdx
ffffffff8000be43:	b9 48 00 00 00       	mov    $0x48,%ecx
ffffffff8000be48:	48 c7 c6 17 a6 02 80 	mov    $0xffffffff8002a617,%rsi
ffffffff8000be4f:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000be56:	e8 05 f5 ff ff       	call   ffffffff8000b360 <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i>
    }
#endif

    PrintBoxedLine(kerr, "", boxWidth);
ffffffff8000be5b:	45 31 c0             	xor    %r8d,%r8d
ffffffff8000be5e:	31 c9                	xor    %ecx,%ecx
ffffffff8000be60:	ba 48 00 00 00       	mov    $0x48,%edx

    // Footer
    kerr << BOXUI_BL;
ffffffff8000be65:	bb 46 00 00 00       	mov    $0x46,%ebx
    PrintBoxedLine(kerr, "", boxWidth);
ffffffff8000be6a:	48 c7 c6 e7 c0 02 80 	mov    $0xffffffff8002c0e7,%rsi
ffffffff8000be71:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000be78:	e8 63 ef ff ff       	call   ffffffff8000ade0 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_>
    kerr << BOXUI_BL;
ffffffff8000be7d:	48 c7 c6 25 a6 02 80 	mov    $0xffffffff8002a625,%rsi
ffffffff8000be84:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000be8b:	e8 10 ef ff ff       	call   ffffffff8000ada0 <_ZN2KtlsIPKcEERNS_17KernelErrorStreamES4_T_>
ffffffff8000be90:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000be97:	e8 24 73 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000be9c:	48 c7 c7 d1 a4 02 80 	mov    $0xffffffff8002a4d1,%rdi
ffffffff8000bea3:	e8 18 73 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000bea8:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000beaf:	e8 0c 73 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    for (int i = 0; i < boxWidth - 2; ++i) kerr << BOXUI_H;
ffffffff8000beb4:	83 eb 01             	sub    $0x1,%ebx
ffffffff8000beb7:	75 d7                	jne    ffffffff8000be90 <_Z5PanicPKcPN6System10PanicFrameE+0x300>
    kerr << BOXUI_BR << "\n";
ffffffff8000beb9:	48 c7 c6 29 a6 02 80 	mov    $0xffffffff8002a629,%rsi
ffffffff8000bec0:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bec7:	e8 d4 ee ff ff       	call   ffffffff8000ada0 <_ZN2KtlsIPKcEERNS_17KernelErrorStreamES4_T_>
ffffffff8000becc:	48 c7 c6 e6 c0 02 80 	mov    $0xffffffff8002c0e6,%rsi
ffffffff8000bed3:	48 89 c7             	mov    %rax,%rdi
ffffffff8000bed6:	e8 c5 ee ff ff       	call   ffffffff8000ada0 <_ZN2KtlsIPKcEERNS_17KernelErrorStreamES4_T_>
    kerr << BOXUI_ANSI_RESET;
ffffffff8000bedb:	48 c7 c6 86 a6 02 80 	mov    $0xffffffff8002a686,%rsi
ffffffff8000bee2:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bee9:	e8 b2 ee ff ff       	call   ffffffff8000ada0 <_ZN2KtlsIPKcEERNS_17KernelErrorStreamES4_T_>
ffffffff8000beee:	66 90                	xchg   %ax,%ax

    while (true) {
#if defined (__x86_64__)
        asm ("cli");
ffffffff8000bef0:	fa                   	cli
        asm ("hlt");
ffffffff8000bef1:	f4                   	hlt
    while (true) {
ffffffff8000bef2:	eb fc                	jmp    ffffffff8000bef0 <_Z5PanicPKcPN6System10PanicFrameE+0x360>
            frame = (System::PanicFrame*)&pf_frame->IP;
ffffffff8000bef4:	49 8d 5c 24 08       	lea    0x8(%r12),%rbx
            asm volatile("mov %%cr2, %0" : "=r"(cr2));
ffffffff8000bef9:	0f 20 d2             	mov    %cr2,%rdx
            PrintBoxedHex(kerr, "Faulting Address (CR2)", cr2, boxWidth);
ffffffff8000befc:	b9 48 00 00 00       	mov    $0x48,%ecx
ffffffff8000bf01:	48 c7 c6 43 a5 02 80 	mov    $0xffffffff8002a543,%rsi
ffffffff8000bf08:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bf0f:	e8 4c f4 ff ff       	call   ffffffff8000b360 <_Z13PrintBoxedHexImN2Kt17KernelErrorStreamEEvRT0_PKcT_i>
            PrintBoxedLine(kerr, "Page Fault Error:", boxWidth, true);
ffffffff8000bf14:	45 31 c0             	xor    %r8d,%r8d
ffffffff8000bf17:	b9 01 00 00 00       	mov    $0x1,%ecx
ffffffff8000bf1c:	ba 48 00 00 00       	mov    $0x48,%edx
ffffffff8000bf21:	48 c7 c6 5a a5 02 80 	mov    $0xffffffff8002a55a,%rsi
ffffffff8000bf28:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bf2f:	e8 ac ee ff ff       	call   ffffffff8000ade0 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_>
            PrintBoxedDec(kerr, "Present", pf_frame->PageFaultError.Present, boxWidth);
ffffffff8000bf34:	41 0f b6 14 24       	movzbl (%r12),%edx
ffffffff8000bf39:	b9 48 00 00 00       	mov    $0x48,%ecx
ffffffff8000bf3e:	48 c7 c6 77 b9 02 80 	mov    $0xffffffff8002b977,%rsi
ffffffff8000bf45:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bf4c:	83 e2 01             	and    $0x1,%edx
ffffffff8000bf4f:	e8 6c f6 ff ff       	call   ffffffff8000b5c0 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i>
            PrintBoxedDec(kerr, "Write", pf_frame->PageFaultError.Write, boxWidth);
ffffffff8000bf54:	41 0f b6 14 24       	movzbl (%r12),%edx
ffffffff8000bf59:	b9 48 00 00 00       	mov    $0x48,%ecx
ffffffff8000bf5e:	48 c7 c6 7a a5 02 80 	mov    $0xffffffff8002a57a,%rsi
ffffffff8000bf65:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bf6c:	d0 ea                	shr    $1,%dl
ffffffff8000bf6e:	83 e2 01             	and    $0x1,%edx
ffffffff8000bf71:	e8 4a f6 ff ff       	call   ffffffff8000b5c0 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i>
            PrintBoxedDec(kerr, "User", pf_frame->PageFaultError.User, boxWidth);
ffffffff8000bf76:	41 0f b6 14 24       	movzbl (%r12),%edx
ffffffff8000bf7b:	b9 48 00 00 00       	mov    $0x48,%ecx
ffffffff8000bf80:	48 c7 c6 6c a5 02 80 	mov    $0xffffffff8002a56c,%rsi
ffffffff8000bf87:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bf8e:	c0 ea 02             	shr    $0x2,%dl
ffffffff8000bf91:	83 e2 01             	and    $0x1,%edx
ffffffff8000bf94:	e8 27 f6 ff ff       	call   ffffffff8000b5c0 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i>
            PrintBoxedDec(kerr, "Reserved Write", pf_frame->PageFaultError.ReservedWrite, boxWidth);
ffffffff8000bf99:	41 0f b6 14 24       	movzbl (%r12),%edx
ffffffff8000bf9e:	b9 48 00 00 00       	mov    $0x48,%ecx
ffffffff8000bfa3:	48 c7 c6 71 a5 02 80 	mov    $0xffffffff8002a571,%rsi
ffffffff8000bfaa:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bfb1:	c0 ea 03             	shr    $0x3,%dl
ffffffff8000bfb4:	83 e2 01             	and    $0x1,%edx
ffffffff8000bfb7:	e8 04 f6 ff ff       	call   ffffffff8000b5c0 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i>
            PrintBoxedDec(kerr, "Instruction Fetch", pf_frame->PageFaultError.InstructionFetch, boxWidth);
ffffffff8000bfbc:	41 0f b6 14 24       	movzbl (%r12),%edx
ffffffff8000bfc1:	b9 48 00 00 00       	mov    $0x48,%ecx
ffffffff8000bfc6:	48 c7 c6 80 a5 02 80 	mov    $0xffffffff8002a580,%rsi
ffffffff8000bfcd:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bfd4:	c0 ea 04             	shr    $0x4,%dl
ffffffff8000bfd7:	83 e2 01             	and    $0x1,%edx
ffffffff8000bfda:	e8 e1 f5 ff ff       	call   ffffffff8000b5c0 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i>
            PrintBoxedDec(kerr, "Protection Key", pf_frame->PageFaultError.ProtectionKey, boxWidth);
ffffffff8000bfdf:	41 0f b6 14 24       	movzbl (%r12),%edx
ffffffff8000bfe4:	b9 48 00 00 00       	mov    $0x48,%ecx
ffffffff8000bfe9:	48 c7 c6 92 a5 02 80 	mov    $0xffffffff8002a592,%rsi
ffffffff8000bff0:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000bff7:	c0 ea 05             	shr    $0x5,%dl
ffffffff8000bffa:	83 e2 01             	and    $0x1,%edx
ffffffff8000bffd:	e8 be f5 ff ff       	call   ffffffff8000b5c0 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i>
            PrintBoxedDec(kerr, "Shadow Stack", pf_frame->PageFaultError.ShadowStack, boxWidth);
ffffffff8000c002:	41 0f b6 14 24       	movzbl (%r12),%edx
ffffffff8000c007:	b9 48 00 00 00       	mov    $0x48,%ecx
ffffffff8000c00c:	48 c7 c6 a1 a5 02 80 	mov    $0xffffffff8002a5a1,%rsi
ffffffff8000c013:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000c01a:	c0 ea 06             	shr    $0x6,%dl
ffffffff8000c01d:	83 e2 01             	and    $0x1,%edx
ffffffff8000c020:	e8 9b f5 ff ff       	call   ffffffff8000b5c0 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i>
            PrintBoxedDec(kerr, "SGX", pf_frame->PageFaultError.SGX, boxWidth);
ffffffff8000c025:	41 0f b6 14 24       	movzbl (%r12),%edx
            frame = (System::PanicFrame*)&pf_frame->IP;
ffffffff8000c02a:	49 89 dc             	mov    %rbx,%r12
            PrintBoxedDec(kerr, "SGX", pf_frame->PageFaultError.SGX, boxWidth);
ffffffff8000c02d:	b9 48 00 00 00       	mov    $0x48,%ecx
ffffffff8000c032:	48 c7 c6 ae a5 02 80 	mov    $0xffffffff8002a5ae,%rsi
ffffffff8000c039:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000c040:	c0 ea 07             	shr    $0x7,%dl
ffffffff8000c043:	0f b6 d2             	movzbl %dl,%edx
ffffffff8000c046:	e8 75 f5 ff ff       	call   ffffffff8000b5c0 <_Z13PrintBoxedDecIhN2Kt17KernelErrorStreamEEvRT0_PKcT_i>
ffffffff8000c04b:	e9 4a fd ff ff       	jmp    ffffffff8000bd9a <_Z5PanicPKcPN6System10PanicFrameE+0x20a>
            PrintBoxedLine(kerr, "General Protection Fault:", boxWidth, true);
ffffffff8000c050:	45 31 c0             	xor    %r8d,%r8d
ffffffff8000c053:	b9 01 00 00 00       	mov    $0x1,%ecx
ffffffff8000c058:	ba 48 00 00 00       	mov    $0x48,%edx
ffffffff8000c05d:	48 c7 c6 b2 a5 02 80 	mov    $0xffffffff8002a5b2,%rsi
ffffffff8000c064:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000c06b:	e8 70 ed ff ff       	call   ffffffff8000ade0 <_Z14PrintBoxedLineIN2Kt17KernelErrorStreamEEvRT_PKcibS5_>
            PrintBoxedDec(kerr, "Error Code", gpf_frame->GeneralProtectionFaultError, boxWidth);
ffffffff8000c070:	49 8b 14 24          	mov    (%r12),%rdx
ffffffff8000c074:	b9 48 00 00 00       	mov    $0x48,%ecx
ffffffff8000c079:	48 c7 c6 cc a5 02 80 	mov    $0xffffffff8002a5cc,%rsi
ffffffff8000c080:	48 c7 c7 a0 c9 14 80 	mov    $0xffffffff8014c9a0,%rdi
ffffffff8000c087:	e8 34 f8 ff ff       	call   ffffffff8000b8c0 <_Z13PrintBoxedDecImN2Kt17KernelErrorStreamEEvRT0_PKcT_i>
ffffffff8000c08c:	e9 09 fd ff ff       	jmp    ffffffff8000bd9a <_Z5PanicPKcPN6System10PanicFrameE+0x20a>
ffffffff8000c091:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000c098:	00 00 00 
ffffffff8000c09b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff8000c0a0 <_ZdlPvm>:
{
    delete block;
}

void operator delete(void* block, long unsigned int)
{
ffffffff8000c0a0:	48 89 fe             	mov    %rdi,%rsi
    Memory::g_heap->Free(block);
ffffffff8000c0a3:	48 8b 3d 0e 09 14 00 	mov    0x14090e(%rip),%rdi        # ffffffff8014c9b8 <_ZN6Memory6g_heapE>
ffffffff8000c0aa:	e9 61 ed 00 00       	jmp    ffffffff8001ae10 <_ZN6Memory13HeapAllocator4FreeEPv>
ffffffff8000c0af:	90                   	nop

ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>:
    { }

    _GLIBCXX_ALWAYS_INLINE bool
    test_and_set(memory_order __m = memory_order_seq_cst) noexcept
    {
      return __atomic_test_and_set (&_M_i, int(__m));
ffffffff8000c0b0:	ba 01 00 00 00       	mov    $0x1,%edx

#include "Spinlock.hpp"

namespace kcp {
    void Spinlock::Acquire() {
        while (atomic_flag.test_and_set(std::memory_order_acquire)) {
ffffffff8000c0b5:	eb 0b                	jmp    ffffffff8000c0c2 <_ZN3kcp8Spinlock7AcquireEv+0x12>
ffffffff8000c0b7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8000c0be:	00 00 
            asm volatile("pause");
ffffffff8000c0c0:	f3 90                	pause
ffffffff8000c0c2:	89 d0                	mov    %edx,%eax
ffffffff8000c0c4:	86 07                	xchg   %al,(%rdi)
        while (atomic_flag.test_and_set(std::memory_order_acquire)) {
ffffffff8000c0c6:	84 c0                	test   %al,%al
ffffffff8000c0c8:	75 f6                	jne    ffffffff8000c0c0 <_ZN3kcp8Spinlock7AcquireEv+0x10>
        }
    }
ffffffff8000c0ca:	c3                   	ret
ffffffff8000c0cb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>:
	= __m & __memory_order_mask;
      __glibcxx_assert(__b != memory_order_consume);
      __glibcxx_assert(__b != memory_order_acquire);
      __glibcxx_assert(__b != memory_order_acq_rel);

      __atomic_clear (&_M_i, int(__m));
ffffffff8000c0d0:	c6 07 00             	movb   $0x0,(%rdi)

    void Spinlock::Release() {
        atomic_flag.clear(std::memory_order_release);
    }
ffffffff8000c0d3:	c3                   	ret
ffffffff8000c0d4:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000c0db:	00 00 00 
ffffffff8000c0de:	66 90                	xchg   %ax,%ax

ffffffff8000c0e0 <_ZN3kcp13cstringstreamC1Ev>:
#include "Stream.hpp"
#include <Memory/Heap.hpp>
#include <Terminal/Terminal.hpp>
#include <Libraries/String.hpp>

kcp::cstringstream::cstringstream()
ffffffff8000c0e0:	c7 47 10 0a 00 00 00 	movl   $0xa,0x10(%rdi)
{
    this->string = nullptr;
ffffffff8000c0e7:	48 c7 07 00 00 00 00 	movq   $0x0,(%rdi)
    this->size = 0;
ffffffff8000c0ee:	48 c7 47 08 00 00 00 	movq   $0x0,0x8(%rdi)
ffffffff8000c0f5:	00 
}
ffffffff8000c0f6:	c3                   	ret
ffffffff8000c0f7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8000c0fe:	00 00 

ffffffff8000c100 <_ZN3kcp13cstringstreamD1Ev>:

kcp::cstringstream::~cstringstream()
{
    delete this->string;
ffffffff8000c100:	48 8b 3f             	mov    (%rdi),%rdi
ffffffff8000c103:	48 85 ff             	test   %rdi,%rdi
ffffffff8000c106:	74 10                	je     ffffffff8000c118 <_ZN3kcp13cstringstreamD1Ev+0x18>
ffffffff8000c108:	be 01 00 00 00       	mov    $0x1,%esi
ffffffff8000c10d:	e9 8e ff ff ff       	jmp    ffffffff8000c0a0 <_ZdlPvm>
ffffffff8000c112:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
}
ffffffff8000c118:	c3                   	ret
ffffffff8000c119:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff8000c120 <_ZN3kcp13cstringstreamlsEc>:

kcp::cstringstream& kcp::cstringstream::operator<<(char c) {
ffffffff8000c120:	55                   	push   %rbp
ffffffff8000c121:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000c124:	41 54                	push   %r12
ffffffff8000c126:	41 89 f4             	mov    %esi,%r12d
ffffffff8000c129:	53                   	push   %rbx
    this->string = (char *)Memory::g_heap->Realloc((void *)this->string, this->size + 2);
ffffffff8000c12a:	48 8b 47 08          	mov    0x8(%rdi),%rax
kcp::cstringstream& kcp::cstringstream::operator<<(char c) {
ffffffff8000c12e:	48 89 fb             	mov    %rdi,%rbx
    this->string = (char *)Memory::g_heap->Realloc((void *)this->string, this->size + 2);
ffffffff8000c131:	48 8b 37             	mov    (%rdi),%rsi
ffffffff8000c134:	48 8b 3d 7d 08 14 00 	mov    0x14087d(%rip),%rdi        # ffffffff8014c9b8 <_ZN6Memory6g_heapE>
ffffffff8000c13b:	48 8d 50 02          	lea    0x2(%rax),%rdx
ffffffff8000c13f:	e8 4c ed 00 00       	call   ffffffff8001ae90 <_ZN6Memory13HeapAllocator7ReallocEPvm>
ffffffff8000c144:	48 89 03             	mov    %rax,(%rbx)

    if (this->string == nullptr)
ffffffff8000c147:	48 85 c0             	test   %rax,%rax
ffffffff8000c14a:	74 1c                	je     ffffffff8000c168 <_ZN3kcp13cstringstreamlsEc+0x48>
    {
        Kt::KernelLogStream(Kt::ERROR, "kcp::cstringstream") << "Character streaming failed due to failed allocation.";
        return *this;
    }
    
    char* ref = (char *)&string[size];
ffffffff8000c14c:	48 03 43 08          	add    0x8(%rbx),%rax
    *ref = c;
ffffffff8000c150:	44 88 20             	mov    %r12b,(%rax)

    ref++;
    *ref = '\0';
ffffffff8000c153:	c6 40 01 00          	movb   $0x0,0x1(%rax)

    this->size++;
ffffffff8000c157:	48 83 43 08 01       	addq   $0x1,0x8(%rbx)

    return *this;
}
ffffffff8000c15c:	48 89 d8             	mov    %rbx,%rax
ffffffff8000c15f:	5b                   	pop    %rbx
ffffffff8000c160:	41 5c                	pop    %r12
ffffffff8000c162:	5d                   	pop    %rbp
ffffffff8000c163:	c3                   	ret
ffffffff8000c164:	0f 1f 40 00          	nopl   0x0(%rax)
ffffffff8000c168:	48 c7 c7 2d a6 02 80 	mov    $0xffffffff8002a62d,%rdi
            g_kernelLogDepth++;
ffffffff8000c16f:	83 05 2e 33 1d 00 01 	addl   $0x1,0x1d332e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000c176:	e8 45 70 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c17b:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000c182:	e8 39 70 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c187:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000c18e:	e8 2d 70 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c193:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff8000c19a:	e8 21 70 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c19f:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000c1a6:	e8 15 70 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c1ab:	48 c7 c7 60 c4 02 80 	mov    $0xffffffff8002c460,%rdi
ffffffff8000c1b2:	e8 09 70 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c1b7:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000c1be:	e8 fd 6f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000c1c3:	83 2d da 32 1d 00 01 	subl   $0x1,0x1d32da(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        return *this;
ffffffff8000c1ca:	eb 90                	jmp    ffffffff8000c15c <_ZN3kcp13cstringstreamlsEc+0x3c>
ffffffff8000c1cc:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8000c1d0 <_ZN3kcp13cstringstreamlsEPKc>:
    }

    return *this;
}

kcp::cstringstream& kcp::cstringstream::operator<<(const char* str) {
ffffffff8000c1d0:	55                   	push   %rbp
ffffffff8000c1d1:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000c1d4:	41 54                	push   %r12
ffffffff8000c1d6:	49 89 fc             	mov    %rdi,%r12
ffffffff8000c1d9:	53                   	push   %rbx
ffffffff8000c1da:	48 89 f3             	mov    %rsi,%rbx
    while (*str != '\0')
ffffffff8000c1dd:	0f be 36             	movsbl (%rsi),%esi
ffffffff8000c1e0:	40 84 f6             	test   %sil,%sil
ffffffff8000c1e3:	74 1f                	je     ffffffff8000c204 <_ZN3kcp13cstringstreamlsEPKc+0x34>
ffffffff8000c1e5:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000c1ec:	00 00 00 00 
        *this << *str;
ffffffff8000c1f0:	4c 89 e7             	mov    %r12,%rdi
        str++;
ffffffff8000c1f3:	48 83 c3 01          	add    $0x1,%rbx
        *this << *str;
ffffffff8000c1f7:	e8 24 ff ff ff       	call   ffffffff8000c120 <_ZN3kcp13cstringstreamlsEc>
    while (*str != '\0')
ffffffff8000c1fc:	0f be 33             	movsbl (%rbx),%esi
ffffffff8000c1ff:	40 84 f6             	test   %sil,%sil
ffffffff8000c202:	75 ec                	jne    ffffffff8000c1f0 <_ZN3kcp13cstringstreamlsEPKc+0x20>
    *this << (char*)str;

    return *this;
}
ffffffff8000c204:	4c 89 e0             	mov    %r12,%rax
ffffffff8000c207:	5b                   	pop    %rbx
ffffffff8000c208:	41 5c                	pop    %r12
ffffffff8000c20a:	5d                   	pop    %rbp
ffffffff8000c20b:	c3                   	ret
ffffffff8000c20c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8000c210 <_ZN3kcp13cstringstreamlsEi>:


kcp::cstringstream& kcp::cstringstream::operator<<(int num) {
ffffffff8000c210:	55                   	push   %rbp
ffffffff8000c211:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000c214:	41 54                	push   %r12
ffffffff8000c216:	49 89 fc             	mov    %rdi,%r12
ffffffff8000c219:	89 f7                	mov    %esi,%edi
ffffffff8000c21b:	53                   	push   %rbx
    char* out_str = Lib::int2basestr(num, current_base);
ffffffff8000c21c:	41 8b 74 24 10       	mov    0x10(%r12),%esi
ffffffff8000c221:	e8 5a e1 00 00       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
    while (*str != '\0')
ffffffff8000c226:	0f be 30             	movsbl (%rax),%esi
ffffffff8000c229:	40 84 f6             	test   %sil,%sil
ffffffff8000c22c:	74 26                	je     ffffffff8000c254 <_ZN3kcp13cstringstreamlsEi+0x44>
ffffffff8000c22e:	48 89 c3             	mov    %rax,%rbx
ffffffff8000c231:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000c238:	00 00 00 00 
ffffffff8000c23c:	0f 1f 40 00          	nopl   0x0(%rax)
        *this << *str;
ffffffff8000c240:	4c 89 e7             	mov    %r12,%rdi
        str++;
ffffffff8000c243:	48 83 c3 01          	add    $0x1,%rbx
        *this << *str;
ffffffff8000c247:	e8 d4 fe ff ff       	call   ffffffff8000c120 <_ZN3kcp13cstringstreamlsEc>
    while (*str != '\0')
ffffffff8000c24c:	0f be 33             	movsbl (%rbx),%esi
ffffffff8000c24f:	40 84 f6             	test   %sil,%sil
ffffffff8000c252:	75 ec                	jne    ffffffff8000c240 <_ZN3kcp13cstringstreamlsEi+0x30>

    *this << out_str;
    return *this;
}
ffffffff8000c254:	4c 89 e0             	mov    %r12,%rax
ffffffff8000c257:	5b                   	pop    %rbx
ffffffff8000c258:	41 5c                	pop    %r12
ffffffff8000c25a:	5d                   	pop    %rbp
ffffffff8000c25b:	c3                   	ret
ffffffff8000c25c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8000c260 <_ZN3kcp13cstringstream5c_strEv>:
    
    return *this;
}

const char* kcp::cstringstream::c_str() {
    return this->string;
ffffffff8000c260:	48 8b 07             	mov    (%rdi),%rax
ffffffff8000c263:	c3                   	ret
ffffffff8000c264:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000c26b:	00 00 00 
ffffffff8000c26e:	66 90                	xchg   %ax,%ax

ffffffff8000c270 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv>:

    // =========================================================================
    // Public API
    // =========================================================================

    void Initialize() {
ffffffff8000c270:	55                   	push   %rbp
            Print(string);
ffffffff8000c271:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
ffffffff8000c278:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000c27b:	41 57                	push   %r15
ffffffff8000c27d:	41 56                	push   %r14
ffffffff8000c27f:	41 55                	push   %r13
ffffffff8000c281:	41 54                	push   %r12
ffffffff8000c283:	45 31 e4             	xor    %r12d,%r12d
ffffffff8000c286:	53                   	push   %rbx
ffffffff8000c287:	48 83 ec 18          	sub    $0x18,%rsp
            g_kernelLogDepth++;
ffffffff8000c28b:	83 05 12 32 1d 00 01 	addl   $0x1,0x1d3212(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000c292:	e8 29 6f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c297:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000c29e:	e8 1d 6f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c2a3:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000c2aa:	e8 11 6f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c2af:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000c2b6:	e8 05 6f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c2bb:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000c2c2:	e8 f9 6e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c2c7:	48 c7 c7 98 c4 02 80 	mov    $0xffffffff8002c498,%rdi
ffffffff8000c2ce:	e8 ed 6e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c2d3:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000c2da:	e8 e1 6e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000c2df:	83 2d be 31 1d 00 01 	subl   $0x1,0x1d31be(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        auto& devices = Pci::GetDevices();
ffffffff8000c2e6:	e8 05 3f 01 00       	call   ffffffff800201f0 <_ZN3Pci10GetDevicesEv>
        for (uint64_t i = 0; i < devices.size(); i++) {
ffffffff8000c2eb:	48 83 78 08 00       	cmpq   $0x0,0x8(%rax)
ffffffff8000c2f0:	48 89 c3             	mov    %rax,%rbx
ffffffff8000c2f3:	75 19                	jne    ffffffff8000c30e <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x9e>
ffffffff8000c2f5:	e9 b6 18 00 00       	jmp    ffffffff8000dbb0 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1940>
ffffffff8000c2fa:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff8000c300:	49 83 c4 01          	add    $0x1,%r12
ffffffff8000c304:	4c 3b 63 08          	cmp    0x8(%rbx),%r12
ffffffff8000c308:	0f 83 a2 18 00 00    	jae    ffffffff8000dbb0 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1940>
            if (position > (capacity - 1)) {
ffffffff8000c30e:	48 8b 43 10          	mov    0x10(%rbx),%rax
ffffffff8000c312:	48 83 e8 01          	sub    $0x1,%rax
ffffffff8000c316:	4c 39 e0             	cmp    %r12,%rax
ffffffff8000c319:	0f 83 64 18 00 00    	jae    ffffffff8000db83 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1913>
            Print(string);
ffffffff8000c31f:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000c326:	e8 95 6e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c32b:	48 c7 c7 44 a4 02 80 	mov    $0xffffffff8002a444,%rdi
ffffffff8000c332:	e8 89 6e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c337:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000c33e:	e8 7d 6e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c343:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000c34a:	e8 71 6e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c34f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000c356:	e8 65 6e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c35b:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000c362:	e8 59 6e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                return array[position];
ffffffff8000c367:	48 8b 03             	mov    (%rbx),%rax
            if (devices[i].VendorId != VendorIntel) {
ffffffff8000c36a:	66 81 78 06 86 80    	cmpw   $0x8086,0x6(%rax)
ffffffff8000c370:	75 8e                	jne    ffffffff8000c300 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x90>
            if (position > (capacity - 1)) {
ffffffff8000c372:	48 8b 4b 10          	mov    0x10(%rbx),%rcx
ffffffff8000c376:	48 8d 51 ff          	lea    -0x1(%rcx),%rdx
ffffffff8000c37a:	4c 39 e2             	cmp    %r12,%rdx
ffffffff8000c37d:	0f 83 05 1b 00 00    	jae    ffffffff8000de88 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1c18>
ffffffff8000c383:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000c38a:	e8 31 6e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c38f:	48 c7 c7 44 a4 02 80 	mov    $0xffffffff8002a444,%rdi
ffffffff8000c396:	e8 25 6e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c39b:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000c3a2:	e8 19 6e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c3a7:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000c3ae:	e8 0d 6e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c3b3:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000c3ba:	e8 01 6e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c3bf:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000c3c6:	e8 f5 6d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                return array[position];
ffffffff8000c3cb:	48 8b 03             	mov    (%rbx),%rax
ffffffff8000c3ce:	48 89 c2             	mov    %rax,%rdx
            if (devices[i].ClassCode != ClassDisplay) {
ffffffff8000c3d1:	80 7a 0a 03          	cmpb   $0x3,0xa(%rdx)
ffffffff8000c3d5:	0f 85 25 ff ff ff    	jne    ffffffff8000c300 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x90>
            if (position > (capacity - 1)) {
ffffffff8000c3db:	48 8b 53 10          	mov    0x10(%rbx),%rdx
                return array[position];
ffffffff8000c3df:	4d 89 e6             	mov    %r12,%r14
ffffffff8000c3e2:	49 c1 e6 04          	shl    $0x4,%r14
            if (position > (capacity - 1)) {
ffffffff8000c3e6:	48 83 ea 01          	sub    $0x1,%rdx
                return array[position];
ffffffff8000c3ea:	49 01 c6             	add    %rax,%r14
            if (position > (capacity - 1)) {
ffffffff8000c3ed:	4c 39 e2             	cmp    %r12,%rdx
ffffffff8000c3f0:	73 56                	jae    ffffffff8000c448 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1d8>
ffffffff8000c3f2:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000c3f9:	e8 c2 6d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c3fe:	48 c7 c7 44 a4 02 80 	mov    $0xffffffff8002a444,%rdi
ffffffff8000c405:	e8 b6 6d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c40a:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000c411:	e8 aa 6d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c416:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000c41d:	e8 9e 6d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c422:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000c429:	e8 92 6d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c42e:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000c435:	e8 86 6d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                return array[position];
ffffffff8000c43a:	48 8b 03             	mov    (%rbx),%rax
            if (position > (capacity - 1)) {
ffffffff8000c43d:	48 8b 53 10          	mov    0x10(%rbx),%rdx
                return array[position];
ffffffff8000c441:	49 89 c6             	mov    %rax,%r14
ffffffff8000c444:	48 83 ea 01          	sub    $0x1,%rdx
ffffffff8000c448:	45 31 ed             	xor    %r13d,%r13d
ffffffff8000c44b:	eb 19                	jmp    ffffffff8000c466 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1f6>
ffffffff8000c44d:	0f 1f 00             	nopl   (%rax)
            for (int j = 0; j < SupportedDeviceCount; j++) {
ffffffff8000c450:	49 83 c5 01          	add    $0x1,%r13
ffffffff8000c454:	49 83 fd 3d          	cmp    $0x3d,%r13
ffffffff8000c458:	0f 84 c0 17 00 00    	je     ffffffff8000dc1e <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x19ae>
            if (position > (capacity - 1)) {
ffffffff8000c45e:	48 8b 53 10          	mov    0x10(%rbx),%rdx
ffffffff8000c462:	48 83 ea 01          	sub    $0x1,%rdx
ffffffff8000c466:	4c 39 e2             	cmp    %r12,%rdx
ffffffff8000c469:	0f 83 1c 13 00 00    	jae    ffffffff8000d78b <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x151b>
ffffffff8000c46f:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000c476:	e8 45 6d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c47b:	48 c7 c7 44 a4 02 80 	mov    $0xffffffff8002a444,%rdi
ffffffff8000c482:	e8 39 6d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c487:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000c48e:	e8 2d 6d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c493:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000c49a:	e8 21 6d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c49f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000c4a6:	e8 15 6d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c4ab:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000c4b2:	e8 09 6d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            return t;
ffffffff8000c4b7:	48 8b 03             	mov    (%rbx),%rax
            Print(string);
ffffffff8000c4ba:	31 d2                	xor    %edx,%edx
                if (devices[i].DeviceId == SupportedDevices[j].deviceId) {
ffffffff8000c4bc:	4c 89 e9             	mov    %r13,%rcx
ffffffff8000c4bf:	48 c1 e1 04          	shl    $0x4,%rcx
ffffffff8000c4c3:	0f b7 89 40 d2 02 80 	movzwl -0x7ffd2dc0(%rcx),%ecx
ffffffff8000c4ca:	66 39 4c 10 08       	cmp    %cx,0x8(%rax,%rdx,1)
ffffffff8000c4cf:	0f 85 7b ff ff ff    	jne    ffffffff8000c450 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1e0>
                    matchedInfo = &SupportedDevices[j];
ffffffff8000c4d5:	4d 63 ed             	movslq %r13d,%r13
ffffffff8000c4d8:	49 c1 e5 04          	shl    $0x4,%r13
ffffffff8000c4dc:	49 81 c5 40 d2 02 80 	add    $0xffffffff8002d240,%r13
            g_kernelLogDepth++;
ffffffff8000c4e3:	8b 05 bb 2f 1d 00    	mov    0x1d2fbb(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000c4e9:	83 c0 01             	add    $0x1,%eax
        if (found == nullptr) {
ffffffff8000c4ec:	4d 85 f6             	test   %r14,%r14
ffffffff8000c4ef:	0f 84 bb 16 00 00    	je     ffffffff8000dbb0 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1940>
        g_gpuInfo.pciBus      = found->Bus;
ffffffff8000c4f5:	41 0f b7 56 02       	movzwl 0x2(%r14),%edx
ffffffff8000c4fa:	66 89 15 0f 9d 13 00 	mov    %dx,0x139d0f(%rip)        # ffffffff80146210 <_ZN7Drivers8Graphics8IntelGPUL9g_gpuInfoE+0x10>
        g_gpuInfo.pciFunction = found->Function;
ffffffff8000c501:	41 0f b6 56 04       	movzbl 0x4(%r14),%edx
ffffffff8000c506:	88 15 06 9d 13 00    	mov    %dl,0x139d06(%rip)        # ffffffff80146212 <_ZN7Drivers8Graphics8IntelGPUL9g_gpuInfoE+0x12>
        g_gpuInfo.deviceId    = found->DeviceId;
ffffffff8000c50c:	41 0f b7 56 08       	movzwl 0x8(%r14),%edx
ffffffff8000c511:	66 89 15 e8 9c 13 00 	mov    %dx,0x139ce8(%rip)        # ffffffff80146200 <_ZN7Drivers8Graphics8IntelGPUL9g_gpuInfoE>
        if (matchedInfo != nullptr) {
ffffffff8000c518:	4d 85 ed             	test   %r13,%r13
ffffffff8000c51b:	0f 84 76 12 00 00    	je     ffffffff8000d797 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1527>
            g_gpuInfo.gen  = matchedInfo->gen;
ffffffff8000c521:	41 0f b6 55 02       	movzbl 0x2(%r13),%edx
            Print(string);
ffffffff8000c526:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000c52d:	89 05 71 2f 1d 00    	mov    %eax,0x1d2f71(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000c533:	88 15 c9 9c 13 00    	mov    %dl,0x139cc9(%rip)        # ffffffff80146202 <_ZN7Drivers8Graphics8IntelGPUL9g_gpuInfoE+0x2>
            g_gpuInfo.name = matchedInfo->name;
ffffffff8000c539:	49 8b 55 08          	mov    0x8(%r13),%rdx
ffffffff8000c53d:	48 89 15 c4 9c 13 00 	mov    %rdx,0x139cc4(%rip)        # ffffffff80146208 <_ZN7Drivers8Graphics8IntelGPUL9g_gpuInfoE+0x8>
            Print(string);
ffffffff8000c544:	e8 77 6c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c549:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000c550:	e8 6b 6c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c555:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000c55c:	e8 5f 6c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c561:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000c568:	e8 53 6c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c56d:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000c574:	e8 47 6c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c579:	48 c7 c7 8b a6 02 80 	mov    $0xffffffff8002a68b,%rdi
ffffffff8000c580:	e8 3b 6c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c585:	49 8b 7d 08          	mov    0x8(%r13),%rdi
ffffffff8000c589:	e8 32 6c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c58e:	48 c7 c7 92 a6 02 80 	mov    $0xffffffff8002a692,%rdi
ffffffff8000c595:	e8 26 6c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << " (device " << base::hex << (uint64_t)found->DeviceId << ")"
ffffffff8000c59a:	41 0f b7 7e 08       	movzwl 0x8(%r14),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000c59f:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000c5a4:	e8 e7 de 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000c5a9:	48 89 c7             	mov    %rax,%rdi
ffffffff8000c5ac:	e8 0f 6c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000c5b1:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff8000c5b8:	e8 03 6c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c5bd:	48 c7 c7 10 ad 02 80 	mov    $0xffffffff8002ad10,%rdi
ffffffff8000c5c4:	e8 f7 6b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << " at PCI " << (uint64_t)found->Bus << ":"
ffffffff8000c5c9:	41 0f b6 7e 02       	movzbl 0x2(%r14),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000c5ce:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000c5d3:	e8 b8 de 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000c5d8:	48 89 c7             	mov    %rax,%rdi
ffffffff8000c5db:	e8 e0 6b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000c5e0:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff8000c5e7:	e8 d4 6b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << (uint64_t)found->Device << "." << (uint64_t)found->Function;
ffffffff8000c5ec:	41 0f b6 7e 03       	movzbl 0x3(%r14),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000c5f1:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000c5f6:	e8 95 de 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000c5fb:	48 89 c7             	mov    %rax,%rdi
ffffffff8000c5fe:	e8 bd 6b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000c603:	48 c7 c7 57 ae 02 80 	mov    $0xffffffff8002ae57,%rdi
ffffffff8000c60a:	e8 b1 6b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c60f:	41 0f b6 7e 04       	movzbl 0x4(%r14),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000c614:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000c619:	e8 72 de 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000c61e:	48 89 c7             	mov    %rax,%rdi
            Print(string);
ffffffff8000c621:	e8 9a 6b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c626:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000c62d:	e8 8e 6b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000c632:	8b 05 6c 2e 1d 00    	mov    0x1d2e6c(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        uint32_t bar0Low = Pci::LegacyRead32(bus, dev, func, (uint8_t)PCI_REG_BAR0);
ffffffff8000c638:	b9 10 00 00 00       	mov    $0x10,%ecx
ffffffff8000c63d:	44 0f b6 3d cd 9b 13 	movzbl 0x139bcd(%rip),%r15d        # ffffffff80146212 <_ZN7Drivers8Graphics8IntelGPUL9g_gpuInfoE+0x12>
ffffffff8000c644:	00 
ffffffff8000c645:	44 0f b6 35 c4 9b 13 	movzbl 0x139bc4(%rip),%r14d        # ffffffff80146211 <_ZN7Drivers8Graphics8IntelGPUL9g_gpuInfoE+0x11>
ffffffff8000c64c:	00 
ffffffff8000c64d:	83 e8 01             	sub    $0x1,%eax
ffffffff8000c650:	44 89 fa             	mov    %r15d,%edx
ffffffff8000c653:	89 05 4b 2e 1d 00    	mov    %eax,0x1d2e4b(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        g_gpuGen = g_gpuInfo.gen;
ffffffff8000c659:	0f b6 05 a2 9b 13 00 	movzbl 0x139ba2(%rip),%eax        # ffffffff80146202 <_ZN7Drivers8Graphics8IntelGPUL9g_gpuInfoE+0x2>
        uint32_t bar0Low = Pci::LegacyRead32(bus, dev, func, (uint8_t)PCI_REG_BAR0);
ffffffff8000c660:	44 89 f6             	mov    %r14d,%esi
        g_gpuGen = g_gpuInfo.gen;
ffffffff8000c663:	88 05 6f 9b 13 00    	mov    %al,0x139b6f(%rip)        # ffffffff801461d8 <_ZN7Drivers8Graphics8IntelGPUL8g_gpuGenE>
        uint32_t bar0Low = Pci::LegacyRead32(bus, dev, func, (uint8_t)PCI_REG_BAR0);
ffffffff8000c669:	0f b6 05 a0 9b 13 00 	movzbl 0x139ba0(%rip),%eax        # ffffffff80146210 <_ZN7Drivers8Graphics8IntelGPUL9g_gpuInfoE+0x10>
ffffffff8000c670:	89 c7                	mov    %eax,%edi
ffffffff8000c672:	89 45 c8             	mov    %eax,-0x38(%rbp)
ffffffff8000c675:	e8 86 34 01 00       	call   ffffffff8001fb00 <_ZN3Pci12LegacyRead32Ehhhh>
        uint64_t mmioPhys = bar0Low & 0xFFFFFFF0u; // Mask off type/prefetchable bits
ffffffff8000c67a:	41 89 c4             	mov    %eax,%r12d
ffffffff8000c67d:	41 83 e4 f0          	and    $0xfffffff0,%r12d
        if (bar0Low & 0x04) {
ffffffff8000c681:	a8 04                	test   $0x4,%al
ffffffff8000c683:	0f 85 76 15 00 00    	jne    ffffffff8000dbff <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x198f>
            Print(string);
ffffffff8000c689:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth--;
ffffffff8000c690:	4d 89 e5             	mov    %r12,%r13
            g_kernelLogDepth++;
ffffffff8000c693:	83 05 0a 2e 1d 00 01 	addl   $0x1,0x1d2e0a(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        g_gpuInfo.mmioPhys = mmioPhys;
ffffffff8000c69a:	4c 89 25 77 9b 13 00 	mov    %r12,0x139b77(%rip)        # ffffffff80146218 <_ZN7Drivers8Graphics8IntelGPUL9g_gpuInfoE+0x18>
        g_gpuInfo.mmioSize = 0x200000; // Map 2MB of MMIO space
ffffffff8000c6a1:	49 8d 9c 24 00 00 20 	lea    0x200000(%r12),%rbx
ffffffff8000c6a8:	00 
ffffffff8000c6a9:	48 c7 05 6c 9b 13 00 	movq   $0x200000,0x139b6c(%rip)        # ffffffff80146220 <_ZN7Drivers8Graphics8IntelGPUL9g_gpuInfoE+0x20>
ffffffff8000c6b0:	00 00 20 00 
            Print(string);
ffffffff8000c6b4:	e8 07 6b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c6b9:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000c6c0:	e8 fb 6a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c6c5:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000c6cc:	e8 ef 6a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c6d1:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000c6d8:	e8 e3 6a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c6dd:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000c6e4:	e8 d7 6a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c6e9:	48 c7 c7 a6 a6 02 80 	mov    $0xffffffff8002a6a6,%rdi
ffffffff8000c6f0:	e8 cb 6a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000c6f5:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000c6fa:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000c6fd:	e8 8e dd 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000c702:	48 89 c7             	mov    %rax,%rdi
ffffffff8000c705:	e8 b6 6a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000c70a:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000c711:	e8 aa 6a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000c716:	83 2d 87 2d 1d 00 01 	subl   $0x1,0x1d2d87(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        for (uint64_t offset = 0; offset < 0x200000; offset += 0x1000) {
ffffffff8000c71d:	0f 1f 00             	nopl   (%rax)
        return HHDMBase + address;
ffffffff8000c720:	48 8b 15 81 02 14 00 	mov    0x140281(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            Memory::VMM::g_paging->MapMMIO(mmioPhys + offset, Memory::HHDM(mmioPhys + offset));
ffffffff8000c727:	48 8b 3d 92 02 14 00 	mov    0x140292(%rip),%rdi        # ffffffff8014c9c0 <_ZN6Memory3VMM8g_pagingE>
ffffffff8000c72e:	4c 89 ee             	mov    %r13,%rsi
ffffffff8000c731:	4c 01 ea             	add    %r13,%rdx
        for (uint64_t offset = 0; offset < 0x200000; offset += 0x1000) {
ffffffff8000c734:	49 81 c5 00 10 00 00 	add    $0x1000,%r13
            Memory::VMM::g_paging->MapMMIO(mmioPhys + offset, Memory::HHDM(mmioPhys + offset));
ffffffff8000c73b:	e8 80 f1 00 00       	call   ffffffff8001b8c0 <_ZN6Memory3VMM6Paging7MapMMIOEmm>
        for (uint64_t offset = 0; offset < 0x200000; offset += 0x1000) {
ffffffff8000c740:	4c 39 eb             	cmp    %r13,%rbx
ffffffff8000c743:	75 db                	jne    ffffffff8000c720 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x4b0>
ffffffff8000c745:	4c 03 25 5c 02 14 00 	add    0x14025c(%rip),%r12        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            Print(string);
ffffffff8000c74c:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000c753:	83 05 4a 2d 1d 00 01 	addl   $0x1,0x1d2d4a(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        g_mmioBase = (volatile uint8_t*)Memory::HHDM(mmioPhys);
ffffffff8000c75a:	4c 89 25 97 9a 13 00 	mov    %r12,0x139a97(%rip)        # ffffffff801461f8 <_ZN7Drivers8Graphics8IntelGPUL10g_mmioBaseE>
            Print(string);
ffffffff8000c761:	e8 5a 6a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c766:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000c76d:	e8 4e 6a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c772:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000c779:	e8 42 6a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c77e:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000c785:	e8 36 6a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c78a:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000c791:	e8 2a 6a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c796:	48 c7 c7 b6 a6 02 80 	mov    $0xffffffff8002a6b6,%rdi
ffffffff8000c79d:	e8 1e 6a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000c7a2:	48 8b 3d 4f 9a 13 00 	mov    0x139a4f(%rip),%rdi        # ffffffff801461f8 <_ZN7Drivers8Graphics8IntelGPUL10g_mmioBaseE>
ffffffff8000c7a9:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000c7ae:	e8 dd dc 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000c7b3:	48 89 c7             	mov    %rax,%rdi
ffffffff8000c7b6:	e8 05 6a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000c7bb:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000c7c2:	e8 f9 69 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        uint16_t pciCmd = Pci::LegacyRead16(bus, dev, func, (uint8_t)PCI_REG_COMMAND);
ffffffff8000c7c7:	8b 5d c8             	mov    -0x38(%rbp),%ebx
ffffffff8000c7ca:	b9 04 00 00 00       	mov    $0x4,%ecx
ffffffff8000c7cf:	44 89 fa             	mov    %r15d,%edx
ffffffff8000c7d2:	44 89 f6             	mov    %r14d,%esi
            g_kernelLogDepth--;
ffffffff8000c7d5:	83 2d c8 2c 1d 00 01 	subl   $0x1,0x1d2cc8(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000c7dc:	89 df                	mov    %ebx,%edi
ffffffff8000c7de:	e8 5d 33 01 00       	call   ffffffff8001fb40 <_ZN3Pci12LegacyRead16Ehhhh>
        Pci::LegacyWrite16(bus, dev, func, (uint8_t)PCI_REG_COMMAND, pciCmd);
ffffffff8000c7e3:	b9 04 00 00 00       	mov    $0x4,%ecx
ffffffff8000c7e8:	44 89 fa             	mov    %r15d,%edx
ffffffff8000c7eb:	44 89 f6             	mov    %r14d,%esi
        pciCmd |= PCI_CMD_MEM_SPACE | PCI_CMD_BUS_MASTER;
ffffffff8000c7ee:	83 c8 06             	or     $0x6,%eax
        Pci::LegacyWrite16(bus, dev, func, (uint8_t)PCI_REG_COMMAND, pciCmd);
ffffffff8000c7f1:	89 df                	mov    %ebx,%edi
ffffffff8000c7f3:	44 0f b7 c0          	movzwl %ax,%r8d
ffffffff8000c7f7:	e8 24 34 01 00       	call   ffffffff8001fc20 <_ZN3Pci13LegacyWrite16Ehhhht>
            Print(string);
ffffffff8000c7fc:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000c803:	83 05 9a 2c 1d 00 01 	addl   $0x1,0x1d2c9a(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000c80a:	e8 b1 69 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c80f:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000c816:	e8 a5 69 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c81b:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000c822:	e8 99 69 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c827:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000c82e:	e8 8d 69 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c833:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000c83a:	e8 81 69 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c83f:	48 c7 c7 40 c5 02 80 	mov    $0xffffffff8002c540,%rdi
ffffffff8000c846:	e8 75 69 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c84b:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000c852:	e8 69 69 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000c857:	8b 05 47 2c 1d 00    	mov    0x1d2c47(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000c85d:	8d 50 ff             	lea    -0x1(%rax),%edx
ffffffff8000c860:	89 15 3e 2c 1d 00    	mov    %edx,0x1d2c3e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000c866:	48 8b 15 8b 99 13 00 	mov    0x13998b(%rip),%rdx        # ffffffff801461f8 <_ZN7Drivers8Graphics8IntelGPUL10g_mmioBaseE>
ffffffff8000c86d:	8b 8a 00 14 07 00    	mov    0x71400(%rdx),%ecx
        if (vgaCtrl & VGACNTRL_DISABLE) {
ffffffff8000c873:	85 c9                	test   %ecx,%ecx
ffffffff8000c875:	0f 88 ab 13 00 00    	js     ffffffff8000dc26 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x19b6>
namespace Io {
    // OSDev website has the parameters for out(b/w/l) in the opposite order in their example,
    // (port, then value), but the manpage on GNU ('man outb') has it in this order.

    inline void Out8(uint8_t value, uint16_t port) {
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff8000c87b:	41 b8 01 00 00 00    	mov    $0x1,%r8d
ffffffff8000c881:	ba c4 03 00 00       	mov    $0x3c4,%edx
ffffffff8000c886:	44 89 c0             	mov    %r8d,%eax
ffffffff8000c889:	ee                   	out    %al,(%dx)
        asm ("outl %0, %1" : : "a"(value), "Nd"(port) : "memory");
    }

    inline uint8_t In8(uint16_t port) {
        uint8_t result;
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff8000c88a:	bf c5 03 00 00       	mov    $0x3c5,%edi
ffffffff8000c88f:	89 fa                	mov    %edi,%edx
ffffffff8000c891:	ec                   	in     (%dx),%al
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff8000c892:	ba c4 03 00 00       	mov    $0x3c4,%edx
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff8000c897:	89 c6                	mov    %eax,%esi
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff8000c899:	44 89 c0             	mov    %r8d,%eax
ffffffff8000c89c:	ee                   	out    %al,(%dx)
        sr01 |= (1 << 5);
ffffffff8000c89d:	89 f0                	mov    %esi,%eax
ffffffff8000c89f:	89 fa                	mov    %edi,%edx
ffffffff8000c8a1:	83 c8 20             	or     $0x20,%eax
ffffffff8000c8a4:	ee                   	out    %al,(%dx)
        *(volatile uint32_t*)(g_mmioBase + reg) = val;
ffffffff8000c8a5:	48 8b 05 4c 99 13 00 	mov    0x13994c(%rip),%rax        # ffffffff801461f8 <_ZN7Drivers8Graphics8IntelGPUL10g_mmioBaseE>
        vgaCtrl |= VGACNTRL_DISABLE;
ffffffff8000c8ac:	81 c9 00 00 00 80    	or     $0x80000000,%ecx
            Print(string);
ffffffff8000c8b2:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000c8b9:	83 05 e4 2b 1d 00 01 	addl   $0x1,0x1d2be4(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        *(volatile uint32_t*)(g_mmioBase + reg) = val;
ffffffff8000c8c0:	89 88 00 14 07 00    	mov    %ecx,0x71400(%rax)
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000c8c6:	8b 80 00 14 07 00    	mov    0x71400(%rax),%eax
            Print(string);
ffffffff8000c8cc:	e8 ef 68 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c8d1:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000c8d8:	e8 e3 68 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c8dd:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000c8e4:	e8 d7 68 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c8e9:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000c8f0:	e8 cb 68 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c8f5:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000c8fc:	e8 bf 68 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c901:	48 c7 c7 ce a6 02 80 	mov    $0xffffffff8002a6ce,%rdi
ffffffff8000c908:	e8 b3 68 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c90d:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000c914:	e8 a7 68 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000c919:	8b 0d 85 2b 1d 00    	mov    0x1d2b85(%rip),%ecx        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000c91f:	48 8b 05 d2 98 13 00 	mov    0x1398d2(%rip),%rax        # ffffffff801461f8 <_ZN7Drivers8Graphics8IntelGPUL10g_mmioBaseE>
            Print(string);
ffffffff8000c926:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000c92d:	89 0d 71 2b 1d 00    	mov    %ecx,0x1d2b71(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000c933:	44 8b b8 08 00 07 00 	mov    0x70008(%rax),%r15d
ffffffff8000c93a:	8b 90 80 01 07 00    	mov    0x70180(%rax),%edx
ffffffff8000c940:	8b b0 9c 01 07 00    	mov    0x7019c(%rax),%esi
ffffffff8000c946:	44 8b a0 88 01 07 00 	mov    0x70188(%rax),%r12d
ffffffff8000c94d:	89 55 c4             	mov    %edx,-0x3c(%rbp)
ffffffff8000c950:	44 8b b0 00 00 06 00 	mov    0x60000(%rax),%r14d
ffffffff8000c957:	89 75 c8             	mov    %esi,-0x38(%rbp)
ffffffff8000c95a:	44 8b a8 0c 00 06 00 	mov    0x6000c(%rax),%r13d
ffffffff8000c961:	8b 98 1c 00 06 00    	mov    0x6001c(%rax),%ebx
            Print(string);
ffffffff8000c967:	e8 54 68 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c96c:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000c973:	e8 48 68 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c978:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000c97f:	e8 3c 68 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c984:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000c98b:	e8 30 68 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c990:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000c997:	e8 24 68 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c99c:	48 c7 c7 e1 a6 02 80 	mov    $0xffffffff8002a6e1,%rdi
ffffffff8000c9a3:	e8 18 68 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (pipeEnabled ? "ENABLED" : "DISABLED")
ffffffff8000c9a8:	48 c7 c0 40 a6 02 80 	mov    $0xffffffff8002a640,%rax
ffffffff8000c9af:	45 85 ff             	test   %r15d,%r15d
ffffffff8000c9b2:	48 c7 c7 48 a6 02 80 	mov    $0xffffffff8002a648,%rdi
ffffffff8000c9b9:	48 0f 48 f8          	cmovs  %rax,%rdi
ffffffff8000c9bd:	e8 fe 67 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c9c2:	48 c7 c7 ea a6 02 80 	mov    $0xffffffff8002a6ea,%rdi
ffffffff8000c9c9:	e8 f2 67 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << ", Plane A: " << (planeEnabled ? "ENABLED" : "DISABLED");
ffffffff8000c9ce:	8b 55 c4             	mov    -0x3c(%rbp),%edx
ffffffff8000c9d1:	48 c7 c0 40 a6 02 80 	mov    $0xffffffff8002a640,%rax
ffffffff8000c9d8:	48 c7 c7 48 a6 02 80 	mov    $0xffffffff8002a648,%rdi
ffffffff8000c9df:	85 d2                	test   %edx,%edx
ffffffff8000c9e1:	48 0f 48 f8          	cmovs  %rax,%rdi
ffffffff8000c9e5:	e8 d6 67 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c9ea:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000c9f1:	e8 ca 67 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000c9f6:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
ffffffff8000c9fd:	e8 be 67 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ca02:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000ca09:	e8 b2 67 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ca0e:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000ca15:	e8 a6 67 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ca1a:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000ca21:	e8 9a 67 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ca26:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000ca2d:	e8 8e 67 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ca32:	48 c7 c7 f6 a6 02 80 	mov    $0xffffffff8002a6f6,%rdi
ffffffff8000ca39:	e8 82 67 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        KernelLogStream(INFO, "IntelGPU") << "DSPASURF: " << base::hex << (uint64_t)dspaSurf
ffffffff8000ca3e:	8b 7d c8             	mov    -0x38(%rbp),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000ca41:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000ca46:	e8 45 da 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000ca4b:	48 89 c7             	mov    %rax,%rdi
ffffffff8000ca4e:	e8 6d 67 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000ca53:	48 c7 c7 01 a7 02 80 	mov    $0xffffffff8002a701,%rdi
ffffffff8000ca5a:	e8 61 67 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << ", DSPASTRIDE: " << (uint64_t)dspaStride;
ffffffff8000ca5f:	44 89 e2             	mov    %r12d,%edx
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000ca62:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000ca67:	48 89 d7             	mov    %rdx,%rdi
ffffffff8000ca6a:	48 89 55 c8          	mov    %rdx,-0x38(%rbp)
ffffffff8000ca6e:	e8 1d da 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000ca73:	48 89 c7             	mov    %rax,%rdi
ffffffff8000ca76:	e8 45 67 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000ca7b:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000ca82:	e8 39 67 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ca87:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
ffffffff8000ca8e:	e8 2d 67 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ca93:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000ca9a:	e8 21 67 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ca9f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000caa6:	e8 15 67 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000caab:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000cab2:	e8 09 67 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cab7:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000cabe:	e8 fd 66 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cac3:	48 c7 c7 10 a7 02 80 	mov    $0xffffffff8002a710,%rdi
ffffffff8000caca:	e8 f1 66 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000cacf:	be 10 00 00 00       	mov    $0x10,%esi
        KernelLogStream(INFO, "IntelGPU") << "HTOTAL_A: " << base::hex << (uint64_t)htotal
ffffffff8000cad4:	44 89 f7             	mov    %r14d,%edi
ffffffff8000cad7:	e8 b4 d9 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000cadc:	48 89 c7             	mov    %rax,%rdi
ffffffff8000cadf:	e8 dc 66 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000cae4:	48 c7 c7 1b a7 02 80 	mov    $0xffffffff8002a71b,%rdi
ffffffff8000caeb:	e8 d0 66 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000caf0:	be 10 00 00 00       	mov    $0x10,%esi
            << ", VTOTAL_A: " << (uint64_t)vtotal
ffffffff8000caf5:	44 89 ef             	mov    %r13d,%edi
ffffffff8000caf8:	e8 93 d9 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000cafd:	48 89 c7             	mov    %rax,%rdi
ffffffff8000cb00:	e8 bb 66 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000cb05:	48 c7 c7 28 a7 02 80 	mov    $0xffffffff8002a728,%rdi
ffffffff8000cb0c:	e8 af 66 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000cb11:	be 10 00 00 00       	mov    $0x10,%esi
            << ", PIPEASRC: " << (uint64_t)pipeSrc;
ffffffff8000cb16:	89 df                	mov    %ebx,%edi
ffffffff8000cb18:	e8 73 d9 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000cb1d:	48 89 c7             	mov    %rax,%rdi
ffffffff8000cb20:	e8 9b 66 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000cb25:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000cb2c:	e8 8f 66 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000cb31:	8b 0d 6d 29 1d 00    	mov    0x1d296d(%rip),%ecx        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        if (pipeSrc != 0) {
ffffffff8000cb37:	85 db                	test   %ebx,%ebx
ffffffff8000cb39:	48 8b 55 c8          	mov    -0x38(%rbp),%rdx
ffffffff8000cb3d:	8d 41 ff             	lea    -0x1(%rcx),%eax
ffffffff8000cb40:	89 05 5e 29 1d 00    	mov    %eax,0x1d295e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000cb46:	0f 84 4f 0d 00 00    	je     ffffffff8000d89b <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x162b>
            g_fbWidth  = ((pipeSrc >> 16) & 0xFFFF) + 1;
ffffffff8000cb4c:	89 d8                	mov    %ebx,%eax
            g_fbHeight = (pipeSrc & 0xFFFF) + 1;
ffffffff8000cb4e:	0f b7 db             	movzwl %bx,%ebx
            g_fbWidth  = ((pipeSrc >> 16) & 0xFFFF) + 1;
ffffffff8000cb51:	c1 e8 10             	shr    $0x10,%eax
            g_fbHeight = (pipeSrc & 0xFFFF) + 1;
ffffffff8000cb54:	48 8d 73 01          	lea    0x1(%rbx),%rsi
            g_fbWidth  = ((pipeSrc >> 16) & 0xFFFF) + 1;
ffffffff8000cb58:	83 c0 01             	add    $0x1,%eax
            g_fbWidth  = (htotal & 0xFFF) + 1;
ffffffff8000cb5b:	48 89 05 5e 96 13 00 	mov    %rax,0x13965e(%rip)        # ffffffff801461c0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbWidthE>
            g_fbHeight = (vtotal & 0xFFF) + 1;
ffffffff8000cb62:	48 89 35 4f 96 13 00 	mov    %rsi,0x13964f(%rip)        # ffffffff801461b8 <_ZN7Drivers8Graphics8IntelGPUL10g_fbHeightE>
        if (dspaStride != 0) {
ffffffff8000cb69:	45 85 e4             	test   %r12d,%r12d
ffffffff8000cb6c:	75 59                	jne    ffffffff8000cbc7 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x957>
        if (g_fbWidth == 0 || g_fbHeight == 0 || g_fbPitch == 0) {
ffffffff8000cb6e:	48 83 3d 3a 96 13 00 	cmpq   $0x0,0x13963a(%rip)        # ffffffff801461b0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbPitchE>
ffffffff8000cb75:	00 
ffffffff8000cb76:	74 66                	je     ffffffff8000cbde <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x96e>
            Print(string);
ffffffff8000cb78:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000cb7f:	83 05 1e 29 1d 00 01 	addl   $0x1,0x1d291e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000cb86:	e8 35 66 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cb8b:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000cb92:	e8 29 66 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cb97:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000cb9e:	e8 1d 66 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cba3:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000cbaa:	e8 11 66 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cbaf:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000cbb6:	e8 05 66 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cbbb:	48 c7 c7 41 a7 02 80 	mov    $0xffffffff8002a741,%rdi
ffffffff8000cbc2:	e9 85 00 00 00       	jmp    ffffffff8000cc4c <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x9dc>
            if (g_fbWidth > 0 && g_fbPitch < g_fbWidth * 4) {
ffffffff8000cbc7:	48 8b 05 f2 95 13 00 	mov    0x1395f2(%rip),%rax        # ffffffff801461c0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbWidthE>
            g_fbPitch = dspaStride;
ffffffff8000cbce:	48 89 15 db 95 13 00 	mov    %rdx,0x1395db(%rip)        # ffffffff801461b0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbPitchE>
            if (g_fbWidth > 0 && g_fbPitch < g_fbWidth * 4) {
ffffffff8000cbd5:	48 85 c0             	test   %rax,%rax
ffffffff8000cbd8:	0f 85 47 0e 00 00    	jne    ffffffff8000da25 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x17b5>
            g_fbWidth  = ::Graphics::Cursor::GetFramebufferWidth();
ffffffff8000cbde:	e8 bd b3 00 00       	call   ffffffff80017fa0 <_ZN8Graphics6Cursor19GetFramebufferWidthEv>
ffffffff8000cbe3:	48 89 05 d6 95 13 00 	mov    %rax,0x1395d6(%rip)        # ffffffff801461c0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbWidthE>
            g_fbHeight = ::Graphics::Cursor::GetFramebufferHeight();
ffffffff8000cbea:	e8 c1 b3 00 00       	call   ffffffff80017fb0 <_ZN8Graphics6Cursor20GetFramebufferHeightEv>
ffffffff8000cbef:	48 89 05 c2 95 13 00 	mov    %rax,0x1395c2(%rip)        # ffffffff801461b8 <_ZN7Drivers8Graphics8IntelGPUL10g_fbHeightE>
            g_fbPitch  = ::Graphics::Cursor::GetFramebufferPitch();
ffffffff8000cbf6:	e8 c5 b3 00 00       	call   ffffffff80017fc0 <_ZN8Graphics6Cursor19GetFramebufferPitchEv>
ffffffff8000cbfb:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000cc02:	83 05 9b 28 1d 00 01 	addl   $0x1,0x1d289b(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000cc09:	48 89 05 a0 95 13 00 	mov    %rax,0x1395a0(%rip)        # ffffffff801461b0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbPitchE>
            Print(string);
ffffffff8000cc10:	e8 ab 65 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cc15:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000cc1c:	e8 9f 65 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cc21:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000cc28:	e8 93 65 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cc2d:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000cc34:	e8 87 65 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cc39:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000cc40:	e8 7b 65 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cc45:	48 c7 c7 98 c5 02 80 	mov    $0xffffffff8002c598,%rdi
ffffffff8000cc4c:	e8 6f 65 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000cc51:	48 8b 3d 68 95 13 00 	mov    0x139568(%rip),%rdi        # ffffffff801461c0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbWidthE>
ffffffff8000cc58:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000cc5d:	e8 2e d8 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000cc62:	48 89 c7             	mov    %rax,%rdi
ffffffff8000cc65:	e8 56 65 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000cc6a:	48 c7 c7 d8 a4 02 80 	mov    $0xffffffff8002a4d8,%rdi
ffffffff8000cc71:	e8 4a 65 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000cc76:	48 8b 3d 3b 95 13 00 	mov    0x13953b(%rip),%rdi        # ffffffff801461b8 <_ZN7Drivers8Graphics8IntelGPUL10g_fbHeightE>
ffffffff8000cc7d:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000cc82:	e8 09 d8 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000cc87:	48 89 c7             	mov    %rax,%rdi
ffffffff8000cc8a:	e8 31 65 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000cc8f:	48 c7 c7 d3 a2 02 80 	mov    $0xffffffff8002a2d3,%rdi
ffffffff8000cc96:	e8 25 65 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000cc9b:	48 8b 3d 0e 95 13 00 	mov    0x13950e(%rip),%rdi        # ffffffff801461b0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbPitchE>
ffffffff8000cca2:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000cca7:	e8 e4 d7 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000ccac:	48 89 c7             	mov    %rax,%rdi
ffffffff8000ccaf:	e8 0c 65 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000ccb4:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000ccbb:	e8 00 65 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        if (g_fbWidth == 0 || g_fbHeight == 0) {
ffffffff8000ccc0:	48 8b 0d f9 94 13 00 	mov    0x1394f9(%rip),%rcx        # ffffffff801461c0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbWidthE>
            g_kernelLogDepth--;
ffffffff8000ccc7:	8b 15 d7 27 1d 00    	mov    0x1d27d7(%rip),%edx        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000cccd:	48 85 c9             	test   %rcx,%rcx
ffffffff8000ccd0:	0f 84 fa 0b 00 00    	je     ffffffff8000d8d0 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1660>
ffffffff8000ccd6:	48 8b 05 db 94 13 00 	mov    0x1394db(%rip),%rax        # ffffffff801461b8 <_ZN7Drivers8Graphics8IntelGPUL10g_fbHeightE>
ffffffff8000ccdd:	48 85 c0             	test   %rax,%rax
ffffffff8000cce0:	0f 84 ea 0b 00 00    	je     ffffffff8000d8d0 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1660>
        if (g_fbPitch == 0) {
ffffffff8000cce6:	48 8b 35 c3 94 13 00 	mov    0x1394c3(%rip),%rsi        # ffffffff801461b0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbPitchE>
ffffffff8000cced:	48 85 f6             	test   %rsi,%rsi
ffffffff8000ccf0:	0f 84 ea 0d 00 00    	je     ffffffff8000dae0 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1870>
        g_fbSize = g_fbHeight * g_fbPitch;
ffffffff8000ccf6:	48 0f af c6          	imul   %rsi,%rax
            Print(string);
ffffffff8000ccfa:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000cd01:	89 15 9d 27 1d 00    	mov    %edx,0x1d279d(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000cd07:	48 89 05 9a 94 13 00 	mov    %rax,0x13949a(%rip)        # ffffffff801461a8 <_ZN7Drivers8Graphics8IntelGPUL8g_fbSizeE>
            Print(string);
ffffffff8000cd0e:	e8 ad 64 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cd13:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000cd1a:	e8 a1 64 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cd1f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000cd26:	e8 95 64 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cd2b:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000cd32:	e8 89 64 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cd37:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000cd3e:	e8 7d 64 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cd43:	48 c7 c7 7b a7 02 80 	mov    $0xffffffff8002a77b,%rdi
ffffffff8000cd4a:	e8 71 64 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000cd4f:	48 8b 3d 6a 94 13 00 	mov    0x13946a(%rip),%rdi        # ffffffff801461c0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbWidthE>
ffffffff8000cd56:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000cd5b:	e8 30 d7 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000cd60:	48 89 c7             	mov    %rax,%rdi
ffffffff8000cd63:	e8 58 64 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000cd68:	48 c7 c7 d8 a4 02 80 	mov    $0xffffffff8002a4d8,%rdi
ffffffff8000cd6f:	e8 4c 64 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000cd74:	48 8b 3d 3d 94 13 00 	mov    0x13943d(%rip),%rdi        # ffffffff801461b8 <_ZN7Drivers8Graphics8IntelGPUL10g_fbHeightE>
ffffffff8000cd7b:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000cd80:	e8 0b d7 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000cd85:	48 89 c7             	mov    %rax,%rdi
ffffffff8000cd88:	e8 33 64 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000cd8d:	48 c7 c7 8b a7 02 80 	mov    $0xffffffff8002a78b,%rdi
ffffffff8000cd94:	e8 27 64 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000cd99:	48 8b 3d 10 94 13 00 	mov    0x139410(%rip),%rdi        # ffffffff801461b0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbPitchE>
ffffffff8000cda0:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000cda5:	e8 e6 d6 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000cdaa:	48 89 c7             	mov    %rax,%rdi
ffffffff8000cdad:	e8 0e 64 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000cdb2:	48 c7 c7 95 a7 02 80 	mov    $0xffffffff8002a795,%rdi
ffffffff8000cdb9:	e8 02 64 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000cdbe:	48 8b 3d e3 93 13 00 	mov    0x1393e3(%rip),%rdi        # ffffffff801461a8 <_ZN7Drivers8Graphics8IntelGPUL8g_fbSizeE>
ffffffff8000cdc5:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000cdca:	e8 c1 d6 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000cdcf:	48 89 c7             	mov    %rax,%rdi
ffffffff8000cdd2:	e8 e9 63 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000cdd7:	48 c7 c7 74 a7 02 80 	mov    $0xffffffff8002a774,%rdi
ffffffff8000cdde:	e8 dd 63 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cde3:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000cdea:	e8 d1 63 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        uint16_t gmchCtl = Pci::LegacyRead16(bus, dev, func, (uint8_t)PCI_REG_GMCH_CTL);
ffffffff8000cdef:	0f b6 15 1c 94 13 00 	movzbl 0x13941c(%rip),%edx        # ffffffff80146212 <_ZN7Drivers8Graphics8IntelGPUL9g_gpuInfoE+0x12>
ffffffff8000cdf6:	b9 50 00 00 00       	mov    $0x50,%ecx
ffffffff8000cdfb:	0f b6 35 0f 94 13 00 	movzbl 0x13940f(%rip),%esi        # ffffffff80146211 <_ZN7Drivers8Graphics8IntelGPUL9g_gpuInfoE+0x11>
ffffffff8000ce02:	0f b6 3d 07 94 13 00 	movzbl 0x139407(%rip),%edi        # ffffffff80146210 <_ZN7Drivers8Graphics8IntelGPUL9g_gpuInfoE+0x10>
            g_kernelLogDepth--;
ffffffff8000ce09:	83 2d 94 26 1d 00 01 	subl   $0x1,0x1d2694(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000ce10:	e8 2b 2d 01 00       	call   ffffffff8001fb40 <_ZN3Pci12LegacyRead16Ehhhh>
            g_kernelLogDepth++;
ffffffff8000ce15:	8b 0d 89 26 1d 00    	mov    0x1d2689(%rip),%ecx        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000ce1b:	89 c3                	mov    %eax,%ebx
        uint8_t gttSizeBits = (gmchCtl >> 8) & 0x3;
ffffffff8000ce1d:	66 c1 e8 08          	shr    $0x8,%ax
ffffffff8000ce21:	83 e0 03             	and    $0x3,%eax
        if (g_gpuGen >= 8) {
ffffffff8000ce24:	80 3d ad 93 13 00 07 	cmpb   $0x7,0x1393ad(%rip)        # ffffffff801461d8 <_ZN7Drivers8Graphics8IntelGPUL8g_gpuGenE>
ffffffff8000ce2b:	8d 51 01             	lea    0x1(%rcx),%edx
ffffffff8000ce2e:	0f 87 68 0b 00 00    	ja     ffffffff8000d99c <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x172c>
            switch (gttSizeBits) {
ffffffff8000ce34:	84 c0                	test   %al,%al
ffffffff8000ce36:	0f 84 78 0b 00 00    	je     ffffffff8000d9b4 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1744>
ffffffff8000ce3c:	83 e8 02             	sub    $0x2,%eax
ffffffff8000ce3f:	41 bc 00 08 00 00    	mov    $0x800,%r12d
                case 3: gttSizeBytes = 2 * 1024 * 1024; break; // Depends on gen, default 2MB
ffffffff8000ce45:	41 bd 00 00 20 00    	mov    $0x200000,%r13d
            switch (gttSizeBits) {
ffffffff8000ce4b:	3c 01                	cmp    $0x1,%al
ffffffff8000ce4d:	0f 87 c1 0b 00 00    	ja     ffffffff8000da14 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x17a4>
            Print(string);
ffffffff8000ce53:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000ce5a:	89 15 44 26 1d 00    	mov    %edx,0x1d2644(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        g_gpuInfo.gttSize = gttSizeBytes;
ffffffff8000ce60:	4c 89 2d c9 93 13 00 	mov    %r13,0x1393c9(%rip)        # ffffffff80146230 <_ZN7Drivers8Graphics8IntelGPUL9g_gpuInfoE+0x30>
            Print(string);
ffffffff8000ce67:	e8 54 63 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ce6c:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000ce73:	e8 48 63 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ce78:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000ce7f:	e8 3c 63 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ce84:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000ce8b:	e8 30 63 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ce90:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000ce97:	e8 24 63 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ce9c:	48 c7 c7 a0 a7 02 80 	mov    $0xffffffff8002a7a0,%rdi
ffffffff8000cea3:	e8 18 63 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000cea8:	be 10 00 00 00       	mov    $0x10,%esi
        KernelLogStream(INFO, "IntelGPU") << "GMCH_CTL: " << base::hex << (uint64_t)gmchCtl
ffffffff8000cead:	0f b7 fb             	movzwl %bx,%edi
        for (uint64_t offset = 0; offset < gttMapSize; offset += 0x1000) {
ffffffff8000ceb0:	31 db                	xor    %ebx,%ebx
ffffffff8000ceb2:	e8 d9 d5 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000ceb7:	48 89 c7             	mov    %rax,%rdi
ffffffff8000ceba:	e8 01 63 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000cebf:	48 c7 c7 ab a7 02 80 	mov    $0xffffffff8002a7ab,%rdi
ffffffff8000cec6:	e8 f5 62 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000cecb:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000ced0:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000ced3:	e8 b8 d5 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000ced8:	48 89 c7             	mov    %rax,%rdi
ffffffff8000cedb:	e8 e0 62 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000cee0:	48 c7 c7 b8 a7 02 80 	mov    $0xffffffff8002a7b8,%rdi
ffffffff8000cee7:	e8 d4 62 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ceec:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000cef3:	e8 c8 62 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000cef8:	83 2d a5 25 1d 00 01 	subl   $0x1,0x1d25a5(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        uint64_t gttPhys = g_gpuInfo.mmioPhys + 0x200000;
ffffffff8000ceff:	48 8b 05 12 93 13 00 	mov    0x139312(%rip),%rax        # ffffffff80146218 <_ZN7Drivers8Graphics8IntelGPUL9g_gpuInfoE+0x18>
ffffffff8000cf06:	4c 8d a0 00 00 20 00 	lea    0x200000(%rax),%r12
        for (uint64_t offset = 0; offset < gttMapSize; offset += 0x1000) {
ffffffff8000cf0d:	0f 1f 00             	nopl   (%rax)
ffffffff8000cf10:	48 8b 15 91 fa 13 00 	mov    0x13fa91(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            Memory::VMM::g_paging->MapMMIO(gttPhys + offset, Memory::HHDM(gttPhys + offset));
ffffffff8000cf17:	49 8d 34 1c          	lea    (%r12,%rbx,1),%rsi
ffffffff8000cf1b:	48 8b 3d 9e fa 13 00 	mov    0x13fa9e(%rip),%rdi        # ffffffff8014c9c0 <_ZN6Memory3VMM8g_pagingE>
        for (uint64_t offset = 0; offset < gttMapSize; offset += 0x1000) {
ffffffff8000cf22:	48 81 c3 00 10 00 00 	add    $0x1000,%rbx
ffffffff8000cf29:	48 01 f2             	add    %rsi,%rdx
            Memory::VMM::g_paging->MapMMIO(gttPhys + offset, Memory::HHDM(gttPhys + offset));
ffffffff8000cf2c:	e8 8f e9 00 00       	call   ffffffff8001b8c0 <_ZN6Memory3VMM6Paging7MapMMIOEmm>
        for (uint64_t offset = 0; offset < gttMapSize; offset += 0x1000) {
ffffffff8000cf31:	4c 39 eb             	cmp    %r13,%rbx
ffffffff8000cf34:	72 da                	jb     ffffffff8000cf10 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0xca0>
ffffffff8000cf36:	48 8b 05 6b fa 13 00 	mov    0x13fa6b(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8000cf3d:	4c 01 e0             	add    %r12,%rax
        g_gttBase = (volatile void*)Memory::HHDM(gttPhys);
ffffffff8000cf40:	48 89 05 a9 92 13 00 	mov    %rax,0x1392a9(%rip)        # ffffffff801461f0 <_ZN7Drivers8Graphics8IntelGPUL9g_gttBaseE>
            g_gttEntryCount = gttSizeBytes / sizeof(uint32_t);
ffffffff8000cf47:	4c 89 e8             	mov    %r13,%rax
ffffffff8000cf4a:	48 c1 e8 02          	shr    $0x2,%rax
        if (g_gpuGen >= 8) {
ffffffff8000cf4e:	80 3d 83 92 13 00 07 	cmpb   $0x7,0x139283(%rip)        # ffffffff801461d8 <_ZN7Drivers8Graphics8IntelGPUL8g_gpuGenE>
ffffffff8000cf55:	76 07                	jbe    ffffffff8000cf5e <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0xcee>
            g_gttEntryCount = gttSizeBytes / sizeof(uint64_t);
ffffffff8000cf57:	4c 89 e8             	mov    %r13,%rax
ffffffff8000cf5a:	48 c1 e8 03          	shr    $0x3,%rax
            Print(string);
ffffffff8000cf5e:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
ffffffff8000cf65:	48 89 05 7c 92 13 00 	mov    %rax,0x13927c(%rip)        # ffffffff801461e8 <_ZN7Drivers8Graphics8IntelGPUL15g_gttEntryCountE>
            g_kernelLogDepth++;
ffffffff8000cf6c:	83 05 31 25 1d 00 01 	addl   $0x1,0x1d2531(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000cf73:	e8 48 62 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cf78:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000cf7f:	e8 3c 62 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cf84:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000cf8b:	e8 30 62 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cf90:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000cf97:	e8 24 62 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cf9c:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000cfa3:	e8 18 62 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000cfa8:	48 c7 c7 bc a7 02 80 	mov    $0xffffffff8002a7bc,%rdi
ffffffff8000cfaf:	e8 0c 62 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000cfb4:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000cfb9:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000cfbc:	e8 cf d4 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000cfc1:	48 89 c7             	mov    %rax,%rdi
ffffffff8000cfc4:	e8 f7 61 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000cfc9:	48 c7 c7 e1 a2 02 80 	mov    $0xffffffff8002a2e1,%rdi
ffffffff8000cfd0:	e8 eb 61 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000cfd5:	48 8b 3d 0c 92 13 00 	mov    0x13920c(%rip),%rdi        # ffffffff801461e8 <_ZN7Drivers8Graphics8IntelGPUL15g_gttEntryCountE>
ffffffff8000cfdc:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000cfe1:	e8 aa d4 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000cfe6:	48 89 c7             	mov    %rax,%rdi
ffffffff8000cfe9:	e8 d2 61 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000cfee:	48 c7 c7 67 be 02 80 	mov    $0xffffffff8002be67,%rdi
ffffffff8000cff5:	e8 c6 61 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (g_gpuGen >= 8 ? " (64-bit PTEs)" : " (32-bit PTEs)");
ffffffff8000cffa:	80 3d d7 91 13 00 08 	cmpb   $0x8,0x1391d7(%rip)        # ffffffff801461d8 <_ZN7Drivers8Graphics8IntelGPUL8g_gpuGenE>
ffffffff8000d001:	48 c7 c0 51 a6 02 80 	mov    $0xffffffff8002a651,%rax
ffffffff8000d008:	48 c7 c7 60 a6 02 80 	mov    $0xffffffff8002a660,%rdi
ffffffff8000d00f:	48 0f 43 f8          	cmovae %rax,%rdi
ffffffff8000d013:	e8 a8 61 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d018:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000d01f:	e8 9c 61 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        void* scratchPageVirt = Memory::g_pfa->AllocateZeroed();
ffffffff8000d024:	48 8b 3d 85 f9 13 00 	mov    0x13f985(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
            g_kernelLogDepth--;
ffffffff8000d02b:	83 2d 72 24 1d 00 01 	subl   $0x1,0x1d2472(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000d032:	e8 d9 e1 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
            Print(string);
ffffffff8000d037:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
        return address - HHDMBase;
ffffffff8000d03e:	48 2b 05 63 f9 13 00 	sub    0x13f963(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            g_kernelLogDepth++;
ffffffff8000d045:	83 05 58 24 1d 00 01 	addl   $0x1,0x1d2458(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        g_scratchPagePhys = Memory::SubHHDM(scratchPageVirt);
ffffffff8000d04c:	48 89 05 8d 91 13 00 	mov    %rax,0x13918d(%rip)        # ffffffff801461e0 <_ZN7Drivers8Graphics8IntelGPUL17g_scratchPagePhysE>
            Print(string);
ffffffff8000d053:	e8 68 61 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d058:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000d05f:	e8 5c 61 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d064:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000d06b:	e8 50 61 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d070:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000d077:	e8 44 61 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d07c:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000d083:	e8 38 61 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d088:	48 c7 c7 cd a7 02 80 	mov    $0xffffffff8002a7cd,%rdi
ffffffff8000d08f:	e8 2c 61 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d094:	48 8b 3d 4d 91 13 00 	mov    0x13914d(%rip),%rdi        # ffffffff801461e8 <_ZN7Drivers8Graphics8IntelGPUL15g_gttEntryCountE>
ffffffff8000d09b:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000d0a0:	e8 eb d3 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d0a5:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d0a8:	e8 13 61 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d0ad:	48 c7 c7 d9 a7 02 80 	mov    $0xffffffff8002a7d9,%rdi
ffffffff8000d0b4:	e8 07 61 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d0b9:	48 8b 3d 20 91 13 00 	mov    0x139120(%rip),%rdi        # ffffffff801461e0 <_ZN7Drivers8Graphics8IntelGPUL17g_scratchPagePhysE>
ffffffff8000d0c0:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000d0c5:	e8 c6 d3 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d0ca:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d0cd:	e8 ee 60 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d0d2:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000d0d9:	e8 e2 60 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000d0de:	83 2d bf 23 1d 00 01 	subl   $0x1,0x1d23bf(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        uint32_t* fwFb = ::Graphics::Cursor::GetFramebufferBase();
ffffffff8000d0e5:	e8 a6 ae 00 00       	call   ffffffff80017f90 <_ZN8Graphics6Cursor18GetFramebufferBaseEv>
ffffffff8000d0ea:	49 89 c5             	mov    %rax,%r13
            g_kernelLogDepth++;
ffffffff8000d0ed:	8b 05 b1 23 1d 00    	mov    0x1d23b1(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000d0f3:	83 c0 01             	add    $0x1,%eax
        if (fwFb == nullptr) {
ffffffff8000d0f6:	4d 85 ed             	test   %r13,%r13
ffffffff8000d0f9:	0f 84 0a 0d 00 00    	je     ffffffff8000de09 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1b99>
        uint64_t pageCount = (g_fbSize + 0xFFF) / 0x1000;
ffffffff8000d0ff:	48 8b 0d a2 90 13 00 	mov    0x1390a2(%rip),%rcx        # ffffffff801461a8 <_ZN7Drivers8Graphics8IntelGPUL8g_fbSizeE>
ffffffff8000d106:	48 8d 99 ff 0f 00 00 	lea    0xfff(%rcx),%rbx
ffffffff8000d10d:	48 c1 eb 0c          	shr    $0xc,%rbx
        if (pageCount > g_gttEntryCount) {
ffffffff8000d111:	48 39 1d d0 90 13 00 	cmp    %rbx,0x1390d0(%rip)        # ffffffff801461e8 <_ZN7Drivers8Graphics8IntelGPUL15g_gttEntryCountE>
ffffffff8000d118:	0f 82 6d 0b 00 00    	jb     ffffffff8000dc8b <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1a1b>
            Print(string);
ffffffff8000d11e:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000d125:	89 05 79 23 1d 00    	mov    %eax,0x1d2379(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000d12b:	4d 89 ec             	mov    %r13,%r12
ffffffff8000d12e:	4c 2b 25 73 f8 13 00 	sub    0x13f873(%rip),%r12        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            Print(string);
ffffffff8000d135:	e8 86 60 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d13a:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000d141:	e8 7a 60 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d146:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000d14d:	e8 6e 60 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d152:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000d159:	e8 62 60 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d15e:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000d165:	e8 56 60 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d16a:	48 c7 c7 23 a8 02 80 	mov    $0xffffffff8002a823,%rdi
ffffffff8000d171:	e8 4a 60 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d176:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000d17b:	48 89 df             	mov    %rbx,%rdi
ffffffff8000d17e:	e8 0d d3 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d183:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d186:	e8 35 60 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d18b:	48 c7 c7 90 c6 02 80 	mov    $0xffffffff8002c690,%rdi
ffffffff8000d192:	e8 29 60 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d197:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000d19c:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000d19f:	e8 ec d2 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d1a4:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d1a7:	e8 14 60 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d1ac:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff8000d1b3:	e8 08 60 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d1b8:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000d1bf:	e8 fc 5f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000d1c4:	44 8b 05 d9 22 1d 00 	mov    0x1d22d9(%rip),%r8d        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        if (g_gpuGen >= 8) {
ffffffff8000d1cb:	80 3d 06 90 13 00 07 	cmpb   $0x7,0x139006(%rip)        # ffffffff801461d8 <_ZN7Drivers8Graphics8IntelGPUL8g_gpuGenE>
            volatile uint64_t* gtt64 = (volatile uint64_t*)g_gttBase;
ffffffff8000d1d2:	48 8b 35 17 90 13 00 	mov    0x139017(%rip),%rsi        # ffffffff801461f0 <_ZN7Drivers8Graphics8IntelGPUL9g_gttBaseE>
ffffffff8000d1d9:	41 8d 40 ff          	lea    -0x1(%r8),%eax
ffffffff8000d1dd:	89 05 c1 22 1d 00    	mov    %eax,0x1d22c1(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        if (g_gpuGen >= 8) {
ffffffff8000d1e3:	0f 86 96 0b 00 00    	jbe    ffffffff8000dd7f <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1b0f>
            for (uint64_t i = 0; i < pageCount; i++) {
ffffffff8000d1e9:	48 85 db             	test   %rbx,%rbx
ffffffff8000d1ec:	0f 84 8e 0c 00 00    	je     ffffffff8000de80 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1c10>
ffffffff8000d1f2:	4c 8d 0c dd 00 00 00 	lea    0x0(,%rbx,8),%r9
ffffffff8000d1f9:	00 
ffffffff8000d1fa:	48 89 f0             	mov    %rsi,%rax
ffffffff8000d1fd:	4c 89 e1             	mov    %r12,%rcx
ffffffff8000d200:	4a 8d 3c 0e          	lea    (%rsi,%r9,1),%rdi
        return pte;
    }

    // Helper: Build a Gen 8+ GTT PTE from a physical address
    static inline uint64_t MakeGttPte64(uint64_t physAddr) {
        return (physAddr & ~0xFFFULL) | GTT_PTE64_VALID;
ffffffff8000d204:	48 89 ca             	mov    %rcx,%rdx
ffffffff8000d207:	48 83 c0 08          	add    $0x8,%rax
ffffffff8000d20b:	48 81 c1 00 10 00 00 	add    $0x1000,%rcx
ffffffff8000d212:	48 81 e2 00 f0 ff ff 	and    $0xfffffffffffff000,%rdx
ffffffff8000d219:	48 83 ca 01          	or     $0x1,%rdx
                gtt64[i] = MakeGttPte64(fwFbPhys + i * 0x1000);
ffffffff8000d21d:	48 89 50 f8          	mov    %rdx,-0x8(%rax)
            for (uint64_t i = 0; i < pageCount; i++) {
ffffffff8000d221:	48 39 f8             	cmp    %rdi,%rax
ffffffff8000d224:	75 de                	jne    ffffffff8000d204 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0xf94>
            (void)gtt64[pageCount - 1];
ffffffff8000d226:	4a 8d 44 0e f8       	lea    -0x8(%rsi,%r9,1),%rax
ffffffff8000d22b:	48 8b 00             	mov    (%rax),%rax
            Print(string);
ffffffff8000d22e:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000d235:	44 89 05 68 22 1d 00 	mov    %r8d,0x1d2268(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        g_fbPhysBase = fwFbPhys;
ffffffff8000d23c:	4c 89 25 85 8f 13 00 	mov    %r12,0x138f85(%rip)        # ffffffff801461c8 <_ZN7Drivers8Graphics8IntelGPUL12g_fbPhysBaseE>
        g_fbBase = fwFb;
ffffffff8000d243:	4c 89 2d 86 8f 13 00 	mov    %r13,0x138f86(%rip)        # ffffffff801461d0 <_ZN7Drivers8Graphics8IntelGPUL8g_fbBaseE>
        g_fbGttOffset = 0; // Starting at GTT entry 0 => offset 0
ffffffff8000d24a:	48 c7 05 4b 8f 13 00 	movq   $0x0,0x138f4b(%rip)        # ffffffff801461a0 <_ZN7Drivers8Graphics8IntelGPUL13g_fbGttOffsetE>
ffffffff8000d251:	00 00 00 00 
            Print(string);
ffffffff8000d255:	e8 66 5f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d25a:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000d261:	e8 5a 5f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d266:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000d26d:	e8 4e 5f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d272:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000d279:	e8 42 5f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d27e:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000d285:	e8 36 5f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d28a:	48 c7 c7 c0 c6 02 80 	mov    $0xffffffff8002c6c0,%rdi
ffffffff8000d291:	e8 2a 5f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d296:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000d29b:	48 89 df             	mov    %rbx,%rdi
ffffffff8000d29e:	e8 ed d1 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d2a3:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d2a6:	e8 15 5f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d2ab:	48 c7 c7 2c a8 02 80 	mov    $0xffffffff8002a82c,%rdi
ffffffff8000d2b2:	e8 09 5f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d2b7:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000d2bc:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000d2bf:	e8 cc d1 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d2c4:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d2c7:	e8 f4 5e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d2cc:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000d2d3:	e8 e8 5e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000d2d8:	48 8b 05 19 8f 13 00 	mov    0x138f19(%rip),%rax        # ffffffff801461f8 <_ZN7Drivers8Graphics8IntelGPUL10g_mmioBaseE>
ffffffff8000d2df:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
ffffffff8000d2e6:	8b 98 80 01 07 00    	mov    0x70180(%rax),%ebx
ffffffff8000d2ec:	44 8b a0 9c 01 07 00 	mov    0x7019c(%rax),%r12d
ffffffff8000d2f3:	e8 c8 5e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d2f8:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000d2ff:	e8 bc 5e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d304:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000d30b:	e8 b0 5e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d310:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000d317:	e8 a4 5e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d31c:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000d323:	e8 98 5e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d328:	48 c7 c7 e8 c6 02 80 	mov    $0xffffffff8002c6e8,%rdi
ffffffff8000d32f:	e8 8c 5e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d334:	be 10 00 00 00       	mov    $0x10,%esi
            << (uint64_t)dspaCntr << " (format=" << (uint64_t)fmtBits << ")";
ffffffff8000d339:	89 df                	mov    %ebx,%edi
ffffffff8000d33b:	e8 50 d1 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d340:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d343:	e8 78 5e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d348:	48 c7 c7 3a a8 02 80 	mov    $0xffffffff8002a83a,%rdi
ffffffff8000d34f:	e8 6c 5e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        uint32_t fmtBits = (dspaCntr & DISP_FORMAT_MASK) >> DISP_FORMAT_SHIFT;
ffffffff8000d354:	89 df                	mov    %ebx,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d356:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000d35b:	c1 ef 1a             	shr    $0x1a,%edi
            << (uint64_t)dspaCntr << " (format=" << (uint64_t)fmtBits << ")";
ffffffff8000d35e:	83 e7 0f             	and    $0xf,%edi
ffffffff8000d361:	e8 2a d1 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d366:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d369:	e8 52 5e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d36e:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff8000d375:	e8 46 5e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d37a:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000d381:	e8 3a 5e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d386:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
ffffffff8000d38d:	e8 2e 5e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d392:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000d399:	e8 22 5e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d39e:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000d3a5:	e8 16 5e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d3aa:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000d3b1:	e8 0a 5e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d3b6:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000d3bd:	e8 fe 5d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d3c2:	48 c7 c7 44 a8 02 80 	mov    $0xffffffff8002a844,%rdi
ffffffff8000d3c9:	e8 f2 5d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d3ce:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000d3d3:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000d3d6:	e8 b5 d0 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d3db:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d3de:	e8 dd 5d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d3e3:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000d3ea:	e8 d1 5d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        *(volatile uint32_t*)(g_mmioBase + reg) = val;
ffffffff8000d3ef:	48 8b 05 02 8e 13 00 	mov    0x138e02(%rip),%rax        # ffffffff801461f8 <_ZN7Drivers8Graphics8IntelGPUL10g_mmioBaseE>
        if (!(dspaCntr & DISP_ENABLE)) {
ffffffff8000d3f6:	85 db                	test   %ebx,%ebx
ffffffff8000d3f8:	78 0c                	js     ffffffff8000d406 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1196>
            dspaCntr |= DISP_ENABLE;
ffffffff8000d3fa:	81 cb 00 00 00 80    	or     $0x80000000,%ebx
        *(volatile uint32_t*)(g_mmioBase + reg) = val;
ffffffff8000d400:	89 98 80 01 07 00    	mov    %ebx,0x70180(%rax)
        uint32_t surfAddr = (uint32_t)g_fbGttOffset;
ffffffff8000d406:	48 8b 1d 93 8d 13 00 	mov    0x138d93(%rip),%rbx        # ffffffff801461a0 <_ZN7Drivers8Graphics8IntelGPUL13g_fbGttOffsetE>
ffffffff8000d40d:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
        *(volatile uint32_t*)(g_mmioBase + reg) = val;
ffffffff8000d414:	89 98 9c 01 07 00    	mov    %ebx,0x7019c(%rax)
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000d41a:	8b 80 9c 01 07 00    	mov    0x7019c(%rax),%eax
ffffffff8000d420:	e8 9b 5d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d425:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000d42c:	e8 8f 5d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d431:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000d438:	e8 83 5d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d43d:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000d444:	e8 77 5d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d449:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000d450:	e8 6b 5d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d455:	48 c7 c7 79 a8 02 80 	mov    $0xffffffff8002a879,%rdi
ffffffff8000d45c:	e8 5f 5d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d461:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000d466:	89 df                	mov    %ebx,%edi
ffffffff8000d468:	e8 23 d0 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d46d:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d470:	e8 4b 5d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d475:	48 c7 c7 94 a8 02 80 	mov    $0xffffffff8002a894,%rdi
ffffffff8000d47c:	e8 3f 5d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d481:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000d486:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000d489:	e8 02 d0 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d48e:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d491:	e8 2a 5d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d496:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff8000d49d:	e8 1e 5d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d4a2:	48 c7 c7 8b a7 02 80 	mov    $0xffffffff8002a78b,%rdi
ffffffff8000d4a9:	e8 12 5d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d4ae:	48 8b 3d fb 8c 13 00 	mov    0x138cfb(%rip),%rdi        # ffffffff801461b0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbPitchE>
ffffffff8000d4b5:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000d4ba:	e8 d1 cf 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d4bf:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d4c2:	e8 f9 5c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d4c7:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000d4ce:	e8 ed 5c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000d4d3:	83 2d ca 1f 1d 00 01 	subl   $0x1,0x1d1fca(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        }

        // Step 7: Program the display plane to use our GTT-mapped framebuffer
        ProgramDisplayPlane();

        g_initialized = true;
ffffffff8000d4da:	c6 05 5f 8d 13 00 01 	movb   $0x1,0x138d5f(%rip)        # ffffffff80146240 <_ZN7Drivers8Graphics8IntelGPUL13g_initializedE>

        // Diagnostic: compare GPU-detected values with firmware/Limine values
        uint64_t fwWidth  = ::Graphics::Cursor::GetFramebufferWidth();
ffffffff8000d4e1:	e8 ba aa 00 00       	call   ffffffff80017fa0 <_ZN8Graphics6Cursor19GetFramebufferWidthEv>
ffffffff8000d4e6:	48 89 c3             	mov    %rax,%rbx
        uint64_t fwHeight = ::Graphics::Cursor::GetFramebufferHeight();
ffffffff8000d4e9:	e8 c2 aa 00 00       	call   ffffffff80017fb0 <_ZN8Graphics6Cursor20GetFramebufferHeightEv>
ffffffff8000d4ee:	49 89 c5             	mov    %rax,%r13
        uint64_t fwPitch  = ::Graphics::Cursor::GetFramebufferPitch();
ffffffff8000d4f1:	e8 ca aa 00 00       	call   ffffffff80017fc0 <_ZN8Graphics6Cursor19GetFramebufferPitchEv>
ffffffff8000d4f6:	49 89 c4             	mov    %rax,%r12
            g_kernelLogDepth++;
ffffffff8000d4f9:	8b 05 a5 1f 1d 00    	mov    0x1d1fa5(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000d4ff:	83 c0 01             	add    $0x1,%eax

        if (g_fbWidth != fwWidth || g_fbHeight != fwHeight || g_fbPitch != fwPitch) {
ffffffff8000d502:	48 39 1d b7 8c 13 00 	cmp    %rbx,0x138cb7(%rip)        # ffffffff801461c0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbWidthE>
ffffffff8000d509:	75 0d                	jne    ffffffff8000d518 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x12a8>
ffffffff8000d50b:	4c 39 2d a6 8c 13 00 	cmp    %r13,0x138ca6(%rip)        # ffffffff801461b8 <_ZN7Drivers8Graphics8IntelGPUL10g_fbHeightE>
ffffffff8000d512:	0f 84 56 09 00 00    	je     ffffffff8000de6e <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1bfe>
            Print(string);
ffffffff8000d518:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000d51f:	89 05 7f 1f 1d 00    	mov    %eax,0x1d1f7f(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000d525:	e8 96 5c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d52a:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000d531:	e8 8a 5c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d536:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000d53d:	e8 7e 5c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d542:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8000d549:	e8 72 5c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d54e:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000d555:	e8 66 5c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d55a:	48 c7 c7 08 c7 02 80 	mov    $0xffffffff8002c708,%rdi
ffffffff8000d561:	e8 5a 5c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d566:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000d56d:	e8 4e 5c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d572:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
ffffffff8000d579:	e8 42 5c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d57e:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000d585:	e8 36 5c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d58a:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000d591:	e8 2a 5c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d596:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8000d59d:	e8 1e 5c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d5a2:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000d5a9:	e8 12 5c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d5ae:	48 c7 c7 9b a8 02 80 	mov    $0xffffffff8002a89b,%rdi
ffffffff8000d5b5:	e8 06 5c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d5ba:	48 8b 3d ff 8b 13 00 	mov    0x138bff(%rip),%rdi        # ffffffff801461c0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbWidthE>
ffffffff8000d5c1:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000d5c6:	e8 c5 ce 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d5cb:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d5ce:	e8 ed 5b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d5d3:	48 c7 c7 d8 a4 02 80 	mov    $0xffffffff8002a4d8,%rdi
ffffffff8000d5da:	e8 e1 5b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d5df:	48 8b 3d d2 8b 13 00 	mov    0x138bd2(%rip),%rdi        # ffffffff801461b8 <_ZN7Drivers8Graphics8IntelGPUL10g_fbHeightE>
ffffffff8000d5e6:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000d5eb:	e8 a0 ce 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d5f0:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d5f3:	e8 c8 5b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d5f8:	48 c7 c7 d3 a2 02 80 	mov    $0xffffffff8002a2d3,%rdi
ffffffff8000d5ff:	e8 bc 5b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d604:	48 8b 3d a5 8b 13 00 	mov    0x138ba5(%rip),%rdi        # ffffffff801461b0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbPitchE>
ffffffff8000d60b:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000d610:	e8 7b ce 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d615:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d618:	e8 a3 5b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d61d:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000d624:	e8 97 5b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d629:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
ffffffff8000d630:	e8 8b 5b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d635:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000d63c:	e8 7f 5b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d641:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000d648:	e8 73 5b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d64d:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8000d654:	e8 67 5b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d659:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000d660:	e8 5b 5b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d665:	48 c7 c7 a8 a8 02 80 	mov    $0xffffffff8002a8a8,%rdi
ffffffff8000d66c:	e8 4f 5b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d671:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000d676:	48 89 df             	mov    %rbx,%rdi
ffffffff8000d679:	e8 12 ce 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d67e:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d681:	e8 3a 5b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d686:	48 c7 c7 d8 a4 02 80 	mov    $0xffffffff8002a4d8,%rdi
ffffffff8000d68d:	e8 2e 5b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d692:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000d697:	4c 89 ef             	mov    %r13,%rdi
ffffffff8000d69a:	e8 f1 cd 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d69f:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d6a2:	e8 19 5b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d6a7:	48 c7 c7 d3 a2 02 80 	mov    $0xffffffff8002a2d3,%rdi
ffffffff8000d6ae:	e8 0d 5b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d6b3:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000d6b8:	4c 89 e7             	mov    %r12,%rdi
ffffffff8000d6bb:	e8 d0 cd 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d6c0:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d6c3:	e8 f8 5a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d6c8:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000d6cf:	e8 ec 5a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000d6d4:	8b 05 ca 1d 1d 00    	mov    0x1d1dca(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000d6da:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000d6e1:	89 05 bd 1d 1d 00    	mov    %eax,0x1d1dbd(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000d6e7:	e8 d4 5a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d6ec:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000d6f3:	e8 c8 5a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d6f8:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000d6ff:	e8 bc 5a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d704:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000d70b:	e8 b0 5a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d710:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000d717:	e8 a4 5a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d71c:	48 c7 c7 b5 a8 02 80 	mov    $0xffffffff8002a8b5,%rdi
ffffffff8000d723:	e8 98 5a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d728:	48 8b 3d 91 8a 13 00 	mov    0x138a91(%rip),%rdi        # ffffffff801461c0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbWidthE>
ffffffff8000d72f:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000d734:	e8 57 cd 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d739:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d73c:	e8 7f 5a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d741:	48 c7 c7 d8 a4 02 80 	mov    $0xffffffff8002a4d8,%rdi
ffffffff8000d748:	e8 73 5a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d74d:	48 8b 3d 64 8a 13 00 	mov    0x138a64(%rip),%rdi        # ffffffff801461b8 <_ZN7Drivers8Graphics8IntelGPUL10g_fbHeightE>
ffffffff8000d754:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000d759:	e8 32 cd 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d75e:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d761:	e8 5a 5a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d766:	48 c7 c7 cf a8 02 80 	mov    $0xffffffff8002a8cf,%rdi
ffffffff8000d76d:	e8 4e 5a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d772:	48 8b 3d 57 8a 13 00 	mov    0x138a57(%rip),%rdi        # ffffffff801461d0 <_ZN7Drivers8Graphics8IntelGPUL8g_fbBaseE>
ffffffff8000d779:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000d77e:	e8 0d cd 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d783:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d786:	e9 e2 01 00 00       	jmp    ffffffff8000d96d <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x16fd>
                return array[position];
ffffffff8000d78b:	4c 89 e2             	mov    %r12,%rdx
ffffffff8000d78e:	48 c1 e2 04          	shl    $0x4,%rdx
ffffffff8000d792:	e9 25 ed ff ff       	jmp    ffffffff8000c4bc <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x24c>
            Print(string);
ffffffff8000d797:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000d79e:	89 05 00 1d 1d 00    	mov    %eax,0x1d1d00(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            g_gpuInfo.gen  = 7; // Assume gen 7 as a safe default
ffffffff8000d7a4:	c6 05 57 8a 13 00 07 	movb   $0x7,0x138a57(%rip)        # ffffffff80146202 <_ZN7Drivers8Graphics8IntelGPUL9g_gpuInfoE+0x2>
            g_gpuInfo.name = "Intel GPU";
ffffffff8000d7ab:	48 c7 05 52 8a 13 00 	movq   $0xffffffff8002a69c,0x138a52(%rip)        # ffffffff80146208 <_ZN7Drivers8Graphics8IntelGPUL9g_gpuInfoE+0x8>
ffffffff8000d7b2:	9c a6 02 80 
            Print(string);
ffffffff8000d7b6:	e8 05 5a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d7bb:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000d7c2:	e8 f9 59 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d7c7:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000d7ce:	e8 ed 59 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d7d3:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8000d7da:	e8 e1 59 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d7df:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000d7e6:	e8 d5 59 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d7eb:	48 c7 c7 f0 c4 02 80 	mov    $0xffffffff8002c4f0,%rdi
ffffffff8000d7f2:	e8 c9 59 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d7f7:	48 c7 c7 93 a6 02 80 	mov    $0xffffffff8002a693,%rdi
ffffffff8000d7fe:	e8 bd 59 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << "(device " << base::hex << (uint64_t)found->DeviceId << ")"
ffffffff8000d803:	41 0f b7 7e 08       	movzwl 0x8(%r14),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d808:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000d80d:	e8 7e cc 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d812:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d815:	e8 a6 59 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d81a:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff8000d821:	e8 9a 59 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d826:	48 c7 c7 10 ad 02 80 	mov    $0xffffffff8002ad10,%rdi
ffffffff8000d82d:	e8 8e 59 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << " at PCI " << (uint64_t)found->Bus << ":"
ffffffff8000d832:	41 0f b6 7e 02       	movzbl 0x2(%r14),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d837:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000d83c:	e8 4f cc 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d841:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d844:	e8 77 59 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d849:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff8000d850:	e8 6b 59 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << (uint64_t)found->Device << "." << (uint64_t)found->Function
ffffffff8000d855:	41 0f b6 7e 03       	movzbl 0x3(%r14),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d85a:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000d85f:	e8 2c cc 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d864:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d867:	e8 54 59 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d86c:	48 c7 c7 57 ae 02 80 	mov    $0xffffffff8002ae57,%rdi
ffffffff8000d873:	e8 48 59 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d878:	41 0f b6 7e 04       	movzbl 0x4(%r14),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d87d:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000d882:	e8 09 cc 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000d887:	48 89 c7             	mov    %rax,%rdi
ffffffff8000d88a:	e8 31 59 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d88f:	48 c7 c7 18 c5 02 80 	mov    $0xffffffff8002c518,%rdi
ffffffff8000d896:	e9 86 ed ff ff       	jmp    ffffffff8000c621 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x3b1>
        } else if (pipeEnabled) {
ffffffff8000d89b:	45 85 ff             	test   %r15d,%r15d
ffffffff8000d89e:	0f 88 21 02 00 00    	js     ffffffff8000dac5 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1855>
        if (dspaStride != 0) {
ffffffff8000d8a4:	45 85 e4             	test   %r12d,%r12d
ffffffff8000d8a7:	0f 85 1a f3 ff ff    	jne    ffffffff8000cbc7 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x957>
        if (g_fbWidth == 0 || g_fbHeight == 0 || g_fbPitch == 0) {
ffffffff8000d8ad:	48 83 3d 0b 89 13 00 	cmpq   $0x0,0x13890b(%rip)        # ffffffff801461c0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbWidthE>
ffffffff8000d8b4:	00 
ffffffff8000d8b5:	0f 84 23 f3 ff ff    	je     ffffffff8000cbde <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x96e>
ffffffff8000d8bb:	48 83 3d f5 88 13 00 	cmpq   $0x0,0x1388f5(%rip)        # ffffffff801461b8 <_ZN7Drivers8Graphics8IntelGPUL10g_fbHeightE>
ffffffff8000d8c2:	00 
ffffffff8000d8c3:	0f 84 15 f3 ff ff    	je     ffffffff8000cbde <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x96e>
ffffffff8000d8c9:	e9 a0 f2 ff ff       	jmp    ffffffff8000cb6e <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x8fe>
ffffffff8000d8ce:	66 90                	xchg   %ax,%ax
ffffffff8000d8d0:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000d8d7:	89 15 c7 1b 1d 00    	mov    %edx,0x1d1bc7(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000d8dd:	e8 de 58 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d8e2:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000d8e9:	e8 d2 58 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d8ee:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000d8f5:	e8 c6 58 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d8fa:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff8000d901:	e8 ba 58 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d906:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000d90d:	e8 ae 58 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d912:	48 c7 c7 f8 c5 02 80 	mov    $0xffffffff8002c5f8,%rdi
ffffffff8000d919:	e8 a2 58 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d91e:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000d925:	e8 96 58 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d92a:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
ffffffff8000d931:	e8 8a 58 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d936:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000d93d:	e8 7e 58 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d942:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000d949:	e8 72 58 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d94e:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff8000d955:	e8 66 58 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d95a:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000d961:	e8 5a 58 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d966:	48 c7 c7 57 a7 02 80 	mov    $0xffffffff8002a757,%rdi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000d96d:	e8 4e 58 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000d972:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000d979:	e8 42 58 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000d97e:	8b 05 20 1b 1d 00    	mov    0x1d1b20(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000d984:	83 e8 01             	sub    $0x1,%eax
ffffffff8000d987:	89 05 17 1b 1d 00    	mov    %eax,0x1d1b17(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        }

        KernelLogStream(OK, "IntelGPU") << "Initialization complete: "
            << base::dec << g_fbWidth << "x" << g_fbHeight
            << " @ " << base::hex << (uint64_t)g_fbBase;
    }
ffffffff8000d98d:	48 83 c4 18          	add    $0x18,%rsp
ffffffff8000d991:	5b                   	pop    %rbx
ffffffff8000d992:	41 5c                	pop    %r12
ffffffff8000d994:	41 5d                	pop    %r13
ffffffff8000d996:	41 5e                	pop    %r14
ffffffff8000d998:	41 5f                	pop    %r15
ffffffff8000d99a:	5d                   	pop    %rbp
ffffffff8000d99b:	c3                   	ret
            switch (gttSizeBits) {
ffffffff8000d99c:	3c 02                	cmp    $0x2,%al
ffffffff8000d99e:	0f 84 54 04 00 00    	je     ffffffff8000ddf8 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1b88>
ffffffff8000d9a4:	3c 03                	cmp    $0x3,%al
ffffffff8000d9a6:	0f 84 3b 04 00 00    	je     ffffffff8000dde7 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1b77>
ffffffff8000d9ac:	84 c0                	test   %al,%al
ffffffff8000d9ae:	0f 85 22 04 00 00    	jne    ffffffff8000ddd6 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1b66>
            Print(string);
ffffffff8000d9b4:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000d9bb:	89 15 e3 1a 1d 00    	mov    %edx,0x1d1ae3(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000d9c1:	e8 fa 57 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d9c6:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000d9cd:	e8 ee 57 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d9d2:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000d9d9:	e8 e2 57 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d9de:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8000d9e5:	e8 d6 57 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d9ea:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000d9f1:	e8 ca 57 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000d9f6:	48 c7 c7 40 c6 02 80 	mov    $0xffffffff8002c640,%rdi
ffffffff8000d9fd:	e8 be 57 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000da02:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000da09:	e8 b2 57 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000da0e:	8b 15 90 1a 1d 00    	mov    0x1d1a90(%rip),%edx        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000da14:	41 bc 00 04 00 00    	mov    $0x400,%r12d
            gttSizeBytes = 1024 * 1024;
ffffffff8000da1a:	41 bd 00 00 10 00    	mov    $0x100000,%r13d
ffffffff8000da20:	e9 2e f4 ff ff       	jmp    ffffffff8000ce53 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0xbe3>
            if (g_fbWidth > 0 && g_fbPitch < g_fbWidth * 4) {
ffffffff8000da25:	48 c1 e0 02          	shl    $0x2,%rax
ffffffff8000da29:	48 39 c2             	cmp    %rax,%rdx
ffffffff8000da2c:	0f 83 89 fe ff ff    	jae    ffffffff8000d8bb <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x164b>
            Print(string);
ffffffff8000da32:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000da39:	89 0d 65 1a 1d 00    	mov    %ecx,0x1d1a65(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000da3f:	e8 7c 57 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000da44:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000da4b:	e8 70 57 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000da50:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000da57:	e8 64 57 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000da5c:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000da63:	e8 58 57 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000da68:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000da6f:	e8 4c 57 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000da74:	48 c7 c7 35 a7 02 80 	mov    $0xffffffff8002a735,%rdi
ffffffff8000da7b:	e8 40 57 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000da80:	48 8b 3d 29 87 13 00 	mov    0x138729(%rip),%rdi        # ffffffff801461b0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbPitchE>
ffffffff8000da87:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000da8c:	e8 ff c9 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000da91:	48 89 c7             	mov    %rax,%rdi
ffffffff8000da94:	e8 27 57 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000da99:	48 c7 c7 c0 c5 02 80 	mov    $0xffffffff8002c5c0,%rdi
ffffffff8000daa0:	e8 1b 57 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000daa5:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000daac:	e8 0f 57 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000dab1:	83 2d ec 19 1d 00 01 	subl   $0x1,0x1d19ec(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
                g_fbPitch *= 64;
ffffffff8000dab8:	48 c1 25 f0 86 13 00 	shlq   $0x6,0x1386f0(%rip)        # ffffffff801461b0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbPitchE>
ffffffff8000dabf:	06 
ffffffff8000dac0:	e9 e8 fd ff ff       	jmp    ffffffff8000d8ad <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x163d>
            g_fbWidth  = (htotal & 0xFFF) + 1;
ffffffff8000dac5:	41 81 e6 ff 0f 00 00 	and    $0xfff,%r14d
            g_fbHeight = (vtotal & 0xFFF) + 1;
ffffffff8000dacc:	41 81 e5 ff 0f 00 00 	and    $0xfff,%r13d
            g_fbWidth  = (htotal & 0xFFF) + 1;
ffffffff8000dad3:	49 8d 46 01          	lea    0x1(%r14),%rax
            g_fbHeight = (vtotal & 0xFFF) + 1;
ffffffff8000dad7:	49 8d 75 01          	lea    0x1(%r13),%rsi
ffffffff8000dadb:	e9 7b f0 ff ff       	jmp    ffffffff8000cb5b <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x8eb>
            g_fbPitch = g_fbWidth * 4;
ffffffff8000dae0:	48 c1 e1 02          	shl    $0x2,%rcx
            Print(string);
ffffffff8000dae4:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000daeb:	89 15 b3 19 1d 00    	mov    %edx,0x1d19b3(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000daf1:	48 89 0d b8 86 13 00 	mov    %rcx,0x1386b8(%rip)        # ffffffff801461b0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbPitchE>
            Print(string);
ffffffff8000daf8:	e8 c3 56 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dafd:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000db04:	e8 b7 56 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000db09:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000db10:	e8 ab 56 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000db15:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8000db1c:	e8 9f 56 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000db21:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000db28:	e8 93 56 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000db2d:	48 c7 c7 20 c6 02 80 	mov    $0xffffffff8002c620,%rdi
ffffffff8000db34:	e8 87 56 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000db39:	48 8b 3d 70 86 13 00 	mov    0x138670(%rip),%rdi        # ffffffff801461b0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbPitchE>
ffffffff8000db40:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000db45:	e8 46 c9 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000db4a:	48 89 c7             	mov    %rax,%rdi
ffffffff8000db4d:	e8 6e 56 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000db52:	48 c7 c7 74 a7 02 80 	mov    $0xffffffff8002a774,%rdi
ffffffff8000db59:	e8 62 56 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000db5e:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000db65:	e8 56 56 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000db6a:	8b 15 34 19 1d 00    	mov    0x1d1934(%rip),%edx        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        g_fbSize = g_fbHeight * g_fbPitch;
ffffffff8000db70:	48 8b 05 41 86 13 00 	mov    0x138641(%rip),%rax        # ffffffff801461b8 <_ZN7Drivers8Graphics8IntelGPUL10g_fbHeightE>
ffffffff8000db77:	48 8b 35 32 86 13 00 	mov    0x138632(%rip),%rsi        # ffffffff801461b0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbPitchE>
ffffffff8000db7e:	e9 73 f1 ff ff       	jmp    ffffffff8000ccf6 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0xa86>
ffffffff8000db83:	48 8b 03             	mov    (%rbx),%rax
ffffffff8000db86:	4c 89 e2             	mov    %r12,%rdx
ffffffff8000db89:	48 c1 e2 04          	shl    $0x4,%rdx
ffffffff8000db8d:	48 01 c2             	add    %rax,%rdx
            if (devices[i].VendorId != VendorIntel) {
ffffffff8000db90:	66 81 7a 06 86 80    	cmpw   $0x8086,0x6(%rdx)
ffffffff8000db96:	0f 84 35 e8 ff ff    	je     ffffffff8000c3d1 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x161>
        for (uint64_t i = 0; i < devices.size(); i++) {
ffffffff8000db9c:	49 83 c4 01          	add    $0x1,%r12
ffffffff8000dba0:	4c 3b 63 08          	cmp    0x8(%rbx),%r12
ffffffff8000dba4:	0f 82 64 e7 ff ff    	jb     ffffffff8000c30e <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x9e>
ffffffff8000dbaa:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            Print(string);
ffffffff8000dbb0:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000dbb7:	83 05 e6 18 1d 00 01 	addl   $0x1,0x1d18e6(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000dbbe:	e8 fd 55 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dbc3:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000dbca:	e8 f1 55 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dbcf:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000dbd6:	e8 e5 55 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dbdb:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8000dbe2:	e8 d9 55 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dbe7:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000dbee:	e8 cd 55 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dbf3:	48 c7 c7 c8 c4 02 80 	mov    $0xffffffff8002c4c8,%rdi
ffffffff8000dbfa:	e9 6e fd ff ff       	jmp    ffffffff8000d96d <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x16fd>
            uint32_t bar0High = Pci::LegacyRead32(bus, dev, func, (uint8_t)(PCI_REG_BAR0 + 4));
ffffffff8000dbff:	8b 7d c8             	mov    -0x38(%rbp),%edi
ffffffff8000dc02:	b9 14 00 00 00       	mov    $0x14,%ecx
ffffffff8000dc07:	44 89 fa             	mov    %r15d,%edx
ffffffff8000dc0a:	44 89 f6             	mov    %r14d,%esi
ffffffff8000dc0d:	e8 ee 1e 01 00       	call   ffffffff8001fb00 <_ZN3Pci12LegacyRead32Ehhhh>
            mmioPhys |= ((uint64_t)bar0High << 32);
ffffffff8000dc12:	48 c1 e0 20          	shl    $0x20,%rax
ffffffff8000dc16:	49 09 c4             	or     %rax,%r12
ffffffff8000dc19:	e9 6b ea ff ff       	jmp    ffffffff8000c689 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x419>
        const DeviceInfo* matchedInfo = nullptr;
ffffffff8000dc1e:	45 31 ed             	xor    %r13d,%r13d
ffffffff8000dc21:	e9 bd e8 ff ff       	jmp    ffffffff8000c4e3 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x273>
ffffffff8000dc26:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000dc2d:	89 05 71 18 1d 00    	mov    %eax,0x1d1871(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000dc33:	e8 88 55 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dc38:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000dc3f:	e8 7c 55 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dc44:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000dc4b:	e8 70 55 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dc50:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000dc57:	e8 64 55 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dc5c:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000dc63:	e8 58 55 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dc68:	48 c7 c7 70 c5 02 80 	mov    $0xffffffff8002c570,%rdi
ffffffff8000dc6f:	e8 4c 55 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dc74:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000dc7b:	e8 40 55 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000dc80:	8b 0d 1e 18 1d 00    	mov    0x1d181e(%rip),%ecx        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            return;
ffffffff8000dc86:	e9 94 ec ff ff       	jmp    ffffffff8000c91f <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x6af>
            Print(string);
ffffffff8000dc8b:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000dc92:	89 05 0c 18 1d 00    	mov    %eax,0x1d180c(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000dc98:	e8 23 55 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dc9d:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000dca4:	e8 17 55 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dca9:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000dcb0:	e8 0b 55 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dcb5:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff8000dcbc:	e8 ff 54 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dcc1:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000dcc8:	e8 f3 54 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dccd:	48 c7 c7 f4 a7 02 80 	mov    $0xffffffff8002a7f4,%rdi
ffffffff8000dcd4:	e8 e7 54 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000dcd9:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000dcde:	48 89 df             	mov    %rbx,%rdi
ffffffff8000dce1:	e8 aa c7 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000dce6:	48 89 c7             	mov    %rax,%rdi
ffffffff8000dce9:	e8 d2 54 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000dcee:	48 c7 c7 0a a8 02 80 	mov    $0xffffffff8002a80a,%rdi
ffffffff8000dcf5:	e8 c6 54 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000dcfa:	48 8b 3d e7 84 13 00 	mov    0x1384e7(%rip),%rdi        # ffffffff801461e8 <_ZN7Drivers8Graphics8IntelGPUL15g_gttEntryCountE>
ffffffff8000dd01:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000dd06:	e8 85 c7 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000dd0b:	48 89 c7             	mov    %rax,%rdi
ffffffff8000dd0e:	e8 ad 54 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000dd13:	48 c7 c7 67 be 02 80 	mov    $0xffffffff8002be67,%rdi
ffffffff8000dd1a:	e8 a1 54 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dd1f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000dd26:	e8 95 54 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000dd2b:	8b 05 73 17 1d 00    	mov    0x1d1773(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000dd31:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000dd38:	89 05 66 17 1d 00    	mov    %eax,0x1d1766(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000dd3e:	e8 7d 54 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dd43:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000dd4a:	e8 71 54 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dd4f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000dd56:	e8 65 54 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dd5b:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff8000dd62:	e8 59 54 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dd67:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000dd6e:	e8 4d 54 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dd73:	48 c7 c7 5c a8 02 80 	mov    $0xffffffff8002a85c,%rdi
ffffffff8000dd7a:	e9 ee fb ff ff       	jmp    ffffffff8000d96d <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x16fd>
            for (uint64_t i = 0; i < pageCount; i++) {
ffffffff8000dd7f:	48 85 db             	test   %rbx,%rbx
ffffffff8000dd82:	74 46                	je     ffffffff8000ddca <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1b5a>
ffffffff8000dd84:	49 89 d8             	mov    %rbx,%r8
ffffffff8000dd87:	48 89 f1             	mov    %rsi,%rcx
ffffffff8000dd8a:	4c 89 e2             	mov    %r12,%rdx
ffffffff8000dd8d:	49 c1 e0 0c          	shl    $0xc,%r8
ffffffff8000dd91:	4d 01 e0             	add    %r12,%r8
        pte |= (uint32_t)((physAddr >> 28) & 0x7F0u);           // bits [38:32] -> PTE [10:4]
ffffffff8000dd94:	48 89 d0             	mov    %rdx,%rax
        uint32_t pte = (uint32_t)(physAddr & 0xFFFFF000u);       // bits [31:12]
ffffffff8000dd97:	89 d7                	mov    %edx,%edi
ffffffff8000dd99:	48 81 c2 00 10 00 00 	add    $0x1000,%rdx
ffffffff8000dda0:	48 83 c1 04          	add    $0x4,%rcx
        pte |= (uint32_t)((physAddr >> 28) & 0x7F0u);           // bits [38:32] -> PTE [10:4]
ffffffff8000dda4:	48 c1 e8 1c          	shr    $0x1c,%rax
        uint32_t pte = (uint32_t)(physAddr & 0xFFFFF000u);       // bits [31:12]
ffffffff8000dda8:	81 e7 00 f0 ff ff    	and    $0xfffff000,%edi
        pte |= (uint32_t)((physAddr >> 28) & 0x7F0u);           // bits [38:32] -> PTE [10:4]
ffffffff8000ddae:	25 f0 07 00 00       	and    $0x7f0,%eax
ffffffff8000ddb3:	09 f8                	or     %edi,%eax
        pte |= GTT_PTE_VALID;
ffffffff8000ddb5:	83 c8 01             	or     $0x1,%eax
                gtt32[i] = MakeGttPte32(fwFbPhys + i * 0x1000);
ffffffff8000ddb8:	89 41 fc             	mov    %eax,-0x4(%rcx)
            for (uint64_t i = 0; i < pageCount; i++) {
ffffffff8000ddbb:	4c 39 c2             	cmp    %r8,%rdx
ffffffff8000ddbe:	75 d4                	jne    ffffffff8000dd94 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1b24>
            g_kernelLogDepth++;
ffffffff8000ddc0:	8b 05 de 16 1d 00    	mov    0x1d16de(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000ddc6:	44 8d 40 01          	lea    0x1(%rax),%r8d
            (void)gtt32[pageCount - 1];
ffffffff8000ddca:	48 8d 44 9e fc       	lea    -0x4(%rsi,%rbx,4),%rax
ffffffff8000ddcf:	8b 00                	mov    (%rax),%eax
ffffffff8000ddd1:	e9 58 f4 ff ff       	jmp    ffffffff8000d22e <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0xfbe>
            switch (gttSizeBits) {
ffffffff8000ddd6:	41 bc 00 08 00 00    	mov    $0x800,%r12d
                case 3: gttSizeBytes = 2 * 1024 * 1024; break; // Depends on gen, default 2MB
ffffffff8000dddc:	41 bd 00 00 20 00    	mov    $0x200000,%r13d
ffffffff8000dde2:	e9 6c f0 ff ff       	jmp    ffffffff8000ce53 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0xbe3>
            switch (gttSizeBits) {
ffffffff8000dde7:	41 bc 00 20 00 00    	mov    $0x2000,%r12d
ffffffff8000dded:	41 bd 00 00 80 00    	mov    $0x800000,%r13d
ffffffff8000ddf3:	e9 5b f0 ff ff       	jmp    ffffffff8000ce53 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0xbe3>
ffffffff8000ddf8:	41 bc 00 10 00 00    	mov    $0x1000,%r12d
                case 2: gttSizeBytes = 4 * 1024 * 1024; break; // 4MB
ffffffff8000ddfe:	41 bd 00 00 40 00    	mov    $0x400000,%r13d
ffffffff8000de04:	e9 4a f0 ff ff       	jmp    ffffffff8000ce53 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0xbe3>
            Print(string);
ffffffff8000de09:	48 c7 c7 6f a6 02 80 	mov    $0xffffffff8002a66f,%rdi
            g_kernelLogDepth++;
ffffffff8000de10:	89 05 8e 16 1d 00    	mov    %eax,0x1d168e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000de16:	e8 a5 53 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000de1b:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000de22:	e8 99 53 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000de27:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000de2e:	e8 8d 53 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000de33:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff8000de3a:	e8 81 53 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000de3f:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000de46:	e8 75 53 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000de4b:	48 c7 c7 68 c6 02 80 	mov    $0xffffffff8002c668,%rdi
ffffffff8000de52:	e8 69 53 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000de57:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000de5e:	e8 5d 53 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000de63:	8b 05 3b 16 1d 00    	mov    0x1d163b(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            return false;
ffffffff8000de69:	e9 c3 fe ff ff       	jmp    ffffffff8000dd31 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x1ac1>
        if (g_fbWidth != fwWidth || g_fbHeight != fwHeight || g_fbPitch != fwPitch) {
ffffffff8000de6e:	4c 39 25 3b 83 13 00 	cmp    %r12,0x13833b(%rip)        # ffffffff801461b0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbPitchE>
ffffffff8000de75:	0f 85 9d f6 ff ff    	jne    ffffffff8000d518 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x12a8>
ffffffff8000de7b:	e9 5a f8 ff ff       	jmp    ffffffff8000d6da <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x146a>
ffffffff8000de80:	45 31 c9             	xor    %r9d,%r9d
ffffffff8000de83:	e9 9e f3 ff ff       	jmp    ffffffff8000d226 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0xfb6>
ffffffff8000de88:	4c 89 e2             	mov    %r12,%rdx
ffffffff8000de8b:	48 c1 e2 04          	shl    $0x4,%rdx
ffffffff8000de8f:	48 01 c2             	add    %rax,%rdx
ffffffff8000de92:	e9 3a e5 ff ff       	jmp    ffffffff8000c3d1 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv+0x161>
ffffffff8000de97:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8000de9e:	00 00 

ffffffff8000dea0 <_ZN7Drivers8Graphics8IntelGPU13IsInitializedEv>:

    bool IsInitialized() {
        return g_initialized;
    }
ffffffff8000dea0:	0f b6 05 99 83 13 00 	movzbl 0x138399(%rip),%eax        # ffffffff80146240 <_ZN7Drivers8Graphics8IntelGPUL13g_initializedE>
ffffffff8000dea7:	c3                   	ret
ffffffff8000dea8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000deaf:	00 

ffffffff8000deb0 <_ZN7Drivers8Graphics8IntelGPU10GetGpuInfoEv>:

    const GpuInfo* GetGpuInfo() {
        return &g_gpuInfo;
    }
ffffffff8000deb0:	48 c7 c0 00 62 14 80 	mov    $0xffffffff80146200,%rax
ffffffff8000deb7:	c3                   	ret
ffffffff8000deb8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000debf:	00 

ffffffff8000dec0 <_ZN7Drivers8Graphics8IntelGPU18GetFramebufferBaseEv>:

    uint32_t* GetFramebufferBase() {
        return g_fbBase;
    }
ffffffff8000dec0:	48 8b 05 09 83 13 00 	mov    0x138309(%rip),%rax        # ffffffff801461d0 <_ZN7Drivers8Graphics8IntelGPUL8g_fbBaseE>
ffffffff8000dec7:	c3                   	ret
ffffffff8000dec8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000decf:	00 

ffffffff8000ded0 <_ZN7Drivers8Graphics8IntelGPU8GetWidthEv>:
        return g_fbPhysBase;
    }

    uint64_t GetWidth() {
        return g_fbWidth;
    }
ffffffff8000ded0:	48 8b 05 e9 82 13 00 	mov    0x1382e9(%rip),%rax        # ffffffff801461c0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbWidthE>
ffffffff8000ded7:	c3                   	ret
ffffffff8000ded8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000dedf:	00 

ffffffff8000dee0 <_ZN7Drivers8Graphics8IntelGPU9GetHeightEv>:

    uint64_t GetHeight() {
        return g_fbHeight;
    }
ffffffff8000dee0:	48 8b 05 d1 82 13 00 	mov    0x1382d1(%rip),%rax        # ffffffff801461b8 <_ZN7Drivers8Graphics8IntelGPUL10g_fbHeightE>
ffffffff8000dee7:	c3                   	ret
ffffffff8000dee8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000deef:	00 

ffffffff8000def0 <_ZN7Drivers8Graphics8IntelGPU8GetPitchEv>:

    uint64_t GetPitch() {
        return g_fbPitch;
    }
ffffffff8000def0:	48 8b 05 b9 82 13 00 	mov    0x1382b9(%rip),%rax        # ffffffff801461b0 <_ZN7Drivers8Graphics8IntelGPUL9g_fbPitchE>
ffffffff8000def7:	c3                   	ret
ffffffff8000def8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000deff:	00 

ffffffff8000df00 <_ZN7Drivers3Net5E1000L15HandleInterruptEh>:

    // -------------------------------------------------------------------------
    // Interrupt handler
    // -------------------------------------------------------------------------

    static void HandleInterrupt(uint8_t irq) {
ffffffff8000df00:	55                   	push   %rbp
ffffffff8000df01:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000df04:	41 55                	push   %r13
ffffffff8000df06:	41 54                	push   %r12
ffffffff8000df08:	53                   	push   %rbx
ffffffff8000df09:	48 83 ec 08          	sub    $0x8,%rsp
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000df0d:	48 8b 05 9c 87 13 00 	mov    0x13879c(%rip),%rax        # ffffffff801466b0 <_ZN7Drivers3Net5E1000L10g_mmioBaseE>
ffffffff8000df14:	8b 98 c0 00 00 00    	mov    0xc0(%rax),%ebx
        (void)irq;

        // Read and clear interrupt cause
        uint32_t icr = ReadReg(REG_ICR);

        if (icr & ICR_LSC) {
ffffffff8000df1a:	f6 c3 04             	test   $0x4,%bl
ffffffff8000df1d:	0f 85 b5 00 00 00    	jne    ffffffff8000dfd8 <_ZN7Drivers3Net5E1000L15HandleInterruptEh+0xd8>
            uint32_t status = ReadReg(REG_STATUS);
            bool linkUp = (status & (1 << 1)) != 0;
            KernelLogStream(INFO, "E1000") << "Link status change: " << (linkUp ? "UP" : "DOWN");
        }

        if (icr & ICR_RXT0) {
ffffffff8000df23:	81 e3 80 00 00 00    	and    $0x80,%ebx
ffffffff8000df29:	0f 84 97 00 00 00    	je     ffffffff8000dfc6 <_ZN7Drivers3Net5E1000L15HandleInterruptEh+0xc6>
            // Process received packets
            while (true) {
                uint32_t nextIdx = (g_rxTail + 1) % RX_DESC_COUNT;
ffffffff8000df2f:	8b 05 2f 83 13 00    	mov    0x13832f(%rip),%eax        # ffffffff80146264 <_ZN7Drivers3Net5E1000L8g_rxTailE>
                RxDescriptor& desc = g_rxDescs[nextIdx];
ffffffff8000df35:	48 8b 0d 5c 87 13 00 	mov    0x13875c(%rip),%rcx        # ffffffff80146698 <_ZN7Drivers3Net5E1000L9g_rxDescsE>
                uint32_t nextIdx = (g_rxTail + 1) % RX_DESC_COUNT;
ffffffff8000df3c:	8d 58 01             	lea    0x1(%rax),%ebx
ffffffff8000df3f:	83 e3 1f             	and    $0x1f,%ebx
                RxDescriptor& desc = g_rxDescs[nextIdx];
ffffffff8000df42:	89 d8                	mov    %ebx,%eax
ffffffff8000df44:	49 89 c4             	mov    %rax,%r12
ffffffff8000df47:	49 c1 e4 04          	shl    $0x4,%r12
ffffffff8000df4b:	49 01 cc             	add    %rcx,%r12

                if (!(desc.Status & RXSTA_DD)) {
ffffffff8000df4e:	41 f6 44 24 0c 01    	testb  $0x1,0xc(%r12)
ffffffff8000df54:	74 70                	je     ffffffff8000dfc6 <_ZN7Drivers3Net5E1000L15HandleInterruptEh+0xc6>
ffffffff8000df56:	44 0f b7 2d 02 b1 01 	movzwl 0x1b102(%rip),%r13d        # ffffffff80029060 <col256+0x3c0>
ffffffff8000df5d:	00 
ffffffff8000df5e:	66 90                	xchg   %ax,%ax

                uint16_t length = desc.Length;
                g_rxPacketCount++;

                // Dispatch to the network stack callback
                if (g_rxCallback != nullptr) {
ffffffff8000df60:	48 8b 15 e1 82 13 00 	mov    0x1382e1(%rip),%rdx        # ffffffff80146248 <_ZN7Drivers3Net5E1000L12g_rxCallbackE>
                g_rxPacketCount++;
ffffffff8000df67:	48 83 05 e9 82 13 00 	addq   $0x1,0x1382e9(%rip)        # ffffffff80146258 <_ZN7Drivers3Net5E1000L15g_rxPacketCountE>
ffffffff8000df6e:	01 
                uint16_t length = desc.Length;
ffffffff8000df6f:	41 0f b7 74 24 08    	movzwl 0x8(%r12),%esi
                if (g_rxCallback != nullptr) {
ffffffff8000df75:	48 85 d2             	test   %rdx,%rdx
ffffffff8000df78:	74 11                	je     ffffffff8000df8b <_ZN7Drivers3Net5E1000L15HandleInterruptEh+0x8b>
                    g_rxCallback(g_rxBuffers[nextIdx], length);
ffffffff8000df7a:	48 8b 3c c5 80 65 14 	mov    -0x7feb9a80(,%rax,8),%rdi
ffffffff8000df81:	80 
ffffffff8000df82:	ff d2                	call   *%rdx
ffffffff8000df84:	48 8b 0d 0d 87 13 00 	mov    0x13870d(%rip),%rcx        # ffffffff80146698 <_ZN7Drivers3Net5E1000L9g_rxDescsE>
                }

                // Reset descriptor for reuse
                desc.Status = 0;
                desc.Length = 0;
ffffffff8000df8b:	31 c0                	xor    %eax,%eax
                desc.Status = 0;
ffffffff8000df8d:	66 45 89 6c 24 0c    	mov    %r13w,0xc(%r12)
                desc.Length = 0;
ffffffff8000df93:	66 41 89 44 24 08    	mov    %ax,0x8(%r12)
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000df99:	48 8b 05 10 87 13 00 	mov    0x138710(%rip),%rax        # ffffffff801466b0 <_ZN7Drivers3Net5E1000L10g_mmioBaseE>
                desc.Errors = 0;

                g_rxTail = nextIdx;
ffffffff8000dfa0:	89 1d be 82 13 00    	mov    %ebx,0x1382be(%rip)        # ffffffff80146264 <_ZN7Drivers3Net5E1000L8g_rxTailE>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000dfa6:	89 98 18 28 00 00    	mov    %ebx,0x2818(%rax)
                uint32_t nextIdx = (g_rxTail + 1) % RX_DESC_COUNT;
ffffffff8000dfac:	83 c3 01             	add    $0x1,%ebx
ffffffff8000dfaf:	83 e3 1f             	and    $0x1f,%ebx
                RxDescriptor& desc = g_rxDescs[nextIdx];
ffffffff8000dfb2:	89 d8                	mov    %ebx,%eax
ffffffff8000dfb4:	49 89 c4             	mov    %rax,%r12
ffffffff8000dfb7:	49 c1 e4 04          	shl    $0x4,%r12
ffffffff8000dfbb:	49 01 cc             	add    %rcx,%r12
                if (!(desc.Status & RXSTA_DD)) {
ffffffff8000dfbe:	41 f6 44 24 0c 01    	testb  $0x1,0xc(%r12)
ffffffff8000dfc4:	75 9a                	jne    ffffffff8000df60 <_ZN7Drivers3Net5E1000L15HandleInterruptEh+0x60>
        }

        if (icr & (ICR_TXDW | ICR_TXQE)) {
            // TX completion - nothing to do for now
        }
    }
ffffffff8000dfc6:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8000dfca:	5b                   	pop    %rbx
ffffffff8000dfcb:	41 5c                	pop    %r12
ffffffff8000dfcd:	41 5d                	pop    %r13
ffffffff8000dfcf:	5d                   	pop    %rbp
ffffffff8000dfd0:	c3                   	ret
ffffffff8000dfd1:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            Print(string);
ffffffff8000dfd8:	48 c7 c7 da a3 02 80 	mov    $0xffffffff8002a3da,%rdi
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000dfdf:	44 8b 60 08          	mov    0x8(%rax),%r12d
            g_kernelLogDepth++;
ffffffff8000dfe3:	83 05 ba 14 1d 00 01 	addl   $0x1,0x1d14ba(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000dfea:	e8 d1 51 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dfef:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000dff6:	e8 c5 51 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000dffb:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000e002:	e8 b9 51 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e007:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000e00e:	e8 ad 51 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e013:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000e01a:	e8 a1 51 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e01f:	48 c7 c7 d7 ac 02 80 	mov    $0xffffffff8002acd7,%rdi
ffffffff8000e026:	e8 95 51 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            KernelLogStream(INFO, "E1000") << "Link status change: " << (linkUp ? "UP" : "DOWN");
ffffffff8000e02b:	41 83 e4 02          	and    $0x2,%r12d
ffffffff8000e02f:	48 c7 c0 cf ac 02 80 	mov    $0xffffffff8002accf,%rax
ffffffff8000e036:	48 c7 c7 d2 ac 02 80 	mov    $0xffffffff8002acd2,%rdi
ffffffff8000e03d:	48 0f 45 f8          	cmovne %rax,%rdi
ffffffff8000e041:	e8 7a 51 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e046:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000e04d:	e8 6e 51 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000e052:	83 2d 4b 14 1d 00 01 	subl   $0x1,0x1d144b(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000e059:	e9 c5 fe ff ff       	jmp    ffffffff8000df23 <_ZN7Drivers3Net5E1000L15HandleInterruptEh+0x23>
ffffffff8000e05e:	66 90                	xchg   %ax,%ax

ffffffff8000e060 <_ZN7Drivers3Net5E1000L10EepromReadEh>:
    static uint16_t EepromRead(uint8_t address) {
ffffffff8000e060:	55                   	push   %rbp
        WriteReg(REG_EERD, ((uint32_t)address << 8) | 1);
ffffffff8000e061:	40 0f b6 c7          	movzbl %dil,%eax
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000e065:	ba 10 27 00 00       	mov    $0x2710,%edx
        WriteReg(REG_EERD, ((uint32_t)address << 8) | 1);
ffffffff8000e06a:	c1 e0 08             	shl    $0x8,%eax
ffffffff8000e06d:	83 c8 01             	or     $0x1,%eax
    static uint16_t EepromRead(uint8_t address) {
ffffffff8000e070:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000e073:	53                   	push   %rbx
ffffffff8000e074:	89 fb                	mov    %edi,%ebx
ffffffff8000e076:	48 83 ec 08          	sub    $0x8,%rsp
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000e07a:	48 8b 0d 2f 86 13 00 	mov    0x13862f(%rip),%rcx        # ffffffff801466b0 <_ZN7Drivers3Net5E1000L10g_mmioBaseE>
ffffffff8000e081:	89 41 14             	mov    %eax,0x14(%rcx)
        for (int i = 0; i < 10000; i++) {
ffffffff8000e084:	eb 0f                	jmp    ffffffff8000e095 <_ZN7Drivers3Net5E1000L10EepromReadEh+0x35>
ffffffff8000e086:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000e08d:	00 00 00 
ffffffff8000e090:	83 ea 01             	sub    $0x1,%edx
ffffffff8000e093:	74 13                	je     ffffffff8000e0a8 <_ZN7Drivers3Net5E1000L10EepromReadEh+0x48>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000e095:	8b 41 14             	mov    0x14(%rcx),%eax
            if (value & (1 << 4)) {
ffffffff8000e098:	a8 10                	test   $0x10,%al
ffffffff8000e09a:	74 f4                	je     ffffffff8000e090 <_ZN7Drivers3Net5E1000L10EepromReadEh+0x30>
    }
ffffffff8000e09c:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
                return (uint16_t)(value >> 16);
ffffffff8000e0a0:	c1 e8 10             	shr    $0x10,%eax
    }
ffffffff8000e0a3:	c9                   	leave
ffffffff8000e0a4:	c3                   	ret
ffffffff8000e0a5:	0f 1f 00             	nopl   (%rax)
            Print(string);
ffffffff8000e0a8:	48 c7 c7 da a3 02 80 	mov    $0xffffffff8002a3da,%rdi
            g_kernelLogDepth++;
ffffffff8000e0af:	83 05 ee 13 1d 00 01 	addl   $0x1,0x1d13ee(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000e0b6:	e8 05 51 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e0bb:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000e0c2:	e8 f9 50 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e0c7:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000e0ce:	e8 ed 50 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e0d3:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8000e0da:	e8 e1 50 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e0df:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000e0e6:	e8 d5 50 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e0eb:	48 c7 c7 30 c7 02 80 	mov    $0xffffffff8002c730,%rdi
ffffffff8000e0f2:	e8 c9 50 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        KernelLogStream(WARNING, "E1000") << "EEPROM read timeout for address " << base::hex << (uint64_t)address;
ffffffff8000e0f7:	0f b6 fb             	movzbl %bl,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000e0fa:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000e0ff:	e8 8c c3 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000e104:	48 89 c7             	mov    %rax,%rdi
ffffffff8000e107:	e8 b4 50 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000e10c:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000e113:	e8 a8 50 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000e118:	83 2d 85 13 1d 00 01 	subl   $0x1,0x1d1385(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff8000e11f:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff8000e123:	31 c0                	xor    %eax,%eax
ffffffff8000e125:	c9                   	leave
ffffffff8000e126:	c3                   	ret
ffffffff8000e127:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000e12e:	00 00 00 
ffffffff8000e131:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000e138:	00 00 00 
ffffffff8000e13b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff8000e140 <_ZN7Drivers3Net5E100010InitializeEv>:

    // -------------------------------------------------------------------------
    // Public API
    // -------------------------------------------------------------------------

    void Initialize() {
ffffffff8000e140:	55                   	push   %rbp
            Print(string);
ffffffff8000e141:	48 c7 c7 da a3 02 80 	mov    $0xffffffff8002a3da,%rdi
ffffffff8000e148:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000e14b:	41 56                	push   %r14
ffffffff8000e14d:	41 55                	push   %r13
ffffffff8000e14f:	41 54                	push   %r12
ffffffff8000e151:	53                   	push   %rbx
ffffffff8000e152:	31 db                	xor    %ebx,%ebx
            g_kernelLogDepth++;
ffffffff8000e154:	83 05 49 13 1d 00 01 	addl   $0x1,0x1d1349(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000e15b:	e8 60 50 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e160:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000e167:	e8 54 50 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e16c:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000e173:	e8 48 50 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e178:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000e17f:	e8 3c 50 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e184:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000e18b:	e8 30 50 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e190:	48 c7 c7 58 c7 02 80 	mov    $0xffffffff8002c758,%rdi
ffffffff8000e197:	e8 24 50 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e19c:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000e1a3:	e8 18 50 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000e1a8:	83 2d f5 12 1d 00 01 	subl   $0x1,0x1d12f5(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        KernelLogStream(INFO, "E1000") << "Scanning for Intel E1000 NIC...";

        // Find the E1000 in the PCI device list
        auto& devices = Pci::GetDevices();
ffffffff8000e1af:	e8 3c 20 01 00       	call   ffffffff800201f0 <_ZN3Pci10GetDevicesEv>
        const Pci::PciDevice* e1000Dev = nullptr;

        for (uint64_t i = 0; i < devices.size(); i++) {
ffffffff8000e1b4:	48 83 78 08 00       	cmpq   $0x0,0x8(%rax)
ffffffff8000e1b9:	49 89 c4             	mov    %rax,%r12
ffffffff8000e1bc:	75 19                	jne    ffffffff8000e1d7 <_ZN7Drivers3Net5E100010InitializeEv+0x97>
ffffffff8000e1be:	e9 bd 09 00 00       	jmp    ffffffff8000eb80 <_ZN7Drivers3Net5E100010InitializeEv+0xa40>
ffffffff8000e1c3:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff8000e1c8:	48 83 c3 01          	add    $0x1,%rbx
ffffffff8000e1cc:	49 3b 5c 24 08       	cmp    0x8(%r12),%rbx
ffffffff8000e1d1:	0f 83 a9 09 00 00    	jae    ffffffff8000eb80 <_ZN7Drivers3Net5E100010InitializeEv+0xa40>
            if (position > (capacity - 1)) {
ffffffff8000e1d7:	49 8b 44 24 10       	mov    0x10(%r12),%rax
ffffffff8000e1dc:	48 83 e8 01          	sub    $0x1,%rax
ffffffff8000e1e0:	48 39 d8             	cmp    %rbx,%rax
ffffffff8000e1e3:	0f 83 68 09 00 00    	jae    ffffffff8000eb51 <_ZN7Drivers3Net5E100010InitializeEv+0xa11>
            Print(string);
ffffffff8000e1e9:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000e1f0:	e8 cb 4f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e1f5:	48 c7 c7 44 a4 02 80 	mov    $0xffffffff8002a444,%rdi
ffffffff8000e1fc:	e8 bf 4f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e201:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000e208:	e8 b3 4f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e20d:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000e214:	e8 a7 4f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e219:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000e220:	e8 9b 4f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e225:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000e22c:	e8 8f 4f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                return array[position];
ffffffff8000e231:	49 8b 04 24          	mov    (%r12),%rax
            if (devices[i].VendorId == VendorIntel && devices[i].DeviceId == DeviceE1000) {
ffffffff8000e235:	66 81 78 06 86 80    	cmpw   $0x8086,0x6(%rax)
ffffffff8000e23b:	75 8b                	jne    ffffffff8000e1c8 <_ZN7Drivers3Net5E100010InitializeEv+0x88>
            if (position > (capacity - 1)) {
ffffffff8000e23d:	49 8b 4c 24 10       	mov    0x10(%r12),%rcx
ffffffff8000e242:	48 8d 51 ff          	lea    -0x1(%rcx),%rdx
ffffffff8000e246:	48 39 da             	cmp    %rbx,%rdx
ffffffff8000e249:	0f 83 e7 09 00 00    	jae    ffffffff8000ec36 <_ZN7Drivers3Net5E100010InitializeEv+0xaf6>
ffffffff8000e24f:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000e256:	e8 65 4f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e25b:	48 c7 c7 44 a4 02 80 	mov    $0xffffffff8002a444,%rdi
ffffffff8000e262:	e8 59 4f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e267:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000e26e:	e8 4d 4f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e273:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000e27a:	e8 41 4f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e27f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000e286:	e8 35 4f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e28b:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000e292:	e8 29 4f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                return array[position];
ffffffff8000e297:	49 8b 04 24          	mov    (%r12),%rax
ffffffff8000e29b:	48 89 c2             	mov    %rax,%rdx
ffffffff8000e29e:	66 81 7a 08 0e 10    	cmpw   $0x100e,0x8(%rdx)
ffffffff8000e2a4:	0f 85 1e ff ff ff    	jne    ffffffff8000e1c8 <_ZN7Drivers3Net5E100010InitializeEv+0x88>
            if (position > (capacity - 1)) {
ffffffff8000e2aa:	49 8b 4c 24 10       	mov    0x10(%r12),%rcx
ffffffff8000e2af:	48 8d 51 ff          	lea    -0x1(%rcx),%rdx
ffffffff8000e2b3:	48 39 da             	cmp    %rbx,%rdx
ffffffff8000e2b6:	0f 83 6e 09 00 00    	jae    ffffffff8000ec2a <_ZN7Drivers3Net5E100010InitializeEv+0xaea>
ffffffff8000e2bc:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000e2c3:	e8 f8 4e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e2c8:	48 c7 c7 44 a4 02 80 	mov    $0xffffffff8002a444,%rdi
ffffffff8000e2cf:	e8 ec 4e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e2d4:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000e2db:	e8 e0 4e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e2e0:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000e2e7:	e8 d4 4e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e2ec:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000e2f3:	e8 c8 4e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e2f8:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000e2ff:	e8 bc 4e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                return array[position];
ffffffff8000e304:	49 8b 1c 24          	mov    (%r12),%rbx
            g_kernelLogDepth++;
ffffffff8000e308:	8b 05 96 11 1d 00    	mov    0x1d1196(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000e30e:	83 c0 01             	add    $0x1,%eax
                e1000Dev = &devices[i];
                break;
            }
        }

        if (e1000Dev == nullptr) {
ffffffff8000e311:	48 85 db             	test   %rbx,%rbx
ffffffff8000e314:	0f 84 66 08 00 00    	je     ffffffff8000eb80 <_ZN7Drivers3Net5E100010InitializeEv+0xa40>
            Print(string);
ffffffff8000e31a:	48 c7 c7 da a3 02 80 	mov    $0xffffffff8002a3da,%rdi
            g_kernelLogDepth++;
ffffffff8000e321:	89 05 7d 11 1d 00    	mov    %eax,0x1d117d(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000e327:	e8 94 4e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e32c:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000e333:	e8 88 4e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e338:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000e33f:	e8 7c 4e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e344:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000e34b:	e8 70 4e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e350:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000e357:	e8 64 4e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e35c:	48 c7 c7 05 ad 02 80 	mov    $0xffffffff8002ad05,%rdi
ffffffff8000e363:	e8 58 4e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            KernelLogStream(WARNING, "E1000") << "No Intel E1000 NIC found";
            return;
        }

        KernelLogStream(OK, "E1000") << "Found E1000 at PCI "
            << base::hex << (uint64_t)e1000Dev->Bus << ":"
ffffffff8000e368:	0f b6 7b 02          	movzbl 0x2(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000e36c:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000e371:	e8 1a c1 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000e376:	48 89 c7             	mov    %rax,%rdi
ffffffff8000e379:	e8 42 4e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000e37e:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff8000e385:	e8 36 4e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (uint64_t)e1000Dev->Device << "." << (uint64_t)e1000Dev->Function;
ffffffff8000e38a:	0f b6 7b 03          	movzbl 0x3(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000e38e:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000e393:	e8 f8 c0 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000e398:	48 89 c7             	mov    %rax,%rdi
ffffffff8000e39b:	e8 20 4e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000e3a0:	48 c7 c7 57 ae 02 80 	mov    $0xffffffff8002ae57,%rdi
ffffffff8000e3a7:	e8 14 4e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e3ac:	0f b6 7b 04          	movzbl 0x4(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000e3b0:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000e3b5:	e8 d6 c0 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000e3ba:	48 89 c7             	mov    %rax,%rdi
ffffffff8000e3bd:	e8 fe 4d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000e3c2:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000e3c9:	e8 f2 4d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>

        // Read BAR0 (MMIO base address)
        uint32_t bar0 = Pci::LegacyRead32(e1000Dev->Bus, e1000Dev->Device, e1000Dev->Function, PCI_REG_BAR0);
ffffffff8000e3ce:	0f b6 53 04          	movzbl 0x4(%rbx),%edx
ffffffff8000e3d2:	b9 10 00 00 00       	mov    $0x10,%ecx
            g_kernelLogDepth--;
ffffffff8000e3d7:	83 2d c6 10 1d 00 01 	subl   $0x1,0x1d10c6(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000e3de:	0f b6 73 03          	movzbl 0x3(%rbx),%esi
ffffffff8000e3e2:	0f b6 7b 02          	movzbl 0x2(%rbx),%edi
ffffffff8000e3e6:	e8 15 17 01 00       	call   ffffffff8001fb00 <_ZN3Pci12LegacyRead32Ehhhh>
            Print(string);
ffffffff8000e3eb:	48 c7 c7 da a3 02 80 	mov    $0xffffffff8002a3da,%rdi
            g_kernelLogDepth++;
ffffffff8000e3f2:	83 05 ab 10 1d 00 01 	addl   $0x1,0x1d10ab(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        uint64_t mmioPhys = bar0 & 0xFFFFFFF0; // Mask low 4 bits (type/prefetchable flags)
ffffffff8000e3f9:	41 89 c6             	mov    %eax,%r14d
            Print(string);
ffffffff8000e3fc:	e8 bf 4d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e401:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000e408:	41 83 e6 f0          	and    $0xfffffff0,%r14d
ffffffff8000e40c:	e8 af 4d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e411:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000e418:	4d 8d ae 00 00 02 00 	lea    0x20000(%r14),%r13
            g_kernelLogDepth--;
ffffffff8000e41f:	4d 89 f4             	mov    %r14,%r12
            Print(string);
ffffffff8000e422:	e8 99 4d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e427:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000e42e:	e8 8d 4d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e433:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000e43a:	e8 81 4d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e43f:	48 c7 c7 a6 a6 02 80 	mov    $0xffffffff8002a6a6,%rdi
ffffffff8000e446:	e8 75 4d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000e44b:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000e450:	4c 89 f7             	mov    %r14,%rdi
ffffffff8000e453:	e8 38 c0 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000e458:	48 89 c7             	mov    %rax,%rdi
ffffffff8000e45b:	e8 60 4d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000e460:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000e467:	e8 54 4d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000e46c:	83 2d 31 10 1d 00 01 	subl   $0x1,0x1d1031(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

        KernelLogStream(INFO, "E1000") << "BAR0 physical: " << base::hex << mmioPhys;

        // Map the MMIO region (128KB = 32 pages)
        constexpr uint64_t MmioSize = 0x20000; // 128KB
        for (uint64_t offset = 0; offset < MmioSize; offset += 0x1000) {
ffffffff8000e473:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000e47a:	00 00 00 00 
ffffffff8000e47e:	66 90                	xchg   %ax,%ax
        return HHDMBase + address;
ffffffff8000e480:	48 8b 15 21 e5 13 00 	mov    0x13e521(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            Memory::VMM::g_paging->MapMMIO(mmioPhys + offset, Memory::HHDM(mmioPhys + offset));
ffffffff8000e487:	48 8b 3d 32 e5 13 00 	mov    0x13e532(%rip),%rdi        # ffffffff8014c9c0 <_ZN6Memory3VMM8g_pagingE>
ffffffff8000e48e:	4c 89 e6             	mov    %r12,%rsi
ffffffff8000e491:	4c 01 e2             	add    %r12,%rdx
        for (uint64_t offset = 0; offset < MmioSize; offset += 0x1000) {
ffffffff8000e494:	49 81 c4 00 10 00 00 	add    $0x1000,%r12
            Memory::VMM::g_paging->MapMMIO(mmioPhys + offset, Memory::HHDM(mmioPhys + offset));
ffffffff8000e49b:	e8 20 d4 00 00       	call   ffffffff8001b8c0 <_ZN6Memory3VMM6Paging7MapMMIOEmm>
        for (uint64_t offset = 0; offset < MmioSize; offset += 0x1000) {
ffffffff8000e4a0:	4d 39 ec             	cmp    %r13,%r12
ffffffff8000e4a3:	75 db                	jne    ffffffff8000e480 <_ZN7Drivers3Net5E100010InitializeEv+0x340>
        }

        g_mmioBase = (volatile uint8_t*)Memory::HHDM(mmioPhys);

        // Enable bus mastering and memory space in PCI command register
        uint16_t pciCmd = Pci::LegacyRead16(e1000Dev->Bus, e1000Dev->Device, e1000Dev->Function, PCI_REG_COMMAND);
ffffffff8000e4a5:	0f b6 53 04          	movzbl 0x4(%rbx),%edx
ffffffff8000e4a9:	0f b6 73 03          	movzbl 0x3(%rbx),%esi
ffffffff8000e4ad:	b9 04 00 00 00       	mov    $0x4,%ecx
ffffffff8000e4b2:	0f b6 7b 02          	movzbl 0x2(%rbx),%edi
ffffffff8000e4b6:	4c 03 35 eb e4 13 00 	add    0x13e4eb(%rip),%r14        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        g_mmioBase = (volatile uint8_t*)Memory::HHDM(mmioPhys);
ffffffff8000e4bd:	4c 89 35 ec 81 13 00 	mov    %r14,0x1381ec(%rip)        # ffffffff801466b0 <_ZN7Drivers3Net5E1000L10g_mmioBaseE>
        uint16_t pciCmd = Pci::LegacyRead16(e1000Dev->Bus, e1000Dev->Device, e1000Dev->Function, PCI_REG_COMMAND);
ffffffff8000e4c4:	e8 77 16 01 00       	call   ffffffff8001fb40 <_ZN3Pci12LegacyRead16Ehhhh>
        pciCmd |= PCI_CMD_BUS_MASTER | PCI_CMD_MEM_SPACE;
        Pci::LegacyWrite16(e1000Dev->Bus, e1000Dev->Device, e1000Dev->Function, PCI_REG_COMMAND, pciCmd);
ffffffff8000e4c9:	0f b6 53 04          	movzbl 0x4(%rbx),%edx
ffffffff8000e4cd:	0f b6 73 03          	movzbl 0x3(%rbx),%esi
ffffffff8000e4d1:	b9 04 00 00 00       	mov    $0x4,%ecx
        pciCmd |= PCI_CMD_BUS_MASTER | PCI_CMD_MEM_SPACE;
ffffffff8000e4d6:	83 c8 06             	or     $0x6,%eax
        Pci::LegacyWrite16(e1000Dev->Bus, e1000Dev->Device, e1000Dev->Function, PCI_REG_COMMAND, pciCmd);
ffffffff8000e4d9:	0f b6 7b 02          	movzbl 0x2(%rbx),%edi
ffffffff8000e4dd:	44 0f b7 c0          	movzwl %ax,%r8d
ffffffff8000e4e1:	e8 3a 17 01 00       	call   ffffffff8001fc20 <_ZN3Pci13LegacyWrite16Ehhhht>
            Print(string);
ffffffff8000e4e6:	48 c7 c7 da a3 02 80 	mov    $0xffffffff8002a3da,%rdi
            g_kernelLogDepth++;
ffffffff8000e4ed:	83 05 b0 0f 1d 00 01 	addl   $0x1,0x1d0fb0(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000e4f4:	e8 c7 4c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e4f9:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000e500:	e8 bb 4c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e505:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000e50c:	e8 af 4c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e511:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000e518:	e8 a3 4c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e51d:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000e524:	e8 97 4c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e529:	48 c7 c7 19 ad 02 80 	mov    $0xffffffff8002ad19,%rdi
ffffffff8000e530:	e8 8b 4c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e535:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000e53c:	e8 7f 4c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>

        KernelLogStream(OK, "E1000") << "Bus mastering enabled";

        // Read interrupt line from PCI config
        g_irqLine = Pci::LegacyRead8(e1000Dev->Bus, e1000Dev->Device, e1000Dev->Function, PCI_REG_INTERRUPT);
ffffffff8000e541:	0f b6 53 04          	movzbl 0x4(%rbx),%edx
ffffffff8000e545:	b9 3c 00 00 00       	mov    $0x3c,%ecx
            g_kernelLogDepth--;
ffffffff8000e54a:	83 2d 53 0f 1d 00 01 	subl   $0x1,0x1d0f53(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000e551:	0f b6 73 03          	movzbl 0x3(%rbx),%esi
ffffffff8000e555:	0f b6 7b 02          	movzbl 0x2(%rbx),%edi
ffffffff8000e559:	e8 32 16 01 00       	call   ffffffff8001fb90 <_ZN3Pci11LegacyRead8Ehhhh>
            Print(string);
ffffffff8000e55e:	48 c7 c7 da a3 02 80 	mov    $0xffffffff8002a3da,%rdi
            g_kernelLogDepth++;
ffffffff8000e565:	83 05 38 0f 1d 00 01 	addl   $0x1,0x1d0f38(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000e56c:	88 05 2e 81 13 00    	mov    %al,0x13812e(%rip)        # ffffffff801466a0 <_ZN7Drivers3Net5E1000L9g_irqLineE>
            Print(string);
ffffffff8000e572:	e8 49 4c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e577:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000e57e:	e8 3d 4c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e583:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000e58a:	e8 31 4c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e58f:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000e596:	e8 25 4c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e59b:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000e5a2:	e8 19 4c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e5a7:	48 c7 c7 0b ae 02 80 	mov    $0xffffffff8002ae0b,%rdi
ffffffff8000e5ae:	e8 0d 4c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        KernelLogStream(INFO, "E1000") << "IRQ line: " << base::dec << (uint64_t)g_irqLine;
ffffffff8000e5b3:	0f b6 3d e6 80 13 00 	movzbl 0x1380e6(%rip),%edi        # ffffffff801466a0 <_ZN7Drivers3Net5E1000L9g_irqLineE>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000e5ba:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000e5bf:	e8 cc be 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000e5c4:	48 89 c7             	mov    %rax,%rdi
ffffffff8000e5c7:	e8 f4 4b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000e5cc:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000e5d3:	e8 e8 4b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000e5d8:	48 8b 0d d1 80 13 00 	mov    0x1380d1(%rip),%rcx        # ffffffff801466b0 <_ZN7Drivers3Net5E1000L10g_mmioBaseE>
            g_kernelLogDepth--;
ffffffff8000e5df:	83 2d be 0e 1d 00 01 	subl   $0x1,0x1d0ebe(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000e5e6:	8b 01                	mov    (%rcx),%eax

        // Reset the device
        uint32_t ctrl = ReadReg(REG_CTRL);
        WriteReg(REG_CTRL, ctrl | CTRL_RST);
ffffffff8000e5e8:	0d 00 00 00 04       	or     $0x4000000,%eax
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000e5ed:	89 01                	mov    %eax,(%rcx)
ffffffff8000e5ef:	b8 a0 86 01 00       	mov    $0x186a0,%eax
ffffffff8000e5f4:	eb 0f                	jmp    ffffffff8000e605 <_ZN7Drivers3Net5E100010InitializeEv+0x4c5>
ffffffff8000e5f6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000e5fd:	00 00 00 

        // Wait for reset to complete (RST bit auto-clears)
        for (int i = 0; i < 100000; i++) {
ffffffff8000e600:	83 e8 01             	sub    $0x1,%eax
ffffffff8000e603:	74 0a                	je     ffffffff8000e60f <_ZN7Drivers3Net5E100010InitializeEv+0x4cf>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000e605:	8b 11                	mov    (%rcx),%edx
            if (!(ReadReg(REG_CTRL) & CTRL_RST)) {
ffffffff8000e607:	81 e2 00 00 00 04    	and    $0x4000000,%edx
ffffffff8000e60d:	75 f1                	jne    ffffffff8000e600 <_ZN7Drivers3Net5E100010InitializeEv+0x4c0>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000e60f:	c7 81 d8 00 00 00 ff 	movl   $0xffffffff,0xd8(%rcx)
ffffffff8000e616:	ff ff ff 
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000e619:	8b 01                	mov    (%rcx),%eax
        // Set link up
        ctrl = ReadReg(REG_CTRL);
        ctrl |= CTRL_SLU;
        ctrl &= ~(1u << 3); // Clear LRST
        ctrl &= ~(1u << 31); // Clear PHY_RST
        ctrl &= ~(1u << 7); // Clear ILOS
ffffffff8000e61b:	25 77 ff ff 7f       	and    $0x7fffff77,%eax
ffffffff8000e620:	83 c8 40             	or     $0x40,%eax
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000e623:	89 01                	mov    %eax,(%rcx)
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000e625:	8b 81 00 54 00 00    	mov    0x5400(%rcx),%eax
ffffffff8000e62b:	8b 91 04 54 00 00    	mov    0x5404(%rcx),%edx
        if (ral != 0) {
ffffffff8000e631:	85 c0                	test   %eax,%eax
ffffffff8000e633:	0f 84 96 05 00 00    	je     ffffffff8000ebcf <_ZN7Drivers3Net5E100010InitializeEv+0xa8f>
            g_macAddress[0] = (uint8_t)(ral);
ffffffff8000e639:	89 05 65 80 13 00    	mov    %eax,0x138065(%rip)        # ffffffff801466a4 <_ZN7Drivers3Net5E1000L12g_macAddressE>
            g_macAddress[4] = (uint8_t)(rah);
ffffffff8000e63f:	66 89 15 62 80 13 00 	mov    %dx,0x138062(%rip)        # ffffffff801466a8 <_ZN7Drivers3Net5E1000L12g_macAddressE+0x4>
        WriteReg(REG_RAL,
ffffffff8000e646:	8b 05 58 80 13 00    	mov    0x138058(%rip),%eax        # ffffffff801466a4 <_ZN7Drivers3Net5E1000L12g_macAddressE>
            Print(string);
ffffffff8000e64c:	48 c7 c7 da a3 02 80 	mov    $0xffffffff8002a3da,%rdi
            g_kernelLogDepth++;
ffffffff8000e653:	83 05 4a 0e 1d 00 01 	addl   $0x1,0x1d0e4a(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000e65a:	89 81 00 54 00 00    	mov    %eax,0x5400(%rcx)
            (uint32_t)g_macAddress[4] |
ffffffff8000e660:	0f b7 05 41 80 13 00 	movzwl 0x138041(%rip),%eax        # ffffffff801466a8 <_ZN7Drivers3Net5E1000L12g_macAddressE+0x4>
        WriteReg(REG_RAH,
ffffffff8000e667:	0d 00 00 00 80       	or     $0x80000000,%eax
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000e66c:	89 81 04 54 00 00    	mov    %eax,0x5404(%rcx)
            Print(string);
ffffffff8000e672:	e8 49 4b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e677:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000e67e:	e8 3d 4b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e683:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000e68a:	e8 31 4b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e68f:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000e696:	e8 25 4b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e69b:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000e6a2:	e8 19 4b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e6a7:	48 c7 c7 2f ad 02 80 	mov    $0xffffffff8002ad2f,%rdi
ffffffff8000e6ae:	e8 0d 4b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        // Read MAC address
        ReadMacAddress();

        KernelLogStream(OK, "E1000") << "MAC: "
            << base::hex
            << (uint64_t)g_macAddress[0] << ":"
ffffffff8000e6b3:	0f b6 3d ea 7f 13 00 	movzbl 0x137fea(%rip),%edi        # ffffffff801466a4 <_ZN7Drivers3Net5E1000L12g_macAddressE>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000e6ba:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000e6bf:	e8 cc bd 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000e6c4:	48 89 c7             	mov    %rax,%rdi
ffffffff8000e6c7:	e8 f4 4a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000e6cc:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff8000e6d3:	e8 e8 4a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (uint64_t)g_macAddress[1] << ":"
ffffffff8000e6d8:	0f b6 3d c6 7f 13 00 	movzbl 0x137fc6(%rip),%edi        # ffffffff801466a5 <_ZN7Drivers3Net5E1000L12g_macAddressE+0x1>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000e6df:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000e6e4:	e8 a7 bd 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000e6e9:	48 89 c7             	mov    %rax,%rdi
ffffffff8000e6ec:	e8 cf 4a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000e6f1:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff8000e6f8:	e8 c3 4a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (uint64_t)g_macAddress[2] << ":"
ffffffff8000e6fd:	0f b6 3d a2 7f 13 00 	movzbl 0x137fa2(%rip),%edi        # ffffffff801466a6 <_ZN7Drivers3Net5E1000L12g_macAddressE+0x2>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000e704:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000e709:	e8 82 bd 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000e70e:	48 89 c7             	mov    %rax,%rdi
ffffffff8000e711:	e8 aa 4a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000e716:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff8000e71d:	e8 9e 4a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (uint64_t)g_macAddress[3] << ":"
ffffffff8000e722:	0f b6 3d 7e 7f 13 00 	movzbl 0x137f7e(%rip),%edi        # ffffffff801466a7 <_ZN7Drivers3Net5E1000L12g_macAddressE+0x3>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000e729:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000e72e:	e8 5d bd 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000e733:	48 89 c7             	mov    %rax,%rdi
ffffffff8000e736:	e8 85 4a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000e73b:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff8000e742:	e8 79 4a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (uint64_t)g_macAddress[4] << ":"
ffffffff8000e747:	0f b6 3d 5a 7f 13 00 	movzbl 0x137f5a(%rip),%edi        # ffffffff801466a8 <_ZN7Drivers3Net5E1000L12g_macAddressE+0x4>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000e74e:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000e753:	e8 38 bd 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000e758:	48 89 c7             	mov    %rax,%rdi
ffffffff8000e75b:	e8 60 4a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000e760:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff8000e767:	e8 54 4a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (uint64_t)g_macAddress[5];
ffffffff8000e76c:	0f b6 3d 36 7f 13 00 	movzbl 0x137f36(%rip),%edi        # ffffffff801466a9 <_ZN7Drivers3Net5E1000L12g_macAddressE+0x5>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000e773:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000e778:	e8 13 bd 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000e77d:	48 89 c7             	mov    %rax,%rdi
ffffffff8000e780:	e8 3b 4a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000e785:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000e78c:	e8 2f 4a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000e791:	83 2d 0c 0d 1d 00 01 	subl   $0x1,0x1d0d0c(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000e798:	48 8b 15 11 7f 13 00 	mov    0x137f11(%rip),%rdx        # ffffffff801466b0 <_ZN7Drivers3Net5E1000L10g_mmioBaseE>
ffffffff8000e79f:	48 8d 82 00 52 00 00 	lea    0x5200(%rdx),%rax
ffffffff8000e7a6:	48 81 c2 00 54 00 00 	add    $0x5400,%rdx
ffffffff8000e7ad:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000e7b4:	00 00 00 00 
ffffffff8000e7b8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000e7bf:	00 
ffffffff8000e7c0:	c7 00 00 00 00 00    	movl   $0x0,(%rax)

        // Zero out the Multicast Table Array (128 entries)
        for (uint32_t i = 0; i < 128; i++) {
ffffffff8000e7c6:	48 83 c0 08          	add    $0x8,%rax
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000e7ca:	c7 40 fc 00 00 00 00 	movl   $0x0,-0x4(%rax)
        for (uint32_t i = 0; i < 128; i++) {
ffffffff8000e7d1:	48 39 d0             	cmp    %rdx,%rax
ffffffff8000e7d4:	75 ea                	jne    ffffffff8000e7c0 <_ZN7Drivers3Net5E100010InitializeEv+0x680>
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff8000e7d6:	48 8b 3d d3 e1 13 00 	mov    0x13e1d3(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
        g_rxDescsPhys = descPhys;
ffffffff8000e7dd:	31 db                	xor    %ebx,%ebx
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff8000e7df:	e8 2c ca 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
        return address - HHDMBase;
ffffffff8000e7e4:	48 89 c2             	mov    %rax,%rdx
ffffffff8000e7e7:	48 2b 15 ba e1 13 00 	sub    0x13e1ba(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        g_rxDescs = (RxDescriptor*)AllocateDmaBuffer(descPhys);
ffffffff8000e7ee:	48 89 05 a3 7e 13 00 	mov    %rax,0x137ea3(%rip)        # ffffffff80146698 <_ZN7Drivers3Net5E1000L9g_rxDescsE>
        g_rxDescsPhys = descPhys;
ffffffff8000e7f5:	48 89 15 8c 7e 13 00 	mov    %rdx,0x137e8c(%rip)        # ffffffff80146688 <_ZN7Drivers3Net5E1000L13g_rxDescsPhysE>
        for (uint32_t i = 0; i < RX_DESC_COUNT; i++) {
ffffffff8000e7fc:	0f 1f 40 00          	nopl   0x0(%rax)
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff8000e800:	48 8b 3d a9 e1 13 00 	mov    0x13e1a9(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff8000e807:	e8 04 ca 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff8000e80c:	48 8b 3d 9d e1 13 00 	mov    0x13e19d(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff8000e813:	48 89 c2             	mov    %rax,%rdx
ffffffff8000e816:	48 2b 15 8b e1 13 00 	sub    0x13e18b(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            g_rxBuffers[i] = AllocateDmaBuffer(g_rxBuffersPhys[i]);
ffffffff8000e81d:	48 89 83 80 65 14 80 	mov    %rax,-0x7feb9a80(%rbx)
        outPhysAddr = Memory::SubHHDM(virt);
ffffffff8000e824:	48 89 93 80 63 14 80 	mov    %rdx,-0x7feb9c80(%rbx)
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff8000e82b:	e8 e0 c9 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
            g_rxDescs[i].BufferAddress = g_rxBuffersPhys[i];
ffffffff8000e830:	48 8b 05 61 7e 13 00 	mov    0x137e61(%rip),%rax        # ffffffff80146698 <_ZN7Drivers3Net5E1000L9g_rxDescsE>
ffffffff8000e837:	48 8b 93 80 63 14 80 	mov    -0x7feb9c80(%rbx),%rdx
ffffffff8000e83e:	48 8d 04 58          	lea    (%rax,%rbx,2),%rax
        for (uint32_t i = 0; i < RX_DESC_COUNT; i++) {
ffffffff8000e842:	48 83 c3 08          	add    $0x8,%rbx
            g_rxDescs[i].BufferAddress = g_rxBuffersPhys[i];
ffffffff8000e846:	48 89 10             	mov    %rdx,(%rax)
            g_rxDescs[i].Length = 0;
ffffffff8000e849:	48 c7 40 08 00 00 00 	movq   $0x0,0x8(%rax)
ffffffff8000e850:	00 
        for (uint32_t i = 0; i < RX_DESC_COUNT; i++) {
ffffffff8000e851:	48 81 fb 00 01 00 00 	cmp    $0x100,%rbx
ffffffff8000e858:	75 a6                	jne    ffffffff8000e800 <_ZN7Drivers3Net5E100010InitializeEv+0x6c0>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000e85a:	48 8b 05 4f 7e 13 00 	mov    0x137e4f(%rip),%rax        # ffffffff801466b0 <_ZN7Drivers3Net5E1000L10g_mmioBaseE>
        WriteReg(REG_RDBAL, (uint32_t)(g_rxDescsPhys & 0xFFFFFFFF));
ffffffff8000e861:	48 8b 15 20 7e 13 00 	mov    0x137e20(%rip),%rdx        # ffffffff80146688 <_ZN7Drivers3Net5E1000L13g_rxDescsPhysE>
            Print(string);
ffffffff8000e868:	48 c7 c7 da a3 02 80 	mov    $0xffffffff8002a3da,%rdi
        g_txDescsPhys = descPhys;
ffffffff8000e86f:	31 db                	xor    %ebx,%ebx
            g_kernelLogDepth++;
ffffffff8000e871:	83 05 2c 0c 1d 00 01 	addl   $0x1,0x1d0c2c(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            g_txDescs[i].Length = 0;
ffffffff8000e878:	49 bc 00 00 00 00 01 	movabs $0x100000000,%r12
ffffffff8000e87f:	00 00 00 
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000e882:	89 90 00 28 00 00    	mov    %edx,0x2800(%rax)
        WriteReg(REG_RDBAH, (uint32_t)(g_rxDescsPhys >> 32));
ffffffff8000e888:	48 c1 ea 20          	shr    $0x20,%rdx
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000e88c:	89 90 04 28 00 00    	mov    %edx,0x2804(%rax)
ffffffff8000e892:	c7 80 08 28 00 00 00 	movl   $0x200,0x2808(%rax)
ffffffff8000e899:	02 00 00 
ffffffff8000e89c:	c7 80 10 28 00 00 00 	movl   $0x0,0x2810(%rax)
ffffffff8000e8a3:	00 00 00 
ffffffff8000e8a6:	c7 80 18 28 00 00 1f 	movl   $0x1f,0x2818(%rax)
ffffffff8000e8ad:	00 00 00 
ffffffff8000e8b0:	c7 80 00 01 00 00 02 	movl   $0x6038002,0x100(%rax)
ffffffff8000e8b7:	80 03 06 
        g_rxTail = RX_DESC_COUNT - 1;
ffffffff8000e8ba:	c7 05 a0 79 13 00 1f 	movl   $0x1f,0x1379a0(%rip)        # ffffffff80146264 <_ZN7Drivers3Net5E1000L8g_rxTailE>
ffffffff8000e8c1:	00 00 00 
            Print(string);
ffffffff8000e8c4:	e8 f7 48 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e8c9:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000e8d0:	e8 eb 48 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e8d5:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000e8dc:	e8 df 48 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e8e1:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000e8e8:	e8 d3 48 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e8ed:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000e8f4:	e8 c7 48 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e8f9:	48 c7 c7 35 ad 02 80 	mov    $0xffffffff8002ad35,%rdi
ffffffff8000e900:	e8 bb 48 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000e905:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000e90a:	bf 20 00 00 00       	mov    $0x20,%edi
ffffffff8000e90f:	e8 7c bb 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000e914:	48 89 c7             	mov    %rax,%rdi
ffffffff8000e917:	e8 a4 48 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000e91c:	48 c7 c7 4a ad 02 80 	mov    $0xffffffff8002ad4a,%rdi
ffffffff8000e923:	e8 98 48 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000e928:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000e92f:	e8 8c 48 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff8000e934:	48 8b 3d 75 e0 13 00 	mov    0x13e075(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
            g_kernelLogDepth--;
ffffffff8000e93b:	83 2d 62 0b 1d 00 01 	subl   $0x1,0x1d0b62(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000e942:	e8 c9 c8 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff8000e947:	48 89 c2             	mov    %rax,%rdx
ffffffff8000e94a:	48 2b 15 57 e0 13 00 	sub    0x13e057(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        g_txDescs = (TxDescriptor*)AllocateDmaBuffer(descPhys);
ffffffff8000e951:	48 89 05 38 7d 13 00 	mov    %rax,0x137d38(%rip)        # ffffffff80146690 <_ZN7Drivers3Net5E1000L9g_txDescsE>
        g_txDescsPhys = descPhys;
ffffffff8000e958:	48 89 15 21 7d 13 00 	mov    %rdx,0x137d21(%rip)        # ffffffff80146680 <_ZN7Drivers3Net5E1000L13g_txDescsPhysE>
        for (uint32_t i = 0; i < TX_DESC_COUNT; i++) {
ffffffff8000e95f:	90                   	nop
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff8000e960:	48 8b 3d 49 e0 13 00 	mov    0x13e049(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff8000e967:	e8 a4 c8 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
            g_txBuffers[i] = AllocateDmaBuffer(g_txBuffersPhys[i]);
ffffffff8000e96c:	48 89 83 80 64 14 80 	mov    %rax,-0x7feb9b80(%rbx)
ffffffff8000e973:	48 89 c2             	mov    %rax,%rdx
            g_txDescs[i].BufferAddress = g_txBuffersPhys[i];
ffffffff8000e976:	48 8b 05 13 7d 13 00 	mov    0x137d13(%rip),%rax        # ffffffff80146690 <_ZN7Drivers3Net5E1000L9g_txDescsE>
ffffffff8000e97d:	48 2b 15 24 e0 13 00 	sub    0x13e024(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        outPhysAddr = Memory::SubHHDM(virt);
ffffffff8000e984:	48 89 93 80 62 14 80 	mov    %rdx,-0x7feb9d80(%rbx)
            g_txDescs[i].BufferAddress = g_txBuffersPhys[i];
ffffffff8000e98b:	48 8d 04 58          	lea    (%rax,%rbx,2),%rax
        for (uint32_t i = 0; i < TX_DESC_COUNT; i++) {
ffffffff8000e98f:	48 83 c3 08          	add    $0x8,%rbx
            g_txDescs[i].BufferAddress = g_txBuffersPhys[i];
ffffffff8000e993:	48 89 10             	mov    %rdx,(%rax)
            g_txDescs[i].Length = 0;
ffffffff8000e996:	4c 89 60 08          	mov    %r12,0x8(%rax)
        for (uint32_t i = 0; i < TX_DESC_COUNT; i++) {
ffffffff8000e99a:	48 81 fb 00 01 00 00 	cmp    $0x100,%rbx
ffffffff8000e9a1:	75 bd                	jne    ffffffff8000e960 <_ZN7Drivers3Net5E100010InitializeEv+0x820>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000e9a3:	48 8b 05 06 7d 13 00 	mov    0x137d06(%rip),%rax        # ffffffff801466b0 <_ZN7Drivers3Net5E1000L10g_mmioBaseE>
        WriteReg(REG_TDBAL, (uint32_t)(g_txDescsPhys & 0xFFFFFFFF));
ffffffff8000e9aa:	48 8b 15 cf 7c 13 00 	mov    0x137ccf(%rip),%rdx        # ffffffff80146680 <_ZN7Drivers3Net5E1000L13g_txDescsPhysE>
            Print(string);
ffffffff8000e9b1:	48 c7 c7 da a3 02 80 	mov    $0xffffffff8002a3da,%rdi
        g_txTail = 0;
ffffffff8000e9b8:	c7 05 9e 78 13 00 00 	movl   $0x0,0x13789e(%rip)        # ffffffff80146260 <_ZN7Drivers3Net5E1000L8g_txTailE>
ffffffff8000e9bf:	00 00 00 
            g_kernelLogDepth++;
ffffffff8000e9c2:	83 05 db 0a 1d 00 01 	addl   $0x1,0x1d0adb(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000e9c9:	89 90 00 38 00 00    	mov    %edx,0x3800(%rax)
        WriteReg(REG_TDBAH, (uint32_t)(g_txDescsPhys >> 32));
ffffffff8000e9cf:	48 c1 ea 20          	shr    $0x20,%rdx
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000e9d3:	89 90 04 38 00 00    	mov    %edx,0x3804(%rax)
ffffffff8000e9d9:	c7 80 08 38 00 00 00 	movl   $0x200,0x3808(%rax)
ffffffff8000e9e0:	02 00 00 
ffffffff8000e9e3:	c7 80 10 38 00 00 00 	movl   $0x0,0x3810(%rax)
ffffffff8000e9ea:	00 00 00 
ffffffff8000e9ed:	c7 80 18 38 00 00 00 	movl   $0x0,0x3818(%rax)
ffffffff8000e9f4:	00 00 00 
ffffffff8000e9f7:	c7 80 00 04 00 00 fa 	movl   $0x400fa,0x400(%rax)
ffffffff8000e9fe:	00 04 00 
ffffffff8000ea01:	c7 80 10 04 00 00 0a 	movl   $0xa0280a,0x410(%rax)
ffffffff8000ea08:	28 a0 00 
            Print(string);
ffffffff8000ea0b:	e8 b0 47 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ea10:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000ea17:	e8 a4 47 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ea1c:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000ea23:	e8 98 47 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ea28:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000ea2f:	e8 8c 47 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ea34:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000ea3b:	e8 80 47 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ea40:	48 c7 c7 57 ad 02 80 	mov    $0xffffffff8002ad57,%rdi
ffffffff8000ea47:	e8 74 47 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000ea4c:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000ea51:	bf 20 00 00 00       	mov    $0x20,%edi
ffffffff8000ea56:	e8 35 ba 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000ea5b:	48 89 c7             	mov    %rax,%rdi
ffffffff8000ea5e:	e8 5d 47 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000ea63:	48 c7 c7 4a ad 02 80 	mov    $0xffffffff8002ad4a,%rdi
ffffffff8000ea6a:	e8 51 47 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ea6f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000ea76:	e8 45 47 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        // Set up RX and TX descriptor rings
        SetupRx();
        SetupTx();

        // Register interrupt handler
        Hal::RegisterIrqHandler(g_irqLine, HandleInterrupt);
ffffffff8000ea7b:	0f b6 3d 1e 7c 13 00 	movzbl 0x137c1e(%rip),%edi        # ffffffff801466a0 <_ZN7Drivers3Net5E1000L9g_irqLineE>
ffffffff8000ea82:	48 c7 c6 00 df 00 80 	mov    $0xffffffff8000df00,%rsi
            g_kernelLogDepth--;
ffffffff8000ea89:	83 2d 14 0a 1d 00 01 	subl   $0x1,0x1d0a14(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000ea90:	e8 eb 9b 00 00       	call   ffffffff80018680 <_ZN3Hal18RegisterIrqHandlerEhPFvhE>
        Hal::IoApic::UnmaskIrq(Hal::IoApic::GetGsiForIrq(g_irqLine));
ffffffff8000ea95:	0f b6 3d 04 7c 13 00 	movzbl 0x137c04(%rip),%edi        # ffffffff801466a0 <_ZN7Drivers3Net5E1000L9g_irqLineE>
ffffffff8000ea9c:	e8 6f 9e 00 00       	call   ffffffff80018910 <_ZN3Hal6IoApic12GetGsiForIrqEh>
ffffffff8000eaa1:	0f b6 f8             	movzbl %al,%edi
ffffffff8000eaa4:	e8 27 9e 00 00       	call   ffffffff800188d0 <_ZN3Hal6IoApic9UnmaskIrqEh>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000eaa9:	48 8b 05 00 7c 13 00 	mov    0x137c00(%rip),%rax        # ffffffff801466b0 <_ZN7Drivers3Net5E1000L10g_mmioBaseE>
            Print(string);
ffffffff8000eab0:	48 c7 c7 da a3 02 80 	mov    $0xffffffff8002a3da,%rdi
            g_kernelLogDepth++;
ffffffff8000eab7:	83 05 e6 09 1d 00 01 	addl   $0x1,0x1d09e6(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

        // Enable interrupts: RX, TX, Link Status Change
        WriteReg(REG_IMS, ICR_RXT0 | ICR_TXDW | ICR_TXQE | ICR_LSC | ICR_RXDMT0);

        g_initialized = true;
ffffffff8000eabe:	c6 05 f3 7b 13 00 01 	movb   $0x1,0x137bf3(%rip)        # ffffffff801466b8 <_ZN7Drivers3Net5E1000L13g_initializedE>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000eac5:	c7 80 d0 00 00 00 97 	movl   $0x97,0xd0(%rax)
ffffffff8000eacc:	00 00 00 
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000eacf:	8b 58 08             	mov    0x8(%rax),%ebx
            Print(string);
ffffffff8000ead2:	e8 e9 46 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ead7:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000eade:	e8 dd 46 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000eae3:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000eaea:	e8 d1 46 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000eaef:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000eaf6:	e8 c5 46 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000eafb:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000eb02:	e8 b9 46 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000eb07:	48 c7 c7 78 c7 02 80 	mov    $0xffffffff8002c778,%rdi
ffffffff8000eb0e:	e8 ad 46 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>

        // Report link status
        uint32_t status = ReadReg(REG_STATUS);
        bool linkUp = (status & (1 << 1)) != 0;
        KernelLogStream(OK, "E1000") << "Initialization complete, link: " << (linkUp ? "UP" : "DOWN");
ffffffff8000eb13:	83 e3 02             	and    $0x2,%ebx
ffffffff8000eb16:	48 c7 c7 d2 ac 02 80 	mov    $0xffffffff8002acd2,%rdi
ffffffff8000eb1d:	48 c7 c0 cf ac 02 80 	mov    $0xffffffff8002accf,%rax
ffffffff8000eb24:	48 0f 45 f8          	cmovne %rax,%rdi
ffffffff8000eb28:	e8 93 46 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000eb2d:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000eb34:	e8 87 46 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000eb39:	8b 05 65 09 1d 00    	mov    0x1d0965(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff8000eb3f:	5b                   	pop    %rbx
ffffffff8000eb40:	41 5c                	pop    %r12
ffffffff8000eb42:	41 5d                	pop    %r13
ffffffff8000eb44:	83 e8 01             	sub    $0x1,%eax
ffffffff8000eb47:	41 5e                	pop    %r14
ffffffff8000eb49:	5d                   	pop    %rbp
ffffffff8000eb4a:	89 05 54 09 1d 00    	mov    %eax,0x1d0954(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000eb50:	c3                   	ret
ffffffff8000eb51:	49 8b 04 24          	mov    (%r12),%rax
ffffffff8000eb55:	48 89 da             	mov    %rbx,%rdx
ffffffff8000eb58:	48 c1 e2 04          	shl    $0x4,%rdx
ffffffff8000eb5c:	48 01 c2             	add    %rax,%rdx
            if (devices[i].VendorId == VendorIntel && devices[i].DeviceId == DeviceE1000) {
ffffffff8000eb5f:	66 81 7a 06 86 80    	cmpw   $0x8086,0x6(%rdx)
ffffffff8000eb65:	0f 84 33 f7 ff ff    	je     ffffffff8000e29e <_ZN7Drivers3Net5E100010InitializeEv+0x15e>
        for (uint64_t i = 0; i < devices.size(); i++) {
ffffffff8000eb6b:	48 83 c3 01          	add    $0x1,%rbx
ffffffff8000eb6f:	49 3b 5c 24 08       	cmp    0x8(%r12),%rbx
ffffffff8000eb74:	0f 82 5d f6 ff ff    	jb     ffffffff8000e1d7 <_ZN7Drivers3Net5E100010InitializeEv+0x97>
ffffffff8000eb7a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            Print(string);
ffffffff8000eb80:	48 c7 c7 da a3 02 80 	mov    $0xffffffff8002a3da,%rdi
            g_kernelLogDepth++;
ffffffff8000eb87:	83 05 16 09 1d 00 01 	addl   $0x1,0x1d0916(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000eb8e:	e8 2d 46 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000eb93:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000eb9a:	e8 21 46 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000eb9f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000eba6:	e8 15 46 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ebab:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8000ebb2:	e8 09 46 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ebb7:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000ebbe:	e8 fd 45 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ebc3:	48 c7 c7 ec ac 02 80 	mov    $0xffffffff8002acec,%rdi
ffffffff8000ebca:	e9 59 ff ff ff       	jmp    ffffffff8000eb28 <_ZN7Drivers3Net5E100010InitializeEv+0x9e8>
            uint16_t word0 = EepromRead(0);
ffffffff8000ebcf:	31 ff                	xor    %edi,%edi
ffffffff8000ebd1:	e8 8a f4 ff ff       	call   ffffffff8000e060 <_ZN7Drivers3Net5E1000L10EepromReadEh>
            uint16_t word1 = EepromRead(1);
ffffffff8000ebd6:	bf 01 00 00 00       	mov    $0x1,%edi
            uint16_t word0 = EepromRead(0);
ffffffff8000ebdb:	41 89 c4             	mov    %eax,%r12d
            uint16_t word1 = EepromRead(1);
ffffffff8000ebde:	e8 7d f4 ff ff       	call   ffffffff8000e060 <_ZN7Drivers3Net5E1000L10EepromReadEh>
            uint16_t word2 = EepromRead(2);
ffffffff8000ebe3:	bf 02 00 00 00       	mov    $0x2,%edi
            uint16_t word1 = EepromRead(1);
ffffffff8000ebe8:	89 c3                	mov    %eax,%ebx
            uint16_t word2 = EepromRead(2);
ffffffff8000ebea:	e8 71 f4 ff ff       	call   ffffffff8000e060 <_ZN7Drivers3Net5E1000L10EepromReadEh>
            g_macAddress[1] = (uint8_t)(word0 >> 8);
ffffffff8000ebef:	44 89 e2             	mov    %r12d,%edx
            uint16_t word2 = EepromRead(2);
ffffffff8000ebf2:	89 c1                	mov    %eax,%ecx
            g_macAddress[1] = (uint8_t)(word0 >> 8);
ffffffff8000ebf4:	66 c1 ea 08          	shr    $0x8,%dx
            g_macAddress[0] = (uint8_t)(word0);
ffffffff8000ebf8:	41 0f b6 c4          	movzbl %r12b,%eax
ffffffff8000ebfc:	88 d4                	mov    %dl,%ah
ffffffff8000ebfe:	0f b6 d3             	movzbl %bl,%edx
ffffffff8000ec01:	0f b6 df             	movzbl %bh,%ebx
            g_macAddress[4] = (uint8_t)(word2);
ffffffff8000ec04:	66 89 0d 9d 7a 13 00 	mov    %cx,0x137a9d(%rip)        # ffffffff801466a8 <_ZN7Drivers3Net5E1000L12g_macAddressE+0x4>
            g_macAddress[0] = (uint8_t)(word0);
ffffffff8000ec0b:	c1 e2 10             	shl    $0x10,%edx
ffffffff8000ec0e:	0f b7 c0             	movzwl %ax,%eax
ffffffff8000ec11:	c1 e3 18             	shl    $0x18,%ebx
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000ec14:	48 8b 0d 95 7a 13 00 	mov    0x137a95(%rip),%rcx        # ffffffff801466b0 <_ZN7Drivers3Net5E1000L10g_mmioBaseE>
            g_macAddress[0] = (uint8_t)(word0);
ffffffff8000ec1b:	09 d0                	or     %edx,%eax
ffffffff8000ec1d:	09 d8                	or     %ebx,%eax
ffffffff8000ec1f:	89 05 7f 7a 13 00    	mov    %eax,0x137a7f(%rip)        # ffffffff801466a4 <_ZN7Drivers3Net5E1000L12g_macAddressE>
            g_macAddress[5] = (uint8_t)(word2 >> 8);
ffffffff8000ec25:	e9 1c fa ff ff       	jmp    ffffffff8000e646 <_ZN7Drivers3Net5E100010InitializeEv+0x506>
ffffffff8000ec2a:	48 c1 e3 04          	shl    $0x4,%rbx
ffffffff8000ec2e:	48 01 c3             	add    %rax,%rbx
ffffffff8000ec31:	e9 d2 f6 ff ff       	jmp    ffffffff8000e308 <_ZN7Drivers3Net5E100010InitializeEv+0x1c8>
ffffffff8000ec36:	48 89 da             	mov    %rbx,%rdx
ffffffff8000ec39:	48 c1 e2 04          	shl    $0x4,%rdx
ffffffff8000ec3d:	48 01 c2             	add    %rax,%rdx
ffffffff8000ec40:	e9 59 f6 ff ff       	jmp    ffffffff8000e29e <_ZN7Drivers3Net5E100010InitializeEv+0x15e>
ffffffff8000ec45:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000ec4c:	00 00 00 
ffffffff8000ec4f:	90                   	nop

ffffffff8000ec50 <_ZN7Drivers3Net5E100010SendPacketEPKht>:

    bool SendPacket(const uint8_t* data, uint16_t length) {
ffffffff8000ec50:	55                   	push   %rbp
ffffffff8000ec51:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000ec54:	41 55                	push   %r13
ffffffff8000ec56:	41 54                	push   %r12
ffffffff8000ec58:	53                   	push   %rbx
ffffffff8000ec59:	48 83 ec 08          	sub    $0x8,%rsp
        if (!g_initialized || data == nullptr || length == 0 || length > 1518) {
ffffffff8000ec5d:	44 0f b6 25 53 7a 13 	movzbl 0x137a53(%rip),%r12d        # ffffffff801466b8 <_ZN7Drivers3Net5E1000L13g_initializedE>
ffffffff8000ec64:	00 
ffffffff8000ec65:	45 84 e4             	test   %r12b,%r12b
ffffffff8000ec68:	0f 84 04 01 00 00    	je     ffffffff8000ed72 <_ZN7Drivers3Net5E100010SendPacketEPKht+0x122>
ffffffff8000ec6e:	8d 46 ff             	lea    -0x1(%rsi),%eax
ffffffff8000ec71:	89 f3                	mov    %esi,%ebx
ffffffff8000ec73:	66 3d ed 05          	cmp    $0x5ed,%ax
ffffffff8000ec77:	0f 87 f5 00 00 00    	ja     ffffffff8000ed72 <_ZN7Drivers3Net5E100010SendPacketEPKht+0x122>
ffffffff8000ec7d:	48 85 ff             	test   %rdi,%rdi
ffffffff8000ec80:	0f 84 ec 00 00 00    	je     ffffffff8000ed72 <_ZN7Drivers3Net5E100010SendPacketEPKht+0x122>
            return false;
        }

        // Check if the current TX descriptor is available
        TxDescriptor& desc = g_txDescs[g_txTail];
ffffffff8000ec86:	8b 05 d4 75 13 00    	mov    0x1375d4(%rip),%eax        # ffffffff80146260 <_ZN7Drivers3Net5E1000L8g_txTailE>
ffffffff8000ec8c:	49 89 c5             	mov    %rax,%r13
ffffffff8000ec8f:	49 c1 e5 04          	shl    $0x4,%r13
ffffffff8000ec93:	4c 03 2d f6 79 13 00 	add    0x1379f6(%rip),%r13        # ffffffff80146690 <_ZN7Drivers3Net5E1000L9g_txDescsE>
        if (!(desc.Status & TXSTA_DD)) {
ffffffff8000ec9a:	41 f6 45 0c 01       	testb  $0x1,0xc(%r13)
ffffffff8000ec9f:	74 6f                	je     ffffffff8000ed10 <_ZN7Drivers3Net5E100010SendPacketEPKht+0xc0>
            KernelLogStream(WARNING, "E1000") << "TX ring full";
            return false;
        }

        // Copy packet data into the TX buffer
        memcpy(g_txBuffers[g_txTail], data, length);
ffffffff8000eca1:	48 8b 04 c5 80 64 14 	mov    -0x7feb9b80(,%rax,8),%rax
ffffffff8000eca8:	80 
ffffffff8000eca9:	0f b7 d6             	movzwl %si,%edx
ffffffff8000ecac:	48 89 fe             	mov    %rdi,%rsi
ffffffff8000ecaf:	48 89 c7             	mov    %rax,%rdi
ffffffff8000ecb2:	e8 29 b5 00 00       	call   ffffffff8001a1e0 <memcpy>

        // Set up the descriptor
        desc.BufferAddress = g_txBuffersPhys[g_txTail];
ffffffff8000ecb7:	8b 15 a3 75 13 00    	mov    0x1375a3(%rip),%edx        # ffffffff80146260 <_ZN7Drivers3Net5E1000L8g_txTailE>

        // Advance the tail pointer (tells the NIC there's a new packet)
        g_txTail = (g_txTail + 1) % TX_DESC_COUNT;
        WriteReg(REG_TDT, g_txTail);

        g_txPacketCount++;
ffffffff8000ecbd:	48 83 05 8b 75 13 00 	addq   $0x1,0x13758b(%rip)        # ffffffff80146250 <_ZN7Drivers3Net5E1000L15g_txPacketCountE>
ffffffff8000ecc4:	01 
        desc.BufferAddress = g_txBuffersPhys[g_txTail];
ffffffff8000ecc5:	48 89 d0             	mov    %rdx,%rax
ffffffff8000ecc8:	48 8b 14 d5 80 62 14 	mov    -0x7feb9d80(,%rdx,8),%rdx
ffffffff8000eccf:	80 
        desc.Length = length;
ffffffff8000ecd0:	66 41 89 5d 08       	mov    %bx,0x8(%r13)
        g_txTail = (g_txTail + 1) % TX_DESC_COUNT;
ffffffff8000ecd5:	83 c0 01             	add    $0x1,%eax
        desc.BufferAddress = g_txBuffersPhys[g_txTail];
ffffffff8000ecd8:	49 89 55 00          	mov    %rdx,0x0(%r13)
        desc.Command = TXCMD_EOP | TXCMD_IFCS | TXCMD_RS;
ffffffff8000ecdc:	ba 0b 00 00 00       	mov    $0xb,%edx
        g_txTail = (g_txTail + 1) % TX_DESC_COUNT;
ffffffff8000ece1:	83 e0 1f             	and    $0x1f,%eax
        desc.Command = TXCMD_EOP | TXCMD_IFCS | TXCMD_RS;
ffffffff8000ece4:	66 41 89 55 0b       	mov    %dx,0xb(%r13)
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000ece9:	48 8b 15 c0 79 13 00 	mov    0x1379c0(%rip),%rdx        # ffffffff801466b0 <_ZN7Drivers3Net5E1000L10g_mmioBaseE>
        g_txTail = (g_txTail + 1) % TX_DESC_COUNT;
ffffffff8000ecf0:	89 05 6a 75 13 00    	mov    %eax,0x13756a(%rip)        # ffffffff80146260 <_ZN7Drivers3Net5E1000L8g_txTailE>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000ecf6:	89 82 18 38 00 00    	mov    %eax,0x3818(%rdx)
        return true;
    }
ffffffff8000ecfc:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8000ed00:	44 89 e0             	mov    %r12d,%eax
ffffffff8000ed03:	5b                   	pop    %rbx
ffffffff8000ed04:	41 5c                	pop    %r12
ffffffff8000ed06:	41 5d                	pop    %r13
ffffffff8000ed08:	5d                   	pop    %rbp
ffffffff8000ed09:	c3                   	ret
ffffffff8000ed0a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff8000ed10:	48 c7 c7 da a3 02 80 	mov    $0xffffffff8002a3da,%rdi
            g_kernelLogDepth++;
ffffffff8000ed17:	83 05 86 07 1d 00 01 	addl   $0x1,0x1d0786(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000ed1e:	e8 9d 44 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ed23:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000ed2a:	e8 91 44 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ed2f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000ed36:	e8 85 44 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ed3b:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8000ed42:	e8 79 44 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ed47:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000ed4e:	e8 6d 44 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ed53:	48 c7 c7 6c ad 02 80 	mov    $0xffffffff8002ad6c,%rdi
ffffffff8000ed5a:	e8 61 44 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ed5f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000ed66:	e8 55 44 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000ed6b:	83 2d 32 07 1d 00 01 	subl   $0x1,0x1d0732(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000ed72:	48 83 c4 08          	add    $0x8,%rsp
            return false;
ffffffff8000ed76:	45 31 e4             	xor    %r12d,%r12d
    }
ffffffff8000ed79:	5b                   	pop    %rbx
ffffffff8000ed7a:	44 89 e0             	mov    %r12d,%eax
ffffffff8000ed7d:	41 5c                	pop    %r12
ffffffff8000ed7f:	41 5d                	pop    %r13
ffffffff8000ed81:	5d                   	pop    %rbp
ffffffff8000ed82:	c3                   	ret
ffffffff8000ed83:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000ed8a:	00 00 00 
ffffffff8000ed8d:	0f 1f 00             	nopl   (%rax)

ffffffff8000ed90 <_ZN7Drivers3Net5E100013GetMacAddressEv>:

    const uint8_t* GetMacAddress() {
        return g_macAddress;
    }
ffffffff8000ed90:	48 c7 c0 a4 66 14 80 	mov    $0xffffffff801466a4,%rax
ffffffff8000ed97:	c3                   	ret
ffffffff8000ed98:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000ed9f:	00 

ffffffff8000eda0 <_ZN7Drivers3Net5E100013IsInitializedEv>:

    bool IsInitialized() {
        return g_initialized;
    }
ffffffff8000eda0:	0f b6 05 11 79 13 00 	movzbl 0x137911(%rip),%eax        # ffffffff801466b8 <_ZN7Drivers3Net5E1000L13g_initializedE>
ffffffff8000eda7:	c3                   	ret
ffffffff8000eda8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000edaf:	00 

ffffffff8000edb0 <_ZN7Drivers3Net5E100013SetRxCallbackEPFvPKhtE>:

    void SetRxCallback(RxCallback callback) {
        g_rxCallback = callback;
ffffffff8000edb0:	48 89 3d 91 74 13 00 	mov    %rdi,0x137491(%rip)        # ffffffff80146248 <_ZN7Drivers3Net5E1000L12g_rxCallbackE>
    }
ffffffff8000edb7:	c3                   	ret
ffffffff8000edb8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8000edbf:	00 

ffffffff8000edc0 <_ZN7Drivers3Net6E1000EL10EepromReadEh>:

    // -------------------------------------------------------------------------
    // EEPROM access (e1000e encoding differs from e1000)
    // -------------------------------------------------------------------------

    static uint16_t EepromRead(uint8_t address) {
ffffffff8000edc0:	55                   	push   %rbp
        // E1000E: address shifted left by 2 (not 8), done bit at position 1 (not 4)
        WriteReg(REG_EERD, ((uint32_t)address << 2) | 1);
ffffffff8000edc1:	40 0f b6 c7          	movzbl %dil,%eax
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000edc5:	ba 10 27 00 00       	mov    $0x2710,%edx
        WriteReg(REG_EERD, ((uint32_t)address << 2) | 1);
ffffffff8000edca:	8d 04 85 01 00 00 00 	lea    0x1(,%rax,4),%eax
    static uint16_t EepromRead(uint8_t address) {
ffffffff8000edd1:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000edd4:	53                   	push   %rbx
ffffffff8000edd5:	89 fb                	mov    %edi,%ebx
ffffffff8000edd7:	48 83 ec 08          	sub    $0x8,%rsp
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000eddb:	48 8b 0d 2e 7d 13 00 	mov    0x137d2e(%rip),%rcx        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
ffffffff8000ede2:	89 41 14             	mov    %eax,0x14(%rcx)

        uint32_t value;
        for (int i = 0; i < 10000; i++) {
ffffffff8000ede5:	eb 0e                	jmp    ffffffff8000edf5 <_ZN7Drivers3Net6E1000EL10EepromReadEh+0x35>
ffffffff8000ede7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8000edee:	00 00 
ffffffff8000edf0:	83 ea 01             	sub    $0x1,%edx
ffffffff8000edf3:	74 13                	je     ffffffff8000ee08 <_ZN7Drivers3Net6E1000EL10EepromReadEh+0x48>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000edf5:	8b 41 14             	mov    0x14(%rcx),%eax
            value = ReadReg(REG_EERD);
            if (value & (1 << 1)) {
ffffffff8000edf8:	a8 02                	test   $0x2,%al
ffffffff8000edfa:	74 f4                	je     ffffffff8000edf0 <_ZN7Drivers3Net6E1000EL10EepromReadEh+0x30>
            }
        }

        KernelLogStream(WARNING, "E1000E") << "EEPROM read timeout for address " << base::hex << (uint64_t)address;
        return 0;
    }
ffffffff8000edfc:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
                return (uint16_t)(value >> 16);
ffffffff8000ee00:	c1 e8 10             	shr    $0x10,%eax
    }
ffffffff8000ee03:	c9                   	leave
ffffffff8000ee04:	c3                   	ret
ffffffff8000ee05:	0f 1f 00             	nopl   (%rax)
            Print(string);
ffffffff8000ee08:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
            g_kernelLogDepth++;
ffffffff8000ee0f:	83 05 8e 06 1d 00 01 	addl   $0x1,0x1d068e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000ee16:	e8 a5 43 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ee1b:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000ee22:	e8 99 43 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ee27:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000ee2e:	e8 8d 43 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ee33:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8000ee3a:	e8 81 43 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ee3f:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000ee46:	e8 75 43 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ee4b:	48 c7 c7 30 c7 02 80 	mov    $0xffffffff8002c730,%rdi
ffffffff8000ee52:	e8 69 43 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        KernelLogStream(WARNING, "E1000E") << "EEPROM read timeout for address " << base::hex << (uint64_t)address;
ffffffff8000ee57:	0f b6 fb             	movzbl %bl,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000ee5a:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000ee5f:	e8 2c b6 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000ee64:	48 89 c7             	mov    %rax,%rdi
ffffffff8000ee67:	e8 54 43 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000ee6c:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000ee73:	e8 48 43 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000ee78:	83 2d 25 06 1d 00 01 	subl   $0x1,0x1d0625(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff8000ee7f:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff8000ee83:	31 c0                	xor    %eax,%eax
ffffffff8000ee85:	c9                   	leave
ffffffff8000ee86:	c3                   	ret
ffffffff8000ee87:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8000ee8e:	00 00 

ffffffff8000ee90 <_ZN7Drivers3Net6E1000EL15HandleInterruptEh>:

    // -------------------------------------------------------------------------
    // Interrupt handler
    // -------------------------------------------------------------------------

    static void HandleInterrupt(uint8_t irq) {
ffffffff8000ee90:	55                   	push   %rbp
ffffffff8000ee91:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000ee94:	41 55                	push   %r13
ffffffff8000ee96:	41 54                	push   %r12
ffffffff8000ee98:	53                   	push   %rbx
ffffffff8000ee99:	48 83 ec 08          	sub    $0x8,%rsp
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000ee9d:	48 8b 05 6c 7c 13 00 	mov    0x137c6c(%rip),%rax        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
ffffffff8000eea4:	8b 98 c0 00 00 00    	mov    0xc0(%rax),%ebx
        (void)irq;

        uint32_t icr = ReadReg(REG_ICR);

        // Spurious IRQ guard
        if (icr == 0) {
ffffffff8000eeaa:	85 db                	test   %ebx,%ebx
ffffffff8000eeac:	0f 84 b4 00 00 00    	je     ffffffff8000ef66 <_ZN7Drivers3Net6E1000EL15HandleInterruptEh+0xd6>
            return;
        }

        if (icr & ICR_LSC) {
ffffffff8000eeb2:	f6 c3 04             	test   $0x4,%bl
ffffffff8000eeb5:	0f 85 bd 00 00 00    	jne    ffffffff8000ef78 <_ZN7Drivers3Net6E1000EL15HandleInterruptEh+0xe8>
            uint32_t status = ReadReg(REG_STATUS);
            bool linkUp = (status & (1 << 1)) != 0;
            KernelLogStream(INFO, "E1000E") << "Link status change: " << (linkUp ? "UP" : "DOWN");
        }

        if (icr & ICR_RXT0) {
ffffffff8000eebb:	81 e3 80 00 00 00    	and    $0x80,%ebx
ffffffff8000eec1:	0f 84 9f 00 00 00    	je     ffffffff8000ef66 <_ZN7Drivers3Net6E1000EL15HandleInterruptEh+0xd6>
            while (true) {
                uint32_t nextIdx = (g_rxTail + 1) % RX_DESC_COUNT;
ffffffff8000eec7:	8b 05 0f 78 13 00    	mov    0x13780f(%rip),%eax        # ffffffff801466dc <_ZN7Drivers3Net6E1000EL8g_rxTailE>
                RxDescriptor& desc = g_rxDescs[nextIdx];
ffffffff8000eecd:	48 8b 0d 24 7c 13 00 	mov    0x137c24(%rip),%rcx        # ffffffff80146af8 <_ZN7Drivers3Net6E1000EL9g_rxDescsE>
                uint32_t nextIdx = (g_rxTail + 1) % RX_DESC_COUNT;
ffffffff8000eed4:	8d 58 01             	lea    0x1(%rax),%ebx
ffffffff8000eed7:	83 e3 1f             	and    $0x1f,%ebx
                RxDescriptor& desc = g_rxDescs[nextIdx];
ffffffff8000eeda:	89 d8                	mov    %ebx,%eax
ffffffff8000eedc:	49 89 c4             	mov    %rax,%r12
ffffffff8000eedf:	49 c1 e4 04          	shl    $0x4,%r12
ffffffff8000eee3:	49 01 cc             	add    %rcx,%r12

                if (!(desc.Status & RXSTA_DD)) {
ffffffff8000eee6:	41 f6 44 24 0c 01    	testb  $0x1,0xc(%r12)
ffffffff8000eeec:	74 78                	je     ffffffff8000ef66 <_ZN7Drivers3Net6E1000EL15HandleInterruptEh+0xd6>
ffffffff8000eeee:	44 0f b7 2d 6a a1 01 	movzwl 0x1a16a(%rip),%r13d        # ffffffff80029060 <col256+0x3c0>
ffffffff8000eef5:	00 
ffffffff8000eef6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000eefd:	00 00 00 
                }

                uint16_t length = desc.Length;
                g_rxPacketCount++;

                if (g_rxCallback != nullptr) {
ffffffff8000ef00:	48 8b 15 b9 77 13 00 	mov    0x1377b9(%rip),%rdx        # ffffffff801466c0 <_ZN7Drivers3Net6E1000EL12g_rxCallbackE>
                g_rxPacketCount++;
ffffffff8000ef07:	48 83 05 c1 77 13 00 	addq   $0x1,0x1377c1(%rip)        # ffffffff801466d0 <_ZN7Drivers3Net6E1000EL15g_rxPacketCountE>
ffffffff8000ef0e:	01 
                uint16_t length = desc.Length;
ffffffff8000ef0f:	41 0f b7 74 24 08    	movzwl 0x8(%r12),%esi
                if (g_rxCallback != nullptr) {
ffffffff8000ef15:	48 85 d2             	test   %rdx,%rdx
ffffffff8000ef18:	74 11                	je     ffffffff8000ef2b <_ZN7Drivers3Net6E1000EL15HandleInterruptEh+0x9b>
                    g_rxCallback(g_rxBuffers[nextIdx], length);
ffffffff8000ef1a:	48 8b 3c c5 e0 69 14 	mov    -0x7feb9620(,%rax,8),%rdi
ffffffff8000ef21:	80 
ffffffff8000ef22:	ff d2                	call   *%rdx
ffffffff8000ef24:	48 8b 0d cd 7b 13 00 	mov    0x137bcd(%rip),%rcx        # ffffffff80146af8 <_ZN7Drivers3Net6E1000EL9g_rxDescsE>
                }

                desc.Status = 0;
                desc.Length = 0;
ffffffff8000ef2b:	31 c0                	xor    %eax,%eax
                desc.Status = 0;
ffffffff8000ef2d:	66 45 89 6c 24 0c    	mov    %r13w,0xc(%r12)
                desc.Length = 0;
ffffffff8000ef33:	66 41 89 44 24 08    	mov    %ax,0x8(%r12)
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000ef39:	48 8b 05 d0 7b 13 00 	mov    0x137bd0(%rip),%rax        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
                desc.Errors = 0;

                g_rxTail = nextIdx;
ffffffff8000ef40:	89 1d 96 77 13 00    	mov    %ebx,0x137796(%rip)        # ffffffff801466dc <_ZN7Drivers3Net6E1000EL8g_rxTailE>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000ef46:	89 98 18 28 00 00    	mov    %ebx,0x2818(%rax)
                uint32_t nextIdx = (g_rxTail + 1) % RX_DESC_COUNT;
ffffffff8000ef4c:	83 c3 01             	add    $0x1,%ebx
ffffffff8000ef4f:	83 e3 1f             	and    $0x1f,%ebx
                RxDescriptor& desc = g_rxDescs[nextIdx];
ffffffff8000ef52:	89 d8                	mov    %ebx,%eax
ffffffff8000ef54:	49 89 c4             	mov    %rax,%r12
ffffffff8000ef57:	49 c1 e4 04          	shl    $0x4,%r12
ffffffff8000ef5b:	49 01 cc             	add    %rcx,%r12
                if (!(desc.Status & RXSTA_DD)) {
ffffffff8000ef5e:	41 f6 44 24 0c 01    	testb  $0x1,0xc(%r12)
ffffffff8000ef64:	75 9a                	jne    ffffffff8000ef00 <_ZN7Drivers3Net6E1000EL15HandleInterruptEh+0x70>
        }

        if (icr & (ICR_TXDW | ICR_TXQE)) {
            // TX completion — nothing to do for now
        }
    }
ffffffff8000ef66:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8000ef6a:	5b                   	pop    %rbx
ffffffff8000ef6b:	41 5c                	pop    %r12
ffffffff8000ef6d:	41 5d                	pop    %r13
ffffffff8000ef6f:	5d                   	pop    %rbp
ffffffff8000ef70:	c3                   	ret
ffffffff8000ef71:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            Print(string);
ffffffff8000ef78:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000ef7f:	44 8b 60 08          	mov    0x8(%rax),%r12d
            g_kernelLogDepth++;
ffffffff8000ef83:	83 05 1a 05 1d 00 01 	addl   $0x1,0x1d051a(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000ef8a:	e8 31 42 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ef8f:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000ef96:	e8 25 42 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ef9b:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000efa2:	e8 19 42 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000efa7:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000efae:	e8 0d 42 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000efb3:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000efba:	e8 01 42 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000efbf:	48 c7 c7 d7 ac 02 80 	mov    $0xffffffff8002acd7,%rdi
ffffffff8000efc6:	e8 f5 41 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            KernelLogStream(INFO, "E1000E") << "Link status change: " << (linkUp ? "UP" : "DOWN");
ffffffff8000efcb:	41 83 e4 02          	and    $0x2,%r12d
ffffffff8000efcf:	48 c7 c0 cf ac 02 80 	mov    $0xffffffff8002accf,%rax
ffffffff8000efd6:	48 c7 c7 d2 ac 02 80 	mov    $0xffffffff8002acd2,%rdi
ffffffff8000efdd:	48 0f 45 f8          	cmovne %rax,%rdi
ffffffff8000efe1:	e8 da 41 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000efe6:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000efed:	e8 ce 41 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000eff2:	83 2d ab 04 1d 00 01 	subl   $0x1,0x1d04ab(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        if (icr & ICR_RXT0) {
ffffffff8000eff9:	81 e3 80 00 00 00    	and    $0x80,%ebx
ffffffff8000efff:	0f 84 61 ff ff ff    	je     ffffffff8000ef66 <_ZN7Drivers3Net6E1000EL15HandleInterruptEh+0xd6>
ffffffff8000f005:	e9 bd fe ff ff       	jmp    ffffffff8000eec7 <_ZN7Drivers3Net6E1000EL15HandleInterruptEh+0x37>
ffffffff8000f00a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)

ffffffff8000f010 <_ZN7Drivers3Net6E1000EL7PhyReadEj>:
    static uint16_t PhyRead(uint32_t phyReg) {
ffffffff8000f010:	55                   	push   %rbp
        uint32_t mdic = ((phyReg & 0x1F) << MDIC_REG_SHIFT)
ffffffff8000f011:	89 f8                	mov    %edi,%eax
ffffffff8000f013:	c1 e0 10             	shl    $0x10,%eax
ffffffff8000f016:	0d 00 00 20 08       	or     $0x8200000,%eax
    static uint16_t PhyRead(uint32_t phyReg) {
ffffffff8000f01b:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000f01e:	53                   	push   %rbx
ffffffff8000f01f:	89 fb                	mov    %edi,%ebx
ffffffff8000f021:	48 83 ec 08          	sub    $0x8,%rsp
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000f025:	48 8b 0d e4 7a 13 00 	mov    0x137ae4(%rip),%rcx        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
ffffffff8000f02c:	89 41 20             	mov    %eax,0x20(%rcx)
ffffffff8000f02f:	b8 40 0d 03 00       	mov    $0x30d40,%eax
ffffffff8000f034:	eb 13                	jmp    ffffffff8000f049 <_ZN7Drivers3Net6E1000EL7PhyReadEj+0x39>
ffffffff8000f036:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000f03d:	00 00 00 
        for (int i = 0; i < 200000; i++) {
ffffffff8000f040:	83 e8 01             	sub    $0x1,%eax
ffffffff8000f043:	0f 84 a7 00 00 00    	je     ffffffff8000f0f0 <_ZN7Drivers3Net6E1000EL7PhyReadEj+0xe0>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000f049:	8b 51 20             	mov    0x20(%rcx),%edx
            if (mdic & MDIC_READY) {
ffffffff8000f04c:	f7 c2 00 00 00 10    	test   $0x10000000,%edx
ffffffff8000f052:	74 ec                	je     ffffffff8000f040 <_ZN7Drivers3Net6E1000EL7PhyReadEj+0x30>
                return (uint16_t)(mdic & MDIC_DATA_MASK);
ffffffff8000f054:	89 d0                	mov    %edx,%eax
                if (mdic & MDIC_ERROR) {
ffffffff8000f056:	81 e2 00 00 00 40    	and    $0x40000000,%edx
ffffffff8000f05c:	75 0a                	jne    ffffffff8000f068 <_ZN7Drivers3Net6E1000EL7PhyReadEj+0x58>
    }
ffffffff8000f05e:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff8000f062:	c9                   	leave
ffffffff8000f063:	c3                   	ret
ffffffff8000f064:	0f 1f 40 00          	nopl   0x0(%rax)
            Print(string);
ffffffff8000f068:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
            g_kernelLogDepth++;
ffffffff8000f06f:	83 05 2e 04 1d 00 01 	addl   $0x1,0x1d042e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000f076:	e8 45 41 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f07b:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000f082:	e8 39 41 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f087:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000f08e:	e8 2d 41 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f093:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8000f09a:	e8 21 41 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f09f:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000f0a6:	e8 15 41 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f0ab:	48 c7 c7 79 ad 02 80 	mov    $0xffffffff8002ad79,%rdi
ffffffff8000f0b2:	e8 09 41 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        KernelLogStream(WARNING, "E1000E") << "PHY read timeout for reg " << base::hex << (uint64_t)phyReg;
ffffffff8000f0b7:	89 df                	mov    %ebx,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000f0b9:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000f0be:	e8 cd b3 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000f0c3:	48 89 c7             	mov    %rax,%rdi
ffffffff8000f0c6:	e8 f5 40 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000f0cb:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000f0d2:	e8 e9 40 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000f0d7:	8b 05 c7 03 1d 00    	mov    0x1d03c7(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff8000f0dd:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff8000f0e1:	83 e8 01             	sub    $0x1,%eax
ffffffff8000f0e4:	89 05 ba 03 1d 00    	mov    %eax,0x1d03ba(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
                    return 0;
ffffffff8000f0ea:	31 c0                	xor    %eax,%eax
    }
ffffffff8000f0ec:	c9                   	leave
ffffffff8000f0ed:	c3                   	ret
ffffffff8000f0ee:	66 90                	xchg   %ax,%ax
            Print(string);
ffffffff8000f0f0:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
            g_kernelLogDepth++;
ffffffff8000f0f7:	83 05 a6 03 1d 00 01 	addl   $0x1,0x1d03a6(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000f0fe:	e8 bd 40 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f103:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000f10a:	e8 b1 40 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f10f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000f116:	e8 a5 40 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f11b:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8000f122:	e8 99 40 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f127:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000f12e:	e8 8d 40 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f133:	48 c7 c7 91 ad 02 80 	mov    $0xffffffff8002ad91,%rdi
ffffffff8000f13a:	e9 73 ff ff ff       	jmp    ffffffff8000f0b2 <_ZN7Drivers3Net6E1000EL7PhyReadEj+0xa2>
ffffffff8000f13f:	90                   	nop

ffffffff8000f140 <_ZN7Drivers3Net6E1000EL8PhyWriteEjt>:
    static void PhyWrite(uint32_t phyReg, uint16_t value) {
ffffffff8000f140:	55                   	push   %rbp
                       | ((phyReg & 0x1F) << MDIC_REG_SHIFT)
ffffffff8000f141:	89 f8                	mov    %edi,%eax
        uint32_t mdic = (uint32_t)value
ffffffff8000f143:	0f b7 f6             	movzwl %si,%esi
                       | ((phyReg & 0x1F) << MDIC_REG_SHIFT)
ffffffff8000f146:	c1 e0 10             	shl    $0x10,%eax
ffffffff8000f149:	09 f0                	or     %esi,%eax
    static void PhyWrite(uint32_t phyReg, uint16_t value) {
ffffffff8000f14b:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000f14e:	53                   	push   %rbx
        uint32_t mdic = (uint32_t)value
ffffffff8000f14f:	0d 00 00 20 04       	or     $0x4200000,%eax
    static void PhyWrite(uint32_t phyReg, uint16_t value) {
ffffffff8000f154:	89 fb                	mov    %edi,%ebx
ffffffff8000f156:	48 83 ec 08          	sub    $0x8,%rsp
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000f15a:	48 8b 0d af 79 13 00 	mov    0x1379af(%rip),%rcx        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
ffffffff8000f161:	89 41 20             	mov    %eax,0x20(%rcx)
ffffffff8000f164:	b8 40 0d 03 00       	mov    $0x30d40,%eax
ffffffff8000f169:	eb 0e                	jmp    ffffffff8000f179 <_ZN7Drivers3Net6E1000EL8PhyWriteEjt+0x39>
ffffffff8000f16b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        for (int i = 0; i < 200000; i++) {
ffffffff8000f170:	83 e8 01             	sub    $0x1,%eax
ffffffff8000f173:	0f 84 9f 00 00 00    	je     ffffffff8000f218 <_ZN7Drivers3Net6E1000EL8PhyWriteEjt+0xd8>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000f179:	8b 51 20             	mov    0x20(%rcx),%edx
            if (mdic & MDIC_READY) {
ffffffff8000f17c:	f7 c2 00 00 00 10    	test   $0x10000000,%edx
ffffffff8000f182:	74 ec                	je     ffffffff8000f170 <_ZN7Drivers3Net6E1000EL8PhyWriteEjt+0x30>
                if (mdic & MDIC_ERROR) {
ffffffff8000f184:	81 e2 00 00 00 40    	and    $0x40000000,%edx
ffffffff8000f18a:	75 0c                	jne    ffffffff8000f198 <_ZN7Drivers3Net6E1000EL8PhyWriteEjt+0x58>
    }
ffffffff8000f18c:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff8000f190:	c9                   	leave
ffffffff8000f191:	c3                   	ret
ffffffff8000f192:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff8000f198:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
            g_kernelLogDepth++;
ffffffff8000f19f:	83 05 fe 02 1d 00 01 	addl   $0x1,0x1d02fe(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000f1a6:	e8 15 40 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f1ab:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000f1b2:	e8 09 40 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f1b7:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000f1be:	e8 fd 3f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f1c3:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8000f1ca:	e8 f1 3f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f1cf:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000f1d6:	e8 e5 3f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f1db:	48 c7 c7 ab ad 02 80 	mov    $0xffffffff8002adab,%rdi
ffffffff8000f1e2:	e8 d9 3f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        KernelLogStream(WARNING, "E1000E") << "PHY write timeout for reg " << base::hex << (uint64_t)phyReg;
ffffffff8000f1e7:	89 df                	mov    %ebx,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000f1e9:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000f1ee:	e8 9d b2 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000f1f3:	48 89 c7             	mov    %rax,%rdi
ffffffff8000f1f6:	e8 c5 3f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000f1fb:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000f202:	e8 b9 3f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000f207:	83 2d 96 02 1d 00 01 	subl   $0x1,0x1d0296(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff8000f20e:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff8000f212:	c9                   	leave
ffffffff8000f213:	c3                   	ret
ffffffff8000f214:	0f 1f 40 00          	nopl   0x0(%rax)
            Print(string);
ffffffff8000f218:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
            g_kernelLogDepth++;
ffffffff8000f21f:	83 05 7e 02 1d 00 01 	addl   $0x1,0x1d027e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000f226:	e8 95 3f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f22b:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000f232:	e8 89 3f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f237:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000f23e:	e8 7d 3f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f243:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8000f24a:	e8 71 3f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f24f:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000f256:	e8 65 3f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f25b:	48 c7 c7 c4 ad 02 80 	mov    $0xffffffff8002adc4,%rdi
ffffffff8000f262:	e9 7b ff ff ff       	jmp    ffffffff8000f1e2 <_ZN7Drivers3Net6E1000EL8PhyWriteEjt+0xa2>
ffffffff8000f267:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000f26e:	00 00 00 
ffffffff8000f271:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000f278:	00 00 00 
ffffffff8000f27b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff8000f280 <_ZN7Drivers3Net6E1000E10InitializeEv>:

    // -------------------------------------------------------------------------
    // Public API
    // -------------------------------------------------------------------------

    void Initialize() {
ffffffff8000f280:	55                   	push   %rbp
ffffffff8000f281:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
ffffffff8000f288:	48 89 e5             	mov    %rsp,%rbp
ffffffff8000f28b:	41 57                	push   %r15
ffffffff8000f28d:	45 31 ff             	xor    %r15d,%r15d
ffffffff8000f290:	41 56                	push   %r14
ffffffff8000f292:	45 31 f6             	xor    %r14d,%r14d
ffffffff8000f295:	41 55                	push   %r13
ffffffff8000f297:	41 54                	push   %r12
ffffffff8000f299:	53                   	push   %rbx
ffffffff8000f29a:	48 83 ec 18          	sub    $0x18,%rsp
            g_kernelLogDepth++;
ffffffff8000f29e:	83 05 ff 01 1d 00 01 	addl   $0x1,0x1d01ff(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000f2a5:	e8 16 3f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f2aa:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000f2b1:	e8 0a 3f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f2b6:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000f2bd:	e8 fe 3e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f2c2:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000f2c9:	e8 f2 3e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f2ce:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000f2d5:	e8 e6 3e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f2da:	48 c7 c7 98 c7 02 80 	mov    $0xffffffff8002c798,%rdi
ffffffff8000f2e1:	e8 da 3e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f2e6:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000f2ed:	e8 ce 3e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000f2f2:	83 2d ab 01 1d 00 01 	subl   $0x1,0x1d01ab(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        KernelLogStream(INFO, "E1000E") << "Scanning for Intel e1000e NIC...";

        auto& devices = Pci::GetDevices();
ffffffff8000f2f9:	e8 f2 0e 01 00       	call   ffffffff800201f0 <_ZN3Pci10GetDevicesEv>
        const Pci::PciDevice* foundDev = nullptr;
        const char* foundName = nullptr;

        for (uint64_t i = 0; i < devices.size(); i++) {
ffffffff8000f2fe:	48 83 78 08 00       	cmpq   $0x0,0x8(%rax)
ffffffff8000f303:	48 89 c3             	mov    %rax,%rbx
ffffffff8000f306:	75 1a                	jne    ffffffff8000f322 <_ZN7Drivers3Net6E1000E10InitializeEv+0xa2>
ffffffff8000f308:	e9 b8 10 00 00       	jmp    ffffffff800103c5 <_ZN7Drivers3Net6E1000E10InitializeEv+0x1145>
ffffffff8000f30d:	0f 1f 00             	nopl   (%rax)
ffffffff8000f310:	49 83 c6 01          	add    $0x1,%r14
ffffffff8000f314:	49 83 c7 10          	add    $0x10,%r15
ffffffff8000f318:	4c 3b 73 08          	cmp    0x8(%rbx),%r14
ffffffff8000f31c:	0f 83 a3 10 00 00    	jae    ffffffff800103c5 <_ZN7Drivers3Net6E1000E10InitializeEv+0x1145>
            if (position > (capacity - 1)) {
ffffffff8000f322:	48 8b 43 10          	mov    0x10(%rbx),%rax
ffffffff8000f326:	48 83 e8 01          	sub    $0x1,%rax
ffffffff8000f32a:	4c 39 f0             	cmp    %r14,%rax
ffffffff8000f32d:	0f 83 26 10 00 00    	jae    ffffffff80010359 <_ZN7Drivers3Net6E1000E10InitializeEv+0x10d9>
            Print(string);
ffffffff8000f333:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000f33a:	e8 81 3e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f33f:	48 c7 c7 44 a4 02 80 	mov    $0xffffffff8002a444,%rdi
ffffffff8000f346:	e8 75 3e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f34b:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000f352:	e8 69 3e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f357:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000f35e:	e8 5d 3e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f363:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000f36a:	e8 51 3e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f36f:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000f376:	e8 45 3e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f37b:	31 c0                	xor    %eax,%eax
            if (devices[i].VendorId != VendorIntel) {
ffffffff8000f37d:	4c 8b 23             	mov    (%rbx),%r12
ffffffff8000f380:	66 41 81 7c 04 06 86 	cmpw   $0x8086,0x6(%r12,%rax,1)
ffffffff8000f387:	80 
ffffffff8000f388:	75 86                	jne    ffffffff8000f310 <_ZN7Drivers3Net6E1000E10InitializeEv+0x90>
ffffffff8000f38a:	45 31 ed             	xor    %r13d,%r13d
ffffffff8000f38d:	eb 0f                	jmp    ffffffff8000f39e <_ZN7Drivers3Net6E1000E10InitializeEv+0x11e>
ffffffff8000f38f:	90                   	nop
                continue;
            }
            for (uint32_t j = 0; j < g_deviceTableSize; j++) {
ffffffff8000f390:	49 83 c5 01          	add    $0x1,%r13
ffffffff8000f394:	49 83 fd 27          	cmp    $0x27,%r13
ffffffff8000f398:	0f 84 72 ff ff ff    	je     ffffffff8000f310 <_ZN7Drivers3Net6E1000E10InitializeEv+0x90>
ffffffff8000f39e:	48 8b 43 10          	mov    0x10(%rbx),%rax
ffffffff8000f3a2:	48 83 e8 01          	sub    $0x1,%rax
ffffffff8000f3a6:	4c 39 f0             	cmp    %r14,%rax
ffffffff8000f3a9:	0f 83 72 0e 00 00    	jae    ffffffff80010221 <_ZN7Drivers3Net6E1000E10InitializeEv+0xfa1>
ffffffff8000f3af:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000f3b6:	e8 05 3e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f3bb:	48 c7 c7 44 a4 02 80 	mov    $0xffffffff8002a444,%rdi
ffffffff8000f3c2:	e8 f9 3d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f3c7:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000f3ce:	e8 ed 3d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f3d3:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000f3da:	e8 e1 3d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f3df:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000f3e6:	e8 d5 3d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f3eb:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000f3f2:	e8 c9 3d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            return t;
ffffffff8000f3f7:	4c 8b 23             	mov    (%rbx),%r12
            Print(string);
ffffffff8000f3fa:	31 c0                	xor    %eax,%eax
                if (devices[i].DeviceId == g_deviceTable[j].DeviceId) {
ffffffff8000f3fc:	4c 89 ea             	mov    %r13,%rdx
ffffffff8000f3ff:	48 c1 e2 04          	shl    $0x4,%rdx
ffffffff8000f403:	0f b7 b2 20 d6 02 80 	movzwl -0x7ffd29e0(%rdx),%esi
ffffffff8000f40a:	66 41 39 74 04 08    	cmp    %si,0x8(%r12,%rax,1)
ffffffff8000f410:	0f 85 7a ff ff ff    	jne    ffffffff8000f390 <_ZN7Drivers3Net6E1000E10InitializeEv+0x110>
ffffffff8000f416:	48 8b 43 10          	mov    0x10(%rbx),%rax
                return array[position];
ffffffff8000f41a:	4d 01 fc             	add    %r15,%r12
            if (position > (capacity - 1)) {
ffffffff8000f41d:	48 83 e8 01          	sub    $0x1,%rax
ffffffff8000f421:	4c 39 f0             	cmp    %r14,%rax
ffffffff8000f424:	73 4b                	jae    ffffffff8000f471 <_ZN7Drivers3Net6E1000E10InitializeEv+0x1f1>
ffffffff8000f426:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000f42d:	e8 8e 3d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f432:	48 c7 c7 44 a4 02 80 	mov    $0xffffffff8002a444,%rdi
ffffffff8000f439:	e8 82 3d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f43e:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000f445:	e8 76 3d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f44a:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8000f451:	e8 6a 3d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f456:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000f45d:	e8 5e 3d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f462:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff8000f469:	e8 52 3d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                return array[position];
ffffffff8000f46e:	4c 8b 23             	mov    (%rbx),%r12
                    foundDev = &devices[i];
                    foundName = g_deviceTable[j].Name;
                    break;
                }
            }
            if (foundDev != nullptr) {
ffffffff8000f471:	4d 85 e4             	test   %r12,%r12
ffffffff8000f474:	0f 84 96 fe ff ff    	je     ffffffff8000f310 <_ZN7Drivers3Net6E1000E10InitializeEv+0x90>
                    foundName = g_deviceTable[j].Name;
ffffffff8000f47a:	44 89 e8             	mov    %r13d,%eax
ffffffff8000f47d:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
            g_kernelLogDepth++;
ffffffff8000f484:	83 05 19 00 1d 00 01 	addl   $0x1,0x1d0019(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000f48b:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff8000f48f:	48 8b 98 28 d6 02 80 	mov    -0x7ffd29d8(%rax),%rbx
            Print(string);
ffffffff8000f496:	e8 25 3d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f49b:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000f4a2:	e8 19 3d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f4a7:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000f4ae:	e8 0d 3d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f4b3:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000f4ba:	e8 01 3d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f4bf:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000f4c6:	e8 f5 3c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f4cb:	48 c7 c7 8b a6 02 80 	mov    $0xffffffff8002a68b,%rdi
ffffffff8000f4d2:	e8 e9 3c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f4d7:	48 89 df             	mov    %rbx,%rdi
ffffffff8000f4da:	e8 e1 3c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f4df:	48 c7 c7 10 ad 02 80 	mov    $0xffffffff8002ad10,%rdi
ffffffff8000f4e6:	e8 d5 3c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            KernelLogStream(WARNING, "E1000E") << "No e1000e NIC found";
            return;
        }

        KernelLogStream(OK, "E1000E") << "Found " << foundName << " at PCI "
            << base::hex << (uint64_t)foundDev->Bus << ":"
ffffffff8000f4eb:	41 0f b6 7c 24 02    	movzbl 0x2(%r12),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000f4f1:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000f4f6:	e8 95 af 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000f4fb:	48 89 c7             	mov    %rax,%rdi
ffffffff8000f4fe:	e8 bd 3c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000f503:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff8000f50a:	e8 b1 3c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (uint64_t)foundDev->Device << "." << (uint64_t)foundDev->Function;
ffffffff8000f50f:	41 0f b6 7c 24 03    	movzbl 0x3(%r12),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000f515:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000f51a:	e8 71 af 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000f51f:	48 89 c7             	mov    %rax,%rdi
ffffffff8000f522:	e8 99 3c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000f527:	48 c7 c7 57 ae 02 80 	mov    $0xffffffff8002ae57,%rdi
ffffffff8000f52e:	e8 8d 3c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f533:	41 0f b6 7c 24 04    	movzbl 0x4(%r12),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000f539:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000f53e:	e8 4d af 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000f543:	48 89 c7             	mov    %rax,%rdi
ffffffff8000f546:	e8 75 3c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000f54b:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000f552:	e8 69 3c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>

        // Read BAR0 (MMIO base address), check for 64-bit BAR
        uint32_t bar0 = Pci::LegacyRead32(foundDev->Bus, foundDev->Device, foundDev->Function, PCI_REG_BAR0);
ffffffff8000f557:	41 0f b6 54 24 04    	movzbl 0x4(%r12),%edx
ffffffff8000f55d:	b9 10 00 00 00       	mov    $0x10,%ecx
            g_kernelLogDepth--;
ffffffff8000f562:	83 2d 3b ff 1c 00 01 	subl   $0x1,0x1cff3b(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000f569:	41 0f b6 74 24 03    	movzbl 0x3(%r12),%esi
ffffffff8000f56f:	41 0f b6 7c 24 02    	movzbl 0x2(%r12),%edi
ffffffff8000f575:	e8 86 05 01 00       	call   ffffffff8001fb00 <_ZN3Pci12LegacyRead32Ehhhh>
        uint64_t mmioPhys = bar0 & 0xFFFFFFF0;
ffffffff8000f57a:	41 89 c6             	mov    %eax,%r14d

        // Check if 64-bit BAR (type field bits 2:1 == 0b10)
        if ((bar0 & 0x06) == 0x04) {
ffffffff8000f57d:	83 e0 06             	and    $0x6,%eax
        uint64_t mmioPhys = bar0 & 0xFFFFFFF0;
ffffffff8000f580:	41 83 e6 f0          	and    $0xfffffff0,%r14d
        if ((bar0 & 0x06) == 0x04) {
ffffffff8000f584:	83 f8 04             	cmp    $0x4,%eax
ffffffff8000f587:	0f 84 87 0e 00 00    	je     ffffffff80010414 <_ZN7Drivers3Net6E1000E10InitializeEv+0x1194>
            Print(string);
ffffffff8000f58d:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
            g_kernelLogDepth++;
ffffffff8000f594:	83 05 09 ff 1c 00 01 	addl   $0x1,0x1cff09(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000f59b:	4d 8d ae 00 00 02 00 	lea    0x20000(%r14),%r13
            g_kernelLogDepth--;
ffffffff8000f5a2:	4c 89 f3             	mov    %r14,%rbx
            Print(string);
ffffffff8000f5a5:	e8 16 3c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f5aa:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000f5b1:	e8 0a 3c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f5b6:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000f5bd:	e8 fe 3b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f5c2:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000f5c9:	e8 f2 3b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f5ce:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000f5d5:	e8 e6 3b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f5da:	48 c7 c7 a6 a6 02 80 	mov    $0xffffffff8002a6a6,%rdi
ffffffff8000f5e1:	e8 da 3b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000f5e6:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000f5eb:	4c 89 f7             	mov    %r14,%rdi
ffffffff8000f5ee:	e8 9d ae 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000f5f3:	48 89 c7             	mov    %rax,%rdi
ffffffff8000f5f6:	e8 c5 3b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000f5fb:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000f602:	e8 b9 3b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000f607:	83 2d 96 fe 1c 00 01 	subl   $0x1,0x1cfe96(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

        KernelLogStream(INFO, "E1000E") << "BAR0 physical: " << base::hex << mmioPhys;

        // Map the MMIO region (128KB = 32 pages)
        constexpr uint64_t MmioSize = 0x20000;
        for (uint64_t offset = 0; offset < MmioSize; offset += 0x1000) {
ffffffff8000f60e:	66 90                	xchg   %ax,%ax
        return HHDMBase + address;
ffffffff8000f610:	48 8b 15 91 d3 13 00 	mov    0x13d391(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            Memory::VMM::g_paging->MapMMIO(mmioPhys + offset, Memory::HHDM(mmioPhys + offset));
ffffffff8000f617:	48 8b 3d a2 d3 13 00 	mov    0x13d3a2(%rip),%rdi        # ffffffff8014c9c0 <_ZN6Memory3VMM8g_pagingE>
ffffffff8000f61e:	48 89 de             	mov    %rbx,%rsi
ffffffff8000f621:	48 01 da             	add    %rbx,%rdx
        for (uint64_t offset = 0; offset < MmioSize; offset += 0x1000) {
ffffffff8000f624:	48 81 c3 00 10 00 00 	add    $0x1000,%rbx
            Memory::VMM::g_paging->MapMMIO(mmioPhys + offset, Memory::HHDM(mmioPhys + offset));
ffffffff8000f62b:	e8 90 c2 00 00       	call   ffffffff8001b8c0 <_ZN6Memory3VMM6Paging7MapMMIOEmm>
        for (uint64_t offset = 0; offset < MmioSize; offset += 0x1000) {
ffffffff8000f630:	4c 39 eb             	cmp    %r13,%rbx
ffffffff8000f633:	75 db                	jne    ffffffff8000f610 <_ZN7Drivers3Net6E1000E10InitializeEv+0x390>
        }

        g_mmioBase = (volatile uint8_t*)Memory::HHDM(mmioPhys);

        // Enable bus mastering and memory space in PCI command register
        uint16_t pciCmd = Pci::LegacyRead16(foundDev->Bus, foundDev->Device, foundDev->Function, PCI_REG_COMMAND);
ffffffff8000f635:	41 0f b6 54 24 04    	movzbl 0x4(%r12),%edx
ffffffff8000f63b:	41 0f b6 74 24 03    	movzbl 0x3(%r12),%esi
ffffffff8000f641:	b9 04 00 00 00       	mov    $0x4,%ecx
ffffffff8000f646:	41 0f b6 7c 24 02    	movzbl 0x2(%r12),%edi
ffffffff8000f64c:	4c 03 35 55 d3 13 00 	add    0x13d355(%rip),%r14        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        g_mmioBase = (volatile uint8_t*)Memory::HHDM(mmioPhys);
ffffffff8000f653:	4c 89 35 b6 74 13 00 	mov    %r14,0x1374b6(%rip)        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
        uint16_t pciCmd = Pci::LegacyRead16(foundDev->Bus, foundDev->Device, foundDev->Function, PCI_REG_COMMAND);
ffffffff8000f65a:	e8 e1 04 01 00       	call   ffffffff8001fb40 <_ZN3Pci12LegacyRead16Ehhhh>
        pciCmd |= PCI_CMD_BUS_MASTER | PCI_CMD_MEM_SPACE;
        Pci::LegacyWrite16(foundDev->Bus, foundDev->Device, foundDev->Function, PCI_REG_COMMAND, pciCmd);
ffffffff8000f65f:	41 0f b6 54 24 04    	movzbl 0x4(%r12),%edx
ffffffff8000f665:	41 0f b6 74 24 03    	movzbl 0x3(%r12),%esi
ffffffff8000f66b:	b9 04 00 00 00       	mov    $0x4,%ecx
        pciCmd |= PCI_CMD_BUS_MASTER | PCI_CMD_MEM_SPACE;
ffffffff8000f670:	83 c8 06             	or     $0x6,%eax
        Pci::LegacyWrite16(foundDev->Bus, foundDev->Device, foundDev->Function, PCI_REG_COMMAND, pciCmd);
ffffffff8000f673:	41 0f b6 7c 24 02    	movzbl 0x2(%r12),%edi
        pciCmd |= PCI_CMD_BUS_MASTER | PCI_CMD_MEM_SPACE;
ffffffff8000f679:	44 0f b7 c0          	movzwl %ax,%r8d
        Pci::LegacyWrite16(foundDev->Bus, foundDev->Device, foundDev->Function, PCI_REG_COMMAND, pciCmd);
ffffffff8000f67d:	e8 9e 05 01 00       	call   ffffffff8001fc20 <_ZN3Pci13LegacyWrite16Ehhhht>
            Print(string);
ffffffff8000f682:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
            g_kernelLogDepth++;
ffffffff8000f689:	83 05 14 fe 1c 00 01 	addl   $0x1,0x1cfe14(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000f690:	e8 2b 3b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f695:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000f69c:	e8 1f 3b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f6a1:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000f6a8:	e8 13 3b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f6ad:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000f6b4:	e8 07 3b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f6b9:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000f6c0:	e8 fb 3a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f6c5:	48 c7 c7 19 ad 02 80 	mov    $0xffffffff8002ad19,%rdi
ffffffff8000f6cc:	e8 ef 3a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f6d1:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000f6d8:	e8 e3 3a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>

        KernelLogStream(OK, "E1000E") << "Bus mastering enabled";

        // Read interrupt line from PCI config (used for legacy IRQ fallback)
        g_irqLine = Pci::LegacyRead8(foundDev->Bus, foundDev->Device, foundDev->Function, PCI_REG_INTERRUPT);
ffffffff8000f6dd:	41 0f b6 54 24 04    	movzbl 0x4(%r12),%edx
ffffffff8000f6e3:	b9 3c 00 00 00       	mov    $0x3c,%ecx
            g_kernelLogDepth--;
ffffffff8000f6e8:	83 2d b5 fd 1c 00 01 	subl   $0x1,0x1cfdb5(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000f6ef:	41 0f b6 74 24 03    	movzbl 0x3(%r12),%esi
ffffffff8000f6f5:	41 0f b6 7c 24 02    	movzbl 0x2(%r12),%edi
ffffffff8000f6fb:	e8 90 04 01 00       	call   ffffffff8001fb90 <_ZN3Pci11LegacyRead8Ehhhh>
            Print(string);
ffffffff8000f700:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
            g_kernelLogDepth++;
ffffffff8000f707:	83 05 96 fd 1c 00 01 	addl   $0x1,0x1cfd96(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000f70e:	88 05 ec 73 13 00    	mov    %al,0x1373ec(%rip)        # ffffffff80146b00 <_ZN7Drivers3Net6E1000EL9g_irqLineE>
            Print(string);
ffffffff8000f714:	e8 a7 3a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f719:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000f720:	e8 9b 3a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f725:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000f72c:	e8 8f 3a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f731:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000f738:	e8 83 3a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f73d:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000f744:	e8 77 3a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f749:	48 c7 c7 07 ae 02 80 	mov    $0xffffffff8002ae07,%rdi
ffffffff8000f750:	e8 6b 3a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        KernelLogStream(INFO, "E1000E") << "PCI IRQ line: " << base::dec << (uint64_t)g_irqLine;
ffffffff8000f755:	0f b6 3d a4 73 13 00 	movzbl 0x1373a4(%rip),%edi        # ffffffff80146b00 <_ZN7Drivers3Net6E1000EL9g_irqLineE>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000f75c:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000f761:	e8 2a ad 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000f766:	48 89 c7             	mov    %rax,%rdi
ffffffff8000f769:	e8 52 3a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000f76e:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000f775:	e8 46 3a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f77a:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
ffffffff8000f781:	e8 3a 3a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f786:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000f78d:	e8 2e 3a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f792:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000f799:	e8 22 3a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f79e:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000f7a5:	e8 16 3a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f7aa:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000f7b1:	e8 0a 3a 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f7b6:	48 c7 c7 16 ae 02 80 	mov    $0xffffffff8002ae16,%rdi
ffffffff8000f7bd:	e8 fe 39 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f7c2:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000f7c9:	e8 f2 39 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000f7ce:	48 8b 05 3b 73 13 00 	mov    0x13733b(%rip),%rax        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
ffffffff8000f7d5:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
ffffffff8000f7dc:	c7 80 d8 00 00 00 ff 	movl   $0xffffffff,0xd8(%rax)
ffffffff8000f7e3:	ff ff ff 
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000f7e6:	8b 80 c0 00 00 00    	mov    0xc0(%rax),%eax
ffffffff8000f7ec:	e8 cf 39 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f7f1:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000f7f8:	e8 c3 39 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f7fd:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000f804:	e8 b7 39 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f809:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000f810:	e8 ab 39 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f815:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000f81c:	e8 9f 39 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f821:	48 c7 c7 2e ae 02 80 	mov    $0xffffffff8002ae2e,%rdi
ffffffff8000f828:	e8 93 39 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f82d:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000f834:	e8 87 39 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000f839:	8b 35 65 fc 1c 00    	mov    0x1cfc65(%rip),%esi        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000f83f:	b9 d0 07 00 00       	mov    $0x7d0,%ecx
ffffffff8000f844:	8d 46 ff             	lea    -0x1(%rsi),%eax
ffffffff8000f847:	89 05 57 fc 1c 00    	mov    %eax,0x1cfc57(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000f84d:	48 8b 05 bc 72 13 00 	mov    0x1372bc(%rip),%rax        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
ffffffff8000f854:	eb 13                	jmp    ffffffff8000f869 <_ZN7Drivers3Net6E1000E10InitializeEv+0x5e9>
ffffffff8000f856:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8000f85d:	00 00 00 
        for (int i = 0; i < 2000; i++) {
ffffffff8000f860:	83 e9 01             	sub    $0x1,%ecx
ffffffff8000f863:	0f 84 d3 0b 00 00    	je     ffffffff8001043c <_ZN7Drivers3Net6E1000E10InitializeEv+0x11bc>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000f869:	8b 90 50 5b 00 00    	mov    0x5b50(%rax),%edx
            if (!(swsm & SWSM_SMBI)) {
ffffffff8000f86f:	f6 c2 01             	test   $0x1,%dl
ffffffff8000f872:	75 ec                	jne    ffffffff8000f860 <_ZN7Drivers3Net6E1000E10InitializeEv+0x5e0>
                WriteReg(REG_SWSM, swsm | SWSM_SMBI);
ffffffff8000f874:	83 ca 01             	or     $0x1,%edx
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000f877:	89 90 50 5b 00 00    	mov    %edx,0x5b50(%rax)
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000f87d:	8b 90 50 5b 00 00    	mov    0x5b50(%rax),%edx
                if (ReadReg(REG_SWSM) & SWSM_SMBI) {
ffffffff8000f883:	83 e2 01             	and    $0x1,%edx
ffffffff8000f886:	74 d8                	je     ffffffff8000f860 <_ZN7Drivers3Net6E1000E10InitializeEv+0x5e0>
ffffffff8000f888:	b9 d0 07 00 00       	mov    $0x7d0,%ecx
ffffffff8000f88d:	eb 0a                	jmp    ffffffff8000f899 <_ZN7Drivers3Net6E1000E10InitializeEv+0x619>
ffffffff8000f88f:	90                   	nop
        for (int i = 0; i < 2000; i++) {
ffffffff8000f890:	83 e9 01             	sub    $0x1,%ecx
ffffffff8000f893:	0f 84 08 0c 00 00    	je     ffffffff800104a1 <_ZN7Drivers3Net6E1000E10InitializeEv+0x1221>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000f899:	8b 90 00 0f 00 00    	mov    0xf00(%rax),%edx
            if (!(extcnf & EXTCNF_CTRL_SWFLAG)) {
ffffffff8000f89f:	f6 c2 20             	test   $0x20,%dl
ffffffff8000f8a2:	75 ec                	jne    ffffffff8000f890 <_ZN7Drivers3Net6E1000E10InitializeEv+0x610>
                WriteReg(REG_EXTCNF_CTRL, extcnf | EXTCNF_CTRL_SWFLAG);
ffffffff8000f8a4:	83 ca 20             	or     $0x20,%edx
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000f8a7:	89 90 00 0f 00 00    	mov    %edx,0xf00(%rax)
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000f8ad:	8b 90 00 0f 00 00    	mov    0xf00(%rax),%edx
                if (ReadReg(REG_EXTCNF_CTRL) & EXTCNF_CTRL_SWFLAG) {
ffffffff8000f8b3:	83 e2 20             	and    $0x20,%edx
ffffffff8000f8b6:	74 d8                	je     ffffffff8000f890 <_ZN7Drivers3Net6E1000E10InitializeEv+0x610>
            Print(string);
ffffffff8000f8b8:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
            g_kernelLogDepth++;
ffffffff8000f8bf:	89 35 df fb 1c 00    	mov    %esi,0x1cfbdf(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000f8c5:	e8 f6 38 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f8ca:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000f8d1:	e8 ea 38 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f8d6:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000f8dd:	e8 de 38 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f8e2:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000f8e9:	e8 d2 38 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f8ee:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000f8f5:	e8 c6 38 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f8fa:	48 c7 c7 45 ae 02 80 	mov    $0xffffffff8002ae45,%rdi
ffffffff8000f901:	e8 ba 38 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f906:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000f90d:	e8 ae 38 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000f912:	48 8b 15 f7 71 13 00 	mov    0x1371f7(%rip),%rdx        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
            g_kernelLogDepth--;
ffffffff8000f919:	83 2d 84 fb 1c 00 01 	subl   $0x1,0x1cfb84(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000f920:	8b 02                	mov    (%rdx),%eax
        AcquireSwFwSync();

        // 3. Reset the device
        KernelLogStream(INFO, "E1000E") << "Resetting device...";
        uint32_t ctrl = ReadReg(REG_CTRL);
        WriteReg(REG_CTRL, ctrl | CTRL_RST);
ffffffff8000f922:	0d 00 00 00 04       	or     $0x4000000,%eax
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000f927:	89 02                	mov    %eax,(%rdx)
ffffffff8000f929:	b8 a0 86 01 00       	mov    $0x186a0,%eax
ffffffff8000f92e:	66 90                	xchg   %ax,%ax

        // Post-reset settling delay (give hardware time before polling)
        for (int i = 0; i < 100000; i++) {
ffffffff8000f930:	83 e8 02             	sub    $0x2,%eax
ffffffff8000f933:	75 fb                	jne    ffffffff8000f930 <_ZN7Drivers3Net6E1000E10InitializeEv+0x6b0>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000f935:	48 8b 0d d4 71 13 00 	mov    0x1371d4(%rip),%rcx        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
ffffffff8000f93c:	b8 10 27 00 00       	mov    $0x2710,%eax
ffffffff8000f941:	eb 12                	jmp    ffffffff8000f955 <_ZN7Drivers3Net6E1000E10InitializeEv+0x6d5>
ffffffff8000f943:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000f94a:	00 00 00 00 
ffffffff8000f94e:	66 90                	xchg   %ax,%ax
            asm volatile("" ::: "memory");
        }

        // Poll for reset completion
        for (int i = 0; i < 10000; i++) {
ffffffff8000f950:	83 e8 01             	sub    $0x1,%eax
ffffffff8000f953:	74 0a                	je     ffffffff8000f95f <_ZN7Drivers3Net6E1000E10InitializeEv+0x6df>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000f955:	8b 11                	mov    (%rcx),%edx
            if (!(ReadReg(REG_CTRL) & CTRL_RST)) {
ffffffff8000f957:	81 e2 00 00 00 04    	and    $0x4000000,%edx
ffffffff8000f95d:	75 f1                	jne    ffffffff8000f950 <_ZN7Drivers3Net6E1000E10InitializeEv+0x6d0>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000f95f:	8b 81 00 0f 00 00    	mov    0xf00(%rcx),%eax
            Print(string);
ffffffff8000f965:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
        PhyWrite(PHY_CONTROL, PHY_CTRL_RESET);
ffffffff8000f96c:	bb a0 86 01 00       	mov    $0x186a0,%ebx
            g_kernelLogDepth++;
ffffffff8000f971:	83 05 2c fb 1c 00 01 	addl   $0x1,0x1cfb2c(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        WriteReg(REG_EXTCNF_CTRL, extcnf & ~EXTCNF_CTRL_SWFLAG);
ffffffff8000f978:	83 e0 df             	and    $0xffffffdf,%eax
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000f97b:	89 81 00 0f 00 00    	mov    %eax,0xf00(%rcx)
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000f981:	8b 81 50 5b 00 00    	mov    0x5b50(%rcx),%eax
        WriteReg(REG_SWSM, swsm & ~SWSM_SMBI);
ffffffff8000f987:	83 e0 fe             	and    $0xfffffffe,%eax
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000f98a:	89 81 50 5b 00 00    	mov    %eax,0x5b50(%rcx)
ffffffff8000f990:	c7 81 d8 00 00 00 ff 	movl   $0xffffffff,0xd8(%rcx)
ffffffff8000f997:	ff ff ff 
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000f99a:	8b 81 c0 00 00 00    	mov    0xc0(%rcx),%eax
            Print(string);
ffffffff8000f9a0:	e8 1b 38 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f9a5:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000f9ac:	e8 0f 38 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f9b1:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000f9b8:	e8 03 38 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f9bd:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000f9c4:	e8 f7 37 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f9c9:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000f9d0:	e8 eb 37 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f9d5:	48 c7 c7 59 ae 02 80 	mov    $0xffffffff8002ae59,%rdi
ffffffff8000f9dc:	e8 df 37 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f9e1:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000f9e8:	e8 d3 37 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000f9ed:	48 8b 15 1c 71 13 00 	mov    0x13711c(%rip),%rdx        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
            g_kernelLogDepth--;
ffffffff8000f9f4:	83 2d a9 fa 1c 00 01 	subl   $0x1,0x1cfaa9(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        PhyWrite(PHY_CONTROL, PHY_CTRL_RESET);
ffffffff8000f9fb:	31 ff                	xor    %edi,%edi
ffffffff8000f9fd:	be 00 80 00 00       	mov    $0x8000,%esi
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000fa02:	8b 02                	mov    (%rdx),%eax
        ctrl |= CTRL_SLU;
        ctrl &= ~CTRL_FRCSPD;
        ctrl &= ~CTRL_FRCDPLX;
        ctrl &= ~(1u << 3);  // Clear LRST
        ctrl &= ~(1u << 31); // Clear PHY_RST
        ctrl &= ~(1u << 7);  // Clear ILOS
ffffffff8000fa04:	25 77 e7 ff 7f       	and    $0x7fffe777,%eax
ffffffff8000fa09:	83 c8 40             	or     $0x40,%eax
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000fa0c:	89 02                	mov    %eax,(%rdx)
        PhyWrite(PHY_CONTROL, PHY_CTRL_RESET);
ffffffff8000fa0e:	e8 2d f7 ff ff       	call   ffffffff8000f140 <_ZN7Drivers3Net6E1000EL8PhyWriteEjt>
        for (int i = 0; i < 100000; i++) {
ffffffff8000fa13:	eb 08                	jmp    ffffffff8000fa1d <_ZN7Drivers3Net6E1000E10InitializeEv+0x79d>
ffffffff8000fa15:	0f 1f 00             	nopl   (%rax)
ffffffff8000fa18:	83 eb 01             	sub    $0x1,%ebx
ffffffff8000fa1b:	74 0c                	je     ffffffff8000fa29 <_ZN7Drivers3Net6E1000E10InitializeEv+0x7a9>
            uint16_t ctrl = PhyRead(PHY_CONTROL);
ffffffff8000fa1d:	31 ff                	xor    %edi,%edi
ffffffff8000fa1f:	e8 ec f5 ff ff       	call   ffffffff8000f010 <_ZN7Drivers3Net6E1000EL7PhyReadEj>
            if (!(ctrl & PHY_CTRL_RESET)) {
ffffffff8000fa24:	66 85 c0             	test   %ax,%ax
ffffffff8000fa27:	78 ef                	js     ffffffff8000fa18 <_ZN7Drivers3Net6E1000E10InitializeEv+0x798>
        uint16_t anar = PhyRead(PHY_AUTONEG_ADV);
ffffffff8000fa29:	bf 04 00 00 00       	mov    $0x4,%edi
ffffffff8000fa2e:	e8 dd f5 ff ff       	call   ffffffff8000f010 <_ZN7Drivers3Net6E1000EL7PhyReadEj>
        PhyWrite(PHY_AUTONEG_ADV, anar);
ffffffff8000fa33:	bf 04 00 00 00       	mov    $0x4,%edi
        anar |= (1 << 5) | (1 << 6) | (1 << 7) | (1 << 8); // 10/100 HD/FD
ffffffff8000fa38:	66 0d e0 01          	or     $0x1e0,%ax
ffffffff8000fa3c:	0f b7 f0             	movzwl %ax,%esi
        PhyWrite(PHY_AUTONEG_ADV, anar);
ffffffff8000fa3f:	e8 fc f6 ff ff       	call   ffffffff8000f140 <_ZN7Drivers3Net6E1000EL8PhyWriteEjt>
        uint16_t gbcr = PhyRead(PHY_1000T_CTRL);
ffffffff8000fa44:	bf 09 00 00 00       	mov    $0x9,%edi
ffffffff8000fa49:	e8 c2 f5 ff ff       	call   ffffffff8000f010 <_ZN7Drivers3Net6E1000EL7PhyReadEj>
        PhyWrite(PHY_1000T_CTRL, gbcr);
ffffffff8000fa4e:	bf 09 00 00 00       	mov    $0x9,%edi
        gbcr |= (1 << 8) | (1 << 9); // 1000BASE-T HD/FD
ffffffff8000fa53:	80 cc 03             	or     $0x3,%ah
ffffffff8000fa56:	0f b7 f0             	movzwl %ax,%esi
        PhyWrite(PHY_1000T_CTRL, gbcr);
ffffffff8000fa59:	e8 e2 f6 ff ff       	call   ffffffff8000f140 <_ZN7Drivers3Net6E1000EL8PhyWriteEjt>
        PhyWrite(PHY_CONTROL, PHY_CTRL_AUTONEG_EN | PHY_CTRL_RESTART_AN);
ffffffff8000fa5e:	be 00 12 00 00       	mov    $0x1200,%esi
ffffffff8000fa63:	31 ff                	xor    %edi,%edi
ffffffff8000fa65:	e8 d6 f6 ff ff       	call   ffffffff8000f140 <_ZN7Drivers3Net6E1000EL8PhyWriteEjt>
            Print(string);
ffffffff8000fa6a:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
            g_kernelLogDepth++;
ffffffff8000fa71:	83 05 2c fa 1c 00 01 	addl   $0x1,0x1cfa2c(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8000fa78:	e8 43 37 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fa7d:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000fa84:	e8 37 37 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fa89:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000fa90:	e8 2b 37 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fa95:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000fa9c:	e8 1f 37 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000faa1:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000faa8:	e8 13 37 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000faad:	48 c7 c7 f0 c7 02 80 	mov    $0xffffffff8002c7f0,%rdi
ffffffff8000fab4:	e8 07 37 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fab9:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000fac0:	e8 fb 36 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000fac5:	8b 05 d9 f9 1c 00    	mov    0x1cf9d9(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000facb:	8d 50 ff             	lea    -0x1(%rax),%edx
ffffffff8000face:	89 15 d0 f9 1c 00    	mov    %edx,0x1cf9d0(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8000fad4:	48 8b 15 35 70 13 00 	mov    0x137035(%rip),%rdx        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
ffffffff8000fadb:	8b 8a 00 54 00 00    	mov    0x5400(%rdx),%ecx
ffffffff8000fae1:	8b b2 04 54 00 00    	mov    0x5404(%rdx),%esi
        if (ral != 0) {
ffffffff8000fae7:	85 c9                	test   %ecx,%ecx
ffffffff8000fae9:	0f 84 72 08 00 00    	je     ffffffff80010361 <_ZN7Drivers3Net6E1000E10InitializeEv+0x10e1>
            g_macAddress[0] = (uint8_t)(ral);
ffffffff8000faef:	89 0d 0f 70 13 00    	mov    %ecx,0x13700f(%rip)        # ffffffff80146b04 <_ZN7Drivers3Net6E1000EL12g_macAddressE>
            g_macAddress[4] = (uint8_t)(rah);
ffffffff8000faf5:	66 89 35 0c 70 13 00 	mov    %si,0x13700c(%rip)        # ffffffff80146b08 <_ZN7Drivers3Net6E1000EL12g_macAddressE+0x4>
        WriteReg(REG_RAL,
ffffffff8000fafc:	8b 0d 02 70 13 00    	mov    0x137002(%rip),%ecx        # ffffffff80146b04 <_ZN7Drivers3Net6E1000EL12g_macAddressE>
            Print(string);
ffffffff8000fb02:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
            g_kernelLogDepth++;
ffffffff8000fb09:	89 05 95 f9 1c 00    	mov    %eax,0x1cf995(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000fb0f:	89 8a 00 54 00 00    	mov    %ecx,0x5400(%rdx)
            (uint32_t)g_macAddress[4] |
ffffffff8000fb15:	0f b7 0d ec 6f 13 00 	movzwl 0x136fec(%rip),%ecx        # ffffffff80146b08 <_ZN7Drivers3Net6E1000EL12g_macAddressE+0x4>
        WriteReg(REG_RAH,
ffffffff8000fb1c:	81 c9 00 00 00 80    	or     $0x80000000,%ecx
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000fb22:	89 8a 04 54 00 00    	mov    %ecx,0x5404(%rdx)
            Print(string);
ffffffff8000fb28:	e8 93 36 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fb2d:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000fb34:	e8 87 36 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fb39:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000fb40:	e8 7b 36 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fb45:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000fb4c:	e8 6f 36 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fb51:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000fb58:	e8 63 36 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fb5d:	48 c7 c7 2f ad 02 80 	mov    $0xffffffff8002ad2f,%rdi
ffffffff8000fb64:	e8 57 36 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        // Read MAC address
        ReadMacAddress();

        KernelLogStream(OK, "E1000E") << "MAC: "
            << base::hex
            << (uint64_t)g_macAddress[0] << ":"
ffffffff8000fb69:	0f b6 3d 94 6f 13 00 	movzbl 0x136f94(%rip),%edi        # ffffffff80146b04 <_ZN7Drivers3Net6E1000EL12g_macAddressE>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000fb70:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000fb75:	e8 16 a9 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000fb7a:	48 89 c7             	mov    %rax,%rdi
ffffffff8000fb7d:	e8 3e 36 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000fb82:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff8000fb89:	e8 32 36 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (uint64_t)g_macAddress[1] << ":"
ffffffff8000fb8e:	0f b6 3d 70 6f 13 00 	movzbl 0x136f70(%rip),%edi        # ffffffff80146b05 <_ZN7Drivers3Net6E1000EL12g_macAddressE+0x1>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000fb95:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000fb9a:	e8 f1 a8 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000fb9f:	48 89 c7             	mov    %rax,%rdi
ffffffff8000fba2:	e8 19 36 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000fba7:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff8000fbae:	e8 0d 36 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (uint64_t)g_macAddress[2] << ":"
ffffffff8000fbb3:	0f b6 3d 4c 6f 13 00 	movzbl 0x136f4c(%rip),%edi        # ffffffff80146b06 <_ZN7Drivers3Net6E1000EL12g_macAddressE+0x2>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000fbba:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000fbbf:	e8 cc a8 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000fbc4:	48 89 c7             	mov    %rax,%rdi
ffffffff8000fbc7:	e8 f4 35 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000fbcc:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff8000fbd3:	e8 e8 35 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (uint64_t)g_macAddress[3] << ":"
ffffffff8000fbd8:	0f b6 3d 28 6f 13 00 	movzbl 0x136f28(%rip),%edi        # ffffffff80146b07 <_ZN7Drivers3Net6E1000EL12g_macAddressE+0x3>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000fbdf:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000fbe4:	e8 a7 a8 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000fbe9:	48 89 c7             	mov    %rax,%rdi
ffffffff8000fbec:	e8 cf 35 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000fbf1:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff8000fbf8:	e8 c3 35 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (uint64_t)g_macAddress[4] << ":"
ffffffff8000fbfd:	0f b6 3d 04 6f 13 00 	movzbl 0x136f04(%rip),%edi        # ffffffff80146b08 <_ZN7Drivers3Net6E1000EL12g_macAddressE+0x4>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000fc04:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000fc09:	e8 82 a8 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000fc0e:	48 89 c7             	mov    %rax,%rdi
ffffffff8000fc11:	e8 aa 35 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000fc16:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff8000fc1d:	e8 9e 35 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (uint64_t)g_macAddress[5];
ffffffff8000fc22:	0f b6 3d e0 6e 13 00 	movzbl 0x136ee0(%rip),%edi        # ffffffff80146b09 <_ZN7Drivers3Net6E1000EL12g_macAddressE+0x5>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000fc29:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8000fc2e:	e8 5d a8 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000fc33:	48 89 c7             	mov    %rax,%rdi
ffffffff8000fc36:	e8 85 35 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000fc3b:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000fc42:	e8 79 35 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8000fc47:	83 2d 56 f8 1c 00 01 	subl   $0x1,0x1cf856(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000fc4e:	48 8b 15 bb 6e 13 00 	mov    0x136ebb(%rip),%rdx        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
ffffffff8000fc55:	48 8d 82 00 52 00 00 	lea    0x5200(%rdx),%rax
ffffffff8000fc5c:	48 81 c2 00 54 00 00 	add    $0x5400,%rdx
ffffffff8000fc63:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000fc6a:	00 00 00 00 
ffffffff8000fc6e:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8000fc75:	00 00 00 00 
ffffffff8000fc79:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
ffffffff8000fc80:	c7 00 00 00 00 00    	movl   $0x0,(%rax)

        // Zero out the Multicast Table Array (128 entries)
        for (uint32_t i = 0; i < 128; i++) {
ffffffff8000fc86:	48 83 c0 08          	add    $0x8,%rax
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000fc8a:	c7 40 fc 00 00 00 00 	movl   $0x0,-0x4(%rax)
        for (uint32_t i = 0; i < 128; i++) {
ffffffff8000fc91:	48 39 d0             	cmp    %rdx,%rax
ffffffff8000fc94:	75 ea                	jne    ffffffff8000fc80 <_ZN7Drivers3Net6E1000E10InitializeEv+0xa00>
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff8000fc96:	48 8b 3d 13 cd 13 00 	mov    0x13cd13(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
        g_rxDescsPhys = descPhys;
ffffffff8000fc9d:	31 db                	xor    %ebx,%ebx
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff8000fc9f:	e8 6c b5 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
        return address - HHDMBase;
ffffffff8000fca4:	48 89 c2             	mov    %rax,%rdx
ffffffff8000fca7:	48 2b 15 fa cc 13 00 	sub    0x13ccfa(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        g_rxDescs = (RxDescriptor*)AllocateDmaBuffer(descPhys);
ffffffff8000fcae:	48 89 05 43 6e 13 00 	mov    %rax,0x136e43(%rip)        # ffffffff80146af8 <_ZN7Drivers3Net6E1000EL9g_rxDescsE>
        g_rxDescsPhys = descPhys;
ffffffff8000fcb5:	48 89 15 2c 6e 13 00 	mov    %rdx,0x136e2c(%rip)        # ffffffff80146ae8 <_ZN7Drivers3Net6E1000EL13g_rxDescsPhysE>
        for (uint32_t i = 0; i < RX_DESC_COUNT; i++) {
ffffffff8000fcbc:	0f 1f 40 00          	nopl   0x0(%rax)
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff8000fcc0:	48 8b 3d e9 cc 13 00 	mov    0x13cce9(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff8000fcc7:	e8 44 b5 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff8000fccc:	48 8b 3d dd cc 13 00 	mov    0x13ccdd(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff8000fcd3:	48 89 c2             	mov    %rax,%rdx
ffffffff8000fcd6:	48 2b 15 cb cc 13 00 	sub    0x13cccb(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            g_rxBuffers[i] = AllocateDmaBuffer(g_rxBuffersPhys[i]);
ffffffff8000fcdd:	48 89 83 e0 69 14 80 	mov    %rax,-0x7feb9620(%rbx)
        outPhysAddr = Memory::SubHHDM(virt);
ffffffff8000fce4:	48 89 93 e0 67 14 80 	mov    %rdx,-0x7feb9820(%rbx)
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff8000fceb:	e8 20 b5 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
            g_rxDescs[i].BufferAddress = g_rxBuffersPhys[i];
ffffffff8000fcf0:	48 8b 05 01 6e 13 00 	mov    0x136e01(%rip),%rax        # ffffffff80146af8 <_ZN7Drivers3Net6E1000EL9g_rxDescsE>
ffffffff8000fcf7:	48 8b 93 e0 67 14 80 	mov    -0x7feb9820(%rbx),%rdx
ffffffff8000fcfe:	48 8d 04 58          	lea    (%rax,%rbx,2),%rax
        for (uint32_t i = 0; i < RX_DESC_COUNT; i++) {
ffffffff8000fd02:	48 83 c3 08          	add    $0x8,%rbx
            g_rxDescs[i].BufferAddress = g_rxBuffersPhys[i];
ffffffff8000fd06:	48 89 10             	mov    %rdx,(%rax)
            g_rxDescs[i].Length = 0;
ffffffff8000fd09:	48 c7 40 08 00 00 00 	movq   $0x0,0x8(%rax)
ffffffff8000fd10:	00 
        for (uint32_t i = 0; i < RX_DESC_COUNT; i++) {
ffffffff8000fd11:	48 81 fb 00 01 00 00 	cmp    $0x100,%rbx
ffffffff8000fd18:	75 a6                	jne    ffffffff8000fcc0 <_ZN7Drivers3Net6E1000E10InitializeEv+0xa40>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000fd1a:	48 8b 05 ef 6d 13 00 	mov    0x136def(%rip),%rax        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
        WriteReg(REG_RDBAL, (uint32_t)(g_rxDescsPhys & 0xFFFFFFFF));
ffffffff8000fd21:	48 8b 15 c0 6d 13 00 	mov    0x136dc0(%rip),%rdx        # ffffffff80146ae8 <_ZN7Drivers3Net6E1000EL13g_rxDescsPhysE>
            Print(string);
ffffffff8000fd28:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
        g_txDescsPhys = descPhys;
ffffffff8000fd2f:	31 db                	xor    %ebx,%ebx
            g_kernelLogDepth++;
ffffffff8000fd31:	83 05 6c f7 1c 00 01 	addl   $0x1,0x1cf76c(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            g_txDescs[i].Length = 0;
ffffffff8000fd38:	49 bd 00 00 00 00 01 	movabs $0x100000000,%r13
ffffffff8000fd3f:	00 00 00 
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000fd42:	89 90 00 28 00 00    	mov    %edx,0x2800(%rax)
        WriteReg(REG_RDBAH, (uint32_t)(g_rxDescsPhys >> 32));
ffffffff8000fd48:	48 c1 ea 20          	shr    $0x20,%rdx
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000fd4c:	89 90 04 28 00 00    	mov    %edx,0x2804(%rax)
ffffffff8000fd52:	c7 80 08 28 00 00 00 	movl   $0x200,0x2808(%rax)
ffffffff8000fd59:	02 00 00 
ffffffff8000fd5c:	c7 80 10 28 00 00 00 	movl   $0x0,0x2810(%rax)
ffffffff8000fd63:	00 00 00 
ffffffff8000fd66:	c7 80 18 28 00 00 1f 	movl   $0x1f,0x2818(%rax)
ffffffff8000fd6d:	00 00 00 
ffffffff8000fd70:	c7 80 00 01 00 00 02 	movl   $0x6038002,0x100(%rax)
ffffffff8000fd77:	80 03 06 
        g_rxTail = RX_DESC_COUNT - 1;
ffffffff8000fd7a:	c7 05 58 69 13 00 1f 	movl   $0x1f,0x136958(%rip)        # ffffffff801466dc <_ZN7Drivers3Net6E1000EL8g_rxTailE>
ffffffff8000fd81:	00 00 00 
            Print(string);
ffffffff8000fd84:	e8 37 34 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fd89:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000fd90:	e8 2b 34 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fd95:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000fd9c:	e8 1f 34 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fda1:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000fda8:	e8 13 34 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fdad:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000fdb4:	e8 07 34 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fdb9:	48 c7 c7 35 ad 02 80 	mov    $0xffffffff8002ad35,%rdi
ffffffff8000fdc0:	e8 fb 33 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000fdc5:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000fdca:	bf 20 00 00 00       	mov    $0x20,%edi
ffffffff8000fdcf:	e8 bc a6 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000fdd4:	48 89 c7             	mov    %rax,%rdi
ffffffff8000fdd7:	e8 e4 33 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000fddc:	48 c7 c7 4a ad 02 80 	mov    $0xffffffff8002ad4a,%rdi
ffffffff8000fde3:	e8 d8 33 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fde8:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000fdef:	e8 cc 33 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff8000fdf4:	48 8b 3d b5 cb 13 00 	mov    0x13cbb5(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
            g_kernelLogDepth--;
ffffffff8000fdfb:	83 2d a2 f6 1c 00 01 	subl   $0x1,0x1cf6a2(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000fe02:	e8 09 b4 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff8000fe07:	48 89 c2             	mov    %rax,%rdx
ffffffff8000fe0a:	48 2b 15 97 cb 13 00 	sub    0x13cb97(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        g_txDescs = (TxDescriptor*)AllocateDmaBuffer(descPhys);
ffffffff8000fe11:	48 89 05 d8 6c 13 00 	mov    %rax,0x136cd8(%rip)        # ffffffff80146af0 <_ZN7Drivers3Net6E1000EL9g_txDescsE>
        g_txDescsPhys = descPhys;
ffffffff8000fe18:	48 89 15 c1 6c 13 00 	mov    %rdx,0x136cc1(%rip)        # ffffffff80146ae0 <_ZN7Drivers3Net6E1000EL13g_txDescsPhysE>
        for (uint32_t i = 0; i < TX_DESC_COUNT; i++) {
ffffffff8000fe1f:	90                   	nop
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff8000fe20:	48 8b 3d 89 cb 13 00 	mov    0x13cb89(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff8000fe27:	e8 e4 b3 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
            g_txBuffers[i] = AllocateDmaBuffer(g_txBuffersPhys[i]);
ffffffff8000fe2c:	48 89 83 e0 68 14 80 	mov    %rax,-0x7feb9720(%rbx)
ffffffff8000fe33:	48 89 c2             	mov    %rax,%rdx
            g_txDescs[i].BufferAddress = g_txBuffersPhys[i];
ffffffff8000fe36:	48 8b 05 b3 6c 13 00 	mov    0x136cb3(%rip),%rax        # ffffffff80146af0 <_ZN7Drivers3Net6E1000EL9g_txDescsE>
ffffffff8000fe3d:	48 2b 15 64 cb 13 00 	sub    0x13cb64(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        outPhysAddr = Memory::SubHHDM(virt);
ffffffff8000fe44:	48 89 93 e0 66 14 80 	mov    %rdx,-0x7feb9920(%rbx)
            g_txDescs[i].BufferAddress = g_txBuffersPhys[i];
ffffffff8000fe4b:	48 8d 04 58          	lea    (%rax,%rbx,2),%rax
        for (uint32_t i = 0; i < TX_DESC_COUNT; i++) {
ffffffff8000fe4f:	48 83 c3 08          	add    $0x8,%rbx
            g_txDescs[i].BufferAddress = g_txBuffersPhys[i];
ffffffff8000fe53:	48 89 10             	mov    %rdx,(%rax)
            g_txDescs[i].Length = 0;
ffffffff8000fe56:	4c 89 68 08          	mov    %r13,0x8(%rax)
        for (uint32_t i = 0; i < TX_DESC_COUNT; i++) {
ffffffff8000fe5a:	48 81 fb 00 01 00 00 	cmp    $0x100,%rbx
ffffffff8000fe61:	75 bd                	jne    ffffffff8000fe20 <_ZN7Drivers3Net6E1000E10InitializeEv+0xba0>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000fe63:	48 8b 05 a6 6c 13 00 	mov    0x136ca6(%rip),%rax        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
        WriteReg(REG_TDBAL, (uint32_t)(g_txDescsPhys & 0xFFFFFFFF));
ffffffff8000fe6a:	48 8b 15 6f 6c 13 00 	mov    0x136c6f(%rip),%rdx        # ffffffff80146ae0 <_ZN7Drivers3Net6E1000EL13g_txDescsPhysE>
            Print(string);
ffffffff8000fe71:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
        g_txTail = 0;
ffffffff8000fe78:	c7 05 56 68 13 00 00 	movl   $0x0,0x136856(%rip)        # ffffffff801466d8 <_ZN7Drivers3Net6E1000EL8g_txTailE>
ffffffff8000fe7f:	00 00 00 
            g_kernelLogDepth++;
ffffffff8000fe82:	83 05 1b f6 1c 00 01 	addl   $0x1,0x1cf61b(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000fe89:	89 90 00 38 00 00    	mov    %edx,0x3800(%rax)
        WriteReg(REG_TDBAH, (uint32_t)(g_txDescsPhys >> 32));
ffffffff8000fe8f:	48 c1 ea 20          	shr    $0x20,%rdx
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8000fe93:	89 90 04 38 00 00    	mov    %edx,0x3804(%rax)
ffffffff8000fe99:	c7 80 08 38 00 00 00 	movl   $0x200,0x3808(%rax)
ffffffff8000fea0:	02 00 00 
ffffffff8000fea3:	c7 80 10 38 00 00 00 	movl   $0x0,0x3810(%rax)
ffffffff8000feaa:	00 00 00 
ffffffff8000fead:	c7 80 18 38 00 00 00 	movl   $0x0,0x3818(%rax)
ffffffff8000feb4:	00 00 00 
ffffffff8000feb7:	c7 80 00 04 00 00 fa 	movl   $0x400fa,0x400(%rax)
ffffffff8000febe:	00 04 00 
ffffffff8000fec1:	c7 80 10 04 00 00 0a 	movl   $0xa0280a,0x410(%rax)
ffffffff8000fec8:	28 a0 00 
            Print(string);
ffffffff8000fecb:	e8 f0 32 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fed0:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000fed7:	e8 e4 32 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fedc:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000fee3:	e8 d8 32 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fee8:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8000feef:	e8 cc 32 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000fef4:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000fefb:	e8 c0 32 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ff00:	48 c7 c7 57 ad 02 80 	mov    $0xffffffff8002ad57,%rdi
ffffffff8000ff07:	e8 b4 32 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000ff0c:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8000ff11:	bf 20 00 00 00       	mov    $0x20,%edi
ffffffff8000ff16:	e8 75 a5 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000ff1b:	48 89 c7             	mov    %rax,%rdi
ffffffff8000ff1e:	e8 9d 32 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000ff23:	48 c7 c7 4a ad 02 80 	mov    $0xffffffff8002ad4a,%rdi
ffffffff8000ff2a:	e8 91 32 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ff2f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000ff36:	e8 85 32 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        uint8_t cap = Pci::FindCapability(bus, dev, func, Pci::PCI_CAP_MSI);
ffffffff8000ff3b:	45 0f b6 74 24 04    	movzbl 0x4(%r12),%r14d
ffffffff8000ff41:	b9 05 00 00 00       	mov    $0x5,%ecx
            g_kernelLogDepth--;
ffffffff8000ff46:	83 2d 57 f5 1c 00 01 	subl   $0x1,0x1cf557(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000ff4d:	45 0f b6 6c 24 03    	movzbl 0x3(%r12),%r13d
ffffffff8000ff53:	45 0f b6 64 24 02    	movzbl 0x2(%r12),%r12d
ffffffff8000ff59:	44 89 f2             	mov    %r14d,%edx
ffffffff8000ff5c:	44 89 e7             	mov    %r12d,%edi
ffffffff8000ff5f:	44 89 ee             	mov    %r13d,%esi
ffffffff8000ff62:	e8 29 fd 00 00       	call   ffffffff8001fc90 <_ZN3Pci14FindCapabilityEhhhh>
            Print(string);
ffffffff8000ff67:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
ffffffff8000ff6e:	89 c3                	mov    %eax,%ebx
            g_kernelLogDepth++;
ffffffff8000ff70:	8b 05 2e f5 1c 00    	mov    0x1cf52e(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000ff76:	83 c0 01             	add    $0x1,%eax
ffffffff8000ff79:	89 05 25 f5 1c 00    	mov    %eax,0x1cf525(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        if (cap == 0) {
ffffffff8000ff7f:	84 db                	test   %bl,%bl
ffffffff8000ff81:	0f 84 be 02 00 00    	je     ffffffff80010245 <_ZN7Drivers3Net6E1000E10InitializeEv+0xfc5>
            Print(string);
ffffffff8000ff87:	e8 34 32 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ff8c:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8000ff93:	e8 28 32 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ff98:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8000ff9f:	e8 1c 32 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ffa4:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8000ffab:	e8 10 32 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ffb0:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8000ffb7:	e8 04 32 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8000ffbc:	48 c7 c7 81 ae 02 80 	mov    $0xffffffff8002ae81,%rdi
ffffffff8000ffc3:	e8 f8 31 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8000ffc8:	be 10 00 00 00       	mov    $0x10,%esi
        KernelLogStream(INFO, "E1000E") << "MSI capability at offset " << base::hex << (uint64_t)cap;
ffffffff8000ffcd:	0f b6 fb             	movzbl %bl,%edi
ffffffff8000ffd0:	e8 bb a4 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8000ffd5:	48 89 c7             	mov    %rax,%rdi
ffffffff8000ffd8:	e8 e3 31 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8000ffdd:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8000ffe4:	e8 d7 31 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        uint16_t msgCtrl = Pci::LegacyRead16(bus, dev, func, cap + 2);
ffffffff8000ffe9:	8d 43 02             	lea    0x2(%rbx),%eax
ffffffff8000ffec:	44 89 f2             	mov    %r14d,%edx
ffffffff8000ffef:	44 89 ee             	mov    %r13d,%esi
ffffffff8000fff2:	0f b6 c0             	movzbl %al,%eax
ffffffff8000fff5:	44 89 e7             	mov    %r12d,%edi
            g_kernelLogDepth--;
ffffffff8000fff8:	83 2d a5 f4 1c 00 01 	subl   $0x1,0x1cf4a5(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8000ffff:	89 c1                	mov    %eax,%ecx
ffffffff80010001:	89 45 cc             	mov    %eax,-0x34(%rbp)
ffffffff80010004:	e8 37 fb 00 00       	call   ffffffff8001fb40 <_ZN3Pci12LegacyRead16Ehhhh>
        Pci::LegacyWrite32(bus, dev, func, cap + 4, MSI_ADDR_BASE);
ffffffff80010009:	8d 4b 04             	lea    0x4(%rbx),%ecx
ffffffff8001000c:	44 89 f2             	mov    %r14d,%edx
ffffffff8001000f:	44 89 ee             	mov    %r13d,%esi
ffffffff80010012:	41 89 c7             	mov    %eax,%r15d
ffffffff80010015:	0f b6 c9             	movzbl %cl,%ecx
ffffffff80010018:	41 b8 00 00 e0 fe    	mov    $0xfee00000,%r8d
ffffffff8001001e:	44 89 e7             	mov    %r12d,%edi
        uint16_t msgCtrl = Pci::LegacyRead16(bus, dev, func, cap + 2);
ffffffff80010021:	66 89 45 c8          	mov    %ax,-0x38(%rbp)
        bool is64bit = (msgCtrl & (1 << 7)) != 0;
ffffffff80010025:	66 41 81 e7 80 00    	and    $0x80,%r15w
        Pci::LegacyWrite32(bus, dev, func, cap + 4, MSI_ADDR_BASE);
ffffffff8001002b:	e8 b0 fb 00 00       	call   ffffffff8001fbe0 <_ZN3Pci13LegacyWrite32Ehhhhj>
            Pci::LegacyWrite32(bus, dev, func, cap + 8, 0);
ffffffff80010030:	8d 4b 08             	lea    0x8(%rbx),%ecx
ffffffff80010033:	0f b6 c9             	movzbl %cl,%ecx
        if (is64bit) {
ffffffff80010036:	66 45 85 ff          	test   %r15w,%r15w
ffffffff8001003a:	0f 85 e9 01 00 00    	jne    ffffffff80010229 <_ZN7Drivers3Net6E1000E10InitializeEv+0xfa9>
            Pci::LegacyWrite16(bus, dev, func, cap + 8, MSI_VECTOR);
ffffffff80010040:	41 b8 38 00 00 00    	mov    $0x38,%r8d
ffffffff80010046:	44 89 f2             	mov    %r14d,%edx
ffffffff80010049:	44 89 ee             	mov    %r13d,%esi
ffffffff8001004c:	44 89 e7             	mov    %r12d,%edi
ffffffff8001004f:	e8 cc fb 00 00       	call   ffffffff8001fc20 <_ZN3Pci13LegacyWrite16Ehhhht>
        msgCtrl |= (1 << 0); // MSI Enable
ffffffff80010054:	44 8b 45 c8          	mov    -0x38(%rbp),%r8d
        Pci::LegacyWrite16(bus, dev, func, cap + 2, msgCtrl);
ffffffff80010058:	8b 4d cc             	mov    -0x34(%rbp),%ecx
ffffffff8001005b:	44 89 f2             	mov    %r14d,%edx
ffffffff8001005e:	44 89 ee             	mov    %r13d,%esi
ffffffff80010061:	44 89 e7             	mov    %r12d,%edi
        msgCtrl |= (1 << 0); // MSI Enable
ffffffff80010064:	41 81 e0 8f ff 00 00 	and    $0xff8f,%r8d
        Pci::LegacyWrite16(bus, dev, func, cap + 2, msgCtrl);
ffffffff8001006b:	41 83 c8 01          	or     $0x1,%r8d
ffffffff8001006f:	e8 ac fb 00 00       	call   ffffffff8001fc20 <_ZN3Pci13LegacyWrite16Ehhhht>
        uint16_t pciCmd = Pci::LegacyRead16(bus, dev, func, PCI_REG_COMMAND);
ffffffff80010074:	b9 04 00 00 00       	mov    $0x4,%ecx
ffffffff80010079:	44 89 f2             	mov    %r14d,%edx
ffffffff8001007c:	44 89 ee             	mov    %r13d,%esi
ffffffff8001007f:	44 89 e7             	mov    %r12d,%edi
ffffffff80010082:	e8 b9 fa 00 00       	call   ffffffff8001fb40 <_ZN3Pci12LegacyRead16Ehhhh>
        Pci::LegacyWrite16(bus, dev, func, PCI_REG_COMMAND, pciCmd);
ffffffff80010087:	44 89 f2             	mov    %r14d,%edx
ffffffff8001008a:	b9 04 00 00 00       	mov    $0x4,%ecx
ffffffff8001008f:	44 89 ee             	mov    %r13d,%esi
        pciCmd |= PCI_CMD_INTX_DISABLE;
ffffffff80010092:	80 cc 04             	or     $0x4,%ah
        Pci::LegacyWrite16(bus, dev, func, PCI_REG_COMMAND, pciCmd);
ffffffff80010095:	44 89 e7             	mov    %r12d,%edi
        pciCmd |= PCI_CMD_INTX_DISABLE;
ffffffff80010098:	44 0f b7 c0          	movzwl %ax,%r8d
        Pci::LegacyWrite16(bus, dev, func, PCI_REG_COMMAND, pciCmd);
ffffffff8001009c:	e8 7f fb 00 00       	call   ffffffff8001fc20 <_ZN3Pci13LegacyWrite16Ehhhht>
        Hal::RegisterIrqHandler(MSI_IRQ, HandleInterrupt);
ffffffff800100a1:	48 c7 c6 90 ee 00 80 	mov    $0xffffffff8000ee90,%rsi
ffffffff800100a8:	bf 18 00 00 00       	mov    $0x18,%edi
ffffffff800100ad:	e8 ce 85 00 00       	call   ffffffff80018680 <_ZN3Hal18RegisterIrqHandlerEhPFvhE>
            Print(string);
ffffffff800100b2:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
            g_kernelLogDepth++;
ffffffff800100b9:	83 05 e4 f3 1c 00 01 	addl   $0x1,0x1cf3e4(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800100c0:	e8 fb 30 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800100c5:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800100cc:	e8 ef 30 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800100d1:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800100d8:	e8 e3 30 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800100dd:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff800100e4:	e8 d7 30 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800100e9:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800100f0:	e8 cb 30 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800100f5:	48 c7 c7 9b ae 02 80 	mov    $0xffffffff8002ae9b,%rdi
ffffffff800100fc:	e8 bf 30 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80010101:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80010106:	bf 38 00 00 00       	mov    $0x38,%edi
ffffffff8001010b:	e8 80 a3 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80010110:	48 89 c7             	mov    %rax,%rdi
ffffffff80010113:	e8 a8 30 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80010118:	48 c7 c7 b0 ae 02 80 	mov    $0xffffffff8002aeb0,%rdi
ffffffff8001011f:	e8 9c 30 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80010124:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80010129:	bf 18 00 00 00       	mov    $0x18,%edi
ffffffff8001012e:	e8 5d a3 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80010133:	48 89 c7             	mov    %rax,%rdi
ffffffff80010136:	e8 85 30 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001013b:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff80010142:	e8 79 30 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << " (IRQ slot " << (uint64_t)MSI_IRQ << ")" << (is64bit ? " [64-bit]" : " [32-bit]");
ffffffff80010147:	48 c7 c0 df ad 02 80 	mov    $0xffffffff8002addf,%rax
ffffffff8001014e:	66 45 85 ff          	test   %r15w,%r15w
ffffffff80010152:	48 c7 c7 e9 ad 02 80 	mov    $0xffffffff8002ade9,%rdi
ffffffff80010159:	48 0f 45 f8          	cmovne %rax,%rdi
ffffffff8001015d:	e8 5e 30 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010162:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80010169:	e8 52 30 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8001016e:	48 8b 15 9b 69 13 00 	mov    0x13699b(%rip),%rdx        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
            g_kernelLogDepth--;
ffffffff80010175:	8b 05 29 f3 1c 00    	mov    0x1cf329(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001017b:	c7 82 d0 00 00 00 97 	movl   $0x97,0xd0(%rdx)
ffffffff80010182:	00 00 00 
            Print(string);
ffffffff80010185:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
            g_kernelLogDepth++;
ffffffff8001018c:	89 05 12 f3 1c 00    	mov    %eax,0x1cf312(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff80010192:	8b 5a 08             	mov    0x8(%rdx),%ebx
            // Polling as last resort
            KernelLogStream(WARNING, "E1000E") << "No MSI or legacy IRQ available, using polling mode";
            g_pollingMode = true;
        }

        g_initialized = true;
ffffffff80010195:	c6 05 7c 69 13 00 01 	movb   $0x1,0x13697c(%rip)        # ffffffff80146b18 <_ZN7Drivers3Net6E1000EL13g_initializedE>
            Print(string);
ffffffff8001019c:	e8 1f 30 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800101a1:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800101a8:	e8 13 30 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800101ad:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800101b4:	e8 07 30 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800101b9:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff800101c0:	e8 fb 2f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800101c5:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800101cc:	e8 ef 2f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800101d1:	48 c7 c7 78 c7 02 80 	mov    $0xffffffff8002c778,%rdi
ffffffff800101d8:	e8 e3 2f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>

        uint32_t status = ReadReg(REG_STATUS);
        bool linkUp = (status & (1 << 1)) != 0;
        KernelLogStream(OK, "E1000E") << "Initialization complete, link: " << (linkUp ? "UP" : "DOWN");
ffffffff800101dd:	83 e3 02             	and    $0x2,%ebx
ffffffff800101e0:	48 c7 c7 d2 ac 02 80 	mov    $0xffffffff8002acd2,%rdi
ffffffff800101e7:	48 c7 c0 cf ac 02 80 	mov    $0xffffffff8002accf,%rax
ffffffff800101ee:	48 0f 45 f8          	cmovne %rax,%rdi
ffffffff800101f2:	e8 c9 2f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800101f7:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800101fe:	e8 bd 2f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80010203:	8b 05 9b f2 1c 00    	mov    0x1cf29b(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80010209:	83 e8 01             	sub    $0x1,%eax
ffffffff8001020c:	89 05 92 f2 1c 00    	mov    %eax,0x1cf292(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff80010212:	48 83 c4 18          	add    $0x18,%rsp
ffffffff80010216:	5b                   	pop    %rbx
ffffffff80010217:	41 5c                	pop    %r12
ffffffff80010219:	41 5d                	pop    %r13
ffffffff8001021b:	41 5e                	pop    %r14
ffffffff8001021d:	41 5f                	pop    %r15
ffffffff8001021f:	5d                   	pop    %rbp
ffffffff80010220:	c3                   	ret
ffffffff80010221:	4c 89 f8             	mov    %r15,%rax
ffffffff80010224:	e9 d3 f1 ff ff       	jmp    ffffffff8000f3fc <_ZN7Drivers3Net6E1000E10InitializeEv+0x17c>
            Pci::LegacyWrite32(bus, dev, func, cap + 8, 0);
ffffffff80010229:	45 31 c0             	xor    %r8d,%r8d
ffffffff8001022c:	44 89 f2             	mov    %r14d,%edx
ffffffff8001022f:	44 89 ee             	mov    %r13d,%esi
ffffffff80010232:	44 89 e7             	mov    %r12d,%edi
ffffffff80010235:	e8 a6 f9 00 00       	call   ffffffff8001fbe0 <_ZN3Pci13LegacyWrite32Ehhhhj>
            Pci::LegacyWrite16(bus, dev, func, cap + 12, MSI_VECTOR);
ffffffff8001023a:	8d 4b 0c             	lea    0xc(%rbx),%ecx
ffffffff8001023d:	0f b6 c9             	movzbl %cl,%ecx
ffffffff80010240:	e9 fb fd ff ff       	jmp    ffffffff80010040 <_ZN7Drivers3Net6E1000E10InitializeEv+0xdc0>
            Print(string);
ffffffff80010245:	e8 76 2f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001024a:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80010251:	e8 6a 2f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010256:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001025d:	e8 5e 2f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010262:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff80010269:	e8 52 2f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001026e:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80010275:	e8 46 2f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001027a:	48 c7 c7 68 ae 02 80 	mov    $0xffffffff8002ae68,%rdi
ffffffff80010281:	e8 3a 2f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010286:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001028d:	e8 2e 2f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        } else if (g_irqLine != 0xFF) {
ffffffff80010292:	80 3d 67 68 13 00 ff 	cmpb   $0xff,0x136867(%rip)        # ffffffff80146b00 <_ZN7Drivers3Net6E1000EL9g_irqLineE>
ffffffff80010299:	0f 84 76 02 00 00    	je     ffffffff80010515 <_ZN7Drivers3Net6E1000E10InitializeEv+0x1295>
ffffffff8001029f:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
ffffffff800102a6:	e8 15 2f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800102ab:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800102b2:	e8 09 2f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800102b7:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800102be:	e8 fd 2e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800102c3:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff800102ca:	e8 f1 2e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800102cf:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800102d6:	e8 e5 2e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800102db:	48 c7 c7 bc ae 02 80 	mov    $0xffffffff8002aebc,%rdi
ffffffff800102e2:	e8 d9 2e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            KernelLogStream(INFO, "E1000E") << "Falling back to legacy IRQ " << base::dec << (uint64_t)g_irqLine;
ffffffff800102e7:	0f b6 3d 12 68 13 00 	movzbl 0x136812(%rip),%edi        # ffffffff80146b00 <_ZN7Drivers3Net6E1000EL9g_irqLineE>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800102ee:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800102f3:	e8 98 a1 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800102f8:	48 89 c7             	mov    %rax,%rdi
ffffffff800102fb:	e8 c0 2e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80010300:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80010307:	e8 b4 2e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Hal::RegisterIrqHandler(g_irqLine, HandleInterrupt);
ffffffff8001030c:	0f b6 3d ed 67 13 00 	movzbl 0x1367ed(%rip),%edi        # ffffffff80146b00 <_ZN7Drivers3Net6E1000EL9g_irqLineE>
ffffffff80010313:	48 c7 c6 90 ee 00 80 	mov    $0xffffffff8000ee90,%rsi
            g_kernelLogDepth--;
ffffffff8001031a:	83 2d 83 f1 1c 00 01 	subl   $0x1,0x1cf183(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80010321:	e8 5a 83 00 00       	call   ffffffff80018680 <_ZN3Hal18RegisterIrqHandlerEhPFvhE>
            Hal::IoApic::UnmaskIrq(Hal::IoApic::GetGsiForIrq(g_irqLine));
ffffffff80010326:	0f b6 3d d3 67 13 00 	movzbl 0x1367d3(%rip),%edi        # ffffffff80146b00 <_ZN7Drivers3Net6E1000EL9g_irqLineE>
ffffffff8001032d:	e8 de 85 00 00       	call   ffffffff80018910 <_ZN3Hal6IoApic12GetGsiForIrqEh>
ffffffff80010332:	0f b6 f8             	movzbl %al,%edi
ffffffff80010335:	e8 96 85 00 00       	call   ffffffff800188d0 <_ZN3Hal6IoApic9UnmaskIrqEh>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff8001033a:	48 8b 15 cf 67 13 00 	mov    0x1367cf(%rip),%rdx        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
            g_kernelLogDepth++;
ffffffff80010341:	8b 05 5d f1 1c 00    	mov    0x1cf15d(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80010347:	c7 82 d0 00 00 00 97 	movl   $0x97,0xd0(%rdx)
ffffffff8001034e:	00 00 00 
ffffffff80010351:	83 c0 01             	add    $0x1,%eax
    }
ffffffff80010354:	e9 2c fe ff ff       	jmp    ffffffff80010185 <_ZN7Drivers3Net6E1000E10InitializeEv+0xf05>
ffffffff80010359:	4c 89 f8             	mov    %r15,%rax
ffffffff8001035c:	e9 1c f0 ff ff       	jmp    ffffffff8000f37d <_ZN7Drivers3Net6E1000E10InitializeEv+0xfd>
            uint16_t word0 = EepromRead(0);
ffffffff80010361:	31 ff                	xor    %edi,%edi
ffffffff80010363:	e8 58 ea ff ff       	call   ffffffff8000edc0 <_ZN7Drivers3Net6E1000EL10EepromReadEh>
            uint16_t word1 = EepromRead(1);
ffffffff80010368:	bf 01 00 00 00       	mov    $0x1,%edi
            uint16_t word0 = EepromRead(0);
ffffffff8001036d:	41 89 c5             	mov    %eax,%r13d
            uint16_t word1 = EepromRead(1);
ffffffff80010370:	e8 4b ea ff ff       	call   ffffffff8000edc0 <_ZN7Drivers3Net6E1000EL10EepromReadEh>
            uint16_t word2 = EepromRead(2);
ffffffff80010375:	bf 02 00 00 00       	mov    $0x2,%edi
            uint16_t word1 = EepromRead(1);
ffffffff8001037a:	89 c3                	mov    %eax,%ebx
            uint16_t word2 = EepromRead(2);
ffffffff8001037c:	e8 3f ea ff ff       	call   ffffffff8000edc0 <_ZN7Drivers3Net6E1000EL10EepromReadEh>
            g_macAddress[1] = (uint8_t)(word0 >> 8);
ffffffff80010381:	44 89 ea             	mov    %r13d,%edx
            g_macAddress[0] = (uint8_t)(word0);
ffffffff80010384:	0f b6 cb             	movzbl %bl,%ecx
            g_macAddress[1] = (uint8_t)(word0 >> 8);
ffffffff80010387:	66 c1 ea 08          	shr    $0x8,%dx
            uint16_t word2 = EepromRead(2);
ffffffff8001038b:	89 c6                	mov    %eax,%esi
            g_macAddress[0] = (uint8_t)(word0);
ffffffff8001038d:	41 0f b6 c5          	movzbl %r13b,%eax
ffffffff80010391:	c1 e1 10             	shl    $0x10,%ecx
ffffffff80010394:	88 d4                	mov    %dl,%ah
ffffffff80010396:	0f b6 d7             	movzbl %bh,%edx
            g_macAddress[4] = (uint8_t)(word2);
ffffffff80010399:	66 89 35 68 67 13 00 	mov    %si,0x136768(%rip)        # ffffffff80146b08 <_ZN7Drivers3Net6E1000EL12g_macAddressE+0x4>
            g_macAddress[0] = (uint8_t)(word0);
ffffffff800103a0:	0f b7 c0             	movzwl %ax,%eax
ffffffff800103a3:	c1 e2 18             	shl    $0x18,%edx
ffffffff800103a6:	09 c8                	or     %ecx,%eax
ffffffff800103a8:	09 d0                	or     %edx,%eax
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff800103aa:	48 8b 15 5f 67 13 00 	mov    0x13675f(%rip),%rdx        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
            g_macAddress[0] = (uint8_t)(word0);
ffffffff800103b1:	89 05 4d 67 13 00    	mov    %eax,0x13674d(%rip)        # ffffffff80146b04 <_ZN7Drivers3Net6E1000EL12g_macAddressE>
ffffffff800103b7:	8b 05 e7 f0 1c 00    	mov    0x1cf0e7(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800103bd:	83 c0 01             	add    $0x1,%eax
ffffffff800103c0:	e9 37 f7 ff ff       	jmp    ffffffff8000fafc <_ZN7Drivers3Net6E1000E10InitializeEv+0x87c>
            Print(string);
ffffffff800103c5:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
            g_kernelLogDepth++;
ffffffff800103cc:	83 05 d1 f0 1c 00 01 	addl   $0x1,0x1cf0d1(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800103d3:	e8 e8 2d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800103d8:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800103df:	e8 dc 2d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800103e4:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800103eb:	e8 d0 2d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800103f0:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff800103f7:	e8 c4 2d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800103fc:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80010403:	e8 b8 2d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010408:	48 c7 c7 f3 ad 02 80 	mov    $0xffffffff8002adf3,%rdi
ffffffff8001040f:	e9 de fd ff ff       	jmp    ffffffff800101f2 <_ZN7Drivers3Net6E1000E10InitializeEv+0xf72>
            uint32_t bar1 = Pci::LegacyRead32(foundDev->Bus, foundDev->Device, foundDev->Function, PCI_REG_BAR1);
ffffffff80010414:	41 0f b6 54 24 04    	movzbl 0x4(%r12),%edx
ffffffff8001041a:	41 0f b6 74 24 03    	movzbl 0x3(%r12),%esi
ffffffff80010420:	b9 14 00 00 00       	mov    $0x14,%ecx
ffffffff80010425:	41 0f b6 7c 24 02    	movzbl 0x2(%r12),%edi
ffffffff8001042b:	e8 d0 f6 00 00       	call   ffffffff8001fb00 <_ZN3Pci12LegacyRead32Ehhhh>
            mmioPhys |= ((uint64_t)bar1 << 32);
ffffffff80010430:	48 c1 e0 20          	shl    $0x20,%rax
ffffffff80010434:	49 09 c6             	or     %rax,%r14
ffffffff80010437:	e9 51 f1 ff ff       	jmp    ffffffff8000f58d <_ZN7Drivers3Net6E1000E10InitializeEv+0x30d>
ffffffff8001043c:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
            g_kernelLogDepth++;
ffffffff80010443:	89 35 5b f0 1c 00    	mov    %esi,0x1cf05b(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80010449:	e8 72 2d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001044e:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80010455:	e8 66 2d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001045a:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80010461:	e8 5a 2d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010466:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8001046d:	e8 4e 2d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010472:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80010479:	e8 42 2d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001047e:	48 c7 c7 58 c8 02 80 	mov    $0xffffffff8002c858,%rdi
ffffffff80010485:	e8 36 2d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001048a:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80010491:	e8 2a 2d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80010496:	8b 35 08 f0 1c 00    	mov    0x1cf008(%rip),%esi        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            return false;
ffffffff8001049c:	e9 17 f4 ff ff       	jmp    ffffffff8000f8b8 <_ZN7Drivers3Net6E1000E10InitializeEv+0x638>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff800104a1:	8b 90 50 5b 00 00    	mov    0x5b50(%rax),%edx
            Print(string);
ffffffff800104a7:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
            g_kernelLogDepth++;
ffffffff800104ae:	89 35 f0 ef 1c 00    	mov    %esi,0x1ceff0(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        WriteReg(REG_SWSM, swsm & ~SWSM_SMBI);
ffffffff800104b4:	83 e2 fe             	and    $0xfffffffe,%edx
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff800104b7:	89 90 50 5b 00 00    	mov    %edx,0x5b50(%rax)
            Print(string);
ffffffff800104bd:	e8 fe 2c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800104c2:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800104c9:	e8 f2 2c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800104ce:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800104d5:	e8 e6 2c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800104da:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff800104e1:	e8 da 2c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800104e6:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800104ed:	e8 ce 2c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800104f2:	48 c7 c7 c0 c7 02 80 	mov    $0xffffffff8002c7c0,%rdi
ffffffff800104f9:	e8 c2 2c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800104fe:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80010505:	e8 b6 2c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001050a:	8b 35 94 ef 1c 00    	mov    0x1cef94(%rip),%esi        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        return false;
ffffffff80010510:	e9 a3 f3 ff ff       	jmp    ffffffff8000f8b8 <_ZN7Drivers3Net6E1000E10InitializeEv+0x638>
            Print(string);
ffffffff80010515:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
ffffffff8001051c:	e8 9f 2c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010521:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80010528:	e8 93 2c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001052d:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80010534:	e8 87 2c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010539:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff80010540:	e8 7b 2c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010545:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001054c:	e8 6f 2c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010551:	48 c7 c7 20 c8 02 80 	mov    $0xffffffff8002c820,%rdi
ffffffff80010558:	e8 63 2c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001055d:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80010564:	e8 57 2c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80010569:	8b 05 35 ef 1c 00    	mov    0x1cef35(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8001056f:	48 8b 15 9a 65 13 00 	mov    0x13659a(%rip),%rdx        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
ffffffff80010576:	e9 0a fc ff ff       	jmp    ffffffff80010185 <_ZN7Drivers3Net6E1000E10InitializeEv+0xf05>
ffffffff8001057b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80010580 <_ZN7Drivers3Net6E1000E10SendPacketEPKht>:
        }

        g_polling = false;
    }

    bool SendPacket(const uint8_t* data, uint16_t length) {
ffffffff80010580:	55                   	push   %rbp
ffffffff80010581:	48 89 e5             	mov    %rsp,%rbp
ffffffff80010584:	41 55                	push   %r13
ffffffff80010586:	41 54                	push   %r12
ffffffff80010588:	53                   	push   %rbx
ffffffff80010589:	48 83 ec 08          	sub    $0x8,%rsp
        if (!g_initialized || data == nullptr || length == 0 || length > 1518) {
ffffffff8001058d:	44 0f b6 25 83 65 13 	movzbl 0x136583(%rip),%r12d        # ffffffff80146b18 <_ZN7Drivers3Net6E1000EL13g_initializedE>
ffffffff80010594:	00 
ffffffff80010595:	45 84 e4             	test   %r12b,%r12b
ffffffff80010598:	0f 84 04 01 00 00    	je     ffffffff800106a2 <_ZN7Drivers3Net6E1000E10SendPacketEPKht+0x122>
ffffffff8001059e:	8d 46 ff             	lea    -0x1(%rsi),%eax
ffffffff800105a1:	89 f3                	mov    %esi,%ebx
ffffffff800105a3:	66 3d ed 05          	cmp    $0x5ed,%ax
ffffffff800105a7:	0f 87 f5 00 00 00    	ja     ffffffff800106a2 <_ZN7Drivers3Net6E1000E10SendPacketEPKht+0x122>
ffffffff800105ad:	48 85 ff             	test   %rdi,%rdi
ffffffff800105b0:	0f 84 ec 00 00 00    	je     ffffffff800106a2 <_ZN7Drivers3Net6E1000E10SendPacketEPKht+0x122>
            return false;
        }

        TxDescriptor& desc = g_txDescs[g_txTail];
ffffffff800105b6:	8b 05 1c 61 13 00    	mov    0x13611c(%rip),%eax        # ffffffff801466d8 <_ZN7Drivers3Net6E1000EL8g_txTailE>
ffffffff800105bc:	49 89 c5             	mov    %rax,%r13
ffffffff800105bf:	49 c1 e5 04          	shl    $0x4,%r13
ffffffff800105c3:	4c 03 2d 26 65 13 00 	add    0x136526(%rip),%r13        # ffffffff80146af0 <_ZN7Drivers3Net6E1000EL9g_txDescsE>
        if (!(desc.Status & TXSTA_DD)) {
ffffffff800105ca:	41 f6 45 0c 01       	testb  $0x1,0xc(%r13)
ffffffff800105cf:	74 6f                	je     ffffffff80010640 <_ZN7Drivers3Net6E1000E10SendPacketEPKht+0xc0>
            KernelLogStream(WARNING, "E1000E") << "TX ring full";
            return false;
        }

        memcpy(g_txBuffers[g_txTail], data, length);
ffffffff800105d1:	48 8b 04 c5 e0 68 14 	mov    -0x7feb9720(,%rax,8),%rax
ffffffff800105d8:	80 
ffffffff800105d9:	0f b7 d6             	movzwl %si,%edx
ffffffff800105dc:	48 89 fe             	mov    %rdi,%rsi
ffffffff800105df:	48 89 c7             	mov    %rax,%rdi
ffffffff800105e2:	e8 f9 9b 00 00       	call   ffffffff8001a1e0 <memcpy>

        desc.BufferAddress = g_txBuffersPhys[g_txTail];
ffffffff800105e7:	8b 15 eb 60 13 00    	mov    0x1360eb(%rip),%edx        # ffffffff801466d8 <_ZN7Drivers3Net6E1000EL8g_txTailE>
        desc.Status = 0;

        g_txTail = (g_txTail + 1) % TX_DESC_COUNT;
        WriteReg(REG_TDT, g_txTail);

        g_txPacketCount++;
ffffffff800105ed:	48 83 05 d3 60 13 00 	addq   $0x1,0x1360d3(%rip)        # ffffffff801466c8 <_ZN7Drivers3Net6E1000EL15g_txPacketCountE>
ffffffff800105f4:	01 
        desc.BufferAddress = g_txBuffersPhys[g_txTail];
ffffffff800105f5:	48 89 d0             	mov    %rdx,%rax
ffffffff800105f8:	48 8b 14 d5 e0 66 14 	mov    -0x7feb9920(,%rdx,8),%rdx
ffffffff800105ff:	80 
        desc.Length = length;
ffffffff80010600:	66 41 89 5d 08       	mov    %bx,0x8(%r13)
        g_txTail = (g_txTail + 1) % TX_DESC_COUNT;
ffffffff80010605:	83 c0 01             	add    $0x1,%eax
        desc.BufferAddress = g_txBuffersPhys[g_txTail];
ffffffff80010608:	49 89 55 00          	mov    %rdx,0x0(%r13)
        desc.Command = TXCMD_EOP | TXCMD_IFCS | TXCMD_RS;
ffffffff8001060c:	ba 0b 00 00 00       	mov    $0xb,%edx
        g_txTail = (g_txTail + 1) % TX_DESC_COUNT;
ffffffff80010611:	83 e0 1f             	and    $0x1f,%eax
        desc.Command = TXCMD_EOP | TXCMD_IFCS | TXCMD_RS;
ffffffff80010614:	66 41 89 55 0b       	mov    %dx,0xb(%r13)
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff80010619:	48 8b 15 f0 64 13 00 	mov    0x1364f0(%rip),%rdx        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
        g_txTail = (g_txTail + 1) % TX_DESC_COUNT;
ffffffff80010620:	89 05 b2 60 13 00    	mov    %eax,0x1360b2(%rip)        # ffffffff801466d8 <_ZN7Drivers3Net6E1000EL8g_txTailE>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff80010626:	89 82 18 38 00 00    	mov    %eax,0x3818(%rdx)
        return true;
    }
ffffffff8001062c:	48 83 c4 08          	add    $0x8,%rsp
ffffffff80010630:	44 89 e0             	mov    %r12d,%eax
ffffffff80010633:	5b                   	pop    %rbx
ffffffff80010634:	41 5c                	pop    %r12
ffffffff80010636:	41 5d                	pop    %r13
ffffffff80010638:	5d                   	pop    %rbp
ffffffff80010639:	c3                   	ret
ffffffff8001063a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            Print(string);
ffffffff80010640:	48 c7 c7 01 a4 02 80 	mov    $0xffffffff8002a401,%rdi
            g_kernelLogDepth++;
ffffffff80010647:	83 05 56 ee 1c 00 01 	addl   $0x1,0x1cee56(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001064e:	e8 6d 2b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010653:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001065a:	e8 61 2b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001065f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80010666:	e8 55 2b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001066b:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff80010672:	e8 49 2b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010677:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001067e:	e8 3d 2b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010683:	48 c7 c7 6c ad 02 80 	mov    $0xffffffff8002ad6c,%rdi
ffffffff8001068a:	e8 31 2b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001068f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80010696:	e8 25 2b 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001069b:	83 2d 02 ee 1c 00 01 	subl   $0x1,0x1cee02(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800106a2:	48 83 c4 08          	add    $0x8,%rsp
            return false;
ffffffff800106a6:	45 31 e4             	xor    %r12d,%r12d
    }
ffffffff800106a9:	5b                   	pop    %rbx
ffffffff800106aa:	44 89 e0             	mov    %r12d,%eax
ffffffff800106ad:	41 5c                	pop    %r12
ffffffff800106af:	41 5d                	pop    %r13
ffffffff800106b1:	5d                   	pop    %rbp
ffffffff800106b2:	c3                   	ret
ffffffff800106b3:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800106ba:	00 00 00 
ffffffff800106bd:	0f 1f 00             	nopl   (%rax)

ffffffff800106c0 <_ZN7Drivers3Net6E1000E13GetMacAddressEv>:

    const uint8_t* GetMacAddress() {
        return g_macAddress;
    }
ffffffff800106c0:	48 c7 c0 04 6b 14 80 	mov    $0xffffffff80146b04,%rax
ffffffff800106c7:	c3                   	ret
ffffffff800106c8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff800106cf:	00 

ffffffff800106d0 <_ZN7Drivers3Net6E1000E13IsInitializedEv>:

    bool IsInitialized() {
        return g_initialized;
    }
ffffffff800106d0:	0f b6 05 41 64 13 00 	movzbl 0x136441(%rip),%eax        # ffffffff80146b18 <_ZN7Drivers3Net6E1000EL13g_initializedE>
ffffffff800106d7:	c3                   	ret
ffffffff800106d8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff800106df:	00 

ffffffff800106e0 <_ZN7Drivers3Net6E1000E13SetRxCallbackEPFvPKhtE>:

    void SetRxCallback(RxCallback callback) {
        g_rxCallback = callback;
ffffffff800106e0:	48 89 3d d9 5f 13 00 	mov    %rdi,0x135fd9(%rip)        # ffffffff801466c0 <_ZN7Drivers3Net6E1000EL12g_rxCallbackE>
    }
ffffffff800106e7:	c3                   	ret
ffffffff800106e8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff800106ef:	00 

ffffffff800106f0 <_ZN7Drivers3Net6E1000E4PollEv>:

    void Poll() {
        if (!g_initialized) {
ffffffff800106f0:	80 3d 21 64 13 00 00 	cmpb   $0x0,0x136421(%rip)        # ffffffff80146b18 <_ZN7Drivers3Net6E1000EL13g_initializedE>
ffffffff800106f7:	75 07                	jne    ffffffff80010700 <_ZN7Drivers3Net6E1000E4PollEv+0x10>
ffffffff800106f9:	c3                   	ret
ffffffff800106fa:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        if (g_polling) {
ffffffff80010700:	80 3d b2 5f 13 00 00 	cmpb   $0x0,0x135fb2(%rip)        # ffffffff801466b9 <_ZN7Drivers3Net6E1000EL9g_pollingE>
ffffffff80010707:	75 f0                	jne    ffffffff800106f9 <_ZN7Drivers3Net6E1000E4PollEv+0x9>
    void Poll() {
ffffffff80010709:	55                   	push   %rbp
ffffffff8001070a:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001070d:	41 55                	push   %r13
ffffffff8001070f:	41 54                	push   %r12
ffffffff80010711:	53                   	push   %rbx
ffffffff80010712:	48 83 ec 08          	sub    $0x8,%rsp
            uint32_t nextIdx = (g_rxTail + 1) % RX_DESC_COUNT;
ffffffff80010716:	8b 05 c0 5f 13 00    	mov    0x135fc0(%rip),%eax        # ffffffff801466dc <_ZN7Drivers3Net6E1000EL8g_rxTailE>
            RxDescriptor& desc = g_rxDescs[nextIdx];
ffffffff8001071c:	48 8b 0d d5 63 13 00 	mov    0x1363d5(%rip),%rcx        # ffffffff80146af8 <_ZN7Drivers3Net6E1000EL9g_rxDescsE>
        g_polling = true;
ffffffff80010723:	c6 05 8f 5f 13 00 01 	movb   $0x1,0x135f8f(%rip)        # ffffffff801466b9 <_ZN7Drivers3Net6E1000EL9g_pollingE>
            uint32_t nextIdx = (g_rxTail + 1) % RX_DESC_COUNT;
ffffffff8001072a:	8d 58 01             	lea    0x1(%rax),%ebx
ffffffff8001072d:	83 e3 1f             	and    $0x1f,%ebx
            RxDescriptor& desc = g_rxDescs[nextIdx];
ffffffff80010730:	89 d8                	mov    %ebx,%eax
ffffffff80010732:	49 89 c4             	mov    %rax,%r12
ffffffff80010735:	49 c1 e4 04          	shl    $0x4,%r12
ffffffff80010739:	49 01 cc             	add    %rcx,%r12
            if (!(desc.Status & RXSTA_DD)) {
ffffffff8001073c:	41 f6 44 24 0c 01    	testb  $0x1,0xc(%r12)
ffffffff80010742:	74 72                	je     ffffffff800107b6 <_ZN7Drivers3Net6E1000E4PollEv+0xc6>
ffffffff80010744:	44 0f b7 2d 14 89 01 	movzwl 0x18914(%rip),%r13d        # ffffffff80029060 <col256+0x3c0>
ffffffff8001074b:	00 
ffffffff8001074c:	0f 1f 40 00          	nopl   0x0(%rax)
            if (g_rxCallback != nullptr) {
ffffffff80010750:	48 8b 15 69 5f 13 00 	mov    0x135f69(%rip),%rdx        # ffffffff801466c0 <_ZN7Drivers3Net6E1000EL12g_rxCallbackE>
            g_rxPacketCount++;
ffffffff80010757:	48 83 05 71 5f 13 00 	addq   $0x1,0x135f71(%rip)        # ffffffff801466d0 <_ZN7Drivers3Net6E1000EL15g_rxPacketCountE>
ffffffff8001075e:	01 
            uint16_t length = desc.Length;
ffffffff8001075f:	41 0f b7 74 24 08    	movzwl 0x8(%r12),%esi
            if (g_rxCallback != nullptr) {
ffffffff80010765:	48 85 d2             	test   %rdx,%rdx
ffffffff80010768:	74 11                	je     ffffffff8001077b <_ZN7Drivers3Net6E1000E4PollEv+0x8b>
                g_rxCallback(g_rxBuffers[nextIdx], length);
ffffffff8001076a:	48 8b 3c c5 e0 69 14 	mov    -0x7feb9620(,%rax,8),%rdi
ffffffff80010771:	80 
ffffffff80010772:	ff d2                	call   *%rdx
ffffffff80010774:	48 8b 0d 7d 63 13 00 	mov    0x13637d(%rip),%rcx        # ffffffff80146af8 <_ZN7Drivers3Net6E1000EL9g_rxDescsE>
            desc.Length = 0;
ffffffff8001077b:	31 c0                	xor    %eax,%eax
            desc.Status = 0;
ffffffff8001077d:	66 45 89 6c 24 0c    	mov    %r13w,0xc(%r12)
            desc.Length = 0;
ffffffff80010783:	66 41 89 44 24 08    	mov    %ax,0x8(%r12)
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff80010789:	48 8b 05 80 63 13 00 	mov    0x136380(%rip),%rax        # ffffffff80146b10 <_ZN7Drivers3Net6E1000EL10g_mmioBaseE>
            g_rxTail = nextIdx;
ffffffff80010790:	89 1d 46 5f 13 00    	mov    %ebx,0x135f46(%rip)        # ffffffff801466dc <_ZN7Drivers3Net6E1000EL8g_rxTailE>
        *(volatile uint32_t*)(g_mmioBase + reg) = value;
ffffffff80010796:	89 98 18 28 00 00    	mov    %ebx,0x2818(%rax)
            uint32_t nextIdx = (g_rxTail + 1) % RX_DESC_COUNT;
ffffffff8001079c:	83 c3 01             	add    $0x1,%ebx
ffffffff8001079f:	83 e3 1f             	and    $0x1f,%ebx
            RxDescriptor& desc = g_rxDescs[nextIdx];
ffffffff800107a2:	89 d8                	mov    %ebx,%eax
ffffffff800107a4:	49 89 c4             	mov    %rax,%r12
ffffffff800107a7:	49 c1 e4 04          	shl    $0x4,%r12
ffffffff800107ab:	49 01 cc             	add    %rcx,%r12
            if (!(desc.Status & RXSTA_DD)) {
ffffffff800107ae:	41 f6 44 24 0c 01    	testb  $0x1,0xc(%r12)
ffffffff800107b4:	75 9a                	jne    ffffffff80010750 <_ZN7Drivers3Net6E1000E4PollEv+0x60>
        g_polling = false;
ffffffff800107b6:	c6 05 fc 5e 13 00 00 	movb   $0x0,0x135efc(%rip)        # ffffffff801466b9 <_ZN7Drivers3Net6E1000EL9g_pollingE>
            return;
        }
        PollRx();
    }
ffffffff800107bd:	48 83 c4 08          	add    $0x8,%rsp
ffffffff800107c1:	5b                   	pop    %rbx
ffffffff800107c2:	41 5c                	pop    %r12
ffffffff800107c4:	41 5d                	pop    %r13
ffffffff800107c6:	5d                   	pop    %rbp
ffffffff800107c7:	c3                   	ret
ffffffff800107c8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff800107cf:	00 

ffffffff800107d0 <_ZN7Drivers3PS28Keyboard9HandleIRQEh>:
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff800107d0:	e4 60                	in     $0x60,%al
    void HandleIRQ(uint8_t irq) {
        (void)irq;
        uint8_t scancode = Io::In8(DataPort);

        // Handle extended scancode prefix
        if (scancode == 0xE0) {
ffffffff800107d2:	3c e0                	cmp    $0xe0,%al
ffffffff800107d4:	0f 84 3e 02 00 00    	je     ffffffff80010a18 <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x248>
    void HandleIRQ(uint8_t irq) {
ffffffff800107da:	55                   	push   %rbp
            g_ExtendedScancode = true;
            return;
        }

        bool released = (scancode & BreakCodeBit) != 0;
        uint8_t keycode = scancode & ~BreakCodeBit;
ffffffff800107db:	89 c2                	mov    %eax,%edx
ffffffff800107dd:	83 e2 7f             	and    $0x7f,%edx
    void HandleIRQ(uint8_t irq) {
ffffffff800107e0:	48 89 e5             	mov    %rsp,%rbp
ffffffff800107e3:	41 57                	push   %r15
ffffffff800107e5:	41 56                	push   %r14
ffffffff800107e7:	41 55                	push   %r13
ffffffff800107e9:	41 54                	push   %r12
ffffffff800107eb:	53                   	push   %rbx
ffffffff800107ec:	48 83 ec 28          	sub    $0x28,%rsp

        if (g_ExtendedScancode) {
ffffffff800107f0:	80 3d 22 63 13 00 00 	cmpb   $0x0,0x136322(%rip)        # ffffffff80146b19 <_ZN7Drivers3PS28KeyboardL18g_ExtendedScancodeE>
ffffffff800107f7:	0f 85 23 01 00 00    	jne    ffffffff80010920 <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x150>
            return;
        }

        // Handle modifier keys (update state, but still push event to buffer)
        bool isModifier = false;
        switch (keycode) {
ffffffff800107fd:	8d 4a e3             	lea    -0x1d(%rdx),%ecx
ffffffff80010800:	80 f9 29             	cmp    $0x29,%cl
ffffffff80010803:	77 0b                	ja     ffffffff80010810 <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x40>
ffffffff80010805:	0f b6 c9             	movzbl %cl,%ecx
ffffffff80010808:	ff 24 cd 90 d8 02 80 	jmp    *-0x7ffd2770(,%rcx,8)
ffffffff8001080f:	90                   	nop
        bool shift = g_Modifiers.LeftShift || g_Modifiers.RightShift;
ffffffff80010810:	0f b6 0d 09 63 13 00 	movzbl 0x136309(%rip),%ecx        # ffffffff80146b20 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE>
ffffffff80010817:	41 bf 01 00 00 00    	mov    $0x1,%r15d
ffffffff8001081d:	84 c9                	test   %cl,%cl
ffffffff8001081f:	0f 84 fb 01 00 00    	je     ffffffff80010a20 <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x250>
        bool caps = g_Modifiers.CapsLock;
ffffffff80010825:	44 0f b6 35 f9 62 13 	movzbl 0x1362f9(%rip),%r14d        # ffffffff80146b26 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x6>
ffffffff8001082c:	00 

        // Translate scancode to ASCII
        char ascii = 0;
        if (keycode < 128) {
            if (IsShiftActive()) {
                ascii = g_ScancodeToAsciiShifted[keycode];
ffffffff8001082d:	0f b6 d2             	movzbl %dl,%edx
            if (IsShiftActive()) {
ffffffff80010830:	41 38 ce             	cmp    %cl,%r14b
ffffffff80010833:	0f 84 05 02 00 00    	je     ffffffff80010a3e <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x26e>
                ascii = g_ScancodeToAsciiShifted[keycode];
ffffffff80010839:	0f b6 ba e0 d9 02 80 	movzbl -0x7ffd2620(%rdx),%edi
ffffffff80010840:	40 88 7d bd          	mov    %dil,-0x43(%rbp)
        }

        KeyEvent event = {
            .Scancode = scancode,
            .Ascii    = ascii,
            .Pressed  = !released,
ffffffff80010844:	89 c3                	mov    %eax,%ebx
ffffffff80010846:	f7 d3                	not    %ebx
ffffffff80010848:	c0 eb 07             	shr    $0x7,%bl
            .Shift    = g_Modifiers.LeftShift || g_Modifiers.RightShift,
            .Ctrl     = g_Modifiers.LeftCtrl || g_Modifiers.RightCtrl,
ffffffff8001084b:	80 3d d0 62 13 00 00 	cmpb   $0x0,0x1362d0(%rip)        # ffffffff80146b22 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x2>
            .Pressed  = !released,
ffffffff80010852:	88 5d bf             	mov    %bl,-0x41(%rbp)
ffffffff80010855:	bb 01 00 00 00       	mov    $0x1,%ebx
            .Ctrl     = g_Modifiers.LeftCtrl || g_Modifiers.RightCtrl,
ffffffff8001085a:	75 07                	jne    ffffffff80010863 <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x93>
            .Alt      = g_Modifiers.LeftAlt || g_Modifiers.RightAlt,
            .CapsLock = g_Modifiers.CapsLock
        };
ffffffff8001085c:	0f b6 1d c0 62 13 00 	movzbl 0x1362c0(%rip),%ebx        # ffffffff80146b23 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x3>
            .Alt      = g_Modifiers.LeftAlt || g_Modifiers.RightAlt,
ffffffff80010863:	80 3d ba 62 13 00 00 	cmpb   $0x0,0x1362ba(%rip)        # ffffffff80146b24 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x4>
ffffffff8001086a:	41 bd 01 00 00 00    	mov    $0x1,%r13d
ffffffff80010870:	75 08                	jne    ffffffff8001087a <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0xaa>
        };
ffffffff80010872:	44 0f b6 2d ab 62 13 	movzbl 0x1362ab(%rip),%r13d        # ffffffff80146b25 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x5>
ffffffff80010879:	00 
ffffffff8001087a:	88 45 be             	mov    %al,-0x42(%rbp)
        Spinlock inner;
        uint64_t savedFlags = 0;
    public:
        void Acquire() {
            uint64_t flags;
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001087d:	9c                   	pushf
ffffffff8001087e:	41 5c                	pop    %r12
ffffffff80010880:	fa                   	cli
            inner.Acquire();
ffffffff80010881:	48 c7 c7 30 6b 14 80 	mov    $0xffffffff80146b30,%rdi
ffffffff80010888:	e8 23 b8 ff ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
        uint32_t nextHead = (g_BufferHead + 1) & (KeyBufferSize - 1);
ffffffff8001088d:	8b 15 b1 62 13 00    	mov    0x1362b1(%rip),%edx        # ffffffff80146b44 <_ZN7Drivers3PS28KeyboardL12g_BufferHeadE>
        if (nextHead == g_BufferTail) {
ffffffff80010893:	8b 0d a7 62 13 00    	mov    0x1362a7(%rip),%ecx        # ffffffff80146b40 <_ZN7Drivers3PS28KeyboardL12g_BufferTailE>
            savedFlags = flags;
ffffffff80010899:	4c 89 25 98 62 13 00 	mov    %r12,0x136298(%rip)        # ffffffff80146b38 <_ZN7Drivers3PS28KeyboardL12g_BufferLockE+0x8>
        uint32_t nextHead = (g_BufferHead + 1) & (KeyBufferSize - 1);
ffffffff800108a0:	83 c2 01             	add    $0x1,%edx
ffffffff800108a3:	0f b6 d2             	movzbl %dl,%edx
        if (nextHead == g_BufferTail) {
ffffffff800108a6:	39 ca                	cmp    %ecx,%edx
ffffffff800108a8:	74 50                	je     ffffffff800108fa <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x12a>
        g_KeyBuffer[g_BufferHead] = event;
ffffffff800108aa:	8b 0d 94 62 13 00    	mov    0x136294(%rip),%ecx        # ffffffff80146b44 <_ZN7Drivers3PS28KeyboardL12g_BufferHeadE>
ffffffff800108b0:	0f b6 45 be          	movzbl -0x42(%rbp),%eax
        g_BufferHead = nextHead;
ffffffff800108b4:	89 15 8a 62 13 00    	mov    %edx,0x13628a(%rip)        # ffffffff80146b44 <_ZN7Drivers3PS28KeyboardL12g_BufferHeadE>
        g_KeyBuffer[g_BufferHead] = event;
ffffffff800108ba:	48 8d 34 cd 00 00 00 	lea    0x0(,%rcx,8),%rsi
ffffffff800108c1:	00 
ffffffff800108c2:	48 29 ce             	sub    %rcx,%rsi
ffffffff800108c5:	88 86 60 6b 14 80    	mov    %al,-0x7feb94a0(%rsi)
ffffffff800108cb:	0f b6 45 bd          	movzbl -0x43(%rbp),%eax
ffffffff800108cf:	44 88 be 63 6b 14 80 	mov    %r15b,-0x7feb949d(%rsi)
ffffffff800108d6:	88 86 61 6b 14 80    	mov    %al,-0x7feb949f(%rsi)
ffffffff800108dc:	0f b6 45 bf          	movzbl -0x41(%rbp),%eax
ffffffff800108e0:	88 9e 64 6b 14 80    	mov    %bl,-0x7feb949c(%rsi)
ffffffff800108e6:	88 86 62 6b 14 80    	mov    %al,-0x7feb949e(%rsi)
ffffffff800108ec:	44 88 ae 65 6b 14 80 	mov    %r13b,-0x7feb949b(%rsi)
ffffffff800108f3:	44 88 b6 66 6b 14 80 	mov    %r14b,-0x7feb949a(%rsi)
        }
        void Release() {
            uint64_t flags = savedFlags;
            inner.Release();
ffffffff800108fa:	48 c7 c7 30 6b 14 80 	mov    $0xffffffff80146b30,%rdi
ffffffff80010901:	e8 ca b7 ff ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff80010906:	41 54                	push   %r12
ffffffff80010908:	9d                   	popf

        g_BufferLock.Acquire();
        BufferPush(event);
        g_BufferLock.Release();
    }
ffffffff80010909:	48 83 c4 28          	add    $0x28,%rsp
ffffffff8001090d:	5b                   	pop    %rbx
ffffffff8001090e:	41 5c                	pop    %r12
ffffffff80010910:	41 5d                	pop    %r13
ffffffff80010912:	41 5e                	pop    %r14
ffffffff80010914:	41 5f                	pop    %r15
ffffffff80010916:	5d                   	pop    %rbp
ffffffff80010917:	c3                   	ret
ffffffff80010918:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001091f:	00 
                g_Modifiers.RightCtrl = !released;
ffffffff80010920:	89 c3                	mov    %eax,%ebx
            g_ExtendedScancode = false;
ffffffff80010922:	c6 05 f0 61 13 00 00 	movb   $0x0,0x1361f0(%rip)        # ffffffff80146b19 <_ZN7Drivers3PS28KeyboardL18g_ExtendedScancodeE>
                g_Modifiers.RightCtrl = !released;
ffffffff80010929:	f7 d3                	not    %ebx
ffffffff8001092b:	c0 eb 07             	shr    $0x7,%bl
            if (keycode == ScLeftCtrl) {
ffffffff8001092e:	80 fa 1d             	cmp    $0x1d,%dl
ffffffff80010931:	0f 84 19 01 00 00    	je     ffffffff80010a50 <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x280>
            } else if (keycode == ScLeftAlt) {
ffffffff80010937:	80 fa 38             	cmp    $0x38,%dl
ffffffff8001093a:	75 06                	jne    ffffffff80010942 <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x172>
                g_Modifiers.RightAlt = !released;
ffffffff8001093c:	88 1d e3 61 13 00    	mov    %bl,0x1361e3(%rip)        # ffffffff80146b25 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x5>
                .Shift    = g_Modifiers.LeftShift || g_Modifiers.RightShift,
ffffffff80010942:	80 3d d7 61 13 00 00 	cmpb   $0x0,0x1361d7(%rip)        # ffffffff80146b20 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE>
            KeyEvent event = {
ffffffff80010949:	c6 45 ca 00          	movb   $0x0,-0x36(%rbp)
ffffffff8001094d:	41 bd 01 00 00 00    	mov    $0x1,%r13d
                .Shift    = g_Modifiers.LeftShift || g_Modifiers.RightShift,
ffffffff80010953:	75 08                	jne    ffffffff8001095d <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x18d>
            };
ffffffff80010955:	44 0f b6 2d c4 61 13 	movzbl 0x1361c4(%rip),%r13d        # ffffffff80146b21 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x1>
ffffffff8001095c:	00 
                .Ctrl     = g_Modifiers.LeftCtrl || g_Modifiers.RightCtrl,
ffffffff8001095d:	80 3d be 61 13 00 00 	cmpb   $0x0,0x1361be(%rip)        # ffffffff80146b22 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x2>
ffffffff80010964:	41 bf 01 00 00 00    	mov    $0x1,%r15d
ffffffff8001096a:	75 08                	jne    ffffffff80010974 <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x1a4>
            };
ffffffff8001096c:	44 0f b6 3d af 61 13 	movzbl 0x1361af(%rip),%r15d        # ffffffff80146b23 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x3>
ffffffff80010973:	00 
                .Alt      = g_Modifiers.LeftAlt || g_Modifiers.RightAlt,
ffffffff80010974:	80 3d a9 61 13 00 00 	cmpb   $0x0,0x1361a9(%rip)        # ffffffff80146b24 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x4>
ffffffff8001097b:	41 be 01 00 00 00    	mov    $0x1,%r14d
ffffffff80010981:	75 08                	jne    ffffffff8001098b <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x1bb>
            };
ffffffff80010983:	44 0f b6 35 9a 61 13 	movzbl 0x13619a(%rip),%r14d        # ffffffff80146b25 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x5>
ffffffff8001098a:	00 
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001098b:	88 45 be             	mov    %al,-0x42(%rbp)
ffffffff8001098e:	0f b6 05 91 61 13 00 	movzbl 0x136191(%rip),%eax        # ffffffff80146b26 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x6>
ffffffff80010995:	88 45 bf             	mov    %al,-0x41(%rbp)
ffffffff80010998:	9c                   	pushf
ffffffff80010999:	41 5c                	pop    %r12
ffffffff8001099b:	fa                   	cli
            inner.Acquire();
ffffffff8001099c:	48 c7 c7 30 6b 14 80 	mov    $0xffffffff80146b30,%rdi
ffffffff800109a3:	e8 08 b7 ff ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
        uint32_t nextHead = (g_BufferHead + 1) & (KeyBufferSize - 1);
ffffffff800109a8:	8b 15 96 61 13 00    	mov    0x136196(%rip),%edx        # ffffffff80146b44 <_ZN7Drivers3PS28KeyboardL12g_BufferHeadE>
        if (nextHead == g_BufferTail) {
ffffffff800109ae:	8b 0d 8c 61 13 00    	mov    0x13618c(%rip),%ecx        # ffffffff80146b40 <_ZN7Drivers3PS28KeyboardL12g_BufferTailE>
            savedFlags = flags;
ffffffff800109b4:	4c 89 25 7d 61 13 00 	mov    %r12,0x13617d(%rip)        # ffffffff80146b38 <_ZN7Drivers3PS28KeyboardL12g_BufferLockE+0x8>
        uint32_t nextHead = (g_BufferHead + 1) & (KeyBufferSize - 1);
ffffffff800109bb:	83 c2 01             	add    $0x1,%edx
ffffffff800109be:	0f b6 d2             	movzbl %dl,%edx
        if (nextHead == g_BufferTail) {
ffffffff800109c1:	39 ca                	cmp    %ecx,%edx
ffffffff800109c3:	0f 84 31 ff ff ff    	je     ffffffff800108fa <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x12a>
        g_KeyBuffer[g_BufferHead] = event;
ffffffff800109c9:	0f b6 45 be          	movzbl -0x42(%rbp),%eax
ffffffff800109cd:	8b 0d 71 61 13 00    	mov    0x136171(%rip),%ecx        # ffffffff80146b44 <_ZN7Drivers3PS28KeyboardL12g_BufferHeadE>
ffffffff800109d3:	44 88 6d cc          	mov    %r13b,-0x34(%rbp)
ffffffff800109d7:	88 5d cb             	mov    %bl,-0x35(%rbp)
ffffffff800109da:	88 45 c9             	mov    %al,-0x37(%rbp)
ffffffff800109dd:	0f b6 45 bf          	movzbl -0x41(%rbp),%eax
ffffffff800109e1:	44 88 7d cd          	mov    %r15b,-0x33(%rbp)
ffffffff800109e5:	88 45 cf             	mov    %al,-0x31(%rbp)
ffffffff800109e8:	48 8d 04 cd 00 00 00 	lea    0x0(,%rcx,8),%rax
ffffffff800109ef:	00 
ffffffff800109f0:	48 29 c8             	sub    %rcx,%rax
ffffffff800109f3:	8b 4d c9             	mov    -0x37(%rbp),%ecx
ffffffff800109f6:	44 88 75 ce          	mov    %r14b,-0x32(%rbp)
        g_BufferHead = nextHead;
ffffffff800109fa:	89 15 44 61 13 00    	mov    %edx,0x136144(%rip)        # ffffffff80146b44 <_ZN7Drivers3PS28KeyboardL12g_BufferHeadE>
        g_KeyBuffer[g_BufferHead] = event;
ffffffff80010a00:	89 88 60 6b 14 80    	mov    %ecx,-0x7feb94a0(%rax)
ffffffff80010a06:	8b 4d cc             	mov    -0x34(%rbp),%ecx
ffffffff80010a09:	89 88 63 6b 14 80    	mov    %ecx,-0x7feb949d(%rax)
            inner.Release();
ffffffff80010a0f:	e9 e6 fe ff ff       	jmp    ffffffff800108fa <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x12a>
ffffffff80010a14:	0f 1f 40 00          	nopl   0x0(%rax)
            g_ExtendedScancode = true;
ffffffff80010a18:	c6 05 fa 60 13 00 01 	movb   $0x1,0x1360fa(%rip)        # ffffffff80146b19 <_ZN7Drivers3PS28KeyboardL18g_ExtendedScancodeE>
            return;
ffffffff80010a1f:	c3                   	ret
        bool shift = g_Modifiers.LeftShift || g_Modifiers.RightShift;
ffffffff80010a20:	0f b6 0d fa 60 13 00 	movzbl 0x1360fa(%rip),%ecx        # ffffffff80146b21 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x1>
        bool caps = g_Modifiers.CapsLock;
ffffffff80010a27:	44 0f b6 35 f7 60 13 	movzbl 0x1360f7(%rip),%r14d        # ffffffff80146b26 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x6>
ffffffff80010a2e:	00 
                ascii = g_ScancodeToAsciiShifted[keycode];
ffffffff80010a2f:	0f b6 d2             	movzbl %dl,%edx
        };
ffffffff80010a32:	41 89 cf             	mov    %ecx,%r15d
            if (IsShiftActive()) {
ffffffff80010a35:	41 38 ce             	cmp    %cl,%r14b
ffffffff80010a38:	0f 85 fb fd ff ff    	jne    ffffffff80010839 <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x69>
                ascii = g_ScancodeToAscii[keycode];
ffffffff80010a3e:	0f b6 b2 60 da 02 80 	movzbl -0x7ffd25a0(%rdx),%esi
ffffffff80010a45:	40 88 75 bd          	mov    %sil,-0x43(%rbp)
ffffffff80010a49:	e9 f6 fd ff ff       	jmp    ffffffff80010844 <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x74>
ffffffff80010a4e:	66 90                	xchg   %ax,%ax
                g_Modifiers.RightCtrl = !released;
ffffffff80010a50:	88 1d cd 60 13 00    	mov    %bl,0x1360cd(%rip)        # ffffffff80146b23 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x3>
ffffffff80010a56:	e9 e7 fe ff ff       	jmp    ffffffff80010942 <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x172>
ffffffff80010a5b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
                g_Modifiers.LeftCtrl = !released;
ffffffff80010a60:	89 c2                	mov    %eax,%edx
                .Shift    = g_Modifiers.LeftShift || g_Modifiers.RightShift,
ffffffff80010a62:	44 0f b6 05 b6 60 13 	movzbl 0x1360b6(%rip),%r8d        # ffffffff80146b20 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE>
ffffffff80010a69:	00 
                .Alt      = g_Modifiers.LeftAlt || g_Modifiers.RightAlt,
ffffffff80010a6a:	0f b6 35 b3 60 13 00 	movzbl 0x1360b3(%rip),%esi        # ffffffff80146b24 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x4>
                g_Modifiers.LeftCtrl = !released;
ffffffff80010a71:	f7 d2                	not    %edx
ffffffff80010a73:	c0 ea 07             	shr    $0x7,%dl
ffffffff80010a76:	88 15 a6 60 13 00    	mov    %dl,0x1360a6(%rip)        # ffffffff80146b22 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x2>
                .Alt      = g_Modifiers.LeftAlt || g_Modifiers.RightAlt,
ffffffff80010a7c:	89 d7                	mov    %edx,%edi
            };
ffffffff80010a7e:	44 0f b6 2d 9b 60 13 	movzbl 0x13609b(%rip),%r13d        # ffffffff80146b21 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x1>
ffffffff80010a85:	00 
ffffffff80010a86:	b9 01 00 00 00       	mov    $0x1,%ecx
ffffffff80010a8b:	45 84 c0             	test   %r8b,%r8b
ffffffff80010a8e:	44 0f b6 25 8d 60 13 	movzbl 0x13608d(%rip),%r12d        # ffffffff80146b23 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x3>
ffffffff80010a95:	00 
ffffffff80010a96:	0f b6 1d 88 60 13 00 	movzbl 0x136088(%rip),%ebx        # ffffffff80146b25 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x5>
ffffffff80010a9d:	44 0f b6 3d 81 60 13 	movzbl 0x136081(%rip),%r15d        # ffffffff80146b26 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x6>
ffffffff80010aa4:	00 
ffffffff80010aa5:	88 45 be             	mov    %al,-0x42(%rbp)
ffffffff80010aa8:	44 0f 45 e9          	cmovne %ecx,%r13d
ffffffff80010aac:	40 84 ff             	test   %dil,%dil
ffffffff80010aaf:	88 55 bf             	mov    %dl,-0x41(%rbp)
ffffffff80010ab2:	44 0f 45 e1          	cmovne %ecx,%r12d
ffffffff80010ab6:	40 84 f6             	test   %sil,%sil
            KeyEvent event = {
ffffffff80010ab9:	c6 45 ca 00          	movb   $0x0,-0x36(%rbp)
            };
ffffffff80010abd:	0f 45 d9             	cmovne %ecx,%ebx
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff80010ac0:	9c                   	pushf
ffffffff80010ac1:	41 5e                	pop    %r14
ffffffff80010ac3:	fa                   	cli
            inner.Acquire();
ffffffff80010ac4:	48 c7 c7 30 6b 14 80 	mov    $0xffffffff80146b30,%rdi
ffffffff80010acb:	e8 e0 b5 ff ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
        uint32_t nextHead = (g_BufferHead + 1) & (KeyBufferSize - 1);
ffffffff80010ad0:	8b 0d 6e 60 13 00    	mov    0x13606e(%rip),%ecx        # ffffffff80146b44 <_ZN7Drivers3PS28KeyboardL12g_BufferHeadE>
        if (nextHead == g_BufferTail) {
ffffffff80010ad6:	8b 35 64 60 13 00    	mov    0x136064(%rip),%esi        # ffffffff80146b40 <_ZN7Drivers3PS28KeyboardL12g_BufferTailE>
            savedFlags = flags;
ffffffff80010adc:	4c 89 35 55 60 13 00 	mov    %r14,0x136055(%rip)        # ffffffff80146b38 <_ZN7Drivers3PS28KeyboardL12g_BufferLockE+0x8>
        uint32_t nextHead = (g_BufferHead + 1) & (KeyBufferSize - 1);
ffffffff80010ae3:	83 c1 01             	add    $0x1,%ecx
ffffffff80010ae6:	0f b6 c9             	movzbl %cl,%ecx
        if (nextHead == g_BufferTail) {
ffffffff80010ae9:	39 f1                	cmp    %esi,%ecx
ffffffff80010aeb:	74 48                	je     ffffffff80010b35 <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x365>
        g_KeyBuffer[g_BufferHead] = event;
ffffffff80010aed:	8b 35 51 60 13 00    	mov    0x136051(%rip),%esi        # ffffffff80146b44 <_ZN7Drivers3PS28KeyboardL12g_BufferHeadE>
ffffffff80010af3:	0f b6 55 bf          	movzbl -0x41(%rbp),%edx
ffffffff80010af7:	44 88 6d cc          	mov    %r13b,-0x34(%rbp)
ffffffff80010afb:	0f b6 45 be          	movzbl -0x42(%rbp),%eax
ffffffff80010aff:	44 88 65 cd          	mov    %r12b,-0x33(%rbp)
ffffffff80010b03:	88 55 cb             	mov    %dl,-0x35(%rbp)
ffffffff80010b06:	89 f2                	mov    %esi,%edx
ffffffff80010b08:	88 45 c9             	mov    %al,-0x37(%rbp)
ffffffff80010b0b:	48 8d 04 d5 00 00 00 	lea    0x0(,%rdx,8),%rax
ffffffff80010b12:	00 
ffffffff80010b13:	48 29 d0             	sub    %rdx,%rax
ffffffff80010b16:	8b 55 c9             	mov    -0x37(%rbp),%edx
ffffffff80010b19:	88 5d ce             	mov    %bl,-0x32(%rbp)
ffffffff80010b1c:	44 88 7d cf          	mov    %r15b,-0x31(%rbp)
ffffffff80010b20:	89 90 60 6b 14 80    	mov    %edx,-0x7feb94a0(%rax)
ffffffff80010b26:	8b 55 cc             	mov    -0x34(%rbp),%edx
        g_BufferHead = nextHead;
ffffffff80010b29:	89 0d 15 60 13 00    	mov    %ecx,0x136015(%rip)        # ffffffff80146b44 <_ZN7Drivers3PS28KeyboardL12g_BufferHeadE>
        g_KeyBuffer[g_BufferHead] = event;
ffffffff80010b2f:	89 90 63 6b 14 80    	mov    %edx,-0x7feb949d(%rax)
            inner.Release();
ffffffff80010b35:	48 c7 c7 30 6b 14 80 	mov    $0xffffffff80146b30,%rdi
ffffffff80010b3c:	e8 8f b5 ff ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff80010b41:	41 56                	push   %r14
ffffffff80010b43:	9d                   	popf
    }
ffffffff80010b44:	48 83 c4 28          	add    $0x28,%rsp
ffffffff80010b48:	5b                   	pop    %rbx
ffffffff80010b49:	41 5c                	pop    %r12
ffffffff80010b4b:	41 5d                	pop    %r13
ffffffff80010b4d:	41 5e                	pop    %r14
ffffffff80010b4f:	41 5f                	pop    %r15
ffffffff80010b51:	5d                   	pop    %rbp
ffffffff80010b52:	c3                   	ret
ffffffff80010b53:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
                if (!released) {
ffffffff80010b58:	84 c0                	test   %al,%al
ffffffff80010b5a:	0f 88 a9 fd ff ff    	js     ffffffff80010909 <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x139>
                    g_Modifiers.ScrollLock = !g_Modifiers.ScrollLock;
ffffffff80010b60:	80 35 c1 5f 13 00 01 	xorb   $0x1,0x135fc1(%rip)        # ffffffff80146b28 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x8>
        if (isModifier && keycode != ScCapsLock && keycode != ScNumLock && keycode != ScScrollLock) {
ffffffff80010b67:	e9 9d fd ff ff       	jmp    ffffffff80010909 <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x139>
ffffffff80010b6c:	0f 1f 40 00          	nopl   0x0(%rax)
                if (!released) {
ffffffff80010b70:	84 c0                	test   %al,%al
ffffffff80010b72:	0f 88 91 fd ff ff    	js     ffffffff80010909 <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x139>
                    g_Modifiers.NumLock = !g_Modifiers.NumLock;
ffffffff80010b78:	80 35 a8 5f 13 00 01 	xorb   $0x1,0x135fa8(%rip)        # ffffffff80146b27 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x7>
        if (isModifier && keycode != ScCapsLock && keycode != ScNumLock && keycode != ScScrollLock) {
ffffffff80010b7f:	e9 85 fd ff ff       	jmp    ffffffff80010909 <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x139>
ffffffff80010b84:	0f 1f 40 00          	nopl   0x0(%rax)
                if (!released) {
ffffffff80010b88:	84 c0                	test   %al,%al
ffffffff80010b8a:	0f 88 79 fd ff ff    	js     ffffffff80010909 <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x139>
                    g_Modifiers.CapsLock = !g_Modifiers.CapsLock;
ffffffff80010b90:	80 35 8f 5f 13 00 01 	xorb   $0x1,0x135f8f(%rip)        # ffffffff80146b26 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x6>
        if (isModifier && keycode != ScCapsLock && keycode != ScNumLock && keycode != ScScrollLock) {
ffffffff80010b97:	e9 6d fd ff ff       	jmp    ffffffff80010909 <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x139>
ffffffff80010b9c:	0f 1f 40 00          	nopl   0x0(%rax)
                g_Modifiers.LeftAlt = !released;
ffffffff80010ba0:	89 c2                	mov    %eax,%edx
                .Shift    = g_Modifiers.LeftShift || g_Modifiers.RightShift,
ffffffff80010ba2:	44 0f b6 05 76 5f 13 	movzbl 0x135f76(%rip),%r8d        # ffffffff80146b20 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE>
ffffffff80010ba9:	00 
                .Ctrl     = g_Modifiers.LeftCtrl || g_Modifiers.RightCtrl,
ffffffff80010baa:	0f b6 3d 71 5f 13 00 	movzbl 0x135f71(%rip),%edi        # ffffffff80146b22 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x2>
                g_Modifiers.LeftAlt = !released;
ffffffff80010bb1:	f7 d2                	not    %edx
ffffffff80010bb3:	c0 ea 07             	shr    $0x7,%dl
ffffffff80010bb6:	88 15 68 5f 13 00    	mov    %dl,0x135f68(%rip)        # ffffffff80146b24 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x4>
                .Ctrl     = g_Modifiers.LeftCtrl || g_Modifiers.RightCtrl,
ffffffff80010bbc:	89 d6                	mov    %edx,%esi
ffffffff80010bbe:	e9 bb fe ff ff       	jmp    ffffffff80010a7e <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x2ae>
ffffffff80010bc3:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
                g_Modifiers.RightShift = !released;
ffffffff80010bc8:	89 c2                	mov    %eax,%edx
                .Shift    = g_Modifiers.LeftShift || g_Modifiers.RightShift,
ffffffff80010bca:	44 0f b6 05 4e 5f 13 	movzbl 0x135f4e(%rip),%r8d        # ffffffff80146b20 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE>
ffffffff80010bd1:	00 
                .Ctrl     = g_Modifiers.LeftCtrl || g_Modifiers.RightCtrl,
ffffffff80010bd2:	0f b6 3d 49 5f 13 00 	movzbl 0x135f49(%rip),%edi        # ffffffff80146b22 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x2>
                g_Modifiers.RightShift = !released;
ffffffff80010bd9:	f7 d2                	not    %edx
                .Alt      = g_Modifiers.LeftAlt || g_Modifiers.RightAlt,
ffffffff80010bdb:	0f b6 35 42 5f 13 00 	movzbl 0x135f42(%rip),%esi        # ffffffff80146b24 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x4>
                g_Modifiers.RightShift = !released;
ffffffff80010be2:	c0 ea 07             	shr    $0x7,%dl
ffffffff80010be5:	88 15 36 5f 13 00    	mov    %dl,0x135f36(%rip)        # ffffffff80146b21 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x1>
        if (isModifier && keycode != ScCapsLock && keycode != ScNumLock && keycode != ScScrollLock) {
ffffffff80010beb:	e9 8e fe ff ff       	jmp    ffffffff80010a7e <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x2ae>
                g_Modifiers.LeftShift = !released;
ffffffff80010bf0:	89 c2                	mov    %eax,%edx
                .Ctrl     = g_Modifiers.LeftCtrl || g_Modifiers.RightCtrl,
ffffffff80010bf2:	0f b6 3d 29 5f 13 00 	movzbl 0x135f29(%rip),%edi        # ffffffff80146b22 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x2>
                .Alt      = g_Modifiers.LeftAlt || g_Modifiers.RightAlt,
ffffffff80010bf9:	0f b6 35 24 5f 13 00 	movzbl 0x135f24(%rip),%esi        # ffffffff80146b24 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x4>
                g_Modifiers.LeftShift = !released;
ffffffff80010c00:	f7 d2                	not    %edx
ffffffff80010c02:	c0 ea 07             	shr    $0x7,%dl
ffffffff80010c05:	88 15 15 5f 13 00    	mov    %dl,0x135f15(%rip)        # ffffffff80146b20 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE>
                .Alt      = g_Modifiers.LeftAlt || g_Modifiers.RightAlt,
ffffffff80010c0b:	41 89 d0             	mov    %edx,%r8d
ffffffff80010c0e:	e9 6b fe ff ff       	jmp    ffffffff80010a7e <_ZN7Drivers3PS28Keyboard9HandleIRQEh+0x2ae>
ffffffff80010c13:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80010c1a:	00 00 00 
ffffffff80010c1d:	0f 1f 00             	nopl   (%rax)

ffffffff80010c20 <_ZN7Drivers3PS28Keyboard10InitializeEv>:
    void Initialize() {
ffffffff80010c20:	55                   	push   %rbp
            Print(string);
ffffffff80010c21:	48 c7 c7 8e b0 02 80 	mov    $0xffffffff8002b08e,%rdi
ffffffff80010c28:	48 89 e5             	mov    %rsp,%rbp
ffffffff80010c2b:	53                   	push   %rbx
ffffffff80010c2c:	48 83 ec 08          	sub    $0x8,%rsp
            g_kernelLogDepth++;
ffffffff80010c30:	83 05 6d e8 1c 00 01 	addl   $0x1,0x1ce86d(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80010c37:	e8 84 25 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010c3c:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80010c43:	e8 78 25 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010c48:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80010c4f:	e8 6c 25 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010c54:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff80010c5b:	e8 60 25 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010c60:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80010c67:	e8 54 25 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010c6c:	48 c7 c7 95 b0 02 80 	mov    $0xffffffff8002b095,%rdi
ffffffff80010c73:	e8 48 25 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010c78:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80010c7f:	e8 3c 25 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        Drivers::PS2::SendData(0xFF);
ffffffff80010c84:	bf ff 00 00 00       	mov    $0xff,%edi
            g_kernelLogDepth--;
ffffffff80010c89:	83 2d 14 e8 1c 00 01 	subl   $0x1,0x1ce814(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80010c90:	e8 7b 0a 00 00       	call   ffffffff80011710 <_ZN7Drivers3PS28SendDataEh>
        uint8_t ack = Drivers::PS2::ReadData();
ffffffff80010c95:	e8 a6 0a 00 00       	call   ffffffff80011740 <_ZN7Drivers3PS28ReadDataEv>
        if (ack != 0xFA) {
ffffffff80010c9a:	3c fa                	cmp    $0xfa,%al
ffffffff80010c9c:	74 79                	je     ffffffff80010d17 <_ZN7Drivers3PS28Keyboard10InitializeEv+0xf7>
            Print(string);
ffffffff80010c9e:	48 c7 c7 8e b0 02 80 	mov    $0xffffffff8002b08e,%rdi
ffffffff80010ca5:	89 c3                	mov    %eax,%ebx
            g_kernelLogDepth++;
ffffffff80010ca7:	83 05 f6 e7 1c 00 01 	addl   $0x1,0x1ce7f6(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80010cae:	e8 0d 25 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010cb3:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80010cba:	e8 01 25 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010cbf:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80010cc6:	e8 f5 24 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010ccb:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff80010cd2:	e8 e9 24 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010cd7:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80010cde:	e8 dd 24 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010ce3:	48 c7 c7 88 c8 02 80 	mov    $0xffffffff8002c888,%rdi
ffffffff80010cea:	e8 d1 24 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80010cef:	be 10 00 00 00       	mov    $0x10,%esi
            Kt::KernelLogStream(Kt::WARNING, "PS2/KB") << "Keyboard reset: unexpected ACK: " << base::hex << (uint64_t)ack;
ffffffff80010cf4:	0f b6 fb             	movzbl %bl,%edi
ffffffff80010cf7:	e8 94 97 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80010cfc:	48 89 c7             	mov    %rax,%rdi
ffffffff80010cff:	e8 bc 24 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80010d04:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80010d0b:	e8 b0 24 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80010d10:	83 2d 8d e7 1c 00 01 	subl   $0x1,0x1ce78d(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        uint8_t selfTest = Drivers::PS2::ReadData();
ffffffff80010d17:	e8 24 0a 00 00       	call   ffffffff80011740 <_ZN7Drivers3PS28ReadDataEv>
ffffffff80010d1c:	89 c3                	mov    %eax,%ebx
        if (selfTest != 0xAA) {
ffffffff80010d1e:	3c aa                	cmp    $0xaa,%al
ffffffff80010d20:	74 77                	je     ffffffff80010d99 <_ZN7Drivers3PS28Keyboard10InitializeEv+0x179>
            Print(string);
ffffffff80010d22:	48 c7 c7 8e b0 02 80 	mov    $0xffffffff8002b08e,%rdi
            g_kernelLogDepth++;
ffffffff80010d29:	83 05 74 e7 1c 00 01 	addl   $0x1,0x1ce774(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80010d30:	e8 8b 24 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010d35:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80010d3c:	e8 7f 24 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010d41:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80010d48:	e8 73 24 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010d4d:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff80010d54:	e8 67 24 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010d59:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80010d60:	e8 5b 24 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010d65:	48 c7 c7 b0 c8 02 80 	mov    $0xffffffff8002c8b0,%rdi
ffffffff80010d6c:	e8 4f 24 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80010d71:	be 10 00 00 00       	mov    $0x10,%esi
            Kt::KernelLogStream(Kt::WARNING, "PS2/KB") << "Keyboard self-test: unexpected result: " << base::hex << (uint64_t)selfTest;
ffffffff80010d76:	0f b6 fb             	movzbl %bl,%edi
ffffffff80010d79:	e8 12 97 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80010d7e:	48 89 c7             	mov    %rax,%rdi
ffffffff80010d81:	e8 3a 24 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80010d86:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80010d8d:	e8 2e 24 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80010d92:	83 2d 0b e7 1c 00 01 	subl   $0x1,0x1ce70b(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        Drivers::PS2::SendData(0xF4);
ffffffff80010d99:	bf f4 00 00 00       	mov    $0xf4,%edi
ffffffff80010d9e:	e8 6d 09 00 00       	call   ffffffff80011710 <_ZN7Drivers3PS28SendDataEh>
        ack = Drivers::PS2::ReadData();
ffffffff80010da3:	e8 98 09 00 00       	call   ffffffff80011740 <_ZN7Drivers3PS28ReadDataEv>
        Hal::RegisterIrqHandler(Hal::IRQ_KEYBOARD, HandleIRQ);
ffffffff80010da8:	48 c7 c6 d0 07 01 80 	mov    $0xffffffff800107d0,%rsi
ffffffff80010daf:	bf 01 00 00 00       	mov    $0x1,%edi
        g_BufferHead = 0;
ffffffff80010db4:	c7 05 86 5d 13 00 00 	movl   $0x0,0x135d86(%rip)        # ffffffff80146b44 <_ZN7Drivers3PS28KeyboardL12g_BufferHeadE>
ffffffff80010dbb:	00 00 00 
        g_Modifiers = {};
ffffffff80010dbe:	48 c7 05 57 5d 13 00 	movq   $0x0,0x135d57(%rip)        # ffffffff80146b20 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE>
ffffffff80010dc5:	00 00 00 00 
ffffffff80010dc9:	c6 05 58 5d 13 00 00 	movb   $0x0,0x135d58(%rip)        # ffffffff80146b28 <_ZN7Drivers3PS28KeyboardL11g_ModifiersE+0x8>
        g_BufferTail = 0;
ffffffff80010dd0:	c7 05 66 5d 13 00 00 	movl   $0x0,0x135d66(%rip)        # ffffffff80146b40 <_ZN7Drivers3PS28KeyboardL12g_BufferTailE>
ffffffff80010dd7:	00 00 00 
        g_ExtendedScancode = false;
ffffffff80010dda:	c6 05 38 5d 13 00 00 	movb   $0x0,0x135d38(%rip)        # ffffffff80146b19 <_ZN7Drivers3PS28KeyboardL18g_ExtendedScancodeE>
        Hal::RegisterIrqHandler(Hal::IRQ_KEYBOARD, HandleIRQ);
ffffffff80010de1:	e8 9a 78 00 00       	call   ffffffff80018680 <_ZN3Hal18RegisterIrqHandlerEhPFvhE>
        Hal::IoApic::UnmaskIrq(Hal::IoApic::GetGsiForIrq(Hal::IRQ_KEYBOARD));
ffffffff80010de6:	bf 01 00 00 00       	mov    $0x1,%edi
ffffffff80010deb:	e8 20 7b 00 00       	call   ffffffff80018910 <_ZN3Hal6IoApic12GetGsiForIrqEh>
ffffffff80010df0:	0f b6 f8             	movzbl %al,%edi
ffffffff80010df3:	e8 d8 7a 00 00       	call   ffffffff800188d0 <_ZN3Hal6IoApic9UnmaskIrqEh>
            Print(string);
ffffffff80010df8:	48 c7 c7 8e b0 02 80 	mov    $0xffffffff8002b08e,%rdi
            g_kernelLogDepth++;
ffffffff80010dff:	83 05 9e e6 1c 00 01 	addl   $0x1,0x1ce69e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80010e06:	e8 b5 23 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010e0b:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80010e12:	e8 a9 23 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010e17:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80010e1e:	e8 9d 23 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010e23:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80010e2a:	e8 91 23 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010e2f:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80010e36:	e8 85 23 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010e3b:	48 c7 c7 b2 b0 02 80 	mov    $0xffffffff8002b0b2,%rdi
ffffffff80010e42:	e8 79 23 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80010e47:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80010e4e:	e8 6d 23 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80010e53:	83 2d 4a e6 1c 00 01 	subl   $0x1,0x1ce64a(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff80010e5a:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff80010e5e:	c9                   	leave
ffffffff80010e5f:	c3                   	ret

ffffffff80010e60 <_ZN7Drivers3PS28Keyboard14IsKeyAvailableEv>:

    bool IsKeyAvailable() {
        return g_BufferHead != g_BufferTail;
ffffffff80010e60:	8b 15 de 5c 13 00    	mov    0x135cde(%rip),%edx        # ffffffff80146b44 <_ZN7Drivers3PS28KeyboardL12g_BufferHeadE>
ffffffff80010e66:	8b 05 d4 5c 13 00    	mov    0x135cd4(%rip),%eax        # ffffffff80146b40 <_ZN7Drivers3PS28KeyboardL12g_BufferTailE>
ffffffff80010e6c:	39 c2                	cmp    %eax,%edx
ffffffff80010e6e:	0f 95 c0             	setne  %al
    }
ffffffff80010e71:	c3                   	ret
ffffffff80010e72:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80010e79:	00 00 00 
ffffffff80010e7c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff80010e80 <_ZN7Drivers3PS28Keyboard6GetKeyEv>:

    KeyEvent GetKey() {
ffffffff80010e80:	55                   	push   %rbp
ffffffff80010e81:	48 89 e5             	mov    %rsp,%rbp
ffffffff80010e84:	41 57                	push   %r15
ffffffff80010e86:	41 56                	push   %r14
ffffffff80010e88:	41 55                	push   %r13
ffffffff80010e8a:	41 54                	push   %r12
ffffffff80010e8c:	53                   	push   %rbx
ffffffff80010e8d:	48 83 ec 28          	sub    $0x28,%rsp
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff80010e91:	9c                   	pushf
ffffffff80010e92:	5b                   	pop    %rbx
ffffffff80010e93:	fa                   	cli
            inner.Acquire();
ffffffff80010e94:	48 c7 c7 30 6b 14 80 	mov    $0xffffffff80146b30,%rdi
ffffffff80010e9b:	e8 10 b2 ff ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
        if (g_BufferTail == g_BufferHead) {
ffffffff80010ea0:	8b 15 9a 5c 13 00    	mov    0x135c9a(%rip),%edx        # ffffffff80146b40 <_ZN7Drivers3PS28KeyboardL12g_BufferTailE>
ffffffff80010ea6:	8b 05 98 5c 13 00    	mov    0x135c98(%rip),%eax        # ffffffff80146b44 <_ZN7Drivers3PS28KeyboardL12g_BufferHeadE>
            savedFlags = flags;
ffffffff80010eac:	48 89 1d 85 5c 13 00 	mov    %rbx,0x135c85(%rip)        # ffffffff80146b38 <_ZN7Drivers3PS28KeyboardL12g_BufferLockE+0x8>
ffffffff80010eb3:	39 c2                	cmp    %eax,%edx
ffffffff80010eb5:	0f 84 bd 00 00 00    	je     ffffffff80010f78 <_ZN7Drivers3PS28Keyboard6GetKeyEv+0xf8>
        event = g_KeyBuffer[g_BufferTail];
ffffffff80010ebb:	8b 05 7f 5c 13 00    	mov    0x135c7f(%rip),%eax        # ffffffff80146b40 <_ZN7Drivers3PS28KeyboardL12g_BufferTailE>
ffffffff80010ec1:	48 8d 14 c5 00 00 00 	lea    0x0(,%rax,8),%rdx
ffffffff80010ec8:	00 
ffffffff80010ec9:	48 29 c2             	sub    %rax,%rdx
ffffffff80010ecc:	0f b6 82 66 6b 14 80 	movzbl -0x7feb949a(%rdx),%eax
ffffffff80010ed3:	0f b6 b2 64 6b 14 80 	movzbl -0x7feb949c(%rdx),%esi
ffffffff80010eda:	0f b6 ba 65 6b 14 80 	movzbl -0x7feb949b(%rdx),%edi
ffffffff80010ee1:	44 0f b6 ba 60 6b 14 	movzbl -0x7feb94a0(%rdx),%r15d
ffffffff80010ee8:	80 
ffffffff80010ee9:	88 45 bd             	mov    %al,-0x43(%rbp)
        g_BufferTail = (g_BufferTail + 1) & (KeyBufferSize - 1);
ffffffff80010eec:	8b 05 4e 5c 13 00    	mov    0x135c4e(%rip),%eax        # ffffffff80146b40 <_ZN7Drivers3PS28KeyboardL12g_BufferTailE>
        event = g_KeyBuffer[g_BufferTail];
ffffffff80010ef2:	40 88 75 bf          	mov    %sil,-0x41(%rbp)
ffffffff80010ef6:	44 0f b6 b2 61 6b 14 	movzbl -0x7feb949f(%rdx),%r14d
ffffffff80010efd:	80 
        g_BufferTail = (g_BufferTail + 1) & (KeyBufferSize - 1);
ffffffff80010efe:	83 c0 01             	add    $0x1,%eax
        event = g_KeyBuffer[g_BufferTail];
ffffffff80010f01:	40 88 7d be          	mov    %dil,-0x42(%rbp)
ffffffff80010f05:	44 0f b6 aa 62 6b 14 	movzbl -0x7feb949e(%rdx),%r13d
ffffffff80010f0c:	80 
        g_BufferTail = (g_BufferTail + 1) & (KeyBufferSize - 1);
ffffffff80010f0d:	0f b6 c0             	movzbl %al,%eax
        event = g_KeyBuffer[g_BufferTail];
ffffffff80010f10:	44 0f b6 a2 63 6b 14 	movzbl -0x7feb949d(%rdx),%r12d
ffffffff80010f17:	80 
        g_BufferTail = (g_BufferTail + 1) & (KeyBufferSize - 1);
ffffffff80010f18:	89 05 22 5c 13 00    	mov    %eax,0x135c22(%rip)        # ffffffff80146b40 <_ZN7Drivers3PS28KeyboardL12g_BufferTailE>
            inner.Release();
ffffffff80010f1e:	48 c7 c7 30 6b 14 80 	mov    $0xffffffff80146b30,%rdi
ffffffff80010f25:	e8 a6 b1 ff ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff80010f2a:	53                   	push   %rbx
ffffffff80010f2b:	9d                   	popf
        KeyEvent event = {};
        g_BufferLock.Acquire();
        BufferPop(event);
        g_BufferLock.Release();
        return event;
ffffffff80010f2c:	0f b6 45 bf          	movzbl -0x41(%rbp),%eax
ffffffff80010f30:	44 88 7d c9          	mov    %r15b,-0x37(%rbp)
ffffffff80010f34:	44 88 75 ca          	mov    %r14b,-0x36(%rbp)
ffffffff80010f38:	0f b6 55 bd          	movzbl -0x43(%rbp),%edx
ffffffff80010f3c:	88 45 cd             	mov    %al,-0x33(%rbp)
ffffffff80010f3f:	0f b6 45 be          	movzbl -0x42(%rbp),%eax
ffffffff80010f43:	44 88 6d cb          	mov    %r13b,-0x35(%rbp)
ffffffff80010f47:	48 c1 e2 30          	shl    $0x30,%rdx
ffffffff80010f4b:	88 45 ce             	mov    %al,-0x32(%rbp)
ffffffff80010f4e:	0f b7 4d cd          	movzwl -0x33(%rbp),%ecx
ffffffff80010f52:	44 88 65 cc          	mov    %r12b,-0x34(%rbp)
ffffffff80010f56:	8b 45 c9             	mov    -0x37(%rbp),%eax
    }
ffffffff80010f59:	48 83 c4 28          	add    $0x28,%rsp
        return event;
ffffffff80010f5d:	48 c1 e1 20          	shl    $0x20,%rcx
    }
ffffffff80010f61:	5b                   	pop    %rbx
ffffffff80010f62:	41 5c                	pop    %r12
        return event;
ffffffff80010f64:	48 09 c8             	or     %rcx,%rax
    }
ffffffff80010f67:	41 5d                	pop    %r13
ffffffff80010f69:	41 5e                	pop    %r14
        return event;
ffffffff80010f6b:	48 09 d0             	or     %rdx,%rax
    }
ffffffff80010f6e:	41 5f                	pop    %r15
ffffffff80010f70:	5d                   	pop    %rbp
ffffffff80010f71:	c3                   	ret
ffffffff80010f72:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        KeyEvent event = {};
ffffffff80010f78:	c6 45 bd 00          	movb   $0x0,-0x43(%rbp)
ffffffff80010f7c:	45 31 e4             	xor    %r12d,%r12d
ffffffff80010f7f:	45 31 ed             	xor    %r13d,%r13d
ffffffff80010f82:	45 31 f6             	xor    %r14d,%r14d
ffffffff80010f85:	c6 45 be 00          	movb   $0x0,-0x42(%rbp)
ffffffff80010f89:	45 31 ff             	xor    %r15d,%r15d
ffffffff80010f8c:	c6 45 bf 00          	movb   $0x0,-0x41(%rbp)
ffffffff80010f90:	eb 8c                	jmp    ffffffff80010f1e <_ZN7Drivers3PS28Keyboard6GetKeyEv+0x9e>
ffffffff80010f92:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80010f99:	00 00 00 
ffffffff80010f9c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff80010fa0 <_ZN7Drivers3PS28Keyboard7GetCharEv>:

    char GetChar() {
ffffffff80010fa0:	55                   	push   %rbp
ffffffff80010fa1:	48 89 e5             	mov    %rsp,%rbp
ffffffff80010fa4:	48 83 ec 10          	sub    $0x10,%rsp
ffffffff80010fa8:	eb 07                	jmp    ffffffff80010fb1 <_ZN7Drivers3PS28Keyboard7GetCharEv+0x11>
ffffffff80010faa:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
                if (event.Pressed && event.Ascii != 0) {
                    return event.Ascii;
                }
            }
            // Yield the CPU while waiting
            asm volatile("hlt");
ffffffff80010fb0:	f4                   	hlt
        return g_BufferHead != g_BufferTail;
ffffffff80010fb1:	8b 15 8d 5b 13 00    	mov    0x135b8d(%rip),%edx        # ffffffff80146b44 <_ZN7Drivers3PS28KeyboardL12g_BufferHeadE>
ffffffff80010fb7:	8b 05 83 5b 13 00    	mov    0x135b83(%rip),%eax        # ffffffff80146b40 <_ZN7Drivers3PS28KeyboardL12g_BufferTailE>
            if (IsKeyAvailable()) {
ffffffff80010fbd:	39 c2                	cmp    %eax,%edx
ffffffff80010fbf:	74 ef                	je     ffffffff80010fb0 <_ZN7Drivers3PS28Keyboard7GetCharEv+0x10>
                KeyEvent event = GetKey();
ffffffff80010fc1:	e8 ba fe ff ff       	call   ffffffff80010e80 <_ZN7Drivers3PS28Keyboard6GetKeyEv>
ffffffff80010fc6:	48 89 c6             	mov    %rax,%rsi
ffffffff80010fc9:	48 89 c2             	mov    %rax,%rdx
ffffffff80010fcc:	0f b6 cc             	movzbl %ah,%ecx
ffffffff80010fcf:	88 45 f9             	mov    %al,-0x7(%rbp)
ffffffff80010fd2:	48 c1 ee 18          	shr    $0x18,%rsi
ffffffff80010fd6:	48 c1 ea 10          	shr    $0x10,%rdx
ffffffff80010fda:	88 4d fa             	mov    %cl,-0x6(%rbp)
ffffffff80010fdd:	40 88 75 fc          	mov    %sil,-0x4(%rbp)
ffffffff80010fe1:	48 89 c6             	mov    %rax,%rsi
ffffffff80010fe4:	48 c1 ee 20          	shr    $0x20,%rsi
ffffffff80010fe8:	88 55 fb             	mov    %dl,-0x5(%rbp)
ffffffff80010feb:	40 88 75 fd          	mov    %sil,-0x3(%rbp)
ffffffff80010fef:	48 89 c6             	mov    %rax,%rsi
ffffffff80010ff2:	48 c1 e8 30          	shr    $0x30,%rax
ffffffff80010ff6:	48 c1 ee 28          	shr    $0x28,%rsi
ffffffff80010ffa:	88 45 ff             	mov    %al,-0x1(%rbp)
ffffffff80010ffd:	40 88 75 fe          	mov    %sil,-0x2(%rbp)
                if (event.Pressed && event.Ascii != 0) {
ffffffff80011001:	84 d2                	test   %dl,%dl
ffffffff80011003:	74 ab                	je     ffffffff80010fb0 <_ZN7Drivers3PS28Keyboard7GetCharEv+0x10>
ffffffff80011005:	84 c9                	test   %cl,%cl
ffffffff80011007:	74 a7                	je     ffffffff80010fb0 <_ZN7Drivers3PS28Keyboard7GetCharEv+0x10>
        }
    }
ffffffff80011009:	c9                   	leave
ffffffff8001100a:	89 c8                	mov    %ecx,%eax
ffffffff8001100c:	c3                   	ret
ffffffff8001100d:	0f 1f 00             	nopl   (%rax)

ffffffff80011010 <_ZN7Drivers3PS28Keyboard14InjectKeyEventERKNS1_8KeyEventE>:

    const ModifierState& GetModifiers() {
        return g_Modifiers;
    }

    void InjectKeyEvent(const KeyEvent& event) {
ffffffff80011010:	55                   	push   %rbp
ffffffff80011011:	48 89 e5             	mov    %rsp,%rbp
ffffffff80011014:	41 54                	push   %r12
ffffffff80011016:	53                   	push   %rbx
ffffffff80011017:	48 89 fb             	mov    %rdi,%rbx
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001101a:	9c                   	pushf
ffffffff8001101b:	41 5c                	pop    %r12
ffffffff8001101d:	fa                   	cli
            inner.Acquire();
ffffffff8001101e:	48 c7 c7 30 6b 14 80 	mov    $0xffffffff80146b30,%rdi
ffffffff80011025:	e8 86 b0 ff ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
        uint32_t nextHead = (g_BufferHead + 1) & (KeyBufferSize - 1);
ffffffff8001102a:	8b 05 14 5b 13 00    	mov    0x135b14(%rip),%eax        # ffffffff80146b44 <_ZN7Drivers3PS28KeyboardL12g_BufferHeadE>
        if (nextHead == g_BufferTail) {
ffffffff80011030:	8b 15 0a 5b 13 00    	mov    0x135b0a(%rip),%edx        # ffffffff80146b40 <_ZN7Drivers3PS28KeyboardL12g_BufferTailE>
            savedFlags = flags;
ffffffff80011036:	4c 89 25 fb 5a 13 00 	mov    %r12,0x135afb(%rip)        # ffffffff80146b38 <_ZN7Drivers3PS28KeyboardL12g_BufferLockE+0x8>
        uint32_t nextHead = (g_BufferHead + 1) & (KeyBufferSize - 1);
ffffffff8001103d:	83 c0 01             	add    $0x1,%eax
ffffffff80011040:	0f b6 c0             	movzbl %al,%eax
        if (nextHead == g_BufferTail) {
ffffffff80011043:	39 d0                	cmp    %edx,%eax
ffffffff80011045:	74 28                	je     ffffffff8001106f <_ZN7Drivers3PS28Keyboard14InjectKeyEventERKNS1_8KeyEventE+0x5f>
        g_KeyBuffer[g_BufferHead] = event;
ffffffff80011047:	8b 0d f7 5a 13 00    	mov    0x135af7(%rip),%ecx        # ffffffff80146b44 <_ZN7Drivers3PS28KeyboardL12g_BufferHeadE>
        g_BufferHead = nextHead;
ffffffff8001104d:	89 05 f1 5a 13 00    	mov    %eax,0x135af1(%rip)        # ffffffff80146b44 <_ZN7Drivers3PS28KeyboardL12g_BufferHeadE>
        g_KeyBuffer[g_BufferHead] = event;
ffffffff80011053:	48 8d 14 cd 00 00 00 	lea    0x0(,%rcx,8),%rdx
ffffffff8001105a:	00 
ffffffff8001105b:	48 29 ca             	sub    %rcx,%rdx
ffffffff8001105e:	8b 0b                	mov    (%rbx),%ecx
ffffffff80011060:	89 8a 60 6b 14 80    	mov    %ecx,-0x7feb94a0(%rdx)
ffffffff80011066:	8b 4b 03             	mov    0x3(%rbx),%ecx
ffffffff80011069:	89 8a 63 6b 14 80    	mov    %ecx,-0x7feb949d(%rdx)
            inner.Release();
ffffffff8001106f:	48 c7 c7 30 6b 14 80 	mov    $0xffffffff80146b30,%rdi
ffffffff80011076:	e8 55 b0 ff ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001107b:	41 54                	push   %r12
ffffffff8001107d:	9d                   	popf
        g_BufferLock.Acquire();
        BufferPush(event);
        g_BufferLock.Release();
    }
ffffffff8001107e:	5b                   	pop    %rbx
ffffffff8001107f:	41 5c                	pop    %r12
ffffffff80011081:	5d                   	pop    %rbp
ffffffff80011082:	c3                   	ret
ffffffff80011083:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001108a:	00 00 00 
ffffffff8001108d:	0f 1f 00             	nopl   (%rax)

ffffffff80011090 <_ZN7Drivers3PS25Mouse9HandleIRQEh>:
ffffffff80011090:	e4 60                	in     $0x60,%al
    void HandleIRQ(uint8_t irq) {
        (void)irq;
        uint8_t data = Io::In8(DataPort);

        // Synchronization: byte 0 must always have bit 3 set
        if (g_PacketIndex == 0 && !(data & PacketAlwaysOne)) {
ffffffff80011092:	0f b6 15 c8 61 13 00 	movzbl 0x1361c8(%rip),%edx        # ffffffff80147261 <_ZN7Drivers3PS25MouseL13g_PacketIndexE>
ffffffff80011099:	89 c1                	mov    %eax,%ecx
ffffffff8001109b:	83 e1 08             	and    $0x8,%ecx
ffffffff8001109e:	08 d1                	or     %dl,%cl
ffffffff800110a0:	0f 84 1a 01 00 00    	je     ffffffff800111c0 <_ZN7Drivers3PS25Mouse9HandleIRQEh+0x130>
            // Out of sync, discard and wait for a valid start byte
            return;
        }

        g_PacketBuffer[g_PacketIndex] = data;
ffffffff800110a6:	0f b6 ca             	movzbl %dl,%ecx
        g_PacketIndex++;
ffffffff800110a9:	83 c2 01             	add    $0x1,%edx
        g_PacketBuffer[g_PacketIndex] = data;
ffffffff800110ac:	88 81 62 72 14 80    	mov    %al,-0x7feb8d9e(%rcx)

        if (g_PacketIndex < g_PacketSize) {
ffffffff800110b2:	0f b6 05 4b cf 01 00 	movzbl 0x1cf4b(%rip),%eax        # ffffffff8002e004 <_ZN7Drivers3PS25MouseL12g_PacketSizeE>
        g_PacketIndex++;
ffffffff800110b9:	88 15 a2 61 13 00    	mov    %dl,0x1361a2(%rip)        # ffffffff80147261 <_ZN7Drivers3PS25MouseL13g_PacketIndexE>
        if (g_PacketIndex < g_PacketSize) {
ffffffff800110bf:	38 c2                	cmp    %al,%dl
ffffffff800110c1:	0f 82 f9 00 00 00    	jb     ffffffff800111c0 <_ZN7Drivers3PS25Mouse9HandleIRQEh+0x130>
    void HandleIRQ(uint8_t irq) {
ffffffff800110c7:	55                   	push   %rbp
ffffffff800110c8:	48 89 e5             	mov    %rsp,%rbp
ffffffff800110cb:	41 57                	push   %r15
ffffffff800110cd:	41 56                	push   %r14
ffffffff800110cf:	41 55                	push   %r13
ffffffff800110d1:	41 54                	push   %r12
ffffffff800110d3:	53                   	push   %rbx
ffffffff800110d4:	48 83 ec 08          	sub    $0x8,%rsp
        }

        // Full packet received, process it
        g_PacketIndex = 0;

        uint8_t flags = g_PacketBuffer[0];
ffffffff800110d8:	44 0f b6 2d 82 61 13 	movzbl 0x136182(%rip),%r13d        # ffffffff80147262 <_ZN7Drivers3PS25MouseL14g_PacketBufferE>
ffffffff800110df:	00 
        g_PacketIndex = 0;
ffffffff800110e0:	c6 05 7a 61 13 00 00 	movb   $0x0,0x13617a(%rip)        # ffffffff80147261 <_ZN7Drivers3PS25MouseL13g_PacketIndexE>
        uint8_t buttons = flags & 0x07;

        // Check for overflow -- discard the packet if overflow is set
        if (flags & (PacketXOverflow | PacketYOverflow)) {
ffffffff800110e7:	41 80 fd 3f          	cmp    $0x3f,%r13b
ffffffff800110eb:	0f 87 be 00 00 00    	ja     ffffffff800111af <_ZN7Drivers3PS25Mouse9HandleIRQEh+0x11f>
            return;
        }

        // Reconstruct signed X and Y deltas with sign extension
        int32_t deltaX = (int32_t)g_PacketBuffer[1];
ffffffff800110f1:	0f b6 1d 6b 61 13 00 	movzbl 0x13616b(%rip),%ebx        # ffffffff80147263 <_ZN7Drivers3PS25MouseL14g_PacketBufferE+0x1>
        int32_t deltaY = (int32_t)g_PacketBuffer[2];
ffffffff800110f8:	44 0f b6 35 64 61 13 	movzbl 0x136164(%rip),%r14d        # ffffffff80147264 <_ZN7Drivers3PS25MouseL14g_PacketBufferE+0x2>
ffffffff800110ff:	00 

        if (flags & PacketXSign) {
            deltaX |= (int32_t)0xFFFFFF00;
ffffffff80011100:	89 da                	mov    %ebx,%edx
ffffffff80011102:	81 ca 00 ff ff ff    	or     $0xffffff00,%edx
ffffffff80011108:	41 f6 c5 10          	test   $0x10,%r13b
ffffffff8001110c:	0f 45 da             	cmovne %edx,%ebx
        }
        if (flags & PacketYSign) {
            deltaY |= (int32_t)0xFFFFFF00;
ffffffff8001110f:	44 89 f2             	mov    %r14d,%edx
ffffffff80011112:	81 ca 00 ff ff ff    	or     $0xffffff00,%edx
ffffffff80011118:	41 f6 c5 20          	test   $0x20,%r13b
ffffffff8001111c:	44 0f 45 f2          	cmovne %edx,%r14d
        // PS/2 mouse Y axis is inverted (positive = up)
        deltaY = -deltaY;

        // Scroll wheel delta (4th byte, signed)
        int32_t scrollDelta = 0;
        if (g_HasScrollWheel && g_PacketSize == 4) {
ffffffff80011120:	80 3d 39 61 13 00 00 	cmpb   $0x0,0x136139(%rip)        # ffffffff80147260 <_ZN7Drivers3PS25MouseL16g_HasScrollWheelE>
ffffffff80011127:	74 0c                	je     ffffffff80011135 <_ZN7Drivers3PS25Mouse9HandleIRQEh+0xa5>
            scrollDelta = (int8_t)g_PacketBuffer[3];
ffffffff80011129:	44 0f be 3d 34 61 13 	movsbl 0x136134(%rip),%r15d        # ffffffff80147265 <_ZN7Drivers3PS25MouseL14g_PacketBufferE+0x3>
ffffffff80011130:	00 
        if (g_HasScrollWheel && g_PacketSize == 4) {
ffffffff80011131:	3c 04                	cmp    $0x4,%al
ffffffff80011133:	74 03                	je     ffffffff80011138 <_ZN7Drivers3PS25Mouse9HandleIRQEh+0xa8>
        int32_t scrollDelta = 0;
ffffffff80011135:	45 31 ff             	xor    %r15d,%r15d
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff80011138:	9c                   	pushf
ffffffff80011139:	41 5c                	pop    %r12
ffffffff8001113b:	fa                   	cli
            inner.Acquire();
ffffffff8001113c:	48 c7 c7 70 72 14 80 	mov    $0xffffffff80147270,%rdi
        uint8_t buttons = flags & 0x07;
ffffffff80011143:	41 83 e5 07          	and    $0x7,%r13d
ffffffff80011147:	e8 64 af ff ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
            savedFlags = flags;
ffffffff8001114c:	8b 05 32 61 13 00    	mov    0x136132(%rip),%eax        # ffffffff80147284 <_ZN7Drivers3PS25MouseL7g_StateE+0x4>
        }

        g_StateLock.Acquire();

        g_State.X += deltaX;
ffffffff80011152:	03 1d 28 61 13 00    	add    0x136128(%rip),%ebx        # ffffffff80147280 <_ZN7Drivers3PS25MouseL7g_StateE>
        g_State.ScrollDelta += scrollDelta;

        // Clamp to screen bounds
        if (g_State.X < 0) g_State.X = 0;
        if (g_State.Y < 0) g_State.Y = 0;
        if (g_State.X > g_MaxX) g_State.X = g_MaxX;
ffffffff80011158:	31 d2                	xor    %edx,%edx
        g_State.ScrollDelta += scrollDelta;
ffffffff8001115a:	44 01 3d 27 61 13 00 	add    %r15d,0x136127(%rip)        # ffffffff80147288 <_ZN7Drivers3PS25MouseL7g_StateE+0x8>
            inner.Release();
ffffffff80011161:	48 c7 c7 70 72 14 80 	mov    $0xffffffff80147270,%rdi
ffffffff80011168:	44 29 f0             	sub    %r14d,%eax
        if (g_State.X > g_MaxX) g_State.X = g_MaxX;
ffffffff8001116b:	85 db                	test   %ebx,%ebx
            savedFlags = flags;
ffffffff8001116d:	4c 89 25 04 61 13 00 	mov    %r12,0x136104(%rip)        # ffffffff80147278 <_ZN7Drivers3PS25MouseL11g_StateLockE+0x8>
ffffffff80011174:	0f 48 da             	cmovs  %edx,%ebx
ffffffff80011177:	8b 15 8f ce 01 00    	mov    0x1ce8f(%rip),%edx        # ffffffff8002e00c <_ZN7Drivers3PS25MouseL6g_MaxXE>
        uint8_t buttons = flags & 0x07;
ffffffff8001117d:	44 88 2d 08 61 13 00 	mov    %r13b,0x136108(%rip)        # ffffffff8014728c <_ZN7Drivers3PS25MouseL7g_StateE+0xc>
        if (g_State.X > g_MaxX) g_State.X = g_MaxX;
ffffffff80011184:	39 d3                	cmp    %edx,%ebx
ffffffff80011186:	0f 4f da             	cmovg  %edx,%ebx
        if (g_State.Y > g_MaxY) g_State.Y = g_MaxY;
ffffffff80011189:	31 d2                	xor    %edx,%edx
ffffffff8001118b:	85 c0                	test   %eax,%eax
ffffffff8001118d:	0f 48 c2             	cmovs  %edx,%eax
ffffffff80011190:	8b 15 72 ce 01 00    	mov    0x1ce72(%rip),%edx        # ffffffff8002e008 <_ZN7Drivers3PS25MouseL6g_MaxYE>
ffffffff80011196:	89 1d e4 60 13 00    	mov    %ebx,0x1360e4(%rip)        # ffffffff80147280 <_ZN7Drivers3PS25MouseL7g_StateE>
ffffffff8001119c:	39 d0                	cmp    %edx,%eax
ffffffff8001119e:	0f 4f c2             	cmovg  %edx,%eax
ffffffff800111a1:	89 05 dd 60 13 00    	mov    %eax,0x1360dd(%rip)        # ffffffff80147284 <_ZN7Drivers3PS25MouseL7g_StateE+0x4>
            inner.Release();
ffffffff800111a7:	e8 24 af ff ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff800111ac:	41 54                	push   %r12
ffffffff800111ae:	9d                   	popf

        g_StateLock.Release();
    }
ffffffff800111af:	48 83 c4 08          	add    $0x8,%rsp
ffffffff800111b3:	5b                   	pop    %rbx
ffffffff800111b4:	41 5c                	pop    %r12
ffffffff800111b6:	41 5d                	pop    %r13
ffffffff800111b8:	41 5e                	pop    %r14
ffffffff800111ba:	41 5f                	pop    %r15
ffffffff800111bc:	5d                   	pop    %rbp
ffffffff800111bd:	c3                   	ret
ffffffff800111be:	66 90                	xchg   %ax,%ax
ffffffff800111c0:	c3                   	ret
ffffffff800111c1:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800111c8:	00 00 00 
ffffffff800111cb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff800111d0 <_ZN7Drivers3PS25Mouse10InitializeEv>:
    void Initialize() {
ffffffff800111d0:	55                   	push   %rbp
            Print(string);
ffffffff800111d1:	48 c7 c7 ce b0 02 80 	mov    $0xffffffff8002b0ce,%rdi
ffffffff800111d8:	48 89 e5             	mov    %rsp,%rbp
ffffffff800111db:	53                   	push   %rbx
ffffffff800111dc:	48 83 ec 08          	sub    $0x8,%rsp
            g_kernelLogDepth++;
ffffffff800111e0:	83 05 bd e2 1c 00 01 	addl   $0x1,0x1ce2bd(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800111e7:	e8 d4 1f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800111ec:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800111f3:	e8 c8 1f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800111f8:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800111ff:	e8 bc 1f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011204:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8001120b:	e8 b0 1f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011210:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80011217:	e8 a4 1f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001121c:	48 c7 c7 d8 b0 02 80 	mov    $0xffffffff8002b0d8,%rdi
ffffffff80011223:	e8 98 1f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011228:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001122f:	e8 8c 1f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80011234:	83 2d 69 e2 1c 00 01 	subl   $0x1,0x1ce269(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        if (!Drivers::PS2::IsDualChannel()) {
ffffffff8001123b:	e8 80 05 00 00       	call   ffffffff800117c0 <_ZN7Drivers3PS213IsDualChannelEv>
ffffffff80011240:	84 c0                	test   %al,%al
ffffffff80011242:	0f 84 28 03 00 00    	je     ffffffff80011570 <_ZN7Drivers3PS25Mouse10InitializeEv+0x3a0>
        Drivers::PS2::SendToPort2(command);
ffffffff80011248:	bf f6 00 00 00       	mov    $0xf6,%edi
ffffffff8001124d:	e8 1e 05 00 00       	call   ffffffff80011770 <_ZN7Drivers3PS211SendToPort2Eh>
        return Drivers::PS2::ReadData();
ffffffff80011252:	e8 e9 04 00 00       	call   ffffffff80011740 <_ZN7Drivers3PS28ReadDataEv>
ffffffff80011257:	89 c3                	mov    %eax,%ebx
        if (ack != CmdAck) {
ffffffff80011259:	3c fa                	cmp    $0xfa,%al
ffffffff8001125b:	0f 85 8f 02 00 00    	jne    ffffffff800114f0 <_ZN7Drivers3PS25Mouse10InitializeEv+0x320>
        Drivers::PS2::SendToPort2(command);
ffffffff80011261:	bf f3 00 00 00       	mov    $0xf3,%edi
ffffffff80011266:	e8 05 05 00 00       	call   ffffffff80011770 <_ZN7Drivers3PS211SendToPort2Eh>
        return Drivers::PS2::ReadData();
ffffffff8001126b:	e8 d0 04 00 00       	call   ffffffff80011740 <_ZN7Drivers3PS28ReadDataEv>
        Drivers::PS2::SendToPort2(command);
ffffffff80011270:	bf c8 00 00 00       	mov    $0xc8,%edi
ffffffff80011275:	e8 f6 04 00 00       	call   ffffffff80011770 <_ZN7Drivers3PS211SendToPort2Eh>
        return Drivers::PS2::ReadData();
ffffffff8001127a:	e8 c1 04 00 00       	call   ffffffff80011740 <_ZN7Drivers3PS28ReadDataEv>
        Drivers::PS2::SendToPort2(command);
ffffffff8001127f:	bf f3 00 00 00       	mov    $0xf3,%edi
ffffffff80011284:	e8 e7 04 00 00       	call   ffffffff80011770 <_ZN7Drivers3PS211SendToPort2Eh>
        return Drivers::PS2::ReadData();
ffffffff80011289:	e8 b2 04 00 00       	call   ffffffff80011740 <_ZN7Drivers3PS28ReadDataEv>
        Drivers::PS2::SendToPort2(command);
ffffffff8001128e:	bf 64 00 00 00       	mov    $0x64,%edi
ffffffff80011293:	e8 d8 04 00 00       	call   ffffffff80011770 <_ZN7Drivers3PS211SendToPort2Eh>
        return Drivers::PS2::ReadData();
ffffffff80011298:	e8 a3 04 00 00       	call   ffffffff80011740 <_ZN7Drivers3PS28ReadDataEv>
        Drivers::PS2::SendToPort2(command);
ffffffff8001129d:	bf f3 00 00 00       	mov    $0xf3,%edi
ffffffff800112a2:	e8 c9 04 00 00       	call   ffffffff80011770 <_ZN7Drivers3PS211SendToPort2Eh>
        return Drivers::PS2::ReadData();
ffffffff800112a7:	e8 94 04 00 00       	call   ffffffff80011740 <_ZN7Drivers3PS28ReadDataEv>
        Drivers::PS2::SendToPort2(command);
ffffffff800112ac:	bf 50 00 00 00       	mov    $0x50,%edi
ffffffff800112b1:	e8 ba 04 00 00       	call   ffffffff80011770 <_ZN7Drivers3PS211SendToPort2Eh>
        return Drivers::PS2::ReadData();
ffffffff800112b6:	e8 85 04 00 00       	call   ffffffff80011740 <_ZN7Drivers3PS28ReadDataEv>
        Drivers::PS2::SendToPort2(command);
ffffffff800112bb:	bf f2 00 00 00       	mov    $0xf2,%edi
ffffffff800112c0:	e8 ab 04 00 00       	call   ffffffff80011770 <_ZN7Drivers3PS211SendToPort2Eh>
        return Drivers::PS2::ReadData();
ffffffff800112c5:	e8 76 04 00 00       	call   ffffffff80011740 <_ZN7Drivers3PS28ReadDataEv>
        uint8_t deviceId = Drivers::PS2::ReadData();
ffffffff800112ca:	e8 71 04 00 00       	call   ffffffff80011740 <_ZN7Drivers3PS28ReadDataEv>
            g_kernelLogDepth++;
ffffffff800112cf:	8b 0d cf e1 1c 00    	mov    0x1ce1cf(%rip),%ecx        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        return (deviceId == 3);
ffffffff800112d5:	3c 03                	cmp    $0x3,%al
        g_HasScrollWheel = DetectScrollWheel();
ffffffff800112d7:	0f 94 05 82 5f 13 00 	sete   0x135f82(%rip)        # ffffffff80147260 <_ZN7Drivers3PS25MouseL16g_HasScrollWheelE>
ffffffff800112de:	8d 51 01             	lea    0x1(%rcx),%edx
        if (g_HasScrollWheel) {
ffffffff800112e1:	0f 84 b1 01 00 00    	je     ffffffff80011498 <_ZN7Drivers3PS25Mouse10InitializeEv+0x2c8>
            Print(string);
ffffffff800112e7:	48 c7 c7 ce b0 02 80 	mov    $0xffffffff8002b0ce,%rdi
            g_kernelLogDepth++;
ffffffff800112ee:	89 15 b0 e1 1c 00    	mov    %edx,0x1ce1b0(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            g_PacketSize = 3;
ffffffff800112f4:	c6 05 09 cd 01 00 03 	movb   $0x3,0x1cd09(%rip)        # ffffffff8002e004 <_ZN7Drivers3PS25MouseL12g_PacketSizeE>
            Print(string);
ffffffff800112fb:	e8 c0 1e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011300:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80011307:	e8 b4 1e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001130c:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80011313:	e8 a8 1e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011318:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8001131f:	e8 9c 1e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011324:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001132b:	e8 90 1e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011330:	48 c7 c7 38 c9 02 80 	mov    $0xffffffff8002c938,%rdi
ffffffff80011337:	e8 84 1e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001133c:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80011343:	e8 78 1e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80011348:	8b 05 56 e1 1c 00    	mov    0x1ce156(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        Drivers::PS2::SendToPort2(command);
ffffffff8001134e:	bf f4 00 00 00       	mov    $0xf4,%edi
ffffffff80011353:	83 e8 01             	sub    $0x1,%eax
ffffffff80011356:	89 05 48 e1 1c 00    	mov    %eax,0x1ce148(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001135c:	e8 0f 04 00 00       	call   ffffffff80011770 <_ZN7Drivers3PS211SendToPort2Eh>
        return Drivers::PS2::ReadData();
ffffffff80011361:	e8 da 03 00 00       	call   ffffffff80011740 <_ZN7Drivers3PS28ReadDataEv>
ffffffff80011366:	89 c3                	mov    %eax,%ebx
        if (ack != CmdAck) {
ffffffff80011368:	3c fa                	cmp    $0xfa,%al
ffffffff8001136a:	74 77                	je     ffffffff800113e3 <_ZN7Drivers3PS25Mouse10InitializeEv+0x213>
            Print(string);
ffffffff8001136c:	48 c7 c7 ce b0 02 80 	mov    $0xffffffff8002b0ce,%rdi
            g_kernelLogDepth++;
ffffffff80011373:	83 05 2a e1 1c 00 01 	addl   $0x1,0x1ce12a(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001137a:	e8 41 1e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001137f:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80011386:	e8 35 1e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001138b:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80011392:	e8 29 1e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011397:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8001139e:	e8 1d 1e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800113a3:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800113aa:	e8 11 1e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800113af:	48 c7 c7 58 c9 02 80 	mov    $0xffffffff8002c958,%rdi
ffffffff800113b6:	e8 05 1e 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800113bb:	be 10 00 00 00       	mov    $0x10,%esi
            Kt::KernelLogStream(Kt::WARNING, "PS2/Mouse") << "Enable reporting: unexpected response: " << base::hex << (uint64_t)ack;
ffffffff800113c0:	0f b6 fb             	movzbl %bl,%edi
ffffffff800113c3:	e8 c8 90 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800113c8:	48 89 c7             	mov    %rax,%rdi
ffffffff800113cb:	e8 f0 1d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800113d0:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800113d7:	e8 e4 1d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff800113dc:	83 2d c1 e0 1c 00 01 	subl   $0x1,0x1ce0c1(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        Hal::RegisterIrqHandler(Hal::IRQ_MOUSE, HandleIRQ);
ffffffff800113e3:	48 c7 c6 90 10 01 80 	mov    $0xffffffff80011090,%rsi
ffffffff800113ea:	bf 0c 00 00 00       	mov    $0xc,%edi
        g_State = {};
ffffffff800113ef:	48 c7 05 86 5e 13 00 	movq   $0x0,0x135e86(%rip)        # ffffffff80147280 <_ZN7Drivers3PS25MouseL7g_StateE>
ffffffff800113f6:	00 00 00 00 
ffffffff800113fa:	48 c7 05 83 5e 13 00 	movq   $0x0,0x135e83(%rip)        # ffffffff80147288 <_ZN7Drivers3PS25MouseL7g_StateE+0x8>
ffffffff80011401:	00 00 00 00 
        g_PacketIndex = 0;
ffffffff80011405:	c6 05 55 5e 13 00 00 	movb   $0x0,0x135e55(%rip)        # ffffffff80147261 <_ZN7Drivers3PS25MouseL13g_PacketIndexE>
        Hal::RegisterIrqHandler(Hal::IRQ_MOUSE, HandleIRQ);
ffffffff8001140c:	e8 6f 72 00 00       	call   ffffffff80018680 <_ZN3Hal18RegisterIrqHandlerEhPFvhE>
        Hal::IoApic::UnmaskIrq(Hal::IoApic::GetGsiForIrq(Hal::IRQ_MOUSE));
ffffffff80011411:	bf 0c 00 00 00       	mov    $0xc,%edi
ffffffff80011416:	e8 f5 74 00 00       	call   ffffffff80018910 <_ZN3Hal6IoApic12GetGsiForIrqEh>
ffffffff8001141b:	0f b6 f8             	movzbl %al,%edi
ffffffff8001141e:	e8 ad 74 00 00       	call   ffffffff800188d0 <_ZN3Hal6IoApic9UnmaskIrqEh>
            Print(string);
ffffffff80011423:	48 c7 c7 ce b0 02 80 	mov    $0xffffffff8002b0ce,%rdi
            g_kernelLogDepth++;
ffffffff8001142a:	83 05 73 e0 1c 00 01 	addl   $0x1,0x1ce073(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80011431:	e8 8a 1d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011436:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001143d:	e8 7e 1d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011442:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80011449:	e8 72 1d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001144e:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80011455:	e8 66 1d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001145a:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80011461:	e8 5a 1d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011466:	48 c7 c7 08 b1 02 80 	mov    $0xffffffff8002b108,%rdi
ffffffff8001146d:	e8 4e 1d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011472:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80011479:	e8 42 1d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001147e:	8b 05 20 e0 1c 00    	mov    0x1ce020(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff80011484:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff80011488:	83 e8 01             	sub    $0x1,%eax
ffffffff8001148b:	89 05 13 e0 1c 00    	mov    %eax,0x1ce013(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80011491:	c9                   	leave
ffffffff80011492:	c3                   	ret
ffffffff80011493:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            Print(string);
ffffffff80011498:	48 c7 c7 ce b0 02 80 	mov    $0xffffffff8002b0ce,%rdi
            g_kernelLogDepth++;
ffffffff8001149f:	89 15 ff df 1c 00    	mov    %edx,0x1cdfff(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            g_PacketSize = 4;
ffffffff800114a5:	c6 05 58 cb 01 00 04 	movb   $0x4,0x1cb58(%rip)        # ffffffff8002e004 <_ZN7Drivers3PS25MouseL12g_PacketSizeE>
            Print(string);
ffffffff800114ac:	e8 0f 1d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800114b1:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800114b8:	e8 03 1d 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800114bd:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800114c4:	e8 f7 1c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800114c9:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff800114d0:	e8 eb 1c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800114d5:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800114dc:	e8 df 1c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800114e1:	48 c7 c7 f2 b0 02 80 	mov    $0xffffffff8002b0f2,%rdi
ffffffff800114e8:	e9 4a fe ff ff       	jmp    ffffffff80011337 <_ZN7Drivers3PS25Mouse10InitializeEv+0x167>
ffffffff800114ed:	0f 1f 00             	nopl   (%rax)
ffffffff800114f0:	48 c7 c7 ce b0 02 80 	mov    $0xffffffff8002b0ce,%rdi
            g_kernelLogDepth++;
ffffffff800114f7:	83 05 a6 df 1c 00 01 	addl   $0x1,0x1cdfa6(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800114fe:	e8 bd 1c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011503:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001150a:	e8 b1 1c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001150f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80011516:	e8 a5 1c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001151b:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff80011522:	e8 99 1c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011527:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001152e:	e8 8d 1c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011533:	48 c7 c7 10 c9 02 80 	mov    $0xffffffff8002c910,%rdi
ffffffff8001153a:	e8 81 1c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001153f:	be 10 00 00 00       	mov    $0x10,%esi
            Kt::KernelLogStream(Kt::WARNING, "PS2/Mouse") << "Set defaults: unexpected response: " << base::hex << (uint64_t)ack;
ffffffff80011544:	0f b6 fb             	movzbl %bl,%edi
ffffffff80011547:	e8 44 8f 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001154c:	48 89 c7             	mov    %rax,%rdi
ffffffff8001154f:	e8 6c 1c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80011554:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001155b:	e8 60 1c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80011560:	83 2d 3d df 1c 00 01 	subl   $0x1,0x1cdf3d(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80011567:	e9 f5 fc ff ff       	jmp    ffffffff80011261 <_ZN7Drivers3PS25Mouse10InitializeEv+0x91>
ffffffff8001156c:	0f 1f 40 00          	nopl   0x0(%rax)
            Print(string);
ffffffff80011570:	48 c7 c7 ce b0 02 80 	mov    $0xffffffff8002b0ce,%rdi
            g_kernelLogDepth++;
ffffffff80011577:	83 05 26 df 1c 00 01 	addl   $0x1,0x1cdf26(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001157e:	e8 3d 1c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011583:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001158a:	e8 31 1c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001158f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80011596:	e8 25 1c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001159b:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff800115a2:	e8 19 1c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800115a7:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800115ae:	e8 0d 1c 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800115b3:	48 c7 c7 d8 c8 02 80 	mov    $0xffffffff8002c8d8,%rdi
ffffffff800115ba:	e9 ae fe ff ff       	jmp    ffffffff8001146d <_ZN7Drivers3PS25Mouse10InitializeEv+0x29d>
ffffffff800115bf:	90                   	nop

ffffffff800115c0 <_ZN7Drivers3PS25Mouse13GetMouseStateEv>:

    MouseState GetMouseState() {
ffffffff800115c0:	55                   	push   %rbp
ffffffff800115c1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800115c4:	41 56                	push   %r14
ffffffff800115c6:	41 55                	push   %r13
ffffffff800115c8:	41 54                	push   %r12
ffffffff800115ca:	53                   	push   %rbx
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff800115cb:	9c                   	pushf
ffffffff800115cc:	41 5d                	pop    %r13
ffffffff800115ce:	fa                   	cli
            inner.Acquire();
ffffffff800115cf:	48 c7 c7 70 72 14 80 	mov    $0xffffffff80147270,%rdi
ffffffff800115d6:	e8 d5 aa ff ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
            inner.Release();
ffffffff800115db:	48 c7 c7 70 72 14 80 	mov    $0xffffffff80147270,%rdi
        g_StateLock.Acquire();
        MouseState state = g_State;
ffffffff800115e2:	44 8b 25 9f 5c 13 00 	mov    0x135c9f(%rip),%r12d        # ffffffff80147288 <_ZN7Drivers3PS25MouseL7g_StateE+0x8>
            savedFlags = flags;
ffffffff800115e9:	4c 89 2d 88 5c 13 00 	mov    %r13,0x135c88(%rip)        # ffffffff80147278 <_ZN7Drivers3PS25MouseL11g_StateLockE+0x8>
ffffffff800115f0:	0f b6 1d 95 5c 13 00 	movzbl 0x135c95(%rip),%ebx        # ffffffff8014728c <_ZN7Drivers3PS25MouseL7g_StateE+0xc>
ffffffff800115f7:	4c 8b 35 82 5c 13 00 	mov    0x135c82(%rip),%r14        # ffffffff80147280 <_ZN7Drivers3PS25MouseL7g_StateE>
        g_State.ScrollDelta = 0;  // clear after read so deltas don't repeat
ffffffff800115fe:	c7 05 80 5c 13 00 00 	movl   $0x0,0x135c80(%rip)        # ffffffff80147288 <_ZN7Drivers3PS25MouseL7g_StateE+0x8>
ffffffff80011605:	00 00 00 
            inner.Release();
ffffffff80011608:	e8 c3 aa ff ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001160d:	41 55                	push   %r13
ffffffff8001160f:	9d                   	popf
        g_StateLock.Release();
        return state;
ffffffff80011610:	48 be 00 00 00 00 ff 	movabs $0xffffffff00000000,%rsi
ffffffff80011617:	ff ff ff 
ffffffff8001161a:	31 c9                	xor    %ecx,%ecx
ffffffff8001161c:	48 c1 e3 20          	shl    $0x20,%rbx
ffffffff80011620:	4c 89 f0             	mov    %r14,%rax
ffffffff80011623:	48 21 f1             	and    %rsi,%rcx
ffffffff80011626:	48 be ff ff ff ff 00 	movabs $0xffffff00ffffffff,%rsi
ffffffff8001162d:	ff ff ff 
ffffffff80011630:	4c 09 e1             	or     %r12,%rcx
ffffffff80011633:	48 21 f1             	and    %rsi,%rcx
ffffffff80011636:	48 09 d9             	or     %rbx,%rcx
    }
ffffffff80011639:	5b                   	pop    %rbx
ffffffff8001163a:	41 5c                	pop    %r12
        return state;
ffffffff8001163c:	48 89 ca             	mov    %rcx,%rdx
    }
ffffffff8001163f:	41 5d                	pop    %r13
ffffffff80011641:	41 5e                	pop    %r14
ffffffff80011643:	5d                   	pop    %rbp
ffffffff80011644:	c3                   	ret
ffffffff80011645:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001164c:	00 00 00 
ffffffff8001164f:	90                   	nop

ffffffff80011650 <_ZN7Drivers3PS25Mouse9SetBoundsEii>:
    uint8_t GetButtons() {
        return g_State.Buttons;
    }

    void SetBounds(int32_t maxX, int32_t maxY) {
        g_MaxX = maxX;
ffffffff80011650:	89 3d b6 c9 01 00    	mov    %edi,0x1c9b6(%rip)        # ffffffff8002e00c <_ZN7Drivers3PS25MouseL6g_MaxXE>
        g_MaxY = maxY;
ffffffff80011656:	89 35 ac c9 01 00    	mov    %esi,0x1c9ac(%rip)        # ffffffff8002e008 <_ZN7Drivers3PS25MouseL6g_MaxYE>
    }
ffffffff8001165c:	c3                   	ret
ffffffff8001165d:	0f 1f 00             	nopl   (%rax)

ffffffff80011660 <_ZN7Drivers3PS25Mouse17InjectMouseReportEhaaa>:

    void InjectMouseReport(uint8_t buttons, int8_t deltaX, int8_t deltaY, int8_t scroll) {
ffffffff80011660:	55                   	push   %rbp
ffffffff80011661:	48 89 e5             	mov    %rsp,%rbp
ffffffff80011664:	41 57                	push   %r15
ffffffff80011666:	41 89 ff             	mov    %edi,%r15d
ffffffff80011669:	41 56                	push   %r14
ffffffff8001166b:	41 89 f6             	mov    %esi,%r14d
ffffffff8001166e:	41 55                	push   %r13
ffffffff80011670:	41 89 cd             	mov    %ecx,%r13d
ffffffff80011673:	41 54                	push   %r12
ffffffff80011675:	53                   	push   %rbx
ffffffff80011676:	89 d3                	mov    %edx,%ebx
ffffffff80011678:	48 83 ec 08          	sub    $0x8,%rsp
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001167c:	9c                   	pushf
ffffffff8001167d:	41 5c                	pop    %r12
ffffffff8001167f:	fa                   	cli
            inner.Acquire();
ffffffff80011680:	48 c7 c7 70 72 14 80 	mov    $0xffffffff80147270,%rdi
        g_StateLock.Acquire();

        g_State.X += (int32_t)deltaX;
        g_State.Y += (int32_t)deltaY;
        g_State.Buttons = buttons;
        g_State.ScrollDelta += (int32_t)scroll;
ffffffff80011687:	45 0f be ed          	movsbl %r13b,%r13d
ffffffff8001168b:	e8 20 aa ff ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
        g_State.X += (int32_t)deltaX;
ffffffff80011690:	41 0f be d6          	movsbl %r14b,%edx

        // Clamp to screen bounds
        if (g_State.X < 0) g_State.X = 0;
        if (g_State.Y < 0) g_State.Y = 0;
        if (g_State.X > g_MaxX) g_State.X = g_MaxX;
ffffffff80011694:	31 c9                	xor    %ecx,%ecx
        g_State.Y += (int32_t)deltaY;
ffffffff80011696:	0f be c3             	movsbl %bl,%eax
        g_State.X += (int32_t)deltaX;
ffffffff80011699:	03 15 e1 5b 13 00    	add    0x135be1(%rip),%edx        # ffffffff80147280 <_ZN7Drivers3PS25MouseL7g_StateE>
        g_State.Y += (int32_t)deltaY;
ffffffff8001169f:	03 05 df 5b 13 00    	add    0x135bdf(%rip),%eax        # ffffffff80147284 <_ZN7Drivers3PS25MouseL7g_StateE+0x4>
            inner.Release();
ffffffff800116a5:	48 c7 c7 70 72 14 80 	mov    $0xffffffff80147270,%rdi
            savedFlags = flags;
ffffffff800116ac:	4c 89 25 c5 5b 13 00 	mov    %r12,0x135bc5(%rip)        # ffffffff80147278 <_ZN7Drivers3PS25MouseL11g_StateLockE+0x8>
        g_State.ScrollDelta += (int32_t)scroll;
ffffffff800116b3:	44 01 2d ce 5b 13 00 	add    %r13d,0x135bce(%rip)        # ffffffff80147288 <_ZN7Drivers3PS25MouseL7g_StateE+0x8>
        if (g_State.X > g_MaxX) g_State.X = g_MaxX;
ffffffff800116ba:	85 d2                	test   %edx,%edx
ffffffff800116bc:	0f 48 d1             	cmovs  %ecx,%edx
ffffffff800116bf:	8b 0d 47 c9 01 00    	mov    0x1c947(%rip),%ecx        # ffffffff8002e00c <_ZN7Drivers3PS25MouseL6g_MaxXE>
        g_State.Buttons = buttons;
ffffffff800116c5:	44 88 3d c0 5b 13 00 	mov    %r15b,0x135bc0(%rip)        # ffffffff8014728c <_ZN7Drivers3PS25MouseL7g_StateE+0xc>
        if (g_State.X > g_MaxX) g_State.X = g_MaxX;
ffffffff800116cc:	39 ca                	cmp    %ecx,%edx
ffffffff800116ce:	0f 4f d1             	cmovg  %ecx,%edx
ffffffff800116d1:	89 15 a9 5b 13 00    	mov    %edx,0x135ba9(%rip)        # ffffffff80147280 <_ZN7Drivers3PS25MouseL7g_StateE>
        if (g_State.Y > g_MaxY) g_State.Y = g_MaxY;
ffffffff800116d7:	31 d2                	xor    %edx,%edx
ffffffff800116d9:	85 c0                	test   %eax,%eax
ffffffff800116db:	0f 48 c2             	cmovs  %edx,%eax
ffffffff800116de:	8b 15 24 c9 01 00    	mov    0x1c924(%rip),%edx        # ffffffff8002e008 <_ZN7Drivers3PS25MouseL6g_MaxYE>
ffffffff800116e4:	39 d0                	cmp    %edx,%eax
ffffffff800116e6:	0f 4f c2             	cmovg  %edx,%eax
ffffffff800116e9:	89 05 95 5b 13 00    	mov    %eax,0x135b95(%rip)        # ffffffff80147284 <_ZN7Drivers3PS25MouseL7g_StateE+0x4>
            inner.Release();
ffffffff800116ef:	e8 dc a9 ff ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff800116f4:	41 54                	push   %r12
ffffffff800116f6:	9d                   	popf

        g_StateLock.Release();
    }
ffffffff800116f7:	48 83 c4 08          	add    $0x8,%rsp
ffffffff800116fb:	5b                   	pop    %rbx
ffffffff800116fc:	41 5c                	pop    %r12
ffffffff800116fe:	41 5d                	pop    %r13
ffffffff80011700:	41 5e                	pop    %r14
ffffffff80011702:	41 5f                	pop    %r15
ffffffff80011704:	5d                   	pop    %rbp
ffffffff80011705:	c3                   	ret
ffffffff80011706:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001170d:	00 00 00 

ffffffff80011710 <_ZN7Drivers3PS28SendDataEh>:
ffffffff80011710:	e4 64                	in     $0x64,%al
    static bool g_DualChannel = false;

    void WaitForInput() {
        // Wait until the input buffer is empty (bit 1 clear)
        int timeout = 100000;
        while ((Io::In8(StatusPort) & StatusInputFull) && --timeout) {
ffffffff80011712:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011717:	31 c9                	xor    %ecx,%ecx
ffffffff80011719:	a8 02                	test   $0x2,%al
ffffffff8001171b:	75 08                	jne    ffffffff80011725 <_ZN7Drivers3PS28SendDataEh+0x15>
ffffffff8001171d:	eb 10                	jmp    ffffffff8001172f <_ZN7Drivers3PS28SendDataEh+0x1f>
ffffffff8001171f:	90                   	nop
ffffffff80011720:	83 ea 01             	sub    $0x1,%edx
ffffffff80011723:	74 0a                	je     ffffffff8001172f <_ZN7Drivers3PS28SendDataEh+0x1f>
ffffffff80011725:	89 c8                	mov    %ecx,%eax
ffffffff80011727:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011729:	e4 64                	in     $0x64,%al
ffffffff8001172b:	a8 02                	test   $0x2,%al
ffffffff8001172d:	75 f1                	jne    ffffffff80011720 <_ZN7Drivers3PS28SendDataEh+0x10>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff8001172f:	89 f8                	mov    %edi,%eax
ffffffff80011731:	e6 60                	out    %al,$0x60
    }

    void SendData(uint8_t data) {
        WaitForInput();
        Io::Out8(data, DataPort);
    }
ffffffff80011733:	c3                   	ret
ffffffff80011734:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001173b:	00 00 00 
ffffffff8001173e:	66 90                	xchg   %ax,%ax

ffffffff80011740 <_ZN7Drivers3PS28ReadDataEv>:
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011740:	e4 64                	in     $0x64,%al
        while (!(Io::In8(StatusPort) & StatusOutputFull) && --timeout) {
ffffffff80011742:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011747:	31 c9                	xor    %ecx,%ecx
ffffffff80011749:	a8 01                	test   $0x1,%al
ffffffff8001174b:	74 08                	je     ffffffff80011755 <_ZN7Drivers3PS28ReadDataEv+0x15>
ffffffff8001174d:	eb 10                	jmp    ffffffff8001175f <_ZN7Drivers3PS28ReadDataEv+0x1f>
ffffffff8001174f:	90                   	nop
ffffffff80011750:	83 ea 01             	sub    $0x1,%edx
ffffffff80011753:	74 0a                	je     ffffffff8001175f <_ZN7Drivers3PS28ReadDataEv+0x1f>
ffffffff80011755:	89 c8                	mov    %ecx,%eax
ffffffff80011757:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011759:	e4 64                	in     $0x64,%al
ffffffff8001175b:	a8 01                	test   $0x1,%al
ffffffff8001175d:	74 f1                	je     ffffffff80011750 <_ZN7Drivers3PS28ReadDataEv+0x10>
ffffffff8001175f:	e4 60                	in     $0x60,%al

    uint8_t ReadData() {
        WaitForOutput();
        return Io::In8(DataPort);
    }
ffffffff80011761:	c3                   	ret
ffffffff80011762:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80011769:	00 00 00 
ffffffff8001176c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff80011770 <_ZN7Drivers3PS211SendToPort2Eh>:
ffffffff80011770:	e4 64                	in     $0x64,%al
        while ((Io::In8(StatusPort) & StatusInputFull) && --timeout) {
ffffffff80011772:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011777:	31 c9                	xor    %ecx,%ecx
ffffffff80011779:	a8 02                	test   $0x2,%al
ffffffff8001177b:	75 08                	jne    ffffffff80011785 <_ZN7Drivers3PS211SendToPort2Eh+0x15>
ffffffff8001177d:	eb 10                	jmp    ffffffff8001178f <_ZN7Drivers3PS211SendToPort2Eh+0x1f>
ffffffff8001177f:	90                   	nop
ffffffff80011780:	83 ea 01             	sub    $0x1,%edx
ffffffff80011783:	74 0a                	je     ffffffff8001178f <_ZN7Drivers3PS211SendToPort2Eh+0x1f>
ffffffff80011785:	89 c8                	mov    %ecx,%eax
ffffffff80011787:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011789:	e4 64                	in     $0x64,%al
ffffffff8001178b:	a8 02                	test   $0x2,%al
ffffffff8001178d:	75 f1                	jne    ffffffff80011780 <_ZN7Drivers3PS211SendToPort2Eh+0x10>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff8001178f:	b8 d4 ff ff ff       	mov    $0xffffffd4,%eax
ffffffff80011794:	e6 64                	out    %al,$0x64
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011796:	e4 64                	in     $0x64,%al
ffffffff80011798:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff8001179d:	31 c9                	xor    %ecx,%ecx
ffffffff8001179f:	a8 02                	test   $0x2,%al
ffffffff800117a1:	75 0a                	jne    ffffffff800117ad <_ZN7Drivers3PS211SendToPort2Eh+0x3d>
ffffffff800117a3:	eb 12                	jmp    ffffffff800117b7 <_ZN7Drivers3PS211SendToPort2Eh+0x47>
ffffffff800117a5:	0f 1f 00             	nopl   (%rax)
ffffffff800117a8:	83 ea 01             	sub    $0x1,%edx
ffffffff800117ab:	74 0a                	je     ffffffff800117b7 <_ZN7Drivers3PS211SendToPort2Eh+0x47>
ffffffff800117ad:	89 c8                	mov    %ecx,%eax
ffffffff800117af:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff800117b1:	e4 64                	in     $0x64,%al
ffffffff800117b3:	a8 02                	test   $0x2,%al
ffffffff800117b5:	75 f1                	jne    ffffffff800117a8 <_ZN7Drivers3PS211SendToPort2Eh+0x38>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff800117b7:	89 f8                	mov    %edi,%eax
ffffffff800117b9:	e6 60                	out    %al,$0x60
    }

    void SendToPort2(uint8_t data) {
        SendCommand(CmdWritePort2Input);
        SendData(data);
    }
ffffffff800117bb:	c3                   	ret
ffffffff800117bc:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff800117c0 <_ZN7Drivers3PS213IsDualChannelEv>:

    bool IsDualChannel() {
        return g_DualChannel;
    }
ffffffff800117c0:	0f b6 05 c9 5a 13 00 	movzbl 0x135ac9(%rip),%eax        # ffffffff80147290 <_ZN7Drivers3PS2L13g_DualChannelE>
ffffffff800117c7:	c3                   	ret
ffffffff800117c8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff800117cf:	00 

ffffffff800117d0 <_ZN7Drivers3PS210InitializeEv>:

    void Initialize() {
ffffffff800117d0:	55                   	push   %rbp
ffffffff800117d1:	48 c7 c7 28 b1 02 80 	mov    $0xffffffff8002b128,%rdi
ffffffff800117d8:	48 89 e5             	mov    %rsp,%rbp
ffffffff800117db:	41 54                	push   %r12
ffffffff800117dd:	53                   	push   %rbx
            g_kernelLogDepth++;
ffffffff800117de:	83 05 bf dc 1c 00 01 	addl   $0x1,0x1cdcbf(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800117e5:	e8 d6 19 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800117ea:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800117f1:	e8 ca 19 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800117f6:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800117fd:	e8 be 19 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011802:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff80011809:	e8 b2 19 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001180e:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80011815:	e8 a6 19 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001181a:	48 c7 c7 2c b1 02 80 	mov    $0xffffffff8002b12c,%rdi
ffffffff80011821:	e8 9a 19 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011826:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001182d:	e8 8e 19 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80011832:	83 2d 6b dc 1c 00 01 	subl   $0x1,0x1cdc6b(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011839:	e4 64                	in     $0x64,%al
        return result;
ffffffff8001183b:	ba 9f 86 01 00       	mov    $0x1869f,%edx
ffffffff80011840:	31 c9                	xor    %ecx,%ecx
        while ((Io::In8(StatusPort) & StatusInputFull) && --timeout) {
ffffffff80011842:	a8 02                	test   $0x2,%al
ffffffff80011844:	75 0f                	jne    ffffffff80011855 <_ZN7Drivers3PS210InitializeEv+0x85>
ffffffff80011846:	eb 17                	jmp    ffffffff8001185f <_ZN7Drivers3PS210InitializeEv+0x8f>
ffffffff80011848:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001184f:	00 
ffffffff80011850:	83 ea 01             	sub    $0x1,%edx
ffffffff80011853:	74 0a                	je     ffffffff8001185f <_ZN7Drivers3PS210InitializeEv+0x8f>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011855:	89 c8                	mov    %ecx,%eax
ffffffff80011857:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011859:	e4 64                	in     $0x64,%al
ffffffff8001185b:	a8 02                	test   $0x2,%al
ffffffff8001185d:	75 f1                	jne    ffffffff80011850 <_ZN7Drivers3PS210InitializeEv+0x80>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff8001185f:	b8 ad ff ff ff       	mov    $0xffffffad,%eax
ffffffff80011864:	e6 64                	out    %al,$0x64
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011866:	e4 64                	in     $0x64,%al
ffffffff80011868:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff8001186d:	31 c9                	xor    %ecx,%ecx
ffffffff8001186f:	a8 02                	test   $0x2,%al
ffffffff80011871:	75 0a                	jne    ffffffff8001187d <_ZN7Drivers3PS210InitializeEv+0xad>
ffffffff80011873:	eb 12                	jmp    ffffffff80011887 <_ZN7Drivers3PS210InitializeEv+0xb7>
ffffffff80011875:	0f 1f 00             	nopl   (%rax)
ffffffff80011878:	83 ea 01             	sub    $0x1,%edx
ffffffff8001187b:	74 0a                	je     ffffffff80011887 <_ZN7Drivers3PS210InitializeEv+0xb7>
ffffffff8001187d:	89 c8                	mov    %ecx,%eax
ffffffff8001187f:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011881:	e4 64                	in     $0x64,%al
ffffffff80011883:	a8 02                	test   $0x2,%al
ffffffff80011885:	75 f1                	jne    ffffffff80011878 <_ZN7Drivers3PS210InitializeEv+0xa8>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011887:	b8 a7 ff ff ff       	mov    $0xffffffa7,%eax
ffffffff8001188c:	e6 64                	out    %al,$0x64
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff8001188e:	e4 64                	in     $0x64,%al
        while ((Io::In8(StatusPort) & StatusOutputFull) && --maxReads) {
ffffffff80011890:	ba 1f 00 00 00       	mov    $0x1f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011895:	31 c9                	xor    %ecx,%ecx
ffffffff80011897:	a8 01                	test   $0x1,%al
ffffffff80011899:	75 0a                	jne    ffffffff800118a5 <_ZN7Drivers3PS210InitializeEv+0xd5>
ffffffff8001189b:	eb 14                	jmp    ffffffff800118b1 <_ZN7Drivers3PS210InitializeEv+0xe1>
ffffffff8001189d:	0f 1f 00             	nopl   (%rax)
ffffffff800118a0:	83 ea 01             	sub    $0x1,%edx
ffffffff800118a3:	74 0c                	je     ffffffff800118b1 <_ZN7Drivers3PS210InitializeEv+0xe1>
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff800118a5:	e4 60                	in     $0x60,%al
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff800118a7:	89 c8                	mov    %ecx,%eax
ffffffff800118a9:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff800118ab:	e4 64                	in     $0x64,%al
ffffffff800118ad:	a8 01                	test   $0x1,%al
ffffffff800118af:	75 ef                	jne    ffffffff800118a0 <_ZN7Drivers3PS210InitializeEv+0xd0>
ffffffff800118b1:	e4 64                	in     $0x64,%al
        while ((Io::In8(StatusPort) & StatusInputFull) && --timeout) {
ffffffff800118b3:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff800118b8:	31 c9                	xor    %ecx,%ecx
ffffffff800118ba:	a8 02                	test   $0x2,%al
ffffffff800118bc:	75 07                	jne    ffffffff800118c5 <_ZN7Drivers3PS210InitializeEv+0xf5>
ffffffff800118be:	eb 0f                	jmp    ffffffff800118cf <_ZN7Drivers3PS210InitializeEv+0xff>
ffffffff800118c0:	83 ea 01             	sub    $0x1,%edx
ffffffff800118c3:	74 0a                	je     ffffffff800118cf <_ZN7Drivers3PS210InitializeEv+0xff>
ffffffff800118c5:	89 c8                	mov    %ecx,%eax
ffffffff800118c7:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff800118c9:	e4 64                	in     $0x64,%al
ffffffff800118cb:	a8 02                	test   $0x2,%al
ffffffff800118cd:	75 f1                	jne    ffffffff800118c0 <_ZN7Drivers3PS210InitializeEv+0xf0>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff800118cf:	b8 20 00 00 00       	mov    $0x20,%eax
ffffffff800118d4:	e6 64                	out    %al,$0x64
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff800118d6:	e4 64                	in     $0x64,%al
        while (!(Io::In8(StatusPort) & StatusOutputFull) && --timeout) {
ffffffff800118d8:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff800118dd:	31 c9                	xor    %ecx,%ecx
ffffffff800118df:	a8 01                	test   $0x1,%al
ffffffff800118e1:	74 0a                	je     ffffffff800118ed <_ZN7Drivers3PS210InitializeEv+0x11d>
ffffffff800118e3:	eb 12                	jmp    ffffffff800118f7 <_ZN7Drivers3PS210InitializeEv+0x127>
ffffffff800118e5:	0f 1f 00             	nopl   (%rax)
ffffffff800118e8:	83 ea 01             	sub    $0x1,%edx
ffffffff800118eb:	74 0a                	je     ffffffff800118f7 <_ZN7Drivers3PS210InitializeEv+0x127>
ffffffff800118ed:	89 c8                	mov    %ecx,%eax
ffffffff800118ef:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff800118f1:	e4 64                	in     $0x64,%al
ffffffff800118f3:	a8 01                	test   $0x1,%al
ffffffff800118f5:	74 f1                	je     ffffffff800118e8 <_ZN7Drivers3PS210InitializeEv+0x118>
ffffffff800118f7:	e4 60                	in     $0x60,%al
            Print(string);
ffffffff800118f9:	48 c7 c7 28 b1 02 80 	mov    $0xffffffff8002b128,%rdi
ffffffff80011900:	41 89 c4             	mov    %eax,%r12d
            g_kernelLogDepth++;
ffffffff80011903:	83 05 9a db 1c 00 01 	addl   $0x1,0x1cdb9a(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001190a:	e8 b1 18 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001190f:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
        uint8_t config = ReadData();

        Kt::KernelLogStream(Kt::DEBUG, "PS2") << "Controller config byte: " << base::hex << (uint64_t)config;

        // Disable interrupts and translation in the config byte for now
        config &= ~(ConfigPort1Interrupt | ConfigPort2Interrupt | ConfigPort1Translation);
ffffffff80011916:	44 89 e3             	mov    %r12d,%ebx
ffffffff80011919:	e8 a2 18 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001191e:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80011925:	83 e3 bc             	and    $0xffffffbc,%ebx
ffffffff80011928:	e8 93 18 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001192d:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff80011934:	e8 87 18 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011939:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80011940:	e8 7b 18 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011945:	48 c7 c7 49 b1 02 80 	mov    $0xffffffff8002b149,%rdi
ffffffff8001194c:	e8 6f 18 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80011951:	be 10 00 00 00       	mov    $0x10,%esi
        Kt::KernelLogStream(Kt::DEBUG, "PS2") << "Controller config byte: " << base::hex << (uint64_t)config;
ffffffff80011956:	41 0f b6 fc          	movzbl %r12b,%edi

        // Check if this is a dual-channel controller
        // If bit 5 (port 2 clock) was set, it might be dual-channel
        g_DualChannel = (config & ConfigPort2Clock) != 0;
ffffffff8001195a:	41 c0 ec 05          	shr    $0x5,%r12b
ffffffff8001195e:	e8 2d 8b 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80011963:	41 83 e4 01          	and    $0x1,%r12d
ffffffff80011967:	48 89 c7             	mov    %rax,%rdi
ffffffff8001196a:	e8 51 18 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001196f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80011976:	e8 45 18 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001197b:	83 2d 22 db 1c 00 01 	subl   $0x1,0x1cdb22(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80011982:	44 88 25 07 59 13 00 	mov    %r12b,0x135907(%rip)        # ffffffff80147290 <_ZN7Drivers3PS2L13g_DualChannelE>
ffffffff80011989:	e4 64                	in     $0x64,%al
        while ((Io::In8(StatusPort) & StatusInputFull) && --timeout) {
ffffffff8001198b:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011990:	31 c9                	xor    %ecx,%ecx
ffffffff80011992:	a8 02                	test   $0x2,%al
ffffffff80011994:	75 0f                	jne    ffffffff800119a5 <_ZN7Drivers3PS210InitializeEv+0x1d5>
ffffffff80011996:	eb 17                	jmp    ffffffff800119af <_ZN7Drivers3PS210InitializeEv+0x1df>
ffffffff80011998:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001199f:	00 
ffffffff800119a0:	83 ea 01             	sub    $0x1,%edx
ffffffff800119a3:	74 0a                	je     ffffffff800119af <_ZN7Drivers3PS210InitializeEv+0x1df>
ffffffff800119a5:	89 c8                	mov    %ecx,%eax
ffffffff800119a7:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff800119a9:	e4 64                	in     $0x64,%al
ffffffff800119ab:	a8 02                	test   $0x2,%al
ffffffff800119ad:	75 f1                	jne    ffffffff800119a0 <_ZN7Drivers3PS210InitializeEv+0x1d0>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff800119af:	b8 60 00 00 00       	mov    $0x60,%eax
ffffffff800119b4:	e6 64                	out    %al,$0x64
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff800119b6:	e4 64                	in     $0x64,%al
ffffffff800119b8:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff800119bd:	31 c9                	xor    %ecx,%ecx
ffffffff800119bf:	a8 02                	test   $0x2,%al
ffffffff800119c1:	75 0a                	jne    ffffffff800119cd <_ZN7Drivers3PS210InitializeEv+0x1fd>
ffffffff800119c3:	eb 12                	jmp    ffffffff800119d7 <_ZN7Drivers3PS210InitializeEv+0x207>
ffffffff800119c5:	0f 1f 00             	nopl   (%rax)
ffffffff800119c8:	83 ea 01             	sub    $0x1,%edx
ffffffff800119cb:	74 0a                	je     ffffffff800119d7 <_ZN7Drivers3PS210InitializeEv+0x207>
ffffffff800119cd:	89 c8                	mov    %ecx,%eax
ffffffff800119cf:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff800119d1:	e4 64                	in     $0x64,%al
ffffffff800119d3:	a8 02                	test   $0x2,%al
ffffffff800119d5:	75 f1                	jne    ffffffff800119c8 <_ZN7Drivers3PS210InitializeEv+0x1f8>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff800119d7:	89 d8                	mov    %ebx,%eax
ffffffff800119d9:	e6 60                	out    %al,$0x60
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff800119db:	e4 64                	in     $0x64,%al
ffffffff800119dd:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff800119e2:	31 c9                	xor    %ecx,%ecx
ffffffff800119e4:	a8 02                	test   $0x2,%al
ffffffff800119e6:	75 0d                	jne    ffffffff800119f5 <_ZN7Drivers3PS210InitializeEv+0x225>
ffffffff800119e8:	eb 15                	jmp    ffffffff800119ff <_ZN7Drivers3PS210InitializeEv+0x22f>
ffffffff800119ea:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff800119f0:	83 ea 01             	sub    $0x1,%edx
ffffffff800119f3:	74 0a                	je     ffffffff800119ff <_ZN7Drivers3PS210InitializeEv+0x22f>
ffffffff800119f5:	89 c8                	mov    %ecx,%eax
ffffffff800119f7:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff800119f9:	e4 64                	in     $0x64,%al
ffffffff800119fb:	a8 02                	test   $0x2,%al
ffffffff800119fd:	75 f1                	jne    ffffffff800119f0 <_ZN7Drivers3PS210InitializeEv+0x220>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff800119ff:	b8 aa ff ff ff       	mov    $0xffffffaa,%eax
ffffffff80011a04:	e6 64                	out    %al,$0x64
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011a06:	e4 64                	in     $0x64,%al
        while (!(Io::In8(StatusPort) & StatusOutputFull) && --timeout) {
ffffffff80011a08:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011a0d:	31 c9                	xor    %ecx,%ecx
ffffffff80011a0f:	a8 01                	test   $0x1,%al
ffffffff80011a11:	74 0a                	je     ffffffff80011a1d <_ZN7Drivers3PS210InitializeEv+0x24d>
ffffffff80011a13:	eb 12                	jmp    ffffffff80011a27 <_ZN7Drivers3PS210InitializeEv+0x257>
ffffffff80011a15:	0f 1f 00             	nopl   (%rax)
ffffffff80011a18:	83 ea 01             	sub    $0x1,%edx
ffffffff80011a1b:	74 0a                	je     ffffffff80011a27 <_ZN7Drivers3PS210InitializeEv+0x257>
ffffffff80011a1d:	89 c8                	mov    %ecx,%eax
ffffffff80011a1f:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011a21:	e4 64                	in     $0x64,%al
ffffffff80011a23:	a8 01                	test   $0x1,%al
ffffffff80011a25:	74 f1                	je     ffffffff80011a18 <_ZN7Drivers3PS210InitializeEv+0x248>
ffffffff80011a27:	e4 60                	in     $0x60,%al
ffffffff80011a29:	41 89 c4             	mov    %eax,%r12d
            g_kernelLogDepth++;
ffffffff80011a2c:	8b 05 72 da 1c 00    	mov    0x1cda72(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80011a32:	8d 50 01             	lea    0x1(%rax),%edx

        // Step 5: Controller self-test
        SendCommand(CmdSelfTest);
        uint8_t selfTestResult = ReadData();

        if (selfTestResult != SelfTestPass) {
ffffffff80011a35:	41 80 fc 55          	cmp    $0x55,%r12b
ffffffff80011a39:	0f 84 89 00 00 00    	je     ffffffff80011ac8 <_ZN7Drivers3PS210InitializeEv+0x2f8>
            Print(string);
ffffffff80011a3f:	48 c7 c7 28 b1 02 80 	mov    $0xffffffff8002b128,%rdi
            g_kernelLogDepth++;
ffffffff80011a46:	89 15 58 da 1c 00    	mov    %edx,0x1cda58(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80011a4c:	e8 6f 17 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011a51:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80011a58:	e8 63 17 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011a5d:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80011a64:	e8 57 17 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011a69:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80011a70:	e8 4b 17 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011a75:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80011a7c:	e8 3f 17 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011a81:	48 c7 c7 62 b1 02 80 	mov    $0xffffffff8002b162,%rdi
ffffffff80011a88:	e8 33 17 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Kt::KernelLogStream(Kt::ERROR, "PS2") << "Controller self-test failed: " << base::hex << (uint64_t)selfTestResult;
ffffffff80011a8d:	41 0f b6 fc          	movzbl %r12b,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80011a91:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80011a96:	e8 f5 89 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80011a9b:	48 89 c7             	mov    %rax,%rdi
            Print(string);
ffffffff80011a9e:	e8 1d 17 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011aa3:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80011aaa:	e8 11 17 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80011aaf:	8b 05 ef d9 1c 00    	mov    0x1cd9ef(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

        SendCommand(CmdWriteConfig);
        SendData(config);

        Kt::KernelLogStream(Kt::OK, "PS2") << "Controller initialized (dual-channel: " << (g_DualChannel ? "yes" : "no") << ")";
    }
ffffffff80011ab5:	5b                   	pop    %rbx
ffffffff80011ab6:	41 5c                	pop    %r12
ffffffff80011ab8:	5d                   	pop    %rbp
ffffffff80011ab9:	83 e8 01             	sub    $0x1,%eax
ffffffff80011abc:	89 05 e2 d9 1c 00    	mov    %eax,0x1cd9e2(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80011ac2:	c3                   	ret
ffffffff80011ac3:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            Print(string);
ffffffff80011ac8:	48 c7 c7 28 b1 02 80 	mov    $0xffffffff8002b128,%rdi
            g_kernelLogDepth++;
ffffffff80011acf:	89 15 cf d9 1c 00    	mov    %edx,0x1cd9cf(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80011ad5:	e8 e6 16 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011ada:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80011ae1:	e8 da 16 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011ae6:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80011aed:	e8 ce 16 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011af2:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80011af9:	e8 c2 16 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011afe:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80011b05:	e8 b6 16 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011b0a:	48 c7 c7 80 b1 02 80 	mov    $0xffffffff8002b180,%rdi
ffffffff80011b11:	e8 aa 16 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011b16:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80011b1d:	e8 9e 16 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80011b22:	83 2d 7b d9 1c 00 01 	subl   $0x1,0x1cd97b(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80011b29:	e4 64                	in     $0x64,%al
        while ((Io::In8(StatusPort) & StatusInputFull) && --timeout) {
ffffffff80011b2b:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011b30:	31 c9                	xor    %ecx,%ecx
ffffffff80011b32:	a8 02                	test   $0x2,%al
ffffffff80011b34:	0f 85 6f 02 00 00    	jne    ffffffff80011da9 <_ZN7Drivers3PS210InitializeEv+0x5d9>
ffffffff80011b3a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff80011b40:	b8 60 00 00 00       	mov    $0x60,%eax
ffffffff80011b45:	e6 64                	out    %al,$0x64
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011b47:	e4 64                	in     $0x64,%al
ffffffff80011b49:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011b4e:	31 c9                	xor    %ecx,%ecx
ffffffff80011b50:	a8 02                	test   $0x2,%al
ffffffff80011b52:	0f 85 71 02 00 00    	jne    ffffffff80011dc9 <_ZN7Drivers3PS210InitializeEv+0x5f9>
ffffffff80011b58:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80011b5f:	00 
ffffffff80011b60:	89 d8                	mov    %ebx,%eax
ffffffff80011b62:	e6 60                	out    %al,$0x60
        if (g_DualChannel) {
ffffffff80011b64:	80 3d 25 57 13 00 00 	cmpb   $0x0,0x135725(%rip)        # ffffffff80147290 <_ZN7Drivers3PS2L13g_DualChannelE>
ffffffff80011b6b:	0f 85 17 03 00 00    	jne    ffffffff80011e88 <_ZN7Drivers3PS210InitializeEv+0x6b8>
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011b71:	e4 64                	in     $0x64,%al
        while ((Io::In8(StatusPort) & StatusInputFull) && --timeout) {
ffffffff80011b73:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011b78:	31 c9                	xor    %ecx,%ecx
ffffffff80011b7a:	a8 02                	test   $0x2,%al
ffffffff80011b7c:	0f 85 67 02 00 00    	jne    ffffffff80011de9 <_ZN7Drivers3PS210InitializeEv+0x619>
ffffffff80011b82:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80011b89:	00 00 00 00 
ffffffff80011b8d:	0f 1f 00             	nopl   (%rax)
ffffffff80011b90:	b8 ab ff ff ff       	mov    $0xffffffab,%eax
ffffffff80011b95:	e6 64                	out    %al,$0x64
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011b97:	e4 64                	in     $0x64,%al
        while (!(Io::In8(StatusPort) & StatusOutputFull) && --timeout) {
ffffffff80011b99:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011b9e:	31 c9                	xor    %ecx,%ecx
ffffffff80011ba0:	a8 01                	test   $0x1,%al
ffffffff80011ba2:	0f 84 61 02 00 00    	je     ffffffff80011e09 <_ZN7Drivers3PS210InitializeEv+0x639>
ffffffff80011ba8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80011baf:	00 
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011bb0:	e4 60                	in     $0x60,%al
ffffffff80011bb2:	89 c3                	mov    %eax,%ebx
            g_kernelLogDepth++;
ffffffff80011bb4:	8b 05 ea d8 1c 00    	mov    0x1cd8ea(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80011bba:	8d 50 01             	lea    0x1(%rax),%edx
        if (port1Test != PortTestPass) {
ffffffff80011bbd:	84 db                	test   %bl,%bl
ffffffff80011bbf:	0f 85 5b 02 00 00    	jne    ffffffff80011e20 <_ZN7Drivers3PS210InitializeEv+0x650>
            Print(string);
ffffffff80011bc5:	48 c7 c7 28 b1 02 80 	mov    $0xffffffff8002b128,%rdi
            g_kernelLogDepth++;
ffffffff80011bcc:	89 15 d2 d8 1c 00    	mov    %edx,0x1cd8d2(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80011bd2:	e8 e9 15 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011bd7:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80011bde:	e8 dd 15 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011be3:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80011bea:	e8 d1 15 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011bef:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80011bf6:	e8 c5 15 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011bfb:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80011c02:	e8 b9 15 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011c07:	48 c7 c7 b1 b1 02 80 	mov    $0xffffffff8002b1b1,%rdi
ffffffff80011c0e:	e8 ad 15 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011c13:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80011c1a:	e8 a1 15 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80011c1f:	8b 05 7f d8 1c 00    	mov    0x1cd87f(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80011c25:	83 e8 01             	sub    $0x1,%eax
        if (g_DualChannel) {
ffffffff80011c28:	80 3d 61 56 13 00 00 	cmpb   $0x0,0x135661(%rip)        # ffffffff80147290 <_ZN7Drivers3PS2L13g_DualChannelE>
ffffffff80011c2f:	89 05 6f d8 1c 00    	mov    %eax,0x1cd86f(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80011c35:	0f 85 15 03 00 00    	jne    ffffffff80011f50 <_ZN7Drivers3PS210InitializeEv+0x780>
ffffffff80011c3b:	e4 64                	in     $0x64,%al
        while ((Io::In8(StatusPort) & StatusInputFull) && --timeout) {
ffffffff80011c3d:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011c42:	31 c9                	xor    %ecx,%ecx
ffffffff80011c44:	a8 02                	test   $0x2,%al
ffffffff80011c46:	75 0d                	jne    ffffffff80011c55 <_ZN7Drivers3PS210InitializeEv+0x485>
ffffffff80011c48:	eb 15                	jmp    ffffffff80011c5f <_ZN7Drivers3PS210InitializeEv+0x48f>
ffffffff80011c4a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff80011c50:	83 ea 01             	sub    $0x1,%edx
ffffffff80011c53:	74 0a                	je     ffffffff80011c5f <_ZN7Drivers3PS210InitializeEv+0x48f>
ffffffff80011c55:	89 c8                	mov    %ecx,%eax
ffffffff80011c57:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011c59:	e4 64                	in     $0x64,%al
ffffffff80011c5b:	a8 02                	test   $0x2,%al
ffffffff80011c5d:	75 f1                	jne    ffffffff80011c50 <_ZN7Drivers3PS210InitializeEv+0x480>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011c5f:	b8 ae ff ff ff       	mov    $0xffffffae,%eax
ffffffff80011c64:	e6 64                	out    %al,$0x64
        if (g_DualChannel) {
ffffffff80011c66:	80 3d 23 56 13 00 00 	cmpb   $0x0,0x135623(%rip)        # ffffffff80147290 <_ZN7Drivers3PS2L13g_DualChannelE>
ffffffff80011c6d:	0f 85 a5 02 00 00    	jne    ffffffff80011f18 <_ZN7Drivers3PS210InitializeEv+0x748>
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011c73:	e4 64                	in     $0x64,%al
        while ((Io::In8(StatusPort) & StatusInputFull) && --timeout) {
ffffffff80011c75:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011c7a:	31 c9                	xor    %ecx,%ecx
ffffffff80011c7c:	a8 02                	test   $0x2,%al
ffffffff80011c7e:	75 0d                	jne    ffffffff80011c8d <_ZN7Drivers3PS210InitializeEv+0x4bd>
ffffffff80011c80:	eb 15                	jmp    ffffffff80011c97 <_ZN7Drivers3PS210InitializeEv+0x4c7>
ffffffff80011c82:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff80011c88:	83 ea 01             	sub    $0x1,%edx
ffffffff80011c8b:	74 0a                	je     ffffffff80011c97 <_ZN7Drivers3PS210InitializeEv+0x4c7>
ffffffff80011c8d:	89 c8                	mov    %ecx,%eax
ffffffff80011c8f:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011c91:	e4 64                	in     $0x64,%al
ffffffff80011c93:	a8 02                	test   $0x2,%al
ffffffff80011c95:	75 f1                	jne    ffffffff80011c88 <_ZN7Drivers3PS210InitializeEv+0x4b8>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011c97:	b8 20 00 00 00       	mov    $0x20,%eax
ffffffff80011c9c:	e6 64                	out    %al,$0x64
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011c9e:	e4 64                	in     $0x64,%al
        while (!(Io::In8(StatusPort) & StatusOutputFull) && --timeout) {
ffffffff80011ca0:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011ca5:	31 c9                	xor    %ecx,%ecx
ffffffff80011ca7:	a8 01                	test   $0x1,%al
ffffffff80011ca9:	74 0a                	je     ffffffff80011cb5 <_ZN7Drivers3PS210InitializeEv+0x4e5>
ffffffff80011cab:	eb 12                	jmp    ffffffff80011cbf <_ZN7Drivers3PS210InitializeEv+0x4ef>
ffffffff80011cad:	0f 1f 00             	nopl   (%rax)
ffffffff80011cb0:	83 ea 01             	sub    $0x1,%edx
ffffffff80011cb3:	74 0a                	je     ffffffff80011cbf <_ZN7Drivers3PS210InitializeEv+0x4ef>
ffffffff80011cb5:	89 c8                	mov    %ecx,%eax
ffffffff80011cb7:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011cb9:	e4 64                	in     $0x64,%al
ffffffff80011cbb:	a8 01                	test   $0x1,%al
ffffffff80011cbd:	74 f1                	je     ffffffff80011cb0 <_ZN7Drivers3PS210InitializeEv+0x4e0>
ffffffff80011cbf:	e4 60                	in     $0x60,%al
            config |= ConfigPort2Interrupt;
ffffffff80011cc1:	89 c6                	mov    %eax,%esi
ffffffff80011cc3:	83 ce 43             	or     $0x43,%esi
        if (g_DualChannel) {
ffffffff80011cc6:	80 3d c3 55 13 00 00 	cmpb   $0x0,0x1355c3(%rip)        # ffffffff80147290 <_ZN7Drivers3PS2L13g_DualChannelE>
ffffffff80011ccd:	75 05                	jne    ffffffff80011cd4 <_ZN7Drivers3PS210InitializeEv+0x504>
        config |= ConfigPort1Interrupt | ConfigPort1Translation;
ffffffff80011ccf:	83 c8 41             	or     $0x41,%eax
ffffffff80011cd2:	89 c6                	mov    %eax,%esi
ffffffff80011cd4:	e4 64                	in     $0x64,%al
        while ((Io::In8(StatusPort) & StatusInputFull) && --timeout) {
ffffffff80011cd6:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011cdb:	31 c9                	xor    %ecx,%ecx
ffffffff80011cdd:	a8 02                	test   $0x2,%al
ffffffff80011cdf:	75 0c                	jne    ffffffff80011ced <_ZN7Drivers3PS210InitializeEv+0x51d>
ffffffff80011ce1:	eb 14                	jmp    ffffffff80011cf7 <_ZN7Drivers3PS210InitializeEv+0x527>
ffffffff80011ce3:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff80011ce8:	83 ea 01             	sub    $0x1,%edx
ffffffff80011ceb:	74 0a                	je     ffffffff80011cf7 <_ZN7Drivers3PS210InitializeEv+0x527>
ffffffff80011ced:	89 c8                	mov    %ecx,%eax
ffffffff80011cef:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011cf1:	e4 64                	in     $0x64,%al
ffffffff80011cf3:	a8 02                	test   $0x2,%al
ffffffff80011cf5:	75 f1                	jne    ffffffff80011ce8 <_ZN7Drivers3PS210InitializeEv+0x518>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011cf7:	b8 60 00 00 00       	mov    $0x60,%eax
ffffffff80011cfc:	e6 64                	out    %al,$0x64
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011cfe:	e4 64                	in     $0x64,%al
ffffffff80011d00:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011d05:	31 c9                	xor    %ecx,%ecx
ffffffff80011d07:	a8 02                	test   $0x2,%al
ffffffff80011d09:	75 0a                	jne    ffffffff80011d15 <_ZN7Drivers3PS210InitializeEv+0x545>
ffffffff80011d0b:	eb 12                	jmp    ffffffff80011d1f <_ZN7Drivers3PS210InitializeEv+0x54f>
ffffffff80011d0d:	0f 1f 00             	nopl   (%rax)
ffffffff80011d10:	83 ea 01             	sub    $0x1,%edx
ffffffff80011d13:	74 0a                	je     ffffffff80011d1f <_ZN7Drivers3PS210InitializeEv+0x54f>
ffffffff80011d15:	89 c8                	mov    %ecx,%eax
ffffffff80011d17:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011d19:	e4 64                	in     $0x64,%al
ffffffff80011d1b:	a8 02                	test   $0x2,%al
ffffffff80011d1d:	75 f1                	jne    ffffffff80011d10 <_ZN7Drivers3PS210InitializeEv+0x540>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011d1f:	89 f0                	mov    %esi,%eax
ffffffff80011d21:	e6 60                	out    %al,$0x60
            Print(string);
ffffffff80011d23:	48 c7 c7 28 b1 02 80 	mov    $0xffffffff8002b128,%rdi
            g_kernelLogDepth++;
ffffffff80011d2a:	83 05 73 d7 1c 00 01 	addl   $0x1,0x1cd773(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80011d31:	e8 8a 14 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011d36:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80011d3d:	e8 7e 14 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011d42:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80011d49:	e8 72 14 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011d4e:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80011d55:	e8 66 14 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011d5a:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80011d61:	e8 5a 14 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011d66:	48 c7 c7 80 c9 02 80 	mov    $0xffffffff8002c980,%rdi
ffffffff80011d6d:	e8 4e 14 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        Kt::KernelLogStream(Kt::OK, "PS2") << "Controller initialized (dual-channel: " << (g_DualChannel ? "yes" : "no") << ")";
ffffffff80011d72:	80 3d 17 55 13 00 00 	cmpb   $0x0,0x135517(%rip)        # ffffffff80147290 <_ZN7Drivers3PS2L13g_DualChannelE>
ffffffff80011d79:	48 c7 c0 21 b1 02 80 	mov    $0xffffffff8002b121,%rax
ffffffff80011d80:	48 c7 c7 25 b1 02 80 	mov    $0xffffffff8002b125,%rdi
ffffffff80011d87:	48 0f 45 f8          	cmovne %rax,%rdi
ffffffff80011d8b:	e8 30 14 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011d90:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff80011d97:	e9 02 fd ff ff       	jmp    ffffffff80011a9e <_ZN7Drivers3PS210InitializeEv+0x2ce>
ffffffff80011d9c:	0f 1f 40 00          	nopl   0x0(%rax)
        while ((Io::In8(StatusPort) & StatusInputFull) && --timeout) {
ffffffff80011da0:	83 ea 01             	sub    $0x1,%edx
ffffffff80011da3:	0f 84 97 fd ff ff    	je     ffffffff80011b40 <_ZN7Drivers3PS210InitializeEv+0x370>
ffffffff80011da9:	89 c8                	mov    %ecx,%eax
ffffffff80011dab:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011dad:	e4 64                	in     $0x64,%al
ffffffff80011daf:	a8 02                	test   $0x2,%al
ffffffff80011db1:	75 ed                	jne    ffffffff80011da0 <_ZN7Drivers3PS210InitializeEv+0x5d0>
ffffffff80011db3:	e9 88 fd ff ff       	jmp    ffffffff80011b40 <_ZN7Drivers3PS210InitializeEv+0x370>
ffffffff80011db8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80011dbf:	00 
ffffffff80011dc0:	83 ea 01             	sub    $0x1,%edx
ffffffff80011dc3:	0f 84 97 fd ff ff    	je     ffffffff80011b60 <_ZN7Drivers3PS210InitializeEv+0x390>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011dc9:	89 c8                	mov    %ecx,%eax
ffffffff80011dcb:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011dcd:	e4 64                	in     $0x64,%al
ffffffff80011dcf:	a8 02                	test   $0x2,%al
ffffffff80011dd1:	75 ed                	jne    ffffffff80011dc0 <_ZN7Drivers3PS210InitializeEv+0x5f0>
ffffffff80011dd3:	e9 88 fd ff ff       	jmp    ffffffff80011b60 <_ZN7Drivers3PS210InitializeEv+0x390>
ffffffff80011dd8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80011ddf:	00 
ffffffff80011de0:	83 ea 01             	sub    $0x1,%edx
ffffffff80011de3:	0f 84 a7 fd ff ff    	je     ffffffff80011b90 <_ZN7Drivers3PS210InitializeEv+0x3c0>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011de9:	89 c8                	mov    %ecx,%eax
ffffffff80011deb:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011ded:	e4 64                	in     $0x64,%al
ffffffff80011def:	a8 02                	test   $0x2,%al
ffffffff80011df1:	75 ed                	jne    ffffffff80011de0 <_ZN7Drivers3PS210InitializeEv+0x610>
ffffffff80011df3:	e9 98 fd ff ff       	jmp    ffffffff80011b90 <_ZN7Drivers3PS210InitializeEv+0x3c0>
ffffffff80011df8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80011dff:	00 
        while (!(Io::In8(StatusPort) & StatusOutputFull) && --timeout) {
ffffffff80011e00:	83 ea 01             	sub    $0x1,%edx
ffffffff80011e03:	0f 84 a7 fd ff ff    	je     ffffffff80011bb0 <_ZN7Drivers3PS210InitializeEv+0x3e0>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011e09:	89 c8                	mov    %ecx,%eax
ffffffff80011e0b:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011e0d:	e4 64                	in     $0x64,%al
ffffffff80011e0f:	a8 01                	test   $0x1,%al
ffffffff80011e11:	74 ed                	je     ffffffff80011e00 <_ZN7Drivers3PS210InitializeEv+0x630>
ffffffff80011e13:	e9 98 fd ff ff       	jmp    ffffffff80011bb0 <_ZN7Drivers3PS210InitializeEv+0x3e0>
ffffffff80011e18:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80011e1f:	00 
ffffffff80011e20:	48 c7 c7 28 b1 02 80 	mov    $0xffffffff8002b128,%rdi
            g_kernelLogDepth++;
ffffffff80011e27:	89 15 77 d6 1c 00    	mov    %edx,0x1cd677(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80011e2d:	e8 8e 13 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011e32:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80011e39:	e8 82 13 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011e3e:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80011e45:	e8 76 13 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011e4a:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80011e51:	e8 6a 13 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011e56:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80011e5d:	e8 5e 13 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011e62:	48 c7 c7 9c b1 02 80 	mov    $0xffffffff8002b19c,%rdi
ffffffff80011e69:	e8 52 13 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Kt::KernelLogStream(Kt::ERROR, "PS2") << "Port 1 test failed: " << base::hex << (uint64_t)port1Test;
ffffffff80011e6e:	0f b6 fb             	movzbl %bl,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80011e71:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80011e76:	e8 15 86 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80011e7b:	48 89 c7             	mov    %rax,%rdi
ffffffff80011e7e:	e9 8b fd ff ff       	jmp    ffffffff80011c0e <_ZN7Drivers3PS210InitializeEv+0x43e>
ffffffff80011e83:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff80011e88:	e4 64                	in     $0x64,%al
        while ((Io::In8(StatusPort) & StatusInputFull) && --timeout) {
ffffffff80011e8a:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011e8f:	31 c9                	xor    %ecx,%ecx
ffffffff80011e91:	a8 02                	test   $0x2,%al
ffffffff80011e93:	75 10                	jne    ffffffff80011ea5 <_ZN7Drivers3PS210InitializeEv+0x6d5>
ffffffff80011e95:	eb 18                	jmp    ffffffff80011eaf <_ZN7Drivers3PS210InitializeEv+0x6df>
ffffffff80011e97:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff80011e9e:	00 00 
ffffffff80011ea0:	83 ea 01             	sub    $0x1,%edx
ffffffff80011ea3:	74 0a                	je     ffffffff80011eaf <_ZN7Drivers3PS210InitializeEv+0x6df>
ffffffff80011ea5:	89 c8                	mov    %ecx,%eax
ffffffff80011ea7:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011ea9:	e4 64                	in     $0x64,%al
ffffffff80011eab:	a8 02                	test   $0x2,%al
ffffffff80011ead:	75 f1                	jne    ffffffff80011ea0 <_ZN7Drivers3PS210InitializeEv+0x6d0>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011eaf:	b8 a8 ff ff ff       	mov    $0xffffffa8,%eax
ffffffff80011eb4:	e6 64                	out    %al,$0x64
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011eb6:	e4 64                	in     $0x64,%al
ffffffff80011eb8:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011ebd:	31 c9                	xor    %ecx,%ecx
ffffffff80011ebf:	a8 02                	test   $0x2,%al
ffffffff80011ec1:	75 0a                	jne    ffffffff80011ecd <_ZN7Drivers3PS210InitializeEv+0x6fd>
ffffffff80011ec3:	eb 12                	jmp    ffffffff80011ed7 <_ZN7Drivers3PS210InitializeEv+0x707>
ffffffff80011ec5:	0f 1f 00             	nopl   (%rax)
ffffffff80011ec8:	83 ea 01             	sub    $0x1,%edx
ffffffff80011ecb:	74 0a                	je     ffffffff80011ed7 <_ZN7Drivers3PS210InitializeEv+0x707>
ffffffff80011ecd:	89 c8                	mov    %ecx,%eax
ffffffff80011ecf:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011ed1:	e4 64                	in     $0x64,%al
ffffffff80011ed3:	a8 02                	test   $0x2,%al
ffffffff80011ed5:	75 f1                	jne    ffffffff80011ec8 <_ZN7Drivers3PS210InitializeEv+0x6f8>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011ed7:	b8 20 00 00 00       	mov    $0x20,%eax
ffffffff80011edc:	e6 64                	out    %al,$0x64
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011ede:	e4 64                	in     $0x64,%al
        while (!(Io::In8(StatusPort) & StatusOutputFull) && --timeout) {
ffffffff80011ee0:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011ee5:	31 c9                	xor    %ecx,%ecx
ffffffff80011ee7:	a8 01                	test   $0x1,%al
ffffffff80011ee9:	74 0a                	je     ffffffff80011ef5 <_ZN7Drivers3PS210InitializeEv+0x725>
ffffffff80011eeb:	eb 12                	jmp    ffffffff80011eff <_ZN7Drivers3PS210InitializeEv+0x72f>
ffffffff80011eed:	0f 1f 00             	nopl   (%rax)
ffffffff80011ef0:	83 ea 01             	sub    $0x1,%edx
ffffffff80011ef3:	74 0a                	je     ffffffff80011eff <_ZN7Drivers3PS210InitializeEv+0x72f>
ffffffff80011ef5:	89 c8                	mov    %ecx,%eax
ffffffff80011ef7:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011ef9:	e4 64                	in     $0x64,%al
ffffffff80011efb:	a8 01                	test   $0x1,%al
ffffffff80011efd:	74 f1                	je     ffffffff80011ef0 <_ZN7Drivers3PS210InitializeEv+0x720>
ffffffff80011eff:	e4 60                	in     $0x60,%al
            if (config2 & ConfigPort2Clock) {
ffffffff80011f01:	a8 20                	test   $0x20,%al
ffffffff80011f03:	0f 84 8b 01 00 00    	je     ffffffff80012094 <_ZN7Drivers3PS210InitializeEv+0x8c4>
                g_DualChannel = false;
ffffffff80011f09:	c6 05 80 53 13 00 00 	movb   $0x0,0x135380(%rip)        # ffffffff80147290 <_ZN7Drivers3PS2L13g_DualChannelE>
ffffffff80011f10:	e9 5c fc ff ff       	jmp    ffffffff80011b71 <_ZN7Drivers3PS210InitializeEv+0x3a1>
ffffffff80011f15:	0f 1f 00             	nopl   (%rax)
ffffffff80011f18:	e4 64                	in     $0x64,%al
        while ((Io::In8(StatusPort) & StatusInputFull) && --timeout) {
ffffffff80011f1a:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011f1f:	31 c9                	xor    %ecx,%ecx
ffffffff80011f21:	a8 02                	test   $0x2,%al
ffffffff80011f23:	75 10                	jne    ffffffff80011f35 <_ZN7Drivers3PS210InitializeEv+0x765>
ffffffff80011f25:	eb 18                	jmp    ffffffff80011f3f <_ZN7Drivers3PS210InitializeEv+0x76f>
ffffffff80011f27:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff80011f2e:	00 00 
ffffffff80011f30:	83 ea 01             	sub    $0x1,%edx
ffffffff80011f33:	74 0a                	je     ffffffff80011f3f <_ZN7Drivers3PS210InitializeEv+0x76f>
ffffffff80011f35:	89 c8                	mov    %ecx,%eax
ffffffff80011f37:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011f39:	e4 64                	in     $0x64,%al
ffffffff80011f3b:	a8 02                	test   $0x2,%al
ffffffff80011f3d:	75 f1                	jne    ffffffff80011f30 <_ZN7Drivers3PS210InitializeEv+0x760>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011f3f:	b8 a8 ff ff ff       	mov    $0xffffffa8,%eax
ffffffff80011f44:	e6 64                	out    %al,$0x64
    }
ffffffff80011f46:	e9 28 fd ff ff       	jmp    ffffffff80011c73 <_ZN7Drivers3PS210InitializeEv+0x4a3>
ffffffff80011f4b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011f50:	e4 64                	in     $0x64,%al
        while ((Io::In8(StatusPort) & StatusInputFull) && --timeout) {
ffffffff80011f52:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011f57:	31 c9                	xor    %ecx,%ecx
ffffffff80011f59:	a8 02                	test   $0x2,%al
ffffffff80011f5b:	75 08                	jne    ffffffff80011f65 <_ZN7Drivers3PS210InitializeEv+0x795>
ffffffff80011f5d:	eb 10                	jmp    ffffffff80011f6f <_ZN7Drivers3PS210InitializeEv+0x79f>
ffffffff80011f5f:	90                   	nop
ffffffff80011f60:	83 ea 01             	sub    $0x1,%edx
ffffffff80011f63:	74 0a                	je     ffffffff80011f6f <_ZN7Drivers3PS210InitializeEv+0x79f>
ffffffff80011f65:	89 c8                	mov    %ecx,%eax
ffffffff80011f67:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011f69:	e4 64                	in     $0x64,%al
ffffffff80011f6b:	a8 02                	test   $0x2,%al
ffffffff80011f6d:	75 f1                	jne    ffffffff80011f60 <_ZN7Drivers3PS210InitializeEv+0x790>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011f6f:	b8 a9 ff ff ff       	mov    $0xffffffa9,%eax
ffffffff80011f74:	e6 64                	out    %al,$0x64
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011f76:	e4 64                	in     $0x64,%al
        while (!(Io::In8(StatusPort) & StatusOutputFull) && --timeout) {
ffffffff80011f78:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80011f7d:	31 c9                	xor    %ecx,%ecx
ffffffff80011f7f:	a8 01                	test   $0x1,%al
ffffffff80011f81:	74 0a                	je     ffffffff80011f8d <_ZN7Drivers3PS210InitializeEv+0x7bd>
ffffffff80011f83:	eb 12                	jmp    ffffffff80011f97 <_ZN7Drivers3PS210InitializeEv+0x7c7>
ffffffff80011f85:	0f 1f 00             	nopl   (%rax)
ffffffff80011f88:	83 ea 01             	sub    $0x1,%edx
ffffffff80011f8b:	74 0a                	je     ffffffff80011f97 <_ZN7Drivers3PS210InitializeEv+0x7c7>
ffffffff80011f8d:	89 c8                	mov    %ecx,%eax
ffffffff80011f8f:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80011f91:	e4 64                	in     $0x64,%al
ffffffff80011f93:	a8 01                	test   $0x1,%al
ffffffff80011f95:	74 f1                	je     ffffffff80011f88 <_ZN7Drivers3PS210InitializeEv+0x7b8>
ffffffff80011f97:	e4 60                	in     $0x60,%al
ffffffff80011f99:	89 c3                	mov    %eax,%ebx
            g_kernelLogDepth++;
ffffffff80011f9b:	8b 05 03 d5 1c 00    	mov    0x1cd503(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80011fa1:	8d 50 01             	lea    0x1(%rax),%edx
            if (port2Test != PortTestPass) {
ffffffff80011fa4:	84 db                	test   %bl,%bl
ffffffff80011fa6:	0f 84 82 00 00 00    	je     ffffffff8001202e <_ZN7Drivers3PS210InitializeEv+0x85e>
            Print(string);
ffffffff80011fac:	48 c7 c7 28 b1 02 80 	mov    $0xffffffff8002b128,%rdi
            g_kernelLogDepth++;
ffffffff80011fb3:	89 15 eb d4 1c 00    	mov    %edx,0x1cd4eb(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80011fb9:	e8 02 12 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011fbe:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80011fc5:	e8 f6 11 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011fca:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80011fd1:	e8 ea 11 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011fd6:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80011fdd:	e8 de 11 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011fe2:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80011fe9:	e8 d2 11 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80011fee:	48 c7 c7 cf b1 02 80 	mov    $0xffffffff8002b1cf,%rdi
ffffffff80011ff5:	e8 c6 11 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80011ffa:	be 10 00 00 00       	mov    $0x10,%esi
                Kt::KernelLogStream(Kt::ERROR, "PS2") << "Port 2 test failed: " << base::hex << (uint64_t)port2Test;
ffffffff80011fff:	0f b6 fb             	movzbl %bl,%edi
ffffffff80012002:	e8 89 84 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80012007:	48 89 c7             	mov    %rax,%rdi
ffffffff8001200a:	e8 b1 11 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001200f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80012016:	e8 a5 11 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001201b:	83 2d 82 d4 1c 00 01 	subl   $0x1,0x1cd482(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
                g_DualChannel = false;
ffffffff80012022:	c6 05 67 52 13 00 00 	movb   $0x0,0x135267(%rip)        # ffffffff80147290 <_ZN7Drivers3PS2L13g_DualChannelE>
ffffffff80012029:	e9 0d fc ff ff       	jmp    ffffffff80011c3b <_ZN7Drivers3PS210InitializeEv+0x46b>
            Print(string);
ffffffff8001202e:	48 c7 c7 28 b1 02 80 	mov    $0xffffffff8002b128,%rdi
            g_kernelLogDepth++;
ffffffff80012035:	89 15 69 d4 1c 00    	mov    %edx,0x1cd469(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001203b:	e8 80 11 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80012040:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80012047:	e8 74 11 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001204c:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80012053:	e8 68 11 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80012058:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001205f:	e8 5c 11 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80012064:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001206b:	e8 50 11 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80012070:	48 c7 c7 e4 b1 02 80 	mov    $0xffffffff8002b1e4,%rdi
ffffffff80012077:	e8 44 11 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001207c:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80012083:	e8 38 11 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80012088:	83 2d 15 d4 1c 00 01 	subl   $0x1,0x1cd415(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001208f:	e9 a7 fb ff ff       	jmp    ffffffff80011c3b <_ZN7Drivers3PS210InitializeEv+0x46b>
ffffffff80012094:	e4 64                	in     $0x64,%al
        while ((Io::In8(StatusPort) & StatusInputFull) && --timeout) {
ffffffff80012096:	ba 9f 86 01 00       	mov    $0x1869f,%edx
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff8001209b:	31 c9                	xor    %ecx,%ecx
ffffffff8001209d:	a8 02                	test   $0x2,%al
ffffffff8001209f:	75 0c                	jne    ffffffff800120ad <_ZN7Drivers3PS210InitializeEv+0x8dd>
ffffffff800120a1:	eb 14                	jmp    ffffffff800120b7 <_ZN7Drivers3PS210InitializeEv+0x8e7>
ffffffff800120a3:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff800120a8:	83 ea 01             	sub    $0x1,%edx
ffffffff800120ab:	74 0a                	je     ffffffff800120b7 <_ZN7Drivers3PS210InitializeEv+0x8e7>
ffffffff800120ad:	89 c8                	mov    %ecx,%eax
ffffffff800120af:	e6 80                	out    %al,$0x80
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff800120b1:	e4 64                	in     $0x64,%al
ffffffff800120b3:	a8 02                	test   $0x2,%al
ffffffff800120b5:	75 f1                	jne    ffffffff800120a8 <_ZN7Drivers3PS210InitializeEv+0x8d8>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff800120b7:	b8 a7 ff ff ff       	mov    $0xffffffa7,%eax
ffffffff800120bc:	e6 64                	out    %al,$0x64
    }
ffffffff800120be:	e9 ae fa ff ff       	jmp    ffffffff80011b71 <_ZN7Drivers3PS210InitializeEv+0x3a1>
ffffffff800120c3:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800120ca:	00 00 00 
ffffffff800120cd:	0f 1f 00             	nopl   (%rax)

ffffffff800120d0 <_ZN7Drivers3USB11HidKeyboardL9InjectKeyEhbhb>:
        return (hidUsage >= 0x39 && hidUsage <= 0x53);
    }

    // Build and inject a KeyEvent into the PS/2 keyboard buffer
    static void InjectKey(uint8_t scancode, bool pressed, uint8_t modifiers,
                          bool nonChar = false) {
ffffffff800120d0:	55                   	push   %rbp
        bool shift = (modifiers & (MOD_LEFT_SHIFT | MOD_RIGHT_SHIFT)) != 0;
ffffffff800120d1:	41 89 d2             	mov    %edx,%r10d
                          bool nonChar = false) {
ffffffff800120d4:	89 f8                	mov    %edi,%eax
ffffffff800120d6:	48 89 e5             	mov    %rsp,%rbp
ffffffff800120d9:	48 83 ec 10          	sub    $0x10,%rsp
        bool shift = (modifiers & (MOD_LEFT_SHIFT | MOD_RIGHT_SHIFT)) != 0;
ffffffff800120dd:	41 83 e2 22          	and    $0x22,%r10d
ffffffff800120e1:	41 0f 95 c1          	setne  %r9b
        bool ctrl  = (modifiers & (MOD_LEFT_CTRL | MOD_RIGHT_CTRL)) != 0;
ffffffff800120e5:	f6 c2 11             	test   $0x11,%dl
ffffffff800120e8:	41 0f 95 c0          	setne  %r8b
        bool alt   = (modifiers & (MOD_LEFT_ALT | MOD_RIGHT_ALT)) != 0;
ffffffff800120ec:	83 e2 44             	and    $0x44,%edx

        char ascii = 0;
        if (!nonChar && scancode < 128 && pressed) {
ffffffff800120ef:	89 c2                	mov    %eax,%edx
ffffffff800120f1:	f7 d2                	not    %edx
        bool alt   = (modifiers & (MOD_LEFT_ALT | MOD_RIGHT_ALT)) != 0;
ffffffff800120f3:	40 0f 95 c7          	setne  %dil
        if (!nonChar && scancode < 128 && pressed) {
ffffffff800120f7:	83 f1 01             	xor    $0x1,%ecx
ffffffff800120fa:	c0 ea 07             	shr    $0x7,%dl
ffffffff800120fd:	84 d1                	test   %dl,%cl
ffffffff800120ff:	74 05                	je     ffffffff80012106 <_ZN7Drivers3USB11HidKeyboardL9InjectKeyEhbhb+0x36>
ffffffff80012101:	40 84 f6             	test   %sil,%sil
ffffffff80012104:	75 2a                	jne    ffffffff80012130 <_ZN7Drivers3USB11HidKeyboardL9InjectKeyEhbhb+0x60>
        char ascii = 0;
ffffffff80012106:	31 d2                	xor    %edx,%edx
            .Pressed  = pressed,
            .Shift    = shift,
            .Ctrl     = ctrl,
            .Alt      = alt,
            .CapsLock = false
        };
ffffffff80012108:	40 88 7d fe          	mov    %dil,-0x2(%rbp)

        Drivers::PS2::Keyboard::InjectKeyEvent(event);
ffffffff8001210c:	48 8d 7d f9          	lea    -0x7(%rbp),%rdi
        Drivers::PS2::Keyboard::KeyEvent event = {
ffffffff80012110:	c6 45 ff 00          	movb   $0x0,-0x1(%rbp)
        };
ffffffff80012114:	88 45 f9             	mov    %al,-0x7(%rbp)
ffffffff80012117:	88 55 fa             	mov    %dl,-0x6(%rbp)
ffffffff8001211a:	40 88 75 fb          	mov    %sil,-0x5(%rbp)
ffffffff8001211e:	44 88 4d fc          	mov    %r9b,-0x4(%rbp)
ffffffff80012122:	44 88 45 fd          	mov    %r8b,-0x3(%rbp)
        Drivers::PS2::Keyboard::InjectKeyEvent(event);
ffffffff80012126:	e8 e5 ee ff ff       	call   ffffffff80011010 <_ZN7Drivers3PS28Keyboard14InjectKeyEventERKNS1_8KeyEventE>
    }
ffffffff8001212b:	c9                   	leave
ffffffff8001212c:	c3                   	ret
ffffffff8001212d:	0f 1f 00             	nopl   (%rax)
                ascii = g_ScancodeToAsciiShifted[scancode];
ffffffff80012130:	0f b6 d0             	movzbl %al,%edx
            if (shift) {
ffffffff80012133:	45 84 d2             	test   %r10b,%r10b
ffffffff80012136:	74 10                	je     ffffffff80012148 <_ZN7Drivers3USB11HidKeyboardL9InjectKeyEhbhb+0x78>
                ascii = g_ScancodeToAsciiShifted[scancode];
ffffffff80012138:	0f b6 92 e0 da 02 80 	movzbl -0x7ffd2520(%rdx),%edx
ffffffff8001213f:	eb c7                	jmp    ffffffff80012108 <_ZN7Drivers3USB11HidKeyboardL9InjectKeyEhbhb+0x38>
ffffffff80012141:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
                ascii = g_ScancodeToAscii[scancode];
ffffffff80012148:	0f b6 92 60 db 02 80 	movzbl -0x7ffd24a0(%rdx),%edx
ffffffff8001214f:	eb b7                	jmp    ffffffff80012108 <_ZN7Drivers3USB11HidKeyboardL9InjectKeyEhbhb+0x38>
ffffffff80012151:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80012158:	00 00 00 
ffffffff8001215b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80012160 <_ZN7Drivers3USB11HidKeyboard14RegisterDeviceEh>:

    // -------------------------------------------------------------------------
    // Public API
    // -------------------------------------------------------------------------

    void RegisterDevice(uint8_t slotId) {
ffffffff80012160:	55                   	push   %rbp

        // Reset state
        for (int i = 0; i < 6; i++) g_PrevKeys[i] = 0;
        g_PrevModifiers = 0;
        g_RepeatKey = 0;
        g_HoldCount = 0;
ffffffff80012161:	31 d2                	xor    %edx,%edx
        for (int i = 0; i < 6; i++) g_PrevKeys[i] = 0;
ffffffff80012163:	31 c0                	xor    %eax,%eax
    void RegisterDevice(uint8_t slotId) {
ffffffff80012165:	48 89 e5             	mov    %rsp,%rbp
ffffffff80012168:	53                   	push   %rbx
ffffffff80012169:	89 fb                	mov    %edi,%ebx
            Print(string);
ffffffff8001216b:	48 c7 c7 ff b1 02 80 	mov    $0xffffffff8002b1ff,%rdi
ffffffff80012172:	48 83 ec 08          	sub    $0x8,%rsp
        g_HoldCount = 0;
ffffffff80012176:	66 89 15 15 51 13 00 	mov    %dx,0x135115(%rip)        # ffffffff80147292 <_ZN7Drivers3USB11HidKeyboardL11g_HoldCountE>
        for (int i = 0; i < 6; i++) g_PrevKeys[i] = 0;
ffffffff8001217d:	66 89 05 18 51 13 00 	mov    %ax,0x135118(%rip)        # ffffffff8014729c <_ZN7Drivers3USB11HidKeyboardL10g_PrevKeysE+0x4>
            g_kernelLogDepth++;
ffffffff80012184:	83 05 19 d3 1c 00 01 	addl   $0x1,0x1cd319(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001218b:	c7 05 03 51 13 00 00 	movl   $0x0,0x135103(%rip)        # ffffffff80147298 <_ZN7Drivers3USB11HidKeyboardL10g_PrevKeysE>
ffffffff80012192:	00 00 00 
        g_PrevModifiers = 0;
ffffffff80012195:	c6 05 f9 50 13 00 00 	movb   $0x0,0x1350f9(%rip)        # ffffffff80147295 <_ZN7Drivers3USB11HidKeyboardL15g_PrevModifiersE>
        g_RepeatKey = 0;
ffffffff8001219c:	c6 05 f1 50 13 00 00 	movb   $0x0,0x1350f1(%rip)        # ffffffff80147294 <_ZN7Drivers3USB11HidKeyboardL11g_RepeatKeyE>
            Print(string);
ffffffff800121a3:	e8 18 10 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800121a8:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800121af:	e8 0c 10 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800121b4:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800121bb:	e8 00 10 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800121c0:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff800121c7:	e8 f4 0f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800121cc:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800121d3:	e8 e8 0f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800121d8:	48 c7 c7 a8 c9 02 80 	mov    $0xffffffff8002c9a8,%rdi
ffffffff800121df:	e8 dc 0f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>

        KernelLogStream(OK, "USB/KB") << "Registered HID keyboard on slot " << (uint64_t)slotId;
ffffffff800121e4:	0f b6 fb             	movzbl %bl,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800121e7:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800121ec:	e8 9f 82 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800121f1:	48 89 c7             	mov    %rax,%rdi
ffffffff800121f4:	e8 c7 0f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800121f9:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80012200:	e8 bb 0f 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80012205:	83 2d 98 d2 1c 00 01 	subl   $0x1,0x1cd298(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff8001220c:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff80012210:	c9                   	leave
ffffffff80012211:	c3                   	ret
ffffffff80012212:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80012219:	00 00 00 
ffffffff8001221c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff80012220 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht>:

    void ProcessReport(const uint8_t* data, uint16_t length) {
        if (length < 8) return;
ffffffff80012220:	66 83 fe 07          	cmp    $0x7,%si
ffffffff80012224:	0f 86 c6 03 00 00    	jbe    ffffffff800125f0 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x3d0>
    void ProcessReport(const uint8_t* data, uint16_t length) {
ffffffff8001222a:	55                   	push   %rbp
ffffffff8001222b:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001222e:	41 57                	push   %r15
ffffffff80012230:	41 56                	push   %r14
ffffffff80012232:	49 89 fe             	mov    %rdi,%r14
ffffffff80012235:	41 55                	push   %r13
ffffffff80012237:	41 54                	push   %r12

        uint8_t modifiers   = data[0];
        // data[1] is reserved
        const uint8_t* keys = &data[2];
ffffffff80012239:	4c 8d 67 02          	lea    0x2(%rdi),%r12
    void ProcessReport(const uint8_t* data, uint16_t length) {
ffffffff8001223d:	53                   	push   %rbx
ffffffff8001223e:	48 83 ec 38          	sub    $0x38,%rsp
        uint8_t modifiers   = data[0];
ffffffff80012242:	44 0f b6 3f          	movzbl (%rdi),%r15d

        // -----------------------------------------------------------------
        // Handle modifier changes
        // -----------------------------------------------------------------
        uint8_t modChanged = modifiers ^ g_PrevModifiers;
ffffffff80012246:	0f b6 1d 48 50 13 00 	movzbl 0x135048(%rip),%ebx        # ffffffff80147295 <_ZN7Drivers3USB11HidKeyboardL15g_PrevModifiersE>
ffffffff8001224d:	44 31 fb             	xor    %r15d,%ebx

        if (modChanged & MOD_LEFT_CTRL) {
ffffffff80012250:	f6 c3 01             	test   $0x1,%bl
ffffffff80012253:	0f 85 47 03 00 00    	jne    ffffffff800125a0 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x380>
            InjectModifierKey(SC_LEFT_CTRL, (modifiers & MOD_LEFT_CTRL) != 0, modifiers);
        }
        if (modChanged & MOD_LEFT_SHIFT) {
ffffffff80012259:	f6 c3 02             	test   $0x2,%bl
ffffffff8001225c:	0f 85 ee 02 00 00    	jne    ffffffff80012550 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x330>
            InjectModifierKey(SC_LEFT_SHIFT, (modifiers & MOD_LEFT_SHIFT) != 0, modifiers);
        }
        if (modChanged & MOD_LEFT_ALT) {
ffffffff80012262:	f6 c3 04             	test   $0x4,%bl
ffffffff80012265:	0f 85 8d 02 00 00    	jne    ffffffff800124f8 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x2d8>
            InjectModifierKey(SC_LEFT_ALT, (modifiers & MOD_LEFT_ALT) != 0, modifiers);
        }
        if (modChanged & MOD_RIGHT_CTRL) {
ffffffff8001226b:	f6 c3 10             	test   $0x10,%bl
ffffffff8001226e:	0f 85 34 02 00 00    	jne    ffffffff800124a8 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x288>
            InjectModifierKey(SC_RIGHT_CTRL, (modifiers & MOD_RIGHT_CTRL) != 0, modifiers);
        }
        if (modChanged & MOD_RIGHT_SHIFT) {
ffffffff80012274:	f6 c3 20             	test   $0x20,%bl
ffffffff80012277:	0f 85 db 01 00 00    	jne    ffffffff80012458 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x238>
            InjectModifierKey(SC_RIGHT_SHIFT, (modifiers & MOD_RIGHT_SHIFT) != 0, modifiers);
        }
        if (modChanged & MOD_RIGHT_ALT) {
ffffffff8001227d:	83 e3 40             	and    $0x40,%ebx
ffffffff80012280:	0f 85 8a 01 00 00    	jne    ffffffff80012410 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x1f0>

        // -----------------------------------------------------------------
        // Detect newly pressed keys (in current but not in previous)
        // -----------------------------------------------------------------
        bool newKeyPressed = false;
        for (int i = 0; i < 6; i++) {
ffffffff80012286:	4d 89 e0             	mov    %r12,%r8
ffffffff80012289:	4d 8d 6e 08          	lea    0x8(%r14),%r13
    void ProcessReport(const uint8_t* data, uint16_t length) {
ffffffff8001228d:	4d 89 e2             	mov    %r12,%r10
ffffffff80012290:	45 31 c9             	xor    %r9d,%r9d
ffffffff80012293:	eb 14                	jmp    ffffffff800122a9 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x89>
ffffffff80012295:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001229c:	00 00 00 00 
        for (int i = 0; i < 6; i++) {
ffffffff800122a0:	49 83 c2 01          	add    $0x1,%r10
ffffffff800122a4:	4d 39 ea             	cmp    %r13,%r10
ffffffff800122a7:	74 77                	je     ffffffff80012320 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x100>
            uint8_t key = keys[i];
ffffffff800122a9:	41 0f b6 1a          	movzbl (%r10),%ebx
            if (key == 0) continue;
ffffffff800122ad:	84 db                	test   %bl,%bl
ffffffff800122af:	74 ef                	je     ffffffff800122a0 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x80>
ffffffff800122b1:	48 c7 c0 98 72 14 80 	mov    $0xffffffff80147298,%rax
            if (arr[i] == key) return true;
ffffffff800122b8:	3a 18                	cmp    (%rax),%bl
ffffffff800122ba:	74 e4                	je     ffffffff800122a0 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x80>
        for (int i = 0; i < 6; i++) {
ffffffff800122bc:	48 83 c0 01          	add    $0x1,%rax
ffffffff800122c0:	48 3d 9e 72 14 80    	cmp    $0xffffffff8014729e,%rax
ffffffff800122c6:	75 f0                	jne    ffffffff800122b8 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x98>

            if (!KeyInArray(key, g_PrevKeys)) {
                uint8_t scancode = g_HidToScancode[key];
ffffffff800122c8:	0f b6 c3             	movzbl %bl,%eax
ffffffff800122cb:	0f b6 b8 e0 db 02 80 	movzbl -0x7ffd2420(%rax),%edi
                if (scancode != 0) {
ffffffff800122d2:	40 84 ff             	test   %dil,%dil
ffffffff800122d5:	74 c9                	je     ffffffff800122a0 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x80>
        return (hidUsage >= 0x39 && hidUsage <= 0x53);
ffffffff800122d7:	8d 43 c7             	lea    -0x39(%rbx),%eax
ffffffff800122da:	31 c9                	xor    %ecx,%ecx
                    InjectKey(scancode, true, modifiers, IsNonCharKey(key));
ffffffff800122dc:	41 0f b6 d7          	movzbl %r15b,%edx
ffffffff800122e0:	be 01 00 00 00       	mov    $0x1,%esi
        return (hidUsage >= 0x39 && hidUsage <= 0x53);
ffffffff800122e5:	3c 1a                	cmp    $0x1a,%al
ffffffff800122e7:	4c 89 55 b0          	mov    %r10,-0x50(%rbp)
ffffffff800122eb:	0f 96 c1             	setbe  %cl
ffffffff800122ee:	4c 89 45 b8          	mov    %r8,-0x48(%rbp)
                    InjectKey(scancode, true, modifiers, IsNonCharKey(key));
ffffffff800122f2:	e8 d9 fd ff ff       	call   ffffffff800120d0 <_ZN7Drivers3USB11HidKeyboardL9InjectKeyEhbhb>
                    g_RepeatKey = key;
                    g_HoldCount = 0;
                    newKeyPressed = true;
ffffffff800122f7:	4c 8b 55 b0          	mov    -0x50(%rbp),%r10
                    g_HoldCount = 0;
ffffffff800122fb:	31 d2                	xor    %edx,%edx
                    newKeyPressed = true;
ffffffff800122fd:	4c 8b 45 b8          	mov    -0x48(%rbp),%r8
                    g_RepeatKey = key;
ffffffff80012301:	88 1d 8d 4f 13 00    	mov    %bl,0x134f8d(%rip)        # ffffffff80147294 <_ZN7Drivers3USB11HidKeyboardL11g_RepeatKeyE>
                    newKeyPressed = true;
ffffffff80012307:	41 b9 01 00 00 00    	mov    $0x1,%r9d
        for (int i = 0; i < 6; i++) {
ffffffff8001230d:	49 83 c2 01          	add    $0x1,%r10
                    g_HoldCount = 0;
ffffffff80012311:	66 89 15 7a 4f 13 00 	mov    %dx,0x134f7a(%rip)        # ffffffff80147292 <_ZN7Drivers3USB11HidKeyboardL11g_HoldCountE>
        for (int i = 0; i < 6; i++) {
ffffffff80012318:	4d 39 ea             	cmp    %r13,%r10
ffffffff8001231b:	75 8c                	jne    ffffffff800122a9 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x89>
ffffffff8001231d:	0f 1f 00             	nopl   (%rax)
        }

        // -----------------------------------------------------------------
        // Detect released keys (in previous but not in current)
        // -----------------------------------------------------------------
        for (int i = 0; i < 6; i++) {
ffffffff80012320:	49 c7 c2 98 72 14 80 	mov    $0xffffffff80147298,%r10
ffffffff80012327:	eb 24                	jmp    ffffffff8001234d <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x12d>
ffffffff80012329:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80012330:	00 00 00 00 
ffffffff80012334:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001233b:	00 00 00 00 
ffffffff8001233f:	90                   	nop
ffffffff80012340:	49 83 c2 01          	add    $0x1,%r10
ffffffff80012344:	49 81 fa 9e 72 14 80 	cmp    $0xffffffff8014729e,%r10
ffffffff8001234b:	74 53                	je     ffffffff800123a0 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x180>
            uint8_t key = g_PrevKeys[i];
ffffffff8001234d:	41 0f b6 1a          	movzbl (%r10),%ebx
            if (key == 0) continue;
ffffffff80012351:	84 db                	test   %bl,%bl
ffffffff80012353:	74 eb                	je     ffffffff80012340 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x120>
ffffffff80012355:	4c 89 e0             	mov    %r12,%rax
            if (arr[i] == key) return true;
ffffffff80012358:	3a 18                	cmp    (%rax),%bl
ffffffff8001235a:	74 e4                	je     ffffffff80012340 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x120>
        for (int i = 0; i < 6; i++) {
ffffffff8001235c:	48 83 c0 01          	add    $0x1,%rax
ffffffff80012360:	4c 39 e8             	cmp    %r13,%rax
ffffffff80012363:	75 f3                	jne    ffffffff80012358 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x138>

            if (!KeyInArray(key, keys)) {
                uint8_t scancode = g_HidToScancode[key];
ffffffff80012365:	0f b6 c3             	movzbl %bl,%eax
ffffffff80012368:	0f b6 80 e0 db 02 80 	movzbl -0x7ffd2420(%rax),%eax
                if (scancode != 0) {
ffffffff8001236f:	84 c0                	test   %al,%al
ffffffff80012371:	0f 85 81 02 00 00    	jne    ffffffff800125f8 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x3d8>
                    InjectKey(scancode, false, modifiers, IsNonCharKey(key));
                }
                if (key == g_RepeatKey) {
ffffffff80012377:	38 1d 17 4f 13 00    	cmp    %bl,0x134f17(%rip)        # ffffffff80147294 <_ZN7Drivers3USB11HidKeyboardL11g_RepeatKeyE>
ffffffff8001237d:	75 c1                	jne    ffffffff80012340 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x120>
                    g_RepeatKey = 0;
                    g_HoldCount = 0;
ffffffff8001237f:	31 c0                	xor    %eax,%eax
        for (int i = 0; i < 6; i++) {
ffffffff80012381:	49 83 c2 01          	add    $0x1,%r10
                    g_RepeatKey = 0;
ffffffff80012385:	c6 05 08 4f 13 00 00 	movb   $0x0,0x134f08(%rip)        # ffffffff80147294 <_ZN7Drivers3USB11HidKeyboardL11g_RepeatKeyE>
                    g_HoldCount = 0;
ffffffff8001238c:	66 89 05 ff 4e 13 00 	mov    %ax,0x134eff(%rip)        # ffffffff80147292 <_ZN7Drivers3USB11HidKeyboardL11g_HoldCountE>
        for (int i = 0; i < 6; i++) {
ffffffff80012393:	49 81 fa 9e 72 14 80 	cmp    $0xffffffff8014729e,%r10
ffffffff8001239a:	75 b1                	jne    ffffffff8001234d <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x12d>
ffffffff8001239c:	0f 1f 40 00          	nopl   0x0(%rax)
        }

        // -----------------------------------------------------------------
        // Typematic repeat for held keys
        // -----------------------------------------------------------------
        if (!newKeyPressed && g_RepeatKey != 0 && KeyInArray(g_RepeatKey, keys)) {
ffffffff800123a0:	45 84 c9             	test   %r9b,%r9b
ffffffff800123a3:	74 4b                	je     ffffffff800123f0 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x1d0>
        }

        // -----------------------------------------------------------------
        // Save current state for next report
        // -----------------------------------------------------------------
        for (int i = 0; i < 6; i++) g_PrevKeys[i] = keys[i];
ffffffff800123a5:	31 c0                	xor    %eax,%eax
ffffffff800123a7:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800123ae:	00 00 00 00 
ffffffff800123b2:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800123b9:	00 00 00 00 
ffffffff800123bd:	0f 1f 00             	nopl   (%rax)
ffffffff800123c0:	41 0f b6 54 06 02    	movzbl 0x2(%r14,%rax,1),%edx
ffffffff800123c6:	88 90 98 72 14 80    	mov    %dl,-0x7feb8d68(%rax)
ffffffff800123cc:	48 83 c0 01          	add    $0x1,%rax
ffffffff800123d0:	48 83 f8 06          	cmp    $0x6,%rax
ffffffff800123d4:	75 ea                	jne    ffffffff800123c0 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x1a0>
        g_PrevModifiers = modifiers;
ffffffff800123d6:	44 88 3d b8 4e 13 00 	mov    %r15b,0x134eb8(%rip)        # ffffffff80147295 <_ZN7Drivers3USB11HidKeyboardL15g_PrevModifiersE>
    }
ffffffff800123dd:	48 83 c4 38          	add    $0x38,%rsp
ffffffff800123e1:	5b                   	pop    %rbx
ffffffff800123e2:	41 5c                	pop    %r12
ffffffff800123e4:	41 5d                	pop    %r13
ffffffff800123e6:	41 5e                	pop    %r14
ffffffff800123e8:	41 5f                	pop    %r15
ffffffff800123ea:	5d                   	pop    %rbp
ffffffff800123eb:	c3                   	ret
ffffffff800123ec:	0f 1f 40 00          	nopl   0x0(%rax)
        if (!newKeyPressed && g_RepeatKey != 0 && KeyInArray(g_RepeatKey, keys)) {
ffffffff800123f0:	0f b6 05 9d 4e 13 00 	movzbl 0x134e9d(%rip),%eax        # ffffffff80147294 <_ZN7Drivers3USB11HidKeyboardL11g_RepeatKeyE>
ffffffff800123f7:	84 c0                	test   %al,%al
ffffffff800123f9:	74 aa                	je     ffffffff800123a5 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x185>
            if (arr[i] == key) return true;
ffffffff800123fb:	41 3a 00             	cmp    (%r8),%al
ffffffff800123fe:	0f 84 2b 02 00 00    	je     ffffffff8001262f <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x40f>
        for (int i = 0; i < 6; i++) {
ffffffff80012404:	49 83 c0 01          	add    $0x1,%r8
ffffffff80012408:	4d 39 e8             	cmp    %r13,%r8
ffffffff8001240b:	75 ee                	jne    ffffffff800123fb <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x1db>
ffffffff8001240d:	eb 96                	jmp    ffffffff800123a5 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x185>
ffffffff8001240f:	90                   	nop
            InjectModifierKey(SC_RIGHT_ALT, (modifiers & MOD_RIGHT_ALT) != 0, modifiers);
ffffffff80012410:	44 89 f8             	mov    %r15d,%eax
        Drivers::PS2::Keyboard::KeyEvent event = {
ffffffff80012413:	31 c9                	xor    %ecx,%ecx
ffffffff80012415:	c7 45 ca 00 00 00 00 	movl   $0x0,-0x36(%rbp)
        Drivers::PS2::Keyboard::InjectKeyEvent(event);
ffffffff8001241c:	48 8d 7d c9          	lea    -0x37(%rbp),%rdi
            InjectModifierKey(SC_RIGHT_ALT, (modifiers & MOD_RIGHT_ALT) != 0, modifiers);
ffffffff80012420:	c0 e8 06             	shr    $0x6,%al
        Drivers::PS2::Keyboard::KeyEvent event = {
ffffffff80012423:	66 89 4d ce          	mov    %cx,-0x32(%rbp)
            InjectModifierKey(SC_RIGHT_ALT, (modifiers & MOD_RIGHT_ALT) != 0, modifiers);
ffffffff80012427:	83 e0 01             	and    $0x1,%eax
            .Shift    = (modifiers & (MOD_LEFT_SHIFT | MOD_RIGHT_SHIFT)) != 0,
ffffffff8001242a:	41 f6 c7 22          	test   $0x22,%r15b
        };
ffffffff8001242e:	c6 45 c9 38          	movb   $0x38,-0x37(%rbp)
ffffffff80012432:	0f 95 45 cc          	setne  -0x34(%rbp)
            .Ctrl     = (modifiers & (MOD_LEFT_CTRL | MOD_RIGHT_CTRL)) != 0,
ffffffff80012436:	41 f6 c7 11          	test   $0x11,%r15b
        };
ffffffff8001243a:	0f 95 45 cd          	setne  -0x33(%rbp)
            .Alt      = (modifiers & (MOD_LEFT_ALT | MOD_RIGHT_ALT)) != 0,
ffffffff8001243e:	41 f6 c7 44          	test   $0x44,%r15b
            InjectModifierKey(SC_RIGHT_ALT, (modifiers & MOD_RIGHT_ALT) != 0, modifiers);
ffffffff80012442:	88 45 cb             	mov    %al,-0x35(%rbp)
        };
ffffffff80012445:	0f 95 45 ce          	setne  -0x32(%rbp)
        Drivers::PS2::Keyboard::InjectKeyEvent(event);
ffffffff80012449:	e8 c2 eb ff ff       	call   ffffffff80011010 <_ZN7Drivers3PS28Keyboard14InjectKeyEventERKNS1_8KeyEventE>
    }
ffffffff8001244e:	e9 33 fe ff ff       	jmp    ffffffff80012286 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x66>
ffffffff80012453:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            InjectModifierKey(SC_RIGHT_SHIFT, (modifiers & MOD_RIGHT_SHIFT) != 0, modifiers);
ffffffff80012458:	44 89 f8             	mov    %r15d,%eax
        Drivers::PS2::Keyboard::KeyEvent event = {
ffffffff8001245b:	31 f6                	xor    %esi,%esi
ffffffff8001245d:	c7 45 ca 00 00 00 00 	movl   $0x0,-0x36(%rbp)
        Drivers::PS2::Keyboard::InjectKeyEvent(event);
ffffffff80012464:	48 8d 7d c9          	lea    -0x37(%rbp),%rdi
            InjectModifierKey(SC_RIGHT_SHIFT, (modifiers & MOD_RIGHT_SHIFT) != 0, modifiers);
ffffffff80012468:	c0 e8 05             	shr    $0x5,%al
        Drivers::PS2::Keyboard::KeyEvent event = {
ffffffff8001246b:	66 89 75 ce          	mov    %si,-0x32(%rbp)
            InjectModifierKey(SC_RIGHT_SHIFT, (modifiers & MOD_RIGHT_SHIFT) != 0, modifiers);
ffffffff8001246f:	83 e0 01             	and    $0x1,%eax
            .Shift    = (modifiers & (MOD_LEFT_SHIFT | MOD_RIGHT_SHIFT)) != 0,
ffffffff80012472:	41 f6 c7 22          	test   $0x22,%r15b
        };
ffffffff80012476:	c6 45 c9 36          	movb   $0x36,-0x37(%rbp)
ffffffff8001247a:	0f 95 45 cc          	setne  -0x34(%rbp)
            .Ctrl     = (modifiers & (MOD_LEFT_CTRL | MOD_RIGHT_CTRL)) != 0,
ffffffff8001247e:	41 f6 c7 11          	test   $0x11,%r15b
        };
ffffffff80012482:	0f 95 45 cd          	setne  -0x33(%rbp)
            .Alt      = (modifiers & (MOD_LEFT_ALT | MOD_RIGHT_ALT)) != 0,
ffffffff80012486:	41 f6 c7 44          	test   $0x44,%r15b
        };
ffffffff8001248a:	0f 95 45 ce          	setne  -0x32(%rbp)
            InjectModifierKey(SC_RIGHT_SHIFT, (modifiers & MOD_RIGHT_SHIFT) != 0, modifiers);
ffffffff8001248e:	88 45 cb             	mov    %al,-0x35(%rbp)
        Drivers::PS2::Keyboard::InjectKeyEvent(event);
ffffffff80012491:	e8 7a eb ff ff       	call   ffffffff80011010 <_ZN7Drivers3PS28Keyboard14InjectKeyEventERKNS1_8KeyEventE>
        if (modChanged & MOD_RIGHT_ALT) {
ffffffff80012496:	83 e3 40             	and    $0x40,%ebx
ffffffff80012499:	0f 84 e7 fd ff ff    	je     ffffffff80012286 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x66>
ffffffff8001249f:	e9 6c ff ff ff       	jmp    ffffffff80012410 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x1f0>
ffffffff800124a4:	0f 1f 40 00          	nopl   0x0(%rax)
            InjectModifierKey(SC_RIGHT_CTRL, (modifiers & MOD_RIGHT_CTRL) != 0, modifiers);
ffffffff800124a8:	44 89 f8             	mov    %r15d,%eax
        Drivers::PS2::Keyboard::KeyEvent event = {
ffffffff800124ab:	31 ff                	xor    %edi,%edi
ffffffff800124ad:	c7 45 ca 00 00 00 00 	movl   $0x0,-0x36(%rbp)
            InjectModifierKey(SC_RIGHT_CTRL, (modifiers & MOD_RIGHT_CTRL) != 0, modifiers);
ffffffff800124b4:	c0 e8 04             	shr    $0x4,%al
        Drivers::PS2::Keyboard::KeyEvent event = {
ffffffff800124b7:	66 89 7d ce          	mov    %di,-0x32(%rbp)
        Drivers::PS2::Keyboard::InjectKeyEvent(event);
ffffffff800124bb:	48 8d 7d c9          	lea    -0x37(%rbp),%rdi
            InjectModifierKey(SC_RIGHT_CTRL, (modifiers & MOD_RIGHT_CTRL) != 0, modifiers);
ffffffff800124bf:	83 e0 01             	and    $0x1,%eax
            .Shift    = (modifiers & (MOD_LEFT_SHIFT | MOD_RIGHT_SHIFT)) != 0,
ffffffff800124c2:	41 f6 c7 22          	test   $0x22,%r15b
        };
ffffffff800124c6:	c6 45 c9 1d          	movb   $0x1d,-0x37(%rbp)
ffffffff800124ca:	0f 95 45 cc          	setne  -0x34(%rbp)
            .Ctrl     = (modifiers & (MOD_LEFT_CTRL | MOD_RIGHT_CTRL)) != 0,
ffffffff800124ce:	41 f6 c7 11          	test   $0x11,%r15b
        };
ffffffff800124d2:	0f 95 45 cd          	setne  -0x33(%rbp)
            .Alt      = (modifiers & (MOD_LEFT_ALT | MOD_RIGHT_ALT)) != 0,
ffffffff800124d6:	41 f6 c7 44          	test   $0x44,%r15b
        };
ffffffff800124da:	0f 95 45 ce          	setne  -0x32(%rbp)
            InjectModifierKey(SC_RIGHT_CTRL, (modifiers & MOD_RIGHT_CTRL) != 0, modifiers);
ffffffff800124de:	88 45 cb             	mov    %al,-0x35(%rbp)
        Drivers::PS2::Keyboard::InjectKeyEvent(event);
ffffffff800124e1:	e8 2a eb ff ff       	call   ffffffff80011010 <_ZN7Drivers3PS28Keyboard14InjectKeyEventERKNS1_8KeyEventE>
        if (modChanged & MOD_RIGHT_SHIFT) {
ffffffff800124e6:	f6 c3 20             	test   $0x20,%bl
ffffffff800124e9:	0f 84 8e fd ff ff    	je     ffffffff8001227d <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x5d>
ffffffff800124ef:	e9 64 ff ff ff       	jmp    ffffffff80012458 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x238>
ffffffff800124f4:	0f 1f 40 00          	nopl   0x0(%rax)
            InjectModifierKey(SC_LEFT_ALT, (modifiers & MOD_LEFT_ALT) != 0, modifiers);
ffffffff800124f8:	44 89 f8             	mov    %r15d,%eax
        Drivers::PS2::Keyboard::KeyEvent event = {
ffffffff800124fb:	45 31 c0             	xor    %r8d,%r8d
        Drivers::PS2::Keyboard::InjectKeyEvent(event);
ffffffff800124fe:	48 8d 7d c9          	lea    -0x37(%rbp),%rdi
        };
ffffffff80012502:	c6 45 c9 38          	movb   $0x38,-0x37(%rbp)
            InjectModifierKey(SC_LEFT_ALT, (modifiers & MOD_LEFT_ALT) != 0, modifiers);
ffffffff80012506:	c0 e8 02             	shr    $0x2,%al
        Drivers::PS2::Keyboard::KeyEvent event = {
ffffffff80012509:	c7 45 ca 00 00 00 00 	movl   $0x0,-0x36(%rbp)
            InjectModifierKey(SC_LEFT_ALT, (modifiers & MOD_LEFT_ALT) != 0, modifiers);
ffffffff80012510:	83 e0 01             	and    $0x1,%eax
            .Shift    = (modifiers & (MOD_LEFT_SHIFT | MOD_RIGHT_SHIFT)) != 0,
ffffffff80012513:	41 f6 c7 22          	test   $0x22,%r15b
        Drivers::PS2::Keyboard::KeyEvent event = {
ffffffff80012517:	66 44 89 45 ce       	mov    %r8w,-0x32(%rbp)
        };
ffffffff8001251c:	0f 95 45 cc          	setne  -0x34(%rbp)
            .Ctrl     = (modifiers & (MOD_LEFT_CTRL | MOD_RIGHT_CTRL)) != 0,
ffffffff80012520:	41 f6 c7 11          	test   $0x11,%r15b
        };
ffffffff80012524:	0f 95 45 cd          	setne  -0x33(%rbp)
            .Alt      = (modifiers & (MOD_LEFT_ALT | MOD_RIGHT_ALT)) != 0,
ffffffff80012528:	41 f6 c7 44          	test   $0x44,%r15b
        };
ffffffff8001252c:	0f 95 45 ce          	setne  -0x32(%rbp)
            InjectModifierKey(SC_LEFT_ALT, (modifiers & MOD_LEFT_ALT) != 0, modifiers);
ffffffff80012530:	88 45 cb             	mov    %al,-0x35(%rbp)
        Drivers::PS2::Keyboard::InjectKeyEvent(event);
ffffffff80012533:	e8 d8 ea ff ff       	call   ffffffff80011010 <_ZN7Drivers3PS28Keyboard14InjectKeyEventERKNS1_8KeyEventE>
        if (modChanged & MOD_RIGHT_CTRL) {
ffffffff80012538:	f6 c3 10             	test   $0x10,%bl
ffffffff8001253b:	0f 84 33 fd ff ff    	je     ffffffff80012274 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x54>
ffffffff80012541:	e9 62 ff ff ff       	jmp    ffffffff800124a8 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x288>
ffffffff80012546:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001254d:	00 00 00 
            InjectModifierKey(SC_LEFT_SHIFT, (modifiers & MOD_LEFT_SHIFT) != 0, modifiers);
ffffffff80012550:	44 89 f8             	mov    %r15d,%eax
        Drivers::PS2::Keyboard::KeyEvent event = {
ffffffff80012553:	45 31 c9             	xor    %r9d,%r9d
        Drivers::PS2::Keyboard::InjectKeyEvent(event);
ffffffff80012556:	48 8d 7d c9          	lea    -0x37(%rbp),%rdi
        };
ffffffff8001255a:	c6 45 c9 2a          	movb   $0x2a,-0x37(%rbp)
            InjectModifierKey(SC_LEFT_SHIFT, (modifiers & MOD_LEFT_SHIFT) != 0, modifiers);
ffffffff8001255e:	d0 e8                	shr    $1,%al
        Drivers::PS2::Keyboard::KeyEvent event = {
ffffffff80012560:	c7 45 ca 00 00 00 00 	movl   $0x0,-0x36(%rbp)
            InjectModifierKey(SC_LEFT_SHIFT, (modifiers & MOD_LEFT_SHIFT) != 0, modifiers);
ffffffff80012567:	83 e0 01             	and    $0x1,%eax
            .Shift    = (modifiers & (MOD_LEFT_SHIFT | MOD_RIGHT_SHIFT)) != 0,
ffffffff8001256a:	41 f6 c7 22          	test   $0x22,%r15b
        Drivers::PS2::Keyboard::KeyEvent event = {
ffffffff8001256e:	66 44 89 4d ce       	mov    %r9w,-0x32(%rbp)
        };
ffffffff80012573:	0f 95 45 cc          	setne  -0x34(%rbp)
            .Ctrl     = (modifiers & (MOD_LEFT_CTRL | MOD_RIGHT_CTRL)) != 0,
ffffffff80012577:	41 f6 c7 11          	test   $0x11,%r15b
        };
ffffffff8001257b:	0f 95 45 cd          	setne  -0x33(%rbp)
            .Alt      = (modifiers & (MOD_LEFT_ALT | MOD_RIGHT_ALT)) != 0,
ffffffff8001257f:	41 f6 c7 44          	test   $0x44,%r15b
        };
ffffffff80012583:	0f 95 45 ce          	setne  -0x32(%rbp)
            InjectModifierKey(SC_LEFT_SHIFT, (modifiers & MOD_LEFT_SHIFT) != 0, modifiers);
ffffffff80012587:	88 45 cb             	mov    %al,-0x35(%rbp)
        Drivers::PS2::Keyboard::InjectKeyEvent(event);
ffffffff8001258a:	e8 81 ea ff ff       	call   ffffffff80011010 <_ZN7Drivers3PS28Keyboard14InjectKeyEventERKNS1_8KeyEventE>
        if (modChanged & MOD_LEFT_ALT) {
ffffffff8001258f:	f6 c3 04             	test   $0x4,%bl
ffffffff80012592:	0f 84 d3 fc ff ff    	je     ffffffff8001226b <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x4b>
ffffffff80012598:	e9 5b ff ff ff       	jmp    ffffffff800124f8 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x2d8>
ffffffff8001259d:	0f 1f 00             	nopl   (%rax)
        };
ffffffff800125a0:	44 89 f8             	mov    %r15d,%eax
        Drivers::PS2::Keyboard::KeyEvent event = {
ffffffff800125a3:	45 31 d2             	xor    %r10d,%r10d
        Drivers::PS2::Keyboard::InjectKeyEvent(event);
ffffffff800125a6:	48 8d 7d c9          	lea    -0x37(%rbp),%rdi
        };
ffffffff800125aa:	c6 45 c9 1d          	movb   $0x1d,-0x37(%rbp)
ffffffff800125ae:	83 e0 01             	and    $0x1,%eax
            .Shift    = (modifiers & (MOD_LEFT_SHIFT | MOD_RIGHT_SHIFT)) != 0,
ffffffff800125b1:	41 f6 c7 22          	test   $0x22,%r15b
        Drivers::PS2::Keyboard::KeyEvent event = {
ffffffff800125b5:	66 44 89 55 ce       	mov    %r10w,-0x32(%rbp)
ffffffff800125ba:	c7 45 ca 00 00 00 00 	movl   $0x0,-0x36(%rbp)
        };
ffffffff800125c1:	0f 95 45 cc          	setne  -0x34(%rbp)
            .Ctrl     = (modifiers & (MOD_LEFT_CTRL | MOD_RIGHT_CTRL)) != 0,
ffffffff800125c5:	41 f6 c7 11          	test   $0x11,%r15b
        };
ffffffff800125c9:	0f 95 45 cd          	setne  -0x33(%rbp)
            .Alt      = (modifiers & (MOD_LEFT_ALT | MOD_RIGHT_ALT)) != 0,
ffffffff800125cd:	41 f6 c7 44          	test   $0x44,%r15b
        };
ffffffff800125d1:	0f 95 45 ce          	setne  -0x32(%rbp)
ffffffff800125d5:	88 45 cb             	mov    %al,-0x35(%rbp)
        Drivers::PS2::Keyboard::InjectKeyEvent(event);
ffffffff800125d8:	e8 33 ea ff ff       	call   ffffffff80011010 <_ZN7Drivers3PS28Keyboard14InjectKeyEventERKNS1_8KeyEventE>
        if (modChanged & MOD_LEFT_SHIFT) {
ffffffff800125dd:	f6 c3 02             	test   $0x2,%bl
ffffffff800125e0:	0f 84 7c fc ff ff    	je     ffffffff80012262 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x42>
ffffffff800125e6:	e9 65 ff ff ff       	jmp    ffffffff80012550 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x330>
ffffffff800125eb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff800125f0:	c3                   	ret
ffffffff800125f1:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        return (hidUsage >= 0x39 && hidUsage <= 0x53);
ffffffff800125f8:	8d 53 c7             	lea    -0x39(%rbx),%edx
ffffffff800125fb:	31 c9                	xor    %ecx,%ecx
                    InjectKey(scancode, false, modifiers, IsNonCharKey(key));
ffffffff800125fd:	0f b6 f8             	movzbl %al,%edi
ffffffff80012600:	4c 89 55 a8          	mov    %r10,-0x58(%rbp)
        return (hidUsage >= 0x39 && hidUsage <= 0x53);
ffffffff80012604:	80 fa 1a             	cmp    $0x1a,%dl
                    InjectKey(scancode, false, modifiers, IsNonCharKey(key));
ffffffff80012607:	41 0f b6 d7          	movzbl %r15b,%edx
ffffffff8001260b:	44 88 4d b0          	mov    %r9b,-0x50(%rbp)
        return (hidUsage >= 0x39 && hidUsage <= 0x53);
ffffffff8001260f:	0f 96 c1             	setbe  %cl
                    InjectKey(scancode, false, modifiers, IsNonCharKey(key));
ffffffff80012612:	31 f6                	xor    %esi,%esi
ffffffff80012614:	4c 89 45 b8          	mov    %r8,-0x48(%rbp)
ffffffff80012618:	e8 b3 fa ff ff       	call   ffffffff800120d0 <_ZN7Drivers3USB11HidKeyboardL9InjectKeyEhbhb>
ffffffff8001261d:	4c 8b 55 a8          	mov    -0x58(%rbp),%r10
ffffffff80012621:	44 0f b6 4d b0       	movzbl -0x50(%rbp),%r9d
ffffffff80012626:	4c 8b 45 b8          	mov    -0x48(%rbp),%r8
ffffffff8001262a:	e9 48 fd ff ff       	jmp    ffffffff80012377 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x157>
            g_HoldCount++;
ffffffff8001262f:	0f b7 0d 5c 4c 13 00 	movzwl 0x134c5c(%rip),%ecx        # ffffffff80147292 <_ZN7Drivers3USB11HidKeyboardL11g_HoldCountE>
ffffffff80012636:	8d 51 01             	lea    0x1(%rcx),%edx
ffffffff80012639:	66 89 15 52 4c 13 00 	mov    %dx,0x134c52(%rip)        # ffffffff80147292 <_ZN7Drivers3USB11HidKeyboardL11g_HoldCountE>
            if (g_HoldCount >= TYPEMATIC_DELAY &&
ffffffff80012640:	66 83 fa 1e          	cmp    $0x1e,%dx
ffffffff80012644:	0f 86 5b fd ff ff    	jbe    ffffffff800123a5 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x185>
ffffffff8001264a:	83 e2 01             	and    $0x1,%edx
ffffffff8001264d:	0f 84 52 fd ff ff    	je     ffffffff800123a5 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x185>
                uint8_t scancode = g_HidToScancode[g_RepeatKey];
ffffffff80012653:	0f b6 d0             	movzbl %al,%edx
ffffffff80012656:	0f b6 92 e0 db 02 80 	movzbl -0x7ffd2420(%rdx),%edx
                if (scancode != 0) {
ffffffff8001265d:	84 d2                	test   %dl,%dl
ffffffff8001265f:	0f 84 40 fd ff ff    	je     ffffffff800123a5 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x185>
        return (hidUsage >= 0x39 && hidUsage <= 0x53);
ffffffff80012665:	83 e8 39             	sub    $0x39,%eax
ffffffff80012668:	31 c9                	xor    %ecx,%ecx
                    InjectKey(scancode, true, modifiers, IsNonCharKey(g_RepeatKey));
ffffffff8001266a:	0f b6 fa             	movzbl %dl,%edi
ffffffff8001266d:	be 01 00 00 00       	mov    $0x1,%esi
        return (hidUsage >= 0x39 && hidUsage <= 0x53);
ffffffff80012672:	3c 1a                	cmp    $0x1a,%al
                    InjectKey(scancode, true, modifiers, IsNonCharKey(g_RepeatKey));
ffffffff80012674:	41 0f b6 c7          	movzbl %r15b,%eax
        return (hidUsage >= 0x39 && hidUsage <= 0x53);
ffffffff80012678:	0f 96 c1             	setbe  %cl
                    InjectKey(scancode, true, modifiers, IsNonCharKey(g_RepeatKey));
ffffffff8001267b:	89 c2                	mov    %eax,%edx
ffffffff8001267d:	e8 4e fa ff ff       	call   ffffffff800120d0 <_ZN7Drivers3USB11HidKeyboardL9InjectKeyEhbhb>
ffffffff80012682:	e9 1e fd ff ff       	jmp    ffffffff800123a5 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht+0x185>
ffffffff80012687:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001268e:	00 00 00 
ffffffff80012691:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80012698:	00 00 00 
ffffffff8001269b:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800126a2:	00 00 00 
ffffffff800126a5:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800126ac:	00 00 00 
ffffffff800126af:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800126b6:	00 00 00 
ffffffff800126b9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff800126c0 <_ZN7Drivers3USB8HidMouseL13ExtractSignedEPKhth>:

    // -------------------------------------------------------------------------
    // Bit-field extraction
    // -------------------------------------------------------------------------

    static int32_t ExtractSigned(const uint8_t* data, uint16_t bitOffset, uint8_t bitSize) {
ffffffff800126c0:	49 89 f8             	mov    %rdi,%r8
        int32_t value = 0;
        for (uint8_t i = 0; i < bitSize; i++) {
ffffffff800126c3:	84 d2                	test   %dl,%dl
ffffffff800126c5:	0f 84 8d 00 00 00    	je     ffffffff80012758 <_ZN7Drivers3USB8HidMouseL13ExtractSignedEPKhth+0x98>
ffffffff800126cb:	0f b7 f6             	movzwl %si,%esi
ffffffff800126ce:	44 0f b6 d2          	movzbl %dl,%r10d
ffffffff800126d2:	31 c9                	xor    %ecx,%ecx
        int32_t value = 0;
ffffffff800126d4:	45 31 c9             	xor    %r9d,%r9d
            uint16_t byteIdx = (bitOffset + i) / 8;
            uint8_t  bitIdx  = (bitOffset + i) % 8;
            if (data[byteIdx] & (1 << bitIdx))
                value |= (1 << i);
ffffffff800126d7:	41 bb 01 00 00 00    	mov    $0x1,%r11d
ffffffff800126dd:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800126e4:	00 00 00 00 
ffffffff800126e8:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800126ef:	00 00 00 00 
ffffffff800126f3:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800126fa:	00 00 00 00 
ffffffff800126fe:	66 90                	xchg   %ax,%ax
            uint16_t byteIdx = (bitOffset + i) / 8;
ffffffff80012700:	89 f0                	mov    %esi,%eax
ffffffff80012702:	c1 f8 03             	sar    $0x3,%eax
            if (data[byteIdx] & (1 << bitIdx))
ffffffff80012705:	48 98                	cltq
ffffffff80012707:	41 0f b6 3c 00       	movzbl (%r8,%rax,1),%edi
            uint8_t  bitIdx  = (bitOffset + i) % 8;
ffffffff8001270c:	89 f0                	mov    %esi,%eax
ffffffff8001270e:	83 e0 07             	and    $0x7,%eax
            if (data[byteIdx] & (1 << bitIdx))
ffffffff80012711:	0f a3 c7             	bt     %eax,%edi
ffffffff80012714:	73 08                	jae    ffffffff8001271e <_ZN7Drivers3USB8HidMouseL13ExtractSignedEPKhth+0x5e>
                value |= (1 << i);
ffffffff80012716:	44 89 d8             	mov    %r11d,%eax
ffffffff80012719:	d3 e0                	shl    %cl,%eax
ffffffff8001271b:	41 09 c1             	or     %eax,%r9d
        for (uint8_t i = 0; i < bitSize; i++) {
ffffffff8001271e:	83 c1 01             	add    $0x1,%ecx
ffffffff80012721:	83 c6 01             	add    $0x1,%esi
ffffffff80012724:	41 39 ca             	cmp    %ecx,%r10d
ffffffff80012727:	75 d7                	jne    ffffffff80012700 <_ZN7Drivers3USB8HidMouseL13ExtractSignedEPKhth+0x40>
        }
        // Sign extend
        if (bitSize < 32 && (value & (1 << (bitSize - 1)))) {
ffffffff80012729:	80 fa 1f             	cmp    $0x1f,%dl
ffffffff8001272c:	76 0a                	jbe    ffffffff80012738 <_ZN7Drivers3USB8HidMouseL13ExtractSignedEPKhth+0x78>
            value |= ~((1 << bitSize) - 1);
        }
        return value;
    }
ffffffff8001272e:	44 89 c8             	mov    %r9d,%eax
ffffffff80012731:	c3                   	ret
ffffffff80012732:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        if (bitSize < 32 && (value & (1 << (bitSize - 1)))) {
ffffffff80012738:	41 8d 42 ff          	lea    -0x1(%r10),%eax
ffffffff8001273c:	41 0f a3 c1          	bt     %eax,%r9d
ffffffff80012740:	73 ec                	jae    ffffffff8001272e <_ZN7Drivers3USB8HidMouseL13ExtractSignedEPKhth+0x6e>
            value |= ~((1 << bitSize) - 1);
ffffffff80012742:	44 89 d1             	mov    %r10d,%ecx
ffffffff80012745:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
ffffffff8001274a:	d3 e0                	shl    %cl,%eax
ffffffff8001274c:	41 09 c1             	or     %eax,%r9d
    }
ffffffff8001274f:	44 89 c8             	mov    %r9d,%eax
ffffffff80012752:	c3                   	ret
ffffffff80012753:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        int32_t value = 0;
ffffffff80012758:	45 31 c9             	xor    %r9d,%r9d
    }
ffffffff8001275b:	44 89 c8             	mov    %r9d,%eax
ffffffff8001275e:	c3                   	ret
ffffffff8001275f:	90                   	nop

ffffffff80012760 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht>:
    void ParseReportDescriptor(const uint8_t* desc, uint16_t length) {
ffffffff80012760:	55                   	push   %rbp
ffffffff80012761:	48 89 e5             	mov    %rsp,%rbp
ffffffff80012764:	41 57                	push   %r15
ffffffff80012766:	41 56                	push   %r14
ffffffff80012768:	41 55                	push   %r13
ffffffff8001276a:	41 54                	push   %r12
ffffffff8001276c:	53                   	push   %rbx
ffffffff8001276d:	48 83 ec 58          	sub    $0x58,%rsp
        g_FormatValid = false;
ffffffff80012771:	c6 05 26 4b 13 00 00 	movb   $0x0,0x134b26(%rip)        # ffffffff8014729e <_ZN7Drivers3USB8HidMouseL13g_FormatValidE>
        uint16_t usages[MAX_USAGES] = {};
ffffffff80012778:	48 c7 45 b0 00 00 00 	movq   $0x0,-0x50(%rbp)
ffffffff8001277f:	00 
ffffffff80012780:	48 c7 45 b8 00 00 00 	movq   $0x0,-0x48(%rbp)
ffffffff80012787:	00 
ffffffff80012788:	48 c7 45 c0 00 00 00 	movq   $0x0,-0x40(%rbp)
ffffffff8001278f:	00 
ffffffff80012790:	48 c7 45 c8 00 00 00 	movq   $0x0,-0x38(%rbp)
ffffffff80012797:	00 
        while (pos < length) {
ffffffff80012798:	66 85 f6             	test   %si,%si
ffffffff8001279b:	0f 84 fd 00 00 00    	je     ffffffff8001289e <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x13e>
        uint16_t bitOffset = 0;
ffffffff800127a1:	31 d2                	xor    %edx,%edx
        uint16_t usagePage  = 0;
ffffffff800127a3:	31 c9                	xor    %ecx,%ecx
        MouseReportFormat fmt = {};
ffffffff800127a5:	c6 45 96 00          	movb   $0x0,-0x6a(%rbp)
ffffffff800127a9:	49 89 f8             	mov    %rdi,%r8
ffffffff800127ac:	c6 45 93 00          	movb   $0x0,-0x6d(%rbp)
ffffffff800127b0:	41 89 f1             	mov    %esi,%r9d
        uint16_t pos = 0;
ffffffff800127b3:	31 c0                	xor    %eax,%eax
        bool hasUsageRange = false;
ffffffff800127b5:	45 31 f6             	xor    %r14d,%r14d
        MouseReportFormat fmt = {};
ffffffff800127b8:	c6 45 91 00          	movb   $0x0,-0x6f(%rbp)
        int usageCount = 0;
ffffffff800127bc:	45 31 ff             	xor    %r15d,%r15d
        MouseReportFormat fmt = {};
ffffffff800127bf:	45 31 ed             	xor    %r13d,%r13d
ffffffff800127c2:	45 31 e4             	xor    %r12d,%r12d
ffffffff800127c5:	c6 45 92 00          	movb   $0x0,-0x6e(%rbp)
            if (pos + 1 + dataSize > length) break;
ffffffff800127c9:	0f b7 de             	movzwl %si,%ebx
        MouseReportFormat fmt = {};
ffffffff800127cc:	c6 45 a3 00          	movb   $0x0,-0x5d(%rbp)
        uint16_t bitOffset = 0;
ffffffff800127d0:	66 89 55 94          	mov    %dx,-0x6c(%rbp)
        uint32_t reportCount = 0; // number of fields
ffffffff800127d4:	c7 45 a8 00 00 00 00 	movl   $0x0,-0x58(%rbp)
        uint32_t reportSize = 0;  // bits per field
ffffffff800127db:	c7 45 a4 00 00 00 00 	movl   $0x0,-0x5c(%rbp)
        uint16_t usagePage  = 0;
ffffffff800127e2:	66 89 4d a0          	mov    %cx,-0x60(%rbp)
        MouseReportFormat fmt = {};
ffffffff800127e6:	c6 45 97 00          	movb   $0x0,-0x69(%rbp)
ffffffff800127ea:	c6 45 98 00          	movb   $0x0,-0x68(%rbp)
ffffffff800127ee:	c6 45 a2 00          	movb   $0x0,-0x5e(%rbp)
            uint8_t header = desc[pos];
ffffffff800127f2:	0f b7 f0             	movzwl %ax,%esi
ffffffff800127f5:	8d 78 01             	lea    0x1(%rax),%edi
ffffffff800127f8:	41 0f b6 14 30       	movzbl (%r8,%rsi,1),%edx
            if (header == 0xFE) {
ffffffff800127fd:	80 fa fe             	cmp    $0xfe,%dl
ffffffff80012800:	0f 84 1a 01 00 00    	je     ffffffff80012920 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x1c0>
            uint8_t bType = (header >> 2) & 0x03;
ffffffff80012806:	89 d1                	mov    %edx,%ecx
            uint8_t bTag  = (header >> 4) & 0x0F;
ffffffff80012808:	41 89 d2             	mov    %edx,%r10d
        return sizes[bSize & 0x03];
ffffffff8001280b:	83 e2 03             	and    $0x3,%edx
ffffffff8001280e:	44 0f b6 9a e0 dc 02 	movzbl -0x7ffd2320(%rdx),%r11d
ffffffff80012815:	80 
            if (pos + 1 + dataSize > length) break;
ffffffff80012816:	0f b7 d7             	movzwl %di,%edx
            uint8_t bType = (header >> 2) & 0x03;
ffffffff80012819:	c0 e9 02             	shr    $0x2,%cl
ffffffff8001281c:	83 e1 03             	and    $0x3,%ecx
            uint8_t bTag  = (header >> 4) & 0x0F;
ffffffff8001281f:	41 c0 ea 04          	shr    $0x4,%r10b
            if (pos + 1 + dataSize > length) break;
ffffffff80012823:	44 01 da             	add    %r11d,%edx
        return sizes[bSize & 0x03];
ffffffff80012826:	44 89 d8             	mov    %r11d,%eax
            if (pos + 1 + dataSize > length) break;
ffffffff80012829:	39 da                	cmp    %ebx,%edx
ffffffff8001282b:	7f 63                	jg     ffffffff80012890 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x130>
            uint32_t data = ReadItemData(&desc[pos + 1], dataSize);
ffffffff8001282d:	49 8d 74 30 01       	lea    0x1(%r8,%rsi,1),%rsi
        switch (size) {
ffffffff80012832:	41 80 fb 02          	cmp    $0x2,%r11b
ffffffff80012836:	0f 84 44 01 00 00    	je     ffffffff80012980 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x220>
ffffffff8001283c:	41 80 fb 04          	cmp    $0x4,%r11b
ffffffff80012840:	0f 84 4a 01 00 00    	je     ffffffff80012990 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x230>
ffffffff80012846:	31 d2                	xor    %edx,%edx
ffffffff80012848:	41 80 fb 01          	cmp    $0x1,%r11b
ffffffff8001284c:	75 03                	jne    ffffffff80012851 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0xf1>
        case 1: return p[0];
ffffffff8001284e:	0f b6 16             	movzbl (%rsi),%edx
            pos += 1 + dataSize;
ffffffff80012851:	01 f8                	add    %edi,%eax
            if (bType == 1) {
ffffffff80012853:	80 f9 01             	cmp    $0x1,%cl
ffffffff80012856:	0f 84 ec 00 00 00    	je     ffffffff80012948 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x1e8>
            } else if (bType == 2) {
ffffffff8001285c:	80 f9 02             	cmp    $0x2,%cl
ffffffff8001285f:	0f 84 4b 03 00 00    	je     ffffffff80012bb0 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x450>
            } else if (bType == 0) {
ffffffff80012865:	84 c9                	test   %cl,%cl
ffffffff80012867:	75 13                	jne    ffffffff8001287c <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x11c>
                if (bTag == 8 || bTag == 9) {
ffffffff80012869:	41 8d 4a f8          	lea    -0x8(%r10),%ecx
ffffffff8001286d:	80 f9 01             	cmp    $0x1,%cl
ffffffff80012870:	0f 86 5a 03 00 00    	jbe    ffffffff80012bd0 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x470>
                hasUsageRange = false;
ffffffff80012876:	45 31 f6             	xor    %r14d,%r14d
                usageCount = 0;
ffffffff80012879:	45 31 ff             	xor    %r15d,%r15d
        while (pos < length) {
ffffffff8001287c:	66 44 39 c8          	cmp    %r9w,%ax
ffffffff80012880:	0f 82 6c ff ff ff    	jb     ffffffff800127f2 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x92>
ffffffff80012886:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001288d:	00 00 00 
        if (fmt.xBitSize > 0 && fmt.yBitSize > 0) {
ffffffff80012890:	45 84 e4             	test   %r12b,%r12b
ffffffff80012893:	74 09                	je     ffffffff8001289e <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x13e>
ffffffff80012895:	45 84 ed             	test   %r13b,%r13b
ffffffff80012898:	0f 85 22 01 00 00    	jne    ffffffff800129c0 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x260>
            Print(string);
ffffffff8001289e:	48 c7 c7 17 b2 02 80 	mov    $0xffffffff8002b217,%rdi
            g_kernelLogDepth++;
ffffffff800128a5:	83 05 f8 cb 1c 00 01 	addl   $0x1,0x1ccbf8(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800128ac:	e8 0f 09 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800128b1:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800128b8:	e8 03 09 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800128bd:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800128c4:	e8 f7 08 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800128c9:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff800128d0:	e8 eb 08 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800128d5:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800128dc:	e8 df 08 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800128e1:	48 c7 c7 d0 c9 02 80 	mov    $0xffffffff8002c9d0,%rdi
ffffffff800128e8:	e8 d3 08 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800128ed:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800128f4:	e8 c7 08 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff800128f9:	8b 05 a5 cb 1c 00    	mov    0x1ccba5(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800128ff:	83 e8 01             	sub    $0x1,%eax
ffffffff80012902:	89 05 9c cb 1c 00    	mov    %eax,0x1ccb9c(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff80012908:	48 83 c4 58          	add    $0x58,%rsp
ffffffff8001290c:	5b                   	pop    %rbx
ffffffff8001290d:	41 5c                	pop    %r12
ffffffff8001290f:	41 5d                	pop    %r13
ffffffff80012911:	41 5e                	pop    %r14
ffffffff80012913:	41 5f                	pop    %r15
ffffffff80012915:	5d                   	pop    %rbp
ffffffff80012916:	c3                   	ret
ffffffff80012917:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001291e:	00 00 
                if (pos + 1 >= length) break;
ffffffff80012920:	66 44 39 cf          	cmp    %r9w,%di
ffffffff80012924:	0f 83 66 ff ff ff    	jae    ffffffff80012890 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x130>
                pos += 3 + dataSize;
ffffffff8001292a:	41 0f b6 54 30 01    	movzbl 0x1(%r8,%rsi,1),%edx
ffffffff80012930:	8d 44 10 03          	lea    0x3(%rax,%rdx,1),%eax
        while (pos < length) {
ffffffff80012934:	66 44 39 c8          	cmp    %r9w,%ax
ffffffff80012938:	0f 82 b4 fe ff ff    	jb     ffffffff800127f2 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x92>
ffffffff8001293e:	e9 4d ff ff ff       	jmp    ffffffff80012890 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x130>
ffffffff80012943:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
                switch (bTag) {
ffffffff80012948:	41 80 fa 08          	cmp    $0x8,%r10b
ffffffff8001294c:	0f 84 f6 02 00 00    	je     ffffffff80012c48 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x4e8>
ffffffff80012952:	77 4c                	ja     ffffffff800129a0 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x240>
ffffffff80012954:	45 84 d2             	test   %r10b,%r10b
ffffffff80012957:	0f 84 03 03 00 00    	je     ffffffff80012c60 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x500>
ffffffff8001295d:	41 80 fa 07          	cmp    $0x7,%r10b
ffffffff80012961:	0f 45 55 a4          	cmovne -0x5c(%rbp),%edx
ffffffff80012965:	89 55 a4             	mov    %edx,-0x5c(%rbp)
        while (pos < length) {
ffffffff80012968:	66 44 39 c8          	cmp    %r9w,%ax
ffffffff8001296c:	0f 82 80 fe ff ff    	jb     ffffffff800127f2 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x92>
ffffffff80012972:	e9 19 ff ff ff       	jmp    ffffffff80012890 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x130>
ffffffff80012977:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001297e:	00 00 
        case 2: return (uint32_t)p[0] | ((uint32_t)p[1] << 8);
ffffffff80012980:	0f b7 16             	movzwl (%rsi),%edx
ffffffff80012983:	e9 c9 fe ff ff       	jmp    ffffffff80012851 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0xf1>
ffffffff80012988:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001298f:	00 
                     | ((uint32_t)p[2] << 16) | ((uint32_t)p[3] << 24);
ffffffff80012990:	8b 16                	mov    (%rsi),%edx
ffffffff80012992:	e9 ba fe ff ff       	jmp    ffffffff80012851 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0xf1>
ffffffff80012997:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001299e:	00 00 
                case 9: reportCount = data; break;             // Report Count
ffffffff800129a0:	41 80 fa 09          	cmp    $0x9,%r10b
ffffffff800129a4:	0f 45 55 a8          	cmovne -0x58(%rbp),%edx
ffffffff800129a8:	89 55 a8             	mov    %edx,-0x58(%rbp)
        while (pos < length) {
ffffffff800129ab:	66 44 39 c8          	cmp    %r9w,%ax
ffffffff800129af:	0f 82 3d fe ff ff    	jb     ffffffff800127f2 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x92>
ffffffff800129b5:	e9 d6 fe ff ff       	jmp    ffffffff80012890 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x130>
ffffffff800129ba:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            g_Format = fmt;
ffffffff800129c0:	0f b6 45 a3          	movzbl -0x5d(%rbp),%eax
ffffffff800129c4:	0f b6 55 a2          	movzbl -0x5e(%rbp),%edx
ffffffff800129c8:	48 b9 ff ff ff 00 ff 	movabs $0xffffffff00ffffff,%rcx
ffffffff800129cf:	ff ff ff 
ffffffff800129d2:	48 be ff ff ff ff ff 	movabs $0xff00ffffffffffff,%rsi
ffffffff800129d9:	ff 00 ff 
ffffffff800129dc:	8a 65 98             	mov    -0x68(%rbp),%ah
ffffffff800129df:	44 0f b6 7d 97       	movzbl -0x69(%rbp),%r15d
            Print(string);
ffffffff800129e4:	48 c7 c7 17 b2 02 80 	mov    $0xffffffff8002b217,%rdi
            g_FormatValid = true;
ffffffff800129eb:	c6 05 ac 48 13 00 01 	movb   $0x1,0x1348ac(%rip)        # ffffffff8014729e <_ZN7Drivers3USB8HidMouseL13g_FormatValidE>
            g_Format = fmt;
ffffffff800129f2:	48 c1 e2 10          	shl    $0x10,%rdx
ffffffff800129f6:	44 0f b6 75 93       	movzbl -0x6d(%rbp),%r14d
ffffffff800129fb:	0f b6 5d 96          	movzbl -0x6a(%rbp),%ebx
ffffffff800129ff:	48 25 ff ff 00 ff    	and    $0xffffffffff00ffff,%rax
            g_kernelLogDepth++;
ffffffff80012a05:	83 05 98 ca 1c 00 01 	addl   $0x1,0x1cca98(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80012a0c:	48 09 d0             	or     %rdx,%rax
ffffffff80012a0f:	4c 89 fa             	mov    %r15,%rdx
ffffffff80012a12:	48 c1 e2 18          	shl    $0x18,%rdx
ffffffff80012a16:	48 21 c8             	and    %rcx,%rax
ffffffff80012a19:	48 b9 ff ff ff ff 00 	movabs $0xffffff00ffffffff,%rcx
ffffffff80012a20:	ff ff ff 
ffffffff80012a23:	48 09 d0             	or     %rdx,%rax
ffffffff80012a26:	4c 89 f2             	mov    %r14,%rdx
ffffffff80012a29:	48 c1 e2 20          	shl    $0x20,%rdx
ffffffff80012a2d:	48 21 c8             	and    %rcx,%rax
ffffffff80012a30:	48 b9 ff ff ff ff ff 	movabs $0xffff00ffffffffff,%rcx
ffffffff80012a37:	00 ff ff 
ffffffff80012a3a:	48 09 d0             	or     %rdx,%rax
ffffffff80012a3d:	4c 89 e2             	mov    %r12,%rdx
ffffffff80012a40:	48 c1 e2 28          	shl    $0x28,%rdx
ffffffff80012a44:	48 21 c8             	and    %rcx,%rax
ffffffff80012a47:	48 89 d9             	mov    %rbx,%rcx
ffffffff80012a4a:	48 09 d0             	or     %rdx,%rax
ffffffff80012a4d:	48 c1 e1 30          	shl    $0x30,%rcx
ffffffff80012a51:	48 21 f0             	and    %rsi,%rax
ffffffff80012a54:	48 be ff ff ff ff ff 	movabs $0xffffffffffffff,%rsi
ffffffff80012a5b:	ff ff 00 
ffffffff80012a5e:	48 09 c8             	or     %rcx,%rax
ffffffff80012a61:	41 0f b6 cd          	movzbl %r13b,%ecx
ffffffff80012a65:	48 21 f0             	and    %rsi,%rax
ffffffff80012a68:	48 89 4d a8          	mov    %rcx,-0x58(%rbp)
ffffffff80012a6c:	4c 89 e9             	mov    %r13,%rcx
ffffffff80012a6f:	48 c1 e1 38          	shl    $0x38,%rcx
ffffffff80012a73:	49 89 c5             	mov    %rax,%r13
ffffffff80012a76:	0f b6 45 91          	movzbl -0x6f(%rbp),%eax
ffffffff80012a7a:	49 09 cd             	or     %rcx,%r13
ffffffff80012a7d:	4c 89 2d 1c 48 13 00 	mov    %r13,0x13481c(%rip)        # ffffffff801472a0 <_ZN7Drivers3USB8HidMouseL8g_FormatE>
ffffffff80012a84:	44 0f b6 6d 92       	movzbl -0x6e(%rbp),%r13d
ffffffff80012a89:	88 05 19 48 13 00    	mov    %al,0x134819(%rip)        # ffffffff801472a8 <_ZN7Drivers3USB8HidMouseL8g_FormatE+0x8>
ffffffff80012a8f:	44 88 2d 13 48 13 00 	mov    %r13b,0x134813(%rip)        # ffffffff801472a9 <_ZN7Drivers3USB8HidMouseL8g_FormatE+0x9>
            Print(string);
ffffffff80012a96:	e8 25 07 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80012a9b:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80012aa2:	e8 19 07 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80012aa7:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80012aae:	e8 0d 07 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80012ab3:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff80012aba:	e8 01 07 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80012abf:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80012ac6:	e8 f5 06 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80012acb:	48 c7 c7 21 b2 02 80 	mov    $0xffffffff8002b221,%rdi
ffffffff80012ad2:	e8 e9 06 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80012ad7:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80012adc:	4c 89 ff             	mov    %r15,%rdi
ffffffff80012adf:	e8 ac 79 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80012ae4:	48 89 c7             	mov    %rax,%rdi
ffffffff80012ae7:	e8 d4 06 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80012aec:	48 c7 c7 39 b2 02 80 	mov    $0xffffffff8002b239,%rdi
ffffffff80012af3:	e8 c8 06 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80012af8:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80012afd:	4c 89 f7             	mov    %r14,%rdi
ffffffff80012b00:	e8 8b 79 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80012b05:	48 89 c7             	mov    %rax,%rdi
ffffffff80012b08:	e8 b3 06 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80012b0d:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff80012b14:	e8 a7 06 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80012b19:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80012b1e:	4c 89 e7             	mov    %r12,%rdi
ffffffff80012b21:	e8 6a 79 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80012b26:	48 89 c7             	mov    %rax,%rdi
ffffffff80012b29:	e8 92 06 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80012b2e:	48 c7 c7 3d b2 02 80 	mov    $0xffffffff8002b23d,%rdi
ffffffff80012b35:	e8 86 06 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80012b3a:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80012b3f:	48 89 df             	mov    %rbx,%rdi
ffffffff80012b42:	e8 49 79 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80012b47:	48 89 c7             	mov    %rax,%rdi
ffffffff80012b4a:	e8 71 06 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80012b4f:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff80012b56:	e8 65 06 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80012b5b:	48 8b 7d a8          	mov    -0x58(%rbp),%rdi
ffffffff80012b5f:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80012b64:	e8 27 79 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80012b69:	48 89 c7             	mov    %rax,%rdi
ffffffff80012b6c:	e8 4f 06 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80012b71:	48 c7 c7 41 b2 02 80 	mov    $0xffffffff8002b241,%rdi
ffffffff80012b78:	e8 43 06 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << " scroll=" << (uint64_t)fmt.scrollBitSize
ffffffff80012b7d:	41 0f b6 fd          	movzbl %r13b,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80012b81:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80012b86:	e8 05 79 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80012b8b:	48 89 c7             	mov    %rax,%rdi
ffffffff80012b8e:	e8 2d 06 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << (fmt.hasReportId ? " (has report ID)" : "");
ffffffff80012b93:	80 7d a3 00          	cmpb   $0x0,-0x5d(%rbp)
ffffffff80012b97:	48 c7 c7 e7 c0 02 80 	mov    $0xffffffff8002c0e7,%rdi
ffffffff80012b9e:	48 c7 c0 06 b2 02 80 	mov    $0xffffffff8002b206,%rax
ffffffff80012ba5:	48 0f 45 f8          	cmovne %rax,%rdi
            Print(string);
ffffffff80012ba9:	e9 3a fd ff ff       	jmp    ffffffff800128e8 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x188>
ffffffff80012bae:	66 90                	xchg   %ax,%ax
                switch (bTag) {
ffffffff80012bb0:	45 84 d2             	test   %r10b,%r10b
ffffffff80012bb3:	74 73                	je     ffffffff80012c28 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x4c8>
ffffffff80012bb5:	41 80 fa 01          	cmp    $0x1,%r10b
ffffffff80012bb9:	0f 94 c2             	sete   %dl
ffffffff80012bbc:	41 09 d6             	or     %edx,%r14d
        while (pos < length) {
ffffffff80012bbf:	66 44 39 c8          	cmp    %r9w,%ax
ffffffff80012bc3:	0f 82 29 fc ff ff    	jb     ffffffff800127f2 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x92>
ffffffff80012bc9:	e9 c2 fc ff ff       	jmp    ffffffff80012890 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x130>
ffffffff80012bce:	66 90                	xchg   %ax,%ax
                                uint16_t off = bitOffset + (uint16_t)(i * reportSize);
ffffffff80012bd0:	0f b7 4d a4          	movzwl -0x5c(%rbp),%ecx
                    if (bTag == 8 && !isConstant) {
ffffffff80012bd4:	41 80 fa 08          	cmp    $0x8,%r10b
ffffffff80012bd8:	75 29                	jne    ffffffff80012c03 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x4a3>
ffffffff80012bda:	83 e2 01             	and    $0x1,%edx
ffffffff80012bdd:	75 24                	jne    ffffffff80012c03 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x4a3>
                        if (usagePage == USAGE_PAGE_BUTTON && hasUsageRange) {
ffffffff80012bdf:	66 83 7d a0 09       	cmpw   $0x9,-0x60(%rbp)
ffffffff80012be4:	0f 85 8e 00 00 00    	jne    ffffffff80012c78 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x518>
ffffffff80012bea:	45 84 f6             	test   %r14b,%r14b
ffffffff80012bed:	0f 84 85 00 00 00    	je     ffffffff80012c78 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x518>
                            fmt.buttonBitOffset = bitOffset;
ffffffff80012bf3:	0f b6 75 94          	movzbl -0x6c(%rbp),%esi
ffffffff80012bf7:	40 88 75 a2          	mov    %sil,-0x5e(%rbp)
                            fmt.buttonCount = (uint8_t)reportCount;
ffffffff80012bfb:	0f b6 75 a8          	movzbl -0x58(%rbp),%esi
ffffffff80012bff:	40 88 75 97          	mov    %sil,-0x69(%rbp)
                    bitOffset += (uint16_t)(reportSize * reportCount);
ffffffff80012c03:	66 0f af 4d a8       	imul   -0x58(%rbp),%cx
                hasUsageRange = false;
ffffffff80012c08:	45 31 f6             	xor    %r14d,%r14d
                    bitOffset += (uint16_t)(reportSize * reportCount);
ffffffff80012c0b:	66 01 4d 94          	add    %cx,-0x6c(%rbp)
                usageCount = 0;
ffffffff80012c0f:	45 31 ff             	xor    %r15d,%r15d
        while (pos < length) {
ffffffff80012c12:	66 44 39 c8          	cmp    %r9w,%ax
ffffffff80012c16:	0f 82 d6 fb ff ff    	jb     ffffffff800127f2 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x92>
ffffffff80012c1c:	e9 6f fc ff ff       	jmp    ffffffff80012890 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x130>
ffffffff80012c21:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
                    if (usageCount < MAX_USAGES)
ffffffff80012c28:	41 83 ff 0f          	cmp    $0xf,%r15d
ffffffff80012c2c:	0f 8f 4a fc ff ff    	jg     ffffffff8001287c <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x11c>
                        usages[usageCount++] = (uint16_t)data;
ffffffff80012c32:	49 63 cf             	movslq %r15d,%rcx
ffffffff80012c35:	41 83 c7 01          	add    $0x1,%r15d
ffffffff80012c39:	66 89 54 4d b0       	mov    %dx,-0x50(%rbp,%rcx,2)
ffffffff80012c3e:	e9 39 fc ff ff       	jmp    ffffffff8001287c <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x11c>
ffffffff80012c43:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
                        fmt.reportId = (uint8_t)data; break;
ffffffff80012c48:	88 55 98             	mov    %dl,-0x68(%rbp)
                case 8: fmt.hasReportId = true;                // Report ID
ffffffff80012c4b:	c6 45 a3 01          	movb   $0x1,-0x5d(%rbp)
        while (pos < length) {
ffffffff80012c4f:	66 44 39 c8          	cmp    %r9w,%ax
ffffffff80012c53:	0f 82 99 fb ff ff    	jb     ffffffff800127f2 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x92>
ffffffff80012c59:	e9 32 fc ff ff       	jmp    ffffffff80012890 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x130>
ffffffff80012c5e:	66 90                	xchg   %ax,%ax
                case 0: usagePage   = (uint16_t)data; break;  // Usage Page
ffffffff80012c60:	66 89 55 a0          	mov    %dx,-0x60(%rbp)
        while (pos < length) {
ffffffff80012c64:	66 44 39 c8          	cmp    %r9w,%ax
ffffffff80012c68:	0f 82 84 fb ff ff    	jb     ffffffff800127f2 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x92>
ffffffff80012c6e:	e9 1d fc ff ff       	jmp    ffffffff80012890 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x130>
ffffffff80012c73:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
                        } else if (usagePage == USAGE_PAGE_GENERIC_DESKTOP) {
ffffffff80012c78:	66 83 7d a0 01       	cmpw   $0x1,-0x60(%rbp)
ffffffff80012c7d:	0f 85 80 ff ff ff    	jne    ffffffff80012c03 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x4a3>
                            for (uint32_t i = 0; i < reportCount && i < (uint32_t)usageCount; i++) {
ffffffff80012c83:	8b 75 a8             	mov    -0x58(%rbp),%esi
ffffffff80012c86:	41 39 f7             	cmp    %esi,%r15d
ffffffff80012c89:	4c 0f 47 fe          	cmova  %rsi,%r15
ffffffff80012c8d:	45 85 ff             	test   %r15d,%r15d
ffffffff80012c90:	0f 84 6d ff ff ff    	je     ffffffff80012c03 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x4a3>
ffffffff80012c96:	8b 7d a4             	mov    -0x5c(%rbp),%edi
ffffffff80012c99:	48 8d 55 b0          	lea    -0x50(%rbp),%rdx
ffffffff80012c9d:	0f b6 75 94          	movzbl -0x6c(%rbp),%esi
                                    fmt.yBitSize = (uint8_t)reportSize;
ffffffff80012ca1:	66 89 4d 8c          	mov    %cx,-0x74(%rbp)
ffffffff80012ca5:	4e 8d 14 7a          	lea    (%rdx,%r15,2),%r10
ffffffff80012ca9:	44 0f b6 75 a4       	movzbl -0x5c(%rbp),%r14d
ffffffff80012cae:	8b 4d a4             	mov    -0x5c(%rbp),%ecx
ffffffff80012cb1:	4c 89 45 80          	mov    %r8,-0x80(%rbp)
ffffffff80012cb5:	41 89 fb             	mov    %edi,%r11d
ffffffff80012cb8:	66 89 45 8e          	mov    %ax,-0x72(%rbp)
ffffffff80012cbc:	0f b6 7d 92          	movzbl -0x6e(%rbp),%edi
ffffffff80012cc0:	44 0f b6 7d 91       	movzbl -0x6f(%rbp),%r15d
ffffffff80012cc5:	44 0f b6 45 93       	movzbl -0x6d(%rbp),%r8d
ffffffff80012cca:	eb 21                	jmp    ffffffff80012ced <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x58d>
ffffffff80012ccc:	0f 1f 40 00          	nopl   0x0(%rax)
                                } else if (u == USAGE_Y) {
ffffffff80012cd0:	66 83 f8 31          	cmp    $0x31,%ax
ffffffff80012cd4:	74 29                	je     ffffffff80012cff <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x59f>
                                } else if (u == USAGE_WHEEL) {
ffffffff80012cd6:	66 83 f8 38          	cmp    $0x38,%ax
                                    fmt.scrollBitOffset = off;
ffffffff80012cda:	0f 44 f9             	cmove  %ecx,%edi
ffffffff80012cdd:	44 0f 44 fe          	cmove  %esi,%r15d
                            for (uint32_t i = 0; i < reportCount && i < (uint32_t)usageCount; i++) {
ffffffff80012ce1:	48 83 c2 02          	add    $0x2,%rdx
ffffffff80012ce5:	44 01 de             	add    %r11d,%esi
ffffffff80012ce8:	4c 39 d2             	cmp    %r10,%rdx
ffffffff80012ceb:	74 1b                	je     ffffffff80012d08 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x5a8>
                                uint16_t u = usages[i];
ffffffff80012ced:	0f b7 02             	movzwl (%rdx),%eax
                                if (u == USAGE_X) {
ffffffff80012cf0:	66 83 f8 30          	cmp    $0x30,%ax
ffffffff80012cf4:	75 da                	jne    ffffffff80012cd0 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x570>
                                    fmt.xBitSize = (uint8_t)reportSize;
ffffffff80012cf6:	45 0f b6 e6          	movzbl %r14b,%r12d
                                    fmt.xBitOffset = off;
ffffffff80012cfa:	41 89 f0             	mov    %esi,%r8d
ffffffff80012cfd:	eb e2                	jmp    ffffffff80012ce1 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x581>
                                    fmt.yBitOffset = off;
ffffffff80012cff:	40 88 75 96          	mov    %sil,-0x6a(%rbp)
                                    fmt.yBitSize = (uint8_t)reportSize;
ffffffff80012d03:	45 89 f5             	mov    %r14d,%r13d
ffffffff80012d06:	eb d9                	jmp    ffffffff80012ce1 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x581>
ffffffff80012d08:	0f b7 45 8e          	movzwl -0x72(%rbp),%eax
ffffffff80012d0c:	0f b7 4d 8c          	movzwl -0x74(%rbp),%ecx
ffffffff80012d10:	44 88 45 93          	mov    %r8b,-0x6d(%rbp)
ffffffff80012d14:	40 88 7d 92          	mov    %dil,-0x6e(%rbp)
ffffffff80012d18:	4c 8b 45 80          	mov    -0x80(%rbp),%r8
ffffffff80012d1c:	44 88 7d 91          	mov    %r15b,-0x6f(%rbp)
ffffffff80012d20:	e9 de fe ff ff       	jmp    ffffffff80012c03 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht+0x4a3>
ffffffff80012d25:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80012d2c:	00 00 00 
ffffffff80012d2f:	90                   	nop

ffffffff80012d30 <_ZN7Drivers3USB8HidMouse14RegisterDeviceEh>:

    // -------------------------------------------------------------------------
    // Public API
    // -------------------------------------------------------------------------

    void RegisterDevice(uint8_t slotId) {
ffffffff80012d30:	55                   	push   %rbp
ffffffff80012d31:	48 89 e5             	mov    %rsp,%rbp
ffffffff80012d34:	53                   	push   %rbx
ffffffff80012d35:	89 fb                	mov    %edi,%ebx
ffffffff80012d37:	48 c7 c7 17 b2 02 80 	mov    $0xffffffff8002b217,%rdi
ffffffff80012d3e:	48 83 ec 08          	sub    $0x8,%rsp
            g_kernelLogDepth++;
ffffffff80012d42:	83 05 5b c7 1c 00 01 	addl   $0x1,0x1cc75b(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80012d49:	e8 72 04 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80012d4e:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80012d55:	e8 66 04 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80012d5a:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80012d61:	e8 5a 04 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80012d66:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80012d6d:	e8 4e 04 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80012d72:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80012d79:	e8 42 04 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80012d7e:	48 c7 c7 4a b2 02 80 	mov    $0xffffffff8002b24a,%rdi
ffffffff80012d85:	e8 36 04 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        g_SlotId = slotId;
        KernelLogStream(OK, "USB/Mouse") << "Registered HID mouse on slot " << (uint64_t)slotId;
ffffffff80012d8a:	0f b6 fb             	movzbl %bl,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80012d8d:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80012d92:	e8 f9 76 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80012d97:	48 89 c7             	mov    %rax,%rdi
ffffffff80012d9a:	e8 21 04 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80012d9f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80012da6:	e8 15 04 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80012dab:	83 2d f2 c6 1c 00 01 	subl   $0x1,0x1cc6f2(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff80012db2:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff80012db6:	c9                   	leave
ffffffff80012db7:	c3                   	ret
ffffffff80012db8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80012dbf:	00 

ffffffff80012dc0 <_ZN7Drivers3USB8HidMouse13ProcessReportEPKht>:

    void ProcessReport(const uint8_t* data, uint16_t length) {
        if (length < 3) return;
ffffffff80012dc0:	66 83 fe 02          	cmp    $0x2,%si
ffffffff80012dc4:	0f 86 7e 01 00 00    	jbe    ffffffff80012f48 <_ZN7Drivers3USB8HidMouse13ProcessReportEPKht+0x188>
    void ProcessReport(const uint8_t* data, uint16_t length) {
ffffffff80012dca:	55                   	push   %rbp
ffffffff80012dcb:	48 89 e5             	mov    %rsp,%rbp
ffffffff80012dce:	41 57                	push   %r15
ffffffff80012dd0:	41 56                	push   %r14
ffffffff80012dd2:	41 55                	push   %r13
ffffffff80012dd4:	41 54                	push   %r12
ffffffff80012dd6:	53                   	push   %rbx
ffffffff80012dd7:	48 89 fb             	mov    %rdi,%rbx
ffffffff80012dda:	48 83 ec 08          	sub    $0x8,%rsp

        if (!g_FormatValid) {
ffffffff80012dde:	80 3d b9 44 13 00 00 	cmpb   $0x0,0x1344b9(%rip)        # ffffffff8014729e <_ZN7Drivers3USB8HidMouseL13g_FormatValidE>
ffffffff80012de5:	0f 84 35 01 00 00    	je     ffffffff80012f20 <_ZN7Drivers3USB8HidMouse13ProcessReportEPKht+0x160>
            Drivers::PS2::Mouse::InjectMouseReport(buttons, deltaX, deltaY, scroll);
            return;
        }

        // Skip report ID byte if present
        uint16_t byteOffset = g_Format.hasReportId ? 8 : 0;
ffffffff80012deb:	44 0f b6 25 ad 44 13 	movzbl 0x1344ad(%rip),%r12d        # ffffffff801472a0 <_ZN7Drivers3USB8HidMouseL8g_FormatE>
ffffffff80012df2:	00 

        // Extract buttons
        uint8_t buttons = 0;
        for (uint8_t i = 0; i < g_Format.buttonCount && i < 8; i++) {
ffffffff80012df3:	44 0f b6 05 a8 44 13 	movzbl 0x1344a8(%rip),%r8d        # ffffffff801472a3 <_ZN7Drivers3USB8HidMouseL8g_FormatE+0x3>
ffffffff80012dfa:	00 
        uint16_t byteOffset = g_Format.hasReportId ? 8 : 0;
ffffffff80012dfb:	41 c1 e4 03          	shl    $0x3,%r12d
        for (uint8_t i = 0; i < g_Format.buttonCount && i < 8; i++) {
ffffffff80012dff:	45 84 c0             	test   %r8b,%r8b
ffffffff80012e02:	0f 84 48 01 00 00    	je     ffffffff80012f50 <_ZN7Drivers3USB8HidMouse13ProcessReportEPKht+0x190>
            uint16_t bit = byteOffset + g_Format.buttonBitOffset + i;
ffffffff80012e08:	0f b6 3d 93 44 13 00 	movzbl 0x134493(%rip),%edi        # ffffffff801472a2 <_ZN7Drivers3USB8HidMouseL8g_FormatE+0x2>
ffffffff80012e0f:	31 c9                	xor    %ecx,%ecx
        for (uint8_t i = 0; i < g_Format.buttonCount && i < 8; i++) {
ffffffff80012e11:	31 d2                	xor    %edx,%edx
        uint8_t buttons = 0;
ffffffff80012e13:	45 31 c9             	xor    %r9d,%r9d
            if (data[bit / 8] & (1 << (bit % 8)))
                buttons |= (1 << i);
ffffffff80012e16:	41 ba 01 00 00 00    	mov    $0x1,%r10d
            uint16_t bit = byteOffset + g_Format.buttonBitOffset + i;
ffffffff80012e1c:	44 01 e7             	add    %r12d,%edi
ffffffff80012e1f:	90                   	nop
ffffffff80012e20:	8d 04 0f             	lea    (%rdi,%rcx,1),%eax
            if (data[bit / 8] & (1 << (bit % 8)))
ffffffff80012e23:	89 c6                	mov    %eax,%esi
ffffffff80012e25:	83 e0 07             	and    $0x7,%eax
ffffffff80012e28:	66 c1 ee 03          	shr    $0x3,%si
ffffffff80012e2c:	0f b7 f6             	movzwl %si,%esi
ffffffff80012e2f:	0f b6 34 33          	movzbl (%rbx,%rsi,1),%esi
ffffffff80012e33:	0f a3 c6             	bt     %eax,%esi
ffffffff80012e36:	73 08                	jae    ffffffff80012e40 <_ZN7Drivers3USB8HidMouse13ProcessReportEPKht+0x80>
                buttons |= (1 << i);
ffffffff80012e38:	44 89 d0             	mov    %r10d,%eax
ffffffff80012e3b:	d3 e0                	shl    %cl,%eax
ffffffff80012e3d:	41 09 c1             	or     %eax,%r9d
        for (uint8_t i = 0; i < g_Format.buttonCount && i < 8; i++) {
ffffffff80012e40:	83 c2 01             	add    $0x1,%edx
ffffffff80012e43:	83 c1 01             	add    $0x1,%ecx
ffffffff80012e46:	44 38 c2             	cmp    %r8b,%dl
ffffffff80012e49:	73 05                	jae    ffffffff80012e50 <_ZN7Drivers3USB8HidMouse13ProcessReportEPKht+0x90>
ffffffff80012e4b:	80 fa 08             	cmp    $0x8,%dl
ffffffff80012e4e:	75 d0                	jne    ffffffff80012e20 <_ZN7Drivers3USB8HidMouse13ProcessReportEPKht+0x60>
            if (rawScroll > 127) rawScroll = 127;
            if (rawScroll < -128) rawScroll = -128;
            scroll = (int8_t)rawScroll;
        }

        Drivers::PS2::Mouse::InjectMouseReport(buttons, (int8_t)rawX, (int8_t)rawY, scroll);
ffffffff80012e50:	45 0f b6 f9          	movzbl %r9b,%r15d
        int32_t rawX = ExtractSigned(data, byteOffset + g_Format.xBitOffset, g_Format.xBitSize);
ffffffff80012e54:	0f b6 35 49 44 13 00 	movzbl 0x134449(%rip),%esi        # ffffffff801472a4 <_ZN7Drivers3USB8HidMouseL8g_FormatE+0x4>
ffffffff80012e5b:	0f b6 15 43 44 13 00 	movzbl 0x134443(%rip),%edx        # ffffffff801472a5 <_ZN7Drivers3USB8HidMouseL8g_FormatE+0x5>
ffffffff80012e62:	48 89 df             	mov    %rbx,%rdi
ffffffff80012e65:	44 01 e6             	add    %r12d,%esi
ffffffff80012e68:	0f b7 f6             	movzwl %si,%esi
ffffffff80012e6b:	e8 50 f8 ff ff       	call   ffffffff800126c0 <_ZN7Drivers3USB8HidMouseL13ExtractSignedEPKhth>
        int32_t rawY = ExtractSigned(data, byteOffset + g_Format.yBitOffset, g_Format.yBitSize);
ffffffff80012e70:	0f b6 35 2f 44 13 00 	movzbl 0x13442f(%rip),%esi        # ffffffff801472a6 <_ZN7Drivers3USB8HidMouseL8g_FormatE+0x6>
ffffffff80012e77:	0f b6 15 29 44 13 00 	movzbl 0x134429(%rip),%edx        # ffffffff801472a7 <_ZN7Drivers3USB8HidMouseL8g_FormatE+0x7>
ffffffff80012e7e:	48 89 df             	mov    %rbx,%rdi
        int32_t rawX = ExtractSigned(data, byteOffset + g_Format.xBitOffset, g_Format.xBitSize);
ffffffff80012e81:	41 89 c5             	mov    %eax,%r13d
        int32_t rawY = ExtractSigned(data, byteOffset + g_Format.yBitOffset, g_Format.yBitSize);
ffffffff80012e84:	44 01 e6             	add    %r12d,%esi
ffffffff80012e87:	0f b7 f6             	movzwl %si,%esi
ffffffff80012e8a:	e8 31 f8 ff ff       	call   ffffffff800126c0 <_ZN7Drivers3USB8HidMouseL13ExtractSignedEPKhth>
        if (g_Format.scrollBitSize > 0) {
ffffffff80012e8f:	0f b6 15 13 44 13 00 	movzbl 0x134413(%rip),%edx        # ffffffff801472a9 <_ZN7Drivers3USB8HidMouseL8g_FormatE+0x9>
        int32_t rawY = ExtractSigned(data, byteOffset + g_Format.yBitOffset, g_Format.yBitSize);
ffffffff80012e96:	41 89 c6             	mov    %eax,%r14d
        if (rawX < -128) rawX = -128;
ffffffff80012e99:	b8 80 ff ff ff       	mov    $0xffffff80,%eax
ffffffff80012e9e:	41 39 c5             	cmp    %eax,%r13d
ffffffff80012ea1:	44 0f 4c e8          	cmovl  %eax,%r13d
        if (rawX > 127) rawX = 127;
ffffffff80012ea5:	b8 7f 00 00 00       	mov    $0x7f,%eax
ffffffff80012eaa:	41 39 c5             	cmp    %eax,%r13d
ffffffff80012ead:	44 0f 4f e8          	cmovg  %eax,%r13d
        if (rawY < -128) rawY = -128;
ffffffff80012eb1:	b8 80 ff ff ff       	mov    $0xffffff80,%eax
ffffffff80012eb6:	41 39 c6             	cmp    %eax,%r14d
ffffffff80012eb9:	44 0f 4c f0          	cmovl  %eax,%r14d
        if (rawY > 127) rawY = 127;
ffffffff80012ebd:	b8 7f 00 00 00       	mov    $0x7f,%eax
ffffffff80012ec2:	41 39 c6             	cmp    %eax,%r14d
ffffffff80012ec5:	44 0f 4f f0          	cmovg  %eax,%r14d
        if (g_Format.scrollBitSize > 0) {
ffffffff80012ec9:	31 c9                	xor    %ecx,%ecx
ffffffff80012ecb:	84 d2                	test   %dl,%dl
ffffffff80012ecd:	74 2b                	je     ffffffff80012efa <_ZN7Drivers3USB8HidMouse13ProcessReportEPKht+0x13a>
            int32_t rawScroll = ExtractSigned(data, byteOffset + g_Format.scrollBitOffset, g_Format.scrollBitSize);
ffffffff80012ecf:	0f b6 35 d2 43 13 00 	movzbl 0x1343d2(%rip),%esi        # ffffffff801472a8 <_ZN7Drivers3USB8HidMouseL8g_FormatE+0x8>
ffffffff80012ed6:	48 89 df             	mov    %rbx,%rdi
ffffffff80012ed9:	44 01 e6             	add    %r12d,%esi
ffffffff80012edc:	0f b7 f6             	movzwl %si,%esi
ffffffff80012edf:	e8 dc f7 ff ff       	call   ffffffff800126c0 <_ZN7Drivers3USB8HidMouseL13ExtractSignedEPKhth>
            if (rawScroll < -128) rawScroll = -128;
ffffffff80012ee4:	ba 80 ff ff ff       	mov    $0xffffff80,%edx
ffffffff80012ee9:	39 d0                	cmp    %edx,%eax
ffffffff80012eeb:	89 d1                	mov    %edx,%ecx
ffffffff80012eed:	0f 4d c8             	cmovge %eax,%ecx
            if (rawScroll > 127) rawScroll = 127;
ffffffff80012ef0:	b8 7f 00 00 00       	mov    $0x7f,%eax
ffffffff80012ef5:	39 c1                	cmp    %eax,%ecx
ffffffff80012ef7:	0f 4f c8             	cmovg  %eax,%ecx
        Drivers::PS2::Mouse::InjectMouseReport(buttons, (int8_t)rawX, (int8_t)rawY, scroll);
ffffffff80012efa:	44 89 f2             	mov    %r14d,%edx
ffffffff80012efd:	44 89 ee             	mov    %r13d,%esi
ffffffff80012f00:	44 89 ff             	mov    %r15d,%edi
    }
ffffffff80012f03:	48 83 c4 08          	add    $0x8,%rsp
ffffffff80012f07:	5b                   	pop    %rbx
ffffffff80012f08:	41 5c                	pop    %r12
ffffffff80012f0a:	41 5d                	pop    %r13
ffffffff80012f0c:	41 5e                	pop    %r14
ffffffff80012f0e:	41 5f                	pop    %r15
ffffffff80012f10:	5d                   	pop    %rbp
        Drivers::PS2::Mouse::InjectMouseReport(buttons, (int8_t)rawX, (int8_t)rawY, scroll);
ffffffff80012f11:	e9 4a e7 ff ff       	jmp    ffffffff80011660 <_ZN7Drivers3PS25Mouse17InjectMouseReportEhaaa>
ffffffff80012f16:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80012f1d:	00 00 00 
            uint8_t buttons = data[0] & 0x07;
ffffffff80012f20:	0f b6 3f             	movzbl (%rdi),%edi
            int8_t deltaX   = (int8_t)data[1];
ffffffff80012f23:	0f b6 43 01          	movzbl 0x1(%rbx),%eax
ffffffff80012f27:	31 c9                	xor    %ecx,%ecx
            int8_t deltaY   = (int8_t)data[2];
ffffffff80012f29:	0f be 53 02          	movsbl 0x2(%rbx),%edx
            uint8_t buttons = data[0] & 0x07;
ffffffff80012f2d:	83 e7 07             	and    $0x7,%edi
            int8_t scroll   = (length >= 4) ? (int8_t)data[3] : 0;
ffffffff80012f30:	66 83 fe 03          	cmp    $0x3,%si
ffffffff80012f34:	74 04                	je     ffffffff80012f3a <_ZN7Drivers3USB8HidMouse13ProcessReportEPKht+0x17a>
            Drivers::PS2::Mouse::InjectMouseReport(buttons, deltaX, deltaY, scroll);
ffffffff80012f36:	0f be 4b 03          	movsbl 0x3(%rbx),%ecx
ffffffff80012f3a:	0f be f0             	movsbl %al,%esi
ffffffff80012f3d:	40 0f b6 ff          	movzbl %dil,%edi
ffffffff80012f41:	eb c0                	jmp    ffffffff80012f03 <_ZN7Drivers3USB8HidMouse13ProcessReportEPKht+0x143>
ffffffff80012f43:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff80012f48:	c3                   	ret
ffffffff80012f49:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        for (uint8_t i = 0; i < g_Format.buttonCount && i < 8; i++) {
ffffffff80012f50:	45 31 ff             	xor    %r15d,%r15d
ffffffff80012f53:	e9 fc fe ff ff       	jmp    ffffffff80012e54 <_ZN7Drivers3USB8HidMouse13ProcessReportEPKht+0x94>
ffffffff80012f58:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80012f5f:	00 

ffffffff80012f60 <_ZN2Kt15KernelLogStreamC1ENS_14KernelLogLevelEPKc>:
        KernelLogStream(KernelLogLevel level, const char* desiredComponentName) { /* level for potential future rich event logging */
ffffffff80012f60:	55                   	push   %rbp
ffffffff80012f61:	48 89 f8             	mov    %rdi,%rax
ffffffff80012f64:	48 89 d7             	mov    %rdx,%rdi
ffffffff80012f67:	48 89 e5             	mov    %rsp,%rbp
ffffffff80012f6a:	53                   	push   %rbx
ffffffff80012f6b:	89 f3                	mov    %esi,%ebx
ffffffff80012f6d:	48 83 ec 08          	sub    $0x8,%rsp
ffffffff80012f71:	c7 00 0a 00 00 00    	movl   $0xa,(%rax)
            componentName = desiredComponentName;
ffffffff80012f77:	48 89 50 08          	mov    %rdx,0x8(%rax)
            g_kernelLogDepth++;
ffffffff80012f7b:	83 05 22 c5 1c 00 01 	addl   $0x1,0x1cc522(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80012f82:	e8 39 02 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80012f87:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80012f8e:	e8 2d 02 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80012f93:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80012f9a:	e8 21 02 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            switch (level) {
ffffffff80012f9f:	48 c7 c7 68 b2 02 80 	mov    $0xffffffff8002b268,%rdi
ffffffff80012fa6:	83 fb 04             	cmp    $0x4,%ebx
ffffffff80012fa9:	77 08                	ja     ffffffff80012fb3 <_ZN2Kt15KernelLogStreamC1ENS_14KernelLogLevelEPKc+0x53>
ffffffff80012fab:	48 8b 3c dd 00 dd 02 	mov    -0x7ffd2300(,%rbx,8),%rdi
ffffffff80012fb2:	80 
            Print(string);
ffffffff80012fb3:	e8 08 02 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        }
ffffffff80012fb8:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
            Print(string);
ffffffff80012fbc:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
        }
ffffffff80012fc3:	c9                   	leave
            Print(string);
ffffffff80012fc4:	e9 f7 01 01 00       	jmp    ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80012fc9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff80012fd0 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj>:

    // ---------------------------------------------------------------------------
    // EnumerateDevice
    // ---------------------------------------------------------------------------

    uint8_t EnumerateDevice(uint8_t portId, uint32_t speed) {
ffffffff80012fd0:	55                   	push   %rbp
ffffffff80012fd1:	48 89 e5             	mov    %rsp,%rbp
ffffffff80012fd4:	41 57                	push   %r15
ffffffff80012fd6:	41 89 f7             	mov    %esi,%r15d
ffffffff80012fd9:	41 56                	push   %r14
ffffffff80012fdb:	41 55                	push   %r13
ffffffff80012fdd:	41 54                	push   %r12
ffffffff80012fdf:	41 89 fc             	mov    %edi,%r12d
ffffffff80012fe2:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
ffffffff80012fe9:	53                   	push   %rbx
ffffffff80012fea:	48 81 ec a8 02 00 00 	sub    $0x2a8,%rsp
            g_kernelLogDepth++;
ffffffff80012ff1:	83 05 ac c4 1c 00 01 	addl   $0x1,0x1cc4ac(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80012ff8:	e8 c3 01 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80012ffd:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80013004:	e8 b7 01 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013009:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80013010:	e8 ab 01 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013015:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8001301c:	e8 9f 01 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013021:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80013028:	e8 93 01 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001302d:	48 c7 c7 7c b2 02 80 	mov    $0xffffffff8002b27c,%rdi
ffffffff80013034:	e8 87 01 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80013039:	be 0a 00 00 00       	mov    $0xa,%esi
        KernelLogStream(INFO, "USB") << "Enumerating device on port "
            << (uint64_t)portId << " speed=" << SpeedToString(speed);
ffffffff8001303e:	41 0f b6 fc          	movzbl %r12b,%edi
ffffffff80013042:	e8 49 74 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80013047:	48 89 c7             	mov    %rax,%rdi
ffffffff8001304a:	e8 71 01 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001304f:	48 c7 c7 e2 b5 02 80 	mov    $0xffffffff8002b5e2,%rdi
ffffffff80013056:	e8 65 01 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        switch (speed) {
ffffffff8001305b:	41 8d 47 ff          	lea    -0x1(%r15),%eax
ffffffff8001305f:	48 c7 c7 70 b2 02 80 	mov    $0xffffffff8002b270,%rdi
ffffffff80013066:	83 f8 03             	cmp    $0x3,%eax
ffffffff80013069:	77 08                	ja     ffffffff80013073 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xa3>
ffffffff8001306b:	48 8b 3c c5 40 dd 02 	mov    -0x7ffd22c0(,%rax,8),%rdi
ffffffff80013072:	80 
ffffffff80013073:	e8 48 01 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013078:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001307f:	e8 3c 01 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        // Step 1: Enable Slot
        // -----------------------------------------------------------------
        Xhci::TRB enableSlotTrb = {};
        enableSlotTrb.Control = (Xhci::TRB_ENABLE_SLOT << Xhci::TRB_TYPE_SHIFT);

        uint32_t cc = Xhci::SendCommand(enableSlotTrb);
ffffffff80013084:	48 8d bd ac fd ff ff 	lea    -0x254(%rbp),%rdi
            g_kernelLogDepth--;
ffffffff8001308b:	83 2d 12 c4 1c 00 01 	subl   $0x1,0x1cc412(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        Xhci::TRB enableSlotTrb = {};
ffffffff80013092:	48 c7 85 ac fd ff ff 	movq   $0x0,-0x254(%rbp)
ffffffff80013099:	00 00 00 00 
ffffffff8001309d:	c7 85 b4 fd ff ff 00 	movl   $0x0,-0x24c(%rbp)
ffffffff800130a4:	00 00 00 
        enableSlotTrb.Control = (Xhci::TRB_ENABLE_SLOT << Xhci::TRB_TYPE_SHIFT);
ffffffff800130a7:	c7 85 b8 fd ff ff 00 	movl   $0x2400,-0x248(%rbp)
ffffffff800130ae:	24 00 00 
        uint32_t cc = Xhci::SendCommand(enableSlotTrb);
ffffffff800130b1:	e8 fa 19 00 00       	call   ffffffff80014ab0 <_ZN7Drivers3USB4Xhci11SendCommandERKNS1_3TRBE>
ffffffff800130b6:	89 c3                	mov    %eax,%ebx
            g_kernelLogDepth++;
ffffffff800130b8:	8b 05 e6 c3 1c 00    	mov    0x1cc3e6(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800130be:	83 c0 01             	add    $0x1,%eax
        if (cc != Xhci::CC_SUCCESS) {
ffffffff800130c1:	83 fb 01             	cmp    $0x1,%ebx
ffffffff800130c4:	0f 85 16 02 00 00    	jne    ffffffff800132e0 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x310>
            KernelLogStream(ERROR, "USB") << "Enable Slot failed, cc=" << (uint64_t)cc;
            return 0;
        }

        uint8_t slotId = (uint8_t)Xhci::g_cmdCompletionSlotId;
ffffffff800130ca:	8b 1d 10 49 13 00    	mov    0x134910(%rip),%ebx        # ffffffff801479e0 <_ZN7Drivers3USB4Xhci21g_cmdCompletionSlotIdE>
ffffffff800130d0:	89 05 ce c3 1c 00    	mov    %eax,0x1cc3ce(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800130d6:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
        if (slotId == 0 || slotId > Xhci::MAX_SLOTS) {
            KernelLogStream(ERROR, "USB") << "Invalid slot ID: " << (uint64_t)slotId;
ffffffff800130dd:	0f b6 cb             	movzbl %bl,%ecx
        if (slotId == 0 || slotId > Xhci::MAX_SLOTS) {
ffffffff800130e0:	8d 53 ff             	lea    -0x1(%rbx),%edx
        uint8_t slotId = (uint8_t)Xhci::g_cmdCompletionSlotId;
ffffffff800130e3:	88 9d 5c fd ff ff    	mov    %bl,-0x2a4(%rbp)
            KernelLogStream(ERROR, "USB") << "Invalid slot ID: " << (uint64_t)slotId;
ffffffff800130e9:	48 89 8d 50 fd ff ff 	mov    %rcx,-0x2b0(%rbp)
        if (slotId == 0 || slotId > Xhci::MAX_SLOTS) {
ffffffff800130f0:	80 fa 0f             	cmp    $0xf,%dl
ffffffff800130f3:	0f 87 57 01 00 00    	ja     ffffffff80013250 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x280>
ffffffff800130f9:	e8 c2 00 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800130fe:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80013105:	44 0f b6 f3          	movzbl %bl,%r14d
            Print(string);
ffffffff80013109:	e8 b2 00 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001310e:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80013115:	e8 a6 00 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001311a:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff80013121:	e8 9a 00 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013126:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001312d:	e8 8e 00 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013132:	48 c7 c7 c2 b2 02 80 	mov    $0xffffffff8002b2c2,%rdi
ffffffff80013139:	e8 82 00 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001313e:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80013143:	4c 89 f7             	mov    %r14,%rdi
ffffffff80013146:	e8 45 73 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001314b:	48 89 c7             	mov    %rax,%rdi
ffffffff8001314e:	e8 6d 00 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80013153:	48 c7 c7 26 ad 02 80 	mov    $0xffffffff8002ad26,%rdi
ffffffff8001315a:	e8 61 00 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001315f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80013166:	e8 55 00 01 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001316b:	0f b6 c3             	movzbl %bl,%eax
ffffffff8001316e:	83 2d 2f c3 1c 00 01 	subl   $0x1,0x1cc32f(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        KernelLogStream(INFO, "USB") << "Slot " << (uint64_t)slotId << " enabled";

        // -----------------------------------------------------------------
        // Step 2: Allocate device output context and set DCBAA entry
        // -----------------------------------------------------------------
        auto* dev = Xhci::GetDevice(slotId);
ffffffff80013175:	89 c7                	mov    %eax,%edi
ffffffff80013177:	89 85 58 fd ff ff    	mov    %eax,-0x2a8(%rbp)
ffffffff8001317d:	e8 8e 1e 00 00       	call   ffffffff80015010 <_ZN7Drivers3USB4Xhci9GetDeviceEh>
        dev->Active = true;
        dev->PortId = portId;
ffffffff80013182:	44 88 60 01          	mov    %r12b,0x1(%rax)
        dev->Speed  = speed;

        // Allocate a zeroed page for the output DeviceContext
        auto* outputCtx = (Xhci::DeviceContext*)Memory::g_pfa->AllocateZeroed();
ffffffff80013186:	48 8b 3d 23 98 13 00 	mov    0x139823(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
        auto* dev = Xhci::GetDevice(slotId);
ffffffff8001318d:	48 89 c3             	mov    %rax,%rbx

        // Slot Context
        uint32_t speedVal    = SpeedToSlotContextValue(speed);
        uint32_t ctxEntries  = 1;  // Context Entries = 1 (Slot + EP0 only)
        inputCtx->Slot.Field0 = (ctxEntries << 27) | (speedVal << 20);
        inputCtx->Slot.Field1 = ((uint32_t)portId << 16);  // Root Hub Port Number
ffffffff80013190:	45 0f b6 e4          	movzbl %r12b,%r12d
        dev->Active = true;
ffffffff80013194:	c6 00 01             	movb   $0x1,(%rax)
        inputCtx->Slot.Field1 = ((uint32_t)portId << 16);  // Root Hub Port Number
ffffffff80013197:	41 c1 e4 10          	shl    $0x10,%r12d
        dev->Speed  = speed;
ffffffff8001319b:	44 89 78 04          	mov    %r15d,0x4(%rax)
        auto* outputCtx = (Xhci::DeviceContext*)Memory::g_pfa->AllocateZeroed();
ffffffff8001319f:	e8 6c 80 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
        Xhci::g_dcbaa[slotId] = dev->OutputContextPhys;
ffffffff800131a4:	48 8b 15 85 48 13 00 	mov    0x134885(%rip),%rdx        # ffffffff80147a30 <_ZN7Drivers3USB4Xhci7g_dcbaaE>
        auto* inputCtx = (Xhci::InputContext*)Memory::g_pfa->AllocateZeroed();
ffffffff800131ab:	48 8b 3d fe 97 13 00 	mov    0x1397fe(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
        dev->OutputContext     = outputCtx;
ffffffff800131b2:	48 89 43 48          	mov    %rax,0x48(%rbx)
ffffffff800131b6:	48 2b 05 eb 97 13 00 	sub    0x1397eb(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        dev->OutputContextPhys = Memory::SubHHDM(outputCtx);
ffffffff800131bd:	48 89 43 50          	mov    %rax,0x50(%rbx)
        Xhci::g_dcbaa[slotId] = dev->OutputContextPhys;
ffffffff800131c1:	4a 89 04 f2          	mov    %rax,(%rdx,%r14,8)
        auto* inputCtx = (Xhci::InputContext*)Memory::g_pfa->AllocateZeroed();
ffffffff800131c5:	e8 46 80 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>

        // EP0 Context
        // Allocate EP0 transfer ring
        auto* ep0Ring = (Xhci::TRB*)Memory::g_pfa->AllocateZeroed();
ffffffff800131ca:	48 8b 3d df 97 13 00 	mov    0x1397df(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
        inputCtx->ICC.AddFlags = 0x3;
ffffffff800131d1:	c7 40 04 03 00 00 00 	movl   $0x3,0x4(%rax)
        auto* inputCtx = (Xhci::InputContext*)Memory::g_pfa->AllocateZeroed();
ffffffff800131d8:	49 89 c5             	mov    %rax,%r13
        inputCtx->Slot.Field0 = (ctxEntries << 27) | (speedVal << 20);
ffffffff800131db:	44 89 f8             	mov    %r15d,%eax
ffffffff800131de:	c1 e0 14             	shl    $0x14,%eax
        inputCtx->Slot.Field1 = ((uint32_t)portId << 16);  // Root Hub Port Number
ffffffff800131e1:	45 89 65 24          	mov    %r12d,0x24(%r13)
        inputCtx->Slot.Field0 = (ctxEntries << 27) | (speedVal << 20);
ffffffff800131e5:	0d 00 00 00 08       	or     $0x8000000,%eax
ffffffff800131ea:	41 89 45 20          	mov    %eax,0x20(%r13)
        auto* ep0Ring = (Xhci::TRB*)Memory::g_pfa->AllocateZeroed();
ffffffff800131ee:	e8 1d 80 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff800131f3:	48 8b 0d ae 97 13 00 	mov    0x1397ae(%rip),%rcx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        dev->EP0Ring        = ep0Ring;
        dev->EP0RingPhys    = Memory::SubHHDM(ep0Ring);
        dev->EP0RingEnqueue = 0;
ffffffff800131fa:	c7 43 40 00 00 00 00 	movl   $0x0,0x40(%rbx)
        // Set up Link TRB at last position to wrap back to start
        // (bit 1 = Toggle Cycle on Link TRBs)
        Xhci::TRB& ep0Link = ep0Ring[Xhci::XFER_RING_SIZE - 1];
        ep0Link.Parameter0 = (uint32_t)(dev->EP0RingPhys & 0xFFFFFFFF);
        ep0Link.Parameter1 = (uint32_t)(dev->EP0RingPhys >> 32);
        ep0Link.Status = 0;
ffffffff80013201:	48 be 00 00 00 00 02 	movabs $0x180200000000,%rsi
ffffffff80013208:	18 00 00 
ffffffff8001320b:	48 89 c2             	mov    %rax,%rdx
        dev->EP0Ring        = ep0Ring;
ffffffff8001320e:	48 89 43 30          	mov    %rax,0x30(%rbx)
ffffffff80013212:	48 29 ca             	sub    %rcx,%rdx
        dev->EP0RingCCS     = true;
ffffffff80013215:	c6 43 44 01          	movb   $0x1,0x44(%rbx)
        dev->EP0RingPhys    = Memory::SubHHDM(ep0Ring);
ffffffff80013219:	48 89 53 38          	mov    %rdx,0x38(%rbx)
        ep0Link.Parameter0 = (uint32_t)(dev->EP0RingPhys & 0xFFFFFFFF);
ffffffff8001321d:	48 89 90 f0 01 00 00 	mov    %rdx,0x1f0(%rax)
        ep0Link.Status = 0;
ffffffff80013224:	48 89 b0 f8 01 00 00 	mov    %rsi,0x1f8(%rax)
        switch (speed) {
ffffffff8001322b:	41 83 ff 02          	cmp    $0x2,%r15d
ffffffff8001322f:	0f 87 0b 01 00 00    	ja     ffffffff80013340 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x370>
ffffffff80013235:	45 85 ff             	test   %r15d,%r15d
ffffffff80013238:	0f 84 2a 02 00 00    	je     ffffffff80013468 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x498>
ffffffff8001323e:	b8 26 00 08 00       	mov    $0x80026,%eax
            case Xhci::SPEED_LOW:   return 8;
ffffffff80013243:	41 bc 08 00 00 00    	mov    $0x8,%r12d
ffffffff80013249:	e9 07 01 00 00       	jmp    ffffffff80013355 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x385>
ffffffff8001324e:	66 90                	xchg   %ax,%ax
            Print(string);
ffffffff80013250:	e8 6b ff 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013255:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001325c:	e8 5f ff 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013261:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80013268:	e8 53 ff 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001326d:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80013274:	e8 47 ff 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013279:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80013280:	e8 3b ff 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013285:	48 c7 c7 b0 b2 02 80 	mov    $0xffffffff8002b2b0,%rdi
ffffffff8001328c:	e8 2f ff 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80013291:	48 8b bd 50 fd ff ff 	mov    -0x2b0(%rbp),%rdi
ffffffff80013298:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001329d:	e8 ee 71 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800132a2:	48 89 c7             	mov    %rax,%rdi
ffffffff800132a5:	e8 16 ff 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800132aa:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800132b1:	e8 0a ff 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff800132b6:	83 2d e7 c1 1c 00 01 	subl   $0x1,0x1cc1e7(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            return 0;
ffffffff800132bd:	c6 85 5c fd ff ff 00 	movb   $0x0,-0x2a4(%rbp)
            KernelLogStream(INFO, "USB") << "Slot " << (uint64_t)slotId
                << ": Non-HID device, class=" << (uint64_t)devDesc.bDeviceClass;
        }

        return slotId;
    }
ffffffff800132c4:	0f b6 85 5c fd ff ff 	movzbl -0x2a4(%rbp),%eax
ffffffff800132cb:	48 8d 65 d8          	lea    -0x28(%rbp),%rsp
ffffffff800132cf:	5b                   	pop    %rbx
ffffffff800132d0:	41 5c                	pop    %r12
ffffffff800132d2:	41 5d                	pop    %r13
ffffffff800132d4:	41 5e                	pop    %r14
ffffffff800132d6:	41 5f                	pop    %r15
ffffffff800132d8:	5d                   	pop    %rbp
ffffffff800132d9:	c3                   	ret
ffffffff800132da:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            Print(string);
ffffffff800132e0:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
            g_kernelLogDepth++;
ffffffff800132e7:	89 05 b7 c1 1c 00    	mov    %eax,0x1cc1b7(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800132ed:	e8 ce fe 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800132f2:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800132f9:	e8 c2 fe 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800132fe:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80013305:	e8 b6 fe 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001330a:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80013311:	e8 aa fe 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013316:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001331d:	e8 9e fe 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013322:	48 c7 c7 98 b2 02 80 	mov    $0xffffffff8002b298,%rdi
ffffffff80013329:	e8 92 fe 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            KernelLogStream(ERROR, "USB") << "Enable Slot failed, cc=" << (uint64_t)cc;
ffffffff8001332e:	89 df                	mov    %ebx,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80013330:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80013335:	e9 63 ff ff ff       	jmp    ffffffff8001329d <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x2cd>
ffffffff8001333a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        switch (speed) {
ffffffff80013340:	41 83 ff 04          	cmp    $0x4,%r15d
ffffffff80013344:	0f 85 1e 01 00 00    	jne    ffffffff80013468 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x498>
ffffffff8001334a:	b8 26 00 00 02       	mov    $0x2000026,%eax
ffffffff8001334f:	41 bc 00 02 00 00    	mov    $0x200,%r12d
        inputCtx->EP[0].Field1 = (3 << 1)
ffffffff80013355:	41 89 45 44          	mov    %eax,0x44(%r13)
ffffffff80013359:	4c 89 e8             	mov    %r13,%rax
        inputCtx->EP[0].TRDequeuePtr = dev->EP0RingPhys | 1;
ffffffff8001335c:	48 83 ca 01          	or     $0x1,%rdx
        cc = Xhci::SendCommand(addrTrb);
ffffffff80013360:	48 8d bd 78 fd ff ff 	lea    -0x288(%rbp),%rdi
ffffffff80013367:	48 29 c8             	sub    %rcx,%rax
        inputCtx->EP[0].TRDequeuePtr = dev->EP0RingPhys | 1;
ffffffff8001336a:	49 89 55 48          	mov    %rdx,0x48(%r13)
ffffffff8001336e:	48 89 85 40 fd ff ff 	mov    %rax,-0x2c0(%rbp)
        addrTrb.Parameter0 = (uint32_t)(inputCtxPhys & 0xFFFFFFFF);
ffffffff80013375:	48 89 85 78 fd ff ff 	mov    %rax,-0x288(%rbp)
                           | ((uint32_t)slotId << 24);
ffffffff8001337c:	8b 85 58 fd ff ff    	mov    -0x2a8(%rbp),%eax
        inputCtx->EP[0].Field2 = 8;
ffffffff80013382:	41 c7 45 50 08 00 00 	movl   $0x8,0x50(%r13)
ffffffff80013389:	00 
        Xhci::TRB addrTrb = {};
ffffffff8001338a:	c7 85 80 fd ff ff 00 	movl   $0x0,-0x280(%rbp)
ffffffff80013391:	00 00 00 
                           | ((uint32_t)slotId << 24);
ffffffff80013394:	c1 e0 18             	shl    $0x18,%eax
ffffffff80013397:	89 85 4c fd ff ff    	mov    %eax,-0x2b4(%rbp)
ffffffff8001339d:	80 cc 2e             	or     $0x2e,%ah
ffffffff800133a0:	89 85 84 fd ff ff    	mov    %eax,-0x27c(%rbp)
        cc = Xhci::SendCommand(addrTrb);
ffffffff800133a6:	e8 05 17 00 00       	call   ffffffff80014ab0 <_ZN7Drivers3USB4Xhci11SendCommandERKNS1_3TRBE>
            Print(string);
ffffffff800133ab:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
ffffffff800133b2:	41 89 c6             	mov    %eax,%r14d
            g_kernelLogDepth++;
ffffffff800133b5:	8b 05 e9 c0 1c 00    	mov    0x1cc0e9(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800133bb:	83 c0 01             	add    $0x1,%eax
ffffffff800133be:	89 05 e0 c0 1c 00    	mov    %eax,0x1cc0e0(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        if (cc != Xhci::CC_SUCCESS) {
ffffffff800133c4:	41 83 fe 01          	cmp    $0x1,%r14d
ffffffff800133c8:	0f 84 b2 00 00 00    	je     ffffffff80013480 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x4b0>
            Print(string);
ffffffff800133ce:	e8 ed fd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800133d3:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800133da:	e8 e1 fd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800133df:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800133e6:	e8 d5 fd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800133eb:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff800133f2:	e8 c9 fd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800133f7:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800133fe:	e8 bd fd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013403:	48 c7 c7 10 ca 02 80 	mov    $0xffffffff8002ca10,%rdi
ffffffff8001340a:	e8 b1 fd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001340f:	48 8b bd 50 fd ff ff 	mov    -0x2b0(%rbp),%rdi
ffffffff80013416:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001341b:	e8 70 70 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80013420:	48 89 c7             	mov    %rax,%rdi
ffffffff80013423:	e8 98 fd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80013428:	48 c7 c7 95 b3 02 80 	mov    $0xffffffff8002b395,%rdi
ffffffff8001342f:	e8 8c fd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                    << (uint64_t)slotId << " cc=" << (uint64_t)cc;
ffffffff80013434:	44 89 f7             	mov    %r14d,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80013437:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001343c:	e8 4f 70 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80013441:	48 89 c7             	mov    %rax,%rdi
ffffffff80013444:	e8 77 fd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80013449:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80013450:	e8 6b fd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80013455:	83 2d 48 c0 1c 00 01 	subl   $0x1,0x1cc048(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
                dev->Active = false;
ffffffff8001345c:	c6 03 00             	movb   $0x0,(%rbx)
                return 0;
ffffffff8001345f:	e9 59 fe ff ff       	jmp    ffffffff800132bd <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x2ed>
ffffffff80013464:	0f 1f 40 00          	nopl   0x0(%rax)
        switch (speed) {
ffffffff80013468:	b8 26 00 40 00       	mov    $0x400026,%eax
            default:                return 64;
ffffffff8001346d:	41 bc 40 00 00 00    	mov    $0x40,%r12d
ffffffff80013473:	e9 dd fe ff ff       	jmp    ffffffff80013355 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x385>
ffffffff80013478:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001347f:	00 
            Print(string);
ffffffff80013480:	e8 3b fd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013485:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001348c:	e8 2f fd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013491:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80013498:	e8 23 fd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001349d:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff800134a4:	e8 17 fd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800134a9:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800134b0:	e8 0b fd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800134b5:	48 c7 c7 c2 b2 02 80 	mov    $0xffffffff8002b2c2,%rdi
ffffffff800134bc:	e8 ff fc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800134c1:	48 8b bd 50 fd ff ff 	mov    -0x2b0(%rbp),%rdi
ffffffff800134c8:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800134cd:	e8 be 6f 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800134d2:	48 89 c7             	mov    %rax,%rdi
ffffffff800134d5:	e8 e6 fc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800134da:	48 c7 c7 c8 b2 02 80 	mov    $0xffffffff8002b2c8,%rdi
ffffffff800134e1:	e8 da fc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800134e6:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800134ed:	e8 ce fc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        cc = Xhci::ControlTransfer(slotId, REQTYPE_DEV_TO_HOST, REQ_GET_DESCRIPTOR,
ffffffff800134f2:	48 8d 85 67 fd ff ff 	lea    -0x299(%rbp),%rax
ffffffff800134f9:	8b bd 58 fd ff ff    	mov    -0x2a8(%rbp),%edi
            g_kernelLogDepth--;
ffffffff800134ff:	83 2d 9e bf 1c 00 01 	subl   $0x1,0x1cbf9e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80013506:	b9 00 01 00 00       	mov    $0x100,%ecx
ffffffff8001350b:	ba 06 00 00 00       	mov    $0x6,%edx
ffffffff80013510:	45 31 c0             	xor    %r8d,%r8d
        uint8_t partialDesc[8] = {};
ffffffff80013513:	48 c7 85 67 fd ff ff 	movq   $0x0,-0x299(%rbp)
ffffffff8001351a:	00 00 00 00 
        cc = Xhci::ControlTransfer(slotId, REQTYPE_DEV_TO_HOST, REQ_GET_DESCRIPTOR,
ffffffff8001351e:	6a 01                	push   $0x1
ffffffff80013520:	41 b9 08 00 00 00    	mov    $0x8,%r9d
ffffffff80013526:	be 80 00 00 00       	mov    $0x80,%esi
ffffffff8001352b:	50                   	push   %rax
ffffffff8001352c:	e8 1f 17 00 00       	call   ffffffff80014c50 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb>
        if (cc != Xhci::CC_SUCCESS && cc != Xhci::CC_SHORT_PACKET) {
ffffffff80013531:	5a                   	pop    %rdx
ffffffff80013532:	59                   	pop    %rcx
        cc = Xhci::ControlTransfer(slotId, REQTYPE_DEV_TO_HOST, REQ_GET_DESCRIPTOR,
ffffffff80013533:	41 89 c6             	mov    %eax,%r14d
            g_kernelLogDepth++;
ffffffff80013536:	8b 05 68 bf 1c 00    	mov    0x1cbf68(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001353c:	83 c0 01             	add    $0x1,%eax
        if (cc != Xhci::CC_SUCCESS && cc != Xhci::CC_SHORT_PACKET) {
ffffffff8001353f:	41 83 fe 01          	cmp    $0x1,%r14d
ffffffff80013543:	74 0a                	je     ffffffff8001354f <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x57f>
ffffffff80013545:	41 83 fe 0d          	cmp    $0xd,%r14d
ffffffff80013549:	0f 85 c1 07 00 00    	jne    ffffffff80013d10 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xd40>
        uint8_t bMaxPacketSize0 = partialDesc[7];
ffffffff8001354f:	44 0f b6 b5 6e fd ff 	movzbl -0x292(%rbp),%r14d
ffffffff80013556:	ff 
            Print(string);
ffffffff80013557:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
            g_kernelLogDepth++;
ffffffff8001355e:	89 05 40 bf 1c 00    	mov    %eax,0x1cbf40(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        if (bMaxPacketSize0 == 0) bMaxPacketSize0 = maxPacket; // fallback
ffffffff80013564:	45 84 f6             	test   %r14b,%r14b
ffffffff80013567:	45 0f 44 f4          	cmove  %r12d,%r14d
            Print(string);
ffffffff8001356b:	e8 50 fc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013570:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80013577:	e8 44 fc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001357c:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80013583:	e8 38 fc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013588:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8001358f:	e8 2c fc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013594:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001359b:	e8 20 fc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800135a0:	48 c7 c7 c2 b2 02 80 	mov    $0xffffffff8002b2c2,%rdi
ffffffff800135a7:	e8 14 fc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800135ac:	48 8b bd 50 fd ff ff 	mov    -0x2b0(%rbp),%rdi
ffffffff800135b3:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800135b8:	e8 d3 6e 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800135bd:	48 89 c7             	mov    %rax,%rdi
ffffffff800135c0:	e8 fb fb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800135c5:	48 c7 c7 dd b2 02 80 	mov    $0xffffffff8002b2dd,%rdi
ffffffff800135cc:	e8 ef fb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << ": bMaxPacketSize0=" << (uint64_t)bMaxPacketSize0;
ffffffff800135d1:	41 0f b6 c6          	movzbl %r14b,%eax
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800135d5:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800135da:	48 89 c7             	mov    %rax,%rdi
ffffffff800135dd:	48 89 85 38 fd ff ff 	mov    %rax,-0x2c8(%rbp)
ffffffff800135e4:	e8 a7 6e 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800135e9:	48 89 c7             	mov    %rax,%rdi
ffffffff800135ec:	e8 cf fb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800135f1:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800135f8:	e8 c3 fb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                                  | ((uint32_t)bMaxPacketSize0 << 16);
ffffffff800135fd:	41 0f b6 c6          	movzbl %r14b,%eax
            g_kernelLogDepth--;
ffffffff80013601:	83 2d 9c be 1c 00 01 	subl   $0x1,0x1cbe9c(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80013608:	41 89 c6             	mov    %eax,%r14d
ffffffff8001360b:	41 c1 e6 10          	shl    $0x10,%r14d
        if (bMaxPacketSize0 != maxPacket) {
ffffffff8001360f:	44 39 e0             	cmp    %r12d,%eax
ffffffff80013612:	0f 84 33 01 00 00    	je     ffffffff8001374b <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x77b>
            auto* evalCtx = (Xhci::InputContext*)Memory::g_pfa->AllocateZeroed();
ffffffff80013618:	48 8b 3d 91 93 13 00 	mov    0x139391(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff8001361f:	e8 ec 7b 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
            evalCtx->EP[0] = dev->OutputContext->EP[0];
ffffffff80013624:	48 8b 4b 48          	mov    0x48(%rbx),%rcx
            cc = Xhci::SendCommand(evalTrb);
ffffffff80013628:	48 8d bd d0 fe ff ff 	lea    -0x130(%rbp),%rdi
            evalCtx->ICC.AddFlags = (1 << 1);
ffffffff8001362f:	c7 40 04 02 00 00 00 	movl   $0x2,0x4(%rax)
            evalCtx->EP[0] = dev->OutputContext->EP[0];
ffffffff80013636:	48 8b 71 20          	mov    0x20(%rcx),%rsi
ffffffff8001363a:	48 89 70 40          	mov    %rsi,0x40(%rax)
ffffffff8001363e:	48 89 f2             	mov    %rsi,%rdx
ffffffff80013641:	48 8b 71 28          	mov    0x28(%rcx),%rsi
ffffffff80013645:	48 c1 ea 20          	shr    $0x20,%rdx
ffffffff80013649:	48 89 70 48          	mov    %rsi,0x48(%rax)
            evalCtx->EP[0].Field1 = (evalCtx->EP[0].Field1 & 0x0000FFFF)
ffffffff8001364d:	0f b7 d2             	movzwl %dx,%edx
            evalCtx->EP[0] = dev->OutputContext->EP[0];
ffffffff80013650:	48 8b 71 30          	mov    0x30(%rcx),%rsi
ffffffff80013654:	48 8b 49 38          	mov    0x38(%rcx),%rcx
                                  | ((uint32_t)bMaxPacketSize0 << 16);
ffffffff80013658:	44 09 f2             	or     %r14d,%edx
            evalCtx->EP[0] = dev->OutputContext->EP[0];
ffffffff8001365b:	48 89 70 50          	mov    %rsi,0x50(%rax)
ffffffff8001365f:	48 89 48 58          	mov    %rcx,0x58(%rax)
                                  | ((uint32_t)bMaxPacketSize0 << 16);
ffffffff80013663:	89 50 44             	mov    %edx,0x44(%rax)
ffffffff80013666:	48 2b 05 3b 93 13 00 	sub    0x13933b(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            evalTrb.Parameter0 = (uint32_t)(evalCtxPhys & 0xFFFFFFFF);
ffffffff8001366d:	48 89 85 d0 fe ff ff 	mov    %rax,-0x130(%rbp)
                               | ((uint32_t)slotId << 24);
ffffffff80013674:	8b 85 4c fd ff ff    	mov    -0x2b4(%rbp),%eax
            Xhci::TRB evalTrb = {};
ffffffff8001367a:	c7 85 d8 fe ff ff 00 	movl   $0x0,-0x128(%rbp)
ffffffff80013681:	00 00 00 
                               | ((uint32_t)slotId << 24);
ffffffff80013684:	80 cc 34             	or     $0x34,%ah
ffffffff80013687:	89 85 dc fe ff ff    	mov    %eax,-0x124(%rbp)
            cc = Xhci::SendCommand(evalTrb);
ffffffff8001368d:	e8 1e 14 00 00       	call   ffffffff80014ab0 <_ZN7Drivers3USB4Xhci11SendCommandERKNS1_3TRBE>
            Print(string);
ffffffff80013692:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
ffffffff80013699:	41 89 c4             	mov    %eax,%r12d
            g_kernelLogDepth++;
ffffffff8001369c:	8b 05 02 be 1c 00    	mov    0x1cbe02(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800136a2:	83 c0 01             	add    $0x1,%eax
ffffffff800136a5:	89 05 f9 bd 1c 00    	mov    %eax,0x1cbdf9(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            if (cc != Xhci::CC_SUCCESS) {
ffffffff800136ab:	41 83 fc 01          	cmp    $0x1,%r12d
ffffffff800136af:	0f 84 ab 06 00 00    	je     ffffffff80013d60 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xd90>
            Print(string);
ffffffff800136b5:	e8 06 fb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800136ba:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800136c1:	e8 fa fa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800136c6:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800136cd:	e8 ee fa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800136d2:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff800136d9:	e8 e2 fa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800136de:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800136e5:	e8 d6 fa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800136ea:	48 c7 c7 60 ca 02 80 	mov    $0xffffffff8002ca60,%rdi
ffffffff800136f1:	e8 ca fa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800136f6:	48 8b bd 50 fd ff ff 	mov    -0x2b0(%rbp),%rdi
ffffffff800136fd:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80013702:	e8 89 6d 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80013707:	48 89 c7             	mov    %rax,%rdi
ffffffff8001370a:	e8 b1 fa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001370f:	48 c7 c7 95 b3 02 80 	mov    $0xffffffff8002b395,%rdi
ffffffff80013716:	e8 a5 fa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                    << (uint64_t)slotId << " cc=" << (uint64_t)cc;
ffffffff8001371b:	44 89 e7             	mov    %r12d,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001371e:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80013723:	e8 68 6d 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80013728:	48 89 c7             	mov    %rax,%rdi
ffffffff8001372b:	e8 90 fa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80013730:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80013737:	e8 84 fa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001373c:	8b 05 62 bd 1c 00    	mov    0x1cbd62(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80013742:	83 e8 01             	sub    $0x1,%eax
ffffffff80013745:	89 05 59 bd 1c 00    	mov    %eax,0x1cbd59(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        uint64_t curDeq = dev->EP0RingPhys + (uint64_t)dev->EP0RingEnqueue * sizeof(Xhci::TRB);
ffffffff8001374b:	8b 43 40             	mov    0x40(%rbx),%eax
        if (dev->EP0RingCCS) {
ffffffff8001374e:	0f b6 53 44          	movzbl 0x44(%rbx),%edx
                                | ((uint32_t)bMaxPacketSize0 << 16);
ffffffff80013752:	41 83 ce 26          	or     $0x26,%r14d
        cc = Xhci::SendCommand(addrTrb2);
ffffffff80013756:	48 8d bd 88 fd ff ff 	lea    -0x278(%rbp),%rdi
        Xhci::TRB addrTrb2 = {};
ffffffff8001375d:	c7 85 90 fd ff ff 00 	movl   $0x0,-0x270(%rbp)
ffffffff80013764:	00 00 00 
        uint64_t curDeq = dev->EP0RingPhys + (uint64_t)dev->EP0RingEnqueue * sizeof(Xhci::TRB);
ffffffff80013767:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff8001376b:	48 03 43 38          	add    0x38(%rbx),%rax
                                | ((uint32_t)bMaxPacketSize0 << 16);
ffffffff8001376f:	45 89 75 44          	mov    %r14d,0x44(%r13)
        if (dev->EP0RingCCS) {
ffffffff80013773:	48 09 d0             	or     %rdx,%rax
ffffffff80013776:	49 89 45 48          	mov    %rax,0x48(%r13)
        addrTrb2.Parameter0 = (uint32_t)(inputCtxPhys & 0xFFFFFFFF);
ffffffff8001377a:	48 8b 85 40 fd ff ff 	mov    -0x2c0(%rbp),%rax
ffffffff80013781:	48 89 85 88 fd ff ff 	mov    %rax,-0x278(%rbp)
                            | ((uint32_t)slotId << 24);
ffffffff80013788:	8b 85 4c fd ff ff    	mov    -0x2b4(%rbp),%eax
ffffffff8001378e:	80 cc 2c             	or     $0x2c,%ah
ffffffff80013791:	89 85 94 fd ff ff    	mov    %eax,-0x26c(%rbp)
        cc = Xhci::SendCommand(addrTrb2);
ffffffff80013797:	e8 14 13 00 00       	call   ffffffff80014ab0 <_ZN7Drivers3USB4Xhci11SendCommandERKNS1_3TRBE>
ffffffff8001379c:	41 89 c4             	mov    %eax,%r12d
        if (cc != Xhci::CC_SUCCESS) {
ffffffff8001379f:	83 f8 01             	cmp    $0x1,%eax
ffffffff800137a2:	74 7c                	je     ffffffff80013820 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x850>
            Print(string);
ffffffff800137a4:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
            g_kernelLogDepth++;
ffffffff800137ab:	83 05 f2 bc 1c 00 01 	addl   $0x1,0x1cbcf2(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800137b2:	e8 09 fa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800137b7:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800137be:	e8 fd f9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800137c3:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800137ca:	e8 f1 f9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800137cf:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff800137d6:	e8 e5 f9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800137db:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800137e2:	e8 d9 f9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800137e7:	48 c7 c7 0d b3 02 80 	mov    $0xffffffff8002b30d,%rdi
ffffffff800137ee:	e8 cd f9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800137f3:	48 8b bd 50 fd ff ff 	mov    -0x2b0(%rbp),%rdi
ffffffff800137fa:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800137ff:	e8 8c 6c 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80013804:	48 89 c7             	mov    %rax,%rdi
ffffffff80013807:	e8 b4 f9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001380c:	48 c7 c7 95 b3 02 80 	mov    $0xffffffff8002b395,%rdi
ffffffff80013813:	e8 a8 f9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << (uint64_t)slotId << " cc=" << (uint64_t)cc;
ffffffff80013818:	44 89 e7             	mov    %r12d,%edi
ffffffff8001381b:	e9 17 fc ff ff       	jmp    ffffffff80013437 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x467>
    asm volatile("pushfq; pop %0" : "=r"(flags));
ffffffff80013820:	9c                   	pushf
ffffffff80013821:	5a                   	pop    %rdx
    if (flags & (1 << 9)) {
ffffffff80013822:	b8 10 27 00 00       	mov    $0x2710,%eax
ffffffff80013827:	80 e6 02             	and    $0x2,%dh
ffffffff8001382a:	0f 85 b0 05 00 00    	jne    ffffffff80013de0 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xe10>
            asm volatile("outb %%al, $0x80" ::: "memory");
ffffffff80013830:	e6 80                	out    %al,$0x80
ffffffff80013832:	e6 80                	out    %al,$0x80
        for (uint64_t i = 0; i < ms * 1000; i++) {
ffffffff80013834:	48 83 e8 02          	sub    $0x2,%rax
ffffffff80013838:	75 f6                	jne    ffffffff80013830 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x860>
ffffffff8001383a:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
            g_kernelLogDepth++;
ffffffff80013841:	83 05 5c bc 1c 00 01 	addl   $0x1,0x1cbc5c(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80013848:	e8 73 f9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001384d:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80013854:	e8 67 f9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013859:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80013860:	e8 5b f9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013865:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8001386c:	e8 4f f9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013871:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80013878:	e8 43 f9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001387d:	48 c7 c7 c2 b2 02 80 	mov    $0xffffffff8002b2c2,%rdi
ffffffff80013884:	e8 37 f9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80013889:	48 8b bd 50 fd ff ff 	mov    -0x2b0(%rbp),%rdi
ffffffff80013890:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80013895:	e8 f6 6b 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001389a:	48 89 c7             	mov    %rax,%rdi
ffffffff8001389d:	e8 1e f9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800138a2:	48 c7 c7 2a b3 02 80 	mov    $0xffffffff8002b32a,%rdi
ffffffff800138a9:	e8 12 f9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800138ae:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800138b5:	e8 06 f9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        DeviceDescriptor devDesc = {};
ffffffff800138ba:	45 31 d2             	xor    %r10d,%r10d
        cc = Xhci::ControlTransfer(slotId, REQTYPE_DEV_TO_HOST, REQ_GET_DESCRIPTOR,
ffffffff800138bd:	45 31 c0             	xor    %r8d,%r8d
ffffffff800138c0:	48 8d 85 bc fd ff ff 	lea    -0x244(%rbp),%rax
            g_kernelLogDepth--;
ffffffff800138c7:	83 2d d6 bb 1c 00 01 	subl   $0x1,0x1cbbd6(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800138ce:	8b bd 58 fd ff ff    	mov    -0x2a8(%rbp),%edi
ffffffff800138d4:	41 b9 12 00 00 00    	mov    $0x12,%r9d
ffffffff800138da:	b9 00 01 00 00       	mov    $0x100,%ecx
        DeviceDescriptor devDesc = {};
ffffffff800138df:	48 c7 85 bc fd ff ff 	movq   $0x0,-0x244(%rbp)
ffffffff800138e6:	00 00 00 00 
        cc = Xhci::ControlTransfer(slotId, REQTYPE_DEV_TO_HOST, REQ_GET_DESCRIPTOR,
ffffffff800138ea:	ba 06 00 00 00       	mov    $0x6,%edx
ffffffff800138ef:	be 80 00 00 00       	mov    $0x80,%esi
        DeviceDescriptor devDesc = {};
ffffffff800138f4:	48 c7 85 c4 fd ff ff 	movq   $0x0,-0x23c(%rbp)
ffffffff800138fb:	00 00 00 00 
ffffffff800138ff:	66 44 89 95 cc fd ff 	mov    %r10w,-0x234(%rbp)
ffffffff80013906:	ff 
        cc = Xhci::ControlTransfer(slotId, REQTYPE_DEV_TO_HOST, REQ_GET_DESCRIPTOR,
ffffffff80013907:	6a 01                	push   $0x1
ffffffff80013909:	50                   	push   %rax
ffffffff8001390a:	e8 41 13 00 00       	call   ffffffff80014c50 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb>
        if (cc != Xhci::CC_SUCCESS && cc != Xhci::CC_SHORT_PACKET) {
ffffffff8001390f:	41 5b                	pop    %r11
ffffffff80013911:	41 5d                	pop    %r13
        cc = Xhci::ControlTransfer(slotId, REQTYPE_DEV_TO_HOST, REQ_GET_DESCRIPTOR,
ffffffff80013913:	41 89 c4             	mov    %eax,%r12d
            g_kernelLogDepth++;
ffffffff80013916:	8b 05 88 bb 1c 00    	mov    0x1cbb88(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001391c:	83 c0 01             	add    $0x1,%eax
        if (cc != Xhci::CC_SUCCESS && cc != Xhci::CC_SHORT_PACKET) {
ffffffff8001391f:	41 83 fc 01          	cmp    $0x1,%r12d
ffffffff80013923:	74 63                	je     ffffffff80013988 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x9b8>
ffffffff80013925:	41 83 fc 0d          	cmp    $0xd,%r12d
ffffffff80013929:	74 5d                	je     ffffffff80013988 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x9b8>
            Print(string);
ffffffff8001392b:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
            g_kernelLogDepth++;
ffffffff80013932:	89 05 6c bb 1c 00    	mov    %eax,0x1cbb6c(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80013938:	e8 83 f8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001393d:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80013944:	e8 77 f8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013949:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80013950:	e8 6b f8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013955:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff8001395c:	e8 5f f8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013961:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80013968:	e8 53 f8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001396d:	48 c7 c7 80 ca 02 80 	mov    $0xffffffff8002ca80,%rdi
ffffffff80013974:	e8 47 f8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            KernelLogStream(ERROR, "USB") << "GET_DESCRIPTOR(Device) failed, cc=" << (uint64_t)cc;
ffffffff80013979:	44 89 e7             	mov    %r12d,%edi
ffffffff8001397c:	e9 b6 fa ff ff       	jmp    ffffffff80013437 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x467>
ffffffff80013981:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        dev->VendorId  = devDesc.idVendor;
ffffffff80013988:	8b 95 c4 fd ff ff    	mov    -0x23c(%rbp),%edx
ffffffff8001398e:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
            g_kernelLogDepth++;
ffffffff80013995:	89 05 09 bb 1c 00    	mov    %eax,0x1cbb09(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001399b:	89 53 08             	mov    %edx,0x8(%rbx)
            Print(string);
ffffffff8001399e:	e8 1d f8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800139a3:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800139aa:	e8 11 f8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800139af:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800139b6:	e8 05 f8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800139bb:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff800139c2:	e8 f9 f7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800139c7:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800139ce:	e8 ed f7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800139d3:	48 c7 c7 c2 b2 02 80 	mov    $0xffffffff8002b2c2,%rdi
ffffffff800139da:	e8 e1 f7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800139df:	48 8b bd 50 fd ff ff 	mov    -0x2b0(%rbp),%rdi
ffffffff800139e6:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800139eb:	e8 a0 6a 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800139f0:	48 89 c7             	mov    %rax,%rdi
ffffffff800139f3:	e8 c8 f7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800139f8:	48 c7 c7 35 b3 02 80 	mov    $0xffffffff8002b335,%rdi
ffffffff800139ff:	e8 bc f7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << ": VID:PID = " << base::hex << (uint64_t)devDesc.idVendor
ffffffff80013a04:	0f b7 bd c4 fd ff ff 	movzwl -0x23c(%rbp),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80013a0b:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80013a10:	e8 7b 6a 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80013a15:	48 89 c7             	mov    %rax,%rdi
ffffffff80013a18:	e8 a3 f7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80013a1d:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff80013a24:	e8 97 f7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << ":" << (uint64_t)devDesc.idProduct << base::dec;
ffffffff80013a29:	0f b7 bd c6 fd ff ff 	movzwl -0x23a(%rbp),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80013a30:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80013a35:	e8 56 6a 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80013a3a:	48 89 c7             	mov    %rax,%rdi
ffffffff80013a3d:	e8 7e f7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80013a42:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80013a49:	e8 72 f7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        cc = Xhci::ControlTransfer(slotId, REQTYPE_DEV_TO_HOST, REQ_GET_DESCRIPTOR,
ffffffff80013a4e:	48 8d 85 6f fd ff ff 	lea    -0x291(%rbp),%rax
ffffffff80013a55:	45 31 c0             	xor    %r8d,%r8d
            g_kernelLogDepth--;
ffffffff80013a58:	83 2d 45 ba 1c 00 01 	subl   $0x1,0x1cba45(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80013a5f:	8b bd 58 fd ff ff    	mov    -0x2a8(%rbp),%edi
ffffffff80013a65:	b9 00 02 00 00       	mov    $0x200,%ecx
ffffffff80013a6a:	ba 06 00 00 00       	mov    $0x6,%edx
        ConfigDescriptor cfgHdr = {};
ffffffff80013a6f:	48 c7 85 6f fd ff ff 	movq   $0x0,-0x291(%rbp)
ffffffff80013a76:	00 00 00 00 
ffffffff80013a7a:	c6 85 77 fd ff ff 00 	movb   $0x0,-0x289(%rbp)
        cc = Xhci::ControlTransfer(slotId, REQTYPE_DEV_TO_HOST, REQ_GET_DESCRIPTOR,
ffffffff80013a81:	41 b9 09 00 00 00    	mov    $0x9,%r9d
ffffffff80013a87:	be 80 00 00 00       	mov    $0x80,%esi
ffffffff80013a8c:	6a 01                	push   $0x1
ffffffff80013a8e:	50                   	push   %rax
ffffffff80013a8f:	e8 bc 11 00 00       	call   ffffffff80014c50 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb>
        if (cc != Xhci::CC_SUCCESS && cc != Xhci::CC_SHORT_PACKET) {
ffffffff80013a94:	41 58                	pop    %r8
ffffffff80013a96:	41 59                	pop    %r9
        cc = Xhci::ControlTransfer(slotId, REQTYPE_DEV_TO_HOST, REQ_GET_DESCRIPTOR,
ffffffff80013a98:	41 89 c4             	mov    %eax,%r12d
        if (cc != Xhci::CC_SUCCESS && cc != Xhci::CC_SHORT_PACKET) {
ffffffff80013a9b:	83 f8 01             	cmp    $0x1,%eax
ffffffff80013a9e:	74 60                	je     ffffffff80013b00 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xb30>
ffffffff80013aa0:	83 f8 0d             	cmp    $0xd,%eax
ffffffff80013aa3:	74 5b                	je     ffffffff80013b00 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xb30>
            Print(string);
ffffffff80013aa5:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
            g_kernelLogDepth++;
ffffffff80013aac:	83 05 f1 b9 1c 00 01 	addl   $0x1,0x1cb9f1(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80013ab3:	e8 08 f7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013ab8:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80013abf:	e8 fc f6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013ac4:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80013acb:	e8 f0 f6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013ad0:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80013ad7:	e8 e4 f6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013adc:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80013ae3:	e8 d8 f6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013ae8:	48 c7 c7 a8 ca 02 80 	mov    $0xffffffff8002caa8,%rdi
ffffffff80013aef:	e8 cc f6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            KernelLogStream(ERROR, "USB") << "GET_DESCRIPTOR(Config header) failed, cc=" << (uint64_t)cc;
ffffffff80013af4:	44 89 e7             	mov    %r12d,%edi
ffffffff80013af7:	e9 3b f9 ff ff       	jmp    ffffffff80013437 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x467>
ffffffff80013afc:	0f 1f 40 00          	nopl   0x0(%rax)
        uint16_t totalLen = cfgHdr.wTotalLength;
ffffffff80013b00:	44 0f b7 a5 71 fd ff 	movzwl -0x28f(%rbp),%r12d
ffffffff80013b07:	ff 
        uint8_t cfgBuf[256] = {};
ffffffff80013b08:	31 c0                	xor    %eax,%eax
ffffffff80013b0a:	48 8d bd d0 fd ff ff 	lea    -0x230(%rbp),%rdi
ffffffff80013b11:	b9 20 00 00 00       	mov    $0x20,%ecx
ffffffff80013b16:	f3 48 ab             	rep stos %rax,(%rdi)
        if (totalLen > 256) totalLen = 256;
ffffffff80013b19:	b8 00 01 00 00       	mov    $0x100,%eax
        cc = Xhci::ControlTransfer(slotId, REQTYPE_DEV_TO_HOST, REQ_GET_DESCRIPTOR,
ffffffff80013b1e:	6a 01                	push   $0x1
ffffffff80013b20:	4c 8d ad d0 fd ff ff 	lea    -0x230(%rbp),%r13
        if (totalLen > 256) totalLen = 256;
ffffffff80013b27:	66 41 39 c4          	cmp    %ax,%r12w
        cc = Xhci::ControlTransfer(slotId, REQTYPE_DEV_TO_HOST, REQ_GET_DESCRIPTOR,
ffffffff80013b2b:	41 55                	push   %r13
ffffffff80013b2d:	b9 00 02 00 00       	mov    $0x200,%ecx
ffffffff80013b32:	ba 06 00 00 00       	mov    $0x6,%edx
        if (totalLen > 256) totalLen = 256;
ffffffff80013b37:	41 0f 46 c4          	cmovbe %r12d,%eax
        cc = Xhci::ControlTransfer(slotId, REQTYPE_DEV_TO_HOST, REQ_GET_DESCRIPTOR,
ffffffff80013b3b:	8b bd 58 fd ff ff    	mov    -0x2a8(%rbp),%edi
ffffffff80013b41:	45 31 c0             	xor    %r8d,%r8d
ffffffff80013b44:	be 80 00 00 00       	mov    $0x80,%esi
        if (totalLen > 256) totalLen = 256;
ffffffff80013b49:	44 0f b7 d0          	movzwl %ax,%r10d
        cc = Xhci::ControlTransfer(slotId, REQTYPE_DEV_TO_HOST, REQ_GET_DESCRIPTOR,
ffffffff80013b4d:	45 89 d1             	mov    %r10d,%r9d
ffffffff80013b50:	44 89 95 40 fd ff ff 	mov    %r10d,-0x2c0(%rbp)
        if (totalLen > 256) totalLen = 256;
ffffffff80013b57:	45 89 d6             	mov    %r10d,%r14d
        cc = Xhci::ControlTransfer(slotId, REQTYPE_DEV_TO_HOST, REQ_GET_DESCRIPTOR,
ffffffff80013b5a:	e8 f1 10 00 00       	call   ffffffff80014c50 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb>
        if (cc != Xhci::CC_SUCCESS && cc != Xhci::CC_SHORT_PACKET) {
ffffffff80013b5f:	5e                   	pop    %rsi
ffffffff80013b60:	5f                   	pop    %rdi
ffffffff80013b61:	83 f8 01             	cmp    $0x1,%eax
ffffffff80013b64:	0f 95 c1             	setne  %cl
ffffffff80013b67:	83 f8 0d             	cmp    $0xd,%eax
ffffffff80013b6a:	0f 95 c2             	setne  %dl
ffffffff80013b6d:	84 d1                	test   %dl,%cl
ffffffff80013b6f:	0f 85 0a 04 00 00    	jne    ffffffff80013f7f <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xfaf>
        while (offset + 2 <= totalLen) {
ffffffff80013b75:	66 41 83 fc 01       	cmp    $0x1,%r12w
        cc = Xhci::ControlTransfer(slotId, REQTYPE_HOST_TO_DEV, REQ_SET_CONFIGURATION,
ffffffff80013b7a:	0f b6 85 74 fd ff ff 	movzbl -0x28c(%rbp),%eax
        while (offset + 2 <= totalLen) {
ffffffff80013b81:	44 8b 95 40 fd ff ff 	mov    -0x2c0(%rbp),%r10d
ffffffff80013b88:	0f 86 72 03 00 00    	jbe    ffffffff80013f00 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xf30>
        uint16_t hidReportDescLen = 0;
ffffffff80013b8e:	31 c9                	xor    %ecx,%ecx
        bool foundEp = false;
ffffffff80013b90:	45 31 e4             	xor    %r12d,%r12d
        bool foundHid = false;
ffffffff80013b93:	31 d2                	xor    %edx,%edx
        uint16_t offset = 0;
ffffffff80013b95:	31 f6                	xor    %esi,%esi
        uint16_t hidReportDescLen = 0;
ffffffff80013b97:	66 89 8d 40 fd ff ff 	mov    %cx,-0x2c0(%rbp)
        while (offset + 2 <= totalLen) {
ffffffff80013b9e:	bf 01 00 00 00       	mov    $0x1,%edi
ffffffff80013ba3:	31 c9                	xor    %ecx,%ecx
ffffffff80013ba5:	eb 7b                	jmp    ffffffff80013c22 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xc52>
ffffffff80013ba7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff80013bae:	00 00 
            if (type == DESC_HID && foundHid && !foundEp && len >= 9 && offset + 8 < totalLen) {
ffffffff80013bb0:	40 80 ff 21          	cmp    $0x21,%dil
ffffffff80013bb4:	41 0f 94 c3          	sete   %r11b
ffffffff80013bb8:	41 20 d3             	and    %dl,%r11b
ffffffff80013bbb:	0f 84 cf 00 00 00    	je     ffffffff80013c90 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xcc0>
ffffffff80013bc1:	44 89 e2             	mov    %r12d,%edx
ffffffff80013bc4:	83 f2 01             	xor    $0x1,%edx
ffffffff80013bc7:	41 80 f8 08          	cmp    $0x8,%r8b
ffffffff80013bcb:	40 0f 97 c7          	seta   %dil
ffffffff80013bcf:	40 20 fa             	and    %dil,%dl
ffffffff80013bd2:	0f 84 28 01 00 00    	je     ffffffff80013d00 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xd30>
ffffffff80013bd8:	8d 79 08             	lea    0x8(%rcx),%edi
ffffffff80013bdb:	45 31 e4             	xor    %r12d,%r12d
ffffffff80013bde:	41 39 fa             	cmp    %edi,%r10d
ffffffff80013be1:	7e 2d                	jle    ffffffff80013c10 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xc40>
                hidReportDescLen = (uint16_t)cfgBuf[offset + 7]
ffffffff80013be3:	83 c1 07             	add    $0x7,%ecx
ffffffff80013be6:	48 63 c9             	movslq %ecx,%rcx
ffffffff80013be9:	44 0f b6 8c 0d d0 fd 	movzbl -0x230(%rbp,%rcx,1),%r9d
ffffffff80013bf0:	ff ff 
                                 | ((uint16_t)cfgBuf[offset + 8] << 8);
ffffffff80013bf2:	48 63 cf             	movslq %edi,%rcx
ffffffff80013bf5:	0f b6 8c 0d d0 fd ff 	movzbl -0x230(%rbp,%rcx,1),%ecx
ffffffff80013bfc:	ff 
ffffffff80013bfd:	c1 e1 08             	shl    $0x8,%ecx
ffffffff80013c00:	41 09 c9             	or     %ecx,%r9d
ffffffff80013c03:	66 44 89 8d 40 fd ff 	mov    %r9w,-0x2c0(%rbp)
ffffffff80013c0a:	ff 
            if (type == DESC_ENDPOINT && foundHid && !foundEp &&
ffffffff80013c0b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            offset += len;
ffffffff80013c10:	44 01 c6             	add    %r8d,%esi
        while (offset + 2 <= totalLen) {
ffffffff80013c13:	0f b7 ce             	movzwl %si,%ecx
ffffffff80013c16:	8d 79 01             	lea    0x1(%rcx),%edi
ffffffff80013c19:	41 39 fa             	cmp    %edi,%r10d
ffffffff80013c1c:	0f 8e e6 01 00 00    	jle    ffffffff80013e08 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xe38>
            uint8_t len  = cfgBuf[offset];
ffffffff80013c22:	4c 63 c9             	movslq %ecx,%r9
            uint8_t type = cfgBuf[offset + 1];
ffffffff80013c25:	48 63 ff             	movslq %edi,%rdi
            uint8_t len  = cfgBuf[offset];
ffffffff80013c28:	46 0f b6 84 0d d0 fd 	movzbl -0x230(%rbp,%r9,1),%r8d
ffffffff80013c2f:	ff ff 
            uint8_t type = cfgBuf[offset + 1];
ffffffff80013c31:	0f b6 bc 3d d0 fd ff 	movzbl -0x230(%rbp,%rdi,1),%edi
ffffffff80013c38:	ff 
            if (len == 0) break;
ffffffff80013c39:	45 84 c0             	test   %r8b,%r8b
ffffffff80013c3c:	0f 84 c6 01 00 00    	je     ffffffff80013e08 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xe38>
            if (type == DESC_INTERFACE && offset + sizeof(InterfaceDescriptor) <= totalLen) {
ffffffff80013c42:	40 80 ff 04          	cmp    $0x4,%dil
ffffffff80013c46:	0f 85 64 ff ff ff    	jne    ffffffff80013bb0 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xbe0>
ffffffff80013c4c:	8d 4e 09             	lea    0x9(%rsi),%ecx
ffffffff80013c4f:	66 41 39 ce          	cmp    %cx,%r14w
ffffffff80013c53:	72 bb                	jb     ffffffff80013c10 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xc40>
                foundHid = false;
ffffffff80013c55:	31 d2                	xor    %edx,%edx
                if (!foundEp &&
ffffffff80013c57:	45 84 e4             	test   %r12b,%r12b
ffffffff80013c5a:	75 b4                	jne    ffffffff80013c10 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xc40>
                auto* iface = (InterfaceDescriptor*)&cfgBuf[offset];
ffffffff80013c5c:	4d 01 e9             	add    %r13,%r9
                if (!foundEp &&
ffffffff80013c5f:	41 80 79 05 03       	cmpb   $0x3,0x5(%r9)
ffffffff80013c64:	75 aa                	jne    ffffffff80013c10 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xc40>
                    iface->bInterfaceClass == CLASS_HID &&
ffffffff80013c66:	41 80 79 06 01       	cmpb   $0x1,0x6(%r9)
ffffffff80013c6b:	75 a3                	jne    ffffffff80013c10 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xc40>
                    dev->InterfaceClass    = iface->bInterfaceClass;
ffffffff80013c6d:	ba 03 01 00 00       	mov    $0x103,%edx
ffffffff80013c72:	66 89 53 0c          	mov    %dx,0xc(%rbx)
                    dev->InterfaceProtocol = iface->bInterfaceProtocol;
ffffffff80013c76:	41 0f b6 51 07       	movzbl 0x7(%r9),%edx
ffffffff80013c7b:	88 53 0e             	mov    %dl,0xe(%rbx)
            if (type == DESC_ENDPOINT && foundHid && !foundEp &&
ffffffff80013c7e:	66 90                	xchg   %ax,%ax
        while (offset + 2 <= totalLen) {
ffffffff80013c80:	45 31 e4             	xor    %r12d,%r12d
ffffffff80013c83:	ba 01 00 00 00       	mov    $0x1,%edx
ffffffff80013c88:	eb 86                	jmp    ffffffff80013c10 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xc40>
ffffffff80013c8a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            if (type == DESC_ENDPOINT && foundHid && !foundEp &&
ffffffff80013c90:	40 80 ff 05          	cmp    $0x5,%dil
ffffffff80013c94:	0f 94 c1             	sete   %cl
ffffffff80013c97:	20 d1                	and    %dl,%cl
ffffffff80013c99:	0f 84 71 ff ff ff    	je     ffffffff80013c10 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xc40>
ffffffff80013c9f:	45 84 e4             	test   %r12b,%r12b
ffffffff80013ca2:	74 0c                	je     ffffffff80013cb0 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xce0>
        while (offset + 2 <= totalLen) {
ffffffff80013ca4:	89 ca                	mov    %ecx,%edx
ffffffff80013ca6:	41 89 cc             	mov    %ecx,%r12d
ffffffff80013ca9:	e9 62 ff ff ff       	jmp    ffffffff80013c10 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xc40>
ffffffff80013cae:	66 90                	xchg   %ax,%ax
            if (type == DESC_ENDPOINT && foundHid && !foundEp &&
ffffffff80013cb0:	8d 56 07             	lea    0x7(%rsi),%edx
ffffffff80013cb3:	66 41 39 d6          	cmp    %dx,%r14w
ffffffff80013cb7:	72 c7                	jb     ffffffff80013c80 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xcb0>
                auto* ep = (EndpointDescriptor*)&cfgBuf[offset];
ffffffff80013cb9:	4d 01 e9             	add    %r13,%r9
                if ((ep->bEndpointAddress & EP_DIR_IN) &&
ffffffff80013cbc:	89 ca                	mov    %ecx,%edx
ffffffff80013cbe:	41 0f b6 79 02       	movzbl 0x2(%r9),%edi
ffffffff80013cc3:	40 84 ff             	test   %dil,%dil
ffffffff80013cc6:	0f 89 44 ff ff ff    	jns    ffffffff80013c10 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xc40>
ffffffff80013ccc:	45 0f b6 59 03       	movzbl 0x3(%r9),%r11d
ffffffff80013cd1:	41 f7 d3             	not    %r11d
ffffffff80013cd4:	41 83 e3 03          	and    $0x3,%r11d
ffffffff80013cd8:	0f 85 32 ff ff ff    	jne    ffffffff80013c10 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xc40>
                    dev->InterruptEpNum     = ep->bEndpointAddress & 0x0F;
ffffffff80013cde:	83 e7 0f             	and    $0xf,%edi
ffffffff80013ce1:	40 88 7b 0f          	mov    %dil,0xf(%rbx)
                    dev->InterruptMaxPacket = ep->wMaxPacketSize & 0x7FF;
ffffffff80013ce5:	41 0f b7 51 04       	movzwl 0x4(%r9),%edx
ffffffff80013cea:	66 81 e2 ff 07       	and    $0x7ff,%dx
ffffffff80013cef:	66 89 53 10          	mov    %dx,0x10(%rbx)
                    dev->InterruptInterval  = ep->bInterval;
ffffffff80013cf3:	41 0f b6 51 06       	movzbl 0x6(%r9),%edx
ffffffff80013cf8:	88 53 12             	mov    %dl,0x12(%rbx)
                    foundEp = true;
ffffffff80013cfb:	eb a7                	jmp    ffffffff80013ca4 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xcd4>
ffffffff80013cfd:	0f 1f 00             	nopl   (%rax)
ffffffff80013d00:	44 89 da             	mov    %r11d,%edx
ffffffff80013d03:	e9 08 ff ff ff       	jmp    ffffffff80013c10 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xc40>
ffffffff80013d08:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80013d0f:	00 
ffffffff80013d10:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
            g_kernelLogDepth++;
ffffffff80013d17:	89 05 87 b7 1c 00    	mov    %eax,0x1cb787(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80013d1d:	e8 9e f4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013d22:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80013d29:	e8 92 f4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013d2e:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80013d35:	e8 86 f4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013d3a:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80013d41:	e8 7a f4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013d46:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80013d4d:	e8 6e f4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013d52:	48 c7 c7 38 ca 02 80 	mov    $0xffffffff8002ca38,%rdi
ffffffff80013d59:	e9 d1 f6 ff ff       	jmp    ffffffff8001342f <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x45f>
ffffffff80013d5e:	66 90                	xchg   %ax,%ax
ffffffff80013d60:	e8 5b f4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013d65:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80013d6c:	e8 4f f4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013d71:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80013d78:	e8 43 f4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013d7d:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff80013d84:	e8 37 f4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013d89:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80013d90:	e8 2b f4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013d95:	48 c7 c7 c2 b2 02 80 	mov    $0xffffffff8002b2c2,%rdi
ffffffff80013d9c:	e8 1f f4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80013da1:	48 8b bd 50 fd ff ff 	mov    -0x2b0(%rbp),%rdi
ffffffff80013da8:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80013dad:	e8 de 66 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80013db2:	48 89 c7             	mov    %rax,%rdi
ffffffff80013db5:	e8 06 f4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80013dba:	48 c7 c7 f0 b2 02 80 	mov    $0xffffffff8002b2f0,%rdi
ffffffff80013dc1:	e8 fa f3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80013dc6:	48 8b bd 38 fd ff ff 	mov    -0x2c8(%rbp),%rdi
ffffffff80013dcd:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80013dd2:	e9 4c f9 ff ff       	jmp    ffffffff80013723 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x753>
ffffffff80013dd7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff80013dde:	00 00 
        uint64_t start = Timekeeping::GetMilliseconds();
ffffffff80013de0:	e8 2b f8 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff80013de5:	49 89 c4             	mov    %rax,%r12
        while (Timekeeping::GetMilliseconds() - start < ms) {
ffffffff80013de8:	eb 08                	jmp    ffffffff80013df2 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xe22>
ffffffff80013dea:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            asm volatile("pause" ::: "memory");
ffffffff80013df0:	f3 90                	pause
        while (Timekeeping::GetMilliseconds() - start < ms) {
ffffffff80013df2:	e8 19 f8 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff80013df7:	4c 29 e0             	sub    %r12,%rax
ffffffff80013dfa:	48 83 f8 09          	cmp    $0x9,%rax
ffffffff80013dfe:	76 f0                	jbe    ffffffff80013df0 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xe20>
ffffffff80013e00:	e9 35 fa ff ff       	jmp    ffffffff8001383a <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x86a>
ffffffff80013e05:	0f 1f 00             	nopl   (%rax)
        cc = Xhci::ControlTransfer(slotId, REQTYPE_HOST_TO_DEV, REQ_SET_CONFIGURATION,
ffffffff80013e08:	6a 00                	push   $0x0
ffffffff80013e0a:	8b bd 58 fd ff ff    	mov    -0x2a8(%rbp),%edi
ffffffff80013e10:	45 31 c9             	xor    %r9d,%r9d
ffffffff80013e13:	45 31 c0             	xor    %r8d,%r8d
ffffffff80013e16:	6a 00                	push   $0x0
ffffffff80013e18:	89 c1                	mov    %eax,%ecx
ffffffff80013e1a:	ba 09 00 00 00       	mov    $0x9,%edx
ffffffff80013e1f:	31 f6                	xor    %esi,%esi
ffffffff80013e21:	e8 2a 0e 00 00       	call   ffffffff80014c50 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb>
        if (cc != Xhci::CC_SUCCESS) {
ffffffff80013e26:	41 5b                	pop    %r11
ffffffff80013e28:	41 5d                	pop    %r13
        cc = Xhci::ControlTransfer(slotId, REQTYPE_HOST_TO_DEV, REQ_SET_CONFIGURATION,
ffffffff80013e2a:	41 89 c6             	mov    %eax,%r14d
        if (cc != Xhci::CC_SUCCESS) {
ffffffff80013e2d:	83 f8 01             	cmp    $0x1,%eax
ffffffff80013e30:	0f 85 fa 00 00 00    	jne    ffffffff80013f30 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xf60>
        if (foundEp) {
ffffffff80013e36:	45 84 e4             	test   %r12b,%r12b
ffffffff80013e39:	0f 85 a0 01 00 00    	jne    ffffffff80013fdf <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x100f>
        if (dev->InterfaceProtocol == PROTOCOL_KEYBOARD) {
ffffffff80013e3f:	0f b6 43 0e          	movzbl 0xe(%rbx),%eax
ffffffff80013e43:	3c 01                	cmp    $0x1,%al
ffffffff80013e45:	0f 84 3d 03 00 00    	je     ffffffff80014188 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x11b8>
        } else if (dev->InterfaceProtocol == PROTOCOL_MOUSE) {
ffffffff80013e4b:	3c 02                	cmp    $0x2,%al
ffffffff80013e4d:	0f 84 3e 05 00 00    	je     ffffffff80014391 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x13c1>
            Print(string);
ffffffff80013e53:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
            g_kernelLogDepth++;
ffffffff80013e5a:	83 05 43 b6 1c 00 01 	addl   $0x1,0x1cb643(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80013e61:	e8 5a f3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013e66:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80013e6d:	e8 4e f3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013e72:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80013e79:	e8 42 f3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013e7e:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff80013e85:	e8 36 f3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013e8a:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80013e91:	e8 2a f3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013e96:	48 c7 c7 c2 b2 02 80 	mov    $0xffffffff8002b2c2,%rdi
ffffffff80013e9d:	e8 1e f3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80013ea2:	48 8b bd 50 fd ff ff 	mov    -0x2b0(%rbp),%rdi
ffffffff80013ea9:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80013eae:	e8 dd 65 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80013eb3:	48 89 c7             	mov    %rax,%rdi
ffffffff80013eb6:	e8 05 f3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80013ebb:	48 c7 c7 d7 b3 02 80 	mov    $0xffffffff8002b3d7,%rdi
ffffffff80013ec2:	e8 f9 f2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << ": Non-HID device, class=" << (uint64_t)devDesc.bDeviceClass;
ffffffff80013ec7:	0f b6 bd c0 fd ff ff 	movzbl -0x240(%rbp),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80013ece:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80013ed3:	e8 b8 65 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80013ed8:	48 89 c7             	mov    %rax,%rdi
            Print(string);
ffffffff80013edb:	e8 e0 f2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013ee0:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80013ee7:	e8 d4 f2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80013eec:	8b 05 b2 b5 1c 00    	mov    0x1cb5b2(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80013ef2:	83 e8 01             	sub    $0x1,%eax
ffffffff80013ef5:	89 05 a9 b5 1c 00    	mov    %eax,0x1cb5a9(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80013efb:	e9 c4 f3 ff ff       	jmp    ffffffff800132c4 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x2f4>
        cc = Xhci::ControlTransfer(slotId, REQTYPE_HOST_TO_DEV, REQ_SET_CONFIGURATION,
ffffffff80013f00:	6a 00                	push   $0x0
ffffffff80013f02:	8b bd 58 fd ff ff    	mov    -0x2a8(%rbp),%edi
ffffffff80013f08:	ba 09 00 00 00       	mov    $0x9,%edx
ffffffff80013f0d:	45 31 c9             	xor    %r9d,%r9d
ffffffff80013f10:	6a 00                	push   $0x0
ffffffff80013f12:	45 31 c0             	xor    %r8d,%r8d
ffffffff80013f15:	89 c1                	mov    %eax,%ecx
ffffffff80013f17:	31 f6                	xor    %esi,%esi
ffffffff80013f19:	e8 32 0d 00 00       	call   ffffffff80014c50 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb>
ffffffff80013f1e:	41 89 c6             	mov    %eax,%r14d
        if (cc != Xhci::CC_SUCCESS) {
ffffffff80013f21:	58                   	pop    %rax
ffffffff80013f22:	5a                   	pop    %rdx
ffffffff80013f23:	41 83 fe 01          	cmp    $0x1,%r14d
ffffffff80013f27:	0f 84 12 ff ff ff    	je     ffffffff80013e3f <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xe6f>
ffffffff80013f2d:	0f 1f 00             	nopl   (%rax)
            Print(string);
ffffffff80013f30:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
            g_kernelLogDepth++;
ffffffff80013f37:	83 05 66 b5 1c 00 01 	addl   $0x1,0x1cb566(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80013f3e:	e8 7d f2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013f43:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80013f4a:	e8 71 f2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013f4f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80013f56:	e8 65 f2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013f5b:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80013f62:	e8 59 f2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013f67:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80013f6e:	e8 4d f2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013f73:	48 c7 c7 42 b3 02 80 	mov    $0xffffffff8002b342,%rdi
ffffffff80013f7a:	e9 b0 f4 ff ff       	jmp    ffffffff8001342f <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x45f>
ffffffff80013f7f:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
ffffffff80013f86:	89 85 5c fd ff ff    	mov    %eax,-0x2a4(%rbp)
            g_kernelLogDepth++;
ffffffff80013f8c:	83 05 11 b5 1c 00 01 	addl   $0x1,0x1cb511(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80013f93:	e8 28 f2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013f98:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80013f9f:	e8 1c f2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013fa4:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80013fab:	e8 10 f2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013fb0:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80013fb7:	e8 04 f2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013fbc:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80013fc3:	e8 f8 f1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80013fc8:	48 c7 c7 d8 ca 02 80 	mov    $0xffffffff8002cad8,%rdi
ffffffff80013fcf:	e8 ec f1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            KernelLogStream(ERROR, "USB") << "GET_DESCRIPTOR(Config full) failed, cc=" << (uint64_t)cc;
ffffffff80013fd4:	8b bd 5c fd ff ff    	mov    -0x2a4(%rbp),%edi
ffffffff80013fda:	e9 58 f4 ff ff       	jmp    ffffffff80013437 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x467>
            uint8_t dci = dev->InterruptEpNum * 2 + 1;
ffffffff80013fdf:	44 0f b6 63 0f       	movzbl 0xf(%rbx),%r12d
            auto* inputCtx2 = (Xhci::InputContext*)Memory::g_pfa->AllocateZeroed();
ffffffff80013fe4:	48 8b 3d c5 89 13 00 	mov    0x1389c5(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff80013feb:	e8 20 72 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
            uint8_t dci = dev->InterruptEpNum * 2 + 1;
ffffffff80013ff0:	47 8d 64 24 01       	lea    0x1(%r12,%r12,1),%r12d
            inputCtx2->Slot = dev->OutputContext->Slot;
ffffffff80013ff5:	48 8b 53 48          	mov    0x48(%rbx),%rdx
            auto* intRing = (Xhci::TRB*)Memory::g_pfa->AllocateZeroed();
ffffffff80013ff9:	48 8b 3d b0 89 13 00 	mov    0x1389b0(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
            inputCtx2->ICC.AddFlags = (1 << 0) | (1 << dci);
ffffffff80014000:	44 89 e1             	mov    %r12d,%ecx
            auto* inputCtx2 = (Xhci::InputContext*)Memory::g_pfa->AllocateZeroed();
ffffffff80014003:	49 89 c0             	mov    %rax,%r8
            inputCtx2->ICC.AddFlags = (1 << 0) | (1 << dci);
ffffffff80014006:	45 0f b6 ec          	movzbl %r12b,%r13d
ffffffff8001400a:	41 d3 e6             	shl    %cl,%r14d
            inputCtx2->Slot = dev->OutputContext->Slot;
ffffffff8001400d:	48 8b 4a 08          	mov    0x8(%rdx),%rcx
                                   | (newCtxEntries << 27);
ffffffff80014011:	4c 89 85 38 fd ff ff 	mov    %r8,-0x2c8(%rbp)
            inputCtx2->ICC.AddFlags = (1 << 0) | (1 << dci);
ffffffff80014018:	41 83 ce 01          	or     $0x1,%r14d
ffffffff8001401c:	44 89 70 04          	mov    %r14d,0x4(%rax)
            inputCtx2->Slot = dev->OutputContext->Slot;
ffffffff80014020:	48 8b 02             	mov    (%rdx),%rax
ffffffff80014023:	49 89 48 28          	mov    %rcx,0x28(%r8)
ffffffff80014027:	48 8b 4a 10          	mov    0x10(%rdx),%rcx
ffffffff8001402b:	48 8b 52 18          	mov    0x18(%rdx),%rdx
ffffffff8001402f:	49 89 40 20          	mov    %rax,0x20(%r8)
            inputCtx2->Slot.Field0 = (inputCtx2->Slot.Field0 & ~(0x1Fu << 27))
ffffffff80014033:	25 ff ff ff 07       	and    $0x7ffffff,%eax
            inputCtx2->Slot = dev->OutputContext->Slot;
ffffffff80014038:	49 89 48 30          	mov    %rcx,0x30(%r8)
ffffffff8001403c:	49 89 50 38          	mov    %rdx,0x38(%r8)
                                   | (newCtxEntries << 27);
ffffffff80014040:	44 89 e2             	mov    %r12d,%edx
ffffffff80014043:	c1 e2 1b             	shl    $0x1b,%edx
ffffffff80014046:	09 d0                	or     %edx,%eax
ffffffff80014048:	41 89 40 20          	mov    %eax,0x20(%r8)
            auto* intRing = (Xhci::TRB*)Memory::g_pfa->AllocateZeroed();
ffffffff8001404c:	e8 bf 71 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff80014051:	48 8b 0d 50 89 13 00 	mov    0x138950(%rip),%rcx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            dev->InterruptRingCCS     = true;
ffffffff80014058:	c6 43 2c 01          	movb   $0x1,0x2c(%rbx)
            intLink.Status = 0;
ffffffff8001405c:	48 ba 00 00 00 00 02 	movabs $0x180200000000,%rdx
ffffffff80014063:	18 00 00 
ffffffff80014066:	48 89 c6             	mov    %rax,%rsi
            dev->InterruptRing        = intRing;
ffffffff80014069:	48 89 43 18          	mov    %rax,0x18(%rbx)
            auto& epCtx = inputCtx2->EP[dci - 1];  // EP array is 0-indexed, DCI 1 = EP[0]
ffffffff8001406d:	45 8d 4d ff          	lea    -0x1(%r13),%r9d
        if (bInterval == 0) return 0;
ffffffff80014071:	4c 8b 85 38 fd ff ff 	mov    -0x2c8(%rbp),%r8
ffffffff80014078:	48 29 ce             	sub    %rcx,%rsi
            dev->InterruptRingEnqueue = 0;
ffffffff8001407b:	c7 43 28 00 00 00 00 	movl   $0x0,0x28(%rbx)
            dev->InterruptRingPhys    = Memory::SubHHDM(intRing);
ffffffff80014082:	48 89 73 20          	mov    %rsi,0x20(%rbx)
            intLink.Parameter0 = (uint32_t)(dev->InterruptRingPhys & 0xFFFFFFFF);
ffffffff80014086:	48 89 b0 f0 01 00 00 	mov    %rsi,0x1f0(%rax)
            intLink.Status = 0;
ffffffff8001408d:	48 89 90 f8 01 00 00 	mov    %rdx,0x1f8(%rax)
            uint32_t xhciInterval = ConvertInterval(speed, dev->InterruptInterval);
ffffffff80014094:	0f b6 53 12          	movzbl 0x12(%rbx),%edx
        if (bInterval == 0) return 0;
ffffffff80014098:	31 c0                	xor    %eax,%eax
ffffffff8001409a:	84 d2                	test   %dl,%dl
ffffffff8001409c:	74 1d                	je     ffffffff800140bb <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x10eb>
        if (speed == Xhci::SPEED_HIGH || speed == Xhci::SPEED_SUPER) {
ffffffff8001409e:	41 8d 47 fd          	lea    -0x3(%r15),%eax
ffffffff800140a2:	83 f8 01             	cmp    $0x1,%eax
ffffffff800140a5:	0f 86 65 03 00 00    	jbe    ffffffff80014410 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x1440>
        uint32_t microframes = (uint32_t)bInterval * 8;
ffffffff800140ab:	8d 04 d5 00 00 00 00 	lea    0x0(,%rdx,8),%eax
            epCtx.Field0 = (xhciInterval << 16);
ffffffff800140b2:	0f bd c0             	bsr    %eax,%eax
ffffffff800140b5:	83 c0 01             	add    $0x1,%eax
ffffffff800140b8:	c1 e0 10             	shl    $0x10,%eax
ffffffff800140bb:	45 0f b6 e4          	movzbl %r12b,%r12d
            epCtx.TRDequeuePtr = dev->InterruptRingPhys | 1;
ffffffff800140bf:	48 83 ce 01          	or     $0x1,%rsi
            cc = Xhci::SendCommand(cfgTrb);
ffffffff800140c3:	4c 8d ad d0 fe ff ff 	lea    -0x130(%rbp),%r13
ffffffff800140ca:	4c 89 e2             	mov    %r12,%rdx
ffffffff800140cd:	48 c1 e2 05          	shl    $0x5,%rdx
ffffffff800140d1:	4c 01 c2             	add    %r8,%rdx
            epCtx.Field0 = (xhciInterval << 16);
ffffffff800140d4:	89 42 20             	mov    %eax,0x20(%rdx)
                         | ((uint32_t)dev->InterruptMaxPacket << 16);
ffffffff800140d7:	0f b7 43 10          	movzwl 0x10(%rbx),%eax
            epCtx.TRDequeuePtr = dev->InterruptRingPhys | 1;
ffffffff800140db:	48 89 72 28          	mov    %rsi,0x28(%rdx)
                         | ((uint32_t)dev->InterruptMaxPacket << 16);
ffffffff800140df:	89 c7                	mov    %eax,%edi
ffffffff800140e1:	c1 e7 10             	shl    $0x10,%edi
ffffffff800140e4:	83 cf 3e             	or     $0x3e,%edi
ffffffff800140e7:	89 7a 24             	mov    %edi,0x24(%rdx)
            epCtx.Field2 = dev->InterruptMaxPacket;
ffffffff800140ea:	49 63 d1             	movslq %r9d,%rdx
            cc = Xhci::SendCommand(cfgTrb);
ffffffff800140ed:	4c 89 ef             	mov    %r13,%rdi
            epCtx.Field2 = dev->InterruptMaxPacket;
ffffffff800140f0:	48 c1 e2 05          	shl    $0x5,%rdx
ffffffff800140f4:	41 89 44 10 50       	mov    %eax,0x50(%r8,%rdx,1)
ffffffff800140f9:	4c 89 c0             	mov    %r8,%rax
            Xhci::TRB cfgTrb = {};
ffffffff800140fc:	c7 85 d8 fe ff ff 00 	movl   $0x0,-0x128(%rbp)
ffffffff80014103:	00 00 00 
ffffffff80014106:	48 29 c8             	sub    %rcx,%rax
ffffffff80014109:	48 89 85 d0 fe ff ff 	mov    %rax,-0x130(%rbp)
                              | ((uint32_t)slotId << 24);
ffffffff80014110:	8b 85 4c fd ff ff    	mov    -0x2b4(%rbp),%eax
ffffffff80014116:	80 cc 30             	or     $0x30,%ah
ffffffff80014119:	89 85 dc fe ff ff    	mov    %eax,-0x124(%rbp)
            cc = Xhci::SendCommand(cfgTrb);
ffffffff8001411f:	e8 8c 09 00 00       	call   ffffffff80014ab0 <_ZN7Drivers3USB4Xhci11SendCommandERKNS1_3TRBE>
ffffffff80014124:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
ffffffff8001412b:	41 89 c6             	mov    %eax,%r14d
            g_kernelLogDepth++;
ffffffff8001412e:	8b 05 70 b3 1c 00    	mov    0x1cb370(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80014134:	83 c0 01             	add    $0x1,%eax
ffffffff80014137:	89 05 67 b3 1c 00    	mov    %eax,0x1cb367(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            if (cc != Xhci::CC_SUCCESS) {
ffffffff8001413d:	41 83 fe 01          	cmp    $0x1,%r14d
ffffffff80014141:	0f 84 c0 00 00 00    	je     ffffffff80014207 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x1237>
            Print(string);
ffffffff80014147:	e8 74 f0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001414c:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80014153:	e8 68 f0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014158:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001415f:	e8 5c f0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014164:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff8001416b:	e8 50 f0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014170:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80014177:	e8 44 f0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001417c:	48 c7 c7 00 cb 02 80 	mov    $0xffffffff8002cb00,%rdi
ffffffff80014183:	e9 82 f2 ff ff       	jmp    ffffffff8001340a <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x43a>
            HidKeyboard::RegisterDevice(slotId);
ffffffff80014188:	8b bd 58 fd ff ff    	mov    -0x2a8(%rbp),%edi
ffffffff8001418e:	e8 cd df ff ff       	call   ffffffff80012160 <_ZN7Drivers3USB11HidKeyboard14RegisterDeviceEh>
ffffffff80014193:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
            g_kernelLogDepth++;
ffffffff8001419a:	83 05 03 b3 1c 00 01 	addl   $0x1,0x1cb303(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800141a1:	e8 1a f0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800141a6:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800141ad:	e8 0e f0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800141b2:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800141b9:	e8 02 f0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800141be:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff800141c5:	e8 f6 ef 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800141ca:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800141d1:	e8 ea ef 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800141d6:	48 c7 c7 c2 b2 02 80 	mov    $0xffffffff8002b2c2,%rdi
ffffffff800141dd:	e8 de ef 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800141e2:	48 8b bd 50 fd ff ff 	mov    -0x2b0(%rbp),%rdi
ffffffff800141e9:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800141ee:	e8 9d 62 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800141f3:	48 89 c7             	mov    %rax,%rdi
ffffffff800141f6:	e8 c5 ef 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800141fb:	48 c7 c7 9a b3 02 80 	mov    $0xffffffff8002b39a,%rdi
ffffffff80014202:	e9 d4 fc ff ff       	jmp    ffffffff80013edb <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xf0b>
ffffffff80014207:	e8 b4 ef 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001420c:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80014213:	e8 a8 ef 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014218:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001421f:	e8 9c ef 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014224:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8001422b:	e8 90 ef 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014230:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80014237:	e8 84 ef 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001423c:	48 c7 c7 c2 b2 02 80 	mov    $0xffffffff8002b2c2,%rdi
ffffffff80014243:	e8 78 ef 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80014248:	48 8b bd 50 fd ff ff 	mov    -0x2b0(%rbp),%rdi
ffffffff8001424f:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80014254:	e8 37 62 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80014259:	48 89 c7             	mov    %rax,%rdi
ffffffff8001425c:	e8 5f ef 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80014261:	48 c7 c7 60 b3 02 80 	mov    $0xffffffff8002b360,%rdi
ffffffff80014268:	e8 53 ef 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << ": Interrupt EP " << (uint64_t)dev->InterruptEpNum
ffffffff8001426d:	0f b6 7b 0f          	movzbl 0xf(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80014271:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80014276:	e8 15 62 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001427b:	48 89 c7             	mov    %rax,%rdi
ffffffff8001427e:	e8 3d ef 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80014283:	48 c7 c7 70 b3 02 80 	mov    $0xffffffff8002b370,%rdi
ffffffff8001428a:	e8 31 ef 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001428f:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80014294:	4c 89 e7             	mov    %r12,%rdi
ffffffff80014297:	e8 f4 61 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001429c:	48 89 c7             	mov    %rax,%rdi
ffffffff8001429f:	e8 1c ef 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800142a4:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff800142ab:	e8 10 ef 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800142b0:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800142b7:	e8 04 ef 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        if (foundEp && dev->InterfaceProtocol == PROTOCOL_KEYBOARD) {
ffffffff800142bc:	0f b6 43 0e          	movzbl 0xe(%rbx),%eax
            g_kernelLogDepth--;
ffffffff800142c0:	83 2d dd b1 1c 00 01 	subl   $0x1,0x1cb1dd(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        if (foundEp && dev->InterfaceProtocol == PROTOCOL_MOUSE && hidReportDescLen > 0) {
ffffffff800142c7:	66 83 bd 40 fd ff ff 	cmpw   $0x0,-0x2c0(%rbp)
ffffffff800142ce:	00 
ffffffff800142cf:	41 0f 95 c4          	setne  %r12b
        if (foundEp && dev->InterfaceProtocol == PROTOCOL_KEYBOARD) {
ffffffff800142d3:	3c 01                	cmp    $0x1,%al
ffffffff800142d5:	0f 84 3f 01 00 00    	je     ffffffff8001441a <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x144a>
        if (foundEp && dev->InterfaceProtocol == PROTOCOL_MOUSE && hidReportDescLen > 0) {
ffffffff800142db:	3c 02                	cmp    $0x2,%al
ffffffff800142dd:	75 09                	jne    ffffffff800142e8 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x1318>
ffffffff800142df:	45 84 e4             	test   %r12b,%r12b
ffffffff800142e2:	0f 85 bd 01 00 00    	jne    ffffffff800144a5 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x14d5>
            Xhci::QueueInterruptTransfer(slotId);
ffffffff800142e8:	8b bd 58 fd ff ff    	mov    -0x2a8(%rbp),%edi
ffffffff800142ee:	e8 0d 03 00 00       	call   ffffffff80014600 <_ZN7Drivers3USB4Xhci22QueueInterruptTransferEh>
        if (dev->InterfaceProtocol == PROTOCOL_KEYBOARD) {
ffffffff800142f3:	0f b6 43 0e          	movzbl 0xe(%rbx),%eax
ffffffff800142f7:	3c 01                	cmp    $0x1,%al
ffffffff800142f9:	0f 84 89 fe ff ff    	je     ffffffff80014188 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x11b8>
        } else if (dev->InterfaceProtocol == PROTOCOL_MOUSE) {
ffffffff800142ff:	3c 02                	cmp    $0x2,%al
ffffffff80014301:	0f 84 8a 00 00 00    	je     ffffffff80014391 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x13c1>
            Print(string);
ffffffff80014307:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
            g_kernelLogDepth++;
ffffffff8001430e:	83 05 8f b1 1c 00 01 	addl   $0x1,0x1cb18f(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80014315:	e8 a6 ee 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001431a:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80014321:	e8 9a ee 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014326:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001432d:	e8 8e ee 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014332:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff80014339:	e8 82 ee 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001433e:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80014345:	e8 76 ee 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001434a:	48 c7 c7 c2 b2 02 80 	mov    $0xffffffff8002b2c2,%rdi
ffffffff80014351:	e8 6a ee 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80014356:	48 8b bd 50 fd ff ff 	mov    -0x2b0(%rbp),%rdi
ffffffff8001435d:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80014362:	e8 29 61 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80014367:	48 89 c7             	mov    %rax,%rdi
ffffffff8001436a:	e8 51 ee 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001436f:	48 c7 c7 bf b3 02 80 	mov    $0xffffffff8002b3bf,%rdi
ffffffff80014376:	e8 45 ee 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << ": HID device, protocol=" << (uint64_t)dev->InterfaceProtocol;
ffffffff8001437b:	0f b6 7b 0e          	movzbl 0xe(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001437f:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80014384:	e8 07 61 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80014389:	48 89 c7             	mov    %rax,%rdi
ffffffff8001438c:	e9 4a fb ff ff       	jmp    ffffffff80013edb <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xf0b>
            HidMouse::RegisterDevice(slotId);
ffffffff80014391:	8b bd 58 fd ff ff    	mov    -0x2a8(%rbp),%edi
ffffffff80014397:	e8 94 e9 ff ff       	call   ffffffff80012d30 <_ZN7Drivers3USB8HidMouse14RegisterDeviceEh>
            Print(string);
ffffffff8001439c:	48 c7 c7 78 b2 02 80 	mov    $0xffffffff8002b278,%rdi
            g_kernelLogDepth++;
ffffffff800143a3:	83 05 fa b0 1c 00 01 	addl   $0x1,0x1cb0fa(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800143aa:	e8 11 ee 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800143af:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800143b6:	e8 05 ee 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800143bb:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800143c2:	e8 f9 ed 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800143c7:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff800143ce:	e8 ed ed 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800143d3:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800143da:	e8 e1 ed 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800143df:	48 c7 c7 c2 b2 02 80 	mov    $0xffffffff8002b2c2,%rdi
ffffffff800143e6:	e8 d5 ed 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800143eb:	48 8b bd 50 fd ff ff 	mov    -0x2b0(%rbp),%rdi
ffffffff800143f2:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800143f7:	e8 94 60 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800143fc:	48 89 c7             	mov    %rax,%rdi
ffffffff800143ff:	e8 bc ed 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80014404:	48 c7 c7 ae b3 02 80 	mov    $0xffffffff8002b3ae,%rdi
ffffffff8001440b:	e9 cb fa ff ff       	jmp    ffffffff80013edb <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0xf0b>
            epCtx.Field0 = (xhciInterval << 16);
ffffffff80014410:	89 d0                	mov    %edx,%eax
ffffffff80014412:	c1 e0 10             	shl    $0x10,%eax
            return bInterval;
ffffffff80014415:	e9 a1 fc ff ff       	jmp    ffffffff800140bb <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x10eb>
            cc = Xhci::ControlTransfer(slotId, REQTYPE_CLASS_IFACE, REQ_SET_PROTOCOL,
ffffffff8001441a:	6a 00                	push   $0x0
ffffffff8001441c:	8b bd 58 fd ff ff    	mov    -0x2a8(%rbp),%edi
ffffffff80014422:	45 31 c9             	xor    %r9d,%r9d
ffffffff80014425:	45 31 c0             	xor    %r8d,%r8d
ffffffff80014428:	6a 00                	push   $0x0
ffffffff8001442a:	31 c9                	xor    %ecx,%ecx
ffffffff8001442c:	ba 0b 00 00 00       	mov    $0xb,%edx
ffffffff80014431:	be 21 00 00 00       	mov    $0x21,%esi
ffffffff80014436:	e8 15 08 00 00       	call   ffffffff80014c50 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb>
            if (cc != Xhci::CC_SUCCESS) {
ffffffff8001443b:	41 59                	pop    %r9
ffffffff8001443d:	41 5a                	pop    %r10
            cc = Xhci::ControlTransfer(slotId, REQTYPE_CLASS_IFACE, REQ_SET_PROTOCOL,
ffffffff8001443f:	41 89 c6             	mov    %eax,%r14d
            if (cc != Xhci::CC_SUCCESS) {
ffffffff80014442:	83 f8 01             	cmp    $0x1,%eax
ffffffff80014445:	74 49                	je     ffffffff80014490 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x14c0>
                KernelLogStream(WARNING, "USB") << "SET_PROTOCOL(Boot) failed, cc=" << (uint64_t)cc;
ffffffff80014447:	48 c7 c2 78 b2 02 80 	mov    $0xffffffff8002b278,%rdx
ffffffff8001444e:	be 01 00 00 00       	mov    $0x1,%esi
ffffffff80014453:	4c 89 ef             	mov    %r13,%rdi
ffffffff80014456:	e8 05 eb ff ff       	call   ffffffff80012f60 <_ZN2Kt15KernelLogStreamC1ENS_14KernelLogLevelEPKc>
ffffffff8001445b:	48 c7 c7 28 cb 02 80 	mov    $0xffffffff8002cb28,%rdi
ffffffff80014462:	e8 59 ed 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80014467:	8b b5 d0 fe ff ff    	mov    -0x130(%rbp),%esi
ffffffff8001446d:	44 89 f7             	mov    %r14d,%edi
ffffffff80014470:	e8 1b 60 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80014475:	48 89 c7             	mov    %rax,%rdi
ffffffff80014478:	e8 43 ed 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001447d:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80014484:	e8 37 ed 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80014489:	83 2d 14 b0 1c 00 01 	subl   $0x1,0x1cb014(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        if (foundEp && dev->InterfaceProtocol == PROTOCOL_MOUSE && hidReportDescLen > 0) {
ffffffff80014490:	0f b6 43 0e          	movzbl 0xe(%rbx),%eax
ffffffff80014494:	3c 02                	cmp    $0x2,%al
ffffffff80014496:	0f 85 c0 00 00 00    	jne    ffffffff8001455c <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x158c>
ffffffff8001449c:	45 84 e4             	test   %r12b,%r12b
ffffffff8001449f:	0f 84 b7 00 00 00    	je     ffffffff8001455c <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x158c>
            uint8_t rdBuf[256] = {};
ffffffff800144a5:	31 c0                	xor    %eax,%eax
ffffffff800144a7:	4c 89 ef             	mov    %r13,%rdi
ffffffff800144aa:	b9 20 00 00 00       	mov    $0x20,%ecx
            cc = Xhci::ControlTransfer(slotId, REQTYPE_STD_IFACE_IN, REQ_GET_DESCRIPTOR,
ffffffff800144af:	ba 06 00 00 00       	mov    $0x6,%edx
            uint8_t rdBuf[256] = {};
ffffffff800144b4:	f3 48 ab             	rep stos %rax,(%rdi)
            if (rdLen > 256) rdLen = 256;
ffffffff800144b7:	0f b7 8d 40 fd ff ff 	movzwl -0x2c0(%rbp),%ecx
ffffffff800144be:	b8 00 01 00 00       	mov    $0x100,%eax
            cc = Xhci::ControlTransfer(slotId, REQTYPE_STD_IFACE_IN, REQ_GET_DESCRIPTOR,
ffffffff800144c3:	6a 01                	push   $0x1
ffffffff800144c5:	4c 8d ad d0 fe ff ff 	lea    -0x130(%rbp),%r13
ffffffff800144cc:	8b bd 58 fd ff ff    	mov    -0x2a8(%rbp),%edi
ffffffff800144d2:	be 81 00 00 00       	mov    $0x81,%esi
            if (rdLen > 256) rdLen = 256;
ffffffff800144d7:	66 39 c1             	cmp    %ax,%cx
            cc = Xhci::ControlTransfer(slotId, REQTYPE_STD_IFACE_IN, REQ_GET_DESCRIPTOR,
ffffffff800144da:	41 55                	push   %r13
            if (rdLen > 256) rdLen = 256;
ffffffff800144dc:	0f 46 c1             	cmovbe %ecx,%eax
            cc = Xhci::ControlTransfer(slotId, REQTYPE_STD_IFACE_IN, REQ_GET_DESCRIPTOR,
ffffffff800144df:	45 31 c0             	xor    %r8d,%r8d
ffffffff800144e2:	b9 00 22 00 00       	mov    $0x2200,%ecx
ffffffff800144e7:	44 0f b7 f0          	movzwl %ax,%r14d
ffffffff800144eb:	45 89 f1             	mov    %r14d,%r9d
ffffffff800144ee:	e8 5d 07 00 00       	call   ffffffff80014c50 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb>
            if (cc == Xhci::CC_SUCCESS || cc == Xhci::CC_SHORT_PACKET) {
ffffffff800144f3:	5f                   	pop    %rdi
ffffffff800144f4:	41 58                	pop    %r8
            cc = Xhci::ControlTransfer(slotId, REQTYPE_STD_IFACE_IN, REQ_GET_DESCRIPTOR,
ffffffff800144f6:	41 89 c4             	mov    %eax,%r12d
            if (cc == Xhci::CC_SUCCESS || cc == Xhci::CC_SHORT_PACKET) {
ffffffff800144f9:	83 f8 01             	cmp    $0x1,%eax
ffffffff800144fc:	0f 84 e2 00 00 00    	je     ffffffff800145e4 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x1614>
ffffffff80014502:	83 f8 0d             	cmp    $0xd,%eax
ffffffff80014505:	0f 84 d9 00 00 00    	je     ffffffff800145e4 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x1614>
                KernelLogStream(WARNING, "USB") << "GET_DESCRIPTOR(HID Report) failed, cc=" << (uint64_t)cc;
ffffffff8001450b:	48 c7 c2 78 b2 02 80 	mov    $0xffffffff8002b278,%rdx
ffffffff80014512:	be 01 00 00 00       	mov    $0x1,%esi
ffffffff80014517:	48 8d bd 98 fd ff ff 	lea    -0x268(%rbp),%rdi
ffffffff8001451e:	e8 3d ea ff ff       	call   ffffffff80012f60 <_ZN2Kt15KernelLogStreamC1ENS_14KernelLogLevelEPKc>
            Print(string);
ffffffff80014523:	48 c7 c7 48 cb 02 80 	mov    $0xffffffff8002cb48,%rdi
ffffffff8001452a:	e8 91 ec 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001452f:	8b b5 98 fd ff ff    	mov    -0x268(%rbp),%esi
ffffffff80014535:	44 89 e7             	mov    %r12d,%edi
ffffffff80014538:	e8 53 5f 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001453d:	48 89 c7             	mov    %rax,%rdi
ffffffff80014540:	e8 7b ec 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80014545:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001454c:	e8 6f ec 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80014551:	83 2d 4c af 1c 00 01 	subl   $0x1,0x1caf4c(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        if (foundEp && dev->InterfaceProtocol == PROTOCOL_KEYBOARD) {
ffffffff80014558:	0f b6 43 0e          	movzbl 0xe(%rbx),%eax
ffffffff8001455c:	3c 01                	cmp    $0x1,%al
ffffffff8001455e:	0f 85 84 fd ff ff    	jne    ffffffff800142e8 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x1318>
            cc = Xhci::ControlTransfer(slotId, REQTYPE_CLASS_IFACE, REQ_SET_IDLE,
ffffffff80014564:	6a 00                	push   $0x0
ffffffff80014566:	8b bd 58 fd ff ff    	mov    -0x2a8(%rbp),%edi
ffffffff8001456c:	b9 00 04 00 00       	mov    $0x400,%ecx
ffffffff80014571:	45 31 c9             	xor    %r9d,%r9d
ffffffff80014574:	6a 00                	push   $0x0
ffffffff80014576:	be 21 00 00 00       	mov    $0x21,%esi
ffffffff8001457b:	45 31 c0             	xor    %r8d,%r8d
ffffffff8001457e:	ba 0a 00 00 00       	mov    $0xa,%edx
ffffffff80014583:	e8 c8 06 00 00       	call   ffffffff80014c50 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb>
            if (cc != Xhci::CC_SUCCESS) {
ffffffff80014588:	59                   	pop    %rcx
ffffffff80014589:	5e                   	pop    %rsi
            cc = Xhci::ControlTransfer(slotId, REQTYPE_CLASS_IFACE, REQ_SET_IDLE,
ffffffff8001458a:	41 89 c4             	mov    %eax,%r12d
            if (cc != Xhci::CC_SUCCESS) {
ffffffff8001458d:	83 f8 01             	cmp    $0x1,%eax
ffffffff80014590:	0f 84 52 fd ff ff    	je     ffffffff800142e8 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x1318>
                KernelLogStream(WARNING, "USB") << "SET_IDLE(4) failed, cc=" << (uint64_t)cc;
ffffffff80014596:	48 c7 c2 78 b2 02 80 	mov    $0xffffffff8002b278,%rdx
ffffffff8001459d:	be 01 00 00 00       	mov    $0x1,%esi
ffffffff800145a2:	4c 89 ef             	mov    %r13,%rdi
ffffffff800145a5:	e8 b6 e9 ff ff       	call   ffffffff80012f60 <_ZN2Kt15KernelLogStreamC1ENS_14KernelLogLevelEPKc>
            Print(string);
ffffffff800145aa:	48 c7 c7 82 b3 02 80 	mov    $0xffffffff8002b382,%rdi
ffffffff800145b1:	e8 0a ec 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800145b6:	8b b5 d0 fe ff ff    	mov    -0x130(%rbp),%esi
ffffffff800145bc:	44 89 e7             	mov    %r12d,%edi
ffffffff800145bf:	e8 cc 5e 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800145c4:	48 89 c7             	mov    %rax,%rdi
ffffffff800145c7:	e8 f4 eb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800145cc:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800145d3:	e8 e8 eb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff800145d8:	83 2d c5 ae 1c 00 01 	subl   $0x1,0x1caec5(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800145df:	e9 04 fd ff ff       	jmp    ffffffff800142e8 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x1318>
                HidMouse::ParseReportDescriptor(rdBuf, rdLen);
ffffffff800145e4:	44 89 f6             	mov    %r14d,%esi
ffffffff800145e7:	4c 89 ef             	mov    %r13,%rdi
ffffffff800145ea:	e8 71 e1 ff ff       	call   ffffffff80012760 <_ZN7Drivers3USB8HidMouse21ParseReportDescriptorEPKht>
ffffffff800145ef:	e9 64 ff ff ff       	jmp    ffffffff80014558 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj+0x1588>
ffffffff800145f4:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800145fb:	00 00 00 
ffffffff800145fe:	66 90                	xchg   %ax,%ax

ffffffff80014600 <_ZN7Drivers3USB4Xhci22QueueInterruptTransferEh>:
    // -------------------------------------------------------------------------
    // QueueInterruptTransfer
    // -------------------------------------------------------------------------

    void QueueInterruptTransfer(uint8_t slotId) {
        if (slotId == 0 || slotId > MAX_SLOTS || !g_devices[slotId].Active) {
ffffffff80014600:	8d 47 ff             	lea    -0x1(%rdi),%eax
ffffffff80014603:	3c 0f                	cmp    $0xf,%al
ffffffff80014605:	0f 87 05 01 00 00    	ja     ffffffff80014710 <_ZN7Drivers3USB4Xhci22QueueInterruptTransferEh+0x110>
    void QueueInterruptTransfer(uint8_t slotId) {
ffffffff8001460b:	55                   	push   %rbp
ffffffff8001460c:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001460f:	41 54                	push   %r12
        if (slotId == 0 || slotId > MAX_SLOTS || !g_devices[slotId].Active) {
ffffffff80014611:	44 0f b6 e7          	movzbl %dil,%r12d
    void QueueInterruptTransfer(uint8_t slotId) {
ffffffff80014615:	53                   	push   %rbx
        if (slotId == 0 || slotId > MAX_SLOTS || !g_devices[slotId].Active) {
ffffffff80014616:	40 0f b6 df          	movzbl %dil,%ebx
ffffffff8001461a:	48 8d 04 9b          	lea    (%rbx,%rbx,4),%rax
ffffffff8001461e:	48 8d 04 43          	lea    (%rbx,%rax,2),%rax
ffffffff80014622:	80 3c c5 00 74 14 80 	cmpb   $0x0,-0x7feb8c00(,%rax,8)
ffffffff80014629:	00 
ffffffff8001462a:	0f 84 d2 00 00 00    	je     ffffffff80014702 <_ZN7Drivers3USB4Xhci22QueueInterruptTransferEh+0x102>
        }

        UsbDeviceInfo& dev = g_devices[slotId];

        // Allocate interrupt data buffer if not yet allocated
        if (g_interruptDataBuf[slotId] == nullptr) {
ffffffff80014630:	48 83 3c dd 60 73 14 	cmpq   $0x0,-0x7feb8ca0(,%rbx,8)
ffffffff80014637:	80 00 
ffffffff80014639:	0f 84 d9 00 00 00    	je     ffffffff80014718 <_ZN7Drivers3USB4Xhci22QueueInterruptTransferEh+0x118>
            g_interruptDataBuf[slotId] = AllocateDmaBuffer(g_interruptDataBufPhys[slotId]);
        }

        // Build a Normal TRB on the interrupt ring
        TRB& trb = dev.InterruptRing[dev.InterruptRingEnqueue];
        trb.Parameter0 = (uint32_t)(g_interruptDataBufPhys[slotId] & 0xFFFFFFFF);
ffffffff8001463f:	48 8b 34 dd c0 72 14 	mov    -0x7feb8d40(,%rbx,8),%rsi
ffffffff80014646:	80 
        TRB& trb = dev.InterruptRing[dev.InterruptRingEnqueue];
ffffffff80014647:	48 8d 04 9b          	lea    (%rbx,%rbx,4),%rax
ffffffff8001464b:	48 8d 04 43          	lea    (%rbx,%rax,2),%rax
ffffffff8001464f:	48 8d 14 c5 00 74 14 	lea    -0x7feb8c00(,%rax,8),%rdx
ffffffff80014656:	80 
ffffffff80014657:	8b 42 28             	mov    0x28(%rdx),%eax
ffffffff8001465a:	48 8b 7a 18          	mov    0x18(%rdx),%rdi
ffffffff8001465e:	48 89 c1             	mov    %rax,%rcx
ffffffff80014661:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff80014665:	48 01 f8             	add    %rdi,%rax
        dev.InterruptRingEnqueue++;
ffffffff80014668:	83 c1 01             	add    $0x1,%ecx
        trb.Parameter0 = (uint32_t)(g_interruptDataBufPhys[slotId] & 0xFFFFFFFF);
ffffffff8001466b:	48 89 30             	mov    %rsi,(%rax)
        trb.Parameter1 = (uint32_t)(g_interruptDataBufPhys[slotId] >> 32);
        trb.Status = dev.InterruptMaxPacket;
ffffffff8001466e:	0f b7 72 10          	movzwl 0x10(%rdx),%esi
ffffffff80014672:	89 70 08             	mov    %esi,0x8(%rax)

        uint32_t control = (TRB_NORMAL << TRB_TYPE_SHIFT) | TRB_IOC | TRB_ISP;
        if (dev.InterruptRingCCS) {
ffffffff80014675:	0f b6 72 2c          	movzbl 0x2c(%rdx),%esi
ffffffff80014679:	40 84 f6             	test   %sil,%sil
ffffffff8001467c:	75 22                	jne    ffffffff800146a0 <_ZN7Drivers3USB4Xhci22QueueInterruptTransferEh+0xa0>
            control |= TRB_CYCLE_BIT;
        }
        trb.Control = control;
ffffffff8001467e:	c7 40 0c 24 04 00 00 	movl   $0x424,0xc(%rax)
        dev.InterruptRingEnqueue++;
ffffffff80014685:	89 4a 28             	mov    %ecx,0x28(%rdx)
        if (dev.InterruptRingEnqueue >= XFER_RING_SIZE - 1) {
ffffffff80014688:	83 f9 1e             	cmp    $0x1e,%ecx
ffffffff8001468b:	76 4f                	jbe    ffffffff800146dc <_ZN7Drivers3USB4Xhci22QueueInterruptTransferEh+0xdc>
                link.Control &= ~TRB_CYCLE_BIT;
ffffffff8001468d:	8b 87 fc 01 00 00    	mov    0x1fc(%rdi),%eax
ffffffff80014693:	83 e0 fe             	and    $0xfffffffe,%eax
ffffffff80014696:	eb 20                	jmp    ffffffff800146b8 <_ZN7Drivers3USB4Xhci22QueueInterruptTransferEh+0xb8>
ffffffff80014698:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001469f:	00 
        trb.Control = control;
ffffffff800146a0:	c7 40 0c 25 04 00 00 	movl   $0x425,0xc(%rax)
        dev.InterruptRingEnqueue++;
ffffffff800146a7:	89 4a 28             	mov    %ecx,0x28(%rdx)
        if (dev.InterruptRingEnqueue >= XFER_RING_SIZE - 1) {
ffffffff800146aa:	83 f9 1e             	cmp    $0x1e,%ecx
ffffffff800146ad:	76 2d                	jbe    ffffffff800146dc <_ZN7Drivers3USB4Xhci22QueueInterruptTransferEh+0xdc>
                link.Control |= TRB_CYCLE_BIT;
ffffffff800146af:	8b 87 fc 01 00 00    	mov    0x1fc(%rdi),%eax
ffffffff800146b5:	83 c8 01             	or     $0x1,%eax
ffffffff800146b8:	89 87 fc 01 00 00    	mov    %eax,0x1fc(%rdi)
            dev.InterruptRingCCS = !dev.InterruptRingCCS;
ffffffff800146be:	48 8d 04 9b          	lea    (%rbx,%rbx,4),%rax
ffffffff800146c2:	83 f6 01             	xor    $0x1,%esi
ffffffff800146c5:	48 8d 04 43          	lea    (%rbx,%rax,2),%rax
ffffffff800146c9:	48 8d 04 c5 00 74 14 	lea    -0x7feb8c00(,%rax,8),%rax
ffffffff800146d0:	80 
ffffffff800146d1:	40 88 70 2c          	mov    %sil,0x2c(%rax)
            dev.InterruptRingEnqueue = 0;
ffffffff800146d5:	c7 40 28 00 00 00 00 	movl   $0x0,0x28(%rax)

        // Advance enqueue (handles Link TRB wrap)
        AdvanceInterruptRing(dev);

        // Ring doorbell: target = (InterruptEpNum * 2 + 1) for IN endpoint DCI
        uint8_t target = dev.InterruptEpNum * 2 + 1;
ffffffff800146dc:	48 8d 04 9b          	lea    (%rbx,%rbx,4),%rax
        *(volatile uint32_t*)(g_dbBase + index * 4) = value;
ffffffff800146e0:	41 c1 e4 02          	shl    $0x2,%r12d
ffffffff800146e4:	4c 03 25 55 33 13 00 	add    0x133355(%rip),%r12        # ffffffff80147a40 <_ZN7Drivers3USB4XhciL8g_dbBaseE>
        uint8_t target = dev.InterruptEpNum * 2 + 1;
ffffffff800146eb:	48 8d 04 43          	lea    (%rbx,%rax,2),%rax
ffffffff800146ef:	0f b6 04 c5 0f 74 14 	movzbl -0x7feb8bf1(,%rax,8),%eax
ffffffff800146f6:	80 
ffffffff800146f7:	8d 44 00 01          	lea    0x1(%rax,%rax,1),%eax
        WriteDoorbell(slotId, target);
ffffffff800146fb:	0f b6 c0             	movzbl %al,%eax
        *(volatile uint32_t*)(g_dbBase + index * 4) = value;
ffffffff800146fe:	41 89 04 24          	mov    %eax,(%r12)
    }
ffffffff80014702:	5b                   	pop    %rbx
ffffffff80014703:	41 5c                	pop    %r12
ffffffff80014705:	5d                   	pop    %rbp
ffffffff80014706:	c3                   	ret
ffffffff80014707:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001470e:	00 00 
ffffffff80014710:	c3                   	ret
ffffffff80014711:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff80014718:	48 8b 3d 91 82 13 00 	mov    0x138291(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff8001471f:	e8 ec 6a 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff80014724:	48 89 c6             	mov    %rax,%rsi
ffffffff80014727:	48 2b 35 7a 82 13 00 	sub    0x13827a(%rip),%rsi        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            g_interruptDataBuf[slotId] = AllocateDmaBuffer(g_interruptDataBufPhys[slotId]);
ffffffff8001472e:	48 89 04 dd 60 73 14 	mov    %rax,-0x7feb8ca0(,%rbx,8)
ffffffff80014735:	80 
        outPhysAddr = Memory::SubHHDM(virt);
ffffffff80014736:	48 89 34 dd c0 72 14 	mov    %rsi,-0x7feb8d40(,%rbx,8)
ffffffff8001473d:	80 
        return (uint8_t*)virt;
ffffffff8001473e:	e9 04 ff ff ff       	jmp    ffffffff80014647 <_ZN7Drivers3USB4Xhci22QueueInterruptTransferEh+0x47>
ffffffff80014743:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001474a:	00 00 00 
ffffffff8001474d:	0f 1f 00             	nopl   (%rax)

ffffffff80014750 <_ZN7Drivers3USB4Xhci10PollEventsEv>:
    void PollEvents() {
ffffffff80014750:	55                   	push   %rbp
ffffffff80014751:	48 89 e5             	mov    %rsp,%rbp
ffffffff80014754:	41 55                	push   %r13
ffffffff80014756:	41 54                	push   %r12
ffffffff80014758:	53                   	push   %rbx
ffffffff80014759:	48 83 ec 18          	sub    $0x18,%rsp
            TRB& evt = g_evtRing[g_evtRingDequeue];
ffffffff8001475d:	8b 15 95 32 13 00    	mov    0x133295(%rip),%edx        # ffffffff801479f8 <_ZN7Drivers3USB4XhciL16g_evtRingDequeueE>
            if (evtCycle != g_evtRingCCS) {
ffffffff80014763:	0f b6 3d a6 98 01 00 	movzbl 0x198a6(%rip),%edi        # ffffffff8002e010 <_ZN7Drivers3USB4XhciL12g_evtRingCCSE>
            TRB& evt = g_evtRing[g_evtRingDequeue];
ffffffff8001476a:	4c 8b 05 97 32 13 00 	mov    0x133297(%rip),%r8        # ffffffff80147a08 <_ZN7Drivers3USB4XhciL9g_evtRingE>
ffffffff80014771:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80014778:	00 00 00 00 
ffffffff8001477c:	0f 1f 40 00          	nopl   0x0(%rax)
ffffffff80014780:	89 d0                	mov    %edx,%eax
ffffffff80014782:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff80014786:	49 8d 34 00          	lea    (%r8,%rax,1),%rsi
            bool evtCycle = (evt.Control & TRB_CYCLE_BIT) != 0;
ffffffff8001478a:	8b 4e 0c             	mov    0xc(%rsi),%ecx
ffffffff8001478d:	41 89 c9             	mov    %ecx,%r9d
ffffffff80014790:	41 83 e1 01          	and    $0x1,%r9d
            if (evtCycle != g_evtRingCCS) {
ffffffff80014794:	41 38 f9             	cmp    %dil,%r9b
ffffffff80014797:	0f 85 3b 02 00 00    	jne    ffffffff800149d8 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x288>
            uint32_t trbType = (evt.Control & TRB_TYPE_MASK) >> TRB_TYPE_SHIFT;
ffffffff8001479d:	89 c8                	mov    %ecx,%eax
ffffffff8001479f:	c1 e8 0a             	shr    $0xa,%eax
ffffffff800147a2:	83 e0 3f             	and    $0x3f,%eax
            switch (trbType) {
ffffffff800147a5:	83 f8 21             	cmp    $0x21,%eax
ffffffff800147a8:	0f 84 ca 01 00 00    	je     ffffffff80014978 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x228>
ffffffff800147ae:	83 f8 22             	cmp    $0x22,%eax
ffffffff800147b1:	0f 84 69 01 00 00    	je     ffffffff80014920 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x1d0>
ffffffff800147b7:	83 f8 20             	cmp    $0x20,%eax
ffffffff800147ba:	0f 85 30 01 00 00    	jne    ffffffff800148f0 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x1a0>
                    uint32_t completionCode = (evt.Status >> 24) & 0xFF;
ffffffff800147c0:	8b 46 08             	mov    0x8(%rsi),%eax
                    uint32_t epDci = (evt.Control >> 16) & 0x1F;
ffffffff800147c3:	89 cb                	mov    %ecx,%ebx
ffffffff800147c5:	c1 eb 10             	shr    $0x10,%ebx
                    uint32_t completionCode = (evt.Status >> 24) & 0xFF;
ffffffff800147c8:	41 89 c4             	mov    %eax,%r12d
                    uint32_t epDci = (evt.Control >> 16) & 0x1F;
ffffffff800147cb:	83 e3 1f             	and    $0x1f,%ebx
                    uint32_t completionCode = (evt.Status >> 24) & 0xFF;
ffffffff800147ce:	41 c1 ec 18          	shr    $0x18,%r12d
                    if (epDci == 1) {
ffffffff800147d2:	83 fb 01             	cmp    $0x1,%ebx
ffffffff800147d5:	0f 84 d5 01 00 00    	je     ffffffff800149b0 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x260>
                    uint32_t slotId = (evt.Control >> 24) & 0xFF;
ffffffff800147db:	c1 e9 18             	shr    $0x18,%ecx
                    } else if (slotId > 0 && slotId <= MAX_SLOTS && g_devices[slotId].Active) {
ffffffff800147de:	8d 71 ff             	lea    -0x1(%rcx),%esi
ffffffff800147e1:	83 fe 0f             	cmp    $0xf,%esi
ffffffff800147e4:	0f 87 06 01 00 00    	ja     ffffffff800148f0 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x1a0>
ffffffff800147ea:	41 89 cd             	mov    %ecx,%r13d
ffffffff800147ed:	4b 8d 74 ad 00       	lea    0x0(%r13,%r13,4),%rsi
ffffffff800147f2:	49 8d 74 75 00       	lea    0x0(%r13,%rsi,2),%rsi
ffffffff800147f7:	80 3c f5 00 74 14 80 	cmpb   $0x0,-0x7feb8c00(,%rsi,8)
ffffffff800147fe:	00 
ffffffff800147ff:	0f 84 eb 00 00 00    	je     ffffffff800148f0 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x1a0>
                        if (completionCode == CC_SUCCESS || completionCode == CC_SHORT_PACKET) {
ffffffff80014805:	41 83 fc 01          	cmp    $0x1,%r12d
ffffffff80014809:	0f 84 f1 01 00 00    	je     ffffffff80014a00 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x2b0>
ffffffff8001480f:	41 83 fc 0d          	cmp    $0xd,%r12d
ffffffff80014813:	0f 84 e7 01 00 00    	je     ffffffff80014a00 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x2b0>
            Print(string);
ffffffff80014819:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff80014820:	83 05 7d ac 1c 00 01 	addl   $0x1,0x1cac7d(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80014827:	e8 94 e9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001482c:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80014833:	e8 88 e9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014838:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001483f:	e8 7c e9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014844:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8001484b:	e8 70 e9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014850:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80014857:	e8 64 e9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001485c:	48 c7 c7 09 b4 02 80 	mov    $0xffffffff8002b409,%rdi
ffffffff80014863:	e8 58 e9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80014868:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001486d:	4c 89 ef             	mov    %r13,%rdi
ffffffff80014870:	e8 1b 5c 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80014875:	48 89 c7             	mov    %rax,%rdi
ffffffff80014878:	e8 43 e9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001487d:	48 c7 c7 21 b4 02 80 	mov    $0xffffffff8002b421,%rdi
ffffffff80014884:	e8 37 e9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80014889:	be 0a 00 00 00       	mov    $0xa,%esi
                                << base::dec << (uint64_t)slotId << " ep " << (uint64_t)epDci
ffffffff8001488e:	89 df                	mov    %ebx,%edi
ffffffff80014890:	e8 fb 5b 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80014895:	48 89 c7             	mov    %rax,%rdi
ffffffff80014898:	e8 23 e9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001489d:	48 c7 c7 95 b3 02 80 	mov    $0xffffffff8002b395,%rdi
ffffffff800148a4:	e8 17 e9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800148a9:	be 0a 00 00 00       	mov    $0xa,%esi
                                << " cc=" << (uint64_t)completionCode;
ffffffff800148ae:	44 89 e7             	mov    %r12d,%edi
ffffffff800148b1:	e8 da 5b 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800148b6:	48 89 c7             	mov    %rax,%rdi
ffffffff800148b9:	e8 02 e9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800148be:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800148c5:	e8 f6 e8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff800148ca:	83 2d d3 ab 1c 00 01 	subl   $0x1,0x1cabd3(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            g_evtRingDequeue++;
ffffffff800148d1:	8b 15 21 31 13 00    	mov    0x133121(%rip),%edx        # ffffffff801479f8 <_ZN7Drivers3USB4XhciL16g_evtRingDequeueE>
                g_evtRingCCS = !g_evtRingCCS;
ffffffff800148d7:	0f b6 3d 32 97 01 00 	movzbl 0x19732(%rip),%edi        # ffffffff8002e010 <_ZN7Drivers3USB4XhciL12g_evtRingCCSE>
            TRB& evt = g_evtRing[g_evtRingDequeue];
ffffffff800148de:	4c 8b 05 23 31 13 00 	mov    0x133123(%rip),%r8        # ffffffff80147a08 <_ZN7Drivers3USB4XhciL9g_evtRingE>
ffffffff800148e5:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800148ec:	00 00 00 00 
            g_evtRingDequeue++;
ffffffff800148f0:	83 c2 01             	add    $0x1,%edx
ffffffff800148f3:	89 15 ff 30 13 00    	mov    %edx,0x1330ff(%rip)        # ffffffff801479f8 <_ZN7Drivers3USB4XhciL16g_evtRingDequeueE>
            if (g_evtRingDequeue >= EVT_RING_SIZE) {
ffffffff800148f9:	83 fa 3f             	cmp    $0x3f,%edx
ffffffff800148fc:	0f 86 7e fe ff ff    	jbe    ffffffff80014780 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x30>
                g_evtRingDequeue = 0;
ffffffff80014902:	c7 05 ec 30 13 00 00 	movl   $0x0,0x1330ec(%rip)        # ffffffff801479f8 <_ZN7Drivers3USB4XhciL16g_evtRingDequeueE>
ffffffff80014909:	00 00 00 
                g_evtRingCCS = !g_evtRingCCS;
ffffffff8001490c:	83 f7 01             	xor    $0x1,%edi
ffffffff8001490f:	31 d2                	xor    %edx,%edx
ffffffff80014911:	40 88 3d f8 96 01 00 	mov    %dil,0x196f8(%rip)        # ffffffff8002e010 <_ZN7Drivers3USB4XhciL12g_evtRingCCSE>
ffffffff80014918:	e9 63 fe ff ff       	jmp    ffffffff80014780 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x30>
ffffffff8001491d:	0f 1f 00             	nopl   (%rax)
                    uint32_t portId = (evt.Parameter0 >> 24) & 0xFF;
ffffffff80014920:	8b 36                	mov    (%rsi),%esi
ffffffff80014922:	c1 ee 18             	shr    $0x18,%esi
                    uint32_t portsc = ReadOp(OP_PORTSC_BASE + (portId - 1) * OP_PORTSC_STRIDE);
ffffffff80014925:	8d 46 3f             	lea    0x3f(%rsi),%eax
ffffffff80014928:	c1 e0 04             	shl    $0x4,%eax
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff8001492b:	48 03 05 1e 31 13 00 	add    0x13311e(%rip),%rax        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
ffffffff80014932:	8b 08                	mov    (%rax),%ecx
                            (portsc & PORTSC_PRESERVE) | PORTSC_CHANGE_BITS);
ffffffff80014934:	81 e1 00 02 00 00    	and    $0x200,%ecx
                    WriteOp(OP_PORTSC_BASE + (portId - 1) * OP_PORTSC_STRIDE,
ffffffff8001493a:	81 c9 00 00 fe 00    	or     $0xfe0000,%ecx
                    if (g_bootScanComplete && portId >= 1 && portId <= g_maxPorts) {
ffffffff80014940:	80 3d 39 31 13 00 00 	cmpb   $0x0,0x133139(%rip)        # ffffffff80147a80 <_ZN7Drivers3USB4XhciL18g_bootScanCompleteE>
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff80014947:	89 08                	mov    %ecx,(%rax)
                    if (g_bootScanComplete && portId >= 1 && portId <= g_maxPorts) {
ffffffff80014949:	74 a5                	je     ffffffff800148f0 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x1a0>
ffffffff8001494b:	85 f6                	test   %esi,%esi
ffffffff8001494d:	74 a1                	je     ffffffff800148f0 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x1a0>
ffffffff8001494f:	39 35 e3 30 13 00    	cmp    %esi,0x1330e3(%rip)        # ffffffff80147a38 <_ZN7Drivers3USB4XhciL10g_maxPortsE>
ffffffff80014955:	72 99                	jb     ffffffff800148f0 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x1a0>
                        g_hotplugPending[portId - 1] = true;
ffffffff80014957:	8d 46 ff             	lea    -0x1(%rsi),%eax
            g_evtRingDequeue++;
ffffffff8001495a:	83 c2 01             	add    $0x1,%edx
                        g_hotplugPending[portId - 1] = true;
ffffffff8001495d:	c6 80 70 7a 14 80 01 	movb   $0x1,-0x7feb8590(%rax)
            g_evtRingDequeue++;
ffffffff80014964:	89 15 8e 30 13 00    	mov    %edx,0x13308e(%rip)        # ffffffff801479f8 <_ZN7Drivers3USB4XhciL16g_evtRingDequeueE>
            if (g_evtRingDequeue >= EVT_RING_SIZE) {
ffffffff8001496a:	83 fa 3f             	cmp    $0x3f,%edx
ffffffff8001496d:	0f 86 0d fe ff ff    	jbe    ffffffff80014780 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x30>
ffffffff80014973:	eb 8d                	jmp    ffffffff80014902 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x1b2>
ffffffff80014975:	0f 1f 00             	nopl   (%rax)
                    uint32_t completionCode = (evt.Status >> 24) & 0xFF;
ffffffff80014978:	0f b6 46 0b          	movzbl 0xb(%rsi),%eax
                    uint32_t slotId = (evt.Control >> 24) & 0xFF;
ffffffff8001497c:	c1 e9 18             	shr    $0x18,%ecx
            g_evtRingDequeue++;
ffffffff8001497f:	83 c2 01             	add    $0x1,%edx
ffffffff80014982:	89 15 70 30 13 00    	mov    %edx,0x133070(%rip)        # ffffffff801479f8 <_ZN7Drivers3USB4XhciL16g_evtRingDequeueE>
                    g_cmdCompletionCode = completionCode;
ffffffff80014988:	89 05 56 30 13 00    	mov    %eax,0x133056(%rip)        # ffffffff801479e4 <_ZN7Drivers3USB4XhciL19g_cmdCompletionCodeE>
                    g_cmdCompletionSlotId = slotId;
ffffffff8001498e:	89 0d 4c 30 13 00    	mov    %ecx,0x13304c(%rip)        # ffffffff801479e0 <_ZN7Drivers3USB4Xhci21g_cmdCompletionSlotIdE>
                    g_cmdCompleted = true;
ffffffff80014994:	c6 05 4d 30 13 00 01 	movb   $0x1,0x13304d(%rip)        # ffffffff801479e8 <_ZN7Drivers3USB4XhciL14g_cmdCompletedE>
            if (g_evtRingDequeue >= EVT_RING_SIZE) {
ffffffff8001499b:	83 fa 3f             	cmp    $0x3f,%edx
ffffffff8001499e:	0f 86 dc fd ff ff    	jbe    ffffffff80014780 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x30>
ffffffff800149a4:	e9 59 ff ff ff       	jmp    ffffffff80014902 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x1b2>
ffffffff800149a9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            g_evtRingDequeue++;
ffffffff800149b0:	83 c2 01             	add    $0x1,%edx
                        g_xferCompletionCode = completionCode;
ffffffff800149b3:	44 89 25 1e 30 13 00 	mov    %r12d,0x13301e(%rip)        # ffffffff801479d8 <_ZN7Drivers3USB4XhciL20g_xferCompletionCodeE>
            g_evtRingDequeue++;
ffffffff800149ba:	89 15 38 30 13 00    	mov    %edx,0x133038(%rip)        # ffffffff801479f8 <_ZN7Drivers3USB4XhciL16g_evtRingDequeueE>
                        g_xferCompleted = true;
ffffffff800149c0:	c6 05 15 30 13 00 01 	movb   $0x1,0x133015(%rip)        # ffffffff801479dc <_ZN7Drivers3USB4XhciL15g_xferCompletedE>
            if (g_evtRingDequeue >= EVT_RING_SIZE) {
ffffffff800149c7:	83 fa 3f             	cmp    $0x3f,%edx
ffffffff800149ca:	0f 86 b0 fd ff ff    	jbe    ffffffff80014780 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x30>
ffffffff800149d0:	e9 2d ff ff ff       	jmp    ffffffff80014902 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x1b2>
ffffffff800149d5:	0f 1f 00             	nopl   (%rax)
        *(volatile uint32_t*)(g_rtBase + reg) = value;
ffffffff800149d8:	48 8b 15 69 30 13 00 	mov    0x133069(%rip),%rdx        # ffffffff80147a48 <_ZN7Drivers3USB4XhciL8g_rtBaseE>
        uint64_t erdp = g_evtRingPhys + (uint64_t)g_evtRingDequeue * sizeof(TRB);
ffffffff800149df:	48 03 05 1a 30 13 00 	add    0x13301a(%rip),%rax        # ffffffff80147a00 <_ZN7Drivers3USB4XhciL13g_evtRingPhysE>
        erdp |= (1 << 3); // Set EHB to clear it
ffffffff800149e6:	48 83 c8 08          	or     $0x8,%rax
        *(volatile uint32_t*)(g_rtBase + reg) = value;
ffffffff800149ea:	89 42 38             	mov    %eax,0x38(%rdx)
        WriteRt(IR0_ERDP + 4, (uint32_t)(erdp >> 32));
ffffffff800149ed:	48 c1 e8 20          	shr    $0x20,%rax
        *(volatile uint32_t*)(g_rtBase + reg) = value;
ffffffff800149f1:	89 42 3c             	mov    %eax,0x3c(%rdx)
    }
ffffffff800149f4:	48 83 c4 18          	add    $0x18,%rsp
ffffffff800149f8:	5b                   	pop    %rbx
ffffffff800149f9:	41 5c                	pop    %r12
ffffffff800149fb:	41 5d                	pop    %r13
ffffffff800149fd:	5d                   	pop    %rbp
ffffffff800149fe:	c3                   	ret
ffffffff800149ff:	90                   	nop
                            uint16_t len = dev.InterruptMaxPacket;
ffffffff80014a00:	4b 8d 54 ad 00       	lea    0x0(%r13,%r13,4),%rdx
                            uint32_t residual = evt.Status & 0x00FFFFFF;
ffffffff80014a05:	41 89 c1             	mov    %eax,%r9d
                            uint16_t len = dev.InterruptMaxPacket;
ffffffff80014a08:	49 8d 54 55 00       	lea    0x0(%r13,%rdx,2),%rdx
                            uint32_t residual = evt.Status & 0x00FFFFFF;
ffffffff80014a0d:	41 81 e1 ff ff ff 00 	and    $0xffffff,%r9d
                            uint16_t len = dev.InterruptMaxPacket;
ffffffff80014a14:	48 8d 34 d5 00 74 14 	lea    -0x7feb8c00(,%rdx,8),%rsi
ffffffff80014a1b:	80 
ffffffff80014a1c:	44 0f b7 46 10       	movzwl 0x10(%rsi),%r8d
                                len = dev.InterruptMaxPacket - (uint16_t)residual;
ffffffff80014a21:	44 89 c7             	mov    %r8d,%edi
                            uint16_t len = dev.InterruptMaxPacket;
ffffffff80014a24:	44 89 c2             	mov    %r8d,%edx
                                len = dev.InterruptMaxPacket - (uint16_t)residual;
ffffffff80014a27:	29 c7                	sub    %eax,%edi
ffffffff80014a29:	45 39 c1             	cmp    %r8d,%r9d
ffffffff80014a2c:	0f 42 d7             	cmovb  %edi,%edx
                            if (dev.InterfaceClass == UsbDevice::CLASS_HID) {
ffffffff80014a2f:	80 7e 0c 03          	cmpb   $0x3,0xc(%rsi)
ffffffff80014a33:	74 32                	je     ffffffff80014a67 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x317>
                            QueueInterruptTransfer(slotId);
ffffffff80014a35:	89 cf                	mov    %ecx,%edi
ffffffff80014a37:	e8 c4 fb ff ff       	call   ffffffff80014600 <_ZN7Drivers3USB4Xhci22QueueInterruptTransferEh>
            g_evtRingDequeue++;
ffffffff80014a3c:	8b 15 b6 2f 13 00    	mov    0x132fb6(%rip),%edx        # ffffffff801479f8 <_ZN7Drivers3USB4XhciL16g_evtRingDequeueE>
                g_evtRingCCS = !g_evtRingCCS;
ffffffff80014a42:	0f b6 3d c7 95 01 00 	movzbl 0x195c7(%rip),%edi        # ffffffff8002e010 <_ZN7Drivers3USB4XhciL12g_evtRingCCSE>
            TRB& evt = g_evtRing[g_evtRingDequeue];
ffffffff80014a49:	4c 8b 05 b8 2f 13 00 	mov    0x132fb8(%rip),%r8        # ffffffff80147a08 <_ZN7Drivers3USB4XhciL9g_evtRingE>
            g_evtRingDequeue++;
ffffffff80014a50:	83 c2 01             	add    $0x1,%edx
ffffffff80014a53:	89 15 9f 2f 13 00    	mov    %edx,0x132f9f(%rip)        # ffffffff801479f8 <_ZN7Drivers3USB4XhciL16g_evtRingDequeueE>
            if (g_evtRingDequeue >= EVT_RING_SIZE) {
ffffffff80014a59:	83 fa 3f             	cmp    $0x3f,%edx
ffffffff80014a5c:	0f 86 1e fd ff ff    	jbe    ffffffff80014780 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x30>
ffffffff80014a62:	e9 9b fe ff ff       	jmp    ffffffff80014902 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x1b2>
                                if (dev.InterfaceProtocol == UsbDevice::PROTOCOL_KEYBOARD) {
ffffffff80014a67:	0f b6 46 0e          	movzbl 0xe(%rsi),%eax
ffffffff80014a6b:	3c 01                	cmp    $0x1,%al
ffffffff80014a6d:	74 1c                	je     ffffffff80014a8b <_ZN7Drivers3USB4Xhci10PollEventsEv+0x33b>
                                } else if (dev.InterfaceProtocol == UsbDevice::PROTOCOL_MOUSE) {
ffffffff80014a6f:	3c 02                	cmp    $0x2,%al
ffffffff80014a71:	75 c2                	jne    ffffffff80014a35 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x2e5>
                                    HidMouse::ProcessReport(g_interruptDataBuf[slotId], len);
ffffffff80014a73:	4a 8b 3c ed 60 73 14 	mov    -0x7feb8ca0(,%r13,8),%rdi
ffffffff80014a7a:	80 
ffffffff80014a7b:	0f b7 f2             	movzwl %dx,%esi
ffffffff80014a7e:	89 4d dc             	mov    %ecx,-0x24(%rbp)
ffffffff80014a81:	e8 3a e3 ff ff       	call   ffffffff80012dc0 <_ZN7Drivers3USB8HidMouse13ProcessReportEPKht>
ffffffff80014a86:	8b 4d dc             	mov    -0x24(%rbp),%ecx
ffffffff80014a89:	eb aa                	jmp    ffffffff80014a35 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x2e5>
                                    HidKeyboard::ProcessReport(g_interruptDataBuf[slotId], len);
ffffffff80014a8b:	4a 8b 3c ed 60 73 14 	mov    -0x7feb8ca0(,%r13,8),%rdi
ffffffff80014a92:	80 
ffffffff80014a93:	0f b7 f2             	movzwl %dx,%esi
ffffffff80014a96:	89 4d dc             	mov    %ecx,-0x24(%rbp)
ffffffff80014a99:	e8 82 d7 ff ff       	call   ffffffff80012220 <_ZN7Drivers3USB11HidKeyboard13ProcessReportEPKht>
ffffffff80014a9e:	8b 4d dc             	mov    -0x24(%rbp),%ecx
ffffffff80014aa1:	eb 92                	jmp    ffffffff80014a35 <_ZN7Drivers3USB4Xhci10PollEventsEv+0x2e5>
ffffffff80014aa3:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80014aaa:	00 00 00 
ffffffff80014aad:	0f 1f 00             	nopl   (%rax)

ffffffff80014ab0 <_ZN7Drivers3USB4Xhci11SendCommandERKNS1_3TRBE>:
    uint32_t SendCommand(const TRB& trb) {
ffffffff80014ab0:	55                   	push   %rbp
ffffffff80014ab1:	48 89 f9             	mov    %rdi,%rcx
ffffffff80014ab4:	48 89 e5             	mov    %rsp,%rbp
ffffffff80014ab7:	53                   	push   %rbx
ffffffff80014ab8:	48 83 ec 08          	sub    $0x8,%rsp
        TRB& slot = g_cmdRing[g_cmdRingEnqueue];
ffffffff80014abc:	8b 05 4e 2f 13 00    	mov    0x132f4e(%rip),%eax        # ffffffff80147a10 <_ZN7Drivers3USB4XhciL16g_cmdRingEnqueueE>
ffffffff80014ac2:	48 8b 3d 57 2f 13 00 	mov    0x132f57(%rip),%rdi        # ffffffff80147a20 <_ZN7Drivers3USB4XhciL9g_cmdRingE>
        slot.Parameter0 = trb.Parameter0;
ffffffff80014ac9:	8b 31                	mov    (%rcx),%esi
        TRB& slot = g_cmdRing[g_cmdRingEnqueue];
ffffffff80014acb:	48 89 c2             	mov    %rax,%rdx
ffffffff80014ace:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff80014ad2:	48 01 f8             	add    %rdi,%rax
        g_cmdRingEnqueue++;
ffffffff80014ad5:	83 c2 01             	add    $0x1,%edx
        slot.Parameter0 = trb.Parameter0;
ffffffff80014ad8:	89 30                	mov    %esi,(%rax)
        slot.Parameter1 = trb.Parameter1;
ffffffff80014ada:	8b 71 04             	mov    0x4(%rcx),%esi
ffffffff80014add:	89 70 04             	mov    %esi,0x4(%rax)
        slot.Status = trb.Status;
ffffffff80014ae0:	8b 71 08             	mov    0x8(%rcx),%esi
        uint32_t control = trb.Control & ~TRB_CYCLE_BIT;
ffffffff80014ae3:	8b 49 0c             	mov    0xc(%rcx),%ecx
        slot.Status = trb.Status;
ffffffff80014ae6:	89 70 08             	mov    %esi,0x8(%rax)
        if (g_cmdRingCCS) {
ffffffff80014ae9:	0f b6 35 21 95 01 00 	movzbl 0x19521(%rip),%esi        # ffffffff8002e011 <_ZN7Drivers3USB4XhciL12g_cmdRingCCSE>
ffffffff80014af0:	40 84 f6             	test   %sil,%sil
ffffffff80014af3:	0f 85 da 00 00 00    	jne    ffffffff80014bd3 <_ZN7Drivers3USB4Xhci11SendCommandERKNS1_3TRBE+0x123>
        uint32_t control = trb.Control & ~TRB_CYCLE_BIT;
ffffffff80014af9:	83 e1 fe             	and    $0xfffffffe,%ecx
        g_cmdRingEnqueue++;
ffffffff80014afc:	89 15 0e 2f 13 00    	mov    %edx,0x132f0e(%rip)        # ffffffff80147a10 <_ZN7Drivers3USB4XhciL16g_cmdRingEnqueueE>
        uint32_t control = trb.Control & ~TRB_CYCLE_BIT;
ffffffff80014b02:	89 48 0c             	mov    %ecx,0xc(%rax)
        if (g_cmdRingEnqueue >= CMD_RING_SIZE - 1) {
ffffffff80014b05:	83 fa 3e             	cmp    $0x3e,%edx
ffffffff80014b08:	0f 87 02 01 00 00    	ja     ffffffff80014c10 <_ZN7Drivers3USB4Xhci11SendCommandERKNS1_3TRBE+0x160>
        *(volatile uint32_t*)(g_dbBase + index * 4) = value;
ffffffff80014b0e:	48 8b 05 2b 2f 13 00 	mov    0x132f2b(%rip),%rax        # ffffffff80147a40 <_ZN7Drivers3USB4XhciL8g_dbBaseE>
        g_cmdCompleted = false;
ffffffff80014b15:	c6 05 cc 2e 13 00 00 	movb   $0x0,0x132ecc(%rip)        # ffffffff801479e8 <_ZN7Drivers3USB4XhciL14g_cmdCompletedE>
        *(volatile uint32_t*)(g_dbBase + index * 4) = value;
ffffffff80014b1c:	bb a0 86 01 00       	mov    $0x186a0,%ebx
ffffffff80014b21:	c7 00 00 00 00 00    	movl   $0x0,(%rax)
        for (uint32_t i = 0; i < 100000; i++) {
ffffffff80014b27:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff80014b2e:	00 00 
            PollEvents();
ffffffff80014b30:	e8 1b fc ff ff       	call   ffffffff80014750 <_ZN7Drivers3USB4Xhci10PollEventsEv>
            if (g_cmdCompleted) {
ffffffff80014b35:	0f b6 05 ac 2e 13 00 	movzbl 0x132eac(%rip),%eax        # ffffffff801479e8 <_ZN7Drivers3USB4XhciL14g_cmdCompletedE>
ffffffff80014b3c:	84 c0                	test   %al,%al
ffffffff80014b3e:	0f 85 83 00 00 00    	jne    ffffffff80014bc7 <_ZN7Drivers3USB4Xhci11SendCommandERKNS1_3TRBE+0x117>
ffffffff80014b44:	b8 64 00 00 00       	mov    $0x64,%eax
ffffffff80014b49:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            for (int j = 0; j < 100; j++) {
ffffffff80014b50:	83 e8 02             	sub    $0x2,%eax
ffffffff80014b53:	75 fb                	jne    ffffffff80014b50 <_ZN7Drivers3USB4Xhci11SendCommandERKNS1_3TRBE+0xa0>
        for (uint32_t i = 0; i < 100000; i++) {
ffffffff80014b55:	83 eb 01             	sub    $0x1,%ebx
ffffffff80014b58:	75 d6                	jne    ffffffff80014b30 <_ZN7Drivers3USB4Xhci11SendCommandERKNS1_3TRBE+0x80>
            Print(string);
ffffffff80014b5a:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff80014b61:	83 05 3c a9 1c 00 01 	addl   $0x1,0x1ca93c(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80014b68:	e8 53 e6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014b6d:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80014b74:	e8 47 e6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014b79:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80014b80:	e8 3b e6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014b85:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff80014b8c:	e8 2f e6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014b91:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80014b98:	e8 23 e6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014b9d:	48 c7 c7 26 b4 02 80 	mov    $0xffffffff8002b426,%rdi
ffffffff80014ba4:	e8 17 e6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014ba9:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80014bb0:	e8 0b e6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80014bb5:	83 2d e8 a8 1c 00 01 	subl   $0x1,0x1ca8e8(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff80014bbc:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
        return 0xFF;
ffffffff80014bc0:	b8 ff 00 00 00       	mov    $0xff,%eax
    }
ffffffff80014bc5:	c9                   	leave
ffffffff80014bc6:	c3                   	ret
                return g_cmdCompletionCode;
ffffffff80014bc7:	8b 05 17 2e 13 00    	mov    0x132e17(%rip),%eax        # ffffffff801479e4 <_ZN7Drivers3USB4XhciL19g_cmdCompletionCodeE>
    }
ffffffff80014bcd:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff80014bd1:	c9                   	leave
ffffffff80014bd2:	c3                   	ret
            control |= TRB_CYCLE_BIT;
ffffffff80014bd3:	83 c9 01             	or     $0x1,%ecx
        g_cmdRingEnqueue++;
ffffffff80014bd6:	89 15 34 2e 13 00    	mov    %edx,0x132e34(%rip)        # ffffffff80147a10 <_ZN7Drivers3USB4XhciL16g_cmdRingEnqueueE>
            control |= TRB_CYCLE_BIT;
ffffffff80014bdc:	89 48 0c             	mov    %ecx,0xc(%rax)
        if (g_cmdRingEnqueue >= CMD_RING_SIZE - 1) {
ffffffff80014bdf:	83 fa 3e             	cmp    $0x3e,%edx
ffffffff80014be2:	0f 86 26 ff ff ff    	jbe    ffffffff80014b0e <_ZN7Drivers3USB4Xhci11SendCommandERKNS1_3TRBE+0x5e>
                link.Control |= TRB_CYCLE_BIT;
ffffffff80014be8:	8b 87 fc 03 00 00    	mov    0x3fc(%rdi),%eax
ffffffff80014bee:	83 c8 01             	or     $0x1,%eax
            g_cmdRingCCS = !g_cmdRingCCS;
ffffffff80014bf1:	83 f6 01             	xor    $0x1,%esi
                link.Control |= TRB_CYCLE_BIT;
ffffffff80014bf4:	89 87 fc 03 00 00    	mov    %eax,0x3fc(%rdi)
            g_cmdRingCCS = !g_cmdRingCCS;
ffffffff80014bfa:	40 88 35 10 94 01 00 	mov    %sil,0x19410(%rip)        # ffffffff8002e011 <_ZN7Drivers3USB4XhciL12g_cmdRingCCSE>
            g_cmdRingEnqueue = 0;
ffffffff80014c01:	c7 05 05 2e 13 00 00 	movl   $0x0,0x132e05(%rip)        # ffffffff80147a10 <_ZN7Drivers3USB4XhciL16g_cmdRingEnqueueE>
ffffffff80014c08:	00 00 00 
ffffffff80014c0b:	e9 fe fe ff ff       	jmp    ffffffff80014b0e <_ZN7Drivers3USB4Xhci11SendCommandERKNS1_3TRBE+0x5e>
                link.Control &= ~TRB_CYCLE_BIT;
ffffffff80014c10:	8b 87 fc 03 00 00    	mov    0x3fc(%rdi),%eax
ffffffff80014c16:	83 e0 fe             	and    $0xfffffffe,%eax
ffffffff80014c19:	eb d6                	jmp    ffffffff80014bf1 <_ZN7Drivers3USB4Xhci11SendCommandERKNS1_3TRBE+0x141>
ffffffff80014c1b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80014c20 <_ZN7Drivers3USB4XhciL15HandleInterruptEh>:
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff80014c20:	48 8b 05 29 2e 13 00 	mov    0x132e29(%rip),%rax        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
ffffffff80014c27:	c7 40 04 08 00 00 00 	movl   $0x8,0x4(%rax)
        *(volatile uint32_t*)(g_rtBase + reg) = value;
ffffffff80014c2e:	48 8b 05 13 2e 13 00 	mov    0x132e13(%rip),%rax        # ffffffff80147a48 <_ZN7Drivers3USB4XhciL8g_rtBaseE>
ffffffff80014c35:	c7 40 20 03 00 00 00 	movl   $0x3,0x20(%rax)
        PollEvents();
ffffffff80014c3c:	e9 0f fb ff ff       	jmp    ffffffff80014750 <_ZN7Drivers3USB4Xhci10PollEventsEv>
ffffffff80014c41:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80014c48:	00 00 00 
ffffffff80014c4b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80014c50 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb>:
                             void* data, bool dirIn) {
ffffffff80014c50:	55                   	push   %rbp
ffffffff80014c51:	89 d0                	mov    %edx,%eax
        if (slotId == 0 || slotId > MAX_SLOTS || !g_devices[slotId].Active) {
ffffffff80014c53:	8d 57 ff             	lea    -0x1(%rdi),%edx
                             void* data, bool dirIn) {
ffffffff80014c56:	48 89 e5             	mov    %rsp,%rbp
ffffffff80014c59:	41 57                	push   %r15
ffffffff80014c5b:	41 56                	push   %r14
ffffffff80014c5d:	41 55                	push   %r13
ffffffff80014c5f:	41 54                	push   %r12
ffffffff80014c61:	53                   	push   %rbx
ffffffff80014c62:	48 83 ec 08          	sub    $0x8,%rsp
ffffffff80014c66:	4c 8b 5d 10          	mov    0x10(%rbp),%r11
ffffffff80014c6a:	8b 5d 18             	mov    0x18(%rbp),%ebx
        if (slotId == 0 || slotId > MAX_SLOTS || !g_devices[slotId].Active) {
ffffffff80014c6d:	80 fa 0f             	cmp    $0xf,%dl
ffffffff80014c70:	0f 87 8c 02 00 00    	ja     ffffffff80014f02 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x2b2>
ffffffff80014c76:	41 89 cd             	mov    %ecx,%r13d
ffffffff80014c79:	40 0f b6 cf          	movzbl %dil,%ecx
ffffffff80014c7d:	45 89 c6             	mov    %r8d,%r14d
ffffffff80014c80:	41 89 fc             	mov    %edi,%r12d
ffffffff80014c83:	48 8d 14 89          	lea    (%rcx,%rcx,4),%rdx
ffffffff80014c87:	44 0f b6 c7          	movzbl %dil,%r8d
ffffffff80014c8b:	48 8d 14 51          	lea    (%rcx,%rdx,2),%rdx
ffffffff80014c8f:	48 c1 e2 03          	shl    $0x3,%rdx
ffffffff80014c93:	80 ba 00 74 14 80 00 	cmpb   $0x0,-0x7feb8c00(%rdx)
ffffffff80014c9a:	0f 84 62 02 00 00    	je     ffffffff80014f02 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x2b2>
ffffffff80014ca0:	41 89 f2             	mov    %esi,%r10d
        setup.Parameter0 = (uint32_t)bmRequestType | ((uint32_t)bRequest << 8) | ((uint32_t)wValue << 16);
ffffffff80014ca3:	0f b6 c0             	movzbl %al,%eax
ffffffff80014ca6:	41 c1 e5 10          	shl    $0x10,%r13d
        setup.Parameter1 = (uint32_t)wIndex | ((uint32_t)wLength << 16);
ffffffff80014caa:	45 0f b7 f6          	movzwl %r14w,%r14d
        TRB& setup = dev.EP0Ring[dev.EP0RingEnqueue];
ffffffff80014cae:	48 8b b2 30 74 14 80 	mov    -0x7feb8bd0(%rdx),%rsi
        setup.Parameter0 = (uint32_t)bmRequestType | ((uint32_t)bRequest << 8) | ((uint32_t)wValue << 16);
ffffffff80014cb5:	45 0f b6 d2          	movzbl %r10b,%r10d
ffffffff80014cb9:	c1 e0 08             	shl    $0x8,%eax
        TRB& setup = dev.EP0Ring[dev.EP0RingEnqueue];
ffffffff80014cbc:	48 81 c2 00 74 14 80 	add    $0xffffffff80147400,%rdx
ffffffff80014cc3:	8b 7a 40             	mov    0x40(%rdx),%edi
        setup.Parameter0 = (uint32_t)bmRequestType | ((uint32_t)bRequest << 8) | ((uint32_t)wValue << 16);
ffffffff80014cc6:	44 09 d0             	or     %r10d,%eax
        setup.Parameter1 = (uint32_t)wIndex | ((uint32_t)wLength << 16);
ffffffff80014cc9:	45 0f b7 d1          	movzwl %r9w,%r10d
        setup.Parameter0 = (uint32_t)bmRequestType | ((uint32_t)bRequest << 8) | ((uint32_t)wValue << 16);
ffffffff80014ccd:	44 09 e8             	or     %r13d,%eax
            setupControl |= TRB_TRT_NODATA;
ffffffff80014cd0:	41 bd 40 08 00 00    	mov    $0x840,%r13d
        TRB& setup = dev.EP0Ring[dev.EP0RingEnqueue];
ffffffff80014cd6:	48 89 fa             	mov    %rdi,%rdx
ffffffff80014cd9:	48 c1 e7 04          	shl    $0x4,%rdi
ffffffff80014cdd:	48 01 f7             	add    %rsi,%rdi
        setup.Parameter0 = (uint32_t)bmRequestType | ((uint32_t)bRequest << 8) | ((uint32_t)wValue << 16);
ffffffff80014ce0:	89 07                	mov    %eax,(%rdi)
        setup.Parameter1 = (uint32_t)wIndex | ((uint32_t)wLength << 16);
ffffffff80014ce2:	44 89 c8             	mov    %r9d,%eax
ffffffff80014ce5:	c1 e0 10             	shl    $0x10,%eax
        setup.Status = 8; // Setup packet is always 8 bytes
ffffffff80014ce8:	c7 47 08 08 00 00 00 	movl   $0x8,0x8(%rdi)
        setup.Parameter1 = (uint32_t)wIndex | ((uint32_t)wLength << 16);
ffffffff80014cef:	44 09 f0             	or     %r14d,%eax
ffffffff80014cf2:	89 47 04             	mov    %eax,0x4(%rdi)
        if (wLength > 0) {
ffffffff80014cf5:	66 45 85 c9          	test   %r9w,%r9w
ffffffff80014cf9:	74 11                	je     ffffffff80014d0c <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0xbc>
            setupControl |= dirIn ? TRB_TRT_IN : TRB_TRT_OUT;
ffffffff80014cfb:	80 fb 01             	cmp    $0x1,%bl
ffffffff80014cfe:	45 19 ed             	sbb    %r13d,%r13d
ffffffff80014d01:	66 45 31 ed          	xor    %r13w,%r13w
ffffffff80014d05:	41 81 c5 40 08 03 00 	add    $0x30840,%r13d
        if (dev.EP0RingCCS) {
ffffffff80014d0c:	48 8d 04 89          	lea    (%rcx,%rcx,4),%rax
ffffffff80014d10:	48 8d 04 41          	lea    (%rcx,%rax,2),%rax
ffffffff80014d14:	4c 8d 3c c5 00 74 14 	lea    -0x7feb8c00(,%rax,8),%r15
ffffffff80014d1b:	80 
        dev.EP0RingEnqueue++;
ffffffff80014d1c:	8d 42 01             	lea    0x1(%rdx),%eax
        if (dev.EP0RingCCS) {
ffffffff80014d1f:	45 0f b6 77 44       	movzbl 0x44(%r15),%r14d
ffffffff80014d24:	45 84 f6             	test   %r14b,%r14b
ffffffff80014d27:	0f 84 e9 01 00 00    	je     ffffffff80014f16 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x2c6>
            setupControl |= TRB_CYCLE_BIT;
ffffffff80014d2d:	41 83 cd 01          	or     $0x1,%r13d
ffffffff80014d31:	44 89 6f 0c          	mov    %r13d,0xc(%rdi)
        dev.EP0RingEnqueue++;
ffffffff80014d35:	41 89 47 40          	mov    %eax,0x40(%r15)
        if (dev.EP0RingEnqueue >= XFER_RING_SIZE - 1) {
ffffffff80014d39:	83 f8 1e             	cmp    $0x1e,%eax
ffffffff80014d3c:	0f 87 73 02 00 00    	ja     ffffffff80014fb5 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x365>
            TRB& dataTrb = dev.EP0Ring[dev.EP0RingEnqueue];
ffffffff80014d42:	48 c1 e0 04          	shl    $0x4,%rax
        dev.EP0RingEnqueue++;
ffffffff80014d46:	83 c2 02             	add    $0x2,%edx
            TRB& dataTrb = dev.EP0Ring[dev.EP0RingEnqueue];
ffffffff80014d49:	48 01 f0             	add    %rsi,%rax
        if (wLength > 0 && data != nullptr) {
ffffffff80014d4c:	66 45 85 c9          	test   %r9w,%r9w
ffffffff80014d50:	0f 84 89 00 00 00    	je     ffffffff80014ddf <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x18f>
ffffffff80014d56:	4d 85 db             	test   %r11,%r11
ffffffff80014d59:	0f 84 80 00 00 00    	je     ffffffff80014ddf <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x18f>
            dataTrb.Status = wLength;
ffffffff80014d5f:	44 89 50 08          	mov    %r10d,0x8(%rax)
            if (dev.EP0RingCCS) {
ffffffff80014d63:	4c 8d 14 89          	lea    (%rcx,%rcx,4),%r10
ffffffff80014d67:	4c 2b 1d 3a 7c 13 00 	sub    0x137c3a(%rip),%r11        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            uint32_t dataControl = (TRB_DATA_STAGE << TRB_TYPE_SHIFT);
ffffffff80014d6e:	80 fb 01             	cmp    $0x1,%bl
            if (dev.EP0RingCCS) {
ffffffff80014d71:	4e 8d 14 51          	lea    (%rcx,%r10,2),%r10
            dataTrb.Parameter0 = (uint32_t)(dataPhys & 0xFFFFFFFF);
ffffffff80014d75:	4c 89 18             	mov    %r11,(%rax)
            uint32_t dataControl = (TRB_DATA_STAGE << TRB_TYPE_SHIFT);
ffffffff80014d78:	19 ff                	sbb    %edi,%edi
            if (dev.EP0RingCCS) {
ffffffff80014d7a:	4e 8d 1c d5 00 74 14 	lea    -0x7feb8c00(,%r10,8),%r11
ffffffff80014d81:	80 
            uint32_t dataControl = (TRB_DATA_STAGE << TRB_TYPE_SHIFT);
ffffffff80014d82:	66 31 ff             	xor    %di,%di
            if (dev.EP0RingCCS) {
ffffffff80014d85:	45 0f b6 53 44       	movzbl 0x44(%r11),%r10d
            uint32_t dataControl = (TRB_DATA_STAGE << TRB_TYPE_SHIFT);
ffffffff80014d8a:	81 c7 00 0c 01 00    	add    $0x10c00,%edi
            if (dev.EP0RingCCS) {
ffffffff80014d90:	45 84 d2             	test   %r10b,%r10b
ffffffff80014d93:	0f 85 ff 01 00 00    	jne    ffffffff80014f98 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x348>
            dataTrb.Control = dataControl;
ffffffff80014d99:	89 78 0c             	mov    %edi,0xc(%rax)
        dev.EP0RingEnqueue++;
ffffffff80014d9c:	41 89 53 40          	mov    %edx,0x40(%r11)
        if (dev.EP0RingEnqueue >= XFER_RING_SIZE - 1) {
ffffffff80014da0:	83 fa 1f             	cmp    $0x1f,%edx
ffffffff80014da3:	0f 85 47 02 00 00    	jne    ffffffff80014ff0 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x3a0>
                link.Control &= ~TRB_CYCLE_BIT;
ffffffff80014da9:	8b 86 fc 01 00 00    	mov    0x1fc(%rsi),%eax
ffffffff80014daf:	83 e0 fe             	and    $0xfffffffe,%eax
                link.Control |= TRB_CYCLE_BIT;
ffffffff80014db2:	89 86 fc 01 00 00    	mov    %eax,0x1fc(%rsi)
            dev.EP0RingCCS = !dev.EP0RingCCS;
ffffffff80014db8:	48 8d 04 89          	lea    (%rcx,%rcx,4),%rax
ffffffff80014dbc:	41 83 f2 01          	xor    $0x1,%r10d
    }
ffffffff80014dc0:	ba 01 00 00 00       	mov    $0x1,%edx
            dev.EP0RingCCS = !dev.EP0RingCCS;
ffffffff80014dc5:	48 8d 04 41          	lea    (%rcx,%rax,2),%rax
ffffffff80014dc9:	48 8d 04 c5 00 74 14 	lea    -0x7feb8c00(,%rax,8),%rax
ffffffff80014dd0:	80 
ffffffff80014dd1:	44 88 50 44          	mov    %r10b,0x44(%rax)
            dev.EP0RingEnqueue = 0;
ffffffff80014dd5:	c7 40 40 00 00 00 00 	movl   $0x0,0x40(%rax)
    }
ffffffff80014ddc:	48 89 f0             	mov    %rsi,%rax
        status.Parameter0 = 0;
ffffffff80014ddf:	48 c7 00 00 00 00 00 	movq   $0x0,(%rax)
        status.Status = 0;
ffffffff80014de6:	c7 40 08 00 00 00 00 	movl   $0x0,0x8(%rax)
        } else if (wLength == 0) {
ffffffff80014ded:	80 fb 01             	cmp    $0x1,%bl
ffffffff80014df0:	75 0b                	jne    ffffffff80014dfd <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x1ad>
        uint32_t statusControl = (TRB_STATUS_STAGE << TRB_TYPE_SHIFT) | TRB_IOC;
ffffffff80014df2:	bf 20 10 00 00       	mov    $0x1020,%edi
        } else if (wLength == 0) {
ffffffff80014df7:	66 45 85 c9          	test   %r9w,%r9w
ffffffff80014dfb:	75 05                	jne    ffffffff80014e02 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x1b2>
            statusControl |= TRB_DIR_IN;
ffffffff80014dfd:	bf 20 10 01 00       	mov    $0x11020,%edi
        if (dev.EP0RingCCS) {
ffffffff80014e02:	4c 8d 0c 89          	lea    (%rcx,%rcx,4),%r9
ffffffff80014e06:	4e 8d 0c 49          	lea    (%rcx,%r9,2),%r9
ffffffff80014e0a:	4e 8d 14 cd 00 74 14 	lea    -0x7feb8c00(,%r9,8),%r10
ffffffff80014e11:	80 
ffffffff80014e12:	45 0f b6 4a 44       	movzbl 0x44(%r10),%r9d
ffffffff80014e17:	45 84 c9             	test   %r9b,%r9b
ffffffff80014e1a:	0f 84 2a 01 00 00    	je     ffffffff80014f4a <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x2fa>
            statusControl |= TRB_CYCLE_BIT;
ffffffff80014e20:	83 cf 01             	or     $0x1,%edi
ffffffff80014e23:	89 78 0c             	mov    %edi,0xc(%rax)
        dev.EP0RingEnqueue++;
ffffffff80014e26:	41 89 52 40          	mov    %edx,0x40(%r10)
        if (dev.EP0RingEnqueue >= XFER_RING_SIZE - 1) {
ffffffff80014e2a:	83 fa 1f             	cmp    $0x1f,%edx
ffffffff80014e2d:	0f 84 5a 01 00 00    	je     ffffffff80014f8d <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x33d>
        *(volatile uint32_t*)(g_dbBase + index * 4) = value;
ffffffff80014e33:	42 8d 04 85 00 00 00 	lea    0x0(,%r8,4),%eax
ffffffff80014e3a:	00 
ffffffff80014e3b:	48 03 05 fe 2b 13 00 	add    0x132bfe(%rip),%rax        # ffffffff80147a40 <_ZN7Drivers3USB4XhciL8g_dbBaseE>
ffffffff80014e42:	bb a0 86 01 00       	mov    $0x186a0,%ebx
        g_xferCompleted = false;
ffffffff80014e47:	c6 05 8e 2b 13 00 00 	movb   $0x0,0x132b8e(%rip)        # ffffffff801479dc <_ZN7Drivers3USB4XhciL15g_xferCompletedE>
        *(volatile uint32_t*)(g_dbBase + index * 4) = value;
ffffffff80014e4e:	c7 00 01 00 00 00    	movl   $0x1,(%rax)
        for (uint32_t i = 0; i < 100000; i++) {
ffffffff80014e54:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80014e5b:	00 00 00 00 
ffffffff80014e5f:	90                   	nop
            PollEvents();
ffffffff80014e60:	e8 eb f8 ff ff       	call   ffffffff80014750 <_ZN7Drivers3USB4Xhci10PollEventsEv>
            if (g_xferCompleted) {
ffffffff80014e65:	0f b6 05 70 2b 13 00 	movzbl 0x132b70(%rip),%eax        # ffffffff801479dc <_ZN7Drivers3USB4XhciL15g_xferCompletedE>
ffffffff80014e6c:	84 c0                	test   %al,%al
ffffffff80014e6e:	0f 85 c1 00 00 00    	jne    ffffffff80014f35 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x2e5>
ffffffff80014e74:	b8 64 00 00 00       	mov    $0x64,%eax
ffffffff80014e79:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            for (int j = 0; j < 100; j++) {
ffffffff80014e80:	83 e8 02             	sub    $0x2,%eax
ffffffff80014e83:	75 fb                	jne    ffffffff80014e80 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x230>
        for (uint32_t i = 0; i < 100000; i++) {
ffffffff80014e85:	83 eb 01             	sub    $0x1,%ebx
ffffffff80014e88:	75 d6                	jne    ffffffff80014e60 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x210>
            Print(string);
ffffffff80014e8a:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff80014e91:	83 05 0c a6 1c 00 01 	addl   $0x1,0x1ca60c(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80014e98:	e8 23 e3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014e9d:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80014ea4:	e8 17 e3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014ea9:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80014eb0:	e8 0b e3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014eb5:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff80014ebc:	e8 ff e2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014ec1:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80014ec8:	e8 f3 e2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80014ecd:	48 c7 c7 70 cb 02 80 	mov    $0xffffffff8002cb70,%rdi
ffffffff80014ed4:	e8 e7 e2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80014ed9:	be 0a 00 00 00       	mov    $0xa,%esi
        KernelLogStream(WARNING, "xHCI") << "Control transfer timeout on slot " << base::dec << (uint64_t)slotId;
ffffffff80014ede:	41 0f b6 fc          	movzbl %r12b,%edi
ffffffff80014ee2:	e8 a9 55 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80014ee7:	48 89 c7             	mov    %rax,%rdi
ffffffff80014eea:	e8 d1 e2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80014eef:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80014ef6:	e8 c5 e2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80014efb:	83 2d a2 a5 1c 00 01 	subl   $0x1,0x1ca5a2(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff80014f02:	48 83 c4 08          	add    $0x8,%rsp
            return 0xFF;
ffffffff80014f06:	b8 ff 00 00 00       	mov    $0xff,%eax
    }
ffffffff80014f0b:	5b                   	pop    %rbx
ffffffff80014f0c:	41 5c                	pop    %r12
ffffffff80014f0e:	41 5d                	pop    %r13
ffffffff80014f10:	41 5e                	pop    %r14
ffffffff80014f12:	41 5f                	pop    %r15
ffffffff80014f14:	5d                   	pop    %rbp
ffffffff80014f15:	c3                   	ret
        setup.Control = setupControl;
ffffffff80014f16:	44 89 6f 0c          	mov    %r13d,0xc(%rdi)
        dev.EP0RingEnqueue++;
ffffffff80014f1a:	41 89 47 40          	mov    %eax,0x40(%r15)
        if (dev.EP0RingEnqueue >= XFER_RING_SIZE - 1) {
ffffffff80014f1e:	83 f8 1e             	cmp    $0x1e,%eax
ffffffff80014f21:	0f 86 1b fe ff ff    	jbe    ffffffff80014d42 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0xf2>
                link.Control &= ~TRB_CYCLE_BIT;
ffffffff80014f27:	8b 86 fc 01 00 00    	mov    0x1fc(%rsi),%eax
ffffffff80014f2d:	83 e0 fe             	and    $0xfffffffe,%eax
ffffffff80014f30:	e9 89 00 00 00       	jmp    ffffffff80014fbe <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x36e>
                return g_xferCompletionCode;
ffffffff80014f35:	8b 05 9d 2a 13 00    	mov    0x132a9d(%rip),%eax        # ffffffff801479d8 <_ZN7Drivers3USB4XhciL20g_xferCompletionCodeE>
    }
ffffffff80014f3b:	48 83 c4 08          	add    $0x8,%rsp
ffffffff80014f3f:	5b                   	pop    %rbx
ffffffff80014f40:	41 5c                	pop    %r12
ffffffff80014f42:	41 5d                	pop    %r13
ffffffff80014f44:	41 5e                	pop    %r14
ffffffff80014f46:	41 5f                	pop    %r15
ffffffff80014f48:	5d                   	pop    %rbp
ffffffff80014f49:	c3                   	ret
        status.Control = statusControl;
ffffffff80014f4a:	89 78 0c             	mov    %edi,0xc(%rax)
        dev.EP0RingEnqueue++;
ffffffff80014f4d:	41 89 52 40          	mov    %edx,0x40(%r10)
        if (dev.EP0RingEnqueue >= XFER_RING_SIZE - 1) {
ffffffff80014f51:	83 fa 1f             	cmp    $0x1f,%edx
ffffffff80014f54:	0f 85 d9 fe ff ff    	jne    ffffffff80014e33 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x1e3>
                link.Control &= ~TRB_CYCLE_BIT;
ffffffff80014f5a:	8b 86 fc 01 00 00    	mov    0x1fc(%rsi),%eax
ffffffff80014f60:	83 e0 fe             	and    $0xfffffffe,%eax
                link.Control |= TRB_CYCLE_BIT;
ffffffff80014f63:	89 86 fc 01 00 00    	mov    %eax,0x1fc(%rsi)
            dev.EP0RingCCS = !dev.EP0RingCCS;
ffffffff80014f69:	48 8d 04 89          	lea    (%rcx,%rcx,4),%rax
ffffffff80014f6d:	41 83 f1 01          	xor    $0x1,%r9d
ffffffff80014f71:	48 8d 04 41          	lea    (%rcx,%rax,2),%rax
ffffffff80014f75:	48 8d 04 c5 00 74 14 	lea    -0x7feb8c00(,%rax,8),%rax
ffffffff80014f7c:	80 
ffffffff80014f7d:	44 88 48 44          	mov    %r9b,0x44(%rax)
            dev.EP0RingEnqueue = 0;
ffffffff80014f81:	c7 40 40 00 00 00 00 	movl   $0x0,0x40(%rax)
    }
ffffffff80014f88:	e9 a6 fe ff ff       	jmp    ffffffff80014e33 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x1e3>
                link.Control |= TRB_CYCLE_BIT;
ffffffff80014f8d:	8b 86 fc 01 00 00    	mov    0x1fc(%rsi),%eax
ffffffff80014f93:	83 c8 01             	or     $0x1,%eax
ffffffff80014f96:	eb cb                	jmp    ffffffff80014f63 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x313>
                dataControl |= TRB_CYCLE_BIT;
ffffffff80014f98:	83 cf 01             	or     $0x1,%edi
ffffffff80014f9b:	89 78 0c             	mov    %edi,0xc(%rax)
        dev.EP0RingEnqueue++;
ffffffff80014f9e:	41 89 53 40          	mov    %edx,0x40(%r11)
        if (dev.EP0RingEnqueue >= XFER_RING_SIZE - 1) {
ffffffff80014fa2:	83 fa 1f             	cmp    $0x1f,%edx
ffffffff80014fa5:	75 49                	jne    ffffffff80014ff0 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x3a0>
                link.Control |= TRB_CYCLE_BIT;
ffffffff80014fa7:	8b 86 fc 01 00 00    	mov    0x1fc(%rsi),%eax
ffffffff80014fad:	83 c8 01             	or     $0x1,%eax
ffffffff80014fb0:	e9 fd fd ff ff       	jmp    ffffffff80014db2 <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x162>
ffffffff80014fb5:	8b 86 fc 01 00 00    	mov    0x1fc(%rsi),%eax
ffffffff80014fbb:	83 c8 01             	or     $0x1,%eax
ffffffff80014fbe:	89 86 fc 01 00 00    	mov    %eax,0x1fc(%rsi)
            dev.EP0RingCCS = !dev.EP0RingCCS;
ffffffff80014fc4:	48 8d 04 89          	lea    (%rcx,%rcx,4),%rax
ffffffff80014fc8:	41 83 f6 01          	xor    $0x1,%r14d
    }
ffffffff80014fcc:	ba 01 00 00 00       	mov    $0x1,%edx
            dev.EP0RingCCS = !dev.EP0RingCCS;
ffffffff80014fd1:	48 8d 04 41          	lea    (%rcx,%rax,2),%rax
ffffffff80014fd5:	48 8d 04 c5 00 74 14 	lea    -0x7feb8c00(,%rax,8),%rax
ffffffff80014fdc:	80 
ffffffff80014fdd:	44 88 70 44          	mov    %r14b,0x44(%rax)
            dev.EP0RingEnqueue = 0;
ffffffff80014fe1:	c7 40 40 00 00 00 00 	movl   $0x0,0x40(%rax)
    }
ffffffff80014fe8:	48 89 f0             	mov    %rsi,%rax
ffffffff80014feb:	e9 5c fd ff ff       	jmp    ffffffff80014d4c <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0xfc>
        TRB& status = dev.EP0Ring[dev.EP0RingEnqueue];
ffffffff80014ff0:	89 d0                	mov    %edx,%eax
        dev.EP0RingEnqueue++;
ffffffff80014ff2:	83 c2 01             	add    $0x1,%edx
        TRB& status = dev.EP0Ring[dev.EP0RingEnqueue];
ffffffff80014ff5:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff80014ff9:	48 01 f0             	add    %rsi,%rax
ffffffff80014ffc:	e9 de fd ff ff       	jmp    ffffffff80014ddf <_ZN7Drivers3USB4Xhci15ControlTransferEhhhtttPvb+0x18f>
ffffffff80015001:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80015008:	00 00 00 
ffffffff8001500b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80015010 <_ZN7Drivers3USB4Xhci9GetDeviceEh>:
    // -------------------------------------------------------------------------
    // GetDevice
    // -------------------------------------------------------------------------

    UsbDeviceInfo* GetDevice(uint8_t slotId) {
        if (slotId == 0 || slotId > MAX_SLOTS) {
ffffffff80015010:	8d 47 ff             	lea    -0x1(%rdi),%eax
ffffffff80015013:	3c 0f                	cmp    $0xf,%al
ffffffff80015015:	77 19                	ja     ffffffff80015030 <_ZN7Drivers3USB4Xhci9GetDeviceEh+0x20>
            return nullptr;
        }
        return &g_devices[slotId];
ffffffff80015017:	40 0f b6 ff          	movzbl %dil,%edi
ffffffff8001501b:	48 8d 04 bf          	lea    (%rdi,%rdi,4),%rax
ffffffff8001501f:	48 8d 04 47          	lea    (%rdi,%rax,2),%rax
ffffffff80015023:	48 8d 04 c5 00 74 14 	lea    -0x7feb8c00(,%rax,8),%rax
ffffffff8001502a:	80 
ffffffff8001502b:	c3                   	ret
ffffffff8001502c:	0f 1f 40 00          	nopl   0x0(%rax)
            return nullptr;
ffffffff80015030:	31 c0                	xor    %eax,%eax
    }
ffffffff80015032:	c3                   	ret
ffffffff80015033:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001503a:	00 00 00 
ffffffff8001503d:	0f 1f 00             	nopl   (%rax)

ffffffff80015040 <_ZN7Drivers3USB4Xhci13IsInitializedEv>:
    // IsInitialized
    // -------------------------------------------------------------------------

    bool IsInitialized() {
        return g_initialized;
    }
ffffffff80015040:	0f b6 05 3a 2a 13 00 	movzbl 0x132a3a(%rip),%eax        # ffffffff80147a81 <_ZN7Drivers3USB4XhciL13g_initializedE>
ffffffff80015047:	c3                   	ret
ffffffff80015048:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001504f:	00 

ffffffff80015050 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv>:
    // ProcessDeferredWork - handle hot-plug outside interrupt context
    // Called from timer tick (same pattern as E1000E::Poll)
    // -------------------------------------------------------------------------

    void ProcessDeferredWork() {
        if (!g_initialized || !g_bootScanComplete) return;
ffffffff80015050:	80 3d 2a 2a 13 00 00 	cmpb   $0x0,0x132a2a(%rip)        # ffffffff80147a81 <_ZN7Drivers3USB4XhciL13g_initializedE>
ffffffff80015057:	0f 84 4c 01 00 00    	je     ffffffff800151a9 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x159>
ffffffff8001505d:	80 3d 1c 2a 13 00 00 	cmpb   $0x0,0x132a1c(%rip)        # ffffffff80147a80 <_ZN7Drivers3USB4XhciL18g_bootScanCompleteE>
ffffffff80015064:	0f 84 3f 01 00 00    	je     ffffffff800151a9 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x159>
        if (g_hotplugProcessing) return;
ffffffff8001506a:	80 3d f7 29 13 00 00 	cmpb   $0x0,0x1329f7(%rip)        # ffffffff80147a68 <_ZN7Drivers3USB4XhciL19g_hotplugProcessingE>
ffffffff80015071:	0f 85 32 01 00 00    	jne    ffffffff800151a9 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x159>
    void ProcessDeferredWork() {
ffffffff80015077:	55                   	push   %rbp
ffffffff80015078:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001507b:	41 57                	push   %r15
        g_hotplugProcessing = true;

        for (uint32_t port = 0; port < g_maxPorts; port++) {
ffffffff8001507d:	45 31 ff             	xor    %r15d,%r15d
    void ProcessDeferredWork() {
ffffffff80015080:	41 56                	push   %r14
ffffffff80015082:	41 55                	push   %r13
ffffffff80015084:	41 54                	push   %r12
        for (uint32_t port = 0; port < g_maxPorts; port++) {
ffffffff80015086:	41 bc 01 00 00 00    	mov    $0x1,%r12d
    void ProcessDeferredWork() {
ffffffff8001508c:	53                   	push   %rbx
ffffffff8001508d:	48 c7 c3 d8 79 14 80 	mov    $0xffffffff801479d8,%rbx
ffffffff80015094:	48 83 ec 08          	sub    $0x8,%rsp
        for (uint32_t port = 0; port < g_maxPorts; port++) {
ffffffff80015098:	8b 05 9a 29 13 00    	mov    0x13299a(%rip),%eax        # ffffffff80147a38 <_ZN7Drivers3USB4XhciL10g_maxPortsE>
        g_hotplugProcessing = true;
ffffffff8001509e:	c6 05 c3 29 13 00 01 	movb   $0x1,0x1329c3(%rip)        # ffffffff80147a68 <_ZN7Drivers3USB4XhciL19g_hotplugProcessingE>
        for (uint32_t port = 0; port < g_maxPorts; port++) {
ffffffff800150a5:	85 c0                	test   %eax,%eax
ffffffff800150a7:	0f 84 80 00 00 00    	je     ffffffff8001512d <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0xdd>
            if (!g_hotplugPending[port]) continue;
ffffffff800150ad:	44 89 f8             	mov    %r15d,%eax
ffffffff800150b0:	0f b6 90 70 7a 14 80 	movzbl -0x7feb8590(%rax),%edx
ffffffff800150b7:	44 89 f8             	mov    %r15d,%eax

            if (portsc & PORTSC_CCS) {
                // Device connected — check if already assigned to a slot
                bool alreadyActive = false;
                for (uint8_t s = 1; s <= MAX_SLOTS; s++) {
                    if (g_devices[s].Active && g_devices[s].PortId == port + 1) {
ffffffff800150ba:	41 83 c7 01          	add    $0x1,%r15d
            if (!g_hotplugPending[port]) continue;
ffffffff800150be:	84 d2                	test   %dl,%dl
ffffffff800150c0:	74 5e                	je     ffffffff80015120 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0xd0>
            g_hotplugPending[port] = false;
ffffffff800150c2:	4d 89 e5             	mov    %r12,%r13
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff800150c5:	48 8b 35 84 29 13 00 	mov    0x132984(%rip),%rsi        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
            g_hotplugPending[port] = false;
ffffffff800150cc:	c6 80 70 7a 14 80 00 	movb   $0x0,-0x7feb8590(%rax)
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff800150d3:	48 c7 c0 58 74 14 80 	mov    $0xffffffff80147458,%rax
ffffffff800150da:	49 c1 e5 04          	shl    $0x4,%r13
ffffffff800150de:	49 81 c5 f0 03 00 00 	add    $0x3f0,%r13
ffffffff800150e5:	4c 01 ee             	add    %r13,%rsi
ffffffff800150e8:	8b 0e                	mov    (%rsi),%ecx
            if (portsc & PORTSC_CCS) {
ffffffff800150ea:	f6 c1 01             	test   $0x1,%cl
ffffffff800150ed:	75 59                	jne    ffffffff80015148 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0xf8>
ffffffff800150ef:	41 bd 01 00 00 00    	mov    $0x1,%r13d
ffffffff800150f5:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800150fc:	00 00 00 00 
                    UsbDevice::EnumerateDevice(port + 1, speed);
                }
            } else {
                // Device disconnected — deactivate its slot
                for (uint8_t s = 1; s <= MAX_SLOTS; s++) {
                    if (g_devices[s].Active && g_devices[s].PortId == port + 1) {
ffffffff80015100:	80 38 00             	cmpb   $0x0,(%rax)
ffffffff80015103:	74 0d                	je     ffffffff80015112 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0xc2>
ffffffff80015105:	0f b6 50 01          	movzbl 0x1(%rax),%edx
ffffffff80015109:	44 39 fa             	cmp    %r15d,%edx
ffffffff8001510c:	0f 84 98 00 00 00    	je     ffffffff800151aa <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x15a>
                for (uint8_t s = 1; s <= MAX_SLOTS; s++) {
ffffffff80015112:	49 83 c5 01          	add    $0x1,%r13
ffffffff80015116:	48 83 c0 58          	add    $0x58,%rax
ffffffff8001511a:	49 83 fd 11          	cmp    $0x11,%r13
ffffffff8001511e:	75 e0                	jne    ffffffff80015100 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0xb0>
        for (uint32_t port = 0; port < g_maxPorts; port++) {
ffffffff80015120:	49 83 c4 01          	add    $0x1,%r12
ffffffff80015124:	44 3b 3d 0d 29 13 00 	cmp    0x13290d(%rip),%r15d        # ffffffff80147a38 <_ZN7Drivers3USB4XhciL10g_maxPortsE>
ffffffff8001512b:	72 80                	jb     ffffffff800150ad <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x5d>
                    }
                }
            }
        }

        g_hotplugProcessing = false;
ffffffff8001512d:	c6 05 34 29 13 00 00 	movb   $0x0,0x132934(%rip)        # ffffffff80147a68 <_ZN7Drivers3USB4XhciL19g_hotplugProcessingE>
    }
ffffffff80015134:	48 83 c4 08          	add    $0x8,%rsp
ffffffff80015138:	5b                   	pop    %rbx
ffffffff80015139:	41 5c                	pop    %r12
ffffffff8001513b:	41 5d                	pop    %r13
ffffffff8001513d:	41 5e                	pop    %r14
ffffffff8001513f:	41 5f                	pop    %r15
ffffffff80015141:	5d                   	pop    %rbp
ffffffff80015142:	c3                   	ret
ffffffff80015143:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
                    if (g_devices[s].Active && g_devices[s].PortId == port + 1) {
ffffffff80015148:	80 38 00             	cmpb   $0x0,(%rax)
ffffffff8001514b:	74 09                	je     ffffffff80015156 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x106>
ffffffff8001514d:	0f b6 50 01          	movzbl 0x1(%rax),%edx
ffffffff80015151:	44 39 fa             	cmp    %r15d,%edx
ffffffff80015154:	74 ca                	je     ffffffff80015120 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0xd0>
                for (uint8_t s = 1; s <= MAX_SLOTS; s++) {
ffffffff80015156:	48 83 c0 58          	add    $0x58,%rax
ffffffff8001515a:	48 39 c3             	cmp    %rax,%rbx
ffffffff8001515d:	75 e9                	jne    ffffffff80015148 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0xf8>
                if (portsc & PORTSC_PED) {
ffffffff8001515f:	f6 c1 02             	test   $0x2,%cl
ffffffff80015162:	0f 84 0f 01 00 00    	je     ffffffff80015277 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x227>
                    uint32_t speed = (portsc >> 10) & 0xF;
ffffffff80015168:	c1 e9 0a             	shr    $0xa,%ecx
ffffffff8001516b:	83 e1 0f             	and    $0xf,%ecx
ffffffff8001516e:	41 89 cd             	mov    %ecx,%r13d
    asm volatile("pushfq; pop %0" : "=r"(flags));
ffffffff80015171:	9c                   	pushf
ffffffff80015172:	5a                   	pop    %rdx
    if (flags & (1 << 9)) {
ffffffff80015173:	b8 10 27 00 00       	mov    $0x2710,%eax
ffffffff80015178:	80 e6 02             	and    $0x2,%dh
ffffffff8001517b:	0f 85 d2 01 00 00    	jne    ffffffff80015353 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x303>
            asm volatile("outb %%al, $0x80" ::: "memory");
ffffffff80015181:	e6 80                	out    %al,$0x80
ffffffff80015183:	e6 80                	out    %al,$0x80
        for (uint64_t i = 0; i < ms * 1000; i++) {
ffffffff80015185:	48 83 e8 02          	sub    $0x2,%rax
ffffffff80015189:	75 f6                	jne    ffffffff80015181 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x131>
                    UsbDevice::EnumerateDevice(port + 1, speed);
ffffffff8001518b:	44 89 ee             	mov    %r13d,%esi
ffffffff8001518e:	44 89 ff             	mov    %r15d,%edi
ffffffff80015191:	e8 3a de ff ff       	call   ffffffff80012fd0 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj>
        for (uint32_t port = 0; port < g_maxPorts; port++) {
ffffffff80015196:	49 83 c4 01          	add    $0x1,%r12
ffffffff8001519a:	44 3b 3d 97 28 13 00 	cmp    0x132897(%rip),%r15d        # ffffffff80147a38 <_ZN7Drivers3USB4XhciL10g_maxPortsE>
ffffffff800151a1:	0f 82 06 ff ff ff    	jb     ffffffff800150ad <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x5d>
ffffffff800151a7:	eb 84                	jmp    ffffffff8001512d <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0xdd>
ffffffff800151a9:	c3                   	ret
                        g_devices[s].Active = false;
ffffffff800151aa:	49 63 c5             	movslq %r13d,%rax
            Print(string);
ffffffff800151ad:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff800151b4:	83 05 e9 a2 1c 00 01 	addl   $0x1,0x1ca2e9(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800151bb:	48 8d 14 80          	lea    (%rax,%rax,4),%rdx
ffffffff800151bf:	48 8d 04 50          	lea    (%rax,%rdx,2),%rax
ffffffff800151c3:	c6 04 c5 00 74 14 80 	movb   $0x0,-0x7feb8c00(,%rax,8)
ffffffff800151ca:	00 
            Print(string);
ffffffff800151cb:	e8 f0 df 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800151d0:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800151d7:	e8 e4 df 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800151dc:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800151e3:	e8 d8 df 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800151e8:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff800151ef:	e8 cc df 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800151f4:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800151fb:	e8 c0 df 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015200:	48 c7 c7 36 b4 02 80 	mov    $0xffffffff8002b436,%rdi
ffffffff80015207:	e8 b4 df 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001520c:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80015211:	4c 89 ef             	mov    %r13,%rdi
ffffffff80015214:	e8 77 52 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80015219:	48 89 c7             	mov    %rax,%rdi
ffffffff8001521c:	e8 9f df 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80015221:	48 c7 c7 48 b4 02 80 	mov    $0xffffffff8002b448,%rdi
ffffffff80015228:	e8 93 df 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001522d:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80015232:	4c 89 e7             	mov    %r12,%rdi
        for (uint32_t port = 0; port < g_maxPorts; port++) {
ffffffff80015235:	49 83 c4 01          	add    $0x1,%r12
ffffffff80015239:	e8 52 52 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001523e:	48 89 c7             	mov    %rax,%rdi
ffffffff80015241:	e8 7a df 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80015246:	48 c7 c7 50 b4 02 80 	mov    $0xffffffff8002b450,%rdi
ffffffff8001524d:	e8 6e df 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015252:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80015259:	e8 62 df 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001525e:	83 2d 3f a2 1c 00 01 	subl   $0x1,0x1ca23f(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80015265:	44 3b 3d cc 27 13 00 	cmp    0x1327cc(%rip),%r15d        # ffffffff80147a38 <_ZN7Drivers3USB4XhciL10g_maxPortsE>
ffffffff8001526c:	0f 82 3b fe ff ff    	jb     ffffffff800150ad <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x5d>
ffffffff80015272:	e9 b6 fe ff ff       	jmp    ffffffff8001512d <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0xdd>
                            (portsc & PORTSC_PRESERVE) | PORTSC_PR | PORTSC_CHANGE_BITS);
ffffffff80015277:	89 c8                	mov    %ecx,%eax
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff80015279:	41 be a0 86 01 00    	mov    $0x186a0,%r14d
                            (portsc & PORTSC_PRESERVE) | PORTSC_PR | PORTSC_CHANGE_BITS);
ffffffff8001527f:	25 00 02 00 00       	and    $0x200,%eax
                    WriteOp(OP_PORTSC_BASE + port * OP_PORTSC_STRIDE,
ffffffff80015284:	0d 10 00 fe 00       	or     $0xfe0010,%eax
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff80015289:	89 06                	mov    %eax,(%rsi)
                    for (uint32_t i = 0; i < 100000; i++) {
ffffffff8001528b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
                        PollEvents();
ffffffff80015290:	e8 bb f4 ff ff       	call   ffffffff80014750 <_ZN7Drivers3USB4Xhci10PollEventsEv>
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff80015295:	48 8b 05 b4 27 13 00 	mov    0x1327b4(%rip),%rax        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
ffffffff8001529c:	4c 01 e8             	add    %r13,%rax
ffffffff8001529f:	8b 10                	mov    (%rax),%edx
                        if (ps & PORTSC_PRC) {
ffffffff800152a1:	81 e2 00 00 20 00    	and    $0x200000,%edx
ffffffff800152a7:	0f 85 c5 00 00 00    	jne    ffffffff80015372 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x322>
ffffffff800152ad:	b8 64 00 00 00       	mov    $0x64,%eax
ffffffff800152b2:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800152b9:	00 00 00 00 
ffffffff800152bd:	0f 1f 00             	nopl   (%rax)
                        for (int j = 0; j < 100; j++) {
ffffffff800152c0:	83 e8 02             	sub    $0x2,%eax
ffffffff800152c3:	75 fb                	jne    ffffffff800152c0 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x270>
                    for (uint32_t i = 0; i < 100000; i++) {
ffffffff800152c5:	41 83 ee 01          	sub    $0x1,%r14d
ffffffff800152c9:	75 c5                	jne    ffffffff80015290 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x240>
            Print(string);
ffffffff800152cb:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff800152d2:	83 05 cb a1 1c 00 01 	addl   $0x1,0x1ca1cb(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800152d9:	e8 e2 de 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800152de:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800152e5:	e8 d6 de 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800152ea:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800152f1:	e8 ca de 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800152f6:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff800152fd:	e8 be de 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015302:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80015309:	e8 b2 de 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001530e:	48 c7 c7 5e b4 02 80 	mov    $0xffffffff8002b45e,%rdi
ffffffff80015315:	e8 a6 de 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001531a:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001531f:	4c 89 e7             	mov    %r12,%rdi
ffffffff80015322:	e8 69 51 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80015327:	48 89 c7             	mov    %rax,%rdi
ffffffff8001532a:	e8 91 de 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001532f:	48 c7 c7 6e b4 02 80 	mov    $0xffffffff8002b46e,%rdi
ffffffff80015336:	e8 85 de 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001533b:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80015342:	e8 79 de 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80015347:	83 2d 56 a1 1c 00 01 	subl   $0x1,0x1ca156(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
                        continue;
ffffffff8001534e:	e9 cd fd ff ff       	jmp    ffffffff80015120 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0xd0>
        uint64_t start = Timekeeping::GetMilliseconds();
ffffffff80015353:	e8 b8 e2 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff80015358:	49 89 c6             	mov    %rax,%r14
        while (Timekeeping::GetMilliseconds() - start < ms) {
ffffffff8001535b:	eb 02                	jmp    ffffffff8001535f <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x30f>
            asm volatile("pause" ::: "memory");
ffffffff8001535d:	f3 90                	pause
        while (Timekeeping::GetMilliseconds() - start < ms) {
ffffffff8001535f:	e8 ac e2 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff80015364:	4c 29 f0             	sub    %r14,%rax
ffffffff80015367:	48 83 f8 09          	cmp    $0x9,%rax
ffffffff8001536b:	76 f0                	jbe    ffffffff8001535d <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x30d>
ffffffff8001536d:	e9 19 fe ff ff       	jmp    ffffffff8001518b <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x13b>
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff80015372:	8b 10                	mov    (%rax),%edx
                    uint32_t speed = (portsc >> 10) & 0xF;
ffffffff80015374:	41 89 d5             	mov    %edx,%r13d
                            (portsc & PORTSC_PRESERVE) | PORTSC_CHANGE_BITS);
ffffffff80015377:	81 e2 00 02 00 00    	and    $0x200,%edx
                    uint32_t speed = (portsc >> 10) & 0xF;
ffffffff8001537d:	41 c1 ed 0a          	shr    $0xa,%r13d
                    WriteOp(OP_PORTSC_BASE + port * OP_PORTSC_STRIDE,
ffffffff80015381:	81 ca 00 00 fe 00    	or     $0xfe0000,%edx
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff80015387:	89 10                	mov    %edx,(%rax)
                    uint32_t speed = (portsc >> 10) & 0xF;
ffffffff80015389:	41 83 e5 0f          	and    $0xf,%r13d
    asm volatile("pushfq; pop %0" : "=r"(flags));
ffffffff8001538d:	9c                   	pushf
ffffffff8001538e:	58                   	pop    %rax
    if (flags & (1 << 9)) {
ffffffff8001538f:	f6 c4 02             	test   $0x2,%ah
ffffffff80015392:	75 1f                	jne    ffffffff800153b3 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x363>
ffffffff80015394:	b8 10 27 00 00       	mov    $0x2710,%eax
            asm volatile("outb %%al, $0x80" ::: "memory");
ffffffff80015399:	e6 80                	out    %al,$0x80
ffffffff8001539b:	e6 80                	out    %al,$0x80
        for (uint64_t i = 0; i < ms * 1000; i++) {
ffffffff8001539d:	48 83 e8 02          	sub    $0x2,%rax
ffffffff800153a1:	75 f6                	jne    ffffffff80015399 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x349>
                    UsbDevice::EnumerateDevice(port + 1, speed);
ffffffff800153a3:	44 89 ee             	mov    %r13d,%esi
ffffffff800153a6:	44 89 ff             	mov    %r15d,%edi
ffffffff800153a9:	e8 22 dc ff ff       	call   ffffffff80012fd0 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj>
ffffffff800153ae:	e9 e3 fd ff ff       	jmp    ffffffff80015196 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x146>
        uint64_t start = Timekeeping::GetMilliseconds();
ffffffff800153b3:	e8 58 e2 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff800153b8:	49 89 c6             	mov    %rax,%r14
        while (Timekeeping::GetMilliseconds() - start < ms) {
ffffffff800153bb:	eb 02                	jmp    ffffffff800153bf <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x36f>
            asm volatile("pause" ::: "memory");
ffffffff800153bd:	f3 90                	pause
        while (Timekeeping::GetMilliseconds() - start < ms) {
ffffffff800153bf:	e8 4c e2 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff800153c4:	4c 29 f0             	sub    %r14,%rax
ffffffff800153c7:	48 83 f8 09          	cmp    $0x9,%rax
ffffffff800153cb:	76 f0                	jbe    ffffffff800153bd <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x36d>
ffffffff800153cd:	e9 b9 fd ff ff       	jmp    ffffffff8001518b <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv+0x13b>
ffffffff800153d2:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800153d9:	00 00 00 
ffffffff800153dc:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800153e3:	00 00 00 
ffffffff800153e6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800153ed:	00 00 00 
ffffffff800153f0:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800153f7:	00 00 00 
ffffffff800153fa:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)

ffffffff80015400 <_ZN7Drivers3USB4Xhci10InitializeEv>:

    // -------------------------------------------------------------------------
    // Initialize
    // -------------------------------------------------------------------------

    void Initialize() {
ffffffff80015400:	55                   	push   %rbp
            Print(string);
ffffffff80015401:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
ffffffff80015408:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001540b:	41 57                	push   %r15
ffffffff8001540d:	41 56                	push   %r14
ffffffff8001540f:	41 55                	push   %r13
ffffffff80015411:	41 54                	push   %r12
ffffffff80015413:	45 31 e4             	xor    %r12d,%r12d
ffffffff80015416:	53                   	push   %rbx
ffffffff80015417:	48 83 ec 18          	sub    $0x18,%rsp
            g_kernelLogDepth++;
ffffffff8001541b:	83 05 82 a0 1c 00 01 	addl   $0x1,0x1ca082(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80015422:	e8 99 dd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015427:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001542e:	e8 8d dd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015433:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001543a:	e8 81 dd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001543f:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff80015446:	e8 75 dd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001544b:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80015452:	e8 69 dd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015457:	48 c7 c7 98 cb 02 80 	mov    $0xffffffff8002cb98,%rdi
ffffffff8001545e:	e8 5d dd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015463:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001546a:	e8 51 dd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001546f:	83 2d 2e a0 1c 00 01 	subl   $0x1,0x1ca02e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        KernelLogStream(INFO, "xHCI") << "Scanning for xHCI controller...";

        // -----------------------------------------------------------------
        // Step 1: Find xHCI controller on PCI bus
        // -----------------------------------------------------------------
        auto& devices = Pci::GetDevices();
ffffffff80015476:	e8 75 ad 00 00       	call   ffffffff800201f0 <_ZN3Pci10GetDevicesEv>
        const Pci::PciDevice* foundDev = nullptr;

        for (uint64_t i = 0; i < devices.size(); i++) {
ffffffff8001547b:	48 83 78 08 00       	cmpq   $0x0,0x8(%rax)
ffffffff80015480:	48 89 c3             	mov    %rax,%rbx
ffffffff80015483:	75 19                	jne    ffffffff8001549e <_ZN7Drivers3USB4Xhci10InitializeEv+0x9e>
ffffffff80015485:	e9 38 10 00 00       	jmp    ffffffff800164c2 <_ZN7Drivers3USB4Xhci10InitializeEv+0x10c2>
ffffffff8001548a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff80015490:	49 83 c4 01          	add    $0x1,%r12
ffffffff80015494:	4c 3b 63 08          	cmp    0x8(%rbx),%r12
ffffffff80015498:	0f 83 24 10 00 00    	jae    ffffffff800164c2 <_ZN7Drivers3USB4Xhci10InitializeEv+0x10c2>
            if (position > (capacity - 1)) {
ffffffff8001549e:	48 8b 43 10          	mov    0x10(%rbx),%rax
ffffffff800154a2:	48 83 e8 01          	sub    $0x1,%rax
ffffffff800154a6:	4c 39 e0             	cmp    %r12,%rax
ffffffff800154a9:	0f 83 e5 0f 00 00    	jae    ffffffff80016494 <_ZN7Drivers3USB4Xhci10InitializeEv+0x1094>
            Print(string);
ffffffff800154af:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff800154b6:	e8 05 dd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800154bb:	48 c7 c7 44 a4 02 80 	mov    $0xffffffff8002a444,%rdi
ffffffff800154c2:	e8 f9 dc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800154c7:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff800154ce:	e8 ed dc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800154d3:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff800154da:	e8 e1 dc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800154df:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800154e6:	e8 d5 dc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800154eb:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff800154f2:	e8 c9 dc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                return array[position];
ffffffff800154f7:	48 8b 03             	mov    (%rbx),%rax
            if (devices[i].ClassCode == PCI_CLASS_SERIAL &&
                devices[i].SubClass == PCI_SUBCLASS_USB &&
ffffffff800154fa:	80 78 0a 0c          	cmpb   $0xc,0xa(%rax)
ffffffff800154fe:	75 90                	jne    ffffffff80015490 <_ZN7Drivers3USB4Xhci10InitializeEv+0x90>
            if (position > (capacity - 1)) {
ffffffff80015500:	48 8b 73 10          	mov    0x10(%rbx),%rsi
ffffffff80015504:	48 8d 56 ff          	lea    -0x1(%rsi),%rdx
ffffffff80015508:	4c 39 e2             	cmp    %r12,%rdx
ffffffff8001550b:	0f 83 98 0f 00 00    	jae    ffffffff800164a9 <_ZN7Drivers3USB4Xhci10InitializeEv+0x10a9>
ffffffff80015511:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff80015518:	e8 a3 dc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001551d:	48 c7 c7 44 a4 02 80 	mov    $0xffffffff8002a444,%rdi
ffffffff80015524:	e8 97 dc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015529:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff80015530:	e8 8b dc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015535:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8001553c:	e8 7f dc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015541:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80015548:	e8 73 dc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001554d:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff80015554:	e8 67 dc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                return array[position];
ffffffff80015559:	48 8b 03             	mov    (%rbx),%rax
            if (devices[i].ClassCode == PCI_CLASS_SERIAL &&
ffffffff8001555c:	80 78 0b 03          	cmpb   $0x3,0xb(%rax)
ffffffff80015560:	0f 85 2a ff ff ff    	jne    ffffffff80015490 <_ZN7Drivers3USB4Xhci10InitializeEv+0x90>
            if (position > (capacity - 1)) {
ffffffff80015566:	48 8b 73 10          	mov    0x10(%rbx),%rsi
ffffffff8001556a:	48 8d 56 ff          	lea    -0x1(%rsi),%rdx
ffffffff8001556e:	4c 39 e2             	cmp    %r12,%rdx
ffffffff80015571:	0f 83 c4 0f 00 00    	jae    ffffffff8001653b <_ZN7Drivers3USB4Xhci10InitializeEv+0x113b>
ffffffff80015577:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8001557e:	e8 3d dc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015583:	48 c7 c7 44 a4 02 80 	mov    $0xffffffff8002a444,%rdi
ffffffff8001558a:	e8 31 dc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001558f:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff80015596:	e8 25 dc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001559b:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff800155a2:	e8 19 dc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800155a7:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800155ae:	e8 0d dc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800155b3:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff800155ba:	e8 01 dc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                return array[position];
ffffffff800155bf:	48 8b 03             	mov    (%rbx),%rax
ffffffff800155c2:	48 89 c2             	mov    %rax,%rdx
                devices[i].SubClass == PCI_SUBCLASS_USB &&
ffffffff800155c5:	80 7a 0c 30          	cmpb   $0x30,0xc(%rdx)
ffffffff800155c9:	0f 85 c1 fe ff ff    	jne    ffffffff80015490 <_ZN7Drivers3USB4Xhci10InitializeEv+0x90>
            if (position > (capacity - 1)) {
ffffffff800155cf:	48 8b 73 10          	mov    0x10(%rbx),%rsi
ffffffff800155d3:	48 8d 56 ff          	lea    -0x1(%rsi),%rdx
ffffffff800155d7:	4c 39 e2             	cmp    %r12,%rdx
ffffffff800155da:	0f 83 f6 12 00 00    	jae    ffffffff800168d6 <_ZN7Drivers3USB4Xhci10InitializeEv+0x14d6>
ffffffff800155e0:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff800155e7:	e8 d4 db 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800155ec:	48 c7 c7 44 a4 02 80 	mov    $0xffffffff8002a444,%rdi
ffffffff800155f3:	e8 c8 db 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800155f8:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff800155ff:	e8 bc db 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015604:	48 c7 c7 3c a4 02 80 	mov    $0xffffffff8002a43c,%rdi
ffffffff8001560b:	e8 b0 db 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015610:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80015617:	e8 a4 db 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001561c:	48 c7 c7 86 a6 02 80 	mov    $0xffffffff8002a686,%rdi
ffffffff80015623:	e8 98 db 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                return array[position];
ffffffff80015628:	48 8b 1b             	mov    (%rbx),%rbx
            g_kernelLogDepth++;
ffffffff8001562b:	8b 05 73 9e 1c 00    	mov    0x1c9e73(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80015631:	83 c0 01             	add    $0x1,%eax
                foundDev = &devices[i];
                break;
            }
        }

        if (foundDev == nullptr) {
ffffffff80015634:	48 85 db             	test   %rbx,%rbx
ffffffff80015637:	0f 84 85 0e 00 00    	je     ffffffff800164c2 <_ZN7Drivers3USB4Xhci10InitializeEv+0x10c2>
            Print(string);
ffffffff8001563d:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff80015644:	89 05 5a 9e 1c 00    	mov    %eax,0x1c9e5a(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001564a:	e8 71 db 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001564f:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80015656:	e8 65 db 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001565b:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80015662:	e8 59 db 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015667:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001566e:	e8 4d db 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015673:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001567a:	e8 41 db 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001567f:	48 c7 c7 96 b4 02 80 	mov    $0xffffffff8002b496,%rdi
ffffffff80015686:	e8 35 db 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            KernelLogStream(WARNING, "xHCI") << "No xHCI controller found";
            return;
        }

        KernelLogStream(OK, "xHCI") << "Found controller at PCI "
            << base::hex << (uint64_t)foundDev->Bus << ":"
ffffffff8001568b:	0f b6 7b 02          	movzbl 0x2(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001568f:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80015694:	e8 f7 4d 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80015699:	48 89 c7             	mov    %rax,%rdi
ffffffff8001569c:	e8 1f db 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800156a1:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff800156a8:	e8 13 db 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (uint64_t)foundDev->Device << "." << (uint64_t)foundDev->Function;
ffffffff800156ad:	0f b6 7b 03          	movzbl 0x3(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800156b1:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff800156b6:	e8 d5 4d 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800156bb:	48 89 c7             	mov    %rax,%rdi
ffffffff800156be:	e8 fd da 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800156c3:	48 c7 c7 57 ae 02 80 	mov    $0xffffffff8002ae57,%rdi
ffffffff800156ca:	e8 f1 da 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800156cf:	0f b6 7b 04          	movzbl 0x4(%rbx),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800156d3:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff800156d8:	e8 b3 4d 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800156dd:	48 89 c7             	mov    %rax,%rdi
ffffffff800156e0:	e8 db da 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800156e5:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800156ec:	e8 cf da 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff800156f1:	83 2d ac 9d 1c 00 01 	subl   $0x1,0x1c9dac(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

        // -----------------------------------------------------------------
        // Step 2: Read BAR0 and map MMIO region
        // -----------------------------------------------------------------
        uint32_t bar0 = Pci::LegacyRead32(foundDev->Bus, foundDev->Device, foundDev->Function, PCI_REG_BAR0);
ffffffff800156f8:	0f b6 53 04          	movzbl 0x4(%rbx),%edx
ffffffff800156fc:	b9 10 00 00 00       	mov    $0x10,%ecx
ffffffff80015701:	0f b6 73 03          	movzbl 0x3(%rbx),%esi
ffffffff80015705:	0f b6 7b 02          	movzbl 0x2(%rbx),%edi
ffffffff80015709:	e8 f2 a3 00 00       	call   ffffffff8001fb00 <_ZN3Pci12LegacyRead32Ehhhh>
        uint64_t mmioPhys = bar0 & 0xFFFFFFF0;
ffffffff8001570e:	41 89 c5             	mov    %eax,%r13d

        // Check if 64-bit BAR (type field bits 2:1 == 0b10)
        if ((bar0 & 0x06) == 0x04) {
ffffffff80015711:	83 e0 06             	and    $0x6,%eax
        uint64_t mmioPhys = bar0 & 0xFFFFFFF0;
ffffffff80015714:	41 83 e5 f0          	and    $0xfffffff0,%r13d
        if ((bar0 & 0x06) == 0x04) {
ffffffff80015718:	83 f8 04             	cmp    $0x4,%eax
ffffffff8001571b:	0f 84 93 11 00 00    	je     ffffffff800168b4 <_ZN7Drivers3USB4Xhci10InitializeEv+0x14b4>
            Print(string);
ffffffff80015721:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff80015728:	83 05 75 9d 1c 00 01 	addl   $0x1,0x1c9d75(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001572f:	4d 8d b5 00 00 01 00 	lea    0x10000(%r13),%r14
            g_kernelLogDepth--;
ffffffff80015736:	4d 89 ec             	mov    %r13,%r12
            Print(string);
ffffffff80015739:	e8 82 da 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001573e:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80015745:	e8 76 da 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001574a:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80015751:	e8 6a da 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015756:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8001575d:	e8 5e da 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015762:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80015769:	e8 52 da 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001576e:	48 c7 c7 a6 a6 02 80 	mov    $0xffffffff8002a6a6,%rdi
ffffffff80015775:	e8 46 da 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001577a:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8001577f:	4c 89 ef             	mov    %r13,%rdi
ffffffff80015782:	e8 09 4d 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80015787:	48 89 c7             	mov    %rax,%rdi
ffffffff8001578a:	e8 31 da 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001578f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80015796:	e8 25 da 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001579b:	83 2d 02 9d 1c 00 01 	subl   $0x1,0x1c9d02(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        return HHDMBase + address;
ffffffff800157a2:	48 8b 15 ff 71 13 00 	mov    0x1371ff(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        KernelLogStream(INFO, "xHCI") << "BAR0 physical: " << base::hex << mmioPhys;

        // Map 64KB (16 pages) of MMIO space
        constexpr uint64_t MmioSize = 0x10000;
        for (uint64_t offset = 0; offset < MmioSize; offset += 0x1000) {
            Memory::VMM::g_paging->MapMMIO(mmioPhys + offset, Memory::HHDM(mmioPhys + offset));
ffffffff800157a9:	48 8b 3d 10 72 13 00 	mov    0x137210(%rip),%rdi        # ffffffff8014c9c0 <_ZN6Memory3VMM8g_pagingE>
ffffffff800157b0:	4c 89 e6             	mov    %r12,%rsi
ffffffff800157b3:	4c 01 e2             	add    %r12,%rdx
        for (uint64_t offset = 0; offset < MmioSize; offset += 0x1000) {
ffffffff800157b6:	49 81 c4 00 10 00 00 	add    $0x1000,%r12
            Memory::VMM::g_paging->MapMMIO(mmioPhys + offset, Memory::HHDM(mmioPhys + offset));
ffffffff800157bd:	e8 fe 60 00 00       	call   ffffffff8001b8c0 <_ZN6Memory3VMM6Paging7MapMMIOEmm>
        for (uint64_t offset = 0; offset < MmioSize; offset += 0x1000) {
ffffffff800157c2:	4d 39 f4             	cmp    %r14,%r12
ffffffff800157c5:	75 db                	jne    ffffffff800157a2 <_ZN7Drivers3USB4Xhci10InitializeEv+0x3a2>
        g_mmioBase = (volatile uint8_t*)Memory::HHDM(mmioPhys);

        // -----------------------------------------------------------------
        // Step 3: Enable PCI bus master and memory space
        // -----------------------------------------------------------------
        uint16_t pciCmd = Pci::LegacyRead16(foundDev->Bus, foundDev->Device, foundDev->Function, PCI_REG_COMMAND);
ffffffff800157c7:	0f b6 53 04          	movzbl 0x4(%rbx),%edx
ffffffff800157cb:	0f b6 73 03          	movzbl 0x3(%rbx),%esi
ffffffff800157cf:	b9 04 00 00 00       	mov    $0x4,%ecx
ffffffff800157d4:	0f b6 7b 02          	movzbl 0x2(%rbx),%edi
ffffffff800157d8:	4c 03 2d c9 71 13 00 	add    0x1371c9(%rip),%r13        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        g_mmioBase = (volatile uint8_t*)Memory::HHDM(mmioPhys);
ffffffff800157df:	4c 89 2d 7a 22 13 00 	mov    %r13,0x13227a(%rip)        # ffffffff80147a60 <_ZN7Drivers3USB4XhciL10g_mmioBaseE>
        uint16_t pciCmd = Pci::LegacyRead16(foundDev->Bus, foundDev->Device, foundDev->Function, PCI_REG_COMMAND);
ffffffff800157e6:	e8 55 a3 00 00       	call   ffffffff8001fb40 <_ZN3Pci12LegacyRead16Ehhhh>
        pciCmd |= PCI_CMD_BUS_MASTER | PCI_CMD_MEM_SPACE;
        Pci::LegacyWrite16(foundDev->Bus, foundDev->Device, foundDev->Function, PCI_REG_COMMAND, pciCmd);
ffffffff800157eb:	0f b6 73 03          	movzbl 0x3(%rbx),%esi
ffffffff800157ef:	0f b6 53 04          	movzbl 0x4(%rbx),%edx
ffffffff800157f3:	b9 04 00 00 00       	mov    $0x4,%ecx
        pciCmd |= PCI_CMD_BUS_MASTER | PCI_CMD_MEM_SPACE;
ffffffff800157f8:	83 c8 06             	or     $0x6,%eax
        Pci::LegacyWrite16(foundDev->Bus, foundDev->Device, foundDev->Function, PCI_REG_COMMAND, pciCmd);
ffffffff800157fb:	0f b6 7b 02          	movzbl 0x2(%rbx),%edi
        pciCmd |= PCI_CMD_BUS_MASTER | PCI_CMD_MEM_SPACE;
ffffffff800157ff:	44 0f b7 c0          	movzwl %ax,%r8d
        Pci::LegacyWrite16(foundDev->Bus, foundDev->Device, foundDev->Function, PCI_REG_COMMAND, pciCmd);
ffffffff80015803:	e8 18 a4 00 00       	call   ffffffff8001fc20 <_ZN3Pci13LegacyWrite16Ehhhht>
            Print(string);
ffffffff80015808:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff8001580f:	83 05 8e 9c 1c 00 01 	addl   $0x1,0x1c9c8e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80015816:	e8 a5 d9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001581b:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80015822:	e8 99 d9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015827:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001582e:	e8 8d d9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015833:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001583a:	e8 81 d9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001583f:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80015846:	e8 75 d9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001584b:	48 c7 c7 19 ad 02 80 	mov    $0xffffffff8002ad19,%rdi
ffffffff80015852:	e8 69 d9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015857:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001585e:	e8 5d d9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80015863:	8b 05 3b 9c 1c 00    	mov    0x1c9c3b(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80015869:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth--;
ffffffff80015870:	8d 50 ff             	lea    -0x1(%rax),%edx
ffffffff80015873:	89 15 2b 9c 1c 00    	mov    %edx,0x1c9c2b(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        KernelLogStream(OK, "xHCI") << "Bus mastering enabled";

        // -----------------------------------------------------------------
        // Step 4: Parse capability registers
        // -----------------------------------------------------------------
        g_capLength = *(volatile uint8_t*)(g_mmioBase + CAP_CAPLENGTH);
ffffffff80015879:	48 8b 15 e0 21 13 00 	mov    0x1321e0(%rip),%rdx        # ffffffff80147a60 <_ZN7Drivers3USB4XhciL10g_mmioBaseE>
ffffffff80015880:	0f b6 0a             	movzbl (%rdx),%ecx

        uint32_t hciVersion = *(volatile uint16_t*)(g_mmioBase + CAP_HCIVERSION);
ffffffff80015883:	44 0f b7 62 02       	movzwl 0x2(%rdx),%r12d
            g_kernelLogDepth++;
ffffffff80015888:	89 05 16 9c 1c 00    	mov    %eax,0x1c9c16(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        g_capLength = *(volatile uint8_t*)(g_mmioBase + CAP_CAPLENGTH);
ffffffff8001588e:	88 0d c4 21 13 00    	mov    %cl,0x1321c4(%rip)        # ffffffff80147a58 <_ZN7Drivers3USB4XhciL11g_capLengthE>
            Print(string);
ffffffff80015894:	e8 27 d9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015899:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800158a0:	e8 1b d9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800158a5:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800158ac:	e8 0f d9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800158b1:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff800158b8:	e8 03 d9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800158bd:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800158c4:	e8 f7 d8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800158c9:	48 c7 c7 af b4 02 80 	mov    $0xffffffff8002b4af,%rdi
ffffffff800158d0:	e8 eb d8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800158d5:	be 10 00 00 00       	mov    $0x10,%esi
        KernelLogStream(INFO, "xHCI") << "Version: " << base::hex << (uint64_t)hciVersion
ffffffff800158da:	41 0f b7 fc          	movzwl %r12w,%edi
ffffffff800158de:	e8 ad 4b 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800158e3:	48 89 c7             	mov    %rax,%rdi
ffffffff800158e6:	e8 d5 d8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800158eb:	48 c7 c7 b9 b4 02 80 	mov    $0xffffffff8002b4b9,%rdi
ffffffff800158f2:	e8 c9 d8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << ", CapLength: " << (uint64_t)g_capLength;
ffffffff800158f7:	0f b6 3d 5a 21 13 00 	movzbl 0x13215a(%rip),%edi        # ffffffff80147a58 <_ZN7Drivers3USB4XhciL11g_capLengthE>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800158fe:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80015903:	e8 88 4b 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80015908:	48 89 c7             	mov    %rax,%rdi
ffffffff8001590b:	e8 b0 d8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80015910:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80015917:	e8 a4 d8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8001591c:	48 8b 05 3d 21 13 00 	mov    0x13213d(%rip),%rax        # ffffffff80147a60 <_ZN7Drivers3USB4XhciL10g_mmioBaseE>
        uint32_t maxScratchpadBufs = (scratchpadBufsHi << 5) | scratchpadBufsLo;

        uint32_t dbOff = ReadCap(CAP_DBOFF) & ~0x3u;
        uint32_t rtsOff = ReadCap(CAP_RTSOFF) & ~0x1Fu;

        g_opBase = g_mmioBase + g_capLength;
ffffffff80015923:	0f b6 35 2e 21 13 00 	movzbl 0x13212e(%rip),%esi        # ffffffff80147a58 <_ZN7Drivers3USB4XhciL11g_capLengthE>
ffffffff8001592a:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff80015931:	8b 50 04             	mov    0x4(%rax),%edx
        g_opBase = g_mmioBase + g_capLength;
ffffffff80015934:	48 01 c6             	add    %rax,%rsi
ffffffff80015937:	48 89 35 12 21 13 00 	mov    %rsi,0x132112(%rip)        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
        g_maxSlots = hcsParams1 & 0xFF;
ffffffff8001593e:	0f b6 ca             	movzbl %dl,%ecx
        g_maxPorts = (hcsParams1 >> 24) & 0xFF;
ffffffff80015941:	c1 ea 18             	shr    $0x18,%edx
ffffffff80015944:	89 15 ee 20 13 00    	mov    %edx,0x1320ee(%rip)        # ffffffff80147a38 <_ZN7Drivers3USB4XhciL10g_maxPortsE>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8001594a:	8b 50 08             	mov    0x8(%rax),%edx
        g_maxSlots = hcsParams1 & 0xFF;
ffffffff8001594d:	89 0d e9 20 13 00    	mov    %ecx,0x1320e9(%rip)        # ffffffff80147a3c <_ZN7Drivers3USB4XhciL10g_maxSlotsE>
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff80015953:	8b 48 14             	mov    0x14(%rax),%ecx
        uint32_t maxScratchpadBufs = (scratchpadBufsHi << 5) | scratchpadBufsLo;
ffffffff80015956:	41 89 d4             	mov    %edx,%r12d
        uint32_t scratchpadBufsLo = (hcsParams2 >> 27) & 0x1F;
ffffffff80015959:	c1 ea 1b             	shr    $0x1b,%edx
        uint32_t maxScratchpadBufs = (scratchpadBufsHi << 5) | scratchpadBufsLo;
ffffffff8001595c:	41 c1 ec 10          	shr    $0x10,%r12d
ffffffff80015960:	41 81 e4 e0 03 00 00 	and    $0x3e0,%r12d
ffffffff80015967:	41 09 d4             	or     %edx,%r12d
        return *(volatile uint32_t*)(g_mmioBase + reg);
ffffffff8001596a:	8b 50 18             	mov    0x18(%rax),%edx
        g_rtBase = g_mmioBase + rtsOff;
        g_dbBase = g_mmioBase + dbOff;

        KernelLogStream(INFO, "xHCI") << "MaxSlots: " << base::dec << (uint64_t)g_maxSlots
            << ", MaxPorts: " << (uint64_t)g_maxPorts
            << ", ScratchpadBufs: " << (uint64_t)maxScratchpadBufs;
ffffffff8001596d:	45 89 e5             	mov    %r12d,%r13d
        g_rtBase = g_mmioBase + rtsOff;
ffffffff80015970:	83 e2 e0             	and    $0xffffffe0,%edx
ffffffff80015973:	48 01 c2             	add    %rax,%rdx
ffffffff80015976:	48 89 15 cb 20 13 00 	mov    %rdx,0x1320cb(%rip)        # ffffffff80147a48 <_ZN7Drivers3USB4XhciL8g_rtBaseE>
        g_dbBase = g_mmioBase + dbOff;
ffffffff8001597d:	89 ca                	mov    %ecx,%edx
ffffffff8001597f:	83 e2 fc             	and    $0xfffffffc,%edx
ffffffff80015982:	48 01 d0             	add    %rdx,%rax
ffffffff80015985:	48 89 05 b4 20 13 00 	mov    %rax,0x1320b4(%rip)        # ffffffff80147a40 <_ZN7Drivers3USB4XhciL8g_dbBaseE>
ffffffff8001598c:	e8 2f d8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015991:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80015998:	e8 23 d8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001599d:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800159a4:	e8 17 d8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800159a9:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff800159b0:	e8 0b d8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800159b5:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800159bc:	e8 ff d7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800159c1:	48 c7 c7 c7 b4 02 80 	mov    $0xffffffff8002b4c7,%rdi
ffffffff800159c8:	e8 f3 d7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        KernelLogStream(INFO, "xHCI") << "MaxSlots: " << base::dec << (uint64_t)g_maxSlots
ffffffff800159cd:	8b 3d 69 20 13 00    	mov    0x132069(%rip),%edi        # ffffffff80147a3c <_ZN7Drivers3USB4XhciL10g_maxSlotsE>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800159d3:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800159d8:	e8 b3 4a 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800159dd:	48 89 c7             	mov    %rax,%rdi
ffffffff800159e0:	e8 db d7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800159e5:	48 c7 c7 d2 b4 02 80 	mov    $0xffffffff8002b4d2,%rdi
ffffffff800159ec:	e8 cf d7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << ", MaxPorts: " << (uint64_t)g_maxPorts
ffffffff800159f1:	8b 3d 41 20 13 00    	mov    0x132041(%rip),%edi        # ffffffff80147a38 <_ZN7Drivers3USB4XhciL10g_maxPortsE>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800159f7:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800159fc:	e8 8f 4a 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80015a01:	48 89 c7             	mov    %rax,%rdi
ffffffff80015a04:	e8 b7 d7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80015a09:	48 c7 c7 df b4 02 80 	mov    $0xffffffff8002b4df,%rdi
ffffffff80015a10:	e8 ab d7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80015a15:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80015a1a:	4c 89 ef             	mov    %r13,%rdi
ffffffff80015a1d:	e8 6e 4a 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80015a22:	48 89 c7             	mov    %rax,%rdi
ffffffff80015a25:	e8 96 d7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80015a2a:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80015a31:	e8 8a d7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80015a36:	83 2d 67 9a 1c 00 01 	subl   $0x1,0x1c9a67(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

        // Cap slots to our maximum
        if (g_maxSlots > MAX_SLOTS) {
ffffffff80015a3d:	83 3d f8 1f 13 00 10 	cmpl   $0x10,0x131ff8(%rip)        # ffffffff80147a3c <_ZN7Drivers3USB4XhciL10g_maxSlotsE>
ffffffff80015a44:	76 0a                	jbe    ffffffff80015a50 <_ZN7Drivers3USB4Xhci10InitializeEv+0x650>
            g_maxSlots = MAX_SLOTS;
ffffffff80015a46:	c7 05 ec 1f 13 00 10 	movl   $0x10,0x131fec(%rip)        # ffffffff80147a3c <_ZN7Drivers3USB4XhciL10g_maxSlotsE>
ffffffff80015a4d:	00 00 00 
        }
        if (g_maxPorts > MAX_PORTS) {
ffffffff80015a50:	83 3d e1 1f 13 00 10 	cmpl   $0x10,0x131fe1(%rip)        # ffffffff80147a38 <_ZN7Drivers3USB4XhciL10g_maxPortsE>
ffffffff80015a57:	76 0a                	jbe    ffffffff80015a63 <_ZN7Drivers3USB4Xhci10InitializeEv+0x663>
            g_maxPorts = MAX_PORTS;
ffffffff80015a59:	c7 05 d5 1f 13 00 10 	movl   $0x10,0x131fd5(%rip)        # ffffffff80147a38 <_ZN7Drivers3USB4XhciL10g_maxPortsE>
ffffffff80015a60:	00 00 00 
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff80015a63:	48 8b 05 e6 1f 13 00 	mov    0x131fe6(%rip),%rax        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
ffffffff80015a6a:	8b 10                	mov    (%rax),%edx

        // -----------------------------------------------------------------
        // Step 5: Halt controller
        // -----------------------------------------------------------------
        uint32_t usbcmd = ReadOp(OP_USBCMD);
        usbcmd &= ~USBCMD_RS;
ffffffff80015a6c:	83 e2 fe             	and    $0xfffffffe,%edx
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff80015a6f:	89 10                	mov    %edx,(%rax)
ffffffff80015a71:	ba a0 86 01 00       	mov    $0x186a0,%edx
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff80015a76:	8b 48 04             	mov    0x4(%rax),%ecx
        WriteOp(OP_USBCMD, usbcmd);

        // Wait for HCH (Halted) to be set
        for (uint32_t i = 0; i < 100000; i++) {
            if (ReadOp(OP_USBSTS) & USBSTS_HCH) {
ffffffff80015a79:	83 e1 01             	and    $0x1,%ecx
ffffffff80015a7c:	75 23                	jne    ffffffff80015aa1 <_ZN7Drivers3USB4Xhci10InitializeEv+0x6a1>
ffffffff80015a7e:	b8 0a 00 00 00       	mov    $0xa,%eax
ffffffff80015a83:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80015a8a:	00 00 00 00 
ffffffff80015a8e:	66 90                	xchg   %ax,%ax
                break;
            }
            for (int j = 0; j < 10; j++) {
ffffffff80015a90:	83 e8 02             	sub    $0x2,%eax
ffffffff80015a93:	75 fb                	jne    ffffffff80015a90 <_ZN7Drivers3USB4Xhci10InitializeEv+0x690>
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff80015a95:	48 8b 05 b4 1f 13 00 	mov    0x131fb4(%rip),%rax        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
        for (uint32_t i = 0; i < 100000; i++) {
ffffffff80015a9c:	83 ea 01             	sub    $0x1,%edx
ffffffff80015a9f:	75 d5                	jne    ffffffff80015a76 <_ZN7Drivers3USB4Xhci10InitializeEv+0x676>
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff80015aa1:	8b 50 04             	mov    0x4(%rax),%edx
            g_kernelLogDepth++;
ffffffff80015aa4:	8b 05 fa 99 1c 00    	mov    0x1c99fa(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80015aaa:	83 c0 01             	add    $0x1,%eax
                asm volatile("" ::: "memory");
            }
        }

        if (!(ReadOp(OP_USBSTS) & USBSTS_HCH)) {
ffffffff80015aad:	83 e2 01             	and    $0x1,%edx
ffffffff80015ab0:	0f 84 99 0d 00 00    	je     ffffffff8001684f <_ZN7Drivers3USB4Xhci10InitializeEv+0x144f>
            Print(string);
ffffffff80015ab6:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff80015abd:	89 05 e1 99 1c 00    	mov    %eax,0x1c99e1(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80015ac3:	e8 f8 d6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015ac8:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80015acf:	e8 ec d6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015ad4:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80015adb:	e8 e0 d6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015ae0:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80015ae7:	e8 d4 d6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015aec:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80015af3:	e8 c8 d6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015af8:	48 c7 c7 0c b5 02 80 	mov    $0xffffffff8002b50c,%rdi
ffffffff80015aff:	e8 bc d6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015b04:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80015b0b:	e8 b0 d6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff80015b10:	48 8b 05 39 1f 13 00 	mov    0x131f39(%rip),%rax        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
ffffffff80015b17:	ba a0 86 01 00       	mov    $0x186a0,%edx
            g_kernelLogDepth--;
ffffffff80015b1c:	83 2d 81 99 1c 00 01 	subl   $0x1,0x1c9981(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80015b23:	c7 00 02 00 00 00    	movl   $0x2,(%rax)
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff80015b29:	8b 08                	mov    (%rax),%ecx
        // -----------------------------------------------------------------
        WriteOp(OP_USBCMD, USBCMD_HCRST);

        // Wait for HCRST to clear
        for (uint32_t i = 0; i < 100000; i++) {
            if (!(ReadOp(OP_USBCMD) & USBCMD_HCRST)) {
ffffffff80015b2b:	83 e1 02             	and    $0x2,%ecx
ffffffff80015b2e:	74 21                	je     ffffffff80015b51 <_ZN7Drivers3USB4Xhci10InitializeEv+0x751>
ffffffff80015b30:	b8 0a 00 00 00       	mov    $0xa,%eax
ffffffff80015b35:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80015b3c:	00 00 00 00 
                break;
            }
            for (int j = 0; j < 10; j++) {
ffffffff80015b40:	83 e8 02             	sub    $0x2,%eax
ffffffff80015b43:	75 fb                	jne    ffffffff80015b40 <_ZN7Drivers3USB4Xhci10InitializeEv+0x740>
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff80015b45:	48 8b 05 04 1f 13 00 	mov    0x131f04(%rip),%rax        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
        for (uint32_t i = 0; i < 100000; i++) {
ffffffff80015b4c:	83 ea 01             	sub    $0x1,%edx
ffffffff80015b4f:	75 d8                	jne    ffffffff80015b29 <_ZN7Drivers3USB4Xhci10InitializeEv+0x729>
                asm volatile("" ::: "memory");
            }
        }

        // Wait for CNR (Controller Not Ready) to clear
        for (uint32_t i = 0; i < 100000; i++) {
ffffffff80015b51:	ba a0 86 01 00       	mov    $0x186a0,%edx
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff80015b56:	8b 48 04             	mov    0x4(%rax),%ecx
            if (!(ReadOp(OP_USBSTS) & USBSTS_CNR)) {
ffffffff80015b59:	80 e5 08             	and    $0x8,%ch
ffffffff80015b5c:	74 23                	je     ffffffff80015b81 <_ZN7Drivers3USB4Xhci10InitializeEv+0x781>
ffffffff80015b5e:	b8 0a 00 00 00       	mov    $0xa,%eax
ffffffff80015b63:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80015b6a:	00 00 00 00 
ffffffff80015b6e:	66 90                	xchg   %ax,%ax
                break;
            }
            for (int j = 0; j < 10; j++) {
ffffffff80015b70:	83 e8 02             	sub    $0x2,%eax
ffffffff80015b73:	75 fb                	jne    ffffffff80015b70 <_ZN7Drivers3USB4Xhci10InitializeEv+0x770>
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff80015b75:	48 8b 05 d4 1e 13 00 	mov    0x131ed4(%rip),%rax        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
        for (uint32_t i = 0; i < 100000; i++) {
ffffffff80015b7c:	83 ea 01             	sub    $0x1,%edx
ffffffff80015b7f:	75 d5                	jne    ffffffff80015b56 <_ZN7Drivers3USB4Xhci10InitializeEv+0x756>
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff80015b81:	8b 50 04             	mov    0x4(%rax),%edx
            g_kernelLogDepth++;
ffffffff80015b84:	8b 05 1a 99 1c 00    	mov    0x1c991a(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80015b8a:	83 c0 01             	add    $0x1,%eax
                asm volatile("" ::: "memory");
            }
        }

        if (ReadOp(OP_USBSTS) & USBSTS_CNR) {
ffffffff80015b8d:	80 e6 08             	and    $0x8,%dh
ffffffff80015b90:	0f 85 54 0c 00 00    	jne    ffffffff800167ea <_ZN7Drivers3USB4Xhci10InitializeEv+0x13ea>
            Print(string);
ffffffff80015b96:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff80015b9d:	89 05 01 99 1c 00    	mov    %eax,0x1c9901(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80015ba3:	e8 18 d6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015ba8:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80015baf:	e8 0c d6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015bb4:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80015bbb:	e8 00 d6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015bc0:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80015bc7:	e8 f4 d5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015bcc:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80015bd3:	e8 e8 d5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015bd8:	48 c7 c7 1e b5 02 80 	mov    $0xffffffff8002b51e,%rdi
ffffffff80015bdf:	e8 dc d5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015be4:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80015beb:	e8 d0 d5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff80015bf0:	8b 15 46 1e 13 00    	mov    0x131e46(%rip),%edx        # ffffffff80147a3c <_ZN7Drivers3USB4XhciL10g_maxSlotsE>
ffffffff80015bf6:	48 8b 05 53 1e 13 00 	mov    0x131e53(%rip),%rax        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff80015bfd:	48 8b 3d ac 6d 13 00 	mov    0x136dac(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
            g_kernelLogDepth--;
ffffffff80015c04:	83 2d 99 98 1c 00 01 	subl   $0x1,0x1c9899(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff80015c0b:	89 50 38             	mov    %edx,0x38(%rax)
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff80015c0e:	e8 fd 55 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
            Print(string);
ffffffff80015c13:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff80015c1a:	83 05 83 98 1c 00 01 	addl   $0x1,0x1c9883(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80015c21:	48 89 c2             	mov    %rax,%rdx
        return address - HHDMBase;
ffffffff80015c24:	48 2b 05 7d 6d 13 00 	sub    0x136d7d(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        WriteOp(OP_CONFIG, g_maxSlots);

        // -----------------------------------------------------------------
        // Step 8: Allocate DCBAA
        // -----------------------------------------------------------------
        g_dcbaa = (uint64_t*)AllocateDmaBuffer(g_dcbaaPhys);
ffffffff80015c2b:	48 89 15 fe 1d 13 00 	mov    %rdx,0x131dfe(%rip)        # ffffffff80147a30 <_ZN7Drivers3USB4Xhci7g_dcbaaE>
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff80015c32:	48 8b 15 17 1e 13 00 	mov    0x131e17(%rip),%rdx        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
        outPhysAddr = Memory::SubHHDM(virt);
ffffffff80015c39:	48 89 05 e8 1d 13 00 	mov    %rax,0x131de8(%rip)        # ffffffff80147a28 <_ZN7Drivers3USB4XhciL11g_dcbaaPhysE>
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff80015c40:	89 42 30             	mov    %eax,0x30(%rdx)

        // Write DCBAAP (64-bit, split into two 32-bit writes)
        WriteOp(OP_DCBAAP, (uint32_t)(g_dcbaaPhys & 0xFFFFFFFF));
        WriteOp(OP_DCBAAP + 4, (uint32_t)(g_dcbaaPhys >> 32));
ffffffff80015c43:	48 c1 e8 20          	shr    $0x20,%rax
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff80015c47:	89 42 34             	mov    %eax,0x34(%rdx)
            Print(string);
ffffffff80015c4a:	e8 71 d5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015c4f:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80015c56:	e8 65 d5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015c5b:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80015c62:	e8 59 d5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015c67:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80015c6e:	e8 4d d5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015c73:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80015c7a:	e8 41 d5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015c7f:	48 c7 c7 38 b5 02 80 	mov    $0xffffffff8002b538,%rdi
ffffffff80015c86:	e8 35 d5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80015c8b:	48 8b 3d 96 1d 13 00 	mov    0x131d96(%rip),%rdi        # ffffffff80147a28 <_ZN7Drivers3USB4XhciL11g_dcbaaPhysE>
ffffffff80015c92:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80015c97:	e8 f4 47 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80015c9c:	48 89 c7             	mov    %rax,%rdi
ffffffff80015c9f:	e8 1c d5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80015ca4:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80015cab:	e8 10 d5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80015cb0:	83 2d ed 97 1c 00 01 	subl   $0x1,0x1c97ed(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        KernelLogStream(OK, "xHCI") << "DCBAA at phys " << base::hex << g_dcbaaPhys;

        // -----------------------------------------------------------------
        // Step 9: Scratchpad buffers
        // -----------------------------------------------------------------
        if (maxScratchpadBufs > 0) {
ffffffff80015cb7:	45 85 e4             	test   %r12d,%r12d
ffffffff80015cba:	0f 85 49 0a 00 00    	jne    ffffffff80016709 <_ZN7Drivers3USB4Xhci10InitializeEv+0x1309>
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff80015cc0:	48 8b 3d e9 6c 13 00 	mov    0x136ce9(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff80015cc7:	e8 44 55 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
            Print(string);
ffffffff80015ccc:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi

        // Set up Link TRB at the last position
        TRB& linkTrb = g_cmdRing[CMD_RING_SIZE - 1];
        linkTrb.Parameter0 = (uint32_t)(g_cmdRingPhys & 0xFFFFFFFF);
        linkTrb.Parameter1 = (uint32_t)(g_cmdRingPhys >> 32);
        linkTrb.Status = 0;
ffffffff80015cd3:	48 be 00 00 00 00 02 	movabs $0x180200000000,%rsi
ffffffff80015cda:	18 00 00 
            g_kernelLogDepth++;
ffffffff80015cdd:	83 05 c0 97 1c 00 01 	addl   $0x1,0x1c97c0(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff80015ce4:	48 89 c2             	mov    %rax,%rdx
ffffffff80015ce7:	48 2b 05 ba 6c 13 00 	sub    0x136cba(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        // Write CRCR = command ring physical address | cycle bit 1
        uint64_t crcr = g_cmdRingPhys | TRB_CYCLE_BIT;
        WriteOp(OP_CRCR, (uint32_t)(crcr & 0xFFFFFFFF));
        WriteOp(OP_CRCR + 4, (uint32_t)(crcr >> 32));

        g_cmdRingCCS = true;
ffffffff80015cee:	c6 05 1c 83 01 00 01 	movb   $0x1,0x1831c(%rip)        # ffffffff8002e011 <_ZN7Drivers3USB4XhciL12g_cmdRingCCSE>
        linkTrb.Status = 0;
ffffffff80015cf5:	48 89 b2 f8 03 00 00 	mov    %rsi,0x3f8(%rdx)
        linkTrb.Parameter1 = (uint32_t)(g_cmdRingPhys >> 32);
ffffffff80015cfc:	48 89 c1             	mov    %rax,%rcx
        linkTrb.Parameter0 = (uint32_t)(g_cmdRingPhys & 0xFFFFFFFF);
ffffffff80015cff:	48 89 82 f0 03 00 00 	mov    %rax,0x3f0(%rdx)
        linkTrb.Parameter1 = (uint32_t)(g_cmdRingPhys >> 32);
ffffffff80015d06:	48 c1 e9 20          	shr    $0x20,%rcx
        g_cmdRing = (TRB*)AllocateDmaBuffer(g_cmdRingPhys);
ffffffff80015d0a:	48 89 15 0f 1d 13 00 	mov    %rdx,0x131d0f(%rip)        # ffffffff80147a20 <_ZN7Drivers3USB4XhciL9g_cmdRingE>
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff80015d11:	48 8b 15 38 1d 13 00 	mov    0x131d38(%rip),%rdx        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
        outPhysAddr = Memory::SubHHDM(virt);
ffffffff80015d18:	48 89 05 f9 1c 13 00 	mov    %rax,0x131cf9(%rip)        # ffffffff80147a18 <_ZN7Drivers3USB4XhciL13g_cmdRingPhysE>
        uint64_t crcr = g_cmdRingPhys | TRB_CYCLE_BIT;
ffffffff80015d1f:	48 83 c8 01          	or     $0x1,%rax
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff80015d23:	89 42 18             	mov    %eax,0x18(%rdx)
ffffffff80015d26:	89 4a 1c             	mov    %ecx,0x1c(%rdx)
        g_cmdRingEnqueue = 0;
ffffffff80015d29:	c7 05 dd 1c 13 00 00 	movl   $0x0,0x131cdd(%rip)        # ffffffff80147a10 <_ZN7Drivers3USB4XhciL16g_cmdRingEnqueueE>
ffffffff80015d30:	00 00 00 
            Print(string);
ffffffff80015d33:	e8 88 d4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015d38:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80015d3f:	e8 7c d4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015d44:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80015d4b:	e8 70 d4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015d50:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80015d57:	e8 64 d4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015d5c:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80015d63:	e8 58 d4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015d68:	48 c7 c7 66 b5 02 80 	mov    $0xffffffff8002b566,%rdi
ffffffff80015d6f:	e8 4c d4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80015d74:	48 8b 3d 9d 1c 13 00 	mov    0x131c9d(%rip),%rdi        # ffffffff80147a18 <_ZN7Drivers3USB4XhciL13g_cmdRingPhysE>
ffffffff80015d7b:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80015d80:	e8 0b 47 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80015d85:	48 89 c7             	mov    %rax,%rdi
ffffffff80015d88:	e8 33 d4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80015d8d:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80015d94:	e8 27 d4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff80015d99:	48 8b 3d 10 6c 13 00 	mov    0x136c10(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
            g_kernelLogDepth--;
ffffffff80015da0:	83 2d fd 96 1c 00 01 	subl   $0x1,0x1c96fd(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80015da7:	e8 64 54 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff80015dac:	48 8b 3d fd 6b 13 00 	mov    0x136bfd(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff80015db3:	48 89 c2             	mov    %rax,%rdx
ffffffff80015db6:	48 2b 15 eb 6b 13 00 	sub    0x136beb(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        KernelLogStream(OK, "xHCI") << "Command ring at phys " << base::hex << g_cmdRingPhys;

        // -----------------------------------------------------------------
        // Step 11: Event ring + ERST
        // -----------------------------------------------------------------
        g_evtRing = (TRB*)AllocateDmaBuffer(g_evtRingPhys);
ffffffff80015dbd:	48 89 05 44 1c 13 00 	mov    %rax,0x131c44(%rip)        # ffffffff80147a08 <_ZN7Drivers3USB4XhciL9g_evtRingE>
        outPhysAddr = Memory::SubHHDM(virt);
ffffffff80015dc4:	48 89 15 35 1c 13 00 	mov    %rdx,0x131c35(%rip)        # ffffffff80147a00 <_ZN7Drivers3USB4XhciL13g_evtRingPhysE>
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff80015dcb:	e8 40 54 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
        g_erst = (ERSTEntry*)AllocateDmaBuffer(g_erstPhys);

        // Set up ERST entry 0
        g_erst[0].RingSegmentBase = g_evtRingPhys;
ffffffff80015dd0:	48 8b 0d 29 1c 13 00 	mov    0x131c29(%rip),%rcx        # ffffffff80147a00 <_ZN7Drivers3USB4XhciL13g_evtRingPhysE>
            Print(string);
ffffffff80015dd7:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff80015dde:	83 05 bf 96 1c 00 01 	addl   $0x1,0x1c96bf(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80015de5:	48 89 c2             	mov    %rax,%rdx
ffffffff80015de8:	48 2b 15 b9 6b 13 00 	sub    0x136bb9(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        g_erst[0].RingSegmentSize = EVT_RING_SIZE;
ffffffff80015def:	48 c7 40 08 40 00 00 	movq   $0x40,0x8(%rax)
ffffffff80015df6:	00 
        outPhysAddr = Memory::SubHHDM(virt);
ffffffff80015df7:	48 89 15 f2 1b 13 00 	mov    %rdx,0x131bf2(%rip)        # ffffffff801479f0 <_ZN7Drivers3USB4XhciL10g_erstPhysE>
        g_erst[0].RingSegmentBase = g_evtRingPhys;
ffffffff80015dfe:	48 89 08             	mov    %rcx,(%rax)
        *(volatile uint32_t*)(g_rtBase + reg) = value;
ffffffff80015e01:	48 8b 05 40 1c 13 00 	mov    0x131c40(%rip),%rax        # ffffffff80147a48 <_ZN7Drivers3USB4XhciL8g_rtBaseE>

        // Write ERSTBA last (triggers hardware to read the ERST)
        WriteRt(IR0_ERSTBA, (uint32_t)(g_erstPhys & 0xFFFFFFFF));
        WriteRt(IR0_ERSTBA + 4, (uint32_t)(g_erstPhys >> 32));

        g_evtRingCCS = true;
ffffffff80015e08:	c6 05 01 82 01 00 01 	movb   $0x1,0x18201(%rip)        # ffffffff8002e010 <_ZN7Drivers3USB4XhciL12g_evtRingCCSE>
        *(volatile uint32_t*)(g_rtBase + reg) = value;
ffffffff80015e0f:	c7 40 28 01 00 00 00 	movl   $0x1,0x28(%rax)
ffffffff80015e16:	89 48 38             	mov    %ecx,0x38(%rax)
        WriteRt(IR0_ERDP + 4, (uint32_t)(g_evtRingPhys >> 32));
ffffffff80015e19:	48 c1 e9 20          	shr    $0x20,%rcx
        *(volatile uint32_t*)(g_rtBase + reg) = value;
ffffffff80015e1d:	89 48 3c             	mov    %ecx,0x3c(%rax)
ffffffff80015e20:	89 50 30             	mov    %edx,0x30(%rax)
        WriteRt(IR0_ERSTBA + 4, (uint32_t)(g_erstPhys >> 32));
ffffffff80015e23:	48 c1 ea 20          	shr    $0x20,%rdx
        *(volatile uint32_t*)(g_rtBase + reg) = value;
ffffffff80015e27:	89 50 34             	mov    %edx,0x34(%rax)
        g_evtRingDequeue = 0;
ffffffff80015e2a:	c7 05 c4 1b 13 00 00 	movl   $0x0,0x131bc4(%rip)        # ffffffff801479f8 <_ZN7Drivers3USB4XhciL16g_evtRingDequeueE>
ffffffff80015e31:	00 00 00 
            Print(string);
ffffffff80015e34:	e8 87 d3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015e39:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80015e40:	e8 7b d3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015e45:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80015e4c:	e8 6f d3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015e51:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80015e58:	e8 63 d3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015e5d:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80015e64:	e8 57 d3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015e69:	48 c7 c7 7c b5 02 80 	mov    $0xffffffff8002b57c,%rdi
ffffffff80015e70:	e8 4b d3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80015e75:	48 8b 3d 84 1b 13 00 	mov    0x131b84(%rip),%rdi        # ffffffff80147a00 <_ZN7Drivers3USB4XhciL13g_evtRingPhysE>
ffffffff80015e7c:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80015e81:	e8 0a 46 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80015e86:	48 89 c7             	mov    %rax,%rdi
ffffffff80015e89:	e8 32 d3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80015e8e:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80015e95:	e8 26 d3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        uint8_t cap = Pci::FindCapability(bus, dev, func, Pci::PCI_CAP_MSI);
ffffffff80015e9a:	44 0f b6 73 04       	movzbl 0x4(%rbx),%r14d
ffffffff80015e9f:	b9 05 00 00 00       	mov    $0x5,%ecx
            g_kernelLogDepth--;
ffffffff80015ea4:	83 2d f9 95 1c 00 01 	subl   $0x1,0x1c95f9(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80015eab:	44 0f b6 6b 03       	movzbl 0x3(%rbx),%r13d
ffffffff80015eb0:	44 0f b6 63 02       	movzbl 0x2(%rbx),%r12d
ffffffff80015eb5:	44 89 f2             	mov    %r14d,%edx
ffffffff80015eb8:	44 89 e7             	mov    %r12d,%edi
ffffffff80015ebb:	44 89 ee             	mov    %r13d,%esi
ffffffff80015ebe:	e8 cd 9d 00 00       	call   ffffffff8001fc90 <_ZN3Pci14FindCapabilityEhhhh>
            Print(string);
ffffffff80015ec3:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
ffffffff80015eca:	89 c3                	mov    %eax,%ebx
            g_kernelLogDepth++;
ffffffff80015ecc:	8b 05 d2 95 1c 00    	mov    0x1c95d2(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80015ed2:	83 c0 01             	add    $0x1,%eax
ffffffff80015ed5:	89 05 c9 95 1c 00    	mov    %eax,0x1c95c9(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        if (cap == 0) {
ffffffff80015edb:	84 db                	test   %bl,%bl
ffffffff80015edd:	0f 84 91 07 00 00    	je     ffffffff80016674 <_ZN7Drivers3USB4Xhci10InitializeEv+0x1274>
            Print(string);
ffffffff80015ee3:	e8 d8 d2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015ee8:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80015eef:	e8 cc d2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015ef4:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80015efb:	e8 c0 d2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015f00:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff80015f07:	e8 b4 d2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015f0c:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80015f13:	e8 a8 d2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80015f18:	48 c7 c7 81 ae 02 80 	mov    $0xffffffff8002ae81,%rdi
ffffffff80015f1f:	e8 9c d2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80015f24:	be 10 00 00 00       	mov    $0x10,%esi
        KernelLogStream(INFO, "xHCI") << "MSI capability at offset " << base::hex << (uint64_t)cap;
ffffffff80015f29:	0f b6 fb             	movzbl %bl,%edi
ffffffff80015f2c:	e8 5f 45 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80015f31:	48 89 c7             	mov    %rax,%rdi
ffffffff80015f34:	e8 87 d2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80015f39:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80015f40:	e8 7b d2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        uint16_t msgCtrl = Pci::LegacyRead16(bus, dev, func, cap + 2);
ffffffff80015f45:	8d 43 02             	lea    0x2(%rbx),%eax
ffffffff80015f48:	44 89 f2             	mov    %r14d,%edx
ffffffff80015f4b:	44 89 ee             	mov    %r13d,%esi
ffffffff80015f4e:	0f b6 c0             	movzbl %al,%eax
ffffffff80015f51:	44 89 e7             	mov    %r12d,%edi
            g_kernelLogDepth--;
ffffffff80015f54:	83 2d 49 95 1c 00 01 	subl   $0x1,0x1c9549(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80015f5b:	89 c1                	mov    %eax,%ecx
ffffffff80015f5d:	89 45 cc             	mov    %eax,-0x34(%rbp)
ffffffff80015f60:	e8 db 9b 00 00       	call   ffffffff8001fb40 <_ZN3Pci12LegacyRead16Ehhhh>
        Pci::LegacyWrite32(bus, dev, func, cap + 4, MSI_ADDR_BASE);
ffffffff80015f65:	8d 4b 04             	lea    0x4(%rbx),%ecx
ffffffff80015f68:	44 89 f2             	mov    %r14d,%edx
ffffffff80015f6b:	44 89 ee             	mov    %r13d,%esi
ffffffff80015f6e:	41 89 c7             	mov    %eax,%r15d
ffffffff80015f71:	0f b6 c9             	movzbl %cl,%ecx
ffffffff80015f74:	41 b8 00 00 e0 fe    	mov    $0xfee00000,%r8d
ffffffff80015f7a:	44 89 e7             	mov    %r12d,%edi
        uint16_t msgCtrl = Pci::LegacyRead16(bus, dev, func, cap + 2);
ffffffff80015f7d:	66 89 45 c8          	mov    %ax,-0x38(%rbp)
        bool is64bit = (msgCtrl & (1 << 7)) != 0;
ffffffff80015f81:	66 41 81 e7 80 00    	and    $0x80,%r15w
        Pci::LegacyWrite32(bus, dev, func, cap + 4, MSI_ADDR_BASE);
ffffffff80015f87:	e8 54 9c 00 00       	call   ffffffff8001fbe0 <_ZN3Pci13LegacyWrite32Ehhhhj>
            Pci::LegacyWrite32(bus, dev, func, cap + 8, 0);
ffffffff80015f8c:	8d 4b 08             	lea    0x8(%rbx),%ecx
ffffffff80015f8f:	0f b6 c9             	movzbl %cl,%ecx
        if (is64bit) {
ffffffff80015f92:	66 45 85 ff          	test   %r15w,%r15w
ffffffff80015f96:	74 17                	je     ffffffff80015faf <_ZN7Drivers3USB4Xhci10InitializeEv+0xbaf>
            Pci::LegacyWrite32(bus, dev, func, cap + 8, 0);
ffffffff80015f98:	45 31 c0             	xor    %r8d,%r8d
ffffffff80015f9b:	44 89 f2             	mov    %r14d,%edx
ffffffff80015f9e:	44 89 ee             	mov    %r13d,%esi
ffffffff80015fa1:	44 89 e7             	mov    %r12d,%edi
ffffffff80015fa4:	e8 37 9c 00 00       	call   ffffffff8001fbe0 <_ZN3Pci13LegacyWrite32Ehhhhj>
            Pci::LegacyWrite16(bus, dev, func, cap + 12, MSI_VECTOR);
ffffffff80015fa9:	8d 4b 0c             	lea    0xc(%rbx),%ecx
ffffffff80015fac:	0f b6 c9             	movzbl %cl,%ecx
            Pci::LegacyWrite16(bus, dev, func, cap + 8, MSI_VECTOR);
ffffffff80015faf:	41 b8 39 00 00 00    	mov    $0x39,%r8d
ffffffff80015fb5:	44 89 f2             	mov    %r14d,%edx
ffffffff80015fb8:	44 89 ee             	mov    %r13d,%esi
ffffffff80015fbb:	44 89 e7             	mov    %r12d,%edi
ffffffff80015fbe:	e8 5d 9c 00 00       	call   ffffffff8001fc20 <_ZN3Pci13LegacyWrite16Ehhhht>
        msgCtrl |= (1 << 0); // MSI Enable
ffffffff80015fc3:	44 8b 45 c8          	mov    -0x38(%rbp),%r8d
        Pci::LegacyWrite16(bus, dev, func, cap + 2, msgCtrl);
ffffffff80015fc7:	8b 4d cc             	mov    -0x34(%rbp),%ecx
ffffffff80015fca:	44 89 f2             	mov    %r14d,%edx
ffffffff80015fcd:	44 89 ee             	mov    %r13d,%esi
ffffffff80015fd0:	44 89 e7             	mov    %r12d,%edi
        msgCtrl |= (1 << 0); // MSI Enable
ffffffff80015fd3:	41 81 e0 8f ff 00 00 	and    $0xff8f,%r8d
        Pci::LegacyWrite16(bus, dev, func, cap + 2, msgCtrl);
ffffffff80015fda:	41 83 c8 01          	or     $0x1,%r8d
ffffffff80015fde:	e8 3d 9c 00 00       	call   ffffffff8001fc20 <_ZN3Pci13LegacyWrite16Ehhhht>
        uint16_t pciCmd = Pci::LegacyRead16(bus, dev, func, PCI_REG_COMMAND);
ffffffff80015fe3:	b9 04 00 00 00       	mov    $0x4,%ecx
ffffffff80015fe8:	44 89 f2             	mov    %r14d,%edx
ffffffff80015feb:	44 89 ee             	mov    %r13d,%esi
ffffffff80015fee:	44 89 e7             	mov    %r12d,%edi
ffffffff80015ff1:	e8 4a 9b 00 00       	call   ffffffff8001fb40 <_ZN3Pci12LegacyRead16Ehhhh>
        Pci::LegacyWrite16(bus, dev, func, PCI_REG_COMMAND, pciCmd);
ffffffff80015ff6:	b9 04 00 00 00       	mov    $0x4,%ecx
ffffffff80015ffb:	44 89 f2             	mov    %r14d,%edx
ffffffff80015ffe:	44 89 ee             	mov    %r13d,%esi
        pciCmd |= PCI_CMD_INTX_DISABLE;
ffffffff80016001:	80 cc 04             	or     $0x4,%ah
        Pci::LegacyWrite16(bus, dev, func, PCI_REG_COMMAND, pciCmd);
ffffffff80016004:	44 89 e7             	mov    %r12d,%edi
        pciCmd |= PCI_CMD_INTX_DISABLE;
ffffffff80016007:	44 0f b7 c0          	movzwl %ax,%r8d
        Pci::LegacyWrite16(bus, dev, func, PCI_REG_COMMAND, pciCmd);
ffffffff8001600b:	e8 10 9c 00 00       	call   ffffffff8001fc20 <_ZN3Pci13LegacyWrite16Ehhhht>
        Hal::RegisterIrqHandler(MSI_IRQ, HandleInterrupt);
ffffffff80016010:	48 c7 c6 20 4c 01 80 	mov    $0xffffffff80014c20,%rsi
ffffffff80016017:	bf 19 00 00 00       	mov    $0x19,%edi
ffffffff8001601c:	e8 5f 26 00 00       	call   ffffffff80018680 <_ZN3Hal18RegisterIrqHandlerEhPFvhE>
            Print(string);
ffffffff80016021:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff80016028:	83 05 75 94 1c 00 01 	addl   $0x1,0x1c9475(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001602f:	e8 8c d1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016034:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001603b:	e8 80 d1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016040:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80016047:	e8 74 d1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001604c:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80016053:	e8 68 d1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016058:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001605f:	e8 5c d1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016064:	48 c7 c7 9b ae 02 80 	mov    $0xffffffff8002ae9b,%rdi
ffffffff8001606b:	e8 50 d1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80016070:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80016075:	bf 39 00 00 00       	mov    $0x39,%edi
ffffffff8001607a:	e8 11 44 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001607f:	48 89 c7             	mov    %rax,%rdi
ffffffff80016082:	e8 39 d1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80016087:	48 c7 c7 b0 ae 02 80 	mov    $0xffffffff8002aeb0,%rdi
ffffffff8001608e:	e8 2d d1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80016093:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80016098:	bf 19 00 00 00       	mov    $0x19,%edi
ffffffff8001609d:	e8 ee 43 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800160a2:	48 89 c7             	mov    %rax,%rdi
ffffffff800160a5:	e8 16 d1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800160aa:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff800160b1:	e8 0a d1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << " (IRQ slot " << (uint64_t)MSI_IRQ << ")" << (is64bit ? " [64-bit]" : " [32-bit]");
ffffffff800160b6:	66 45 85 ff          	test   %r15w,%r15w
ffffffff800160ba:	48 c7 c7 e9 ad 02 80 	mov    $0xffffffff8002ade9,%rdi
ffffffff800160c1:	48 c7 c0 df ad 02 80 	mov    $0xffffffff8002addf,%rax
ffffffff800160c8:	48 0f 45 f8          	cmovne %rax,%rdi
ffffffff800160cc:	e8 ef d0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800160d1:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800160d8:	e8 e3 d0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff800160dd:	8b 05 c1 93 1c 00    	mov    0x1c93c1(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff800160e3:	ba a0 86 01 00       	mov    $0x186a0,%edx
ffffffff800160e8:	83 e8 01             	sub    $0x1,%eax
ffffffff800160eb:	89 05 b3 93 1c 00    	mov    %eax,0x1c93b3(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        *(volatile uint32_t*)(g_rtBase + reg) = value;
ffffffff800160f1:	48 8b 05 50 19 13 00 	mov    0x131950(%rip),%rax        # ffffffff80147a48 <_ZN7Drivers3USB4XhciL8g_rtBaseE>
ffffffff800160f8:	c7 40 20 02 00 00 00 	movl   $0x2,0x20(%rax)
ffffffff800160ff:	c7 40 24 00 00 00 00 	movl   $0x0,0x24(%rax)
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff80016106:	48 8b 05 43 19 13 00 	mov    0x131943(%rip),%rax        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
ffffffff8001610d:	c7 00 0d 00 00 00    	movl   $0xd,(%rax)
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff80016113:	8b 40 04             	mov    0x4(%rax),%eax
        // -----------------------------------------------------------------
        WriteOp(OP_USBCMD, USBCMD_RS | USBCMD_INTE | USBCMD_HSEE);

        // Wait for controller to start (HCH should clear)
        for (uint32_t i = 0; i < 100000; i++) {
            if (!(ReadOp(OP_USBSTS) & USBSTS_HCH)) {
ffffffff80016116:	a8 01                	test   $0x1,%al
ffffffff80016118:	74 1e                	je     ffffffff80016138 <_ZN7Drivers3USB4Xhci10InitializeEv+0xd38>
ffffffff8001611a:	b8 0a 00 00 00       	mov    $0xa,%eax
ffffffff8001611f:	90                   	nop
                break;
            }
            for (int j = 0; j < 10; j++) {
ffffffff80016120:	83 e8 02             	sub    $0x2,%eax
ffffffff80016123:	75 fb                	jne    ffffffff80016120 <_ZN7Drivers3USB4Xhci10InitializeEv+0xd20>
        for (uint32_t i = 0; i < 100000; i++) {
ffffffff80016125:	83 ea 01             	sub    $0x1,%edx
ffffffff80016128:	74 0e                	je     ffffffff80016138 <_ZN7Drivers3USB4Xhci10InitializeEv+0xd38>
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff8001612a:	48 8b 05 1f 19 13 00 	mov    0x13191f(%rip),%rax        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
ffffffff80016131:	8b 40 04             	mov    0x4(%rax),%eax
            if (!(ReadOp(OP_USBSTS) & USBSTS_HCH)) {
ffffffff80016134:	a8 01                	test   $0x1,%al
ffffffff80016136:	75 e2                	jne    ffffffff8001611a <_ZN7Drivers3USB4Xhci10InitializeEv+0xd1a>
            Print(string);
ffffffff80016138:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff8001613f:	83 05 5e 93 1c 00 01 	addl   $0x1,0x1c935e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80016146:	e8 75 d0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001614b:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80016152:	e8 69 d0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016157:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001615e:	e8 5d d0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016163:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001616a:	e8 51 d0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001616f:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80016176:	e8 45 d0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001617b:	48 c7 c7 90 b5 02 80 	mov    $0xffffffff8002b590,%rdi
ffffffff80016182:	e8 39 d0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016187:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001618e:	e8 2d d0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        g_initialized = true;

        // -----------------------------------------------------------------
        // Step 14.5: Power on all ports
        // -----------------------------------------------------------------
        for (uint32_t port = 0; port < g_maxPorts; port++) {
ffffffff80016193:	8b 35 9f 18 13 00    	mov    0x13189f(%rip),%esi        # ffffffff80147a38 <_ZN7Drivers3USB4XhciL10g_maxPortsE>
            g_kernelLogDepth--;
ffffffff80016199:	83 2d 04 93 1c 00 01 	subl   $0x1,0x1c9304(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        g_initialized = true;
ffffffff800161a0:	c6 05 da 18 13 00 01 	movb   $0x1,0x1318da(%rip)        # ffffffff80147a81 <_ZN7Drivers3USB4XhciL13g_initializedE>
        for (uint32_t port = 0; port < g_maxPorts; port++) {
ffffffff800161a7:	85 f6                	test   %esi,%esi
ffffffff800161a9:	74 2d                	je     ffffffff800161d8 <_ZN7Drivers3USB4Xhci10InitializeEv+0xdd8>
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff800161ab:	4c 8b 05 9e 18 13 00 	mov    0x13189e(%rip),%r8        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
ffffffff800161b2:	b9 00 04 00 00       	mov    $0x400,%ecx
        for (uint32_t port = 0; port < g_maxPorts; port++) {
ffffffff800161b7:	31 d2                	xor    %edx,%edx
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff800161b9:	89 c8                	mov    %ecx,%eax
ffffffff800161bb:	4c 01 c0             	add    %r8,%rax
ffffffff800161be:	8b 38                	mov    (%rax),%edi
            uint32_t portsc = ReadOp(OP_PORTSC_BASE + port * OP_PORTSC_STRIDE);
            if (!(portsc & PORTSC_PP)) {
ffffffff800161c0:	81 e7 00 02 00 00    	and    $0x200,%edi
ffffffff800161c6:	75 06                	jne    ffffffff800161ce <_ZN7Drivers3USB4Xhci10InitializeEv+0xdce>
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff800161c8:	c7 00 00 02 00 00    	movl   $0x200,(%rax)
        for (uint32_t port = 0; port < g_maxPorts; port++) {
ffffffff800161ce:	83 c2 01             	add    $0x1,%edx
ffffffff800161d1:	83 c1 10             	add    $0x10,%ecx
ffffffff800161d4:	39 f2                	cmp    %esi,%edx
ffffffff800161d6:	75 e1                	jne    ffffffff800161b9 <_ZN7Drivers3USB4Xhci10InitializeEv+0xdb9>
    asm volatile("pushfq; pop %0" : "=r"(flags));
ffffffff800161d8:	9c                   	pushf
ffffffff800161d9:	58                   	pop    %rax
    if (flags & (1 << 9)) {
ffffffff800161da:	f6 c4 02             	test   $0x2,%ah
ffffffff800161dd:	0f 85 72 04 00 00    	jne    ffffffff80016655 <_ZN7Drivers3USB4Xhci10InitializeEv+0x1255>
ffffffff800161e3:	b8 20 4e 00 00       	mov    $0x4e20,%eax
            asm volatile("outb %%al, $0x80" ::: "memory");
ffffffff800161e8:	e6 80                	out    %al,$0x80
ffffffff800161ea:	e6 80                	out    %al,$0x80
        for (uint64_t i = 0; i < ms * 1000; i++) {
ffffffff800161ec:	48 83 e8 02          	sub    $0x2,%rax
ffffffff800161f0:	75 f6                	jne    ffffffff800161e8 <_ZN7Drivers3USB4Xhci10InitializeEv+0xde8>
            Print(string);
ffffffff800161f2:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff800161f9:	83 05 a4 92 1c 00 01 	addl   $0x1,0x1c92a4(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        KernelLogStream(OK, "xHCI") << "All ports powered";

        // -----------------------------------------------------------------
        // Step 15: Port scanning
        // -----------------------------------------------------------------
        for (uint32_t port = 0; port < g_maxPorts; port++) {
ffffffff80016200:	45 31 ed             	xor    %r13d,%r13d
            Print(string);
ffffffff80016203:	e8 b8 cf 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016208:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001620f:	e8 ac cf 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016214:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001621b:	e8 a0 cf 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016220:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80016227:	e8 94 cf 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001622c:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80016233:	e8 88 cf 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016238:	48 c7 c7 a3 b5 02 80 	mov    $0xffffffff8002b5a3,%rdi
ffffffff8001623f:	e8 7c cf 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016244:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001624b:	e8 70 cf 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80016250:	8b 05 4e 92 1c 00    	mov    0x1c924e(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80016256:	8b 0d dc 17 13 00    	mov    0x1317dc(%rip),%ecx        # ffffffff80147a38 <_ZN7Drivers3USB4XhciL10g_maxPortsE>
ffffffff8001625c:	8d 50 ff             	lea    -0x1(%rax),%edx
ffffffff8001625f:	89 15 3f 92 1c 00    	mov    %edx,0x1c923f(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80016265:	85 c9                	test   %ecx,%ecx
ffffffff80016267:	75 24                	jne    ffffffff8001628d <_ZN7Drivers3USB4Xhci10InitializeEv+0xe8d>
ffffffff80016269:	e9 d4 01 00 00       	jmp    ffffffff80016442 <_ZN7Drivers3USB4Xhci10InitializeEv+0x1042>
ffffffff8001626e:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80016275:	00 00 00 00 
ffffffff80016279:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
ffffffff80016280:	44 3b 2d b1 17 13 00 	cmp    0x1317b1(%rip),%r13d        # ffffffff80147a38 <_ZN7Drivers3USB4XhciL10g_maxPortsE>
ffffffff80016287:	0f 83 b5 01 00 00    	jae    ffffffff80016442 <_ZN7Drivers3USB4Xhci10InitializeEv+0x1042>
            uint32_t portsc = ReadOp(OP_PORTSC_BASE + port * OP_PORTSC_STRIDE);
ffffffff8001628d:	45 89 ec             	mov    %r13d,%r12d
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff80016290:	48 8b 05 b9 17 13 00 	mov    0x1317b9(%rip),%rax        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
            // Check if device is connected (CCS)
            if (!(portsc & PORTSC_CCS)) {
                continue;
            }

            KernelLogStream(INFO, "xHCI") << "Port " << base::dec << (uint64_t)(port + 1)
ffffffff80016297:	41 83 c5 01          	add    $0x1,%r13d
            uint32_t portsc = ReadOp(OP_PORTSC_BASE + port * OP_PORTSC_STRIDE);
ffffffff8001629b:	41 c1 e4 04          	shl    $0x4,%r12d
ffffffff8001629f:	41 81 c4 00 04 00 00 	add    $0x400,%r12d
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff800162a6:	4c 01 e0             	add    %r12,%rax
ffffffff800162a9:	8b 18                	mov    (%rax),%ebx
            g_kernelLogDepth++;
ffffffff800162ab:	8d 42 01             	lea    0x1(%rdx),%eax
            if (!(portsc & PORTSC_CCS)) {
ffffffff800162ae:	f6 c3 01             	test   $0x1,%bl
ffffffff800162b1:	74 cd                	je     ffffffff80016280 <_ZN7Drivers3USB4Xhci10InitializeEv+0xe80>
            Print(string);
ffffffff800162b3:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff800162ba:	89 05 e4 91 1c 00    	mov    %eax,0x1c91e4(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            KernelLogStream(INFO, "xHCI") << "Port " << base::dec << (uint64_t)(port + 1)
ffffffff800162c0:	45 89 ee             	mov    %r13d,%r14d
            Print(string);
ffffffff800162c3:	e8 f8 ce 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800162c8:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800162cf:	e8 ec ce 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800162d4:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800162db:	e8 e0 ce 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800162e0:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff800162e7:	e8 d4 ce 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800162ec:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800162f3:	e8 c8 ce 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800162f8:	48 c7 c7 b0 a3 02 80 	mov    $0xffffffff8002a3b0,%rdi
ffffffff800162ff:	e8 bc ce 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80016304:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80016309:	4c 89 f7             	mov    %r14,%rdi
ffffffff8001630c:	e8 7f 41 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80016311:	48 89 c7             	mov    %rax,%rdi
ffffffff80016314:	e8 a7 ce 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80016319:	48 c7 c7 b5 b5 02 80 	mov    $0xffffffff8002b5b5,%rdi
ffffffff80016320:	e8 9b ce 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << ": device connected, PORTSC=" << base::hex << (uint64_t)portsc;
ffffffff80016325:	89 df                	mov    %ebx,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80016327:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8001632c:	e8 5f 41 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80016331:	48 89 c7             	mov    %rax,%rdi
ffffffff80016334:	e8 87 ce 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80016339:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80016340:	e8 7b ce 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>

            // Reset the port: preserve power, clear change bits, set port reset
            WriteOp(OP_PORTSC_BASE + port * OP_PORTSC_STRIDE,
                    (portsc & PORTSC_PRESERVE) | PORTSC_PR | PORTSC_CHANGE_BITS);
ffffffff80016345:	89 d8                	mov    %ebx,%eax
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff80016347:	48 8b 15 02 17 13 00 	mov    0x131702(%rip),%rdx        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
            g_kernelLogDepth--;
ffffffff8001634e:	83 2d 4f 91 1c 00 01 	subl   $0x1,0x1c914f(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
                    (portsc & PORTSC_PRESERVE) | PORTSC_PR | PORTSC_CHANGE_BITS);
ffffffff80016355:	25 00 02 00 00       	and    $0x200,%eax
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff8001635a:	bb a0 86 01 00       	mov    $0x186a0,%ebx
            WriteOp(OP_PORTSC_BASE + port * OP_PORTSC_STRIDE,
ffffffff8001635f:	0d 10 00 fe 00       	or     $0xfe0010,%eax
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff80016364:	4c 01 e2             	add    %r12,%rdx
ffffffff80016367:	89 02                	mov    %eax,(%rdx)

            // Wait for Port Reset Change (PRC) to be set
            bool resetDone = false;
            for (uint32_t i = 0; i < 100000; i++) {
ffffffff80016369:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
                PollEvents();
ffffffff80016370:	e8 db e3 ff ff       	call   ffffffff80014750 <_ZN7Drivers3USB4Xhci10PollEventsEv>
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff80016375:	48 8b 05 d4 16 13 00 	mov    0x1316d4(%rip),%rax        # ffffffff80147a50 <_ZN7Drivers3USB4XhciL8g_opBaseE>
ffffffff8001637c:	4c 01 e0             	add    %r12,%rax
ffffffff8001637f:	8b 10                	mov    (%rax),%edx
                uint32_t ps = ReadOp(OP_PORTSC_BASE + port * OP_PORTSC_STRIDE);
                if (ps & PORTSC_PRC) {
ffffffff80016381:	81 e2 00 00 20 00    	and    $0x200000,%edx
ffffffff80016387:	0f 85 c3 01 00 00    	jne    ffffffff80016550 <_ZN7Drivers3USB4Xhci10InitializeEv+0x1150>
ffffffff8001638d:	b8 64 00 00 00       	mov    $0x64,%eax
ffffffff80016392:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80016399:	00 00 00 00 
ffffffff8001639d:	0f 1f 00             	nopl   (%rax)
                    resetDone = true;
                    break;
                }
                for (int j = 0; j < 100; j++) {
ffffffff800163a0:	83 e8 02             	sub    $0x2,%eax
ffffffff800163a3:	75 fb                	jne    ffffffff800163a0 <_ZN7Drivers3USB4Xhci10InitializeEv+0xfa0>
            for (uint32_t i = 0; i < 100000; i++) {
ffffffff800163a5:	83 eb 01             	sub    $0x1,%ebx
ffffffff800163a8:	75 c6                	jne    ffffffff80016370 <_ZN7Drivers3USB4Xhci10InitializeEv+0xf70>
            Print(string);
ffffffff800163aa:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff800163b1:	83 05 ec 90 1c 00 01 	addl   $0x1,0x1c90ec(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800163b8:	e8 03 ce 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800163bd:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800163c4:	e8 f7 cd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800163c9:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800163d0:	e8 eb cd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800163d5:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff800163dc:	e8 df cd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800163e1:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800163e8:	e8 d3 cd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800163ed:	48 c7 c7 b0 a3 02 80 	mov    $0xffffffff8002a3b0,%rdi
ffffffff800163f4:	e8 c7 cd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800163f9:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800163fe:	4c 89 f7             	mov    %r14,%rdi
ffffffff80016401:	e8 8a 40 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80016406:	48 89 c7             	mov    %rax,%rdi
ffffffff80016409:	e8 b2 cd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001640e:	48 c7 c7 6e b4 02 80 	mov    $0xffffffff8002b46e,%rdi
ffffffff80016415:	e8 a6 cd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001641a:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80016421:	e8 9a cd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80016426:	8b 05 78 90 1c 00    	mov    0x1c9078(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        for (uint32_t port = 0; port < g_maxPorts; port++) {
ffffffff8001642c:	44 3b 2d 05 16 13 00 	cmp    0x131605(%rip),%r13d        # ffffffff80147a38 <_ZN7Drivers3USB4XhciL10g_maxPortsE>
ffffffff80016433:	8d 50 ff             	lea    -0x1(%rax),%edx
ffffffff80016436:	89 15 68 90 1c 00    	mov    %edx,0x1c9068(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001643c:	0f 82 4b fe ff ff    	jb     ffffffff8001628d <_ZN7Drivers3USB4Xhci10InitializeEv+0xe8d>
            Print(string);
ffffffff80016442:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff80016449:	89 05 55 90 1c 00    	mov    %eax,0x1c9055(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

            // Enumerate the device (port IDs are 1-based)
            UsbDevice::EnumerateDevice(port + 1, speed);
        }

        g_bootScanComplete = true;
ffffffff8001644f:	c6 05 2a 16 13 00 01 	movb   $0x1,0x13162a(%rip)        # ffffffff80147a80 <_ZN7Drivers3USB4XhciL18g_bootScanCompleteE>
            Print(string);
ffffffff80016456:	e8 65 cd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001645b:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80016462:	e8 59 cd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016467:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001646e:	e8 4d cd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016473:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001647a:	e8 41 cd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001647f:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80016486:	e8 35 cd 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001648b:	48 c7 c7 ea b5 02 80 	mov    $0xffffffff8002b5ea,%rdi
ffffffff80016492:	eb 78                	jmp    ffffffff8001650c <_ZN7Drivers3USB4Xhci10InitializeEv+0x110c>
ffffffff80016494:	48 8b 03             	mov    (%rbx),%rax
            if (devices[i].ClassCode == PCI_CLASS_SERIAL &&
ffffffff80016497:	4c 89 e2             	mov    %r12,%rdx
ffffffff8001649a:	48 c1 e2 04          	shl    $0x4,%rdx
                devices[i].SubClass == PCI_SUBCLASS_USB &&
ffffffff8001649e:	80 7c 10 0a 0c       	cmpb   $0xc,0xa(%rax,%rdx,1)
ffffffff800164a3:	0f 85 e7 ef ff ff    	jne    ffffffff80015490 <_ZN7Drivers3USB4Xhci10InitializeEv+0x90>
ffffffff800164a9:	4c 89 e2             	mov    %r12,%rdx
ffffffff800164ac:	48 c1 e2 04          	shl    $0x4,%rdx
ffffffff800164b0:	48 01 c2             	add    %rax,%rdx
            if (devices[i].ClassCode == PCI_CLASS_SERIAL &&
ffffffff800164b3:	80 7a 0b 03          	cmpb   $0x3,0xb(%rdx)
ffffffff800164b7:	0f 85 d3 ef ff ff    	jne    ffffffff80015490 <_ZN7Drivers3USB4Xhci10InitializeEv+0x90>
ffffffff800164bd:	e9 03 f1 ff ff       	jmp    ffffffff800155c5 <_ZN7Drivers3USB4Xhci10InitializeEv+0x1c5>
ffffffff800164c2:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff800164c9:	83 05 d4 8f 1c 00 01 	addl   $0x1,0x1c8fd4(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800164d0:	e8 eb cc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800164d5:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800164dc:	e8 df cc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800164e1:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800164e8:	e8 d3 cc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800164ed:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff800164f4:	e8 c7 cc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800164f9:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80016500:	e8 bb cc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016505:	48 c7 c7 7d b4 02 80 	mov    $0xffffffff8002b47d,%rdi
ffffffff8001650c:	e8 af cc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016511:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80016518:	e8 a3 cc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001651d:	8b 05 81 8f 1c 00    	mov    0x1c8f81(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80016523:	83 e8 01             	sub    $0x1,%eax
ffffffff80016526:	89 05 78 8f 1c 00    	mov    %eax,0x1c8f78(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        KernelLogStream(OK, "xHCI") << "Initialization complete";
    }
ffffffff8001652c:	48 83 c4 18          	add    $0x18,%rsp
ffffffff80016530:	5b                   	pop    %rbx
ffffffff80016531:	41 5c                	pop    %r12
ffffffff80016533:	41 5d                	pop    %r13
ffffffff80016535:	41 5e                	pop    %r14
ffffffff80016537:	41 5f                	pop    %r15
ffffffff80016539:	5d                   	pop    %rbp
ffffffff8001653a:	c3                   	ret
ffffffff8001653b:	4c 89 e2             	mov    %r12,%rdx
ffffffff8001653e:	48 c1 e2 04          	shl    $0x4,%rdx
ffffffff80016542:	48 01 c2             	add    %rax,%rdx
ffffffff80016545:	e9 7b f0 ff ff       	jmp    ffffffff800155c5 <_ZN7Drivers3USB4Xhci10InitializeEv+0x1c5>
ffffffff8001654a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        return *(volatile uint32_t*)(g_opBase + reg);
ffffffff80016550:	8b 10                	mov    (%rax),%edx
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff80016552:	49 c7 c4 70 b2 02 80 	mov    $0xffffffff8002b270,%r12
            uint32_t speed = (portsc >> 10) & 0xF;
ffffffff80016559:	89 d3                	mov    %edx,%ebx
                    (portsc & PORTSC_PRESERVE) | PORTSC_CHANGE_BITS);
ffffffff8001655b:	81 e2 00 02 00 00    	and    $0x200,%edx
            uint32_t speed = (portsc >> 10) & 0xF;
ffffffff80016561:	c1 eb 0a             	shr    $0xa,%ebx
            WriteOp(OP_PORTSC_BASE + port * OP_PORTSC_STRIDE,
ffffffff80016564:	81 ca 00 00 fe 00    	or     $0xfe0000,%edx
            uint32_t speed = (portsc >> 10) & 0xF;
ffffffff8001656a:	83 e3 0f             	and    $0xf,%ebx
        *(volatile uint32_t*)(g_opBase + reg) = value;
ffffffff8001656d:	89 10                	mov    %edx,(%rax)
            switch (speed) {
ffffffff8001656f:	8d 43 ff             	lea    -0x1(%rbx),%eax
ffffffff80016572:	83 f8 03             	cmp    $0x3,%eax
ffffffff80016575:	77 08                	ja     ffffffff8001657f <_ZN7Drivers3USB4Xhci10InitializeEv+0x117f>
ffffffff80016577:	4c 8b 24 c5 60 dd 02 	mov    -0x7ffd22a0(,%rax,8),%r12
ffffffff8001657e:	80 
            Print(string);
ffffffff8001657f:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff80016586:	83 05 17 8f 1c 00 01 	addl   $0x1,0x1c8f17(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001658d:	e8 2e cc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016592:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80016599:	e8 22 cc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001659e:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800165a5:	e8 16 cc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800165aa:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff800165b1:	e8 0a cc 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800165b6:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800165bd:	e8 fe cb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800165c2:	48 c7 c7 b0 a3 02 80 	mov    $0xffffffff8002a3b0,%rdi
ffffffff800165c9:	e8 f2 cb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800165ce:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800165d3:	4c 89 f7             	mov    %r14,%rdi
ffffffff800165d6:	e8 b5 3e 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800165db:	48 89 c7             	mov    %rax,%rdi
ffffffff800165de:	e8 dd cb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800165e3:	48 c7 c7 d1 b5 02 80 	mov    $0xffffffff8002b5d1,%rdi
ffffffff800165ea:	e8 d1 cb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800165ef:	4c 89 e7             	mov    %r12,%rdi
ffffffff800165f2:	e8 c9 cb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800165f7:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800165fe:	e8 bd cb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80016603:	83 2d 9a 8e 1c 00 01 	subl   $0x1,0x1c8e9a(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    asm volatile("pushfq; pop %0" : "=r"(flags));
ffffffff8001660a:	9c                   	pushf
ffffffff8001660b:	5a                   	pop    %rdx
    if (flags & (1 << 9)) {
ffffffff8001660c:	b8 10 27 00 00       	mov    $0x2710,%eax
ffffffff80016611:	80 e6 02             	and    $0x2,%dh
ffffffff80016614:	75 23                	jne    ffffffff80016639 <_ZN7Drivers3USB4Xhci10InitializeEv+0x1239>
            asm volatile("outb %%al, $0x80" ::: "memory");
ffffffff80016616:	e6 80                	out    %al,$0x80
ffffffff80016618:	e6 80                	out    %al,$0x80
        for (uint64_t i = 0; i < ms * 1000; i++) {
ffffffff8001661a:	48 83 e8 02          	sub    $0x2,%rax
ffffffff8001661e:	75 f6                	jne    ffffffff80016616 <_ZN7Drivers3USB4Xhci10InitializeEv+0x1216>
            UsbDevice::EnumerateDevice(port + 1, speed);
ffffffff80016620:	41 0f b6 fd          	movzbl %r13b,%edi
ffffffff80016624:	89 de                	mov    %ebx,%esi
ffffffff80016626:	e8 a5 c9 ff ff       	call   ffffffff80012fd0 <_ZN7Drivers3USB9UsbDevice15EnumerateDeviceEhj>
            g_kernelLogDepth++;
ffffffff8001662b:	8b 15 73 8e 1c 00    	mov    0x1c8e73(%rip),%edx        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80016631:	8d 42 01             	lea    0x1(%rdx),%eax
ffffffff80016634:	e9 47 fc ff ff       	jmp    ffffffff80016280 <_ZN7Drivers3USB4Xhci10InitializeEv+0xe80>
        uint64_t start = Timekeeping::GetMilliseconds();
ffffffff80016639:	e8 d2 cf 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff8001663e:	49 89 c4             	mov    %rax,%r12
        while (Timekeeping::GetMilliseconds() - start < ms) {
ffffffff80016641:	eb 02                	jmp    ffffffff80016645 <_ZN7Drivers3USB4Xhci10InitializeEv+0x1245>
            asm volatile("pause" ::: "memory");
ffffffff80016643:	f3 90                	pause
        while (Timekeeping::GetMilliseconds() - start < ms) {
ffffffff80016645:	e8 c6 cf 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff8001664a:	4c 29 e0             	sub    %r12,%rax
ffffffff8001664d:	48 83 f8 09          	cmp    $0x9,%rax
ffffffff80016651:	76 f0                	jbe    ffffffff80016643 <_ZN7Drivers3USB4Xhci10InitializeEv+0x1243>
ffffffff80016653:	eb cb                	jmp    ffffffff80016620 <_ZN7Drivers3USB4Xhci10InitializeEv+0x1220>
        uint64_t start = Timekeeping::GetMilliseconds();
ffffffff80016655:	e8 b6 cf 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff8001665a:	48 89 c3             	mov    %rax,%rbx
        while (Timekeeping::GetMilliseconds() - start < ms) {
ffffffff8001665d:	eb 02                	jmp    ffffffff80016661 <_ZN7Drivers3USB4Xhci10InitializeEv+0x1261>
            asm volatile("pause" ::: "memory");
ffffffff8001665f:	f3 90                	pause
        while (Timekeeping::GetMilliseconds() - start < ms) {
ffffffff80016661:	e8 aa cf 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff80016666:	48 29 d8             	sub    %rbx,%rax
ffffffff80016669:	48 83 f8 13          	cmp    $0x13,%rax
ffffffff8001666d:	76 f0                	jbe    ffffffff8001665f <_ZN7Drivers3USB4Xhci10InitializeEv+0x125f>
ffffffff8001666f:	e9 7e fb ff ff       	jmp    ffffffff800161f2 <_ZN7Drivers3USB4Xhci10InitializeEv+0xdf2>
            Print(string);
ffffffff80016674:	e8 47 cb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016679:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80016680:	e8 3b cb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016685:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001668c:	e8 2f cb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016691:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff80016698:	e8 23 cb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001669d:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800166a4:	e8 17 cb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800166a9:	48 c7 c7 68 ae 02 80 	mov    $0xffffffff8002ae68,%rdi
ffffffff800166b0:	e8 0b cb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800166b5:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800166bc:	e8 ff ca 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800166c1:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
ffffffff800166c8:	e8 f3 ca 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800166cd:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800166d4:	e8 e7 ca 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800166d9:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800166e0:	e8 db ca 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800166e5:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff800166ec:	e8 cf ca 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800166f1:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800166f8:	e8 c3 ca 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800166fd:	48 c7 c7 e0 cb 02 80 	mov    $0xffffffff8002cbe0,%rdi
ffffffff80016704:	e9 c3 f9 ff ff       	jmp    ffffffff800160cc <_ZN7Drivers3USB4Xhci10InitializeEv+0xccc>
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff80016709:	48 8b 3d a0 62 13 00 	mov    0x1362a0(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff80016710:	4e 8d 3c ed 00 00 00 	lea    0x0(,%r13,8),%r15
ffffffff80016717:	00 
            g_scratchpadBufs = (uint64_t*)AllocateDmaBuffer(spArrayPhys);
ffffffff80016718:	45 31 e4             	xor    %r12d,%r12d
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff8001671b:	e8 f0 4a 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
            g_scratchpadBufs = (uint64_t*)AllocateDmaBuffer(spArrayPhys);
ffffffff80016720:	48 89 05 89 0b 13 00 	mov    %rax,0x130b89(%rip)        # ffffffff801472b0 <_ZN7Drivers3USB4XhciL16g_scratchpadBufsE>
ffffffff80016727:	49 89 c6             	mov    %rax,%r14
ffffffff8001672a:	4c 2b 35 77 62 13 00 	sub    0x136277(%rip),%r14        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        void* virt = Memory::g_pfa->AllocateZeroed();
ffffffff80016731:	48 8b 3d 78 62 13 00 	mov    0x136278(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff80016738:	e8 d3 4a 00 00       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
                g_scratchpadBufs[i] = bufPhys;
ffffffff8001673d:	48 8b 15 6c 0b 13 00 	mov    0x130b6c(%rip),%rdx        # ffffffff801472b0 <_ZN7Drivers3USB4XhciL16g_scratchpadBufsE>
ffffffff80016744:	48 2b 05 5d 62 13 00 	sub    0x13625d(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001674b:	4a 89 04 22          	mov    %rax,(%rdx,%r12,1)
            for (uint32_t i = 0; i < maxScratchpadBufs; i++) {
ffffffff8001674f:	49 83 c4 08          	add    $0x8,%r12
ffffffff80016753:	4d 39 fc             	cmp    %r15,%r12
ffffffff80016756:	75 d9                	jne    ffffffff80016731 <_ZN7Drivers3USB4Xhci10InitializeEv+0x1331>
            g_dcbaa[0] = spArrayPhys;
ffffffff80016758:	48 8b 05 d1 12 13 00 	mov    0x1312d1(%rip),%rax        # ffffffff80147a30 <_ZN7Drivers3USB4Xhci7g_dcbaaE>
ffffffff8001675f:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff80016766:	83 05 37 8d 1c 00 01 	addl   $0x1,0x1c8d37(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001676d:	4c 89 30             	mov    %r14,(%rax)
            Print(string);
ffffffff80016770:	e8 4b ca 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016775:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001677c:	e8 3f ca 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016781:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80016788:	e8 33 ca 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001678d:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80016794:	e8 27 ca 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016799:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800167a0:	e8 1b ca 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800167a5:	48 c7 c7 47 b5 02 80 	mov    $0xffffffff8002b547,%rdi
ffffffff800167ac:	e8 0f ca 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800167b1:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800167b6:	4c 89 ef             	mov    %r13,%rdi
ffffffff800167b9:	e8 d2 3c 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800167be:	48 89 c7             	mov    %rax,%rdi
ffffffff800167c1:	e8 fa c9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800167c6:	48 c7 c7 52 b5 02 80 	mov    $0xffffffff8002b552,%rdi
ffffffff800167cd:	e8 ee c9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800167d2:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800167d9:	e8 e2 c9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff800167de:	83 2d bf 8c 1c 00 01 	subl   $0x1,0x1c8cbf(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800167e5:	e9 d6 f4 ff ff       	jmp    ffffffff80015cc0 <_ZN7Drivers3USB4Xhci10InitializeEv+0x8c0>
            Print(string);
ffffffff800167ea:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff800167f1:	89 05 ad 8c 1c 00    	mov    %eax,0x1c8cad(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800167f7:	e8 c4 c9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800167fc:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80016803:	e8 b8 c9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016808:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001680f:	e8 ac c9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016814:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8001681b:	e8 a0 c9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016820:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80016827:	e8 94 c9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001682c:	48 c7 c7 b8 cb 02 80 	mov    $0xffffffff8002cbb8,%rdi
ffffffff80016833:	e8 88 c9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016838:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001683f:	e8 7c c9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80016844:	8b 05 5a 8c 1c 00    	mov    0x1c8c5a(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001684a:	e9 47 f3 ff ff       	jmp    ffffffff80015b96 <_ZN7Drivers3USB4Xhci10InitializeEv+0x796>
            Print(string);
ffffffff8001684f:	48 c7 c7 04 b4 02 80 	mov    $0xffffffff8002b404,%rdi
            g_kernelLogDepth++;
ffffffff80016856:	89 05 48 8c 1c 00    	mov    %eax,0x1c8c48(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001685c:	e8 5f c9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016861:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80016868:	e8 53 c9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001686d:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80016874:	e8 47 c9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016879:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff80016880:	e8 3b c9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016885:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001688c:	e8 2f c9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016891:	48 c7 c7 f2 b4 02 80 	mov    $0xffffffff8002b4f2,%rdi
ffffffff80016898:	e8 23 c9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001689d:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800168a4:	e8 17 c9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff800168a9:	8b 05 f5 8b 1c 00    	mov    0x1c8bf5(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800168af:	e9 02 f2 ff ff       	jmp    ffffffff80015ab6 <_ZN7Drivers3USB4Xhci10InitializeEv+0x6b6>
            uint32_t bar1 = Pci::LegacyRead32(foundDev->Bus, foundDev->Device, foundDev->Function, PCI_REG_BAR1);
ffffffff800168b4:	0f b6 53 04          	movzbl 0x4(%rbx),%edx
ffffffff800168b8:	0f b6 73 03          	movzbl 0x3(%rbx),%esi
ffffffff800168bc:	b9 14 00 00 00       	mov    $0x14,%ecx
ffffffff800168c1:	0f b6 7b 02          	movzbl 0x2(%rbx),%edi
ffffffff800168c5:	e8 36 92 00 00       	call   ffffffff8001fb00 <_ZN3Pci12LegacyRead32Ehhhh>
            mmioPhys |= ((uint64_t)bar1 << 32);
ffffffff800168ca:	48 c1 e0 20          	shl    $0x20,%rax
ffffffff800168ce:	49 09 c5             	or     %rax,%r13
ffffffff800168d1:	e9 4b ee ff ff       	jmp    ffffffff80015721 <_ZN7Drivers3USB4Xhci10InitializeEv+0x321>
ffffffff800168d6:	49 c1 e4 04          	shl    $0x4,%r12
ffffffff800168da:	4a 8d 1c 20          	lea    (%rax,%r12,1),%rbx
ffffffff800168de:	e9 48 ed ff ff       	jmp    ffffffff8001562b <_ZN7Drivers3USB4Xhci10InitializeEv+0x22b>
ffffffff800168e3:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800168ea:	00 00 00 
ffffffff800168ed:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800168f4:	00 00 00 
ffffffff800168f7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff800168fe:	00 00 

ffffffff80016900 <_ZN2Fs7Ramdisk10InitializeEPvm>:
            prefix++;
        }
        return true;
    }

    void Initialize(void* moduleData, uint64_t moduleSize) {
ffffffff80016900:	55                   	push   %rbp
ffffffff80016901:	48 89 e5             	mov    %rsp,%rbp
ffffffff80016904:	41 57                	push   %r15
ffffffff80016906:	41 56                	push   %r14
ffffffff80016908:	41 55                	push   %r13
ffffffff8001690a:	41 54                	push   %r12
ffffffff8001690c:	49 89 f4             	mov    %rsi,%r12
ffffffff8001690f:	53                   	push   %rbx
ffffffff80016910:	48 89 fb             	mov    %rdi,%rbx
            Print(string);
ffffffff80016913:	48 c7 c7 3f b6 02 80 	mov    $0xffffffff8002b63f,%rdi
ffffffff8001691a:	48 83 ec 78          	sub    $0x78,%rsp
            g_kernelLogDepth++;
ffffffff8001691e:	83 05 7f 8b 1c 00 01 	addl   $0x1,0x1c8b7f(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80016925:	e8 96 c8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001692a:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80016931:	e8 8a c8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016936:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001693d:	e8 7e c8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016942:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80016949:	e8 72 c8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001694e:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80016955:	e8 66 c8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001695a:	48 c7 c7 47 b6 02 80 	mov    $0xffffffff8002b647,%rdi
ffffffff80016961:	e8 5a c8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80016966:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001696b:	4c 89 e7             	mov    %r12,%rdi
ffffffff8001696e:	e8 1d 3b 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80016973:	48 89 c7             	mov    %rax,%rdi
ffffffff80016976:	e8 45 c8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001697b:	48 c7 c7 5f b6 02 80 	mov    $0xffffffff8002b65f,%rdi
ffffffff80016982:	e8 39 c8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016987:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001698e:	e8 2d c8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80016993:	44 8b 05 0a 8b 1c 00 	mov    0x1c8b0a(%rip),%r8d        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        Kt::KernelLogStream(Kt::OK, "Ramdisk") << "Parsing USTAR archive (" << moduleSize << " bytes)";

        uint8_t* ptr = (uint8_t*)moduleData;
        uint8_t* end = ptr + moduleSize;
ffffffff8001699a:	4a 8d 34 23          	lea    (%rbx,%r12,1),%rsi
        fileCount = 0;

        while (ptr + 512 <= end && fileCount < MaxFiles) {
ffffffff8001699e:	48 8d 93 00 02 00 00 	lea    0x200(%rbx),%rdx
        fileCount = 0;
ffffffff800169a5:	c7 05 d5 10 13 00 00 	movl   $0x0,0x1310d5(%rip)        # ffffffff80147a84 <_ZN2Fs7RamdiskL9fileCountE>
ffffffff800169ac:	00 00 00 
ffffffff800169af:	41 8d 40 ff          	lea    -0x1(%r8),%eax
ffffffff800169b3:	89 05 eb 8a 1c 00    	mov    %eax,0x1c8aeb(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        while (ptr + 512 <= end && fileCount < MaxFiles) {
ffffffff800169b9:	48 39 d6             	cmp    %rdx,%rsi
ffffffff800169bc:	0f 82 c9 01 00 00    	jb     ffffffff80016b8b <_ZN2Fs7Ramdisk10InitializeEPvm+0x28b>
ffffffff800169c2:	31 c9                	xor    %ecx,%ecx
ffffffff800169c4:	31 ff                	xor    %edi,%edi
ffffffff800169c6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800169cd:	00 00 00 
ffffffff800169d0:	48 89 d8             	mov    %rbx,%rax
ffffffff800169d3:	eb 18                	jmp    ffffffff800169ed <_ZN2Fs7Ramdisk10InitializeEPvm+0xed>
ffffffff800169d5:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800169dc:	00 00 00 00 
            // Check for end-of-archive (two consecutive zero blocks)
            bool allZero = true;
            for (int i = 0; i < 512; i++) {
ffffffff800169e0:	48 83 c0 01          	add    $0x1,%rax
ffffffff800169e4:	48 39 d0             	cmp    %rdx,%rax
ffffffff800169e7:	0f 84 93 01 00 00    	je     ffffffff80016b80 <_ZN2Fs7Ramdisk10InitializeEPvm+0x280>
                if (ptr[i] != 0) {
ffffffff800169ed:	80 38 00             	cmpb   $0x0,(%rax)
ffffffff800169f0:	74 ee                	je     ffffffff800169e0 <_ZN2Fs7Ramdisk10InitializeEPvm+0xe0>
            }
            if (allZero) break;

            // Verify USTAR magic at offset 257
            const char* magic = (const char*)(ptr + 257);
            if (magic[0] != 'u' || magic[1] != 's' || magic[2] != 't' ||
ffffffff800169f2:	80 bb 01 01 00 00 75 	cmpb   $0x75,0x101(%rbx)
ffffffff800169f9:	0f 85 a6 02 00 00    	jne    ffffffff80016ca5 <_ZN2Fs7Ramdisk10InitializeEPvm+0x3a5>
ffffffff800169ff:	80 bb 02 01 00 00 73 	cmpb   $0x73,0x102(%rbx)
ffffffff80016a06:	0f 85 99 02 00 00    	jne    ffffffff80016ca5 <_ZN2Fs7Ramdisk10InitializeEPvm+0x3a5>
ffffffff80016a0c:	80 bb 03 01 00 00 74 	cmpb   $0x74,0x103(%rbx)
ffffffff80016a13:	0f 85 8c 02 00 00    	jne    ffffffff80016ca5 <_ZN2Fs7Ramdisk10InitializeEPvm+0x3a5>
ffffffff80016a19:	80 bb 04 01 00 00 61 	cmpb   $0x61,0x104(%rbx)
ffffffff80016a20:	0f 85 7f 02 00 00    	jne    ffffffff80016ca5 <_ZN2Fs7Ramdisk10InitializeEPvm+0x3a5>
                magic[3] != 'a' || magic[4] != 'r') {
ffffffff80016a26:	80 bb 05 01 00 00 72 	cmpb   $0x72,0x105(%rbx)
ffffffff80016a2d:	0f 85 72 02 00 00    	jne    ffffffff80016ca5 <_ZN2Fs7Ramdisk10InitializeEPvm+0x3a5>
ffffffff80016a33:	4c 8d 53 7c          	lea    0x7c(%rbx),%r10
ffffffff80016a37:	4c 8d 9b 88 00 00 00 	lea    0x88(%rbx),%r11
        uint64_t result = 0;
ffffffff80016a3e:	45 31 c9             	xor    %r9d,%r9d
ffffffff80016a41:	eb 2f                	jmp    ffffffff80016a72 <_ZN2Fs7Ramdisk10InitializeEPvm+0x172>
ffffffff80016a43:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80016a4a:	00 00 00 00 
ffffffff80016a4e:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80016a55:	00 00 00 00 
ffffffff80016a59:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            result = result * 8 + (str[i] - '0');
ffffffff80016a60:	83 e8 30             	sub    $0x30,%eax
        for (int i = 0; i < len && str[i] != '\0' && str[i] != ' '; i++) {
ffffffff80016a63:	49 83 c2 01          	add    $0x1,%r10
            result = result * 8 + (str[i] - '0');
ffffffff80016a67:	48 98                	cltq
ffffffff80016a69:	4e 8d 0c c8          	lea    (%rax,%r9,8),%r9
        for (int i = 0; i < len && str[i] != '\0' && str[i] != ' '; i++) {
ffffffff80016a6d:	4d 39 da             	cmp    %r11,%r10
ffffffff80016a70:	74 08                	je     ffffffff80016a7a <_ZN2Fs7Ramdisk10InitializeEPvm+0x17a>
ffffffff80016a72:	41 0f be 02          	movsbl (%r10),%eax
ffffffff80016a76:	a8 df                	test   $0xdf,%al
ffffffff80016a78:	75 e6                	jne    ffffffff80016a60 <_ZN2Fs7Ramdisk10InitializeEPvm+0x160>
            // File name at offset 0 (100 bytes)
            const char* name = (const char*)ptr;
            // File size at offset 124 (12 bytes, octal ASCII)
            uint64_t size = OctalToUint((const char*)(ptr + 124), 12);
            // Type flag at offset 156
            char typeFlag = (char)ptr[156];
ffffffff80016a7a:	4c 63 e1             	movslq %ecx,%r12
ffffffff80016a7d:	44 0f b6 ab 9c 00 00 	movzbl 0x9c(%rbx),%r13d
ffffffff80016a84:	00 
ffffffff80016a85:	31 c0                	xor    %eax,%eax
ffffffff80016a87:	4d 89 e3             	mov    %r12,%r11
ffffffff80016a8a:	49 c1 e3 04          	shl    $0x4,%r11
ffffffff80016a8e:	4d 01 e3             	add    %r12,%r11
ffffffff80016a91:	49 c1 e3 03          	shl    $0x3,%r11
ffffffff80016a95:	eb 1f                	jmp    ffffffff80016ab6 <_ZN2Fs7Ramdisk10InitializeEPvm+0x1b6>
ffffffff80016a97:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff80016a9e:	00 00 
            FileEntry& entry = fileTable[fileCount];

            // Copy name
            int nameLen = 0;
            while (nameLen < MaxNameLen - 1 && name[nameLen] != '\0') {
                entry.name[nameLen] = name[nameLen];
ffffffff80016aa0:	45 88 94 03 a0 7a 14 	mov    %r10b,-0x7feb8560(%r11,%rax,1)
ffffffff80016aa7:	80 
            while (nameLen < MaxNameLen - 1 && name[nameLen] != '\0') {
ffffffff80016aa8:	48 83 c0 01          	add    $0x1,%rax
ffffffff80016aac:	48 83 f8 63          	cmp    $0x63,%rax
ffffffff80016ab0:	0f 84 e5 01 00 00    	je     ffffffff80016c9b <_ZN2Fs7Ramdisk10InitializeEPvm+0x39b>
ffffffff80016ab6:	44 0f b6 14 03       	movzbl (%rbx,%rax,1),%r10d
ffffffff80016abb:	45 84 d2             	test   %r10b,%r10b
ffffffff80016abe:	75 e0                	jne    ffffffff80016aa0 <_ZN2Fs7Ramdisk10InitializeEPvm+0x1a0>
                nameLen++;
            }
            entry.name[nameLen] = '\0';
ffffffff80016ac0:	4d 89 e2             	mov    %r12,%r10
ffffffff80016ac3:	48 98                	cltq
ffffffff80016ac5:	49 c1 e2 04          	shl    $0x4,%r10
ffffffff80016ac9:	4d 01 e2             	add    %r12,%r10
ffffffff80016acc:	4e 8d 34 d5 a0 7a 14 	lea    -0x7feb8560(,%r10,8),%r14
ffffffff80016ad3:	80 
ffffffff80016ad4:	41 c6 04 06 00       	movb   $0x0,(%r14,%rax,1)

            // Strip leading "./" if present
            if (entry.name[0] == '.' && entry.name[1] == '/') {
ffffffff80016ad9:	66 42 81 3c d5 a0 7a 	cmpw   $0x2f2e,-0x7feb8560(,%r10,8)
ffffffff80016ae0:	14 80 2e 2f 
ffffffff80016ae4:	0f 84 36 01 00 00    	je     ffffffff80016c20 <_ZN2Fs7Ramdisk10InitializeEPvm+0x320>
                for (int i = 0; i <= dstIdx; i++) {
                    entry.name[i] = temp[i];
                }
            }

            entry.isDirectory = (typeFlag == '5');
ffffffff80016aea:	4c 89 e0             	mov    %r12,%rax
ffffffff80016aed:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff80016af1:	4c 01 e0             	add    %r12,%rax
ffffffff80016af4:	41 80 fd 35          	cmp    $0x35,%r13b
ffffffff80016af8:	4c 8d 14 c5 a0 7a 14 	lea    -0x7feb8560(,%rax,8),%r10
ffffffff80016aff:	80 
ffffffff80016b00:	0f 94 04 c5 20 7b 14 	sete   -0x7feb84e0(,%rax,8)
ffffffff80016b07:	80 
            entry.size = size;
ffffffff80016b08:	4d 89 4a 70          	mov    %r9,0x70(%r10)
            entry.capacity = size;
ffffffff80016b0c:	4d 89 4a 78          	mov    %r9,0x78(%r10)
            }

            fileCount++;

            // Advance past header + data (rounded up to 512-byte blocks)
            uint64_t dataBlocks = (size + 511) / 512;
ffffffff80016b10:	49 81 c1 ff 01 00 00 	add    $0x1ff,%r9
            ptr += 512 + dataBlocks * 512;
ffffffff80016b17:	49 81 e1 00 fe ff ff 	and    $0xfffffffffffffe00,%r9
            if (entry.name[0] == '\0' || (entry.name[0] == '.' && entry.name[1] == '\0')) {
ffffffff80016b1e:	80 3c c5 a0 7a 14 80 	cmpb   $0x0,-0x7feb8560(,%rax,8)
ffffffff80016b25:	00 
            entry.heapAllocated = false;
ffffffff80016b26:	41 c6 82 81 00 00 00 	movb   $0x0,0x81(%r10)
ffffffff80016b2d:	00 
            entry.data = ptr + 512;
ffffffff80016b2e:	49 89 52 68          	mov    %rdx,0x68(%r10)
            ptr += 512 + dataBlocks * 512;
ffffffff80016b32:	4a 8d 9c 0b 00 02 00 	lea    0x200(%rbx,%r9,1),%rbx
ffffffff80016b39:	00 
            if (entry.name[0] == '\0' || (entry.name[0] == '.' && entry.name[1] == '\0')) {
ffffffff80016b3a:	74 34                	je     ffffffff80016b70 <_ZN2Fs7Ramdisk10InitializeEPvm+0x270>
ffffffff80016b3c:	66 83 3c c5 a0 7a 14 	cmpw   $0x2e,-0x7feb8560(,%rax,8)
ffffffff80016b43:	80 2e 
ffffffff80016b45:	74 29                	je     ffffffff80016b70 <_ZN2Fs7Ramdisk10InitializeEPvm+0x270>
        while (ptr + 512 <= end && fileCount < MaxFiles) {
ffffffff80016b47:	48 8d 93 00 02 00 00 	lea    0x200(%rbx),%rdx
            fileCount++;
ffffffff80016b4e:	83 c1 01             	add    $0x1,%ecx
        while (ptr + 512 <= end && fileCount < MaxFiles) {
ffffffff80016b51:	48 39 d6             	cmp    %rdx,%rsi
ffffffff80016b54:	72 2f                	jb     ffffffff80016b85 <_ZN2Fs7Ramdisk10InitializeEPvm+0x285>
ffffffff80016b56:	81 f9 80 00 00 00    	cmp    $0x80,%ecx
ffffffff80016b5c:	0f 84 b5 01 00 00    	je     ffffffff80016d17 <_ZN2Fs7Ramdisk10InitializeEPvm+0x417>
ffffffff80016b62:	bf 01 00 00 00       	mov    $0x1,%edi
ffffffff80016b67:	e9 64 fe ff ff       	jmp    ffffffff800169d0 <_ZN2Fs7Ramdisk10InitializeEPvm+0xd0>
ffffffff80016b6c:	0f 1f 40 00          	nopl   0x0(%rax)
ffffffff80016b70:	48 8d 93 00 02 00 00 	lea    0x200(%rbx),%rdx
ffffffff80016b77:	48 39 d6             	cmp    %rdx,%rsi
ffffffff80016b7a:	0f 83 50 fe ff ff    	jae    ffffffff800169d0 <_ZN2Fs7Ramdisk10InitializeEPvm+0xd0>
ffffffff80016b80:	40 84 ff             	test   %dil,%dil
ffffffff80016b83:	74 06                	je     ffffffff80016b8b <_ZN2Fs7Ramdisk10InitializeEPvm+0x28b>
ffffffff80016b85:	89 0d f9 0e 13 00    	mov    %ecx,0x130ef9(%rip)        # ffffffff80147a84 <_ZN2Fs7RamdiskL9fileCountE>
            Print(string);
ffffffff80016b8b:	48 c7 c7 3f b6 02 80 	mov    $0xffffffff8002b63f,%rdi
            g_kernelLogDepth++;
ffffffff80016b92:	44 89 05 0b 89 1c 00 	mov    %r8d,0x1c890b(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80016b99:	e8 22 c6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016b9e:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80016ba5:	e8 16 c6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016baa:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80016bb1:	e8 0a c6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016bb6:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80016bbd:	e8 fe c5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016bc2:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80016bc9:	e8 f2 c5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016bce:	48 c7 c7 67 b6 02 80 	mov    $0xffffffff8002b667,%rdi
ffffffff80016bd5:	e8 e6 c5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::int2basestr(number, t.streamBaseType));
ffffffff80016bda:	8b 3d a4 0e 13 00    	mov    0x130ea4(%rip),%edi        # ffffffff80147a84 <_ZN2Fs7RamdiskL9fileCountE>
ffffffff80016be0:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80016be5:	e8 96 37 00 00       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
ffffffff80016bea:	48 89 c7             	mov    %rax,%rdi
ffffffff80016bed:	e8 ce c5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80016bf2:	48 c7 c7 67 be 02 80 	mov    $0xffffffff8002be67,%rdi
ffffffff80016bf9:	e8 c2 c5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016bfe:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80016c05:	e8 b6 c5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80016c0a:	83 2d 93 88 1c 00 01 	subl   $0x1,0x1c8893(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        }

        Kt::KernelLogStream(Kt::OK, "Ramdisk") << "Loaded " << fileCount << " entries";
    }
ffffffff80016c11:	48 83 c4 78          	add    $0x78,%rsp
ffffffff80016c15:	5b                   	pop    %rbx
ffffffff80016c16:	41 5c                	pop    %r12
ffffffff80016c18:	41 5d                	pop    %r13
ffffffff80016c1a:	41 5e                	pop    %r14
ffffffff80016c1c:	41 5f                	pop    %r15
ffffffff80016c1e:	5d                   	pop    %rbp
ffffffff80016c1f:	c3                   	ret
                while (entry.name[srcIdx] && dstIdx < MaxNameLen - 1) {
ffffffff80016c20:	45 0f b6 56 02       	movzbl 0x2(%r14),%r10d
ffffffff80016c25:	45 84 d2             	test   %r10b,%r10b
ffffffff80016c28:	0f 84 f8 00 00 00    	je     ffffffff80016d26 <_ZN2Fs7Ramdisk10InitializeEPvm+0x426>
ffffffff80016c2e:	b8 01 00 00 00       	mov    $0x1,%eax
ffffffff80016c33:	4c 8d bd 67 ff ff ff 	lea    -0x99(%rbp),%r15
ffffffff80016c3a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
                    temp[dstIdx++] = entry.name[srcIdx++];
ffffffff80016c40:	45 88 14 07          	mov    %r10b,(%r15,%rax,1)
                while (entry.name[srcIdx] && dstIdx < MaxNameLen - 1) {
ffffffff80016c44:	49 89 c6             	mov    %rax,%r14
ffffffff80016c47:	48 83 c0 01          	add    $0x1,%rax
ffffffff80016c4b:	45 0f b6 94 03 a1 7a 	movzbl -0x7feb855f(%r11,%rax,1),%r10d
ffffffff80016c52:	14 80 
ffffffff80016c54:	45 84 d2             	test   %r10b,%r10b
ffffffff80016c57:	75 e7                	jne    ffffffff80016c40 <_ZN2Fs7Ramdisk10InitializeEPvm+0x340>
                temp[dstIdx] = '\0';
ffffffff80016c59:	49 63 c6             	movslq %r14d,%rax
ffffffff80016c5c:	41 83 c6 01          	add    $0x1,%r14d
ffffffff80016c60:	4c 8d bd 68 ff ff ff 	lea    -0x98(%rbp),%r15
ffffffff80016c67:	c6 84 05 68 ff ff ff 	movb   $0x0,-0x98(%rbp,%rax,1)
ffffffff80016c6e:	00 
                for (int i = 0; i <= dstIdx; i++) {
ffffffff80016c6f:	4d 63 d6             	movslq %r14d,%r10
                temp[dstIdx] = '\0';
ffffffff80016c72:	31 c0                	xor    %eax,%eax
ffffffff80016c74:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80016c7b:	00 00 00 00 
ffffffff80016c7f:	90                   	nop
                    entry.name[i] = temp[i];
ffffffff80016c80:	45 0f b6 34 07       	movzbl (%r15,%rax,1),%r14d
ffffffff80016c85:	45 88 b4 03 a0 7a 14 	mov    %r14b,-0x7feb8560(%r11,%rax,1)
ffffffff80016c8c:	80 
                for (int i = 0; i <= dstIdx; i++) {
ffffffff80016c8d:	48 83 c0 01          	add    $0x1,%rax
ffffffff80016c91:	4c 39 d0             	cmp    %r10,%rax
ffffffff80016c94:	75 ea                	jne    ffffffff80016c80 <_ZN2Fs7Ramdisk10InitializeEPvm+0x380>
ffffffff80016c96:	e9 4f fe ff ff       	jmp    ffffffff80016aea <_ZN2Fs7Ramdisk10InitializeEPvm+0x1ea>
ffffffff80016c9b:	b8 63 00 00 00       	mov    $0x63,%eax
ffffffff80016ca0:	e9 1b fe ff ff       	jmp    ffffffff80016ac0 <_ZN2Fs7Ramdisk10InitializeEPvm+0x1c0>
ffffffff80016ca5:	40 84 ff             	test   %dil,%dil
ffffffff80016ca8:	74 06                	je     ffffffff80016cb0 <_ZN2Fs7Ramdisk10InitializeEPvm+0x3b0>
ffffffff80016caa:	89 0d d4 0d 13 00    	mov    %ecx,0x130dd4(%rip)        # ffffffff80147a84 <_ZN2Fs7RamdiskL9fileCountE>
            Print(string);
ffffffff80016cb0:	48 c7 c7 3f b6 02 80 	mov    $0xffffffff8002b63f,%rdi
            g_kernelLogDepth++;
ffffffff80016cb7:	44 89 05 e6 87 1c 00 	mov    %r8d,0x1c87e6(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80016cbe:	e8 fd c4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016cc3:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80016cca:	e8 f1 c4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016ccf:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80016cd6:	e8 e5 c4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016cdb:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff80016ce2:	e8 d9 c4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016ce7:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80016cee:	e8 cd c4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016cf3:	48 c7 c7 08 cc 02 80 	mov    $0xffffffff8002cc08,%rdi
ffffffff80016cfa:	e8 c1 c4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80016cff:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80016d06:	e8 b5 c4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80016d0b:	44 8b 05 92 87 1c 00 	mov    0x1c8792(%rip),%r8d        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
                break;
ffffffff80016d12:	e9 74 fe ff ff       	jmp    ffffffff80016b8b <_ZN2Fs7Ramdisk10InitializeEPvm+0x28b>
ffffffff80016d17:	c7 05 63 0d 13 00 80 	movl   $0x80,0x130d63(%rip)        # ffffffff80147a84 <_ZN2Fs7RamdiskL9fileCountE>
ffffffff80016d1e:	00 00 00 
ffffffff80016d21:	e9 65 fe ff ff       	jmp    ffffffff80016b8b <_ZN2Fs7Ramdisk10InitializeEPvm+0x28b>
                int dstIdx = 0;
ffffffff80016d26:	45 31 f6             	xor    %r14d,%r14d
ffffffff80016d29:	e9 2b ff ff ff       	jmp    ffffffff80016c59 <_ZN2Fs7Ramdisk10InitializeEPvm+0x359>
ffffffff80016d2e:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80016d35:	00 00 00 
ffffffff80016d38:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80016d3f:	00 

ffffffff80016d40 <_ZN2Fs7Ramdisk4OpenEPKc>:

    int Open(const char* path) {
        // Normalize: skip leading '/'
        if (path[0] == '/') path++;
ffffffff80016d40:	31 c0                	xor    %eax,%eax

        for (int i = 0; i < fileCount; i++) {
ffffffff80016d42:	44 8b 1d 3b 0d 13 00 	mov    0x130d3b(%rip),%r11d        # ffffffff80147a84 <_ZN2Fs7RamdiskL9fileCountE>
        if (path[0] == '/') path++;
ffffffff80016d49:	80 3f 2f             	cmpb   $0x2f,(%rdi)
    int Open(const char* path) {
ffffffff80016d4c:	49 89 fa             	mov    %rdi,%r10
        if (path[0] == '/') path++;
ffffffff80016d4f:	0f 94 c0             	sete   %al
ffffffff80016d52:	49 01 c2             	add    %rax,%r10
        for (int i = 0; i < fileCount; i++) {
ffffffff80016d55:	45 85 db             	test   %r11d,%r11d
ffffffff80016d58:	0f 8e 3a 01 00 00    	jle    ffffffff80016e98 <_ZN2Fs7Ramdisk4OpenEPKc+0x158>
    int Open(const char* path) {
ffffffff80016d5e:	55                   	push   %rbp
        while (s[n]) n++;
ffffffff80016d5f:	45 31 c0             	xor    %r8d,%r8d
        for (int i = 0; i < fileCount; i++) {
ffffffff80016d62:	45 31 c9             	xor    %r9d,%r9d
    int Open(const char* path) {
ffffffff80016d65:	48 89 e5             	mov    %rsp,%rbp
ffffffff80016d68:	53                   	push   %rbx
        while (s[n]) n++;
ffffffff80016d69:	41 0f b6 1a          	movzbl (%r10),%ebx
ffffffff80016d6d:	0f 1f 00             	nopl   (%rax)
        while (*a && *b) {
ffffffff80016d70:	41 0f b6 80 a0 7a 14 	movzbl -0x7feb8560(%r8),%eax
ffffffff80016d77:	80 
            if (StrEqual(fileTable[i].name, path)) {
ffffffff80016d78:	49 8d b8 a0 7a 14 80 	lea    -0x7feb8560(%r8),%rdi
        while (*a && *b) {
ffffffff80016d7f:	4c 89 d1             	mov    %r10,%rcx
ffffffff80016d82:	48 89 fe             	mov    %rdi,%rsi
ffffffff80016d85:	84 c0                	test   %al,%al
ffffffff80016d87:	75 1e                	jne    ffffffff80016da7 <_ZN2Fs7Ramdisk4OpenEPKc+0x67>
ffffffff80016d89:	e9 f0 00 00 00       	jmp    ffffffff80016e7e <_ZN2Fs7Ramdisk4OpenEPKc+0x13e>
ffffffff80016d8e:	66 90                	xchg   %ax,%ax
            if (*a != *b) return false;
ffffffff80016d90:	38 c2                	cmp    %al,%dl
ffffffff80016d92:	75 1e                	jne    ffffffff80016db2 <_ZN2Fs7Ramdisk4OpenEPKc+0x72>
        while (*a && *b) {
ffffffff80016d94:	0f b6 46 01          	movzbl 0x1(%rsi),%eax
            a++;
ffffffff80016d98:	48 83 c6 01          	add    $0x1,%rsi
            b++;
ffffffff80016d9c:	48 8d 51 01          	lea    0x1(%rcx),%rdx
        while (*a && *b) {
ffffffff80016da0:	84 c0                	test   %al,%al
ffffffff80016da2:	74 6c                	je     ffffffff80016e10 <_ZN2Fs7Ramdisk4OpenEPKc+0xd0>
ffffffff80016da4:	48 89 d1             	mov    %rdx,%rcx
ffffffff80016da7:	0f b6 11             	movzbl (%rcx),%edx
ffffffff80016daa:	84 d2                	test   %dl,%dl
ffffffff80016dac:	75 e2                	jne    ffffffff80016d90 <_ZN2Fs7Ramdisk4OpenEPKc+0x50>
            if (StrEqual(fileTable[i].name, path)) {
ffffffff80016dae:	38 d0                	cmp    %dl,%al
ffffffff80016db0:	74 50                	je     ffffffff80016e02 <_ZN2Fs7Ramdisk4OpenEPKc+0xc2>
ffffffff80016db2:	31 d2                	xor    %edx,%edx
ffffffff80016db4:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80016dbb:	00 00 00 00 
ffffffff80016dbf:	90                   	nop
        while (s[n]) n++;
ffffffff80016dc0:	48 89 d0             	mov    %rdx,%rax
ffffffff80016dc3:	48 8d 52 01          	lea    0x1(%rdx),%rdx
ffffffff80016dc7:	80 7c 07 01 00       	cmpb   $0x0,0x1(%rdi,%rax,1)
ffffffff80016dcc:	75 f2                	jne    ffffffff80016dc0 <_ZN2Fs7Ramdisk4OpenEPKc+0x80>
                return i;
            }
            // Also try matching with trailing slash stripped from table entry
            int entryLen = StrLen(fileTable[i].name);
            if (entryLen > 0 && fileTable[i].name[entryLen - 1] == '/') {
ffffffff80016dce:	49 63 f1             	movslq %r9d,%rsi
ffffffff80016dd1:	48 63 d0             	movslq %eax,%rdx
ffffffff80016dd4:	48 89 f1             	mov    %rsi,%rcx
ffffffff80016dd7:	48 c1 e1 04          	shl    $0x4,%rcx
ffffffff80016ddb:	48 01 f1             	add    %rsi,%rcx
ffffffff80016dde:	80 bc ca a0 7a 14 80 	cmpb   $0x2f,-0x7feb8560(%rdx,%rcx,8)
ffffffff80016de5:	2f 
ffffffff80016de6:	74 38                	je     ffffffff80016e20 <_ZN2Fs7Ramdisk4OpenEPKc+0xe0>
        for (int i = 0; i < fileCount; i++) {
ffffffff80016de8:	41 83 c1 01          	add    $0x1,%r9d
ffffffff80016dec:	49 81 c0 88 00 00 00 	add    $0x88,%r8
ffffffff80016df3:	45 39 d9             	cmp    %r11d,%r9d
ffffffff80016df6:	0f 85 74 ff ff ff    	jne    ffffffff80016d70 <_ZN2Fs7Ramdisk4OpenEPKc+0x30>
                    }
                    if (match) return i;
                }
            }
        }
        return -1;
ffffffff80016dfc:	41 b9 ff ff ff ff    	mov    $0xffffffff,%r9d
    }
ffffffff80016e02:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff80016e06:	44 89 c8             	mov    %r9d,%eax
ffffffff80016e09:	c9                   	leave
ffffffff80016e0a:	c3                   	ret
ffffffff80016e0b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        return *a == *b;
ffffffff80016e10:	0f b6 51 01          	movzbl 0x1(%rcx),%edx
            if (StrEqual(fileTable[i].name, path)) {
ffffffff80016e14:	38 d0                	cmp    %dl,%al
ffffffff80016e16:	75 9a                	jne    ffffffff80016db2 <_ZN2Fs7Ramdisk4OpenEPKc+0x72>
ffffffff80016e18:	eb e8                	jmp    ffffffff80016e02 <_ZN2Fs7Ramdisk4OpenEPKc+0xc2>
ffffffff80016e1a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        while (s[n]) n++;
ffffffff80016e20:	84 db                	test   %bl,%bl
ffffffff80016e22:	74 67                	je     ffffffff80016e8b <_ZN2Fs7Ramdisk4OpenEPKc+0x14b>
ffffffff80016e24:	49 8d 4a 01          	lea    0x1(%r10),%rcx
        int n = 0;
ffffffff80016e28:	31 d2                	xor    %edx,%edx
ffffffff80016e2a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        while (s[n]) n++;
ffffffff80016e30:	48 83 c1 01          	add    $0x1,%rcx
ffffffff80016e34:	89 d6                	mov    %edx,%esi
ffffffff80016e36:	83 c2 01             	add    $0x1,%edx
ffffffff80016e39:	80 79 ff 00          	cmpb   $0x0,-0x1(%rcx)
ffffffff80016e3d:	75 f1                	jne    ffffffff80016e30 <_ZN2Fs7Ramdisk4OpenEPKc+0xf0>
                if (pathLen == entryLen - 1) {
ffffffff80016e3f:	39 c2                	cmp    %eax,%edx
ffffffff80016e41:	75 a5                	jne    ffffffff80016de8 <_ZN2Fs7Ramdisk4OpenEPKc+0xa8>
ffffffff80016e43:	8d 46 01             	lea    0x1(%rsi),%eax
ffffffff80016e46:	31 d2                	xor    %edx,%edx
ffffffff80016e48:	48 98                	cltq
ffffffff80016e4a:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80016e51:	00 00 00 00 
ffffffff80016e55:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80016e5c:	00 00 00 00 
                        if (path[j] != fileTable[i].name[j]) {
ffffffff80016e60:	42 0f b6 bc 02 a0 7a 	movzbl -0x7feb8560(%rdx,%r8,1),%edi
ffffffff80016e67:	14 80 
ffffffff80016e69:	41 38 3c 12          	cmp    %dil,(%r10,%rdx,1)
ffffffff80016e6d:	0f 85 75 ff ff ff    	jne    ffffffff80016de8 <_ZN2Fs7Ramdisk4OpenEPKc+0xa8>
                    for (int j = 0; j < pathLen; j++) {
ffffffff80016e73:	48 83 c2 01          	add    $0x1,%rdx
ffffffff80016e77:	48 39 c2             	cmp    %rax,%rdx
ffffffff80016e7a:	75 e4                	jne    ffffffff80016e60 <_ZN2Fs7Ramdisk4OpenEPKc+0x120>
ffffffff80016e7c:	eb 84                	jmp    ffffffff80016e02 <_ZN2Fs7Ramdisk4OpenEPKc+0xc2>
            if (StrEqual(fileTable[i].name, path)) {
ffffffff80016e7e:	84 db                	test   %bl,%bl
ffffffff80016e80:	0f 85 62 ff ff ff    	jne    ffffffff80016de8 <_ZN2Fs7Ramdisk4OpenEPKc+0xa8>
ffffffff80016e86:	e9 77 ff ff ff       	jmp    ffffffff80016e02 <_ZN2Fs7Ramdisk4OpenEPKc+0xc2>
                if (pathLen == entryLen - 1) {
ffffffff80016e8b:	85 c0                	test   %eax,%eax
ffffffff80016e8d:	0f 85 55 ff ff ff    	jne    ffffffff80016de8 <_ZN2Fs7Ramdisk4OpenEPKc+0xa8>
ffffffff80016e93:	e9 6a ff ff ff       	jmp    ffffffff80016e02 <_ZN2Fs7Ramdisk4OpenEPKc+0xc2>
    }
ffffffff80016e98:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
ffffffff80016e9d:	c3                   	ret
ffffffff80016e9e:	66 90                	xchg   %ax,%ax

ffffffff80016ea0 <_ZN2Fs7Ramdisk4ReadEiPhmm>:

    int Read(int handle, uint8_t* buffer, uint64_t offset, uint64_t size) {
        if (handle < 0 || handle >= fileCount) return -1;
ffffffff80016ea0:	85 ff                	test   %edi,%edi
ffffffff80016ea2:	78 6c                	js     ffffffff80016f10 <_ZN2Fs7Ramdisk4ReadEiPhmm+0x70>
ffffffff80016ea4:	39 3d da 0b 13 00    	cmp    %edi,0x130bda(%rip)        # ffffffff80147a84 <_ZN2Fs7RamdiskL9fileCountE>
ffffffff80016eaa:	7e 64                	jle    ffffffff80016f10 <_ZN2Fs7Ramdisk4ReadEiPhmm+0x70>
    int Read(int handle, uint8_t* buffer, uint64_t offset, uint64_t size) {
ffffffff80016eac:	55                   	push   %rbp

        const FileEntry& entry = fileTable[handle];
        if (offset >= entry.size) return 0;
ffffffff80016ead:	48 63 ff             	movslq %edi,%rdi
ffffffff80016eb0:	49 89 f0             	mov    %rsi,%r8
ffffffff80016eb3:	48 89 f8             	mov    %rdi,%rax
ffffffff80016eb6:	48 c1 e0 04          	shl    $0x4,%rax
    int Read(int handle, uint8_t* buffer, uint64_t offset, uint64_t size) {
ffffffff80016eba:	48 89 e5             	mov    %rsp,%rbp
ffffffff80016ebd:	53                   	push   %rbx
        if (offset >= entry.size) return 0;
ffffffff80016ebe:	48 01 f8             	add    %rdi,%rax
ffffffff80016ec1:	48 89 cb             	mov    %rcx,%rbx
ffffffff80016ec4:	48 8d 34 c5 a0 7a 14 	lea    -0x7feb8560(,%rax,8),%rsi
ffffffff80016ecb:	80 
ffffffff80016ecc:	31 c9                	xor    %ecx,%ecx
    int Read(int handle, uint8_t* buffer, uint64_t offset, uint64_t size) {
ffffffff80016ece:	48 83 ec 08          	sub    $0x8,%rsp
        if (offset >= entry.size) return 0;
ffffffff80016ed2:	48 8b 46 70          	mov    0x70(%rsi),%rax
ffffffff80016ed6:	48 39 c2             	cmp    %rax,%rdx
ffffffff80016ed9:	73 25                	jae    ffffffff80016f00 <_ZN2Fs7Ramdisk4ReadEiPhmm+0x60>

        uint64_t bytesToRead = size;
        if (offset + bytesToRead > entry.size) {
ffffffff80016edb:	48 8d 3c 1a          	lea    (%rdx,%rbx,1),%rdi
            bytesToRead = entry.size - offset;
ffffffff80016edf:	48 89 c1             	mov    %rax,%rcx
ffffffff80016ee2:	48 29 d1             	sub    %rdx,%rcx
ffffffff80016ee5:	48 39 f8             	cmp    %rdi,%rax
        }

        memcpy(buffer, entry.data + offset, bytesToRead);
ffffffff80016ee8:	4c 89 c7             	mov    %r8,%rdi
            bytesToRead = entry.size - offset;
ffffffff80016eeb:	48 0f 42 d9          	cmovb  %rcx,%rbx
        memcpy(buffer, entry.data + offset, bytesToRead);
ffffffff80016eef:	48 03 56 68          	add    0x68(%rsi),%rdx
ffffffff80016ef3:	48 89 d6             	mov    %rdx,%rsi
ffffffff80016ef6:	48 89 da             	mov    %rbx,%rdx
ffffffff80016ef9:	e8 e2 32 00 00       	call   ffffffff8001a1e0 <memcpy>
        return (int)bytesToRead;
ffffffff80016efe:	89 d9                	mov    %ebx,%ecx
    }
ffffffff80016f00:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff80016f04:	89 c8                	mov    %ecx,%eax
ffffffff80016f06:	c9                   	leave
ffffffff80016f07:	c3                   	ret
ffffffff80016f08:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80016f0f:	00 
        if (handle < 0 || handle >= fileCount) return -1;
ffffffff80016f10:	b9 ff ff ff ff       	mov    $0xffffffff,%ecx
    }
ffffffff80016f15:	89 c8                	mov    %ecx,%eax
ffffffff80016f17:	c3                   	ret
ffffffff80016f18:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80016f1f:	00 

ffffffff80016f20 <_ZN2Fs7Ramdisk7GetSizeEi>:

    uint64_t GetSize(int handle) {
        if (handle < 0 || handle >= fileCount) return 0;
ffffffff80016f20:	31 c0                	xor    %eax,%eax
ffffffff80016f22:	85 ff                	test   %edi,%edi
ffffffff80016f24:	78 1d                	js     ffffffff80016f43 <_ZN2Fs7Ramdisk7GetSizeEi+0x23>
ffffffff80016f26:	39 3d 58 0b 13 00    	cmp    %edi,0x130b58(%rip)        # ffffffff80147a84 <_ZN2Fs7RamdiskL9fileCountE>
ffffffff80016f2c:	7e 15                	jle    ffffffff80016f43 <_ZN2Fs7Ramdisk7GetSizeEi+0x23>
        return fileTable[handle].size;
ffffffff80016f2e:	48 63 ff             	movslq %edi,%rdi
ffffffff80016f31:	48 89 f8             	mov    %rdi,%rax
ffffffff80016f34:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff80016f38:	48 01 f8             	add    %rdi,%rax
ffffffff80016f3b:	48 8b 04 c5 10 7b 14 	mov    -0x7feb84f0(,%rax,8),%rax
ffffffff80016f42:	80 
    }
ffffffff80016f43:	c3                   	ret
ffffffff80016f44:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80016f4b:	00 00 00 
ffffffff80016f4e:	66 90                	xchg   %ax,%ax

ffffffff80016f50 <_ZN2Fs7Ramdisk5CloseEi>:

    void Close(int handle) {
        // No-op for ramdisk: files are memory-mapped and read-only
        (void)handle;
    }
ffffffff80016f50:	c3                   	ret
ffffffff80016f51:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80016f58:	00 00 00 
ffffffff80016f5b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80016f60 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i>:

    int ReadDir(const char* path, const char** outNames, int maxEntries) {
ffffffff80016f60:	55                   	push   %rbp
ffffffff80016f61:	49 89 f8             	mov    %rdi,%r8
ffffffff80016f64:	41 89 d3             	mov    %edx,%r11d
ffffffff80016f67:	48 89 e5             	mov    %rsp,%rbp
ffffffff80016f6a:	41 56                	push   %r14
ffffffff80016f6c:	41 55                	push   %r13
ffffffff80016f6e:	41 54                	push   %r12
ffffffff80016f70:	49 89 f4             	mov    %rsi,%r12
ffffffff80016f73:	53                   	push   %rbx
        // Normalize path: skip leading '/'
        if (path[0] == '/') path++;
ffffffff80016f74:	0f b6 07             	movzbl (%rdi),%eax
ffffffff80016f77:	3c 2f                	cmp    $0x2f,%al
ffffffff80016f79:	75 08                	jne    ffffffff80016f83 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x23>
        while (s[n]) n++;
ffffffff80016f7b:	0f b6 47 01          	movzbl 0x1(%rdi),%eax
        if (path[0] == '/') path++;
ffffffff80016f7f:	49 83 c0 01          	add    $0x1,%r8
        while (s[n]) n++;
ffffffff80016f83:	84 c0                	test   %al,%al
ffffffff80016f85:	0f 84 91 01 00 00    	je     ffffffff8001711c <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x1bc>
ffffffff80016f8b:	b8 01 00 00 00       	mov    $0x1,%eax
ffffffff80016f90:	48 89 c7             	mov    %rax,%rdi
ffffffff80016f93:	48 8d 40 01          	lea    0x1(%rax),%rax
ffffffff80016f97:	41 80 3c 38 00       	cmpb   $0x0,(%r8,%rdi,1)
ffffffff80016f9c:	75 f2                	jne    ffffffff80016f90 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x30>
ffffffff80016f9e:	41 89 fd             	mov    %edi,%r13d

        int pathLen = StrLen(path);
        int count = 0;

        for (int i = 0; i < fileCount && count < maxEntries; i++) {
ffffffff80016fa1:	8b 1d dd 0a 13 00    	mov    0x130add(%rip),%ebx        # ffffffff80147a84 <_ZN2Fs7RamdiskL9fileCountE>
ffffffff80016fa7:	45 85 db             	test   %r11d,%r11d
ffffffff80016faa:	0f 8e 76 01 00 00    	jle    ffffffff80017126 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x1c6>
ffffffff80016fb0:	85 db                	test   %ebx,%ebx
ffffffff80016fb2:	0f 8e 6e 01 00 00    	jle    ffffffff80017126 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x1c6>
ffffffff80016fb8:	48 c7 c1 a0 7a 14 80 	mov    $0xffffffff80147aa0,%rcx
ffffffff80016fbf:	48 81 c7 a1 7a 14 80 	add    $0xffffffff80147aa1,%rdi
ffffffff80016fc6:	45 31 c9             	xor    %r9d,%r9d
        int count = 0;
ffffffff80016fc9:	45 31 d2             	xor    %r10d,%r10d
ffffffff80016fcc:	0f 1f 40 00          	nopl   0x0(%rax)
            const char* entryName = fileTable[i].name;

            if (pathLen == 0) {
ffffffff80016fd0:	45 85 ed             	test   %r13d,%r13d
ffffffff80016fd3:	74 6b                	je     ffffffff80017040 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0xe0>
        while (*prefix) {
ffffffff80016fd5:	41 0f b6 10          	movzbl (%r8),%edx
ffffffff80016fd9:	31 c0                	xor    %eax,%eax
ffffffff80016fdb:	84 d2                	test   %dl,%dl
ffffffff80016fdd:	75 32                	jne    ffffffff80017011 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0xb1>
ffffffff80016fdf:	e9 d4 00 00 00       	jmp    ffffffff800170b8 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x158>
ffffffff80016fe4:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80016feb:	00 00 00 00 
ffffffff80016fef:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80016ff6:	00 00 00 00 
ffffffff80016ffa:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff80017000:	48 83 c0 01          	add    $0x1,%rax
ffffffff80017004:	41 0f b6 14 00       	movzbl (%r8,%rax,1),%edx
ffffffff80017009:	84 d2                	test   %dl,%dl
ffffffff8001700b:	0f 84 a7 00 00 00    	je     ffffffff800170b8 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x158>
            if (*str != *prefix) return false;
ffffffff80017011:	38 14 01             	cmp    %dl,(%rcx,%rax,1)
ffffffff80017014:	74 ea                	je     ffffffff80017000 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0xa0>
        for (int i = 0; i < fileCount && count < maxEntries; i++) {
ffffffff80017016:	41 83 c1 01          	add    $0x1,%r9d
ffffffff8001701a:	48 81 c1 88 00 00 00 	add    $0x88,%rcx
ffffffff80017021:	48 81 c7 88 00 00 00 	add    $0x88,%rdi
ffffffff80017028:	41 39 d9             	cmp    %ebx,%r9d
ffffffff8001702b:	7d 05                	jge    ffffffff80017032 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0xd2>
ffffffff8001702d:	45 39 da             	cmp    %r11d,%r10d
ffffffff80017030:	7c 9e                	jl     ffffffff80016fd0 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x70>
                }
            }
        }

        return count;
    }
ffffffff80017032:	5b                   	pop    %rbx
ffffffff80017033:	44 89 d0             	mov    %r10d,%eax
ffffffff80017036:	41 5c                	pop    %r12
ffffffff80017038:	41 5d                	pop    %r13
ffffffff8001703a:	41 5e                	pop    %r14
ffffffff8001703c:	5d                   	pop    %rbp
ffffffff8001703d:	c3                   	ret
ffffffff8001703e:	66 90                	xchg   %ax,%ax
        while (s[n]) n++;
ffffffff80017040:	80 39 00             	cmpb   $0x0,(%rcx)
ffffffff80017043:	74 5f                	je     ffffffff800170a4 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x144>
ffffffff80017045:	31 c0                	xor    %eax,%eax
ffffffff80017047:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001704e:	00 00 
ffffffff80017050:	48 89 c2             	mov    %rax,%rdx
ffffffff80017053:	48 8d 40 01          	lea    0x1(%rax),%rax
ffffffff80017057:	80 7c 0a 01 00       	cmpb   $0x0,0x1(%rdx,%rcx,1)
ffffffff8001705c:	75 f2                	jne    ffffffff80017050 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0xf0>
ffffffff8001705e:	41 89 d6             	mov    %edx,%r14d
ffffffff80017061:	31 c0                	xor    %eax,%eax
ffffffff80017063:	eb 27                	jmp    ffffffff8001708c <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x12c>
ffffffff80017065:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001706c:	00 00 00 00 
ffffffff80017070:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80017077:	00 00 00 00 
ffffffff8001707b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
                for (int j = 0; j < entryLen; j++) {
ffffffff80017080:	48 8d 70 01          	lea    0x1(%rax),%rsi
ffffffff80017084:	48 39 c2             	cmp    %rax,%rdx
ffffffff80017087:	74 1b                	je     ffffffff800170a4 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x144>
ffffffff80017089:	48 89 f0             	mov    %rsi,%rax
                    if (entryName[j] == '/' && j < entryLen - 1) {
ffffffff8001708c:	80 3c 01 2f          	cmpb   $0x2f,(%rcx,%rax,1)
ffffffff80017090:	75 ee                	jne    ffffffff80017080 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x120>
ffffffff80017092:	41 39 c6             	cmp    %eax,%r14d
ffffffff80017095:	0f 8f 7b ff ff ff    	jg     ffffffff80017016 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0xb6>
                for (int j = 0; j < entryLen; j++) {
ffffffff8001709b:	48 8d 70 01          	lea    0x1(%rax),%rsi
ffffffff8001709f:	48 39 c2             	cmp    %rax,%rdx
ffffffff800170a2:	75 e5                	jne    ffffffff80017089 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x129>
                    outNames[count++] = entryName;
ffffffff800170a4:	49 63 c2             	movslq %r10d,%rax
ffffffff800170a7:	41 83 c2 01          	add    $0x1,%r10d
ffffffff800170ab:	49 89 0c c4          	mov    %rcx,(%r12,%rax,8)
ffffffff800170af:	e9 62 ff ff ff       	jmp    ffffffff80017016 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0xb6>
ffffffff800170b4:	0f 1f 40 00          	nopl   0x0(%rax)
                if (separator != '/') continue;
ffffffff800170b8:	80 7f ff 2f          	cmpb   $0x2f,-0x1(%rdi)
ffffffff800170bc:	0f 85 54 ff ff ff    	jne    ffffffff80017016 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0xb6>
        while (s[n]) n++;
ffffffff800170c2:	80 3f 00             	cmpb   $0x0,(%rdi)
ffffffff800170c5:	0f 84 4b ff ff ff    	je     ffffffff80017016 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0xb6>
ffffffff800170cb:	31 c0                	xor    %eax,%eax
ffffffff800170cd:	0f 1f 00             	nopl   (%rax)
ffffffff800170d0:	48 89 c2             	mov    %rax,%rdx
ffffffff800170d3:	48 8d 40 01          	lea    0x1(%rax),%rax
ffffffff800170d7:	80 7c 3a 01 00       	cmpb   $0x0,0x1(%rdx,%rdi,1)
ffffffff800170dc:	75 f2                	jne    ffffffff800170d0 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x170>
ffffffff800170de:	41 89 d6             	mov    %edx,%r14d
ffffffff800170e1:	31 c0                	xor    %eax,%eax
ffffffff800170e3:	eb 27                	jmp    ffffffff8001710c <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x1ac>
ffffffff800170e5:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800170ec:	00 00 00 00 
ffffffff800170f0:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800170f7:	00 00 00 00 
ffffffff800170fb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
                for (int j = 0; j < restLen; j++) {
ffffffff80017100:	48 8d 70 01          	lea    0x1(%rax),%rsi
ffffffff80017104:	48 39 d0             	cmp    %rdx,%rax
ffffffff80017107:	74 9b                	je     ffffffff800170a4 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x144>
ffffffff80017109:	48 89 f0             	mov    %rsi,%rax
                    if (rest[j] == '/' && j < restLen - 1) {
ffffffff8001710c:	80 3c 07 2f          	cmpb   $0x2f,(%rdi,%rax,1)
ffffffff80017110:	75 ee                	jne    ffffffff80017100 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x1a0>
ffffffff80017112:	41 39 c6             	cmp    %eax,%r14d
ffffffff80017115:	7e e9                	jle    ffffffff80017100 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x1a0>
ffffffff80017117:	e9 fa fe ff ff       	jmp    ffffffff80017016 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0xb6>
        while (s[n]) n++;
ffffffff8001711c:	31 ff                	xor    %edi,%edi
        int n = 0;
ffffffff8001711e:	45 31 ed             	xor    %r13d,%r13d
ffffffff80017121:	e9 7b fe ff ff       	jmp    ffffffff80016fa1 <_ZN2Fs7Ramdisk7ReadDirEPKcPS2_i+0x41>
        int count = 0;
ffffffff80017126:	45 31 d2             	xor    %r10d,%r10d
    }
ffffffff80017129:	5b                   	pop    %rbx
ffffffff8001712a:	41 5c                	pop    %r12
ffffffff8001712c:	44 89 d0             	mov    %r10d,%eax
ffffffff8001712f:	41 5d                	pop    %r13
ffffffff80017131:	41 5e                	pop    %r14
ffffffff80017133:	5d                   	pop    %rbp
ffffffff80017134:	c3                   	ret
ffffffff80017135:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001713c:	00 00 00 
ffffffff8001713f:	90                   	nop

ffffffff80017140 <_ZN2Fs7Ramdisk5WriteEiPKhmm>:

    int Write(int handle, const uint8_t* buffer, uint64_t offset, uint64_t size) {
ffffffff80017140:	55                   	push   %rbp
ffffffff80017141:	48 89 e5             	mov    %rsp,%rbp
ffffffff80017144:	41 57                	push   %r15
ffffffff80017146:	41 56                	push   %r14
ffffffff80017148:	41 55                	push   %r13
ffffffff8001714a:	41 54                	push   %r12
ffffffff8001714c:	53                   	push   %rbx
ffffffff8001714d:	48 63 df             	movslq %edi,%rbx
ffffffff80017150:	48 83 ec 28          	sub    $0x28,%rsp
ffffffff80017154:	48 89 55 c8          	mov    %rdx,-0x38(%rbp)
        if (handle < 0 || handle >= fileCount) return -1;
ffffffff80017158:	85 db                	test   %ebx,%ebx
ffffffff8001715a:	0f 88 31 02 00 00    	js     ffffffff80017391 <_ZN2Fs7Ramdisk5WriteEiPKhmm+0x251>
ffffffff80017160:	39 1d 1e 09 13 00    	cmp    %ebx,0x13091e(%rip)        # ffffffff80147a84 <_ZN2Fs7RamdiskL9fileCountE>
ffffffff80017166:	0f 8e 25 02 00 00    	jle    ffffffff80017391 <_ZN2Fs7Ramdisk5WriteEiPKhmm+0x251>
ffffffff8001716c:	49 89 f7             	mov    %rsi,%r15
        if (buffer == nullptr || size == 0) return 0;
ffffffff8001716f:	48 85 f6             	test   %rsi,%rsi
ffffffff80017172:	0f 84 c8 01 00 00    	je     ffffffff80017340 <_ZN2Fs7Ramdisk5WriteEiPKhmm+0x200>
ffffffff80017178:	49 89 cd             	mov    %rcx,%r13
ffffffff8001717b:	48 85 c9             	test   %rcx,%rcx
ffffffff8001717e:	0f 84 bc 01 00 00    	je     ffffffff80017340 <_ZN2Fs7Ramdisk5WriteEiPKhmm+0x200>

        FileEntry& entry = fileTable[handle];
        if (entry.isDirectory) return -1;
ffffffff80017184:	48 89 d8             	mov    %rbx,%rax
ffffffff80017187:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff8001718b:	48 01 d8             	add    %rbx,%rax
ffffffff8001718e:	48 8d 04 c5 a0 7a 14 	lea    -0x7feb8560(,%rax,8),%rax
ffffffff80017195:	80 
ffffffff80017196:	80 b8 80 00 00 00 00 	cmpb   $0x0,0x80(%rax)
ffffffff8001719d:	0f 85 ee 01 00 00    	jne    ffffffff80017391 <_ZN2Fs7Ramdisk5WriteEiPKhmm+0x251>

        uint64_t endOffset = offset + size;
ffffffff800171a3:	48 8b 4d c8          	mov    -0x38(%rbp),%rcx

        // Copy-on-write: if data points into tar memory, copy to heap
        if (!entry.heapAllocated) {
ffffffff800171a7:	80 b8 81 00 00 00 00 	cmpb   $0x0,0x81(%rax)
        uint64_t endOffset = offset + size;
ffffffff800171ae:	4d 8d 74 0d 00       	lea    0x0(%r13,%rcx,1),%r14
        if (!entry.heapAllocated) {
ffffffff800171b3:	0f 85 93 00 00 00    	jne    ffffffff8001724c <_ZN2Fs7Ramdisk5WriteEiPKhmm+0x10c>
            uint64_t newCap = entry.size;
            if (endOffset > newCap) newCap = endOffset;
ffffffff800171b9:	48 8b 50 70          	mov    0x70(%rax),%rdx
            if (newCap < 256) newCap = 256;
ffffffff800171bd:	b8 00 01 00 00       	mov    $0x100,%eax
            // Round up to next power of 2 for growth
            uint64_t rounded = 256;
ffffffff800171c2:	41 bc 00 01 00 00    	mov    $0x100,%r12d
            if (endOffset > newCap) newCap = endOffset;
ffffffff800171c8:	49 39 d6             	cmp    %rdx,%r14
ffffffff800171cb:	49 0f 43 d6          	cmovae %r14,%rdx
            if (newCap < 256) newCap = 256;
ffffffff800171cf:	48 39 c2             	cmp    %rax,%rdx
ffffffff800171d2:	48 0f 43 c2          	cmovae %rdx,%rax
            while (rounded < newCap) rounded *= 2;
ffffffff800171d6:	76 10                	jbe    ffffffff800171e8 <_ZN2Fs7Ramdisk5WriteEiPKhmm+0xa8>
ffffffff800171d8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff800171df:	00 
ffffffff800171e0:	4d 01 e4             	add    %r12,%r12
ffffffff800171e3:	49 39 c4             	cmp    %rax,%r12
ffffffff800171e6:	72 f8                	jb     ffffffff800171e0 <_ZN2Fs7Ramdisk5WriteEiPKhmm+0xa0>
            newCap = rounded;

            uint8_t* newBuf = (uint8_t*)Memory::g_heap->Request(newCap);
ffffffff800171e8:	48 8b 3d c9 57 13 00 	mov    0x1357c9(%rip),%rdi        # ffffffff8014c9b8 <_ZN6Memory6g_heapE>
ffffffff800171ef:	4c 89 e6             	mov    %r12,%rsi
ffffffff800171f2:	e8 09 3b 00 00       	call   ffffffff8001ad00 <_ZN6Memory13HeapAllocator7RequestEm>
ffffffff800171f7:	48 89 c7             	mov    %rax,%rdi
            if (newBuf == nullptr) return -1;
ffffffff800171fa:	48 85 c0             	test   %rax,%rax
ffffffff800171fd:	0f 84 8e 01 00 00    	je     ffffffff80017391 <_ZN2Fs7Ramdisk5WriteEiPKhmm+0x251>

            if (entry.data && entry.size > 0) {
ffffffff80017203:	48 89 d8             	mov    %rbx,%rax
ffffffff80017206:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff8001720a:	48 01 d8             	add    %rbx,%rax
ffffffff8001720d:	48 8d 04 c5 a0 7a 14 	lea    -0x7feb8560(,%rax,8),%rax
ffffffff80017214:	80 
ffffffff80017215:	48 8b 70 68          	mov    0x68(%rax),%rsi
ffffffff80017219:	48 85 f6             	test   %rsi,%rsi
ffffffff8001721c:	74 0d                	je     ffffffff8001722b <_ZN2Fs7Ramdisk5WriteEiPKhmm+0xeb>
ffffffff8001721e:	48 8b 50 70          	mov    0x70(%rax),%rdx
ffffffff80017222:	48 85 d2             	test   %rdx,%rdx
ffffffff80017225:	0f 85 2d 01 00 00    	jne    ffffffff80017358 <_ZN2Fs7Ramdisk5WriteEiPKhmm+0x218>
                memcpy(newBuf, entry.data, entry.size);
            }

            entry.data = newBuf;
ffffffff8001722b:	48 89 d8             	mov    %rbx,%rax
ffffffff8001722e:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff80017232:	48 01 d8             	add    %rbx,%rax
ffffffff80017235:	48 8d 04 c5 a0 7a 14 	lea    -0x7feb8560(,%rax,8),%rax
ffffffff8001723c:	80 
ffffffff8001723d:	48 89 78 68          	mov    %rdi,0x68(%rax)
            entry.capacity = newCap;
ffffffff80017241:	4c 89 60 78          	mov    %r12,0x78(%rax)
            entry.heapAllocated = true;
ffffffff80017245:	c6 80 81 00 00 00 01 	movb   $0x1,0x81(%rax)
        }

        // Grow buffer if needed
        if (endOffset > entry.capacity) {
ffffffff8001724c:	48 89 d8             	mov    %rbx,%rax
ffffffff8001724f:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff80017253:	48 01 d8             	add    %rbx,%rax
ffffffff80017256:	4c 8b 24 c5 18 7b 14 	mov    -0x7feb84e8(,%rax,8),%r12
ffffffff8001725d:	80 
ffffffff8001725e:	4d 39 f4             	cmp    %r14,%r12
ffffffff80017261:	0f 83 82 00 00 00    	jae    ffffffff800172e9 <_ZN2Fs7Ramdisk5WriteEiPKhmm+0x1a9>
ffffffff80017267:	90                   	nop
ffffffff80017268:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001726f:	00 
            uint64_t newCap = entry.capacity;
            while (newCap < endOffset) newCap *= 2;
ffffffff80017270:	4d 01 e4             	add    %r12,%r12
ffffffff80017273:	4d 39 f4             	cmp    %r14,%r12
ffffffff80017276:	72 f8                	jb     ffffffff80017270 <_ZN2Fs7Ramdisk5WriteEiPKhmm+0x130>

            uint8_t* newBuf = (uint8_t*)Memory::g_heap->Request(newCap);
ffffffff80017278:	48 8b 3d 39 57 13 00 	mov    0x135739(%rip),%rdi        # ffffffff8014c9b8 <_ZN6Memory6g_heapE>
ffffffff8001727f:	4c 89 e6             	mov    %r12,%rsi
ffffffff80017282:	e8 79 3a 00 00       	call   ffffffff8001ad00 <_ZN6Memory13HeapAllocator7RequestEm>
ffffffff80017287:	49 89 c0             	mov    %rax,%r8
            if (newBuf == nullptr) return -1;
ffffffff8001728a:	48 85 c0             	test   %rax,%rax
ffffffff8001728d:	0f 84 fe 00 00 00    	je     ffffffff80017391 <_ZN2Fs7Ramdisk5WriteEiPKhmm+0x251>

            if (entry.data && entry.size > 0) {
ffffffff80017293:	48 89 d8             	mov    %rbx,%rax
ffffffff80017296:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff8001729a:	48 01 d8             	add    %rbx,%rax
ffffffff8001729d:	4c 8d 0c c5 a0 7a 14 	lea    -0x7feb8560(,%rax,8),%r9
ffffffff800172a4:	80 
ffffffff800172a5:	49 8b 71 68          	mov    0x68(%r9),%rsi
ffffffff800172a9:	48 85 f6             	test   %rsi,%rsi
ffffffff800172ac:	74 0d                	je     ffffffff800172bb <_ZN2Fs7Ramdisk5WriteEiPKhmm+0x17b>
ffffffff800172ae:	49 8b 51 70          	mov    0x70(%r9),%rdx
ffffffff800172b2:	48 85 d2             	test   %rdx,%rdx
ffffffff800172b5:	0f 85 b5 00 00 00    	jne    ffffffff80017370 <_ZN2Fs7Ramdisk5WriteEiPKhmm+0x230>
                memcpy(newBuf, entry.data, entry.size);
            }
            Memory::g_heap->Free(entry.data);
ffffffff800172bb:	48 8b 3d f6 56 13 00 	mov    0x1356f6(%rip),%rdi        # ffffffff8014c9b8 <_ZN6Memory6g_heapE>
ffffffff800172c2:	4c 89 45 c0          	mov    %r8,-0x40(%rbp)
ffffffff800172c6:	e8 45 3b 00 00       	call   ffffffff8001ae10 <_ZN6Memory13HeapAllocator4FreeEPv>

            entry.data = newBuf;
ffffffff800172cb:	48 89 d8             	mov    %rbx,%rax
ffffffff800172ce:	4c 8b 45 c0          	mov    -0x40(%rbp),%r8
ffffffff800172d2:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff800172d6:	48 01 d8             	add    %rbx,%rax
ffffffff800172d9:	48 8d 04 c5 a0 7a 14 	lea    -0x7feb8560(,%rax,8),%rax
ffffffff800172e0:	80 
ffffffff800172e1:	4c 89 40 68          	mov    %r8,0x68(%rax)
            entry.capacity = newCap;
ffffffff800172e5:	4c 89 60 78          	mov    %r12,0x78(%rax)
        }

        memcpy(entry.data + offset, buffer, size);
ffffffff800172e9:	48 89 d8             	mov    %rbx,%rax
ffffffff800172ec:	48 8b 7d c8          	mov    -0x38(%rbp),%rdi
ffffffff800172f0:	4c 89 ea             	mov    %r13,%rdx
ffffffff800172f3:	4c 89 fe             	mov    %r15,%rsi
ffffffff800172f6:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff800172fa:	48 01 d8             	add    %rbx,%rax
ffffffff800172fd:	48 8d 1c c5 a0 7a 14 	lea    -0x7feb8560(,%rax,8),%rbx
ffffffff80017304:	80 
ffffffff80017305:	48 03 7b 68          	add    0x68(%rbx),%rdi
ffffffff80017309:	e8 d2 2e 00 00       	call   ffffffff8001a1e0 <memcpy>

        if (endOffset > entry.size) {
ffffffff8001730e:	4c 39 73 70          	cmp    %r14,0x70(%rbx)
ffffffff80017312:	72 1c                	jb     ffffffff80017330 <_ZN2Fs7Ramdisk5WriteEiPKhmm+0x1f0>
            entry.size = endOffset;
        }

        return (int)size;
ffffffff80017314:	44 89 e8             	mov    %r13d,%eax
    }
ffffffff80017317:	48 83 c4 28          	add    $0x28,%rsp
ffffffff8001731b:	5b                   	pop    %rbx
ffffffff8001731c:	41 5c                	pop    %r12
ffffffff8001731e:	41 5d                	pop    %r13
ffffffff80017320:	41 5e                	pop    %r14
ffffffff80017322:	41 5f                	pop    %r15
ffffffff80017324:	5d                   	pop    %rbp
ffffffff80017325:	c3                   	ret
ffffffff80017326:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001732d:	00 00 00 
            entry.size = endOffset;
ffffffff80017330:	4c 89 73 70          	mov    %r14,0x70(%rbx)
ffffffff80017334:	eb de                	jmp    ffffffff80017314 <_ZN2Fs7Ramdisk5WriteEiPKhmm+0x1d4>
ffffffff80017336:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001733d:	00 00 00 
    }
ffffffff80017340:	48 83 c4 28          	add    $0x28,%rsp
        if (buffer == nullptr || size == 0) return 0;
ffffffff80017344:	31 c0                	xor    %eax,%eax
    }
ffffffff80017346:	5b                   	pop    %rbx
ffffffff80017347:	41 5c                	pop    %r12
ffffffff80017349:	41 5d                	pop    %r13
ffffffff8001734b:	41 5e                	pop    %r14
ffffffff8001734d:	41 5f                	pop    %r15
ffffffff8001734f:	5d                   	pop    %rbp
ffffffff80017350:	c3                   	ret
ffffffff80017351:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
                memcpy(newBuf, entry.data, entry.size);
ffffffff80017358:	48 89 7d c0          	mov    %rdi,-0x40(%rbp)
ffffffff8001735c:	e8 7f 2e 00 00       	call   ffffffff8001a1e0 <memcpy>
ffffffff80017361:	48 8b 7d c0          	mov    -0x40(%rbp),%rdi
ffffffff80017365:	e9 c1 fe ff ff       	jmp    ffffffff8001722b <_ZN2Fs7Ramdisk5WriteEiPKhmm+0xeb>
ffffffff8001736a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
                memcpy(newBuf, entry.data, entry.size);
ffffffff80017370:	4c 89 c7             	mov    %r8,%rdi
ffffffff80017373:	4c 89 4d b8          	mov    %r9,-0x48(%rbp)
ffffffff80017377:	4c 89 45 c0          	mov    %r8,-0x40(%rbp)
ffffffff8001737b:	e8 60 2e 00 00       	call   ffffffff8001a1e0 <memcpy>
            Memory::g_heap->Free(entry.data);
ffffffff80017380:	4c 8b 4d b8          	mov    -0x48(%rbp),%r9
ffffffff80017384:	4c 8b 45 c0          	mov    -0x40(%rbp),%r8
ffffffff80017388:	49 8b 71 68          	mov    0x68(%r9),%rsi
ffffffff8001738c:	e9 2a ff ff ff       	jmp    ffffffff800172bb <_ZN2Fs7Ramdisk5WriteEiPKhmm+0x17b>
        if (handle < 0 || handle >= fileCount) return -1;
ffffffff80017391:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
ffffffff80017396:	e9 7c ff ff ff       	jmp    ffffffff80017317 <_ZN2Fs7Ramdisk5WriteEiPKhmm+0x1d7>
ffffffff8001739b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff800173a0 <_ZN2Fs7Ramdisk6CreateEPKc>:

    int Create(const char* path) {
ffffffff800173a0:	55                   	push   %rbp
ffffffff800173a1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800173a4:	41 55                	push   %r13
ffffffff800173a6:	41 54                	push   %r12
ffffffff800173a8:	53                   	push   %rbx
ffffffff800173a9:	48 83 ec 08          	sub    $0x8,%rsp
        if (path == nullptr) return -1;
ffffffff800173ad:	48 85 ff             	test   %rdi,%rdi
ffffffff800173b0:	0f 84 cd 01 00 00    	je     ffffffff80017583 <_ZN2Fs7Ramdisk6CreateEPKc+0x1e3>
        if (fileCount >= MaxFiles) return -1;
ffffffff800173b6:	4c 63 15 c7 06 13 00 	movslq 0x1306c7(%rip),%r10        # ffffffff80147a84 <_ZN2Fs7RamdiskL9fileCountE>
ffffffff800173bd:	41 83 fa 7f          	cmp    $0x7f,%r10d
ffffffff800173c1:	0f 8f bc 01 00 00    	jg     ffffffff80017583 <_ZN2Fs7Ramdisk6CreateEPKc+0x1e3>

        // Normalize: skip leading '/'
        if (path[0] == '/') path++;
ffffffff800173c7:	44 0f b6 1f          	movzbl (%rdi),%r11d
ffffffff800173cb:	49 89 f9             	mov    %rdi,%r9
ffffffff800173ce:	41 80 fb 2f          	cmp    $0x2f,%r11b
ffffffff800173d2:	75 09                	jne    ffffffff800173dd <_ZN2Fs7Ramdisk6CreateEPKc+0x3d>

        // Create new file entry
        FileEntry& entry = fileTable[fileCount];

        int nameLen = 0;
        while (nameLen < MaxNameLen - 1 && path[nameLen] != '\0') {
ffffffff800173d4:	44 0f b6 5f 01       	movzbl 0x1(%rdi),%r11d
        if (path[0] == '/') path++;
ffffffff800173d9:	49 83 c1 01          	add    $0x1,%r9
        for (int i = 0; i < fileCount; i++) {
ffffffff800173dd:	45 85 d2             	test   %r10d,%r10d
ffffffff800173e0:	7e 60                	jle    ffffffff80017442 <_ZN2Fs7Ramdisk6CreateEPKc+0xa2>
ffffffff800173e2:	49 c7 c0 a0 7a 14 80 	mov    $0xffffffff80147aa0,%r8
ffffffff800173e9:	31 db                	xor    %ebx,%ebx
ffffffff800173eb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        while (*a && *b) {
ffffffff800173f0:	41 0f b6 00          	movzbl (%r8),%eax
            if (StrEqual(fileTable[i].name, path)) {
ffffffff800173f4:	4c 89 c1             	mov    %r8,%rcx
        while (*a && *b) {
ffffffff800173f7:	44 89 da             	mov    %r11d,%edx
ffffffff800173fa:	4c 89 ce             	mov    %r9,%rsi
ffffffff800173fd:	84 c0                	test   %al,%al
ffffffff800173ff:	75 2e                	jne    ffffffff8001742f <_ZN2Fs7Ramdisk6CreateEPKc+0x8f>
ffffffff80017401:	e9 75 01 00 00       	jmp    ffffffff8001757b <_ZN2Fs7Ramdisk6CreateEPKc+0x1db>
ffffffff80017406:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001740d:	00 00 00 
            if (*a != *b) return false;
ffffffff80017410:	38 c2                	cmp    %al,%dl
ffffffff80017412:	75 1f                	jne    ffffffff80017433 <_ZN2Fs7Ramdisk6CreateEPKc+0x93>
        while (*a && *b) {
ffffffff80017414:	0f b6 41 01          	movzbl 0x1(%rcx),%eax
            a++;
ffffffff80017418:	48 83 c1 01          	add    $0x1,%rcx
            b++;
ffffffff8001741c:	48 8d 7e 01          	lea    0x1(%rsi),%rdi
        while (*a && *b) {
ffffffff80017420:	84 c0                	test   %al,%al
ffffffff80017422:	0f 84 d0 00 00 00    	je     ffffffff800174f8 <_ZN2Fs7Ramdisk6CreateEPKc+0x158>
        return *a == *b;
ffffffff80017428:	0f b6 56 01          	movzbl 0x1(%rsi),%edx
ffffffff8001742c:	48 89 fe             	mov    %rdi,%rsi
        while (*a && *b) {
ffffffff8001742f:	84 d2                	test   %dl,%dl
ffffffff80017431:	75 dd                	jne    ffffffff80017410 <_ZN2Fs7Ramdisk6CreateEPKc+0x70>
        for (int i = 0; i < fileCount; i++) {
ffffffff80017433:	83 c3 01             	add    $0x1,%ebx
ffffffff80017436:	49 81 c0 88 00 00 00 	add    $0x88,%r8
ffffffff8001743d:	41 39 da             	cmp    %ebx,%r10d
ffffffff80017440:	75 ae                	jne    ffffffff800173f0 <_ZN2Fs7Ramdisk6CreateEPKc+0x50>
ffffffff80017442:	4c 89 d1             	mov    %r10,%rcx
        while (*a && *b) {
ffffffff80017445:	31 c0                	xor    %eax,%eax
ffffffff80017447:	48 c1 e1 04          	shl    $0x4,%rcx
ffffffff8001744b:	4c 01 d1             	add    %r10,%rcx
ffffffff8001744e:	48 c1 e1 03          	shl    $0x3,%rcx
ffffffff80017452:	eb 1d                	jmp    ffffffff80017471 <_ZN2Fs7Ramdisk6CreateEPKc+0xd1>
ffffffff80017454:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001745b:	00 00 00 00 
ffffffff8001745f:	90                   	nop
            entry.name[nameLen] = path[nameLen];
ffffffff80017460:	88 94 01 a0 7a 14 80 	mov    %dl,-0x7feb8560(%rcx,%rax,1)
        while (nameLen < MaxNameLen - 1 && path[nameLen] != '\0') {
ffffffff80017467:	48 83 c0 01          	add    $0x1,%rax
ffffffff8001746b:	48 83 f8 63          	cmp    $0x63,%rax
ffffffff8001746f:	74 09                	je     ffffffff8001747a <_ZN2Fs7Ramdisk6CreateEPKc+0xda>
ffffffff80017471:	41 0f b6 14 01       	movzbl (%r9,%rax,1),%edx
ffffffff80017476:	84 d2                	test   %dl,%dl
ffffffff80017478:	75 e6                	jne    ffffffff80017460 <_ZN2Fs7Ramdisk6CreateEPKc+0xc0>
            nameLen++;
        }
        entry.name[nameLen] = '\0';
ffffffff8001747a:	4c 89 d3             	mov    %r10,%rbx

        uint8_t* buf = (uint8_t*)Memory::g_heap->Request(256);
ffffffff8001747d:	48 8b 3d 34 55 13 00 	mov    0x135534(%rip),%rdi        # ffffffff8014c9b8 <_ZN6Memory6g_heapE>
        entry.name[nameLen] = '\0';
ffffffff80017484:	48 98                	cltq
        uint8_t* buf = (uint8_t*)Memory::g_heap->Request(256);
ffffffff80017486:	be 00 01 00 00       	mov    $0x100,%esi
        entry.name[nameLen] = '\0';
ffffffff8001748b:	48 c1 e3 04          	shl    $0x4,%rbx
ffffffff8001748f:	4c 01 d3             	add    %r10,%rbx
ffffffff80017492:	48 c1 e3 03          	shl    $0x3,%rbx
ffffffff80017496:	c6 84 18 a0 7a 14 80 	movb   $0x0,-0x7feb8560(%rax,%rbx,1)
ffffffff8001749d:	00 
        uint8_t* buf = (uint8_t*)Memory::g_heap->Request(256);
ffffffff8001749e:	e8 5d 38 00 00       	call   ffffffff8001ad00 <_ZN6Memory13HeapAllocator7RequestEm>
        if (buf == nullptr) return -1;
ffffffff800174a3:	48 85 c0             	test   %rax,%rax
ffffffff800174a6:	0f 84 d7 00 00 00    	je     ffffffff80017583 <_ZN2Fs7Ramdisk6CreateEPKc+0x1e3>

        entry.data = buf;
ffffffff800174ac:	48 89 83 08 7b 14 80 	mov    %rax,-0x7feb84f8(%rbx)
        entry.size = 0;
        entry.capacity = 256;
        entry.isDirectory = false;
ffffffff800174b3:	b8 00 01 00 00       	mov    $0x100,%eax
ffffffff800174b8:	66 89 83 20 7b 14 80 	mov    %ax,-0x7feb84e0(%rbx)
        entry.size = 0;
ffffffff800174bf:	48 c7 83 10 7b 14 80 	movq   $0x0,-0x7feb84f0(%rbx)
ffffffff800174c6:	00 00 00 00 
        entry.capacity = 256;
ffffffff800174ca:	48 c7 83 18 7b 14 80 	movq   $0x100,-0x7feb84e8(%rbx)
ffffffff800174d1:	00 01 00 00 
        entry.heapAllocated = true;

        return fileCount++;
ffffffff800174d5:	8b 1d a9 05 13 00    	mov    0x1305a9(%rip),%ebx        # ffffffff80147a84 <_ZN2Fs7RamdiskL9fileCountE>
ffffffff800174db:	8d 43 01             	lea    0x1(%rbx),%eax
ffffffff800174de:	89 05 a0 05 13 00    	mov    %eax,0x1305a0(%rip)        # ffffffff80147a84 <_ZN2Fs7RamdiskL9fileCountE>
    }
ffffffff800174e4:	48 83 c4 08          	add    $0x8,%rsp
ffffffff800174e8:	89 d8                	mov    %ebx,%eax
ffffffff800174ea:	5b                   	pop    %rbx
ffffffff800174eb:	41 5c                	pop    %r12
ffffffff800174ed:	41 5d                	pop    %r13
ffffffff800174ef:	5d                   	pop    %rbp
ffffffff800174f0:	c3                   	ret
ffffffff800174f1:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        return *a == *b;
ffffffff800174f8:	0f b6 46 01          	movzbl 0x1(%rsi),%eax
            if (StrEqual(fileTable[i].name, path)) {
ffffffff800174fc:	84 c0                	test   %al,%al
ffffffff800174fe:	0f 85 2f ff ff ff    	jne    ffffffff80017433 <_ZN2Fs7Ramdisk6CreateEPKc+0x93>
                if (!entry.heapAllocated) {
ffffffff80017504:	4c 63 e3             	movslq %ebx,%r12
ffffffff80017507:	4c 89 e0             	mov    %r12,%rax
ffffffff8001750a:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff8001750e:	4c 01 e0             	add    %r12,%rax
ffffffff80017511:	4c 8d 2c c5 a0 7a 14 	lea    -0x7feb8560(,%rax,8),%r13
ffffffff80017518:	80 
ffffffff80017519:	41 80 bd 81 00 00 00 	cmpb   $0x0,0x81(%r13)
ffffffff80017520:	00 
ffffffff80017521:	75 2a                	jne    ffffffff8001754d <_ZN2Fs7Ramdisk6CreateEPKc+0x1ad>
                    uint8_t* newBuf = (uint8_t*)Memory::g_heap->Request(256);
ffffffff80017523:	48 8b 3d 8e 54 13 00 	mov    0x13548e(%rip),%rdi        # ffffffff8014c9b8 <_ZN6Memory6g_heapE>
ffffffff8001752a:	be 00 01 00 00       	mov    $0x100,%esi
ffffffff8001752f:	e8 cc 37 00 00       	call   ffffffff8001ad00 <_ZN6Memory13HeapAllocator7RequestEm>
                    if (newBuf == nullptr) return -1;
ffffffff80017534:	48 85 c0             	test   %rax,%rax
ffffffff80017537:	74 4a                	je     ffffffff80017583 <_ZN2Fs7Ramdisk6CreateEPKc+0x1e3>
                    entry.data = newBuf;
ffffffff80017539:	49 89 45 68          	mov    %rax,0x68(%r13)
                    entry.capacity = 256;
ffffffff8001753d:	49 c7 45 78 00 01 00 	movq   $0x100,0x78(%r13)
ffffffff80017544:	00 
                    entry.heapAllocated = true;
ffffffff80017545:	41 c6 85 81 00 00 00 	movb   $0x1,0x81(%r13)
ffffffff8001754c:	01 
                entry.size = 0;
ffffffff8001754d:	4c 89 e0             	mov    %r12,%rax
ffffffff80017550:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff80017554:	4c 01 e0             	add    %r12,%rax
ffffffff80017557:	48 8d 04 c5 a0 7a 14 	lea    -0x7feb8560(,%rax,8),%rax
ffffffff8001755e:	80 
ffffffff8001755f:	48 c7 40 70 00 00 00 	movq   $0x0,0x70(%rax)
ffffffff80017566:	00 
                entry.isDirectory = false;
ffffffff80017567:	c6 80 80 00 00 00 00 	movb   $0x0,0x80(%rax)
    }
ffffffff8001756e:	48 83 c4 08          	add    $0x8,%rsp
ffffffff80017572:	89 d8                	mov    %ebx,%eax
ffffffff80017574:	5b                   	pop    %rbx
ffffffff80017575:	41 5c                	pop    %r12
ffffffff80017577:	41 5d                	pop    %r13
ffffffff80017579:	5d                   	pop    %rbp
ffffffff8001757a:	c3                   	ret
        while (*a && *b) {
ffffffff8001757b:	44 89 d8             	mov    %r11d,%eax
ffffffff8001757e:	e9 79 ff ff ff       	jmp    ffffffff800174fc <_ZN2Fs7Ramdisk6CreateEPKc+0x15c>
        if (path == nullptr) return -1;
ffffffff80017583:	bb ff ff ff ff       	mov    $0xffffffff,%ebx
ffffffff80017588:	e9 57 ff ff ff       	jmp    ffffffff800174e4 <_ZN2Fs7Ramdisk6CreateEPKc+0x144>
ffffffff8001758d:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80017594:	00 00 00 
ffffffff80017597:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001759e:	00 00 

ffffffff800175a0 <_ZN2Fs3Vfs10InitializeEv>:
            if (!handleTable[i].inUse) return i;
        }
        return -1;
    }

    void Initialize() {
ffffffff800175a0:	55                   	push   %rbp
ffffffff800175a1:	48 c7 c0 a0 c1 14 80 	mov    $0xffffffff8014c1a0,%rax
ffffffff800175a8:	48 89 e5             	mov    %rsp,%rbp
ffffffff800175ab:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800175b2:	00 00 00 00 
ffffffff800175b6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800175bd:	00 00 00 
        for (int i = 0; i < MaxDrives; i++) {
            driveTable[i] = nullptr;
ffffffff800175c0:	48 c7 00 00 00 00 00 	movq   $0x0,(%rax)
        for (int i = 0; i < MaxDrives; i++) {
ffffffff800175c7:	48 83 c0 10          	add    $0x10,%rax
            driveTable[i] = nullptr;
ffffffff800175cb:	48 c7 40 f8 00 00 00 	movq   $0x0,-0x8(%rax)
ffffffff800175d2:	00 
        for (int i = 0; i < MaxDrives; i++) {
ffffffff800175d3:	48 3d 20 c2 14 80    	cmp    $0xffffffff8014c220,%rax
ffffffff800175d9:	75 e5                	jne    ffffffff800175c0 <_ZN2Fs3Vfs10InitializeEv+0x20>
ffffffff800175db:	48 c7 c0 a0 be 14 80 	mov    $0xffffffff8014bea0,%rax
ffffffff800175e2:	48 c7 c2 a0 c1 14 80 	mov    $0xffffffff8014c1a0,%rdx
ffffffff800175e9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        }
        for (int i = 0; i < MaxHandles; i++) {
            handleTable[i].inUse = false;
ffffffff800175f0:	c6 00 00             	movb   $0x0,(%rax)
        for (int i = 0; i < MaxHandles; i++) {
ffffffff800175f3:	48 83 c0 18          	add    $0x18,%rax
            handleTable[i].inUse = false;
ffffffff800175f7:	c6 40 f4 00          	movb   $0x0,-0xc(%rax)
        for (int i = 0; i < MaxHandles; i++) {
ffffffff800175fb:	48 39 c2             	cmp    %rax,%rdx
ffffffff800175fe:	75 f0                	jne    ffffffff800175f0 <_ZN2Fs3Vfs10InitializeEv+0x50>
            Print(string);
ffffffff80017600:	48 c7 c7 6f b6 02 80 	mov    $0xffffffff8002b66f,%rdi
            g_kernelLogDepth++;
ffffffff80017607:	83 05 96 7e 1c 00 01 	addl   $0x1,0x1c7e96(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001760e:	e8 ad bb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017613:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001761a:	e8 a1 bb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001761f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80017626:	e8 95 bb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001762b:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80017632:	e8 89 bb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017637:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001763e:	e8 7d bb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017643:	48 c7 c7 73 b6 02 80 	mov    $0xffffffff8002b673,%rdi
ffffffff8001764a:	e8 71 bb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::int2basestr(number, t.streamBaseType));
ffffffff8001764f:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80017654:	bf 10 00 00 00       	mov    $0x10,%edi
ffffffff80017659:	e8 22 2d 00 00       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
ffffffff8001765e:	48 89 c7             	mov    %rax,%rdi
ffffffff80017661:	e8 5a bb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80017666:	48 c7 c7 81 b6 02 80 	mov    $0xffffffff8002b681,%rdi
ffffffff8001766d:	e8 4e bb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::int2basestr(number, t.streamBaseType));
ffffffff80017672:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80017677:	bf 40 00 00 00       	mov    $0x40,%edi
ffffffff8001767c:	e8 ff 2c 00 00       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
ffffffff80017681:	48 89 c7             	mov    %rax,%rdi
ffffffff80017684:	e8 37 bb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80017689:	48 c7 c7 8b b6 02 80 	mov    $0xffffffff8002b68b,%rdi
ffffffff80017690:	e8 2b bb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017695:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001769c:	e8 1f bb 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff800176a1:	83 2d fc 7d 1c 00 01 	subl   $0x1,0x1c7dfc(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        }

        Kt::KernelLogStream(Kt::OK, "VFS") << "Initialized (" << MaxDrives << " drives, " << MaxHandles << " handles)";
    }
ffffffff800176a8:	5d                   	pop    %rbp
ffffffff800176a9:	c3                   	ret
ffffffff800176aa:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)

ffffffff800176b0 <_ZN2Fs3Vfs13RegisterDriveEiPNS0_8FsDriverE>:

    int RegisterDrive(int driveNumber, FsDriver* driver) {
        if (driveNumber < 0 || driveNumber >= MaxDrives) return -1;
        if (driver == nullptr) return -1;
ffffffff800176b0:	48 85 f6             	test   %rsi,%rsi
ffffffff800176b3:	0f 84 a4 00 00 00    	je     ffffffff8001775d <_ZN2Fs3Vfs13RegisterDriveEiPNS0_8FsDriverE+0xad>
    int RegisterDrive(int driveNumber, FsDriver* driver) {
ffffffff800176b9:	55                   	push   %rbp
ffffffff800176ba:	48 89 e5             	mov    %rsp,%rbp
ffffffff800176bd:	53                   	push   %rbx
ffffffff800176be:	89 fb                	mov    %edi,%ebx
ffffffff800176c0:	48 83 ec 08          	sub    $0x8,%rsp
        if (driver == nullptr) return -1;
ffffffff800176c4:	83 ff 0f             	cmp    $0xf,%edi
ffffffff800176c7:	0f 87 89 00 00 00    	ja     ffffffff80017756 <_ZN2Fs3Vfs13RegisterDriveEiPNS0_8FsDriverE+0xa6>

        driveTable[driveNumber] = driver;
ffffffff800176cd:	48 63 c7             	movslq %edi,%rax
            Print(string);
ffffffff800176d0:	48 c7 c7 6f b6 02 80 	mov    $0xffffffff8002b66f,%rdi
            g_kernelLogDepth++;
ffffffff800176d7:	83 05 c6 7d 1c 00 01 	addl   $0x1,0x1c7dc6(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800176de:	48 89 34 c5 a0 c1 14 	mov    %rsi,-0x7feb3e60(,%rax,8)
ffffffff800176e5:	80 
            Print(string);
ffffffff800176e6:	e8 d5 ba 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800176eb:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800176f2:	e8 c9 ba 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800176f7:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800176fe:	e8 bd ba 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017703:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001770a:	e8 b1 ba 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001770f:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80017716:	e8 a5 ba 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001771b:	48 c7 c7 95 b6 02 80 	mov    $0xffffffff8002b695,%rdi
ffffffff80017722:	e8 99 ba 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::int2basestr(number, t.streamBaseType));
ffffffff80017727:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001772c:	89 df                	mov    %ebx,%edi
ffffffff8001772e:	e8 4d 2c 00 00       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
ffffffff80017733:	48 89 c7             	mov    %rax,%rdi
ffffffff80017736:	e8 85 ba 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001773b:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80017742:	e8 79 ba 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80017747:	83 2d 56 7d 1c 00 01 	subl   $0x1,0x1c7d56(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        Kt::KernelLogStream(Kt::OK, "VFS") << "Registered drive " << driveNumber;
        return 0;
ffffffff8001774e:	31 c0                	xor    %eax,%eax
    }
ffffffff80017750:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff80017754:	c9                   	leave
ffffffff80017755:	c3                   	ret
        if (driveNumber < 0 || driveNumber >= MaxDrives) return -1;
ffffffff80017756:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
ffffffff8001775b:	eb f3                	jmp    ffffffff80017750 <_ZN2Fs3Vfs13RegisterDriveEiPNS0_8FsDriverE+0xa0>
ffffffff8001775d:	83 c8 ff             	or     $0xffffffff,%eax
    }
ffffffff80017760:	c3                   	ret
ffffffff80017761:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80017768:	00 00 00 
ffffffff8001776b:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80017772:	00 00 00 
ffffffff80017775:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001777c:	00 00 00 
ffffffff8001777f:	90                   	nop

ffffffff80017780 <_ZN2Fs3Vfs7VfsOpenEPKc>:

    int VfsOpen(const char* path) {
ffffffff80017780:	55                   	push   %rbp
ffffffff80017781:	48 89 e5             	mov    %rsp,%rbp
ffffffff80017784:	41 54                	push   %r12
ffffffff80017786:	53                   	push   %rbx
        if (path == nullptr) return false;
ffffffff80017787:	48 85 ff             	test   %rdi,%rdi
ffffffff8001778a:	74 34                	je     ffffffff800177c0 <_ZN2Fs3Vfs7VfsOpenEPKc+0x40>
        while (path[i] >= '0' && path[i] <= '9') {
ffffffff8001778c:	0f b6 07             	movzbl (%rdi),%eax
ffffffff8001778f:	8d 50 d0             	lea    -0x30(%rax),%edx
ffffffff80017792:	80 fa 09             	cmp    $0x9,%dl
ffffffff80017795:	77 29                	ja     ffffffff800177c0 <_ZN2Fs3Vfs7VfsOpenEPKc+0x40>
ffffffff80017797:	ba 01 00 00 00       	mov    $0x1,%edx
        int drive = 0;
ffffffff8001779c:	31 db                	xor    %ebx,%ebx
ffffffff8001779e:	66 90                	xchg   %ax,%ax
            drive = drive * 10 + (path[i] - '0');
ffffffff800177a0:	83 e8 30             	sub    $0x30,%eax
ffffffff800177a3:	8d 0c 9b             	lea    (%rbx,%rbx,4),%ecx
ffffffff800177a6:	0f be c0             	movsbl %al,%eax
ffffffff800177a9:	8d 1c 48             	lea    (%rax,%rcx,2),%ebx
        while (path[i] >= '0' && path[i] <= '9') {
ffffffff800177ac:	0f b6 04 17          	movzbl (%rdi,%rdx,1),%eax
ffffffff800177b0:	48 83 c2 01          	add    $0x1,%rdx
ffffffff800177b4:	8d 48 d0             	lea    -0x30(%rax),%ecx
ffffffff800177b7:	80 f9 09             	cmp    $0x9,%cl
ffffffff800177ba:	76 e4                	jbe    ffffffff800177a0 <_ZN2Fs3Vfs7VfsOpenEPKc+0x20>
        if (path[i] != ':') return false;
ffffffff800177bc:	3c 3a                	cmp    $0x3a,%al
ffffffff800177be:	74 70                	je     ffffffff80017830 <_ZN2Fs3Vfs7VfsOpenEPKc+0xb0>
            Print(string);
ffffffff800177c0:	48 c7 c7 6f b6 02 80 	mov    $0xffffffff8002b66f,%rdi
            g_kernelLogDepth++;
ffffffff800177c7:	83 05 d6 7c 1c 00 01 	addl   $0x1,0x1c7cd6(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800177ce:	e8 ed b9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800177d3:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800177da:	e8 e1 b9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800177df:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800177e6:	e8 d5 b9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800177eb:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff800177f2:	e8 c9 b9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800177f7:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800177fe:	e8 bd b9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017803:	48 c7 c7 a7 b6 02 80 	mov    $0xffffffff8002b6a7,%rdi
ffffffff8001780a:	e8 b1 b9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001780f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80017816:	e8 a5 b9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001781b:	83 2d 82 7c 1c 00 01 	subl   $0x1,0x1c7c82(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        handleTable[globalHandle].inUse = true;
        handleTable[globalHandle].driveNumber = drive;
        handleTable[globalHandle].localHandle = localHandle;

        return globalHandle;
    }
ffffffff80017822:	5b                   	pop    %rbx
            return -1;
ffffffff80017823:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
    }
ffffffff80017828:	41 5c                	pop    %r12
ffffffff8001782a:	5d                   	pop    %rbp
ffffffff8001782b:	c3                   	ret
ffffffff8001782c:	0f 1f 40 00          	nopl   0x0(%rax)
        outPath = &path[i + 1];
ffffffff80017830:	48 01 d7             	add    %rdx,%rdi
        if (drive < 0 || drive >= MaxDrives || driveTable[drive] == nullptr) {
ffffffff80017833:	83 fb 0f             	cmp    $0xf,%ebx
ffffffff80017836:	0f 87 ee 00 00 00    	ja     ffffffff8001792a <_ZN2Fs3Vfs7VfsOpenEPKc+0x1aa>
ffffffff8001783c:	4c 63 e3             	movslq %ebx,%r12
ffffffff8001783f:	4a 8b 04 e5 a0 c1 14 	mov    -0x7feb3e60(,%r12,8),%rax
ffffffff80017846:	80 
ffffffff80017847:	48 85 c0             	test   %rax,%rax
ffffffff8001784a:	0f 84 da 00 00 00    	je     ffffffff8001792a <_ZN2Fs3Vfs7VfsOpenEPKc+0x1aa>
        int localHandle = driveTable[drive]->Open(localPath);
ffffffff80017850:	ff 10                	call   *(%rax)
ffffffff80017852:	89 c7                	mov    %eax,%edi
        if (localHandle < 0) return -1;
ffffffff80017854:	85 c0                	test   %eax,%eax
ffffffff80017856:	78 ca                	js     ffffffff80017822 <_ZN2Fs3Vfs7VfsOpenEPKc+0xa2>
ffffffff80017858:	48 c7 c2 a0 be 14 80 	mov    $0xffffffff8014bea0,%rdx
        for (int i = 0; i < MaxHandles; i++) {
ffffffff8001785f:	31 c0                	xor    %eax,%eax
ffffffff80017861:	eb 29                	jmp    ffffffff8001788c <_ZN2Fs3Vfs7VfsOpenEPKc+0x10c>
ffffffff80017863:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001786a:	00 00 00 00 
ffffffff8001786e:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80017875:	00 00 00 00 
ffffffff80017879:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
ffffffff80017880:	83 c0 01             	add    $0x1,%eax
ffffffff80017883:	48 83 c2 0c          	add    $0xc,%rdx
ffffffff80017887:	83 f8 40             	cmp    $0x40,%eax
ffffffff8001788a:	74 2c                	je     ffffffff800178b8 <_ZN2Fs3Vfs7VfsOpenEPKc+0x138>
            if (!handleTable[i].inUse) return i;
ffffffff8001788c:	80 3a 00             	cmpb   $0x0,(%rdx)
ffffffff8001788f:	75 ef                	jne    ffffffff80017880 <_ZN2Fs3Vfs7VfsOpenEPKc+0x100>
        handleTable[globalHandle].inUse = true;
ffffffff80017891:	48 63 d0             	movslq %eax,%rdx
ffffffff80017894:	48 8d 14 52          	lea    (%rdx,%rdx,2),%rdx
ffffffff80017898:	48 c1 e2 02          	shl    $0x2,%rdx
ffffffff8001789c:	c6 82 a0 be 14 80 01 	movb   $0x1,-0x7feb4160(%rdx)
        handleTable[globalHandle].driveNumber = drive;
ffffffff800178a3:	89 9a a4 be 14 80    	mov    %ebx,-0x7feb415c(%rdx)
        handleTable[globalHandle].localHandle = localHandle;
ffffffff800178a9:	89 ba a8 be 14 80    	mov    %edi,-0x7feb4158(%rdx)
    }
ffffffff800178af:	5b                   	pop    %rbx
ffffffff800178b0:	41 5c                	pop    %r12
ffffffff800178b2:	5d                   	pop    %rbp
ffffffff800178b3:	c3                   	ret
ffffffff800178b4:	0f 1f 40 00          	nopl   0x0(%rax)
            driveTable[drive]->Close(localHandle);
ffffffff800178b8:	4a 8b 04 e5 a0 c1 14 	mov    -0x7feb3e60(,%r12,8),%rax
ffffffff800178bf:	80 
ffffffff800178c0:	ff 50 18             	call   *0x18(%rax)
            Print(string);
ffffffff800178c3:	48 c7 c7 6f b6 02 80 	mov    $0xffffffff8002b66f,%rdi
            g_kernelLogDepth++;
ffffffff800178ca:	83 05 d3 7b 1c 00 01 	addl   $0x1,0x1c7bd3(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800178d1:	e8 ea b8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800178d6:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800178dd:	e8 de b8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800178e2:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800178e9:	e8 d2 b8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800178ee:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff800178f5:	e8 c6 b8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800178fa:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80017901:	e8 ba b8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017906:	48 c7 c7 d2 b6 02 80 	mov    $0xffffffff8002b6d2,%rdi
ffffffff8001790d:	e8 ae b8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017912:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80017919:	e8 a2 b8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001791e:	83 2d 7f 7b 1c 00 01 	subl   $0x1,0x1c7b7f(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            return -1;
ffffffff80017925:	e9 f8 fe ff ff       	jmp    ffffffff80017822 <_ZN2Fs3Vfs7VfsOpenEPKc+0xa2>
            Print(string);
ffffffff8001792a:	48 c7 c7 6f b6 02 80 	mov    $0xffffffff8002b66f,%rdi
            g_kernelLogDepth++;
ffffffff80017931:	83 05 6c 7b 1c 00 01 	addl   $0x1,0x1c7b6c(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80017938:	e8 83 b8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001793d:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80017944:	e8 77 b8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017949:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80017950:	e8 6b b8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017955:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff8001795c:	e8 5f b8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017961:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80017968:	e8 53 b8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001796d:	48 c7 c7 bb b6 02 80 	mov    $0xffffffff8002b6bb,%rdi
ffffffff80017974:	e8 47 b8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::int2basestr(number, t.streamBaseType));
ffffffff80017979:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001797e:	89 df                	mov    %ebx,%edi
ffffffff80017980:	e8 fb 29 00 00       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
ffffffff80017985:	48 89 c7             	mov    %rax,%rdi
ffffffff80017988:	e8 33 b8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001798d:	48 c7 c7 c2 b6 02 80 	mov    $0xffffffff8002b6c2,%rdi
ffffffff80017994:	e8 27 b8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017999:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800179a0:	e8 1b b8 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff800179a5:	83 2d f8 7a 1c 00 01 	subl   $0x1,0x1c7af8(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            return -1;
ffffffff800179ac:	e9 71 fe ff ff       	jmp    ffffffff80017822 <_ZN2Fs3Vfs7VfsOpenEPKc+0xa2>
ffffffff800179b1:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800179b8:	00 00 00 
ffffffff800179bb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff800179c0 <_ZN2Fs3Vfs7VfsReadEiPhmm>:

    int VfsRead(int handle, uint8_t* buffer, uint64_t offset, uint64_t size) {
        if (handle < 0 || handle >= MaxHandles || !handleTable[handle].inUse) return -1;
ffffffff800179c0:	83 ff 3f             	cmp    $0x3f,%edi
ffffffff800179c3:	77 33                	ja     ffffffff800179f8 <_ZN2Fs3Vfs7VfsReadEiPhmm+0x38>
ffffffff800179c5:	48 63 ff             	movslq %edi,%rdi
ffffffff800179c8:	48 8d 04 7f          	lea    (%rdi,%rdi,2),%rax
ffffffff800179cc:	48 c1 e0 02          	shl    $0x2,%rax
ffffffff800179d0:	80 b8 a0 be 14 80 00 	cmpb   $0x0,-0x7feb4160(%rax)
ffffffff800179d7:	74 1f                	je     ffffffff800179f8 <_ZN2Fs3Vfs7VfsReadEiPhmm+0x38>

        HandleEntry& entry = handleTable[handle];
        return driveTable[entry.driveNumber]->Read(entry.localHandle, buffer, offset, size);
ffffffff800179d9:	8b b8 a8 be 14 80    	mov    -0x7feb4158(%rax),%edi
ffffffff800179df:	48 05 a0 be 14 80    	add    $0xffffffff8014bea0,%rax
ffffffff800179e5:	48 63 40 04          	movslq 0x4(%rax),%rax
ffffffff800179e9:	48 8b 04 c5 a0 c1 14 	mov    -0x7feb3e60(,%rax,8),%rax
ffffffff800179f0:	80 
ffffffff800179f1:	ff 60 08             	jmp    *0x8(%rax)
ffffffff800179f4:	0f 1f 40 00          	nopl   0x0(%rax)
    }
ffffffff800179f8:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
ffffffff800179fd:	c3                   	ret
ffffffff800179fe:	66 90                	xchg   %ax,%ax

ffffffff80017a00 <_ZN2Fs3Vfs10VfsGetSizeEi>:

    uint64_t VfsGetSize(int handle) {
        if (handle < 0 || handle >= MaxHandles || !handleTable[handle].inUse) return 0;
ffffffff80017a00:	83 ff 3f             	cmp    $0x3f,%edi
ffffffff80017a03:	77 33                	ja     ffffffff80017a38 <_ZN2Fs3Vfs10VfsGetSizeEi+0x38>
ffffffff80017a05:	48 63 ff             	movslq %edi,%rdi
ffffffff80017a08:	48 8d 04 7f          	lea    (%rdi,%rdi,2),%rax
ffffffff80017a0c:	48 c1 e0 02          	shl    $0x2,%rax
ffffffff80017a10:	80 b8 a0 be 14 80 00 	cmpb   $0x0,-0x7feb4160(%rax)
ffffffff80017a17:	74 1f                	je     ffffffff80017a38 <_ZN2Fs3Vfs10VfsGetSizeEi+0x38>

        HandleEntry& entry = handleTable[handle];
        return driveTable[entry.driveNumber]->GetSize(entry.localHandle);
ffffffff80017a19:	8b b8 a8 be 14 80    	mov    -0x7feb4158(%rax),%edi
ffffffff80017a1f:	48 05 a0 be 14 80    	add    $0xffffffff8014bea0,%rax
ffffffff80017a25:	48 63 40 04          	movslq 0x4(%rax),%rax
ffffffff80017a29:	48 8b 04 c5 a0 c1 14 	mov    -0x7feb3e60(,%rax,8),%rax
ffffffff80017a30:	80 
ffffffff80017a31:	ff 60 10             	jmp    *0x10(%rax)
ffffffff80017a34:	0f 1f 40 00          	nopl   0x0(%rax)
    }
ffffffff80017a38:	31 c0                	xor    %eax,%eax
ffffffff80017a3a:	c3                   	ret
ffffffff80017a3b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80017a40 <_ZN2Fs3Vfs8VfsCloseEi>:

    void VfsClose(int handle) {
        if (handle < 0 || handle >= MaxHandles || !handleTable[handle].inUse) return;
ffffffff80017a40:	83 ff 3f             	cmp    $0x3f,%edi
ffffffff80017a43:	77 4b                	ja     ffffffff80017a90 <_ZN2Fs3Vfs8VfsCloseEi+0x50>
    void VfsClose(int handle) {
ffffffff80017a45:	55                   	push   %rbp
        if (handle < 0 || handle >= MaxHandles || !handleTable[handle].inUse) return;
ffffffff80017a46:	48 63 ff             	movslq %edi,%rdi
    void VfsClose(int handle) {
ffffffff80017a49:	48 89 e5             	mov    %rsp,%rbp
ffffffff80017a4c:	53                   	push   %rbx
        if (handle < 0 || handle >= MaxHandles || !handleTable[handle].inUse) return;
ffffffff80017a4d:	48 8d 1c 7f          	lea    (%rdi,%rdi,2),%rbx
ffffffff80017a51:	48 c1 e3 02          	shl    $0x2,%rbx
    void VfsClose(int handle) {
ffffffff80017a55:	48 83 ec 08          	sub    $0x8,%rsp
        if (handle < 0 || handle >= MaxHandles || !handleTable[handle].inUse) return;
ffffffff80017a59:	80 bb a0 be 14 80 00 	cmpb   $0x0,-0x7feb4160(%rbx)
ffffffff80017a60:	74 1f                	je     ffffffff80017a81 <_ZN2Fs3Vfs8VfsCloseEi+0x41>

        HandleEntry& entry = handleTable[handle];
        driveTable[entry.driveNumber]->Close(entry.localHandle);
ffffffff80017a62:	48 63 83 a4 be 14 80 	movslq -0x7feb415c(%rbx),%rax
ffffffff80017a69:	8b bb a8 be 14 80    	mov    -0x7feb4158(%rbx),%edi
ffffffff80017a6f:	48 8b 04 c5 a0 c1 14 	mov    -0x7feb3e60(,%rax,8),%rax
ffffffff80017a76:	80 
ffffffff80017a77:	ff 50 18             	call   *0x18(%rax)
        entry.inUse = false;
ffffffff80017a7a:	c6 83 a0 be 14 80 00 	movb   $0x0,-0x7feb4160(%rbx)
    }
ffffffff80017a81:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff80017a85:	c9                   	leave
ffffffff80017a86:	c3                   	ret
ffffffff80017a87:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff80017a8e:	00 00 
ffffffff80017a90:	c3                   	ret
ffffffff80017a91:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80017a98:	00 00 00 
ffffffff80017a9b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80017aa0 <_ZN2Fs3Vfs8VfsWriteEiPKhmm>:

    int VfsWrite(int handle, const uint8_t* buffer, uint64_t offset, uint64_t size) {
        if (handle < 0 || handle >= MaxHandles || !handleTable[handle].inUse) return -1;
ffffffff80017aa0:	83 ff 3f             	cmp    $0x3f,%edi
ffffffff80017aa3:	77 3b                	ja     ffffffff80017ae0 <_ZN2Fs3Vfs8VfsWriteEiPKhmm+0x40>
ffffffff80017aa5:	48 63 ff             	movslq %edi,%rdi
ffffffff80017aa8:	48 8d 04 7f          	lea    (%rdi,%rdi,2),%rax
ffffffff80017aac:	48 c1 e0 02          	shl    $0x2,%rax
ffffffff80017ab0:	80 b8 a0 be 14 80 00 	cmpb   $0x0,-0x7feb4160(%rax)
ffffffff80017ab7:	74 27                	je     ffffffff80017ae0 <_ZN2Fs3Vfs8VfsWriteEiPKhmm+0x40>

        HandleEntry& entry = handleTable[handle];
        if (driveTable[entry.driveNumber]->Write == nullptr) return -1;
ffffffff80017ab9:	48 8d b8 a0 be 14 80 	lea    -0x7feb4160(%rax),%rdi
ffffffff80017ac0:	48 63 80 a4 be 14 80 	movslq -0x7feb415c(%rax),%rax
ffffffff80017ac7:	48 8b 04 c5 a0 c1 14 	mov    -0x7feb3e60(,%rax,8),%rax
ffffffff80017ace:	80 
ffffffff80017acf:	48 8b 40 28          	mov    0x28(%rax),%rax
ffffffff80017ad3:	48 85 c0             	test   %rax,%rax
ffffffff80017ad6:	74 08                	je     ffffffff80017ae0 <_ZN2Fs3Vfs8VfsWriteEiPKhmm+0x40>
        return driveTable[entry.driveNumber]->Write(entry.localHandle, buffer, offset, size);
ffffffff80017ad8:	8b 7f 08             	mov    0x8(%rdi),%edi
ffffffff80017adb:	ff e0                	jmp    *%rax
ffffffff80017add:	0f 1f 00             	nopl   (%rax)
    }
ffffffff80017ae0:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
ffffffff80017ae5:	c3                   	ret
ffffffff80017ae6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80017aed:	00 00 00 
ffffffff80017af0:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80017af7:	00 00 00 
ffffffff80017afa:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)

ffffffff80017b00 <_ZN2Fs3Vfs9VfsCreateEPKc>:

    int VfsCreate(const char* path) {
ffffffff80017b00:	55                   	push   %rbp
ffffffff80017b01:	48 89 e5             	mov    %rsp,%rbp
ffffffff80017b04:	53                   	push   %rbx
ffffffff80017b05:	48 83 ec 08          	sub    $0x8,%rsp
        if (path == nullptr) return false;
ffffffff80017b09:	48 85 ff             	test   %rdi,%rdi
ffffffff80017b0c:	74 32                	je     ffffffff80017b40 <_ZN2Fs3Vfs9VfsCreateEPKc+0x40>
        while (path[i] >= '0' && path[i] <= '9') {
ffffffff80017b0e:	0f b6 07             	movzbl (%rdi),%eax
ffffffff80017b11:	8d 50 d0             	lea    -0x30(%rax),%edx
ffffffff80017b14:	80 fa 09             	cmp    $0x9,%dl
ffffffff80017b17:	77 27                	ja     ffffffff80017b40 <_ZN2Fs3Vfs9VfsCreateEPKc+0x40>
ffffffff80017b19:	ba 01 00 00 00       	mov    $0x1,%edx
        int drive = 0;
ffffffff80017b1e:	31 db                	xor    %ebx,%ebx
            drive = drive * 10 + (path[i] - '0');
ffffffff80017b20:	83 e8 30             	sub    $0x30,%eax
ffffffff80017b23:	8d 0c 9b             	lea    (%rbx,%rbx,4),%ecx
ffffffff80017b26:	0f be c0             	movsbl %al,%eax
ffffffff80017b29:	8d 1c 48             	lea    (%rax,%rcx,2),%ebx
        while (path[i] >= '0' && path[i] <= '9') {
ffffffff80017b2c:	0f b6 04 17          	movzbl (%rdi,%rdx,1),%eax
ffffffff80017b30:	48 83 c2 01          	add    $0x1,%rdx
ffffffff80017b34:	8d 48 d0             	lea    -0x30(%rax),%ecx
ffffffff80017b37:	80 f9 09             	cmp    $0x9,%cl
ffffffff80017b3a:	76 e4                	jbe    ffffffff80017b20 <_ZN2Fs3Vfs9VfsCreateEPKc+0x20>
        if (path[i] != ':') return false;
ffffffff80017b3c:	3c 3a                	cmp    $0x3a,%al
ffffffff80017b3e:	74 70                	je     ffffffff80017bb0 <_ZN2Fs3Vfs9VfsCreateEPKc+0xb0>
            Print(string);
ffffffff80017b40:	48 c7 c7 6f b6 02 80 	mov    $0xffffffff8002b66f,%rdi
            g_kernelLogDepth++;
ffffffff80017b47:	83 05 56 79 1c 00 01 	addl   $0x1,0x1c7956(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80017b4e:	e8 6d b6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017b53:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80017b5a:	e8 61 b6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017b5f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80017b66:	e8 55 b6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017b6b:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80017b72:	e8 49 b6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017b77:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80017b7e:	e8 3d b6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017b83:	48 c7 c7 30 cc 02 80 	mov    $0xffffffff8002cc30,%rdi
ffffffff80017b8a:	e8 31 b6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017b8f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80017b96:	e8 25 b6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80017b9b:	83 2d 02 79 1c 00 01 	subl   $0x1,0x1c7902(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        int drive;
        const char* localPath;

        if (!ParsePath(path, drive, localPath)) {
            Kt::KernelLogStream(Kt::ERROR, "VFS") << "Invalid path format for Create";
            return -1;
ffffffff80017ba2:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
        handleTable[globalHandle].inUse = true;
        handleTable[globalHandle].driveNumber = drive;
        handleTable[globalHandle].localHandle = localHandle;

        return globalHandle;
    }
ffffffff80017ba7:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff80017bab:	c9                   	leave
ffffffff80017bac:	c3                   	ret
ffffffff80017bad:	0f 1f 00             	nopl   (%rax)
        outPath = &path[i + 1];
ffffffff80017bb0:	48 01 d7             	add    %rdx,%rdi
        if (drive < 0 || drive >= MaxDrives || driveTable[drive] == nullptr) {
ffffffff80017bb3:	83 fb 0f             	cmp    $0xf,%ebx
ffffffff80017bb6:	0f 87 e8 00 00 00    	ja     ffffffff80017ca4 <_ZN2Fs3Vfs9VfsCreateEPKc+0x1a4>
ffffffff80017bbc:	48 63 c3             	movslq %ebx,%rax
ffffffff80017bbf:	48 8b 04 c5 a0 c1 14 	mov    -0x7feb3e60(,%rax,8),%rax
ffffffff80017bc6:	80 
ffffffff80017bc7:	48 85 c0             	test   %rax,%rax
ffffffff80017bca:	0f 84 d4 00 00 00    	je     ffffffff80017ca4 <_ZN2Fs3Vfs9VfsCreateEPKc+0x1a4>
        if (driveTable[drive]->Create == nullptr) return -1;
ffffffff80017bd0:	48 8b 40 30          	mov    0x30(%rax),%rax
ffffffff80017bd4:	48 85 c0             	test   %rax,%rax
ffffffff80017bd7:	74 c9                	je     ffffffff80017ba2 <_ZN2Fs3Vfs9VfsCreateEPKc+0xa2>
        int localHandle = driveTable[drive]->Create(localPath);
ffffffff80017bd9:	ff d0                	call   *%rax
ffffffff80017bdb:	89 c1                	mov    %eax,%ecx
        if (localHandle < 0) return -1;
ffffffff80017bdd:	85 c0                	test   %eax,%eax
ffffffff80017bdf:	78 c1                	js     ffffffff80017ba2 <_ZN2Fs3Vfs9VfsCreateEPKc+0xa2>
ffffffff80017be1:	48 c7 c2 a0 be 14 80 	mov    $0xffffffff8014bea0,%rdx
        for (int i = 0; i < MaxHandles; i++) {
ffffffff80017be8:	31 c0                	xor    %eax,%eax
ffffffff80017bea:	eb 20                	jmp    ffffffff80017c0c <_ZN2Fs3Vfs9VfsCreateEPKc+0x10c>
ffffffff80017bec:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80017bf3:	00 00 00 00 
ffffffff80017bf7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff80017bfe:	00 00 
ffffffff80017c00:	83 c0 01             	add    $0x1,%eax
ffffffff80017c03:	48 83 c2 0c          	add    $0xc,%rdx
ffffffff80017c07:	83 f8 40             	cmp    $0x40,%eax
ffffffff80017c0a:	74 2c                	je     ffffffff80017c38 <_ZN2Fs3Vfs9VfsCreateEPKc+0x138>
            if (!handleTable[i].inUse) return i;
ffffffff80017c0c:	80 3a 00             	cmpb   $0x0,(%rdx)
ffffffff80017c0f:	75 ef                	jne    ffffffff80017c00 <_ZN2Fs3Vfs9VfsCreateEPKc+0x100>
        handleTable[globalHandle].inUse = true;
ffffffff80017c11:	48 63 d0             	movslq %eax,%rdx
ffffffff80017c14:	48 8d 14 52          	lea    (%rdx,%rdx,2),%rdx
ffffffff80017c18:	48 c1 e2 02          	shl    $0x2,%rdx
        handleTable[globalHandle].driveNumber = drive;
ffffffff80017c1c:	89 9a a4 be 14 80    	mov    %ebx,-0x7feb415c(%rdx)
    }
ffffffff80017c22:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
        handleTable[globalHandle].inUse = true;
ffffffff80017c26:	c6 82 a0 be 14 80 01 	movb   $0x1,-0x7feb4160(%rdx)
        handleTable[globalHandle].localHandle = localHandle;
ffffffff80017c2d:	89 8a a8 be 14 80    	mov    %ecx,-0x7feb4158(%rdx)
    }
ffffffff80017c33:	c9                   	leave
ffffffff80017c34:	c3                   	ret
ffffffff80017c35:	0f 1f 00             	nopl   (%rax)
            Print(string);
ffffffff80017c38:	48 c7 c7 6f b6 02 80 	mov    $0xffffffff8002b66f,%rdi
            g_kernelLogDepth++;
ffffffff80017c3f:	83 05 5e 78 1c 00 01 	addl   $0x1,0x1c785e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80017c46:	e8 75 b5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017c4b:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80017c52:	e8 69 b5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017c57:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80017c5e:	e8 5d b5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017c63:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80017c6a:	e8 51 b5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017c6f:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80017c76:	e8 45 b5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017c7b:	48 c7 c7 d2 b6 02 80 	mov    $0xffffffff8002b6d2,%rdi
ffffffff80017c82:	e8 39 b5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017c87:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80017c8e:	e8 2d b5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80017c93:	83 2d 0a 78 1c 00 01 	subl   $0x1,0x1c780a(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            return -1;
ffffffff80017c9a:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
ffffffff80017c9f:	e9 03 ff ff ff       	jmp    ffffffff80017ba7 <_ZN2Fs3Vfs9VfsCreateEPKc+0xa7>
            Print(string);
ffffffff80017ca4:	48 c7 c7 6f b6 02 80 	mov    $0xffffffff8002b66f,%rdi
            g_kernelLogDepth++;
ffffffff80017cab:	83 05 f2 77 1c 00 01 	addl   $0x1,0x1c77f2(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80017cb2:	e8 09 b5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017cb7:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80017cbe:	e8 fd b4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017cc3:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80017cca:	e8 f1 b4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017ccf:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80017cd6:	e8 e5 b4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017cdb:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80017ce2:	e8 d9 b4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017ce7:	48 c7 c7 bb b6 02 80 	mov    $0xffffffff8002b6bb,%rdi
ffffffff80017cee:	e8 cd b4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::int2basestr(number, t.streamBaseType));
ffffffff80017cf3:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80017cf8:	89 df                	mov    %ebx,%edi
ffffffff80017cfa:	e8 81 26 00 00       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
ffffffff80017cff:	48 89 c7             	mov    %rax,%rdi
ffffffff80017d02:	e8 b9 b4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80017d07:	48 c7 c7 c2 b6 02 80 	mov    $0xffffffff8002b6c2,%rdi
ffffffff80017d0e:	e8 ad b4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017d13:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80017d1a:	e8 a1 b4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80017d1f:	83 2d 7e 77 1c 00 01 	subl   $0x1,0x1c777e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            return -1;
ffffffff80017d26:	e9 77 fe ff ff       	jmp    ffffffff80017ba2 <_ZN2Fs3Vfs9VfsCreateEPKc+0xa2>
ffffffff80017d2b:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80017d32:	00 00 00 
ffffffff80017d35:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80017d3c:	00 00 00 
ffffffff80017d3f:	90                   	nop

ffffffff80017d40 <_ZN2Fs3Vfs10VfsReadDirEPKcPS2_i>:

    int VfsReadDir(const char* path, const char** outNames, int maxEntries) {
ffffffff80017d40:	55                   	push   %rbp
ffffffff80017d41:	48 89 e5             	mov    %rsp,%rbp
ffffffff80017d44:	53                   	push   %rbx
ffffffff80017d45:	48 83 ec 08          	sub    $0x8,%rsp
        if (path == nullptr) return false;
ffffffff80017d49:	48 85 ff             	test   %rdi,%rdi
ffffffff80017d4c:	74 52                	je     ffffffff80017da0 <_ZN2Fs3Vfs10VfsReadDirEPKcPS2_i+0x60>
        while (path[i] >= '0' && path[i] <= '9') {
ffffffff80017d4e:	0f b6 07             	movzbl (%rdi),%eax
ffffffff80017d51:	49 89 f0             	mov    %rsi,%r8
ffffffff80017d54:	89 d6                	mov    %edx,%esi
ffffffff80017d56:	8d 50 d0             	lea    -0x30(%rax),%edx
ffffffff80017d59:	80 fa 09             	cmp    $0x9,%dl
ffffffff80017d5c:	77 42                	ja     ffffffff80017da0 <_ZN2Fs3Vfs10VfsReadDirEPKcPS2_i+0x60>
ffffffff80017d5e:	ba 01 00 00 00       	mov    $0x1,%edx
        int drive = 0;
ffffffff80017d63:	31 db                	xor    %ebx,%ebx
ffffffff80017d65:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80017d6c:	00 00 00 00 
ffffffff80017d70:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80017d77:	00 00 00 00 
ffffffff80017d7b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            drive = drive * 10 + (path[i] - '0');
ffffffff80017d80:	83 e8 30             	sub    $0x30,%eax
ffffffff80017d83:	8d 0c 9b             	lea    (%rbx,%rbx,4),%ecx
ffffffff80017d86:	0f be c0             	movsbl %al,%eax
ffffffff80017d89:	8d 1c 48             	lea    (%rax,%rcx,2),%ebx
        while (path[i] >= '0' && path[i] <= '9') {
ffffffff80017d8c:	0f b6 04 17          	movzbl (%rdi,%rdx,1),%eax
ffffffff80017d90:	48 83 c2 01          	add    $0x1,%rdx
ffffffff80017d94:	8d 48 d0             	lea    -0x30(%rax),%ecx
ffffffff80017d97:	80 f9 09             	cmp    $0x9,%cl
ffffffff80017d9a:	76 e4                	jbe    ffffffff80017d80 <_ZN2Fs3Vfs10VfsReadDirEPKcPS2_i+0x40>
        if (path[i] != ':') return false;
ffffffff80017d9c:	3c 3a                	cmp    $0x3a,%al
ffffffff80017d9e:	74 78                	je     ffffffff80017e18 <_ZN2Fs3Vfs10VfsReadDirEPKcPS2_i+0xd8>
            Print(string);
ffffffff80017da0:	48 c7 c7 6f b6 02 80 	mov    $0xffffffff8002b66f,%rdi
            g_kernelLogDepth++;
ffffffff80017da7:	83 05 f6 76 1c 00 01 	addl   $0x1,0x1c76f6(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80017dae:	e8 0d b4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017db3:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80017dba:	e8 01 b4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017dbf:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80017dc6:	e8 f5 b3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017dcb:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80017dd2:	e8 e9 b3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017dd7:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80017dde:	e8 dd b3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017de3:	48 c7 c7 50 cc 02 80 	mov    $0xffffffff8002cc50,%rdi
ffffffff80017dea:	e8 d1 b3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017def:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80017df6:	e8 c5 b3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80017dfb:	8b 05 a3 76 1c 00    	mov    0x1c76a3(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Kt::KernelLogStream(Kt::ERROR, "VFS") << "Drive " << drive << " not registered";
            return -1;
        }

        return driveTable[drive]->ReadDir(localPath, outNames, maxEntries);
    }
ffffffff80017e01:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff80017e05:	83 e8 01             	sub    $0x1,%eax
ffffffff80017e08:	89 05 96 76 1c 00    	mov    %eax,0x1c7696(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80017e0e:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
ffffffff80017e13:	c9                   	leave
ffffffff80017e14:	c3                   	ret
ffffffff80017e15:	0f 1f 00             	nopl   (%rax)
        outPath = &path[i + 1];
ffffffff80017e18:	48 01 d7             	add    %rdx,%rdi
        if (drive < 0 || drive >= MaxDrives || driveTable[drive] == nullptr) {
ffffffff80017e1b:	83 fb 0f             	cmp    $0xf,%ebx
ffffffff80017e1e:	77 20                	ja     ffffffff80017e40 <_ZN2Fs3Vfs10VfsReadDirEPKcPS2_i+0x100>
ffffffff80017e20:	48 63 c3             	movslq %ebx,%rax
ffffffff80017e23:	48 8b 04 c5 a0 c1 14 	mov    -0x7feb3e60(,%rax,8),%rax
ffffffff80017e2a:	80 
ffffffff80017e2b:	48 85 c0             	test   %rax,%rax
ffffffff80017e2e:	74 10                	je     ffffffff80017e40 <_ZN2Fs3Vfs10VfsReadDirEPKcPS2_i+0x100>
        return driveTable[drive]->ReadDir(localPath, outNames, maxEntries);
ffffffff80017e30:	48 8b 40 20          	mov    0x20(%rax),%rax
    }
ffffffff80017e34:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
        return driveTable[drive]->ReadDir(localPath, outNames, maxEntries);
ffffffff80017e38:	89 f2                	mov    %esi,%edx
ffffffff80017e3a:	4c 89 c6             	mov    %r8,%rsi
    }
ffffffff80017e3d:	c9                   	leave
        return driveTable[drive]->ReadDir(localPath, outNames, maxEntries);
ffffffff80017e3e:	ff e0                	jmp    *%rax
            Print(string);
ffffffff80017e40:	48 c7 c7 6f b6 02 80 	mov    $0xffffffff8002b66f,%rdi
            g_kernelLogDepth++;
ffffffff80017e47:	83 05 56 76 1c 00 01 	addl   $0x1,0x1c7656(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80017e4e:	e8 6d b3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017e53:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80017e5a:	e8 61 b3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017e5f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80017e66:	e8 55 b3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017e6b:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80017e72:	e8 49 b3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017e77:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80017e7e:	e8 3d b3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017e83:	48 c7 c7 bb b6 02 80 	mov    $0xffffffff8002b6bb,%rdi
ffffffff80017e8a:	e8 31 b3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::int2basestr(number, t.streamBaseType));
ffffffff80017e8f:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80017e94:	89 df                	mov    %ebx,%edi
ffffffff80017e96:	e8 e5 24 00 00       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
ffffffff80017e9b:	48 89 c7             	mov    %rax,%rdi
ffffffff80017e9e:	e8 1d b3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80017ea3:	48 c7 c7 c2 b6 02 80 	mov    $0xffffffff8002b6c2,%rdi
ffffffff80017eaa:	e9 3b ff ff ff       	jmp    ffffffff80017dea <_ZN2Fs3Vfs10VfsReadDirEPKcPS2_i+0xaa>
ffffffff80017eaf:	90                   	nop

ffffffff80017eb0 <_ZN8Graphics6Cursor10InitializeEP18limine_framebuffer>:
    static uint32_t* g_FbBase   = nullptr;
    static uint64_t  g_FbWidth  = 0;
    static uint64_t  g_FbHeight = 0;
    static uint64_t  g_FbPitch  = 0; // in bytes

    void Initialize(limine_framebuffer* framebuffer) {
ffffffff80017eb0:	55                   	push   %rbp
        g_FbBase   = reinterpret_cast<uint32_t*>(framebuffer->address);
ffffffff80017eb1:	48 8b 07             	mov    (%rdi),%rax
            g_kernelLogDepth++;
ffffffff80017eb4:	83 05 e9 75 1c 00 01 	addl   $0x1,0x1c75e9(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80017ebb:	48 89 05 76 43 13 00 	mov    %rax,0x134376(%rip)        # ffffffff8014c238 <_ZN8Graphics6CursorL8g_FbBaseE>
        g_FbWidth  = framebuffer->width;
ffffffff80017ec2:	48 8b 47 08          	mov    0x8(%rdi),%rax
    void Initialize(limine_framebuffer* framebuffer) {
ffffffff80017ec6:	48 89 e5             	mov    %rsp,%rbp
        g_FbWidth  = framebuffer->width;
ffffffff80017ec9:	48 89 05 60 43 13 00 	mov    %rax,0x134360(%rip)        # ffffffff8014c230 <_ZN8Graphics6CursorL9g_FbWidthE>
        g_FbHeight = framebuffer->height;
ffffffff80017ed0:	48 8b 47 10          	mov    0x10(%rdi),%rax
ffffffff80017ed4:	48 89 05 4d 43 13 00 	mov    %rax,0x13434d(%rip)        # ffffffff8014c228 <_ZN8Graphics6CursorL10g_FbHeightE>
        g_FbPitch  = framebuffer->pitch;
ffffffff80017edb:	48 8b 47 18          	mov    0x18(%rdi),%rax
            Print(string);
ffffffff80017edf:	48 c7 c7 33 a4 02 80 	mov    $0xffffffff8002a433,%rdi
ffffffff80017ee6:	48 89 05 33 43 13 00 	mov    %rax,0x134333(%rip)        # ffffffff8014c220 <_ZN8Graphics6CursorL9g_FbPitchE>
ffffffff80017eed:	e8 ce b2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017ef2:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80017ef9:	e8 c2 b2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017efe:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80017f05:	e8 b6 b2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017f0a:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80017f11:	e8 aa b2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017f16:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80017f1d:	e8 9e b2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017f22:	48 c7 c7 e2 b6 02 80 	mov    $0xffffffff8002b6e2,%rdi
ffffffff80017f29:	e8 92 b2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80017f2e:	48 8b 3d fb 42 13 00 	mov    0x1342fb(%rip),%rdi        # ffffffff8014c230 <_ZN8Graphics6CursorL9g_FbWidthE>
ffffffff80017f35:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80017f3a:	e8 51 25 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80017f3f:	48 89 c7             	mov    %rax,%rdi
ffffffff80017f42:	e8 79 b2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80017f47:	48 c7 c7 d8 a4 02 80 	mov    $0xffffffff8002a4d8,%rdi
ffffffff80017f4e:	e8 6d b2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80017f53:	48 8b 3d ce 42 13 00 	mov    0x1342ce(%rip),%rdi        # ffffffff8014c228 <_ZN8Graphics6CursorL10g_FbHeightE>
ffffffff80017f5a:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80017f5f:	e8 2c 25 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80017f64:	48 89 c7             	mov    %rax,%rdi
ffffffff80017f67:	e8 54 b2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80017f6c:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff80017f73:	e8 48 b2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80017f78:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80017f7f:	e8 3c b2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80017f84:	83 2d 19 75 1c 00 01 	subl   $0x1,0x1c7519(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

        Kt::KernelLogStream(Kt::OK, "Graphics") << "Framebuffer initialized ("
            << (uint64_t)g_FbWidth << "x" << (uint64_t)g_FbHeight << ")";
    }
ffffffff80017f8b:	5d                   	pop    %rbp
ffffffff80017f8c:	c3                   	ret
ffffffff80017f8d:	0f 1f 00             	nopl   (%rax)

ffffffff80017f90 <_ZN8Graphics6Cursor18GetFramebufferBaseEv>:

    uint32_t* GetFramebufferBase()   { return g_FbBase; }
ffffffff80017f90:	48 8b 05 a1 42 13 00 	mov    0x1342a1(%rip),%rax        # ffffffff8014c238 <_ZN8Graphics6CursorL8g_FbBaseE>
ffffffff80017f97:	c3                   	ret
ffffffff80017f98:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80017f9f:	00 

ffffffff80017fa0 <_ZN8Graphics6Cursor19GetFramebufferWidthEv>:
    uint64_t  GetFramebufferWidth()  { return g_FbWidth; }
ffffffff80017fa0:	48 8b 05 89 42 13 00 	mov    0x134289(%rip),%rax        # ffffffff8014c230 <_ZN8Graphics6CursorL9g_FbWidthE>
ffffffff80017fa7:	c3                   	ret
ffffffff80017fa8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80017faf:	00 

ffffffff80017fb0 <_ZN8Graphics6Cursor20GetFramebufferHeightEv>:
    uint64_t  GetFramebufferHeight() { return g_FbHeight; }
ffffffff80017fb0:	48 8b 05 71 42 13 00 	mov    0x134271(%rip),%rax        # ffffffff8014c228 <_ZN8Graphics6CursorL10g_FbHeightE>
ffffffff80017fb7:	c3                   	ret
ffffffff80017fb8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80017fbf:	00 

ffffffff80017fc0 <_ZN8Graphics6Cursor19GetFramebufferPitchEv>:
    uint64_t  GetFramebufferPitch()  { return g_FbPitch; }
ffffffff80017fc0:	48 8b 05 59 42 13 00 	mov    0x134259(%rip),%rax        # ffffffff8014c220 <_ZN8Graphics6CursorL9g_FbPitchE>
ffffffff80017fc7:	c3                   	ret
ffffffff80017fc8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80017fcf:	00 

ffffffff80017fd0 <_ZN8Graphics6Cursor14SetFramebufferEPjmmm>:

    void SetFramebuffer(uint32_t* base, uint64_t width, uint64_t height, uint64_t pitch) {
ffffffff80017fd0:	55                   	push   %rbp
        g_FbBase = base;
ffffffff80017fd1:	48 89 3d 60 42 13 00 	mov    %rdi,0x134260(%rip)        # ffffffff8014c238 <_ZN8Graphics6CursorL8g_FbBaseE>
            Print(string);
ffffffff80017fd8:	48 c7 c7 33 a4 02 80 	mov    $0xffffffff8002a433,%rdi
        g_FbWidth = width;
        g_FbHeight = height;
ffffffff80017fdf:	48 89 15 42 42 13 00 	mov    %rdx,0x134242(%rip)        # ffffffff8014c228 <_ZN8Graphics6CursorL10g_FbHeightE>
    void SetFramebuffer(uint32_t* base, uint64_t width, uint64_t height, uint64_t pitch) {
ffffffff80017fe6:	48 89 e5             	mov    %rsp,%rbp
        g_FbPitch = pitch;
ffffffff80017fe9:	48 89 0d 30 42 13 00 	mov    %rcx,0x134230(%rip)        # ffffffff8014c220 <_ZN8Graphics6CursorL9g_FbPitchE>
        g_FbWidth = width;
ffffffff80017ff0:	48 89 35 39 42 13 00 	mov    %rsi,0x134239(%rip)        # ffffffff8014c230 <_ZN8Graphics6CursorL9g_FbWidthE>
            g_kernelLogDepth++;
ffffffff80017ff7:	83 05 a6 74 1c 00 01 	addl   $0x1,0x1c74a6(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80017ffe:	e8 bd b1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018003:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001800a:	e8 b1 b1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001800f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80018016:	e8 a5 b1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001801b:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80018022:	e8 99 b1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018027:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001802e:	e8 8d b1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018033:	48 c7 c7 fc b6 02 80 	mov    $0xffffffff8002b6fc,%rdi
ffffffff8001803a:	e8 81 b1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001803f:	48 8b 3d ea 41 13 00 	mov    0x1341ea(%rip),%rdi        # ffffffff8014c230 <_ZN8Graphics6CursorL9g_FbWidthE>
ffffffff80018046:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001804b:	e8 40 24 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80018050:	48 89 c7             	mov    %rax,%rdi
ffffffff80018053:	e8 68 b1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80018058:	48 c7 c7 d8 a4 02 80 	mov    $0xffffffff8002a4d8,%rdi
ffffffff8001805f:	e8 5c b1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80018064:	48 8b 3d bd 41 13 00 	mov    0x1341bd(%rip),%rdi        # ffffffff8014c228 <_ZN8Graphics6CursorL10g_FbHeightE>
ffffffff8001806b:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80018070:	e8 1b 24 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80018075:	48 89 c7             	mov    %rax,%rdi
ffffffff80018078:	e8 43 b1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001807d:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff80018084:	e8 37 b1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018089:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80018090:	e8 2b b1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80018095:	83 2d 08 74 1c 00 01 	subl   $0x1,0x1c7408(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        Kt::KernelLogStream(Kt::OK, "Graphics") << "Framebuffer switched ("
            << (uint64_t)g_FbWidth << "x" << (uint64_t)g_FbHeight << ")";
    }
ffffffff8001809c:	5d                   	pop    %rbp
ffffffff8001809d:	c3                   	ret
ffffffff8001809e:	66 90                	xchg   %ax,%ax

ffffffff800180a0 <_ZN8Graphics6Cursor22GetFramebufferPhysBaseEv>:
ffffffff800180a0:	48 8b 05 91 41 13 00 	mov    0x134191(%rip),%rax        # ffffffff8014c238 <_ZN8Graphics6CursorL8g_FbBaseE>
ffffffff800180a7:	48 2b 05 fa 48 13 00 	sub    0x1348fa(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>

    uint64_t GetFramebufferPhysBase() {
        return Memory::SubHHDM((uint64_t)g_FbBase);
    }
ffffffff800180ae:	c3                   	ret
ffffffff800180af:	90                   	nop

ffffffff800180b0 <_ZN3Hal9LocalApic12ReadRegisterEj>:
            uint32_t hi = (uint32_t)(value >> 32);
            asm volatile("wrmsr" : : "a"(lo), "d"(hi), "c"(msr));
        }

        uint32_t ReadRegister(uint32_t reg) {
            return g_apicBase[reg / 4];
ffffffff800180b0:	c1 ef 02             	shr    $0x2,%edi
ffffffff800180b3:	8d 04 bd 00 00 00 00 	lea    0x0(,%rdi,4),%eax
ffffffff800180ba:	48 03 05 7f 41 13 00 	add    0x13417f(%rip),%rax        # ffffffff8014c240 <_ZN3Hal9LocalApicL10g_apicBaseE>
ffffffff800180c1:	8b 00                	mov    (%rax),%eax
        }
ffffffff800180c3:	c3                   	ret
ffffffff800180c4:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800180cb:	00 00 00 
ffffffff800180ce:	66 90                	xchg   %ax,%ax

ffffffff800180d0 <_ZN3Hal9LocalApic13WriteRegisterEjj>:

        void WriteRegister(uint32_t reg, uint32_t value) {
            g_apicBase[reg / 4] = value;
ffffffff800180d0:	c1 ef 02             	shr    $0x2,%edi
ffffffff800180d3:	8d 04 bd 00 00 00 00 	lea    0x0(,%rdi,4),%eax
ffffffff800180da:	48 03 05 5f 41 13 00 	add    0x13415f(%rip),%rax        # ffffffff8014c240 <_ZN3Hal9LocalApicL10g_apicBaseE>
ffffffff800180e1:	89 30                	mov    %esi,(%rax)
        }
ffffffff800180e3:	c3                   	ret
ffffffff800180e4:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800180eb:	00 00 00 
ffffffff800180ee:	66 90                	xchg   %ax,%ax

ffffffff800180f0 <_ZN3Hal9LocalApic10InitializeEm>:

        void Initialize(uint64_t apicBasePhys) {
ffffffff800180f0:	55                   	push   %rbp
            asm volatile("rdmsr" : "=a"(lo), "=d"(hi) : "c"(msr));
ffffffff800180f1:	b9 1b 00 00 00       	mov    $0x1b,%ecx
        void Initialize(uint64_t apicBasePhys) {
ffffffff800180f6:	48 89 e5             	mov    %rsp,%rbp
ffffffff800180f9:	41 54                	push   %r12
ffffffff800180fb:	53                   	push   %rbx
ffffffff800180fc:	48 89 fb             	mov    %rdi,%rbx
            asm volatile("rdmsr" : "=a"(lo), "=d"(hi) : "c"(msr));
ffffffff800180ff:	0f 32                	rdmsr
            Print(string);
ffffffff80018101:	48 c7 c7 23 a3 02 80 	mov    $0xffffffff8002a323,%rdi
ffffffff80018108:	41 89 c4             	mov    %eax,%r12d
            g_kernelLogDepth++;
ffffffff8001810b:	83 05 92 73 1c 00 01 	addl   $0x1,0x1c7392(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80018112:	e8 a9 b0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018117:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001811e:	e8 9d b0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018123:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001812a:	e8 91 b0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001812f:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff80018136:	e8 85 b0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001813b:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80018142:	e8 79 b0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018147:	48 c7 c7 13 b7 02 80 	mov    $0xffffffff8002b713,%rdi
ffffffff8001814e:	e8 6d b0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            // Read the APIC base MSR to verify/confirm the base address
            uint64_t msrValue = ReadMSR(MSR_APIC_BASE);
            uint64_t msrBase = msrValue & 0xFFFFF000;
ffffffff80018153:	44 89 e7             	mov    %r12d,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80018156:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8001815b:	81 e7 00 f0 ff ff    	and    $0xfffff000,%edi
ffffffff80018161:	e8 2a 23 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80018166:	48 89 c7             	mov    %rax,%rdi
ffffffff80018169:	e8 52 b0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001816e:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80018175:	e8 46 b0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001817a:	48 c7 c7 23 a3 02 80 	mov    $0xffffffff8002a323,%rdi
ffffffff80018181:	e8 3a b0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018186:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001818d:	e8 2e b0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018192:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80018199:	e8 22 b0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001819e:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff800181a5:	e8 16 b0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800181aa:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800181b1:	e8 0a b0 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800181b6:	48 c7 c7 23 b7 02 80 	mov    $0xffffffff8002b723,%rdi
ffffffff800181bd:	e8 fe af 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800181c2:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff800181c7:	48 89 df             	mov    %rbx,%rdi
ffffffff800181ca:	e8 c1 22 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800181cf:	48 89 c7             	mov    %rax,%rdi
ffffffff800181d2:	e8 e9 af 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800181d7:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800181de:	e8 dd af 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        return HHDMBase + address;
ffffffff800181e3:	48 8b 05 be 47 13 00 	mov    0x1347be(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff800181ea:	48 c7 c7 23 a3 02 80 	mov    $0xffffffff8002a323,%rdi
ffffffff800181f1:	48 01 d8             	add    %rbx,%rax
            return g_apicBase[reg / 4];
ffffffff800181f4:	8b 90 f0 00 00 00    	mov    0xf0(%rax),%edx

            KernelLogStream(DEBUG, "APIC") << "MSR APIC base: " << base::hex << msrBase;
            KernelLogStream(DEBUG, "APIC") << "MADT APIC base: " << base::hex << apicBasePhys;

            // Use the MADT-provided address (it should match MSR)
            g_apicBase = (volatile uint32_t*)Memory::HHDM(apicBasePhys);
ffffffff800181fa:	48 89 05 3f 40 13 00 	mov    %rax,0x13403f(%rip)        # ffffffff8014c240 <_ZN3Hal9LocalApicL10g_apicBaseE>

            // Enable the APIC by setting bit 8 (APIC Software Enable) in SVR
            // and set the spurious interrupt vector
            uint32_t svr = ReadRegister(REG_SPURIOUS);
            svr |= (1 << 8);           // Enable APIC
            svr = (svr & 0xFFFFFF00) | SPURIOUS_VECTOR;  // Set spurious vector
ffffffff80018201:	81 ca ff 01 00 00    	or     $0x1ff,%edx
            g_apicBase[reg / 4] = value;
ffffffff80018207:	89 90 f0 00 00 00    	mov    %edx,0xf0(%rax)
ffffffff8001820d:	c7 80 80 00 00 00 00 	movl   $0x0,0x80(%rax)
ffffffff80018214:	00 00 00 
            return g_apicBase[reg / 4];
ffffffff80018217:	8b 58 30             	mov    0x30(%rax),%ebx
ffffffff8001821a:	44 8b 60 20          	mov    0x20(%rax),%r12d
ffffffff8001821e:	e8 9d af 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018223:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
        void SendEOI() {
            WriteRegister(REG_EOI, 0);
        }

        uint32_t GetId() {
            return (ReadRegister(REG_ID) >> 24) & 0xFF;
ffffffff8001822a:	41 c1 ec 18          	shr    $0x18,%r12d
ffffffff8001822e:	e8 8d af 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018233:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001823a:	e8 81 af 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001823f:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80018246:	e8 75 af 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001824b:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80018252:	e8 69 af 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018257:	48 c7 c7 34 b7 02 80 	mov    $0xffffffff8002b734,%rdi
ffffffff8001825e:	e8 5d af 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80018263:	be 0a 00 00 00       	mov    $0xa,%esi
            KernelLogStream(OK, "APIC") << "Local APIC initialized: id=" << base::dec << (uint64_t)id
ffffffff80018268:	44 89 e7             	mov    %r12d,%edi
ffffffff8001826b:	e8 20 22 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80018270:	48 89 c7             	mov    %rax,%rdi
ffffffff80018273:	e8 48 af 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80018278:	48 c7 c7 50 b7 02 80 	mov    $0xffffffff8002b750,%rdi
ffffffff8001827f:	e8 3c af 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80018284:	be 10 00 00 00       	mov    $0x10,%esi
                << " version=" << base::hex << (uint64_t)(version & 0xFF)
ffffffff80018289:	0f b6 fb             	movzbl %bl,%edi
ffffffff8001828c:	e8 ff 21 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
                << " max LVT=" << base::dec << (uint64_t)((version >> 16) & 0xFF);
ffffffff80018291:	c1 eb 10             	shr    $0x10,%ebx
ffffffff80018294:	48 89 c7             	mov    %rax,%rdi
ffffffff80018297:	e8 24 af 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001829c:	48 c7 c7 5a b7 02 80 	mov    $0xffffffff8002b75a,%rdi
ffffffff800182a3:	e8 18 af 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800182a8:	0f b6 fb             	movzbl %bl,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800182ab:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800182b0:	e8 db 21 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800182b5:	48 89 c7             	mov    %rax,%rdi
ffffffff800182b8:	e8 03 af 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800182bd:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800182c4:	e8 f7 ae 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        }
ffffffff800182c9:	5b                   	pop    %rbx
            g_kernelLogDepth--;
ffffffff800182ca:	83 2d d3 71 1c 00 01 	subl   $0x1,0x1c71d3(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800182d1:	41 5c                	pop    %r12
ffffffff800182d3:	5d                   	pop    %rbp
ffffffff800182d4:	c3                   	ret
ffffffff800182d5:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800182dc:	00 00 00 
ffffffff800182df:	90                   	nop

ffffffff800182e0 <_ZN3Hal9LocalApic7SendEOIEv>:
            g_apicBase[reg / 4] = value;
ffffffff800182e0:	48 8b 05 59 3f 13 00 	mov    0x133f59(%rip),%rax        # ffffffff8014c240 <_ZN3Hal9LocalApicL10g_apicBaseE>
ffffffff800182e7:	c7 80 b0 00 00 00 00 	movl   $0x0,0xb0(%rax)
ffffffff800182ee:	00 00 00 
        }
ffffffff800182f1:	c3                   	ret
ffffffff800182f2:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800182f9:	00 00 00 
ffffffff800182fc:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff80018300 <_ZN3Hal9LocalApic5GetIdEv>:
            return g_apicBase[reg / 4];
ffffffff80018300:	48 8b 05 39 3f 13 00 	mov    0x133f39(%rip),%rax        # ffffffff8014c240 <_ZN3Hal9LocalApicL10g_apicBaseE>
ffffffff80018307:	8b 40 20             	mov    0x20(%rax),%eax
            return (ReadRegister(REG_ID) >> 24) & 0xFF;
ffffffff8001830a:	c1 e8 18             	shr    $0x18,%eax
        }
ffffffff8001830d:	c3                   	ret
ffffffff8001830e:	66 90                	xchg   %ax,%ax

ffffffff80018310 <_ZN3Hal19GetDetectedCpuCountEv>:
using namespace Kt;

namespace Hal {
    static int g_detectedCpuCount = 0;

    int GetDetectedCpuCount() { return g_detectedCpuCount; }
ffffffff80018310:	8b 05 32 3f 13 00    	mov    0x133f32(%rip),%eax        # ffffffff8014c248 <_ZN3HalL18g_detectedCpuCountE>
ffffffff80018316:	c3                   	ret
ffffffff80018317:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001831e:	00 00 

ffffffff80018320 <_ZN3Hal14ApicInitializeEPNS_4ACPI15CommonSDTHeaderE>:

    void ApicInitialize(ACPI::CommonSDTHeader* xsdt) {
ffffffff80018320:	55                   	push   %rbp
ffffffff80018321:	48 89 e5             	mov    %rsp,%rbp
ffffffff80018324:	53                   	push   %rbx
ffffffff80018325:	48 89 fb             	mov    %rdi,%rbx
            Print(string);
ffffffff80018328:	48 c7 c7 23 a3 02 80 	mov    $0xffffffff8002a323,%rdi
ffffffff8001832f:	48 81 ec c8 02 00 00 	sub    $0x2c8,%rsp
            g_kernelLogDepth++;
ffffffff80018336:	83 05 67 71 1c 00 01 	addl   $0x1,0x1c7167(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001833d:	e8 7e ae 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018342:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80018349:	e8 72 ae 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001834e:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80018355:	e8 66 ae 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001835a:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff80018361:	e8 5a ae 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018366:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001836d:	e8 4e ae 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018372:	48 c7 c7 64 b7 02 80 	mov    $0xffffffff8002b764,%rdi
ffffffff80018379:	e8 42 ae 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001837e:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80018385:	e8 36 ae 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        KernelLogStream(INFO, "APIC") << "Initializing APIC subsystem";

        // Step 1: Parse MADT
        MADT::ParsedMADT madt{};
ffffffff8001838a:	31 c0                	xor    %eax,%eax
ffffffff8001838c:	48 8d bd 30 fd ff ff 	lea    -0x2d0(%rbp),%rdi
ffffffff80018393:	b9 58 00 00 00       	mov    $0x58,%ecx
ffffffff80018398:	f3 48 ab             	rep stos %rax,(%rdi)
        if (!MADT::Parse(xsdt, madt)) {
ffffffff8001839b:	48 8d b5 30 fd ff ff 	lea    -0x2d0(%rbp),%rsi
ffffffff800183a2:	48 89 df             	mov    %rbx,%rdi
            g_kernelLogDepth--;
ffffffff800183a5:	83 2d f8 70 1c 00 01 	subl   $0x1,0x1c70f8(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800183ac:	e8 cf f2 fe ff       	call   ffffffff80007680 <_ZN3Hal4MADT5ParseEPNS_4ACPI15CommonSDTHeaderERNS0_10ParsedMADTE>
ffffffff800183b1:	84 c0                	test   %al,%al
ffffffff800183b3:	0f 84 27 02 00 00    	je     ffffffff800185e0 <_ZN3Hal14ApicInitializeEPNS_4ACPI15CommonSDTHeaderE+0x2c0>
            KernelLogStream(ERROR, "APIC") << "Failed to parse MADT, cannot initialize APIC";
            return;
        }

        g_detectedCpuCount = madt.LocalApicCount;
ffffffff800183b9:	8b 45 ec             	mov    -0x14(%rbp),%eax

        if (madt.IoApicAddress == 0) {
ffffffff800183bc:	48 83 bd 38 fd ff ff 	cmpq   $0x0,-0x2c8(%rbp)
ffffffff800183c3:	00 
        g_detectedCpuCount = madt.LocalApicCount;
ffffffff800183c4:	89 05 7e 3e 13 00    	mov    %eax,0x133e7e(%rip)        # ffffffff8014c248 <_ZN3HalL18g_detectedCpuCountE>
        if (madt.IoApicAddress == 0) {
ffffffff800183ca:	0f 84 60 02 00 00    	je     ffffffff80018630 <_ZN3Hal14ApicInitializeEPNS_4ACPI15CommonSDTHeaderE+0x310>
            return;
        }

        // Step 2: Map APIC MMIO regions into kernel page tables
        // The HHDM only covers physical RAM; MMIO regions need explicit mapping.
        if (Memory::VMM::g_paging) {
ffffffff800183d0:	48 8b 3d e9 45 13 00 	mov    0x1345e9(%rip),%rdi        # ffffffff8014c9c0 <_ZN6Memory3VMM8g_pagingE>
ffffffff800183d7:	48 85 ff             	test   %rdi,%rdi
ffffffff800183da:	0f 84 29 01 00 00    	je     ffffffff80018509 <_ZN3Hal14ApicInitializeEPNS_4ACPI15CommonSDTHeaderE+0x1e9>
            Memory::VMM::g_paging->MapMMIO(madt.LocalApicAddress, Memory::HHDM(madt.LocalApicAddress));
ffffffff800183e0:	48 8b b5 30 fd ff ff 	mov    -0x2d0(%rbp),%rsi
ffffffff800183e7:	48 8b 15 ba 45 13 00 	mov    0x1345ba(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff800183ee:	48 01 f2             	add    %rsi,%rdx
ffffffff800183f1:	e8 ca 34 00 00       	call   ffffffff8001b8c0 <_ZN6Memory3VMM6Paging7MapMMIOEmm>
            Print(string);
ffffffff800183f6:	48 c7 c7 23 a3 02 80 	mov    $0xffffffff8002a323,%rdi
            g_kernelLogDepth++;
ffffffff800183fd:	83 05 a0 70 1c 00 01 	addl   $0x1,0x1c70a0(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80018404:	e8 b7 ad 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018409:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80018410:	e8 ab ad 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018415:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001841c:	e8 9f ad 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018421:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff80018428:	e8 93 ad 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001842d:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80018434:	e8 87 ad 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018439:	48 c7 c7 a0 cc 02 80 	mov    $0xffffffff8002cca0,%rdi
ffffffff80018440:	e8 7b ad 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80018445:	48 8b bd 30 fd ff ff 	mov    -0x2d0(%rbp),%rdi
ffffffff8001844c:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80018451:	e8 3a 20 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80018456:	48 89 c7             	mov    %rax,%rdi
ffffffff80018459:	e8 62 ad 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001845e:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80018465:	e8 56 ad 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            KernelLogStream(DEBUG, "APIC") << "Mapped Local APIC MMIO at phys " << base::hex << madt.LocalApicAddress;

            Memory::VMM::g_paging->MapMMIO(madt.IoApicAddress, Memory::HHDM(madt.IoApicAddress));
ffffffff8001846a:	48 8b b5 38 fd ff ff 	mov    -0x2c8(%rbp),%rsi
ffffffff80018471:	48 8b 15 30 45 13 00 	mov    0x134530(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff80018478:	48 8b 3d 41 45 13 00 	mov    0x134541(%rip),%rdi        # ffffffff8014c9c0 <_ZN6Memory3VMM8g_pagingE>
            g_kernelLogDepth--;
ffffffff8001847f:	83 2d 1e 70 1c 00 01 	subl   $0x1,0x1c701e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80018486:	48 01 f2             	add    %rsi,%rdx
ffffffff80018489:	e8 32 34 00 00       	call   ffffffff8001b8c0 <_ZN6Memory3VMM6Paging7MapMMIOEmm>
            Print(string);
ffffffff8001848e:	48 c7 c7 23 a3 02 80 	mov    $0xffffffff8002a323,%rdi
            g_kernelLogDepth++;
ffffffff80018495:	83 05 08 70 1c 00 01 	addl   $0x1,0x1c7008(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001849c:	e8 1f ad 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800184a1:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800184a8:	e8 13 ad 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800184ad:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800184b4:	e8 07 ad 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800184b9:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff800184c0:	e8 fb ac 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800184c5:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800184cc:	e8 ef ac 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800184d1:	48 c7 c7 98 b7 02 80 	mov    $0xffffffff8002b798,%rdi
ffffffff800184d8:	e8 e3 ac 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800184dd:	48 8b bd 38 fd ff ff 	mov    -0x2c8(%rbp),%rdi
ffffffff800184e4:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff800184e9:	e8 a2 1f 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800184ee:	48 89 c7             	mov    %rax,%rdi
ffffffff800184f1:	e8 ca ac 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800184f6:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800184fd:	e8 be ac 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80018502:	83 2d 9b 6f 1c 00 01 	subl   $0x1,0x1c6f9b(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            KernelLogStream(DEBUG, "APIC") << "Mapped IOAPIC MMIO at phys " << base::hex << madt.IoApicAddress;
        }

        // Step 3: Disable legacy 8259 PIC
        DisableLegacyPic();
ffffffff80018509:	e8 92 08 00 00       	call   ffffffff80018da0 <_ZN3Hal16DisableLegacyPicEv>

        // Step 4: Install IRQ stubs into IDT
        InitializeIrqHandlers();
ffffffff8001850e:	e8 4d 02 00 00       	call   ffffffff80018760 <_ZN3Hal21InitializeIrqHandlersEv>
        IDTReload();
ffffffff80018513:	e8 d8 13 00 00       	call   ffffffff800198f0 <_ZN3Hal9IDTReloadEv>

        // Step 5: Initialize Local APIC
        LocalApic::Initialize(madt.LocalApicAddress);
ffffffff80018518:	48 8b bd 30 fd ff ff 	mov    -0x2d0(%rbp),%rdi
ffffffff8001851f:	e8 cc fb ff ff       	call   ffffffff800180f0 <_ZN3Hal9LocalApic10InitializeEm>

        // Step 6: Initialize IOAPIC
        IoApic::Initialize(madt.IoApicAddress, madt.IoApicGsiBase,
ffffffff80018524:	8b 8d e8 fd ff ff    	mov    -0x218(%rbp),%ecx
ffffffff8001852a:	8b b5 44 fd ff ff    	mov    -0x2bc(%rbp),%esi
ffffffff80018530:	48 8d 95 48 fd ff ff 	lea    -0x2b8(%rbp),%rdx
ffffffff80018537:	48 8b bd 38 fd ff ff 	mov    -0x2c8(%rbp),%rdi
ffffffff8001853e:	e8 3d 06 00 00       	call   ffffffff80018b80 <_ZN3Hal6IoApic10InitializeEmjPNS_4MADT23InterruptSourceOverrideEi>
                            madt.Overrides, madt.OverrideCount);

        // Step 7: Route keyboard (IRQ1) and mouse (IRQ12) to BSP
        uint8_t bspApicId = (uint8_t)LocalApic::GetId();
ffffffff80018543:	e8 b8 fd ff ff       	call   ffffffff80018300 <_ZN3Hal9LocalApic5GetIdEv>

        IoApic::RouteIrq(IRQ_KEYBOARD, IRQ_VECTOR_BASE + IRQ_KEYBOARD, bspApicId);
ffffffff80018548:	be 21 00 00 00       	mov    $0x21,%esi
ffffffff8001854d:	bf 01 00 00 00       	mov    $0x1,%edi
ffffffff80018552:	0f b6 d8             	movzbl %al,%ebx
ffffffff80018555:	89 da                	mov    %ebx,%edx
ffffffff80018557:	e8 04 04 00 00       	call   ffffffff80018960 <_ZN3Hal6IoApic8RouteIrqEhhh>
        IoApic::RouteIrq(IRQ_MOUSE,    IRQ_VECTOR_BASE + IRQ_MOUSE,    bspApicId);
ffffffff8001855c:	89 da                	mov    %ebx,%edx
ffffffff8001855e:	be 2c 00 00 00       	mov    $0x2c,%esi
ffffffff80018563:	bf 0c 00 00 00       	mov    $0xc,%edi
ffffffff80018568:	e8 f3 03 00 00       	call   ffffffff80018960 <_ZN3Hal6IoApic8RouteIrqEhhh>

        // Step 8: Enable interrupts
        asm volatile("sti");
ffffffff8001856d:	fb                   	sti
            Print(string);
ffffffff8001856e:	48 c7 c7 23 a3 02 80 	mov    $0xffffffff8002a323,%rdi
            g_kernelLogDepth++;
ffffffff80018575:	83 05 28 6f 1c 00 01 	addl   $0x1,0x1c6f28(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001857c:	e8 3f ac 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018581:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80018588:	e8 33 ac 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001858d:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80018594:	e8 27 ac 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018599:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff800185a0:	e8 1b ac 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800185a5:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800185ac:	e8 0f ac 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800185b1:	48 c7 c7 c0 cc 02 80 	mov    $0xffffffff8002ccc0,%rdi
ffffffff800185b8:	e8 03 ac 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800185bd:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800185c4:	e8 f7 ab 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff800185c9:	8b 05 d5 6e 1c 00    	mov    0x1c6ed5(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

        KernelLogStream(OK, "APIC") << "APIC subsystem initialized, interrupts enabled";
    }
ffffffff800185cf:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff800185d3:	83 e8 01             	sub    $0x1,%eax
ffffffff800185d6:	89 05 c8 6e 1c 00    	mov    %eax,0x1c6ec8(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800185dc:	c9                   	leave
ffffffff800185dd:	c3                   	ret
ffffffff800185de:	66 90                	xchg   %ax,%ax
            Print(string);
ffffffff800185e0:	48 c7 c7 23 a3 02 80 	mov    $0xffffffff8002a323,%rdi
            g_kernelLogDepth++;
ffffffff800185e7:	83 05 b6 6e 1c 00 01 	addl   $0x1,0x1c6eb6(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800185ee:	e8 cd ab 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800185f3:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800185fa:	e8 c1 ab 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800185ff:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80018606:	e8 b5 ab 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001860b:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80018612:	e8 a9 ab 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018617:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001861e:	e8 9d ab 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018623:	48 c7 c7 70 cc 02 80 	mov    $0xffffffff8002cc70,%rdi
ffffffff8001862a:	eb 8c                	jmp    ffffffff800185b8 <_ZN3Hal14ApicInitializeEPNS_4ACPI15CommonSDTHeaderE+0x298>
ffffffff8001862c:	0f 1f 40 00          	nopl   0x0(%rax)
ffffffff80018630:	48 c7 c7 23 a3 02 80 	mov    $0xffffffff8002a323,%rdi
            g_kernelLogDepth++;
ffffffff80018637:	83 05 66 6e 1c 00 01 	addl   $0x1,0x1c6e66(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001863e:	e8 7d ab 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018643:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001864a:	e8 71 ab 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001864f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80018656:	e8 65 ab 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001865b:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80018662:	e8 59 ab 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018667:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001866e:	e8 4d ab 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018673:	48 c7 c7 80 b7 02 80 	mov    $0xffffffff8002b780,%rdi
ffffffff8001867a:	e9 39 ff ff ff       	jmp    ffffffff800185b8 <_ZN3Hal14ApicInitializeEPNS_4ACPI15CommonSDTHeaderE+0x298>
ffffffff8001867f:	90                   	nop

ffffffff80018680 <_ZN3Hal18RegisterIrqHandlerEhPFvhE>:
namespace Hal {
    // Dispatch table: one handler per IRQ
    static IrqHandler g_irqHandlers[IRQ_COUNT] = {};

    void RegisterIrqHandler(uint8_t irq, IrqHandler handler) {
        if (irq >= IRQ_COUNT) return;
ffffffff80018680:	40 80 ff 2f          	cmp    $0x2f,%dil
ffffffff80018684:	76 0a                	jbe    ffffffff80018690 <_ZN3Hal18RegisterIrqHandlerEhPFvhE+0x10>
ffffffff80018686:	c3                   	ret
ffffffff80018687:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001868e:	00 00 
    void RegisterIrqHandler(uint8_t irq, IrqHandler handler) {
ffffffff80018690:	55                   	push   %rbp
        g_irqHandlers[irq] = handler;
ffffffff80018691:	40 0f b6 c7          	movzbl %dil,%eax
    void RegisterIrqHandler(uint8_t irq, IrqHandler handler) {
ffffffff80018695:	48 89 e5             	mov    %rsp,%rbp
ffffffff80018698:	41 54                	push   %r12
        g_irqHandlers[irq] = handler;
ffffffff8001869a:	44 0f b6 e7          	movzbl %dil,%r12d
    void RegisterIrqHandler(uint8_t irq, IrqHandler handler) {
ffffffff8001869e:	53                   	push   %rbx
ffffffff8001869f:	89 fb                	mov    %edi,%ebx
ffffffff800186a1:	48 c7 c7 b4 b7 02 80 	mov    $0xffffffff8002b7b4,%rdi
        g_irqHandlers[irq] = handler;
ffffffff800186a8:	48 89 34 c5 60 c2 14 	mov    %rsi,-0x7feb3da0(,%rax,8)
ffffffff800186af:	80 
            g_kernelLogDepth++;
ffffffff800186b0:	83 05 ed 6d 1c 00 01 	addl   $0x1,0x1c6ded(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800186b7:	e8 04 ab 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800186bc:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800186c3:	e8 f8 aa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800186c8:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800186cf:	e8 ec aa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800186d4:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff800186db:	e8 e0 aa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800186e0:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800186e7:	e8 d4 aa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800186ec:	48 c7 c7 b8 b7 02 80 	mov    $0xffffffff8002b7b8,%rdi
ffffffff800186f3:	e8 c8 aa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800186f8:	be 0a 00 00 00       	mov    $0xa,%esi
        Kt::KernelLogStream(Kt::DEBUG, "IRQ") << "Registered handler for IRQ " << base::dec << (uint64_t)irq
ffffffff800186fd:	0f b6 fb             	movzbl %bl,%edi
ffffffff80018700:	e8 8b 1d 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80018705:	48 89 c7             	mov    %rax,%rdi
ffffffff80018708:	e8 b3 aa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001870d:	48 c7 c7 d4 b7 02 80 	mov    $0xffffffff8002b7d4,%rdi
ffffffff80018714:	e8 a7 aa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << " (vector " << (uint64_t)(IRQ_VECTOR_BASE + irq) << ")";
ffffffff80018719:	41 8d 7c 24 20       	lea    0x20(%r12),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001871e:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80018723:	48 63 ff             	movslq %edi,%rdi
ffffffff80018726:	e8 65 1d 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001872b:	48 89 c7             	mov    %rax,%rdi
ffffffff8001872e:	e8 8d aa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80018733:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff8001873a:	e8 81 aa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001873f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80018746:	e8 75 aa 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    }
ffffffff8001874b:	5b                   	pop    %rbx
            g_kernelLogDepth--;
ffffffff8001874c:	83 2d 51 6d 1c 00 01 	subl   $0x1,0x1c6d51(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80018753:	41 5c                	pop    %r12
ffffffff80018755:	5d                   	pop    %rbp
ffffffff80018756:	c3                   	ret
ffffffff80018757:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001875e:	00 00 

ffffffff80018760 <_ZN3Hal21InitializeIrqHandlersEv>:

    void InitializeIrqHandlers() {
ffffffff80018760:	55                   	push   %rbp
ffffffff80018761:	48 89 e5             	mov    %rsp,%rbp
ffffffff80018764:	41 54                	push   %r12
ffffffff80018766:	49 bc 5c e0 02 80 ff 	movabs $0xffffffff8002e05c,%r12
ffffffff8001876d:	ff ff ff 
ffffffff80018770:	53                   	push   %rbx
ffffffff80018771:	bb 20 00 00 00       	mov    $0x20,%ebx
ffffffff80018776:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001877d:	00 00 00 
        // Install IRQ stubs into IDT vectors 32..55
        for (int i = 0; i < IRQ_COUNT; i++) {
            IDTEncodeInterrupt(IRQ_VECTOR_BASE + i, IrqStubTable[i], 0x8E);
ffffffff80018780:	49 8b 34 dc          	mov    (%r12,%rbx,8),%rsi
ffffffff80018784:	48 89 df             	mov    %rbx,%rdi
ffffffff80018787:	ba 8e 00 00 00       	mov    $0x8e,%edx
        for (int i = 0; i < IRQ_COUNT; i++) {
ffffffff8001878c:	48 83 c3 01          	add    $0x1,%rbx
            IDTEncodeInterrupt(IRQ_VECTOR_BASE + i, IrqStubTable[i], 0x8E);
ffffffff80018790:	e8 1b 11 00 00       	call   ffffffff800198b0 <_ZN3Hal18IDTEncodeInterruptEmPvh>
        for (int i = 0; i < IRQ_COUNT; i++) {
ffffffff80018795:	48 83 fb 50          	cmp    $0x50,%rbx
ffffffff80018799:	75 e5                	jne    ffffffff80018780 <_ZN3Hal21InitializeIrqHandlersEv+0x20>
        }

        // Install spurious interrupt handler at vector 0xFF
        IDTEncodeInterrupt(0xFF, (void*)IrqStubSpurious, 0x8E);
ffffffff8001879b:	ba 8e 00 00 00       	mov    $0x8e,%edx
ffffffff800187a0:	48 c7 c6 25 3f 02 80 	mov    $0xffffffff80023f25,%rsi
ffffffff800187a7:	bf ff 00 00 00       	mov    $0xff,%edi
ffffffff800187ac:	e8 ff 10 00 00       	call   ffffffff800198b0 <_ZN3Hal18IDTEncodeInterruptEmPvh>
            Print(string);
ffffffff800187b1:	48 c7 c7 b4 b7 02 80 	mov    $0xffffffff8002b7b4,%rdi
            g_kernelLogDepth++;
ffffffff800187b8:	83 05 e5 6c 1c 00 01 	addl   $0x1,0x1c6ce5(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800187bf:	e8 fc a9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800187c4:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800187cb:	e8 f0 a9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800187d0:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800187d7:	e8 e4 a9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800187dc:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff800187e3:	e8 d8 a9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800187e8:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800187ef:	e8 cc a9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800187f4:	48 c7 c7 de b7 02 80 	mov    $0xffffffff8002b7de,%rdi
ffffffff800187fb:	e8 c0 a9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80018800:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80018805:	bf 30 00 00 00       	mov    $0x30,%edi
ffffffff8001880a:	e8 81 1c 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001880f:	48 89 c7             	mov    %rax,%rdi
ffffffff80018812:	e8 a9 a9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80018817:	48 c7 c7 e9 b7 02 80 	mov    $0xffffffff8002b7e9,%rdi
ffffffff8001881e:	e8 9d a9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80018823:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80018828:	bf 20 00 00 00       	mov    $0x20,%edi
ffffffff8001882d:	e8 5e 1c 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80018832:	48 89 c7             	mov    %rax,%rdi
ffffffff80018835:	e8 86 a9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001883a:	48 c7 c7 fe b7 02 80 	mov    $0xffffffff8002b7fe,%rdi
ffffffff80018841:	e8 7a a9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80018846:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001884b:	bf 4f 00 00 00       	mov    $0x4f,%edi
ffffffff80018850:	e8 3b 1c 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80018855:	48 89 c7             	mov    %rax,%rdi
ffffffff80018858:	e8 63 a9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001885d:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff80018864:	e8 57 a9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018869:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80018870:	e8 4b a9 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>

        Kt::KernelLogStream(Kt::OK, "IRQ") << "Installed " << base::dec << (uint64_t)IRQ_COUNT
            << " IRQ stubs (vectors " << (uint64_t)IRQ_VECTOR_BASE << "-"
            << (uint64_t)(IRQ_VECTOR_BASE + IRQ_COUNT - 1) << ")";
    }
ffffffff80018875:	5b                   	pop    %rbx
            g_kernelLogDepth--;
ffffffff80018876:	83 2d 27 6c 1c 00 01 	subl   $0x1,0x1c6c27(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001887d:	41 5c                	pop    %r12
ffffffff8001887f:	5d                   	pop    %rbp
ffffffff80018880:	c3                   	ret
ffffffff80018881:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80018888:	00 00 00 
ffffffff8001888b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80018890 <HalIrqDispatch>:
};

// C linkage dispatch function called from assembly stubs
extern "C" void HalIrqDispatch(uint64_t irqNumber) {
ffffffff80018890:	55                   	push   %rbp
ffffffff80018891:	48 89 e5             	mov    %rsp,%rbp
ffffffff80018894:	53                   	push   %rbx
ffffffff80018895:	48 89 fb             	mov    %rdi,%rbx
ffffffff80018898:	48 83 ec 08          	sub    $0x8,%rsp
    // which context-switches to a process whose kernel stack does not
    // unwind through this function (e.g. a process saved from Sleep()).
    // Without early EOI the switching CPU would never receive another
    // interrupt on this vector, permanently freezing its timer.
    // Interrupts are disabled throughout the ISR, so early EOI is safe.
    Hal::LocalApic::SendEOI();
ffffffff8001889c:	e8 3f fa ff ff       	call   ffffffff800182e0 <_ZN3Hal9LocalApic7SendEOIEv>

    if (irqNumber < Hal::IRQ_COUNT && Hal::g_irqHandlers[irqNumber] != nullptr) {
ffffffff800188a1:	48 83 fb 2f          	cmp    $0x2f,%rbx
ffffffff800188a5:	77 19                	ja     ffffffff800188c0 <HalIrqDispatch+0x30>
ffffffff800188a7:	48 8b 04 dd 60 c2 14 	mov    -0x7feb3da0(,%rbx,8),%rax
ffffffff800188ae:	80 
ffffffff800188af:	48 85 c0             	test   %rax,%rax
ffffffff800188b2:	74 0c                	je     ffffffff800188c0 <HalIrqDispatch+0x30>
        Hal::g_irqHandlers[irqNumber]((uint8_t)irqNumber);
ffffffff800188b4:	89 df                	mov    %ebx,%edi
    }
}
ffffffff800188b6:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff800188ba:	c9                   	leave
        Hal::g_irqHandlers[irqNumber]((uint8_t)irqNumber);
ffffffff800188bb:	ff e0                	jmp    *%rax
ffffffff800188bd:	0f 1f 00             	nopl   (%rax)
}
ffffffff800188c0:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff800188c4:	c9                   	leave
ffffffff800188c5:	c3                   	ret
ffffffff800188c6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800188cd:	00 00 00 

ffffffff800188d0 <_ZN3Hal6IoApic9UnmaskIrqEh>:
            entry |= REDIR_MASKED;
            SetRedirectionEntry(irq, entry);
        }

        void UnmaskIrq(uint8_t irq) {
            uint64_t entry = GetRedirectionEntry(irq);
ffffffff800188d0:	40 0f b6 ff          	movzbl %dil,%edi
            g_ioApicBase[0] = reg;
ffffffff800188d4:	48 8b 05 cd 3b 13 00 	mov    0x133bcd(%rip),%rax        # ffffffff8014c4a8 <_ZN3Hal6IoApicL12g_ioApicBaseE>
            uint32_t regLow  = IOREDTBL_BASE + (index * 2);
ffffffff800188db:	01 ff                	add    %edi,%edi
ffffffff800188dd:	8d 77 10             	lea    0x10(%rdi),%esi
            uint32_t regHigh = IOREDTBL_BASE + (index * 2) + 1;
ffffffff800188e0:	83 c7 11             	add    $0x11,%edi
            g_ioApicBase[0] = reg;
ffffffff800188e3:	89 30                	mov    %esi,(%rax)
            return g_ioApicBase[4];
ffffffff800188e5:	8b 48 10             	mov    0x10(%rax),%ecx
            g_ioApicBase[0] = reg;
ffffffff800188e8:	89 38                	mov    %edi,(%rax)
            return g_ioApicBase[4];
ffffffff800188ea:	8b 50 10             	mov    0x10(%rax),%edx
            return (high << 32) | low;
ffffffff800188ed:	81 e1 ff ff fe ff    	and    $0xfffeffff,%ecx
            g_ioApicBase[0] = reg;
ffffffff800188f3:	89 38                	mov    %edi,(%rax)
            return (high << 32) | low;
ffffffff800188f5:	48 c1 e2 20          	shl    $0x20,%rdx
            entry &= ~REDIR_MASKED;
ffffffff800188f9:	48 09 d1             	or     %rdx,%rcx
            WriteRegister(regHigh, (uint32_t)(entry >> 32));
ffffffff800188fc:	48 c1 ea 20          	shr    $0x20,%rdx
            g_ioApicBase[4] = value;
ffffffff80018900:	89 50 10             	mov    %edx,0x10(%rax)
            g_ioApicBase[0] = reg;
ffffffff80018903:	89 30                	mov    %esi,(%rax)
            g_ioApicBase[4] = value;
ffffffff80018905:	89 48 10             	mov    %ecx,0x10(%rax)
            SetRedirectionEntry(irq, entry);
        }
ffffffff80018908:	c3                   	ret
ffffffff80018909:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff80018910 <_ZN3Hal6IoApic12GetGsiForIrqEh>:

        uint32_t GetGsiForIrq(uint8_t isaIrq) {
            for (int i = 0; i < g_overrideCount; i++) {
ffffffff80018910:	8b 35 ca 3a 13 00    	mov    0x133aca(%rip),%esi        # ffffffff8014c3e0 <_ZN3Hal6IoApicL15g_overrideCountE>
        uint32_t GetGsiForIrq(uint8_t isaIrq) {
ffffffff80018916:	41 89 f8             	mov    %edi,%r8d
            for (int i = 0; i < g_overrideCount; i++) {
ffffffff80018919:	85 f6                	test   %esi,%esi
ffffffff8001891b:	7e 33                	jle    ffffffff80018950 <_ZN3Hal6IoApic12GetGsiForIrqEh+0x40>
ffffffff8001891d:	48 c7 c1 03 c4 14 80 	mov    $0xffffffff8014c403,%rcx
ffffffff80018924:	31 d2                	xor    %edx,%edx
ffffffff80018926:	eb 13                	jmp    ffffffff8001893b <_ZN3Hal6IoApic12GetGsiForIrqEh+0x2b>
ffffffff80018928:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001892f:	00 
ffffffff80018930:	83 c2 01             	add    $0x1,%edx
ffffffff80018933:	48 83 c1 0a          	add    $0xa,%rcx
ffffffff80018937:	39 f2                	cmp    %esi,%edx
ffffffff80018939:	74 15                	je     ffffffff80018950 <_ZN3Hal6IoApic12GetGsiForIrqEh+0x40>
                if (g_overrides[i].IrqSource == isaIrq) {
ffffffff8001893b:	44 38 01             	cmp    %r8b,(%rcx)
ffffffff8001893e:	75 f0                	jne    ffffffff80018930 <_ZN3Hal6IoApic12GetGsiForIrqEh+0x20>
                    return g_overrides[i].GlobalSystemInterrupt;
ffffffff80018940:	48 63 d2             	movslq %edx,%rdx
ffffffff80018943:	48 8d 04 92          	lea    (%rdx,%rdx,4),%rax
ffffffff80018947:	8b 84 00 04 c4 14 80 	mov    -0x7feb3bfc(%rax,%rax,1),%eax
ffffffff8001894e:	c3                   	ret
ffffffff8001894f:	90                   	nop
                }
            }
            // No override found, identity map
            return isaIrq;
ffffffff80018950:	40 0f b6 c7          	movzbl %dil,%eax
        }
ffffffff80018954:	c3                   	ret
ffffffff80018955:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001895c:	00 00 00 
ffffffff8001895f:	90                   	nop

ffffffff80018960 <_ZN3Hal6IoApic8RouteIrqEhhh>:

        void RouteIrq(uint8_t isaIrq, uint8_t vector, uint8_t destinationApicId) {
ffffffff80018960:	55                   	push   %rbp
ffffffff80018961:	41 89 f8             	mov    %edi,%r8d
            uint32_t gsi = GetGsiForIrq(isaIrq);
            uint32_t ioApicIndex = gsi - g_gsiBase;
ffffffff80018964:	44 8b 0d 39 3b 13 00 	mov    0x133b39(%rip),%r9d        # ffffffff8014c4a4 <_ZN3Hal6IoApicL9g_gsiBaseE>
        void RouteIrq(uint8_t isaIrq, uint8_t vector, uint8_t destinationApicId) {
ffffffff8001896b:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001896e:	41 56                	push   %r14
ffffffff80018970:	41 55                	push   %r13

            // Build redirection entry
            uint64_t entry = 0;
            entry |= vector;                                      // Vector
ffffffff80018972:	44 0f b6 ee          	movzbl %sil,%r13d
        void RouteIrq(uint8_t isaIrq, uint8_t vector, uint8_t destinationApicId) {
ffffffff80018976:	41 54                	push   %r12
ffffffff80018978:	41 89 fc             	mov    %edi,%r12d
            for (int i = 0; i < g_overrideCount; i++) {
ffffffff8001897b:	8b 3d 5f 3a 13 00    	mov    0x133a5f(%rip),%edi        # ffffffff8014c3e0 <_ZN3Hal6IoApicL15g_overrideCountE>
        void RouteIrq(uint8_t isaIrq, uint8_t vector, uint8_t destinationApicId) {
ffffffff80018981:	53                   	push   %rbx
            entry |= ((uint64_t)destinationApicId << 56);          // Destination
ffffffff80018982:	0f b6 da             	movzbl %dl,%ebx
ffffffff80018985:	48 c1 e2 38          	shl    $0x38,%rdx
ffffffff80018989:	4c 09 ea             	or     %r13,%rdx
            for (int i = 0; i < g_overrideCount; i++) {
ffffffff8001898c:	85 ff                	test   %edi,%edi
ffffffff8001898e:	0f 8e a5 01 00 00    	jle    ffffffff80018b39 <_ZN3Hal6IoApic8RouteIrqEhhh+0x1d9>
ffffffff80018994:	48 c7 c1 03 c4 14 80 	mov    $0xffffffff8014c403,%rcx
ffffffff8001899b:	31 c0                	xor    %eax,%eax
ffffffff8001899d:	48 89 ce             	mov    %rcx,%rsi
ffffffff800189a0:	eb 1d                	jmp    ffffffff800189bf <_ZN3Hal6IoApic8RouteIrqEhhh+0x5f>
ffffffff800189a2:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800189a9:	00 00 00 00 
ffffffff800189ad:	0f 1f 00             	nopl   (%rax)
ffffffff800189b0:	83 c0 01             	add    $0x1,%eax
ffffffff800189b3:	48 83 c6 0a          	add    $0xa,%rsi
ffffffff800189b7:	39 c7                	cmp    %eax,%edi
ffffffff800189b9:	0f 84 71 01 00 00    	je     ffffffff80018b30 <_ZN3Hal6IoApic8RouteIrqEhhh+0x1d0>
                if (g_overrides[i].IrqSource == isaIrq) {
ffffffff800189bf:	44 3a 06             	cmp    (%rsi),%r8b
ffffffff800189c2:	75 ec                	jne    ffffffff800189b0 <_ZN3Hal6IoApic8RouteIrqEhhh+0x50>
                    return g_overrides[i].GlobalSystemInterrupt;
ffffffff800189c4:	48 98                	cltq
ffffffff800189c6:	48 8d 04 80          	lea    (%rax,%rax,4),%rax
ffffffff800189ca:	44 8b b4 00 04 c4 14 	mov    -0x7feb3bfc(%rax,%rax,1),%r14d
ffffffff800189d1:	80 
            uint32_t ioApicIndex = gsi - g_gsiBase;
ffffffff800189d2:	44 89 f6             	mov    %r14d,%esi

            // Check if there's an override with specific polarity/trigger settings
            for (int i = 0; i < g_overrideCount; i++) {
ffffffff800189d5:	31 c0                	xor    %eax,%eax
            uint32_t ioApicIndex = gsi - g_gsiBase;
ffffffff800189d7:	44 29 ce             	sub    %r9d,%esi
            for (int i = 0; i < g_overrideCount; i++) {
ffffffff800189da:	eb 0f                	jmp    ffffffff800189eb <_ZN3Hal6IoApic8RouteIrqEhhh+0x8b>
ffffffff800189dc:	0f 1f 40 00          	nopl   0x0(%rax)
ffffffff800189e0:	83 c0 01             	add    $0x1,%eax
ffffffff800189e3:	48 83 c1 0a          	add    $0xa,%rcx
ffffffff800189e7:	39 f8                	cmp    %edi,%eax
ffffffff800189e9:	74 33                	je     ffffffff80018a1e <_ZN3Hal6IoApic8RouteIrqEhhh+0xbe>
                if (g_overrides[i].IrqSource == isaIrq) {
ffffffff800189eb:	44 38 01             	cmp    %r8b,(%rcx)
ffffffff800189ee:	75 f0                	jne    ffffffff800189e0 <_ZN3Hal6IoApic8RouteIrqEhhh+0x80>
                    uint16_t flags = g_overrides[i].Flags;
ffffffff800189f0:	48 98                	cltq
                    // Polarity: bits 0-1 (0b11 = active low)
                    if ((flags & 0x03) == 0x03) {
                        entry |= REDIR_ACTIVE_LOW;
ffffffff800189f2:	48 89 d1             	mov    %rdx,%rcx
                    uint16_t flags = g_overrides[i].Flags;
ffffffff800189f5:	48 8d 04 80          	lea    (%rax,%rax,4),%rax
                        entry |= REDIR_ACTIVE_LOW;
ffffffff800189f9:	80 cd 20             	or     $0x20,%ch
                    uint16_t flags = g_overrides[i].Flags;
ffffffff800189fc:	0f b7 84 00 08 c4 14 	movzwl -0x7feb3bf8(%rax,%rax,1),%eax
ffffffff80018a03:	80 
                        entry |= REDIR_ACTIVE_LOW;
ffffffff80018a04:	89 c7                	mov    %eax,%edi
ffffffff80018a06:	f7 d7                	not    %edi
ffffffff80018a08:	40 f6 c7 03          	test   $0x3,%dil
ffffffff80018a0c:	48 0f 44 d1          	cmove  %rcx,%rdx
                    }
                    // Trigger mode: bits 2-3 (0b11 = level triggered)
                    if ((flags & 0x0C) == 0x0C) {
                        entry |= REDIR_LEVEL_TRIGGER;
ffffffff80018a10:	48 89 d1             	mov    %rdx,%rcx
ffffffff80018a13:	80 cd 80             	or     $0x80,%ch
ffffffff80018a16:	40 f6 c7 0c          	test   $0xc,%dil
ffffffff80018a1a:	48 0f 44 d1          	cmove  %rcx,%rdx
            uint32_t regLow  = IOREDTBL_BASE + (index * 2);
ffffffff80018a1e:	40 0f b6 c6          	movzbl %sil,%eax
            g_ioApicBase[0] = reg;
ffffffff80018a22:	48 8b 0d 7f 3a 13 00 	mov    0x133a7f(%rip),%rcx        # ffffffff8014c4a8 <_ZN3Hal6IoApicL12g_ioApicBaseE>
            WriteRegister(regHigh, (uint32_t)(entry >> 32));
ffffffff80018a29:	48 89 d7             	mov    %rdx,%rdi
            uint32_t regLow  = IOREDTBL_BASE + (index * 2);
ffffffff80018a2c:	01 c0                	add    %eax,%eax
            WriteRegister(regHigh, (uint32_t)(entry >> 32));
ffffffff80018a2e:	48 c1 ef 20          	shr    $0x20,%rdi
            uint32_t regLow  = IOREDTBL_BASE + (index * 2);
ffffffff80018a32:	8d 70 10             	lea    0x10(%rax),%esi
            uint32_t regHigh = IOREDTBL_BASE + (index * 2) + 1;
ffffffff80018a35:	83 c0 11             	add    $0x11,%eax
            g_ioApicBase[0] = reg;
ffffffff80018a38:	89 01                	mov    %eax,(%rcx)
            g_ioApicBase[4] = value;
ffffffff80018a3a:	89 79 10             	mov    %edi,0x10(%rcx)
            Print(string);
ffffffff80018a3d:	48 c7 c7 00 b8 02 80 	mov    $0xffffffff8002b800,%rdi
            g_ioApicBase[0] = reg;
ffffffff80018a44:	89 31                	mov    %esi,(%rcx)
            g_ioApicBase[4] = value;
ffffffff80018a46:	89 51 10             	mov    %edx,0x10(%rcx)
            g_kernelLogDepth++;
ffffffff80018a49:	83 05 54 6a 1c 00 01 	addl   $0x1,0x1c6a54(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80018a50:	e8 6b a7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018a55:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80018a5c:	e8 5f a7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018a61:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80018a68:	e8 53 a7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018a6d:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff80018a74:	e8 47 a7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018a79:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80018a80:	e8 3b a7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018a85:	48 c7 c7 07 b8 02 80 	mov    $0xffffffff8002b807,%rdi
ffffffff80018a8c:	e8 2f a7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80018a91:	be 0a 00 00 00       	mov    $0xa,%esi
                }
            }

            SetRedirectionEntry(ioApicIndex, entry);

            KernelLogStream(DEBUG, "IOAPIC") << "Routed ISA IRQ " << base::dec << (uint64_t)isaIrq
ffffffff80018a96:	41 0f b6 fc          	movzbl %r12b,%edi
ffffffff80018a9a:	e8 f1 19 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80018a9f:	48 89 c7             	mov    %rax,%rdi
ffffffff80018aa2:	e8 19 a7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80018aa7:	48 c7 c7 e2 a1 02 80 	mov    $0xffffffff8002a1e2,%rdi
ffffffff80018aae:	e8 0d a7 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80018ab3:	be 0a 00 00 00       	mov    $0xa,%esi
                << " -> GSI " << (uint64_t)gsi
ffffffff80018ab8:	44 89 f7             	mov    %r14d,%edi
ffffffff80018abb:	e8 d0 19 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80018ac0:	48 89 c7             	mov    %rax,%rdi
ffffffff80018ac3:	e8 f8 a6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80018ac8:	48 c7 c7 17 b8 02 80 	mov    $0xffffffff8002b817,%rdi
ffffffff80018acf:	e8 ec a6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80018ad4:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80018ad9:	4c 89 ef             	mov    %r13,%rdi
ffffffff80018adc:	e8 af 19 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80018ae1:	48 89 c7             	mov    %rax,%rdi
ffffffff80018ae4:	e8 d7 a6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80018ae9:	48 c7 c7 23 b8 02 80 	mov    $0xffffffff8002b823,%rdi
ffffffff80018af0:	e8 cb a6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80018af5:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80018afa:	48 89 df             	mov    %rbx,%rdi
ffffffff80018afd:	e8 8e 19 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80018b02:	48 89 c7             	mov    %rax,%rdi
ffffffff80018b05:	e8 b6 a6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80018b0a:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80018b11:	e8 aa a6 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << " -> vector " << (uint64_t)vector
                << " -> APIC " << (uint64_t)destinationApicId;
        }
ffffffff80018b16:	5b                   	pop    %rbx
            g_kernelLogDepth--;
ffffffff80018b17:	83 2d 86 69 1c 00 01 	subl   $0x1,0x1c6986(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80018b1e:	41 5c                	pop    %r12
ffffffff80018b20:	41 5d                	pop    %r13
ffffffff80018b22:	41 5e                	pop    %r14
ffffffff80018b24:	5d                   	pop    %rbp
ffffffff80018b25:	c3                   	ret
ffffffff80018b26:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80018b2d:	00 00 00 
            return isaIrq;
ffffffff80018b30:	45 0f b6 f4          	movzbl %r12b,%r14d
ffffffff80018b34:	e9 99 fe ff ff       	jmp    ffffffff800189d2 <_ZN3Hal6IoApic8RouteIrqEhhh+0x72>
ffffffff80018b39:	45 0f b6 f4          	movzbl %r12b,%r14d
            uint32_t ioApicIndex = gsi - g_gsiBase;
ffffffff80018b3d:	44 89 f6             	mov    %r14d,%esi
ffffffff80018b40:	44 29 ce             	sub    %r9d,%esi
            for (int i = 0; i < g_overrideCount; i++) {
ffffffff80018b43:	e9 d6 fe ff ff       	jmp    ffffffff80018a1e <_ZN3Hal6IoApic8RouteIrqEhhh+0xbe>
ffffffff80018b48:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80018b4f:	00 00 00 
ffffffff80018b52:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80018b59:	00 00 00 
ffffffff80018b5c:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80018b63:	00 00 00 
ffffffff80018b66:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80018b6d:	00 00 00 
ffffffff80018b70:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80018b77:	00 00 00 
ffffffff80018b7a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)

ffffffff80018b80 <_ZN3Hal6IoApic10InitializeEmjPNS_4MADT23InterruptSourceOverrideEi>:

        void Initialize(uint64_t ioApicBasePhys, uint32_t gsiBase,
                         MADT::InterruptSourceOverride* overrides, int overrideCount) {
ffffffff80018b80:	55                   	push   %rbp
ffffffff80018b81:	48 03 3d 20 3e 13 00 	add    0x133e20(%rip),%rdi        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff80018b88:	48 89 e5             	mov    %rsp,%rbp
ffffffff80018b8b:	41 54                	push   %r12
ffffffff80018b8d:	53                   	push   %rbx
            g_ioApicBase = (volatile uint32_t*)Memory::HHDM(ioApicBasePhys);
ffffffff80018b8e:	48 89 3d 13 39 13 00 	mov    %rdi,0x133913(%rip)        # ffffffff8014c4a8 <_ZN3Hal6IoApicL12g_ioApicBaseE>
            g_gsiBase = gsiBase;
ffffffff80018b95:	89 35 09 39 13 00    	mov    %esi,0x133909(%rip)        # ffffffff8014c4a4 <_ZN3Hal6IoApicL9g_gsiBaseE>

            // Store overrides
            g_overrideCount = overrideCount;
ffffffff80018b9b:	89 0d 3f 38 13 00    	mov    %ecx,0x13383f(%rip)        # ffffffff8014c3e0 <_ZN3Hal6IoApicL15g_overrideCountE>
            for (int i = 0; i < overrideCount; i++) {
ffffffff80018ba1:	85 c9                	test   %ecx,%ecx
ffffffff80018ba3:	7e 3b                	jle    ffffffff80018be0 <_ZN3Hal6IoApic10InitializeEmjPNS_4MADT23InterruptSourceOverrideEi+0x60>
ffffffff80018ba5:	48 63 c9             	movslq %ecx,%rcx
ffffffff80018ba8:	31 c0                	xor    %eax,%eax
ffffffff80018baa:	48 8d 34 89          	lea    (%rcx,%rcx,4),%rsi
ffffffff80018bae:	48 01 f6             	add    %rsi,%rsi
ffffffff80018bb1:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80018bb8:	00 00 00 00 
ffffffff80018bbc:	0f 1f 40 00          	nopl   0x0(%rax)
                g_overrides[i] = overrides[i];
ffffffff80018bc0:	48 8b 0c 02          	mov    (%rdx,%rax,1),%rcx
ffffffff80018bc4:	48 89 88 00 c4 14 80 	mov    %rcx,-0x7feb3c00(%rax)
ffffffff80018bcb:	0f b7 4c 02 08       	movzwl 0x8(%rdx,%rax,1),%ecx
ffffffff80018bd0:	66 89 88 08 c4 14 80 	mov    %cx,-0x7feb3bf8(%rax)
            for (int i = 0; i < overrideCount; i++) {
ffffffff80018bd7:	48 83 c0 0a          	add    $0xa,%rax
ffffffff80018bdb:	48 39 c6             	cmp    %rax,%rsi
ffffffff80018bde:	75 e0                	jne    ffffffff80018bc0 <_ZN3Hal6IoApic10InitializeEmjPNS_4MADT23InterruptSourceOverrideEi+0x40>
            g_ioApicBase[0] = reg;
ffffffff80018be0:	c7 07 01 00 00 00    	movl   $0x1,(%rdi)
            return g_ioApicBase[4];
ffffffff80018be6:	44 8b 67 10          	mov    0x10(%rdi),%r12d
            g_ioApicBase[0] = reg;
ffffffff80018bea:	c7 07 00 00 00 00    	movl   $0x0,(%rdi)
            return g_ioApicBase[4];
ffffffff80018bf0:	8b 5f 10             	mov    0x10(%rdi),%ebx
            Print(string);
ffffffff80018bf3:	48 c7 c7 00 b8 02 80 	mov    $0xffffffff8002b800,%rdi
            }

            // Read IOAPIC version and max redirection entries
            uint32_t version = ReadRegister(IOAPICVER);
            g_maxRedirEntries = ((version >> 16) & 0xFF) + 1;
ffffffff80018bfa:	44 89 e0             	mov    %r12d,%eax
            g_kernelLogDepth++;
ffffffff80018bfd:	83 05 a0 68 1c 00 01 	addl   $0x1,0x1c68a0(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80018c04:	c1 e8 10             	shr    $0x10,%eax
            uint32_t ioapicId = (ReadRegister(IOAPICID) >> 24) & 0x0F;
ffffffff80018c07:	c1 eb 18             	shr    $0x18,%ebx
            g_maxRedirEntries = ((version >> 16) & 0xFF) + 1;
ffffffff80018c0a:	0f b6 c0             	movzbl %al,%eax
ffffffff80018c0d:	83 c0 01             	add    $0x1,%eax
ffffffff80018c10:	89 05 8a 38 13 00    	mov    %eax,0x13388a(%rip)        # ffffffff8014c4a0 <_ZN3Hal6IoApicL17g_maxRedirEntriesE>
            Print(string);
ffffffff80018c16:	e8 a5 a5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018c1b:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80018c22:	e8 99 a5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018c27:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80018c2e:	e8 8d a5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018c33:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80018c3a:	e8 81 a5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018c3f:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80018c46:	e8 75 a5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018c4b:	48 c7 c7 2d b8 02 80 	mov    $0xffffffff8002b82d,%rdi
ffffffff80018c52:	e8 69 a5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            uint32_t ioapicId = (ReadRegister(IOAPICID) >> 24) & 0x0F;
ffffffff80018c57:	89 df                	mov    %ebx,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80018c59:	be 0a 00 00 00       	mov    $0xa,%esi

            KernelLogStream(OK, "IOAPIC") << "IOAPIC initialized: id=" << base::dec << (uint64_t)ioapicId
ffffffff80018c5e:	83 e7 0f             	and    $0xf,%edi
ffffffff80018c61:	e8 2a 18 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80018c66:	48 89 c7             	mov    %rax,%rdi
ffffffff80018c69:	e8 52 a5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80018c6e:	48 c7 c7 50 b7 02 80 	mov    $0xffffffff8002b750,%rdi
ffffffff80018c75:	e8 46 a5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80018c7a:	be 10 00 00 00       	mov    $0x10,%esi
                << " version=" << base::hex << (uint64_t)(version & 0xFF)
ffffffff80018c7f:	41 0f b6 fc          	movzbl %r12b,%edi
ffffffff80018c83:	e8 08 18 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80018c88:	48 89 c7             	mov    %rax,%rdi
ffffffff80018c8b:	e8 30 a5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80018c90:	48 c7 c7 45 b8 02 80 	mov    $0xffffffff8002b845,%rdi
ffffffff80018c97:	e8 24 a5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << " entries=" << base::dec << (uint64_t)g_maxRedirEntries;
ffffffff80018c9c:	8b 3d fe 37 13 00    	mov    0x1337fe(%rip),%edi        # ffffffff8014c4a0 <_ZN3Hal6IoApicL17g_maxRedirEntriesE>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80018ca2:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80018ca7:	e8 e4 17 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80018cac:	48 89 c7             	mov    %rax,%rdi
ffffffff80018caf:	e8 0c a5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80018cb4:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80018cbb:	e8 00 a5 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80018cc0:	8b 05 de 67 1c 00    	mov    0x1c67de(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

            // Mask all redirection entries initially
            for (uint32_t i = 0; i < g_maxRedirEntries; i++) {
ffffffff80018cc6:	44 8b 05 d3 37 13 00 	mov    0x1337d3(%rip),%r8d        # ffffffff8014c4a0 <_ZN3Hal6IoApicL17g_maxRedirEntriesE>
            g_ioApicBase[0] = reg;
ffffffff80018ccd:	48 8b 0d d4 37 13 00 	mov    0x1337d4(%rip),%rcx        # ffffffff8014c4a8 <_ZN3Hal6IoApicL12g_ioApicBaseE>
ffffffff80018cd4:	8d 50 ff             	lea    -0x1(%rax),%edx
ffffffff80018cd7:	89 15 c7 67 1c 00    	mov    %edx,0x1c67c7(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            for (uint32_t i = 0; i < g_maxRedirEntries; i++) {
ffffffff80018cdd:	31 d2                	xor    %edx,%edx
ffffffff80018cdf:	45 85 c0             	test   %r8d,%r8d
ffffffff80018ce2:	74 4f                	je     ffffffff80018d33 <_ZN3Hal6IoApic10InitializeEmjPNS_4MADT23InterruptSourceOverrideEi+0x1b3>
ffffffff80018ce4:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80018ceb:	00 00 00 00 
ffffffff80018cef:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80018cf6:	00 00 00 00 
ffffffff80018cfa:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            uint32_t regLow  = IOREDTBL_BASE + (index * 2);
ffffffff80018d00:	0f b6 c2             	movzbl %dl,%eax
                SetRedirectionEntry(i, REDIR_MASKED | (IRQ_VECTOR_BASE + i));
ffffffff80018d03:	8d 72 20             	lea    0x20(%rdx),%esi
            for (uint32_t i = 0; i < g_maxRedirEntries; i++) {
ffffffff80018d06:	83 c2 01             	add    $0x1,%edx
            uint32_t regLow  = IOREDTBL_BASE + (index * 2);
ffffffff80018d09:	01 c0                	add    %eax,%eax
                SetRedirectionEntry(i, REDIR_MASKED | (IRQ_VECTOR_BASE + i));
ffffffff80018d0b:	81 ce 00 00 01 00    	or     $0x10000,%esi
            uint32_t regLow  = IOREDTBL_BASE + (index * 2);
ffffffff80018d11:	8d 78 10             	lea    0x10(%rax),%edi
            uint32_t regHigh = IOREDTBL_BASE + (index * 2) + 1;
ffffffff80018d14:	83 c0 11             	add    $0x11,%eax
            g_ioApicBase[0] = reg;
ffffffff80018d17:	89 01                	mov    %eax,(%rcx)
            g_ioApicBase[4] = value;
ffffffff80018d19:	c7 41 10 00 00 00 00 	movl   $0x0,0x10(%rcx)
            g_ioApicBase[0] = reg;
ffffffff80018d20:	89 39                	mov    %edi,(%rcx)
            g_ioApicBase[4] = value;
ffffffff80018d22:	89 71 10             	mov    %esi,0x10(%rcx)
            for (uint32_t i = 0; i < g_maxRedirEntries; i++) {
ffffffff80018d25:	41 39 d0             	cmp    %edx,%r8d
ffffffff80018d28:	75 d6                	jne    ffffffff80018d00 <_ZN3Hal6IoApic10InitializeEmjPNS_4MADT23InterruptSourceOverrideEi+0x180>
            g_kernelLogDepth++;
ffffffff80018d2a:	8b 05 74 67 1c 00    	mov    0x1c6774(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80018d30:	83 c0 01             	add    $0x1,%eax
            Print(string);
ffffffff80018d33:	48 c7 c7 00 b8 02 80 	mov    $0xffffffff8002b800,%rdi
            g_kernelLogDepth++;
ffffffff80018d3a:	89 05 64 67 1c 00    	mov    %eax,0x1c6764(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80018d40:	e8 7b a4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018d45:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80018d4c:	e8 6f a4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018d51:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80018d58:	e8 63 a4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018d5d:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80018d64:	e8 57 a4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018d69:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80018d70:	e8 4b a4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018d75:	48 c7 c7 f0 cc 02 80 	mov    $0xffffffff8002ccf0,%rdi
ffffffff80018d7c:	e8 3f a4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018d81:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80018d88:	e8 33 a4 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            }

            KernelLogStream(OK, "IOAPIC") << "All redirection entries masked";
        }
ffffffff80018d8d:	5b                   	pop    %rbx
            g_kernelLogDepth--;
ffffffff80018d8e:	83 2d 0f 67 1c 00 01 	subl   $0x1,0x1c670f(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80018d95:	41 5c                	pop    %r12
ffffffff80018d97:	5d                   	pop    %rbp
ffffffff80018d98:	c3                   	ret
ffffffff80018d99:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff80018da0 <_ZN3Hal16DisableLegacyPicEv>:
    // ICW1 flags
    constexpr uint8_t ICW1_INIT = 0x11;
    // ICW4 flags
    constexpr uint8_t ICW4_8086 = 0x01;

    void DisableLegacyPic() {
ffffffff80018da0:	55                   	push   %rbp
ffffffff80018da1:	b9 11 00 00 00       	mov    $0x11,%ecx
ffffffff80018da6:	89 c8                	mov    %ecx,%eax
ffffffff80018da8:	48 89 e5             	mov    %rsp,%rbp
ffffffff80018dab:	e6 20                	out    %al,$0x20
ffffffff80018dad:	31 d2                	xor    %edx,%edx
ffffffff80018daf:	89 d0                	mov    %edx,%eax
ffffffff80018db1:	e6 80                	out    %al,$0x80
ffffffff80018db3:	89 c8                	mov    %ecx,%eax
ffffffff80018db5:	e6 a0                	out    %al,$0xa0
ffffffff80018db7:	89 d0                	mov    %edx,%eax
ffffffff80018db9:	e6 80                	out    %al,$0x80
ffffffff80018dbb:	b8 f0 ff ff ff       	mov    $0xfffffff0,%eax
ffffffff80018dc0:	e6 21                	out    %al,$0x21
ffffffff80018dc2:	89 d0                	mov    %edx,%eax
ffffffff80018dc4:	e6 80                	out    %al,$0x80
ffffffff80018dc6:	b8 f8 ff ff ff       	mov    $0xfffffff8,%eax
ffffffff80018dcb:	e6 a1                	out    %al,$0xa1
ffffffff80018dcd:	89 d0                	mov    %edx,%eax
ffffffff80018dcf:	e6 80                	out    %al,$0x80
ffffffff80018dd1:	b8 04 00 00 00       	mov    $0x4,%eax
ffffffff80018dd6:	e6 21                	out    %al,$0x21
ffffffff80018dd8:	89 d0                	mov    %edx,%eax
ffffffff80018dda:	e6 80                	out    %al,$0x80
ffffffff80018ddc:	b8 02 00 00 00       	mov    $0x2,%eax
ffffffff80018de1:	e6 a1                	out    %al,$0xa1
ffffffff80018de3:	89 d0                	mov    %edx,%eax
ffffffff80018de5:	e6 80                	out    %al,$0x80
ffffffff80018de7:	b9 01 00 00 00       	mov    $0x1,%ecx
ffffffff80018dec:	89 c8                	mov    %ecx,%eax
ffffffff80018dee:	e6 21                	out    %al,$0x21
ffffffff80018df0:	89 d0                	mov    %edx,%eax
ffffffff80018df2:	e6 80                	out    %al,$0x80
ffffffff80018df4:	89 c8                	mov    %ecx,%eax
ffffffff80018df6:	e6 a1                	out    %al,$0xa1
ffffffff80018df8:	89 d0                	mov    %edx,%eax
ffffffff80018dfa:	e6 80                	out    %al,$0x80
ffffffff80018dfc:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
ffffffff80018e01:	e6 21                	out    %al,$0x21
ffffffff80018e03:	e6 a1                	out    %al,$0xa1
            Print(string);
ffffffff80018e05:	48 c7 c7 24 a3 02 80 	mov    $0xffffffff8002a324,%rdi
            g_kernelLogDepth++;
ffffffff80018e0c:	83 05 91 66 1c 00 01 	addl   $0x1,0x1c6691(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80018e13:	e8 a8 a3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018e18:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80018e1f:	e8 9c a3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018e24:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80018e2b:	e8 90 a3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018e30:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80018e37:	e8 84 a3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018e3c:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80018e43:	e8 78 a3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018e48:	48 c7 c7 4f b8 02 80 	mov    $0xffffffff8002b84f,%rdi
ffffffff80018e4f:	e8 6c a3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018e54:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80018e5b:	e8 60 a3 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80018e60:	83 2d 3d 66 1c 00 01 	subl   $0x1,0x1c663d(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        // Mask all IRQs on both PICs
        Io::Out8(0xFF, PIC1_DATA);
        Io::Out8(0xFF, PIC2_DATA);

        Kt::KernelLogStream(Kt::OK, "PIC") << "Legacy 8259 PIC disabled";
    }
ffffffff80018e67:	5d                   	pop    %rbp
ffffffff80018e68:	c3                   	ret
ffffffff80018e69:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff80018e70 <_ZN3Hal10PrepareGDTEv>:

    GDTPointer gdtPointer{};
    BasicGDT kernelGDT{};
    TSS64 g_tss{};

    void PrepareGDT() {
ffffffff80018e70:	55                   	push   %rbp
        // Zero the TSS
        memset(&g_tss, 0, sizeof(g_tss));
ffffffff80018e71:	ba 68 00 00 00       	mov    $0x68,%edx
ffffffff80018e76:	31 f6                	xor    %esi,%esi
ffffffff80018e78:	48 c7 c7 c0 c4 14 80 	mov    $0xffffffff8014c4c0,%rdi
    void PrepareGDT() {
ffffffff80018e7f:	48 89 e5             	mov    %rsp,%rbp
        memset(&g_tss, 0, sizeof(g_tss));
ffffffff80018e82:	e8 99 13 00 00       	call   ffffffff8001a220 <memset>
        g_tss.iopbOffset = sizeof(TSS64);
ffffffff80018e87:	48 c7 c0 c0 c4 14 80 	mov    $0xffffffff8014c4c0,%rax
ffffffff80018e8e:	ba 68 00 00 00       	mov    $0x68,%edx

        gdtPointer = GDTPointer{
            .Size = sizeof(kernelGDT) - 1,
            .GDTAddress = (uint64_t)&kernelGDT
        };
    }
ffffffff80018e93:	5d                   	pop    %rbp
        g_tss.iopbOffset = sizeof(TSS64);
ffffffff80018e94:	66 89 15 8b 36 13 00 	mov    %dx,0x13368b(%rip)        # ffffffff8014c526 <_ZN3Hal5g_tssE+0x66>
        kernelGDT.TSS.BaseMiddle     = (base >> 16) & 0xFF;
ffffffff80018e9b:	48 89 c2             	mov    %rax,%rdx
        kernelGDT = {
ffffffff80018e9e:	48 b9 ff ff 00 00 00 	movabs $0xa09a000000ffff,%rcx
ffffffff80018ea5:	9a a0 00 
ffffffff80018ea8:	48 be ff ff 00 00 00 	movabs $0xa092000000ffff,%rsi
ffffffff80018eaf:	92 a0 00 
        kernelGDT.TSS.BaseMiddle     = (base >> 16) & 0xFF;
ffffffff80018eb2:	48 c1 ea 10          	shr    $0x10,%rdx
        kernelGDT = {
ffffffff80018eb6:	48 89 0d 8b 36 13 00 	mov    %rcx,0x13368b(%rip)        # ffffffff8014c548 <_ZN3Hal9kernelGDTE+0x8>
ffffffff80018ebd:	48 bf ff ff 00 00 00 	movabs $0xa0f2000000ffff,%rdi
ffffffff80018ec4:	f2 a0 00 
ffffffff80018ec7:	48 b9 ff ff 00 00 00 	movabs $0xa0fa000000ffff,%rcx
ffffffff80018ece:	fa a0 00 
        kernelGDT.TSS.BaseLow       = base & 0xFFFF;
ffffffff80018ed1:	66 89 05 92 36 13 00 	mov    %ax,0x133692(%rip)        # ffffffff8014c56a <_ZN3Hal9kernelGDTE+0x2a>
        kernelGDT.TSS.BaseMiddle     = (base >> 16) & 0xFF;
ffffffff80018ed8:	88 15 8e 36 13 00    	mov    %dl,0x13368e(%rip)        # ffffffff8014c56c <_ZN3Hal9kernelGDTE+0x2c>
        kernelGDT.TSS.BaseHigh       = (base >> 24) & 0xFF;
ffffffff80018ede:	48 89 c2             	mov    %rax,%rdx
        uint32_t baseUpper = (uint32_t)(base >> 32);
ffffffff80018ee1:	48 c1 e8 20          	shr    $0x20,%rax
        kernelGDT = {
ffffffff80018ee5:	48 89 35 64 36 13 00 	mov    %rsi,0x133664(%rip)        # ffffffff8014c550 <_ZN3Hal9kernelGDTE+0x10>
        kernelGDT.TSS.BaseHigh       = (base >> 24) & 0xFF;
ffffffff80018eec:	48 c1 ea 18          	shr    $0x18,%rdx
        kernelGDT.TSS.AccessByte     = 0x89;  // Present, 64-bit TSS Available
ffffffff80018ef0:	be 89 00 00 00       	mov    $0x89,%esi
        kernelGDT = {
ffffffff80018ef5:	48 89 3d 5c 36 13 00 	mov    %rdi,0x13365c(%rip)        # ffffffff8014c558 <_ZN3Hal9kernelGDTE+0x18>
        gdtPointer = GDTPointer{
ffffffff80018efc:	bf 37 00 00 00       	mov    $0x37,%edi
        kernelGDT = {
ffffffff80018f01:	48 89 0d 58 36 13 00 	mov    %rcx,0x133658(%rip)        # ffffffff8014c560 <_ZN3Hal9kernelGDTE+0x20>
        kernelGDT.TSS.LimitLow      = limit & 0xFFFF;
ffffffff80018f08:	b9 67 00 00 00       	mov    $0x67,%ecx
        kernelGDT.TSSHigh.LimitLow       = baseUpper & 0xFFFF;
ffffffff80018f0d:	66 89 05 5c 36 13 00 	mov    %ax,0x13365c(%rip)        # ffffffff8014c570 <_ZN3Hal9kernelGDTE+0x30>
        kernelGDT.TSSHigh.BaseLow        = (baseUpper >> 16) & 0xFFFF;
ffffffff80018f14:	c1 e8 10             	shr    $0x10,%eax
        kernelGDT = {
ffffffff80018f17:	c7 05 53 36 13 00 00 	movl   $0x0,0x133653(%rip)        # ffffffff8014c574 <_ZN3Hal9kernelGDTE+0x34>
ffffffff80018f1e:	00 00 00 
ffffffff80018f21:	48 c7 05 14 36 13 00 	movq   $0xffff,0x133614(%rip)        # ffffffff8014c540 <_ZN3Hal9kernelGDTE>
ffffffff80018f28:	ff ff 00 00 
        kernelGDT.TSS.LimitLow      = limit & 0xFFFF;
ffffffff80018f2c:	66 89 0d 35 36 13 00 	mov    %cx,0x133635(%rip)        # ffffffff8014c568 <_ZN3Hal9kernelGDTE+0x28>
        kernelGDT.TSS.AccessByte     = 0x89;  // Present, 64-bit TSS Available
ffffffff80018f33:	66 89 35 33 36 13 00 	mov    %si,0x133633(%rip)        # ffffffff8014c56d <_ZN3Hal9kernelGDTE+0x2d>
        kernelGDT.TSS.BaseHigh       = (base >> 24) & 0xFF;
ffffffff80018f3a:	88 15 2f 36 13 00    	mov    %dl,0x13362f(%rip)        # ffffffff8014c56f <_ZN3Hal9kernelGDTE+0x2f>
        kernelGDT.TSSHigh.BaseLow        = (baseUpper >> 16) & 0xFFFF;
ffffffff80018f40:	66 89 05 2b 36 13 00 	mov    %ax,0x13362b(%rip)        # ffffffff8014c572 <_ZN3Hal9kernelGDTE+0x32>
        gdtPointer = GDTPointer{
ffffffff80018f47:	66 89 3d 2a 36 13 00 	mov    %di,0x13362a(%rip)        # ffffffff8014c578 <_ZN3Hal10gdtPointerE>
ffffffff80018f4e:	48 c7 05 21 36 13 00 	movq   $0xffffffff8014c540,0x133621(%rip)        # ffffffff8014c57a <_ZN3Hal10gdtPointerE+0x2>
ffffffff80018f55:	40 c5 14 80 
    }
ffffffff80018f59:	c3                   	ret
ffffffff80018f5a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)

ffffffff80018f60 <_ZN3Hal13BridgeLoadGDTEv>:
    // Helpers implemented in gdt.asm
    extern "C" void LoadGDT(GDTPointer *gdtPointer);
    extern "C" void ReloadSegments();
    extern "C" void LoadTR();

    void BridgeLoadGDT() {
ffffffff80018f60:	55                   	push   %rbp
        LoadGDT(&gdtPointer);
ffffffff80018f61:	48 c7 c7 78 c5 14 80 	mov    $0xffffffff8014c578,%rdi
    void BridgeLoadGDT() {
ffffffff80018f68:	48 89 e5             	mov    %rsp,%rbp
        LoadGDT(&gdtPointer);
ffffffff80018f6b:	e8 c0 af 00 00       	call   ffffffff80023f30 <LoadGDT>
        ReloadSegments();
ffffffff80018f70:	e8 bf af 00 00       	call   ffffffff80023f34 <ReloadSegments>
        base streamBaseType = base::dec;

        // C++ streaming operator like cout
        friend KernelOutStream &operator<<(KernelOutStream &t, const char *string)
        {
            Print(string);
ffffffff80018f75:	48 c7 c7 68 b8 02 80 	mov    $0xffffffff8002b868,%rdi
                    return "UNKNOWN";
            }
        }

        KernelLogStream(KernelLogLevel level, const char* desiredComponentName) { /* level for potential future rich event logging */
            g_kernelLogDepth++;
ffffffff80018f7c:	83 05 21 65 1c 00 01 	addl   $0x1,0x1c6521(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80018f83:	e8 38 a2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018f88:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80018f8f:	e8 2c a2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018f94:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80018f9b:	e8 20 a2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018fa0:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff80018fa7:	e8 14 a2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018fac:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80018fb3:	e8 08 a2 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018fb8:	48 c7 c7 6c b8 02 80 	mov    $0xffffffff8002b86c,%rdi
ffffffff80018fbf:	e8 fc a1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80018fc4:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80018fc9:	48 c7 c7 40 c5 14 80 	mov    $0xffffffff8014c540,%rdi
ffffffff80018fd0:	e8 bb 14 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80018fd5:	48 89 c7             	mov    %rax,%rdi
ffffffff80018fd8:	e8 e3 a1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80018fdd:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff80018fe4:	e8 d7 a1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80018fe9:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80018ff0:	e8 cb a1 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            localStream << componentName << ": " << "[" << LogLevelToStringWithColor(level) << "] ";
        }

        ~KernelLogStream() {
            localStream << newline;
            g_kernelLogDepth--;
ffffffff80018ff5:	83 2d a8 64 1c 00 01 	subl   $0x1,0x1c64a8(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

        KernelLogStream(DEBUG, "Hal") << "Set new GDT (0x" << base::hex << (uint64_t)&kernelGDT << ")";
    }
ffffffff80018ffc:	5d                   	pop    %rbp
ffffffff80018ffd:	c3                   	ret
ffffffff80018ffe:	66 90                	xchg   %ax,%ax

ffffffff80019000 <_ZN3Hal16PrepareGDTForCpuEPNS_8BasicGDTEPNS_5TSS64EPNS_10GDTPointerE>:
    void LoadTSS() {
        LoadTR();
        KernelLogStream(OK, "Hal") << "Loaded TSS (selector 0x28)";
    }

    void PrepareGDTForCpu(BasicGDT* gdt, TSS64* tss, GDTPointer* gdtPtr) {
ffffffff80019000:	55                   	push   %rbp
ffffffff80019001:	48 89 e5             	mov    %rsp,%rbp
ffffffff80019004:	41 55                	push   %r13
ffffffff80019006:	49 89 d5             	mov    %rdx,%r13
        memset(tss, 0, sizeof(TSS64));
ffffffff80019009:	ba 68 00 00 00       	mov    $0x68,%edx
    void PrepareGDTForCpu(BasicGDT* gdt, TSS64* tss, GDTPointer* gdtPtr) {
ffffffff8001900e:	41 54                	push   %r12
ffffffff80019010:	49 89 f4             	mov    %rsi,%r12
        memset(tss, 0, sizeof(TSS64));
ffffffff80019013:	31 f6                	xor    %esi,%esi
    void PrepareGDTForCpu(BasicGDT* gdt, TSS64* tss, GDTPointer* gdtPtr) {
ffffffff80019015:	53                   	push   %rbx
ffffffff80019016:	48 89 fb             	mov    %rdi,%rbx
        memset(tss, 0, sizeof(TSS64));
ffffffff80019019:	4c 89 e7             	mov    %r12,%rdi
    void PrepareGDTForCpu(BasicGDT* gdt, TSS64* tss, GDTPointer* gdtPtr) {
ffffffff8001901c:	48 83 ec 08          	sub    $0x8,%rsp
        memset(tss, 0, sizeof(TSS64));
ffffffff80019020:	e8 fb 11 00 00       	call   ffffffff8001a220 <memset>
        tss->iopbOffset = sizeof(TSS64);
ffffffff80019025:	b8 68 00 00 00       	mov    $0x68,%eax
        };

        uint64_t base = (uint64_t)tss;
        uint32_t limit = sizeof(TSS64) - 1;

        gdt->TSS.LimitLow       = limit & 0xFFFF;
ffffffff8001902a:	ba 67 00 00 00       	mov    $0x67,%edx
        gdt->TSS.BaseLow        = base & 0xFFFF;
        gdt->TSS.BaseMiddle      = (base >> 16) & 0xFF;
        gdt->TSS.AccessByte      = 0x89;
ffffffff8001902f:	b9 89 00 00 00       	mov    $0x89,%ecx
        tss->iopbOffset = sizeof(TSS64);
ffffffff80019034:	66 41 89 44 24 66    	mov    %ax,0x66(%r12)
        gdt->TSSHigh.BaseMiddle      = 0;
        gdt->TSSHigh.AccessByte      = 0;
        gdt->TSSHigh.GranularityByte = 0;
        gdt->TSSHigh.BaseHigh        = 0;

        *gdtPtr = GDTPointer{
ffffffff8001903a:	be 37 00 00 00       	mov    $0x37,%esi
        *gdt = {
ffffffff8001903f:	48 b8 ff ff 00 00 00 	movabs $0xa09a000000ffff,%rax
ffffffff80019046:	9a a0 00 
ffffffff80019049:	48 89 43 08          	mov    %rax,0x8(%rbx)
ffffffff8001904d:	48 b8 ff ff 00 00 00 	movabs $0xa092000000ffff,%rax
ffffffff80019054:	92 a0 00 
ffffffff80019057:	48 89 43 10          	mov    %rax,0x10(%rbx)
ffffffff8001905b:	48 b8 ff ff 00 00 00 	movabs $0xa0f2000000ffff,%rax
ffffffff80019062:	f2 a0 00 
ffffffff80019065:	48 89 43 18          	mov    %rax,0x18(%rbx)
ffffffff80019069:	48 b8 ff ff 00 00 00 	movabs $0xa0fa000000ffff,%rax
ffffffff80019070:	fa a0 00 
ffffffff80019073:	48 89 43 20          	mov    %rax,0x20(%rbx)
        gdt->TSS.BaseMiddle      = (base >> 16) & 0xFF;
ffffffff80019077:	4c 89 e0             	mov    %r12,%rax
ffffffff8001907a:	48 c1 e8 10          	shr    $0x10,%rax
        gdt->TSS.BaseLow        = base & 0xFFFF;
ffffffff8001907e:	66 44 89 63 2a       	mov    %r12w,0x2a(%rbx)
        gdt->TSS.BaseMiddle      = (base >> 16) & 0xFF;
ffffffff80019083:	88 43 2c             	mov    %al,0x2c(%rbx)
        gdt->TSS.BaseHigh        = (base >> 24) & 0xFF;
ffffffff80019086:	4c 89 e0             	mov    %r12,%rax
        uint32_t baseUpper = (uint32_t)(base >> 32);
ffffffff80019089:	49 c1 ec 20          	shr    $0x20,%r12
        gdt->TSSHigh.LimitLow       = baseUpper & 0xFFFF;
ffffffff8001908d:	66 44 89 63 30       	mov    %r12w,0x30(%rbx)
        gdt->TSS.BaseHigh        = (base >> 24) & 0xFF;
ffffffff80019092:	48 c1 e8 18          	shr    $0x18,%rax
        gdt->TSSHigh.BaseLow        = (baseUpper >> 16) & 0xFFFF;
ffffffff80019096:	41 c1 ec 10          	shr    $0x10,%r12d
        *gdt = {
ffffffff8001909a:	c7 43 34 00 00 00 00 	movl   $0x0,0x34(%rbx)
ffffffff800190a1:	48 c7 03 ff ff 00 00 	movq   $0xffff,(%rbx)
        gdt->TSS.LimitLow       = limit & 0xFFFF;
ffffffff800190a8:	66 89 53 28          	mov    %dx,0x28(%rbx)
        gdt->TSS.AccessByte      = 0x89;
ffffffff800190ac:	66 89 4b 2d          	mov    %cx,0x2d(%rbx)
        gdt->TSS.BaseHigh        = (base >> 24) & 0xFF;
ffffffff800190b0:	88 43 2f             	mov    %al,0x2f(%rbx)
        gdt->TSSHigh.BaseLow        = (baseUpper >> 16) & 0xFFFF;
ffffffff800190b3:	66 44 89 63 32       	mov    %r12w,0x32(%rbx)
        *gdtPtr = GDTPointer{
ffffffff800190b8:	66 41 89 75 00       	mov    %si,0x0(%r13)
ffffffff800190bd:	49 89 5d 02          	mov    %rbx,0x2(%r13)
            .Size = sizeof(BasicGDT) - 1,
            .GDTAddress = (uint64_t)gdt
        };
    }
ffffffff800190c1:	48 83 c4 08          	add    $0x8,%rsp
ffffffff800190c5:	5b                   	pop    %rbx
ffffffff800190c6:	41 5c                	pop    %r12
ffffffff800190c8:	41 5d                	pop    %r13
ffffffff800190ca:	5d                   	pop    %rbp
ffffffff800190cb:	c3                   	ret
ffffffff800190cc:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff800190d0 <_ZN3Hal13LoadGDTAndTSSEPNS_10GDTPointerE>:

    void LoadGDTAndTSS(GDTPointer* gdtPtr) {
ffffffff800190d0:	55                   	push   %rbp
ffffffff800190d1:	48 89 e5             	mov    %rsp,%rbp
        LoadGDT(gdtPtr);
ffffffff800190d4:	e8 57 ae 00 00       	call   ffffffff80023f30 <LoadGDT>
        ReloadSegments();
ffffffff800190d9:	e8 56 ae 00 00       	call   ffffffff80023f34 <ReloadSegments>
        LoadTR();
    }
ffffffff800190de:	5d                   	pop    %rbp
        LoadTR();
ffffffff800190df:	e9 6b ae 00 00       	jmp    ffffffff80023f4f <LoadTR>
ffffffff800190e4:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800190eb:	00 00 00 
ffffffff800190ee:	66 90                	xchg   %ax,%ax

ffffffff800190f0 <_ZN3Hal16ExceptionHandlerILm0EEEvPN6System10PanicFrameE>:
        "Security Exception",
        "Reserved"
    };

    template<size_t i>
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800190f0:	55                   	push   %rbp
ffffffff800190f1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800190f4:	41 53                	push   %r11
ffffffff800190f6:	41 52                	push   %r10
ffffffff800190f8:	41 51                	push   %r9
ffffffff800190fa:	41 50                	push   %r8
ffffffff800190fc:	57                   	push   %rdi
ffffffff800190fd:	56                   	push   %rsi
    {
        frame->InterruptVector = i;
        Panic(ExceptionStrings[i], frame);
ffffffff800190fe:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019102:	51                   	push   %rcx
ffffffff80019103:	52                   	push   %rdx
ffffffff80019104:	50                   	push   %rax
ffffffff80019105:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019109:	48 8b 3d 10 4f 01 00 	mov    0x14f10(%rip),%rdi        # ffffffff8002e020 <_ZN3Hal16ExceptionStringsE>
        frame->InterruptVector = i;
ffffffff80019110:	c6 45 30 00          	movb   $0x0,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019114:	fc                   	cld
ffffffff80019115:	e8 76 2a ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001911a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001911e:	58                   	pop    %rax
ffffffff8001911f:	5a                   	pop    %rdx
ffffffff80019120:	59                   	pop    %rcx
ffffffff80019121:	5e                   	pop    %rsi
ffffffff80019122:	5f                   	pop    %rdi
ffffffff80019123:	41 58                	pop    %r8
ffffffff80019125:	41 59                	pop    %r9
ffffffff80019127:	41 5a                	pop    %r10
ffffffff80019129:	41 5b                	pop    %r11
ffffffff8001912b:	5d                   	pop    %rbp
ffffffff8001912c:	48 cf                	iretq
ffffffff8001912e:	66 90                	xchg   %ax,%ax

ffffffff80019130 <_ZN3Hal16ExceptionHandlerILm1EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019130:	55                   	push   %rbp
ffffffff80019131:	48 89 e5             	mov    %rsp,%rbp
ffffffff80019134:	41 53                	push   %r11
ffffffff80019136:	41 52                	push   %r10
ffffffff80019138:	41 51                	push   %r9
ffffffff8001913a:	41 50                	push   %r8
ffffffff8001913c:	57                   	push   %rdi
ffffffff8001913d:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff8001913e:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019142:	51                   	push   %rcx
ffffffff80019143:	52                   	push   %rdx
ffffffff80019144:	50                   	push   %rax
ffffffff80019145:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019149:	48 8b 3d d8 4e 01 00 	mov    0x14ed8(%rip),%rdi        # ffffffff8002e028 <_ZN3Hal16ExceptionStringsE+0x8>
        frame->InterruptVector = i;
ffffffff80019150:	c6 45 30 01          	movb   $0x1,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019154:	fc                   	cld
ffffffff80019155:	e8 36 2a ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001915a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001915e:	58                   	pop    %rax
ffffffff8001915f:	5a                   	pop    %rdx
ffffffff80019160:	59                   	pop    %rcx
ffffffff80019161:	5e                   	pop    %rsi
ffffffff80019162:	5f                   	pop    %rdi
ffffffff80019163:	41 58                	pop    %r8
ffffffff80019165:	41 59                	pop    %r9
ffffffff80019167:	41 5a                	pop    %r10
ffffffff80019169:	41 5b                	pop    %r11
ffffffff8001916b:	5d                   	pop    %rbp
ffffffff8001916c:	48 cf                	iretq
ffffffff8001916e:	66 90                	xchg   %ax,%ax

ffffffff80019170 <_ZN3Hal16ExceptionHandlerILm2EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019170:	55                   	push   %rbp
ffffffff80019171:	48 89 e5             	mov    %rsp,%rbp
ffffffff80019174:	41 53                	push   %r11
ffffffff80019176:	41 52                	push   %r10
ffffffff80019178:	41 51                	push   %r9
ffffffff8001917a:	41 50                	push   %r8
ffffffff8001917c:	57                   	push   %rdi
ffffffff8001917d:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff8001917e:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019182:	51                   	push   %rcx
ffffffff80019183:	52                   	push   %rdx
ffffffff80019184:	50                   	push   %rax
ffffffff80019185:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019189:	48 8b 3d a0 4e 01 00 	mov    0x14ea0(%rip),%rdi        # ffffffff8002e030 <_ZN3Hal16ExceptionStringsE+0x10>
        frame->InterruptVector = i;
ffffffff80019190:	c6 45 30 02          	movb   $0x2,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019194:	fc                   	cld
ffffffff80019195:	e8 f6 29 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001919a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001919e:	58                   	pop    %rax
ffffffff8001919f:	5a                   	pop    %rdx
ffffffff800191a0:	59                   	pop    %rcx
ffffffff800191a1:	5e                   	pop    %rsi
ffffffff800191a2:	5f                   	pop    %rdi
ffffffff800191a3:	41 58                	pop    %r8
ffffffff800191a5:	41 59                	pop    %r9
ffffffff800191a7:	41 5a                	pop    %r10
ffffffff800191a9:	41 5b                	pop    %r11
ffffffff800191ab:	5d                   	pop    %rbp
ffffffff800191ac:	48 cf                	iretq
ffffffff800191ae:	66 90                	xchg   %ax,%ax

ffffffff800191b0 <_ZN3Hal16ExceptionHandlerILm3EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800191b0:	55                   	push   %rbp
ffffffff800191b1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800191b4:	41 53                	push   %r11
ffffffff800191b6:	41 52                	push   %r10
ffffffff800191b8:	41 51                	push   %r9
ffffffff800191ba:	41 50                	push   %r8
ffffffff800191bc:	57                   	push   %rdi
ffffffff800191bd:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff800191be:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800191c2:	51                   	push   %rcx
ffffffff800191c3:	52                   	push   %rdx
ffffffff800191c4:	50                   	push   %rax
ffffffff800191c5:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff800191c9:	48 8b 3d 68 4e 01 00 	mov    0x14e68(%rip),%rdi        # ffffffff8002e038 <_ZN3Hal16ExceptionStringsE+0x18>
        frame->InterruptVector = i;
ffffffff800191d0:	c6 45 30 03          	movb   $0x3,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff800191d4:	fc                   	cld
ffffffff800191d5:	e8 b6 29 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff800191da:	48 83 c4 08          	add    $0x8,%rsp
ffffffff800191de:	58                   	pop    %rax
ffffffff800191df:	5a                   	pop    %rdx
ffffffff800191e0:	59                   	pop    %rcx
ffffffff800191e1:	5e                   	pop    %rsi
ffffffff800191e2:	5f                   	pop    %rdi
ffffffff800191e3:	41 58                	pop    %r8
ffffffff800191e5:	41 59                	pop    %r9
ffffffff800191e7:	41 5a                	pop    %r10
ffffffff800191e9:	41 5b                	pop    %r11
ffffffff800191eb:	5d                   	pop    %rbp
ffffffff800191ec:	48 cf                	iretq
ffffffff800191ee:	66 90                	xchg   %ax,%ax

ffffffff800191f0 <_ZN3Hal16ExceptionHandlerILm4EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800191f0:	55                   	push   %rbp
ffffffff800191f1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800191f4:	41 53                	push   %r11
ffffffff800191f6:	41 52                	push   %r10
ffffffff800191f8:	41 51                	push   %r9
ffffffff800191fa:	41 50                	push   %r8
ffffffff800191fc:	57                   	push   %rdi
ffffffff800191fd:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff800191fe:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019202:	51                   	push   %rcx
ffffffff80019203:	52                   	push   %rdx
ffffffff80019204:	50                   	push   %rax
ffffffff80019205:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019209:	48 8b 3d 30 4e 01 00 	mov    0x14e30(%rip),%rdi        # ffffffff8002e040 <_ZN3Hal16ExceptionStringsE+0x20>
        frame->InterruptVector = i;
ffffffff80019210:	c6 45 30 04          	movb   $0x4,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019214:	fc                   	cld
ffffffff80019215:	e8 76 29 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001921a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001921e:	58                   	pop    %rax
ffffffff8001921f:	5a                   	pop    %rdx
ffffffff80019220:	59                   	pop    %rcx
ffffffff80019221:	5e                   	pop    %rsi
ffffffff80019222:	5f                   	pop    %rdi
ffffffff80019223:	41 58                	pop    %r8
ffffffff80019225:	41 59                	pop    %r9
ffffffff80019227:	41 5a                	pop    %r10
ffffffff80019229:	41 5b                	pop    %r11
ffffffff8001922b:	5d                   	pop    %rbp
ffffffff8001922c:	48 cf                	iretq
ffffffff8001922e:	66 90                	xchg   %ax,%ax

ffffffff80019230 <_ZN3Hal16ExceptionHandlerILm5EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019230:	55                   	push   %rbp
ffffffff80019231:	48 89 e5             	mov    %rsp,%rbp
ffffffff80019234:	41 53                	push   %r11
ffffffff80019236:	41 52                	push   %r10
ffffffff80019238:	41 51                	push   %r9
ffffffff8001923a:	41 50                	push   %r8
ffffffff8001923c:	57                   	push   %rdi
ffffffff8001923d:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff8001923e:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019242:	51                   	push   %rcx
ffffffff80019243:	52                   	push   %rdx
ffffffff80019244:	50                   	push   %rax
ffffffff80019245:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019249:	48 8b 3d f8 4d 01 00 	mov    0x14df8(%rip),%rdi        # ffffffff8002e048 <_ZN3Hal16ExceptionStringsE+0x28>
        frame->InterruptVector = i;
ffffffff80019250:	c6 45 30 05          	movb   $0x5,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019254:	fc                   	cld
ffffffff80019255:	e8 36 29 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001925a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001925e:	58                   	pop    %rax
ffffffff8001925f:	5a                   	pop    %rdx
ffffffff80019260:	59                   	pop    %rcx
ffffffff80019261:	5e                   	pop    %rsi
ffffffff80019262:	5f                   	pop    %rdi
ffffffff80019263:	41 58                	pop    %r8
ffffffff80019265:	41 59                	pop    %r9
ffffffff80019267:	41 5a                	pop    %r10
ffffffff80019269:	41 5b                	pop    %r11
ffffffff8001926b:	5d                   	pop    %rbp
ffffffff8001926c:	48 cf                	iretq
ffffffff8001926e:	66 90                	xchg   %ax,%ax

ffffffff80019270 <_ZN3Hal16ExceptionHandlerILm6EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019270:	55                   	push   %rbp
ffffffff80019271:	48 89 e5             	mov    %rsp,%rbp
ffffffff80019274:	41 53                	push   %r11
ffffffff80019276:	41 52                	push   %r10
ffffffff80019278:	41 51                	push   %r9
ffffffff8001927a:	41 50                	push   %r8
ffffffff8001927c:	57                   	push   %rdi
ffffffff8001927d:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff8001927e:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019282:	51                   	push   %rcx
ffffffff80019283:	52                   	push   %rdx
ffffffff80019284:	50                   	push   %rax
ffffffff80019285:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019289:	48 8b 3d c0 4d 01 00 	mov    0x14dc0(%rip),%rdi        # ffffffff8002e050 <_ZN3Hal16ExceptionStringsE+0x30>
        frame->InterruptVector = i;
ffffffff80019290:	c6 45 30 06          	movb   $0x6,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019294:	fc                   	cld
ffffffff80019295:	e8 f6 28 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001929a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001929e:	58                   	pop    %rax
ffffffff8001929f:	5a                   	pop    %rdx
ffffffff800192a0:	59                   	pop    %rcx
ffffffff800192a1:	5e                   	pop    %rsi
ffffffff800192a2:	5f                   	pop    %rdi
ffffffff800192a3:	41 58                	pop    %r8
ffffffff800192a5:	41 59                	pop    %r9
ffffffff800192a7:	41 5a                	pop    %r10
ffffffff800192a9:	41 5b                	pop    %r11
ffffffff800192ab:	5d                   	pop    %rbp
ffffffff800192ac:	48 cf                	iretq
ffffffff800192ae:	66 90                	xchg   %ax,%ax

ffffffff800192b0 <_ZN3Hal16ExceptionHandlerILm7EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800192b0:	55                   	push   %rbp
ffffffff800192b1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800192b4:	41 53                	push   %r11
ffffffff800192b6:	41 52                	push   %r10
ffffffff800192b8:	41 51                	push   %r9
ffffffff800192ba:	41 50                	push   %r8
ffffffff800192bc:	57                   	push   %rdi
ffffffff800192bd:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff800192be:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800192c2:	51                   	push   %rcx
ffffffff800192c3:	52                   	push   %rdx
ffffffff800192c4:	50                   	push   %rax
ffffffff800192c5:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff800192c9:	48 8b 3d 88 4d 01 00 	mov    0x14d88(%rip),%rdi        # ffffffff8002e058 <_ZN3Hal16ExceptionStringsE+0x38>
        frame->InterruptVector = i;
ffffffff800192d0:	c6 45 30 07          	movb   $0x7,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff800192d4:	fc                   	cld
ffffffff800192d5:	e8 b6 28 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff800192da:	48 83 c4 08          	add    $0x8,%rsp
ffffffff800192de:	58                   	pop    %rax
ffffffff800192df:	5a                   	pop    %rdx
ffffffff800192e0:	59                   	pop    %rcx
ffffffff800192e1:	5e                   	pop    %rsi
ffffffff800192e2:	5f                   	pop    %rdi
ffffffff800192e3:	41 58                	pop    %r8
ffffffff800192e5:	41 59                	pop    %r9
ffffffff800192e7:	41 5a                	pop    %r10
ffffffff800192e9:	41 5b                	pop    %r11
ffffffff800192eb:	5d                   	pop    %rbp
ffffffff800192ec:	48 cf                	iretq
ffffffff800192ee:	66 90                	xchg   %ax,%ax

ffffffff800192f0 <_ZN3Hal16ExceptionHandlerILm8EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800192f0:	55                   	push   %rbp
ffffffff800192f1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800192f4:	41 53                	push   %r11
ffffffff800192f6:	41 52                	push   %r10
ffffffff800192f8:	41 51                	push   %r9
ffffffff800192fa:	41 50                	push   %r8
ffffffff800192fc:	57                   	push   %rdi
ffffffff800192fd:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff800192fe:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019302:	51                   	push   %rcx
ffffffff80019303:	52                   	push   %rdx
ffffffff80019304:	50                   	push   %rax
ffffffff80019305:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019309:	48 8b 3d 50 4d 01 00 	mov    0x14d50(%rip),%rdi        # ffffffff8002e060 <_ZN3Hal16ExceptionStringsE+0x40>
        frame->InterruptVector = i;
ffffffff80019310:	c6 45 30 08          	movb   $0x8,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019314:	fc                   	cld
ffffffff80019315:	e8 76 28 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001931a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001931e:	58                   	pop    %rax
ffffffff8001931f:	5a                   	pop    %rdx
ffffffff80019320:	59                   	pop    %rcx
ffffffff80019321:	5e                   	pop    %rsi
ffffffff80019322:	5f                   	pop    %rdi
ffffffff80019323:	41 58                	pop    %r8
ffffffff80019325:	41 59                	pop    %r9
ffffffff80019327:	41 5a                	pop    %r10
ffffffff80019329:	41 5b                	pop    %r11
ffffffff8001932b:	5d                   	pop    %rbp
ffffffff8001932c:	48 cf                	iretq
ffffffff8001932e:	66 90                	xchg   %ax,%ax

ffffffff80019330 <_ZN3Hal16ExceptionHandlerILm9EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019330:	55                   	push   %rbp
ffffffff80019331:	48 89 e5             	mov    %rsp,%rbp
ffffffff80019334:	41 53                	push   %r11
ffffffff80019336:	41 52                	push   %r10
ffffffff80019338:	41 51                	push   %r9
ffffffff8001933a:	41 50                	push   %r8
ffffffff8001933c:	57                   	push   %rdi
ffffffff8001933d:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff8001933e:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019342:	51                   	push   %rcx
ffffffff80019343:	52                   	push   %rdx
ffffffff80019344:	50                   	push   %rax
ffffffff80019345:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019349:	48 8b 3d 18 4d 01 00 	mov    0x14d18(%rip),%rdi        # ffffffff8002e068 <_ZN3Hal16ExceptionStringsE+0x48>
        frame->InterruptVector = i;
ffffffff80019350:	c6 45 30 09          	movb   $0x9,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019354:	fc                   	cld
ffffffff80019355:	e8 36 28 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001935a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001935e:	58                   	pop    %rax
ffffffff8001935f:	5a                   	pop    %rdx
ffffffff80019360:	59                   	pop    %rcx
ffffffff80019361:	5e                   	pop    %rsi
ffffffff80019362:	5f                   	pop    %rdi
ffffffff80019363:	41 58                	pop    %r8
ffffffff80019365:	41 59                	pop    %r9
ffffffff80019367:	41 5a                	pop    %r10
ffffffff80019369:	41 5b                	pop    %r11
ffffffff8001936b:	5d                   	pop    %rbp
ffffffff8001936c:	48 cf                	iretq
ffffffff8001936e:	66 90                	xchg   %ax,%ax

ffffffff80019370 <_ZN3Hal16ExceptionHandlerILm10EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019370:	55                   	push   %rbp
ffffffff80019371:	48 89 e5             	mov    %rsp,%rbp
ffffffff80019374:	41 53                	push   %r11
ffffffff80019376:	41 52                	push   %r10
ffffffff80019378:	41 51                	push   %r9
ffffffff8001937a:	41 50                	push   %r8
ffffffff8001937c:	57                   	push   %rdi
ffffffff8001937d:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff8001937e:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019382:	51                   	push   %rcx
ffffffff80019383:	52                   	push   %rdx
ffffffff80019384:	50                   	push   %rax
ffffffff80019385:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019389:	48 8b 3d e0 4c 01 00 	mov    0x14ce0(%rip),%rdi        # ffffffff8002e070 <_ZN3Hal16ExceptionStringsE+0x50>
        frame->InterruptVector = i;
ffffffff80019390:	c6 45 30 0a          	movb   $0xa,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019394:	fc                   	cld
ffffffff80019395:	e8 f6 27 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001939a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001939e:	58                   	pop    %rax
ffffffff8001939f:	5a                   	pop    %rdx
ffffffff800193a0:	59                   	pop    %rcx
ffffffff800193a1:	5e                   	pop    %rsi
ffffffff800193a2:	5f                   	pop    %rdi
ffffffff800193a3:	41 58                	pop    %r8
ffffffff800193a5:	41 59                	pop    %r9
ffffffff800193a7:	41 5a                	pop    %r10
ffffffff800193a9:	41 5b                	pop    %r11
ffffffff800193ab:	5d                   	pop    %rbp
ffffffff800193ac:	48 cf                	iretq
ffffffff800193ae:	66 90                	xchg   %ax,%ax

ffffffff800193b0 <_ZN3Hal16ExceptionHandlerILm11EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800193b0:	55                   	push   %rbp
ffffffff800193b1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800193b4:	41 53                	push   %r11
ffffffff800193b6:	41 52                	push   %r10
ffffffff800193b8:	41 51                	push   %r9
ffffffff800193ba:	41 50                	push   %r8
ffffffff800193bc:	57                   	push   %rdi
ffffffff800193bd:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff800193be:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800193c2:	51                   	push   %rcx
ffffffff800193c3:	52                   	push   %rdx
ffffffff800193c4:	50                   	push   %rax
ffffffff800193c5:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff800193c9:	48 8b 3d a8 4c 01 00 	mov    0x14ca8(%rip),%rdi        # ffffffff8002e078 <_ZN3Hal16ExceptionStringsE+0x58>
        frame->InterruptVector = i;
ffffffff800193d0:	c6 45 30 0b          	movb   $0xb,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff800193d4:	fc                   	cld
ffffffff800193d5:	e8 b6 27 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff800193da:	48 83 c4 08          	add    $0x8,%rsp
ffffffff800193de:	58                   	pop    %rax
ffffffff800193df:	5a                   	pop    %rdx
ffffffff800193e0:	59                   	pop    %rcx
ffffffff800193e1:	5e                   	pop    %rsi
ffffffff800193e2:	5f                   	pop    %rdi
ffffffff800193e3:	41 58                	pop    %r8
ffffffff800193e5:	41 59                	pop    %r9
ffffffff800193e7:	41 5a                	pop    %r10
ffffffff800193e9:	41 5b                	pop    %r11
ffffffff800193eb:	5d                   	pop    %rbp
ffffffff800193ec:	48 cf                	iretq
ffffffff800193ee:	66 90                	xchg   %ax,%ax

ffffffff800193f0 <_ZN3Hal16ExceptionHandlerILm12EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800193f0:	55                   	push   %rbp
ffffffff800193f1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800193f4:	41 53                	push   %r11
ffffffff800193f6:	41 52                	push   %r10
ffffffff800193f8:	41 51                	push   %r9
ffffffff800193fa:	41 50                	push   %r8
ffffffff800193fc:	57                   	push   %rdi
ffffffff800193fd:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff800193fe:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019402:	51                   	push   %rcx
ffffffff80019403:	52                   	push   %rdx
ffffffff80019404:	50                   	push   %rax
ffffffff80019405:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019409:	48 8b 3d 70 4c 01 00 	mov    0x14c70(%rip),%rdi        # ffffffff8002e080 <_ZN3Hal16ExceptionStringsE+0x60>
        frame->InterruptVector = i;
ffffffff80019410:	c6 45 30 0c          	movb   $0xc,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019414:	fc                   	cld
ffffffff80019415:	e8 76 27 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001941a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001941e:	58                   	pop    %rax
ffffffff8001941f:	5a                   	pop    %rdx
ffffffff80019420:	59                   	pop    %rcx
ffffffff80019421:	5e                   	pop    %rsi
ffffffff80019422:	5f                   	pop    %rdi
ffffffff80019423:	41 58                	pop    %r8
ffffffff80019425:	41 59                	pop    %r9
ffffffff80019427:	41 5a                	pop    %r10
ffffffff80019429:	41 5b                	pop    %r11
ffffffff8001942b:	5d                   	pop    %rbp
ffffffff8001942c:	48 cf                	iretq
ffffffff8001942e:	66 90                	xchg   %ax,%ax

ffffffff80019430 <_ZN3Hal16ExceptionHandlerILm13EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019430:	55                   	push   %rbp
ffffffff80019431:	48 89 e5             	mov    %rsp,%rbp
ffffffff80019434:	41 53                	push   %r11
ffffffff80019436:	41 52                	push   %r10
ffffffff80019438:	41 51                	push   %r9
ffffffff8001943a:	41 50                	push   %r8
ffffffff8001943c:	57                   	push   %rdi
ffffffff8001943d:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff8001943e:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019442:	51                   	push   %rcx
ffffffff80019443:	52                   	push   %rdx
ffffffff80019444:	50                   	push   %rax
ffffffff80019445:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019449:	48 8b 3d 38 4c 01 00 	mov    0x14c38(%rip),%rdi        # ffffffff8002e088 <_ZN3Hal16ExceptionStringsE+0x68>
        frame->InterruptVector = i;
ffffffff80019450:	c6 45 30 0d          	movb   $0xd,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019454:	fc                   	cld
ffffffff80019455:	e8 36 27 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001945a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001945e:	58                   	pop    %rax
ffffffff8001945f:	5a                   	pop    %rdx
ffffffff80019460:	59                   	pop    %rcx
ffffffff80019461:	5e                   	pop    %rsi
ffffffff80019462:	5f                   	pop    %rdi
ffffffff80019463:	41 58                	pop    %r8
ffffffff80019465:	41 59                	pop    %r9
ffffffff80019467:	41 5a                	pop    %r10
ffffffff80019469:	41 5b                	pop    %r11
ffffffff8001946b:	5d                   	pop    %rbp
ffffffff8001946c:	48 cf                	iretq
ffffffff8001946e:	66 90                	xchg   %ax,%ax

ffffffff80019470 <_ZN3Hal16ExceptionHandlerILm14EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019470:	55                   	push   %rbp
ffffffff80019471:	48 89 e5             	mov    %rsp,%rbp
ffffffff80019474:	41 53                	push   %r11
ffffffff80019476:	41 52                	push   %r10
ffffffff80019478:	41 51                	push   %r9
ffffffff8001947a:	41 50                	push   %r8
ffffffff8001947c:	57                   	push   %rdi
ffffffff8001947d:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff8001947e:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019482:	51                   	push   %rcx
ffffffff80019483:	52                   	push   %rdx
ffffffff80019484:	50                   	push   %rax
ffffffff80019485:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019489:	48 8b 3d 00 4c 01 00 	mov    0x14c00(%rip),%rdi        # ffffffff8002e090 <_ZN3Hal16ExceptionStringsE+0x70>
        frame->InterruptVector = i;
ffffffff80019490:	c6 45 30 0e          	movb   $0xe,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019494:	fc                   	cld
ffffffff80019495:	e8 f6 26 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001949a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001949e:	58                   	pop    %rax
ffffffff8001949f:	5a                   	pop    %rdx
ffffffff800194a0:	59                   	pop    %rcx
ffffffff800194a1:	5e                   	pop    %rsi
ffffffff800194a2:	5f                   	pop    %rdi
ffffffff800194a3:	41 58                	pop    %r8
ffffffff800194a5:	41 59                	pop    %r9
ffffffff800194a7:	41 5a                	pop    %r10
ffffffff800194a9:	41 5b                	pop    %r11
ffffffff800194ab:	5d                   	pop    %rbp
ffffffff800194ac:	48 cf                	iretq
ffffffff800194ae:	66 90                	xchg   %ax,%ax

ffffffff800194b0 <_ZN3Hal16ExceptionHandlerILm15EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800194b0:	55                   	push   %rbp
ffffffff800194b1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800194b4:	41 53                	push   %r11
ffffffff800194b6:	41 52                	push   %r10
ffffffff800194b8:	41 51                	push   %r9
ffffffff800194ba:	41 50                	push   %r8
ffffffff800194bc:	57                   	push   %rdi
ffffffff800194bd:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff800194be:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800194c2:	51                   	push   %rcx
ffffffff800194c3:	52                   	push   %rdx
ffffffff800194c4:	50                   	push   %rax
ffffffff800194c5:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff800194c9:	48 8b 3d c8 4b 01 00 	mov    0x14bc8(%rip),%rdi        # ffffffff8002e098 <_ZN3Hal16ExceptionStringsE+0x78>
        frame->InterruptVector = i;
ffffffff800194d0:	c6 45 30 0f          	movb   $0xf,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff800194d4:	fc                   	cld
ffffffff800194d5:	e8 b6 26 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff800194da:	48 83 c4 08          	add    $0x8,%rsp
ffffffff800194de:	58                   	pop    %rax
ffffffff800194df:	5a                   	pop    %rdx
ffffffff800194e0:	59                   	pop    %rcx
ffffffff800194e1:	5e                   	pop    %rsi
ffffffff800194e2:	5f                   	pop    %rdi
ffffffff800194e3:	41 58                	pop    %r8
ffffffff800194e5:	41 59                	pop    %r9
ffffffff800194e7:	41 5a                	pop    %r10
ffffffff800194e9:	41 5b                	pop    %r11
ffffffff800194eb:	5d                   	pop    %rbp
ffffffff800194ec:	48 cf                	iretq
ffffffff800194ee:	66 90                	xchg   %ax,%ax

ffffffff800194f0 <_ZN3Hal16ExceptionHandlerILm16EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800194f0:	55                   	push   %rbp
ffffffff800194f1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800194f4:	41 53                	push   %r11
ffffffff800194f6:	41 52                	push   %r10
ffffffff800194f8:	41 51                	push   %r9
ffffffff800194fa:	41 50                	push   %r8
ffffffff800194fc:	57                   	push   %rdi
ffffffff800194fd:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff800194fe:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019502:	51                   	push   %rcx
ffffffff80019503:	52                   	push   %rdx
ffffffff80019504:	50                   	push   %rax
ffffffff80019505:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019509:	48 8b 3d 90 4b 01 00 	mov    0x14b90(%rip),%rdi        # ffffffff8002e0a0 <_ZN3Hal16ExceptionStringsE+0x80>
        frame->InterruptVector = i;
ffffffff80019510:	c6 45 30 10          	movb   $0x10,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019514:	fc                   	cld
ffffffff80019515:	e8 76 26 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001951a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001951e:	58                   	pop    %rax
ffffffff8001951f:	5a                   	pop    %rdx
ffffffff80019520:	59                   	pop    %rcx
ffffffff80019521:	5e                   	pop    %rsi
ffffffff80019522:	5f                   	pop    %rdi
ffffffff80019523:	41 58                	pop    %r8
ffffffff80019525:	41 59                	pop    %r9
ffffffff80019527:	41 5a                	pop    %r10
ffffffff80019529:	41 5b                	pop    %r11
ffffffff8001952b:	5d                   	pop    %rbp
ffffffff8001952c:	48 cf                	iretq
ffffffff8001952e:	66 90                	xchg   %ax,%ax

ffffffff80019530 <_ZN3Hal16ExceptionHandlerILm17EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019530:	55                   	push   %rbp
ffffffff80019531:	48 89 e5             	mov    %rsp,%rbp
ffffffff80019534:	41 53                	push   %r11
ffffffff80019536:	41 52                	push   %r10
ffffffff80019538:	41 51                	push   %r9
ffffffff8001953a:	41 50                	push   %r8
ffffffff8001953c:	57                   	push   %rdi
ffffffff8001953d:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff8001953e:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019542:	51                   	push   %rcx
ffffffff80019543:	52                   	push   %rdx
ffffffff80019544:	50                   	push   %rax
ffffffff80019545:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019549:	48 8b 3d 58 4b 01 00 	mov    0x14b58(%rip),%rdi        # ffffffff8002e0a8 <_ZN3Hal16ExceptionStringsE+0x88>
        frame->InterruptVector = i;
ffffffff80019550:	c6 45 30 11          	movb   $0x11,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019554:	fc                   	cld
ffffffff80019555:	e8 36 26 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001955a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001955e:	58                   	pop    %rax
ffffffff8001955f:	5a                   	pop    %rdx
ffffffff80019560:	59                   	pop    %rcx
ffffffff80019561:	5e                   	pop    %rsi
ffffffff80019562:	5f                   	pop    %rdi
ffffffff80019563:	41 58                	pop    %r8
ffffffff80019565:	41 59                	pop    %r9
ffffffff80019567:	41 5a                	pop    %r10
ffffffff80019569:	41 5b                	pop    %r11
ffffffff8001956b:	5d                   	pop    %rbp
ffffffff8001956c:	48 cf                	iretq
ffffffff8001956e:	66 90                	xchg   %ax,%ax

ffffffff80019570 <_ZN3Hal16ExceptionHandlerILm18EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019570:	55                   	push   %rbp
ffffffff80019571:	48 89 e5             	mov    %rsp,%rbp
ffffffff80019574:	41 53                	push   %r11
ffffffff80019576:	41 52                	push   %r10
ffffffff80019578:	41 51                	push   %r9
ffffffff8001957a:	41 50                	push   %r8
ffffffff8001957c:	57                   	push   %rdi
ffffffff8001957d:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff8001957e:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019582:	51                   	push   %rcx
ffffffff80019583:	52                   	push   %rdx
ffffffff80019584:	50                   	push   %rax
ffffffff80019585:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019589:	48 8b 3d 20 4b 01 00 	mov    0x14b20(%rip),%rdi        # ffffffff8002e0b0 <_ZN3Hal16ExceptionStringsE+0x90>
        frame->InterruptVector = i;
ffffffff80019590:	c6 45 30 12          	movb   $0x12,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019594:	fc                   	cld
ffffffff80019595:	e8 f6 25 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001959a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001959e:	58                   	pop    %rax
ffffffff8001959f:	5a                   	pop    %rdx
ffffffff800195a0:	59                   	pop    %rcx
ffffffff800195a1:	5e                   	pop    %rsi
ffffffff800195a2:	5f                   	pop    %rdi
ffffffff800195a3:	41 58                	pop    %r8
ffffffff800195a5:	41 59                	pop    %r9
ffffffff800195a7:	41 5a                	pop    %r10
ffffffff800195a9:	41 5b                	pop    %r11
ffffffff800195ab:	5d                   	pop    %rbp
ffffffff800195ac:	48 cf                	iretq
ffffffff800195ae:	66 90                	xchg   %ax,%ax

ffffffff800195b0 <_ZN3Hal16ExceptionHandlerILm19EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800195b0:	55                   	push   %rbp
ffffffff800195b1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800195b4:	41 53                	push   %r11
ffffffff800195b6:	41 52                	push   %r10
ffffffff800195b8:	41 51                	push   %r9
ffffffff800195ba:	41 50                	push   %r8
ffffffff800195bc:	57                   	push   %rdi
ffffffff800195bd:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff800195be:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800195c2:	51                   	push   %rcx
ffffffff800195c3:	52                   	push   %rdx
ffffffff800195c4:	50                   	push   %rax
ffffffff800195c5:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff800195c9:	48 8b 3d e8 4a 01 00 	mov    0x14ae8(%rip),%rdi        # ffffffff8002e0b8 <_ZN3Hal16ExceptionStringsE+0x98>
        frame->InterruptVector = i;
ffffffff800195d0:	c6 45 30 13          	movb   $0x13,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff800195d4:	fc                   	cld
ffffffff800195d5:	e8 b6 25 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff800195da:	48 83 c4 08          	add    $0x8,%rsp
ffffffff800195de:	58                   	pop    %rax
ffffffff800195df:	5a                   	pop    %rdx
ffffffff800195e0:	59                   	pop    %rcx
ffffffff800195e1:	5e                   	pop    %rsi
ffffffff800195e2:	5f                   	pop    %rdi
ffffffff800195e3:	41 58                	pop    %r8
ffffffff800195e5:	41 59                	pop    %r9
ffffffff800195e7:	41 5a                	pop    %r10
ffffffff800195e9:	41 5b                	pop    %r11
ffffffff800195eb:	5d                   	pop    %rbp
ffffffff800195ec:	48 cf                	iretq
ffffffff800195ee:	66 90                	xchg   %ax,%ax

ffffffff800195f0 <_ZN3Hal16ExceptionHandlerILm20EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800195f0:	55                   	push   %rbp
ffffffff800195f1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800195f4:	41 53                	push   %r11
ffffffff800195f6:	41 52                	push   %r10
ffffffff800195f8:	41 51                	push   %r9
ffffffff800195fa:	41 50                	push   %r8
ffffffff800195fc:	57                   	push   %rdi
ffffffff800195fd:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff800195fe:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019602:	51                   	push   %rcx
ffffffff80019603:	52                   	push   %rdx
ffffffff80019604:	50                   	push   %rax
ffffffff80019605:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019609:	48 8b 3d b0 4a 01 00 	mov    0x14ab0(%rip),%rdi        # ffffffff8002e0c0 <_ZN3Hal16ExceptionStringsE+0xa0>
        frame->InterruptVector = i;
ffffffff80019610:	c6 45 30 14          	movb   $0x14,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019614:	fc                   	cld
ffffffff80019615:	e8 76 25 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001961a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001961e:	58                   	pop    %rax
ffffffff8001961f:	5a                   	pop    %rdx
ffffffff80019620:	59                   	pop    %rcx
ffffffff80019621:	5e                   	pop    %rsi
ffffffff80019622:	5f                   	pop    %rdi
ffffffff80019623:	41 58                	pop    %r8
ffffffff80019625:	41 59                	pop    %r9
ffffffff80019627:	41 5a                	pop    %r10
ffffffff80019629:	41 5b                	pop    %r11
ffffffff8001962b:	5d                   	pop    %rbp
ffffffff8001962c:	48 cf                	iretq
ffffffff8001962e:	66 90                	xchg   %ax,%ax

ffffffff80019630 <_ZN3Hal16ExceptionHandlerILm21EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019630:	55                   	push   %rbp
ffffffff80019631:	48 89 e5             	mov    %rsp,%rbp
ffffffff80019634:	41 53                	push   %r11
ffffffff80019636:	41 52                	push   %r10
ffffffff80019638:	41 51                	push   %r9
ffffffff8001963a:	41 50                	push   %r8
ffffffff8001963c:	57                   	push   %rdi
ffffffff8001963d:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff8001963e:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019642:	51                   	push   %rcx
ffffffff80019643:	52                   	push   %rdx
ffffffff80019644:	50                   	push   %rax
ffffffff80019645:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019649:	48 8b 3d 78 4a 01 00 	mov    0x14a78(%rip),%rdi        # ffffffff8002e0c8 <_ZN3Hal16ExceptionStringsE+0xa8>
        frame->InterruptVector = i;
ffffffff80019650:	c6 45 30 15          	movb   $0x15,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019654:	fc                   	cld
ffffffff80019655:	e8 36 25 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001965a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001965e:	58                   	pop    %rax
ffffffff8001965f:	5a                   	pop    %rdx
ffffffff80019660:	59                   	pop    %rcx
ffffffff80019661:	5e                   	pop    %rsi
ffffffff80019662:	5f                   	pop    %rdi
ffffffff80019663:	41 58                	pop    %r8
ffffffff80019665:	41 59                	pop    %r9
ffffffff80019667:	41 5a                	pop    %r10
ffffffff80019669:	41 5b                	pop    %r11
ffffffff8001966b:	5d                   	pop    %rbp
ffffffff8001966c:	48 cf                	iretq
ffffffff8001966e:	66 90                	xchg   %ax,%ax

ffffffff80019670 <_ZN3Hal16ExceptionHandlerILm22EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019670:	55                   	push   %rbp
ffffffff80019671:	48 89 e5             	mov    %rsp,%rbp
ffffffff80019674:	41 53                	push   %r11
ffffffff80019676:	41 52                	push   %r10
ffffffff80019678:	41 51                	push   %r9
ffffffff8001967a:	41 50                	push   %r8
ffffffff8001967c:	57                   	push   %rdi
ffffffff8001967d:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff8001967e:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019682:	51                   	push   %rcx
ffffffff80019683:	52                   	push   %rdx
ffffffff80019684:	50                   	push   %rax
ffffffff80019685:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019689:	48 8b 3d 40 4a 01 00 	mov    0x14a40(%rip),%rdi        # ffffffff8002e0d0 <_ZN3Hal16ExceptionStringsE+0xb0>
        frame->InterruptVector = i;
ffffffff80019690:	c6 45 30 16          	movb   $0x16,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019694:	fc                   	cld
ffffffff80019695:	e8 f6 24 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001969a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001969e:	58                   	pop    %rax
ffffffff8001969f:	5a                   	pop    %rdx
ffffffff800196a0:	59                   	pop    %rcx
ffffffff800196a1:	5e                   	pop    %rsi
ffffffff800196a2:	5f                   	pop    %rdi
ffffffff800196a3:	41 58                	pop    %r8
ffffffff800196a5:	41 59                	pop    %r9
ffffffff800196a7:	41 5a                	pop    %r10
ffffffff800196a9:	41 5b                	pop    %r11
ffffffff800196ab:	5d                   	pop    %rbp
ffffffff800196ac:	48 cf                	iretq
ffffffff800196ae:	66 90                	xchg   %ax,%ax

ffffffff800196b0 <_ZN3Hal16ExceptionHandlerILm23EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800196b0:	55                   	push   %rbp
ffffffff800196b1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800196b4:	41 53                	push   %r11
ffffffff800196b6:	41 52                	push   %r10
ffffffff800196b8:	41 51                	push   %r9
ffffffff800196ba:	41 50                	push   %r8
ffffffff800196bc:	57                   	push   %rdi
ffffffff800196bd:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff800196be:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800196c2:	51                   	push   %rcx
ffffffff800196c3:	52                   	push   %rdx
ffffffff800196c4:	50                   	push   %rax
ffffffff800196c5:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff800196c9:	48 8b 3d 08 4a 01 00 	mov    0x14a08(%rip),%rdi        # ffffffff8002e0d8 <_ZN3Hal16ExceptionStringsE+0xb8>
        frame->InterruptVector = i;
ffffffff800196d0:	c6 45 30 17          	movb   $0x17,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff800196d4:	fc                   	cld
ffffffff800196d5:	e8 b6 24 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff800196da:	48 83 c4 08          	add    $0x8,%rsp
ffffffff800196de:	58                   	pop    %rax
ffffffff800196df:	5a                   	pop    %rdx
ffffffff800196e0:	59                   	pop    %rcx
ffffffff800196e1:	5e                   	pop    %rsi
ffffffff800196e2:	5f                   	pop    %rdi
ffffffff800196e3:	41 58                	pop    %r8
ffffffff800196e5:	41 59                	pop    %r9
ffffffff800196e7:	41 5a                	pop    %r10
ffffffff800196e9:	41 5b                	pop    %r11
ffffffff800196eb:	5d                   	pop    %rbp
ffffffff800196ec:	48 cf                	iretq
ffffffff800196ee:	66 90                	xchg   %ax,%ax

ffffffff800196f0 <_ZN3Hal16ExceptionHandlerILm24EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800196f0:	55                   	push   %rbp
ffffffff800196f1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800196f4:	41 53                	push   %r11
ffffffff800196f6:	41 52                	push   %r10
ffffffff800196f8:	41 51                	push   %r9
ffffffff800196fa:	41 50                	push   %r8
ffffffff800196fc:	57                   	push   %rdi
ffffffff800196fd:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff800196fe:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019702:	51                   	push   %rcx
ffffffff80019703:	52                   	push   %rdx
ffffffff80019704:	50                   	push   %rax
ffffffff80019705:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019709:	48 8b 3d d0 49 01 00 	mov    0x149d0(%rip),%rdi        # ffffffff8002e0e0 <_ZN3Hal16ExceptionStringsE+0xc0>
        frame->InterruptVector = i;
ffffffff80019710:	c6 45 30 18          	movb   $0x18,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019714:	fc                   	cld
ffffffff80019715:	e8 76 24 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001971a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001971e:	58                   	pop    %rax
ffffffff8001971f:	5a                   	pop    %rdx
ffffffff80019720:	59                   	pop    %rcx
ffffffff80019721:	5e                   	pop    %rsi
ffffffff80019722:	5f                   	pop    %rdi
ffffffff80019723:	41 58                	pop    %r8
ffffffff80019725:	41 59                	pop    %r9
ffffffff80019727:	41 5a                	pop    %r10
ffffffff80019729:	41 5b                	pop    %r11
ffffffff8001972b:	5d                   	pop    %rbp
ffffffff8001972c:	48 cf                	iretq
ffffffff8001972e:	66 90                	xchg   %ax,%ax

ffffffff80019730 <_ZN3Hal16ExceptionHandlerILm25EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019730:	55                   	push   %rbp
ffffffff80019731:	48 89 e5             	mov    %rsp,%rbp
ffffffff80019734:	41 53                	push   %r11
ffffffff80019736:	41 52                	push   %r10
ffffffff80019738:	41 51                	push   %r9
ffffffff8001973a:	41 50                	push   %r8
ffffffff8001973c:	57                   	push   %rdi
ffffffff8001973d:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff8001973e:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019742:	51                   	push   %rcx
ffffffff80019743:	52                   	push   %rdx
ffffffff80019744:	50                   	push   %rax
ffffffff80019745:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019749:	48 8b 3d 98 49 01 00 	mov    0x14998(%rip),%rdi        # ffffffff8002e0e8 <_ZN3Hal16ExceptionStringsE+0xc8>
        frame->InterruptVector = i;
ffffffff80019750:	c6 45 30 19          	movb   $0x19,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019754:	fc                   	cld
ffffffff80019755:	e8 36 24 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001975a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001975e:	58                   	pop    %rax
ffffffff8001975f:	5a                   	pop    %rdx
ffffffff80019760:	59                   	pop    %rcx
ffffffff80019761:	5e                   	pop    %rsi
ffffffff80019762:	5f                   	pop    %rdi
ffffffff80019763:	41 58                	pop    %r8
ffffffff80019765:	41 59                	pop    %r9
ffffffff80019767:	41 5a                	pop    %r10
ffffffff80019769:	41 5b                	pop    %r11
ffffffff8001976b:	5d                   	pop    %rbp
ffffffff8001976c:	48 cf                	iretq
ffffffff8001976e:	66 90                	xchg   %ax,%ax

ffffffff80019770 <_ZN3Hal16ExceptionHandlerILm26EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019770:	55                   	push   %rbp
ffffffff80019771:	48 89 e5             	mov    %rsp,%rbp
ffffffff80019774:	41 53                	push   %r11
ffffffff80019776:	41 52                	push   %r10
ffffffff80019778:	41 51                	push   %r9
ffffffff8001977a:	41 50                	push   %r8
ffffffff8001977c:	57                   	push   %rdi
ffffffff8001977d:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff8001977e:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019782:	51                   	push   %rcx
ffffffff80019783:	52                   	push   %rdx
ffffffff80019784:	50                   	push   %rax
ffffffff80019785:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019789:	48 8b 3d 60 49 01 00 	mov    0x14960(%rip),%rdi        # ffffffff8002e0f0 <_ZN3Hal16ExceptionStringsE+0xd0>
        frame->InterruptVector = i;
ffffffff80019790:	c6 45 30 1a          	movb   $0x1a,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019794:	fc                   	cld
ffffffff80019795:	e8 f6 23 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001979a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001979e:	58                   	pop    %rax
ffffffff8001979f:	5a                   	pop    %rdx
ffffffff800197a0:	59                   	pop    %rcx
ffffffff800197a1:	5e                   	pop    %rsi
ffffffff800197a2:	5f                   	pop    %rdi
ffffffff800197a3:	41 58                	pop    %r8
ffffffff800197a5:	41 59                	pop    %r9
ffffffff800197a7:	41 5a                	pop    %r10
ffffffff800197a9:	41 5b                	pop    %r11
ffffffff800197ab:	5d                   	pop    %rbp
ffffffff800197ac:	48 cf                	iretq
ffffffff800197ae:	66 90                	xchg   %ax,%ax

ffffffff800197b0 <_ZN3Hal16ExceptionHandlerILm27EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800197b0:	55                   	push   %rbp
ffffffff800197b1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800197b4:	41 53                	push   %r11
ffffffff800197b6:	41 52                	push   %r10
ffffffff800197b8:	41 51                	push   %r9
ffffffff800197ba:	41 50                	push   %r8
ffffffff800197bc:	57                   	push   %rdi
ffffffff800197bd:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff800197be:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800197c2:	51                   	push   %rcx
ffffffff800197c3:	52                   	push   %rdx
ffffffff800197c4:	50                   	push   %rax
ffffffff800197c5:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff800197c9:	48 8b 3d 28 49 01 00 	mov    0x14928(%rip),%rdi        # ffffffff8002e0f8 <_ZN3Hal16ExceptionStringsE+0xd8>
        frame->InterruptVector = i;
ffffffff800197d0:	c6 45 30 1b          	movb   $0x1b,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff800197d4:	fc                   	cld
ffffffff800197d5:	e8 b6 23 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff800197da:	48 83 c4 08          	add    $0x8,%rsp
ffffffff800197de:	58                   	pop    %rax
ffffffff800197df:	5a                   	pop    %rdx
ffffffff800197e0:	59                   	pop    %rcx
ffffffff800197e1:	5e                   	pop    %rsi
ffffffff800197e2:	5f                   	pop    %rdi
ffffffff800197e3:	41 58                	pop    %r8
ffffffff800197e5:	41 59                	pop    %r9
ffffffff800197e7:	41 5a                	pop    %r10
ffffffff800197e9:	41 5b                	pop    %r11
ffffffff800197eb:	5d                   	pop    %rbp
ffffffff800197ec:	48 cf                	iretq
ffffffff800197ee:	66 90                	xchg   %ax,%ax

ffffffff800197f0 <_ZN3Hal16ExceptionHandlerILm28EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff800197f0:	55                   	push   %rbp
ffffffff800197f1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800197f4:	41 53                	push   %r11
ffffffff800197f6:	41 52                	push   %r10
ffffffff800197f8:	41 51                	push   %r9
ffffffff800197fa:	41 50                	push   %r8
ffffffff800197fc:	57                   	push   %rdi
ffffffff800197fd:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff800197fe:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019802:	51                   	push   %rcx
ffffffff80019803:	52                   	push   %rdx
ffffffff80019804:	50                   	push   %rax
ffffffff80019805:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019809:	48 8b 3d f0 48 01 00 	mov    0x148f0(%rip),%rdi        # ffffffff8002e100 <_ZN3Hal16ExceptionStringsE+0xe0>
        frame->InterruptVector = i;
ffffffff80019810:	c6 45 30 1c          	movb   $0x1c,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019814:	fc                   	cld
ffffffff80019815:	e8 76 23 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001981a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001981e:	58                   	pop    %rax
ffffffff8001981f:	5a                   	pop    %rdx
ffffffff80019820:	59                   	pop    %rcx
ffffffff80019821:	5e                   	pop    %rsi
ffffffff80019822:	5f                   	pop    %rdi
ffffffff80019823:	41 58                	pop    %r8
ffffffff80019825:	41 59                	pop    %r9
ffffffff80019827:	41 5a                	pop    %r10
ffffffff80019829:	41 5b                	pop    %r11
ffffffff8001982b:	5d                   	pop    %rbp
ffffffff8001982c:	48 cf                	iretq
ffffffff8001982e:	66 90                	xchg   %ax,%ax

ffffffff80019830 <_ZN3Hal16ExceptionHandlerILm29EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019830:	55                   	push   %rbp
ffffffff80019831:	48 89 e5             	mov    %rsp,%rbp
ffffffff80019834:	41 53                	push   %r11
ffffffff80019836:	41 52                	push   %r10
ffffffff80019838:	41 51                	push   %r9
ffffffff8001983a:	41 50                	push   %r8
ffffffff8001983c:	57                   	push   %rdi
ffffffff8001983d:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff8001983e:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019842:	51                   	push   %rcx
ffffffff80019843:	52                   	push   %rdx
ffffffff80019844:	50                   	push   %rax
ffffffff80019845:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019849:	48 8b 3d b8 48 01 00 	mov    0x148b8(%rip),%rdi        # ffffffff8002e108 <_ZN3Hal16ExceptionStringsE+0xe8>
        frame->InterruptVector = i;
ffffffff80019850:	c6 45 30 1d          	movb   $0x1d,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019854:	fc                   	cld
ffffffff80019855:	e8 36 23 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001985a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001985e:	58                   	pop    %rax
ffffffff8001985f:	5a                   	pop    %rdx
ffffffff80019860:	59                   	pop    %rcx
ffffffff80019861:	5e                   	pop    %rsi
ffffffff80019862:	5f                   	pop    %rdi
ffffffff80019863:	41 58                	pop    %r8
ffffffff80019865:	41 59                	pop    %r9
ffffffff80019867:	41 5a                	pop    %r10
ffffffff80019869:	41 5b                	pop    %r11
ffffffff8001986b:	5d                   	pop    %rbp
ffffffff8001986c:	48 cf                	iretq
ffffffff8001986e:	66 90                	xchg   %ax,%ax

ffffffff80019870 <_ZN3Hal16ExceptionHandlerILm30EEEvPN6System10PanicFrameE>:
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019870:	55                   	push   %rbp
ffffffff80019871:	48 89 e5             	mov    %rsp,%rbp
ffffffff80019874:	41 53                	push   %r11
ffffffff80019876:	41 52                	push   %r10
ffffffff80019878:	41 51                	push   %r9
ffffffff8001987a:	41 50                	push   %r8
ffffffff8001987c:	57                   	push   %rdi
ffffffff8001987d:	56                   	push   %rsi
        Panic(ExceptionStrings[i], frame);
ffffffff8001987e:	48 8d 75 08          	lea    0x8(%rbp),%rsi
    __attribute__((interrupt)) void ExceptionHandler(System::PanicFrame* frame)
ffffffff80019882:	51                   	push   %rcx
ffffffff80019883:	52                   	push   %rdx
ffffffff80019884:	50                   	push   %rax
ffffffff80019885:	48 83 ec 08          	sub    $0x8,%rsp
        Panic(ExceptionStrings[i], frame);
ffffffff80019889:	48 8b 3d 80 48 01 00 	mov    0x14880(%rip),%rdi        # ffffffff8002e110 <_ZN3Hal16ExceptionStringsE+0xf0>
        frame->InterruptVector = i;
ffffffff80019890:	c6 45 30 1e          	movb   $0x1e,0x30(%rbp)
        Panic(ExceptionStrings[i], frame);
ffffffff80019894:	fc                   	cld
ffffffff80019895:	e8 f6 22 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
    }
ffffffff8001989a:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001989e:	58                   	pop    %rax
ffffffff8001989f:	5a                   	pop    %rdx
ffffffff800198a0:	59                   	pop    %rcx
ffffffff800198a1:	5e                   	pop    %rsi
ffffffff800198a2:	5f                   	pop    %rdi
ffffffff800198a3:	41 58                	pop    %r8
ffffffff800198a5:	41 59                	pop    %r9
ffffffff800198a7:	41 5a                	pop    %r10
ffffffff800198a9:	41 5b                	pop    %r11
ffffffff800198ab:	5d                   	pop    %rbp
ffffffff800198ac:	48 cf                	iretq
ffffffff800198ae:	66 90                	xchg   %ax,%ax

ffffffff800198b0 <_ZN3Hal18IDTEncodeInterruptEmPvh>:

    void IDTEncodeInterrupt(size_t i, void* handler, uint8_t type_attr) {
        uint64_t offset = (uint64_t)handler;
        auto ptr = GetInterruptDescriptor(i);

        *ptr = InterruptDescriptor {
ffffffff800198b0:	b8 08 00 00 00       	mov    $0x8,%eax
        InterruptDescriptor* descriptor = (InterruptDescriptor*)(IDTR.Base + index * sizeof(InterruptDescriptor));
ffffffff800198b5:	48 c1 e7 04          	shl    $0x4,%rdi
ffffffff800198b9:	48 03 3d ca 2c 13 00 	add    0x132cca(%rip),%rdi        # ffffffff8014c58a <_ZN3Hal4IDTRE+0x2>
        *ptr = InterruptDescriptor {
ffffffff800198c0:	66 89 47 02          	mov    %ax,0x2(%rdi)

            .Selector = 0x08,
            .IST = 0x00,
            .TypeAttributes = type_attr,

            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff800198c4:	48 89 f0             	mov    %rsi,%rax
        *ptr = InterruptDescriptor {
ffffffff800198c7:	66 89 37             	mov    %si,(%rdi)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff800198ca:	48 c1 e8 10          	shr    $0x10,%rax
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff800198ce:	48 c1 ee 20          	shr    $0x20,%rsi
        *ptr = InterruptDescriptor {
ffffffff800198d2:	c6 47 04 00          	movb   $0x0,0x4(%rdi)
ffffffff800198d6:	88 57 05             	mov    %dl,0x5(%rdi)
ffffffff800198d9:	66 89 47 06          	mov    %ax,0x6(%rdi)
ffffffff800198dd:	89 77 08             	mov    %esi,0x8(%rdi)
ffffffff800198e0:	c7 47 0c 00 00 00 00 	movl   $0x0,0xc(%rdi)

            .Zero = 0x00
        };
    }
ffffffff800198e7:	c3                   	ret
ffffffff800198e8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff800198ef:	00 

ffffffff800198f0 <_ZN3Hal9IDTReloadEv>:
        asm("lidt %0" : : "m"(idtr));
ffffffff800198f0:	0f 01 1d 91 2c 13 00 	lidt   0x132c91(%rip)        # ffffffff8014c588 <_ZN3Hal4IDTRE>
        Kt::KernelLogStream(Kt::OK, "Hal") << "Loaded new IDT";
    }

    void IDTReload() {
        LoadIDT(IDTR);
    }
ffffffff800198f7:	c3                   	ret
ffffffff800198f8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff800198ff:	00 

ffffffff80019900 <_ZN3Hal10SetHandlerILi23ELi31EE3runEv>:
        InterruptDescriptor* descriptor = (InterruptDescriptor*)(IDTR.Base + index * sizeof(InterruptDescriptor));
ffffffff80019900:	48 8b 05 83 2c 13 00 	mov    0x132c83(%rip),%rax        # ffffffff8014c58a <_ZN3Hal4IDTRE+0x2>
        uint64_t offset = (uint64_t)handler;
ffffffff80019907:	48 c7 c2 b0 96 01 80 	mov    $0xffffffff800196b0,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff8001990e:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019911:	66 89 90 70 01 00 00 	mov    %dx,0x170(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019918:	48 c1 ea 20          	shr    $0x20,%rdx
        InterruptDescriptor* descriptor = (InterruptDescriptor*)(IDTR.Base + index * sizeof(InterruptDescriptor));
ffffffff8001991c:	48 89 c1             	mov    %rax,%rcx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff8001991f:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019923:	89 90 78 01 00 00    	mov    %edx,0x178(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff80019929:	48 c7 c2 f0 96 01 80 	mov    $0xffffffff800196f0,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019930:	66 89 b0 76 01 00 00 	mov    %si,0x176(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019937:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff8001993a:	66 89 90 80 01 00 00 	mov    %dx,0x180(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019941:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019945:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019949:	89 90 88 01 00 00    	mov    %edx,0x188(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff8001994f:	48 c7 c2 30 97 01 80 	mov    $0xffffffff80019730,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019956:	66 89 b0 86 01 00 00 	mov    %si,0x186(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff8001995d:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019960:	66 89 90 90 01 00 00 	mov    %dx,0x190(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019967:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff8001996b:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff8001996f:	89 90 98 01 00 00    	mov    %edx,0x198(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff80019975:	48 c7 c2 70 97 01 80 	mov    $0xffffffff80019770,%rdx
        *ptr = InterruptDescriptor {
ffffffff8001997c:	66 89 b0 96 01 00 00 	mov    %si,0x196(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019983:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019986:	66 89 90 a0 01 00 00 	mov    %dx,0x1a0(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff8001998d:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019991:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019995:	89 90 a8 01 00 00    	mov    %edx,0x1a8(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff8001999b:	48 c7 c2 b0 97 01 80 	mov    $0xffffffff800197b0,%rdx
        *ptr = InterruptDescriptor {
ffffffff800199a2:	66 89 b0 a6 01 00 00 	mov    %si,0x1a6(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff800199a9:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff800199ac:	66 89 90 b0 01 00 00 	mov    %dx,0x1b0(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff800199b3:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff800199b7:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff800199bb:	89 90 b8 01 00 00    	mov    %edx,0x1b8(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff800199c1:	48 c7 c2 f0 97 01 80 	mov    $0xffffffff800197f0,%rdx
        *ptr = InterruptDescriptor {
ffffffff800199c8:	66 89 b0 b6 01 00 00 	mov    %si,0x1b6(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff800199cf:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff800199d2:	66 89 90 c0 01 00 00 	mov    %dx,0x1c0(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff800199d9:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff800199dd:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff800199e1:	89 90 c8 01 00 00    	mov    %edx,0x1c8(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff800199e7:	48 c7 c2 30 98 01 80 	mov    $0xffffffff80019830,%rdx
        *ptr = InterruptDescriptor {
ffffffff800199ee:	66 89 b0 c6 01 00 00 	mov    %si,0x1c6(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff800199f5:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff800199f8:	66 89 90 d0 01 00 00 	mov    %dx,0x1d0(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff800199ff:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019a03:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019a07:	c7 80 72 01 00 00 08 	movl   $0x8f000008,0x172(%rax)
ffffffff80019a0e:	00 00 8f 
ffffffff80019a11:	c7 80 7c 01 00 00 00 	movl   $0x0,0x17c(%rax)
ffffffff80019a18:	00 00 00 
ffffffff80019a1b:	c7 80 82 01 00 00 08 	movl   $0x8f000008,0x182(%rax)
ffffffff80019a22:	00 00 8f 
ffffffff80019a25:	c7 80 8c 01 00 00 00 	movl   $0x0,0x18c(%rax)
ffffffff80019a2c:	00 00 00 
ffffffff80019a2f:	c7 80 92 01 00 00 08 	movl   $0x8f000008,0x192(%rax)
ffffffff80019a36:	00 00 8f 
ffffffff80019a39:	c7 80 9c 01 00 00 00 	movl   $0x0,0x19c(%rax)
ffffffff80019a40:	00 00 00 
ffffffff80019a43:	c7 80 a2 01 00 00 08 	movl   $0x8f000008,0x1a2(%rax)
ffffffff80019a4a:	00 00 8f 
ffffffff80019a4d:	c7 80 ac 01 00 00 00 	movl   $0x0,0x1ac(%rax)
ffffffff80019a54:	00 00 00 
ffffffff80019a57:	c7 80 b2 01 00 00 08 	movl   $0x8f000008,0x1b2(%rax)
ffffffff80019a5e:	00 00 8f 
ffffffff80019a61:	c7 80 bc 01 00 00 00 	movl   $0x0,0x1bc(%rax)
ffffffff80019a68:	00 00 00 
ffffffff80019a6b:	c7 80 c2 01 00 00 08 	movl   $0x8f000008,0x1c2(%rax)
ffffffff80019a72:	00 00 8f 
ffffffff80019a75:	c7 80 cc 01 00 00 00 	movl   $0x0,0x1cc(%rax)
ffffffff80019a7c:	00 00 00 
ffffffff80019a7f:	c7 80 d2 01 00 00 08 	movl   $0x8f000008,0x1d2(%rax)
ffffffff80019a86:	00 00 8f 
ffffffff80019a89:	89 90 d8 01 00 00    	mov    %edx,0x1d8(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff80019a8f:	48 c7 c2 70 98 01 80 	mov    $0xffffffff80019870,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019a96:	66 89 90 e0 01 00 00 	mov    %dx,0x1e0(%rax)
ffffffff80019a9d:	66 89 b0 d6 01 00 00 	mov    %si,0x1d6(%rax)
ffffffff80019aa4:	c7 80 dc 01 00 00 00 	movl   $0x0,0x1dc(%rax)
ffffffff80019aab:	00 00 00 
ffffffff80019aae:	c7 80 e2 01 00 00 08 	movl   $0x8f000008,0x1e2(%rax)
ffffffff80019ab5:	00 00 8f 
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019ab8:	48 89 d0             	mov    %rdx,%rax
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019abb:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019abf:	48 c1 e8 10          	shr    $0x10,%rax
        *ptr = InterruptDescriptor {
ffffffff80019ac3:	89 91 e8 01 00 00    	mov    %edx,0x1e8(%rcx)
ffffffff80019ac9:	66 89 81 e6 01 00 00 	mov    %ax,0x1e6(%rcx)
ffffffff80019ad0:	c7 81 ec 01 00 00 00 	movl   $0x0,0x1ec(%rcx)
ffffffff80019ad7:	00 00 00 
        }
ffffffff80019ada:	c3                   	ret
ffffffff80019adb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80019ae0 <_ZN3Hal10SetHandlerILi15ELi31EE3runEv>:
        InterruptDescriptor* descriptor = (InterruptDescriptor*)(IDTR.Base + index * sizeof(InterruptDescriptor));
ffffffff80019ae0:	48 8b 05 a3 2a 13 00 	mov    0x132aa3(%rip),%rax        # ffffffff8014c58a <_ZN3Hal4IDTRE+0x2>
        uint64_t offset = (uint64_t)handler;
ffffffff80019ae7:	48 c7 c2 b0 94 01 80 	mov    $0xffffffff800194b0,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019aee:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019af1:	66 89 90 f0 00 00 00 	mov    %dx,0xf0(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019af8:	48 c1 ea 20          	shr    $0x20,%rdx
        InterruptDescriptor* descriptor = (InterruptDescriptor*)(IDTR.Base + index * sizeof(InterruptDescriptor));
ffffffff80019afc:	48 89 c1             	mov    %rax,%rcx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019aff:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019b03:	89 90 f8 00 00 00    	mov    %edx,0xf8(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff80019b09:	48 c7 c2 f0 94 01 80 	mov    $0xffffffff800194f0,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019b10:	66 89 b0 f6 00 00 00 	mov    %si,0xf6(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019b17:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019b1a:	66 89 90 00 01 00 00 	mov    %dx,0x100(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019b21:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019b25:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019b29:	89 90 08 01 00 00    	mov    %edx,0x108(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff80019b2f:	48 c7 c2 30 95 01 80 	mov    $0xffffffff80019530,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019b36:	66 89 b0 06 01 00 00 	mov    %si,0x106(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019b3d:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019b40:	66 89 90 10 01 00 00 	mov    %dx,0x110(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019b47:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019b4b:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019b4f:	89 90 18 01 00 00    	mov    %edx,0x118(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff80019b55:	48 c7 c2 70 95 01 80 	mov    $0xffffffff80019570,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019b5c:	66 89 b0 16 01 00 00 	mov    %si,0x116(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019b63:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019b66:	66 89 90 20 01 00 00 	mov    %dx,0x120(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019b6d:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019b71:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019b75:	89 90 28 01 00 00    	mov    %edx,0x128(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff80019b7b:	48 c7 c2 b0 95 01 80 	mov    $0xffffffff800195b0,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019b82:	66 89 b0 26 01 00 00 	mov    %si,0x126(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019b89:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019b8c:	66 89 90 30 01 00 00 	mov    %dx,0x130(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019b93:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019b97:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019b9b:	89 90 38 01 00 00    	mov    %edx,0x138(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff80019ba1:	48 c7 c2 f0 95 01 80 	mov    $0xffffffff800195f0,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019ba8:	66 89 b0 36 01 00 00 	mov    %si,0x136(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019baf:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019bb2:	66 89 90 40 01 00 00 	mov    %dx,0x140(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019bb9:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019bbd:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019bc1:	89 90 48 01 00 00    	mov    %edx,0x148(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff80019bc7:	48 c7 c2 30 96 01 80 	mov    $0xffffffff80019630,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019bce:	66 89 b0 46 01 00 00 	mov    %si,0x146(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019bd5:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019bd8:	66 89 90 50 01 00 00 	mov    %dx,0x150(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019bdf:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019be3:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019be7:	c7 80 f2 00 00 00 08 	movl   $0x8f000008,0xf2(%rax)
ffffffff80019bee:	00 00 8f 
ffffffff80019bf1:	c7 80 fc 00 00 00 00 	movl   $0x0,0xfc(%rax)
ffffffff80019bf8:	00 00 00 
ffffffff80019bfb:	c7 80 02 01 00 00 08 	movl   $0x8f000008,0x102(%rax)
ffffffff80019c02:	00 00 8f 
ffffffff80019c05:	c7 80 0c 01 00 00 00 	movl   $0x0,0x10c(%rax)
ffffffff80019c0c:	00 00 00 
ffffffff80019c0f:	c7 80 12 01 00 00 08 	movl   $0x8f000008,0x112(%rax)
ffffffff80019c16:	00 00 8f 
ffffffff80019c19:	c7 80 1c 01 00 00 00 	movl   $0x0,0x11c(%rax)
ffffffff80019c20:	00 00 00 
ffffffff80019c23:	c7 80 22 01 00 00 08 	movl   $0x8f000008,0x122(%rax)
ffffffff80019c2a:	00 00 8f 
ffffffff80019c2d:	c7 80 2c 01 00 00 00 	movl   $0x0,0x12c(%rax)
ffffffff80019c34:	00 00 00 
ffffffff80019c37:	c7 80 32 01 00 00 08 	movl   $0x8f000008,0x132(%rax)
ffffffff80019c3e:	00 00 8f 
ffffffff80019c41:	c7 80 3c 01 00 00 00 	movl   $0x0,0x13c(%rax)
ffffffff80019c48:	00 00 00 
ffffffff80019c4b:	c7 80 42 01 00 00 08 	movl   $0x8f000008,0x142(%rax)
ffffffff80019c52:	00 00 8f 
ffffffff80019c55:	c7 80 4c 01 00 00 00 	movl   $0x0,0x14c(%rax)
ffffffff80019c5c:	00 00 00 
ffffffff80019c5f:	c7 80 52 01 00 00 08 	movl   $0x8f000008,0x152(%rax)
ffffffff80019c66:	00 00 8f 
ffffffff80019c69:	89 90 58 01 00 00    	mov    %edx,0x158(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff80019c6f:	48 c7 c2 70 96 01 80 	mov    $0xffffffff80019670,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019c76:	66 89 90 60 01 00 00 	mov    %dx,0x160(%rax)
ffffffff80019c7d:	66 89 b0 56 01 00 00 	mov    %si,0x156(%rax)
ffffffff80019c84:	c7 80 5c 01 00 00 00 	movl   $0x0,0x15c(%rax)
ffffffff80019c8b:	00 00 00 
ffffffff80019c8e:	c7 80 62 01 00 00 08 	movl   $0x8f000008,0x162(%rax)
ffffffff80019c95:	00 00 8f 
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019c98:	48 89 d0             	mov    %rdx,%rax
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019c9b:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019c9f:	48 c1 e8 10          	shr    $0x10,%rax
        *ptr = InterruptDescriptor {
ffffffff80019ca3:	89 91 68 01 00 00    	mov    %edx,0x168(%rcx)
ffffffff80019ca9:	66 89 81 66 01 00 00 	mov    %ax,0x166(%rcx)
ffffffff80019cb0:	c7 81 6c 01 00 00 00 	movl   $0x0,0x16c(%rcx)
ffffffff80019cb7:	00 00 00 
            SetHandler<I+1,N>::run();
ffffffff80019cba:	e9 41 fc ff ff       	jmp    ffffffff80019900 <_ZN3Hal10SetHandlerILi23ELi31EE3runEv>
ffffffff80019cbf:	90                   	nop

ffffffff80019cc0 <_ZN3Hal10SetHandlerILi7ELi31EE3runEv>:
        InterruptDescriptor* descriptor = (InterruptDescriptor*)(IDTR.Base + index * sizeof(InterruptDescriptor));
ffffffff80019cc0:	48 8b 05 c3 28 13 00 	mov    0x1328c3(%rip),%rax        # ffffffff8014c58a <_ZN3Hal4IDTRE+0x2>
        uint64_t offset = (uint64_t)handler;
ffffffff80019cc7:	48 c7 c2 b0 92 01 80 	mov    $0xffffffff800192b0,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019cce:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019cd1:	66 89 50 70          	mov    %dx,0x70(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019cd5:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019cd9:	48 c1 ee 10          	shr    $0x10,%rsi
        InterruptDescriptor* descriptor = (InterruptDescriptor*)(IDTR.Base + index * sizeof(InterruptDescriptor));
ffffffff80019cdd:	48 89 c1             	mov    %rax,%rcx
        *ptr = InterruptDescriptor {
ffffffff80019ce0:	89 50 78             	mov    %edx,0x78(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff80019ce3:	48 c7 c2 f0 92 01 80 	mov    $0xffffffff800192f0,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019cea:	66 89 70 76          	mov    %si,0x76(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019cee:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019cf1:	66 89 90 80 00 00 00 	mov    %dx,0x80(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019cf8:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019cfc:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019d00:	89 90 88 00 00 00    	mov    %edx,0x88(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff80019d06:	48 c7 c2 30 93 01 80 	mov    $0xffffffff80019330,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019d0d:	66 89 b0 86 00 00 00 	mov    %si,0x86(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019d14:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019d17:	66 89 90 90 00 00 00 	mov    %dx,0x90(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019d1e:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019d22:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019d26:	89 90 98 00 00 00    	mov    %edx,0x98(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff80019d2c:	48 c7 c2 70 93 01 80 	mov    $0xffffffff80019370,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019d33:	66 89 b0 96 00 00 00 	mov    %si,0x96(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019d3a:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019d3d:	66 89 90 a0 00 00 00 	mov    %dx,0xa0(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019d44:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019d48:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019d4c:	89 90 a8 00 00 00    	mov    %edx,0xa8(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff80019d52:	48 c7 c2 b0 93 01 80 	mov    $0xffffffff800193b0,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019d59:	66 89 b0 a6 00 00 00 	mov    %si,0xa6(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019d60:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019d63:	66 89 90 b0 00 00 00 	mov    %dx,0xb0(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019d6a:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019d6e:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019d72:	89 90 b8 00 00 00    	mov    %edx,0xb8(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff80019d78:	48 c7 c2 f0 93 01 80 	mov    $0xffffffff800193f0,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019d7f:	66 89 b0 b6 00 00 00 	mov    %si,0xb6(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019d86:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019d89:	66 89 90 c0 00 00 00 	mov    %dx,0xc0(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019d90:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019d94:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019d98:	89 90 c8 00 00 00    	mov    %edx,0xc8(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff80019d9e:	48 c7 c2 30 94 01 80 	mov    $0xffffffff80019430,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019da5:	66 89 b0 c6 00 00 00 	mov    %si,0xc6(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019dac:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019daf:	66 89 90 d0 00 00 00 	mov    %dx,0xd0(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019db6:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019dba:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff80019dbe:	c7 40 72 08 00 00 8f 	movl   $0x8f000008,0x72(%rax)
ffffffff80019dc5:	c7 40 7c 00 00 00 00 	movl   $0x0,0x7c(%rax)
ffffffff80019dcc:	c7 80 82 00 00 00 08 	movl   $0x8f000008,0x82(%rax)
ffffffff80019dd3:	00 00 8f 
ffffffff80019dd6:	c7 80 8c 00 00 00 00 	movl   $0x0,0x8c(%rax)
ffffffff80019ddd:	00 00 00 
ffffffff80019de0:	c7 80 92 00 00 00 08 	movl   $0x8f000008,0x92(%rax)
ffffffff80019de7:	00 00 8f 
ffffffff80019dea:	c7 80 9c 00 00 00 00 	movl   $0x0,0x9c(%rax)
ffffffff80019df1:	00 00 00 
ffffffff80019df4:	c7 80 a2 00 00 00 08 	movl   $0x8f000008,0xa2(%rax)
ffffffff80019dfb:	00 00 8f 
ffffffff80019dfe:	c7 80 ac 00 00 00 00 	movl   $0x0,0xac(%rax)
ffffffff80019e05:	00 00 00 
ffffffff80019e08:	c7 80 b2 00 00 00 08 	movl   $0x8f000008,0xb2(%rax)
ffffffff80019e0f:	00 00 8f 
ffffffff80019e12:	c7 80 bc 00 00 00 00 	movl   $0x0,0xbc(%rax)
ffffffff80019e19:	00 00 00 
ffffffff80019e1c:	c7 80 c2 00 00 00 08 	movl   $0x8f000008,0xc2(%rax)
ffffffff80019e23:	00 00 8f 
ffffffff80019e26:	c7 80 cc 00 00 00 00 	movl   $0x0,0xcc(%rax)
ffffffff80019e2d:	00 00 00 
ffffffff80019e30:	c7 80 d2 00 00 00 08 	movl   $0x8f000008,0xd2(%rax)
ffffffff80019e37:	00 00 8f 
ffffffff80019e3a:	89 90 d8 00 00 00    	mov    %edx,0xd8(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff80019e40:	48 c7 c2 70 94 01 80 	mov    $0xffffffff80019470,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019e47:	66 89 90 e0 00 00 00 	mov    %dx,0xe0(%rax)
ffffffff80019e4e:	66 89 b0 d6 00 00 00 	mov    %si,0xd6(%rax)
ffffffff80019e55:	c7 80 dc 00 00 00 00 	movl   $0x0,0xdc(%rax)
ffffffff80019e5c:	00 00 00 
ffffffff80019e5f:	c7 80 e2 00 00 00 08 	movl   $0x8f000008,0xe2(%rax)
ffffffff80019e66:	00 00 8f 
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019e69:	48 89 d0             	mov    %rdx,%rax
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019e6c:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019e70:	48 c1 e8 10          	shr    $0x10,%rax
        *ptr = InterruptDescriptor {
ffffffff80019e74:	89 91 e8 00 00 00    	mov    %edx,0xe8(%rcx)
ffffffff80019e7a:	66 89 81 e6 00 00 00 	mov    %ax,0xe6(%rcx)
ffffffff80019e81:	c7 81 ec 00 00 00 00 	movl   $0x0,0xec(%rcx)
ffffffff80019e88:	00 00 00 
            SetHandler<I+1,N>::run();
ffffffff80019e8b:	e9 50 fc ff ff       	jmp    ffffffff80019ae0 <_ZN3Hal10SetHandlerILi15ELi31EE3runEv>

ffffffff80019e90 <_ZN3Hal13IDTInitializeEv>:
    void IDTInitialize() {
ffffffff80019e90:	55                   	push   %rbp
        IDT = (InterruptDescriptor*)Memory::g_pfa->Allocate();
ffffffff80019e91:	48 8b 3d 18 2b 13 00 	mov    0x132b18(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
    void IDTInitialize() {
ffffffff80019e98:	48 89 e5             	mov    %rsp,%rbp
        IDT = (InterruptDescriptor*)Memory::g_pfa->Allocate();
ffffffff80019e9b:	e8 a0 12 00 00       	call   ffffffff8001b140 <_ZN6Memory18PageFrameAllocator8AllocateEv>
            Print(string);
ffffffff80019ea0:	48 c7 c7 ba b8 02 80 	mov    $0xffffffff8002b8ba,%rdi
            g_kernelLogDepth++;
ffffffff80019ea7:	83 05 f6 55 1c 00 01 	addl   $0x1,0x1c55f6(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80019eae:	48 89 05 e3 26 13 00 	mov    %rax,0x1326e3(%rip)        # ffffffff8014c598 <_ZN3Hal3IDTE>
            Print(string);
ffffffff80019eb5:	e8 06 93 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80019eba:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80019ec1:	e8 fa 92 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80019ec6:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80019ecd:	e8 ee 92 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80019ed2:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff80019ed9:	e8 e2 92 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80019ede:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80019ee5:	e8 d6 92 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80019eea:	48 c7 c7 7c b8 02 80 	mov    $0xffffffff8002b87c,%rdi
ffffffff80019ef1:	e8 ca 92 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80019ef6:	48 8b 3d 9b 26 13 00 	mov    0x13269b(%rip),%rdi        # ffffffff8014c598 <_ZN3Hal3IDTE>
ffffffff80019efd:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80019f02:	e8 89 05 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80019f07:	48 89 c7             	mov    %rax,%rdi
ffffffff80019f0a:	e8 b1 92 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80019f0f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80019f16:	e8 a5 92 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        IDTR.Limit = (256 * sizeof(InterruptDescriptor)) - 1;
ffffffff80019f1b:	b8 ff 0f 00 00       	mov    $0xfff,%eax
ffffffff80019f20:	48 c7 c7 ba b8 02 80 	mov    $0xffffffff8002b8ba,%rdi
ffffffff80019f27:	66 89 05 5a 26 13 00 	mov    %ax,0x13265a(%rip)        # ffffffff8014c588 <_ZN3Hal4IDTRE>
        IDTR.Base = (uint64_t)IDT;
ffffffff80019f2e:	48 8b 05 63 26 13 00 	mov    0x132663(%rip),%rax        # ffffffff8014c598 <_ZN3Hal3IDTE>
ffffffff80019f35:	48 89 05 4e 26 13 00 	mov    %rax,0x13264e(%rip)        # ffffffff8014c58a <_ZN3Hal4IDTRE+0x2>
ffffffff80019f3c:	e8 7f 92 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80019f41:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80019f48:	e8 73 92 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80019f4d:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80019f54:	e8 67 92 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80019f59:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff80019f60:	e8 5b 92 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80019f65:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80019f6c:	e8 4f 92 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80019f71:	48 c7 c7 8e b8 02 80 	mov    $0xffffffff8002b88e,%rdi
ffffffff80019f78:	e8 43 92 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80019f7d:	48 8b 3d 06 26 13 00 	mov    0x132606(%rip),%rdi        # ffffffff8014c58a <_ZN3Hal4IDTRE+0x2>
ffffffff80019f84:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80019f89:	e8 02 05 00 00       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80019f8e:	48 89 c7             	mov    %rax,%rdi
ffffffff80019f91:	e8 2a 92 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80019f96:	48 c7 c7 a0 b8 02 80 	mov    $0xffffffff8002b8a0,%rdi
ffffffff80019f9d:	e8 1e 92 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            localStream << item;
ffffffff80019fa2:	0f b7 3d df 25 13 00 	movzwl 0x1325df(%rip),%edi        # ffffffff8014c588 <_ZN3Hal4IDTRE>
            Print(Lib::int2basestr(number, t.streamBaseType));
ffffffff80019fa9:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80019fae:	e8 cd 03 00 00       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
ffffffff80019fb3:	48 89 c7             	mov    %rax,%rdi
ffffffff80019fb6:	e8 05 92 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80019fbb:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80019fc2:	e8 f9 91 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        InterruptDescriptor* descriptor = (InterruptDescriptor*)(IDTR.Base + index * sizeof(InterruptDescriptor));
ffffffff80019fc7:	48 8b 05 bc 25 13 00 	mov    0x1325bc(%rip),%rax        # ffffffff8014c58a <_ZN3Hal4IDTRE+0x2>
        uint64_t offset = (uint64_t)handler;
ffffffff80019fce:	48 c7 c2 f0 90 01 80 	mov    $0xffffffff800190f0,%rdx
            g_kernelLogDepth--;
ffffffff80019fd5:	83 2d c8 54 1c 00 01 	subl   $0x1,0x1c54c8(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019fdc:	48 89 d1             	mov    %rdx,%rcx
        *ptr = InterruptDescriptor {
ffffffff80019fdf:	66 89 10             	mov    %dx,(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019fe2:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019fe6:	48 c1 e9 10          	shr    $0x10,%rcx
        *ptr = InterruptDescriptor {
ffffffff80019fea:	89 50 08             	mov    %edx,0x8(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff80019fed:	48 c7 c2 30 91 01 80 	mov    $0xffffffff80019130,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019ff4:	66 89 50 10          	mov    %dx,0x10(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff80019ff8:	48 89 d6             	mov    %rdx,%rsi
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff80019ffb:	48 c1 ea 20          	shr    $0x20,%rdx
        *ptr = InterruptDescriptor {
ffffffff80019fff:	89 50 18             	mov    %edx,0x18(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff8001a002:	48 c1 ee 10          	shr    $0x10,%rsi
        uint64_t offset = (uint64_t)handler;
ffffffff8001a006:	48 c7 c2 70 91 01 80 	mov    $0xffffffff80019170,%rdx
        *ptr = InterruptDescriptor {
ffffffff8001a00d:	66 89 70 16          	mov    %si,0x16(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff8001a011:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff8001a014:	66 89 50 20          	mov    %dx,0x20(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff8001a018:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff8001a01c:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff8001a020:	89 50 28             	mov    %edx,0x28(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff8001a023:	48 c7 c2 b0 91 01 80 	mov    $0xffffffff800191b0,%rdx
        *ptr = InterruptDescriptor {
ffffffff8001a02a:	66 89 70 26          	mov    %si,0x26(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff8001a02e:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff8001a031:	66 89 50 30          	mov    %dx,0x30(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff8001a035:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff8001a039:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff8001a03d:	89 50 38             	mov    %edx,0x38(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff8001a040:	48 c7 c2 f0 91 01 80 	mov    $0xffffffff800191f0,%rdx
        *ptr = InterruptDescriptor {
ffffffff8001a047:	66 89 70 36          	mov    %si,0x36(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff8001a04b:	48 89 d6             	mov    %rdx,%rsi
ffffffff8001a04e:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff8001a052:	66 89 50 40          	mov    %dx,0x40(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff8001a056:	48 c1 ea 20          	shr    $0x20,%rdx
        *ptr = InterruptDescriptor {
ffffffff8001a05a:	89 50 48             	mov    %edx,0x48(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff8001a05d:	48 c7 c2 30 92 01 80 	mov    $0xffffffff80019230,%rdx
        *ptr = InterruptDescriptor {
ffffffff8001a064:	66 89 70 46          	mov    %si,0x46(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff8001a068:	48 89 d6             	mov    %rdx,%rsi
        *ptr = InterruptDescriptor {
ffffffff8001a06b:	66 89 50 50          	mov    %dx,0x50(%rax)
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff8001a06f:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff8001a073:	48 c1 ee 10          	shr    $0x10,%rsi
        *ptr = InterruptDescriptor {
ffffffff8001a077:	89 50 58             	mov    %edx,0x58(%rax)
        uint64_t offset = (uint64_t)handler;
ffffffff8001a07a:	48 c7 c2 70 92 01 80 	mov    $0xffffffff80019270,%rdx
        *ptr = InterruptDescriptor {
ffffffff8001a081:	66 89 70 56          	mov    %si,0x56(%rax)
ffffffff8001a085:	66 89 48 06          	mov    %cx,0x6(%rax)
        InterruptDescriptor* descriptor = (InterruptDescriptor*)(IDTR.Base + index * sizeof(InterruptDescriptor));
ffffffff8001a089:	48 89 c1             	mov    %rax,%rcx
        *ptr = InterruptDescriptor {
ffffffff8001a08c:	c7 40 02 08 00 00 8f 	movl   $0x8f000008,0x2(%rax)
ffffffff8001a093:	c7 40 0c 00 00 00 00 	movl   $0x0,0xc(%rax)
ffffffff8001a09a:	c7 40 12 08 00 00 8f 	movl   $0x8f000008,0x12(%rax)
ffffffff8001a0a1:	c7 40 1c 00 00 00 00 	movl   $0x0,0x1c(%rax)
ffffffff8001a0a8:	c7 40 22 08 00 00 8f 	movl   $0x8f000008,0x22(%rax)
ffffffff8001a0af:	c7 40 2c 00 00 00 00 	movl   $0x0,0x2c(%rax)
ffffffff8001a0b6:	c7 40 32 08 00 00 8f 	movl   $0x8f000008,0x32(%rax)
ffffffff8001a0bd:	c7 40 3c 00 00 00 00 	movl   $0x0,0x3c(%rax)
ffffffff8001a0c4:	c7 40 42 08 00 00 8f 	movl   $0x8f000008,0x42(%rax)
ffffffff8001a0cb:	c7 40 4c 00 00 00 00 	movl   $0x0,0x4c(%rax)
ffffffff8001a0d2:	c7 40 52 08 00 00 8f 	movl   $0x8f000008,0x52(%rax)
ffffffff8001a0d9:	c7 40 5c 00 00 00 00 	movl   $0x0,0x5c(%rax)
ffffffff8001a0e0:	66 89 50 60          	mov    %dx,0x60(%rax)
ffffffff8001a0e4:	c7 40 62 08 00 00 8f 	movl   $0x8f000008,0x62(%rax)
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff8001a0eb:	48 89 d0             	mov    %rdx,%rax
            .Offset3 = (uint32_t)((offset & 0xffffffff00000000) >> 32),
ffffffff8001a0ee:	48 c1 ea 20          	shr    $0x20,%rdx
            .Offset2 = (uint16_t)((offset & 0x00000000ffff0000) >> 16),
ffffffff8001a0f2:	48 c1 e8 10          	shr    $0x10,%rax
        *ptr = InterruptDescriptor {
ffffffff8001a0f6:	89 51 68             	mov    %edx,0x68(%rcx)
ffffffff8001a0f9:	66 89 41 66          	mov    %ax,0x66(%rcx)
ffffffff8001a0fd:	c7 41 6c 00 00 00 00 	movl   $0x0,0x6c(%rcx)
            SetHandler<I+1,N>::run();
ffffffff8001a104:	e8 b7 fb ff ff       	call   ffffffff80019cc0 <_ZN3Hal10SetHandlerILi7ELi31EE3runEv>
            Print(string);
ffffffff8001a109:	48 c7 c7 68 b8 02 80 	mov    $0xffffffff8002b868,%rdi
            g_kernelLogDepth++;
ffffffff8001a110:	83 05 8d 53 1c 00 01 	addl   $0x1,0x1c538d(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001a117:	e8 a4 90 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a11c:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001a123:	e8 98 90 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a128:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001a12f:	e8 8c 90 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a134:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001a13b:	e8 80 90 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a140:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001a147:	e8 74 90 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a14c:	48 c7 c7 10 cd 02 80 	mov    $0xffffffff8002cd10,%rdi
ffffffff8001a153:	e8 68 90 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a158:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001a15f:	e8 5c 90 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        asm("lidt %0" : : "m"(idtr));
ffffffff8001a164:	0f 01 1d 1d 24 13 00 	lidt   0x13241d(%rip)        # ffffffff8014c588 <_ZN3Hal4IDTRE>
ffffffff8001a16b:	48 c7 c7 68 b8 02 80 	mov    $0xffffffff8002b868,%rdi
ffffffff8001a172:	e8 49 90 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a177:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001a17e:	e8 3d 90 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a183:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001a18a:	e8 31 90 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a18f:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001a196:	e8 25 90 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a19b:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001a1a2:	e8 19 90 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a1a7:	48 c7 c7 af b8 02 80 	mov    $0xffffffff8002b8af,%rdi
ffffffff8001a1ae:	e8 0d 90 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a1b3:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001a1ba:	e8 01 90 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001a1bf:	83 2d de 52 1c 00 01 	subl   $0x1,0x1c52de(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff8001a1c6:	5d                   	pop    %rbp
ffffffff8001a1c7:	c3                   	ret
ffffffff8001a1c8:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001a1cf:	00 00 00 
ffffffff8001a1d2:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001a1d9:	00 00 00 
ffffffff8001a1dc:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8001a1e0 <memcpy>:
// They CAN be moved to a different .cpp file.
#include <cstdint>

extern "C" {

    void *memcpy(void *dest, const void *src, std::size_t n) {
ffffffff8001a1e0:	48 89 f8             	mov    %rdi,%rax
        std::uint8_t *pdest = static_cast<std::uint8_t *>(dest);
        const std::uint8_t *psrc = static_cast<const std::uint8_t *>(src);
    
        for (std::size_t i = 0; i < n; i++) {
ffffffff8001a1e3:	48 85 d2             	test   %rdx,%rdx
ffffffff8001a1e6:	74 2a                	je     ffffffff8001a212 <memcpy+0x32>
ffffffff8001a1e8:	31 c9                	xor    %ecx,%ecx
ffffffff8001a1ea:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001a1f1:	00 00 00 00 
ffffffff8001a1f5:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001a1fc:	00 00 00 00 
            pdest[i] = psrc[i];
ffffffff8001a200:	44 0f b6 04 0e       	movzbl (%rsi,%rcx,1),%r8d
ffffffff8001a205:	44 88 04 08          	mov    %r8b,(%rax,%rcx,1)
        for (std::size_t i = 0; i < n; i++) {
ffffffff8001a209:	48 83 c1 01          	add    $0x1,%rcx
ffffffff8001a20d:	48 39 ca             	cmp    %rcx,%rdx
ffffffff8001a210:	75 ee                	jne    ffffffff8001a200 <memcpy+0x20>
        }
    
        return dest;
    }
ffffffff8001a212:	c3                   	ret
ffffffff8001a213:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001a21a:	00 00 00 
ffffffff8001a21d:	0f 1f 00             	nopl   (%rax)

ffffffff8001a220 <memset>:
    
    void *memset(void *s, int c, std::size_t n) {
ffffffff8001a220:	48 89 f8             	mov    %rdi,%rax
ffffffff8001a223:	48 89 f9             	mov    %rdi,%rcx
ffffffff8001a226:	48 8d 3c 3a          	lea    (%rdx,%rdi,1),%rdi
        std::uint8_t *p = static_cast<std::uint8_t *>(s);
    
        for (std::size_t i = 0; i < n; i++) {
            p[i] = static_cast<uint8_t>(c);
ffffffff8001a22a:	41 89 f0             	mov    %esi,%r8d
        for (std::size_t i = 0; i < n; i++) {
ffffffff8001a22d:	48 85 d2             	test   %rdx,%rdx
ffffffff8001a230:	74 2e                	je     ffffffff8001a260 <memset+0x40>
ffffffff8001a232:	48 89 fa             	mov    %rdi,%rdx
ffffffff8001a235:	48 29 c2             	sub    %rax,%rdx
ffffffff8001a238:	83 e2 01             	and    $0x1,%edx
ffffffff8001a23b:	74 13                	je     ffffffff8001a250 <memset+0x30>
ffffffff8001a23d:	48 8d 48 01          	lea    0x1(%rax),%rcx
            p[i] = static_cast<uint8_t>(c);
ffffffff8001a241:	40 88 30             	mov    %sil,(%rax)
        for (std::size_t i = 0; i < n; i++) {
ffffffff8001a244:	48 39 f9             	cmp    %rdi,%rcx
ffffffff8001a247:	74 18                	je     ffffffff8001a261 <memset+0x41>
ffffffff8001a249:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            p[i] = static_cast<uint8_t>(c);
ffffffff8001a250:	44 88 01             	mov    %r8b,(%rcx)
        for (std::size_t i = 0; i < n; i++) {
ffffffff8001a253:	48 83 c1 02          	add    $0x2,%rcx
            p[i] = static_cast<uint8_t>(c);
ffffffff8001a257:	44 88 41 ff          	mov    %r8b,-0x1(%rcx)
        for (std::size_t i = 0; i < n; i++) {
ffffffff8001a25b:	48 39 f9             	cmp    %rdi,%rcx
ffffffff8001a25e:	75 f0                	jne    ffffffff8001a250 <memset+0x30>
        }
    
        return s;
    }
ffffffff8001a260:	c3                   	ret
ffffffff8001a261:	c3                   	ret
ffffffff8001a262:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001a269:	00 00 00 
ffffffff8001a26c:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001a273:	00 00 00 
ffffffff8001a276:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001a27d:	00 00 00 

ffffffff8001a280 <_ZN3Lib13u64_2_basestrEmm.part.0>:

        if (!num) {
            return (char *)"0";
        }

        char base[] = "0123456789ABCDEFGH"; // IJKLMN ....
ffffffff8001a280:	48 b8 30 31 32 33 34 	movabs $0x3736353433323130,%rax
ffffffff8001a287:	35 36 37 
    char *u64_2_basestr(uint64_t num, size_t radix)
ffffffff8001a28a:	55                   	push   %rbp
ffffffff8001a28b:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001a28e:	48 81 ec 20 01 00 00 	sub    $0x120,%rsp
        char base[] = "0123456789ABCDEFGH"; // IJKLMN ....
ffffffff8001a295:	48 89 85 ed fe ff ff 	mov    %rax,-0x113(%rbp)
ffffffff8001a29c:	48 b8 38 39 41 42 43 	movabs $0x4645444342413938,%rax
ffffffff8001a2a3:	44 45 46 
ffffffff8001a2a6:	48 89 85 f5 fe ff ff 	mov    %rax,-0x10b(%rbp)

        if (radix < 2 || radix > (sizeof(base) - 1))
ffffffff8001a2ad:	48 8d 46 fe          	lea    -0x2(%rsi),%rax
        char base[] = "0123456789ABCDEFGH"; // IJKLMN ....
ffffffff8001a2b1:	c7 85 fc fe ff ff 46 	movl   $0x484746,-0x104(%rbp)
ffffffff8001a2b8:	47 48 00 
        if (radix < 2 || radix > (sizeof(base) - 1))
ffffffff8001a2bb:	48 83 f8 10          	cmp    $0x10,%rax
ffffffff8001a2bf:	0f 87 ab 00 00 00    	ja     ffffffff8001a370 <_ZN3Lib13u64_2_basestrEmm.part.0+0xf0>

        int si = 0;

        char tmp[256];
        int rdi = -1;
        while (num)
ffffffff8001a2c5:	45 31 c9             	xor    %r9d,%r9d
ffffffff8001a2c8:	48 8d 8d 00 ff ff ff 	lea    -0x100(%rbp),%rcx
ffffffff8001a2cf:	48 c7 c0 a0 c5 14 80 	mov    $0xffffffff8014c5a0,%rax
ffffffff8001a2d6:	48 85 ff             	test   %rdi,%rdi
ffffffff8001a2d9:	0f 84 84 00 00 00    	je     ffffffff8001a363 <_ZN3Lib13u64_2_basestrEmm.part.0+0xe3>
ffffffff8001a2df:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001a2e6:	00 00 00 00 
ffffffff8001a2ea:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001a2f1:	00 00 00 00 
ffffffff8001a2f5:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001a2fc:	00 00 00 00 
        {
            tmp[++rdi] = base[num % radix];
ffffffff8001a300:	48 89 f8             	mov    %rdi,%rax
ffffffff8001a303:	31 d2                	xor    %edx,%edx
ffffffff8001a305:	4d 89 c8             	mov    %r9,%r8
ffffffff8001a308:	48 f7 f6             	div    %rsi
ffffffff8001a30b:	0f b6 94 15 ed fe ff 	movzbl -0x113(%rbp,%rdx,1),%edx
ffffffff8001a312:	ff 
ffffffff8001a313:	42 88 14 09          	mov    %dl,(%rcx,%r9,1)
            num /= radix;
ffffffff8001a317:	48 89 fa             	mov    %rdi,%rdx
        while (num)
ffffffff8001a31a:	4d 8d 49 01          	lea    0x1(%r9),%r9
            num /= radix;
ffffffff8001a31e:	48 89 c7             	mov    %rax,%rdi
        while (num)
ffffffff8001a321:	48 39 f2             	cmp    %rsi,%rdx
ffffffff8001a324:	73 da                	jae    ffffffff8001a300 <_ZN3Lib13u64_2_basestrEmm.part.0+0x80>
ffffffff8001a326:	49 63 c0             	movslq %r8d,%rax
            tmp[++rdi] = base[num % radix];
ffffffff8001a329:	31 d2                	xor    %edx,%edx
ffffffff8001a32b:	48 01 c8             	add    %rcx,%rax
ffffffff8001a32e:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001a335:	00 00 00 00 
ffffffff8001a339:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        }
        while (rdi >= 0)
            str[si++] = tmp[rdi--];
ffffffff8001a340:	0f b6 08             	movzbl (%rax),%ecx
        while (rdi >= 0)
ffffffff8001a343:	48 83 e8 01          	sub    $0x1,%rax
            str[si++] = tmp[rdi--];
ffffffff8001a347:	88 8a a0 c5 14 80    	mov    %cl,-0x7feb3a60(%rdx)
        while (rdi >= 0)
ffffffff8001a34d:	48 89 d1             	mov    %rdx,%rcx
ffffffff8001a350:	48 83 c2 01          	add    $0x1,%rdx
ffffffff8001a354:	4c 39 c1             	cmp    %r8,%rcx
ffffffff8001a357:	75 e7                	jne    ffffffff8001a340 <_ZN3Lib13u64_2_basestrEmm.part.0+0xc0>
        str[si] = '\0';
ffffffff8001a359:	41 8d 40 01          	lea    0x1(%r8),%eax
ffffffff8001a35d:	48 05 a0 c5 14 80    	add    $0xffffffff8014c5a0,%rax
ffffffff8001a363:	c6 00 00             	movb   $0x0,(%rax)
        return str;
    }
ffffffff8001a366:	48 c7 c0 a0 c5 14 80 	mov    $0xffffffff8014c5a0,%rax
ffffffff8001a36d:	c9                   	leave
ffffffff8001a36e:	c3                   	ret
ffffffff8001a36f:	90                   	nop
            str[0] = '\0';
ffffffff8001a370:	c6 05 29 22 13 00 00 	movb   $0x0,0x132229(%rip)        # ffffffff8014c5a0 <_ZN3Lib6outputE>
    }
ffffffff8001a377:	48 c7 c0 a0 c5 14 80 	mov    $0xffffffff8014c5a0,%rax
ffffffff8001a37e:	c9                   	leave
ffffffff8001a37f:	c3                   	ret

ffffffff8001a380 <_ZN3Lib11int2basestrEim>:
        if (!num) {
ffffffff8001a380:	85 ff                	test   %edi,%edi
ffffffff8001a382:	0f 84 f8 00 00 00    	je     ffffffff8001a480 <_ZN3Lib11int2basestrEim+0x100>
        char base[] = "0123456789ABCDEFGH"; // IJKLMN ....
ffffffff8001a388:	48 b8 30 31 32 33 34 	movabs $0x3736353433323130,%rax
ffffffff8001a38f:	35 36 37 
    {
ffffffff8001a392:	55                   	push   %rbp
ffffffff8001a393:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001a396:	48 81 ec 20 01 00 00 	sub    $0x120,%rsp
        char base[] = "0123456789ABCDEFGH"; // IJKLMN ....
ffffffff8001a39d:	48 89 85 ed fe ff ff 	mov    %rax,-0x113(%rbp)
ffffffff8001a3a4:	48 b8 38 39 41 42 43 	movabs $0x4645444342413938,%rax
ffffffff8001a3ab:	44 45 46 
ffffffff8001a3ae:	48 89 85 f5 fe ff ff 	mov    %rax,-0x10b(%rbp)
        if (radix < 2 || radix > (sizeof(base) - 1))
ffffffff8001a3b5:	48 8d 46 fe          	lea    -0x2(%rsi),%rax
        char base[] = "0123456789ABCDEFGH"; // IJKLMN ....
ffffffff8001a3b9:	c7 85 fc fe ff ff 46 	movl   $0x484746,-0x104(%rbp)
ffffffff8001a3c0:	47 48 00 
        if (radix < 2 || radix > (sizeof(base) - 1))
ffffffff8001a3c3:	48 83 f8 10          	cmp    $0x10,%rax
ffffffff8001a3c7:	0f 87 a3 00 00 00    	ja     ffffffff8001a470 <_ZN3Lib11int2basestrEim+0xf0>
        int si = 0;
ffffffff8001a3cd:	45 31 d2             	xor    %r10d,%r10d
        if (num < 0)
ffffffff8001a3d0:	85 ff                	test   %edi,%edi
ffffffff8001a3d2:	79 0f                	jns    ffffffff8001a3e3 <_ZN3Lib11int2basestrEim+0x63>
            str[si++] = '-';
ffffffff8001a3d4:	c6 05 c5 21 13 00 2d 	movb   $0x2d,0x1321c5(%rip)        # ffffffff8014c5a0 <_ZN3Lib6outputE>
            num = -num;
ffffffff8001a3db:	f7 df                	neg    %edi
            str[si++] = '-';
ffffffff8001a3dd:	41 ba 01 00 00 00    	mov    $0x1,%r10d
ffffffff8001a3e3:	45 31 c0             	xor    %r8d,%r8d
ffffffff8001a3e6:	48 8d 8d 00 ff ff ff 	lea    -0x100(%rbp),%rcx
ffffffff8001a3ed:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001a3f4:	00 00 00 00 
ffffffff8001a3f8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001a3ff:	00 
            tmp[++rdi] = base[num % radix];
ffffffff8001a400:	48 63 c7             	movslq %edi,%rax
ffffffff8001a403:	31 d2                	xor    %edx,%edx
ffffffff8001a405:	4d 89 c1             	mov    %r8,%r9
ffffffff8001a408:	48 f7 f6             	div    %rsi
ffffffff8001a40b:	0f b6 94 15 ed fe ff 	movzbl -0x113(%rbp,%rdx,1),%edx
ffffffff8001a412:	ff 
            num /= radix;
ffffffff8001a413:	89 c7                	mov    %eax,%edi
            tmp[++rdi] = base[num % radix];
ffffffff8001a415:	42 88 14 01          	mov    %dl,(%rcx,%r8,1)
        while (num)
ffffffff8001a419:	4d 8d 40 01          	lea    0x1(%r8),%r8
ffffffff8001a41d:	85 c0                	test   %eax,%eax
ffffffff8001a41f:	75 df                	jne    ffffffff8001a400 <_ZN3Lib11int2basestrEim+0x80>
ffffffff8001a421:	49 63 c1             	movslq %r9d,%rax
ffffffff8001a424:	48 01 c8             	add    %rcx,%rax
ffffffff8001a427:	49 63 ca             	movslq %r10d,%rcx
ffffffff8001a42a:	48 8d 91 a0 c5 14 80 	lea    -0x7feb3a60(%rcx),%rdx
ffffffff8001a431:	4a 8d b4 09 a1 c5 14 	lea    -0x7feb3a5f(%rcx,%r9,1),%rsi
ffffffff8001a438:	80 
ffffffff8001a439:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            str[si++] = tmp[rdi--];
ffffffff8001a440:	0f b6 08             	movzbl (%rax),%ecx
        while (rdi >= 0)
ffffffff8001a443:	48 83 c2 01          	add    $0x1,%rdx
ffffffff8001a447:	48 83 e8 01          	sub    $0x1,%rax
            str[si++] = tmp[rdi--];
ffffffff8001a44b:	88 4a ff             	mov    %cl,-0x1(%rdx)
        while (rdi >= 0)
ffffffff8001a44e:	48 39 f2             	cmp    %rsi,%rdx
ffffffff8001a451:	75 ed                	jne    ffffffff8001a440 <_ZN3Lib11int2basestrEim+0xc0>
        str[si] = '\0';
ffffffff8001a453:	43 8d 44 0a 01       	lea    0x1(%r10,%r9,1),%eax
ffffffff8001a458:	c6 80 a0 c5 14 80 00 	movb   $0x0,-0x7feb3a60(%rax)
            return str;
ffffffff8001a45f:	48 c7 c0 a0 c5 14 80 	mov    $0xffffffff8014c5a0,%rax
    }
ffffffff8001a466:	c9                   	leave
ffffffff8001a467:	c3                   	ret
ffffffff8001a468:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001a46f:	00 
            str[0] = '\0';
ffffffff8001a470:	c6 05 29 21 13 00 00 	movb   $0x0,0x132129(%rip)        # ffffffff8014c5a0 <_ZN3Lib6outputE>
            return str;
ffffffff8001a477:	48 c7 c0 a0 c5 14 80 	mov    $0xffffffff8014c5a0,%rax
    }
ffffffff8001a47e:	c9                   	leave
ffffffff8001a47f:	c3                   	ret
ffffffff8001a480:	48 c7 c0 bb a2 02 80 	mov    $0xffffffff8002a2bb,%rax
ffffffff8001a487:	c3                   	ret
ffffffff8001a488:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001a48f:	00 

ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>:
        if (!num) {
ffffffff8001a490:	48 85 ff             	test   %rdi,%rdi
ffffffff8001a493:	74 0b                	je     ffffffff8001a4a0 <_ZN3Lib13u64_2_basestrEmm+0x10>
ffffffff8001a495:	e9 e6 fd ff ff       	jmp    ffffffff8001a280 <_ZN3Lib13u64_2_basestrEmm.part.0>
ffffffff8001a49a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
    }
ffffffff8001a4a0:	48 c7 c0 bb a2 02 80 	mov    $0xffffffff8002a2bb,%rax
ffffffff8001a4a7:	c3                   	ret
ffffffff8001a4a8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001a4af:	00 

ffffffff8001a4b0 <_ZN2KtlsERNS_15KernelOutStreamEm.isra.0>:
        friend KernelOutStream &operator<<(KernelOutStream &t, std::uint64_t number)
ffffffff8001a4b0:	55                   	push   %rbp
ffffffff8001a4b1:	89 f8                	mov    %edi,%eax
ffffffff8001a4b3:	48 89 f7             	mov    %rsi,%rdi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001a4b6:	89 c6                	mov    %eax,%esi
        friend KernelOutStream &operator<<(KernelOutStream &t, std::uint64_t number)
ffffffff8001a4b8:	48 89 e5             	mov    %rsp,%rbp
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001a4bb:	e8 d0 ff ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
        }
ffffffff8001a4c0:	5d                   	pop    %rbp
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001a4c1:	48 89 c7             	mov    %rax,%rdi
ffffffff8001a4c4:	e9 f7 8c 00 00       	jmp    ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a4c9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff8001a4d0 <_ZN3Efi4InitEPNS_11SystemTableE>:
        std::uint64_t NumberOfTableEntries;

        void *ConfigurationTable;
    };
    
    inline void Init(SystemTable* ST) {
ffffffff8001a4d0:	55                   	push   %rbp
ffffffff8001a4d1:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001a4d4:	41 54                	push   %r12
ffffffff8001a4d6:	53                   	push   %rbx
ffffffff8001a4d7:	48 89 fb             	mov    %rdi,%rbx
            Print(string);
ffffffff8001a4da:	48 c7 c7 7e ba 02 80 	mov    $0xffffffff8002ba7e,%rdi
ffffffff8001a4e1:	48 83 ec 20          	sub    $0x20,%rsp
            g_kernelLogDepth++;
ffffffff8001a4e5:	83 05 b8 4f 1c 00 01 	addl   $0x1,0x1c4fb8(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001a4ec:	e8 cf 8c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a4f1:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001a4f8:	e8 c3 8c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a4fd:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001a504:	e8 b7 8c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a509:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001a510:	e8 ab 8c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a515:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001a51c:	e8 9f 8c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a521:	48 c7 c7 83 ba 02 80 	mov    $0xffffffff8002ba83,%rdi
ffffffff8001a528:	e8 93 8c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            localStream << item;
ffffffff8001a52d:	0f b7 7b 08          	movzwl 0x8(%rbx),%edi
            Print(Lib::int2basestr(number, t.streamBaseType));
ffffffff8001a531:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001a536:	e8 45 fe ff ff       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
ffffffff8001a53b:	48 89 c7             	mov    %rax,%rdi
ffffffff8001a53e:	e8 7d 8c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001a543:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001a54a:	e8 71 8c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a54f:	48 c7 c7 7e ba 02 80 	mov    $0xffffffff8002ba7e,%rdi
ffffffff8001a556:	e8 65 8c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a55b:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001a562:	e8 59 8c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a567:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001a56e:	e8 4d 8c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a573:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001a57a:	e8 41 8c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a57f:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001a586:	e8 35 8c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a58b:	48 c7 c7 97 ba 02 80 	mov    $0xffffffff8002ba97,%rdi
ffffffff8001a592:	e8 29 8c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            localStream << item;
ffffffff8001a597:	0f b7 7b 0a          	movzwl 0xa(%rbx),%edi
            Print(Lib::int2basestr(number, t.streamBaseType));
ffffffff8001a59b:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001a5a0:	e8 db fd ff ff       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
ffffffff8001a5a5:	48 89 c7             	mov    %rax,%rdi
ffffffff8001a5a8:	e8 13 8c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001a5ad:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001a5b4:	e8 07 8c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001a5b9:	8b 05 e5 4e 1c 00    	mov    0x1c4ee5(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        Kt::KernelLogStream(Kt::OK, "UEFI") << "ST Minor Revision: " << ST->Header.Revision.MinorRevision;
        Kt::KernelLogStream(Kt::OK, "UEFI") << "ST Major Revision: " << ST->Header.Revision.MajorRevision;

        RuntimeServicesTable* RT = (RuntimeServicesTable*)Memory::HHDM(ST->RuntimeServices);
ffffffff8001a5bf:	48 8b 5b 58          	mov    0x58(%rbx),%rbx
ffffffff8001a5c3:	8d 50 ff             	lea    -0x1(%rax),%edx
ffffffff8001a5c6:	89 15 d8 4e 1c 00    	mov    %edx,0x1c4ed8(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

        if (ST->RuntimeServices != nullptr) {
ffffffff8001a5cc:	48 85 db             	test   %rbx,%rbx
ffffffff8001a5cf:	0f 84 a5 00 00 00    	je     ffffffff8001a67a <_ZN3Efi4InitEPNS_11SystemTableE+0x1aa>
            Print(string);
ffffffff8001a5d5:	48 c7 c7 7e ba 02 80 	mov    $0xffffffff8002ba7e,%rdi
            g_kernelLogDepth++;
ffffffff8001a5dc:	89 05 c2 4e 1c 00    	mov    %eax,0x1c4ec2(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        return HHDMBase + (uint64_t)address;
ffffffff8001a5e2:	4c 8b 25 bf 23 13 00 	mov    0x1323bf(%rip),%r12        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            Print(string);
ffffffff8001a5e9:	e8 d2 8b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a5ee:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001a5f5:	e8 c6 8b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a5fa:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001a601:	e8 ba 8b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a606:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001a60d:	e8 ae 8b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a612:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001a619:	e8 a2 8b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a61e:	48 c7 c7 58 cd 02 80 	mov    $0xffffffff8002cd58,%rdi
ffffffff8001a625:	e8 96 8b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a62a:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001a631:	e8 8a 8b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a636:	48 8b 05 6b 23 13 00 	mov    0x13236b(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>

            EFI_TIME Time;
            EFI_TIME_CAPABILITIES TimeCapabilities;

            EFI_GET_TIME _GetTime = (EFI_GET_TIME)Memory::HHDM((void*)RT->GetTime);
            _GetTime(&Time, &TimeCapabilities);
ffffffff8001a63d:	48 8d 55 d4          	lea    -0x2c(%rbp),%rdx
ffffffff8001a641:	48 8d 4d e0          	lea    -0x20(%rbp),%rcx
ffffffff8001a645:	48 83 ec 20          	sub    $0x20,%rsp
            g_kernelLogDepth--;
ffffffff8001a649:	83 2d 54 4e 1c 00 01 	subl   $0x1,0x1c4e54(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001a650:	4a 03 44 23 18       	add    0x18(%rbx,%r12,1),%rax
ffffffff8001a655:	ff d0                	call   *%rax

            Timekeeping::Init(Time.Year, Time.Month, Time.Day, Time.Hour, Time.Minute, Time.Second);
ffffffff8001a657:	0f b6 4d e4          	movzbl -0x1c(%rbp),%ecx
ffffffff8001a65b:	0f b6 55 e3          	movzbl -0x1d(%rbp),%edx
ffffffff8001a65f:	48 83 c4 20          	add    $0x20,%rsp
ffffffff8001a663:	0f b6 75 e2          	movzbl -0x1e(%rbp),%esi
ffffffff8001a667:	0f b7 7d e0          	movzwl -0x20(%rbp),%edi
ffffffff8001a66b:	44 0f b6 4d e6       	movzbl -0x1a(%rbp),%r9d
ffffffff8001a670:	44 0f b6 45 e5       	movzbl -0x1b(%rbp),%r8d
ffffffff8001a675:	e8 06 90 00 00       	call   ffffffff80023680 <_ZN11Timekeeping4InitEthhhhh>
        }
    }
ffffffff8001a67a:	48 8d 65 f0          	lea    -0x10(%rbp),%rsp
ffffffff8001a67e:	5b                   	pop    %rbx
ffffffff8001a67f:	41 5c                	pop    %r12
ffffffff8001a681:	5d                   	pop    %rbp
ffffffff8001a682:	c3                   	ret
ffffffff8001a683:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001a68a:	00 00 00 
ffffffff8001a68d:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001a694:	00 00 00 
ffffffff8001a697:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001a69e:	00 00 00 
ffffffff8001a6a1:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001a6a8:	00 00 00 
ffffffff8001a6ab:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001a6b2:	00 00 00 
ffffffff8001a6b5:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001a6bc:	00 00 00 
ffffffff8001a6bf:	90                   	nop

ffffffff8001a6c0 <kmain>:
extern void (*__init_array_end[])();

extern "C" uint64_t KernelStartSymbol;
extern "C" uint64_t KernelEndSymbol;

extern "C" void kmain() {
ffffffff8001a6c0:	55                   	push   %rbp
ffffffff8001a6c1:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001a6c4:	41 57                	push   %r15
ffffffff8001a6c6:	41 56                	push   %r14
ffffffff8001a6c8:	41 55                	push   %r13
ffffffff8001a6ca:	41 54                	push   %r12
ffffffff8001a6cc:	53                   	push   %rbx
ffffffff8001a6cd:	48 83 ec 78          	sub    $0x78,%rsp
    if (LIMINE_BASE_REVISION_SUPPORTED == false) {
ffffffff8001a6d1:	4c 8b 25 08 5b fe ff 	mov    -0x1a4f8(%rip),%r12        # ffffffff800001e0 <_ZN12_GLOBAL__N_120limine_base_revisionE+0x10>
ffffffff8001a6d8:	4d 85 e4             	test   %r12,%r12
ffffffff8001a6db:	75 3c                	jne    ffffffff8001a719 <kmain+0x59>
        Hal::Halt();
    }

    // Call global constructors.
    for (std::size_t i = 0; &__init_array[i] != __init_array_end; i++) {
ffffffff8001a6dd:	48 c7 c3 88 df 02 80 	mov    $0xffffffff8002df88,%rbx
ffffffff8001a6e4:	48 81 fb a0 df 02 80 	cmp    $0xffffffff8002dfa0,%rbx
ffffffff8001a6eb:	74 12                	je     ffffffff8001a6ff <kmain+0x3f>
ffffffff8001a6ed:	0f 1f 00             	nopl   (%rax)
        __init_array[i]();
ffffffff8001a6f0:	ff 13                	call   *(%rbx)
    for (std::size_t i = 0; &__init_array[i] != __init_array_end; i++) {
ffffffff8001a6f2:	48 83 c3 08          	add    $0x8,%rbx
ffffffff8001a6f6:	48 81 fb a0 df 02 80 	cmp    $0xffffffff8002dfa0,%rbx
ffffffff8001a6fd:	75 f1                	jne    ffffffff8001a6f0 <kmain+0x30>
    }

    if (framebuffer_request.response == nullptr
ffffffff8001a6ff:	48 8b 05 c2 5a fe ff 	mov    -0x1a53e(%rip),%rax        # ffffffff800001c8 <_ZN12_GLOBAL__N_119framebuffer_requestE+0x28>
     || framebuffer_request.response->framebuffer_count < 1) {
ffffffff8001a706:	48 85 c0             	test   %rax,%rax
ffffffff8001a709:	74 0e                	je     ffffffff8001a719 <kmain+0x59>
ffffffff8001a70b:	48 8b 05 b6 5a fe ff 	mov    -0x1a54a(%rip),%rax        # ffffffff800001c8 <_ZN12_GLOBAL__N_119framebuffer_requestE+0x28>
ffffffff8001a712:	48 83 78 08 00       	cmpq   $0x0,0x8(%rax)
ffffffff8001a717:	75 05                	jne    ffffffff8001a71e <kmain+0x5e>
        Hal::Halt();
ffffffff8001a719:	e8 52 62 00 00       	call   ffffffff80020970 <_ZN3Hal4HaltEv>
        Hal::Halt();
    }
    
    limine_framebuffer *framebuffer{framebuffer_request.response->framebuffers[0]};
ffffffff8001a71e:	48 8b 05 a3 5a fe ff 	mov    -0x1a55d(%rip),%rax        # ffffffff800001c8 <_ZN12_GLOBAL__N_119framebuffer_requestE+0x28>
ffffffff8001a725:	48 8b 40 10          	mov    0x10(%rax),%rax
ffffffff8001a729:	4c 8b 28             	mov    (%rax),%r13

    Kt::Initialize(
ffffffff8001a72c:	41 0f b6 45 28       	movzbl 0x28(%r13),%eax
ffffffff8001a731:	45 0f b6 4d 24       	movzbl 0x24(%r13),%r9d
ffffffff8001a736:	45 0f b6 45 23       	movzbl 0x23(%r13),%r8d
ffffffff8001a73b:	49 8b 4d 18          	mov    0x18(%r13),%rcx
ffffffff8001a73f:	49 8b 55 10          	mov    0x10(%r13),%rdx
ffffffff8001a743:	49 8b 75 08          	mov    0x8(%r13),%rsi
ffffffff8001a747:	50                   	push   %rax
ffffffff8001a748:	41 0f b6 45 27       	movzbl 0x27(%r13),%eax
ffffffff8001a74d:	49 8b 7d 00          	mov    0x0(%r13),%rdi
ffffffff8001a751:	50                   	push   %rax
ffffffff8001a752:	41 0f b6 45 26       	movzbl 0x26(%r13),%eax
ffffffff8001a757:	50                   	push   %rax
ffffffff8001a758:	41 0f b6 45 25       	movzbl 0x25(%r13),%eax
ffffffff8001a75d:	50                   	push   %rax
ffffffff8001a75e:	e8 8d 89 00 00       	call   ffffffff800230f0 <_ZN2Kt10InitializeEPjmmmhhhhhh>
        framebuffer->blue_mask_shift
    );


#if defined (__x86_64__)
    Hal::PrepareGDT();
ffffffff8001a763:	48 83 c4 20          	add    $0x20,%rsp
ffffffff8001a767:	e8 04 e7 ff ff       	call   ffffffff80018e70 <_ZN3Hal10PrepareGDTEv>
    Hal::BridgeLoadGDT();
ffffffff8001a76c:	e8 ef e7 ff ff       	call   ffffffff80018f60 <_ZN3Hal13BridgeLoadGDTEv>

    // Enable SSE/SSE2 — required for userspace programs compiled with SSE
    // CR0: clear EM (bit 2), set MP (bit 1)
    {
        uint64_t cr0;
        asm volatile("mov %%cr0, %0" : "=r"(cr0));
ffffffff8001a771:	0f 20 c0             	mov    %cr0,%rax
        cr0 &= ~(1ULL << 2);  // Clear EM
ffffffff8001a774:	48 83 e0 fb          	and    $0xfffffffffffffffb,%rax
        cr0 |=  (1ULL << 1);  // Set MP
ffffffff8001a778:	48 83 c8 02          	or     $0x2,%rax
        asm volatile("mov %0, %%cr0" :: "r"(cr0));
ffffffff8001a77c:	0f 22 c0             	mov    %rax,%cr0

        // CR4: set OSFXSR (bit 9) and OSXMMEXCPT (bit 10)
        uint64_t cr4;
        asm volatile("mov %%cr4, %0" : "=r"(cr4));
ffffffff8001a77f:	0f 20 e0             	mov    %cr4,%rax
        cr4 |= (1ULL << 9);   // OSFXSR
        cr4 |= (1ULL << 10);  // OSXMMEXCPT
ffffffff8001a782:	80 cc 06             	or     $0x6,%ah
        asm volatile("mov %0, %%cr4" :: "r"(cr4));
ffffffff8001a785:	0f 22 e0             	mov    %rax,%cr4
    }
#endif

    uint64_t hhdm_offset = hhdm_request.response->offset;
ffffffff8001a788:	48 8b 05 b9 59 fe ff 	mov    -0x1a647(%rip),%rax        # ffffffff80000148 <_ZN12_GLOBAL__N_112hhdm_requestE+0x28>
    Memory::HHDMBase = hhdm_offset;
ffffffff8001a78f:	48 8b 40 08          	mov    0x8(%rax),%rax
ffffffff8001a793:	48 89 05 0e 22 13 00 	mov    %rax,0x13220e(%rip)        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>

    if (memmap_request.response == nullptr) {
ffffffff8001a79a:	48 8b 05 67 59 fe ff 	mov    -0x1a699(%rip),%rax        # ffffffff80000108 <_ZN12_GLOBAL__N_114memmap_requestE+0x28>
ffffffff8001a7a1:	48 85 c0             	test   %rax,%rax
ffffffff8001a7a4:	0f 84 d4 04 00 00    	je     ffffffff8001ac7e <kmain+0x5be>
        Panic("System memory map missing!", nullptr);
    }

    Kt::KernelLogStream(OK, "Mem") << "Creating PageFrameAllocator";
ffffffff8001a7aa:	48 8d 5d a0          	lea    -0x60(%rbp),%rbx
ffffffff8001a7ae:	be 04 00 00 00       	mov    $0x4,%esi
ffffffff8001a7b3:	48 c7 c2 c6 ba 02 80 	mov    $0xffffffff8002bac6,%rdx
ffffffff8001a7ba:	48 89 df             	mov    %rbx,%rdi
ffffffff8001a7bd:	e8 9e 87 ff ff       	call   ffffffff80012f60 <_ZN2Kt15KernelLogStreamC1ENS_14KernelLogLevelEPKc>
            Print(string);
ffffffff8001a7c2:	48 c7 c7 ca ba 02 80 	mov    $0xffffffff8002baca,%rdi
ffffffff8001a7c9:	e8 f2 89 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a7ce:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001a7d5:	e8 e6 89 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    Memory::PageFrameAllocator pmm(Memory::Scan(memmap_request.response));
ffffffff8001a7da:	48 8b 3d 27 59 fe ff 	mov    -0x1a6d9(%rip),%rdi        # ffffffff80000108 <_ZN12_GLOBAL__N_114memmap_requestE+0x28>
            g_kernelLogDepth--;
ffffffff8001a7e1:	83 2d bc 4c 1c 00 01 	subl   $0x1,0x1c4cbc(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001a7e8:	e8 03 08 00 00       	call   ffffffff8001aff0 <_ZN6Memory4ScanEP22limine_memmap_response>
ffffffff8001a7ed:	48 89 df             	mov    %rbx,%rdi
ffffffff8001a7f0:	48 89 c6             	mov    %rax,%rsi
ffffffff8001a7f3:	e8 88 08 00 00       	call   ffffffff8001b080 <_ZN6Memory18PageFrameAllocatorC1ENS_14LargestSectionE>
    Memory::g_pfa = &pmm;
ffffffff8001a7f8:	48 89 1d b1 21 13 00 	mov    %rbx,0x1321b1(%rip)        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>

    Kt::KernelLogStream(OK, "Mem") << "Creating HeapAllocator";
ffffffff8001a7ff:	48 8d 5d 80          	lea    -0x80(%rbp),%rbx
ffffffff8001a803:	48 c7 c2 c6 ba 02 80 	mov    $0xffffffff8002bac6,%rdx
ffffffff8001a80a:	be 04 00 00 00       	mov    $0x4,%esi
ffffffff8001a80f:	48 89 df             	mov    %rbx,%rdi
ffffffff8001a812:	e8 49 87 ff ff       	call   ffffffff80012f60 <_ZN2Kt15KernelLogStreamC1ENS_14KernelLogLevelEPKc>
            Print(string);
ffffffff8001a817:	48 c7 c7 e6 ba 02 80 	mov    $0xffffffff8002bae6,%rdi
ffffffff8001a81e:	e8 9d 89 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a823:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001a82a:	e8 91 89 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    Memory::HeapAllocator heap{};
ffffffff8001a82f:	48 89 df             	mov    %rbx,%rdi
            g_kernelLogDepth--;
ffffffff8001a832:	83 2d 6b 4c 1c 00 01 	subl   $0x1,0x1c4c6b(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001a839:	e8 62 04 00 00       	call   ffffffff8001aca0 <_ZN6Memory13HeapAllocatorC1Ev>
    Memory::g_heap = &heap;

    heap.Walk();
ffffffff8001a83e:	48 89 df             	mov    %rbx,%rdi
    Memory::g_heap = &heap;
ffffffff8001a841:	48 89 1d 70 21 13 00 	mov    %rbx,0x132170(%rip)        # ffffffff8014c9b8 <_ZN6Memory6g_heapE>


#if defined (__x86_64__)
    Hal::IDTInitialize();

    Memory::VMM::Paging g_paging{};
ffffffff8001a848:	48 8d 9d 60 ff ff ff 	lea    -0xa0(%rbp),%rbx
    heap.Walk();
ffffffff8001a84f:	e8 ac 06 00 00       	call   ffffffff8001af00 <_ZN6Memory13HeapAllocator4WalkEv>
    Hal::IDTInitialize();
ffffffff8001a854:	e8 37 f6 ff ff       	call   ffffffff80019e90 <_ZN3Hal13IDTInitializeEv>
    Memory::VMM::Paging g_paging{};
ffffffff8001a859:	48 89 df             	mov    %rbx,%rdi
ffffffff8001a85c:	e8 af 0b 00 00       	call   ffffffff8001b410 <_ZN6Memory3VMM6PagingC1Ev>
    Memory::VMM::g_paging = &g_paging;
    g_paging.Init((uint64_t)&KernelStartSymbol, ((uint64_t)&KernelEndSymbol - (uint64_t)&KernelStartSymbol), memmap_request.response);
ffffffff8001a861:	48 8b 0d a0 58 fe ff 	mov    -0x1a760(%rip),%rcx        # ffffffff80000108 <_ZN12_GLOBAL__N_114memmap_requestE+0x28>
ffffffff8001a868:	48 c7 c2 d0 f4 1d 80 	mov    $0xffffffff801df4d0,%rdx
ffffffff8001a86f:	48 c7 c6 00 00 00 80 	mov    $0xffffffff80000000,%rsi
ffffffff8001a876:	48 81 ea 00 00 00 80 	sub    $0xffffffff80000000,%rdx
ffffffff8001a87d:	48 89 df             	mov    %rbx,%rdi
    Memory::VMM::g_paging = &g_paging;
ffffffff8001a880:	48 89 1d 39 21 13 00 	mov    %rbx,0x132139(%rip)        # ffffffff8014c9c0 <_ZN6Memory3VMM8g_pagingE>
    g_paging.Init((uint64_t)&KernelStartSymbol, ((uint64_t)&KernelEndSymbol - (uint64_t)&KernelStartSymbol), memmap_request.response);
ffffffff8001a887:	e8 a4 18 00 00       	call   ffffffff8001c130 <_ZN6Memory3VMM6Paging4InitEmmP22limine_memmap_response>
ffffffff8001a88c:	b8 06 01 07 00       	mov    $0x70106,%eax
ffffffff8001a891:	ba 06 04 07 00       	mov    $0x70406,%edx
ffffffff8001a896:	b9 77 02 00 00       	mov    $0x277,%ecx
ffffffff8001a89b:	0f 30                	wrmsr

    // Reprogram PAT so entry 1 = Write-Combining (default is Write-Through).
    // Must be done after paging init and before any WC mappings.
    Hal::InitializePAT();
    Kt::KernelLogStream(OK, "Hal") << "PAT reprogrammed (entry 1 = WC)";
ffffffff8001a89d:	48 c7 c2 68 b8 02 80 	mov    $0xffffffff8002b868,%rdx
ffffffff8001a8a4:	be 04 00 00 00       	mov    $0x4,%esi
ffffffff8001a8a9:	48 8d bd 70 ff ff ff 	lea    -0x90(%rbp),%rdi
ffffffff8001a8b0:	e8 ab 86 ff ff       	call   ffffffff80012f60 <_ZN2Kt15KernelLogStreamC1ENS_14KernelLogLevelEPKc>
            Print(string);
ffffffff8001a8b5:	48 c7 c7 80 cd 02 80 	mov    $0xffffffff8002cd80,%rdi
ffffffff8001a8bc:	e8 ff 88 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a8c1:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001a8c8:	e8 f3 88 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>

#endif

    // Initialize Cursor early so we can WC-map the framebuffer before
    // the bulk of boot logging begins (ACPI, PCI, drivers, etc.)
    Graphics::Cursor::Initialize(framebuffer);
ffffffff8001a8cd:	4c 89 ef             	mov    %r13,%rdi
            g_kernelLogDepth--;
ffffffff8001a8d0:	83 2d cd 4b 1c 00 01 	subl   $0x1,0x1c4bcd(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001a8d7:	e8 d4 d5 ff ff       	call   ffffffff80017eb0 <_ZN8Graphics6Cursor10InitializeEP18limine_framebuffer>

#if defined (__x86_64__)
    // Map framebuffer as Write-Combining immediately for faster screen writes.
    // All subsequent log output benefits from WC burst transfers.
    {
        uint64_t fbPhys = Graphics::Cursor::GetFramebufferPhysBase();
ffffffff8001a8dc:	e8 bf d7 ff ff       	call   ffffffff800180a0 <_ZN8Graphics6Cursor22GetFramebufferPhysBaseEv>
ffffffff8001a8e1:	49 89 c7             	mov    %rax,%r15
        uint64_t fbSize = Graphics::Cursor::GetFramebufferHeight()
ffffffff8001a8e4:	e8 c7 d6 ff ff       	call   ffffffff80017fb0 <_ZN8Graphics6Cursor20GetFramebufferHeightEv>
ffffffff8001a8e9:	49 89 c5             	mov    %rax,%r13
                        * Graphics::Cursor::GetFramebufferPitch();
ffffffff8001a8ec:	e8 cf d6 ff ff       	call   ffffffff80017fc0 <_ZN8Graphics6Cursor19GetFramebufferPitchEv>
ffffffff8001a8f1:	4c 0f af e8          	imul   %rax,%r13
        uint64_t numPages = (fbSize + 0xFFF) / 0x1000;
ffffffff8001a8f5:	49 81 c5 ff 0f 00 00 	add    $0xfff,%r13

        for (uint64_t i = 0; i < numPages; i++) {
ffffffff8001a8fc:	49 c1 ed 0c          	shr    $0xc,%r13
ffffffff8001a900:	74 2f                	je     ffffffff8001a931 <kmain+0x271>
ffffffff8001a902:	4d 89 ee             	mov    %r13,%r14
ffffffff8001a905:	49 c1 e6 0c          	shl    $0xc,%r14
ffffffff8001a909:	4d 01 fe             	add    %r15,%r14
ffffffff8001a90c:	0f 1f 40 00          	nopl   0x0(%rax)
        return HHDMBase + address;
ffffffff8001a910:	48 8b 15 91 20 13 00 	mov    0x132091(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            uint64_t phys = fbPhys + i * 0x1000;
            g_paging.MapWC(phys, Memory::HHDM(phys));
ffffffff8001a917:	4c 89 fe             	mov    %r15,%rsi
ffffffff8001a91a:	48 89 df             	mov    %rbx,%rdi
ffffffff8001a91d:	4c 01 fa             	add    %r15,%rdx
        for (uint64_t i = 0; i < numPages; i++) {
ffffffff8001a920:	49 81 c7 00 10 00 00 	add    $0x1000,%r15
            g_paging.MapWC(phys, Memory::HHDM(phys));
ffffffff8001a927:	e8 54 0d 00 00       	call   ffffffff8001b680 <_ZN6Memory3VMM6Paging5MapWCEmm>
        for (uint64_t i = 0; i < numPages; i++) {
ffffffff8001a92c:	4d 39 fe             	cmp    %r15,%r14
ffffffff8001a92f:	75 df                	jne    ffffffff8001a910 <kmain+0x250>
        }

        asm volatile("mov %%cr3, %%rax; mov %%rax, %%cr3" ::: "rax", "memory");
ffffffff8001a931:	0f 20 d8             	mov    %cr3,%rax
ffffffff8001a934:	0f 22 d8             	mov    %rax,%cr3

        Kt::KernelLogStream(OK, "Graphics") << "Framebuffer mapped as Write-Combining ("
ffffffff8001a937:	48 c7 c2 33 a4 02 80 	mov    $0xffffffff8002a433,%rdx
ffffffff8001a93e:	be 04 00 00 00       	mov    $0x4,%esi
ffffffff8001a943:	48 8d bd 70 ff ff ff 	lea    -0x90(%rbp),%rdi
ffffffff8001a94a:	e8 11 86 ff ff       	call   ffffffff80012f60 <_ZN2Kt15KernelLogStreamC1ENS_14KernelLogLevelEPKc>
            Print(string);
ffffffff8001a94f:	48 c7 c7 a0 cd 02 80 	mov    $0xffffffff8002cda0,%rdi
ffffffff8001a956:	e8 65 88 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            localStream << item;
ffffffff8001a95b:	4c 89 ee             	mov    %r13,%rsi
ffffffff8001a95e:	bf 0a 00 00 00       	mov    $0xa,%edi
ffffffff8001a963:	e8 48 fb ff ff       	call   ffffffff8001a4b0 <_ZN2KtlsERNS_15KernelOutStreamEm.isra.0>
            Print(string);
ffffffff8001a968:	48 c7 c7 fd ba 02 80 	mov    $0xffffffff8002bafd,%rdi
ffffffff8001a96f:	e8 4c 88 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001a974:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001a97b:	e8 40 88 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << kcp::dec << numPages << " pages)";
    }
#endif

    Hal::ACPI g_acpi((Hal::ACPI::XSDP*)Memory::HHDM(rsdp_request.response->address));
ffffffff8001a980:	48 8b 05 41 57 fe ff 	mov    -0x1a8bf(%rip),%rax        # ffffffff800000c8 <_ZN12_GLOBAL__N_112rsdp_requestE+0x28>
ffffffff8001a987:	48 8b 35 1a 20 13 00 	mov    0x13201a(%rip),%rsi        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001a98e:	48 8d bd 68 ff ff ff 	lea    -0x98(%rbp),%rdi
            g_kernelLogDepth--;
ffffffff8001a995:	83 2d 08 4b 1c 00 01 	subl   $0x1,0x1c4b08(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001a99c:	48 03 70 08          	add    0x8(%rax),%rsi
ffffffff8001a9a0:	e8 bb ca fe ff       	call   ffffffff80007460 <_ZN3Hal4ACPIC1EPNS0_4XSDPE>

        static bool TestChecksum(CommonSDTHeader* header);

        CommonSDTHeader* FindNextTable(CommonSDTHeader* table);

        CommonSDTHeader* GetXSDT() { return m_xsdt; }
ffffffff8001a9a5:	48 8b bd 68 ff ff ff 	mov    -0x98(%rbp),%rdi

#if defined (__x86_64__)
    if (g_acpi.GetXSDT() != nullptr) {
ffffffff8001a9ac:	48 85 ff             	test   %rdi,%rdi
ffffffff8001a9af:	74 5f                	je     ffffffff8001aa10 <kmain+0x350>
        Hal::ApicInitialize(g_acpi.GetXSDT());
ffffffff8001a9b1:	e8 6a d9 ff ff       	call   ffffffff80018320 <_ZN3Hal14ApicInitializeEPNS_4ACPI15CommonSDTHeaderE>

        Pci::Initialize(g_acpi.GetXSDT());
ffffffff8001a9b6:	48 8b bd 68 ff ff ff 	mov    -0x98(%rbp),%rdi
ffffffff8001a9bd:	e8 3e 58 00 00       	call   ffffffff80020200 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE>

        // Intel GPU driver — initialize right after PCI so the native
        // driver takes over early and all subsequent logs use it.
        Drivers::Graphics::IntelGPU::Initialize();
ffffffff8001a9c2:	e8 a9 18 ff ff       	call   ffffffff8000c270 <_ZN7Drivers8Graphics8IntelGPU10InitializeEv>
        if (Drivers::Graphics::IntelGPU::IsInitialized()) {
ffffffff8001a9c7:	e8 d4 34 ff ff       	call   ffffffff8000dea0 <_ZN7Drivers8Graphics8IntelGPU13IsInitializedEv>
ffffffff8001a9cc:	84 c0                	test   %al,%al
ffffffff8001a9ce:	0f 85 77 02 00 00    	jne    ffffffff8001ac4b <kmain+0x58b>
                Drivers::Graphics::IntelGPU::GetHeight(),
                Drivers::Graphics::IntelGPU::GetPitch()
            );
        }

        Timekeeping::ApicTimerInitialize();
ffffffff8001a9d4:	e8 17 89 00 00       	call   ffffffff800232f0 <_ZN11Timekeeping19ApicTimerInitializeEv>

        // Initialize BSP per-CPU state (GDT/TSS, GS base MSRs) after timer calibration
        Smp::InitBsp(Hal::LocalApic::GetId());
ffffffff8001a9d9:	e8 22 d9 ff ff       	call   ffffffff80018300 <_ZN3Hal9LocalApic5GetIdEv>
ffffffff8001a9de:	89 c7                	mov    %eax,%edi
ffffffff8001a9e0:	e8 9b 7c 00 00       	call   ffffffff80022680 <_ZN3Smp7InitBspEj>

        Drivers::PS2::Initialize();
ffffffff8001a9e5:	e8 e6 6d ff ff       	call   ffffffff800117d0 <_ZN7Drivers3PS210InitializeEv>
        Drivers::PS2::Keyboard::Initialize();
ffffffff8001a9ea:	e8 31 62 ff ff       	call   ffffffff80010c20 <_ZN7Drivers3PS28Keyboard10InitializeEv>
        Drivers::PS2::Mouse::Initialize();
ffffffff8001a9ef:	e8 dc 67 ff ff       	call   ffffffff800111d0 <_ZN7Drivers3PS25Mouse10InitializeEv>

        Drivers::USB::Xhci::Initialize();
ffffffff8001a9f4:	e8 07 aa ff ff       	call   ffffffff80015400 <_ZN7Drivers3USB4Xhci10InitializeEv>

        Drivers::Net::E1000::Initialize();
ffffffff8001a9f9:	e8 42 37 ff ff       	call   ffffffff8000e140 <_ZN7Drivers3Net5E100010InitializeEv>
        if (!Drivers::Net::E1000::IsInitialized()) {
ffffffff8001a9fe:	e8 9d 43 ff ff       	call   ffffffff8000eda0 <_ZN7Drivers3Net5E100013IsInitializedEv>
ffffffff8001aa03:	84 c0                	test   %al,%al
ffffffff8001aa05:	0f 84 02 02 00 00    	je     ffffffff8001ac0d <kmain+0x54d>
            KernelLogStream(INFO, "Init") << "E1000 not found, trying E1000E...";
            Drivers::Net::E1000E::Initialize();
        }
        Net::Initialize();
ffffffff8001aa0b:	e8 c0 2e 00 00       	call   ffffffff8001d8d0 <_ZN3Net10InitializeEv>
    }
#endif

    Efi::SystemTable* ST = (Efi::SystemTable*)Memory::HHDM(system_table_request.response->address);
ffffffff8001aa10:	48 8b 05 71 57 fe ff 	mov    -0x1a88f(%rip),%rax        # ffffffff80000188 <_ZN12_GLOBAL__N_120system_table_requestE+0x28>
ffffffff8001aa17:	48 8b 3d 8a 1f 13 00 	mov    0x131f8a(%rip),%rdi        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001aa1e:	48 03 78 08          	add    0x8(%rax),%rdi
    Efi::Init(ST);
ffffffff8001aa22:	e8 a9 fa ff ff       	call   ffffffff8001a4d0 <_ZN3Efi4InitEPNS_11SystemTableE>

    // Initialize ramdisk from Limine modules
    if (module_request.response != nullptr && module_request.response->module_count > 0) {
ffffffff8001aa27:	48 8b 05 5a 56 fe ff 	mov    -0x1a9a6(%rip),%rax        # ffffffff80000088 <_ZN12_GLOBAL__N_114module_requestE+0x28>
        Kt::KernelLogStream(OK, "Modules") << "Found " << (uint64_t)module_request.response->module_count << " module(s)";
ffffffff8001aa2e:	48 c7 c2 0a bb 02 80 	mov    $0xffffffff8002bb0a,%rdx
    if (module_request.response != nullptr && module_request.response->module_count > 0) {
ffffffff8001aa35:	48 85 c0             	test   %rax,%rax
ffffffff8001aa38:	74 0e                	je     ffffffff8001aa48 <kmain+0x388>
ffffffff8001aa3a:	48 8b 05 47 56 fe ff 	mov    -0x1a9b9(%rip),%rax        # ffffffff80000088 <_ZN12_GLOBAL__N_114module_requestE+0x28>
ffffffff8001aa41:	48 83 78 08 00       	cmpq   $0x0,0x8(%rax)
ffffffff8001aa46:	75 7b                	jne    ffffffff8001aac3 <kmain+0x403>
                Kt::KernelLogStream(OK, "Modules") << "Ramdisk module at " << kcp::hex << (uint64_t)mod->address << kcp::dec << ", size=" << mod->size;
                Fs::Ramdisk::Initialize(mod->address, mod->size);
            }
        }
    } else {
        Kt::KernelLogStream(WARNING, "Modules") << "No modules loaded (ramdisk unavailable)";
ffffffff8001aa48:	be 01 00 00 00       	mov    $0x1,%esi
ffffffff8001aa4d:	48 8d bd 70 ff ff ff 	lea    -0x90(%rbp),%rdi
ffffffff8001aa54:	e8 07 85 ff ff       	call   ffffffff80012f60 <_ZN2Kt15KernelLogStreamC1ENS_14KernelLogLevelEPKc>
            Print(string);
ffffffff8001aa59:	48 c7 c7 f0 cd 02 80 	mov    $0xffffffff8002cdf0,%rdi
ffffffff8001aa60:	e8 5b 87 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001aa65:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001aa6c:	e8 4f 87 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001aa71:	83 2d 2c 4a 1c 00 01 	subl   $0x1,0x1c4a2c(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }

    // Initialize VFS and register ramdisk as drive 0
    Fs::Vfs::Initialize();
ffffffff8001aa78:	e8 23 cb ff ff       	call   ffffffff800175a0 <_ZN2Fs3Vfs10InitializeEv>
        Fs::Ramdisk::Close,
        Fs::Ramdisk::ReadDir,
        Fs::Ramdisk::Write,
        Fs::Ramdisk::Create
    };
    Fs::Vfs::RegisterDrive(0, &ramdiskDriver);
ffffffff8001aa7d:	48 c7 c6 20 e1 02 80 	mov    $0xffffffff8002e120,%rsi
ffffffff8001aa84:	31 ff                	xor    %edi,%edi
ffffffff8001aa86:	e8 25 cc ff ff       	call   ffffffff800176b0 <_ZN2Fs3Vfs13RegisterDriveEiPNS0_8FsDriverE>

    Zenith::InitializeSyscalls();
ffffffff8001aa8b:	e8 b0 f6 fe ff       	call   ffffffff8000a140 <_ZN6Zenith18InitializeSyscallsEv>

    Sched::Initialize();
ffffffff8001aa90:	e8 4b 64 00 00       	call   ffffffff80020ee0 <_ZN5Sched10InitializeEv>

    // Boot APs (after scheduler init, after timer calibration, after IDT)
    Smp::BootAPs(mp_request.response);
ffffffff8001aa95:	48 8b 3d ac 55 fe ff 	mov    -0x1aa54(%rip),%rdi        # ffffffff80000048 <_ZN12_GLOBAL__N_110mp_requestE+0x28>
ffffffff8001aa9c:	e8 ef 7c 00 00       	call   ffffffff80022790 <_ZN3Smp7BootAPsEP18limine_mp_response>

    Kt::SuppressKernelLog();
ffffffff8001aaa1:	e8 6a 87 00 00       	call   ffffffff80023210 <_ZN2Kt17SuppressKernelLogEv>
    Sched::Spawn("0:/os/init.elf");
ffffffff8001aaa6:	31 f6                	xor    %esi,%esi
ffffffff8001aaa8:	48 c7 c7 38 bb 02 80 	mov    $0xffffffff8002bb38,%rdi
ffffffff8001aaaf:	e8 8c 6b 00 00       	call   ffffffff80021640 <_ZN5Sched5SpawnEPKcS1_>

    // Enable preemptive scheduling via the APIC timer
    Timekeeping::EnableSchedulerTick();
ffffffff8001aab4:	e8 67 8b 00 00       	call   ffffffff80023620 <_ZN11Timekeeping19EnableSchedulerTickEv>
ffffffff8001aab9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

    // Main loop: halt until next interrupt
    for (;;) {
        asm volatile ("hlt");
ffffffff8001aac0:	f4                   	hlt
    for (;;) {
ffffffff8001aac1:	eb fd                	jmp    ffffffff8001aac0 <kmain+0x400>
        Kt::KernelLogStream(OK, "Modules") << "Found " << (uint64_t)module_request.response->module_count << " module(s)";
ffffffff8001aac3:	be 04 00 00 00       	mov    $0x4,%esi
ffffffff8001aac8:	48 8d bd 70 ff ff ff 	lea    -0x90(%rbp),%rdi
ffffffff8001aacf:	e8 8c 84 ff ff       	call   ffffffff80012f60 <_ZN2Kt15KernelLogStreamC1ENS_14KernelLogLevelEPKc>
            Print(string);
ffffffff8001aad4:	48 c7 c7 8b a6 02 80 	mov    $0xffffffff8002a68b,%rdi
ffffffff8001aadb:	e8 e0 86 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001aae0:	48 8b 05 a1 55 fe ff 	mov    -0x1aa5f(%rip),%rax        # ffffffff80000088 <_ZN12_GLOBAL__N_114module_requestE+0x28>
            localStream << item;
ffffffff8001aae7:	8b bd 70 ff ff ff    	mov    -0x90(%rbp),%edi
ffffffff8001aaed:	48 8b 70 08          	mov    0x8(%rax),%rsi
ffffffff8001aaf1:	e8 ba f9 ff ff       	call   ffffffff8001a4b0 <_ZN2KtlsERNS_15KernelOutStreamEm.isra.0>
            Print(string);
ffffffff8001aaf6:	48 c7 c7 12 bb 02 80 	mov    $0xffffffff8002bb12,%rdi
ffffffff8001aafd:	e8 be 86 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001ab02:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001ab09:	e8 b2 86 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001ab0e:	83 2d 8f 49 1c 00 01 	subl   $0x1,0x1c498f(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        for (uint64_t i = 0; i < module_request.response->module_count; i++) {
ffffffff8001ab15:	eb 2d                	jmp    ffffffff8001ab44 <kmain+0x484>
ffffffff8001ab17:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001ab1e:	00 00 00 00 
ffffffff8001ab22:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001ab29:	00 00 00 00 
ffffffff8001ab2d:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001ab34:	00 00 00 00 
ffffffff8001ab38:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001ab3f:	00 
ffffffff8001ab40:	49 83 c4 01          	add    $0x1,%r12
ffffffff8001ab44:	48 8b 05 3d 55 fe ff 	mov    -0x1aac3(%rip),%rax        # ffffffff80000088 <_ZN12_GLOBAL__N_114module_requestE+0x28>
ffffffff8001ab4b:	4c 3b 60 08          	cmp    0x8(%rax),%r12
ffffffff8001ab4f:	0f 83 23 ff ff ff    	jae    ffffffff8001aa78 <kmain+0x3b8>
            limine_file* mod = module_request.response->modules[i];
ffffffff8001ab55:	48 8b 05 2c 55 fe ff 	mov    -0x1aad4(%rip),%rax        # ffffffff80000088 <_ZN12_GLOBAL__N_114module_requestE+0x28>
ffffffff8001ab5c:	48 8b 40 10          	mov    0x10(%rax),%rax
ffffffff8001ab60:	4a 8b 1c e0          	mov    (%rax,%r12,8),%rbx
            const char* modString = mod->string;
ffffffff8001ab64:	48 8b 43 20          	mov    0x20(%rbx),%rax
            if (modString != nullptr &&
ffffffff8001ab68:	48 85 c0             	test   %rax,%rax
ffffffff8001ab6b:	74 d3                	je     ffffffff8001ab40 <kmain+0x480>
ffffffff8001ab6d:	80 38 72             	cmpb   $0x72,(%rax)
ffffffff8001ab70:	75 ce                	jne    ffffffff8001ab40 <kmain+0x480>
                modString[0] == 'r' && modString[1] == 'a' && modString[2] == 'm' &&
ffffffff8001ab72:	80 78 01 61          	cmpb   $0x61,0x1(%rax)
ffffffff8001ab76:	75 c8                	jne    ffffffff8001ab40 <kmain+0x480>
ffffffff8001ab78:	80 78 02 6d          	cmpb   $0x6d,0x2(%rax)
ffffffff8001ab7c:	75 c2                	jne    ffffffff8001ab40 <kmain+0x480>
ffffffff8001ab7e:	80 78 03 64          	cmpb   $0x64,0x3(%rax)
ffffffff8001ab82:	75 bc                	jne    ffffffff8001ab40 <kmain+0x480>
                modString[3] == 'd' && modString[4] == 'i' && modString[5] == 's' &&
ffffffff8001ab84:	80 78 04 69          	cmpb   $0x69,0x4(%rax)
ffffffff8001ab88:	75 b6                	jne    ffffffff8001ab40 <kmain+0x480>
ffffffff8001ab8a:	80 78 05 73          	cmpb   $0x73,0x5(%rax)
ffffffff8001ab8e:	75 b0                	jne    ffffffff8001ab40 <kmain+0x480>
ffffffff8001ab90:	80 78 06 6b          	cmpb   $0x6b,0x6(%rax)
ffffffff8001ab94:	75 aa                	jne    ffffffff8001ab40 <kmain+0x480>
                modString[6] == 'k' && modString[7] == '\0') {
ffffffff8001ab96:	80 78 07 00          	cmpb   $0x0,0x7(%rax)
ffffffff8001ab9a:	75 a4                	jne    ffffffff8001ab40 <kmain+0x480>
                Kt::KernelLogStream(OK, "Modules") << "Ramdisk module at " << kcp::hex << (uint64_t)mod->address << kcp::dec << ", size=" << mod->size;
ffffffff8001ab9c:	48 c7 c2 0a bb 02 80 	mov    $0xffffffff8002bb0a,%rdx
ffffffff8001aba3:	be 04 00 00 00       	mov    $0x4,%esi
ffffffff8001aba8:	48 8d bd 70 ff ff ff 	lea    -0x90(%rbp),%rdi
ffffffff8001abaf:	e8 ac 83 ff ff       	call   ffffffff80012f60 <_ZN2Kt15KernelLogStreamC1ENS_14KernelLogLevelEPKc>
            Print(string);
ffffffff8001abb4:	48 c7 c7 1d bb 02 80 	mov    $0xffffffff8002bb1d,%rdi
ffffffff8001abbb:	e8 00 86 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            localStream << item;
ffffffff8001abc0:	48 8b 73 08          	mov    0x8(%rbx),%rsi
ffffffff8001abc4:	bf 10 00 00 00       	mov    $0x10,%edi
ffffffff8001abc9:	e8 e2 f8 ff ff       	call   ffffffff8001a4b0 <_ZN2KtlsERNS_15KernelOutStreamEm.isra.0>
            Print(string);
ffffffff8001abce:	48 c7 c7 30 bb 02 80 	mov    $0xffffffff8002bb30,%rdi
ffffffff8001abd5:	e8 e6 85 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            localStream << item;
ffffffff8001abda:	48 8b 73 10          	mov    0x10(%rbx),%rsi
ffffffff8001abde:	bf 0a 00 00 00       	mov    $0xa,%edi
ffffffff8001abe3:	e8 c8 f8 ff ff       	call   ffffffff8001a4b0 <_ZN2KtlsERNS_15KernelOutStreamEm.isra.0>
            Print(string);
ffffffff8001abe8:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001abef:	e8 cc 85 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                Fs::Ramdisk::Initialize(mod->address, mod->size);
ffffffff8001abf4:	48 8b 73 10          	mov    0x10(%rbx),%rsi
ffffffff8001abf8:	48 8b 7b 08          	mov    0x8(%rbx),%rdi
            g_kernelLogDepth--;
ffffffff8001abfc:	83 2d a1 48 1c 00 01 	subl   $0x1,0x1c48a1(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001ac03:	e8 f8 bc ff ff       	call   ffffffff80016900 <_ZN2Fs7Ramdisk10InitializeEPvm>
ffffffff8001ac08:	e9 33 ff ff ff       	jmp    ffffffff8001ab40 <kmain+0x480>
            KernelLogStream(INFO, "Init") << "E1000 not found, trying E1000E...";
ffffffff8001ac0d:	48 c7 c2 05 bb 02 80 	mov    $0xffffffff8002bb05,%rdx
ffffffff8001ac14:	31 f6                	xor    %esi,%esi
ffffffff8001ac16:	48 8d bd 70 ff ff ff 	lea    -0x90(%rbp),%rdi
ffffffff8001ac1d:	e8 3e 83 ff ff       	call   ffffffff80012f60 <_ZN2Kt15KernelLogStreamC1ENS_14KernelLogLevelEPKc>
            Print(string);
ffffffff8001ac22:	48 c7 c7 c8 cd 02 80 	mov    $0xffffffff8002cdc8,%rdi
ffffffff8001ac29:	e8 92 85 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001ac2e:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001ac35:	e8 86 85 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001ac3a:	83 2d 63 48 1c 00 01 	subl   $0x1,0x1c4863(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Drivers::Net::E1000E::Initialize();
ffffffff8001ac41:	e8 3a 46 ff ff       	call   ffffffff8000f280 <_ZN7Drivers3Net6E1000E10InitializeEv>
ffffffff8001ac46:	e9 c0 fd ff ff       	jmp    ffffffff8001aa0b <kmain+0x34b>
            Graphics::Cursor::SetFramebuffer(
ffffffff8001ac4b:	e8 a0 32 ff ff       	call   ffffffff8000def0 <_ZN7Drivers8Graphics8IntelGPU8GetPitchEv>
ffffffff8001ac50:	49 89 c6             	mov    %rax,%r14
ffffffff8001ac53:	e8 88 32 ff ff       	call   ffffffff8000dee0 <_ZN7Drivers8Graphics8IntelGPU9GetHeightEv>
ffffffff8001ac58:	49 89 c5             	mov    %rax,%r13
ffffffff8001ac5b:	e8 70 32 ff ff       	call   ffffffff8000ded0 <_ZN7Drivers8Graphics8IntelGPU8GetWidthEv>
ffffffff8001ac60:	48 89 c3             	mov    %rax,%rbx
ffffffff8001ac63:	e8 58 32 ff ff       	call   ffffffff8000dec0 <_ZN7Drivers8Graphics8IntelGPU18GetFramebufferBaseEv>
ffffffff8001ac68:	4c 89 f1             	mov    %r14,%rcx
ffffffff8001ac6b:	4c 89 ea             	mov    %r13,%rdx
ffffffff8001ac6e:	48 89 de             	mov    %rbx,%rsi
ffffffff8001ac71:	48 89 c7             	mov    %rax,%rdi
ffffffff8001ac74:	e8 57 d3 ff ff       	call   ffffffff80017fd0 <_ZN8Graphics6Cursor14SetFramebufferEPjmmm>
ffffffff8001ac79:	e9 56 fd ff ff       	jmp    ffffffff8001a9d4 <kmain+0x314>
        Panic("System memory map missing!", nullptr);
ffffffff8001ac7e:	31 f6                	xor    %esi,%esi
ffffffff8001ac80:	48 c7 c7 ab ba 02 80 	mov    $0xffffffff8002baab,%rdi
ffffffff8001ac87:	e8 04 0f ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
ffffffff8001ac8c:	e9 19 fb ff ff       	jmp    ffffffff8001a7aa <kmain+0xea>
ffffffff8001ac91:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001ac98:	00 00 00 
ffffffff8001ac9b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff8001aca0 <_ZN6Memory13HeapAllocatorC1Ev>:
        size_t size = 0x1000 * n;

        InsertToFreelist(ptr, size);
    }

    HeapAllocator::HeapAllocator()
ffffffff8001aca0:	55                   	push   %rbp
        auto ptr = Memory::g_pfa->ReallocConsecutive(nullptr, n);
ffffffff8001aca1:	ba 32 00 00 00       	mov    $0x32,%edx
ffffffff8001aca6:	31 f6                	xor    %esi,%esi
    HeapAllocator::HeapAllocator()
ffffffff8001aca8:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001acab:	53                   	push   %rbx
ffffffff8001acac:	48 89 fb             	mov    %rdi,%rbx
ffffffff8001acaf:	48 83 ec 08          	sub    $0x8,%rsp
ffffffff8001acb3:	48 c7 07 00 00 00 00 	movq   $0x0,(%rdi)
    class IrqSpinlock {
ffffffff8001acba:	48 c7 47 08 00 00 00 	movq   $0x0,0x8(%rdi)
ffffffff8001acc1:	00 
ffffffff8001acc2:	48 c7 47 10 00 00 00 	movq   $0x0,0x10(%rdi)
ffffffff8001acc9:	00 
ffffffff8001acca:	48 c7 47 18 00 00 00 	movq   $0x0,0x18(%rdi)
ffffffff8001acd1:	00 
        auto ptr = Memory::g_pfa->ReallocConsecutive(nullptr, n);
ffffffff8001acd2:	48 8b 3d d7 1c 13 00 	mov    0x131cd7(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff8001acd9:	e8 62 05 00 00       	call   ffffffff8001b240 <_ZN6Memory18PageFrameAllocator18ReallocConsecutiveEPvi>
        auto prev_next = head.next;
ffffffff8001acde:	48 8b 53 18          	mov    0x18(%rbx),%rdx
        head.next->size = size;
ffffffff8001ace2:	48 c7 00 00 20 03 00 	movq   $0x32000,(%rax)
        head.next = (Node*)ptr;
ffffffff8001ace9:	48 89 43 18          	mov    %rax,0x18(%rbx)
    {
        InsertPagesToFreelist(0x32);
    }
ffffffff8001aced:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
        head.next->next = prev_next;
ffffffff8001acf1:	48 89 50 08          	mov    %rdx,0x8(%rax)
    }
ffffffff8001acf5:	c9                   	leave
ffffffff8001acf6:	c3                   	ret
ffffffff8001acf7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001acfe:	00 00 

ffffffff8001ad00 <_ZN6Memory13HeapAllocator7RequestEm>:

    void* HeapAllocator::Request(size_t size) {
ffffffff8001ad00:	55                   	push   %rbp
ffffffff8001ad01:	48 8d 47 10          	lea    0x10(%rdi),%rax
ffffffff8001ad05:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001ad08:	41 57                	push   %r15
ffffffff8001ad0a:	49 89 ff             	mov    %rdi,%r15
ffffffff8001ad0d:	41 56                	push   %r14
        Lock.Acquire();

        Node* current = head.next;
        Node* prev = &head;

        size_t sizeNeeded = size + sizeof(Header);
ffffffff8001ad0f:	4c 8d 76 10          	lea    0x10(%rsi),%r14
    void* HeapAllocator::Request(size_t size) {
ffffffff8001ad13:	41 55                	push   %r13
        }

        Lock.Release();

        // First pass allocation failed -- grow the heap
        size_t pagesNeeded = (sizeNeeded + 0xFFF) / 0x1000;
ffffffff8001ad15:	4c 8d ae 0f 10 00 00 	lea    0x100f(%rsi),%r13
    void* HeapAllocator::Request(size_t size) {
ffffffff8001ad1c:	41 54                	push   %r12
        size_t pagesNeeded = (sizeNeeded + 0xFFF) / 0x1000;
ffffffff8001ad1e:	49 c1 ed 0c          	shr    $0xc,%r13
    void* HeapAllocator::Request(size_t size) {
ffffffff8001ad22:	49 89 f4             	mov    %rsi,%r12
ffffffff8001ad25:	53                   	push   %rbx
ffffffff8001ad26:	48 83 ec 18          	sub    $0x18,%rsp
ffffffff8001ad2a:	48 89 45 c8          	mov    %rax,-0x38(%rbp)
        auto ptr = Memory::g_pfa->ReallocConsecutive(nullptr, n);
ffffffff8001ad2e:	44 89 6d c4          	mov    %r13d,-0x3c(%rbp)
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001ad32:	9c                   	pushf
ffffffff8001ad33:	5b                   	pop    %rbx
ffffffff8001ad34:	fa                   	cli
            inner.Acquire();
ffffffff8001ad35:	4c 89 ff             	mov    %r15,%rdi
ffffffff8001ad38:	e8 73 13 ff ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
        Node* current = head.next;
ffffffff8001ad3d:	49 8b 47 18          	mov    0x18(%r15),%rax
            savedFlags = flags;
ffffffff8001ad41:	49 89 5f 08          	mov    %rbx,0x8(%r15)
        Node* prev = &head;
ffffffff8001ad45:	48 8b 7d c8          	mov    -0x38(%rbp),%rdi
        while (current != nullptr) {
ffffffff8001ad49:	48 85 c0             	test   %rax,%rax
ffffffff8001ad4c:	75 1d                	jne    ffffffff8001ad6b <_ZN6Memory13HeapAllocator7RequestEm+0x6b>
ffffffff8001ad4e:	eb 78                	jmp    ffffffff8001adc8 <_ZN6Memory13HeapAllocator7RequestEm+0xc8>
ffffffff8001ad50:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001ad57:	00 00 00 00 
ffffffff8001ad5b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff8001ad60:	48 89 c7             	mov    %rax,%rdi
ffffffff8001ad63:	48 85 d2             	test   %rdx,%rdx
ffffffff8001ad66:	74 60                	je     ffffffff8001adc8 <_ZN6Memory13HeapAllocator7RequestEm+0xc8>
ffffffff8001ad68:	48 89 d0             	mov    %rdx,%rax
            if (current->size >= sizeNeeded) {
ffffffff8001ad6b:	48 8b 30             	mov    (%rax),%rsi
                prev->next = current->next;
ffffffff8001ad6e:	48 8b 50 08          	mov    0x8(%rax),%rdx
            if (current->size >= sizeNeeded) {
ffffffff8001ad72:	4c 39 f6             	cmp    %r14,%rsi
ffffffff8001ad75:	72 e9                	jb     ffffffff8001ad60 <_ZN6Memory13HeapAllocator7RequestEm+0x60>
                prev->next = current->next;
ffffffff8001ad77:	48 89 57 08          	mov    %rdx,0x8(%rdi)
                header->size = size;
ffffffff8001ad7b:	4c 89 60 08          	mov    %r12,0x8(%rax)
                void* block = (void*)((uintptr_t)header + sizeof(Header));
ffffffff8001ad7f:	4c 8d 60 10          	lea    0x10(%rax),%r12
                header->magic = headerMagic;
ffffffff8001ad83:	48 c7 00 b4 9a ef 6c 	movq   $0x6cef9ab4,(%rax)
                if (locatedBlockSize > sizeNeeded) {
ffffffff8001ad8a:	49 39 f6             	cmp    %rsi,%r14
ffffffff8001ad8d:	73 19                	jae    ffffffff8001ada8 <_ZN6Memory13HeapAllocator7RequestEm+0xa8>
        auto prev_next = head.next;
ffffffff8001ad8f:	49 8b 57 18          	mov    0x18(%r15),%rdx
                    void* rest = (void*)((uintptr_t)header + sizeNeeded);
ffffffff8001ad93:	4c 01 f0             	add    %r14,%rax
                    auto newBlockSize = locatedBlockSize - sizeNeeded;
ffffffff8001ad96:	4c 29 f6             	sub    %r14,%rsi
        head.next = (Node*)ptr;
ffffffff8001ad99:	49 89 47 18          	mov    %rax,0x18(%r15)
        head.next->next = prev_next;
ffffffff8001ad9d:	48 89 50 08          	mov    %rdx,0x8(%rax)
        head.next->size = size;
ffffffff8001ada1:	49 8b 47 18          	mov    0x18(%r15),%rax
                    auto newBlockSize = locatedBlockSize - sizeNeeded;
ffffffff8001ada5:	48 89 30             	mov    %rsi,(%rax)
            inner.Release();
ffffffff8001ada8:	4c 89 ff             	mov    %r15,%rdi
ffffffff8001adab:	e8 20 13 ff ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001adb0:	53                   	push   %rbx
ffffffff8001adb1:	9d                   	popf
        InsertPagesToFreelist(pagesNeeded);

        return Request(size);
    }
ffffffff8001adb2:	48 83 c4 18          	add    $0x18,%rsp
ffffffff8001adb6:	4c 89 e0             	mov    %r12,%rax
ffffffff8001adb9:	5b                   	pop    %rbx
ffffffff8001adba:	41 5c                	pop    %r12
ffffffff8001adbc:	41 5d                	pop    %r13
ffffffff8001adbe:	41 5e                	pop    %r14
ffffffff8001adc0:	41 5f                	pop    %r15
ffffffff8001adc2:	5d                   	pop    %rbp
ffffffff8001adc3:	c3                   	ret
ffffffff8001adc4:	0f 1f 40 00          	nopl   0x0(%rax)
            inner.Release();
ffffffff8001adc8:	4c 89 ff             	mov    %r15,%rdi
ffffffff8001adcb:	e8 00 13 ff ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001add0:	53                   	push   %rbx
ffffffff8001add1:	9d                   	popf
        auto ptr = Memory::g_pfa->ReallocConsecutive(nullptr, n);
ffffffff8001add2:	48 8b 3d d7 1b 13 00 	mov    0x131bd7(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff8001add9:	8b 55 c4             	mov    -0x3c(%rbp),%edx
ffffffff8001addc:	31 f6                	xor    %esi,%esi
ffffffff8001adde:	e8 5d 04 00 00       	call   ffffffff8001b240 <_ZN6Memory18PageFrameAllocator18ReallocConsecutiveEPvi>
        auto prev_next = head.next;
ffffffff8001ade3:	49 8b 57 18          	mov    0x18(%r15),%rdx
        head.next = (Node*)ptr;
ffffffff8001ade7:	49 89 47 18          	mov    %rax,0x18(%r15)
        head.next->next = prev_next;
ffffffff8001adeb:	48 89 50 08          	mov    %rdx,0x8(%rax)
        size_t size = 0x1000 * n;
ffffffff8001adef:	4c 89 ea             	mov    %r13,%rdx
        head.next->size = size;
ffffffff8001adf2:	49 8b 47 18          	mov    0x18(%r15),%rax
        size_t size = 0x1000 * n;
ffffffff8001adf6:	48 c1 e2 0c          	shl    $0xc,%rdx
ffffffff8001adfa:	48 89 10             	mov    %rdx,(%rax)
    }
ffffffff8001adfd:	e9 30 ff ff ff       	jmp    ffffffff8001ad32 <_ZN6Memory13HeapAllocator7RequestEm+0x32>
ffffffff8001ae02:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001ae09:	00 00 00 
ffffffff8001ae0c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8001ae10 <_ZN6Memory13HeapAllocator4FreeEPv>:
        }

        return new_block;
    }

    void HeapAllocator::Free(void* ptr) {
ffffffff8001ae10:	55                   	push   %rbp
ffffffff8001ae11:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001ae14:	41 55                	push   %r13
ffffffff8001ae16:	41 54                	push   %r12
ffffffff8001ae18:	49 89 f4             	mov    %rsi,%r12
ffffffff8001ae1b:	53                   	push   %rbx
ffffffff8001ae1c:	48 89 fb             	mov    %rdi,%rbx
ffffffff8001ae1f:	48 83 ec 08          	sub    $0x8,%rsp
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001ae23:	9c                   	pushf
ffffffff8001ae24:	41 5d                	pop    %r13
ffffffff8001ae26:	fa                   	cli
            inner.Acquire();
ffffffff8001ae27:	e8 84 12 ff ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
            savedFlags = flags;
ffffffff8001ae2c:	4c 89 6b 08          	mov    %r13,0x8(%rbx)
        Lock.Acquire();
        
        Header* header = GetHeader(ptr);
        auto size = header->size;
        
        if (header->magic != headerMagic) {
ffffffff8001ae30:	49 81 7c 24 f0 b4 9a 	cmpq   $0x6cef9ab4,-0x10(%r12)
ffffffff8001ae37:	ef 6c 
ffffffff8001ae39:	74 1d                	je     ffffffff8001ae58 <_ZN6Memory13HeapAllocator4FreeEPv+0x48>
        void* actualBlock = (void*)header;

        InsertToFreelist(actualBlock, actualSize);

        Lock.Release();
    }
ffffffff8001ae3b:	48 83 c4 08          	add    $0x8,%rsp
            Panic("Bad magic in HeapAllocator header", nullptr);
ffffffff8001ae3f:	31 f6                	xor    %esi,%esi
ffffffff8001ae41:	48 c7 c7 18 ce 02 80 	mov    $0xffffffff8002ce18,%rdi
    }
ffffffff8001ae48:	5b                   	pop    %rbx
ffffffff8001ae49:	41 5c                	pop    %r12
ffffffff8001ae4b:	41 5d                	pop    %r13
ffffffff8001ae4d:	5d                   	pop    %rbp
            Panic("Bad magic in HeapAllocator header", nullptr);
ffffffff8001ae4e:	e9 3d 0d ff ff       	jmp    ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
ffffffff8001ae53:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        auto prev_next = head.next;
ffffffff8001ae58:	48 8b 53 18          	mov    0x18(%rbx),%rdx
        auto actualSize = size + sizeof(Header);
ffffffff8001ae5c:	49 8b 44 24 f8       	mov    -0x8(%r12),%rax
        return (Header*)(block - sizeof(Header));
ffffffff8001ae61:	49 8d 4c 24 f0       	lea    -0x10(%r12),%rcx
            inner.Release();
ffffffff8001ae66:	48 89 df             	mov    %rbx,%rdi
ffffffff8001ae69:	48 89 4b 18          	mov    %rcx,0x18(%rbx)
        head.next->next = prev_next;
ffffffff8001ae6d:	49 89 54 24 f8       	mov    %rdx,-0x8(%r12)
        head.next->size = size;
ffffffff8001ae72:	48 8b 53 18          	mov    0x18(%rbx),%rdx
        auto actualSize = size + sizeof(Header);
ffffffff8001ae76:	48 83 c0 10          	add    $0x10,%rax
        head.next->size = size;
ffffffff8001ae7a:	48 89 02             	mov    %rax,(%rdx)
ffffffff8001ae7d:	e8 4e 12 ff ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001ae82:	41 55                	push   %r13
ffffffff8001ae84:	9d                   	popf
    }
ffffffff8001ae85:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001ae89:	5b                   	pop    %rbx
ffffffff8001ae8a:	41 5c                	pop    %r12
ffffffff8001ae8c:	41 5d                	pop    %r13
ffffffff8001ae8e:	5d                   	pop    %rbp
ffffffff8001ae8f:	c3                   	ret

ffffffff8001ae90 <_ZN6Memory13HeapAllocator7ReallocEPvm>:
    void* HeapAllocator::Realloc(void* ptr, size_t size) {
ffffffff8001ae90:	55                   	push   %rbp
ffffffff8001ae91:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001ae94:	41 56                	push   %r14
ffffffff8001ae96:	49 89 f6             	mov    %rsi,%r14
        auto new_block = Request(size);
ffffffff8001ae99:	48 89 d6             	mov    %rdx,%rsi
    void* HeapAllocator::Realloc(void* ptr, size_t size) {
ffffffff8001ae9c:	41 55                	push   %r13
ffffffff8001ae9e:	49 89 fd             	mov    %rdi,%r13
ffffffff8001aea1:	41 54                	push   %r12
ffffffff8001aea3:	53                   	push   %rbx
ffffffff8001aea4:	48 89 d3             	mov    %rdx,%rbx
        auto new_block = Request(size);
ffffffff8001aea7:	e8 54 fe ff ff       	call   ffffffff8001ad00 <_ZN6Memory13HeapAllocator7RequestEm>
ffffffff8001aeac:	49 89 c4             	mov    %rax,%r12
        if (ptr != nullptr && new_block != nullptr) {
ffffffff8001aeaf:	4d 85 f6             	test   %r14,%r14
ffffffff8001aeb2:	74 05                	je     ffffffff8001aeb9 <_ZN6Memory13HeapAllocator7ReallocEPvm+0x29>
ffffffff8001aeb4:	48 85 c0             	test   %rax,%rax
ffffffff8001aeb7:	75 0f                	jne    ffffffff8001aec8 <_ZN6Memory13HeapAllocator7ReallocEPvm+0x38>
    }
ffffffff8001aeb9:	5b                   	pop    %rbx
ffffffff8001aeba:	4c 89 e0             	mov    %r12,%rax
ffffffff8001aebd:	41 5c                	pop    %r12
ffffffff8001aebf:	41 5d                	pop    %r13
ffffffff8001aec1:	41 5e                	pop    %r14
ffffffff8001aec3:	5d                   	pop    %rbp
ffffffff8001aec4:	c3                   	ret
ffffffff8001aec5:	0f 1f 00             	nopl   (%rax)
            size_t copySize = (oldSize < size) ? oldSize : size;
ffffffff8001aec8:	49 8b 46 f8          	mov    -0x8(%r14),%rax
            memcpy(new_block, ptr, copySize);
ffffffff8001aecc:	4c 89 f6             	mov    %r14,%rsi
ffffffff8001aecf:	4c 89 e7             	mov    %r12,%rdi
            size_t copySize = (oldSize < size) ? oldSize : size;
ffffffff8001aed2:	48 39 c3             	cmp    %rax,%rbx
ffffffff8001aed5:	48 0f 46 c3          	cmovbe %rbx,%rax
ffffffff8001aed9:	48 89 c2             	mov    %rax,%rdx
            memcpy(new_block, ptr, copySize);
ffffffff8001aedc:	e8 ff f2 ff ff       	call   ffffffff8001a1e0 <memcpy>
            Free(ptr);
ffffffff8001aee1:	4c 89 f6             	mov    %r14,%rsi
ffffffff8001aee4:	4c 89 ef             	mov    %r13,%rdi
ffffffff8001aee7:	e8 24 ff ff ff       	call   ffffffff8001ae10 <_ZN6Memory13HeapAllocator4FreeEPv>
    }
ffffffff8001aeec:	5b                   	pop    %rbx
ffffffff8001aeed:	4c 89 e0             	mov    %r12,%rax
ffffffff8001aef0:	41 5c                	pop    %r12
ffffffff8001aef2:	41 5d                	pop    %r13
ffffffff8001aef4:	41 5e                	pop    %r14
ffffffff8001aef6:	5d                   	pop    %rbp
ffffffff8001aef7:	c3                   	ret
ffffffff8001aef8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001aeff:	00 

ffffffff8001af00 <_ZN6Memory13HeapAllocator4WalkEv>:
    
    // Traverses the Allocator's linked list for debugging
    void HeapAllocator::Walk() {
ffffffff8001af00:	55                   	push   %rbp
            g_kernelLogDepth++;
ffffffff8001af01:	8b 05 9d 45 1c 00    	mov    0x1c459d(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001af07:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001af0a:	41 54                	push   %r12
ffffffff8001af0c:	53                   	push   %rbx
        Node* current = {head.next};
ffffffff8001af0d:	48 8b 5f 18          	mov    0x18(%rdi),%rbx
        size_t i{0};

        while (current != nullptr) {
ffffffff8001af11:	48 85 db             	test   %rbx,%rbx
ffffffff8001af14:	0f 84 ce 00 00 00    	je     ffffffff8001afe8 <_ZN6Memory13HeapAllocator4WalkEv+0xe8>
ffffffff8001af1a:	45 31 e4             	xor    %r12d,%r12d
ffffffff8001af1d:	0f 1f 00             	nopl   (%rax)
ffffffff8001af20:	83 c0 01             	add    $0x1,%eax
            Print(string);
ffffffff8001af23:	48 c7 c7 ef ba 02 80 	mov    $0xffffffff8002baef,%rdi
            g_kernelLogDepth++;
ffffffff8001af2a:	89 05 74 45 1c 00    	mov    %eax,0x1c4574(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001af30:	e8 8b 82 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001af35:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001af3c:	e8 7f 82 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001af41:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001af48:	e8 73 82 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001af4d:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff8001af54:	e8 67 82 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001af59:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001af60:	e8 5b 82 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001af65:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001af6a:	4c 89 e7             	mov    %r12,%rdi
            Kt::KernelLogStream(Kt::DEBUG, "HeapAllocator") << base::dec << i << " " << current->size << " bytes & address 0x" << base::hex << (uint64_t)current;
            current = current->next;
            i++;
ffffffff8001af6d:	49 83 c4 01          	add    $0x1,%r12
ffffffff8001af71:	e8 1a f5 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001af76:	48 89 c7             	mov    %rax,%rdi
ffffffff8001af79:	e8 42 82 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001af7e:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff8001af85:	e8 36 82 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001af8a:	48 8b 3b             	mov    (%rbx),%rdi
ffffffff8001af8d:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001af92:	e8 f9 f4 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001af97:	48 89 c7             	mov    %rax,%rdi
ffffffff8001af9a:	e8 21 82 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001af9f:	48 c7 c7 47 bb 02 80 	mov    $0xffffffff8002bb47,%rdi
ffffffff8001afa6:	e8 15 82 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001afab:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8001afb0:	48 89 df             	mov    %rbx,%rdi
ffffffff8001afb3:	e8 d8 f4 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001afb8:	48 89 c7             	mov    %rax,%rdi
ffffffff8001afbb:	e8 00 82 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001afc0:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001afc7:	e8 f4 81 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001afcc:	8b 05 d2 44 1c 00    	mov    0x1c44d2(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            current = current->next;
ffffffff8001afd2:	48 8b 5b 08          	mov    0x8(%rbx),%rbx
ffffffff8001afd6:	83 e8 01             	sub    $0x1,%eax
ffffffff8001afd9:	89 05 c5 44 1c 00    	mov    %eax,0x1c44c5(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        while (current != nullptr) {
ffffffff8001afdf:	48 85 db             	test   %rbx,%rbx
ffffffff8001afe2:	0f 85 38 ff ff ff    	jne    ffffffff8001af20 <_ZN6Memory13HeapAllocator4WalkEv+0x20>
        }
    }
ffffffff8001afe8:	5b                   	pop    %rbx
ffffffff8001afe9:	41 5c                	pop    %r12
ffffffff8001afeb:	5d                   	pop    %rbp
ffffffff8001afec:	c3                   	ret
ffffffff8001afed:	0f 1f 00             	nopl   (%rax)

ffffffff8001aff0 <_ZN6Memory4ScanEP22limine_memmap_response>:
#include "Heap.hpp"

using namespace Kt;

namespace Memory {
    LargestSection Scan(limine_memmap_response* mmap) {
ffffffff8001aff0:	55                   	push   %rbp
ffffffff8001aff1:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001aff4:	53                   	push   %rbx
ffffffff8001aff5:	48 83 ec 08          	sub    $0x8,%rsp
        LargestSection currentLargestSection{};

        for (size_t i = 0; i < mmap->entry_count; i++) {
ffffffff8001aff9:	48 8b 5f 08          	mov    0x8(%rdi),%rbx
ffffffff8001affd:	48 85 db             	test   %rbx,%rbx
ffffffff8001b000:	74 5e                	je     ffffffff8001b060 <_ZN6Memory4ScanEP22limine_memmap_response+0x70>
ffffffff8001b002:	48 8b 57 10          	mov    0x10(%rdi),%rdx
        LargestSection currentLargestSection{};
ffffffff8001b006:	31 ff                	xor    %edi,%edi
ffffffff8001b008:	48 8d 04 da          	lea    (%rdx,%rbx,8),%rax
ffffffff8001b00c:	31 db                	xor    %ebx,%ebx
ffffffff8001b00e:	66 90                	xchg   %ax,%ax
            auto entry = mmap->entries[i];
ffffffff8001b010:	48 8b 0a             	mov    (%rdx),%rcx

            if (entry->base == 0) {
ffffffff8001b013:	48 8b 31             	mov    (%rcx),%rsi
ffffffff8001b016:	48 85 f6             	test   %rsi,%rsi
ffffffff8001b019:	74 25                	je     ffffffff8001b040 <_ZN6Memory4ScanEP22limine_memmap_response+0x50>
                continue;
            }
            
            if (entry->type == LIMINE_MEMMAP_USABLE) {
ffffffff8001b01b:	48 83 79 10 00       	cmpq   $0x0,0x10(%rcx)
ffffffff8001b020:	75 1e                	jne    ffffffff8001b040 <_ZN6Memory4ScanEP22limine_memmap_response+0x50>
                if (entry->length > currentLargestSection.size) {
ffffffff8001b022:	48 8b 49 08          	mov    0x8(%rcx),%rcx
ffffffff8001b026:	48 39 cb             	cmp    %rcx,%rbx
ffffffff8001b029:	73 15                	jae    ffffffff8001b040 <_ZN6Memory4ScanEP22limine_memmap_response+0x50>
                    currentLargestSection = {
ffffffff8001b02b:	48 89 cb             	mov    %rcx,%rbx
ffffffff8001b02e:	48 89 f7             	mov    %rsi,%rdi
ffffffff8001b031:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001b038:	00 00 00 00 
ffffffff8001b03c:	0f 1f 40 00          	nopl   0x0(%rax)
        for (size_t i = 0; i < mmap->entry_count; i++) {
ffffffff8001b040:	48 83 c2 08          	add    $0x8,%rdx
ffffffff8001b044:	48 39 d0             	cmp    %rdx,%rax
ffffffff8001b047:	75 c7                	jne    ffffffff8001b010 <_ZN6Memory4ScanEP22limine_memmap_response+0x20>
                    };
                }
            }
        }

        [[unlikely]] if (currentLargestSection.address == 0) {
ffffffff8001b049:	48 85 ff             	test   %rdi,%rdi
ffffffff8001b04c:	74 12                	je     ffffffff8001b060 <_ZN6Memory4ScanEP22limine_memmap_response+0x70>
            Panic("Couldn't find a usable memory section.", nullptr);
        }

        return currentLargestSection;
ffffffff8001b04e:	48 89 da             	mov    %rbx,%rdx
ffffffff8001b051:	48 89 f8             	mov    %rdi,%rax
    }
ffffffff8001b054:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff8001b058:	c9                   	leave
ffffffff8001b059:	c3                   	ret
ffffffff8001b05a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            Panic("Couldn't find a usable memory section.", nullptr);
ffffffff8001b060:	48 c7 c7 40 ce 02 80 	mov    $0xffffffff8002ce40,%rdi
ffffffff8001b067:	31 f6                	xor    %esi,%esi
ffffffff8001b069:	e8 22 0b ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
ffffffff8001b06e:	31 ff                	xor    %edi,%edi
        return currentLargestSection;
ffffffff8001b070:	48 89 da             	mov    %rbx,%rdx
    }
ffffffff8001b073:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff8001b077:	c9                   	leave
        return currentLargestSection;
ffffffff8001b078:	48 89 f8             	mov    %rdi,%rax
    }
ffffffff8001b07b:	c3                   	ret
ffffffff8001b07c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8001b080 <_ZN6Memory18PageFrameAllocatorC1ENS_14LargestSectionE>:
#include <Terminal/Terminal.hpp>
#include <CppLib/Spinlock.hpp>
#include <Common/Panic.hpp>

namespace Memory {
    PageFrameAllocator::PageFrameAllocator(LargestSection section) {
ffffffff8001b080:	55                   	push   %rbp
ffffffff8001b081:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001b084:	53                   	push   %rbx
ffffffff8001b085:	48 89 d3             	mov    %rdx,%rbx
ffffffff8001b088:	48 83 ec 08          	sub    $0x8,%rsp
ffffffff8001b08c:	48 03 35 15 19 13 00 	add    0x131915(%rip),%rsi        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        /* we need the virtual address rather than the physical address, so we call the helper */
        g_section = LargestSection{
ffffffff8001b093:	48 89 57 28          	mov    %rdx,0x28(%rdi)
ffffffff8001b097:	48 89 77 20          	mov    %rsi,0x20(%rdi)
            .address = HHDM(section.address),
            .size = section.size
        };

        head.next = (Page*)g_section.address;
ffffffff8001b09b:	48 89 77 08          	mov    %rsi,0x8(%rdi)
      : __atomic_flag_base{ _S_init(__i) }
ffffffff8001b09f:	c6 47 10 00          	movb   $0x0,0x10(%rdi)
    PageFrameAllocator::PageFrameAllocator(LargestSection section) {
ffffffff8001b0a3:	48 c7 07 00 00 00 00 	movq   $0x0,(%rdi)
        head.next->size = section.size;
ffffffff8001b0aa:	48 89 16             	mov    %rdx,(%rsi)
        head.next->next = nullptr;
ffffffff8001b0ad:	48 c7 46 08 00 00 00 	movq   $0x0,0x8(%rsi)
ffffffff8001b0b4:	00 
    PageFrameAllocator::PageFrameAllocator(LargestSection section) {
ffffffff8001b0b5:	48 c7 47 18 00 00 00 	movq   $0x0,0x18(%rdi)
ffffffff8001b0bc:	00 
            Print(string);
ffffffff8001b0bd:	48 c7 c7 d3 ba 02 80 	mov    $0xffffffff8002bad3,%rdi
            g_kernelLogDepth++;
ffffffff8001b0c4:	83 05 d9 43 1c 00 01 	addl   $0x1,0x1c43d9(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001b0cb:	e8 f0 80 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b0d0:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001b0d7:	e8 e4 80 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b0dc:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001b0e3:	e8 d8 80 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b0e8:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff8001b0ef:	e8 cc 80 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b0f4:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001b0fb:	e8 c0 80 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b100:	48 c7 c7 5b bb 02 80 	mov    $0xffffffff8002bb5b,%rdi
ffffffff8001b107:	e8 b4 80 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001b10c:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001b111:	48 89 df             	mov    %rbx,%rdi
ffffffff8001b114:	e8 77 f3 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001b119:	48 89 c7             	mov    %rax,%rdi
ffffffff8001b11c:	e8 9f 80 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001b121:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001b128:	e8 93 80 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001b12d:	83 2d 70 43 1c 00 01 	subl   $0x1,0x1c4370(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

        Kt::KernelLogStream(Kt::DEBUG, "PageFrameAllocator") << "New pool size: " << section.size;
    }
ffffffff8001b134:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff8001b138:	c9                   	leave
ffffffff8001b139:	c3                   	ret
ffffffff8001b13a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)

ffffffff8001b140 <_ZN6Memory18PageFrameAllocator8AllocateEv>:

    void* PageFrameAllocator::Allocate() {
ffffffff8001b140:	55                   	push   %rbp
ffffffff8001b141:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001b144:	41 56                	push   %r14
ffffffff8001b146:	41 55                	push   %r13
ffffffff8001b148:	41 54                	push   %r12
ffffffff8001b14a:	49 89 fc             	mov    %rdi,%r12
ffffffff8001b14d:	53                   	push   %rbx
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001b14e:	9c                   	pushf
ffffffff8001b14f:	41 5d                	pop    %r13
ffffffff8001b151:	fa                   	cli
            inner.Acquire();
ffffffff8001b152:	4c 8d 77 10          	lea    0x10(%rdi),%r14
ffffffff8001b156:	4c 89 f7             	mov    %r14,%rdi
ffffffff8001b159:	e8 52 0f ff ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
        Lock.Acquire();

        Page* current = head.next;
ffffffff8001b15e:	49 8b 5c 24 08       	mov    0x8(%r12),%rbx
            savedFlags = flags;
ffffffff8001b163:	4d 89 6c 24 18       	mov    %r13,0x18(%r12)
        Page* prev = &head;

        while (current != nullptr) {
ffffffff8001b168:	4c 89 e7             	mov    %r12,%rdi
ffffffff8001b16b:	48 85 db             	test   %rbx,%rbx
ffffffff8001b16e:	75 1f                	jne    ffffffff8001b18f <_ZN6Memory18PageFrameAllocator8AllocateEv+0x4f>
ffffffff8001b170:	eb 5e                	jmp    ffffffff8001b1d0 <_ZN6Memory18PageFrameAllocator8AllocateEv+0x90>
ffffffff8001b172:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001b179:	00 00 00 00 
ffffffff8001b17d:	0f 1f 00             	nopl   (%rax)
                    return (void*)current_end_addr - 0x1000;
                }
            }

            prev = current;
            current = current->next;
ffffffff8001b180:	48 8b 43 08          	mov    0x8(%rbx),%rax
        while (current != nullptr) {
ffffffff8001b184:	48 89 df             	mov    %rbx,%rdi
ffffffff8001b187:	48 85 c0             	test   %rax,%rax
ffffffff8001b18a:	74 44                	je     ffffffff8001b1d0 <_ZN6Memory18PageFrameAllocator8AllocateEv+0x90>
ffffffff8001b18c:	48 89 c3             	mov    %rax,%rbx
            if (current->size >= 0x1000) {
ffffffff8001b18f:	4c 8b 23             	mov    (%rbx),%r12
ffffffff8001b192:	49 81 fc ff 0f 00 00 	cmp    $0xfff,%r12
ffffffff8001b199:	76 e5                	jbe    ffffffff8001b180 <_ZN6Memory18PageFrameAllocator8AllocateEv+0x40>
                if (new_size == 0) {
ffffffff8001b19b:	49 81 fc 00 10 00 00 	cmp    $0x1000,%r12
ffffffff8001b1a2:	74 4c                	je     ffffffff8001b1f0 <_ZN6Memory18PageFrameAllocator8AllocateEv+0xb0>
                    current->size -= 0x1000;
ffffffff8001b1a4:	49 8d 84 24 00 f0 ff 	lea    -0x1000(%r12),%rax
ffffffff8001b1ab:	ff 
            inner.Release();
ffffffff8001b1ac:	4c 89 f7             	mov    %r14,%rdi
ffffffff8001b1af:	48 89 03             	mov    %rax,(%rbx)
ffffffff8001b1b2:	e8 19 0f ff ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001b1b7:	41 55                	push   %r13
ffffffff8001b1b9:	9d                   	popf
                    return (void*)current_end_addr - 0x1000;
ffffffff8001b1ba:	4a 8d 9c 23 00 f0 ff 	lea    -0x1000(%rbx,%r12,1),%rbx
ffffffff8001b1c1:	ff 
        }

        Lock.Release();
        return nullptr;
    }
ffffffff8001b1c2:	48 89 d8             	mov    %rbx,%rax
ffffffff8001b1c5:	5b                   	pop    %rbx
ffffffff8001b1c6:	41 5c                	pop    %r12
ffffffff8001b1c8:	41 5d                	pop    %r13
ffffffff8001b1ca:	41 5e                	pop    %r14
ffffffff8001b1cc:	5d                   	pop    %rbp
ffffffff8001b1cd:	c3                   	ret
ffffffff8001b1ce:	66 90                	xchg   %ax,%ax
            inner.Release();
ffffffff8001b1d0:	4c 89 f7             	mov    %r14,%rdi
ffffffff8001b1d3:	e8 f8 0e ff ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001b1d8:	41 55                	push   %r13
ffffffff8001b1da:	9d                   	popf
        return nullptr;
ffffffff8001b1db:	31 db                	xor    %ebx,%ebx
    }
ffffffff8001b1dd:	48 89 d8             	mov    %rbx,%rax
ffffffff8001b1e0:	5b                   	pop    %rbx
ffffffff8001b1e1:	41 5c                	pop    %r12
ffffffff8001b1e3:	41 5d                	pop    %r13
ffffffff8001b1e5:	41 5e                	pop    %r14
ffffffff8001b1e7:	5d                   	pop    %rbp
ffffffff8001b1e8:	c3                   	ret
ffffffff8001b1e9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
                    prev->next = current->next;
ffffffff8001b1f0:	48 8b 43 08          	mov    0x8(%rbx),%rax
ffffffff8001b1f4:	48 89 47 08          	mov    %rax,0x8(%rdi)
            inner.Release();
ffffffff8001b1f8:	4c 89 f7             	mov    %r14,%rdi
ffffffff8001b1fb:	e8 d0 0e ff ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001b200:	41 55                	push   %r13
ffffffff8001b202:	9d                   	popf
    }
ffffffff8001b203:	48 89 d8             	mov    %rbx,%rax
ffffffff8001b206:	5b                   	pop    %rbx
ffffffff8001b207:	41 5c                	pop    %r12
ffffffff8001b209:	41 5d                	pop    %r13
ffffffff8001b20b:	41 5e                	pop    %r14
ffffffff8001b20d:	5d                   	pop    %rbp
ffffffff8001b20e:	c3                   	ret
ffffffff8001b20f:	90                   	nop

ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>:

    void* PageFrameAllocator::AllocateZeroed() {
ffffffff8001b210:	55                   	push   %rbp
ffffffff8001b211:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001b214:	53                   	push   %rbx
ffffffff8001b215:	48 83 ec 08          	sub    $0x8,%rsp
        auto page = Allocate();
ffffffff8001b219:	e8 22 ff ff ff       	call   ffffffff8001b140 <_ZN6Memory18PageFrameAllocator8AllocateEv>
        memset(page, 0, 0x1000);
ffffffff8001b21e:	ba 00 10 00 00       	mov    $0x1000,%edx
ffffffff8001b223:	31 f6                	xor    %esi,%esi
        auto page = Allocate();
ffffffff8001b225:	48 89 c3             	mov    %rax,%rbx
        memset(page, 0, 0x1000);
ffffffff8001b228:	48 89 c7             	mov    %rax,%rdi
ffffffff8001b22b:	e8 f0 ef ff ff       	call   ffffffff8001a220 <memset>

        return page;
    }
ffffffff8001b230:	48 89 d8             	mov    %rbx,%rax
ffffffff8001b233:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff8001b237:	c9                   	leave
ffffffff8001b238:	c3                   	ret
ffffffff8001b239:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff8001b240 <_ZN6Memory18PageFrameAllocator18ReallocConsecutiveEPvi>:

    void* PageFrameAllocator::ReallocConsecutive(void* ptr, int n) {
ffffffff8001b240:	55                   	push   %rbp
ffffffff8001b241:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001b244:	41 57                	push   %r15
ffffffff8001b246:	49 89 f7             	mov    %rsi,%r15
ffffffff8001b249:	41 56                	push   %r14
ffffffff8001b24b:	41 55                	push   %r13
ffffffff8001b24d:	49 89 fd             	mov    %rdi,%r13
ffffffff8001b250:	41 54                	push   %r12
ffffffff8001b252:	41 89 d4             	mov    %edx,%r12d
ffffffff8001b255:	53                   	push   %rbx
        auto first = Allocate();

        for (int i = 0; i < n - 1; i++) {
ffffffff8001b256:	41 83 ec 01          	sub    $0x1,%r12d
    void* PageFrameAllocator::ReallocConsecutive(void* ptr, int n) {
ffffffff8001b25a:	48 83 ec 08          	sub    $0x8,%rsp
        auto first = Allocate();
ffffffff8001b25e:	e8 dd fe ff ff       	call   ffffffff8001b140 <_ZN6Memory18PageFrameAllocator8AllocateEv>
ffffffff8001b263:	49 89 c6             	mov    %rax,%r14
        for (int i = 0; i < n - 1; i++) {
ffffffff8001b266:	45 85 e4             	test   %r12d,%r12d
ffffffff8001b269:	7e 35                	jle    ffffffff8001b2a0 <_ZN6Memory18PageFrameAllocator18ReallocConsecutiveEPvi+0x60>
ffffffff8001b26b:	31 db                	xor    %ebx,%ebx
ffffffff8001b26d:	eb 09                	jmp    ffffffff8001b278 <_ZN6Memory18PageFrameAllocator18ReallocConsecutiveEPvi+0x38>
ffffffff8001b26f:	90                   	nop
ffffffff8001b270:	83 c3 01             	add    $0x1,%ebx
ffffffff8001b273:	44 39 e3             	cmp    %r12d,%ebx
ffffffff8001b276:	74 28                	je     ffffffff8001b2a0 <_ZN6Memory18PageFrameAllocator18ReallocConsecutiveEPvi+0x60>
            if (Allocate() == nullptr) {
ffffffff8001b278:	4c 89 ef             	mov    %r13,%rdi
ffffffff8001b27b:	e8 c0 fe ff ff       	call   ffffffff8001b140 <_ZN6Memory18PageFrameAllocator8AllocateEv>
ffffffff8001b280:	48 85 c0             	test   %rax,%rax
ffffffff8001b283:	75 eb                	jne    ffffffff8001b270 <_ZN6Memory18PageFrameAllocator18ReallocConsecutiveEPvi+0x30>
                Panic("PageFrameAllocator Reallocation failed", nullptr);
ffffffff8001b285:	31 f6                	xor    %esi,%esi
ffffffff8001b287:	48 c7 c7 68 ce 02 80 	mov    $0xffffffff8002ce68,%rdi
        for (int i = 0; i < n - 1; i++) {
ffffffff8001b28e:	83 c3 01             	add    $0x1,%ebx
                Panic("PageFrameAllocator Reallocation failed", nullptr);
ffffffff8001b291:	e8 fa 08 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
        for (int i = 0; i < n - 1; i++) {
ffffffff8001b296:	44 39 e3             	cmp    %r12d,%ebx
ffffffff8001b299:	75 dd                	jne    ffffffff8001b278 <_ZN6Memory18PageFrameAllocator18ReallocConsecutiveEPvi+0x38>
ffffffff8001b29b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        }

        // Allocate() returns pages from the top of a free region in descending
        // order, so 'first' is the highest address.  The contiguous block
        // actually starts (n-1) pages below 'first'.
        void* base = (void*)((uint64_t)first - (uint64_t)(n - 1) * 0x1000);
ffffffff8001b2a0:	4d 63 e4             	movslq %r12d,%r12
ffffffff8001b2a3:	49 c1 e4 0c          	shl    $0xc,%r12
ffffffff8001b2a7:	4d 29 e6             	sub    %r12,%r14

        if (ptr != nullptr) {
ffffffff8001b2aa:	4d 85 ff             	test   %r15,%r15
ffffffff8001b2ad:	74 47                	je     ffffffff8001b2f6 <_ZN6Memory18PageFrameAllocator18ReallocConsecutiveEPvi+0xb6>
            memcpy(base, ptr, (uint64_t)n * 0x1000);
ffffffff8001b2af:	49 8d 94 24 00 10 00 	lea    0x1000(%r12),%rdx
ffffffff8001b2b6:	00 
ffffffff8001b2b7:	4c 89 fe             	mov    %r15,%rsi
ffffffff8001b2ba:	4c 89 f7             	mov    %r14,%rdi
ffffffff8001b2bd:	e8 1e ef ff ff       	call   ffffffff8001a1e0 <memcpy>
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001b2c2:	9c                   	pushf
ffffffff8001b2c3:	5b                   	pop    %rbx
ffffffff8001b2c4:	fa                   	cli
            inner.Acquire();
ffffffff8001b2c5:	4d 8d 65 10          	lea    0x10(%r13),%r12
ffffffff8001b2c9:	4c 89 e7             	mov    %r12,%rdi
ffffffff8001b2cc:	e8 df 0d ff ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
        return base;
    }

    void PageFrameAllocator::Free(void* ptr) {
        Lock.Acquire();
        auto prev_next = head.next;
ffffffff8001b2d1:	49 8b 45 08          	mov    0x8(%r13),%rax
            savedFlags = flags;
ffffffff8001b2d5:	49 89 5d 18          	mov    %rbx,0x18(%r13)
            inner.Release();
ffffffff8001b2d9:	4c 89 e7             	mov    %r12,%rdi
        head.next = (Page*)ptr;
ffffffff8001b2dc:	4d 89 7d 08          	mov    %r15,0x8(%r13)

        head.next->next = prev_next;
ffffffff8001b2e0:	49 89 47 08          	mov    %rax,0x8(%r15)
        head.next->size = 0x1000;
ffffffff8001b2e4:	49 8b 45 08          	mov    0x8(%r13),%rax
ffffffff8001b2e8:	48 c7 00 00 10 00 00 	movq   $0x1000,(%rax)
ffffffff8001b2ef:	e8 dc 0d ff ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001b2f4:	53                   	push   %rbx
ffffffff8001b2f5:	9d                   	popf
    }
ffffffff8001b2f6:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001b2fa:	4c 89 f0             	mov    %r14,%rax
ffffffff8001b2fd:	5b                   	pop    %rbx
ffffffff8001b2fe:	41 5c                	pop    %r12
ffffffff8001b300:	41 5d                	pop    %r13
ffffffff8001b302:	41 5e                	pop    %r14
ffffffff8001b304:	41 5f                	pop    %r15
ffffffff8001b306:	5d                   	pop    %rbp
ffffffff8001b307:	c3                   	ret
ffffffff8001b308:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001b30f:	00 

ffffffff8001b310 <_ZN6Memory18PageFrameAllocator4FreeEPv>:
    void PageFrameAllocator::Free(void* ptr) {
ffffffff8001b310:	55                   	push   %rbp
ffffffff8001b311:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001b314:	41 56                	push   %r14
ffffffff8001b316:	41 55                	push   %r13
ffffffff8001b318:	41 54                	push   %r12
ffffffff8001b31a:	49 89 f4             	mov    %rsi,%r12
ffffffff8001b31d:	53                   	push   %rbx
ffffffff8001b31e:	48 89 fb             	mov    %rdi,%rbx
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001b321:	9c                   	pushf
ffffffff8001b322:	41 5d                	pop    %r13
ffffffff8001b324:	fa                   	cli
            inner.Acquire();
ffffffff8001b325:	4c 8d 77 10          	lea    0x10(%rdi),%r14
ffffffff8001b329:	4c 89 f7             	mov    %r14,%rdi
ffffffff8001b32c:	e8 7f 0d ff ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
        auto prev_next = head.next;
ffffffff8001b331:	48 8b 43 08          	mov    0x8(%rbx),%rax
            savedFlags = flags;
ffffffff8001b335:	4c 89 6b 18          	mov    %r13,0x18(%rbx)
            inner.Release();
ffffffff8001b339:	4c 89 f7             	mov    %r14,%rdi
        head.next = (Page*)ptr;
ffffffff8001b33c:	4c 89 63 08          	mov    %r12,0x8(%rbx)
        head.next->next = prev_next;
ffffffff8001b340:	49 89 44 24 08       	mov    %rax,0x8(%r12)
        head.next->size = 0x1000;
ffffffff8001b345:	48 8b 43 08          	mov    0x8(%rbx),%rax
ffffffff8001b349:	48 c7 00 00 10 00 00 	movq   $0x1000,(%rax)
ffffffff8001b350:	e8 7b 0d ff ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001b355:	41 55                	push   %r13
ffffffff8001b357:	9d                   	popf
        Lock.Release();
    }
ffffffff8001b358:	5b                   	pop    %rbx
ffffffff8001b359:	41 5c                	pop    %r12
ffffffff8001b35b:	41 5d                	pop    %r13
ffffffff8001b35d:	41 5e                	pop    %r14
ffffffff8001b35f:	5d                   	pop    %rbp
ffffffff8001b360:	c3                   	ret
ffffffff8001b361:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001b368:	00 00 00 
ffffffff8001b36b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff8001b370 <_ZN6Memory18PageFrameAllocator8GetStatsEPN6Zenith8MemStatsE>:
            Free((void*)(uint64_t)ptr + (0x1000 * n));
        }
    }

    void PageFrameAllocator::GetStats(Zenith::MemStats* out) {
        if (!out) return;
ffffffff8001b370:	48 85 f6             	test   %rsi,%rsi
ffffffff8001b373:	0f 84 8f 00 00 00    	je     ffffffff8001b408 <_ZN6Memory18PageFrameAllocator8GetStatsEPN6Zenith8MemStatsE+0x98>
    void PageFrameAllocator::GetStats(Zenith::MemStats* out) {
ffffffff8001b379:	55                   	push   %rbp
ffffffff8001b37a:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001b37d:	41 57                	push   %r15
ffffffff8001b37f:	41 56                	push   %r14
ffffffff8001b381:	41 55                	push   %r13
ffffffff8001b383:	49 89 fd             	mov    %rdi,%r13
ffffffff8001b386:	41 54                	push   %r12
ffffffff8001b388:	49 89 f4             	mov    %rsi,%r12
ffffffff8001b38b:	53                   	push   %rbx
ffffffff8001b38c:	48 83 ec 08          	sub    $0x8,%rsp
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001b390:	9c                   	pushf
ffffffff8001b391:	41 5e                	pop    %r14
ffffffff8001b393:	fa                   	cli
            inner.Acquire();
ffffffff8001b394:	4c 8d 7f 10          	lea    0x10(%rdi),%r15
        Lock.Acquire();
        uint64_t freeBytes = 0;
ffffffff8001b398:	31 db                	xor    %ebx,%ebx
ffffffff8001b39a:	4c 89 ff             	mov    %r15,%rdi
ffffffff8001b39d:	e8 0e 0d ff ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
        Page* current = head.next;
ffffffff8001b3a2:	49 8b 45 08          	mov    0x8(%r13),%rax
            savedFlags = flags;
ffffffff8001b3a6:	4d 89 75 18          	mov    %r14,0x18(%r13)
        while (current != nullptr) {
ffffffff8001b3aa:	48 85 c0             	test   %rax,%rax
ffffffff8001b3ad:	74 0d                	je     ffffffff8001b3bc <_ZN6Memory18PageFrameAllocator8GetStatsEPN6Zenith8MemStatsE+0x4c>
ffffffff8001b3af:	90                   	nop
            freeBytes += current->size;
ffffffff8001b3b0:	48 03 18             	add    (%rax),%rbx
            current = current->next;
ffffffff8001b3b3:	48 8b 40 08          	mov    0x8(%rax),%rax
        while (current != nullptr) {
ffffffff8001b3b7:	48 85 c0             	test   %rax,%rax
ffffffff8001b3ba:	75 f4                	jne    ffffffff8001b3b0 <_ZN6Memory18PageFrameAllocator8GetStatsEPN6Zenith8MemStatsE+0x40>
            inner.Release();
ffffffff8001b3bc:	4c 89 ff             	mov    %r15,%rdi
ffffffff8001b3bf:	e8 0c 0d ff ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001b3c4:	41 56                	push   %r14
ffffffff8001b3c6:	9d                   	popf
        }
        Lock.Release();

        out->totalBytes = g_section.size;
ffffffff8001b3c7:	49 8b 55 28          	mov    0x28(%r13),%rdx
        out->freeBytes = freeBytes;
ffffffff8001b3cb:	49 89 5c 24 08       	mov    %rbx,0x8(%r12)
        out->usedBytes = g_section.size > freeBytes ? g_section.size - freeBytes : 0;
        out->pageSize = 0x1000;
ffffffff8001b3d0:	49 c7 44 24 18 00 10 	movq   $0x1000,0x18(%r12)
ffffffff8001b3d7:	00 00 
        out->usedBytes = g_section.size > freeBytes ? g_section.size - freeBytes : 0;
ffffffff8001b3d9:	48 89 d0             	mov    %rdx,%rax
        out->totalBytes = g_section.size;
ffffffff8001b3dc:	49 89 14 24          	mov    %rdx,(%r12)
        out->usedBytes = g_section.size > freeBytes ? g_section.size - freeBytes : 0;
ffffffff8001b3e0:	48 29 d8             	sub    %rbx,%rax
ffffffff8001b3e3:	48 39 d3             	cmp    %rdx,%rbx
ffffffff8001b3e6:	ba 00 00 00 00       	mov    $0x0,%edx
ffffffff8001b3eb:	48 0f 43 c2          	cmovae %rdx,%rax
ffffffff8001b3ef:	49 89 44 24 10       	mov    %rax,0x10(%r12)
    }
ffffffff8001b3f4:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001b3f8:	5b                   	pop    %rbx
ffffffff8001b3f9:	41 5c                	pop    %r12
ffffffff8001b3fb:	41 5d                	pop    %r13
ffffffff8001b3fd:	41 5e                	pop    %r14
ffffffff8001b3ff:	41 5f                	pop    %r15
ffffffff8001b401:	5d                   	pop    %rbp
ffffffff8001b402:	c3                   	ret
ffffffff8001b403:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff8001b408:	c3                   	ret
ffffffff8001b409:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff8001b410 <_ZN6Memory3VMM6PagingC1Ev>:

    std::uint64_t GetPhysKernelAddress(std::uint64_t virtualAddress) {
        return Paging::GetPhysAddr(GetCR3(), (std::uint64_t)virtualAddress, true);
    }

    Paging::Paging() {
ffffffff8001b410:	55                   	push   %rbp
ffffffff8001b411:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001b414:	53                   	push   %rbx
ffffffff8001b415:	48 89 fb             	mov    %rdi,%rbx
ffffffff8001b418:	48 83 ec 08          	sub    $0x8,%rsp
ffffffff8001b41c:	48 c7 07 00 00 00 00 	movq   $0x0,(%rdi)
        PML4 = (PageTable*)SubHHDM((PageTable*)Memory::g_pfa->AllocateZeroed());
ffffffff8001b423:	48 8b 3d 86 15 13 00 	mov    0x131586(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff8001b42a:	e8 e1 fd ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
        return address - HHDMBase;
ffffffff8001b42f:	48 2b 05 72 15 13 00 	sub    0x131572(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001b436:	48 89 03             	mov    %rax,(%rbx)
    }
ffffffff8001b439:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff8001b43d:	c9                   	leave
ffffffff8001b43e:	c3                   	ret
ffffffff8001b43f:	90                   	nop

ffffffff8001b440 <_ZN6Memory3VMM6Paging3MapEmm>:
            entry->Supervisor = 1;
            return (PageTable*)(entry->Address << 12);
        }
    }

    void Paging::Map(std::uint64_t physicalAddress, std::uint64_t virtualAddress) {
ffffffff8001b440:	55                   	push   %rbp
ffffffff8001b441:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001b444:	41 56                	push   %r14
ffffffff8001b446:	49 89 fe             	mov    %rdi,%r14
ffffffff8001b449:	41 55                	push   %r13
ffffffff8001b44b:	41 54                	push   %r12
ffffffff8001b44d:	49 89 f4             	mov    %rsi,%r12
ffffffff8001b450:	53                   	push   %rbx
ffffffff8001b451:	48 89 d3             	mov    %rdx,%rbx
        if (virtualAddress % 0x1000 != 0 || physicalAddress % 0x1000 != 0) {
ffffffff8001b454:	f7 c2 ff 0f 00 00    	test   $0xfff,%edx
ffffffff8001b45a:	0f 85 e0 00 00 00    	jne    ffffffff8001b540 <_ZN6Memory3VMM6Paging3MapEmm+0x100>
ffffffff8001b460:	f7 c6 ff 0f 00 00    	test   $0xfff,%esi
ffffffff8001b466:	0f 85 bc 00 00 00    	jne    ffffffff8001b528 <_ZN6Memory3VMM6Paging3MapEmm+0xe8>

            address = newAddress;
        }

        uint64_t GetL4Index() {
            return (address >> 39) & 0x1ff;
ffffffff8001b46c:	49 89 dd             	mov    %rbx,%r13
        return HHDMBase + (uint64_t)address;
ffffffff8001b46f:	48 8b 15 32 15 13 00 	mov    0x131532(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001b476:	49 c1 ed 24          	shr    $0x24,%r13
        PageTableEntry* entry = (PageTableEntry*)Memory::HHDM(&table->entries[virtualAddress.GetIndex(level)]);
ffffffff8001b47a:	41 81 e5 f8 0f 00 00 	and    $0xff8,%r13d
ffffffff8001b481:	4d 03 2e             	add    (%r14),%r13
ffffffff8001b484:	49 01 d5             	add    %rdx,%r13
        if (!entry->Present) {
ffffffff8001b487:	41 0f b6 45 00       	movzbl 0x0(%r13),%eax
ffffffff8001b48c:	a8 01                	test   $0x1,%al
ffffffff8001b48e:	0f 84 a4 01 00 00    	je     ffffffff8001b638 <_ZN6Memory3VMM6Paging3MapEmm+0x1f8>
            return (PageTable*)(entry->Address << 12);
ffffffff8001b494:	4d 8b 75 00          	mov    0x0(%r13),%r14
ffffffff8001b498:	49 81 e6 00 f0 ff ff 	and    $0xfffffffffffff000,%r14
        }

        uint64_t GetL3Index() {
            return (address >> 30) & 0x1ff;
ffffffff8001b49f:	48 89 d8             	mov    %rbx,%rax
ffffffff8001b4a2:	48 c1 e8 1b          	shr    $0x1b,%rax
        PageTableEntry* entry = (PageTableEntry*)Memory::HHDM(&table->entries[virtualAddress.GetIndex(level)]);
ffffffff8001b4a6:	25 f8 0f 00 00       	and    $0xff8,%eax
ffffffff8001b4ab:	49 01 c6             	add    %rax,%r14
ffffffff8001b4ae:	49 01 d6             	add    %rdx,%r14
        if (!entry->Present) {
ffffffff8001b4b1:	41 0f b6 06          	movzbl (%r14),%eax
ffffffff8001b4b5:	a8 01                	test   $0x1,%al
ffffffff8001b4b7:	0f 84 3b 01 00 00    	je     ffffffff8001b5f8 <_ZN6Memory3VMM6Paging3MapEmm+0x1b8>
            return (PageTable*)(entry->Address << 12);
ffffffff8001b4bd:	4d 8b 2e             	mov    (%r14),%r13
ffffffff8001b4c0:	49 81 e5 00 f0 ff ff 	and    $0xfffffffffffff000,%r13
        }

        uint64_t GetL2Index() {
            return (address >> 21) & 0x1ff;
ffffffff8001b4c7:	48 89 d8             	mov    %rbx,%rax
ffffffff8001b4ca:	48 c1 e8 12          	shr    $0x12,%rax
        PageTableEntry* entry = (PageTableEntry*)Memory::HHDM(&table->entries[virtualAddress.GetIndex(level)]);
ffffffff8001b4ce:	25 f8 0f 00 00       	and    $0xff8,%eax
ffffffff8001b4d3:	49 01 c5             	add    %rax,%r13
ffffffff8001b4d6:	49 01 d5             	add    %rdx,%r13
        if (!entry->Present) {
ffffffff8001b4d9:	41 0f b6 45 00       	movzbl 0x0(%r13),%eax
ffffffff8001b4de:	a8 01                	test   $0x1,%al
ffffffff8001b4e0:	0f 84 d2 00 00 00    	je     ffffffff8001b5b8 <_ZN6Memory3VMM6Paging3MapEmm+0x178>
            return (PageTable*)(entry->Address << 12);
ffffffff8001b4e6:	49 8b 45 00          	mov    0x0(%r13),%rax
ffffffff8001b4ea:	48 25 00 f0 ff ff    	and    $0xfffffffffffff000,%rax
        }

        uint64_t GetPageIndex() {
            return (address >> 12) & 0x1ff;
ffffffff8001b4f0:	48 c1 eb 09          	shr    $0x9,%rbx
        auto PML2 = HandleLevel(virtualAddressObj, PML3, 3);
        auto PML1 = HandleLevel(virtualAddressObj, PML2, 2);

        PageTableEntry* pageEntry = (PageTableEntry*)Memory::HHDM(&PML1->entries[virtualAddressObj.GetPageIndex()]);

        pageEntry->Present = true;
ffffffff8001b4f4:	49 81 e4 00 f0 ff ff 	and    $0xfffffffffffff000,%r12
        PageTableEntry* pageEntry = (PageTableEntry*)Memory::HHDM(&PML1->entries[virtualAddressObj.GetPageIndex()]);
ffffffff8001b4fb:	81 e3 f8 0f 00 00    	and    $0xff8,%ebx
        pageEntry->Present = true;
ffffffff8001b501:	49 83 cc 03          	or     $0x3,%r12
        PageTableEntry* pageEntry = (PageTableEntry*)Memory::HHDM(&PML1->entries[virtualAddressObj.GetPageIndex()]);
ffffffff8001b505:	48 01 d8             	add    %rbx,%rax
ffffffff8001b508:	48 01 d0             	add    %rdx,%rax
        pageEntry->Present = true;
ffffffff8001b50b:	48 8b 10             	mov    (%rax),%rdx
ffffffff8001b50e:	81 e2 fc 0f 00 00    	and    $0xffc,%edx
ffffffff8001b514:	49 09 d4             	or     %rdx,%r12
ffffffff8001b517:	4c 89 20             	mov    %r12,(%rax)
        pageEntry->Writable = true;

        pageEntry->Address = physicalAddress >> 12;
    }
ffffffff8001b51a:	5b                   	pop    %rbx
ffffffff8001b51b:	41 5c                	pop    %r12
ffffffff8001b51d:	41 5d                	pop    %r13
ffffffff8001b51f:	41 5e                	pop    %r14
ffffffff8001b521:	5d                   	pop    %rbp
ffffffff8001b522:	c3                   	ret
ffffffff8001b523:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            Panic("Value that isn't page-aligned passed as address to Paging::Map!", nullptr);
ffffffff8001b528:	31 f6                	xor    %esi,%esi
ffffffff8001b52a:	48 c7 c7 90 ce 02 80 	mov    $0xffffffff8002ce90,%rdi
ffffffff8001b531:	e8 5a 06 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
            if (newAddress % 0x1000 != 0) {
ffffffff8001b536:	e9 31 ff ff ff       	jmp    ffffffff8001b46c <_ZN6Memory3VMM6Paging3MapEmm+0x2c>
ffffffff8001b53b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff8001b540:	31 f6                	xor    %esi,%esi
ffffffff8001b542:	48 c7 c7 90 ce 02 80 	mov    $0xffffffff8002ce90,%rdi
ffffffff8001b549:	e8 42 06 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
            Print(string);
ffffffff8001b54e:	48 c7 c7 6b bb 02 80 	mov    $0xffffffff8002bb6b,%rdi
            g_kernelLogDepth++;
ffffffff8001b555:	83 05 48 3f 1c 00 01 	addl   $0x1,0x1c3f48(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001b55c:	e8 5f 7c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b561:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001b568:	e8 53 7c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b56d:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001b574:	e8 47 7c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b579:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8001b580:	e8 3b 7c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b585:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001b58c:	e8 2f 7c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b591:	48 c7 c7 d0 ce 02 80 	mov    $0xffffffff8002ced0,%rdi
ffffffff8001b598:	e8 23 7c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b59d:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001b5a4:	e8 17 7c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001b5a9:	83 2d f4 3e 1c 00 01 	subl   $0x1,0x1c3ef4(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001b5b0:	e9 b7 fe ff ff       	jmp    ffffffff8001b46c <_ZN6Memory3VMM6Paging3MapEmm+0x2c>
ffffffff8001b5b5:	0f 1f 00             	nopl   (%rax)
            entry->Present = true;
ffffffff8001b5b8:	83 c8 03             	or     $0x3,%eax
            uint64_t downLevelAddr = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001b5bb:	48 8b 3d ee 13 13 00 	mov    0x1313ee(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
            entry->Present = true;
ffffffff8001b5c2:	41 88 45 00          	mov    %al,0x0(%r13)
            uint64_t downLevelAddr = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001b5c6:	e8 45 fc ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
        return address - HHDMBase;
ffffffff8001b5cb:	48 8b 15 d6 13 13 00 	mov    0x1313d6(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            entry->Address = downLevelAddr >> 12;
ffffffff8001b5d2:	49 8b 4d 00          	mov    0x0(%r13),%rcx
ffffffff8001b5d6:	48 29 d0             	sub    %rdx,%rax
ffffffff8001b5d9:	81 e1 ff 0f 00 00    	and    $0xfff,%ecx
ffffffff8001b5df:	48 89 c6             	mov    %rax,%rsi
ffffffff8001b5e2:	48 81 e6 00 f0 ff ff 	and    $0xfffffffffffff000,%rsi
ffffffff8001b5e9:	48 09 f1             	or     %rsi,%rcx
ffffffff8001b5ec:	49 89 4d 00          	mov    %rcx,0x0(%r13)
            return (PageTable*)downLevelAddr;
ffffffff8001b5f0:	e9 fb fe ff ff       	jmp    ffffffff8001b4f0 <_ZN6Memory3VMM6Paging3MapEmm+0xb0>
ffffffff8001b5f5:	0f 1f 00             	nopl   (%rax)
            entry->Present = true;
ffffffff8001b5f8:	83 c8 03             	or     $0x3,%eax
            uint64_t downLevelAddr = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001b5fb:	48 8b 3d ae 13 13 00 	mov    0x1313ae(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
            entry->Present = true;
ffffffff8001b602:	41 88 06             	mov    %al,(%r14)
            uint64_t downLevelAddr = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001b605:	e8 06 fc ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff8001b60a:	48 8b 15 97 13 13 00 	mov    0x131397(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001b611:	48 29 d0             	sub    %rdx,%rax
            entry->Address = downLevelAddr >> 12;
ffffffff8001b614:	48 89 c1             	mov    %rax,%rcx
ffffffff8001b617:	49 89 c5             	mov    %rax,%r13
ffffffff8001b61a:	49 8b 06             	mov    (%r14),%rax
ffffffff8001b61d:	48 81 e1 00 f0 ff ff 	and    $0xfffffffffffff000,%rcx
ffffffff8001b624:	25 ff 0f 00 00       	and    $0xfff,%eax
ffffffff8001b629:	48 09 c8             	or     %rcx,%rax
ffffffff8001b62c:	49 89 06             	mov    %rax,(%r14)
            return (PageTable*)downLevelAddr;
ffffffff8001b62f:	e9 93 fe ff ff       	jmp    ffffffff8001b4c7 <_ZN6Memory3VMM6Paging3MapEmm+0x87>
ffffffff8001b634:	0f 1f 40 00          	nopl   0x0(%rax)
            entry->Present = true;
ffffffff8001b638:	83 c8 03             	or     $0x3,%eax
            uint64_t downLevelAddr = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001b63b:	48 8b 3d 6e 13 13 00 	mov    0x13136e(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
            entry->Present = true;
ffffffff8001b642:	41 88 45 00          	mov    %al,0x0(%r13)
            uint64_t downLevelAddr = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001b646:	e8 c5 fb ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff8001b64b:	48 8b 15 56 13 13 00 	mov    0x131356(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001b652:	48 29 d0             	sub    %rdx,%rax
            entry->Address = downLevelAddr >> 12;
ffffffff8001b655:	48 89 c1             	mov    %rax,%rcx
ffffffff8001b658:	49 89 c6             	mov    %rax,%r14
ffffffff8001b65b:	49 8b 45 00          	mov    0x0(%r13),%rax
ffffffff8001b65f:	48 81 e1 00 f0 ff ff 	and    $0xfffffffffffff000,%rcx
ffffffff8001b666:	25 ff 0f 00 00       	and    $0xfff,%eax
ffffffff8001b66b:	48 09 c8             	or     %rcx,%rax
ffffffff8001b66e:	49 89 45 00          	mov    %rax,0x0(%r13)
            return (PageTable*)downLevelAddr;
ffffffff8001b672:	e9 28 fe ff ff       	jmp    ffffffff8001b49f <_ZN6Memory3VMM6Paging3MapEmm+0x5f>
ffffffff8001b677:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001b67e:	00 00 

ffffffff8001b680 <_ZN6Memory3VMM6Paging5MapWCEmm>:

    void Paging::MapWC(std::uint64_t physicalAddress, std::uint64_t virtualAddress) {
ffffffff8001b680:	55                   	push   %rbp
ffffffff8001b681:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001b684:	41 56                	push   %r14
ffffffff8001b686:	49 89 fe             	mov    %rdi,%r14
ffffffff8001b689:	41 55                	push   %r13
ffffffff8001b68b:	41 54                	push   %r12
ffffffff8001b68d:	49 89 f4             	mov    %rsi,%r12
ffffffff8001b690:	53                   	push   %rbx
ffffffff8001b691:	48 89 d3             	mov    %rdx,%rbx
        if (virtualAddress % 0x1000 != 0 || physicalAddress % 0x1000 != 0) {
ffffffff8001b694:	f7 c2 ff 0f 00 00    	test   $0xfff,%edx
ffffffff8001b69a:	0f 85 e0 00 00 00    	jne    ffffffff8001b780 <_ZN6Memory3VMM6Paging5MapWCEmm+0x100>
ffffffff8001b6a0:	f7 c6 ff 0f 00 00    	test   $0xfff,%esi
ffffffff8001b6a6:	0f 85 bc 00 00 00    	jne    ffffffff8001b768 <_ZN6Memory3VMM6Paging5MapWCEmm+0xe8>
            return (address >> 39) & 0x1ff;
ffffffff8001b6ac:	49 89 dd             	mov    %rbx,%r13
        return HHDMBase + (uint64_t)address;
ffffffff8001b6af:	48 8b 15 f2 12 13 00 	mov    0x1312f2(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001b6b6:	49 c1 ed 24          	shr    $0x24,%r13
        PageTableEntry* entry = (PageTableEntry*)Memory::HHDM(&table->entries[virtualAddress.GetIndex(level)]);
ffffffff8001b6ba:	41 81 e5 f8 0f 00 00 	and    $0xff8,%r13d
ffffffff8001b6c1:	4d 03 2e             	add    (%r14),%r13
ffffffff8001b6c4:	49 01 d5             	add    %rdx,%r13
        if (!entry->Present) {
ffffffff8001b6c7:	41 0f b6 45 00       	movzbl 0x0(%r13),%eax
ffffffff8001b6cc:	a8 01                	test   $0x1,%al
ffffffff8001b6ce:	0f 84 a4 01 00 00    	je     ffffffff8001b878 <_ZN6Memory3VMM6Paging5MapWCEmm+0x1f8>
            return (PageTable*)(entry->Address << 12);
ffffffff8001b6d4:	4d 8b 75 00          	mov    0x0(%r13),%r14
ffffffff8001b6d8:	49 81 e6 00 f0 ff ff 	and    $0xfffffffffffff000,%r14
            return (address >> 30) & 0x1ff;
ffffffff8001b6df:	48 89 d8             	mov    %rbx,%rax
ffffffff8001b6e2:	48 c1 e8 1b          	shr    $0x1b,%rax
        PageTableEntry* entry = (PageTableEntry*)Memory::HHDM(&table->entries[virtualAddress.GetIndex(level)]);
ffffffff8001b6e6:	25 f8 0f 00 00       	and    $0xff8,%eax
ffffffff8001b6eb:	49 01 c6             	add    %rax,%r14
ffffffff8001b6ee:	49 01 d6             	add    %rdx,%r14
        if (!entry->Present) {
ffffffff8001b6f1:	41 0f b6 06          	movzbl (%r14),%eax
ffffffff8001b6f5:	a8 01                	test   $0x1,%al
ffffffff8001b6f7:	0f 84 3b 01 00 00    	je     ffffffff8001b838 <_ZN6Memory3VMM6Paging5MapWCEmm+0x1b8>
            return (PageTable*)(entry->Address << 12);
ffffffff8001b6fd:	4d 8b 2e             	mov    (%r14),%r13
ffffffff8001b700:	49 81 e5 00 f0 ff ff 	and    $0xfffffffffffff000,%r13
            return (address >> 21) & 0x1ff;
ffffffff8001b707:	48 89 d8             	mov    %rbx,%rax
ffffffff8001b70a:	48 c1 e8 12          	shr    $0x12,%rax
        PageTableEntry* entry = (PageTableEntry*)Memory::HHDM(&table->entries[virtualAddress.GetIndex(level)]);
ffffffff8001b70e:	25 f8 0f 00 00       	and    $0xff8,%eax
ffffffff8001b713:	49 01 c5             	add    %rax,%r13
ffffffff8001b716:	49 01 d5             	add    %rdx,%r13
        if (!entry->Present) {
ffffffff8001b719:	41 0f b6 45 00       	movzbl 0x0(%r13),%eax
ffffffff8001b71e:	a8 01                	test   $0x1,%al
ffffffff8001b720:	0f 84 d2 00 00 00    	je     ffffffff8001b7f8 <_ZN6Memory3VMM6Paging5MapWCEmm+0x178>
            return (PageTable*)(entry->Address << 12);
ffffffff8001b726:	49 8b 45 00          	mov    0x0(%r13),%rax
ffffffff8001b72a:	48 25 00 f0 ff ff    	and    $0xfffffffffffff000,%rax
            return (address >> 12) & 0x1ff;
ffffffff8001b730:	48 c1 eb 09          	shr    $0x9,%rbx
        auto PML2 = HandleLevel(virtualAddressObj, PML3, 3);
        auto PML1 = HandleLevel(virtualAddressObj, PML2, 2);

        PageTableEntry* pageEntry = (PageTableEntry*)Memory::HHDM(&PML1->entries[virtualAddressObj.GetPageIndex()]);

        pageEntry->Present = true;
ffffffff8001b734:	49 81 e4 00 f0 ff ff 	and    $0xfffffffffffff000,%r12
        PageTableEntry* pageEntry = (PageTableEntry*)Memory::HHDM(&PML1->entries[virtualAddressObj.GetPageIndex()]);
ffffffff8001b73b:	81 e3 f8 0f 00 00    	and    $0xff8,%ebx
        pageEntry->Present = true;
ffffffff8001b741:	49 83 cc 0b          	or     $0xb,%r12
        PageTableEntry* pageEntry = (PageTableEntry*)Memory::HHDM(&PML1->entries[virtualAddressObj.GetPageIndex()]);
ffffffff8001b745:	48 01 d8             	add    %rbx,%rax
ffffffff8001b748:	48 01 d0             	add    %rdx,%rax
        pageEntry->Present = true;
ffffffff8001b74b:	48 8b 10             	mov    (%rax),%rdx
ffffffff8001b74e:	81 e2 f4 0f 00 00    	and    $0xff4,%edx
ffffffff8001b754:	49 09 d4             	or     %rdx,%r12
ffffffff8001b757:	4c 89 20             	mov    %r12,(%rax)
        pageEntry->Writable = true;
        pageEntry->WriteThrough = true;   // PWT=1, PCD=0 → PAT entry 1 = WC

        pageEntry->Address = physicalAddress >> 12;
    }
ffffffff8001b75a:	5b                   	pop    %rbx
ffffffff8001b75b:	41 5c                	pop    %r12
ffffffff8001b75d:	41 5d                	pop    %r13
ffffffff8001b75f:	41 5e                	pop    %r14
ffffffff8001b761:	5d                   	pop    %rbp
ffffffff8001b762:	c3                   	ret
ffffffff8001b763:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            Panic("Value that isn't page-aligned passed as address to Paging::MapWC!", nullptr);
ffffffff8001b768:	31 f6                	xor    %esi,%esi
ffffffff8001b76a:	48 c7 c7 08 cf 02 80 	mov    $0xffffffff8002cf08,%rdi
ffffffff8001b771:	e8 1a 04 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
            if (newAddress % 0x1000 != 0) {
ffffffff8001b776:	e9 31 ff ff ff       	jmp    ffffffff8001b6ac <_ZN6Memory3VMM6Paging5MapWCEmm+0x2c>
ffffffff8001b77b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff8001b780:	31 f6                	xor    %esi,%esi
ffffffff8001b782:	48 c7 c7 08 cf 02 80 	mov    $0xffffffff8002cf08,%rdi
ffffffff8001b789:	e8 02 04 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
            Print(string);
ffffffff8001b78e:	48 c7 c7 6b bb 02 80 	mov    $0xffffffff8002bb6b,%rdi
            g_kernelLogDepth++;
ffffffff8001b795:	83 05 08 3d 1c 00 01 	addl   $0x1,0x1c3d08(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001b79c:	e8 1f 7a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b7a1:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001b7a8:	e8 13 7a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b7ad:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001b7b4:	e8 07 7a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b7b9:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8001b7c0:	e8 fb 79 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b7c5:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001b7cc:	e8 ef 79 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b7d1:	48 c7 c7 d0 ce 02 80 	mov    $0xffffffff8002ced0,%rdi
ffffffff8001b7d8:	e8 e3 79 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b7dd:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001b7e4:	e8 d7 79 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001b7e9:	83 2d b4 3c 1c 00 01 	subl   $0x1,0x1c3cb4(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001b7f0:	e9 b7 fe ff ff       	jmp    ffffffff8001b6ac <_ZN6Memory3VMM6Paging5MapWCEmm+0x2c>
ffffffff8001b7f5:	0f 1f 00             	nopl   (%rax)
            entry->Present = true;
ffffffff8001b7f8:	83 c8 03             	or     $0x3,%eax
            uint64_t downLevelAddr = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001b7fb:	48 8b 3d ae 11 13 00 	mov    0x1311ae(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
            entry->Present = true;
ffffffff8001b802:	41 88 45 00          	mov    %al,0x0(%r13)
            uint64_t downLevelAddr = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001b806:	e8 05 fa ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
        return address - HHDMBase;
ffffffff8001b80b:	48 8b 15 96 11 13 00 	mov    0x131196(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            entry->Address = downLevelAddr >> 12;
ffffffff8001b812:	49 8b 4d 00          	mov    0x0(%r13),%rcx
ffffffff8001b816:	48 29 d0             	sub    %rdx,%rax
ffffffff8001b819:	81 e1 ff 0f 00 00    	and    $0xfff,%ecx
ffffffff8001b81f:	48 89 c6             	mov    %rax,%rsi
ffffffff8001b822:	48 81 e6 00 f0 ff ff 	and    $0xfffffffffffff000,%rsi
ffffffff8001b829:	48 09 f1             	or     %rsi,%rcx
ffffffff8001b82c:	49 89 4d 00          	mov    %rcx,0x0(%r13)
            return (PageTable*)downLevelAddr;
ffffffff8001b830:	e9 fb fe ff ff       	jmp    ffffffff8001b730 <_ZN6Memory3VMM6Paging5MapWCEmm+0xb0>
ffffffff8001b835:	0f 1f 00             	nopl   (%rax)
            entry->Present = true;
ffffffff8001b838:	83 c8 03             	or     $0x3,%eax
            uint64_t downLevelAddr = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001b83b:	48 8b 3d 6e 11 13 00 	mov    0x13116e(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
            entry->Present = true;
ffffffff8001b842:	41 88 06             	mov    %al,(%r14)
            uint64_t downLevelAddr = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001b845:	e8 c6 f9 ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff8001b84a:	48 8b 15 57 11 13 00 	mov    0x131157(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001b851:	48 29 d0             	sub    %rdx,%rax
            entry->Address = downLevelAddr >> 12;
ffffffff8001b854:	48 89 c1             	mov    %rax,%rcx
ffffffff8001b857:	49 89 c5             	mov    %rax,%r13
ffffffff8001b85a:	49 8b 06             	mov    (%r14),%rax
ffffffff8001b85d:	48 81 e1 00 f0 ff ff 	and    $0xfffffffffffff000,%rcx
ffffffff8001b864:	25 ff 0f 00 00       	and    $0xfff,%eax
ffffffff8001b869:	48 09 c8             	or     %rcx,%rax
ffffffff8001b86c:	49 89 06             	mov    %rax,(%r14)
            return (PageTable*)downLevelAddr;
ffffffff8001b86f:	e9 93 fe ff ff       	jmp    ffffffff8001b707 <_ZN6Memory3VMM6Paging5MapWCEmm+0x87>
ffffffff8001b874:	0f 1f 40 00          	nopl   0x0(%rax)
            entry->Present = true;
ffffffff8001b878:	83 c8 03             	or     $0x3,%eax
            uint64_t downLevelAddr = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001b87b:	48 8b 3d 2e 11 13 00 	mov    0x13112e(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
            entry->Present = true;
ffffffff8001b882:	41 88 45 00          	mov    %al,0x0(%r13)
            uint64_t downLevelAddr = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001b886:	e8 85 f9 ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff8001b88b:	48 8b 15 16 11 13 00 	mov    0x131116(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001b892:	48 29 d0             	sub    %rdx,%rax
            entry->Address = downLevelAddr >> 12;
ffffffff8001b895:	48 89 c1             	mov    %rax,%rcx
ffffffff8001b898:	49 89 c6             	mov    %rax,%r14
ffffffff8001b89b:	49 8b 45 00          	mov    0x0(%r13),%rax
ffffffff8001b89f:	48 81 e1 00 f0 ff ff 	and    $0xfffffffffffff000,%rcx
ffffffff8001b8a6:	25 ff 0f 00 00       	and    $0xfff,%eax
ffffffff8001b8ab:	48 09 c8             	or     %rcx,%rax
ffffffff8001b8ae:	49 89 45 00          	mov    %rax,0x0(%r13)
            return (PageTable*)downLevelAddr;
ffffffff8001b8b2:	e9 28 fe ff ff       	jmp    ffffffff8001b6df <_ZN6Memory3VMM6Paging5MapWCEmm+0x5f>
ffffffff8001b8b7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001b8be:	00 00 

ffffffff8001b8c0 <_ZN6Memory3VMM6Paging7MapMMIOEmm>:

    void Paging::MapMMIO(std::uint64_t physicalAddress, std::uint64_t virtualAddress) {
ffffffff8001b8c0:	55                   	push   %rbp
ffffffff8001b8c1:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001b8c4:	41 56                	push   %r14
ffffffff8001b8c6:	49 89 fe             	mov    %rdi,%r14
ffffffff8001b8c9:	41 55                	push   %r13
ffffffff8001b8cb:	41 54                	push   %r12
ffffffff8001b8cd:	49 89 f4             	mov    %rsi,%r12
ffffffff8001b8d0:	53                   	push   %rbx
ffffffff8001b8d1:	48 89 d3             	mov    %rdx,%rbx
        if (virtualAddress % 0x1000 != 0 || physicalAddress % 0x1000 != 0) {
ffffffff8001b8d4:	f7 c2 ff 0f 00 00    	test   $0xfff,%edx
ffffffff8001b8da:	0f 85 e0 00 00 00    	jne    ffffffff8001b9c0 <_ZN6Memory3VMM6Paging7MapMMIOEmm+0x100>
ffffffff8001b8e0:	f7 c6 ff 0f 00 00    	test   $0xfff,%esi
ffffffff8001b8e6:	0f 85 bc 00 00 00    	jne    ffffffff8001b9a8 <_ZN6Memory3VMM6Paging7MapMMIOEmm+0xe8>
            return (address >> 39) & 0x1ff;
ffffffff8001b8ec:	49 89 dd             	mov    %rbx,%r13
        return HHDMBase + (uint64_t)address;
ffffffff8001b8ef:	48 8b 15 b2 10 13 00 	mov    0x1310b2(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001b8f6:	49 c1 ed 24          	shr    $0x24,%r13
        PageTableEntry* entry = (PageTableEntry*)Memory::HHDM(&table->entries[virtualAddress.GetIndex(level)]);
ffffffff8001b8fa:	41 81 e5 f8 0f 00 00 	and    $0xff8,%r13d
ffffffff8001b901:	4d 03 2e             	add    (%r14),%r13
ffffffff8001b904:	49 01 d5             	add    %rdx,%r13
        if (!entry->Present) {
ffffffff8001b907:	41 0f b6 45 00       	movzbl 0x0(%r13),%eax
ffffffff8001b90c:	a8 01                	test   $0x1,%al
ffffffff8001b90e:	0f 84 a4 01 00 00    	je     ffffffff8001bab8 <_ZN6Memory3VMM6Paging7MapMMIOEmm+0x1f8>
            return (PageTable*)(entry->Address << 12);
ffffffff8001b914:	4d 8b 75 00          	mov    0x0(%r13),%r14
ffffffff8001b918:	49 81 e6 00 f0 ff ff 	and    $0xfffffffffffff000,%r14
            return (address >> 30) & 0x1ff;
ffffffff8001b91f:	48 89 d8             	mov    %rbx,%rax
ffffffff8001b922:	48 c1 e8 1b          	shr    $0x1b,%rax
        PageTableEntry* entry = (PageTableEntry*)Memory::HHDM(&table->entries[virtualAddress.GetIndex(level)]);
ffffffff8001b926:	25 f8 0f 00 00       	and    $0xff8,%eax
ffffffff8001b92b:	49 01 c6             	add    %rax,%r14
ffffffff8001b92e:	49 01 d6             	add    %rdx,%r14
        if (!entry->Present) {
ffffffff8001b931:	41 0f b6 06          	movzbl (%r14),%eax
ffffffff8001b935:	a8 01                	test   $0x1,%al
ffffffff8001b937:	0f 84 3b 01 00 00    	je     ffffffff8001ba78 <_ZN6Memory3VMM6Paging7MapMMIOEmm+0x1b8>
            return (PageTable*)(entry->Address << 12);
ffffffff8001b93d:	4d 8b 2e             	mov    (%r14),%r13
ffffffff8001b940:	49 81 e5 00 f0 ff ff 	and    $0xfffffffffffff000,%r13
            return (address >> 21) & 0x1ff;
ffffffff8001b947:	48 89 d8             	mov    %rbx,%rax
ffffffff8001b94a:	48 c1 e8 12          	shr    $0x12,%rax
        PageTableEntry* entry = (PageTableEntry*)Memory::HHDM(&table->entries[virtualAddress.GetIndex(level)]);
ffffffff8001b94e:	25 f8 0f 00 00       	and    $0xff8,%eax
ffffffff8001b953:	49 01 c5             	add    %rax,%r13
ffffffff8001b956:	49 01 d5             	add    %rdx,%r13
        if (!entry->Present) {
ffffffff8001b959:	41 0f b6 45 00       	movzbl 0x0(%r13),%eax
ffffffff8001b95e:	a8 01                	test   $0x1,%al
ffffffff8001b960:	0f 84 d2 00 00 00    	je     ffffffff8001ba38 <_ZN6Memory3VMM6Paging7MapMMIOEmm+0x178>
            return (PageTable*)(entry->Address << 12);
ffffffff8001b966:	49 8b 45 00          	mov    0x0(%r13),%rax
ffffffff8001b96a:	48 25 00 f0 ff ff    	and    $0xfffffffffffff000,%rax
            return (address >> 12) & 0x1ff;
ffffffff8001b970:	48 c1 eb 09          	shr    $0x9,%rbx
        auto PML2 = HandleLevel(virtualAddressObj, PML3, 3);
        auto PML1 = HandleLevel(virtualAddressObj, PML2, 2);

        PageTableEntry* pageEntry = (PageTableEntry*)Memory::HHDM(&PML1->entries[virtualAddressObj.GetPageIndex()]);

        pageEntry->Present = true;
ffffffff8001b974:	49 81 e4 00 f0 ff ff 	and    $0xfffffffffffff000,%r12
        PageTableEntry* pageEntry = (PageTableEntry*)Memory::HHDM(&PML1->entries[virtualAddressObj.GetPageIndex()]);
ffffffff8001b97b:	81 e3 f8 0f 00 00    	and    $0xff8,%ebx
        pageEntry->Present = true;
ffffffff8001b981:	49 83 cc 1b          	or     $0x1b,%r12
        PageTableEntry* pageEntry = (PageTableEntry*)Memory::HHDM(&PML1->entries[virtualAddressObj.GetPageIndex()]);
ffffffff8001b985:	48 01 d8             	add    %rbx,%rax
ffffffff8001b988:	48 01 d0             	add    %rdx,%rax
        pageEntry->Present = true;
ffffffff8001b98b:	48 8b 10             	mov    (%rax),%rdx
ffffffff8001b98e:	81 e2 e4 0f 00 00    	and    $0xfe4,%edx
ffffffff8001b994:	49 09 d4             	or     %rdx,%r12
ffffffff8001b997:	4c 89 20             	mov    %r12,(%rax)
        pageEntry->Writable = true;
        pageEntry->CacheDisabled = true;
        pageEntry->WriteThrough = true;

        pageEntry->Address = physicalAddress >> 12;
    }
ffffffff8001b99a:	5b                   	pop    %rbx
ffffffff8001b99b:	41 5c                	pop    %r12
ffffffff8001b99d:	41 5d                	pop    %r13
ffffffff8001b99f:	41 5e                	pop    %r14
ffffffff8001b9a1:	5d                   	pop    %rbp
ffffffff8001b9a2:	c3                   	ret
ffffffff8001b9a3:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            Panic("Value that isn't page-aligned passed as address to Paging::MapMMIO!", nullptr);
ffffffff8001b9a8:	31 f6                	xor    %esi,%esi
ffffffff8001b9aa:	48 c7 c7 50 cf 02 80 	mov    $0xffffffff8002cf50,%rdi
ffffffff8001b9b1:	e8 da 01 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
            if (newAddress % 0x1000 != 0) {
ffffffff8001b9b6:	e9 31 ff ff ff       	jmp    ffffffff8001b8ec <_ZN6Memory3VMM6Paging7MapMMIOEmm+0x2c>
ffffffff8001b9bb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff8001b9c0:	31 f6                	xor    %esi,%esi
ffffffff8001b9c2:	48 c7 c7 50 cf 02 80 	mov    $0xffffffff8002cf50,%rdi
ffffffff8001b9c9:	e8 c2 01 ff ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
            Print(string);
ffffffff8001b9ce:	48 c7 c7 6b bb 02 80 	mov    $0xffffffff8002bb6b,%rdi
            g_kernelLogDepth++;
ffffffff8001b9d5:	83 05 c8 3a 1c 00 01 	addl   $0x1,0x1c3ac8(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001b9dc:	e8 df 77 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b9e1:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001b9e8:	e8 d3 77 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b9ed:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001b9f4:	e8 c7 77 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001b9f9:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8001ba00:	e8 bb 77 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001ba05:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001ba0c:	e8 af 77 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001ba11:	48 c7 c7 d0 ce 02 80 	mov    $0xffffffff8002ced0,%rdi
ffffffff8001ba18:	e8 a3 77 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001ba1d:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001ba24:	e8 97 77 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001ba29:	83 2d 74 3a 1c 00 01 	subl   $0x1,0x1c3a74(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001ba30:	e9 b7 fe ff ff       	jmp    ffffffff8001b8ec <_ZN6Memory3VMM6Paging7MapMMIOEmm+0x2c>
ffffffff8001ba35:	0f 1f 00             	nopl   (%rax)
            entry->Present = true;
ffffffff8001ba38:	83 c8 03             	or     $0x3,%eax
            uint64_t downLevelAddr = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001ba3b:	48 8b 3d 6e 0f 13 00 	mov    0x130f6e(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
            entry->Present = true;
ffffffff8001ba42:	41 88 45 00          	mov    %al,0x0(%r13)
            uint64_t downLevelAddr = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001ba46:	e8 c5 f7 ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
        return address - HHDMBase;
ffffffff8001ba4b:	48 8b 15 56 0f 13 00 	mov    0x130f56(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            entry->Address = downLevelAddr >> 12;
ffffffff8001ba52:	49 8b 4d 00          	mov    0x0(%r13),%rcx
ffffffff8001ba56:	48 29 d0             	sub    %rdx,%rax
ffffffff8001ba59:	81 e1 ff 0f 00 00    	and    $0xfff,%ecx
ffffffff8001ba5f:	48 89 c6             	mov    %rax,%rsi
ffffffff8001ba62:	48 81 e6 00 f0 ff ff 	and    $0xfffffffffffff000,%rsi
ffffffff8001ba69:	48 09 f1             	or     %rsi,%rcx
ffffffff8001ba6c:	49 89 4d 00          	mov    %rcx,0x0(%r13)
            return (PageTable*)downLevelAddr;
ffffffff8001ba70:	e9 fb fe ff ff       	jmp    ffffffff8001b970 <_ZN6Memory3VMM6Paging7MapMMIOEmm+0xb0>
ffffffff8001ba75:	0f 1f 00             	nopl   (%rax)
            entry->Present = true;
ffffffff8001ba78:	83 c8 03             	or     $0x3,%eax
            uint64_t downLevelAddr = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001ba7b:	48 8b 3d 2e 0f 13 00 	mov    0x130f2e(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
            entry->Present = true;
ffffffff8001ba82:	41 88 06             	mov    %al,(%r14)
            uint64_t downLevelAddr = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001ba85:	e8 86 f7 ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff8001ba8a:	48 8b 15 17 0f 13 00 	mov    0x130f17(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001ba91:	48 29 d0             	sub    %rdx,%rax
            entry->Address = downLevelAddr >> 12;
ffffffff8001ba94:	48 89 c1             	mov    %rax,%rcx
ffffffff8001ba97:	49 89 c5             	mov    %rax,%r13
ffffffff8001ba9a:	49 8b 06             	mov    (%r14),%rax
ffffffff8001ba9d:	48 81 e1 00 f0 ff ff 	and    $0xfffffffffffff000,%rcx
ffffffff8001baa4:	25 ff 0f 00 00       	and    $0xfff,%eax
ffffffff8001baa9:	48 09 c8             	or     %rcx,%rax
ffffffff8001baac:	49 89 06             	mov    %rax,(%r14)
            return (PageTable*)downLevelAddr;
ffffffff8001baaf:	e9 93 fe ff ff       	jmp    ffffffff8001b947 <_ZN6Memory3VMM6Paging7MapMMIOEmm+0x87>
ffffffff8001bab4:	0f 1f 40 00          	nopl   0x0(%rax)
            entry->Present = true;
ffffffff8001bab8:	83 c8 03             	or     $0x3,%eax
            uint64_t downLevelAddr = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001babb:	48 8b 3d ee 0e 13 00 	mov    0x130eee(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
            entry->Present = true;
ffffffff8001bac2:	41 88 45 00          	mov    %al,0x0(%r13)
            uint64_t downLevelAddr = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001bac6:	e8 45 f7 ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff8001bacb:	48 8b 15 d6 0e 13 00 	mov    0x130ed6(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001bad2:	48 29 d0             	sub    %rdx,%rax
            entry->Address = downLevelAddr >> 12;
ffffffff8001bad5:	48 89 c1             	mov    %rax,%rcx
ffffffff8001bad8:	49 89 c6             	mov    %rax,%r14
ffffffff8001badb:	49 8b 45 00          	mov    0x0(%r13),%rax
ffffffff8001badf:	48 81 e1 00 f0 ff ff 	and    $0xfffffffffffff000,%rcx
ffffffff8001bae6:	25 ff 0f 00 00       	and    $0xfff,%eax
ffffffff8001baeb:	48 09 c8             	or     %rcx,%rax
ffffffff8001baee:	49 89 45 00          	mov    %rax,0x0(%r13)
            return (PageTable*)downLevelAddr;
ffffffff8001baf2:	e9 28 fe ff ff       	jmp    ffffffff8001b91f <_ZN6Memory3VMM6Paging7MapMMIOEmm+0x5f>
ffffffff8001baf7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001bafe:	00 00 

ffffffff8001bb00 <_ZN6Memory3VMM6Paging14CreateUserPML4Ev>:
        pageEntry->Supervisor = 1;  // User-accessible

        pageEntry->Address = physicalAddress >> 12;
    }

    std::uint64_t Paging::CreateUserPML4() {
ffffffff8001bb00:	55                   	push   %rbp
        // Allocate a new PML4
        void* newPage = Memory::g_pfa->AllocateZeroed();
ffffffff8001bb01:	48 8b 3d a8 0e 13 00 	mov    0x130ea8(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
    std::uint64_t Paging::CreateUserPML4() {
ffffffff8001bb08:	48 89 e5             	mov    %rsp,%rbp
        void* newPage = Memory::g_pfa->AllocateZeroed();
ffffffff8001bb0b:	e8 00 f7 ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff8001bb10:	48 8b 35 91 0e 13 00 	mov    0x130e91(%rip),%rsi        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
        return HHDMBase + address;
ffffffff8001bb17:	48 8b 15 a2 0e 13 00 	mov    0x130ea2(%rip),%rdx        # ffffffff8014c9c0 <_ZN6Memory3VMM8g_pagingE>
        return address - HHDMBase;
ffffffff8001bb1e:	48 89 c7             	mov    %rax,%rdi
ffffffff8001bb21:	48 29 f7             	sub    %rsi,%rdi
        return HHDMBase + address;
ffffffff8001bb24:	48 03 32             	add    (%rdx),%rsi
        uint64_t newPml4Phys = Memory::SubHHDM((uint64_t)newPage);
        PageTable* newPml4 = (PageTable*)newPage;  // HHDM virtual address

        // Copy kernel-half entries (256-511) from the global PML4
        PageTable* kernelPml4 = (PageTable*)Memory::HHDM((uint64_t)g_paging->PML4);
ffffffff8001bb27:	ba 00 08 00 00       	mov    $0x800,%edx
ffffffff8001bb2c:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001bb33:	00 00 00 00 
ffffffff8001bb37:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001bb3e:	00 00 
        for (int i = 256; i < 512; i++) {
            newPml4->entries[i] = kernelPml4->entries[i];
ffffffff8001bb40:	48 8b 0c 16          	mov    (%rsi,%rdx,1),%rcx
ffffffff8001bb44:	48 89 0c 10          	mov    %rcx,(%rax,%rdx,1)
        for (int i = 256; i < 512; i++) {
ffffffff8001bb48:	48 83 c2 08          	add    $0x8,%rdx
ffffffff8001bb4c:	48 81 fa 00 10 00 00 	cmp    $0x1000,%rdx
ffffffff8001bb53:	75 eb                	jne    ffffffff8001bb40 <_ZN6Memory3VMM6Paging14CreateUserPML4Ev+0x40>
        }

        return newPml4Phys;
    }
ffffffff8001bb55:	48 89 f8             	mov    %rdi,%rax
ffffffff8001bb58:	5d                   	pop    %rbp
ffffffff8001bb59:	c3                   	ret
ffffffff8001bb5a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)

ffffffff8001bb60 <_ZN6Memory3VMM6Paging9MapUserInEmmm>:

    void Paging::MapUserIn(std::uint64_t pml4Phys, std::uint64_t physicalAddress, std::uint64_t virtualAddress) {
ffffffff8001bb60:	55                   	push   %rbp
ffffffff8001bb61:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001bb64:	41 56                	push   %r14
ffffffff8001bb66:	41 55                	push   %r13
ffffffff8001bb68:	49 89 f5             	mov    %rsi,%r13
ffffffff8001bb6b:	41 54                	push   %r12
ffffffff8001bb6d:	49 89 fc             	mov    %rdi,%r12
ffffffff8001bb70:	53                   	push   %rbx
ffffffff8001bb71:	48 89 d3             	mov    %rdx,%rbx
        if (virtualAddress % 0x1000 != 0 || physicalAddress % 0x1000 != 0) {
ffffffff8001bb74:	f7 c2 ff 0f 00 00    	test   $0xfff,%edx
ffffffff8001bb7a:	0f 85 f0 00 00 00    	jne    ffffffff8001bc70 <_ZN6Memory3VMM6Paging9MapUserInEmmm+0x110>
ffffffff8001bb80:	f7 c6 ff 0f 00 00    	test   $0xfff,%esi
ffffffff8001bb86:	0f 85 cc 00 00 00    	jne    ffffffff8001bc58 <_ZN6Memory3VMM6Paging9MapUserInEmmm+0xf8>
            return (address >> 39) & 0x1ff;
ffffffff8001bb8c:	48 89 d8             	mov    %rbx,%rax
        return HHDMBase + (uint64_t)address;
ffffffff8001bb8f:	48 8b 15 12 0e 13 00 	mov    0x130e12(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001bb96:	48 c1 e8 24          	shr    $0x24,%rax

        VirtualAddress va(virtualAddress);

        // Walk/create page tables from the given PML4, setting User bit at each level
        auto walkLevel = [](PageTable* table, uint64_t index) -> PageTable* {
            PageTableEntry* entry = (PageTableEntry*)Memory::HHDM(&table->entries[index]);
ffffffff8001bb9a:	25 f8 0f 00 00       	and    $0xff8,%eax
ffffffff8001bb9f:	49 01 c4             	add    %rax,%r12
ffffffff8001bba2:	49 01 d4             	add    %rdx,%r12
            if (!entry->Present) {
ffffffff8001bba5:	41 0f b6 04 24       	movzbl (%r12),%eax
ffffffff8001bbaa:	a8 01                	test   $0x1,%al
ffffffff8001bbac:	0f 84 b6 01 00 00    	je     ffffffff8001bd68 <_ZN6Memory3VMM6Paging9MapUserInEmmm+0x208>
                entry->Supervisor = 1;  // User-accessible
                uint64_t newPhys = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
                entry->Address = newPhys >> 12;
                return (PageTable*)newPhys;
            } else {
                entry->Supervisor = 1;
ffffffff8001bbb2:	83 c8 04             	or     $0x4,%eax
ffffffff8001bbb5:	41 88 04 24          	mov    %al,(%r12)
                return (PageTable*)(entry->Address << 12);
ffffffff8001bbb9:	4d 8b 34 24          	mov    (%r12),%r14
ffffffff8001bbbd:	49 81 e6 00 f0 ff ff 	and    $0xfffffffffffff000,%r14
            return (address >> 30) & 0x1ff;
ffffffff8001bbc4:	48 89 d8             	mov    %rbx,%rax
ffffffff8001bbc7:	48 c1 e8 1b          	shr    $0x1b,%rax
            PageTableEntry* entry = (PageTableEntry*)Memory::HHDM(&table->entries[index]);
ffffffff8001bbcb:	25 f8 0f 00 00       	and    $0xff8,%eax
ffffffff8001bbd0:	49 01 c6             	add    %rax,%r14
ffffffff8001bbd3:	49 01 d6             	add    %rdx,%r14
            if (!entry->Present) {
ffffffff8001bbd6:	41 0f b6 06          	movzbl (%r14),%eax
ffffffff8001bbda:	a8 01                	test   $0x1,%al
ffffffff8001bbdc:	0f 84 46 01 00 00    	je     ffffffff8001bd28 <_ZN6Memory3VMM6Paging9MapUserInEmmm+0x1c8>
                entry->Supervisor = 1;
ffffffff8001bbe2:	83 c8 04             	or     $0x4,%eax
ffffffff8001bbe5:	41 88 06             	mov    %al,(%r14)
                return (PageTable*)(entry->Address << 12);
ffffffff8001bbe8:	4d 8b 26             	mov    (%r14),%r12
ffffffff8001bbeb:	49 81 e4 00 f0 ff ff 	and    $0xfffffffffffff000,%r12
            return (address >> 21) & 0x1ff;
ffffffff8001bbf2:	48 89 d8             	mov    %rbx,%rax
ffffffff8001bbf5:	48 c1 e8 12          	shr    $0x12,%rax
            PageTableEntry* entry = (PageTableEntry*)Memory::HHDM(&table->entries[index]);
ffffffff8001bbf9:	25 f8 0f 00 00       	and    $0xff8,%eax
ffffffff8001bbfe:	49 01 c4             	add    %rax,%r12
ffffffff8001bc01:	49 01 d4             	add    %rdx,%r12
            if (!entry->Present) {
ffffffff8001bc04:	41 0f b6 04 24       	movzbl (%r12),%eax
ffffffff8001bc09:	a8 01                	test   $0x1,%al
ffffffff8001bc0b:	0f 84 d7 00 00 00    	je     ffffffff8001bce8 <_ZN6Memory3VMM6Paging9MapUserInEmmm+0x188>
                entry->Supervisor = 1;
ffffffff8001bc11:	83 c8 04             	or     $0x4,%eax
ffffffff8001bc14:	41 88 04 24          	mov    %al,(%r12)
                return (PageTable*)(entry->Address << 12);
ffffffff8001bc18:	49 8b 04 24          	mov    (%r12),%rax
ffffffff8001bc1c:	48 25 00 f0 ff ff    	and    $0xfffffffffffff000,%rax
            return (address >> 12) & 0x1ff;
ffffffff8001bc22:	48 c1 eb 09          	shr    $0x9,%rbx
        auto pml3 = walkLevel(pml4, va.GetL4Index());
        auto pml2 = walkLevel(pml3, va.GetL3Index());
        auto pml1 = walkLevel(pml2, va.GetL2Index());

        PageTableEntry* pageEntry = (PageTableEntry*)Memory::HHDM(&pml1->entries[va.GetPageIndex()]);
        pageEntry->Present = true;
ffffffff8001bc26:	49 81 e5 00 f0 ff ff 	and    $0xfffffffffffff000,%r13
        PageTableEntry* pageEntry = (PageTableEntry*)Memory::HHDM(&pml1->entries[va.GetPageIndex()]);
ffffffff8001bc2d:	81 e3 f8 0f 00 00    	and    $0xff8,%ebx
        pageEntry->Present = true;
ffffffff8001bc33:	49 83 cd 07          	or     $0x7,%r13
        PageTableEntry* pageEntry = (PageTableEntry*)Memory::HHDM(&pml1->entries[va.GetPageIndex()]);
ffffffff8001bc37:	48 01 d8             	add    %rbx,%rax
ffffffff8001bc3a:	48 01 d0             	add    %rdx,%rax
        pageEntry->Present = true;
ffffffff8001bc3d:	48 8b 10             	mov    (%rax),%rdx
ffffffff8001bc40:	81 e2 f8 0f 00 00    	and    $0xff8,%edx
ffffffff8001bc46:	49 09 d5             	or     %rdx,%r13
ffffffff8001bc49:	4c 89 28             	mov    %r13,(%rax)
        pageEntry->Writable = true;
        pageEntry->Supervisor = 1;
        pageEntry->Address = physicalAddress >> 12;
    }
ffffffff8001bc4c:	5b                   	pop    %rbx
ffffffff8001bc4d:	41 5c                	pop    %r12
ffffffff8001bc4f:	41 5d                	pop    %r13
ffffffff8001bc51:	41 5e                	pop    %r14
ffffffff8001bc53:	5d                   	pop    %rbp
ffffffff8001bc54:	c3                   	ret
ffffffff8001bc55:	0f 1f 00             	nopl   (%rax)
            Panic("Non-aligned address in Paging::MapUserIn!", nullptr);
ffffffff8001bc58:	31 f6                	xor    %esi,%esi
ffffffff8001bc5a:	48 c7 c7 98 cf 02 80 	mov    $0xffffffff8002cf98,%rdi
ffffffff8001bc61:	e8 2a ff fe ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
            if (newAddress % 0x1000 != 0) {
ffffffff8001bc66:	e9 21 ff ff ff       	jmp    ffffffff8001bb8c <_ZN6Memory3VMM6Paging9MapUserInEmmm+0x2c>
ffffffff8001bc6b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff8001bc70:	31 f6                	xor    %esi,%esi
ffffffff8001bc72:	48 c7 c7 98 cf 02 80 	mov    $0xffffffff8002cf98,%rdi
ffffffff8001bc79:	e8 12 ff fe ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
            Print(string);
ffffffff8001bc7e:	48 c7 c7 6b bb 02 80 	mov    $0xffffffff8002bb6b,%rdi
            g_kernelLogDepth++;
ffffffff8001bc85:	83 05 18 38 1c 00 01 	addl   $0x1,0x1c3818(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001bc8c:	e8 2f 75 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001bc91:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001bc98:	e8 23 75 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001bc9d:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001bca4:	e8 17 75 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001bca9:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8001bcb0:	e8 0b 75 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001bcb5:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001bcbc:	e8 ff 74 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001bcc1:	48 c7 c7 d0 ce 02 80 	mov    $0xffffffff8002ced0,%rdi
ffffffff8001bcc8:	e8 f3 74 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001bccd:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001bcd4:	e8 e7 74 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001bcd9:	83 2d c4 37 1c 00 01 	subl   $0x1,0x1c37c4(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001bce0:	e9 a7 fe ff ff       	jmp    ffffffff8001bb8c <_ZN6Memory3VMM6Paging9MapUserInEmmm+0x2c>
ffffffff8001bce5:	0f 1f 00             	nopl   (%rax)
                entry->Present = true;
ffffffff8001bce8:	83 c8 07             	or     $0x7,%eax
                uint64_t newPhys = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001bceb:	48 8b 3d be 0c 13 00 	mov    0x130cbe(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
                entry->Present = true;
ffffffff8001bcf2:	41 88 04 24          	mov    %al,(%r12)
                uint64_t newPhys = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001bcf6:	e8 15 f5 ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
        return address - HHDMBase;
ffffffff8001bcfb:	48 8b 15 a6 0c 13 00 	mov    0x130ca6(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
                entry->Address = newPhys >> 12;
ffffffff8001bd02:	49 8b 0c 24          	mov    (%r12),%rcx
ffffffff8001bd06:	48 29 d0             	sub    %rdx,%rax
ffffffff8001bd09:	81 e1 ff 0f 00 00    	and    $0xfff,%ecx
ffffffff8001bd0f:	48 89 c6             	mov    %rax,%rsi
ffffffff8001bd12:	48 81 e6 00 f0 ff ff 	and    $0xfffffffffffff000,%rsi
ffffffff8001bd19:	48 09 f1             	or     %rsi,%rcx
ffffffff8001bd1c:	49 89 0c 24          	mov    %rcx,(%r12)
                return (PageTable*)newPhys;
ffffffff8001bd20:	e9 fd fe ff ff       	jmp    ffffffff8001bc22 <_ZN6Memory3VMM6Paging9MapUserInEmmm+0xc2>
ffffffff8001bd25:	0f 1f 00             	nopl   (%rax)
                entry->Present = true;
ffffffff8001bd28:	83 c8 07             	or     $0x7,%eax
                uint64_t newPhys = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001bd2b:	48 8b 3d 7e 0c 13 00 	mov    0x130c7e(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
                entry->Present = true;
ffffffff8001bd32:	41 88 06             	mov    %al,(%r14)
                uint64_t newPhys = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001bd35:	e8 d6 f4 ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff8001bd3a:	48 8b 15 67 0c 13 00 	mov    0x130c67(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001bd41:	48 29 d0             	sub    %rdx,%rax
                entry->Address = newPhys >> 12;
ffffffff8001bd44:	48 89 c1             	mov    %rax,%rcx
ffffffff8001bd47:	49 89 c4             	mov    %rax,%r12
ffffffff8001bd4a:	49 8b 06             	mov    (%r14),%rax
ffffffff8001bd4d:	48 81 e1 00 f0 ff ff 	and    $0xfffffffffffff000,%rcx
ffffffff8001bd54:	25 ff 0f 00 00       	and    $0xfff,%eax
ffffffff8001bd59:	48 09 c8             	or     %rcx,%rax
ffffffff8001bd5c:	49 89 06             	mov    %rax,(%r14)
                return (PageTable*)newPhys;
ffffffff8001bd5f:	e9 8e fe ff ff       	jmp    ffffffff8001bbf2 <_ZN6Memory3VMM6Paging9MapUserInEmmm+0x92>
ffffffff8001bd64:	0f 1f 40 00          	nopl   0x0(%rax)
                entry->Present = true;
ffffffff8001bd68:	83 c8 07             	or     $0x7,%eax
                uint64_t newPhys = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001bd6b:	48 8b 3d 3e 0c 13 00 	mov    0x130c3e(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
                entry->Present = true;
ffffffff8001bd72:	41 88 04 24          	mov    %al,(%r12)
                uint64_t newPhys = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001bd76:	e8 95 f4 ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff8001bd7b:	48 8b 15 26 0c 13 00 	mov    0x130c26(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001bd82:	48 29 d0             	sub    %rdx,%rax
                entry->Address = newPhys >> 12;
ffffffff8001bd85:	48 89 c1             	mov    %rax,%rcx
ffffffff8001bd88:	49 89 c6             	mov    %rax,%r14
ffffffff8001bd8b:	49 8b 04 24          	mov    (%r12),%rax
ffffffff8001bd8f:	48 81 e1 00 f0 ff ff 	and    $0xfffffffffffff000,%rcx
ffffffff8001bd96:	25 ff 0f 00 00       	and    $0xfff,%eax
ffffffff8001bd9b:	48 09 c8             	or     %rcx,%rax
ffffffff8001bd9e:	49 89 04 24          	mov    %rax,(%r12)
                return (PageTable*)newPhys;
ffffffff8001bda2:	e9 1d fe ff ff       	jmp    ffffffff8001bbc4 <_ZN6Memory3VMM6Paging9MapUserInEmmm+0x64>
ffffffff8001bda7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001bdae:	00 00 

ffffffff8001bdb0 <_ZN6Memory3VMM6Paging11MapUserInWCEmmm>:

    void Paging::MapUserInWC(std::uint64_t pml4Phys, std::uint64_t physicalAddress, std::uint64_t virtualAddress) {
ffffffff8001bdb0:	55                   	push   %rbp
ffffffff8001bdb1:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001bdb4:	41 56                	push   %r14
ffffffff8001bdb6:	41 55                	push   %r13
ffffffff8001bdb8:	49 89 f5             	mov    %rsi,%r13
ffffffff8001bdbb:	41 54                	push   %r12
ffffffff8001bdbd:	49 89 fc             	mov    %rdi,%r12
ffffffff8001bdc0:	53                   	push   %rbx
ffffffff8001bdc1:	48 89 d3             	mov    %rdx,%rbx
        if (virtualAddress % 0x1000 != 0 || physicalAddress % 0x1000 != 0) {
ffffffff8001bdc4:	f7 c2 ff 0f 00 00    	test   $0xfff,%edx
ffffffff8001bdca:	0f 85 f0 00 00 00    	jne    ffffffff8001bec0 <_ZN6Memory3VMM6Paging11MapUserInWCEmmm+0x110>
ffffffff8001bdd0:	f7 c6 ff 0f 00 00    	test   $0xfff,%esi
ffffffff8001bdd6:	0f 85 cc 00 00 00    	jne    ffffffff8001bea8 <_ZN6Memory3VMM6Paging11MapUserInWCEmmm+0xf8>
            return (address >> 39) & 0x1ff;
ffffffff8001bddc:	48 89 d8             	mov    %rbx,%rax
        return HHDMBase + (uint64_t)address;
ffffffff8001bddf:	48 8b 15 c2 0b 13 00 	mov    0x130bc2(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001bde6:	48 c1 e8 24          	shr    $0x24,%rax
            PageTableEntry* entry = (PageTableEntry*)Memory::HHDM(&table->entries[index]);
ffffffff8001bdea:	25 f8 0f 00 00       	and    $0xff8,%eax
ffffffff8001bdef:	49 01 c4             	add    %rax,%r12
ffffffff8001bdf2:	49 01 d4             	add    %rdx,%r12
            if (!entry->Present) {
ffffffff8001bdf5:	41 0f b6 04 24       	movzbl (%r12),%eax
ffffffff8001bdfa:	a8 01                	test   $0x1,%al
ffffffff8001bdfc:	0f 84 b6 01 00 00    	je     ffffffff8001bfb8 <_ZN6Memory3VMM6Paging11MapUserInWCEmmm+0x208>
                entry->Supervisor = 1;
ffffffff8001be02:	83 c8 04             	or     $0x4,%eax
ffffffff8001be05:	41 88 04 24          	mov    %al,(%r12)
                return (PageTable*)(entry->Address << 12);
ffffffff8001be09:	4d 8b 34 24          	mov    (%r12),%r14
ffffffff8001be0d:	49 81 e6 00 f0 ff ff 	and    $0xfffffffffffff000,%r14
            return (address >> 30) & 0x1ff;
ffffffff8001be14:	48 89 d8             	mov    %rbx,%rax
ffffffff8001be17:	48 c1 e8 1b          	shr    $0x1b,%rax
            PageTableEntry* entry = (PageTableEntry*)Memory::HHDM(&table->entries[index]);
ffffffff8001be1b:	25 f8 0f 00 00       	and    $0xff8,%eax
ffffffff8001be20:	49 01 c6             	add    %rax,%r14
ffffffff8001be23:	49 01 d6             	add    %rdx,%r14
            if (!entry->Present) {
ffffffff8001be26:	41 0f b6 06          	movzbl (%r14),%eax
ffffffff8001be2a:	a8 01                	test   $0x1,%al
ffffffff8001be2c:	0f 84 46 01 00 00    	je     ffffffff8001bf78 <_ZN6Memory3VMM6Paging11MapUserInWCEmmm+0x1c8>
                entry->Supervisor = 1;
ffffffff8001be32:	83 c8 04             	or     $0x4,%eax
ffffffff8001be35:	41 88 06             	mov    %al,(%r14)
                return (PageTable*)(entry->Address << 12);
ffffffff8001be38:	4d 8b 26             	mov    (%r14),%r12
ffffffff8001be3b:	49 81 e4 00 f0 ff ff 	and    $0xfffffffffffff000,%r12
            return (address >> 21) & 0x1ff;
ffffffff8001be42:	48 89 d8             	mov    %rbx,%rax
ffffffff8001be45:	48 c1 e8 12          	shr    $0x12,%rax
            PageTableEntry* entry = (PageTableEntry*)Memory::HHDM(&table->entries[index]);
ffffffff8001be49:	25 f8 0f 00 00       	and    $0xff8,%eax
ffffffff8001be4e:	49 01 c4             	add    %rax,%r12
ffffffff8001be51:	49 01 d4             	add    %rdx,%r12
            if (!entry->Present) {
ffffffff8001be54:	41 0f b6 04 24       	movzbl (%r12),%eax
ffffffff8001be59:	a8 01                	test   $0x1,%al
ffffffff8001be5b:	0f 84 d7 00 00 00    	je     ffffffff8001bf38 <_ZN6Memory3VMM6Paging11MapUserInWCEmmm+0x188>
                entry->Supervisor = 1;
ffffffff8001be61:	83 c8 04             	or     $0x4,%eax
ffffffff8001be64:	41 88 04 24          	mov    %al,(%r12)
                return (PageTable*)(entry->Address << 12);
ffffffff8001be68:	49 8b 04 24          	mov    (%r12),%rax
ffffffff8001be6c:	48 25 00 f0 ff ff    	and    $0xfffffffffffff000,%rax
            return (address >> 12) & 0x1ff;
ffffffff8001be72:	48 c1 eb 09          	shr    $0x9,%rbx
        auto pml3 = walkLevel(pml4, va.GetL4Index());
        auto pml2 = walkLevel(pml3, va.GetL3Index());
        auto pml1 = walkLevel(pml2, va.GetL2Index());

        PageTableEntry* pageEntry = (PageTableEntry*)Memory::HHDM(&pml1->entries[va.GetPageIndex()]);
        pageEntry->Present = true;
ffffffff8001be76:	49 81 e5 00 f0 ff ff 	and    $0xfffffffffffff000,%r13
        PageTableEntry* pageEntry = (PageTableEntry*)Memory::HHDM(&pml1->entries[va.GetPageIndex()]);
ffffffff8001be7d:	81 e3 f8 0f 00 00    	and    $0xff8,%ebx
        pageEntry->Present = true;
ffffffff8001be83:	49 83 cd 0f          	or     $0xf,%r13
        PageTableEntry* pageEntry = (PageTableEntry*)Memory::HHDM(&pml1->entries[va.GetPageIndex()]);
ffffffff8001be87:	48 01 d8             	add    %rbx,%rax
ffffffff8001be8a:	48 01 d0             	add    %rdx,%rax
        pageEntry->Present = true;
ffffffff8001be8d:	48 8b 10             	mov    (%rax),%rdx
ffffffff8001be90:	81 e2 f0 0f 00 00    	and    $0xff0,%edx
ffffffff8001be96:	49 09 d5             	or     %rdx,%r13
ffffffff8001be99:	4c 89 28             	mov    %r13,(%rax)
        pageEntry->Writable = true;
        pageEntry->Supervisor = 1;
        pageEntry->WriteThrough = true;   // PWT=1, PCD=0 → PAT entry 1 = WC
        pageEntry->Address = physicalAddress >> 12;
    }
ffffffff8001be9c:	5b                   	pop    %rbx
ffffffff8001be9d:	41 5c                	pop    %r12
ffffffff8001be9f:	41 5d                	pop    %r13
ffffffff8001bea1:	41 5e                	pop    %r14
ffffffff8001bea3:	5d                   	pop    %rbp
ffffffff8001bea4:	c3                   	ret
ffffffff8001bea5:	0f 1f 00             	nopl   (%rax)
            Panic("Non-aligned address in Paging::MapUserInWC!", nullptr);
ffffffff8001bea8:	31 f6                	xor    %esi,%esi
ffffffff8001beaa:	48 c7 c7 c8 cf 02 80 	mov    $0xffffffff8002cfc8,%rdi
ffffffff8001beb1:	e8 da fc fe ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
            if (newAddress % 0x1000 != 0) {
ffffffff8001beb6:	e9 21 ff ff ff       	jmp    ffffffff8001bddc <_ZN6Memory3VMM6Paging11MapUserInWCEmmm+0x2c>
ffffffff8001bebb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff8001bec0:	31 f6                	xor    %esi,%esi
ffffffff8001bec2:	48 c7 c7 c8 cf 02 80 	mov    $0xffffffff8002cfc8,%rdi
ffffffff8001bec9:	e8 c2 fc fe ff       	call   ffffffff8000bb90 <_Z5PanicPKcPN6System10PanicFrameE>
            Print(string);
ffffffff8001bece:	48 c7 c7 6b bb 02 80 	mov    $0xffffffff8002bb6b,%rdi
            g_kernelLogDepth++;
ffffffff8001bed5:	83 05 c8 35 1c 00 01 	addl   $0x1,0x1c35c8(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001bedc:	e8 df 72 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001bee1:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001bee8:	e8 d3 72 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001beed:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001bef4:	e8 c7 72 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001bef9:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8001bf00:	e8 bb 72 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001bf05:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001bf0c:	e8 af 72 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001bf11:	48 c7 c7 d0 ce 02 80 	mov    $0xffffffff8002ced0,%rdi
ffffffff8001bf18:	e8 a3 72 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001bf1d:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001bf24:	e8 97 72 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001bf29:	83 2d 74 35 1c 00 01 	subl   $0x1,0x1c3574(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001bf30:	e9 a7 fe ff ff       	jmp    ffffffff8001bddc <_ZN6Memory3VMM6Paging11MapUserInWCEmmm+0x2c>
ffffffff8001bf35:	0f 1f 00             	nopl   (%rax)
                entry->Present = true;
ffffffff8001bf38:	83 c8 07             	or     $0x7,%eax
                uint64_t newPhys = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001bf3b:	48 8b 3d 6e 0a 13 00 	mov    0x130a6e(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
                entry->Present = true;
ffffffff8001bf42:	41 88 04 24          	mov    %al,(%r12)
                uint64_t newPhys = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001bf46:	e8 c5 f2 ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
        return address - HHDMBase;
ffffffff8001bf4b:	48 8b 15 56 0a 13 00 	mov    0x130a56(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
                entry->Address = newPhys >> 12;
ffffffff8001bf52:	49 8b 0c 24          	mov    (%r12),%rcx
ffffffff8001bf56:	48 29 d0             	sub    %rdx,%rax
ffffffff8001bf59:	81 e1 ff 0f 00 00    	and    $0xfff,%ecx
ffffffff8001bf5f:	48 89 c6             	mov    %rax,%rsi
ffffffff8001bf62:	48 81 e6 00 f0 ff ff 	and    $0xfffffffffffff000,%rsi
ffffffff8001bf69:	48 09 f1             	or     %rsi,%rcx
ffffffff8001bf6c:	49 89 0c 24          	mov    %rcx,(%r12)
                return (PageTable*)newPhys;
ffffffff8001bf70:	e9 fd fe ff ff       	jmp    ffffffff8001be72 <_ZN6Memory3VMM6Paging11MapUserInWCEmmm+0xc2>
ffffffff8001bf75:	0f 1f 00             	nopl   (%rax)
                entry->Present = true;
ffffffff8001bf78:	83 c8 07             	or     $0x7,%eax
                uint64_t newPhys = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001bf7b:	48 8b 3d 2e 0a 13 00 	mov    0x130a2e(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
                entry->Present = true;
ffffffff8001bf82:	41 88 06             	mov    %al,(%r14)
                uint64_t newPhys = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001bf85:	e8 86 f2 ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff8001bf8a:	48 8b 15 17 0a 13 00 	mov    0x130a17(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001bf91:	48 29 d0             	sub    %rdx,%rax
                entry->Address = newPhys >> 12;
ffffffff8001bf94:	48 89 c1             	mov    %rax,%rcx
ffffffff8001bf97:	49 89 c4             	mov    %rax,%r12
ffffffff8001bf9a:	49 8b 06             	mov    (%r14),%rax
ffffffff8001bf9d:	48 81 e1 00 f0 ff ff 	and    $0xfffffffffffff000,%rcx
ffffffff8001bfa4:	25 ff 0f 00 00       	and    $0xfff,%eax
ffffffff8001bfa9:	48 09 c8             	or     %rcx,%rax
ffffffff8001bfac:	49 89 06             	mov    %rax,(%r14)
                return (PageTable*)newPhys;
ffffffff8001bfaf:	e9 8e fe ff ff       	jmp    ffffffff8001be42 <_ZN6Memory3VMM6Paging11MapUserInWCEmmm+0x92>
ffffffff8001bfb4:	0f 1f 40 00          	nopl   0x0(%rax)
                entry->Present = true;
ffffffff8001bfb8:	83 c8 07             	or     $0x7,%eax
                uint64_t newPhys = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001bfbb:	48 8b 3d ee 09 13 00 	mov    0x1309ee(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
                entry->Present = true;
ffffffff8001bfc2:	41 88 04 24          	mov    %al,(%r12)
                uint64_t newPhys = Memory::SubHHDM((uint64_t)Memory::g_pfa->AllocateZeroed());
ffffffff8001bfc6:	e8 45 f2 ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff8001bfcb:	48 8b 15 d6 09 13 00 	mov    0x1309d6(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001bfd2:	48 29 d0             	sub    %rdx,%rax
                entry->Address = newPhys >> 12;
ffffffff8001bfd5:	48 89 c1             	mov    %rax,%rcx
ffffffff8001bfd8:	49 89 c6             	mov    %rax,%r14
ffffffff8001bfdb:	49 8b 04 24          	mov    (%r12),%rax
ffffffff8001bfdf:	48 81 e1 00 f0 ff ff 	and    $0xfffffffffffff000,%rcx
ffffffff8001bfe6:	25 ff 0f 00 00       	and    $0xfff,%eax
ffffffff8001bfeb:	48 09 c8             	or     %rcx,%rax
ffffffff8001bfee:	49 89 04 24          	mov    %rax,(%r12)
                return (PageTable*)newPhys;
ffffffff8001bff2:	e9 1d fe ff ff       	jmp    ffffffff8001be14 <_ZN6Memory3VMM6Paging11MapUserInWCEmmm+0x64>
ffffffff8001bff7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001bffe:	00 00 

ffffffff8001c000 <_ZN6Memory3VMM6Paging11GetPhysAddrEmmb>:

    std::uint64_t Paging::GetPhysAddr(std::uint64_t pml4, std::uint64_t virtualAddress, bool use40BitL1) {
ffffffff8001c000:	55                   	push   %rbp
ffffffff8001c001:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001c004:	41 55                	push   %r13
ffffffff8001c006:	49 89 fd             	mov    %rdi,%r13
ffffffff8001c009:	41 54                	push   %r12
ffffffff8001c00b:	41 89 d4             	mov    %edx,%r12d
ffffffff8001c00e:	53                   	push   %rbx
ffffffff8001c00f:	48 89 f3             	mov    %rsi,%rbx
ffffffff8001c012:	48 83 ec 08          	sub    $0x8,%rsp
ffffffff8001c016:	f7 c6 ff 0f 00 00    	test   $0xfff,%esi
ffffffff8001c01c:	0f 85 9e 00 00 00    	jne    ffffffff8001c0c0 <_ZN6Memory3VMM6Paging11GetPhysAddrEmmb+0xc0>
            return (address >> 39) & 0x1ff;
ffffffff8001c022:	48 89 d8             	mov    %rbx,%rax
        return HHDMBase + address;
ffffffff8001c025:	48 8b 0d 7c 09 13 00 	mov    0x13097c(%rip),%rcx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8001c02c:	48 c1 e8 24          	shr    $0x24,%rax

        PageTable* pml4Virt = (PageTable*)HHDM(pml4);

        PageTableEntry* pml4_entry = &pml4Virt->entries[virtualAddressObj.GetL4Index()];

        PageTable* pml3 = (PageTable*)HHDM(pml4_entry->Address << 12);
ffffffff8001c030:	25 f8 0f 00 00       	and    $0xff8,%eax
ffffffff8001c035:	48 01 c8             	add    %rcx,%rax
ffffffff8001c038:	4a 8b 14 28          	mov    (%rax,%r13,1),%rdx
            return (address >> 30) & 0x1ff;
ffffffff8001c03c:	48 89 d8             	mov    %rbx,%rax
ffffffff8001c03f:	48 c1 e8 1b          	shr    $0x1b,%rax
        PageTableEntry* pml3_entry = &pml3->entries[virtualAddressObj.GetL3Index()];

        PageTable* pml2 = (PageTable*)HHDM(pml3_entry->Address << 12);
ffffffff8001c043:	25 f8 0f 00 00       	and    $0xff8,%eax
        PageTable* pml3 = (PageTable*)HHDM(pml4_entry->Address << 12);
ffffffff8001c048:	48 81 e2 00 f0 ff ff 	and    $0xfffffffffffff000,%rdx
        PageTable* pml2 = (PageTable*)HHDM(pml3_entry->Address << 12);
ffffffff8001c04f:	48 01 c8             	add    %rcx,%rax
ffffffff8001c052:	48 8b 14 10          	mov    (%rax,%rdx,1),%rdx
            return (address >> 21) & 0x1ff;
ffffffff8001c056:	48 89 d8             	mov    %rbx,%rax
            return (address >> 12) & 0x1ff;
ffffffff8001c059:	48 c1 eb 0c          	shr    $0xc,%rbx
            return (address >> 21) & 0x1ff;
ffffffff8001c05d:	48 c1 e8 12          	shr    $0x12,%rax
            return (address >> 12) & 0x1ff;
ffffffff8001c061:	81 e3 ff 01 00 00    	and    $0x1ff,%ebx
        PageTableEntry* pml2_entry = &pml2->entries[virtualAddressObj.GetL2Index()];

        PageTable* pml1 = (PageTable*)HHDM(pml2_entry->Address << 12);
ffffffff8001c067:	25 f8 0f 00 00       	and    $0xff8,%eax
        PageTable* pml2 = (PageTable*)HHDM(pml3_entry->Address << 12);
ffffffff8001c06c:	48 81 e2 00 f0 ff ff 	and    $0xfffffffffffff000,%rdx
        PageTable* pml1 = (PageTable*)HHDM(pml2_entry->Address << 12);
ffffffff8001c073:	48 01 c8             	add    %rcx,%rax
ffffffff8001c076:	48 8b 14 10          	mov    (%rax,%rdx,1),%rdx
ffffffff8001c07a:	48 81 e2 00 f0 ff ff 	and    $0xfffffffffffff000,%rdx
ffffffff8001c081:	48 01 ca             	add    %rcx,%rdx

        if (use40BitL1 == true) {
ffffffff8001c084:	45 84 e4             	test   %r12b,%r12b
ffffffff8001c087:	75 17                	jne    ffffffff8001c0a0 <_ZN6Memory3VMM6Paging11GetPhysAddrEmmb+0xa0>
            PageTableEntry40Bit* pml1_entry = (PageTableEntry40Bit*)&pml1->entries[virtualAddressObj.GetPageIndex()];
            return (uint64_t)pml1_entry->Address << 12;
        }

        PageTableEntry* pml1_entry = &pml1->entries[virtualAddressObj.GetPageIndex()];
        return (uint64_t)pml1_entry->Address << 12;
ffffffff8001c089:	48 8b 04 da          	mov    (%rdx,%rbx,8),%rax
    }
ffffffff8001c08d:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001c091:	5b                   	pop    %rbx
ffffffff8001c092:	41 5c                	pop    %r12
        return (uint64_t)pml1_entry->Address << 12;
ffffffff8001c094:	48 25 00 f0 ff ff    	and    $0xfffffffffffff000,%rax
    }
ffffffff8001c09a:	41 5d                	pop    %r13
ffffffff8001c09c:	5d                   	pop    %rbp
ffffffff8001c09d:	c3                   	ret
ffffffff8001c09e:	66 90                	xchg   %ax,%ax
            return (uint64_t)pml1_entry->Address << 12;
ffffffff8001c0a0:	48 b8 00 f0 ff ff ff 	movabs $0xffffffffff000,%rax
ffffffff8001c0a7:	ff 0f 00 
ffffffff8001c0aa:	48 23 04 da          	and    (%rdx,%rbx,8),%rax
    }
ffffffff8001c0ae:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001c0b2:	5b                   	pop    %rbx
ffffffff8001c0b3:	41 5c                	pop    %r12
ffffffff8001c0b5:	41 5d                	pop    %r13
ffffffff8001c0b7:	5d                   	pop    %rbp
ffffffff8001c0b8:	c3                   	ret
ffffffff8001c0b9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            Print(string);
ffffffff8001c0c0:	48 c7 c7 6b bb 02 80 	mov    $0xffffffff8002bb6b,%rdi
            g_kernelLogDepth++;
ffffffff8001c0c7:	83 05 d6 33 1c 00 01 	addl   $0x1,0x1c33d6(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001c0ce:	e8 ed 70 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c0d3:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001c0da:	e8 e1 70 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c0df:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001c0e6:	e8 d5 70 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c0eb:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8001c0f2:	e8 c9 70 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c0f7:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001c0fe:	e8 bd 70 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c103:	48 c7 c7 d0 ce 02 80 	mov    $0xffffffff8002ced0,%rdi
ffffffff8001c10a:	e8 b1 70 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c10f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001c116:	e8 a5 70 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001c11b:	83 2d 82 33 1c 00 01 	subl   $0x1,0x1c3382(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001c122:	e9 fb fe ff ff       	jmp    ffffffff8001c022 <_ZN6Memory3VMM6Paging11GetPhysAddrEmmb+0x22>
ffffffff8001c127:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001c12e:	00 00 

ffffffff8001c130 <_ZN6Memory3VMM6Paging4InitEmmP22limine_memmap_response>:
    void Paging::Init(std::uint64_t kernelBaseVirt, std::uint64_t kernelSize, limine_memmap_response* memMap) {
ffffffff8001c130:	55                   	push   %rbp
ffffffff8001c131:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001c134:	41 57                	push   %r15
ffffffff8001c136:	41 56                	push   %r14
ffffffff8001c138:	49 89 ce             	mov    %rcx,%r14
ffffffff8001c13b:	41 55                	push   %r13
ffffffff8001c13d:	49 89 d5             	mov    %rdx,%r13
ffffffff8001c140:	41 54                	push   %r12
ffffffff8001c142:	49 89 fc             	mov    %rdi,%r12
            Print(string);
ffffffff8001c145:	48 c7 c7 6b bb 02 80 	mov    $0xffffffff8002bb6b,%rdi
ffffffff8001c14c:	53                   	push   %rbx
ffffffff8001c14d:	48 89 f3             	mov    %rsi,%rbx
        for (std::uint64_t pageAddr = kernelBaseVirt; pageAddr < (kernelBaseVirt + kernelSize); pageAddr += 0x1000) {
ffffffff8001c150:	49 01 dd             	add    %rbx,%r13
    void Paging::Init(std::uint64_t kernelBaseVirt, std::uint64_t kernelSize, limine_memmap_response* memMap) {
ffffffff8001c153:	48 83 ec 08          	sub    $0x8,%rsp
            g_kernelLogDepth++;
ffffffff8001c157:	83 05 46 33 1c 00 01 	addl   $0x1,0x1c3346(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001c15e:	e8 5d 70 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c163:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001c16a:	e8 51 70 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c16f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001c176:	e8 45 70 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c17b:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff8001c182:	e8 39 70 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c187:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001c18e:	e8 2d 70 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c193:	48 c7 c7 f8 cf 02 80 	mov    $0xffffffff8002cff8,%rdi
ffffffff8001c19a:	e8 21 70 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001c19f:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8001c1a4:	48 89 df             	mov    %rbx,%rdi
ffffffff8001c1a7:	e8 e4 e2 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001c1ac:	48 89 c7             	mov    %rax,%rdi
ffffffff8001c1af:	e8 0c 70 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001c1b4:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001c1bb:	e8 00 70 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001c1c0:	83 2d dd 32 1c 00 01 	subl   $0x1,0x1c32dd(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        for (std::uint64_t pageAddr = kernelBaseVirt; pageAddr < (kernelBaseVirt + kernelSize); pageAddr += 0x1000) {
ffffffff8001c1c7:	4c 39 eb             	cmp    %r13,%rbx
ffffffff8001c1ca:	73 33                	jae    ffffffff8001c1ff <_ZN6Memory3VMM6Paging4InitEmmP22limine_memmap_response+0xcf>
ffffffff8001c1cc:	0f 1f 40 00          	nopl   0x0(%rax)
        return Paging::GetPhysAddr(GetCR3(), (std::uint64_t)virtualAddress, true);
ffffffff8001c1d0:	e8 fb 7d 00 00       	call   ffffffff80023fd0 <GetCR3>
ffffffff8001c1d5:	48 89 de             	mov    %rbx,%rsi
ffffffff8001c1d8:	ba 01 00 00 00       	mov    $0x1,%edx
ffffffff8001c1dd:	48 89 c7             	mov    %rax,%rdi
ffffffff8001c1e0:	e8 1b fe ff ff       	call   ffffffff8001c000 <_ZN6Memory3VMM6Paging11GetPhysAddrEmmb>
            Map(GetPhysKernelAddress(pageAddr), pageAddr);
ffffffff8001c1e5:	48 89 da             	mov    %rbx,%rdx
ffffffff8001c1e8:	4c 89 e7             	mov    %r12,%rdi
        for (std::uint64_t pageAddr = kernelBaseVirt; pageAddr < (kernelBaseVirt + kernelSize); pageAddr += 0x1000) {
ffffffff8001c1eb:	48 81 c3 00 10 00 00 	add    $0x1000,%rbx
        return Paging::GetPhysAddr(GetCR3(), (std::uint64_t)virtualAddress, true);
ffffffff8001c1f2:	48 89 c6             	mov    %rax,%rsi
            Map(GetPhysKernelAddress(pageAddr), pageAddr);
ffffffff8001c1f5:	e8 46 f2 ff ff       	call   ffffffff8001b440 <_ZN6Memory3VMM6Paging3MapEmm>
        for (std::uint64_t pageAddr = kernelBaseVirt; pageAddr < (kernelBaseVirt + kernelSize); pageAddr += 0x1000) {
ffffffff8001c1fa:	4c 39 eb             	cmp    %r13,%rbx
ffffffff8001c1fd:	72 d1                	jb     ffffffff8001c1d0 <_ZN6Memory3VMM6Paging4InitEmmP22limine_memmap_response+0xa0>
        for (size_t i = 0; i < memMap->entry_count; i++) {
ffffffff8001c1ff:	49 83 7e 08 00       	cmpq   $0x0,0x8(%r14)
ffffffff8001c204:	74 5c                	je     ffffffff8001c262 <_ZN6Memory3VMM6Paging4InitEmmP22limine_memmap_response+0x132>
ffffffff8001c206:	45 31 ed             	xor    %r13d,%r13d
ffffffff8001c209:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            auto entry = memMap->entries[i];
ffffffff8001c210:	49 8b 46 10          	mov    0x10(%r14),%rax
ffffffff8001c214:	4e 8b 3c e8          	mov    (%rax,%r13,8),%r15
            for (size_t pageAddr = entry->base; pageAddr < (entry->base + entry->length); pageAddr += 0x1000) {
ffffffff8001c218:	49 8b 1f             	mov    (%r15),%rbx
ffffffff8001c21b:	49 8b 47 08          	mov    0x8(%r15),%rax
ffffffff8001c21f:	48 01 d8             	add    %rbx,%rax
ffffffff8001c222:	48 39 c3             	cmp    %rax,%rbx
ffffffff8001c225:	73 31                	jae    ffffffff8001c258 <_ZN6Memory3VMM6Paging4InitEmmP22limine_memmap_response+0x128>
ffffffff8001c227:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001c22e:	00 00 
ffffffff8001c230:	48 8b 15 71 07 13 00 	mov    0x130771(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
                Map(pageAddr, HHDM(pageAddr));
ffffffff8001c237:	48 89 de             	mov    %rbx,%rsi
ffffffff8001c23a:	4c 89 e7             	mov    %r12,%rdi
ffffffff8001c23d:	48 01 da             	add    %rbx,%rdx
            for (size_t pageAddr = entry->base; pageAddr < (entry->base + entry->length); pageAddr += 0x1000) {
ffffffff8001c240:	48 81 c3 00 10 00 00 	add    $0x1000,%rbx
                Map(pageAddr, HHDM(pageAddr));
ffffffff8001c247:	e8 f4 f1 ff ff       	call   ffffffff8001b440 <_ZN6Memory3VMM6Paging3MapEmm>
            for (size_t pageAddr = entry->base; pageAddr < (entry->base + entry->length); pageAddr += 0x1000) {
ffffffff8001c24c:	49 8b 47 08          	mov    0x8(%r15),%rax
ffffffff8001c250:	49 03 07             	add    (%r15),%rax
ffffffff8001c253:	48 39 c3             	cmp    %rax,%rbx
ffffffff8001c256:	72 d8                	jb     ffffffff8001c230 <_ZN6Memory3VMM6Paging4InitEmmP22limine_memmap_response+0x100>
        for (size_t i = 0; i < memMap->entry_count; i++) {
ffffffff8001c258:	49 83 c5 01          	add    $0x1,%r13
ffffffff8001c25c:	4d 3b 6e 08          	cmp    0x8(%r14),%r13
ffffffff8001c260:	72 ae                	jb     ffffffff8001c210 <_ZN6Memory3VMM6Paging4InitEmmP22limine_memmap_response+0xe0>
        LoadCR3(PML4);
ffffffff8001c262:	49 8b 3c 24          	mov    (%r12),%rdi
ffffffff8001c266:	e8 69 7d 00 00       	call   ffffffff80023fd4 <LoadCR3>
            Print(string);
ffffffff8001c26b:	48 c7 c7 6b bb 02 80 	mov    $0xffffffff8002bb6b,%rdi
            g_kernelLogDepth++;
ffffffff8001c272:	83 05 2b 32 1c 00 01 	addl   $0x1,0x1c322b(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001c279:	e8 42 6f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c27e:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001c285:	e8 36 6f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c28a:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001c291:	e8 2a 6f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c296:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001c29d:	e8 1e 6f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c2a2:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001c2a9:	e8 12 6f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c2ae:	48 c7 c7 6f bb 02 80 	mov    $0xffffffff8002bb6f,%rdi
ffffffff8001c2b5:	e8 06 6f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c2ba:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001c2c1:	e8 fa 6e 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001c2c6:	83 2d d7 31 1c 00 01 	subl   $0x1,0x1c31d7(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff8001c2cd:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8001c2d1:	5b                   	pop    %rbx
ffffffff8001c2d2:	41 5c                	pop    %r12
ffffffff8001c2d4:	41 5d                	pop    %r13
ffffffff8001c2d6:	41 5e                	pop    %r14
ffffffff8001c2d8:	41 5f                	pop    %r15
ffffffff8001c2da:	5d                   	pop    %rbp
ffffffff8001c2db:	c3                   	ret
ffffffff8001c2dc:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8001c2e0 <_ZN3Net3Arp10InitializeEv>:
    static constexpr uint32_t ARP_CACHE_SIZE = 32;
    static constexpr uint64_t ARP_CACHE_TIMEOUT_MS = 60000; // 60 seconds

    static CacheEntry g_cache[ARP_CACHE_SIZE] = {};

    void Initialize() {
ffffffff8001c2e0:	55                   	push   %rbp
ffffffff8001c2e1:	48 c7 c0 f8 c9 14 80 	mov    $0xffffffff8014c9f8,%rax
ffffffff8001c2e8:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001c2eb:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001c2f2:	00 00 00 00 
ffffffff8001c2f6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001c2fd:	00 00 00 
        for (uint32_t i = 0; i < ARP_CACHE_SIZE; i++) {
            g_cache[i].Valid = false;
ffffffff8001c300:	c6 00 00             	movb   $0x0,(%rax)
        for (uint32_t i = 0; i < ARP_CACHE_SIZE; i++) {
ffffffff8001c303:	48 83 c0 40          	add    $0x40,%rax
            g_cache[i].Valid = false;
ffffffff8001c307:	c6 40 e0 00          	movb   $0x0,-0x20(%rax)
        for (uint32_t i = 0; i < ARP_CACHE_SIZE; i++) {
ffffffff8001c30b:	48 3d f8 cd 14 80    	cmp    $0xffffffff8014cdf8,%rax
ffffffff8001c311:	75 ed                	jne    ffffffff8001c300 <_ZN3Net3Arp10InitializeEv+0x20>
            Print(string);
ffffffff8001c313:	48 c7 c7 7c bb 02 80 	mov    $0xffffffff8002bb7c,%rdi
            g_kernelLogDepth++;
ffffffff8001c31a:	83 05 83 31 1c 00 01 	addl   $0x1,0x1c3183(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001c321:	e8 9a 6e 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c326:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001c32d:	e8 8e 6e 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c332:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001c339:	e8 82 6e 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c33e:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001c345:	e8 76 6e 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c34a:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001c351:	e8 6a 6e 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c356:	48 c7 c7 80 bb 02 80 	mov    $0xffffffff8002bb80,%rdi
ffffffff8001c35d:	e8 5e 6e 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001c362:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001c369:	e8 52 6e 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001c36e:	83 2d 2f 31 1c 00 01 	subl   $0x1,0x1c312f(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        }
        KernelLogStream(OK, "Net") << "ARP initialized";
    }
ffffffff8001c375:	5d                   	pop    %rbp
ffffffff8001c376:	c3                   	ret
ffffffff8001c377:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001c37e:	00 00 

ffffffff8001c380 <_ZN3Net3Arp16OnPacketReceivedEPKht>:
        }
        return false;
    }

    void OnPacketReceived(const uint8_t* data, uint16_t length) {
        if (length < sizeof(Packet)) {
ffffffff8001c380:	66 83 fe 1b          	cmp    $0x1b,%si
ffffffff8001c384:	0f 86 36 01 00 00    	jbe    ffffffff8001c4c0 <_ZN3Net3Arp16OnPacketReceivedEPKht+0x140>
    void OnPacketReceived(const uint8_t* data, uint16_t length) {
ffffffff8001c38a:	55                   	push   %rbp
ffffffff8001c38b:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001c38e:	41 57                	push   %r15
ffffffff8001c390:	41 56                	push   %r14
ffffffff8001c392:	49 89 fe             	mov    %rdi,%r14
ffffffff8001c395:	41 55                	push   %r13
ffffffff8001c397:	41 54                	push   %r12
ffffffff8001c399:	53                   	push   %rbx
ffffffff8001c39a:	48 83 ec 28          	sub    $0x28,%rsp
            return;
        }

        const Packet* pkt = (const Packet*)data;

        if (Ntohs(pkt->HardwareType) != HW_TYPE_ETHERNET ||
ffffffff8001c39e:	66 81 3f 00 01       	cmpw   $0x100,(%rdi)
ffffffff8001c3a3:	74 13                	je     ffffffff8001c3b8 <_ZN3Net3Arp16OnPacketReceivedEPKht+0x38>
            reply.TargetIp = senderIp;

            Ethernet::Send(pkt->SenderMac, Ethernet::ETHERTYPE_ARP,
                          (const uint8_t*)&reply, sizeof(Packet));
        }
    }
ffffffff8001c3a5:	48 83 c4 28          	add    $0x28,%rsp
ffffffff8001c3a9:	5b                   	pop    %rbx
ffffffff8001c3aa:	41 5c                	pop    %r12
ffffffff8001c3ac:	41 5d                	pop    %r13
ffffffff8001c3ae:	41 5e                	pop    %r14
ffffffff8001c3b0:	41 5f                	pop    %r15
ffffffff8001c3b2:	5d                   	pop    %rbp
ffffffff8001c3b3:	c3                   	ret
ffffffff8001c3b4:	0f 1f 40 00          	nopl   0x0(%rax)
        if (Ntohs(pkt->HardwareType) != HW_TYPE_ETHERNET ||
ffffffff8001c3b8:	66 83 7f 02 08       	cmpw   $0x8,0x2(%rdi)
ffffffff8001c3bd:	75 e6                	jne    ffffffff8001c3a5 <_ZN3Net3Arp16OnPacketReceivedEPKht+0x25>
        uint32_t senderIp = pkt->SenderIp; // Already in network byte order in struct
ffffffff8001c3bf:	44 8b 7f 0e          	mov    0xe(%rdi),%r15d
        uint32_t targetIp = pkt->TargetIp;
ffffffff8001c3c3:	44 8b 6f 18          	mov    0x18(%rdi),%r13d
        CacheInsert(senderIp, pkt->SenderMac);
ffffffff8001c3c7:	4c 8d 67 08          	lea    0x8(%rdi),%r12
        for (uint32_t i = 0; i < ARP_CACHE_SIZE; i++) {
ffffffff8001c3cb:	31 d2                	xor    %edx,%edx
ffffffff8001c3cd:	48 c7 c0 e0 c9 14 80 	mov    $0xffffffff8014c9e0,%rax
        uint32_t emptySlot = ARP_CACHE_SIZE;
ffffffff8001c3d4:	b9 20 00 00 00       	mov    $0x20,%ecx
ffffffff8001c3d9:	eb 20                	jmp    ffffffff8001c3fb <_ZN3Net3Arp16OnPacketReceivedEPKht+0x7b>
ffffffff8001c3db:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            if (!g_cache[i].Valid && emptySlot == ARP_CACHE_SIZE) {
ffffffff8001c3e0:	83 f9 20             	cmp    $0x20,%ecx
ffffffff8001c3e3:	0f 85 f7 00 00 00    	jne    ffffffff8001c4e0 <_ZN3Net3Arp16OnPacketReceivedEPKht+0x160>
                emptySlot = i;
ffffffff8001c3e9:	89 d1                	mov    %edx,%ecx
        for (uint32_t i = 0; i < ARP_CACHE_SIZE; i++) {
ffffffff8001c3eb:	83 c2 01             	add    $0x1,%edx
ffffffff8001c3ee:	48 83 c0 20          	add    $0x20,%rax
ffffffff8001c3f2:	83 fa 20             	cmp    $0x20,%edx
ffffffff8001c3f5:	0f 84 05 01 00 00    	je     ffffffff8001c500 <_ZN3Net3Arp16OnPacketReceivedEPKht+0x180>
            if (g_cache[i].Valid && g_cache[i].Ip == ip) {
ffffffff8001c3fb:	80 78 18 00          	cmpb   $0x0,0x18(%rax)
ffffffff8001c3ff:	74 df                	je     ffffffff8001c3e0 <_ZN3Net3Arp16OnPacketReceivedEPKht+0x60>
ffffffff8001c401:	44 3b 38             	cmp    (%rax),%r15d
ffffffff8001c404:	75 e5                	jne    ffffffff8001c3eb <_ZN3Net3Arp16OnPacketReceivedEPKht+0x6b>
                memcpy(g_cache[i].Mac, mac, 6);
ffffffff8001c406:	89 d3                	mov    %edx,%ebx
ffffffff8001c408:	4c 89 e6             	mov    %r12,%rsi
ffffffff8001c40b:	ba 06 00 00 00       	mov    $0x6,%edx
ffffffff8001c410:	48 c1 e3 05          	shl    $0x5,%rbx
ffffffff8001c414:	48 8d bb e4 c9 14 80 	lea    -0x7feb361c(%rbx),%rdi
ffffffff8001c41b:	e8 c0 dd ff ff       	call   ffffffff8001a1e0 <memcpy>
                g_cache[i].Timestamp = Timekeeping::GetMilliseconds();
ffffffff8001c420:	e8 eb 71 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff8001c425:	48 89 83 f0 c9 14 80 	mov    %rax,-0x7feb3610(%rbx)
        Ipv4::FlushPending();
ffffffff8001c42c:	e8 0f 14 00 00       	call   ffffffff8001d840 <_ZN3Net4Ipv412FlushPendingEv>
        if (op == OP_REQUEST && targetIp == GetIpAddress()) {
ffffffff8001c431:	66 41 81 7e 06 00 01 	cmpw   $0x100,0x6(%r14)
ffffffff8001c438:	0f 85 67 ff ff ff    	jne    ffffffff8001c3a5 <_ZN3Net3Arp16OnPacketReceivedEPKht+0x25>
ffffffff8001c43e:	e8 bd 15 00 00       	call   ffffffff8001da00 <_ZN3Net12GetIpAddressEv>
ffffffff8001c443:	44 39 e8             	cmp    %r13d,%eax
ffffffff8001c446:	0f 85 59 ff ff ff    	jne    ffffffff8001c3a5 <_ZN3Net3Arp16OnPacketReceivedEPKht+0x25>
            reply.HardwareType = Htons(HW_TYPE_ETHERNET);
ffffffff8001c44c:	48 b8 00 01 08 00 06 	movabs $0x200040600080100,%rax
ffffffff8001c453:	04 00 02 
ffffffff8001c456:	48 89 45 b4          	mov    %rax,-0x4c(%rbp)
        if (Drivers::Net::E1000::IsInitialized())
ffffffff8001c45a:	e8 41 29 ff ff       	call   ffffffff8000eda0 <_ZN7Drivers3Net5E100013IsInitializedEv>
ffffffff8001c45f:	84 c0                	test   %al,%al
ffffffff8001c461:	0f 84 da 00 00 00    	je     ffffffff8001c541 <_ZN3Net3Arp16OnPacketReceivedEPKht+0x1c1>
            return Drivers::Net::E1000::GetMacAddress();
ffffffff8001c467:	e8 24 29 ff ff       	call   ffffffff8000ed90 <_ZN7Drivers3Net5E100013GetMacAddressEv>
ffffffff8001c46c:	48 89 c6             	mov    %rax,%rsi
            memcpy(reply.SenderMac, GetActiveNicMac(), 6);
ffffffff8001c46f:	48 8d 7d bc          	lea    -0x44(%rbp),%rdi
ffffffff8001c473:	ba 06 00 00 00       	mov    $0x6,%edx
ffffffff8001c478:	48 8d 5d b4          	lea    -0x4c(%rbp),%rbx
ffffffff8001c47c:	e8 5f dd ff ff       	call   ffffffff8001a1e0 <memcpy>
            reply.SenderIp = GetIpAddress();
ffffffff8001c481:	e8 7a 15 00 00       	call   ffffffff8001da00 <_ZN3Net12GetIpAddressEv>
            memcpy(reply.TargetMac, pkt->SenderMac, 6);
ffffffff8001c486:	48 8d 7d c6          	lea    -0x3a(%rbp),%rdi
ffffffff8001c48a:	4c 89 e6             	mov    %r12,%rsi
ffffffff8001c48d:	ba 06 00 00 00       	mov    $0x6,%edx
            reply.SenderIp = GetIpAddress();
ffffffff8001c492:	89 45 c2             	mov    %eax,-0x3e(%rbp)
            memcpy(reply.TargetMac, pkt->SenderMac, 6);
ffffffff8001c495:	e8 46 dd ff ff       	call   ffffffff8001a1e0 <memcpy>
            Ethernet::Send(pkt->SenderMac, Ethernet::ETHERTYPE_ARP,
ffffffff8001c49a:	b9 1c 00 00 00       	mov    $0x1c,%ecx
ffffffff8001c49f:	48 89 da             	mov    %rbx,%rdx
ffffffff8001c4a2:	4c 89 e7             	mov    %r12,%rdi
ffffffff8001c4a5:	be 06 08 00 00       	mov    $0x806,%esi
            reply.TargetIp = senderIp;
ffffffff8001c4aa:	44 89 7d cc          	mov    %r15d,-0x34(%rbp)
            Ethernet::Send(pkt->SenderMac, Ethernet::ETHERTYPE_ARP,
ffffffff8001c4ae:	e8 ed 09 00 00       	call   ffffffff8001cea0 <_ZN3Net8Ethernet4SendEPKhtS2_t>
ffffffff8001c4b3:	e9 ed fe ff ff       	jmp    ffffffff8001c3a5 <_ZN3Net3Arp16OnPacketReceivedEPKht+0x25>
ffffffff8001c4b8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001c4bf:	00 
ffffffff8001c4c0:	c3                   	ret
ffffffff8001c4c1:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001c4c8:	00 00 00 00 
ffffffff8001c4cc:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001c4d3:	00 00 00 00 
ffffffff8001c4d7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001c4de:	00 00 
        for (uint32_t i = 0; i < ARP_CACHE_SIZE; i++) {
ffffffff8001c4e0:	83 c2 01             	add    $0x1,%edx
ffffffff8001c4e3:	48 83 c0 20          	add    $0x20,%rax
ffffffff8001c4e7:	83 fa 20             	cmp    $0x20,%edx
ffffffff8001c4ea:	74 14                	je     ffffffff8001c500 <_ZN3Net3Arp16OnPacketReceivedEPKht+0x180>
            if (g_cache[i].Valid && g_cache[i].Ip == ip) {
ffffffff8001c4ec:	80 78 18 00          	cmpb   $0x0,0x18(%rax)
ffffffff8001c4f0:	74 ee                	je     ffffffff8001c4e0 <_ZN3Net3Arp16OnPacketReceivedEPKht+0x160>
ffffffff8001c4f2:	44 3b 38             	cmp    (%rax),%r15d
ffffffff8001c4f5:	0f 85 f0 fe ff ff    	jne    ffffffff8001c3eb <_ZN3Net3Arp16OnPacketReceivedEPKht+0x6b>
ffffffff8001c4fb:	e9 06 ff ff ff       	jmp    ffffffff8001c406 <_ZN3Net3Arp16OnPacketReceivedEPKht+0x86>
        if (emptySlot < ARP_CACHE_SIZE) {
ffffffff8001c500:	83 f9 1f             	cmp    $0x1f,%ecx
ffffffff8001c503:	0f 87 23 ff ff ff    	ja     ffffffff8001c42c <_ZN3Net3Arp16OnPacketReceivedEPKht+0xac>
            g_cache[emptySlot].Ip = ip;
ffffffff8001c509:	48 c1 e1 05          	shl    $0x5,%rcx
            memcpy(g_cache[emptySlot].Mac, mac, 6);
ffffffff8001c50d:	ba 06 00 00 00       	mov    $0x6,%edx
ffffffff8001c512:	4c 89 e6             	mov    %r12,%rsi
ffffffff8001c515:	48 8d b9 e4 c9 14 80 	lea    -0x7feb361c(%rcx),%rdi
            g_cache[emptySlot].Ip = ip;
ffffffff8001c51c:	48 8d 99 e0 c9 14 80 	lea    -0x7feb3620(%rcx),%rbx
ffffffff8001c523:	44 89 b9 e0 c9 14 80 	mov    %r15d,-0x7feb3620(%rcx)
            memcpy(g_cache[emptySlot].Mac, mac, 6);
ffffffff8001c52a:	e8 b1 dc ff ff       	call   ffffffff8001a1e0 <memcpy>
            g_cache[emptySlot].Timestamp = Timekeeping::GetMilliseconds();
ffffffff8001c52f:	e8 dc 70 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
            g_cache[emptySlot].Valid = true;
ffffffff8001c534:	c6 43 18 01          	movb   $0x1,0x18(%rbx)
            g_cache[emptySlot].Timestamp = Timekeeping::GetMilliseconds();
ffffffff8001c538:	48 89 43 10          	mov    %rax,0x10(%rbx)
            g_cache[emptySlot].Valid = true;
ffffffff8001c53c:	e9 eb fe ff ff       	jmp    ffffffff8001c42c <_ZN3Net3Arp16OnPacketReceivedEPKht+0xac>
        return Drivers::Net::E1000E::GetMacAddress();
ffffffff8001c541:	e8 7a 41 ff ff       	call   ffffffff800106c0 <_ZN7Drivers3Net6E1000E13GetMacAddressEv>
ffffffff8001c546:	48 89 c6             	mov    %rax,%rsi
ffffffff8001c549:	e9 21 ff ff ff       	jmp    ffffffff8001c46f <_ZN3Net3Arp16OnPacketReceivedEPKht+0xef>
ffffffff8001c54e:	66 90                	xchg   %ax,%ax

ffffffff8001c550 <_ZN3Net3Arp11SendRequestEj>:
        return false;
    }

    void SendRequest(uint32_t targetIp) {
        Packet req;
        req.HardwareType = Htons(HW_TYPE_ETHERNET);
ffffffff8001c550:	48 b8 00 01 08 00 06 	movabs $0x100040600080100,%rax
ffffffff8001c557:	04 00 01 
    void SendRequest(uint32_t targetIp) {
ffffffff8001c55a:	55                   	push   %rbp
ffffffff8001c55b:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001c55e:	41 54                	push   %r12
ffffffff8001c560:	53                   	push   %rbx
ffffffff8001c561:	89 fb                	mov    %edi,%ebx
ffffffff8001c563:	48 83 ec 20          	sub    $0x20,%rsp
        req.HardwareType = Htons(HW_TYPE_ETHERNET);
ffffffff8001c567:	48 89 45 d4          	mov    %rax,-0x2c(%rbp)
        if (Drivers::Net::E1000::IsInitialized())
ffffffff8001c56b:	e8 30 28 ff ff       	call   ffffffff8000eda0 <_ZN7Drivers3Net5E100013IsInitializedEv>
ffffffff8001c570:	84 c0                	test   %al,%al
ffffffff8001c572:	74 5c                	je     ffffffff8001c5d0 <_ZN3Net3Arp11SendRequestEj+0x80>
            return Drivers::Net::E1000::GetMacAddress();
ffffffff8001c574:	e8 17 28 ff ff       	call   ffffffff8000ed90 <_ZN7Drivers3Net5E100013GetMacAddressEv>
ffffffff8001c579:	48 89 c6             	mov    %rax,%rsi
        req.ProtocolType = Htons(PROTO_TYPE_IPV4);
        req.HardwareAddrLen = 6;
        req.ProtocolAddrLen = 4;
        req.Operation = Htons(OP_REQUEST);

        memcpy(req.SenderMac, GetActiveNicMac(), 6);
ffffffff8001c57c:	48 8d 7d dc          	lea    -0x24(%rbp),%rdi
ffffffff8001c580:	ba 06 00 00 00       	mov    $0x6,%edx
ffffffff8001c585:	4c 8d 65 d4          	lea    -0x2c(%rbp),%r12
ffffffff8001c589:	e8 52 dc ff ff       	call   ffffffff8001a1e0 <memcpy>
        req.SenderIp = GetIpAddress();
ffffffff8001c58e:	e8 6d 14 00 00       	call   ffffffff8001da00 <_ZN3Net12GetIpAddressEv>
        memset(req.TargetMac, 0, 6);
ffffffff8001c593:	48 8d 7d e6          	lea    -0x1a(%rbp),%rdi
ffffffff8001c597:	ba 06 00 00 00       	mov    $0x6,%edx
ffffffff8001c59c:	31 f6                	xor    %esi,%esi
        req.SenderIp = GetIpAddress();
ffffffff8001c59e:	89 45 e2             	mov    %eax,-0x1e(%rbp)
        memset(req.TargetMac, 0, 6);
ffffffff8001c5a1:	e8 7a dc ff ff       	call   ffffffff8001a220 <memset>
        req.TargetIp = targetIp;

        Ethernet::Send(Ethernet::BROADCAST_MAC, Ethernet::ETHERTYPE_ARP,
ffffffff8001c5a6:	4c 89 e2             	mov    %r12,%rdx
ffffffff8001c5a9:	b9 1c 00 00 00       	mov    $0x1c,%ecx
        req.TargetIp = targetIp;
ffffffff8001c5ae:	89 5d ec             	mov    %ebx,-0x14(%rbp)
        Ethernet::Send(Ethernet::BROADCAST_MAC, Ethernet::ETHERTYPE_ARP,
ffffffff8001c5b1:	be 06 08 00 00       	mov    $0x806,%esi
ffffffff8001c5b6:	48 c7 c7 80 dd 02 80 	mov    $0xffffffff8002dd80,%rdi
ffffffff8001c5bd:	e8 de 08 00 00       	call   ffffffff8001cea0 <_ZN3Net8Ethernet4SendEPKhtS2_t>
                      (const uint8_t*)&req, sizeof(Packet));
    }
ffffffff8001c5c2:	48 83 c4 20          	add    $0x20,%rsp
ffffffff8001c5c6:	5b                   	pop    %rbx
ffffffff8001c5c7:	41 5c                	pop    %r12
ffffffff8001c5c9:	5d                   	pop    %rbp
ffffffff8001c5ca:	c3                   	ret
ffffffff8001c5cb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        return Drivers::Net::E1000E::GetMacAddress();
ffffffff8001c5d0:	e8 eb 40 ff ff       	call   ffffffff800106c0 <_ZN7Drivers3Net6E1000E13GetMacAddressEv>
ffffffff8001c5d5:	48 89 c6             	mov    %rax,%rsi
ffffffff8001c5d8:	eb a2                	jmp    ffffffff8001c57c <_ZN3Net3Arp11SendRequestEj+0x2c>
ffffffff8001c5da:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)

ffffffff8001c5e0 <_ZN3Net3Arp7ResolveEjPh>:
    bool Resolve(uint32_t ip, uint8_t* outMac) {
ffffffff8001c5e0:	55                   	push   %rbp
ffffffff8001c5e1:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001c5e4:	41 54                	push   %r12
ffffffff8001c5e6:	53                   	push   %rbx
ffffffff8001c5e7:	48 89 f3             	mov    %rsi,%rbx
        if (ip == 0xFFFFFFFF) {
ffffffff8001c5ea:	83 ff ff             	cmp    $0xffffffff,%edi
ffffffff8001c5ed:	74 61                	je     ffffffff8001c650 <_ZN3Net3Arp7ResolveEjPh+0x70>
ffffffff8001c5ef:	41 89 fc             	mov    %edi,%r12d
        uint64_t now = Timekeeping::GetMilliseconds();
ffffffff8001c5f2:	e8 19 70 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
        for (uint32_t i = 0; i < ARP_CACHE_SIZE; i++) {
ffffffff8001c5f7:	48 c7 c2 e0 c9 14 80 	mov    $0xffffffff8014c9e0,%rdx
ffffffff8001c5fe:	31 c9                	xor    %ecx,%ecx
            if (g_cache[i].Valid && g_cache[i].Ip == ip) {
ffffffff8001c600:	80 7a 18 00          	cmpb   $0x0,0x18(%rdx)
ffffffff8001c604:	74 05                	je     ffffffff8001c60b <_ZN3Net3Arp7ResolveEjPh+0x2b>
ffffffff8001c606:	44 3b 22             	cmp    (%rdx),%r12d
ffffffff8001c609:	74 25                	je     ffffffff8001c630 <_ZN3Net3Arp7ResolveEjPh+0x50>
        for (uint32_t i = 0; i < ARP_CACHE_SIZE; i++) {
ffffffff8001c60b:	83 c1 01             	add    $0x1,%ecx
ffffffff8001c60e:	48 83 c2 20          	add    $0x20,%rdx
ffffffff8001c612:	83 f9 20             	cmp    $0x20,%ecx
ffffffff8001c615:	75 e9                	jne    ffffffff8001c600 <_ZN3Net3Arp7ResolveEjPh+0x20>
        SendRequest(ip);
ffffffff8001c617:	44 89 e7             	mov    %r12d,%edi
ffffffff8001c61a:	e8 31 ff ff ff       	call   ffffffff8001c550 <_ZN3Net3Arp11SendRequestEj>
    }
ffffffff8001c61f:	5b                   	pop    %rbx
        return false;
ffffffff8001c620:	31 c0                	xor    %eax,%eax
    }
ffffffff8001c622:	41 5c                	pop    %r12
ffffffff8001c624:	5d                   	pop    %rbp
ffffffff8001c625:	c3                   	ret
ffffffff8001c626:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001c62d:	00 00 00 
                if ((now - g_cache[i].Timestamp) > ARP_CACHE_TIMEOUT_MS) {
ffffffff8001c630:	48 c1 e1 05          	shl    $0x5,%rcx
ffffffff8001c634:	48 2b 81 f0 c9 14 80 	sub    -0x7feb3610(%rcx),%rax
ffffffff8001c63b:	48 3d 60 ea 00 00    	cmp    $0xea60,%rax
ffffffff8001c641:	76 2b                	jbe    ffffffff8001c66e <_ZN3Net3Arp7ResolveEjPh+0x8e>
                    g_cache[i].Valid = false;
ffffffff8001c643:	c6 81 f8 c9 14 80 00 	movb   $0x0,-0x7feb3608(%rcx)
                    return false;
ffffffff8001c64a:	eb cb                	jmp    ffffffff8001c617 <_ZN3Net3Arp7ResolveEjPh+0x37>
ffffffff8001c64c:	0f 1f 40 00          	nopl   0x0(%rax)
            memcpy(outMac, Ethernet::BROADCAST_MAC, 6);
ffffffff8001c650:	ba 06 00 00 00       	mov    $0x6,%edx
ffffffff8001c655:	48 c7 c6 80 dd 02 80 	mov    $0xffffffff8002dd80,%rsi
ffffffff8001c65c:	48 89 df             	mov    %rbx,%rdi
ffffffff8001c65f:	e8 7c db ff ff       	call   ffffffff8001a1e0 <memcpy>
    }
ffffffff8001c664:	5b                   	pop    %rbx
            return true;
ffffffff8001c665:	b8 01 00 00 00       	mov    $0x1,%eax
    }
ffffffff8001c66a:	41 5c                	pop    %r12
ffffffff8001c66c:	5d                   	pop    %rbp
ffffffff8001c66d:	c3                   	ret
                memcpy(outMac, g_cache[i].Mac, 6);
ffffffff8001c66e:	48 8d b1 e4 c9 14 80 	lea    -0x7feb361c(%rcx),%rsi
ffffffff8001c675:	ba 06 00 00 00       	mov    $0x6,%edx
ffffffff8001c67a:	48 89 df             	mov    %rbx,%rdi
ffffffff8001c67d:	e8 5e db ff ff       	call   ffffffff8001a1e0 <memcpy>
                return true;
ffffffff8001c682:	eb e0                	jmp    ffffffff8001c664 <_ZN3Net3Arp7ResolveEjPh+0x84>
ffffffff8001c684:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001c68b:	00 00 00 
ffffffff8001c68e:	66 90                	xchg   %ax,%ax

ffffffff8001c690 <_ZN3Net3DnsL15DnsRecvCallbackEjttPKht>:
                                 const uint8_t* data, uint16_t length) {
        (void)srcIp;
        (void)srcPort;
        (void)dstPort;

        if (g_gotResponse) return; // Already got a response
ffffffff8001c690:	0f b6 05 6b 09 13 00 	movzbl 0x13096b(%rip),%eax        # ffffffff8014d002 <_ZN3Net3DnsL13g_gotResponseE>
ffffffff8001c697:	84 c0                	test   %al,%al
ffffffff8001c699:	74 05                	je     ffffffff8001c6a0 <_ZN3Net3DnsL15DnsRecvCallbackEjttPKht+0x10>
ffffffff8001c69b:	c3                   	ret
ffffffff8001c69c:	0f 1f 40 00          	nopl   0x0(%rax)
                                 const uint8_t* data, uint16_t length) {
ffffffff8001c6a0:	55                   	push   %rbp
        if (length > sizeof(g_responseBuffer)) length = sizeof(g_responseBuffer);
ffffffff8001c6a1:	b8 00 02 00 00       	mov    $0x200,%eax

        memcpy(g_responseBuffer, data, length);
ffffffff8001c6a6:	48 89 ce             	mov    %rcx,%rsi
ffffffff8001c6a9:	48 c7 c7 00 ce 14 80 	mov    $0xffffffff8014ce00,%rdi
                                 const uint8_t* data, uint16_t length) {
ffffffff8001c6b0:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001c6b3:	53                   	push   %rbx
ffffffff8001c6b4:	48 83 ec 08          	sub    $0x8,%rsp
        if (length > sizeof(g_responseBuffer)) length = sizeof(g_responseBuffer);
ffffffff8001c6b8:	66 41 39 c0          	cmp    %ax,%r8w
ffffffff8001c6bc:	41 0f 46 c0          	cmovbe %r8d,%eax
ffffffff8001c6c0:	0f b7 d0             	movzwl %ax,%edx
ffffffff8001c6c3:	48 89 d3             	mov    %rdx,%rbx
        memcpy(g_responseBuffer, data, length);
ffffffff8001c6c6:	e8 15 db ff ff       	call   ffffffff8001a1e0 <memcpy>
        g_responseLen = length;
ffffffff8001c6cb:	44 0f b7 c3          	movzwl %bx,%r8d
        g_gotResponse = true;
    }
ffffffff8001c6cf:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
        g_responseLen = length;
ffffffff8001c6d3:	44 89 05 06 07 13 00 	mov    %r8d,0x130706(%rip)        # ffffffff8014cde0 <_ZN3Net3DnsL13g_responseLenE>
        g_gotResponse = true;
ffffffff8001c6da:	c6 05 21 09 13 00 01 	movb   $0x1,0x130921(%rip)        # ffffffff8014d002 <_ZN3Net3DnsL13g_gotResponseE>
    }
ffffffff8001c6e1:	c9                   	leave
ffffffff8001c6e2:	c3                   	ret
ffffffff8001c6e3:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001c6ea:	00 00 00 
ffffffff8001c6ed:	0f 1f 00             	nopl   (%rax)

ffffffff8001c6f0 <_ZN3Net3DnsL8SkipNameEPKhii.constprop.0>:
    static int SkipName(const uint8_t* packet, int packetLen, int offset) {
ffffffff8001c6f0:	41 89 f8             	mov    %edi,%r8d
        while (offset < packetLen && maxJumps > 0) {
ffffffff8001c6f3:	39 f7                	cmp    %esi,%edi
ffffffff8001c6f5:	7e 78                	jle    ffffffff8001c76f <_ZN3Net3DnsL8SkipNameEPKhii.constprop.0+0x7f>
ffffffff8001c6f7:	ba 1f 00 00 00       	mov    $0x1f,%edx
        int returnOffset = -1;
ffffffff8001c6fc:	41 b9 ff ff ff ff    	mov    $0xffffffff,%r9d
        bool jumped = false;
ffffffff8001c702:	45 31 d2             	xor    %r10d,%r10d
ffffffff8001c705:	eb 1b                	jmp    ffffffff8001c722 <_ZN3Net3DnsL8SkipNameEPKhii.constprop.0+0x32>
ffffffff8001c707:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001c70e:	00 00 
            offset += 1 + len;
ffffffff8001c710:	8d 74 06 01          	lea    0x1(%rsi,%rax,1),%esi
            maxJumps--;
ffffffff8001c714:	89 d0                	mov    %edx,%eax
        while (offset < packetLen && maxJumps > 0) {
ffffffff8001c716:	83 ea 01             	sub    $0x1,%edx
ffffffff8001c719:	41 39 f0             	cmp    %esi,%r8d
ffffffff8001c71c:	7e 51                	jle    ffffffff8001c76f <_ZN3Net3DnsL8SkipNameEPKhii.constprop.0+0x7f>
ffffffff8001c71e:	85 c0                	test   %eax,%eax
ffffffff8001c720:	74 4d                	je     ffffffff8001c76f <_ZN3Net3DnsL8SkipNameEPKhii.constprop.0+0x7f>
            uint8_t len = packet[offset];
ffffffff8001c722:	48 63 ce             	movslq %esi,%rcx
ffffffff8001c725:	0f b6 81 00 ce 14 80 	movzbl -0x7feb3200(%rcx),%eax
            if (len == 0) {
ffffffff8001c72c:	84 c0                	test   %al,%al
ffffffff8001c72e:	74 50                	je     ffffffff8001c780 <_ZN3Net3DnsL8SkipNameEPKhii.constprop.0+0x90>
            if ((len & 0xC0) == 0xC0) {
ffffffff8001c730:	89 c7                	mov    %eax,%edi
ffffffff8001c732:	f7 d7                	not    %edi
ffffffff8001c734:	81 e7 c0 00 00 00    	and    $0xc0,%edi
ffffffff8001c73a:	75 d4                	jne    ffffffff8001c710 <_ZN3Net3DnsL8SkipNameEPKhii.constprop.0+0x20>
                if (offset + 1 >= packetLen) return -1;
ffffffff8001c73c:	8d 7e 01             	lea    0x1(%rsi),%edi
ffffffff8001c73f:	44 39 c7             	cmp    %r8d,%edi
ffffffff8001c742:	7d 2b                	jge    ffffffff8001c76f <_ZN3Net3DnsL8SkipNameEPKhii.constprop.0+0x7f>
                if (!jumped) returnOffset = offset + 2;
ffffffff8001c744:	83 c6 02             	add    $0x2,%esi
ffffffff8001c747:	45 84 d2             	test   %r10b,%r10b
                jumped = true;
ffffffff8001c74a:	41 ba 01 00 00 00    	mov    $0x1,%r10d
                if (!jumped) returnOffset = offset + 2;
ffffffff8001c750:	44 0f 44 ce          	cmove  %esi,%r9d
                offset = ((len & 0x3F) << 8) | packet[offset + 1];
ffffffff8001c754:	0f b6 b1 01 ce 14 80 	movzbl -0x7feb31ff(%rcx),%esi
ffffffff8001c75b:	c1 e0 08             	shl    $0x8,%eax
ffffffff8001c75e:	25 00 3f 00 00       	and    $0x3f00,%eax
ffffffff8001c763:	09 c6                	or     %eax,%esi
                maxJumps--;
ffffffff8001c765:	89 d0                	mov    %edx,%eax
        while (offset < packetLen && maxJumps > 0) {
ffffffff8001c767:	83 ea 01             	sub    $0x1,%edx
ffffffff8001c76a:	41 39 f0             	cmp    %esi,%r8d
ffffffff8001c76d:	7f af                	jg     ffffffff8001c71e <_ZN3Net3DnsL8SkipNameEPKhii.constprop.0+0x2e>
                if (offset + 1 >= packetLen) return -1;
ffffffff8001c76f:	41 b9 ff ff ff ff    	mov    $0xffffffff,%r9d
    }
ffffffff8001c775:	44 89 c8             	mov    %r9d,%eax
ffffffff8001c778:	c3                   	ret
ffffffff8001c779:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
                offset++;
ffffffff8001c780:	83 c6 01             	add    $0x1,%esi
ffffffff8001c783:	45 84 d2             	test   %r10b,%r10b
ffffffff8001c786:	44 0f 44 ce          	cmove  %esi,%r9d
    }
ffffffff8001c78a:	44 89 c8             	mov    %r9d,%eax
ffffffff8001c78d:	c3                   	ret
ffffffff8001c78e:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001c795:	00 00 00 
ffffffff8001c798:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001c79f:	00 

ffffffff8001c7a0 <_ZN3Net3Dns7ResolveEPKcj>:
        return hasDigit && dotCount == 3;
    }

    // ---- Public API ----

    uint32_t Resolve(const char* hostname, uint32_t timeoutMs) {
ffffffff8001c7a0:	55                   	push   %rbp
ffffffff8001c7a1:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001c7a4:	41 57                	push   %r15
ffffffff8001c7a6:	41 56                	push   %r14
ffffffff8001c7a8:	41 55                	push   %r13
ffffffff8001c7aa:	41 54                	push   %r12
ffffffff8001c7ac:	53                   	push   %rbx
ffffffff8001c7ad:	48 81 ec 18 02 00 00 	sub    $0x218,%rsp
        if (hostname == nullptr || hostname[0] == '\0') return 0;
ffffffff8001c7b4:	48 85 ff             	test   %rdi,%rdi
ffffffff8001c7b7:	74 52                	je     ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
ffffffff8001c7b9:	0f b6 07             	movzbl (%rdi),%eax
ffffffff8001c7bc:	48 89 fb             	mov    %rdi,%rbx
ffffffff8001c7bf:	84 c0                	test   %al,%al
ffffffff8001c7c1:	74 48                	je     ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
ffffffff8001c7c3:	41 89 f4             	mov    %esi,%r12d
ffffffff8001c7c6:	48 8d 57 01          	lea    0x1(%rdi),%rdx
        bool hasDigit = false;
ffffffff8001c7ca:	31 f6                	xor    %esi,%esi
        int dotCount = 0;
ffffffff8001c7cc:	31 ff                	xor    %edi,%edi
ffffffff8001c7ce:	eb 19                	jmp    ffffffff8001c7e9 <_ZN3Net3Dns7ResolveEPKcj+0x49>
                if (!hasDigit) return false;
ffffffff8001c7d0:	3c 2e                	cmp    $0x2e,%al
ffffffff8001c7d2:	75 54                	jne    ffffffff8001c828 <_ZN3Net3Dns7ResolveEPKcj+0x88>
ffffffff8001c7d4:	40 84 f6             	test   %sil,%sil
ffffffff8001c7d7:	74 4f                	je     ffffffff8001c828 <_ZN3Net3Dns7ResolveEPKcj+0x88>
        for (int i = 0; s[i]; i++) {
ffffffff8001c7d9:	0f b6 02             	movzbl (%rdx),%eax
ffffffff8001c7dc:	48 83 c2 01          	add    $0x1,%rdx
                dotCount++;
ffffffff8001c7e0:	83 c7 01             	add    $0x1,%edi
                hasDigit = false;
ffffffff8001c7e3:	31 f6                	xor    %esi,%esi
        for (int i = 0; s[i]; i++) {
ffffffff8001c7e5:	84 c0                	test   %al,%al
ffffffff8001c7e7:	74 18                	je     ffffffff8001c801 <_ZN3Net3Dns7ResolveEPKcj+0x61>
            if (s[i] >= '0' && s[i] <= '9') {
ffffffff8001c7e9:	8d 48 d0             	lea    -0x30(%rax),%ecx
ffffffff8001c7ec:	80 f9 09             	cmp    $0x9,%cl
ffffffff8001c7ef:	77 df                	ja     ffffffff8001c7d0 <_ZN3Net3Dns7ResolveEPKcj+0x30>
        for (int i = 0; s[i]; i++) {
ffffffff8001c7f1:	0f b6 02             	movzbl (%rdx),%eax
ffffffff8001c7f4:	48 83 c2 01          	add    $0x1,%rdx
                hasDigit = true;
ffffffff8001c7f8:	be 01 00 00 00       	mov    $0x1,%esi
        for (int i = 0; s[i]; i++) {
ffffffff8001c7fd:	84 c0                	test   %al,%al
ffffffff8001c7ff:	75 e8                	jne    ffffffff8001c7e9 <_ZN3Net3Dns7ResolveEPKcj+0x49>

        // Don't try to resolve IP addresses
        if (IsIpAddress(hostname)) return 0;
ffffffff8001c801:	83 ff 03             	cmp    $0x3,%edi
ffffffff8001c804:	75 22                	jne    ffffffff8001c828 <_ZN3Net3Dns7ResolveEPKcj+0x88>
ffffffff8001c806:	40 84 f6             	test   %sil,%sil
ffffffff8001c809:	74 1d                	je     ffffffff8001c828 <_ZN3Net3Dns7ResolveEPKcj+0x88>
        if (hostname == nullptr || hostname[0] == '\0') return 0;
ffffffff8001c80b:	45 31 ed             	xor    %r13d,%r13d

        // Cache the result
        CacheStore(hostname, answer.ip, answer.ttl);

        return answer.ip;
    }
ffffffff8001c80e:	48 81 c4 18 02 00 00 	add    $0x218,%rsp
ffffffff8001c815:	44 89 e8             	mov    %r13d,%eax
ffffffff8001c818:	5b                   	pop    %rbx
ffffffff8001c819:	41 5c                	pop    %r12
ffffffff8001c81b:	41 5d                	pop    %r13
ffffffff8001c81d:	41 5e                	pop    %r14
ffffffff8001c81f:	41 5f                	pop    %r15
ffffffff8001c821:	5d                   	pop    %rbp
ffffffff8001c822:	c3                   	ret
ffffffff8001c823:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        uint64_t now = Timekeeping::GetMilliseconds();
ffffffff8001c828:	e8 e3 6d 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff8001c82d:	49 c7 c0 20 d0 14 80 	mov    $0xffffffff8014d020,%r8
        for (int i = 0; i < CACHE_SIZE; i++) {
ffffffff8001c834:	31 ff                	xor    %edi,%edi
        uint64_t now = Timekeeping::GetMilliseconds();
ffffffff8001c836:	49 89 c1             	mov    %rax,%r9
            if (!g_cache[i].valid) continue;
ffffffff8001c839:	41 80 b8 90 00 00 00 	cmpb   $0x0,0x90(%r8)
ffffffff8001c840:	00 
ffffffff8001c841:	4c 89 c6             	mov    %r8,%rsi
ffffffff8001c844:	74 3c                	je     ffffffff8001c882 <_ZN3Net3Dns7ResolveEPKcj+0xe2>
        while (*a && *b) {
ffffffff8001c846:	41 0f b6 00          	movzbl (%r8),%eax
ffffffff8001c84a:	48 89 da             	mov    %rbx,%rdx
ffffffff8001c84d:	84 c0                	test   %al,%al
ffffffff8001c84f:	75 2a                	jne    ffffffff8001c87b <_ZN3Net3Dns7ResolveEPKcj+0xdb>
ffffffff8001c851:	e9 5a 03 00 00       	jmp    ffffffff8001cbb0 <_ZN3Net3Dns7ResolveEPKcj+0x410>
ffffffff8001c856:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001c85d:	00 00 00 
            if (*a != *b) return false;
ffffffff8001c860:	38 c1                	cmp    %al,%cl
ffffffff8001c862:	75 1e                	jne    ffffffff8001c882 <_ZN3Net3Dns7ResolveEPKcj+0xe2>
        while (*a && *b) {
ffffffff8001c864:	0f b6 46 01          	movzbl 0x1(%rsi),%eax
            a++; b++;
ffffffff8001c868:	48 83 c6 01          	add    $0x1,%rsi
ffffffff8001c86c:	48 8d 4a 01          	lea    0x1(%rdx),%rcx
        while (*a && *b) {
ffffffff8001c870:	84 c0                	test   %al,%al
ffffffff8001c872:	0f 84 c0 02 00 00    	je     ffffffff8001cb38 <_ZN3Net3Dns7ResolveEPKcj+0x398>
ffffffff8001c878:	48 89 ca             	mov    %rcx,%rdx
ffffffff8001c87b:	0f b6 0a             	movzbl (%rdx),%ecx
ffffffff8001c87e:	84 c9                	test   %cl,%cl
ffffffff8001c880:	75 de                	jne    ffffffff8001c860 <_ZN3Net3Dns7ResolveEPKcj+0xc0>
        for (int i = 0; i < CACHE_SIZE; i++) {
ffffffff8001c882:	83 c7 01             	add    $0x1,%edi
ffffffff8001c885:	49 81 c0 98 00 00 00 	add    $0x98,%r8
ffffffff8001c88c:	83 ff 08             	cmp    $0x8,%edi
ffffffff8001c88f:	75 a8                	jne    ffffffff8001c839 <_ZN3Net3Dns7ResolveEPKcj+0x99>
        uint32_t dnsServer = Net::GetDnsServer();
ffffffff8001c891:	e8 ca 11 00 00       	call   ffffffff8001da60 <_ZN3Net12GetDnsServerEv>
ffffffff8001c896:	41 89 c1             	mov    %eax,%r9d
        if (dnsServer == 0) return 0;
ffffffff8001c899:	85 c0                	test   %eax,%eax
ffffffff8001c89b:	0f 84 6a ff ff ff    	je     ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
        g_nextId = g_nextId * 25173 + 13849;
ffffffff8001c8a1:	66 44 69 15 ad 18 01 	imul   $0x6255,0x118ad(%rip),%r10w        # ffffffff8002e158 <_ZN3Net3DnsL8g_nextIdE>
ffffffff8001c8a8:	00 55 62 
        const char* p = hostname;
ffffffff8001c8ab:	48 89 de             	mov    %rbx,%rsi
ffffffff8001c8ae:	4c 8d 9d d0 fd ff ff 	lea    -0x230(%rbp),%r11
        int outPos = 0;
ffffffff8001c8b5:	45 31 f6             	xor    %r14d,%r14d
        packet[2]  = (uint8_t)(DNS_FLAGS_RD >> 8);   // Flags high: RD=1
ffffffff8001c8b8:	48 c7 85 d2 fd ff ff 	movq   $0x1000001,-0x22e(%rbp)
ffffffff8001c8bf:	01 00 00 01 
        g_nextId = g_nextId * 25173 + 13849;
ffffffff8001c8c3:	66 41 81 c2 19 36    	add    $0x3619,%r10w
ffffffff8001c8c9:	66 45 69 ea 55 62    	imul   $0x6255,%r10w,%r13w
ffffffff8001c8cf:	66 41 81 c5 19 36    	add    $0x3619,%r13w
        packet[0]  = (uint8_t)(id >> 8);
ffffffff8001c8d5:	44 89 e8             	mov    %r13d,%eax
        g_nextId = g_nextId * 25173 + 13849;
ffffffff8001c8d8:	66 44 89 2d 78 18 01 	mov    %r13w,0x11878(%rip)        # ffffffff8002e158 <_ZN3Net3DnsL8g_nextIdE>
ffffffff8001c8df:	00 
        packet[0]  = (uint8_t)(id >> 8);
ffffffff8001c8e0:	66 c1 c0 08          	rol    $0x8,%ax
ffffffff8001c8e4:	66 89 85 d0 fd ff ff 	mov    %ax,-0x230(%rbp)
        packet[10] = 0; packet[11] = 0;  // ARCOUNT = 0
ffffffff8001c8eb:	31 c0                	xor    %eax,%eax
ffffffff8001c8ed:	66 89 85 da fd ff ff 	mov    %ax,-0x226(%rbp)
        while (*p) {
ffffffff8001c8f4:	0f b6 03             	movzbl (%rbx),%eax
ffffffff8001c8f7:	84 c0                	test   %al,%al
ffffffff8001c8f9:	0f 84 49 03 00 00    	je     ffffffff8001cc48 <_ZN3Net3Dns7ResolveEPKcj+0x4a8>
            while (*dot && *dot != '.') dot++;
ffffffff8001c8ff:	3c 2e                	cmp    $0x2e,%al
ffffffff8001c901:	0f 84 04 ff ff ff    	je     ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
            const char* dot = p;
ffffffff8001c907:	48 89 f0             	mov    %rsi,%rax
ffffffff8001c90a:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001c911:	00 00 00 00 
ffffffff8001c915:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001c91c:	00 00 00 00 
            while (*dot && *dot != '.') dot++;
ffffffff8001c920:	48 89 c7             	mov    %rax,%rdi
ffffffff8001c923:	0f b6 50 01          	movzbl 0x1(%rax),%edx
ffffffff8001c927:	48 83 c0 01          	add    $0x1,%rax
ffffffff8001c92b:	84 d2                	test   %dl,%dl
ffffffff8001c92d:	74 05                	je     ffffffff8001c934 <_ZN3Net3Dns7ResolveEPKcj+0x194>
ffffffff8001c92f:	80 fa 2e             	cmp    $0x2e,%dl
ffffffff8001c932:	75 ec                	jne    ffffffff8001c920 <_ZN3Net3Dns7ResolveEPKcj+0x180>
            int labelLen = (int)(dot - p);
ffffffff8001c934:	48 89 c1             	mov    %rax,%rcx
ffffffff8001c937:	48 29 f1             	sub    %rsi,%rcx
            if (labelLen == 0 || labelLen > 63) return 0;
ffffffff8001c93a:	39 f0                	cmp    %esi,%eax
ffffffff8001c93c:	0f 84 c9 fe ff ff    	je     ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
ffffffff8001c942:	83 f9 3f             	cmp    $0x3f,%ecx
ffffffff8001c945:	0f 8f c0 fe ff ff    	jg     ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
            if (outPos + 1 + labelLen >= maxLen) return 0;
ffffffff8001c94b:	41 8d 46 01          	lea    0x1(%r14),%eax
ffffffff8001c94f:	44 8d 3c 08          	lea    (%rax,%rcx,1),%r15d
ffffffff8001c953:	41 81 ff ef 01 00 00 	cmp    $0x1ef,%r15d
ffffffff8001c95a:	0f 8f ab fe ff ff    	jg     ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
            out[outPos++] = (uint8_t)labelLen;
ffffffff8001c960:	42 88 8c 35 dc fd ff 	mov    %cl,-0x224(%rbp,%r14,1)
ffffffff8001c967:	ff 
            for (int i = 0; i < labelLen; i++) {
ffffffff8001c968:	85 c9                	test   %ecx,%ecx
ffffffff8001c96a:	0f 8e 38 02 00 00    	jle    ffffffff8001cba8 <_ZN3Net3Dns7ResolveEPKcj+0x408>
ffffffff8001c970:	44 8d 41 ff          	lea    -0x1(%rcx),%r8d
ffffffff8001c974:	31 c0                	xor    %eax,%eax
                out[outPos++] = (uint8_t)p[i];
ffffffff8001c976:	4d 01 de             	add    %r11,%r14
ffffffff8001c979:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
ffffffff8001c980:	0f b6 0c 06          	movzbl (%rsi,%rax,1),%ecx
ffffffff8001c984:	41 88 4c 06 0d       	mov    %cl,0xd(%r14,%rax,1)
            for (int i = 0; i < labelLen; i++) {
ffffffff8001c989:	48 89 c1             	mov    %rax,%rcx
ffffffff8001c98c:	48 83 c0 01          	add    $0x1,%rax
ffffffff8001c990:	4c 39 c1             	cmp    %r8,%rcx
ffffffff8001c993:	75 eb                	jne    ffffffff8001c980 <_ZN3Net3Dns7ResolveEPKcj+0x1e0>
ffffffff8001c995:	4d 63 f7             	movslq %r15d,%r14
            if (*p == '.') p++;
ffffffff8001c998:	80 fa 2e             	cmp    $0x2e,%dl
ffffffff8001c99b:	0f 84 7f 01 00 00    	je     ffffffff8001cb20 <_ZN3Net3Dns7ResolveEPKcj+0x380>
        if (outPos >= maxLen) return 0;
ffffffff8001c9a1:	41 81 fe ef 01 00 00 	cmp    $0x1ef,%r14d
ffffffff8001c9a8:	0f 8f 5d fe ff ff    	jg     ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
        out[outPos++] = 0; // Root label terminator
ffffffff8001c9ae:	49 63 c6             	movslq %r14d,%rax
ffffffff8001c9b1:	c6 84 05 dc fd ff ff 	movb   $0x0,-0x224(%rbp,%rax,1)
ffffffff8001c9b8:	00 
        if (nameLen == 0) return 0;
ffffffff8001c9b9:	41 83 fe ff          	cmp    $0xffffffff,%r14d
ffffffff8001c9bd:	0f 84 48 fe ff ff    	je     ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
        int pos = 12 + nameLen;
ffffffff8001c9c3:	41 8d 46 0d          	lea    0xd(%r14),%eax
        packet[pos++] = 0;
ffffffff8001c9c7:	48 98                	cltq
ffffffff8001c9c9:	c6 84 05 d0 fd ff ff 	movb   $0x0,-0x230(%rbp,%rax,1)
ffffffff8001c9d0:	00 
ffffffff8001c9d1:	41 8d 46 0e          	lea    0xe(%r14),%eax
        packet[pos++] = DNS_QTYPE_A;
ffffffff8001c9d5:	48 98                	cltq
ffffffff8001c9d7:	c6 84 05 d0 fd ff ff 	movb   $0x1,-0x230(%rbp,%rax,1)
ffffffff8001c9de:	01 
ffffffff8001c9df:	41 8d 46 0f          	lea    0xf(%r14),%eax
        packet[pos++] = 0;
ffffffff8001c9e3:	48 98                	cltq
ffffffff8001c9e5:	c6 84 05 d0 fd ff ff 	movb   $0x0,-0x230(%rbp,%rax,1)
ffffffff8001c9ec:	00 
        if (pos + 4 > maxLen) return 0;
ffffffff8001c9ed:	41 8d 46 10          	lea    0x10(%r14),%eax
        packet[pos++] = DNS_QCLASS_IN;
ffffffff8001c9f1:	48 98                	cltq
ffffffff8001c9f3:	c6 84 05 d0 fd ff ff 	movb   $0x1,-0x230(%rbp,%rax,1)
ffffffff8001c9fa:	01 
        if (queryLen == 0) return 0;
ffffffff8001c9fb:	41 83 c6 11          	add    $0x11,%r14d
ffffffff8001c9ff:	0f 84 06 fe ff ff    	je     ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
        uint16_t localPort = 10000 + (NextId() % 50000);
ffffffff8001ca05:	31 c0                	xor    %eax,%eax
ffffffff8001ca07:	66 41 81 fa 50 c3    	cmp    $0xc350,%r10w
        if (!Net::Udp::Bind(localPort, DnsRecvCallback)) {
ffffffff8001ca0d:	48 c7 c6 90 c6 01 80 	mov    $0xffffffff8001c690,%rsi
        g_gotResponse = false;
ffffffff8001ca14:	c6 05 e7 05 13 00 00 	movb   $0x0,0x1305e7(%rip)        # ffffffff8014d002 <_ZN3Net3DnsL13g_gotResponseE>
        uint16_t localPort = 10000 + (NextId() % 50000);
ffffffff8001ca1b:	0f 93 c0             	setae  %al
ffffffff8001ca1e:	44 89 8d cc fd ff ff 	mov    %r9d,-0x234(%rbp)
        g_responseLen = 0;
ffffffff8001ca25:	c7 05 b1 03 13 00 00 	movl   $0x0,0x1303b1(%rip)        # ffffffff8014cde0 <_ZN3Net3DnsL13g_responseLenE>
ffffffff8001ca2c:	00 00 00 
        uint16_t localPort = 10000 + (NextId() % 50000);
ffffffff8001ca2f:	66 69 c0 50 c3       	imul   $0xc350,%ax,%ax
        g_currentId = txId;
ffffffff8001ca34:	66 44 89 2d c4 05 13 	mov    %r13w,0x1305c4(%rip)        # ffffffff8014d000 <_ZN3Net3DnsL11g_currentIdE>
ffffffff8001ca3b:	00 
        uint16_t localPort = 10000 + (NextId() % 50000);
ffffffff8001ca3c:	41 29 c2             	sub    %eax,%r10d
ffffffff8001ca3f:	45 8d ba 10 27 00 00 	lea    0x2710(%r10),%r15d
        if (!Net::Udp::Bind(localPort, DnsRecvCallback)) {
ffffffff8001ca46:	45 0f b7 ff          	movzwl %r15w,%r15d
ffffffff8001ca4a:	44 89 ff             	mov    %r15d,%edi
ffffffff8001ca4d:	e8 ce 2e 00 00       	call   ffffffff8001f920 <_ZN3Net3Udp4BindEtPFvjttPKhtE>
ffffffff8001ca52:	44 8b 8d cc fd ff ff 	mov    -0x234(%rbp),%r9d
ffffffff8001ca59:	84 c0                	test   %al,%al
ffffffff8001ca5b:	75 4d                	jne    ffffffff8001caaa <_ZN3Net3Dns7ResolveEPKcj+0x30a>
        g_nextId = g_nextId * 25173 + 13849;
ffffffff8001ca5d:	66 69 05 f2 16 01 00 	imul   $0x6255,0x116f2(%rip),%ax        # ffffffff8002e158 <_ZN3Net3DnsL8g_nextIdE>
ffffffff8001ca64:	55 62 
            localPort = 10000 + (NextId() % 50000);
ffffffff8001ca66:	31 d2                	xor    %edx,%edx
            if (!Net::Udp::Bind(localPort, DnsRecvCallback)) {
ffffffff8001ca68:	48 c7 c6 90 c6 01 80 	mov    $0xffffffff8001c690,%rsi
        g_nextId = g_nextId * 25173 + 13849;
ffffffff8001ca6f:	66 05 19 36          	add    $0x3619,%ax
            localPort = 10000 + (NextId() % 50000);
ffffffff8001ca73:	66 3d 50 c3          	cmp    $0xc350,%ax
        g_nextId = g_nextId * 25173 + 13849;
ffffffff8001ca77:	66 89 05 da 16 01 00 	mov    %ax,0x116da(%rip)        # ffffffff8002e158 <_ZN3Net3DnsL8g_nextIdE>
            localPort = 10000 + (NextId() % 50000);
ffffffff8001ca7e:	0f 93 c2             	setae  %dl
ffffffff8001ca81:	66 69 d2 50 c3       	imul   $0xc350,%dx,%dx
ffffffff8001ca86:	29 d0                	sub    %edx,%eax
ffffffff8001ca88:	44 8d b8 10 27 00 00 	lea    0x2710(%rax),%r15d
            if (!Net::Udp::Bind(localPort, DnsRecvCallback)) {
ffffffff8001ca8f:	45 0f b7 ff          	movzwl %r15w,%r15d
ffffffff8001ca93:	44 89 ff             	mov    %r15d,%edi
ffffffff8001ca96:	e8 85 2e 00 00       	call   ffffffff8001f920 <_ZN3Net3Udp4BindEtPFvjttPKhtE>
ffffffff8001ca9b:	44 8b 8d cc fd ff ff 	mov    -0x234(%rbp),%r9d
ffffffff8001caa2:	84 c0                	test   %al,%al
ffffffff8001caa4:	0f 84 61 fd ff ff    	je     ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
        bool sent = Net::Udp::Send(dnsServer, localPort, DNS_PORT, queryPacket, (uint16_t)queryLen);
ffffffff8001caaa:	45 0f b7 c6          	movzwl %r14w,%r8d
ffffffff8001caae:	ba 35 00 00 00       	mov    $0x35,%edx
ffffffff8001cab3:	44 89 fe             	mov    %r15d,%esi
ffffffff8001cab6:	44 89 cf             	mov    %r9d,%edi
ffffffff8001cab9:	48 8d 8d d0 fd ff ff 	lea    -0x230(%rbp),%rcx
ffffffff8001cac0:	e8 9b 2d 00 00       	call   ffffffff8001f860 <_ZN3Net3Udp4SendEjttPKht>
        if (!sent) {
ffffffff8001cac5:	84 c0                	test   %al,%al
ffffffff8001cac7:	74 40                	je     ffffffff8001cb09 <_ZN3Net3Dns7ResolveEPKcj+0x369>
        uint64_t start = Timekeeping::GetMilliseconds();
ffffffff8001cac9:	e8 42 6b 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff8001cace:	49 89 c6             	mov    %rax,%r14
        while (!g_gotResponse) {
ffffffff8001cad1:	0f b6 05 2a 05 13 00 	movzbl 0x13052a(%rip),%eax        # ffffffff8014d002 <_ZN3Net3DnsL13g_gotResponseE>
ffffffff8001cad8:	84 c0                	test   %al,%al
ffffffff8001cada:	74 20                	je     ffffffff8001cafc <_ZN3Net3Dns7ResolveEPKcj+0x35c>
ffffffff8001cadc:	e9 d4 00 00 00       	jmp    ffffffff8001cbb5 <_ZN3Net3Dns7ResolveEPKcj+0x415>
ffffffff8001cae1:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            Sched::Schedule();
ffffffff8001cae8:	e8 d3 51 00 00       	call   ffffffff80021cc0 <_ZN5Sched8ScheduleEv>
        while (!g_gotResponse) {
ffffffff8001caed:	0f b6 05 0e 05 13 00 	movzbl 0x13050e(%rip),%eax        # ffffffff8014d002 <_ZN3Net3DnsL13g_gotResponseE>
ffffffff8001caf4:	84 c0                	test   %al,%al
ffffffff8001caf6:	0f 85 b9 00 00 00    	jne    ffffffff8001cbb5 <_ZN3Net3Dns7ResolveEPKcj+0x415>
            if (Timekeeping::GetMilliseconds() - start >= timeoutMs) {
ffffffff8001cafc:	e8 0f 6b 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff8001cb01:	4c 29 f0             	sub    %r14,%rax
ffffffff8001cb04:	4c 39 e0             	cmp    %r12,%rax
ffffffff8001cb07:	72 df                	jb     ffffffff8001cae8 <_ZN3Net3Dns7ResolveEPKcj+0x348>
                Net::Udp::Unbind(localPort);
ffffffff8001cb09:	44 89 ff             	mov    %r15d,%edi
ffffffff8001cb0c:	e8 8f 2e 00 00       	call   ffffffff8001f9a0 <_ZN3Net3Udp6UnbindEt>
                return 0;
ffffffff8001cb11:	e9 f5 fc ff ff       	jmp    ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
ffffffff8001cb16:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001cb1d:	00 00 00 
        while (*p) {
ffffffff8001cb20:	0f b6 47 02          	movzbl 0x2(%rdi),%eax
            if (*p == '.') p++;
ffffffff8001cb24:	48 8d 77 02          	lea    0x2(%rdi),%rsi
        while (*p) {
ffffffff8001cb28:	84 c0                	test   %al,%al
ffffffff8001cb2a:	0f 85 cf fd ff ff    	jne    ffffffff8001c8ff <_ZN3Net3Dns7ResolveEPKcj+0x15f>
ffffffff8001cb30:	e9 6c fe ff ff       	jmp    ffffffff8001c9a1 <_ZN3Net3Dns7ResolveEPKcj+0x201>
ffffffff8001cb35:	0f 1f 00             	nopl   (%rax)
        return *a == *b;
ffffffff8001cb38:	0f b6 42 01          	movzbl 0x1(%rdx),%eax
            if (!streq(g_cache[i].hostname, hostname)) continue;
ffffffff8001cb3c:	84 c0                	test   %al,%al
ffffffff8001cb3e:	0f 85 3e fd ff ff    	jne    ffffffff8001c882 <_ZN3Net3Dns7ResolveEPKcj+0xe2>
            uint64_t elapsed = (now - g_cache[i].timestamp) / 1000;
ffffffff8001cb44:	48 63 ff             	movslq %edi,%rdi
ffffffff8001cb47:	4c 89 ca             	mov    %r9,%rdx
ffffffff8001cb4a:	48 8d 04 ff          	lea    (%rdi,%rdi,8),%rax
ffffffff8001cb4e:	48 8d 04 47          	lea    (%rdi,%rax,2),%rax
ffffffff8001cb52:	48 8d 0c c5 20 d0 14 	lea    -0x7feb2fe0(,%rax,8),%rcx
ffffffff8001cb59:	80 
ffffffff8001cb5a:	48 b8 cf f7 53 e3 a5 	movabs $0x20c49ba5e353f7cf,%rax
ffffffff8001cb61:	9b c4 20 
ffffffff8001cb64:	48 2b 91 88 00 00 00 	sub    0x88(%rcx),%rdx
ffffffff8001cb6b:	48 c1 ea 03          	shr    $0x3,%rdx
ffffffff8001cb6f:	48 f7 e2             	mul    %rdx
            if (elapsed < g_cache[i].ttl) {
ffffffff8001cb72:	8b 81 84 00 00 00    	mov    0x84(%rcx),%eax
            uint64_t elapsed = (now - g_cache[i].timestamp) / 1000;
ffffffff8001cb78:	48 c1 ea 04          	shr    $0x4,%rdx
            if (elapsed < g_cache[i].ttl) {
ffffffff8001cb7c:	48 39 c2             	cmp    %rax,%rdx
ffffffff8001cb7f:	72 0c                	jb     ffffffff8001cb8d <_ZN3Net3Dns7ResolveEPKcj+0x3ed>
            g_cache[i].valid = false;
ffffffff8001cb81:	c6 81 90 00 00 00 00 	movb   $0x0,0x90(%rcx)
        if (cached != 0) return cached;
ffffffff8001cb88:	e9 04 fd ff ff       	jmp    ffffffff8001c891 <_ZN3Net3Dns7ResolveEPKcj+0xf1>
                return g_cache[i].ip;
ffffffff8001cb8d:	44 8b a9 80 00 00 00 	mov    0x80(%rcx),%r13d
        if (cached != 0) return cached;
ffffffff8001cb94:	45 85 ed             	test   %r13d,%r13d
ffffffff8001cb97:	0f 85 71 fc ff ff    	jne    ffffffff8001c80e <_ZN3Net3Dns7ResolveEPKcj+0x6e>
ffffffff8001cb9d:	e9 ef fc ff ff       	jmp    ffffffff8001c891 <_ZN3Net3Dns7ResolveEPKcj+0xf1>
ffffffff8001cba2:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            out[outPos++] = (uint8_t)labelLen;
ffffffff8001cba8:	4c 63 f0             	movslq %eax,%r14
ffffffff8001cbab:	e9 e8 fd ff ff       	jmp    ffffffff8001c998 <_ZN3Net3Dns7ResolveEPKcj+0x1f8>
        return *a == *b;
ffffffff8001cbb0:	0f b6 03             	movzbl (%rbx),%eax
ffffffff8001cbb3:	eb 87                	jmp    ffffffff8001cb3c <_ZN3Net3Dns7ResolveEPKcj+0x39c>
        Net::Udp::Unbind(localPort);
ffffffff8001cbb5:	44 89 ff             	mov    %r15d,%edi
ffffffff8001cbb8:	e8 e3 2d 00 00       	call   ffffffff8001f9a0 <_ZN3Net3Udp6UnbindEt>
        DnsAnswer answer = ParseResponse(txId, g_responseBuffer, g_responseLen);
ffffffff8001cbbd:	44 8b 25 1c 02 13 00 	mov    0x13021c(%rip),%r12d        # ffffffff8014cde0 <_ZN3Net3DnsL13g_responseLenE>
        if (packetLen < 12) return result;
ffffffff8001cbc4:	41 83 fc 0b          	cmp    $0xb,%r12d
ffffffff8001cbc8:	0f 8e 3d fc ff ff    	jle    ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
        if (id != expectedId) return result;
ffffffff8001cbce:	0f b7 05 2b 02 13 00 	movzwl 0x13022b(%rip),%eax        # ffffffff8014ce00 <_ZN3Net3DnsL16g_responseBufferE>
ffffffff8001cbd5:	66 c1 c0 08          	rol    $0x8,%ax
ffffffff8001cbd9:	66 41 39 c5          	cmp    %ax,%r13w
ffffffff8001cbdd:	0f 85 28 fc ff ff    	jne    ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
        if (!(packet[2] & 0x80)) return result;
ffffffff8001cbe3:	80 3d 18 02 13 00 00 	cmpb   $0x0,0x130218(%rip)        # ffffffff8014ce02 <_ZN3Net3DnsL16g_responseBufferE+0x2>
ffffffff8001cbea:	0f 89 1b fc ff ff    	jns    ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
        if (rcode != 0) return result;
ffffffff8001cbf0:	f6 05 0c 02 13 00 0f 	testb  $0xf,0x13020c(%rip)        # ffffffff8014ce03 <_ZN3Net3DnsL16g_responseBufferE+0x3>
ffffffff8001cbf7:	0f 85 0e fc ff ff    	jne    ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
        uint16_t qdcount = ((uint16_t)packet[4] << 8) | packet[5];
ffffffff8001cbfd:	0f b7 05 00 02 13 00 	movzwl 0x130200(%rip),%eax        # ffffffff8014ce04 <_ZN3Net3DnsL16g_responseBufferE+0x4>
ffffffff8001cc04:	41 89 c3             	mov    %eax,%r11d
ffffffff8001cc07:	66 41 c1 c3 08       	rol    $0x8,%r11w
        for (uint16_t i = 0; i < qdcount; i++) {
ffffffff8001cc0c:	66 85 c0             	test   %ax,%ax
ffffffff8001cc0f:	74 53                	je     ffffffff8001cc64 <_ZN3Net3Dns7ResolveEPKcj+0x4c4>
ffffffff8001cc11:	45 31 ed             	xor    %r13d,%r13d
        int offset = 12;
ffffffff8001cc14:	be 0c 00 00 00       	mov    $0xc,%esi
ffffffff8001cc19:	eb 16                	jmp    ffffffff8001cc31 <_ZN3Net3Dns7ResolveEPKcj+0x491>
            offset += 4; // QTYPE + QCLASS
ffffffff8001cc1b:	83 c6 04             	add    $0x4,%esi
            if (offset > packetLen) return result;
ffffffff8001cc1e:	41 39 f4             	cmp    %esi,%r12d
ffffffff8001cc21:	0f 8c e4 fb ff ff    	jl     ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
        for (uint16_t i = 0; i < qdcount; i++) {
ffffffff8001cc27:	41 83 c5 01          	add    $0x1,%r13d
ffffffff8001cc2b:	66 45 39 dd          	cmp    %r11w,%r13w
ffffffff8001cc2f:	73 38                	jae    ffffffff8001cc69 <_ZN3Net3Dns7ResolveEPKcj+0x4c9>
            offset = SkipName(packet, packetLen, offset);
ffffffff8001cc31:	44 89 e7             	mov    %r12d,%edi
ffffffff8001cc34:	e8 b7 fa ff ff       	call   ffffffff8001c6f0 <_ZN3Net3DnsL8SkipNameEPKhii.constprop.0>
ffffffff8001cc39:	89 c6                	mov    %eax,%esi
            if (offset < 0) return result;
ffffffff8001cc3b:	85 c0                	test   %eax,%eax
ffffffff8001cc3d:	79 dc                	jns    ffffffff8001cc1b <_ZN3Net3Dns7ResolveEPKcj+0x47b>
ffffffff8001cc3f:	e9 c7 fb ff ff       	jmp    ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
ffffffff8001cc44:	0f 1f 40 00          	nopl   0x0(%rax)
        out[outPos++] = 0; // Root label terminator
ffffffff8001cc48:	c7 85 dc fd ff ff 00 	movl   $0x10000,-0x224(%rbp)
ffffffff8001cc4f:	00 01 00 
        packet[pos++] = DNS_QCLASS_IN;
ffffffff8001cc52:	41 be 11 00 00 00    	mov    $0x11,%r14d
ffffffff8001cc58:	c6 85 e0 fd ff ff 01 	movb   $0x1,-0x220(%rbp)
        if (queryLen == 0) return 0;
ffffffff8001cc5f:	e9 a1 fd ff ff       	jmp    ffffffff8001ca05 <_ZN3Net3Dns7ResolveEPKcj+0x265>
        int offset = 12;
ffffffff8001cc64:	be 0c 00 00 00       	mov    $0xc,%esi
ffffffff8001cc69:	44 0f b7 1d 95 01 13 	movzwl 0x130195(%rip),%r11d        # ffffffff8014ce06 <_ZN3Net3DnsL16g_responseBufferE+0x6>
ffffffff8001cc70:	00 
        for (uint16_t i = 0; i < ancount; i++) {
ffffffff8001cc71:	45 31 ed             	xor    %r13d,%r13d
ffffffff8001cc74:	66 41 c1 c3 08       	rol    $0x8,%r11w
ffffffff8001cc79:	eb 68                	jmp    ffffffff8001cce3 <_ZN3Net3Dns7ResolveEPKcj+0x543>
            offset = SkipName(packet, packetLen, offset);
ffffffff8001cc7b:	44 89 e7             	mov    %r12d,%edi
ffffffff8001cc7e:	e8 6d fa ff ff       	call   ffffffff8001c6f0 <_ZN3Net3DnsL8SkipNameEPKhii.constprop.0>
ffffffff8001cc83:	89 c2                	mov    %eax,%edx
            if (offset < 0 || offset + 10 > packetLen) return result;
ffffffff8001cc85:	85 c0                	test   %eax,%eax
ffffffff8001cc87:	0f 88 7e fb ff ff    	js     ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
ffffffff8001cc8d:	8d 40 09             	lea    0x9(%rax),%eax
ffffffff8001cc90:	41 39 c4             	cmp    %eax,%r12d
ffffffff8001cc93:	0f 8e 72 fb ff ff    	jle    ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
            uint16_t atype  = ((uint16_t)packet[offset] << 8) | packet[offset + 1];
ffffffff8001cc99:	48 63 ca             	movslq %edx,%rcx
            offset += 10;
ffffffff8001cc9c:	83 c2 0a             	add    $0xa,%edx
            uint16_t atype  = ((uint16_t)packet[offset] << 8) | packet[offset + 1];
ffffffff8001cc9f:	0f b6 b9 00 ce 14 80 	movzbl -0x7feb3200(%rcx),%edi
ffffffff8001cca6:	0f b6 81 01 ce 14 80 	movzbl -0x7feb31ff(%rcx),%eax
            uint16_t rdlen  = ((uint16_t)packet[offset + 8] << 8) | packet[offset + 9];
ffffffff8001ccad:	0f b6 b1 09 ce 14 80 	movzbl -0x7feb31f7(%rcx),%esi
            uint16_t atype  = ((uint16_t)packet[offset] << 8) | packet[offset + 1];
ffffffff8001ccb4:	c1 e7 08             	shl    $0x8,%edi
ffffffff8001ccb7:	09 c7                	or     %eax,%edi
            uint16_t rdlen  = ((uint16_t)packet[offset + 8] << 8) | packet[offset + 9];
ffffffff8001ccb9:	0f b6 81 08 ce 14 80 	movzbl -0x7feb31f8(%rcx),%eax
ffffffff8001ccc0:	c1 e0 08             	shl    $0x8,%eax
ffffffff8001ccc3:	09 f0                	or     %esi,%eax
            if (offset + rdlen > packetLen) return result;
ffffffff8001ccc5:	0f b7 f0             	movzwl %ax,%esi
ffffffff8001ccc8:	01 d6                	add    %edx,%esi
ffffffff8001ccca:	41 39 f4             	cmp    %esi,%r12d
ffffffff8001cccd:	0f 8c 38 fb ff ff    	jl     ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
            if (atype == DNS_QTYPE_A && rdlen == 4) {
ffffffff8001ccd3:	66 83 ef 01          	sub    $0x1,%di
ffffffff8001ccd7:	75 06                	jne    ffffffff8001ccdf <_ZN3Net3Dns7ResolveEPKcj+0x53f>
ffffffff8001ccd9:	66 83 f8 04          	cmp    $0x4,%ax
ffffffff8001ccdd:	74 0f                	je     ffffffff8001ccee <_ZN3Net3Dns7ResolveEPKcj+0x54e>
        for (uint16_t i = 0; i < ancount; i++) {
ffffffff8001ccdf:	41 83 c5 01          	add    $0x1,%r13d
ffffffff8001cce3:	66 45 39 dd          	cmp    %r11w,%r13w
ffffffff8001cce7:	75 92                	jne    ffffffff8001cc7b <_ZN3Net3Dns7ResolveEPKcj+0x4db>
ffffffff8001cce9:	e9 1d fb ff ff       	jmp    ffffffff8001c80b <_ZN3Net3Dns7ResolveEPKcj+0x6b>
            uint32_t attl   = ((uint32_t)packet[offset + 4] << 24) |
ffffffff8001ccee:	0f b6 81 04 ce 14 80 	movzbl -0x7feb31fc(%rcx),%eax
                              ((uint32_t)packet[offset + 5] << 16) |
ffffffff8001ccf5:	0f b6 b1 05 ce 14 80 	movzbl -0x7feb31fb(%rcx),%esi
                result.ip = ((uint32_t)packet[offset])
ffffffff8001ccfc:	48 63 d2             	movslq %edx,%rdx
                          | ((uint32_t)packet[offset + 1] << 8)
ffffffff8001ccff:	44 0f b6 aa 01 ce 14 	movzbl -0x7feb31ff(%rdx),%r13d
ffffffff8001cd06:	80 
                              ((uint32_t)packet[offset + 5] << 16) |
ffffffff8001cd07:	c1 e6 10             	shl    $0x10,%esi
            uint32_t attl   = ((uint32_t)packet[offset + 4] << 24) |
ffffffff8001cd0a:	c1 e0 18             	shl    $0x18,%eax
ffffffff8001cd0d:	09 f0                	or     %esi,%eax
                              ((uint32_t)packet[offset + 7]);
ffffffff8001cd0f:	0f b6 b1 07 ce 14 80 	movzbl -0x7feb31f9(%rcx),%esi
                          | ((uint32_t)packet[offset + 1] << 8)
ffffffff8001cd16:	41 c1 e5 08          	shl    $0x8,%r13d
                              ((uint32_t)packet[offset + 6] << 8)  |
ffffffff8001cd1a:	0f b6 89 06 ce 14 80 	movzbl -0x7feb31fa(%rcx),%ecx
            uint32_t attl   = ((uint32_t)packet[offset + 4] << 24) |
ffffffff8001cd21:	09 f0                	or     %esi,%eax
                          | ((uint32_t)packet[offset + 2] << 16)
ffffffff8001cd23:	0f b6 b2 02 ce 14 80 	movzbl -0x7feb31fe(%rdx),%esi
                              ((uint32_t)packet[offset + 6] << 8)  |
ffffffff8001cd2a:	c1 e1 08             	shl    $0x8,%ecx
                          | ((uint32_t)packet[offset + 2] << 16)
ffffffff8001cd2d:	c1 e6 10             	shl    $0x10,%esi
ffffffff8001cd30:	41 09 f5             	or     %esi,%r13d
                result.ip = ((uint32_t)packet[offset])
ffffffff8001cd33:	0f b6 b2 00 ce 14 80 	movzbl -0x7feb3200(%rdx),%esi
                          | ((uint32_t)packet[offset + 3] << 24);
ffffffff8001cd3a:	0f b6 92 03 ce 14 80 	movzbl -0x7feb31fd(%rdx),%edx
                          | ((uint32_t)packet[offset + 2] << 16)
ffffffff8001cd41:	41 09 f5             	or     %esi,%r13d
                          | ((uint32_t)packet[offset + 3] << 24);
ffffffff8001cd44:	c1 e2 18             	shl    $0x18,%edx
ffffffff8001cd47:	41 09 d5             	or     %edx,%r13d
        if (ttl == 0) ttl = 60; // Minimum 60s TTL
ffffffff8001cd4a:	09 c8                	or     %ecx,%eax
ffffffff8001cd4c:	89 c7                	mov    %eax,%edi
ffffffff8001cd4e:	0f 84 cc 00 00 00    	je     ffffffff8001ce20 <_ZN3Net3Dns7ResolveEPKcj+0x680>
        for (int i = 0; i < CACHE_SIZE; i++) {
ffffffff8001cd54:	48 c7 c0 a8 d0 14 80 	mov    $0xffffffff8014d0a8,%rax
        int slot = 0;
ffffffff8001cd5b:	31 c9                	xor    %ecx,%ecx
        uint64_t oldestTime = ~0ULL;
ffffffff8001cd5d:	49 c7 c0 ff ff ff ff 	mov    $0xffffffffffffffff,%r8
        for (int i = 0; i < CACHE_SIZE; i++) {
ffffffff8001cd64:	31 d2                	xor    %edx,%edx
            if (!g_cache[i].valid) { slot = i; break; }
ffffffff8001cd66:	80 78 08 00          	cmpb   $0x0,0x8(%rax)
ffffffff8001cd6a:	0f 84 a1 00 00 00    	je     ffffffff8001ce11 <_ZN3Net3Dns7ResolveEPKcj+0x671>
            if (g_cache[i].timestamp < oldestTime) {
ffffffff8001cd70:	48 8b 30             	mov    (%rax),%rsi
ffffffff8001cd73:	4c 39 c6             	cmp    %r8,%rsi
ffffffff8001cd76:	73 06                	jae    ffffffff8001cd7e <_ZN3Net3Dns7ResolveEPKcj+0x5de>
                oldestTime = g_cache[i].timestamp;
ffffffff8001cd78:	49 89 f0             	mov    %rsi,%r8
                slot = i;
ffffffff8001cd7b:	48 63 ca             	movslq %edx,%rcx
        for (int i = 0; i < CACHE_SIZE; i++) {
ffffffff8001cd7e:	83 c2 01             	add    $0x1,%edx
ffffffff8001cd81:	48 05 98 00 00 00    	add    $0x98,%rax
ffffffff8001cd87:	83 fa 08             	cmp    $0x8,%edx
ffffffff8001cd8a:	75 da                	jne    ffffffff8001cd66 <_ZN3Net3Dns7ResolveEPKcj+0x5c6>
        while (hostname[len] && len < 126) { e.hostname[len] = hostname[len]; len++; }
ffffffff8001cd8c:	0f b6 13             	movzbl (%rbx),%edx
ffffffff8001cd8f:	84 d2                	test   %dl,%dl
ffffffff8001cd91:	0f 84 93 00 00 00    	je     ffffffff8001ce2a <_ZN3Net3Dns7ResolveEPKcj+0x68a>
ffffffff8001cd97:	48 8d 04 c9          	lea    (%rcx,%rcx,8),%rax
ffffffff8001cd9b:	48 8d 04 41          	lea    (%rcx,%rax,2),%rax
ffffffff8001cd9f:	48 8d 34 c5 20 d0 14 	lea    -0x7feb2fe0(,%rax,8),%rsi
ffffffff8001cda6:	80 
ffffffff8001cda7:	b8 01 00 00 00       	mov    $0x1,%eax
ffffffff8001cdac:	eb 1c                	jmp    ffffffff8001cdca <_ZN3Net3Dns7ResolveEPKcj+0x62a>
ffffffff8001cdae:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001cdb5:	00 00 00 00 
ffffffff8001cdb9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
ffffffff8001cdc0:	48 83 c0 01          	add    $0x1,%rax
ffffffff8001cdc4:	48 83 f8 7f          	cmp    $0x7f,%rax
ffffffff8001cdc8:	74 4f                	je     ffffffff8001ce19 <_ZN3Net3Dns7ResolveEPKcj+0x679>
ffffffff8001cdca:	88 54 06 ff          	mov    %dl,-0x1(%rsi,%rax,1)
ffffffff8001cdce:	0f b6 14 03          	movzbl (%rbx,%rax,1),%edx
ffffffff8001cdd2:	84 d2                	test   %dl,%dl
ffffffff8001cdd4:	75 ea                	jne    ffffffff8001cdc0 <_ZN3Net3Dns7ResolveEPKcj+0x620>
        e.hostname[len] = '\0';
ffffffff8001cdd6:	48 8d 14 c9          	lea    (%rcx,%rcx,8),%rdx
ffffffff8001cdda:	48 98                	cltq
ffffffff8001cddc:	48 8d 14 51          	lea    (%rcx,%rdx,2),%rdx
ffffffff8001cde0:	48 8d 1c d5 20 d0 14 	lea    -0x7feb2fe0(,%rdx,8),%rbx
ffffffff8001cde7:	80 
ffffffff8001cde8:	c6 04 03 00          	movb   $0x0,(%rbx,%rax,1)
        e.ip = ip;
ffffffff8001cdec:	44 89 ab 80 00 00 00 	mov    %r13d,0x80(%rbx)
        e.ttl = ttl;
ffffffff8001cdf3:	89 bb 84 00 00 00    	mov    %edi,0x84(%rbx)
        e.timestamp = Timekeeping::GetMilliseconds();
ffffffff8001cdf9:	e8 12 68 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
        e.valid = true;
ffffffff8001cdfe:	c6 83 90 00 00 00 01 	movb   $0x1,0x90(%rbx)
        e.timestamp = Timekeeping::GetMilliseconds();
ffffffff8001ce05:	48 89 83 88 00 00 00 	mov    %rax,0x88(%rbx)
    }
ffffffff8001ce0c:	e9 fd f9 ff ff       	jmp    ffffffff8001c80e <_ZN3Net3Dns7ResolveEPKcj+0x6e>
            if (!g_cache[i].valid) { slot = i; break; }
ffffffff8001ce11:	48 63 ca             	movslq %edx,%rcx
ffffffff8001ce14:	e9 73 ff ff ff       	jmp    ffffffff8001cd8c <_ZN3Net3Dns7ResolveEPKcj+0x5ec>
ffffffff8001ce19:	b8 7e 00 00 00       	mov    $0x7e,%eax
ffffffff8001ce1e:	eb b6                	jmp    ffffffff8001cdd6 <_ZN3Net3Dns7ResolveEPKcj+0x636>
        if (ttl == 0) ttl = 60; // Minimum 60s TTL
ffffffff8001ce20:	bf 3c 00 00 00       	mov    $0x3c,%edi
ffffffff8001ce25:	e9 2a ff ff ff       	jmp    ffffffff8001cd54 <_ZN3Net3Dns7ResolveEPKcj+0x5b4>
        int len = 0;
ffffffff8001ce2a:	31 c0                	xor    %eax,%eax
ffffffff8001ce2c:	eb a8                	jmp    ffffffff8001cdd6 <_ZN3Net3Dns7ResolveEPKcj+0x636>
ffffffff8001ce2e:	66 90                	xchg   %ax,%ax

ffffffff8001ce30 <_ZN3Net8Ethernet10InitializeEv>:
        if (Drivers::Net::E1000::IsInitialized())
            return Drivers::Net::E1000::SendPacket(data, length);
        return Drivers::Net::E1000E::SendPacket(data, length);
    }

    void Initialize() {
ffffffff8001ce30:	55                   	push   %rbp
            Print(string);
ffffffff8001ce31:	48 c7 c7 7c bb 02 80 	mov    $0xffffffff8002bb7c,%rdi
            g_kernelLogDepth++;
ffffffff8001ce38:	83 05 65 26 1c 00 01 	addl   $0x1,0x1c2665(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001ce3f:	48 89 e5             	mov    %rsp,%rbp
            Print(string);
ffffffff8001ce42:	e8 79 63 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001ce47:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001ce4e:	e8 6d 63 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001ce53:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001ce5a:	e8 61 63 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001ce5f:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001ce66:	e8 55 63 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001ce6b:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001ce72:	e8 49 63 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001ce77:	48 c7 c7 90 bb 02 80 	mov    $0xffffffff8002bb90,%rdi
ffffffff8001ce7e:	e8 3d 63 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001ce83:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001ce8a:	e8 31 63 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001ce8f:	83 2d 0e 26 1c 00 01 	subl   $0x1,0x1c260e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        KernelLogStream(OK, "Net") << "Ethernet layer initialized";
    }
ffffffff8001ce96:	5d                   	pop    %rbp
ffffffff8001ce97:	c3                   	ret
ffffffff8001ce98:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001ce9f:	00 

ffffffff8001cea0 <_ZN3Net8Ethernet4SendEPKhtS2_t>:

    bool Send(const uint8_t* destMac, uint16_t etherType, const uint8_t* payload, uint16_t payloadLen) {
        if (payload == nullptr || payloadLen == 0 || payloadLen > MAX_PAYLOAD_SIZE) {
ffffffff8001cea0:	8d 41 ff             	lea    -0x1(%rcx),%eax
ffffffff8001cea3:	66 3d df 05          	cmp    $0x5df,%ax
ffffffff8001cea7:	0f 87 bb 00 00 00    	ja     ffffffff8001cf68 <_ZN3Net8Ethernet4SendEPKhtS2_t+0xc8>
    bool Send(const uint8_t* destMac, uint16_t etherType, const uint8_t* payload, uint16_t payloadLen) {
ffffffff8001cead:	55                   	push   %rbp
            return false;
ffffffff8001ceae:	31 c0                	xor    %eax,%eax
    bool Send(const uint8_t* destMac, uint16_t etherType, const uint8_t* payload, uint16_t payloadLen) {
ffffffff8001ceb0:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001ceb3:	41 56                	push   %r14
ffffffff8001ceb5:	41 55                	push   %r13
ffffffff8001ceb7:	41 54                	push   %r12
ffffffff8001ceb9:	49 89 d4             	mov    %rdx,%r12
ffffffff8001cebc:	53                   	push   %rbx
ffffffff8001cebd:	48 81 ec f0 05 00 00 	sub    $0x5f0,%rsp
        if (payload == nullptr || payloadLen == 0 || payloadLen > MAX_PAYLOAD_SIZE) {
ffffffff8001cec4:	48 85 d2             	test   %rdx,%rdx
ffffffff8001cec7:	75 17                	jne    ffffffff8001cee0 <_ZN3Net8Ethernet4SendEPKhtS2_t+0x40>
        memcpy(frame + HEADER_SIZE, payload, payloadLen);

        uint16_t totalLen = HEADER_SIZE + payloadLen;

        return ActiveNicSend(frame, totalLen);
    }
ffffffff8001cec9:	48 81 c4 f0 05 00 00 	add    $0x5f0,%rsp
ffffffff8001ced0:	5b                   	pop    %rbx
ffffffff8001ced1:	41 5c                	pop    %r12
ffffffff8001ced3:	41 5d                	pop    %r13
ffffffff8001ced5:	41 5e                	pop    %r14
ffffffff8001ced7:	5d                   	pop    %rbp
ffffffff8001ced8:	c3                   	ret
ffffffff8001ced9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        memcpy(hdr->DestMac, destMac, 6);
ffffffff8001cee0:	4c 8d ad f2 f9 ff ff 	lea    -0x60e(%rbp),%r13
ffffffff8001cee7:	41 89 f6             	mov    %esi,%r14d
ffffffff8001ceea:	ba 06 00 00 00       	mov    $0x6,%edx
ffffffff8001ceef:	48 89 fe             	mov    %rdi,%rsi
ffffffff8001cef2:	4c 89 ef             	mov    %r13,%rdi
ffffffff8001cef5:	89 cb                	mov    %ecx,%ebx
ffffffff8001cef7:	e8 e4 d2 ff ff       	call   ffffffff8001a1e0 <memcpy>
        if (Drivers::Net::E1000::IsInitialized())
ffffffff8001cefc:	e8 9f 1e ff ff       	call   ffffffff8000eda0 <_ZN7Drivers3Net5E100013IsInitializedEv>
ffffffff8001cf01:	84 c0                	test   %al,%al
ffffffff8001cf03:	75 6b                	jne    ffffffff8001cf70 <_ZN3Net8Ethernet4SendEPKhtS2_t+0xd0>
        return Drivers::Net::E1000E::GetMacAddress();
ffffffff8001cf05:	e8 b6 37 ff ff       	call   ffffffff800106c0 <_ZN7Drivers3Net6E1000E13GetMacAddressEv>
ffffffff8001cf0a:	48 89 c6             	mov    %rax,%rsi
        memcpy(hdr->SrcMac, GetActiveNicMac(), 6);
ffffffff8001cf0d:	48 8d bd f8 f9 ff ff 	lea    -0x608(%rbp),%rdi
ffffffff8001cf14:	ba 06 00 00 00       	mov    $0x6,%edx
#include <cstdint>

namespace Net {

    inline uint16_t Htons(uint16_t host) {
        return (uint16_t)((host >> 8) | (host << 8));
ffffffff8001cf19:	66 41 c1 c6 08       	rol    $0x8,%r14w
ffffffff8001cf1e:	e8 bd d2 ff ff       	call   ffffffff8001a1e0 <memcpy>
        memcpy(frame + HEADER_SIZE, payload, payloadLen);
ffffffff8001cf23:	48 8d bd 00 fa ff ff 	lea    -0x600(%rbp),%rdi
ffffffff8001cf2a:	4c 89 e6             	mov    %r12,%rsi
ffffffff8001cf2d:	0f b7 d3             	movzwl %bx,%edx
ffffffff8001cf30:	66 44 89 b5 fe f9 ff 	mov    %r14w,-0x602(%rbp)
ffffffff8001cf37:	ff 
ffffffff8001cf38:	e8 a3 d2 ff ff       	call   ffffffff8001a1e0 <memcpy>
        if (Drivers::Net::E1000::IsInitialized())
ffffffff8001cf3d:	e8 5e 1e ff ff       	call   ffffffff8000eda0 <_ZN7Drivers3Net5E100013IsInitializedEv>
        uint16_t totalLen = HEADER_SIZE + payloadLen;
ffffffff8001cf42:	8d 73 0e             	lea    0xe(%rbx),%esi
            return Drivers::Net::E1000::SendPacket(data, length);
ffffffff8001cf45:	4c 89 ef             	mov    %r13,%rdi
ffffffff8001cf48:	0f b7 f6             	movzwl %si,%esi
        if (Drivers::Net::E1000::IsInitialized())
ffffffff8001cf4b:	84 c0                	test   %al,%al
ffffffff8001cf4d:	74 31                	je     ffffffff8001cf80 <_ZN3Net8Ethernet4SendEPKhtS2_t+0xe0>
            return Drivers::Net::E1000::SendPacket(data, length);
ffffffff8001cf4f:	e8 fc 1c ff ff       	call   ffffffff8000ec50 <_ZN7Drivers3Net5E100010SendPacketEPKht>
    }
ffffffff8001cf54:	48 81 c4 f0 05 00 00 	add    $0x5f0,%rsp
ffffffff8001cf5b:	5b                   	pop    %rbx
ffffffff8001cf5c:	41 5c                	pop    %r12
ffffffff8001cf5e:	41 5d                	pop    %r13
ffffffff8001cf60:	41 5e                	pop    %r14
ffffffff8001cf62:	5d                   	pop    %rbp
ffffffff8001cf63:	c3                   	ret
ffffffff8001cf64:	0f 1f 40 00          	nopl   0x0(%rax)
            return false;
ffffffff8001cf68:	31 c0                	xor    %eax,%eax
    }
ffffffff8001cf6a:	c3                   	ret
ffffffff8001cf6b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            return Drivers::Net::E1000::GetMacAddress();
ffffffff8001cf70:	e8 1b 1e ff ff       	call   ffffffff8000ed90 <_ZN7Drivers3Net5E100013GetMacAddressEv>
ffffffff8001cf75:	48 89 c6             	mov    %rax,%rsi
ffffffff8001cf78:	eb 93                	jmp    ffffffff8001cf0d <_ZN3Net8Ethernet4SendEPKhtS2_t+0x6d>
ffffffff8001cf7a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        return Drivers::Net::E1000E::SendPacket(data, length);
ffffffff8001cf80:	e8 fb 35 ff ff       	call   ffffffff80010580 <_ZN7Drivers3Net6E1000E10SendPacketEPKht>
    }
ffffffff8001cf85:	48 81 c4 f0 05 00 00 	add    $0x5f0,%rsp
ffffffff8001cf8c:	5b                   	pop    %rbx
ffffffff8001cf8d:	41 5c                	pop    %r12
ffffffff8001cf8f:	41 5d                	pop    %r13
ffffffff8001cf91:	41 5e                	pop    %r14
ffffffff8001cf93:	5d                   	pop    %rbp
ffffffff8001cf94:	c3                   	ret
ffffffff8001cf95:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001cf9c:	00 00 00 
ffffffff8001cf9f:	90                   	nop

ffffffff8001cfa0 <_ZN3Net8Ethernet15OnFrameReceivedEPKht>:

    void OnFrameReceived(const uint8_t* data, uint16_t length) {
        if (length < HEADER_SIZE) {
ffffffff8001cfa0:	66 83 fe 0d          	cmp    $0xd,%si
ffffffff8001cfa4:	76 22                	jbe    ffffffff8001cfc8 <_ZN3Net8Ethernet15OnFrameReceivedEPKht+0x28>
            return;
        }

        const Header* hdr = (const Header*)data;
        uint16_t etherType = Ntohs(hdr->EtherType);
ffffffff8001cfa6:	0f b7 47 0c          	movzwl 0xc(%rdi),%eax
        const uint8_t* payload = data + HEADER_SIZE;
        uint16_t payloadLen = length - HEADER_SIZE;
ffffffff8001cfaa:	83 ee 0e             	sub    $0xe,%esi
        const uint8_t* payload = data + HEADER_SIZE;
ffffffff8001cfad:	48 83 c7 0e          	add    $0xe,%rdi

        switch (etherType) {
ffffffff8001cfb1:	66 83 f8 08          	cmp    $0x8,%ax
ffffffff8001cfb5:	74 19                	je     ffffffff8001cfd0 <_ZN3Net8Ethernet15OnFrameReceivedEPKht+0x30>
ffffffff8001cfb7:	66 3d 08 06          	cmp    $0x608,%ax
ffffffff8001cfbb:	75 0b                	jne    ffffffff8001cfc8 <_ZN3Net8Ethernet15OnFrameReceivedEPKht+0x28>
            case ETHERTYPE_ARP:
                Arp::OnPacketReceived(payload, payloadLen);
ffffffff8001cfbd:	0f b7 f6             	movzwl %si,%esi
ffffffff8001cfc0:	e9 bb f3 ff ff       	jmp    ffffffff8001c380 <_ZN3Net3Arp16OnPacketReceivedEPKht>
ffffffff8001cfc5:	0f 1f 00             	nopl   (%rax)
                Ipv4::OnPacketReceived(payload, payloadLen);
                break;
            default:
                break;
        }
    }
ffffffff8001cfc8:	c3                   	ret
ffffffff8001cfc9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
                Ipv4::OnPacketReceived(payload, payloadLen);
ffffffff8001cfd0:	0f b7 f6             	movzwl %si,%esi
ffffffff8001cfd3:	e9 18 06 00 00       	jmp    ffffffff8001d5f0 <_ZN3Net4Ipv416OnPacketReceivedEPKht>
ffffffff8001cfd8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001cfdf:	00 

ffffffff8001cfe0 <_ZN3Net4Icmp10InitializeEv>:
    // Reply tracking for outgoing pings
    static volatile bool    g_replyReceived = false;
    static volatile uint16_t g_replyId  = 0;
    static volatile uint16_t g_replySeq = 0;

    void Initialize() {
ffffffff8001cfe0:	55                   	push   %rbp
            Print(string);
ffffffff8001cfe1:	48 c7 c7 7c bb 02 80 	mov    $0xffffffff8002bb7c,%rdi
            g_kernelLogDepth++;
ffffffff8001cfe8:	83 05 b5 24 1c 00 01 	addl   $0x1,0x1c24b5(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001cfef:	48 89 e5             	mov    %rsp,%rbp
            Print(string);
ffffffff8001cff2:	e8 c9 61 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001cff7:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001cffe:	e8 bd 61 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d003:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001d00a:	e8 b1 61 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d00f:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001d016:	e8 a5 61 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d01b:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001d022:	e8 99 61 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d027:	48 c7 c7 ab bb 02 80 	mov    $0xffffffff8002bbab,%rdi
ffffffff8001d02e:	e8 8d 61 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d033:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001d03a:	e8 81 61 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001d03f:	83 2d 5e 24 1c 00 01 	subl   $0x1,0x1c245e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        KernelLogStream(OK, "Net") << "ICMP initialized";
    }
ffffffff8001d046:	5d                   	pop    %rbp
ffffffff8001d047:	c3                   	ret
ffffffff8001d048:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001d04f:	00 

ffffffff8001d050 <_ZN3Net4Icmp10ResetReplyEv>:

    void ResetReply() {
        g_replyReceived = false;
ffffffff8001d050:	c6 05 8d 04 13 00 00 	movb   $0x0,0x13048d(%rip)        # ffffffff8014d4e4 <_ZN3Net4IcmpL15g_replyReceivedE>
    }
ffffffff8001d057:	c3                   	ret
ffffffff8001d058:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001d05f:	00 

ffffffff8001d060 <_ZN3Net4Icmp8HasReplyEtt>:

    bool HasReply(uint16_t identifier, uint16_t sequence) {
        return g_replyReceived
ffffffff8001d060:	0f b6 05 7d 04 13 00 	movzbl 0x13047d(%rip),%eax        # ffffffff8014d4e4 <_ZN3Net4IcmpL15g_replyReceivedE>
            && g_replyId  == identifier
            && g_replySeq == sequence;
ffffffff8001d067:	84 c0                	test   %al,%al
ffffffff8001d069:	74 0e                	je     ffffffff8001d079 <_ZN3Net4Icmp8HasReplyEtt+0x19>
            && g_replyId  == identifier
ffffffff8001d06b:	0f b7 15 70 04 13 00 	movzwl 0x130470(%rip),%edx        # ffffffff8014d4e2 <_ZN3Net4IcmpL9g_replyIdE>
            && g_replySeq == sequence;
ffffffff8001d072:	31 c0                	xor    %eax,%eax
            && g_replyId  == identifier
ffffffff8001d074:	66 39 fa             	cmp    %di,%dx
ffffffff8001d077:	74 07                	je     ffffffff8001d080 <_ZN3Net4Icmp8HasReplyEtt+0x20>
    }
ffffffff8001d079:	c3                   	ret
ffffffff8001d07a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            && g_replySeq == sequence;
ffffffff8001d080:	0f b7 05 59 04 13 00 	movzwl 0x130459(%rip),%eax        # ffffffff8014d4e0 <_ZN3Net4IcmpL10g_replySeqE>
ffffffff8001d087:	66 39 f0             	cmp    %si,%ax
ffffffff8001d08a:	0f 94 c0             	sete   %al
    }
ffffffff8001d08d:	c3                   	ret
ffffffff8001d08e:	66 90                	xchg   %ax,%ax

ffffffff8001d090 <_ZN3Net4Icmp15SendEchoRequestEjtt>:

    void SendEchoRequest(uint32_t destIp, uint16_t identifier, uint16_t sequence) {
ffffffff8001d090:	55                   	push   %rbp
ffffffff8001d091:	66 c1 c6 08          	rol    $0x8,%si
ffffffff8001d095:	66 c1 c2 08          	rol    $0x8,%dx
ffffffff8001d099:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001d09c:	41 54                	push   %r12
ffffffff8001d09e:	53                   	push   %rbx
        hdr->Code       = 0;
        hdr->Checksum   = 0;
        hdr->Identifier = Htons(identifier);
        hdr->Sequence   = Htons(sequence);

        hdr->Checksum = Ipv4::Checksum(packet, sizeof(Header));
ffffffff8001d09f:	4c 8d 65 e8          	lea    -0x18(%rbp),%r12
    void SendEchoRequest(uint32_t destIp, uint16_t identifier, uint16_t sequence) {
ffffffff8001d0a3:	89 fb                	mov    %edi,%ebx
        hdr->Checksum = Ipv4::Checksum(packet, sizeof(Header));
ffffffff8001d0a5:	4c 89 e7             	mov    %r12,%rdi
    void SendEchoRequest(uint32_t destIp, uint16_t identifier, uint16_t sequence) {
ffffffff8001d0a8:	48 83 ec 10          	sub    $0x10,%rsp
ffffffff8001d0ac:	66 89 75 ec          	mov    %si,-0x14(%rbp)
        hdr->Checksum = Ipv4::Checksum(packet, sizeof(Header));
ffffffff8001d0b0:	be 08 00 00 00       	mov    $0x8,%esi
ffffffff8001d0b5:	66 89 55 ee          	mov    %dx,-0x12(%rbp)
        hdr->Type       = TYPE_ECHO_REQUEST;
ffffffff8001d0b9:	c7 45 e8 08 00 00 00 	movl   $0x8,-0x18(%rbp)
        hdr->Checksum = Ipv4::Checksum(packet, sizeof(Header));
ffffffff8001d0c0:	e8 2b 04 00 00       	call   ffffffff8001d4f0 <_ZN3Net4Ipv48ChecksumEPKvt>

        Ipv4::Send(destIp, Ipv4::PROTO_ICMP, packet, sizeof(Header));
ffffffff8001d0c5:	4c 89 e2             	mov    %r12,%rdx
ffffffff8001d0c8:	89 df                	mov    %ebx,%edi
ffffffff8001d0ca:	b9 08 00 00 00       	mov    $0x8,%ecx
ffffffff8001d0cf:	be 01 00 00 00       	mov    $0x1,%esi
        hdr->Checksum = Ipv4::Checksum(packet, sizeof(Header));
ffffffff8001d0d4:	66 89 45 ea          	mov    %ax,-0x16(%rbp)
        Ipv4::Send(destIp, Ipv4::PROTO_ICMP, packet, sizeof(Header));
ffffffff8001d0d8:	e8 43 06 00 00       	call   ffffffff8001d720 <_ZN3Net4Ipv44SendEjhPKht>
    }
ffffffff8001d0dd:	48 83 c4 10          	add    $0x10,%rsp
ffffffff8001d0e1:	5b                   	pop    %rbx
ffffffff8001d0e2:	41 5c                	pop    %r12
ffffffff8001d0e4:	5d                   	pop    %rbp
ffffffff8001d0e5:	c3                   	ret
ffffffff8001d0e6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001d0ed:	00 00 00 

ffffffff8001d0f0 <_ZN3Net4Icmp16OnPacketReceivedEjPKht>:

    void OnPacketReceived(uint32_t srcIp, const uint8_t* data, uint16_t length) {
        if (length < sizeof(Header)) {
ffffffff8001d0f0:	66 83 fa 07          	cmp    $0x7,%dx
ffffffff8001d0f4:	77 0a                	ja     ffffffff8001d100 <_ZN3Net4Icmp16OnPacketReceivedEjPKht+0x10>
ffffffff8001d0f6:	c3                   	ret
ffffffff8001d0f7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001d0fe:	00 00 
    void OnPacketReceived(uint32_t srcIp, const uint8_t* data, uint16_t length) {
ffffffff8001d100:	55                   	push   %rbp
ffffffff8001d101:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001d104:	41 56                	push   %r14
        }

        const Header* hdr = (const Header*)data;

        // Verify checksum
        if (Ipv4::Checksum(data, length) != 0) {
ffffffff8001d106:	44 0f b7 f2          	movzwl %dx,%r14d
    void OnPacketReceived(uint32_t srcIp, const uint8_t* data, uint16_t length) {
ffffffff8001d10a:	41 55                	push   %r13
ffffffff8001d10c:	41 89 fd             	mov    %edi,%r13d
ffffffff8001d10f:	41 54                	push   %r12
ffffffff8001d111:	49 89 f4             	mov    %rsi,%r12
        if (Ipv4::Checksum(data, length) != 0) {
ffffffff8001d114:	44 89 f6             	mov    %r14d,%esi
    void OnPacketReceived(uint32_t srcIp, const uint8_t* data, uint16_t length) {
ffffffff8001d117:	53                   	push   %rbx
        if (Ipv4::Checksum(data, length) != 0) {
ffffffff8001d118:	4c 89 e7             	mov    %r12,%rdi
ffffffff8001d11b:	89 d3                	mov    %edx,%ebx
    void OnPacketReceived(uint32_t srcIp, const uint8_t* data, uint16_t length) {
ffffffff8001d11d:	48 81 ec e0 05 00 00 	sub    $0x5e0,%rsp
        if (Ipv4::Checksum(data, length) != 0) {
ffffffff8001d124:	e8 c7 03 00 00       	call   ffffffff8001d4f0 <_ZN3Net4Ipv48ChecksumEPKvt>
ffffffff8001d129:	66 85 c0             	test   %ax,%ax
ffffffff8001d12c:	75 3e                	jne    ffffffff8001d16c <_ZN3Net4Icmp16OnPacketReceivedEjPKht+0x7c>
            return;
        }

        if (hdr->Type == TYPE_ECHO_REQUEST && hdr->Code == 0) {
ffffffff8001d12e:	41 0f b6 04 24       	movzbl (%r12),%eax
ffffffff8001d133:	3c 08                	cmp    $0x8,%al
ffffffff8001d135:	74 49                	je     ffffffff8001d180 <_ZN3Net4Icmp16OnPacketReceivedEjPKht+0x90>
            replyHdr->Code = 0;
            replyHdr->Checksum = 0;
            replyHdr->Checksum = Ipv4::Checksum(reply, length);

            Ipv4::Send(srcIp, Ipv4::PROTO_ICMP, reply, length);
        } else if (hdr->Type == TYPE_ECHO_REPLY && hdr->Code == 0) {
ffffffff8001d137:	84 c0                	test   %al,%al
ffffffff8001d139:	75 31                	jne    ffffffff8001d16c <_ZN3Net4Icmp16OnPacketReceivedEjPKht+0x7c>
ffffffff8001d13b:	41 80 7c 24 01 00    	cmpb   $0x0,0x1(%r12)
ffffffff8001d141:	75 29                	jne    ffffffff8001d16c <_ZN3Net4Icmp16OnPacketReceivedEjPKht+0x7c>
ffffffff8001d143:	41 0f b7 44 24 04    	movzwl 0x4(%r12),%eax
ffffffff8001d149:	66 c1 c0 08          	rol    $0x8,%ax
            g_replyId  = Ntohs(hdr->Identifier);
ffffffff8001d14d:	66 89 05 8e 03 13 00 	mov    %ax,0x13038e(%rip)        # ffffffff8014d4e2 <_ZN3Net4IcmpL9g_replyIdE>
ffffffff8001d154:	41 0f b7 44 24 06    	movzwl 0x6(%r12),%eax
ffffffff8001d15a:	66 c1 c0 08          	rol    $0x8,%ax
            g_replySeq = Ntohs(hdr->Sequence);
ffffffff8001d15e:	66 89 05 7b 03 13 00 	mov    %ax,0x13037b(%rip)        # ffffffff8014d4e0 <_ZN3Net4IcmpL10g_replySeqE>
            g_replyReceived = true;
ffffffff8001d165:	c6 05 78 03 13 00 01 	movb   $0x1,0x130378(%rip)        # ffffffff8014d4e4 <_ZN3Net4IcmpL15g_replyReceivedE>
        }
    }
ffffffff8001d16c:	48 81 c4 e0 05 00 00 	add    $0x5e0,%rsp
ffffffff8001d173:	5b                   	pop    %rbx
ffffffff8001d174:	41 5c                	pop    %r12
ffffffff8001d176:	41 5d                	pop    %r13
ffffffff8001d178:	41 5e                	pop    %r14
ffffffff8001d17a:	5d                   	pop    %rbp
ffffffff8001d17b:	c3                   	ret
ffffffff8001d17c:	0f 1f 40 00          	nopl   0x0(%rax)
        if (hdr->Type == TYPE_ECHO_REQUEST && hdr->Code == 0) {
ffffffff8001d180:	41 80 7c 24 01 00    	cmpb   $0x0,0x1(%r12)
ffffffff8001d186:	75 e4                	jne    ffffffff8001d16c <_ZN3Net4Icmp16OnPacketReceivedEjPKht+0x7c>
            Print(string);
ffffffff8001d188:	48 c7 c7 7c bb 02 80 	mov    $0xffffffff8002bb7c,%rdi
            g_kernelLogDepth++;
ffffffff8001d18f:	83 05 0e 23 1c 00 01 	addl   $0x1,0x1c230e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001d196:	e8 25 60 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d19b:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001d1a2:	e8 19 60 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d1a7:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001d1ae:	e8 0d 60 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d1b3:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8001d1ba:	e8 01 60 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d1bf:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001d1c6:	e8 f5 5f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d1cb:	48 c7 c7 bc bb 02 80 	mov    $0xffffffff8002bbbc,%rdi
ffffffff8001d1d2:	e8 e9 5f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001d1d7:	be 0a 00 00 00       	mov    $0xa,%esi
                << (uint64_t)(srcIp & 0xFF) << "."
ffffffff8001d1dc:	41 0f b6 fd          	movzbl %r13b,%edi
ffffffff8001d1e0:	e8 ab d2 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001d1e5:	48 89 c7             	mov    %rax,%rdi
ffffffff8001d1e8:	e8 d3 5f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001d1ed:	48 c7 c7 57 ae 02 80 	mov    $0xffffffff8002ae57,%rdi
ffffffff8001d1f4:	e8 c7 5f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << (uint64_t)((srcIp >> 8) & 0xFF) << "."
ffffffff8001d1f9:	44 89 e8             	mov    %r13d,%eax
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001d1fc:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001d201:	0f b6 fc             	movzbl %ah,%edi
ffffffff8001d204:	e8 87 d2 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001d209:	48 89 c7             	mov    %rax,%rdi
ffffffff8001d20c:	e8 af 5f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001d211:	48 c7 c7 57 ae 02 80 	mov    $0xffffffff8002ae57,%rdi
ffffffff8001d218:	e8 a3 5f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << (uint64_t)((srcIp >> 16) & 0xFF) << "."
ffffffff8001d21d:	44 89 ef             	mov    %r13d,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001d220:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001d225:	c1 ef 10             	shr    $0x10,%edi
ffffffff8001d228:	40 0f b6 ff          	movzbl %dil,%edi
ffffffff8001d22c:	e8 5f d2 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001d231:	48 89 c7             	mov    %rax,%rdi
ffffffff8001d234:	e8 87 5f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001d239:	48 c7 c7 57 ae 02 80 	mov    $0xffffffff8002ae57,%rdi
ffffffff8001d240:	e8 7b 5f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                << (uint64_t)((srcIp >> 24) & 0xFF);
ffffffff8001d245:	44 89 ef             	mov    %r13d,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001d248:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001d24d:	c1 ef 18             	shr    $0x18,%edi
ffffffff8001d250:	e8 3b d2 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001d255:	48 89 c7             	mov    %rax,%rdi
ffffffff8001d258:	e8 63 5f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001d25d:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001d264:	e8 57 5f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001d269:	83 2d 34 22 1c 00 01 	subl   $0x1,0x1c2234(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            if (length > sizeof(reply)) {
ffffffff8001d270:	66 81 fb dc 05       	cmp    $0x5dc,%bx
ffffffff8001d275:	0f 87 f1 fe ff ff    	ja     ffffffff8001d16c <_ZN3Net4Icmp16OnPacketReceivedEjPKht+0x7c>
            memcpy(reply, data, length);
ffffffff8001d27b:	0f b7 d3             	movzwl %bx,%edx
ffffffff8001d27e:	48 8d 9d 04 fa ff ff 	lea    -0x5fc(%rbp),%rbx
ffffffff8001d285:	4c 89 e6             	mov    %r12,%rsi
ffffffff8001d288:	48 89 df             	mov    %rbx,%rdi
ffffffff8001d28b:	e8 50 cf ff ff       	call   ffffffff8001a1e0 <memcpy>
            replyHdr->Checksum = Ipv4::Checksum(reply, length);
ffffffff8001d290:	44 89 f6             	mov    %r14d,%esi
ffffffff8001d293:	48 89 df             	mov    %rbx,%rdi
            replyHdr->Type = TYPE_ECHO_REPLY;
ffffffff8001d296:	c7 85 04 fa ff ff 00 	movl   $0x0,-0x5fc(%rbp)
ffffffff8001d29d:	00 00 00 
            replyHdr->Checksum = Ipv4::Checksum(reply, length);
ffffffff8001d2a0:	e8 4b 02 00 00       	call   ffffffff8001d4f0 <_ZN3Net4Ipv48ChecksumEPKvt>
            Ipv4::Send(srcIp, Ipv4::PROTO_ICMP, reply, length);
ffffffff8001d2a5:	44 89 f1             	mov    %r14d,%ecx
ffffffff8001d2a8:	48 89 da             	mov    %rbx,%rdx
ffffffff8001d2ab:	be 01 00 00 00       	mov    $0x1,%esi
ffffffff8001d2b0:	44 89 ef             	mov    %r13d,%edi
            replyHdr->Checksum = Ipv4::Checksum(reply, length);
ffffffff8001d2b3:	66 89 85 06 fa ff ff 	mov    %ax,-0x5fa(%rbp)
            Ipv4::Send(srcIp, Ipv4::PROTO_ICMP, reply, length);
ffffffff8001d2ba:	e8 61 04 00 00       	call   ffffffff8001d720 <_ZN3Net4Ipv44SendEjhPKht>
        } else if (hdr->Type == TYPE_ECHO_REPLY && hdr->Code == 0) {
ffffffff8001d2bf:	e9 a8 fe ff ff       	jmp    ffffffff8001d16c <_ZN3Net4Icmp16OnPacketReceivedEjPKht+0x7c>
ffffffff8001d2c4:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001d2cb:	00 00 00 
ffffffff8001d2ce:	66 90                	xchg   %ax,%ax

ffffffff8001d2d0 <_ZN3Net4Ipv4L10SendDirectEjhPKhS2_t>:
        }
    }

    // Build and send an IP packet over Ethernet (MAC already resolved)
    static bool SendDirect(uint32_t destIp, uint8_t protocol, const uint8_t* destMac,
                           const uint8_t* payload, uint16_t payloadLen) {
ffffffff8001d2d0:	55                   	push   %rbp
        uint8_t packet[Ethernet::MAX_PAYLOAD_SIZE];
        Header* hdr = (Header*)packet;

        hdr->VersionIhl = (4 << 4) | 5; // IPv4, 5 dwords (20 bytes)
ffffffff8001d2d1:	b8 45 00 00 00       	mov    $0x45,%eax
                           const uint8_t* payload, uint16_t payloadLen) {
ffffffff8001d2d6:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001d2d9:	41 57                	push   %r15
ffffffff8001d2db:	45 89 c7             	mov    %r8d,%r15d
ffffffff8001d2de:	41 56                	push   %r14
ffffffff8001d2e0:	41 89 fe             	mov    %edi,%r14d
ffffffff8001d2e3:	41 55                	push   %r13
ffffffff8001d2e5:	49 89 cd             	mov    %rcx,%r13
        hdr->TotalLength = Htons(HEADER_SIZE + payloadLen);
        hdr->Identification = Htons(g_identification++);
        hdr->FlagsFragment = 0;
        hdr->Ttl = DEFAULT_TTL;
        hdr->Protocol = protocol;
        hdr->Checksum = 0;
ffffffff8001d2e8:	31 c9                	xor    %ecx,%ecx
                           const uint8_t* payload, uint16_t payloadLen) {
ffffffff8001d2ea:	41 54                	push   %r12
ffffffff8001d2ec:	49 89 d4             	mov    %rdx,%r12
ffffffff8001d2ef:	53                   	push   %rbx
        hdr->TotalLength = Htons(HEADER_SIZE + payloadLen);
ffffffff8001d2f0:	41 8d 58 14          	lea    0x14(%r8),%ebx
                           const uint8_t* payload, uint16_t payloadLen) {
ffffffff8001d2f4:	48 81 ec e8 05 00 00 	sub    $0x5e8,%rsp
        hdr->VersionIhl = (4 << 4) | 5; // IPv4, 5 dwords (20 bytes)
ffffffff8001d2fb:	66 89 85 f0 f9 ff ff 	mov    %ax,-0x610(%rbp)
ffffffff8001d302:	89 d8                	mov    %ebx,%eax
ffffffff8001d304:	66 c1 c0 08          	rol    $0x8,%ax
        hdr->Checksum = 0;
ffffffff8001d308:	66 89 8d fa f9 ff ff 	mov    %cx,-0x606(%rbp)
ffffffff8001d30f:	66 89 85 f2 f9 ff ff 	mov    %ax,-0x60e(%rbp)
        hdr->Identification = Htons(g_identification++);
ffffffff8001d316:	0f b7 05 a3 30 13 00 	movzwl 0x1330a3(%rip),%eax        # ffffffff801503c0 <_ZN3Net4Ipv4L16g_identificationE>
        hdr->Ttl = DEFAULT_TTL;
ffffffff8001d31d:	c6 85 f8 f9 ff ff 40 	movb   $0x40,-0x608(%rbp)
        hdr->Identification = Htons(g_identification++);
ffffffff8001d324:	8d 50 01             	lea    0x1(%rax),%edx
ffffffff8001d327:	66 c1 c0 08          	rol    $0x8,%ax
        hdr->Protocol = protocol;
ffffffff8001d32b:	40 88 b5 f9 f9 ff ff 	mov    %sil,-0x607(%rbp)
        hdr->Identification = Htons(g_identification++);
ffffffff8001d332:	66 89 15 87 30 13 00 	mov    %dx,0x133087(%rip)        # ffffffff801503c0 <_ZN3Net4Ipv4L16g_identificationE>
        hdr->FlagsFragment = 0;
ffffffff8001d339:	31 d2                	xor    %edx,%edx
ffffffff8001d33b:	66 89 85 f4 f9 ff ff 	mov    %ax,-0x60c(%rbp)
ffffffff8001d342:	66 89 95 f6 f9 ff ff 	mov    %dx,-0x60a(%rbp)
        hdr->SrcIp = GetIpAddress();
ffffffff8001d349:	e8 b2 06 00 00       	call   ffffffff8001da00 <_ZN3Net12GetIpAddressEv>
        hdr->DstIp = destIp;
ffffffff8001d34e:	44 89 b5 00 fa ff ff 	mov    %r14d,-0x600(%rbp)
        uint32_t sum = 0;
ffffffff8001d355:	31 c9                	xor    %ecx,%ecx
        const uint16_t* ptr = (const uint16_t*)data;
ffffffff8001d357:	4c 8d b5 f0 f9 ff ff 	lea    -0x610(%rbp),%r14
        hdr->SrcIp = GetIpAddress();
ffffffff8001d35e:	89 85 fc f9 ff ff    	mov    %eax,-0x604(%rbp)
        while (length > 1) {
ffffffff8001d364:	48 8d bd 04 fa ff ff 	lea    -0x5fc(%rbp),%rdi
        const uint16_t* ptr = (const uint16_t*)data;
ffffffff8001d36b:	4c 89 f0             	mov    %r14,%rax
ffffffff8001d36e:	66 90                	xchg   %ax,%ax
            sum += *ptr++;
ffffffff8001d370:	0f b7 30             	movzwl (%rax),%esi
ffffffff8001d373:	48 83 c0 02          	add    $0x2,%rax
ffffffff8001d377:	01 f1                	add    %esi,%ecx
        while (length > 1) {
ffffffff8001d379:	48 39 f8             	cmp    %rdi,%rax
ffffffff8001d37c:	75 f2                	jne    ffffffff8001d370 <_ZN3Net4Ipv4L10SendDirectEjhPKhS2_t+0xa0>
        while (sum >> 16) {
ffffffff8001d37e:	89 c8                	mov    %ecx,%eax
ffffffff8001d380:	c1 e8 10             	shr    $0x10,%eax
ffffffff8001d383:	74 13                	je     ffffffff8001d398 <_ZN3Net4Ipv4L10SendDirectEjhPKhS2_t+0xc8>
            sum = (sum & 0xFFFF) + (sum >> 16);
ffffffff8001d385:	0f b7 c9             	movzwl %cx,%ecx
ffffffff8001d388:	01 c1                	add    %eax,%ecx
ffffffff8001d38a:	0f b7 c1             	movzwl %cx,%eax
ffffffff8001d38d:	89 ca                	mov    %ecx,%edx
ffffffff8001d38f:	83 c0 01             	add    $0x1,%eax
ffffffff8001d392:	c1 ea 10             	shr    $0x10,%edx
ffffffff8001d395:	0f 45 c8             	cmovne %eax,%ecx
        return (uint16_t)(~sum);
ffffffff8001d398:	f7 d1                	not    %ecx

        hdr->Checksum = Checksum(hdr, HEADER_SIZE);

        memcpy(packet + HEADER_SIZE, payload, payloadLen);
ffffffff8001d39a:	41 0f b7 d7          	movzwl %r15w,%edx
ffffffff8001d39e:	4c 89 ee             	mov    %r13,%rsi
        return (uint16_t)(~sum);
ffffffff8001d3a1:	66 89 8d fa f9 ff ff 	mov    %cx,-0x606(%rbp)
        memcpy(packet + HEADER_SIZE, payload, payloadLen);
ffffffff8001d3a8:	e8 33 ce ff ff       	call   ffffffff8001a1e0 <memcpy>

        return Ethernet::Send(destMac, Ethernet::ETHERTYPE_IPV4, packet, HEADER_SIZE + payloadLen);
ffffffff8001d3ad:	0f b7 cb             	movzwl %bx,%ecx
ffffffff8001d3b0:	4c 89 f2             	mov    %r14,%rdx
ffffffff8001d3b3:	4c 89 e7             	mov    %r12,%rdi
ffffffff8001d3b6:	be 00 08 00 00       	mov    $0x800,%esi
ffffffff8001d3bb:	e8 e0 fa ff ff       	call   ffffffff8001cea0 <_ZN3Net8Ethernet4SendEPKhtS2_t>
    }
ffffffff8001d3c0:	48 81 c4 e8 05 00 00 	add    $0x5e8,%rsp
ffffffff8001d3c7:	5b                   	pop    %rbx
ffffffff8001d3c8:	41 5c                	pop    %r12
ffffffff8001d3ca:	41 5d                	pop    %r13
ffffffff8001d3cc:	41 5e                	pop    %r14
ffffffff8001d3ce:	41 5f                	pop    %r15
ffffffff8001d3d0:	5d                   	pop    %rbp
ffffffff8001d3d1:	c3                   	ret
ffffffff8001d3d2:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001d3d9:	00 00 00 
ffffffff8001d3dc:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8001d3e0 <_ZN3Net4Ipv410InitializeEv>:
    void Initialize() {
ffffffff8001d3e0:	55                   	push   %rbp
        g_identification = 0;
ffffffff8001d3e1:	31 c0                	xor    %eax,%eax
            Print(string);
ffffffff8001d3e3:	48 c7 c7 7c bb 02 80 	mov    $0xffffffff8002bb7c,%rdi
ffffffff8001d3ea:	66 89 05 cf 2f 13 00 	mov    %ax,0x132fcf(%rip)        # ffffffff801503c0 <_ZN3Net4Ipv4L16g_identificationE>
            g_kernelLogDepth++;
ffffffff8001d3f1:	83 05 ac 20 1c 00 01 	addl   $0x1,0x1c20ac(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    void Initialize() {
ffffffff8001d3f8:	48 89 e5             	mov    %rsp,%rbp
            Print(string);
ffffffff8001d3fb:	e8 c0 5d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d400:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001d407:	e8 b4 5d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d40c:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001d413:	e8 a8 5d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d418:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001d41f:	e8 9c 5d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d424:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001d42b:	e8 90 5d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d430:	48 c7 c7 d4 bb 02 80 	mov    $0xffffffff8002bbd4,%rdi
ffffffff8001d437:	e8 84 5d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (uint64_t)(GetIpAddress() & 0xFF) << "."
ffffffff8001d43c:	e8 bf 05 00 00       	call   ffffffff8001da00 <_ZN3Net12GetIpAddressEv>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001d441:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001d446:	0f b6 f8             	movzbl %al,%edi
ffffffff8001d449:	e8 42 d0 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001d44e:	48 89 c7             	mov    %rax,%rdi
ffffffff8001d451:	e8 6a 5d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001d456:	48 c7 c7 57 ae 02 80 	mov    $0xffffffff8002ae57,%rdi
ffffffff8001d45d:	e8 5e 5d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (uint64_t)((GetIpAddress() >> 8) & 0xFF) << "."
ffffffff8001d462:	e8 99 05 00 00       	call   ffffffff8001da00 <_ZN3Net12GetIpAddressEv>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001d467:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001d46c:	0f b6 fc             	movzbl %ah,%edi
ffffffff8001d46f:	e8 1c d0 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001d474:	48 89 c7             	mov    %rax,%rdi
ffffffff8001d477:	e8 44 5d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001d47c:	48 c7 c7 57 ae 02 80 	mov    $0xffffffff8002ae57,%rdi
ffffffff8001d483:	e8 38 5d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (uint64_t)((GetIpAddress() >> 16) & 0xFF) << "."
ffffffff8001d488:	e8 73 05 00 00       	call   ffffffff8001da00 <_ZN3Net12GetIpAddressEv>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001d48d:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001d492:	c1 e8 10             	shr    $0x10,%eax
ffffffff8001d495:	0f b6 f8             	movzbl %al,%edi
ffffffff8001d498:	e8 f3 cf ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001d49d:	48 89 c7             	mov    %rax,%rdi
ffffffff8001d4a0:	e8 1b 5d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001d4a5:	48 c7 c7 57 ae 02 80 	mov    $0xffffffff8002ae57,%rdi
ffffffff8001d4ac:	e8 0f 5d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << (uint64_t)((GetIpAddress() >> 24) & 0xFF);
ffffffff8001d4b1:	e8 4a 05 00 00       	call   ffffffff8001da00 <_ZN3Net12GetIpAddressEv>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001d4b6:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001d4bb:	c1 e8 18             	shr    $0x18,%eax
ffffffff8001d4be:	89 c7                	mov    %eax,%edi
ffffffff8001d4c0:	e8 cb cf ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001d4c5:	48 89 c7             	mov    %rax,%rdi
ffffffff8001d4c8:	e8 f3 5c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001d4cd:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001d4d4:	e8 e7 5c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001d4d9:	83 2d c4 1f 1c 00 01 	subl   $0x1,0x1c1fc4(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff8001d4e0:	5d                   	pop    %rbp
ffffffff8001d4e1:	c3                   	ret
ffffffff8001d4e2:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001d4e9:	00 00 00 
ffffffff8001d4ec:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8001d4f0 <_ZN3Net4Ipv48ChecksumEPKvt>:
        while (length > 1) {
ffffffff8001d4f0:	66 83 fe 01          	cmp    $0x1,%si
ffffffff8001d4f4:	76 5a                	jbe    ffffffff8001d550 <_ZN3Net4Ipv48ChecksumEPKvt+0x60>
ffffffff8001d4f6:	44 8d 4e fe          	lea    -0x2(%rsi),%r9d
        const uint16_t* ptr = (const uint16_t*)data;
ffffffff8001d4fa:	48 89 f8             	mov    %rdi,%rax
        uint32_t sum = 0;
ffffffff8001d4fd:	31 d2                	xor    %edx,%edx
ffffffff8001d4ff:	66 41 d1 e9          	shr    $1,%r9w
ffffffff8001d503:	45 0f b7 c9          	movzwl %r9w,%r9d
ffffffff8001d507:	4e 8d 44 4f 02       	lea    0x2(%rdi,%r9,2),%r8
ffffffff8001d50c:	0f 1f 40 00          	nopl   0x0(%rax)
            sum += *ptr++;
ffffffff8001d510:	0f b7 08             	movzwl (%rax),%ecx
ffffffff8001d513:	48 83 c0 02          	add    $0x2,%rax
ffffffff8001d517:	01 ca                	add    %ecx,%edx
        while (length > 1) {
ffffffff8001d519:	49 39 c0             	cmp    %rax,%r8
ffffffff8001d51c:	75 f2                	jne    ffffffff8001d510 <_ZN3Net4Ipv48ChecksumEPKvt+0x20>
        if (length == 1) {
ffffffff8001d51e:	83 e6 01             	and    $0x1,%esi
ffffffff8001d521:	74 08                	je     ffffffff8001d52b <_ZN3Net4Ipv48ChecksumEPKvt+0x3b>
            sum += *(const uint8_t*)ptr;
ffffffff8001d523:	42 0f b6 44 4f 02    	movzbl 0x2(%rdi,%r9,2),%eax
ffffffff8001d529:	01 c2                	add    %eax,%edx
        while (sum >> 16) {
ffffffff8001d52b:	89 d0                	mov    %edx,%eax
ffffffff8001d52d:	c1 e8 10             	shr    $0x10,%eax
ffffffff8001d530:	74 13                	je     ffffffff8001d545 <_ZN3Net4Ipv48ChecksumEPKvt+0x55>
            sum = (sum & 0xFFFF) + (sum >> 16);
ffffffff8001d532:	0f b7 d2             	movzwl %dx,%edx
ffffffff8001d535:	01 c2                	add    %eax,%edx
ffffffff8001d537:	0f b7 c2             	movzwl %dx,%eax
ffffffff8001d53a:	89 d7                	mov    %edx,%edi
ffffffff8001d53c:	83 c0 01             	add    $0x1,%eax
ffffffff8001d53f:	c1 ef 10             	shr    $0x10,%edi
ffffffff8001d542:	0f 45 d0             	cmovne %eax,%edx
        return (uint16_t)(~sum);
ffffffff8001d545:	89 d0                	mov    %edx,%eax
ffffffff8001d547:	f7 d0                	not    %eax
    }
ffffffff8001d549:	c3                   	ret
ffffffff8001d54a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        if (length == 1) {
ffffffff8001d550:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
ffffffff8001d555:	75 f2                	jne    ffffffff8001d549 <_ZN3Net4Ipv48ChecksumEPKvt+0x59>
        return (uint16_t)(~sum);
ffffffff8001d557:	0f b6 17             	movzbl (%rdi),%edx
ffffffff8001d55a:	89 d0                	mov    %edx,%eax
ffffffff8001d55c:	f7 d0                	not    %eax
ffffffff8001d55e:	c3                   	ret
ffffffff8001d55f:	90                   	nop

ffffffff8001d560 <_ZN3Net4Ipv420PseudoHeaderChecksumEjjhtPKvt>:
ffffffff8001d560:	66 c1 c1 08          	rol    $0x8,%cx
        sum += (dstIp & 0xFFFF);
ffffffff8001d564:	0f b7 c6             	movzwl %si,%eax
        sum += (dstIp >> 16);
ffffffff8001d567:	c1 ee 10             	shr    $0x10,%esi
                                   uint16_t length, const void* data, uint16_t dataLen) {
ffffffff8001d56a:	45 89 ca             	mov    %r9d,%r10d
        sum += Htons(length);
ffffffff8001d56d:	0f b7 c9             	movzwl %cx,%ecx
ffffffff8001d570:	01 f0                	add    %esi,%eax
        sum += Htons(protocol);
ffffffff8001d572:	c1 e2 08             	shl    $0x8,%edx
        sum += Htons(length);
ffffffff8001d575:	01 c8                	add    %ecx,%eax
        sum += (srcIp & 0xFFFF);
ffffffff8001d577:	0f b7 cf             	movzwl %di,%ecx
        sum += (srcIp >> 16);
ffffffff8001d57a:	c1 ef 10             	shr    $0x10,%edi
        sum += Htons(protocol);
ffffffff8001d57d:	0f b7 d2             	movzwl %dx,%edx
        sum += Htons(length);
ffffffff8001d580:	01 c8                	add    %ecx,%eax
ffffffff8001d582:	01 f8                	add    %edi,%eax
ffffffff8001d584:	01 d0                	add    %edx,%eax
        while (remaining > 1) {
ffffffff8001d586:	66 41 83 f9 01       	cmp    $0x1,%r9w
ffffffff8001d58b:	76 2d                	jbe    ffffffff8001d5ba <_ZN3Net4Ipv420PseudoHeaderChecksumEjjhtPKvt+0x5a>
ffffffff8001d58d:	41 8d 79 fe          	lea    -0x2(%r9),%edi
        const uint16_t* ptr = (const uint16_t*)data;
ffffffff8001d591:	4c 89 c2             	mov    %r8,%rdx
ffffffff8001d594:	66 d1 ef             	shr    $1,%di
ffffffff8001d597:	0f b7 ff             	movzwl %di,%edi
ffffffff8001d59a:	49 8d 74 78 02       	lea    0x2(%r8,%rdi,2),%rsi
ffffffff8001d59f:	90                   	nop
            sum += *ptr++;
ffffffff8001d5a0:	0f b7 0a             	movzwl (%rdx),%ecx
ffffffff8001d5a3:	48 83 c2 02          	add    $0x2,%rdx
ffffffff8001d5a7:	01 c8                	add    %ecx,%eax
        while (remaining > 1) {
ffffffff8001d5a9:	48 39 f2             	cmp    %rsi,%rdx
ffffffff8001d5ac:	75 f2                	jne    ffffffff8001d5a0 <_ZN3Net4Ipv420PseudoHeaderChecksumEjjhtPKvt+0x40>
ffffffff8001d5ae:	45 89 ca             	mov    %r9d,%r10d
ffffffff8001d5b1:	4d 8d 44 78 02       	lea    0x2(%r8,%rdi,2),%r8
ffffffff8001d5b6:	41 83 e2 01          	and    $0x1,%r10d
        if (remaining == 1) {
ffffffff8001d5ba:	66 41 83 fa 01       	cmp    $0x1,%r10w
ffffffff8001d5bf:	75 06                	jne    ffffffff8001d5c7 <_ZN3Net4Ipv420PseudoHeaderChecksumEjjhtPKvt+0x67>
            sum += *(const uint8_t*)ptr;
ffffffff8001d5c1:	41 0f b6 10          	movzbl (%r8),%edx
ffffffff8001d5c5:	01 d0                	add    %edx,%eax
        while (sum >> 16) {
ffffffff8001d5c7:	89 c2                	mov    %eax,%edx
ffffffff8001d5c9:	c1 ea 10             	shr    $0x10,%edx
ffffffff8001d5cc:	74 13                	je     ffffffff8001d5e1 <_ZN3Net4Ipv420PseudoHeaderChecksumEjjhtPKvt+0x81>
            sum = (sum & 0xFFFF) + (sum >> 16);
ffffffff8001d5ce:	0f b7 c0             	movzwl %ax,%eax
ffffffff8001d5d1:	01 d0                	add    %edx,%eax
ffffffff8001d5d3:	0f b7 d0             	movzwl %ax,%edx
ffffffff8001d5d6:	89 c7                	mov    %eax,%edi
ffffffff8001d5d8:	83 c2 01             	add    $0x1,%edx
ffffffff8001d5db:	c1 ef 10             	shr    $0x10,%edi
ffffffff8001d5de:	0f 45 c2             	cmovne %edx,%eax
        return (uint16_t)(~sum);
ffffffff8001d5e1:	f7 d0                	not    %eax
    }
ffffffff8001d5e3:	c3                   	ret
ffffffff8001d5e4:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001d5eb:	00 00 00 
ffffffff8001d5ee:	66 90                	xchg   %ax,%ax

ffffffff8001d5f0 <_ZN3Net4Ipv416OnPacketReceivedEPKht>:
        if (length < HEADER_SIZE) {
ffffffff8001d5f0:	66 83 fe 13          	cmp    $0x13,%si
ffffffff8001d5f4:	0f 86 96 00 00 00    	jbe    ffffffff8001d690 <_ZN3Net4Ipv416OnPacketReceivedEPKht+0xa0>
    void OnPacketReceived(const uint8_t* data, uint16_t length) {
ffffffff8001d5fa:	55                   	push   %rbp
ffffffff8001d5fb:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001d5fe:	41 56                	push   %r14
ffffffff8001d600:	41 55                	push   %r13
ffffffff8001d602:	41 54                	push   %r12
ffffffff8001d604:	49 89 fc             	mov    %rdi,%r12
ffffffff8001d607:	53                   	push   %rbx
        uint8_t version = (hdr->VersionIhl >> 4) & 0xF;
ffffffff8001d608:	0f b6 07             	movzbl (%rdi),%eax
ffffffff8001d60b:	89 c1                	mov    %eax,%ecx
ffffffff8001d60d:	c0 e9 04             	shr    $0x4,%cl
        if (version != 4) {
ffffffff8001d610:	80 f9 04             	cmp    $0x4,%cl
ffffffff8001d613:	75 6c                	jne    ffffffff8001d681 <_ZN3Net4Ipv416OnPacketReceivedEPKht+0x91>
        uint8_t ihl = (hdr->VersionIhl & 0xF) * 4;
ffffffff8001d615:	83 e0 0f             	and    $0xf,%eax
ffffffff8001d618:	8d 1c 85 00 00 00 00 	lea    0x0(,%rax,4),%ebx
        if (ihl < HEADER_SIZE || ihl > length) {
ffffffff8001d61f:	80 fb 13             	cmp    $0x13,%bl
ffffffff8001d622:	76 5d                	jbe    ffffffff8001d681 <_ZN3Net4Ipv416OnPacketReceivedEPKht+0x91>
ffffffff8001d624:	0f b6 c3             	movzbl %bl,%eax
ffffffff8001d627:	0f b7 ce             	movzwl %si,%ecx
ffffffff8001d62a:	89 f2                	mov    %esi,%edx
ffffffff8001d62c:	39 c8                	cmp    %ecx,%eax
ffffffff8001d62e:	7f 51                	jg     ffffffff8001d681 <_ZN3Net4Ipv416OnPacketReceivedEPKht+0x91>
        while (length > 1) {
ffffffff8001d630:	0f b6 fb             	movzbl %bl,%edi
ffffffff8001d633:	44 0f b6 eb          	movzbl %bl,%r13d
        const uint16_t* ptr = (const uint16_t*)data;
ffffffff8001d637:	4c 89 e0             	mov    %r12,%rax
        uint32_t sum = 0;
ffffffff8001d63a:	31 c9                	xor    %ecx,%ecx
ffffffff8001d63c:	4c 01 e7             	add    %r12,%rdi
ffffffff8001d63f:	90                   	nop
            sum += *ptr++;
ffffffff8001d640:	0f b7 30             	movzwl (%rax),%esi
ffffffff8001d643:	48 83 c0 02          	add    $0x2,%rax
ffffffff8001d647:	01 f1                	add    %esi,%ecx
        while (length > 1) {
ffffffff8001d649:	48 39 f8             	cmp    %rdi,%rax
ffffffff8001d64c:	75 f2                	jne    ffffffff8001d640 <_ZN3Net4Ipv416OnPacketReceivedEPKht+0x50>
        while (sum >> 16) {
ffffffff8001d64e:	89 c8                	mov    %ecx,%eax
ffffffff8001d650:	c1 e8 10             	shr    $0x10,%eax
ffffffff8001d653:	74 13                	je     ffffffff8001d668 <_ZN3Net4Ipv416OnPacketReceivedEPKht+0x78>
            sum = (sum & 0xFFFF) + (sum >> 16);
ffffffff8001d655:	0f b7 c9             	movzwl %cx,%ecx
ffffffff8001d658:	01 c1                	add    %eax,%ecx
ffffffff8001d65a:	0f b7 c1             	movzwl %cx,%eax
ffffffff8001d65d:	89 cf                	mov    %ecx,%edi
ffffffff8001d65f:	83 c0 01             	add    $0x1,%eax
ffffffff8001d662:	c1 ef 10             	shr    $0x10,%edi
ffffffff8001d665:	0f 45 c8             	cmovne %eax,%ecx
        if (Checksum(data, ihl) != 0) {
ffffffff8001d668:	81 f9 ff ff 00 00    	cmp    $0xffff,%ecx
ffffffff8001d66e:	75 11                	jne    ffffffff8001d681 <_ZN3Net4Ipv416OnPacketReceivedEPKht+0x91>
ffffffff8001d670:	45 0f b7 74 24 02    	movzwl 0x2(%r12),%r14d
ffffffff8001d676:	66 41 c1 c6 08       	rol    $0x8,%r14w
        if (totalLen > length) {
ffffffff8001d67b:	66 44 39 f2          	cmp    %r14w,%dx
ffffffff8001d67f:	73 17                	jae    ffffffff8001d698 <_ZN3Net4Ipv416OnPacketReceivedEPKht+0xa8>
    }
ffffffff8001d681:	5b                   	pop    %rbx
ffffffff8001d682:	41 5c                	pop    %r12
ffffffff8001d684:	41 5d                	pop    %r13
ffffffff8001d686:	41 5e                	pop    %r14
ffffffff8001d688:	5d                   	pop    %rbp
ffffffff8001d689:	c3                   	ret
ffffffff8001d68a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff8001d690:	c3                   	ret
ffffffff8001d691:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        uint32_t ourIp = GetIpAddress();
ffffffff8001d698:	e8 63 03 00 00       	call   ffffffff8001da00 <_ZN3Net12GetIpAddressEv>
ffffffff8001d69d:	89 c2                	mov    %eax,%edx
        if (hdr->DstIp != ourIp && hdr->DstIp != 0xFFFFFFFF) {
ffffffff8001d69f:	41 8b 44 24 10       	mov    0x10(%r12),%eax
ffffffff8001d6a4:	39 d0                	cmp    %edx,%eax
ffffffff8001d6a6:	74 05                	je     ffffffff8001d6ad <_ZN3Net4Ipv416OnPacketReceivedEPKht+0xbd>
ffffffff8001d6a8:	83 f8 ff             	cmp    $0xffffffff,%eax
ffffffff8001d6ab:	75 d4                	jne    ffffffff8001d681 <_ZN3Net4Ipv416OnPacketReceivedEPKht+0x91>
        switch (hdr->Protocol) {
ffffffff8001d6ad:	41 0f b6 54 24 09    	movzbl 0x9(%r12),%edx
        const uint8_t* payload = data + ihl;
ffffffff8001d6b3:	0f b6 db             	movzbl %bl,%ebx
        uint16_t payloadLen = totalLen - ihl;
ffffffff8001d6b6:	45 29 ee             	sub    %r13d,%r14d
        const uint8_t* payload = data + ihl;
ffffffff8001d6b9:	49 8d 34 1c          	lea    (%r12,%rbx,1),%rsi
        switch (hdr->Protocol) {
ffffffff8001d6bd:	80 fa 06             	cmp    $0x6,%dl
ffffffff8001d6c0:	74 20                	je     ffffffff8001d6e2 <_ZN3Net4Ipv416OnPacketReceivedEPKht+0xf2>
ffffffff8001d6c2:	80 fa 11             	cmp    $0x11,%dl
ffffffff8001d6c5:	74 36                	je     ffffffff8001d6fd <_ZN3Net4Ipv416OnPacketReceivedEPKht+0x10d>
ffffffff8001d6c7:	80 fa 01             	cmp    $0x1,%dl
ffffffff8001d6ca:	75 b5                	jne    ffffffff8001d681 <_ZN3Net4Ipv416OnPacketReceivedEPKht+0x91>
                Icmp::OnPacketReceived(hdr->SrcIp, payload, payloadLen);
ffffffff8001d6cc:	41 8b 7c 24 0c       	mov    0xc(%r12),%edi
    }
ffffffff8001d6d1:	5b                   	pop    %rbx
                Icmp::OnPacketReceived(hdr->SrcIp, payload, payloadLen);
ffffffff8001d6d2:	41 0f b7 d6          	movzwl %r14w,%edx
    }
ffffffff8001d6d6:	41 5c                	pop    %r12
ffffffff8001d6d8:	41 5d                	pop    %r13
ffffffff8001d6da:	41 5e                	pop    %r14
ffffffff8001d6dc:	5d                   	pop    %rbp
                Icmp::OnPacketReceived(hdr->SrcIp, payload, payloadLen);
ffffffff8001d6dd:	e9 0e fa ff ff       	jmp    ffffffff8001d0f0 <_ZN3Net4Icmp16OnPacketReceivedEjPKht>
                Tcp::OnPacketReceived(hdr->SrcIp, hdr->DstIp, payload, payloadLen);
ffffffff8001d6e2:	41 8b 7c 24 0c       	mov    0xc(%r12),%edi
    }
ffffffff8001d6e7:	5b                   	pop    %rbx
                Tcp::OnPacketReceived(hdr->SrcIp, hdr->DstIp, payload, payloadLen);
ffffffff8001d6e8:	41 0f b7 ce          	movzwl %r14w,%ecx
ffffffff8001d6ec:	48 89 f2             	mov    %rsi,%rdx
    }
ffffffff8001d6ef:	41 5c                	pop    %r12
                Tcp::OnPacketReceived(hdr->SrcIp, hdr->DstIp, payload, payloadLen);
ffffffff8001d6f1:	89 c6                	mov    %eax,%esi
    }
ffffffff8001d6f3:	41 5d                	pop    %r13
ffffffff8001d6f5:	41 5e                	pop    %r14
ffffffff8001d6f7:	5d                   	pop    %rbp
                Tcp::OnPacketReceived(hdr->SrcIp, hdr->DstIp, payload, payloadLen);
ffffffff8001d6f8:	e9 e3 0f 00 00       	jmp    ffffffff8001e6e0 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht>
                Udp::OnPacketReceived(hdr->SrcIp, hdr->DstIp, payload, payloadLen);
ffffffff8001d6fd:	41 8b 7c 24 0c       	mov    0xc(%r12),%edi
    }
ffffffff8001d702:	5b                   	pop    %rbx
                Udp::OnPacketReceived(hdr->SrcIp, hdr->DstIp, payload, payloadLen);
ffffffff8001d703:	41 0f b7 ce          	movzwl %r14w,%ecx
ffffffff8001d707:	48 89 f2             	mov    %rsi,%rdx
    }
ffffffff8001d70a:	41 5c                	pop    %r12
                Udp::OnPacketReceived(hdr->SrcIp, hdr->DstIp, payload, payloadLen);
ffffffff8001d70c:	89 c6                	mov    %eax,%esi
    }
ffffffff8001d70e:	41 5d                	pop    %r13
ffffffff8001d710:	41 5e                	pop    %r14
ffffffff8001d712:	5d                   	pop    %rbp
                Udp::OnPacketReceived(hdr->SrcIp, hdr->DstIp, payload, payloadLen);
ffffffff8001d713:	e9 68 20 00 00       	jmp    ffffffff8001f780 <_ZN3Net3Udp16OnPacketReceivedEjjPKht>
ffffffff8001d718:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001d71f:	00 

ffffffff8001d720 <_ZN3Net4Ipv44SendEjhPKht>:

    bool Send(uint32_t destIp, uint8_t protocol, const uint8_t* payload, uint16_t payloadLen) {
        if (payloadLen > (Ethernet::MAX_PAYLOAD_SIZE - HEADER_SIZE)) {
ffffffff8001d720:	66 81 f9 cc 05       	cmp    $0x5cc,%cx
ffffffff8001d725:	76 09                	jbe    ffffffff8001d730 <_ZN3Net4Ipv44SendEjhPKht+0x10>
            return false;
ffffffff8001d727:	31 c0                	xor    %eax,%eax
            }
        }

        // Queue full, drop the packet
        return false;
    }
ffffffff8001d729:	c3                   	ret
ffffffff8001d72a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
    bool Send(uint32_t destIp, uint8_t protocol, const uint8_t* payload, uint16_t payloadLen) {
ffffffff8001d730:	55                   	push   %rbp
ffffffff8001d731:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001d734:	41 57                	push   %r15
ffffffff8001d736:	41 89 f7             	mov    %esi,%r15d
ffffffff8001d739:	41 56                	push   %r14
        if (Arp::Resolve(nextHop, destMac)) {
ffffffff8001d73b:	4c 8d 75 ca          	lea    -0x36(%rbp),%r14
    bool Send(uint32_t destIp, uint8_t protocol, const uint8_t* payload, uint16_t payloadLen) {
ffffffff8001d73f:	41 55                	push   %r13
ffffffff8001d741:	41 89 fd             	mov    %edi,%r13d
ffffffff8001d744:	41 54                	push   %r12
ffffffff8001d746:	49 89 d4             	mov    %rdx,%r12
ffffffff8001d749:	53                   	push   %rbx
ffffffff8001d74a:	89 cb                	mov    %ecx,%ebx
ffffffff8001d74c:	48 83 ec 18          	sub    $0x18,%rsp
        uint32_t nextHop = GetNextHop(destIp);
ffffffff8001d750:	e8 2b 03 00 00       	call   ffffffff8001da80 <_ZN3Net10GetNextHopEj>
        if (Arp::Resolve(nextHop, destMac)) {
ffffffff8001d755:	4c 89 f6             	mov    %r14,%rsi
        uint32_t nextHop = GetNextHop(destIp);
ffffffff8001d758:	89 c7                	mov    %eax,%edi
        if (Arp::Resolve(nextHop, destMac)) {
ffffffff8001d75a:	e8 81 ee ff ff       	call   ffffffff8001c5e0 <_ZN3Net3Arp7ResolveEjPh>
ffffffff8001d75f:	48 c7 c1 d4 da 14 80 	mov    $0xffffffff8014dad4,%rcx
ffffffff8001d766:	89 c2                	mov    %eax,%edx
        for (uint32_t i = 0; i < PENDING_QUEUE_SIZE; i++) {
ffffffff8001d768:	31 c0                	xor    %eax,%eax
        if (Arp::Resolve(nextHop, destMac)) {
ffffffff8001d76a:	84 d2                	test   %dl,%dl
ffffffff8001d76c:	75 3a                	jne    ffffffff8001d7a8 <_ZN3Net4Ipv44SendEjhPKht+0x88>
ffffffff8001d76e:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001d775:	00 00 00 00 
ffffffff8001d779:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            if (!g_pendingQueue[i].Active) {
ffffffff8001d780:	80 39 00             	cmpb   $0x0,(%rcx)
ffffffff8001d783:	74 4b                	je     ffffffff8001d7d0 <_ZN3Net4Ipv44SendEjhPKht+0xb0>
        for (uint32_t i = 0; i < PENDING_QUEUE_SIZE; i++) {
ffffffff8001d785:	83 c0 01             	add    $0x1,%eax
ffffffff8001d788:	48 81 c1 d8 05 00 00 	add    $0x5d8,%rcx
ffffffff8001d78f:	83 f8 08             	cmp    $0x8,%eax
ffffffff8001d792:	75 ec                	jne    ffffffff8001d780 <_ZN3Net4Ipv44SendEjhPKht+0x60>
    }
ffffffff8001d794:	48 83 c4 18          	add    $0x18,%rsp
            return false;
ffffffff8001d798:	31 c0                	xor    %eax,%eax
    }
ffffffff8001d79a:	5b                   	pop    %rbx
ffffffff8001d79b:	41 5c                	pop    %r12
ffffffff8001d79d:	41 5d                	pop    %r13
ffffffff8001d79f:	41 5e                	pop    %r14
ffffffff8001d7a1:	41 5f                	pop    %r15
ffffffff8001d7a3:	5d                   	pop    %rbp
ffffffff8001d7a4:	c3                   	ret
ffffffff8001d7a5:	0f 1f 00             	nopl   (%rax)
            return SendDirect(destIp, protocol, destMac, payload, payloadLen);
ffffffff8001d7a8:	41 0f b6 f7          	movzbl %r15b,%esi
ffffffff8001d7ac:	44 0f b7 c3          	movzwl %bx,%r8d
ffffffff8001d7b0:	4c 89 e1             	mov    %r12,%rcx
ffffffff8001d7b3:	4c 89 f2             	mov    %r14,%rdx
ffffffff8001d7b6:	44 89 ef             	mov    %r13d,%edi
ffffffff8001d7b9:	e8 12 fb ff ff       	call   ffffffff8001d2d0 <_ZN3Net4Ipv4L10SendDirectEjhPKhS2_t>
    }
ffffffff8001d7be:	48 83 c4 18          	add    $0x18,%rsp
ffffffff8001d7c2:	5b                   	pop    %rbx
ffffffff8001d7c3:	41 5c                	pop    %r12
ffffffff8001d7c5:	41 5d                	pop    %r13
ffffffff8001d7c7:	41 5e                	pop    %r14
ffffffff8001d7c9:	41 5f                	pop    %r15
ffffffff8001d7cb:	5d                   	pop    %rbp
ffffffff8001d7cc:	c3                   	ret
ffffffff8001d7cd:	0f 1f 00             	nopl   (%rax)
                g_pendingQueue[i].DestIp = destIp;
ffffffff8001d7d0:	48 69 c0 d8 05 00 00 	imul   $0x5d8,%rax,%rax
                memcpy(g_pendingQueue[i].Data, payload, payloadLen);
ffffffff8001d7d7:	0f b7 d3             	movzwl %bx,%edx
ffffffff8001d7da:	4c 89 e6             	mov    %r12,%rsi
                g_pendingQueue[i].DestIp = destIp;
ffffffff8001d7dd:	4c 8d b0 00 d5 14 80 	lea    -0x7feb2b00(%rax),%r14
                memcpy(g_pendingQueue[i].Data, payload, payloadLen);
ffffffff8001d7e4:	48 8d b8 05 d5 14 80 	lea    -0x7feb2afb(%rax),%rdi
                g_pendingQueue[i].DestIp = destIp;
ffffffff8001d7eb:	44 89 a8 00 d5 14 80 	mov    %r13d,-0x7feb2b00(%rax)
                g_pendingQueue[i].Protocol = protocol;
ffffffff8001d7f2:	44 88 b8 04 d5 14 80 	mov    %r15b,-0x7feb2afc(%rax)
                g_pendingQueue[i].Length = payloadLen;
ffffffff8001d7f9:	66 89 98 d2 da 14 80 	mov    %bx,-0x7feb252e(%rax)
                memcpy(g_pendingQueue[i].Data, payload, payloadLen);
ffffffff8001d800:	e8 db c9 ff ff       	call   ffffffff8001a1e0 <memcpy>
                g_pendingQueue[i].Active = true;
ffffffff8001d805:	41 c6 86 d4 05 00 00 	movb   $0x1,0x5d4(%r14)
ffffffff8001d80c:	01 
    }
ffffffff8001d80d:	48 83 c4 18          	add    $0x18,%rsp
                return true;
ffffffff8001d811:	b8 01 00 00 00       	mov    $0x1,%eax
    }
ffffffff8001d816:	5b                   	pop    %rbx
ffffffff8001d817:	41 5c                	pop    %r12
ffffffff8001d819:	41 5d                	pop    %r13
ffffffff8001d81b:	41 5e                	pop    %r14
ffffffff8001d81d:	41 5f                	pop    %r15
ffffffff8001d81f:	5d                   	pop    %rbp
ffffffff8001d820:	c3                   	ret
ffffffff8001d821:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001d828:	00 00 00 
ffffffff8001d82b:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001d832:	00 00 00 
ffffffff8001d835:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001d83c:	00 00 00 
ffffffff8001d83f:	90                   	nop

ffffffff8001d840 <_ZN3Net4Ipv412FlushPendingEv>:

    void FlushPending() {
ffffffff8001d840:	55                   	push   %rbp
ffffffff8001d841:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001d844:	41 54                	push   %r12
ffffffff8001d846:	53                   	push   %rbx
            }

            uint32_t nextHop = GetNextHop(g_pendingQueue[i].DestIp);
            uint8_t destMac[6];

            if (Arp::Resolve(nextHop, destMac)) {
ffffffff8001d847:	4c 8d 65 ea          	lea    -0x16(%rbp),%r12
ffffffff8001d84b:	48 c7 c3 05 d5 14 80 	mov    $0xffffffff8014d505,%rbx
    void FlushPending() {
ffffffff8001d852:	48 83 ec 10          	sub    $0x10,%rsp
ffffffff8001d856:	eb 18                	jmp    ffffffff8001d870 <_ZN3Net4Ipv412FlushPendingEv+0x30>
ffffffff8001d858:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001d85f:	00 
        for (uint32_t i = 0; i < PENDING_QUEUE_SIZE; i++) {
ffffffff8001d860:	48 81 c3 d8 05 00 00 	add    $0x5d8,%rbx
ffffffff8001d867:	48 81 fb c5 03 15 80 	cmp    $0xffffffff801503c5,%rbx
ffffffff8001d86e:	74 4d                	je     ffffffff8001d8bd <_ZN3Net4Ipv412FlushPendingEv+0x7d>
            if (!g_pendingQueue[i].Active) {
ffffffff8001d870:	80 bb cf 05 00 00 00 	cmpb   $0x0,0x5cf(%rbx)
ffffffff8001d877:	74 e7                	je     ffffffff8001d860 <_ZN3Net4Ipv412FlushPendingEv+0x20>
            uint32_t nextHop = GetNextHop(g_pendingQueue[i].DestIp);
ffffffff8001d879:	8b 7b fb             	mov    -0x5(%rbx),%edi
ffffffff8001d87c:	e8 ff 01 00 00       	call   ffffffff8001da80 <_ZN3Net10GetNextHopEj>
            if (Arp::Resolve(nextHop, destMac)) {
ffffffff8001d881:	4c 89 e6             	mov    %r12,%rsi
            uint32_t nextHop = GetNextHop(g_pendingQueue[i].DestIp);
ffffffff8001d884:	89 c7                	mov    %eax,%edi
            if (Arp::Resolve(nextHop, destMac)) {
ffffffff8001d886:	e8 55 ed ff ff       	call   ffffffff8001c5e0 <_ZN3Net3Arp7ResolveEjPh>
ffffffff8001d88b:	84 c0                	test   %al,%al
ffffffff8001d88d:	74 d1                	je     ffffffff8001d860 <_ZN3Net4Ipv412FlushPendingEv+0x20>
                SendDirect(g_pendingQueue[i].DestIp, g_pendingQueue[i].Protocol,
ffffffff8001d88f:	0f b6 73 ff          	movzbl -0x1(%rbx),%esi
ffffffff8001d893:	8b 7b fb             	mov    -0x5(%rbx),%edi
ffffffff8001d896:	48 89 d9             	mov    %rbx,%rcx
ffffffff8001d899:	4c 89 e2             	mov    %r12,%rdx
ffffffff8001d89c:	44 0f b7 83 cd 05 00 	movzwl 0x5cd(%rbx),%r8d
ffffffff8001d8a3:	00 
        for (uint32_t i = 0; i < PENDING_QUEUE_SIZE; i++) {
ffffffff8001d8a4:	48 81 c3 d8 05 00 00 	add    $0x5d8,%rbx
                SendDirect(g_pendingQueue[i].DestIp, g_pendingQueue[i].Protocol,
ffffffff8001d8ab:	e8 20 fa ff ff       	call   ffffffff8001d2d0 <_ZN3Net4Ipv4L10SendDirectEjhPKhS2_t>
                           destMac, g_pendingQueue[i].Data, g_pendingQueue[i].Length);
                g_pendingQueue[i].Active = false;
ffffffff8001d8b0:	c6 43 f7 00          	movb   $0x0,-0x9(%rbx)
        for (uint32_t i = 0; i < PENDING_QUEUE_SIZE; i++) {
ffffffff8001d8b4:	48 81 fb c5 03 15 80 	cmp    $0xffffffff801503c5,%rbx
ffffffff8001d8bb:	75 b3                	jne    ffffffff8001d870 <_ZN3Net4Ipv412FlushPendingEv+0x30>
            }
        }
    }
ffffffff8001d8bd:	48 83 c4 10          	add    $0x10,%rsp
ffffffff8001d8c1:	5b                   	pop    %rbx
ffffffff8001d8c2:	41 5c                	pop    %r12
ffffffff8001d8c4:	5d                   	pop    %rbp
ffffffff8001d8c5:	c3                   	ret
ffffffff8001d8c6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001d8cd:	00 00 00 

ffffffff8001d8d0 <_ZN3Net10InitializeEv>:

using namespace Kt;

namespace Net {

    void Initialize() {
ffffffff8001d8d0:	55                   	push   %rbp
ffffffff8001d8d1:	48 89 e5             	mov    %rsp,%rbp
        if (!Drivers::Net::E1000::IsInitialized() && !Drivers::Net::E1000E::IsInitialized()) {
ffffffff8001d8d4:	e8 c7 14 ff ff       	call   ffffffff8000eda0 <_ZN7Drivers3Net5E100013IsInitializedEv>
ffffffff8001d8d9:	84 c0                	test   %al,%al
ffffffff8001d8db:	75 0d                	jne    ffffffff8001d8ea <_ZN3Net10InitializeEv+0x1a>
ffffffff8001d8dd:	e8 ee 2d ff ff       	call   ffffffff800106d0 <_ZN7Drivers3Net6E1000E13IsInitializedEv>
ffffffff8001d8e2:	84 c0                	test   %al,%al
ffffffff8001d8e4:	0f 84 c6 00 00 00    	je     ffffffff8001d9b0 <_ZN3Net10InitializeEv+0xe0>
            KernelLogStream(WARNING, "Net") << "No NIC initialized, skipping network stack";
            return;
        }

        // Initialize layers bottom-up
        Ethernet::Initialize();
ffffffff8001d8ea:	e8 41 f5 ff ff       	call   ffffffff8001ce30 <_ZN3Net8Ethernet10InitializeEv>
        Arp::Initialize();
ffffffff8001d8ef:	e8 ec e9 ff ff       	call   ffffffff8001c2e0 <_ZN3Net3Arp10InitializeEv>
        Ipv4::Initialize();
ffffffff8001d8f4:	e8 e7 fa ff ff       	call   ffffffff8001d3e0 <_ZN3Net4Ipv410InitializeEv>
        Icmp::Initialize();
ffffffff8001d8f9:	e8 e2 f6 ff ff       	call   ffffffff8001cfe0 <_ZN3Net4Icmp10InitializeEv>
        Udp::Initialize();
ffffffff8001d8fe:	e8 dd 1d 00 00       	call   ffffffff8001f6e0 <_ZN3Net3Udp10InitializeEv>
        Tcp::Initialize();
ffffffff8001d903:	e8 38 0d 00 00       	call   ffffffff8001e640 <_ZN3Net3Tcp10InitializeEv>
        Socket::Initialize();
ffffffff8001d908:	e8 33 03 00 00       	call   ffffffff8001dc40 <_ZN3Net6Socket10InitializeEv>

        // Hook the active NIC's RX to our Ethernet dispatcher
        if (Drivers::Net::E1000::IsInitialized()) {
ffffffff8001d90d:	e8 8e 14 ff ff       	call   ffffffff8000eda0 <_ZN7Drivers3Net5E100013IsInitializedEv>
            Drivers::Net::E1000::SetRxCallback(Ethernet::OnFrameReceived);
ffffffff8001d912:	48 c7 c7 a0 cf 01 80 	mov    $0xffffffff8001cfa0,%rdi
        if (Drivers::Net::E1000::IsInitialized()) {
ffffffff8001d919:	84 c0                	test   %al,%al
ffffffff8001d91b:	0f 85 7f 00 00 00    	jne    ffffffff8001d9a0 <_ZN3Net10InitializeEv+0xd0>
        } else {
            Drivers::Net::E1000E::SetRxCallback(Ethernet::OnFrameReceived);
ffffffff8001d921:	e8 ba 2d ff ff       	call   ffffffff800106e0 <_ZN7Drivers3Net6E1000E13SetRxCallbackEPFvPKhtE>
        }

        // Send a gratuitous ARP to announce ourselves on the network
        Arp::SendRequest(GetIpAddress());
ffffffff8001d926:	e8 d5 00 00 00       	call   ffffffff8001da00 <_ZN3Net12GetIpAddressEv>
ffffffff8001d92b:	89 c7                	mov    %eax,%edi
ffffffff8001d92d:	e8 1e ec ff ff       	call   ffffffff8001c550 <_ZN3Net3Arp11SendRequestEj>
            Print(string);
ffffffff8001d932:	48 c7 c7 7c bb 02 80 	mov    $0xffffffff8002bb7c,%rdi
            g_kernelLogDepth++;
ffffffff8001d939:	83 05 64 1b 1c 00 01 	addl   $0x1,0x1c1b64(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001d940:	e8 7b 58 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d945:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001d94c:	e8 6f 58 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d951:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001d958:	e8 63 58 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d95d:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001d964:	e8 57 58 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d969:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001d970:	e8 4b 58 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d975:	48 c7 c7 eb bb 02 80 	mov    $0xffffffff8002bbeb,%rdi
ffffffff8001d97c:	e8 3f 58 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d981:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001d988:	e8 33 58 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001d98d:	8b 05 11 1b 1c 00    	mov    0x1c1b11(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

        KernelLogStream(OK, "Net") << "Network stack initialized";
    }
ffffffff8001d993:	5d                   	pop    %rbp
ffffffff8001d994:	83 e8 01             	sub    $0x1,%eax
ffffffff8001d997:	89 05 07 1b 1c 00    	mov    %eax,0x1c1b07(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001d99d:	c3                   	ret
ffffffff8001d99e:	66 90                	xchg   %ax,%ax
            Drivers::Net::E1000::SetRxCallback(Ethernet::OnFrameReceived);
ffffffff8001d9a0:	e8 0b 14 ff ff       	call   ffffffff8000edb0 <_ZN7Drivers3Net5E100013SetRxCallbackEPFvPKhtE>
ffffffff8001d9a5:	e9 7c ff ff ff       	jmp    ffffffff8001d926 <_ZN3Net10InitializeEv+0x56>
ffffffff8001d9aa:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            Print(string);
ffffffff8001d9b0:	48 c7 c7 7c bb 02 80 	mov    $0xffffffff8002bb7c,%rdi
            g_kernelLogDepth++;
ffffffff8001d9b7:	83 05 e6 1a 1c 00 01 	addl   $0x1,0x1c1ae6(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001d9be:	e8 fd 57 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d9c3:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001d9ca:	e8 f1 57 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d9cf:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001d9d6:	e8 e5 57 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d9db:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff8001d9e2:	e8 d9 57 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d9e7:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001d9ee:	e8 cd 57 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001d9f3:	48 c7 c7 28 d0 02 80 	mov    $0xffffffff8002d028,%rdi
ffffffff8001d9fa:	eb 80                	jmp    ffffffff8001d97c <_ZN3Net10InitializeEv+0xac>
ffffffff8001d9fc:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8001da00 <_ZN3Net12GetIpAddressEv>:
    static uint32_t g_ipAddress  = Ipv4Addr(10, 0, 68, 99);
    static uint32_t g_subnetMask = Ipv4Addr(255, 255, 255, 0);
    static uint32_t g_gateway    = Ipv4Addr(10, 0, 68, 1);
    static uint32_t g_dnsServer  = Ipv4Addr(10, 0, 68, 1);

    uint32_t GetIpAddress() { return g_ipAddress; }
ffffffff8001da00:	8b 05 ca 29 13 00    	mov    0x1329ca(%rip),%eax        # ffffffff801503d0 <_ZN3NetL11g_ipAddressE>
ffffffff8001da06:	c3                   	ret
ffffffff8001da07:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001da0e:	00 00 

ffffffff8001da10 <_ZN3Net12SetIpAddressEj>:
    void SetIpAddress(uint32_t ip) { g_ipAddress = ip; }
ffffffff8001da10:	89 3d ba 29 13 00    	mov    %edi,0x1329ba(%rip)        # ffffffff801503d0 <_ZN3NetL11g_ipAddressE>
ffffffff8001da16:	c3                   	ret
ffffffff8001da17:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001da1e:	00 00 

ffffffff8001da20 <_ZN3Net13GetSubnetMaskEv>:

    uint32_t GetSubnetMask() { return g_subnetMask; }
ffffffff8001da20:	8b 05 a6 29 13 00    	mov    0x1329a6(%rip),%eax        # ffffffff801503cc <_ZN3NetL12g_subnetMaskE>
ffffffff8001da26:	c3                   	ret
ffffffff8001da27:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001da2e:	00 00 

ffffffff8001da30 <_ZN3Net13SetSubnetMaskEj>:
    void SetSubnetMask(uint32_t mask) { g_subnetMask = mask; }
ffffffff8001da30:	89 3d 96 29 13 00    	mov    %edi,0x132996(%rip)        # ffffffff801503cc <_ZN3NetL12g_subnetMaskE>
ffffffff8001da36:	c3                   	ret
ffffffff8001da37:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001da3e:	00 00 

ffffffff8001da40 <_ZN3Net10GetGatewayEv>:

    uint32_t GetGateway() { return g_gateway; }
ffffffff8001da40:	8b 05 82 29 13 00    	mov    0x132982(%rip),%eax        # ffffffff801503c8 <_ZN3NetL9g_gatewayE>
ffffffff8001da46:	c3                   	ret
ffffffff8001da47:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001da4e:	00 00 

ffffffff8001da50 <_ZN3Net10SetGatewayEj>:
    void SetGateway(uint32_t gw) { g_gateway = gw; }
ffffffff8001da50:	89 3d 72 29 13 00    	mov    %edi,0x132972(%rip)        # ffffffff801503c8 <_ZN3NetL9g_gatewayE>
ffffffff8001da56:	c3                   	ret
ffffffff8001da57:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001da5e:	00 00 

ffffffff8001da60 <_ZN3Net12GetDnsServerEv>:

    uint32_t GetDnsServer() { return g_dnsServer; }
ffffffff8001da60:	8b 05 5e 29 13 00    	mov    0x13295e(%rip),%eax        # ffffffff801503c4 <_ZN3NetL11g_dnsServerE>
ffffffff8001da66:	c3                   	ret
ffffffff8001da67:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001da6e:	00 00 

ffffffff8001da70 <_ZN3Net12SetDnsServerEj>:
    void SetDnsServer(uint32_t dns) { g_dnsServer = dns; }
ffffffff8001da70:	89 3d 4e 29 13 00    	mov    %edi,0x13294e(%rip)        # ffffffff801503c4 <_ZN3NetL11g_dnsServerE>
ffffffff8001da76:	c3                   	ret
ffffffff8001da77:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001da7e:	00 00 

ffffffff8001da80 <_ZN3Net10GetNextHopEj>:

    bool IsLocalSubnet(uint32_t destIp) {
        return (destIp & g_subnetMask) == (g_ipAddress & g_subnetMask);
ffffffff8001da80:	8b 15 4a 29 13 00    	mov    0x13294a(%rip),%edx        # ffffffff801503d0 <_ZN3NetL11g_ipAddressE>
    }

    uint32_t GetNextHop(uint32_t destIp) {
ffffffff8001da86:	89 f8                	mov    %edi,%eax
        return (destIp & g_subnetMask) == (g_ipAddress & g_subnetMask);
ffffffff8001da88:	31 fa                	xor    %edi,%edx
ffffffff8001da8a:	23 15 3c 29 13 00    	and    0x13293c(%rip),%edx        # ffffffff801503cc <_ZN3NetL12g_subnetMaskE>
        if (IsLocalSubnet(destIp)) {
            return destIp;
        }
        return g_gateway;
ffffffff8001da90:	0f 45 05 31 29 13 00 	cmovne 0x132931(%rip),%eax        # ffffffff801503c8 <_ZN3NetL9g_gatewayE>
    }
ffffffff8001da97:	c3                   	ret
ffffffff8001da98:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001da9f:	00 

ffffffff8001daa0 <_GLOBAL__sub_I__ZN3Net12GetIpAddressEv>:
    static uint32_t g_ipAddress  = Ipv4Addr(10, 0, 68, 99);
ffffffff8001daa0:	c7 05 26 29 13 00 0a 	movl   $0x6344000a,0x132926(%rip)        # ffffffff801503d0 <_ZN3NetL11g_ipAddressE>
ffffffff8001daa7:	00 44 63 
    static uint32_t g_subnetMask = Ipv4Addr(255, 255, 255, 0);
ffffffff8001daaa:	c7 05 18 29 13 00 ff 	movl   $0xffffff,0x132918(%rip)        # ffffffff801503cc <_ZN3NetL12g_subnetMaskE>
ffffffff8001dab1:	ff ff 00 
    static uint32_t g_gateway    = Ipv4Addr(10, 0, 68, 1);
ffffffff8001dab4:	c7 05 0a 29 13 00 0a 	movl   $0x144000a,0x13290a(%rip)        # ffffffff801503c8 <_ZN3NetL9g_gatewayE>
ffffffff8001dabb:	00 44 01 
    static uint32_t g_dnsServer  = Ipv4Addr(10, 0, 68, 1);
ffffffff8001dabe:	c7 05 fc 28 13 00 0a 	movl   $0x144000a,0x1328fc(%rip)        # ffffffff801503c4 <_ZN3NetL11g_dnsServerE>
ffffffff8001dac5:	00 44 01 

}
ffffffff8001dac8:	c3                   	ret
ffffffff8001dac9:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001dad0:	00 00 00 
ffffffff8001dad3:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001dada:	00 00 00 
ffffffff8001dadd:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001dae4:	00 00 00 
ffffffff8001dae7:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001daee:	00 00 00 
ffffffff8001daf1:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001daf8:	00 00 00 
ffffffff8001dafb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff8001db00 <_ZN3Net6SocketL19UdpSocketDispatcherEjttPKht>:
        }
    }

    static void UdpSocketDispatcher(uint32_t srcIp, uint16_t srcPort,
                                     uint16_t dstPort,
                                     const uint8_t* data, uint16_t length) {
ffffffff8001db00:	49 89 c9             	mov    %rcx,%r9
ffffffff8001db03:	41 89 fa             	mov    %edi,%r10d
ffffffff8001db06:	48 c7 c0 ec 1d 15 80 	mov    $0xffffffff80151dec,%rax
        for (int i = 0; i < MAX_UDP_SOCKETS; i++) {
ffffffff8001db0d:	31 c9                	xor    %ecx,%ecx
ffffffff8001db0f:	90                   	nop
            if (g_udpSockets[i].Active && g_udpSockets[i].LocalPort == dstPort) {
ffffffff8001db10:	80 78 02 00          	cmpb   $0x0,0x2(%rax)
ffffffff8001db14:	74 05                	je     ffffffff8001db1b <_ZN3Net6SocketL19UdpSocketDispatcherEjttPKht+0x1b>
ffffffff8001db16:	66 39 10             	cmp    %dx,(%rax)
ffffffff8001db19:	74 15                	je     ffffffff8001db30 <_ZN3Net6SocketL19UdpSocketDispatcherEjttPKht+0x30>
        for (int i = 0; i < MAX_UDP_SOCKETS; i++) {
ffffffff8001db1b:	83 c1 01             	add    $0x1,%ecx
ffffffff8001db1e:	48 05 10 10 00 00    	add    $0x1010,%rax
ffffffff8001db24:	83 f9 10             	cmp    $0x10,%ecx
ffffffff8001db27:	75 e7                	jne    ffffffff8001db10 <_ZN3Net6SocketL19UdpSocketDispatcherEjttPKht+0x10>
ffffffff8001db29:	c3                   	ret
ffffffff8001db2a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
                                     const uint8_t* data, uint16_t length) {
ffffffff8001db30:	55                   	push   %rbp
                UdpSocketState* st = &g_udpSockets[i];
                uint32_t needed = sizeof(UdpDgramHeader) + length;
                if (st->Count + needed > UDP_RING_SIZE) {
ffffffff8001db31:	48 63 c9             	movslq %ecx,%rcx
                uint32_t needed = sizeof(UdpDgramHeader) + length;
ffffffff8001db34:	41 0f b7 c0          	movzwl %r8w,%eax
                                     const uint8_t* data, uint16_t length) {
ffffffff8001db38:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001db3b:	53                   	push   %rbx
                if (st->Count + needed > UDP_RING_SIZE) {
ffffffff8001db3c:	48 89 cb             	mov    %rcx,%rbx
ffffffff8001db3f:	48 c1 e3 08          	shl    $0x8,%rbx
ffffffff8001db43:	48 01 cb             	add    %rcx,%rbx
ffffffff8001db46:	48 89 df             	mov    %rbx,%rdi
                                     const uint8_t* data, uint16_t length) {
ffffffff8001db49:	48 83 ec 10          	sub    $0x10,%rsp
                if (st->Count + needed > UDP_RING_SIZE) {
ffffffff8001db4d:	48 c1 e7 04          	shl    $0x4,%rdi
ffffffff8001db51:	48 81 c7 e0 0d 15 80 	add    $0xffffffff80150de0,%rdi
ffffffff8001db58:	8b 97 08 10 00 00    	mov    0x1008(%rdi),%edx
ffffffff8001db5e:	44 8d 5c 10 08       	lea    0x8(%rax,%rdx,1),%r11d
ffffffff8001db63:	41 81 fb 00 10 00 00 	cmp    $0x1000,%r11d
ffffffff8001db6a:	0f 87 c6 00 00 00    	ja     ffffffff8001dc36 <_ZN3Net6SocketL19UdpSocketDispatcherEjttPKht+0x136>
                    return; // drop if buffer full
                }

                // Enqueue header
                UdpDgramHeader hdr;
                hdr.SrcIp = srcIp;
ffffffff8001db70:	44 89 55 f0          	mov    %r10d,-0x10(%rbp)
                hdr.SrcPort = srcPort;
ffffffff8001db74:	8b 87 04 10 00 00    	mov    0x1004(%rdi),%eax
                hdr.DataLen = length;
ffffffff8001db7a:	66 44 89 45 f6       	mov    %r8w,-0xa(%rbp)
                hdr.SrcPort = srcPort;
ffffffff8001db7f:	66 89 75 f4          	mov    %si,-0xc(%rbp)

                const uint8_t* hdrBytes = (const uint8_t*)&hdr;
                for (uint32_t j = 0; j < sizeof(UdpDgramHeader); j++) {
ffffffff8001db83:	48 8d 75 f0          	lea    -0x10(%rbp),%rsi
ffffffff8001db87:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001db8e:	00 00 00 00 
ffffffff8001db92:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001db99:	00 00 00 00 
ffffffff8001db9d:	0f 1f 00             	nopl   (%rax)
                    st->Ring[st->Tail] = hdrBytes[j];
ffffffff8001dba0:	44 0f b6 16          	movzbl (%rsi),%r10d
ffffffff8001dba4:	89 c2                	mov    %eax,%edx
                for (uint32_t j = 0; j < sizeof(UdpDgramHeader); j++) {
ffffffff8001dba6:	48 83 c6 01          	add    $0x1,%rsi
                    st->Tail = (st->Tail + 1) % UDP_RING_SIZE;
ffffffff8001dbaa:	83 c0 01             	add    $0x1,%eax
ffffffff8001dbad:	25 ff 0f 00 00       	and    $0xfff,%eax
                    st->Ring[st->Tail] = hdrBytes[j];
ffffffff8001dbb2:	44 88 14 17          	mov    %r10b,(%rdi,%rdx,1)
                for (uint32_t j = 0; j < sizeof(UdpDgramHeader); j++) {
ffffffff8001dbb6:	48 8d 55 f8          	lea    -0x8(%rbp),%rdx
ffffffff8001dbba:	48 39 d6             	cmp    %rdx,%rsi
ffffffff8001dbbd:	75 e1                	jne    ffffffff8001dba0 <_ZN3Net6SocketL19UdpSocketDispatcherEjttPKht+0xa0>
ffffffff8001dbbf:	4c 89 ca             	mov    %r9,%rdx
ffffffff8001dbc2:	48 c1 e3 04          	shl    $0x4,%rbx
ffffffff8001dbc6:	45 0f b7 c8          	movzwl %r8w,%r9d
ffffffff8001dbca:	89 83 e4 1d 15 80    	mov    %eax,-0x7feae21c(%rbx)
                }

                // Enqueue payload
                for (uint16_t j = 0; j < length; j++) {
ffffffff8001dbd0:	49 01 d1             	add    %rdx,%r9
ffffffff8001dbd3:	66 45 85 c0          	test   %r8w,%r8w
ffffffff8001dbd7:	74 48                	je     ffffffff8001dc21 <_ZN3Net6SocketL19UdpSocketDispatcherEjttPKht+0x121>
                    st->Ring[st->Tail] = data[j];
ffffffff8001dbd9:	48 89 ce             	mov    %rcx,%rsi
ffffffff8001dbdc:	48 c1 e6 08          	shl    $0x8,%rsi
ffffffff8001dbe0:	48 01 ce             	add    %rcx,%rsi
ffffffff8001dbe3:	48 c1 e6 04          	shl    $0x4,%rsi
ffffffff8001dbe7:	48 81 c6 e0 0d 15 80 	add    $0xffffffff80150de0,%rsi
ffffffff8001dbee:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001dbf5:	00 00 00 00 
ffffffff8001dbf9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
ffffffff8001dc00:	44 0f b6 02          	movzbl (%rdx),%r8d
ffffffff8001dc04:	89 c7                	mov    %eax,%edi
                    st->Tail = (st->Tail + 1) % UDP_RING_SIZE;
ffffffff8001dc06:	83 c0 01             	add    $0x1,%eax
                for (uint16_t j = 0; j < length; j++) {
ffffffff8001dc09:	48 83 c2 01          	add    $0x1,%rdx
                    st->Tail = (st->Tail + 1) % UDP_RING_SIZE;
ffffffff8001dc0d:	25 ff 0f 00 00       	and    $0xfff,%eax
                    st->Ring[st->Tail] = data[j];
ffffffff8001dc12:	44 88 04 3e          	mov    %r8b,(%rsi,%rdi,1)
                    st->Tail = (st->Tail + 1) % UDP_RING_SIZE;
ffffffff8001dc16:	89 86 04 10 00 00    	mov    %eax,0x1004(%rsi)
                for (uint16_t j = 0; j < length; j++) {
ffffffff8001dc1c:	49 39 d1             	cmp    %rdx,%r9
ffffffff8001dc1f:	75 df                	jne    ffffffff8001dc00 <_ZN3Net6SocketL19UdpSocketDispatcherEjttPKht+0x100>
                }

                st->Count += needed;
ffffffff8001dc21:	48 89 c8             	mov    %rcx,%rax
ffffffff8001dc24:	48 c1 e0 08          	shl    $0x8,%rax
ffffffff8001dc28:	48 01 c8             	add    %rcx,%rax
ffffffff8001dc2b:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff8001dc2f:	44 89 98 e8 1d 15 80 	mov    %r11d,-0x7feae218(%rax)
                return;
            }
        }
    }
ffffffff8001dc36:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff8001dc3a:	c9                   	leave
ffffffff8001dc3b:	c3                   	ret
ffffffff8001dc3c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8001dc40 <_ZN3Net6Socket10InitializeEv>:

    // ---- Public API ----

    void Initialize() {
ffffffff8001dc40:	55                   	push   %rbp
ffffffff8001dc41:	48 c7 c0 e0 03 15 80 	mov    $0xffffffff801503e0,%rax
ffffffff8001dc48:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001dc4b:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001dc52:	00 00 00 00 
ffffffff8001dc56:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001dc5d:	00 00 00 
        for (int i = 0; i < MAX_SOCKETS; i++) {
            g_sockets[i].Active = false;
ffffffff8001dc60:	c6 00 00             	movb   $0x0,(%rax)
        for (int i = 0; i < MAX_SOCKETS; i++) {
ffffffff8001dc63:	48 83 c0 50          	add    $0x50,%rax
            g_sockets[i].Active = false;
ffffffff8001dc67:	c6 40 d8 00          	movb   $0x0,-0x28(%rax)
        for (int i = 0; i < MAX_SOCKETS; i++) {
ffffffff8001dc6b:	48 3d e0 0d 15 80    	cmp    $0xffffffff80150de0,%rax
ffffffff8001dc71:	75 ed                	jne    ffffffff8001dc60 <_ZN3Net6Socket10InitializeEv+0x20>
ffffffff8001dc73:	48 c7 c0 ee 1d 15 80 	mov    $0xffffffff80151dee,%rax
ffffffff8001dc7a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        }
        for (int i = 0; i < MAX_UDP_SOCKETS; i++) {
            g_udpSockets[i].Active = false;
ffffffff8001dc80:	c6 00 00             	movb   $0x0,(%rax)
        for (int i = 0; i < MAX_UDP_SOCKETS; i++) {
ffffffff8001dc83:	48 05 20 20 00 00    	add    $0x2020,%rax
            g_udpSockets[i].Active = false;
ffffffff8001dc89:	c6 80 f0 ef ff ff 00 	movb   $0x0,-0x1010(%rax)
        for (int i = 0; i < MAX_UDP_SOCKETS; i++) {
ffffffff8001dc90:	48 3d ee 1e 16 80    	cmp    $0xffffffff80161eee,%rax
ffffffff8001dc96:	75 e8                	jne    ffffffff8001dc80 <_ZN3Net6Socket10InitializeEv+0x40>
ffffffff8001dc98:	48 c7 c7 7c bb 02 80 	mov    $0xffffffff8002bb7c,%rdi
            g_kernelLogDepth++;
ffffffff8001dc9f:	83 05 fe 17 1c 00 01 	addl   $0x1,0x1c17fe(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001dca6:	e8 15 55 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001dcab:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001dcb2:	e8 09 55 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001dcb7:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001dcbe:	e8 fd 54 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001dcc3:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001dcca:	e8 f1 54 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001dccf:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001dcd6:	e8 e5 54 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001dcdb:	48 c7 c7 05 bc 02 80 	mov    $0xffffffff8002bc05,%rdi
ffffffff8001dce2:	e8 d9 54 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001dce7:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001dcee:	e8 cd 54 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001dcf3:	83 2d aa 17 1c 00 01 	subl   $0x1,0x1c17aa(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        }
        KernelLogStream(OK, "Net") << "Socket table initialized";
    }
ffffffff8001dcfa:	5d                   	pop    %rbp
ffffffff8001dcfb:	c3                   	ret
ffffffff8001dcfc:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8001dd00 <_ZN3Net6Socket6CreateEii>:

    int Create(int type, int pid) {
        if (type != SOCK_TCP && type != SOCK_UDP) return -1;
ffffffff8001dd00:	8d 47 ff             	lea    -0x1(%rdi),%eax
ffffffff8001dd03:	83 f8 01             	cmp    $0x1,%eax
ffffffff8001dd06:	0f 87 b4 00 00 00    	ja     ffffffff8001ddc0 <_ZN3Net6Socket6CreateEii+0xc0>
ffffffff8001dd0c:	48 c7 c2 e0 03 15 80 	mov    $0xffffffff801503e0,%rdx

        for (int i = 0; i < MAX_SOCKETS; i++) {
ffffffff8001dd13:	31 c0                	xor    %eax,%eax
ffffffff8001dd15:	eb 19                	jmp    ffffffff8001dd30 <_ZN3Net6Socket6CreateEii+0x30>
ffffffff8001dd17:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001dd1e:	00 00 
ffffffff8001dd20:	83 c0 01             	add    $0x1,%eax
ffffffff8001dd23:	48 83 c2 28          	add    $0x28,%rdx
ffffffff8001dd27:	83 f8 40             	cmp    $0x40,%eax
ffffffff8001dd2a:	0f 84 90 00 00 00    	je     ffffffff8001ddc0 <_ZN3Net6Socket6CreateEii+0xc0>
            if (!g_sockets[i].Active) {
ffffffff8001dd30:	80 3a 00             	cmpb   $0x0,(%rdx)
ffffffff8001dd33:	75 eb                	jne    ffffffff8001dd20 <_ZN3Net6Socket6CreateEii+0x20>
                g_sockets[i].Active = true;
ffffffff8001dd35:	4c 63 c0             	movslq %eax,%r8
                g_sockets[i].Type = type;
                g_sockets[i].OwnerPid = pid;
                g_sockets[i].TcpConn = nullptr;
                g_sockets[i].UdpState = nullptr;
                g_sockets[i].LocalPort = 0;
ffffffff8001dd38:	45 31 c9             	xor    %r9d,%r9d
                g_sockets[i].Active = true;
ffffffff8001dd3b:	4b 8d 14 80          	lea    (%r8,%r8,4),%rdx
ffffffff8001dd3f:	48 c1 e2 03          	shl    $0x3,%rdx
ffffffff8001dd43:	c6 82 e0 03 15 80 01 	movb   $0x1,-0x7feafc20(%rdx)
                g_sockets[i].Type = type;
ffffffff8001dd4a:	89 ba e4 03 15 80    	mov    %edi,-0x7feafc1c(%rdx)
                g_sockets[i].OwnerPid = pid;
ffffffff8001dd50:	89 b2 e8 03 15 80    	mov    %esi,-0x7feafc18(%rdx)
                g_sockets[i].TcpConn = nullptr;
ffffffff8001dd56:	48 c7 82 f0 03 15 80 	movq   $0x0,-0x7feafc10(%rdx)
ffffffff8001dd5d:	00 00 00 00 
                g_sockets[i].UdpState = nullptr;
ffffffff8001dd61:	48 c7 82 f8 03 15 80 	movq   $0x0,-0x7feafc08(%rdx)
ffffffff8001dd68:	00 00 00 00 
                g_sockets[i].LocalPort = 0;
ffffffff8001dd6c:	66 44 89 8a 00 04 15 	mov    %r9w,-0x7feafc00(%rdx)
ffffffff8001dd73:	80 

                if (type == SOCK_UDP) {
ffffffff8001dd74:	83 ff 02             	cmp    $0x2,%edi
ffffffff8001dd77:	74 07                	je     ffffffff8001dd80 <_ZN3Net6Socket6CreateEii+0x80>

                return i;
            }
        }
        return -1;
    }
ffffffff8001dd79:	c3                   	ret
ffffffff8001dd7a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff8001dd80:	48 c7 c1 ee 1d 15 80 	mov    $0xffffffff80151dee,%rcx
        for (int i = 0; i < MAX_UDP_SOCKETS; i++) {
ffffffff8001dd87:	31 d2                	xor    %edx,%edx
ffffffff8001dd89:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001dd90:	00 00 00 00 
ffffffff8001dd94:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001dd9b:	00 00 00 00 
ffffffff8001dd9f:	90                   	nop
            if (!g_udpSockets[i].Active) {
ffffffff8001dda0:	80 39 00             	cmpb   $0x0,(%rcx)
ffffffff8001dda3:	74 21                	je     ffffffff8001ddc6 <_ZN3Net6Socket6CreateEii+0xc6>
        for (int i = 0; i < MAX_UDP_SOCKETS; i++) {
ffffffff8001dda5:	83 c2 01             	add    $0x1,%edx
ffffffff8001dda8:	48 81 c1 10 10 00 00 	add    $0x1010,%rcx
ffffffff8001ddaf:	83 fa 10             	cmp    $0x10,%edx
ffffffff8001ddb2:	75 ec                	jne    ffffffff8001dda0 <_ZN3Net6Socket6CreateEii+0xa0>
                        g_sockets[i].Active = false;
ffffffff8001ddb4:	4b 8d 04 80          	lea    (%r8,%r8,4),%rax
ffffffff8001ddb8:	c6 04 c5 e0 03 15 80 	movb   $0x0,-0x7feafc20(,%rax,8)
ffffffff8001ddbf:	00 
        if (type != SOCK_TCP && type != SOCK_UDP) return -1;
ffffffff8001ddc0:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
ffffffff8001ddc5:	c3                   	ret
                g_udpSockets[i].Active = true;
ffffffff8001ddc6:	48 63 d2             	movslq %edx,%rdx
                g_udpSockets[i].LocalPort = 0;
ffffffff8001ddc9:	31 f6                	xor    %esi,%esi
                g_udpSockets[i].Active = true;
ffffffff8001ddcb:	48 89 d1             	mov    %rdx,%rcx
ffffffff8001ddce:	48 c1 e1 08          	shl    $0x8,%rcx
ffffffff8001ddd2:	48 01 ca             	add    %rcx,%rdx
ffffffff8001ddd5:	48 c1 e2 04          	shl    $0x4,%rdx
ffffffff8001ddd9:	48 8d 8a e0 0d 15 80 	lea    -0x7feaf220(%rdx),%rcx
                g_udpSockets[i].Head = 0;
ffffffff8001dde0:	48 c7 82 e0 1d 15 80 	movq   $0x0,-0x7feae220(%rdx)
ffffffff8001dde7:	00 00 00 00 
                g_udpSockets[i].Active = true;
ffffffff8001ddeb:	c6 82 ee 1d 15 80 01 	movb   $0x1,-0x7feae212(%rdx)
                g_udpSockets[i].Count = 0;
ffffffff8001ddf2:	c7 82 e8 1d 15 80 00 	movl   $0x0,-0x7feae218(%rdx)
ffffffff8001ddf9:	00 00 00 
                g_udpSockets[i].LocalPort = 0;
ffffffff8001ddfc:	66 89 b2 ec 1d 15 80 	mov    %si,-0x7feae214(%rdx)
                    g_sockets[i].UdpState = us;
ffffffff8001de03:	4b 8d 14 80          	lea    (%r8,%r8,4),%rdx
                return &g_udpSockets[i];
ffffffff8001de07:	48 89 0c d5 f8 03 15 	mov    %rcx,-0x7feafc08(,%rdx,8)
ffffffff8001de0e:	80 
ffffffff8001de0f:	c3                   	ret

ffffffff8001de10 <_ZN3Net6Socket7ConnectEijti>:
        if (fd < 0 || fd >= MAX_SOCKETS) return false;
ffffffff8001de10:	83 ff 3f             	cmp    $0x3f,%edi
ffffffff8001de13:	77 3b                	ja     ffffffff8001de50 <_ZN3Net6Socket7ConnectEijti+0x40>
        if (!g_sockets[fd].Active) return false;
ffffffff8001de15:	48 63 ff             	movslq %edi,%rdi
ffffffff8001de18:	48 8d 04 bf          	lea    (%rdi,%rdi,4),%rax
ffffffff8001de1c:	48 c1 e0 03          	shl    $0x3,%rax
ffffffff8001de20:	80 b8 e0 03 15 80 00 	cmpb   $0x0,-0x7feafc20(%rax)
ffffffff8001de27:	74 27                	je     ffffffff8001de50 <_ZN3Net6Socket7ConnectEijti+0x40>

    int Connect(int fd, uint32_t ip, uint16_t port, int pid) {
ffffffff8001de29:	55                   	push   %rbp
ffffffff8001de2a:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001de2d:	53                   	push   %rbx
        if (g_sockets[fd].OwnerPid != pid) return false;
ffffffff8001de2e:	48 8d 98 e0 03 15 80 	lea    -0x7feafc20(%rax),%rbx
    int Connect(int fd, uint32_t ip, uint16_t port, int pid) {
ffffffff8001de35:	48 83 ec 08          	sub    $0x8,%rsp
        if (g_sockets[fd].OwnerPid != pid) return false;
ffffffff8001de39:	3b 88 e8 03 15 80    	cmp    -0x7feafc18(%rax),%ecx
ffffffff8001de3f:	74 1f                	je     ffffffff8001de60 <_ZN3Net6Socket7ConnectEijti+0x50>
        Tcp::Connection* conn = Tcp::Connect(ip, port, srcPort);
        if (conn == nullptr) return -1;

        g_sockets[fd].TcpConn = conn;
        return 0;
    }
ffffffff8001de41:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
        if (!ValidFd(fd, pid)) return -1;
ffffffff8001de45:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
    }
ffffffff8001de4a:	c9                   	leave
ffffffff8001de4b:	c3                   	ret
ffffffff8001de4c:	0f 1f 40 00          	nopl   0x0(%rax)
        if (!ValidFd(fd, pid)) return -1;
ffffffff8001de50:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
    }
ffffffff8001de55:	c3                   	ret
ffffffff8001de56:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001de5d:	00 00 00 
        if (g_sockets[fd].Type != SOCK_TCP) return -1;
ffffffff8001de60:	83 b8 e4 03 15 80 01 	cmpl   $0x1,-0x7feafc1c(%rax)
ffffffff8001de67:	75 d8                	jne    ffffffff8001de41 <_ZN3Net6Socket7ConnectEijti+0x31>
        if (g_sockets[fd].TcpConn != nullptr) return -1;
ffffffff8001de69:	48 83 b8 f0 03 15 80 	cmpq   $0x0,-0x7feafc10(%rax)
ffffffff8001de70:	00 
ffffffff8001de71:	75 ce                	jne    ffffffff8001de41 <_ZN3Net6Socket7ConnectEijti+0x31>
        uint16_t port = g_nextEphemeralPort++;
ffffffff8001de73:	0f b7 05 e0 02 01 00 	movzwl 0x102e0(%rip),%eax        # ffffffff8002e15a <_ZN3Net6SocketL19g_nextEphemeralPortE>
ffffffff8001de7a:	41 89 f0             	mov    %esi,%r8d
        if (g_nextEphemeralPort == 0) g_nextEphemeralPort = 49152;
ffffffff8001de7d:	be 00 c0 ff ff       	mov    $0xffffc000,%esi
        Tcp::Connection* conn = Tcp::Connect(ip, port, srcPort);
ffffffff8001de82:	44 89 c7             	mov    %r8d,%edi
ffffffff8001de85:	89 c1                	mov    %eax,%ecx
        g_sockets[fd].LocalPort = srcPort;
ffffffff8001de87:	66 89 43 20          	mov    %ax,0x20(%rbx)
ffffffff8001de8b:	66 83 c1 01          	add    $0x1,%cx
ffffffff8001de8f:	0f 44 ce             	cmove  %esi,%ecx
        Tcp::Connection* conn = Tcp::Connect(ip, port, srcPort);
ffffffff8001de92:	0f b7 f2             	movzwl %dx,%esi
ffffffff8001de95:	89 c2                	mov    %eax,%edx
        uint16_t port = g_nextEphemeralPort++;
ffffffff8001de97:	66 89 0d bc 02 01 00 	mov    %cx,0x102bc(%rip)        # ffffffff8002e15a <_ZN3Net6SocketL19g_nextEphemeralPortE>
        Tcp::Connection* conn = Tcp::Connect(ip, port, srcPort);
ffffffff8001de9e:	e8 9d 10 00 00       	call   ffffffff8001ef40 <_ZN3Net3Tcp7ConnectEjtt>
        if (conn == nullptr) return -1;
ffffffff8001dea3:	48 85 c0             	test   %rax,%rax
ffffffff8001dea6:	74 99                	je     ffffffff8001de41 <_ZN3Net6Socket7ConnectEijti+0x31>
        g_sockets[fd].TcpConn = conn;
ffffffff8001dea8:	48 89 43 10          	mov    %rax,0x10(%rbx)
    }
ffffffff8001deac:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
        return 0;
ffffffff8001deb0:	31 c0                	xor    %eax,%eax
    }
ffffffff8001deb2:	c9                   	leave
ffffffff8001deb3:	c3                   	ret
ffffffff8001deb4:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001debb:	00 00 00 
ffffffff8001debe:	66 90                	xchg   %ax,%ax

ffffffff8001dec0 <_ZN3Net6Socket4BindEiti>:
        if (fd < 0 || fd >= MAX_SOCKETS) return false;
ffffffff8001dec0:	83 ff 3f             	cmp    $0x3f,%edi
ffffffff8001dec3:	77 3b                	ja     ffffffff8001df00 <_ZN3Net6Socket4BindEiti+0x40>
        if (!g_sockets[fd].Active) return false;
ffffffff8001dec5:	48 63 ff             	movslq %edi,%rdi
ffffffff8001dec8:	48 8d 04 bf          	lea    (%rdi,%rdi,4),%rax
ffffffff8001decc:	48 c1 e0 03          	shl    $0x3,%rax
ffffffff8001ded0:	80 b8 e0 03 15 80 00 	cmpb   $0x0,-0x7feafc20(%rax)
ffffffff8001ded7:	74 27                	je     ffffffff8001df00 <_ZN3Net6Socket4BindEiti+0x40>
        if (g_sockets[fd].OwnerPid != pid) return false;
ffffffff8001ded9:	48 8d 88 e0 03 15 80 	lea    -0x7feafc20(%rax),%rcx
ffffffff8001dee0:	3b 90 e8 03 15 80    	cmp    -0x7feafc18(%rax),%edx
ffffffff8001dee6:	75 18                	jne    ffffffff8001df00 <_ZN3Net6Socket4BindEiti+0x40>

    int Bind(int fd, uint16_t port, int pid) {
        if (!ValidFd(fd, pid)) return -1;
        g_sockets[fd].LocalPort = port;
ffffffff8001dee8:	66 89 b0 00 04 15 80 	mov    %si,-0x7feafc00(%rax)
            if (!us) return -1;
            us->LocalPort = port;
            if (!Udp::Bind(port, UdpSocketDispatcher)) return -1;
        }

        return 0;
ffffffff8001deef:	31 c0                	xor    %eax,%eax
        if (g_sockets[fd].Type == SOCK_UDP) {
ffffffff8001def1:	83 79 04 02          	cmpl   $0x2,0x4(%rcx)
ffffffff8001def5:	74 19                	je     ffffffff8001df10 <_ZN3Net6Socket4BindEiti+0x50>
    }
ffffffff8001def7:	c3                   	ret
ffffffff8001def8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001deff:	00 
        if (!ValidFd(fd, pid)) return -1;
ffffffff8001df00:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
ffffffff8001df05:	c3                   	ret
ffffffff8001df06:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001df0d:	00 00 00 
            UdpSocketState* us = g_sockets[fd].UdpState;
ffffffff8001df10:	48 8b 41 18          	mov    0x18(%rcx),%rax
            if (!us) return -1;
ffffffff8001df14:	48 85 c0             	test   %rax,%rax
ffffffff8001df17:	74 e7                	je     ffffffff8001df00 <_ZN3Net6Socket4BindEiti+0x40>
    int Bind(int fd, uint16_t port, int pid) {
ffffffff8001df19:	55                   	push   %rbp
            if (!Udp::Bind(port, UdpSocketDispatcher)) return -1;
ffffffff8001df1a:	0f b7 fe             	movzwl %si,%edi
            us->LocalPort = port;
ffffffff8001df1d:	66 89 b0 0c 10 00 00 	mov    %si,0x100c(%rax)
            if (!Udp::Bind(port, UdpSocketDispatcher)) return -1;
ffffffff8001df24:	48 c7 c6 00 db 01 80 	mov    $0xffffffff8001db00,%rsi
    int Bind(int fd, uint16_t port, int pid) {
ffffffff8001df2b:	48 89 e5             	mov    %rsp,%rbp
            if (!Udp::Bind(port, UdpSocketDispatcher)) return -1;
ffffffff8001df2e:	e8 ed 19 00 00       	call   ffffffff8001f920 <_ZN3Net3Udp4BindEtPFvjttPKhtE>
    }
ffffffff8001df33:	5d                   	pop    %rbp
            if (!Udp::Bind(port, UdpSocketDispatcher)) return -1;
ffffffff8001df34:	0f b6 c0             	movzbl %al,%eax
ffffffff8001df37:	83 e8 01             	sub    $0x1,%eax
    }
ffffffff8001df3a:	c3                   	ret
ffffffff8001df3b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff8001df40 <_ZN3Net6Socket6ListenEii>:
        if (fd < 0 || fd >= MAX_SOCKETS) return false;
ffffffff8001df40:	83 ff 3f             	cmp    $0x3f,%edi
ffffffff8001df43:	77 3b                	ja     ffffffff8001df80 <_ZN3Net6Socket6ListenEii+0x40>
        if (!g_sockets[fd].Active) return false;
ffffffff8001df45:	48 63 ff             	movslq %edi,%rdi
ffffffff8001df48:	48 8d 04 bf          	lea    (%rdi,%rdi,4),%rax
ffffffff8001df4c:	48 c1 e0 03          	shl    $0x3,%rax
ffffffff8001df50:	80 b8 e0 03 15 80 00 	cmpb   $0x0,-0x7feafc20(%rax)
ffffffff8001df57:	74 27                	je     ffffffff8001df80 <_ZN3Net6Socket6ListenEii+0x40>

    int Listen(int fd, int pid) {
ffffffff8001df59:	55                   	push   %rbp
ffffffff8001df5a:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001df5d:	53                   	push   %rbx
        if (g_sockets[fd].OwnerPid != pid) return false;
ffffffff8001df5e:	48 8d 98 e0 03 15 80 	lea    -0x7feafc20(%rax),%rbx
    int Listen(int fd, int pid) {
ffffffff8001df65:	48 83 ec 08          	sub    $0x8,%rsp
        if (g_sockets[fd].OwnerPid != pid) return false;
ffffffff8001df69:	3b b0 e8 03 15 80    	cmp    -0x7feafc18(%rax),%esi
ffffffff8001df6f:	74 1f                	je     ffffffff8001df90 <_ZN3Net6Socket6ListenEii+0x50>
        Tcp::Connection* conn = Tcp::Listen(g_sockets[fd].LocalPort);
        if (conn == nullptr) return -1;

        g_sockets[fd].TcpConn = conn;
        return 0;
    }
ffffffff8001df71:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
        if (!ValidFd(fd, pid)) return -1;
ffffffff8001df75:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
    }
ffffffff8001df7a:	c9                   	leave
ffffffff8001df7b:	c3                   	ret
ffffffff8001df7c:	0f 1f 40 00          	nopl   0x0(%rax)
        if (!ValidFd(fd, pid)) return -1;
ffffffff8001df80:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
    }
ffffffff8001df85:	c3                   	ret
ffffffff8001df86:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001df8d:	00 00 00 
        if (g_sockets[fd].Type != SOCK_TCP) return -1;
ffffffff8001df90:	83 b8 e4 03 15 80 01 	cmpl   $0x1,-0x7feafc1c(%rax)
ffffffff8001df97:	75 d8                	jne    ffffffff8001df71 <_ZN3Net6Socket6ListenEii+0x31>
        if (g_sockets[fd].LocalPort == 0) return -1;
ffffffff8001df99:	0f b7 b8 00 04 15 80 	movzwl -0x7feafc00(%rax),%edi
ffffffff8001dfa0:	66 85 ff             	test   %di,%di
ffffffff8001dfa3:	74 cc                	je     ffffffff8001df71 <_ZN3Net6Socket6ListenEii+0x31>
        if (g_sockets[fd].TcpConn != nullptr) return -1;
ffffffff8001dfa5:	48 83 b8 f0 03 15 80 	cmpq   $0x0,-0x7feafc10(%rax)
ffffffff8001dfac:	00 
ffffffff8001dfad:	75 c2                	jne    ffffffff8001df71 <_ZN3Net6Socket6ListenEii+0x31>
        Tcp::Connection* conn = Tcp::Listen(g_sockets[fd].LocalPort);
ffffffff8001dfaf:	e8 ac 0b 00 00       	call   ffffffff8001eb60 <_ZN3Net3Tcp6ListenEt>
        if (conn == nullptr) return -1;
ffffffff8001dfb4:	48 85 c0             	test   %rax,%rax
ffffffff8001dfb7:	74 b8                	je     ffffffff8001df71 <_ZN3Net6Socket6ListenEii+0x31>
        g_sockets[fd].TcpConn = conn;
ffffffff8001dfb9:	48 89 43 10          	mov    %rax,0x10(%rbx)
    }
ffffffff8001dfbd:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
        return 0;
ffffffff8001dfc1:	31 c0                	xor    %eax,%eax
    }
ffffffff8001dfc3:	c9                   	leave
ffffffff8001dfc4:	c3                   	ret
ffffffff8001dfc5:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001dfcc:	00 00 00 
ffffffff8001dfcf:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001dfd6:	00 00 00 
ffffffff8001dfd9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff8001dfe0 <_ZN3Net6Socket6AcceptEii>:
        if (fd < 0 || fd >= MAX_SOCKETS) return false;
ffffffff8001dfe0:	83 ff 3f             	cmp    $0x3f,%edi
ffffffff8001dfe3:	0f 87 e7 00 00 00    	ja     ffffffff8001e0d0 <_ZN3Net6Socket6AcceptEii+0xf0>

    int Accept(int fd, int pid) {
ffffffff8001dfe9:	55                   	push   %rbp
ffffffff8001dfea:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001dfed:	41 54                	push   %r12
ffffffff8001dfef:	53                   	push   %rbx
        if (!g_sockets[fd].Active) return false;
ffffffff8001dff0:	48 63 df             	movslq %edi,%rbx
ffffffff8001dff3:	48 8d 04 9b          	lea    (%rbx,%rbx,4),%rax
ffffffff8001dff7:	48 c1 e0 03          	shl    $0x3,%rax
ffffffff8001dffb:	80 b8 e0 03 15 80 00 	cmpb   $0x0,-0x7feafc20(%rax)
ffffffff8001e002:	0f 84 bd 00 00 00    	je     ffffffff8001e0c5 <_ZN3Net6Socket6AcceptEii+0xe5>
ffffffff8001e008:	41 89 f4             	mov    %esi,%r12d
        if (g_sockets[fd].OwnerPid != pid) return false;
ffffffff8001e00b:	3b b0 e8 03 15 80    	cmp    -0x7feafc18(%rax),%esi
ffffffff8001e011:	0f 85 ae 00 00 00    	jne    ffffffff8001e0c5 <_ZN3Net6Socket6AcceptEii+0xe5>
        if (!ValidFd(fd, pid)) return -1;
        if (g_sockets[fd].Type != SOCK_TCP) return -1;
ffffffff8001e017:	83 b8 e4 03 15 80 01 	cmpl   $0x1,-0x7feafc1c(%rax)
ffffffff8001e01e:	0f 85 a1 00 00 00    	jne    ffffffff8001e0c5 <_ZN3Net6Socket6AcceptEii+0xe5>
        if (g_sockets[fd].TcpConn == nullptr) return -1;
ffffffff8001e024:	48 8b b8 f0 03 15 80 	mov    -0x7feafc10(%rax),%rdi
ffffffff8001e02b:	48 85 ff             	test   %rdi,%rdi
ffffffff8001e02e:	0f 84 91 00 00 00    	je     ffffffff8001e0c5 <_ZN3Net6Socket6AcceptEii+0xe5>

        Tcp::Connection* clientConn = Tcp::Accept(g_sockets[fd].TcpConn);
ffffffff8001e034:	e8 a7 0c 00 00       	call   ffffffff8001ece0 <_ZN3Net3Tcp6AcceptEPNS0_10ConnectionE>
ffffffff8001e039:	48 89 c7             	mov    %rax,%rdi
        if (clientConn == nullptr) return -1;
ffffffff8001e03c:	48 85 c0             	test   %rax,%rax
ffffffff8001e03f:	0f 84 80 00 00 00    	je     ffffffff8001e0c5 <_ZN3Net6Socket6AcceptEii+0xe5>
ffffffff8001e045:	48 c7 c2 e0 03 15 80 	mov    $0xffffffff801503e0,%rdx

        // Allocate a new socket entry for the accepted connection
        for (int i = 0; i < MAX_SOCKETS; i++) {
ffffffff8001e04c:	31 c0                	xor    %eax,%eax
ffffffff8001e04e:	eb 1c                	jmp    ffffffff8001e06c <_ZN3Net6Socket6AcceptEii+0x8c>
ffffffff8001e050:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001e057:	00 00 00 00 
ffffffff8001e05b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff8001e060:	83 c0 01             	add    $0x1,%eax
ffffffff8001e063:	48 83 c2 28          	add    $0x28,%rdx
ffffffff8001e067:	83 f8 40             	cmp    $0x40,%eax
ffffffff8001e06a:	74 54                	je     ffffffff8001e0c0 <_ZN3Net6Socket6AcceptEii+0xe0>
            if (!g_sockets[i].Active) {
ffffffff8001e06c:	80 3a 00             	cmpb   $0x0,(%rdx)
ffffffff8001e06f:	75 ef                	jne    ffffffff8001e060 <_ZN3Net6Socket6AcceptEii+0x80>
                g_sockets[i].Active = true;
                g_sockets[i].Type = SOCK_TCP;
                g_sockets[i].OwnerPid = pid;
                g_sockets[i].TcpConn = clientConn;
                g_sockets[i].UdpState = nullptr;
                g_sockets[i].LocalPort = g_sockets[fd].LocalPort;
ffffffff8001e071:	48 8d 0c 9b          	lea    (%rbx,%rbx,4),%rcx
                g_sockets[i].Active = true;
ffffffff8001e075:	48 63 d0             	movslq %eax,%rdx
                g_sockets[i].LocalPort = g_sockets[fd].LocalPort;
ffffffff8001e078:	0f b7 0c cd 00 04 15 	movzwl -0x7feafc00(,%rcx,8),%ecx
ffffffff8001e07f:	80 
                g_sockets[i].Active = true;
ffffffff8001e080:	48 8d 14 92          	lea    (%rdx,%rdx,4),%rdx
ffffffff8001e084:	48 c1 e2 03          	shl    $0x3,%rdx
ffffffff8001e088:	c6 82 e0 03 15 80 01 	movb   $0x1,-0x7feafc20(%rdx)
                g_sockets[i].Type = SOCK_TCP;
ffffffff8001e08f:	c7 82 e4 03 15 80 01 	movl   $0x1,-0x7feafc1c(%rdx)
ffffffff8001e096:	00 00 00 
                g_sockets[i].OwnerPid = pid;
ffffffff8001e099:	44 89 a2 e8 03 15 80 	mov    %r12d,-0x7feafc18(%rdx)
                g_sockets[i].TcpConn = clientConn;
ffffffff8001e0a0:	48 89 ba f0 03 15 80 	mov    %rdi,-0x7feafc10(%rdx)
                g_sockets[i].UdpState = nullptr;
ffffffff8001e0a7:	48 c7 82 f8 03 15 80 	movq   $0x0,-0x7feafc08(%rdx)
ffffffff8001e0ae:	00 00 00 00 
                g_sockets[i].LocalPort = g_sockets[fd].LocalPort;
ffffffff8001e0b2:	66 89 8a 00 04 15 80 	mov    %cx,-0x7feafc00(%rdx)
        }

        // No free socket slot — close the accepted connection
        Tcp::Close(clientConn);
        return -1;
    }
ffffffff8001e0b9:	5b                   	pop    %rbx
ffffffff8001e0ba:	41 5c                	pop    %r12
ffffffff8001e0bc:	5d                   	pop    %rbp
ffffffff8001e0bd:	c3                   	ret
ffffffff8001e0be:	66 90                	xchg   %ax,%ax
        Tcp::Close(clientConn);
ffffffff8001e0c0:	e8 9b 14 00 00       	call   ffffffff8001f560 <_ZN3Net3Tcp5CloseEPNS0_10ConnectionE>
    }
ffffffff8001e0c5:	5b                   	pop    %rbx
        if (!ValidFd(fd, pid)) return -1;
ffffffff8001e0c6:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
    }
ffffffff8001e0cb:	41 5c                	pop    %r12
ffffffff8001e0cd:	5d                   	pop    %rbp
ffffffff8001e0ce:	c3                   	ret
ffffffff8001e0cf:	90                   	nop
        if (!ValidFd(fd, pid)) return -1;
ffffffff8001e0d0:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
    }
ffffffff8001e0d5:	c3                   	ret
ffffffff8001e0d6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001e0dd:	00 00 00 

ffffffff8001e0e0 <_ZN3Net6Socket4SendEiPKhji>:
        if (fd < 0 || fd >= MAX_SOCKETS) return false;
ffffffff8001e0e0:	83 ff 3f             	cmp    $0x3f,%edi
ffffffff8001e0e3:	77 1c                	ja     ffffffff8001e101 <_ZN3Net6Socket4SendEiPKhji+0x21>
        if (!g_sockets[fd].Active) return false;
ffffffff8001e0e5:	48 63 ff             	movslq %edi,%rdi
ffffffff8001e0e8:	48 8d 04 bf          	lea    (%rdi,%rdi,4),%rax
ffffffff8001e0ec:	48 c1 e0 03          	shl    $0x3,%rax
ffffffff8001e0f0:	80 b8 e0 03 15 80 00 	cmpb   $0x0,-0x7feafc20(%rax)
ffffffff8001e0f7:	74 08                	je     ffffffff8001e101 <_ZN3Net6Socket4SendEiPKhji+0x21>
        if (g_sockets[fd].OwnerPid != pid) return false;
ffffffff8001e0f9:	3b 88 e8 03 15 80    	cmp    -0x7feafc18(%rax),%ecx
ffffffff8001e0ff:	74 0f                	je     ffffffff8001e110 <_ZN3Net6Socket4SendEiPKhji+0x30>
    int Send(int fd, const uint8_t* data, uint32_t len, int pid) {
        if (!ValidFd(fd, pid)) return -1;
        if (g_sockets[fd].Type != SOCK_TCP) return -1;
        if (g_sockets[fd].TcpConn == nullptr) return -1;
        return Tcp::Send(g_sockets[fd].TcpConn, data, (uint16_t)len);
    }
ffffffff8001e101:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
ffffffff8001e106:	c3                   	ret
ffffffff8001e107:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001e10e:	00 00 
        if (g_sockets[fd].Type != SOCK_TCP) return -1;
ffffffff8001e110:	83 b8 e4 03 15 80 01 	cmpl   $0x1,-0x7feafc1c(%rax)
ffffffff8001e117:	75 e8                	jne    ffffffff8001e101 <_ZN3Net6Socket4SendEiPKhji+0x21>
        if (g_sockets[fd].TcpConn == nullptr) return -1;
ffffffff8001e119:	48 8b b8 f0 03 15 80 	mov    -0x7feafc10(%rax),%rdi
ffffffff8001e120:	48 85 ff             	test   %rdi,%rdi
ffffffff8001e123:	74 dc                	je     ffffffff8001e101 <_ZN3Net6Socket4SendEiPKhji+0x21>
        return Tcp::Send(g_sockets[fd].TcpConn, data, (uint16_t)len);
ffffffff8001e125:	0f b7 d2             	movzwl %dx,%edx
ffffffff8001e128:	e9 83 10 00 00       	jmp    ffffffff8001f1b0 <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht>
ffffffff8001e12d:	0f 1f 00             	nopl   (%rax)

ffffffff8001e130 <_ZN3Net6Socket4RecvEiPhji>:
        if (fd < 0 || fd >= MAX_SOCKETS) return false;
ffffffff8001e130:	83 ff 3f             	cmp    $0x3f,%edi
ffffffff8001e133:	77 1c                	ja     ffffffff8001e151 <_ZN3Net6Socket4RecvEiPhji+0x21>
        if (!g_sockets[fd].Active) return false;
ffffffff8001e135:	48 63 ff             	movslq %edi,%rdi
ffffffff8001e138:	48 8d 04 bf          	lea    (%rdi,%rdi,4),%rax
ffffffff8001e13c:	48 c1 e0 03          	shl    $0x3,%rax
ffffffff8001e140:	80 b8 e0 03 15 80 00 	cmpb   $0x0,-0x7feafc20(%rax)
ffffffff8001e147:	74 08                	je     ffffffff8001e151 <_ZN3Net6Socket4RecvEiPhji+0x21>
        if (g_sockets[fd].OwnerPid != pid) return false;
ffffffff8001e149:	3b 88 e8 03 15 80    	cmp    -0x7feafc18(%rax),%ecx
ffffffff8001e14f:	74 0f                	je     ffffffff8001e160 <_ZN3Net6Socket4RecvEiPhji+0x30>
    int Recv(int fd, uint8_t* buf, uint32_t maxLen, int pid) {
        if (!ValidFd(fd, pid)) return -1;
        if (g_sockets[fd].Type != SOCK_TCP) return -1;
        if (g_sockets[fd].TcpConn == nullptr) return -1;
        return Tcp::ReceiveNonBlocking(g_sockets[fd].TcpConn, buf, (uint16_t)maxLen);
    }
ffffffff8001e151:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
ffffffff8001e156:	c3                   	ret
ffffffff8001e157:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001e15e:	00 00 
        if (g_sockets[fd].Type != SOCK_TCP) return -1;
ffffffff8001e160:	83 b8 e4 03 15 80 01 	cmpl   $0x1,-0x7feafc1c(%rax)
ffffffff8001e167:	75 e8                	jne    ffffffff8001e151 <_ZN3Net6Socket4RecvEiPhji+0x21>
        if (g_sockets[fd].TcpConn == nullptr) return -1;
ffffffff8001e169:	48 8b b8 f0 03 15 80 	mov    -0x7feafc10(%rax),%rdi
ffffffff8001e170:	48 85 ff             	test   %rdi,%rdi
ffffffff8001e173:	74 dc                	je     ffffffff8001e151 <_ZN3Net6Socket4RecvEiPhji+0x21>
        return Tcp::ReceiveNonBlocking(g_sockets[fd].TcpConn, buf, (uint16_t)maxLen);
ffffffff8001e175:	0f b7 d2             	movzwl %dx,%edx
ffffffff8001e178:	e9 c3 12 00 00       	jmp    ffffffff8001f440 <_ZN3Net3Tcp18ReceiveNonBlockingEPNS0_10ConnectionEPht>
ffffffff8001e17d:	0f 1f 00             	nopl   (%rax)

ffffffff8001e180 <_ZN3Net6Socket6SendToEiPKhjjti>:
        if (fd < 0 || fd >= MAX_SOCKETS) return false;
ffffffff8001e180:	83 ff 3f             	cmp    $0x3f,%edi
ffffffff8001e183:	77 4b                	ja     ffffffff8001e1d0 <_ZN3Net6Socket6SendToEiPKhjjti+0x50>
        if (!g_sockets[fd].Active) return false;
ffffffff8001e185:	48 63 ff             	movslq %edi,%rdi
ffffffff8001e188:	48 8d 04 bf          	lea    (%rdi,%rdi,4),%rax
ffffffff8001e18c:	48 c1 e0 03          	shl    $0x3,%rax
ffffffff8001e190:	80 b8 e0 03 15 80 00 	cmpb   $0x0,-0x7feafc20(%rax)
ffffffff8001e197:	74 37                	je     ffffffff8001e1d0 <_ZN3Net6Socket6SendToEiPKhjjti+0x50>

    int SendTo(int fd, const uint8_t* data, uint32_t len,
               uint32_t destIp, uint16_t destPort, int pid) {
ffffffff8001e199:	55                   	push   %rbp
ffffffff8001e19a:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001e19d:	41 57                	push   %r15
ffffffff8001e19f:	41 56                	push   %r14
ffffffff8001e1a1:	41 55                	push   %r13
ffffffff8001e1a3:	41 54                	push   %r12
ffffffff8001e1a5:	53                   	push   %rbx
ffffffff8001e1a6:	89 d3                	mov    %edx,%ebx
        if (g_sockets[fd].OwnerPid != pid) return false;
ffffffff8001e1a8:	48 8d 90 e0 03 15 80 	lea    -0x7feafc20(%rax),%rdx
               uint32_t destIp, uint16_t destPort, int pid) {
ffffffff8001e1af:	48 83 ec 08          	sub    $0x8,%rsp
        if (g_sockets[fd].OwnerPid != pid) return false;
ffffffff8001e1b3:	44 3b 88 e8 03 15 80 	cmp    -0x7feafc18(%rax),%r9d
ffffffff8001e1ba:	74 24                	je     ffffffff8001e1e0 <_ZN3Net6Socket6SendToEiPKhjjti+0x60>

        if (!Udp::Send(destIp, us->LocalPort, destPort, data, (uint16_t)len)) {
            return -1;
        }
        return (int)len;
    }
ffffffff8001e1bc:	48 83 c4 08          	add    $0x8,%rsp
        if (!ValidFd(fd, pid)) return -1;
ffffffff8001e1c0:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
    }
ffffffff8001e1c5:	5b                   	pop    %rbx
ffffffff8001e1c6:	41 5c                	pop    %r12
ffffffff8001e1c8:	41 5d                	pop    %r13
ffffffff8001e1ca:	41 5e                	pop    %r14
ffffffff8001e1cc:	41 5f                	pop    %r15
ffffffff8001e1ce:	5d                   	pop    %rbp
ffffffff8001e1cf:	c3                   	ret
        if (!ValidFd(fd, pid)) return -1;
ffffffff8001e1d0:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
    }
ffffffff8001e1d5:	c3                   	ret
ffffffff8001e1d6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001e1dd:	00 00 00 
        if (g_sockets[fd].Type != SOCK_UDP) return -1;
ffffffff8001e1e0:	83 b8 e4 03 15 80 02 	cmpl   $0x2,-0x7feafc1c(%rax)
ffffffff8001e1e7:	75 d3                	jne    ffffffff8001e1bc <_ZN3Net6Socket6SendToEiPKhjjti+0x3c>
        UdpSocketState* us = g_sockets[fd].UdpState;
ffffffff8001e1e9:	4c 8b b8 f8 03 15 80 	mov    -0x7feafc08(%rax),%r15
        if (!us) return -1;
ffffffff8001e1f0:	4d 85 ff             	test   %r15,%r15
ffffffff8001e1f3:	74 c7                	je     ffffffff8001e1bc <_ZN3Net6Socket6SendToEiPKhjjti+0x3c>
ffffffff8001e1f5:	49 89 f6             	mov    %rsi,%r14
        if (us->LocalPort == 0) {
ffffffff8001e1f8:	41 0f b7 b7 0c 10 00 	movzwl 0x100c(%r15),%esi
ffffffff8001e1ff:	00 
ffffffff8001e200:	41 89 cd             	mov    %ecx,%r13d
ffffffff8001e203:	45 89 c4             	mov    %r8d,%r12d
ffffffff8001e206:	66 85 f6             	test   %si,%si
ffffffff8001e209:	75 44                	jne    ffffffff8001e24f <_ZN3Net6Socket6SendToEiPKhjjti+0xcf>
        uint16_t port = g_nextEphemeralPort++;
ffffffff8001e20b:	0f b7 3d 48 ff 00 00 	movzwl 0xff48(%rip),%edi        # ffffffff8002e15a <_ZN3Net6SocketL19g_nextEphemeralPortE>
        if (g_nextEphemeralPort == 0) g_nextEphemeralPort = 49152;
ffffffff8001e212:	b9 00 c0 ff ff       	mov    $0xffffc000,%ecx
            if (!Udp::Bind(ep, UdpSocketDispatcher)) return -1;
ffffffff8001e217:	48 c7 c6 00 db 01 80 	mov    $0xffffffff8001db00,%rsi
ffffffff8001e21e:	89 f8                	mov    %edi,%eax
            us->LocalPort = ep;
ffffffff8001e220:	66 41 89 bf 0c 10 00 	mov    %di,0x100c(%r15)
ffffffff8001e227:	00 
ffffffff8001e228:	66 83 c0 01          	add    $0x1,%ax
            g_sockets[fd].LocalPort = ep;
ffffffff8001e22c:	66 89 7a 20          	mov    %di,0x20(%rdx)
ffffffff8001e230:	0f 44 c1             	cmove  %ecx,%eax
        uint16_t port = g_nextEphemeralPort++;
ffffffff8001e233:	66 89 05 20 ff 00 00 	mov    %ax,0xff20(%rip)        # ffffffff8002e15a <_ZN3Net6SocketL19g_nextEphemeralPortE>
            if (!Udp::Bind(ep, UdpSocketDispatcher)) return -1;
ffffffff8001e23a:	e8 e1 16 00 00       	call   ffffffff8001f920 <_ZN3Net3Udp4BindEtPFvjttPKhtE>
ffffffff8001e23f:	84 c0                	test   %al,%al
ffffffff8001e241:	0f 84 75 ff ff ff    	je     ffffffff8001e1bc <_ZN3Net6Socket6SendToEiPKhjjti+0x3c>
        if (!Udp::Send(destIp, us->LocalPort, destPort, data, (uint16_t)len)) {
ffffffff8001e247:	41 0f b7 b7 0c 10 00 	movzwl 0x100c(%r15),%esi
ffffffff8001e24e:	00 
ffffffff8001e24f:	41 0f b7 d4          	movzwl %r12w,%edx
ffffffff8001e253:	44 0f b7 c3          	movzwl %bx,%r8d
ffffffff8001e257:	4c 89 f1             	mov    %r14,%rcx
ffffffff8001e25a:	44 89 ef             	mov    %r13d,%edi
ffffffff8001e25d:	e8 fe 15 00 00       	call   ffffffff8001f860 <_ZN3Net3Udp4SendEjttPKht>
ffffffff8001e262:	84 c0                	test   %al,%al
ffffffff8001e264:	0f 84 52 ff ff ff    	je     ffffffff8001e1bc <_ZN3Net6Socket6SendToEiPKhjjti+0x3c>
    }
ffffffff8001e26a:	48 83 c4 08          	add    $0x8,%rsp
        return (int)len;
ffffffff8001e26e:	89 d8                	mov    %ebx,%eax
    }
ffffffff8001e270:	5b                   	pop    %rbx
ffffffff8001e271:	41 5c                	pop    %r12
ffffffff8001e273:	41 5d                	pop    %r13
ffffffff8001e275:	41 5e                	pop    %r14
ffffffff8001e277:	41 5f                	pop    %r15
ffffffff8001e279:	5d                   	pop    %rbp
ffffffff8001e27a:	c3                   	ret
ffffffff8001e27b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff8001e280 <_ZN3Net6Socket8RecvFromEiPhjPjPti>:

    int RecvFrom(int fd, uint8_t* buf, uint32_t maxLen,
                 uint32_t* srcIp, uint16_t* srcPort, int pid) {
ffffffff8001e280:	55                   	push   %rbp
ffffffff8001e281:	48 63 c7             	movslq %edi,%rax
ffffffff8001e284:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001e287:	41 54                	push   %r12
        if (!ValidFd(fd, pid)) return -1;
ffffffff8001e289:	41 bc ff ff ff ff    	mov    $0xffffffff,%r12d
                 uint32_t* srcIp, uint16_t* srcPort, int pid) {
ffffffff8001e28f:	53                   	push   %rbx
ffffffff8001e290:	48 83 ec 10          	sub    $0x10,%rsp
        if (fd < 0 || fd >= MAX_SOCKETS) return false;
ffffffff8001e294:	83 f8 3f             	cmp    $0x3f,%eax
ffffffff8001e297:	0f 87 5a 01 00 00    	ja     ffffffff8001e3f7 <_ZN3Net6Socket8RecvFromEiPhjPjPti+0x177>
        if (!g_sockets[fd].Active) return false;
ffffffff8001e29d:	48 8d 04 80          	lea    (%rax,%rax,4),%rax
ffffffff8001e2a1:	48 c1 e0 03          	shl    $0x3,%rax
ffffffff8001e2a5:	80 b8 e0 03 15 80 00 	cmpb   $0x0,-0x7feafc20(%rax)
ffffffff8001e2ac:	0f 84 45 01 00 00    	je     ffffffff8001e3f7 <_ZN3Net6Socket8RecvFromEiPhjPjPti+0x177>
        if (g_sockets[fd].OwnerPid != pid) return false;
ffffffff8001e2b2:	44 3b 88 e8 03 15 80 	cmp    -0x7feafc18(%rax),%r9d
ffffffff8001e2b9:	0f 85 38 01 00 00    	jne    ffffffff8001e3f7 <_ZN3Net6Socket8RecvFromEiPhjPjPti+0x177>
        if (g_sockets[fd].Type != SOCK_UDP) return -1;
ffffffff8001e2bf:	83 b8 e4 03 15 80 02 	cmpl   $0x2,-0x7feafc1c(%rax)
ffffffff8001e2c6:	0f 85 2b 01 00 00    	jne    ffffffff8001e3f7 <_ZN3Net6Socket8RecvFromEiPhjPjPti+0x177>
ffffffff8001e2cc:	49 89 ca             	mov    %rcx,%r10

        UdpSocketState* us = g_sockets[fd].UdpState;
ffffffff8001e2cf:	48 8b 88 f8 03 15 80 	mov    -0x7feafc08(%rax),%rcx
        if (!us) return -1;
ffffffff8001e2d6:	48 85 c9             	test   %rcx,%rcx
ffffffff8001e2d9:	0f 84 18 01 00 00    	je     ffffffff8001e3f7 <_ZN3Net6Socket8RecvFromEiPhjPjPti+0x177>

        if (us->Count < sizeof(UdpDgramHeader)) {
ffffffff8001e2df:	44 8b 89 08 10 00 00 	mov    0x1008(%rcx),%r9d
ffffffff8001e2e6:	41 83 f9 07          	cmp    $0x7,%r9d
ffffffff8001e2ea:	0f 86 07 01 00 00    	jbe    ffffffff8001e3f7 <_ZN3Net6Socket8RecvFromEiPhjPjPti+0x177>
ffffffff8001e2f0:	8b 81 00 10 00 00    	mov    0x1000(%rcx),%eax
ffffffff8001e2f6:	41 89 d3             	mov    %edx,%r11d
ffffffff8001e2f9:	48 89 f7             	mov    %rsi,%rdi
ffffffff8001e2fc:	48 8d 55 e8          	lea    -0x18(%rbp),%rdx

        // Dequeue header
        UdpDgramHeader hdr;
        uint8_t* hdrBytes = (uint8_t*)&hdr;
        for (uint32_t j = 0; j < sizeof(UdpDgramHeader); j++) {
            hdrBytes[j] = us->Ring[us->Head];
ffffffff8001e300:	89 c6                	mov    %eax,%esi
        for (uint32_t j = 0; j < sizeof(UdpDgramHeader); j++) {
ffffffff8001e302:	48 83 c2 01          	add    $0x1,%rdx
ffffffff8001e306:	48 8d 5d f0          	lea    -0x10(%rbp),%rbx
            us->Head = (us->Head + 1) % UDP_RING_SIZE;
ffffffff8001e30a:	83 c0 01             	add    $0x1,%eax
            hdrBytes[j] = us->Ring[us->Head];
ffffffff8001e30d:	0f b6 34 31          	movzbl (%rcx,%rsi,1),%esi
            us->Head = (us->Head + 1) % UDP_RING_SIZE;
ffffffff8001e311:	25 ff 0f 00 00       	and    $0xfff,%eax
            hdrBytes[j] = us->Ring[us->Head];
ffffffff8001e316:	40 88 72 ff          	mov    %sil,-0x1(%rdx)
        for (uint32_t j = 0; j < sizeof(UdpDgramHeader); j++) {
ffffffff8001e31a:	48 39 d3             	cmp    %rdx,%rbx
ffffffff8001e31d:	75 e1                	jne    ffffffff8001e300 <_ZN3Net6Socket8RecvFromEiPhjPjPti+0x80>
        }
        us->Count -= sizeof(UdpDgramHeader);

        // Dequeue payload
        uint16_t copyLen = hdr.DataLen;
ffffffff8001e31f:	0f b7 5d ee          	movzwl -0x12(%rbp),%ebx
        us->Count -= sizeof(UdpDgramHeader);
ffffffff8001e323:	41 8d 51 f8          	lea    -0x8(%r9),%edx
ffffffff8001e327:	89 81 00 10 00 00    	mov    %eax,0x1000(%rcx)
ffffffff8001e32d:	89 91 08 10 00 00    	mov    %edx,0x1008(%rcx)
        uint16_t copyLen = hdr.DataLen;
ffffffff8001e333:	41 89 d9             	mov    %ebx,%r9d
        if (copyLen > maxLen) copyLen = (uint16_t)maxLen;
ffffffff8001e336:	41 39 db             	cmp    %ebx,%r11d
ffffffff8001e339:	0f 83 c9 00 00 00    	jae    ffffffff8001e408 <_ZN3Net6Socket8RecvFromEiPhjPjPti+0x188>
ffffffff8001e33f:	44 89 de             	mov    %r11d,%esi

        for (uint16_t j = 0; j < copyLen; j++) {
ffffffff8001e342:	45 31 e4             	xor    %r12d,%r12d
ffffffff8001e345:	66 45 85 db          	test   %r11w,%r11w
ffffffff8001e349:	74 75                	je     ffffffff8001e3c0 <_ZN3Net6Socket8RecvFromEiPhjPjPti+0x140>
ffffffff8001e34b:	31 d2                	xor    %edx,%edx
ffffffff8001e34d:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001e354:	00 00 00 00 
ffffffff8001e358:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001e35f:	00 00 00 00 
ffffffff8001e363:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001e36a:	00 00 00 00 
ffffffff8001e36e:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001e375:	00 00 00 00 
ffffffff8001e379:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            buf[j] = us->Ring[us->Head];
ffffffff8001e380:	0f b6 04 01          	movzbl (%rcx,%rax,1),%eax
ffffffff8001e384:	88 04 17             	mov    %al,(%rdi,%rdx,1)
            us->Head = (us->Head + 1) % UDP_RING_SIZE;
ffffffff8001e387:	8b 81 00 10 00 00    	mov    0x1000(%rcx),%eax
        for (uint16_t j = 0; j < copyLen; j++) {
ffffffff8001e38d:	48 83 c2 01          	add    $0x1,%rdx
            us->Head = (us->Head + 1) % UDP_RING_SIZE;
ffffffff8001e391:	83 c0 01             	add    $0x1,%eax
ffffffff8001e394:	25 ff 0f 00 00       	and    $0xfff,%eax
ffffffff8001e399:	89 81 00 10 00 00    	mov    %eax,0x1000(%rcx)
        for (uint16_t j = 0; j < copyLen; j++) {
ffffffff8001e39f:	66 39 f2             	cmp    %si,%dx
ffffffff8001e3a2:	72 dc                	jb     ffffffff8001e380 <_ZN3Net6Socket8RecvFromEiPhjPjPti+0x100>

        // Skip remaining data if buffer was too small
        for (uint16_t j = copyLen; j < hdr.DataLen; j++) {
            us->Head = (us->Head + 1) % UDP_RING_SIZE;
        }
        us->Count -= hdr.DataLen;
ffffffff8001e3a4:	8b 91 08 10 00 00    	mov    0x1008(%rcx),%edx

        if (srcIp) *srcIp = hdr.SrcIp;
        if (srcPort) *srcPort = hdr.SrcPort;

        return (int)copyLen;
ffffffff8001e3aa:	44 0f b7 e6          	movzwl %si,%r12d
        for (uint16_t j = copyLen; j < hdr.DataLen; j++) {
ffffffff8001e3ae:	66 44 39 ce          	cmp    %r9w,%si
ffffffff8001e3b2:	73 23                	jae    ffffffff8001e3d7 <_ZN3Net6Socket8RecvFromEiPhjPjPti+0x157>
ffffffff8001e3b4:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001e3bb:	00 00 00 00 
ffffffff8001e3bf:	90                   	nop
            us->Head = (us->Head + 1) % UDP_RING_SIZE;
ffffffff8001e3c0:	83 c0 01             	add    $0x1,%eax
        for (uint16_t j = copyLen; j < hdr.DataLen; j++) {
ffffffff8001e3c3:	83 c6 01             	add    $0x1,%esi
            us->Head = (us->Head + 1) % UDP_RING_SIZE;
ffffffff8001e3c6:	25 ff 0f 00 00       	and    $0xfff,%eax
        for (uint16_t j = copyLen; j < hdr.DataLen; j++) {
ffffffff8001e3cb:	66 44 39 ce          	cmp    %r9w,%si
ffffffff8001e3cf:	72 ef                	jb     ffffffff8001e3c0 <_ZN3Net6Socket8RecvFromEiPhjPjPti+0x140>
ffffffff8001e3d1:	89 81 00 10 00 00    	mov    %eax,0x1000(%rcx)
        us->Count -= hdr.DataLen;
ffffffff8001e3d7:	29 da                	sub    %ebx,%edx
ffffffff8001e3d9:	89 91 08 10 00 00    	mov    %edx,0x1008(%rcx)
        if (srcIp) *srcIp = hdr.SrcIp;
ffffffff8001e3df:	4d 85 d2             	test   %r10,%r10
ffffffff8001e3e2:	74 06                	je     ffffffff8001e3ea <_ZN3Net6Socket8RecvFromEiPhjPjPti+0x16a>
ffffffff8001e3e4:	8b 45 e8             	mov    -0x18(%rbp),%eax
ffffffff8001e3e7:	41 89 02             	mov    %eax,(%r10)
        if (srcPort) *srcPort = hdr.SrcPort;
ffffffff8001e3ea:	4d 85 c0             	test   %r8,%r8
ffffffff8001e3ed:	74 08                	je     ffffffff8001e3f7 <_ZN3Net6Socket8RecvFromEiPhjPjPti+0x177>
ffffffff8001e3ef:	0f b7 45 ec          	movzwl -0x14(%rbp),%eax
ffffffff8001e3f3:	66 41 89 00          	mov    %ax,(%r8)
    }
ffffffff8001e3f7:	48 83 c4 10          	add    $0x10,%rsp
ffffffff8001e3fb:	44 89 e0             	mov    %r12d,%eax
ffffffff8001e3fe:	5b                   	pop    %rbx
ffffffff8001e3ff:	41 5c                	pop    %r12
ffffffff8001e401:	5d                   	pop    %rbp
ffffffff8001e402:	c3                   	ret
ffffffff8001e403:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        for (uint16_t j = 0; j < copyLen; j++) {
ffffffff8001e408:	66 85 db             	test   %bx,%bx
ffffffff8001e40b:	74 07                	je     ffffffff8001e414 <_ZN3Net6Socket8RecvFromEiPhjPjPti+0x194>
ffffffff8001e40d:	89 de                	mov    %ebx,%esi
ffffffff8001e40f:	e9 37 ff ff ff       	jmp    ffffffff8001e34b <_ZN3Net6Socket8RecvFromEiPhjPjPti+0xcb>
ffffffff8001e414:	45 31 e4             	xor    %r12d,%r12d
ffffffff8001e417:	eb be                	jmp    ffffffff8001e3d7 <_ZN3Net6Socket8RecvFromEiPhjPjPti+0x157>
ffffffff8001e419:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff8001e420 <_ZN3Net6Socket5CloseEii>:
        if (fd < 0 || fd >= MAX_SOCKETS) return false;
ffffffff8001e420:	83 ff 3f             	cmp    $0x3f,%edi
ffffffff8001e423:	0f 87 97 00 00 00    	ja     ffffffff8001e4c0 <_ZN3Net6Socket5CloseEii+0xa0>

    void Close(int fd, int pid) {
ffffffff8001e429:	55                   	push   %rbp
ffffffff8001e42a:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001e42d:	41 54                	push   %r12
ffffffff8001e42f:	53                   	push   %rbx
        if (!g_sockets[fd].Active) return false;
ffffffff8001e430:	48 63 df             	movslq %edi,%rbx
ffffffff8001e433:	48 8d 04 9b          	lea    (%rbx,%rbx,4),%rax
ffffffff8001e437:	48 c1 e0 03          	shl    $0x3,%rax
ffffffff8001e43b:	80 b8 e0 03 15 80 00 	cmpb   $0x0,-0x7feafc20(%rax)
ffffffff8001e442:	74 6d                	je     ffffffff8001e4b1 <_ZN3Net6Socket5CloseEii+0x91>
        if (g_sockets[fd].OwnerPid != pid) return false;
ffffffff8001e444:	4c 8d a0 e0 03 15 80 	lea    -0x7feafc20(%rax),%r12
ffffffff8001e44b:	3b b0 e8 03 15 80    	cmp    -0x7feafc18(%rax),%esi
ffffffff8001e451:	75 5e                	jne    ffffffff8001e4b1 <_ZN3Net6Socket5CloseEii+0x91>
        if (!ValidFd(fd, pid)) return;
        if (g_sockets[fd].TcpConn != nullptr) {
ffffffff8001e453:	48 8b b8 f0 03 15 80 	mov    -0x7feafc10(%rax),%rdi
ffffffff8001e45a:	48 85 ff             	test   %rdi,%rdi
ffffffff8001e45d:	74 0e                	je     ffffffff8001e46d <_ZN3Net6Socket5CloseEii+0x4d>
            Tcp::Close(g_sockets[fd].TcpConn);
ffffffff8001e45f:	e8 fc 10 00 00       	call   ffffffff8001f560 <_ZN3Net3Tcp5CloseEPNS0_10ConnectionE>
            g_sockets[fd].TcpConn = nullptr;
ffffffff8001e464:	49 c7 44 24 10 00 00 	movq   $0x0,0x10(%r12)
ffffffff8001e46b:	00 00 
        }
        if (g_sockets[fd].UdpState != nullptr) {
ffffffff8001e46d:	48 8d 04 9b          	lea    (%rbx,%rbx,4),%rax
ffffffff8001e471:	4c 8b 24 c5 f8 03 15 	mov    -0x7feafc08(,%rax,8),%r12
ffffffff8001e478:	80 
ffffffff8001e479:	4d 85 e4             	test   %r12,%r12
ffffffff8001e47c:	74 27                	je     ffffffff8001e4a5 <_ZN3Net6Socket5CloseEii+0x85>
            if (state->LocalPort != 0) {
ffffffff8001e47e:	41 0f b7 bc 24 0c 10 	movzwl 0x100c(%r12),%edi
ffffffff8001e485:	00 00 
ffffffff8001e487:	66 85 ff             	test   %di,%di
ffffffff8001e48a:	75 3c                	jne    ffffffff8001e4c8 <_ZN3Net6Socket5CloseEii+0xa8>
            state->Active = false;
ffffffff8001e48c:	41 c6 84 24 0e 10 00 	movb   $0x0,0x100e(%r12)
ffffffff8001e493:	00 00 
            FreeUdpState(g_sockets[fd].UdpState);
            g_sockets[fd].UdpState = nullptr;
ffffffff8001e495:	48 8d 04 9b          	lea    (%rbx,%rbx,4),%rax
ffffffff8001e499:	48 c7 04 c5 f8 03 15 	movq   $0x0,-0x7feafc08(,%rax,8)
ffffffff8001e4a0:	80 00 00 00 00 
        }
        g_sockets[fd].Active = false;
ffffffff8001e4a5:	48 8d 04 9b          	lea    (%rbx,%rbx,4),%rax
ffffffff8001e4a9:	c6 04 c5 e0 03 15 80 	movb   $0x0,-0x7feafc20(,%rax,8)
ffffffff8001e4b0:	00 
    }
ffffffff8001e4b1:	5b                   	pop    %rbx
ffffffff8001e4b2:	41 5c                	pop    %r12
ffffffff8001e4b4:	5d                   	pop    %rbp
ffffffff8001e4b5:	c3                   	ret
ffffffff8001e4b6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001e4bd:	00 00 00 
ffffffff8001e4c0:	c3                   	ret
ffffffff8001e4c1:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
                Udp::Unbind(state->LocalPort);
ffffffff8001e4c8:	e8 d3 14 00 00       	call   ffffffff8001f9a0 <_ZN3Net3Udp6UnbindEt>
ffffffff8001e4cd:	eb bd                	jmp    ffffffff8001e48c <_ZN3Net6Socket5CloseEii+0x6c>
ffffffff8001e4cf:	90                   	nop

ffffffff8001e4d0 <_ZN3Net3TcpL9SendResetEjttjj>:
        return Ipv4::Send(conn->RemoteIp, Ipv4::PROTO_TCP, packet, totalLen);
    }

    // Send a RST to an unexpected packet
    static void SendReset(uint32_t destIp, uint16_t destPort, uint16_t srcPort,
                           uint32_t seqNum, uint32_t ackNum) {
ffffffff8001e4d0:	55                   	push   %rbp
ffffffff8001e4d1:	66 c1 c2 08          	rol    $0x8,%dx
ffffffff8001e4d5:	66 c1 c6 08          	rol    $0x8,%si
ffffffff8001e4d9:	0f c9                	bswap  %ecx
ffffffff8001e4db:	41 0f c8             	bswap  %r8d
ffffffff8001e4de:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001e4e1:	41 54                	push   %r12
ffffffff8001e4e3:	53                   	push   %rbx
        hdr->Window = 0;
        hdr->Checksum = 0;
        hdr->UrgentPtr = 0;

        uint32_t localIp = Net::GetIpAddress();
        hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001e4e4:	4c 8d 65 dc          	lea    -0x24(%rbp),%r12
                           uint32_t seqNum, uint32_t ackNum) {
ffffffff8001e4e8:	89 fb                	mov    %edi,%ebx
ffffffff8001e4ea:	48 83 ec 20          	sub    $0x20,%rsp
ffffffff8001e4ee:	66 89 55 dc          	mov    %dx,-0x24(%rbp)
ffffffff8001e4f2:	66 89 75 de          	mov    %si,-0x22(%rbp)
        hdr->SeqNum = Htonl(seqNum);
ffffffff8001e4f6:	89 4d e0             	mov    %ecx,-0x20(%rbp)
        hdr->AckNum = Htonl(ackNum);
ffffffff8001e4f9:	44 89 45 e4          	mov    %r8d,-0x1c(%rbp)
        hdr->DataOffset = (HEADER_SIZE / 4) << 4;
ffffffff8001e4fd:	48 c7 45 e8 50 14 00 	movq   $0x1450,-0x18(%rbp)
ffffffff8001e504:	00 
        uint32_t localIp = Net::GetIpAddress();
ffffffff8001e505:	e8 f6 f4 ff ff       	call   ffffffff8001da00 <_ZN3Net12GetIpAddressEv>
        hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001e50a:	4d 89 e0             	mov    %r12,%r8
ffffffff8001e50d:	89 de                	mov    %ebx,%esi
ffffffff8001e50f:	41 b9 14 00 00 00    	mov    $0x14,%r9d
        uint32_t localIp = Net::GetIpAddress();
ffffffff8001e515:	89 c7                	mov    %eax,%edi
        hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001e517:	b9 14 00 00 00       	mov    $0x14,%ecx
ffffffff8001e51c:	ba 06 00 00 00       	mov    $0x6,%edx
ffffffff8001e521:	e8 3a f0 ff ff       	call   ffffffff8001d560 <_ZN3Net4Ipv420PseudoHeaderChecksumEjjhtPKvt>
            localIp, destIp, Ipv4::PROTO_TCP, HEADER_SIZE, packet, HEADER_SIZE);

        Ipv4::Send(destIp, Ipv4::PROTO_TCP, packet, HEADER_SIZE);
ffffffff8001e526:	4c 89 e2             	mov    %r12,%rdx
ffffffff8001e529:	89 df                	mov    %ebx,%edi
ffffffff8001e52b:	b9 14 00 00 00       	mov    $0x14,%ecx
ffffffff8001e530:	be 06 00 00 00       	mov    $0x6,%esi
        hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001e535:	66 89 45 ec          	mov    %ax,-0x14(%rbp)
        Ipv4::Send(destIp, Ipv4::PROTO_TCP, packet, HEADER_SIZE);
ffffffff8001e539:	e8 e2 f1 ff ff       	call   ffffffff8001d720 <_ZN3Net4Ipv44SendEjhPKht>
    }
ffffffff8001e53e:	48 83 c4 20          	add    $0x20,%rsp
ffffffff8001e542:	5b                   	pop    %rbx
ffffffff8001e543:	41 5c                	pop    %r12
ffffffff8001e545:	5d                   	pop    %rbp
ffffffff8001e546:	c3                   	ret
ffffffff8001e547:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001e54e:	00 00 

ffffffff8001e550 <_ZN3Net3TcpL11SendSegmentEPNS0_10ConnectionEhPKht>:
                             const uint8_t* payload, uint16_t payloadLen) {
ffffffff8001e550:	55                   	push   %rbp
ffffffff8001e551:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001e554:	41 55                	push   %r13
ffffffff8001e556:	41 54                	push   %r12
        uint16_t totalLen = HEADER_SIZE + payloadLen;
ffffffff8001e558:	44 8d 61 14          	lea    0x14(%rcx),%r12d
                             const uint8_t* payload, uint16_t payloadLen) {
ffffffff8001e55c:	53                   	push   %rbx
ffffffff8001e55d:	48 89 fb             	mov    %rdi,%rbx
ffffffff8001e560:	48 81 ec e8 05 00 00 	sub    $0x5e8,%rsp
ffffffff8001e567:	0f b7 47 08          	movzwl 0x8(%rdi),%eax
        hdr->DataOffset = (HEADER_SIZE / 4) << 4;
ffffffff8001e56b:	c6 85 10 fa ff ff 50 	movb   $0x50,-0x5f0(%rbp)
        hdr->Flags = flags;
ffffffff8001e572:	40 88 b5 11 fa ff ff 	mov    %sil,-0x5ef(%rbp)
        hdr->Checksum = 0;
ffffffff8001e579:	c7 85 14 fa ff ff 00 	movl   $0x0,-0x5ec(%rbp)
ffffffff8001e580:	00 00 00 
ffffffff8001e583:	66 c1 c0 08          	rol    $0x8,%ax
        hdr->SrcPort = Htons(conn->LocalPort);
ffffffff8001e587:	66 89 85 04 fa ff ff 	mov    %ax,-0x5fc(%rbp)
ffffffff8001e58e:	0f b7 47 10          	movzwl 0x10(%rdi),%eax
ffffffff8001e592:	66 c1 c0 08          	rol    $0x8,%ax
        hdr->DstPort = Htons(conn->RemotePort);
ffffffff8001e596:	66 89 85 06 fa ff ff 	mov    %ax,-0x5fa(%rbp)
        hdr->SeqNum = Htonl(conn->SendNext);
ffffffff8001e59d:	8b 47 14             	mov    0x14(%rdi),%eax
ffffffff8001e5a0:	0f c8                	bswap  %eax
ffffffff8001e5a2:	89 85 08 fa ff ff    	mov    %eax,-0x5f8(%rbp)
        hdr->AckNum = Htonl(conn->RecvNext);
ffffffff8001e5a8:	8b 47 1c             	mov    0x1c(%rdi),%eax
ffffffff8001e5ab:	0f c8                	bswap  %eax
ffffffff8001e5ad:	89 85 0c fa ff ff    	mov    %eax,-0x5f4(%rbp)
        hdr->Window = Htons(WINDOW_SIZE);
ffffffff8001e5b3:	b8 10 00 00 00       	mov    $0x10,%eax
ffffffff8001e5b8:	66 89 85 12 fa ff ff 	mov    %ax,-0x5ee(%rbp)
        if (payload != nullptr && payloadLen > 0) {
ffffffff8001e5bf:	48 85 d2             	test   %rdx,%rdx
ffffffff8001e5c2:	74 05                	je     ffffffff8001e5c9 <_ZN3Net3TcpL11SendSegmentEPNS0_10ConnectionEhPKht+0x79>
ffffffff8001e5c4:	66 85 c9             	test   %cx,%cx
ffffffff8001e5c7:	75 4f                	jne    ffffffff8001e618 <_ZN3Net3TcpL11SendSegmentEPNS0_10ConnectionEhPKht+0xc8>
        hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001e5c9:	45 0f b7 e4          	movzwl %r12w,%r12d
ffffffff8001e5cd:	8b 73 0c             	mov    0xc(%rbx),%esi
ffffffff8001e5d0:	8b 7b 04             	mov    0x4(%rbx),%edi
ffffffff8001e5d3:	ba 06 00 00 00       	mov    $0x6,%edx
ffffffff8001e5d8:	4c 8d ad 04 fa ff ff 	lea    -0x5fc(%rbp),%r13
ffffffff8001e5df:	45 89 e1             	mov    %r12d,%r9d
ffffffff8001e5e2:	44 89 e1             	mov    %r12d,%ecx
ffffffff8001e5e5:	4d 89 e8             	mov    %r13,%r8
ffffffff8001e5e8:	e8 73 ef ff ff       	call   ffffffff8001d560 <_ZN3Net4Ipv420PseudoHeaderChecksumEjjhtPKvt>
        return Ipv4::Send(conn->RemoteIp, Ipv4::PROTO_TCP, packet, totalLen);
ffffffff8001e5ed:	8b 7b 0c             	mov    0xc(%rbx),%edi
ffffffff8001e5f0:	44 89 e1             	mov    %r12d,%ecx
ffffffff8001e5f3:	4c 89 ea             	mov    %r13,%rdx
ffffffff8001e5f6:	be 06 00 00 00       	mov    $0x6,%esi
        hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001e5fb:	66 89 85 14 fa ff ff 	mov    %ax,-0x5ec(%rbp)
        return Ipv4::Send(conn->RemoteIp, Ipv4::PROTO_TCP, packet, totalLen);
ffffffff8001e602:	e8 19 f1 ff ff       	call   ffffffff8001d720 <_ZN3Net4Ipv44SendEjhPKht>
    }
ffffffff8001e607:	48 81 c4 e8 05 00 00 	add    $0x5e8,%rsp
ffffffff8001e60e:	5b                   	pop    %rbx
ffffffff8001e60f:	41 5c                	pop    %r12
ffffffff8001e611:	41 5d                	pop    %r13
ffffffff8001e613:	5d                   	pop    %rbp
ffffffff8001e614:	c3                   	ret
ffffffff8001e615:	0f 1f 00             	nopl   (%rax)
ffffffff8001e618:	48 89 d6             	mov    %rdx,%rsi
            memcpy(packet + HEADER_SIZE, payload, payloadLen);
ffffffff8001e61b:	48 8d bd 18 fa ff ff 	lea    -0x5e8(%rbp),%rdi
ffffffff8001e622:	0f b7 d1             	movzwl %cx,%edx
ffffffff8001e625:	e8 b6 bb ff ff       	call   ffffffff8001a1e0 <memcpy>
ffffffff8001e62a:	eb 9d                	jmp    ffffffff8001e5c9 <_ZN3Net3TcpL11SendSegmentEPNS0_10ConnectionEhPKht+0x79>
ffffffff8001e62c:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001e633:	00 00 00 
ffffffff8001e636:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001e63d:	00 00 00 

ffffffff8001e640 <_ZN3Net3Tcp10InitializeEv>:
            conn->RecvTail = (conn->RecvTail + 1) % RECV_BUFFER_SIZE;
            conn->RecvCount++;
        }
    }

    void Initialize() {
ffffffff8001e640:	55                   	push   %rbp
ffffffff8001e641:	48 c7 c0 24 25 16 80 	mov    $0xffffffff80162524,%rax
ffffffff8001e648:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001e64b:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001e652:	00 00 00 00 
ffffffff8001e656:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001e65d:	00 00 00 
        for (uint32_t i = 0; i < MAX_CONNECTIONS; i++) {
            g_connections[i].Active = false;
ffffffff8001e660:	c6 00 00             	movb   $0x0,(%rax)
        for (uint32_t i = 0; i < MAX_CONNECTIONS; i++) {
ffffffff8001e663:	48 05 70 2c 00 00    	add    $0x2c70,%rax
            g_connections[i].Active = false;
ffffffff8001e669:	c6 80 c8 e9 ff ff 00 	movb   $0x0,-0x1638(%rax)
        for (uint32_t i = 0; i < MAX_CONNECTIONS; i++) {
ffffffff8001e670:	48 3d a4 88 17 80    	cmp    $0xffffffff801788a4,%rax
ffffffff8001e676:	75 e8                	jne    ffffffff8001e660 <_ZN3Net3Tcp10InitializeEv+0x20>
            Print(string);
ffffffff8001e678:	48 c7 c7 7c bb 02 80 	mov    $0xffffffff8002bb7c,%rdi
            g_kernelLogDepth++;
ffffffff8001e67f:	83 05 1e 0e 1c 00 01 	addl   $0x1,0x1c0e1e(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001e686:	e8 35 4b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001e68b:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001e692:	e8 29 4b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001e697:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001e69e:	e8 1d 4b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001e6a3:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001e6aa:	e8 11 4b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001e6af:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001e6b6:	e8 05 4b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001e6bb:	48 c7 c7 1e bc 02 80 	mov    $0xffffffff8002bc1e,%rdi
ffffffff8001e6c2:	e8 f9 4a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001e6c7:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001e6ce:	e8 ed 4a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001e6d3:	83 2d ca 0d 1c 00 01 	subl   $0x1,0x1c0dca(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        }
        KernelLogStream(OK, "Net") << "TCP initialized";
    }
ffffffff8001e6da:	5d                   	pop    %rbp
ffffffff8001e6db:	c3                   	ret
ffffffff8001e6dc:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8001e6e0 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht>:

    void OnPacketReceived(uint32_t srcIp, uint32_t dstIp, const uint8_t* data, uint16_t length) {
        if (length < HEADER_SIZE) {
ffffffff8001e6e0:	66 83 f9 13          	cmp    $0x13,%cx
ffffffff8001e6e4:	77 0a                	ja     ffffffff8001e6f0 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x10>
ffffffff8001e6e6:	c3                   	ret
ffffffff8001e6e7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001e6ee:	00 00 
    void OnPacketReceived(uint32_t srcIp, uint32_t dstIp, const uint8_t* data, uint16_t length) {
ffffffff8001e6f0:	55                   	push   %rbp
        }

        const Header* hdr = (const Header*)data;

        // Verify checksum
        uint16_t check = Ipv4::PseudoHeaderChecksum(srcIp, dstIp, Ipv4::PROTO_TCP,
ffffffff8001e6f1:	49 89 d0             	mov    %rdx,%r8
    void OnPacketReceived(uint32_t srcIp, uint32_t dstIp, const uint8_t* data, uint16_t length) {
ffffffff8001e6f4:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001e6f7:	41 57                	push   %r15
ffffffff8001e6f9:	49 89 d7             	mov    %rdx,%r15
        uint16_t check = Ipv4::PseudoHeaderChecksum(srcIp, dstIp, Ipv4::PROTO_TCP,
ffffffff8001e6fc:	ba 06 00 00 00       	mov    $0x6,%edx
    void OnPacketReceived(uint32_t srcIp, uint32_t dstIp, const uint8_t* data, uint16_t length) {
ffffffff8001e701:	41 56                	push   %r14
ffffffff8001e703:	41 55                	push   %r13
        uint16_t check = Ipv4::PseudoHeaderChecksum(srcIp, dstIp, Ipv4::PROTO_TCP,
ffffffff8001e705:	44 0f b7 e9          	movzwl %cx,%r13d
    void OnPacketReceived(uint32_t srcIp, uint32_t dstIp, const uint8_t* data, uint16_t length) {
ffffffff8001e709:	41 54                	push   %r12
        uint16_t check = Ipv4::PseudoHeaderChecksum(srcIp, dstIp, Ipv4::PROTO_TCP,
ffffffff8001e70b:	45 89 e9             	mov    %r13d,%r9d
ffffffff8001e70e:	41 89 fc             	mov    %edi,%r12d
    void OnPacketReceived(uint32_t srcIp, uint32_t dstIp, const uint8_t* data, uint16_t length) {
ffffffff8001e711:	53                   	push   %rbx
ffffffff8001e712:	89 cb                	mov    %ecx,%ebx
        uint16_t check = Ipv4::PseudoHeaderChecksum(srcIp, dstIp, Ipv4::PROTO_TCP,
ffffffff8001e714:	44 89 e9             	mov    %r13d,%ecx
    void OnPacketReceived(uint32_t srcIp, uint32_t dstIp, const uint8_t* data, uint16_t length) {
ffffffff8001e717:	48 83 ec 38          	sub    $0x38,%rsp
        uint16_t check = Ipv4::PseudoHeaderChecksum(srcIp, dstIp, Ipv4::PROTO_TCP,
ffffffff8001e71b:	e8 40 ee ff ff       	call   ffffffff8001d560 <_ZN3Net4Ipv420PseudoHeaderChecksumEjjhtPKvt>
                                                     length, data, length);
        if (check != 0) {
ffffffff8001e720:	66 85 c0             	test   %ax,%ax
ffffffff8001e723:	0f 85 32 01 00 00    	jne    ffffffff8001e85b <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x17b>
        uint16_t srcPort = Ntohs(hdr->SrcPort);
        uint16_t dstPort = Ntohs(hdr->DstPort);
        uint32_t seqNum  = Ntohl(hdr->SeqNum);
        uint32_t ackNum  = Ntohl(hdr->AckNum);
        uint8_t  flags   = hdr->Flags;
        uint8_t  dataOff = (hdr->DataOffset >> 4) * 4;
ffffffff8001e729:	41 0f b6 4f 0c       	movzbl 0xc(%r15),%ecx
ffffffff8001e72e:	c0 e9 04             	shr    $0x4,%cl
ffffffff8001e731:	c1 e1 02             	shl    $0x2,%ecx

        if (dataOff < HEADER_SIZE || dataOff > length) {
ffffffff8001e734:	80 f9 13             	cmp    $0x13,%cl
ffffffff8001e737:	0f 86 1e 01 00 00    	jbe    ffffffff8001e85b <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x17b>
ffffffff8001e73d:	0f b6 c1             	movzbl %cl,%eax
ffffffff8001e740:	41 39 c5             	cmp    %eax,%r13d
ffffffff8001e743:	0f 8c 12 01 00 00    	jl     ffffffff8001e85b <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x17b>
ffffffff8001e749:	45 0f b7 2f          	movzwl (%r15),%r13d
ffffffff8001e74d:	41 0f b7 7f 02       	movzwl 0x2(%r15),%edi
            return;
        }

        const uint8_t* payload = data + dataOff;
        uint16_t payloadLen = length - dataOff;
ffffffff8001e752:	0f b6 c1             	movzbl %cl,%eax
        for (uint32_t i = 0; i < MAX_CONNECTIONS; i++) {
ffffffff8001e755:	31 d2                	xor    %edx,%edx
ffffffff8001e757:	48 c7 c6 00 0f 16 80 	mov    $0xffffffff80160f00,%rsi
        uint16_t payloadLen = length - dataOff;
ffffffff8001e75e:	29 c3                	sub    %eax,%ebx
ffffffff8001e760:	66 41 c1 c5 08       	rol    $0x8,%r13w
ffffffff8001e765:	66 c1 c7 08          	rol    $0x8,%di
ffffffff8001e769:	48 89 f0             	mov    %rsi,%rax
ffffffff8001e76c:	eb 24                	jmp    ffffffff8001e792 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0xb2>
ffffffff8001e76e:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001e775:	00 00 00 00 
ffffffff8001e779:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        for (uint32_t i = 0; i < MAX_CONNECTIONS; i++) {
ffffffff8001e780:	83 c2 01             	add    $0x1,%edx
ffffffff8001e783:	48 05 38 16 00 00    	add    $0x1638,%rax
ffffffff8001e789:	83 fa 10             	cmp    $0x10,%edx
ffffffff8001e78c:	0f 84 de 00 00 00    	je     ffffffff8001e870 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x190>
            if (c->Active &&
ffffffff8001e792:	80 b8 24 16 00 00 00 	cmpb   $0x0,0x1624(%rax)
ffffffff8001e799:	74 e5                	je     ffffffff8001e780 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0xa0>
ffffffff8001e79b:	66 3b 78 08          	cmp    0x8(%rax),%di
ffffffff8001e79f:	75 df                	jne    ffffffff8001e780 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0xa0>
                c->LocalPort == localPort &&
ffffffff8001e7a1:	44 3b 60 0c          	cmp    0xc(%rax),%r12d
ffffffff8001e7a5:	75 d9                	jne    ffffffff8001e780 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0xa0>
                c->RemoteIp == remoteIp &&
ffffffff8001e7a7:	66 44 3b 68 10       	cmp    0x10(%rax),%r13w
ffffffff8001e7ac:	75 d2                	jne    ffffffff8001e780 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0xa0>
                c->RemotePort == remotePort &&
ffffffff8001e7ae:	83 38 01             	cmpl   $0x1,(%rax)
ffffffff8001e7b1:	74 cd                	je     ffffffff8001e780 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0xa0>
ffffffff8001e7b3:	41 8b 47 04          	mov    0x4(%r15),%eax
            Connection* c = &g_connections[i];
ffffffff8001e7b7:	4c 69 d2 38 16 00 00 	imul   $0x1638,%rdx,%r10
        uint8_t  flags   = hdr->Flags;
ffffffff8001e7be:	45 0f b6 5f 0d       	movzbl 0xd(%r15),%r11d
ffffffff8001e7c3:	88 4d bf             	mov    %cl,-0x41(%rbp)
ffffffff8001e7c6:	0f c8                	bswap  %eax
ffffffff8001e7c8:	89 45 b8             	mov    %eax,-0x48(%rbp)
ffffffff8001e7cb:	41 8b 47 08          	mov    0x8(%r15),%eax
            Connection* c = &g_connections[i];
ffffffff8001e7cf:	4c 89 55 c0          	mov    %r10,-0x40(%rbp)
ffffffff8001e7d3:	4d 8d a2 00 0f 16 80 	lea    -0x7fe9f100(%r10),%r12
ffffffff8001e7da:	0f c8                	bswap  %eax
        uint8_t  flags   = hdr->Flags;
ffffffff8001e7dc:	44 88 5d c8          	mov    %r11b,-0x38(%rbp)
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001e7e0:	89 45 b4             	mov    %eax,-0x4c(%rbp)
ffffffff8001e7e3:	9c                   	pushf
ffffffff8001e7e4:	58                   	pop    %rax
ffffffff8001e7e5:	fa                   	cli
            inner.Acquire();
ffffffff8001e7e6:	4d 8d b4 24 28 16 00 	lea    0x1628(%r12),%r14
ffffffff8001e7ed:	00 
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001e7ee:	49 89 c5             	mov    %rax,%r13
ffffffff8001e7f1:	48 89 45 a8          	mov    %rax,-0x58(%rbp)
            inner.Acquire();
ffffffff8001e7f5:	4c 89 f7             	mov    %r14,%rdi
ffffffff8001e7f8:	e8 b3 d8 fe ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
        }

        conn->Lock.Acquire();

        // RST handling
        if (flags & FLAG_RST) {
ffffffff8001e7fd:	44 0f b6 5d c8       	movzbl -0x38(%rbp),%r11d
ffffffff8001e802:	4c 8b 55 c0          	mov    -0x40(%rbp),%r10
            savedFlags = flags;
ffffffff8001e806:	4d 89 ac 24 30 16 00 	mov    %r13,0x1630(%r12)
ffffffff8001e80d:	00 
ffffffff8001e80e:	0f b6 4d bf          	movzbl -0x41(%rbp),%ecx
ffffffff8001e812:	41 f6 c3 04          	test   $0x4,%r11b
ffffffff8001e816:	0f 85 7b 02 00 00    	jne    ffffffff8001ea97 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x3b7>
            conn->Active = false;
            conn->Lock.Release();
            return;
        }

        switch (conn->CurrentState) {
ffffffff8001e81c:	41 83 ba 00 0f 16 80 	cmpl   $0x8,-0x7fe9f100(%r10)
ffffffff8001e823:	08 
ffffffff8001e824:	77 2a                	ja     ffffffff8001e850 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x170>
ffffffff8001e826:	41 8b 82 00 0f 16 80 	mov    -0x7fe9f100(%r10),%eax
ffffffff8001e82d:	ff 24 c5 88 dd 02 80 	jmp    *-0x7ffd2278(,%rax,8)
                }
                break;
            }

            case State::LastAck: {
                if (flags & FLAG_ACK) {
ffffffff8001e834:	41 83 e3 10          	and    $0x10,%r11d
ffffffff8001e838:	74 16                	je     ffffffff8001e850 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x170>
                    conn->CurrentState = State::Closed;
ffffffff8001e83a:	41 c7 82 00 0f 16 80 	movl   $0x0,-0x7fe9f100(%r10)
ffffffff8001e841:	00 00 00 00 
                    conn->Active = false;
ffffffff8001e845:	41 c6 84 24 24 16 00 	movb   $0x0,0x1624(%r12)
ffffffff8001e84c:	00 00 
ffffffff8001e84e:	66 90                	xchg   %ax,%ax
            inner.Release();
ffffffff8001e850:	4c 89 f7             	mov    %r14,%rdi
ffffffff8001e853:	e8 78 d8 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001e858:	41 55                	push   %r13
ffffffff8001e85a:	9d                   	popf
            default:
                break;
        }

        conn->Lock.Release();
    }
ffffffff8001e85b:	48 83 c4 38          	add    $0x38,%rsp
ffffffff8001e85f:	5b                   	pop    %rbx
ffffffff8001e860:	41 5c                	pop    %r12
ffffffff8001e862:	41 5d                	pop    %r13
ffffffff8001e864:	41 5e                	pop    %r14
ffffffff8001e866:	41 5f                	pop    %r15
ffffffff8001e868:	5d                   	pop    %rbp
ffffffff8001e869:	c3                   	ret
ffffffff8001e86a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff8001e870:	41 8b 47 04          	mov    0x4(%r15),%eax
        uint8_t  flags   = hdr->Flags;
ffffffff8001e874:	41 0f b6 57 0d       	movzbl 0xd(%r15),%edx
        Connection* conn = FindConnection(srcIp, srcPort, dstPort);
ffffffff8001e879:	44 0f b7 d7          	movzwl %di,%r10d
ffffffff8001e87d:	45 0f b7 cd          	movzwl %r13w,%r9d
            if (flags & FLAG_SYN) {
ffffffff8001e881:	0f c8                	bswap  %eax
ffffffff8001e883:	41 89 c6             	mov    %eax,%r14d
ffffffff8001e886:	f6 c2 02             	test   $0x2,%dl
ffffffff8001e889:	0f 84 f1 01 00 00    	je     ffffffff8001ea80 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x3a0>
        for (uint32_t i = 0; i < MAX_CONNECTIONS; i++) {
ffffffff8001e88f:	31 c0                	xor    %eax,%eax
ffffffff8001e891:	eb 20                	jmp    ffffffff8001e8b3 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x1d3>
ffffffff8001e893:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001e89a:	00 00 00 00 
ffffffff8001e89e:	66 90                	xchg   %ax,%ax
ffffffff8001e8a0:	83 c0 01             	add    $0x1,%eax
ffffffff8001e8a3:	48 81 c6 38 16 00 00 	add    $0x1638,%rsi
ffffffff8001e8aa:	83 f8 10             	cmp    $0x10,%eax
ffffffff8001e8ad:	0f 84 8d 01 00 00    	je     ffffffff8001ea40 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x360>
            if (c->Active && c->LocalPort == localPort && c->CurrentState == State::Listen) {
ffffffff8001e8b3:	80 be 24 16 00 00 00 	cmpb   $0x0,0x1624(%rsi)
ffffffff8001e8ba:	74 e4                	je     ffffffff8001e8a0 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x1c0>
ffffffff8001e8bc:	66 3b 7e 08          	cmp    0x8(%rsi),%di
ffffffff8001e8c0:	75 de                	jne    ffffffff8001e8a0 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x1c0>
ffffffff8001e8c2:	83 3e 01             	cmpl   $0x1,(%rsi)
ffffffff8001e8c5:	75 d9                	jne    ffffffff8001e8a0 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x1c0>
            Connection* c = &g_connections[i];
ffffffff8001e8c7:	89 c3                	mov    %eax,%ebx
ffffffff8001e8c9:	48 69 db 38 16 00 00 	imul   $0x1638,%rbx,%rbx
ffffffff8001e8d0:	48 81 c3 00 0f 16 80 	add    $0xffffffff80160f00,%rbx
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001e8d7:	9c                   	pushf
ffffffff8001e8d8:	41 5f                	pop    %r15
ffffffff8001e8da:	fa                   	cli
            inner.Acquire();
ffffffff8001e8db:	48 8d bb 28 16 00 00 	lea    0x1628(%rbx),%rdi
ffffffff8001e8e2:	48 89 7d c8          	mov    %rdi,-0x38(%rbp)
ffffffff8001e8e6:	e8 c5 d7 fe ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
            savedFlags = flags;
ffffffff8001e8eb:	4c 89 bb 30 16 00 00 	mov    %r15,0x1630(%rbx)
            inner.Release();
ffffffff8001e8f2:	48 8b 7d c8          	mov    -0x38(%rbp),%rdi
                    listener->PendingAccept = true;
ffffffff8001e8f6:	c6 83 14 16 00 00 01 	movb   $0x1,0x1614(%rbx)
                    listener->PendingRemoteIp = srcIp;
ffffffff8001e8fd:	44 89 a3 18 16 00 00 	mov    %r12d,0x1618(%rbx)
                    listener->PendingRemotePort = srcPort;
ffffffff8001e904:	66 44 89 ab 1c 16 00 	mov    %r13w,0x161c(%rbx)
ffffffff8001e90b:	00 
                    listener->PendingSeq = seqNum;
ffffffff8001e90c:	44 89 b3 20 16 00 00 	mov    %r14d,0x1620(%rbx)
ffffffff8001e913:	e8 b8 d7 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001e918:	41 57                	push   %r15
ffffffff8001e91a:	9d                   	popf
                    return;
ffffffff8001e91b:	e9 3b ff ff ff       	jmp    ffffffff8001e85b <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x17b>
                if (flags & FLAG_FIN) {
ffffffff8001e920:	41 83 e3 01          	and    $0x1,%r11d
ffffffff8001e924:	0f 84 26 ff ff ff    	je     ffffffff8001e850 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x170>
                    conn->RecvNext = seqNum + 1;
ffffffff8001e92a:	8b 45 b8             	mov    -0x48(%rbp),%eax
ffffffff8001e92d:	83 c0 01             	add    $0x1,%eax
ffffffff8001e930:	41 89 44 24 1c       	mov    %eax,0x1c(%r12)
                    conn->CurrentState = State::TimeWait;
ffffffff8001e935:	41 c7 82 00 0f 16 80 	movl   $0x9,-0x7fe9f100(%r10)
ffffffff8001e93c:	09 00 00 00 
                    SendSegment(conn, FLAG_ACK, nullptr, 0);
ffffffff8001e940:	31 c9                	xor    %ecx,%ecx
ffffffff8001e942:	31 d2                	xor    %edx,%edx
ffffffff8001e944:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8001e949:	4c 89 e7             	mov    %r12,%rdi
ffffffff8001e94c:	e8 ff fb ff ff       	call   ffffffff8001e550 <_ZN3Net3TcpL11SendSegmentEPNS0_10ConnectionEhPKht>
            uint64_t flags = savedFlags;
ffffffff8001e951:	4d 8b ac 24 30 16 00 	mov    0x1630(%r12),%r13
ffffffff8001e958:	00 
ffffffff8001e959:	e9 f2 fe ff ff       	jmp    ffffffff8001e850 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x170>
                if (flags & FLAG_ACK) {
ffffffff8001e95e:	44 89 d8             	mov    %r11d,%eax
ffffffff8001e961:	83 e0 01             	and    $0x1,%eax
ffffffff8001e964:	41 83 e3 10          	and    $0x10,%r11d
ffffffff8001e968:	0f 84 5b 01 00 00    	je     ffffffff8001eac9 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x3e9>
                    conn->SendUnack = ackNum;
ffffffff8001e96e:	8b 5d b4             	mov    -0x4c(%rbp),%ebx
ffffffff8001e971:	41 89 5c 24 18       	mov    %ebx,0x18(%r12)
                    if (flags & FLAG_FIN) {
ffffffff8001e976:	84 c0                	test   %al,%al
ffffffff8001e978:	75 b0                	jne    ffffffff8001e92a <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x24a>
                        conn->CurrentState = State::FinWait2;
ffffffff8001e97a:	41 c7 82 00 0f 16 80 	movl   $0x6,-0x7fe9f100(%r10)
ffffffff8001e981:	06 00 00 00 
ffffffff8001e985:	e9 c6 fe ff ff       	jmp    ffffffff8001e850 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x170>
                if (flags & FLAG_ACK) {
ffffffff8001e98a:	41 f6 c3 10          	test   $0x10,%r11b
ffffffff8001e98e:	74 08                	je     ffffffff8001e998 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x2b8>
                    conn->SendUnack = ackNum;
ffffffff8001e990:	8b 45 b4             	mov    -0x4c(%rbp),%eax
ffffffff8001e993:	41 89 44 24 18       	mov    %eax,0x18(%r12)
                if (payloadLen > 0 && seqNum == conn->RecvNext) {
ffffffff8001e998:	66 85 db             	test   %bx,%bx
ffffffff8001e99b:	74 0e                	je     ffffffff8001e9ab <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x2cb>
ffffffff8001e99d:	41 8b 7c 24 1c       	mov    0x1c(%r12),%edi
ffffffff8001e9a2:	39 7d b8             	cmp    %edi,-0x48(%rbp)
ffffffff8001e9a5:	0f 84 2b 01 00 00    	je     ffffffff8001ead6 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x3f6>
                if (flags & FLAG_FIN) {
ffffffff8001e9ab:	41 83 e3 01          	and    $0x1,%r11d
ffffffff8001e9af:	74 a0                	je     ffffffff8001e951 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x271>
                    conn->RecvNext = seqNum + payloadLen + 1;
ffffffff8001e9b1:	8b 45 b8             	mov    -0x48(%rbp),%eax
ffffffff8001e9b4:	0f b7 db             	movzwl %bx,%ebx
ffffffff8001e9b7:	8d 44 18 01          	lea    0x1(%rax,%rbx,1),%eax
ffffffff8001e9bb:	41 89 44 24 1c       	mov    %eax,0x1c(%r12)
                    conn->CurrentState = State::CloseWait;
ffffffff8001e9c0:	41 c7 82 00 0f 16 80 	movl   $0x7,-0x7fe9f100(%r10)
ffffffff8001e9c7:	07 00 00 00 
                    SendSegment(conn, FLAG_ACK, nullptr, 0);
ffffffff8001e9cb:	e9 70 ff ff ff       	jmp    ffffffff8001e940 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x260>
                if (flags & FLAG_ACK) {
ffffffff8001e9d0:	41 83 e3 10          	and    $0x10,%r11d
ffffffff8001e9d4:	0f 84 76 fe ff ff    	je     ffffffff8001e850 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x170>
                    if (ackNum == conn->SendNext) {
ffffffff8001e9da:	8b 45 b4             	mov    -0x4c(%rbp),%eax
ffffffff8001e9dd:	41 39 44 24 14       	cmp    %eax,0x14(%r12)
ffffffff8001e9e2:	0f 85 68 fe ff ff    	jne    ffffffff8001e850 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x170>
                        conn->SendUnack = ackNum;
ffffffff8001e9e8:	41 89 44 24 18       	mov    %eax,0x18(%r12)
                        conn->CurrentState = State::Established;
ffffffff8001e9ed:	41 c7 82 00 0f 16 80 	movl   $0x4,-0x7fe9f100(%r10)
ffffffff8001e9f4:	04 00 00 00 
ffffffff8001e9f8:	e9 53 fe ff ff       	jmp    ffffffff8001e850 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x170>
                if ((flags & (FLAG_SYN | FLAG_ACK)) == (FLAG_SYN | FLAG_ACK)) {
ffffffff8001e9fd:	41 f7 d3             	not    %r11d
ffffffff8001ea00:	41 83 e3 12          	and    $0x12,%r11d
ffffffff8001ea04:	0f 85 46 fe ff ff    	jne    ffffffff8001e850 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x170>
                    if (ackNum == conn->SendNext) {
ffffffff8001ea0a:	8b 45 b4             	mov    -0x4c(%rbp),%eax
ffffffff8001ea0d:	41 39 44 24 14       	cmp    %eax,0x14(%r12)
ffffffff8001ea12:	0f 85 38 fe ff ff    	jne    ffffffff8001e850 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x170>
                        conn->RecvNext = seqNum + 1;
ffffffff8001ea18:	8b 45 b8             	mov    -0x48(%rbp),%eax
ffffffff8001ea1b:	83 c0 01             	add    $0x1,%eax
ffffffff8001ea1e:	41 89 44 24 1c       	mov    %eax,0x1c(%r12)
                        conn->SendUnack = ackNum;
ffffffff8001ea23:	8b 45 b4             	mov    -0x4c(%rbp),%eax
ffffffff8001ea26:	41 89 44 24 18       	mov    %eax,0x18(%r12)
                        conn->CurrentState = State::Established;
ffffffff8001ea2b:	41 c7 82 00 0f 16 80 	movl   $0x4,-0x7fe9f100(%r10)
ffffffff8001ea32:	04 00 00 00 
                        SendSegment(conn, FLAG_ACK, nullptr, 0);
ffffffff8001ea36:	e9 05 ff ff ff       	jmp    ffffffff8001e940 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x260>
ffffffff8001ea3b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            if (!(flags & FLAG_RST)) {
ffffffff8001ea40:	f6 c2 04             	test   $0x4,%dl
ffffffff8001ea43:	0f 85 12 fe ff ff    	jne    ffffffff8001e85b <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x17b>
                if (flags & FLAG_ACK) {
ffffffff8001ea49:	f6 c2 10             	test   $0x10,%dl
ffffffff8001ea4c:	75 70                	jne    ffffffff8001eabe <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x3de>
                    uint32_t rstAck = seqNum + payloadLen;
ffffffff8001ea4e:	0f b7 db             	movzwl %bx,%ebx
                    if (flags & FLAG_SYN) rstAck++;
ffffffff8001ea51:	45 8d 44 1e 01       	lea    0x1(%r14,%rbx,1),%r8d
                    if (flags & FLAG_FIN) rstAck++;
ffffffff8001ea56:	83 e2 01             	and    $0x1,%edx
                    SendReset(srcIp, srcPort, dstPort, 0, rstAck);
ffffffff8001ea59:	31 c9                	xor    %ecx,%ecx
ffffffff8001ea5b:	41 01 d0             	add    %edx,%r8d
    }
ffffffff8001ea5e:	48 83 c4 38          	add    $0x38,%rsp
                    SendReset(srcIp, srcPort, dstPort, 0, rstAck);
ffffffff8001ea62:	44 89 e7             	mov    %r12d,%edi
ffffffff8001ea65:	44 89 d2             	mov    %r10d,%edx
ffffffff8001ea68:	44 89 ce             	mov    %r9d,%esi
    }
ffffffff8001ea6b:	5b                   	pop    %rbx
ffffffff8001ea6c:	41 5c                	pop    %r12
ffffffff8001ea6e:	41 5d                	pop    %r13
ffffffff8001ea70:	41 5e                	pop    %r14
ffffffff8001ea72:	41 5f                	pop    %r15
ffffffff8001ea74:	5d                   	pop    %rbp
                    SendReset(srcIp, srcPort, dstPort, 0, rstAck);
ffffffff8001ea75:	e9 56 fa ff ff       	jmp    ffffffff8001e4d0 <_ZN3Net3TcpL9SendResetEjttjj>
ffffffff8001ea7a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            if (!(flags & FLAG_RST)) {
ffffffff8001ea80:	f6 c2 04             	test   $0x4,%dl
ffffffff8001ea83:	0f 85 d2 fd ff ff    	jne    ffffffff8001e85b <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x17b>
                if (flags & FLAG_ACK) {
ffffffff8001ea89:	f6 c2 10             	test   $0x10,%dl
ffffffff8001ea8c:	75 30                	jne    ffffffff8001eabe <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x3de>
                    uint32_t rstAck = seqNum + payloadLen;
ffffffff8001ea8e:	44 0f b7 c3          	movzwl %bx,%r8d
ffffffff8001ea92:	41 01 c0             	add    %eax,%r8d
                    if (flags & FLAG_SYN) rstAck++;
ffffffff8001ea95:	eb bf                	jmp    ffffffff8001ea56 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x376>
            conn->CurrentState = State::Closed;
ffffffff8001ea97:	41 c7 82 00 0f 16 80 	movl   $0x0,-0x7fe9f100(%r10)
ffffffff8001ea9e:	00 00 00 00 
            inner.Release();
ffffffff8001eaa2:	4c 89 f7             	mov    %r14,%rdi
            conn->Active = false;
ffffffff8001eaa5:	41 c6 84 24 24 16 00 	movb   $0x0,0x1624(%r12)
ffffffff8001eaac:	00 00 
ffffffff8001eaae:	e8 1d d6 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001eab3:	48 8b 45 a8          	mov    -0x58(%rbp),%rax
ffffffff8001eab7:	50                   	push   %rax
ffffffff8001eab8:	9d                   	popf
            return;
ffffffff8001eab9:	e9 9d fd ff ff       	jmp    ffffffff8001e85b <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x17b>
                    SendReset(srcIp, srcPort, dstPort, ackNum, 0);
ffffffff8001eabe:	41 8b 4f 08          	mov    0x8(%r15),%ecx
ffffffff8001eac2:	45 31 c0             	xor    %r8d,%r8d
ffffffff8001eac5:	0f c9                	bswap  %ecx
ffffffff8001eac7:	eb 95                	jmp    ffffffff8001ea5e <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x37e>
                } else if (flags & FLAG_FIN) {
ffffffff8001eac9:	84 c0                	test   %al,%al
ffffffff8001eacb:	0f 84 7f fd ff ff    	je     ffffffff8001e850 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x170>
ffffffff8001ead1:	e9 54 fe ff ff       	jmp    ffffffff8001e92a <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x24a>
        for (uint16_t i = 0; i < len && conn->RecvCount < RECV_BUFFER_SIZE; i++) {
ffffffff8001ead6:	41 0f b7 b4 24 24 10 	movzwl 0x1024(%r12),%esi
ffffffff8001eadd:	00 00 
        const uint8_t* payload = data + dataOff;
ffffffff8001eadf:	0f b6 c1             	movzbl %cl,%eax
ffffffff8001eae2:	4c 01 f8             	add    %r15,%rax
ffffffff8001eae5:	44 8d 04 33          	lea    (%rbx,%rsi,1),%r8d
        for (uint16_t i = 0; i < len && conn->RecvCount < RECV_BUFFER_SIZE; i++) {
ffffffff8001eae9:	66 81 fe ff 0f       	cmp    $0xfff,%si
ffffffff8001eaee:	77 3d                	ja     ffffffff8001eb2d <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x44d>
            conn->RecvBuffer[conn->RecvTail] = data[i];
ffffffff8001eaf0:	41 0f b7 8c 24 22 10 	movzwl 0x1022(%r12),%ecx
ffffffff8001eaf7:	00 00 
ffffffff8001eaf9:	44 0f b6 08          	movzbl (%rax),%r9d
            conn->RecvCount++;
ffffffff8001eafd:	83 c6 01             	add    $0x1,%esi
        for (uint16_t i = 0; i < len && conn->RecvCount < RECV_BUFFER_SIZE; i++) {
ffffffff8001eb00:	48 83 c0 01          	add    $0x1,%rax
            conn->RecvBuffer[conn->RecvTail] = data[i];
ffffffff8001eb04:	48 89 ca             	mov    %rcx,%rdx
ffffffff8001eb07:	45 88 4c 0c 20       	mov    %r9b,0x20(%r12,%rcx,1)
            conn->RecvCount++;
ffffffff8001eb0c:	66 41 89 b4 24 24 10 	mov    %si,0x1024(%r12)
ffffffff8001eb13:	00 00 
            conn->RecvTail = (conn->RecvTail + 1) % RECV_BUFFER_SIZE;
ffffffff8001eb15:	83 c2 01             	add    $0x1,%edx
ffffffff8001eb18:	81 e2 ff 0f 00 00    	and    $0xfff,%edx
ffffffff8001eb1e:	66 41 89 94 24 22 10 	mov    %dx,0x1022(%r12)
ffffffff8001eb25:	00 00 
        for (uint16_t i = 0; i < len && conn->RecvCount < RECV_BUFFER_SIZE; i++) {
ffffffff8001eb27:	66 44 39 c6          	cmp    %r8w,%si
ffffffff8001eb2b:	75 bc                	jne    ffffffff8001eae9 <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x409>
                    conn->RecvNext += payloadLen;
ffffffff8001eb2d:	0f b7 c3             	movzwl %bx,%eax
                    SendSegment(conn, FLAG_ACK, nullptr, 0);
ffffffff8001eb30:	31 c9                	xor    %ecx,%ecx
ffffffff8001eb32:	31 d2                	xor    %edx,%edx
ffffffff8001eb34:	be 10 00 00 00       	mov    $0x10,%esi
                    conn->RecvNext += payloadLen;
ffffffff8001eb39:	01 f8                	add    %edi,%eax
                    SendSegment(conn, FLAG_ACK, nullptr, 0);
ffffffff8001eb3b:	4c 89 e7             	mov    %r12,%rdi
ffffffff8001eb3e:	4c 89 55 c0          	mov    %r10,-0x40(%rbp)
                    conn->RecvNext += payloadLen;
ffffffff8001eb42:	41 89 44 24 1c       	mov    %eax,0x1c(%r12)
ffffffff8001eb47:	44 88 5d c8          	mov    %r11b,-0x38(%rbp)
                    SendSegment(conn, FLAG_ACK, nullptr, 0);
ffffffff8001eb4b:	e8 00 fa ff ff       	call   ffffffff8001e550 <_ZN3Net3TcpL11SendSegmentEPNS0_10ConnectionEhPKht>
ffffffff8001eb50:	44 0f b6 5d c8       	movzbl -0x38(%rbp),%r11d
ffffffff8001eb55:	4c 8b 55 c0          	mov    -0x40(%rbp),%r10
ffffffff8001eb59:	e9 4d fe ff ff       	jmp    ffffffff8001e9ab <_ZN3Net3Tcp16OnPacketReceivedEjjPKht+0x2cb>
ffffffff8001eb5e:	66 90                	xchg   %ax,%ax

ffffffff8001eb60 <_ZN3Net3Tcp6ListenEt>:

    Connection* Listen(uint16_t port) {
ffffffff8001eb60:	55                   	push   %rbp
ffffffff8001eb61:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001eb64:	41 56                	push   %r14
ffffffff8001eb66:	41 55                	push   %r13
ffffffff8001eb68:	41 54                	push   %r12
ffffffff8001eb6a:	41 89 fc             	mov    %edi,%r12d
ffffffff8001eb6d:	53                   	push   %rbx
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001eb6e:	9c                   	pushf
ffffffff8001eb6f:	5b                   	pop    %rbx
ffffffff8001eb70:	fa                   	cli
            inner.Acquire();
ffffffff8001eb71:	48 c7 c7 e0 0e 16 80 	mov    $0xffffffff80160ee0,%rdi
ffffffff8001eb78:	e8 33 d5 fe ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
            savedFlags = flags;
ffffffff8001eb7d:	48 89 1d 64 23 14 00 	mov    %rbx,0x142364(%rip)        # ffffffff80160ee8 <_ZN3Net3TcpL17g_connectionsLockE+0x8>
        for (uint32_t i = 0; i < MAX_CONNECTIONS; i++) {
ffffffff8001eb84:	48 c7 c2 24 25 16 80 	mov    $0xffffffff80162524,%rdx
ffffffff8001eb8b:	31 c0                	xor    %eax,%eax
ffffffff8001eb8d:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001eb94:	00 00 00 00 
ffffffff8001eb98:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001eb9f:	00 
            if (!g_connections[i].Active) {
ffffffff8001eba0:	80 3a 00             	cmpb   $0x0,(%rdx)
ffffffff8001eba3:	74 33                	je     ffffffff8001ebd8 <_ZN3Net3Tcp6ListenEt+0x78>
        for (uint32_t i = 0; i < MAX_CONNECTIONS; i++) {
ffffffff8001eba5:	83 c0 01             	add    $0x1,%eax
ffffffff8001eba8:	48 81 c2 38 16 00 00 	add    $0x1638,%rdx
ffffffff8001ebaf:	83 f8 10             	cmp    $0x10,%eax
ffffffff8001ebb2:	75 ec                	jne    ffffffff8001eba0 <_ZN3Net3Tcp6ListenEt+0x40>
            inner.Release();
ffffffff8001ebb4:	48 c7 c7 e0 0e 16 80 	mov    $0xffffffff80160ee0,%rdi
ffffffff8001ebbb:	e8 10 d5 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001ebc0:	53                   	push   %rbx
ffffffff8001ebc1:	9d                   	popf
        g_connectionsLock.Acquire();
        Connection* conn = AllocateConnection();
        g_connectionsLock.Release();

        if (conn == nullptr) {
ffffffff8001ebc2:	45 31 ed             	xor    %r13d,%r13d
        conn->CurrentState = State::Listen;
        conn->PendingAccept = false;

        KernelLogStream(INFO, "Net") << "TCP listening on port " << base::dec << (uint64_t)port;
        return conn;
    }
ffffffff8001ebc5:	5b                   	pop    %rbx
ffffffff8001ebc6:	41 5c                	pop    %r12
ffffffff8001ebc8:	4c 89 e8             	mov    %r13,%rax
ffffffff8001ebcb:	41 5d                	pop    %r13
ffffffff8001ebcd:	41 5e                	pop    %r14
ffffffff8001ebcf:	5d                   	pop    %rbp
ffffffff8001ebd0:	c3                   	ret
ffffffff8001ebd1:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
                Connection* c = &g_connections[i];
ffffffff8001ebd8:	48 69 d8 38 16 00 00 	imul   $0x1638,%rax,%rbx
                memset(c, 0, sizeof(Connection));
ffffffff8001ebdf:	ba 38 16 00 00       	mov    $0x1638,%edx
ffffffff8001ebe4:	31 f6                	xor    %esi,%esi
                Connection* c = &g_connections[i];
ffffffff8001ebe6:	4c 8d ab 00 0f 16 80 	lea    -0x7fe9f100(%rbx),%r13
                memset(c, 0, sizeof(Connection));
ffffffff8001ebed:	4c 89 ef             	mov    %r13,%rdi
ffffffff8001ebf0:	e8 2b b6 ff ff       	call   ffffffff8001a220 <memset>
            inner.Release();
ffffffff8001ebf5:	48 c7 c7 e0 0e 16 80 	mov    $0xffffffff80160ee0,%rdi
                c->Active = true;
ffffffff8001ebfc:	41 c6 85 24 16 00 00 	movb   $0x1,0x1624(%r13)
ffffffff8001ec03:	01 
            uint64_t flags = savedFlags;
ffffffff8001ec04:	4c 8b 35 dd 22 14 00 	mov    0x1422dd(%rip),%r14        # ffffffff80160ee8 <_ZN3Net3TcpL17g_connectionsLockE+0x8>
                c->CurrentState = State::Closed;
ffffffff8001ec0b:	c7 83 00 0f 16 80 00 	movl   $0x0,-0x7fe9f100(%rbx)
ffffffff8001ec12:	00 00 00 
            inner.Release();
ffffffff8001ec15:	e8 b6 d4 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001ec1a:	41 56                	push   %r14
ffffffff8001ec1c:	9d                   	popf
        conn->LocalIp = Net::GetIpAddress();
ffffffff8001ec1d:	e8 de ed ff ff       	call   ffffffff8001da00 <_ZN3Net12GetIpAddressEv>
            Print(string);
ffffffff8001ec22:	48 c7 c7 7c bb 02 80 	mov    $0xffffffff8002bb7c,%rdi
        conn->LocalPort = port;
ffffffff8001ec29:	66 45 89 65 08       	mov    %r12w,0x8(%r13)
        conn->LocalIp = Net::GetIpAddress();
ffffffff8001ec2e:	41 89 45 04          	mov    %eax,0x4(%r13)
        conn->CurrentState = State::Listen;
ffffffff8001ec32:	c7 83 00 0f 16 80 01 	movl   $0x1,-0x7fe9f100(%rbx)
ffffffff8001ec39:	00 00 00 
        conn->PendingAccept = false;
ffffffff8001ec3c:	41 c6 85 14 16 00 00 	movb   $0x0,0x1614(%r13)
ffffffff8001ec43:	00 
            g_kernelLogDepth++;
ffffffff8001ec44:	83 05 59 08 1c 00 01 	addl   $0x1,0x1c0859(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001ec4b:	e8 70 45 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001ec50:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001ec57:	e8 64 45 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001ec5c:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001ec63:	e8 58 45 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001ec68:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff8001ec6f:	e8 4c 45 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001ec74:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001ec7b:	e8 40 45 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001ec80:	48 c7 c7 2e bc 02 80 	mov    $0xffffffff8002bc2e,%rdi
ffffffff8001ec87:	e8 34 45 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        KernelLogStream(INFO, "Net") << "TCP listening on port " << base::dec << (uint64_t)port;
ffffffff8001ec8c:	41 0f b7 fc          	movzwl %r12w,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8001ec90:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8001ec95:	e8 f6 b7 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8001ec9a:	48 89 c7             	mov    %rax,%rdi
ffffffff8001ec9d:	e8 1e 45 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8001eca2:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001eca9:	e8 12 45 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
    }
ffffffff8001ecae:	5b                   	pop    %rbx
ffffffff8001ecaf:	4c 89 e8             	mov    %r13,%rax
ffffffff8001ecb2:	41 5c                	pop    %r12
            g_kernelLogDepth--;
ffffffff8001ecb4:	83 2d e9 07 1c 00 01 	subl   $0x1,0x1c07e9(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8001ecbb:	41 5d                	pop    %r13
ffffffff8001ecbd:	41 5e                	pop    %r14
ffffffff8001ecbf:	5d                   	pop    %rbp
ffffffff8001ecc0:	c3                   	ret
ffffffff8001ecc1:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001ecc8:	00 00 00 
ffffffff8001eccb:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001ecd2:	00 00 00 
ffffffff8001ecd5:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001ecdc:	00 00 00 
ffffffff8001ecdf:	90                   	nop

ffffffff8001ece0 <_ZN3Net3Tcp6AcceptEPNS0_10ConnectionE>:

    Connection* Accept(Connection* listener) {
ffffffff8001ece0:	55                   	push   %rbp
ffffffff8001ece1:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001ece4:	41 57                	push   %r15
ffffffff8001ece6:	41 56                	push   %r14
ffffffff8001ece8:	41 55                	push   %r13
ffffffff8001ecea:	41 54                	push   %r12
ffffffff8001ecec:	53                   	push   %rbx
ffffffff8001eced:	48 83 ec 38          	sub    $0x38,%rsp
        if (listener == nullptr || listener->CurrentState != State::Listen) {
ffffffff8001ecf1:	48 85 ff             	test   %rdi,%rdi
ffffffff8001ecf4:	0f 84 ca 00 00 00    	je     ffffffff8001edc4 <_ZN3Net3Tcp6AcceptEPNS0_10ConnectionE+0xe4>
ffffffff8001ecfa:	83 3f 01             	cmpl   $0x1,(%rdi)
ffffffff8001ecfd:	48 89 fb             	mov    %rdi,%rbx
ffffffff8001ed00:	0f 85 be 00 00 00    	jne    ffffffff8001edc4 <_ZN3Net3Tcp6AcceptEPNS0_10ConnectionE+0xe4>
ffffffff8001ed06:	4c 8d af 28 16 00 00 	lea    0x1628(%rdi),%r13
ffffffff8001ed0d:	eb 16                	jmp    ffffffff8001ed25 <_ZN3Net3Tcp6AcceptEPNS0_10ConnectionE+0x45>
ffffffff8001ed0f:	90                   	nop
            inner.Release();
ffffffff8001ed10:	4c 89 ef             	mov    %r13,%rdi
ffffffff8001ed13:	e8 b8 d3 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001ed18:	41 54                	push   %r12
ffffffff8001ed1a:	9d                   	popf
                // Timed out waiting for ACK
                conn->Active = false;
                return nullptr;
            }
            listener->Lock.Release();
            Timekeeping::Sleep(10);
ffffffff8001ed1b:	bf 0a 00 00 00       	mov    $0xa,%edi
ffffffff8001ed20:	e8 0b 49 00 00       	call   ffffffff80023630 <_ZN11Timekeeping5SleepEm>
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001ed25:	9c                   	pushf
ffffffff8001ed26:	41 5c                	pop    %r12
ffffffff8001ed28:	fa                   	cli
            inner.Acquire();
ffffffff8001ed29:	4c 89 ef             	mov    %r13,%rdi
ffffffff8001ed2c:	e8 7f d3 fe ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
            if (listener->PendingAccept) {
ffffffff8001ed31:	80 bb 14 16 00 00 00 	cmpb   $0x0,0x1614(%rbx)
            savedFlags = flags;
ffffffff8001ed38:	4c 89 a3 30 16 00 00 	mov    %r12,0x1630(%rbx)
ffffffff8001ed3f:	74 cf                	je     ffffffff8001ed10 <_ZN3Net3Tcp6AcceptEPNS0_10ConnectionE+0x30>
                listener->PendingAccept = false;
ffffffff8001ed41:	c6 83 14 16 00 00 00 	movb   $0x0,0x1614(%rbx)
                uint32_t remoteSeq = listener->PendingSeq;
ffffffff8001ed48:	8b 83 20 16 00 00    	mov    0x1620(%rbx),%eax
            inner.Release();
ffffffff8001ed4e:	4c 89 ef             	mov    %r13,%rdi
                uint32_t remoteIp = listener->PendingRemoteIp;
ffffffff8001ed51:	44 8b bb 18 16 00 00 	mov    0x1618(%rbx),%r15d
                uint16_t remotePort = listener->PendingRemotePort;
ffffffff8001ed58:	44 0f b7 b3 1c 16 00 	movzwl 0x161c(%rbx),%r14d
ffffffff8001ed5f:	00 
                uint32_t remoteSeq = listener->PendingSeq;
ffffffff8001ed60:	89 45 ac             	mov    %eax,-0x54(%rbp)
ffffffff8001ed63:	e8 68 d3 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001ed68:	41 54                	push   %r12
ffffffff8001ed6a:	9d                   	popf
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001ed6b:	9c                   	pushf
ffffffff8001ed6c:	41 5c                	pop    %r12
ffffffff8001ed6e:	fa                   	cli
            inner.Acquire();
ffffffff8001ed6f:	48 c7 c7 e0 0e 16 80 	mov    $0xffffffff80160ee0,%rdi
        for (uint32_t i = 0; i < MAX_CONNECTIONS; i++) {
ffffffff8001ed76:	45 31 ed             	xor    %r13d,%r13d
ffffffff8001ed79:	e8 32 d3 fe ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
            savedFlags = flags;
ffffffff8001ed7e:	4c 89 25 63 21 14 00 	mov    %r12,0x142163(%rip)        # ffffffff80160ee8 <_ZN3Net3TcpL17g_connectionsLockE+0x8>
ffffffff8001ed85:	48 c7 c0 24 25 16 80 	mov    $0xffffffff80162524,%rax
ffffffff8001ed8c:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001ed93:	00 00 00 00 
ffffffff8001ed97:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001ed9e:	00 00 
            if (!g_connections[i].Active) {
ffffffff8001eda0:	80 38 00             	cmpb   $0x0,(%rax)
ffffffff8001eda3:	74 3b                	je     ffffffff8001ede0 <_ZN3Net3Tcp6AcceptEPNS0_10ConnectionE+0x100>
        for (uint32_t i = 0; i < MAX_CONNECTIONS; i++) {
ffffffff8001eda5:	41 83 c5 01          	add    $0x1,%r13d
ffffffff8001eda9:	48 05 38 16 00 00    	add    $0x1638,%rax
ffffffff8001edaf:	41 83 fd 10          	cmp    $0x10,%r13d
ffffffff8001edb3:	75 eb                	jne    ffffffff8001eda0 <_ZN3Net3Tcp6AcceptEPNS0_10ConnectionE+0xc0>
            inner.Release();
ffffffff8001edb5:	48 c7 c7 e0 0e 16 80 	mov    $0xffffffff80160ee0,%rdi
ffffffff8001edbc:	e8 0f d3 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001edc1:	41 54                	push   %r12
ffffffff8001edc3:	9d                   	popf
            return nullptr;
ffffffff8001edc4:	45 31 e4             	xor    %r12d,%r12d
        }
    }
ffffffff8001edc7:	48 83 c4 38          	add    $0x38,%rsp
ffffffff8001edcb:	4c 89 e0             	mov    %r12,%rax
ffffffff8001edce:	5b                   	pop    %rbx
ffffffff8001edcf:	41 5c                	pop    %r12
ffffffff8001edd1:	41 5d                	pop    %r13
ffffffff8001edd3:	41 5e                	pop    %r14
ffffffff8001edd5:	41 5f                	pop    %r15
ffffffff8001edd7:	5d                   	pop    %rbp
ffffffff8001edd8:	c3                   	ret
ffffffff8001edd9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
                Connection* c = &g_connections[i];
ffffffff8001ede0:	4d 69 ed 38 16 00 00 	imul   $0x1638,%r13,%r13
                memset(c, 0, sizeof(Connection));
ffffffff8001ede7:	ba 38 16 00 00       	mov    $0x1638,%edx
ffffffff8001edec:	31 f6                	xor    %esi,%esi
                Connection* c = &g_connections[i];
ffffffff8001edee:	4d 8d a5 00 0f 16 80 	lea    -0x7fe9f100(%r13),%r12
                memset(c, 0, sizeof(Connection));
ffffffff8001edf5:	4c 89 e7             	mov    %r12,%rdi
ffffffff8001edf8:	e8 23 b4 ff ff       	call   ffffffff8001a220 <memset>
            uint64_t flags = savedFlags;
ffffffff8001edfd:	48 8b 05 e4 20 14 00 	mov    0x1420e4(%rip),%rax        # ffffffff80160ee8 <_ZN3Net3TcpL17g_connectionsLockE+0x8>
            inner.Release();
ffffffff8001ee04:	48 c7 c7 e0 0e 16 80 	mov    $0xffffffff80160ee0,%rdi
                c->Active = true;
ffffffff8001ee0b:	41 c6 84 24 24 16 00 	movb   $0x1,0x1624(%r12)
ffffffff8001ee12:	00 01 
                c->CurrentState = State::Closed;
ffffffff8001ee14:	41 c7 85 00 0f 16 80 	movl   $0x0,-0x7fe9f100(%r13)
ffffffff8001ee1b:	00 00 00 00 
            uint64_t flags = savedFlags;
ffffffff8001ee1f:	48 89 45 a0          	mov    %rax,-0x60(%rbp)
            inner.Release();
ffffffff8001ee23:	e8 a8 d2 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001ee28:	48 8b 45 a0          	mov    -0x60(%rbp),%rax
ffffffff8001ee2c:	50                   	push   %rax
ffffffff8001ee2d:	9d                   	popf
                conn->LocalIp = Net::GetIpAddress();
ffffffff8001ee2e:	e8 cd eb ff ff       	call   ffffffff8001da00 <_ZN3Net12GetIpAddressEv>
ffffffff8001ee33:	41 89 44 24 04       	mov    %eax,0x4(%r12)
                conn->LocalPort = listener->LocalPort;
ffffffff8001ee38:	0f b7 43 08          	movzwl 0x8(%rbx),%eax
                    hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001ee3c:	48 8d 5d bc          	lea    -0x44(%rbp),%rbx
                conn->RemoteIp = remoteIp;
ffffffff8001ee40:	45 89 7c 24 0c       	mov    %r15d,0xc(%r12)
                conn->LocalPort = listener->LocalPort;
ffffffff8001ee45:	66 41 89 44 24 08    	mov    %ax,0x8(%r12)
                conn->RecvNext = remoteSeq + 1;
ffffffff8001ee4b:	8b 45 ac             	mov    -0x54(%rbp),%eax
                conn->RemotePort = remotePort;
ffffffff8001ee4e:	66 45 89 74 24 10    	mov    %r14w,0x10(%r12)
                conn->RecvNext = remoteSeq + 1;
ffffffff8001ee54:	83 c0 01             	add    $0x1,%eax
ffffffff8001ee57:	41 89 44 24 1c       	mov    %eax,0x1c(%r12)
        return (uint32_t)(Timekeeping::GetMilliseconds() * 2654435761u);
ffffffff8001ee5c:	e8 af 47 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
                    hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001ee61:	41 8b 74 24 0c       	mov    0xc(%r12),%esi
ffffffff8001ee66:	41 8b 7c 24 04       	mov    0x4(%r12),%edi
ffffffff8001ee6b:	49 89 d8             	mov    %rbx,%r8
        return (uint32_t)(Timekeeping::GetMilliseconds() * 2654435761u);
ffffffff8001ee6e:	69 c0 b1 79 37 9e    	imul   $0x9e3779b1,%eax,%eax
                    hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001ee74:	b9 14 00 00 00       	mov    $0x14,%ecx
ffffffff8001ee79:	41 b9 14 00 00 00    	mov    $0x14,%r9d
                conn->CurrentState = State::SynReceived;
ffffffff8001ee7f:	41 c7 85 00 0f 16 80 	movl   $0x3,-0x7fe9f100(%r13)
ffffffff8001ee86:	03 00 00 00 
                    hdr->DataOffset = (HEADER_SIZE / 4) << 4;
ffffffff8001ee8a:	48 c7 45 c8 50 12 10 	movq   $0x101250,-0x38(%rbp)
ffffffff8001ee91:	00 
                conn->SendNext = isn + 1;
ffffffff8001ee92:	8d 50 01             	lea    0x1(%rax),%edx
                conn->SendUnack = isn;
ffffffff8001ee95:	41 89 44 24 18       	mov    %eax,0x18(%r12)
                conn->SendNext = isn + 1;
ffffffff8001ee9a:	0f c8                	bswap  %eax
ffffffff8001ee9c:	41 89 54 24 14       	mov    %edx,0x14(%r12)
ffffffff8001eea1:	41 0f b7 54 24 08    	movzwl 0x8(%r12),%edx
                    hdr->SeqNum = Htonl(isn);
ffffffff8001eea7:	89 45 c0             	mov    %eax,-0x40(%rbp)
ffffffff8001eeaa:	41 8b 85 1c 0f 16 80 	mov    -0x7fe9f0e4(%r13),%eax
ffffffff8001eeb1:	66 c1 c2 08          	rol    $0x8,%dx
                    hdr->SrcPort = Htons(conn->LocalPort);
ffffffff8001eeb5:	66 89 55 bc          	mov    %dx,-0x44(%rbp)
ffffffff8001eeb9:	41 0f b7 54 24 10    	movzwl 0x10(%r12),%edx
ffffffff8001eebf:	0f c8                	bswap  %eax
                    hdr->AckNum = Htonl(conn->RecvNext);
ffffffff8001eec1:	89 45 c4             	mov    %eax,-0x3c(%rbp)
ffffffff8001eec4:	66 c1 c2 08          	rol    $0x8,%dx
                    hdr->DstPort = Htons(conn->RemotePort);
ffffffff8001eec8:	66 89 55 be          	mov    %dx,-0x42(%rbp)
                    hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001eecc:	ba 06 00 00 00       	mov    $0x6,%edx
ffffffff8001eed1:	e8 8a e6 ff ff       	call   ffffffff8001d560 <_ZN3Net4Ipv420PseudoHeaderChecksumEjjhtPKvt>
                    Ipv4::Send(conn->RemoteIp, Ipv4::PROTO_TCP, packet, HEADER_SIZE);
ffffffff8001eed6:	41 8b 7c 24 0c       	mov    0xc(%r12),%edi
ffffffff8001eedb:	48 89 da             	mov    %rbx,%rdx
ffffffff8001eede:	b9 14 00 00 00       	mov    $0x14,%ecx
ffffffff8001eee3:	be 06 00 00 00       	mov    $0x6,%esi
                    hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001eee8:	66 89 45 cc          	mov    %ax,-0x34(%rbp)
                    Ipv4::Send(conn->RemoteIp, Ipv4::PROTO_TCP, packet, HEADER_SIZE);
ffffffff8001eeec:	bb 64 00 00 00       	mov    $0x64,%ebx
ffffffff8001eef1:	e8 2a e8 ff ff       	call   ffffffff8001d720 <_ZN3Net4Ipv44SendEjhPKht>
                for (int i = 0; i < 100; i++) {
ffffffff8001eef6:	eb 17                	jmp    ffffffff8001ef0f <_ZN3Net3Tcp6AcceptEPNS0_10ConnectionE+0x22f>
ffffffff8001eef8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001eeff:	00 
                    Timekeeping::Sleep(50);
ffffffff8001ef00:	bf 32 00 00 00       	mov    $0x32,%edi
ffffffff8001ef05:	e8 26 47 00 00       	call   ffffffff80023630 <_ZN11Timekeeping5SleepEm>
                for (int i = 0; i < 100; i++) {
ffffffff8001ef0a:	83 eb 01             	sub    $0x1,%ebx
ffffffff8001ef0d:	74 11                	je     ffffffff8001ef20 <_ZN3Net3Tcp6AcceptEPNS0_10ConnectionE+0x240>
                    if (conn->CurrentState == State::Established) {
ffffffff8001ef0f:	41 83 bd 00 0f 16 80 	cmpl   $0x4,-0x7fe9f100(%r13)
ffffffff8001ef16:	04 
ffffffff8001ef17:	75 e7                	jne    ffffffff8001ef00 <_ZN3Net3Tcp6AcceptEPNS0_10ConnectionE+0x220>
ffffffff8001ef19:	e9 a9 fe ff ff       	jmp    ffffffff8001edc7 <_ZN3Net3Tcp6AcceptEPNS0_10ConnectionE+0xe7>
ffffffff8001ef1e:	66 90                	xchg   %ax,%ax
                conn->Active = false;
ffffffff8001ef20:	41 c6 85 24 25 16 80 	movb   $0x0,-0x7fe9dadc(%r13)
ffffffff8001ef27:	00 
                return nullptr;
ffffffff8001ef28:	e9 97 fe ff ff       	jmp    ffffffff8001edc4 <_ZN3Net3Tcp6AcceptEPNS0_10ConnectionE+0xe4>
ffffffff8001ef2d:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001ef34:	00 00 00 
ffffffff8001ef37:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001ef3e:	00 00 

ffffffff8001ef40 <_ZN3Net3Tcp7ConnectEjtt>:

    Connection* Connect(uint32_t destIp, uint16_t destPort, uint16_t srcPort) {
ffffffff8001ef40:	55                   	push   %rbp
ffffffff8001ef41:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001ef44:	41 57                	push   %r15
ffffffff8001ef46:	41 89 d7             	mov    %edx,%r15d
ffffffff8001ef49:	41 56                	push   %r14
ffffffff8001ef4b:	41 89 fe             	mov    %edi,%r14d
ffffffff8001ef4e:	41 55                	push   %r13
ffffffff8001ef50:	41 54                	push   %r12
ffffffff8001ef52:	53                   	push   %rbx
ffffffff8001ef53:	89 f3                	mov    %esi,%ebx
ffffffff8001ef55:	48 83 ec 48          	sub    $0x48,%rsp
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001ef59:	9c                   	pushf
ffffffff8001ef5a:	41 5c                	pop    %r12
ffffffff8001ef5c:	fa                   	cli
            inner.Acquire();
ffffffff8001ef5d:	48 c7 c7 e0 0e 16 80 	mov    $0xffffffff80160ee0,%rdi
ffffffff8001ef64:	e8 47 d1 fe ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
            savedFlags = flags;
ffffffff8001ef69:	4c 89 25 78 1f 14 00 	mov    %r12,0x141f78(%rip)        # ffffffff80160ee8 <_ZN3Net3TcpL17g_connectionsLockE+0x8>
        for (uint32_t i = 0; i < MAX_CONNECTIONS; i++) {
ffffffff8001ef70:	48 c7 c2 24 25 16 80 	mov    $0xffffffff80162524,%rdx
ffffffff8001ef77:	31 c0                	xor    %eax,%eax
ffffffff8001ef79:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            if (!g_connections[i].Active) {
ffffffff8001ef80:	80 3a 00             	cmpb   $0x0,(%rdx)
ffffffff8001ef83:	74 3b                	je     ffffffff8001efc0 <_ZN3Net3Tcp7ConnectEjtt+0x80>
        for (uint32_t i = 0; i < MAX_CONNECTIONS; i++) {
ffffffff8001ef85:	83 c0 01             	add    $0x1,%eax
ffffffff8001ef88:	48 81 c2 38 16 00 00 	add    $0x1638,%rdx
ffffffff8001ef8f:	83 f8 10             	cmp    $0x10,%eax
ffffffff8001ef92:	75 ec                	jne    ffffffff8001ef80 <_ZN3Net3Tcp7ConnectEjtt+0x40>
            inner.Release();
ffffffff8001ef94:	48 c7 c7 e0 0e 16 80 	mov    $0xffffffff80160ee0,%rdi
ffffffff8001ef9b:	e8 30 d1 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001efa0:	41 54                	push   %r12
ffffffff8001efa2:	9d                   	popf
        g_connectionsLock.Acquire();
        Connection* conn = AllocateConnection();
        g_connectionsLock.Release();

        if (conn == nullptr) {
            return nullptr;
ffffffff8001efa3:	45 31 ed             	xor    %r13d,%r13d
        }

        // Failed to connect
        conn->Active = false;
        return nullptr;
    }
ffffffff8001efa6:	48 83 c4 48          	add    $0x48,%rsp
ffffffff8001efaa:	4c 89 e8             	mov    %r13,%rax
ffffffff8001efad:	5b                   	pop    %rbx
ffffffff8001efae:	41 5c                	pop    %r12
ffffffff8001efb0:	41 5d                	pop    %r13
ffffffff8001efb2:	41 5e                	pop    %r14
ffffffff8001efb4:	41 5f                	pop    %r15
ffffffff8001efb6:	5d                   	pop    %rbp
ffffffff8001efb7:	c3                   	ret
ffffffff8001efb8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001efbf:	00 
                Connection* c = &g_connections[i];
ffffffff8001efc0:	4c 69 e0 38 16 00 00 	imul   $0x1638,%rax,%r12
                memset(c, 0, sizeof(Connection));
ffffffff8001efc7:	ba 38 16 00 00       	mov    $0x1638,%edx
ffffffff8001efcc:	31 f6                	xor    %esi,%esi
                Connection* c = &g_connections[i];
ffffffff8001efce:	48 89 45 a0          	mov    %rax,-0x60(%rbp)
ffffffff8001efd2:	4d 8d ac 24 00 0f 16 	lea    -0x7fe9f100(%r12),%r13
ffffffff8001efd9:	80 
                memset(c, 0, sizeof(Connection));
ffffffff8001efda:	4c 89 ef             	mov    %r13,%rdi
ffffffff8001efdd:	e8 3e b2 ff ff       	call   ffffffff8001a220 <memset>
            uint64_t flags = savedFlags;
ffffffff8001efe2:	48 8b 05 ff 1e 14 00 	mov    0x141eff(%rip),%rax        # ffffffff80160ee8 <_ZN3Net3TcpL17g_connectionsLockE+0x8>
            inner.Release();
ffffffff8001efe9:	48 c7 c7 e0 0e 16 80 	mov    $0xffffffff80160ee0,%rdi
                c->Active = true;
ffffffff8001eff0:	41 c6 85 24 16 00 00 	movb   $0x1,0x1624(%r13)
ffffffff8001eff7:	01 
                c->CurrentState = State::Closed;
ffffffff8001eff8:	41 c7 84 24 00 0f 16 	movl   $0x0,-0x7fe9f100(%r12)
ffffffff8001efff:	80 00 00 00 00 
            uint64_t flags = savedFlags;
ffffffff8001f004:	48 89 45 a8          	mov    %rax,-0x58(%rbp)
            inner.Release();
ffffffff8001f008:	e8 c3 d0 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001f00d:	48 8b 45 a8          	mov    -0x58(%rbp),%rax
ffffffff8001f011:	50                   	push   %rax
ffffffff8001f012:	9d                   	popf
        conn->LocalIp = Net::GetIpAddress();
ffffffff8001f013:	e8 e8 e9 ff ff       	call   ffffffff8001da00 <_ZN3Net12GetIpAddressEv>
        conn->LocalPort = srcPort;
ffffffff8001f018:	66 45 89 7d 08       	mov    %r15w,0x8(%r13)
            hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001f01d:	4c 8d 7d bc          	lea    -0x44(%rbp),%r15
        conn->LocalIp = Net::GetIpAddress();
ffffffff8001f021:	41 89 45 04          	mov    %eax,0x4(%r13)
        conn->RemoteIp = destIp;
ffffffff8001f025:	45 89 75 0c          	mov    %r14d,0xc(%r13)
        conn->RemotePort = destPort;
ffffffff8001f029:	66 41 89 5d 10       	mov    %bx,0x10(%r13)
        return (uint32_t)(Timekeeping::GetMilliseconds() * 2654435761u);
ffffffff8001f02e:	e8 dd 45 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
            hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001f033:	41 8b 75 0c          	mov    0xc(%r13),%esi
ffffffff8001f037:	41 8b 7d 04          	mov    0x4(%r13),%edi
ffffffff8001f03b:	4d 89 f8             	mov    %r15,%r8
        return (uint32_t)(Timekeeping::GetMilliseconds() * 2654435761u);
ffffffff8001f03e:	69 c0 b1 79 37 9e    	imul   $0x9e3779b1,%eax,%eax
            hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001f044:	41 b9 14 00 00 00    	mov    $0x14,%r9d
ffffffff8001f04a:	b9 14 00 00 00       	mov    $0x14,%ecx
        conn->CurrentState = State::SynSent;
ffffffff8001f04f:	41 c7 84 24 00 0f 16 	movl   $0x2,-0x7fe9f100(%r12)
ffffffff8001f056:	80 02 00 00 00 
            hdr->Checksum = 0;
ffffffff8001f05b:	c7 45 cc 00 00 00 00 	movl   $0x0,-0x34(%rbp)
        conn->SendNext = isn + 1;
ffffffff8001f062:	8d 50 01             	lea    0x1(%rax),%edx
        conn->SendUnack = isn;
ffffffff8001f065:	41 89 45 18          	mov    %eax,0x18(%r13)
ffffffff8001f069:	0f c8                	bswap  %eax
        conn->SendNext = isn + 1;
ffffffff8001f06b:	41 89 55 14          	mov    %edx,0x14(%r13)
ffffffff8001f06f:	41 0f b7 55 08       	movzwl 0x8(%r13),%edx
ffffffff8001f074:	89 45 9c             	mov    %eax,-0x64(%rbp)
ffffffff8001f077:	66 c1 c2 08          	rol    $0x8,%dx
            hdr->SeqNum = Htonl(isn);
ffffffff8001f07b:	89 45 c0             	mov    %eax,-0x40(%rbp)
            hdr->AckNum = 0;
ffffffff8001f07e:	48 b8 00 00 00 00 50 	movabs $0x10025000000000,%rax
ffffffff8001f085:	02 10 00 
            hdr->SrcPort = Htons(conn->LocalPort);
ffffffff8001f088:	66 89 55 bc          	mov    %dx,-0x44(%rbp)
ffffffff8001f08c:	41 0f b7 55 10       	movzwl 0x10(%r13),%edx
            hdr->AckNum = 0;
ffffffff8001f091:	48 89 45 c4          	mov    %rax,-0x3c(%rbp)
ffffffff8001f095:	66 c1 c2 08          	rol    $0x8,%dx
            hdr->DstPort = Htons(conn->RemotePort);
ffffffff8001f099:	66 89 55 be          	mov    %dx,-0x42(%rbp)
            hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001f09d:	ba 06 00 00 00       	mov    $0x6,%edx
ffffffff8001f0a2:	e8 b9 e4 ff ff       	call   ffffffff8001d560 <_ZN3Net4Ipv420PseudoHeaderChecksumEjjhtPKvt>
            Ipv4::Send(conn->RemoteIp, Ipv4::PROTO_TCP, packet, HEADER_SIZE);
ffffffff8001f0a7:	41 8b 7d 0c          	mov    0xc(%r13),%edi
ffffffff8001f0ab:	b9 14 00 00 00       	mov    $0x14,%ecx
ffffffff8001f0b0:	4c 89 fa             	mov    %r15,%rdx
ffffffff8001f0b3:	be 06 00 00 00       	mov    $0x6,%esi
            hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001f0b8:	66 89 45 cc          	mov    %ax,-0x34(%rbp)
            Ipv4::Send(conn->RemoteIp, Ipv4::PROTO_TCP, packet, HEADER_SIZE);
ffffffff8001f0bc:	e8 5f e6 ff ff       	call   ffffffff8001d720 <_ZN3Net4Ipv44SendEjhPKht>
        for (int attempt = 0; attempt < MAX_RETRANSMITS; attempt++) {
ffffffff8001f0c1:	c7 45 a8 05 00 00 00 	movl   $0x5,-0x58(%rbp)
        for (uint32_t i = 0; i < MAX_CONNECTIONS; i++) {
ffffffff8001f0c8:	bb 14 00 00 00       	mov    $0x14,%ebx
ffffffff8001f0cd:	0f 1f 00             	nopl   (%rax)
                if (conn->CurrentState == State::Established) {
ffffffff8001f0d0:	41 83 bc 24 00 0f 16 	cmpl   $0x4,-0x7fe9f100(%r12)
ffffffff8001f0d7:	80 04 
ffffffff8001f0d9:	0f 84 c7 fe ff ff    	je     ffffffff8001efa6 <_ZN3Net3Tcp7ConnectEjtt+0x66>
                Timekeeping::Sleep(50);
ffffffff8001f0df:	bf 32 00 00 00       	mov    $0x32,%edi
ffffffff8001f0e4:	e8 47 45 00 00       	call   ffffffff80023630 <_ZN11Timekeeping5SleepEm>
            for (int i = 0; i < 20; i++) {
ffffffff8001f0e9:	83 eb 01             	sub    $0x1,%ebx
ffffffff8001f0ec:	75 e2                	jne    ffffffff8001f0d0 <_ZN3Net3Tcp7ConnectEjtt+0x190>
            if (conn->CurrentState == State::SynSent) {
ffffffff8001f0ee:	41 83 bc 24 00 0f 16 	cmpl   $0x2,-0x7fe9f100(%r12)
ffffffff8001f0f5:	80 02 
ffffffff8001f0f7:	74 1a                	je     ffffffff8001f113 <_ZN3Net3Tcp7ConnectEjtt+0x1d3>
        for (int attempt = 0; attempt < MAX_RETRANSMITS; attempt++) {
ffffffff8001f0f9:	83 6d a8 01          	subl   $0x1,-0x58(%rbp)
ffffffff8001f0fd:	75 c9                	jne    ffffffff8001f0c8 <_ZN3Net3Tcp7ConnectEjtt+0x188>
        conn->Active = false;
ffffffff8001f0ff:	48 69 45 a0 38 16 00 	imul   $0x1638,-0x60(%rbp),%rax
ffffffff8001f106:	00 
ffffffff8001f107:	c6 80 24 25 16 80 00 	movb   $0x0,-0x7fe9dadc(%rax)
        return nullptr;
ffffffff8001f10e:	e9 90 fe ff ff       	jmp    ffffffff8001efa3 <_ZN3Net3Tcp7ConnectEjtt+0x63>
                hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001f113:	41 8b b4 24 0c 0f 16 	mov    -0x7fe9f0f4(%r12),%esi
ffffffff8001f11a:	80 
ffffffff8001f11b:	41 b9 14 00 00 00    	mov    $0x14,%r9d
ffffffff8001f121:	4d 89 f8             	mov    %r15,%r8
ffffffff8001f124:	41 0f b7 84 24 08 0f 	movzwl -0x7fe9f0f8(%r12),%eax
ffffffff8001f12b:	16 80 
ffffffff8001f12d:	41 8b bc 24 04 0f 16 	mov    -0x7fe9f0fc(%r12),%edi
ffffffff8001f134:	80 
ffffffff8001f135:	b9 14 00 00 00       	mov    $0x14,%ecx
ffffffff8001f13a:	ba 06 00 00 00       	mov    $0x6,%edx
                hdr->Checksum = 0;
ffffffff8001f13f:	c7 45 cc 00 00 00 00 	movl   $0x0,-0x34(%rbp)
ffffffff8001f146:	66 c1 c0 08          	rol    $0x8,%ax
                hdr->SrcPort = Htons(conn->LocalPort);
ffffffff8001f14a:	66 89 45 bc          	mov    %ax,-0x44(%rbp)
ffffffff8001f14e:	41 0f b7 84 24 10 0f 	movzwl -0x7fe9f0f0(%r12),%eax
ffffffff8001f155:	16 80 
ffffffff8001f157:	66 c1 c0 08          	rol    $0x8,%ax
                hdr->DstPort = Htons(conn->RemotePort);
ffffffff8001f15b:	66 89 45 be          	mov    %ax,-0x42(%rbp)
                hdr->SeqNum = Htonl(isn);
ffffffff8001f15f:	8b 45 9c             	mov    -0x64(%rbp),%eax
ffffffff8001f162:	89 45 c0             	mov    %eax,-0x40(%rbp)
                hdr->AckNum = 0;
ffffffff8001f165:	48 b8 00 00 00 00 50 	movabs $0x10025000000000,%rax
ffffffff8001f16c:	02 10 00 
ffffffff8001f16f:	48 89 45 c4          	mov    %rax,-0x3c(%rbp)
                hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001f173:	e8 e8 e3 ff ff       	call   ffffffff8001d560 <_ZN3Net4Ipv420PseudoHeaderChecksumEjjhtPKvt>
                Ipv4::Send(conn->RemoteIp, Ipv4::PROTO_TCP, packet, HEADER_SIZE);
ffffffff8001f178:	41 8b bc 24 0c 0f 16 	mov    -0x7fe9f0f4(%r12),%edi
ffffffff8001f17f:	80 
ffffffff8001f180:	b9 14 00 00 00       	mov    $0x14,%ecx
ffffffff8001f185:	4c 89 fa             	mov    %r15,%rdx
ffffffff8001f188:	be 06 00 00 00       	mov    $0x6,%esi
                hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001f18d:	66 89 45 cc          	mov    %ax,-0x34(%rbp)
                Ipv4::Send(conn->RemoteIp, Ipv4::PROTO_TCP, packet, HEADER_SIZE);
ffffffff8001f191:	e8 8a e5 ff ff       	call   ffffffff8001d720 <_ZN3Net4Ipv44SendEjhPKht>
        for (int attempt = 0; attempt < MAX_RETRANSMITS; attempt++) {
ffffffff8001f196:	83 6d a8 01          	subl   $0x1,-0x58(%rbp)
ffffffff8001f19a:	0f 85 28 ff ff ff    	jne    ffffffff8001f0c8 <_ZN3Net3Tcp7ConnectEjtt+0x188>
ffffffff8001f1a0:	e9 5a ff ff ff       	jmp    ffffffff8001f0ff <_ZN3Net3Tcp7ConnectEjtt+0x1bf>
ffffffff8001f1a5:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001f1ac:	00 00 00 
ffffffff8001f1af:	90                   	nop

ffffffff8001f1b0 <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht>:

    int Send(Connection* conn, const uint8_t* data, uint16_t length) {
ffffffff8001f1b0:	55                   	push   %rbp
ffffffff8001f1b1:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001f1b4:	41 57                	push   %r15
ffffffff8001f1b6:	41 56                	push   %r14
ffffffff8001f1b8:	41 55                	push   %r13
ffffffff8001f1ba:	41 54                	push   %r12
ffffffff8001f1bc:	53                   	push   %rbx
ffffffff8001f1bd:	48 83 ec 38          	sub    $0x38,%rsp
ffffffff8001f1c1:	48 89 75 c0          	mov    %rsi,-0x40(%rbp)
ffffffff8001f1c5:	66 89 55 cc          	mov    %dx,-0x34(%rbp)
        if (conn == nullptr || conn->CurrentState != State::Established) {
ffffffff8001f1c9:	48 85 ff             	test   %rdi,%rdi
ffffffff8001f1cc:	0f 84 1e 02 00 00    	je     ffffffff8001f3f0 <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht+0x240>
ffffffff8001f1d2:	83 3f 04             	cmpl   $0x4,(%rdi)
ffffffff8001f1d5:	49 89 ff             	mov    %rdi,%r15
ffffffff8001f1d8:	0f 85 12 02 00 00    	jne    ffffffff8001f3f0 <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht+0x240>
ffffffff8001f1de:	41 89 d6             	mov    %edx,%r14d
            return -1;
        }

        // Phase 1: Send data segments with interrupts disabled (lock-safe)
        uint64_t flags;
        asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001f1e1:	9c                   	pushf
ffffffff8001f1e2:	58                   	pop    %rax
ffffffff8001f1e3:	fa                   	cli
ffffffff8001f1e4:	48 89 45 a8          	mov    %rax,-0x58(%rbp)
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001f1e8:	9c                   	pushf
ffffffff8001f1e9:	41 5d                	pop    %r13
ffffffff8001f1eb:	fa                   	cli
            inner.Acquire();
ffffffff8001f1ec:	48 8d 87 28 16 00 00 	lea    0x1628(%rdi),%rax
ffffffff8001f1f3:	48 89 c7             	mov    %rax,%rdi
ffffffff8001f1f6:	48 89 45 b0          	mov    %rax,-0x50(%rbp)
ffffffff8001f1fa:	e8 b1 ce fe ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
            savedFlags = flags;
ffffffff8001f1ff:	4d 89 af 30 16 00 00 	mov    %r13,0x1630(%r15)
        conn->Lock.Acquire();

        constexpr uint16_t MSS = 1460;
        uint16_t sent = 0;

        while (sent < length) {
ffffffff8001f206:	66 45 85 f6          	test   %r14w,%r14w
ffffffff8001f20a:	0f 84 ec 01 00 00    	je     ffffffff8001f3fc <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht+0x24c>

            conn->SendNext += segLen;

            // Store for retransmission
            if (segLen <= sizeof(conn->RetransmitBuffer)) {
                memcpy(conn->RetransmitBuffer, data + sent, segLen);
ffffffff8001f210:	49 8d 87 26 10 00 00 	lea    0x1026(%r15),%rax
        uint16_t sent = 0;
ffffffff8001f217:	45 31 f6             	xor    %r14d,%r14d
                memcpy(conn->RetransmitBuffer, data + sent, segLen);
ffffffff8001f21a:	48 89 45 b8          	mov    %rax,-0x48(%rbp)
ffffffff8001f21e:	eb 3d                	jmp    ffffffff8001f25d <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht+0xad>
            conn->SendNext += segLen;
ffffffff8001f220:	41 01 5f 14          	add    %ebx,0x14(%r15)
                memcpy(conn->RetransmitBuffer, data + sent, segLen);
ffffffff8001f224:	48 8b 7d b8          	mov    -0x48(%rbp),%rdi
ffffffff8001f228:	41 0f b7 d5          	movzwl %r13w,%edx
ffffffff8001f22c:	4c 89 e6             	mov    %r12,%rsi
                conn->RetransmitLen = segLen;
                conn->RetransmitTime = Timekeeping::GetMilliseconds();
                conn->RetransmitCount = 0;
            }

            sent += segLen;
ffffffff8001f22f:	45 01 ee             	add    %r13d,%r14d
                memcpy(conn->RetransmitBuffer, data + sent, segLen);
ffffffff8001f232:	e8 a9 af ff ff       	call   ffffffff8001a1e0 <memcpy>
                conn->RetransmitLen = segLen;
ffffffff8001f237:	66 45 89 af 02 16 00 	mov    %r13w,0x1602(%r15)
ffffffff8001f23e:	00 
                conn->RetransmitTime = Timekeeping::GetMilliseconds();
ffffffff8001f23f:	e8 cc 43 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
                conn->RetransmitCount = 0;
ffffffff8001f244:	41 c7 87 10 16 00 00 	movl   $0x0,0x1610(%r15)
ffffffff8001f24b:	00 00 00 00 
                conn->RetransmitTime = Timekeeping::GetMilliseconds();
ffffffff8001f24f:	49 89 87 08 16 00 00 	mov    %rax,0x1608(%r15)
        while (sent < length) {
ffffffff8001f256:	66 44 3b 75 cc       	cmp    -0x34(%rbp),%r14w
ffffffff8001f25b:	73 7b                	jae    ffffffff8001f2d8 <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht+0x128>
            uint16_t segLen = length - sent;
ffffffff8001f25d:	44 0f b7 6d cc       	movzwl -0x34(%rbp),%r13d
            if (segLen > MSS) {
ffffffff8001f262:	b8 b4 05 00 00       	mov    $0x5b4,%eax
            bool ok = SendSegment(conn, FLAG_ACK | FLAG_PSH, data + sent, segLen);
ffffffff8001f267:	45 0f b7 de          	movzwl %r14w,%r11d
ffffffff8001f26b:	4c 89 ff             	mov    %r15,%rdi
ffffffff8001f26e:	be 18 00 00 00       	mov    $0x18,%esi
            uint16_t segLen = length - sent;
ffffffff8001f273:	45 29 f5             	sub    %r14d,%r13d
            if (segLen > MSS) {
ffffffff8001f276:	66 41 39 c5          	cmp    %ax,%r13w
ffffffff8001f27a:	44 0f 47 e8          	cmova  %eax,%r13d
            bool ok = SendSegment(conn, FLAG_ACK | FLAG_PSH, data + sent, segLen);
ffffffff8001f27e:	48 8b 45 c0          	mov    -0x40(%rbp),%rax
ffffffff8001f282:	41 0f b7 dd          	movzwl %r13w,%ebx
ffffffff8001f286:	4e 8d 24 18          	lea    (%rax,%r11,1),%r12
ffffffff8001f28a:	89 d9                	mov    %ebx,%ecx
ffffffff8001f28c:	4c 89 e2             	mov    %r12,%rdx
ffffffff8001f28f:	e8 bc f2 ff ff       	call   ffffffff8001e550 <_ZN3Net3TcpL11SendSegmentEPNS0_10ConnectionEhPKht>
            if (!ok) {
ffffffff8001f294:	84 c0                	test   %al,%al
ffffffff8001f296:	75 88                	jne    ffffffff8001f220 <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht+0x70>
            inner.Release();
ffffffff8001f298:	48 8b 7d b0          	mov    -0x50(%rbp),%rdi
            uint64_t flags = savedFlags;
ffffffff8001f29c:	49 8b 9f 30 16 00 00 	mov    0x1630(%r15),%rbx
            inner.Release();
ffffffff8001f2a3:	e8 28 ce fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001f2a8:	53                   	push   %rbx
ffffffff8001f2a9:	9d                   	popf
                asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001f2aa:	48 8b 45 a8          	mov    -0x58(%rbp),%rax
ffffffff8001f2ae:	50                   	push   %rax
ffffffff8001f2af:	9d                   	popf
                return sent > 0 ? sent : -1;
ffffffff8001f2b0:	66 45 85 f6          	test   %r14w,%r14w
ffffffff8001f2b4:	0f 84 36 01 00 00    	je     ffffffff8001f3f0 <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht+0x240>
ffffffff8001f2ba:	41 0f b7 c6          	movzwl %r14w,%eax
ffffffff8001f2be:	89 45 cc             	mov    %eax,-0x34(%rbp)
            }
            Timekeeping::Sleep(10);
        }

        return sent;
    }
ffffffff8001f2c1:	8b 45 cc             	mov    -0x34(%rbp),%eax
ffffffff8001f2c4:	48 83 c4 38          	add    $0x38,%rsp
ffffffff8001f2c8:	5b                   	pop    %rbx
ffffffff8001f2c9:	41 5c                	pop    %r12
ffffffff8001f2cb:	41 5d                	pop    %r13
ffffffff8001f2cd:	41 5e                	pop    %r14
ffffffff8001f2cf:	41 5f                	pop    %r15
ffffffff8001f2d1:	5d                   	pop    %rbp
ffffffff8001f2d2:	c3                   	ret
ffffffff8001f2d3:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        return sent;
ffffffff8001f2d8:	41 0f b7 c6          	movzwl %r14w,%eax
            uint64_t flags = savedFlags;
ffffffff8001f2dc:	4d 8b af 30 16 00 00 	mov    0x1630(%r15),%r13
ffffffff8001f2e3:	89 45 cc             	mov    %eax,-0x34(%rbp)
            inner.Release();
ffffffff8001f2e6:	48 8b 7d b0          	mov    -0x50(%rbp),%rdi
ffffffff8001f2ea:	e8 e1 cd fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001f2ef:	41 55                	push   %r13
ffffffff8001f2f1:	9d                   	popf
        asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001f2f2:	48 8b 45 a8          	mov    -0x58(%rbp),%rax
ffffffff8001f2f6:	50                   	push   %rax
ffffffff8001f2f7:	9d                   	popf
        uint64_t startTime = Timekeeping::GetMilliseconds();
ffffffff8001f2f8:	e8 13 43 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
                           conn->RetransmitBuffer, conn->RetransmitLen);
ffffffff8001f2fd:	4d 8d af 26 10 00 00 	lea    0x1026(%r15),%r13
        uint64_t startTime = Timekeeping::GetMilliseconds();
ffffffff8001f304:	49 89 c4             	mov    %rax,%r12
        while (conn->SendUnack != conn->SendNext) {
ffffffff8001f307:	41 8b 47 14          	mov    0x14(%r15),%eax
ffffffff8001f30b:	41 39 47 18          	cmp    %eax,0x18(%r15)
ffffffff8001f30f:	0f 85 bb 00 00 00    	jne    ffffffff8001f3d0 <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht+0x220>
ffffffff8001f315:	eb aa                	jmp    ffffffff8001f2c1 <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht+0x111>
ffffffff8001f317:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001f31e:	00 00 
            if ((now - conn->RetransmitTime) > RETRANSMIT_TIMEOUT_MS && conn->RetransmitLen > 0) {
ffffffff8001f320:	49 2b 87 08 16 00 00 	sub    0x1608(%r15),%rax
ffffffff8001f327:	48 3d e8 03 00 00    	cmp    $0x3e8,%rax
ffffffff8001f32d:	0f 86 85 00 00 00    	jbe    ffffffff8001f3b8 <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht+0x208>
ffffffff8001f333:	66 41 83 bf 02 16 00 	cmpw   $0x0,0x1602(%r15)
ffffffff8001f33a:	00 00 
ffffffff8001f33c:	74 7a                	je     ffffffff8001f3b8 <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht+0x208>
                conn->RetransmitCount++;
ffffffff8001f33e:	41 8b 87 10 16 00 00 	mov    0x1610(%r15),%eax
ffffffff8001f345:	83 c0 01             	add    $0x1,%eax
ffffffff8001f348:	41 89 87 10 16 00 00 	mov    %eax,0x1610(%r15)
                if (conn->RetransmitCount > MAX_RETRANSMITS) {
ffffffff8001f34f:	83 f8 05             	cmp    $0x5,%eax
ffffffff8001f352:	0f 8f 69 ff ff ff    	jg     ffffffff8001f2c1 <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht+0x111>
                asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001f358:	9c                   	pushf
ffffffff8001f359:	41 5e                	pop    %r14
ffffffff8001f35b:	fa                   	cli
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001f35c:	9c                   	pushf
ffffffff8001f35d:	5b                   	pop    %rbx
ffffffff8001f35e:	fa                   	cli
            inner.Acquire();
ffffffff8001f35f:	48 8b 7d b0          	mov    -0x50(%rbp),%rdi
ffffffff8001f363:	e8 48 cd fe ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
                conn->SendNext = conn->SendUnack;
ffffffff8001f368:	41 8b 47 18          	mov    0x18(%r15),%eax
                SendSegment(conn, FLAG_ACK | FLAG_PSH,
ffffffff8001f36c:	4c 89 ea             	mov    %r13,%rdx
ffffffff8001f36f:	4c 89 ff             	mov    %r15,%rdi
            savedFlags = flags;
ffffffff8001f372:	49 89 9f 30 16 00 00 	mov    %rbx,0x1630(%r15)
                uint32_t savedNext = conn->SendNext;
ffffffff8001f379:	41 8b 5f 14          	mov    0x14(%r15),%ebx
                SendSegment(conn, FLAG_ACK | FLAG_PSH,
ffffffff8001f37d:	be 18 00 00 00       	mov    $0x18,%esi
                conn->SendNext = conn->SendUnack;
ffffffff8001f382:	41 89 47 14          	mov    %eax,0x14(%r15)
                SendSegment(conn, FLAG_ACK | FLAG_PSH,
ffffffff8001f386:	41 0f b7 8f 02 16 00 	movzwl 0x1602(%r15),%ecx
ffffffff8001f38d:	00 
ffffffff8001f38e:	e8 bd f1 ff ff       	call   ffffffff8001e550 <_ZN3Net3TcpL11SendSegmentEPNS0_10ConnectionEhPKht>
                conn->SendNext = savedNext;
ffffffff8001f393:	41 89 5f 14          	mov    %ebx,0x14(%r15)
                conn->RetransmitTime = Timekeeping::GetMilliseconds();
ffffffff8001f397:	e8 74 42 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
            inner.Release();
ffffffff8001f39c:	48 8b 7d b0          	mov    -0x50(%rbp),%rdi
            uint64_t flags = savedFlags;
ffffffff8001f3a0:	49 8b 9f 30 16 00 00 	mov    0x1630(%r15),%rbx
ffffffff8001f3a7:	49 89 87 08 16 00 00 	mov    %rax,0x1608(%r15)
            inner.Release();
ffffffff8001f3ae:	e8 1d cd fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001f3b3:	53                   	push   %rbx
ffffffff8001f3b4:	9d                   	popf
                asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001f3b5:	41 56                	push   %r14
ffffffff8001f3b7:	9d                   	popf
            Timekeeping::Sleep(10);
ffffffff8001f3b8:	bf 0a 00 00 00       	mov    $0xa,%edi
ffffffff8001f3bd:	e8 6e 42 00 00       	call   ffffffff80023630 <_ZN11Timekeeping5SleepEm>
        while (conn->SendUnack != conn->SendNext) {
ffffffff8001f3c2:	41 8b 47 14          	mov    0x14(%r15),%eax
ffffffff8001f3c6:	41 39 47 18          	cmp    %eax,0x18(%r15)
ffffffff8001f3ca:	0f 84 f1 fe ff ff    	je     ffffffff8001f2c1 <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht+0x111>
            uint64_t now = Timekeeping::GetMilliseconds();
ffffffff8001f3d0:	e8 3b 42 00 00       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
            if ((now - startTime) > (RETRANSMIT_TIMEOUT_MS * MAX_RETRANSMITS)) {
ffffffff8001f3d5:	48 89 c2             	mov    %rax,%rdx
ffffffff8001f3d8:	4c 29 e2             	sub    %r12,%rdx
ffffffff8001f3db:	48 81 fa 88 13 00 00 	cmp    $0x1388,%rdx
ffffffff8001f3e2:	0f 86 38 ff ff ff    	jbe    ffffffff8001f320 <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht+0x170>
ffffffff8001f3e8:	e9 d4 fe ff ff       	jmp    ffffffff8001f2c1 <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht+0x111>
ffffffff8001f3ed:	0f 1f 00             	nopl   (%rax)
            return -1;
ffffffff8001f3f0:	c7 45 cc ff ff ff ff 	movl   $0xffffffff,-0x34(%rbp)
ffffffff8001f3f7:	e9 c5 fe ff ff       	jmp    ffffffff8001f2c1 <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht+0x111>
        while (sent < length) {
ffffffff8001f3fc:	c7 45 cc 00 00 00 00 	movl   $0x0,-0x34(%rbp)
ffffffff8001f403:	e9 de fe ff ff       	jmp    ffffffff8001f2e6 <_ZN3Net3Tcp4SendEPNS0_10ConnectionEPKht+0x136>
ffffffff8001f408:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001f40f:	00 00 00 
ffffffff8001f412:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001f419:	00 00 00 
ffffffff8001f41c:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001f423:	00 00 00 
ffffffff8001f426:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001f42d:	00 00 00 
ffffffff8001f430:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001f437:	00 00 00 
ffffffff8001f43a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)

ffffffff8001f440 <_ZN3Net3Tcp18ReceiveNonBlockingEPNS0_10ConnectionEPht>:
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
            Timekeeping::Sleep(10);
        }
    }

    int ReceiveNonBlocking(Connection* conn, uint8_t* buffer, uint16_t bufferSize) {
ffffffff8001f440:	55                   	push   %rbp
ffffffff8001f441:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001f444:	41 57                	push   %r15
ffffffff8001f446:	41 56                	push   %r14
ffffffff8001f448:	41 55                	push   %r13
ffffffff8001f44a:	41 54                	push   %r12
ffffffff8001f44c:	53                   	push   %rbx
ffffffff8001f44d:	48 83 ec 18          	sub    $0x18,%rsp
ffffffff8001f451:	48 89 75 c8          	mov    %rsi,-0x38(%rbp)
        if (conn == nullptr) {
ffffffff8001f455:	48 85 ff             	test   %rdi,%rdi
ffffffff8001f458:	0f 84 ec 00 00 00    	je     ffffffff8001f54a <_ZN3Net3Tcp18ReceiveNonBlockingEPNS0_10ConnectionEPht+0x10a>
ffffffff8001f45e:	48 89 fb             	mov    %rdi,%rbx
ffffffff8001f461:	41 89 d7             	mov    %edx,%r15d
        }

        // Disable interrupts while holding the lock to prevent deadlock
        // with OnPacketReceived (called from the network interrupt handler)
        uint64_t flags;
        asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001f464:	9c                   	pushf
ffffffff8001f465:	41 5c                	pop    %r12
ffffffff8001f467:	fa                   	cli
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001f468:	9c                   	pushf
ffffffff8001f469:	41 5e                	pop    %r14
ffffffff8001f46b:	fa                   	cli
            inner.Acquire();
ffffffff8001f46c:	4c 8d af 28 16 00 00 	lea    0x1628(%rdi),%r13
ffffffff8001f473:	4c 89 ef             	mov    %r13,%rdi
ffffffff8001f476:	e8 35 cc fe ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>

        conn->Lock.Acquire();

        int result;
        if (conn->RecvCount > 0) {
ffffffff8001f47b:	0f b7 93 24 10 00 00 	movzwl 0x1024(%rbx),%edx
            savedFlags = flags;
ffffffff8001f482:	4c 89 b3 30 16 00 00 	mov    %r14,0x1630(%rbx)
ffffffff8001f489:	66 85 d2             	test   %dx,%dx
ffffffff8001f48c:	75 42                	jne    ffffffff8001f4d0 <_ZN3Net3Tcp18ReceiveNonBlockingEPNS0_10ConnectionEPht+0x90>
                buffer[i] = conn->RecvBuffer[conn->RecvHead];
                conn->RecvHead = (conn->RecvHead + 1) % RECV_BUFFER_SIZE;
            }
            conn->RecvCount -= toRead;
            result = toRead;
        } else if (conn->CurrentState == State::CloseWait ||
ffffffff8001f48e:	8b 03                	mov    (%rbx),%eax
ffffffff8001f490:	31 db                	xor    %ebx,%ebx
ffffffff8001f492:	83 f8 09             	cmp    $0x9,%eax
ffffffff8001f495:	77 13                	ja     ffffffff8001f4aa <_ZN3Net3Tcp18ReceiveNonBlockingEPNS0_10ConnectionEPht+0x6a>
ffffffff8001f497:	ba 81 02 00 00       	mov    $0x281,%edx
ffffffff8001f49c:	48 0f a3 c2          	bt     %rax,%rdx
ffffffff8001f4a0:	0f 92 c0             	setb   %al
ffffffff8001f4a3:	0f b6 c0             	movzbl %al,%eax
ffffffff8001f4a6:	f7 d8                	neg    %eax
ffffffff8001f4a8:	89 c3                	mov    %eax,%ebx
            inner.Release();
ffffffff8001f4aa:	4c 89 ef             	mov    %r13,%rdi
ffffffff8001f4ad:	e8 1e cc fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001f4b2:	41 56                	push   %r14
ffffffff8001f4b4:	9d                   	popf
        } else {
            result = 0; // No data available
        }

        conn->Lock.Release();
        asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001f4b5:	41 54                	push   %r12
ffffffff8001f4b7:	9d                   	popf

        return result;
    }
ffffffff8001f4b8:	48 83 c4 18          	add    $0x18,%rsp
ffffffff8001f4bc:	89 d8                	mov    %ebx,%eax
ffffffff8001f4be:	5b                   	pop    %rbx
ffffffff8001f4bf:	41 5c                	pop    %r12
ffffffff8001f4c1:	41 5d                	pop    %r13
ffffffff8001f4c3:	41 5e                	pop    %r14
ffffffff8001f4c5:	41 5f                	pop    %r15
ffffffff8001f4c7:	5d                   	pop    %rbp
ffffffff8001f4c8:	c3                   	ret
ffffffff8001f4c9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            if (toRead > bufferSize) {
ffffffff8001f4d0:	66 44 39 fa          	cmp    %r15w,%dx
ffffffff8001f4d4:	44 89 f8             	mov    %r15d,%eax
ffffffff8001f4d7:	0f 46 c2             	cmovbe %edx,%eax
            for (uint16_t i = 0; i < toRead; i++) {
ffffffff8001f4da:	66 85 c0             	test   %ax,%ax
ffffffff8001f4dd:	74 5a                	je     ffffffff8001f539 <_ZN3Net3Tcp18ReceiveNonBlockingEPNS0_10ConnectionEPht+0xf9>
ffffffff8001f4df:	48 8b 4d c8          	mov    -0x38(%rbp),%rcx
ffffffff8001f4e3:	44 0f b7 c0          	movzwl %ax,%r8d
                buffer[i] = conn->RecvBuffer[conn->RecvHead];
ffffffff8001f4e7:	0f b7 b3 20 10 00 00 	movzwl 0x1020(%rbx),%esi
ffffffff8001f4ee:	49 01 c8             	add    %rcx,%r8
ffffffff8001f4f1:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001f4f8:	00 00 00 00 
ffffffff8001f4fc:	0f 1f 40 00          	nopl   0x0(%rax)
ffffffff8001f500:	0f b6 54 33 20       	movzbl 0x20(%rbx,%rsi,1),%edx
            for (uint16_t i = 0; i < toRead; i++) {
ffffffff8001f505:	48 83 c1 01          	add    $0x1,%rcx
                buffer[i] = conn->RecvBuffer[conn->RecvHead];
ffffffff8001f509:	88 51 ff             	mov    %dl,-0x1(%rcx)
                conn->RecvHead = (conn->RecvHead + 1) % RECV_BUFFER_SIZE;
ffffffff8001f50c:	0f b7 93 20 10 00 00 	movzwl 0x1020(%rbx),%edx
ffffffff8001f513:	83 c2 01             	add    $0x1,%edx
ffffffff8001f516:	81 e2 ff 0f 00 00    	and    $0xfff,%edx
ffffffff8001f51c:	66 89 93 20 10 00 00 	mov    %dx,0x1020(%rbx)
ffffffff8001f523:	0f b7 f2             	movzwl %dx,%esi
            for (uint16_t i = 0; i < toRead; i++) {
ffffffff8001f526:	4c 39 c1             	cmp    %r8,%rcx
ffffffff8001f529:	75 d5                	jne    ffffffff8001f500 <_ZN3Net3Tcp18ReceiveNonBlockingEPNS0_10ConnectionEPht+0xc0>
            conn->RecvCount -= toRead;
ffffffff8001f52b:	0f b7 93 24 10 00 00 	movzwl 0x1024(%rbx),%edx
            uint64_t flags = savedFlags;
ffffffff8001f532:	4c 8b b3 30 16 00 00 	mov    0x1630(%rbx),%r14
ffffffff8001f539:	29 c2                	sub    %eax,%edx
ffffffff8001f53b:	66 89 93 24 10 00 00 	mov    %dx,0x1024(%rbx)
            result = toRead;
ffffffff8001f542:	0f b7 d8             	movzwl %ax,%ebx
ffffffff8001f545:	e9 60 ff ff ff       	jmp    ffffffff8001f4aa <_ZN3Net3Tcp18ReceiveNonBlockingEPNS0_10ConnectionEPht+0x6a>
            return -1;
ffffffff8001f54a:	bb ff ff ff ff       	mov    $0xffffffff,%ebx
ffffffff8001f54f:	e9 64 ff ff ff       	jmp    ffffffff8001f4b8 <_ZN3Net3Tcp18ReceiveNonBlockingEPNS0_10ConnectionEPht+0x78>
ffffffff8001f554:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001f55b:	00 00 00 
ffffffff8001f55e:	66 90                	xchg   %ax,%ax

ffffffff8001f560 <_ZN3Net3Tcp5CloseEPNS0_10ConnectionE>:

    void Close(Connection* conn) {
        if (conn == nullptr) {
ffffffff8001f560:	48 85 ff             	test   %rdi,%rdi
ffffffff8001f563:	0f 84 d7 00 00 00    	je     ffffffff8001f640 <_ZN3Net3Tcp5CloseEPNS0_10ConnectionE+0xe0>
    void Close(Connection* conn) {
ffffffff8001f569:	55                   	push   %rbp
ffffffff8001f56a:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001f56d:	41 56                	push   %r14
ffffffff8001f56f:	41 55                	push   %r13
ffffffff8001f571:	41 54                	push   %r12
ffffffff8001f573:	53                   	push   %rbx
ffffffff8001f574:	48 89 fb             	mov    %rdi,%rbx
            return;
        }

        uint64_t flags;
        asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001f577:	9c                   	pushf
ffffffff8001f578:	41 5e                	pop    %r14
ffffffff8001f57a:	fa                   	cli
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff8001f57b:	9c                   	pushf
ffffffff8001f57c:	41 5d                	pop    %r13
ffffffff8001f57e:	fa                   	cli
            inner.Acquire();
ffffffff8001f57f:	4c 8d a7 28 16 00 00 	lea    0x1628(%rdi),%r12
ffffffff8001f586:	4c 89 e7             	mov    %r12,%rdi
ffffffff8001f589:	e8 22 cb fe ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
        conn->Lock.Acquire();

        switch (conn->CurrentState) {
ffffffff8001f58e:	8b 03                	mov    (%rbx),%eax
            savedFlags = flags;
ffffffff8001f590:	4c 89 ab 30 16 00 00 	mov    %r13,0x1630(%rbx)
ffffffff8001f597:	83 f8 04             	cmp    $0x4,%eax
ffffffff8001f59a:	0f 84 c0 00 00 00    	je     ffffffff8001f660 <_ZN3Net3Tcp5CloseEPNS0_10ConnectionE+0x100>
ffffffff8001f5a0:	7f 36                	jg     ffffffff8001f5d8 <_ZN3Net3Tcp5CloseEPNS0_10ConnectionE+0x78>
ffffffff8001f5a2:	83 e8 01             	sub    $0x1,%eax
ffffffff8001f5a5:	83 f8 01             	cmp    $0x1,%eax
ffffffff8001f5a8:	0f 87 9a 00 00 00    	ja     ffffffff8001f648 <_ZN3Net3Tcp5CloseEPNS0_10ConnectionE+0xe8>
                return;
            }

            case State::Listen:
            case State::SynSent: {
                conn->CurrentState = State::Closed;
ffffffff8001f5ae:	c7 03 00 00 00 00    	movl   $0x0,(%rbx)
            inner.Release();
ffffffff8001f5b4:	4c 89 e7             	mov    %r12,%rdi
                conn->Active = false;
ffffffff8001f5b7:	c6 83 24 16 00 00 00 	movb   $0x0,0x1624(%rbx)
ffffffff8001f5be:	e8 0d cb fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001f5c3:	41 55                	push   %r13
ffffffff8001f5c5:	9d                   	popf
                conn->Lock.Release();
                asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001f5c6:	41 56                	push   %r14
ffffffff8001f5c8:	9d                   	popf
                conn->Lock.Release();
                asm volatile("push %0; popfq" :: "r"(flags) : "memory");
                conn->Active = false;
                return;
        }
    }
ffffffff8001f5c9:	5b                   	pop    %rbx
ffffffff8001f5ca:	41 5c                	pop    %r12
ffffffff8001f5cc:	41 5d                	pop    %r13
ffffffff8001f5ce:	41 5e                	pop    %r14
ffffffff8001f5d0:	5d                   	pop    %rbp
ffffffff8001f5d1:	c3                   	ret
ffffffff8001f5d2:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        switch (conn->CurrentState) {
ffffffff8001f5d8:	83 f8 07             	cmp    $0x7,%eax
ffffffff8001f5db:	75 6b                	jne    ffffffff8001f648 <_ZN3Net3Tcp5CloseEPNS0_10ConnectionE+0xe8>
                conn->CurrentState = State::LastAck;
ffffffff8001f5dd:	c7 03 08 00 00 00    	movl   $0x8,(%rbx)
                SendSegment(conn, FLAG_FIN | FLAG_ACK, nullptr, 0);
ffffffff8001f5e3:	31 c9                	xor    %ecx,%ecx
ffffffff8001f5e5:	31 d2                	xor    %edx,%edx
ffffffff8001f5e7:	be 11 00 00 00       	mov    $0x11,%esi
ffffffff8001f5ec:	48 89 df             	mov    %rbx,%rdi
ffffffff8001f5ef:	e8 5c ef ff ff       	call   ffffffff8001e550 <_ZN3Net3TcpL11SendSegmentEPNS0_10ConnectionEhPKht>
                conn->SendNext++;
ffffffff8001f5f4:	83 43 14 01          	addl   $0x1,0x14(%rbx)
            inner.Release();
ffffffff8001f5f8:	4c 89 e7             	mov    %r12,%rdi
            uint64_t flags = savedFlags;
ffffffff8001f5fb:	4c 8b ab 30 16 00 00 	mov    0x1630(%rbx),%r13
            inner.Release();
ffffffff8001f602:	e8 c9 ca fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001f607:	41 55                	push   %r13
ffffffff8001f609:	9d                   	popf
                asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001f60a:	41 56                	push   %r14
ffffffff8001f60c:	9d                   	popf
ffffffff8001f60d:	41 bc 64 00 00 00    	mov    $0x64,%r12d
ffffffff8001f613:	eb 13                	jmp    ffffffff8001f628 <_ZN3Net3Tcp5CloseEPNS0_10ConnectionE+0xc8>
ffffffff8001f615:	0f 1f 00             	nopl   (%rax)
                    Timekeeping::Sleep(50);
ffffffff8001f618:	bf 32 00 00 00       	mov    $0x32,%edi
ffffffff8001f61d:	e8 0e 40 00 00       	call   ffffffff80023630 <_ZN11Timekeeping5SleepEm>
                for (int i = 0; i < 100; i++) {
ffffffff8001f622:	41 83 ec 01          	sub    $0x1,%r12d
ffffffff8001f626:	74 06                	je     ffffffff8001f62e <_ZN3Net3Tcp5CloseEPNS0_10ConnectionE+0xce>
                    if (conn->CurrentState == State::Closed) {
ffffffff8001f628:	8b 03                	mov    (%rbx),%eax
ffffffff8001f62a:	85 c0                	test   %eax,%eax
ffffffff8001f62c:	75 ea                	jne    ffffffff8001f618 <_ZN3Net3Tcp5CloseEPNS0_10ConnectionE+0xb8>
                conn->Active = false;
ffffffff8001f62e:	c6 83 24 16 00 00 00 	movb   $0x0,0x1624(%rbx)
    }
ffffffff8001f635:	5b                   	pop    %rbx
ffffffff8001f636:	41 5c                	pop    %r12
ffffffff8001f638:	41 5d                	pop    %r13
ffffffff8001f63a:	41 5e                	pop    %r14
ffffffff8001f63c:	5d                   	pop    %rbp
ffffffff8001f63d:	c3                   	ret
ffffffff8001f63e:	66 90                	xchg   %ax,%ax
ffffffff8001f640:	c3                   	ret
ffffffff8001f641:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            inner.Release();
ffffffff8001f648:	4c 89 e7             	mov    %r12,%rdi
ffffffff8001f64b:	e8 80 ca fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001f650:	41 55                	push   %r13
ffffffff8001f652:	9d                   	popf
                asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001f653:	41 56                	push   %r14
ffffffff8001f655:	9d                   	popf
                conn->Active = false;
ffffffff8001f656:	c6 83 24 16 00 00 00 	movb   $0x0,0x1624(%rbx)
                return;
ffffffff8001f65d:	eb d6                	jmp    ffffffff8001f635 <_ZN3Net3Tcp5CloseEPNS0_10ConnectionE+0xd5>
ffffffff8001f65f:	90                   	nop
                conn->CurrentState = State::FinWait1;
ffffffff8001f660:	c7 03 05 00 00 00    	movl   $0x5,(%rbx)
                SendSegment(conn, FLAG_FIN | FLAG_ACK, nullptr, 0);
ffffffff8001f666:	31 c9                	xor    %ecx,%ecx
ffffffff8001f668:	31 d2                	xor    %edx,%edx
ffffffff8001f66a:	be 11 00 00 00       	mov    $0x11,%esi
ffffffff8001f66f:	48 89 df             	mov    %rbx,%rdi
ffffffff8001f672:	e8 d9 ee ff ff       	call   ffffffff8001e550 <_ZN3Net3TcpL11SendSegmentEPNS0_10ConnectionEhPKht>
                conn->SendNext++;
ffffffff8001f677:	83 43 14 01          	addl   $0x1,0x14(%rbx)
            inner.Release();
ffffffff8001f67b:	4c 89 e7             	mov    %r12,%rdi
            uint64_t flags = savedFlags;
ffffffff8001f67e:	4c 8b ab 30 16 00 00 	mov    0x1630(%rbx),%r13
            inner.Release();
ffffffff8001f685:	e8 46 ca fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001f68a:	41 55                	push   %r13
ffffffff8001f68c:	9d                   	popf
                asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8001f68d:	41 56                	push   %r14
ffffffff8001f68f:	9d                   	popf
ffffffff8001f690:	41 bc 64 00 00 00    	mov    $0x64,%r12d
ffffffff8001f696:	eb 20                	jmp    ffffffff8001f6b8 <_ZN3Net3Tcp5CloseEPNS0_10ConnectionE+0x158>
ffffffff8001f698:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001f69f:	00 
                    if (conn->CurrentState == State::TimeWait ||
ffffffff8001f6a0:	85 c0                	test   %eax,%eax
ffffffff8001f6a2:	74 8a                	je     ffffffff8001f62e <_ZN3Net3Tcp5CloseEPNS0_10ConnectionE+0xce>
                    Timekeeping::Sleep(50);
ffffffff8001f6a4:	bf 32 00 00 00       	mov    $0x32,%edi
ffffffff8001f6a9:	e8 82 3f 00 00       	call   ffffffff80023630 <_ZN11Timekeeping5SleepEm>
                for (int i = 0; i < 100; i++) {
ffffffff8001f6ae:	41 83 ec 01          	sub    $0x1,%r12d
ffffffff8001f6b2:	0f 84 76 ff ff ff    	je     ffffffff8001f62e <_ZN3Net3Tcp5CloseEPNS0_10ConnectionE+0xce>
                    if (conn->CurrentState == State::TimeWait ||
ffffffff8001f6b8:	8b 03                	mov    (%rbx),%eax
ffffffff8001f6ba:	83 f8 09             	cmp    $0x9,%eax
ffffffff8001f6bd:	75 e1                	jne    ffffffff8001f6a0 <_ZN3Net3Tcp5CloseEPNS0_10ConnectionE+0x140>
ffffffff8001f6bf:	e9 6a ff ff ff       	jmp    ffffffff8001f62e <_ZN3Net3Tcp5CloseEPNS0_10ConnectionE+0xce>
ffffffff8001f6c4:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001f6cb:	00 00 00 
ffffffff8001f6ce:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001f6d5:	00 00 00 
ffffffff8001f6d8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001f6df:	00 

ffffffff8001f6e0 <_ZN3Net3Udp10InitializeEv>:
    };

    static constexpr uint32_t MAX_BINDINGS = 16;
    static PortBinding g_bindings[MAX_BINDINGS] = {};

    void Initialize() {
ffffffff8001f6e0:	55                   	push   %rbp
ffffffff8001f6e1:	48 c7 c0 90 72 17 80 	mov    $0xffffffff80177290,%rax
ffffffff8001f6e8:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001f6eb:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001f6f2:	00 00 00 00 
ffffffff8001f6f6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001f6fd:	00 00 00 
        for (uint32_t i = 0; i < MAX_BINDINGS; i++) {
            g_bindings[i].Active = false;
ffffffff8001f700:	c6 00 00             	movb   $0x0,(%rax)
        for (uint32_t i = 0; i < MAX_BINDINGS; i++) {
ffffffff8001f703:	48 83 c0 30          	add    $0x30,%rax
            g_bindings[i].Active = false;
ffffffff8001f707:	c6 40 e8 00          	movb   $0x0,-0x18(%rax)
        for (uint32_t i = 0; i < MAX_BINDINGS; i++) {
ffffffff8001f70b:	48 3d 10 74 17 80    	cmp    $0xffffffff80177410,%rax
ffffffff8001f711:	75 ed                	jne    ffffffff8001f700 <_ZN3Net3Udp10InitializeEv+0x20>
            Print(string);
ffffffff8001f713:	48 c7 c7 7c bb 02 80 	mov    $0xffffffff8002bb7c,%rdi
            g_kernelLogDepth++;
ffffffff8001f71a:	83 05 83 fd 1b 00 01 	addl   $0x1,0x1bfd83(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8001f721:	e8 9a 3a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001f726:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8001f72d:	e8 8e 3a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001f732:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8001f739:	e8 82 3a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001f73e:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8001f745:	e8 76 3a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001f74a:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8001f751:	e8 6a 3a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001f756:	48 c7 c7 45 bc 02 80 	mov    $0xffffffff8002bc45,%rdi
ffffffff8001f75d:	e8 5e 3a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8001f762:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8001f769:	e8 52 3a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8001f76e:	83 2d 2f fd 1b 00 01 	subl   $0x1,0x1bfd2f(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        }
        KernelLogStream(OK, "Net") << "UDP initialized";
    }
ffffffff8001f775:	5d                   	pop    %rbp
ffffffff8001f776:	c3                   	ret
ffffffff8001f777:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001f77e:	00 00 

ffffffff8001f780 <_ZN3Net3Udp16OnPacketReceivedEjjPKht>:

    void OnPacketReceived(uint32_t srcIp, uint32_t dstIp, const uint8_t* data, uint16_t length) {
        if (length < HEADER_SIZE) {
ffffffff8001f780:	66 83 f9 07          	cmp    $0x7,%cx
ffffffff8001f784:	76 72                	jbe    ffffffff8001f7f8 <_ZN3Net3Udp16OnPacketReceivedEjjPKht+0x78>
    void OnPacketReceived(uint32_t srcIp, uint32_t dstIp, const uint8_t* data, uint16_t length) {
ffffffff8001f786:	55                   	push   %rbp
ffffffff8001f787:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001f78a:	41 57                	push   %r15
ffffffff8001f78c:	41 56                	push   %r14
ffffffff8001f78e:	41 55                	push   %r13
ffffffff8001f790:	53                   	push   %rbx
ffffffff8001f791:	48 89 d3             	mov    %rdx,%rbx
ffffffff8001f794:	48 83 ec 10          	sub    $0x10,%rsp
ffffffff8001f798:	44 0f b7 6a 04       	movzwl 0x4(%rdx),%r13d
ffffffff8001f79d:	66 41 c1 c5 08       	rol    $0x8,%r13w
        const Header* hdr = (const Header*)data;
        uint16_t srcPort = Ntohs(hdr->SrcPort);
        uint16_t dstPort = Ntohs(hdr->DstPort);
        uint16_t udpLen = Ntohs(hdr->Length);

        if (udpLen < HEADER_SIZE || udpLen > length) {
ffffffff8001f7a2:	66 41 83 fd 07       	cmp    $0x7,%r13w
ffffffff8001f7a7:	76 3e                	jbe    ffffffff8001f7e7 <_ZN3Net3Udp16OnPacketReceivedEjjPKht+0x67>
ffffffff8001f7a9:	66 41 39 cd          	cmp    %cx,%r13w
ffffffff8001f7ad:	77 38                	ja     ffffffff8001f7e7 <_ZN3Net3Udp16OnPacketReceivedEjjPKht+0x67>
            return;
        }

        // Verify checksum if present
        if (hdr->Checksum != 0) {
ffffffff8001f7af:	66 83 7a 06 00       	cmpw   $0x0,0x6(%rdx)
        uint16_t srcPort = Ntohs(hdr->SrcPort);
ffffffff8001f7b4:	44 0f b7 32          	movzwl (%rdx),%r14d
        uint16_t dstPort = Ntohs(hdr->DstPort);
ffffffff8001f7b8:	44 0f b7 7a 02       	movzwl 0x2(%rdx),%r15d
        if (hdr->Checksum != 0) {
ffffffff8001f7bd:	75 41                	jne    ffffffff8001f800 <_ZN3Net3Udp16OnPacketReceivedEjjPKht+0x80>
ffffffff8001f7bf:	44 89 fa             	mov    %r15d,%edx
ffffffff8001f7c2:	48 c7 c0 80 72 17 80 	mov    $0xffffffff80177280,%rax

        const uint8_t* payload = data + HEADER_SIZE;
        uint16_t payloadLen = udpLen - HEADER_SIZE;

        // Dispatch to bound callback
        for (uint32_t i = 0; i < MAX_BINDINGS; i++) {
ffffffff8001f7c9:	31 c9                	xor    %ecx,%ecx
ffffffff8001f7cb:	66 c1 c2 08          	rol    $0x8,%dx
ffffffff8001f7cf:	90                   	nop
            if (g_bindings[i].Active && g_bindings[i].Port == dstPort) {
ffffffff8001f7d0:	80 78 10 00          	cmpb   $0x0,0x10(%rax)
ffffffff8001f7d4:	74 05                	je     ffffffff8001f7db <_ZN3Net3Udp16OnPacketReceivedEjjPKht+0x5b>
ffffffff8001f7d6:	66 39 10             	cmp    %dx,(%rax)
ffffffff8001f7d9:	74 4d                	je     ffffffff8001f828 <_ZN3Net3Udp16OnPacketReceivedEjjPKht+0xa8>
        for (uint32_t i = 0; i < MAX_BINDINGS; i++) {
ffffffff8001f7db:	83 c1 01             	add    $0x1,%ecx
ffffffff8001f7de:	48 83 c0 18          	add    $0x18,%rax
ffffffff8001f7e2:	83 f9 10             	cmp    $0x10,%ecx
ffffffff8001f7e5:	75 e9                	jne    ffffffff8001f7d0 <_ZN3Net3Udp16OnPacketReceivedEjjPKht+0x50>
                g_bindings[i].Callback(srcIp, srcPort, dstPort, payload, payloadLen);
                return;
            }
        }
    }
ffffffff8001f7e7:	48 83 c4 10          	add    $0x10,%rsp
ffffffff8001f7eb:	5b                   	pop    %rbx
ffffffff8001f7ec:	41 5d                	pop    %r13
ffffffff8001f7ee:	41 5e                	pop    %r14
ffffffff8001f7f0:	41 5f                	pop    %r15
ffffffff8001f7f2:	5d                   	pop    %rbp
ffffffff8001f7f3:	c3                   	ret
ffffffff8001f7f4:	0f 1f 40 00          	nopl   0x0(%rax)
ffffffff8001f7f8:	c3                   	ret
ffffffff8001f7f9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            uint16_t check = Ipv4::PseudoHeaderChecksum(srcIp, dstIp, Ipv4::PROTO_UDP,
ffffffff8001f800:	41 0f b7 cd          	movzwl %r13w,%ecx
ffffffff8001f804:	49 89 d0             	mov    %rdx,%r8
ffffffff8001f807:	ba 11 00 00 00       	mov    $0x11,%edx
ffffffff8001f80c:	89 7d dc             	mov    %edi,-0x24(%rbp)
ffffffff8001f80f:	41 89 c9             	mov    %ecx,%r9d
ffffffff8001f812:	e8 49 dd ff ff       	call   ffffffff8001d560 <_ZN3Net4Ipv420PseudoHeaderChecksumEjjhtPKvt>
            if (check != 0) {
ffffffff8001f817:	8b 7d dc             	mov    -0x24(%rbp),%edi
ffffffff8001f81a:	66 85 c0             	test   %ax,%ax
ffffffff8001f81d:	74 a0                	je     ffffffff8001f7bf <_ZN3Net3Udp16OnPacketReceivedEjjPKht+0x3f>
ffffffff8001f81f:	eb c6                	jmp    ffffffff8001f7e7 <_ZN3Net3Udp16OnPacketReceivedEjjPKht+0x67>
ffffffff8001f821:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
                g_bindings[i].Callback(srcIp, srcPort, dstPort, payload, payloadLen);
ffffffff8001f828:	48 8d 04 49          	lea    (%rcx,%rcx,2),%rax
        uint16_t payloadLen = udpLen - HEADER_SIZE;
ffffffff8001f82c:	45 8d 45 f8          	lea    -0x8(%r13),%r8d
        const uint8_t* payload = data + HEADER_SIZE;
ffffffff8001f830:	48 83 c3 08          	add    $0x8,%rbx
                g_bindings[i].Callback(srcIp, srcPort, dstPort, payload, payloadLen);
ffffffff8001f834:	0f b7 d2             	movzwl %dx,%edx
ffffffff8001f837:	66 41 c1 c6 08       	rol    $0x8,%r14w
ffffffff8001f83c:	48 8b 04 c5 88 72 17 	mov    -0x7fe88d78(,%rax,8),%rax
ffffffff8001f843:	80 
    }
ffffffff8001f844:	48 83 c4 10          	add    $0x10,%rsp
                g_bindings[i].Callback(srcIp, srcPort, dstPort, payload, payloadLen);
ffffffff8001f848:	48 89 d9             	mov    %rbx,%rcx
ffffffff8001f84b:	41 0f b7 f6          	movzwl %r14w,%esi
    }
ffffffff8001f84f:	5b                   	pop    %rbx
                g_bindings[i].Callback(srcIp, srcPort, dstPort, payload, payloadLen);
ffffffff8001f850:	45 0f b7 c0          	movzwl %r8w,%r8d
    }
ffffffff8001f854:	41 5d                	pop    %r13
ffffffff8001f856:	41 5e                	pop    %r14
ffffffff8001f858:	41 5f                	pop    %r15
ffffffff8001f85a:	5d                   	pop    %rbp
                g_bindings[i].Callback(srcIp, srcPort, dstPort, payload, payloadLen);
ffffffff8001f85b:	ff e0                	jmp    *%rax
ffffffff8001f85d:	0f 1f 00             	nopl   (%rax)

ffffffff8001f860 <_ZN3Net3Udp4SendEjttPKht>:

    bool Send(uint32_t destIp, uint16_t srcPort, uint16_t destPort,
              const uint8_t* payload, uint16_t payloadLen) {
ffffffff8001f860:	55                   	push   %rbp
ffffffff8001f861:	31 c0                	xor    %eax,%eax
ffffffff8001f863:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001f866:	41 55                	push   %r13
ffffffff8001f868:	41 54                	push   %r12
ffffffff8001f86a:	53                   	push   %rbx
        uint16_t udpLen = HEADER_SIZE + payloadLen;
ffffffff8001f86b:	41 8d 58 08          	lea    0x8(%r8),%ebx
              const uint8_t* payload, uint16_t payloadLen) {
ffffffff8001f86f:	48 81 ec e8 05 00 00 	sub    $0x5e8,%rsp
        uint8_t packet[1500];

        if (udpLen > sizeof(packet)) {
ffffffff8001f876:	66 81 fb dc 05       	cmp    $0x5dc,%bx
ffffffff8001f87b:	0f 87 8c 00 00 00    	ja     ffffffff8001f90d <_ZN3Net3Udp4SendEjttPKht+0xad>
ffffffff8001f881:	89 d8                	mov    %ebx,%eax
ffffffff8001f883:	66 c1 c6 08          	rol    $0x8,%si
ffffffff8001f887:	41 89 fc             	mov    %edi,%r12d
        hdr->SrcPort = Htons(srcPort);
        hdr->DstPort = Htons(destPort);
        hdr->Length = Htons(udpLen);
        hdr->Checksum = 0;

        memcpy(packet + HEADER_SIZE, payload, payloadLen);
ffffffff8001f88a:	48 8d bd 0c fa ff ff 	lea    -0x5f4(%rbp),%rdi
ffffffff8001f891:	66 c1 c2 08          	rol    $0x8,%dx
ffffffff8001f895:	66 c1 c0 08          	rol    $0x8,%ax

        // Calculate checksum with pseudo-header
        hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001f899:	0f b7 db             	movzwl %bx,%ebx
ffffffff8001f89c:	66 89 b5 04 fa ff ff 	mov    %si,-0x5fc(%rbp)
ffffffff8001f8a3:	66 89 95 06 fa ff ff 	mov    %dx,-0x5fa(%rbp)
        memcpy(packet + HEADER_SIZE, payload, payloadLen);
ffffffff8001f8aa:	48 89 ce             	mov    %rcx,%rsi
ffffffff8001f8ad:	41 0f b7 d0          	movzwl %r8w,%edx
ffffffff8001f8b1:	4c 8d ad 04 fa ff ff 	lea    -0x5fc(%rbp),%r13
ffffffff8001f8b8:	66 89 85 08 fa ff ff 	mov    %ax,-0x5f8(%rbp)
        hdr->Checksum = 0;
ffffffff8001f8bf:	31 c0                	xor    %eax,%eax
ffffffff8001f8c1:	66 89 85 0a fa ff ff 	mov    %ax,-0x5f6(%rbp)
        memcpy(packet + HEADER_SIZE, payload, payloadLen);
ffffffff8001f8c8:	e8 13 a9 ff ff       	call   ffffffff8001a1e0 <memcpy>
        hdr->Checksum = Ipv4::PseudoHeaderChecksum(
ffffffff8001f8cd:	e8 2e e1 ff ff       	call   ffffffff8001da00 <_ZN3Net12GetIpAddressEv>
ffffffff8001f8d2:	89 d9                	mov    %ebx,%ecx
ffffffff8001f8d4:	ba 11 00 00 00       	mov    $0x11,%edx
ffffffff8001f8d9:	44 89 e6             	mov    %r12d,%esi
ffffffff8001f8dc:	89 c7                	mov    %eax,%edi
ffffffff8001f8de:	41 89 d9             	mov    %ebx,%r9d
ffffffff8001f8e1:	4d 89 e8             	mov    %r13,%r8
ffffffff8001f8e4:	e8 77 dc ff ff       	call   ffffffff8001d560 <_ZN3Net4Ipv420PseudoHeaderChecksumEjjhtPKvt>
            Net::GetIpAddress(), destIp, Ipv4::PROTO_UDP,
            udpLen, packet, udpLen);
        if (hdr->Checksum == 0) {
            hdr->Checksum = 0xFFFF; // RFC 768: zero checksum transmitted as all ones
ffffffff8001f8e9:	ba ff ff ff ff       	mov    $0xffffffff,%edx
        }

        return Ipv4::Send(destIp, Ipv4::PROTO_UDP, packet, udpLen);
ffffffff8001f8ee:	89 d9                	mov    %ebx,%ecx
ffffffff8001f8f0:	44 89 e7             	mov    %r12d,%edi
            hdr->Checksum = 0xFFFF; // RFC 768: zero checksum transmitted as all ones
ffffffff8001f8f3:	66 85 c0             	test   %ax,%ax
        return Ipv4::Send(destIp, Ipv4::PROTO_UDP, packet, udpLen);
ffffffff8001f8f6:	be 11 00 00 00       	mov    $0x11,%esi
            hdr->Checksum = 0xFFFF; // RFC 768: zero checksum transmitted as all ones
ffffffff8001f8fb:	0f 44 c2             	cmove  %edx,%eax
        return Ipv4::Send(destIp, Ipv4::PROTO_UDP, packet, udpLen);
ffffffff8001f8fe:	4c 89 ea             	mov    %r13,%rdx
ffffffff8001f901:	66 89 85 0a fa ff ff 	mov    %ax,-0x5f6(%rbp)
ffffffff8001f908:	e8 13 de ff ff       	call   ffffffff8001d720 <_ZN3Net4Ipv44SendEjhPKht>
    }
ffffffff8001f90d:	48 81 c4 e8 05 00 00 	add    $0x5e8,%rsp
ffffffff8001f914:	5b                   	pop    %rbx
ffffffff8001f915:	41 5c                	pop    %r12
ffffffff8001f917:	41 5d                	pop    %r13
ffffffff8001f919:	5d                   	pop    %rbp
ffffffff8001f91a:	c3                   	ret
ffffffff8001f91b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff8001f920 <_ZN3Net3Udp4BindEtPFvjttPKhtE>:

    bool Bind(uint16_t port, RecvCallback callback) {
ffffffff8001f920:	89 fa                	mov    %edi,%edx
ffffffff8001f922:	48 c7 c0 80 72 17 80 	mov    $0xffffffff80177280,%rax
ffffffff8001f929:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
        // Check for duplicate
        for (uint32_t i = 0; i < MAX_BINDINGS; i++) {
            if (g_bindings[i].Active && g_bindings[i].Port == port) {
ffffffff8001f930:	80 78 10 00          	cmpb   $0x0,0x10(%rax)
ffffffff8001f934:	74 05                	je     ffffffff8001f93b <_ZN3Net3Udp4BindEtPFvjttPKhtE+0x1b>
ffffffff8001f936:	66 39 10             	cmp    %dx,(%rax)
ffffffff8001f939:	74 36                	je     ffffffff8001f971 <_ZN3Net3Udp4BindEtPFvjttPKhtE+0x51>
        for (uint32_t i = 0; i < MAX_BINDINGS; i++) {
ffffffff8001f93b:	48 83 c0 18          	add    $0x18,%rax
ffffffff8001f93f:	48 3d 00 74 17 80    	cmp    $0xffffffff80177400,%rax
ffffffff8001f945:	75 e9                	jne    ffffffff8001f930 <_ZN3Net3Udp4BindEtPFvjttPKhtE+0x10>
ffffffff8001f947:	48 c7 c2 90 72 17 80 	mov    $0xffffffff80177290,%rdx
                return false;
            }
        }

        // Find empty slot
        for (uint32_t i = 0; i < MAX_BINDINGS; i++) {
ffffffff8001f94e:	31 c0                	xor    %eax,%eax
ffffffff8001f950:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8001f957:	00 00 00 00 
ffffffff8001f95b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            if (!g_bindings[i].Active) {
ffffffff8001f960:	80 3a 00             	cmpb   $0x0,(%rdx)
ffffffff8001f963:	74 13                	je     ffffffff8001f978 <_ZN3Net3Udp4BindEtPFvjttPKhtE+0x58>
        for (uint32_t i = 0; i < MAX_BINDINGS; i++) {
ffffffff8001f965:	83 c0 01             	add    $0x1,%eax
ffffffff8001f968:	48 83 c2 18          	add    $0x18,%rdx
ffffffff8001f96c:	83 f8 10             	cmp    $0x10,%eax
ffffffff8001f96f:	75 ef                	jne    ffffffff8001f960 <_ZN3Net3Udp4BindEtPFvjttPKhtE+0x40>
                return false;
ffffffff8001f971:	31 c0                	xor    %eax,%eax
                g_bindings[i].Active = true;
                return true;
            }
        }
        return false;
    }
ffffffff8001f973:	c3                   	ret
ffffffff8001f974:	0f 1f 40 00          	nopl   0x0(%rax)
                g_bindings[i].Port = port;
ffffffff8001f978:	48 8d 04 40          	lea    (%rax,%rax,2),%rax
ffffffff8001f97c:	48 c1 e0 03          	shl    $0x3,%rax
ffffffff8001f980:	66 89 b8 80 72 17 80 	mov    %di,-0x7fe88d80(%rax)
                g_bindings[i].Callback = callback;
ffffffff8001f987:	48 89 b0 88 72 17 80 	mov    %rsi,-0x7fe88d78(%rax)
                g_bindings[i].Active = true;
ffffffff8001f98e:	c6 80 90 72 17 80 01 	movb   $0x1,-0x7fe88d70(%rax)
                return true;
ffffffff8001f995:	b8 01 00 00 00       	mov    $0x1,%eax
ffffffff8001f99a:	c3                   	ret
ffffffff8001f99b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff8001f9a0 <_ZN3Net3Udp6UnbindEt>:

    void Unbind(uint16_t port) {
        for (uint32_t i = 0; i < MAX_BINDINGS; i++) {
ffffffff8001f9a0:	48 c7 c0 80 72 17 80 	mov    $0xffffffff80177280,%rax
ffffffff8001f9a7:	31 d2                	xor    %edx,%edx
ffffffff8001f9a9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            if (g_bindings[i].Active && g_bindings[i].Port == port) {
ffffffff8001f9b0:	80 78 10 00          	cmpb   $0x0,0x10(%rax)
ffffffff8001f9b4:	74 05                	je     ffffffff8001f9bb <_ZN3Net3Udp6UnbindEt+0x1b>
ffffffff8001f9b6:	66 39 38             	cmp    %di,(%rax)
ffffffff8001f9b9:	74 15                	je     ffffffff8001f9d0 <_ZN3Net3Udp6UnbindEt+0x30>
        for (uint32_t i = 0; i < MAX_BINDINGS; i++) {
ffffffff8001f9bb:	83 c2 01             	add    $0x1,%edx
ffffffff8001f9be:	48 83 c0 18          	add    $0x18,%rax
ffffffff8001f9c2:	83 fa 10             	cmp    $0x10,%edx
ffffffff8001f9c5:	75 e9                	jne    ffffffff8001f9b0 <_ZN3Net3Udp6UnbindEt+0x10>
                g_bindings[i].Active = false;
                return;
            }
        }
    }
ffffffff8001f9c7:	c3                   	ret
ffffffff8001f9c8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001f9cf:	00 
                g_bindings[i].Active = false;
ffffffff8001f9d0:	48 8d 04 52          	lea    (%rdx,%rdx,2),%rax
ffffffff8001f9d4:	c6 04 c5 90 72 17 80 	movb   $0x0,-0x7fe88d70(,%rax,8)
ffffffff8001f9db:	00 
                return;
ffffffff8001f9dc:	c3                   	ret
ffffffff8001f9dd:	0f 1f 00             	nopl   (%rax)

ffffffff8001f9e0 <_ZN3PciL12ReadConfig16Ehhht>:
    // -------------------------------------------------------------------------
    // Unified read helpers (use ECAM if available, else legacy)
    // -------------------------------------------------------------------------

    static uint16_t ReadConfig16(uint8_t bus, uint8_t device, uint8_t function, uint16_t offset) {
        if (g_useEcam) {
ffffffff8001f9e0:	80 3d 19 7a 15 00 00 	cmpb   $0x0,0x157a19(%rip)        # ffffffff80177400 <_ZN3PciL9g_useEcamE>
ffffffff8001f9e7:	74 3f                	je     ffffffff8001fa28 <_ZN3PciL12ReadConfig16Ehhht+0x48>
            + ((uint64_t)bus << 20)
ffffffff8001f9e9:	40 0f b6 ff          	movzbl %dil,%edi
            + ((uint64_t)device << 15)
ffffffff8001f9ed:	40 0f b6 f6          	movzbl %sil,%esi
            + ((uint64_t)function << 12)
ffffffff8001f9f1:	0f b6 d2             	movzbl %dl,%edx
            + offset;
ffffffff8001f9f4:	0f b7 c9             	movzwl %cx,%ecx
ffffffff8001f9f7:	48 8b 05 aa cf 12 00 	mov    0x12cfaa(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            + ((uint64_t)bus << 20)
ffffffff8001f9fe:	48 c1 e7 14          	shl    $0x14,%rdi
ffffffff8001fa02:	48 03 05 ff 79 15 00 	add    0x1579ff(%rip),%rax        # ffffffff80177408 <_ZN3PciL10g_ecamBaseE>
            + ((uint64_t)device << 15)
ffffffff8001fa09:	48 c1 e6 0f          	shl    $0xf,%rsi
ffffffff8001fa0d:	48 01 f8             	add    %rdi,%rax
            + ((uint64_t)function << 12)
ffffffff8001fa10:	48 c1 e2 0c          	shl    $0xc,%rdx
ffffffff8001fa14:	48 01 f0             	add    %rsi,%rax
ffffffff8001fa17:	48 01 d0             	add    %rdx,%rax
ffffffff8001fa1a:	48 01 c8             	add    %rcx,%rax
        return *(volatile uint16_t*)EcamAddress(ecamBase, bus, device, function, offset);
ffffffff8001fa1d:	0f b7 00             	movzwl (%rax),%eax
ffffffff8001fa20:	c3                   	ret
ffffffff8001fa21:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff8001fa28:	c1 e6 0b             	shl    $0xb,%esi
ffffffff8001fa2b:	40 0f b6 c7          	movzbl %dil,%eax
             | (offset & 0xFC);
ffffffff8001fa2f:	89 cf                	mov    %ecx,%edi
             | ((uint32_t)(function & 0x07) << 8)
ffffffff8001fa31:	c1 e2 08             	shl    $0x8,%edx
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff8001fa34:	c1 e0 10             	shl    $0x10,%eax
             | (offset & 0xFC);
ffffffff8001fa37:	81 e7 fc 00 00 00    	and    $0xfc,%edi
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff8001fa3d:	81 e6 00 f8 00 00    	and    $0xf800,%esi
             | ((uint32_t)(function & 0x07) << 8)
ffffffff8001fa43:	81 e2 00 07 00 00    	and    $0x700,%edx
             | (offset & 0xFC);
ffffffff8001fa49:	09 f8                	or     %edi,%eax
ffffffff8001fa4b:	09 f0                	or     %esi,%eax
ffffffff8001fa4d:	09 d0                	or     %edx,%eax
        asm ("outl %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff8001fa4f:	ba f8 0c 00 00       	mov    $0xcf8,%edx
ffffffff8001fa54:	0d 00 00 00 80       	or     $0x80000000,%eax
ffffffff8001fa59:	ef                   	out    %eax,(%dx)
        return result;
    }

    inline uint32_t In32(uint16_t port) {
        uint32_t result;
        asm volatile("inl %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff8001fa5a:	ba fc 0c 00 00       	mov    $0xcfc,%edx
ffffffff8001fa5f:	ed                   	in     (%dx),%eax
        return (uint16_t)(val >> ((offset & 2) * 8));
ffffffff8001fa60:	83 e1 02             	and    $0x2,%ecx
ffffffff8001fa63:	c1 e1 03             	shl    $0x3,%ecx
ffffffff8001fa66:	d3 e8                	shr    %cl,%eax
            return EcamRead16(g_ecamBase, bus, device, function, offset);
        }
        return LegacyRead16(bus, device, function, (uint8_t)offset);
    }
ffffffff8001fa68:	c3                   	ret
ffffffff8001fa69:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff8001fa70 <_ZN3PciL11ReadConfig8Ehhht>:

    static uint8_t ReadConfig8(uint8_t bus, uint8_t device, uint8_t function, uint16_t offset) {
        if (g_useEcam) {
ffffffff8001fa70:	80 3d 89 79 15 00 00 	cmpb   $0x0,0x157989(%rip)        # ffffffff80177400 <_ZN3PciL9g_useEcamE>
ffffffff8001fa77:	74 3f                	je     ffffffff8001fab8 <_ZN3PciL11ReadConfig8Ehhht+0x48>
            + ((uint64_t)bus << 20)
ffffffff8001fa79:	40 0f b6 ff          	movzbl %dil,%edi
            + ((uint64_t)device << 15)
ffffffff8001fa7d:	40 0f b6 f6          	movzbl %sil,%esi
            + ((uint64_t)function << 12)
ffffffff8001fa81:	0f b6 d2             	movzbl %dl,%edx
            + offset;
ffffffff8001fa84:	0f b7 c9             	movzwl %cx,%ecx
ffffffff8001fa87:	48 8b 05 1a cf 12 00 	mov    0x12cf1a(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
            + ((uint64_t)bus << 20)
ffffffff8001fa8e:	48 c1 e7 14          	shl    $0x14,%rdi
ffffffff8001fa92:	48 03 05 6f 79 15 00 	add    0x15796f(%rip),%rax        # ffffffff80177408 <_ZN3PciL10g_ecamBaseE>
            + ((uint64_t)device << 15)
ffffffff8001fa99:	48 c1 e6 0f          	shl    $0xf,%rsi
ffffffff8001fa9d:	48 01 f8             	add    %rdi,%rax
            + ((uint64_t)function << 12)
ffffffff8001faa0:	48 c1 e2 0c          	shl    $0xc,%rdx
ffffffff8001faa4:	48 01 f0             	add    %rsi,%rax
ffffffff8001faa7:	48 01 d0             	add    %rdx,%rax
ffffffff8001faaa:	48 01 c8             	add    %rcx,%rax
        return *EcamAddress(ecamBase, bus, device, function, offset);
ffffffff8001faad:	0f b6 00             	movzbl (%rax),%eax
ffffffff8001fab0:	c3                   	ret
ffffffff8001fab1:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff8001fab8:	c1 e6 0b             	shl    $0xb,%esi
ffffffff8001fabb:	40 0f b6 c7          	movzbl %dil,%eax
             | (offset & 0xFC);
ffffffff8001fabf:	89 cf                	mov    %ecx,%edi
             | ((uint32_t)(function & 0x07) << 8)
ffffffff8001fac1:	c1 e2 08             	shl    $0x8,%edx
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff8001fac4:	c1 e0 10             	shl    $0x10,%eax
             | (offset & 0xFC);
ffffffff8001fac7:	81 e7 fc 00 00 00    	and    $0xfc,%edi
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff8001facd:	81 e6 00 f8 00 00    	and    $0xf800,%esi
             | ((uint32_t)(function & 0x07) << 8)
ffffffff8001fad3:	81 e2 00 07 00 00    	and    $0x700,%edx
             | (offset & 0xFC);
ffffffff8001fad9:	09 f8                	or     %edi,%eax
ffffffff8001fadb:	09 f0                	or     %esi,%eax
ffffffff8001fadd:	09 d0                	or     %edx,%eax
        asm ("outl %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff8001fadf:	ba f8 0c 00 00       	mov    $0xcf8,%edx
ffffffff8001fae4:	0d 00 00 00 80       	or     $0x80000000,%eax
ffffffff8001fae9:	ef                   	out    %eax,(%dx)
        asm volatile("inl %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff8001faea:	ba fc 0c 00 00       	mov    $0xcfc,%edx
ffffffff8001faef:	ed                   	in     (%dx),%eax
        return (uint8_t)(val >> ((offset & 3) * 8));
ffffffff8001faf0:	83 e1 03             	and    $0x3,%ecx
ffffffff8001faf3:	c1 e1 03             	shl    $0x3,%ecx
ffffffff8001faf6:	d3 e8                	shr    %cl,%eax
            return EcamRead8(g_ecamBase, bus, device, function, offset);
        }
        return LegacyRead8(bus, device, function, (uint8_t)offset);
    }
ffffffff8001faf8:	c3                   	ret
ffffffff8001faf9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff8001fb00 <_ZN3Pci12LegacyRead32Ehhhh>:
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff8001fb00:	c1 e6 0b             	shl    $0xb,%esi
ffffffff8001fb03:	40 0f b6 ff          	movzbl %dil,%edi
             | (offset & 0xFC);
ffffffff8001fb07:	81 e1 fc 00 00 00    	and    $0xfc,%ecx
             | ((uint32_t)(function & 0x07) << 8)
ffffffff8001fb0d:	c1 e2 08             	shl    $0x8,%edx
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff8001fb10:	c1 e7 10             	shl    $0x10,%edi
ffffffff8001fb13:	81 e6 00 f8 00 00    	and    $0xf800,%esi
             | ((uint32_t)(function & 0x07) << 8)
ffffffff8001fb19:	81 e2 00 07 00 00    	and    $0x700,%edx
             | (offset & 0xFC);
ffffffff8001fb1f:	09 cf                	or     %ecx,%edi
ffffffff8001fb21:	09 f7                	or     %esi,%edi
ffffffff8001fb23:	09 d7                	or     %edx,%edi
        asm ("outl %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff8001fb25:	ba f8 0c 00 00       	mov    $0xcf8,%edx
ffffffff8001fb2a:	89 f8                	mov    %edi,%eax
ffffffff8001fb2c:	0d 00 00 00 80       	or     $0x80000000,%eax
ffffffff8001fb31:	ef                   	out    %eax,(%dx)
        asm volatile("inl %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff8001fb32:	ba fc 0c 00 00       	mov    $0xcfc,%edx
ffffffff8001fb37:	ed                   	in     (%dx),%eax
    }
ffffffff8001fb38:	c3                   	ret
ffffffff8001fb39:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff8001fb40 <_ZN3Pci12LegacyRead16Ehhhh>:
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff8001fb40:	c1 e6 0b             	shl    $0xb,%esi
             | (offset & 0xFC);
ffffffff8001fb43:	89 c8                	mov    %ecx,%eax
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff8001fb45:	40 0f b6 ff          	movzbl %dil,%edi
             | ((uint32_t)(function & 0x07) << 8)
ffffffff8001fb49:	c1 e2 08             	shl    $0x8,%edx
             | (offset & 0xFC);
ffffffff8001fb4c:	25 fc 00 00 00       	and    $0xfc,%eax
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff8001fb51:	c1 e7 10             	shl    $0x10,%edi
ffffffff8001fb54:	81 e6 00 f8 00 00    	and    $0xf800,%esi
             | ((uint32_t)(function & 0x07) << 8)
ffffffff8001fb5a:	81 e2 00 07 00 00    	and    $0x700,%edx
             | (offset & 0xFC);
ffffffff8001fb60:	09 c7                	or     %eax,%edi
ffffffff8001fb62:	09 f7                	or     %esi,%edi
ffffffff8001fb64:	09 d7                	or     %edx,%edi
        asm ("outl %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff8001fb66:	ba f8 0c 00 00       	mov    $0xcf8,%edx
ffffffff8001fb6b:	89 f8                	mov    %edi,%eax
ffffffff8001fb6d:	0d 00 00 00 80       	or     $0x80000000,%eax
ffffffff8001fb72:	ef                   	out    %eax,(%dx)
        asm volatile("inl %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff8001fb73:	ba fc 0c 00 00       	mov    $0xcfc,%edx
ffffffff8001fb78:	ed                   	in     (%dx),%eax
        return (uint16_t)(val >> ((offset & 2) * 8));
ffffffff8001fb79:	83 e1 02             	and    $0x2,%ecx
ffffffff8001fb7c:	c1 e1 03             	shl    $0x3,%ecx
ffffffff8001fb7f:	d3 e8                	shr    %cl,%eax
    }
ffffffff8001fb81:	c3                   	ret
ffffffff8001fb82:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001fb89:	00 00 00 
ffffffff8001fb8c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8001fb90 <_ZN3Pci11LegacyRead8Ehhhh>:
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff8001fb90:	c1 e6 0b             	shl    $0xb,%esi
             | (offset & 0xFC);
ffffffff8001fb93:	89 c8                	mov    %ecx,%eax
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff8001fb95:	40 0f b6 ff          	movzbl %dil,%edi
             | ((uint32_t)(function & 0x07) << 8)
ffffffff8001fb99:	c1 e2 08             	shl    $0x8,%edx
             | (offset & 0xFC);
ffffffff8001fb9c:	25 fc 00 00 00       	and    $0xfc,%eax
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff8001fba1:	c1 e7 10             	shl    $0x10,%edi
ffffffff8001fba4:	81 e6 00 f8 00 00    	and    $0xf800,%esi
             | ((uint32_t)(function & 0x07) << 8)
ffffffff8001fbaa:	81 e2 00 07 00 00    	and    $0x700,%edx
             | (offset & 0xFC);
ffffffff8001fbb0:	09 c7                	or     %eax,%edi
ffffffff8001fbb2:	09 f7                	or     %esi,%edi
ffffffff8001fbb4:	09 d7                	or     %edx,%edi
        asm ("outl %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff8001fbb6:	ba f8 0c 00 00       	mov    $0xcf8,%edx
ffffffff8001fbbb:	89 f8                	mov    %edi,%eax
ffffffff8001fbbd:	0d 00 00 00 80       	or     $0x80000000,%eax
ffffffff8001fbc2:	ef                   	out    %eax,(%dx)
        asm volatile("inl %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff8001fbc3:	ba fc 0c 00 00       	mov    $0xcfc,%edx
ffffffff8001fbc8:	ed                   	in     (%dx),%eax
        return (uint8_t)(val >> ((offset & 3) * 8));
ffffffff8001fbc9:	83 e1 03             	and    $0x3,%ecx
ffffffff8001fbcc:	c1 e1 03             	shl    $0x3,%ecx
ffffffff8001fbcf:	d3 e8                	shr    %cl,%eax
    }
ffffffff8001fbd1:	c3                   	ret
ffffffff8001fbd2:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001fbd9:	00 00 00 
ffffffff8001fbdc:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8001fbe0 <_ZN3Pci13LegacyWrite32Ehhhhj>:
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff8001fbe0:	c1 e6 0b             	shl    $0xb,%esi
ffffffff8001fbe3:	40 0f b6 ff          	movzbl %dil,%edi
             | (offset & 0xFC);
ffffffff8001fbe7:	81 e1 fc 00 00 00    	and    $0xfc,%ecx
             | ((uint32_t)(function & 0x07) << 8)
ffffffff8001fbed:	c1 e2 08             	shl    $0x8,%edx
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff8001fbf0:	c1 e7 10             	shl    $0x10,%edi
ffffffff8001fbf3:	81 e6 00 f8 00 00    	and    $0xf800,%esi
             | ((uint32_t)(function & 0x07) << 8)
ffffffff8001fbf9:	81 e2 00 07 00 00    	and    $0x700,%edx
             | (offset & 0xFC);
ffffffff8001fbff:	09 cf                	or     %ecx,%edi
ffffffff8001fc01:	09 f7                	or     %esi,%edi
ffffffff8001fc03:	09 d7                	or     %edx,%edi
        asm ("outl %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff8001fc05:	ba f8 0c 00 00       	mov    $0xcf8,%edx
ffffffff8001fc0a:	89 f8                	mov    %edi,%eax
ffffffff8001fc0c:	0d 00 00 00 80       	or     $0x80000000,%eax
ffffffff8001fc11:	ef                   	out    %eax,(%dx)
ffffffff8001fc12:	ba fc 0c 00 00       	mov    $0xcfc,%edx
ffffffff8001fc17:	44 89 c0             	mov    %r8d,%eax
ffffffff8001fc1a:	ef                   	out    %eax,(%dx)
    }
ffffffff8001fc1b:	c3                   	ret
ffffffff8001fc1c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8001fc20 <_ZN3Pci13LegacyWrite16Ehhhht>:
             | (offset & 0xFC);
ffffffff8001fc20:	89 c8                	mov    %ecx,%eax
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff8001fc22:	40 0f b6 ff          	movzbl %dil,%edi
ffffffff8001fc26:	c1 e6 0b             	shl    $0xb,%esi
ffffffff8001fc29:	41 ba f8 0c 00 00    	mov    $0xcf8,%r10d
             | (offset & 0xFC);
ffffffff8001fc2f:	25 fc 00 00 00       	and    $0xfc,%eax
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff8001fc34:	c1 e7 10             	shl    $0x10,%edi
ffffffff8001fc37:	81 e6 00 f8 00 00    	and    $0xf800,%esi
             | (offset & 0xFC);
ffffffff8001fc3d:	09 c7                	or     %eax,%edi
             | ((uint32_t)(function & 0x07) << 8)
ffffffff8001fc3f:	c1 e2 08             	shl    $0x8,%edx
             | (offset & 0xFC);
ffffffff8001fc42:	09 f7                	or     %esi,%edi
             | ((uint32_t)(function & 0x07) << 8)
ffffffff8001fc44:	81 e2 00 07 00 00    	and    $0x700,%edx
             | (offset & 0xFC);
ffffffff8001fc4a:	09 d7                	or     %edx,%edi
ffffffff8001fc4c:	44 89 d2             	mov    %r10d,%edx
ffffffff8001fc4f:	89 fe                	mov    %edi,%esi
ffffffff8001fc51:	81 ce 00 00 00 80    	or     $0x80000000,%esi
ffffffff8001fc57:	89 f0                	mov    %esi,%eax
ffffffff8001fc59:	ef                   	out    %eax,(%dx)
        asm volatile("inl %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff8001fc5a:	41 b9 fc 0c 00 00    	mov    $0xcfc,%r9d
ffffffff8001fc60:	44 89 ca             	mov    %r9d,%edx
ffffffff8001fc63:	ed                   	in     (%dx),%eax
        int shift = (offset & 2) * 8;
ffffffff8001fc64:	83 e1 02             	and    $0x2,%ecx
        tmp &= ~(0xFFFF << shift);
ffffffff8001fc67:	bf ff ff 00 00       	mov    $0xffff,%edi
        asm ("outl %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff8001fc6c:	44 89 d2             	mov    %r10d,%edx
        int shift = (offset & 2) * 8;
ffffffff8001fc6f:	c1 e1 03             	shl    $0x3,%ecx
        tmp &= ~(0xFFFF << shift);
ffffffff8001fc72:	d3 e7                	shl    %cl,%edi
ffffffff8001fc74:	f7 d7                	not    %edi
ffffffff8001fc76:	21 c7                	and    %eax,%edi
ffffffff8001fc78:	89 f0                	mov    %esi,%eax
ffffffff8001fc7a:	ef                   	out    %eax,(%dx)
        tmp |= ((uint32_t)value << shift);
ffffffff8001fc7b:	45 0f b7 c0          	movzwl %r8w,%r8d
ffffffff8001fc7f:	44 89 ca             	mov    %r9d,%edx
ffffffff8001fc82:	41 d3 e0             	shl    %cl,%r8d
ffffffff8001fc85:	44 89 c0             	mov    %r8d,%eax
ffffffff8001fc88:	09 f8                	or     %edi,%eax
ffffffff8001fc8a:	ef                   	out    %eax,(%dx)
    }
ffffffff8001fc8b:	c3                   	ret
ffffffff8001fc8c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff8001fc90 <_ZN3Pci14FindCapabilityEhhhh>:

    // -------------------------------------------------------------------------
    // PCI capability list traversal
    // -------------------------------------------------------------------------

    uint8_t FindCapability(uint8_t bus, uint8_t device, uint8_t function, uint8_t capId) {
ffffffff8001fc90:	55                   	push   %rbp
        // Check Status register bit 4 (Capabilities List present)
        uint16_t status = ReadConfig16(bus, device, function, RegStatus);
ffffffff8001fc91:	44 0f b6 da          	movzbl %dl,%r11d
ffffffff8001fc95:	44 0f b6 d6          	movzbl %sil,%r10d
ffffffff8001fc99:	44 0f b6 cf          	movzbl %dil,%r9d
ffffffff8001fc9d:	44 89 da             	mov    %r11d,%edx
ffffffff8001fca0:	44 89 d6             	mov    %r10d,%esi
ffffffff8001fca3:	44 89 cf             	mov    %r9d,%edi
    uint8_t FindCapability(uint8_t bus, uint8_t device, uint8_t function, uint8_t capId) {
ffffffff8001fca6:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001fca9:	53                   	push   %rbx
ffffffff8001fcaa:	89 cb                	mov    %ecx,%ebx
        uint16_t status = ReadConfig16(bus, device, function, RegStatus);
ffffffff8001fcac:	b9 06 00 00 00       	mov    $0x6,%ecx
    uint8_t FindCapability(uint8_t bus, uint8_t device, uint8_t function, uint8_t capId) {
ffffffff8001fcb1:	48 83 ec 08          	sub    $0x8,%rsp
        uint16_t status = ReadConfig16(bus, device, function, RegStatus);
ffffffff8001fcb5:	e8 26 fd ff ff       	call   ffffffff8001f9e0 <_ZN3PciL12ReadConfig16Ehhht>
        if (!(status & (1 << 4))) {
ffffffff8001fcba:	a8 10                	test   $0x10,%al
ffffffff8001fcbc:	75 12                	jne    ffffffff8001fcd0 <_ZN3Pci14FindCapabilityEhhhh+0x40>
            return 0;
ffffffff8001fcbe:	45 31 c0             	xor    %r8d,%r8d
            }
            offset = ReadConfig8(bus, device, function, offset + 1) & 0xFC;
        }

        return 0;
    }
ffffffff8001fcc1:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff8001fcc5:	44 89 c0             	mov    %r8d,%eax
ffffffff8001fcc8:	c9                   	leave
ffffffff8001fcc9:	c3                   	ret
ffffffff8001fcca:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        uint8_t offset = ReadConfig8(bus, device, function, 0x34) & 0xFC;
ffffffff8001fcd0:	b9 34 00 00 00       	mov    $0x34,%ecx
ffffffff8001fcd5:	eb 25                	jmp    ffffffff8001fcfc <_ZN3Pci14FindCapabilityEhhhh+0x6c>
ffffffff8001fcd7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001fcde:	00 00 
            uint8_t id = ReadConfig8(bus, device, function, offset);
ffffffff8001fce0:	0f b6 c8             	movzbl %al,%ecx
ffffffff8001fce3:	44 89 da             	mov    %r11d,%edx
ffffffff8001fce6:	44 89 d6             	mov    %r10d,%esi
ffffffff8001fce9:	44 89 cf             	mov    %r9d,%edi
ffffffff8001fcec:	e8 7f fd ff ff       	call   ffffffff8001fa70 <_ZN3PciL11ReadConfig8Ehhht>
            if (id == capId) {
ffffffff8001fcf1:	38 d8                	cmp    %bl,%al
ffffffff8001fcf3:	74 cc                	je     ffffffff8001fcc1 <_ZN3Pci14FindCapabilityEhhhh+0x31>
            offset = ReadConfig8(bus, device, function, offset + 1) & 0xFC;
ffffffff8001fcf5:	41 8d 48 01          	lea    0x1(%r8),%ecx
ffffffff8001fcf9:	0f b6 c9             	movzbl %cl,%ecx
        uint8_t offset = ReadConfig8(bus, device, function, 0x34) & 0xFC;
ffffffff8001fcfc:	44 89 da             	mov    %r11d,%edx
ffffffff8001fcff:	44 89 d6             	mov    %r10d,%esi
ffffffff8001fd02:	44 89 cf             	mov    %r9d,%edi
ffffffff8001fd05:	e8 66 fd ff ff       	call   ffffffff8001fa70 <_ZN3PciL11ReadConfig8Ehhht>
        while (offset != 0) {
ffffffff8001fd0a:	25 fc 00 00 00       	and    $0xfc,%eax
ffffffff8001fd0f:	41 89 c0             	mov    %eax,%r8d
ffffffff8001fd12:	75 cc                	jne    ffffffff8001fce0 <_ZN3Pci14FindCapabilityEhhhh+0x50>
ffffffff8001fd14:	eb a8                	jmp    ffffffff8001fcbe <_ZN3Pci14FindCapabilityEhhhh+0x2e>
ffffffff8001fd16:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8001fd1d:	00 00 00 

ffffffff8001fd20 <_ZN3Pci12GetClassNameEhh>:
    // -------------------------------------------------------------------------
    // PCI class code names
    // -------------------------------------------------------------------------

    const char* GetClassName(uint8_t classCode, uint8_t subClass) {
        switch (classCode) {
ffffffff8001fd20:	40 80 ff 11          	cmp    $0x11,%dil
ffffffff8001fd24:	77 1a                	ja     ffffffff8001fd40 <_ZN3Pci12GetClassNameEhh+0x20>
ffffffff8001fd26:	40 0f b6 ff          	movzbl %dil,%edi
ffffffff8001fd2a:	ff 24 fd d0 dd 02 80 	jmp    *-0x7ffd2230(,%rdi,8)
ffffffff8001fd31:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
ffffffff8001fd38:	48 c7 c0 ee bd 02 80 	mov    $0xffffffff8002bdee,%rax
ffffffff8001fd3f:	c3                   	ret
            case 0x11:
                return "Signal Processing Controller";
            case 0xFF:
                return "Unassigned";
            default:
                return "Unknown";
ffffffff8001fd40:	40 80 ff ff          	cmp    $0xff,%dil
ffffffff8001fd44:	48 c7 c2 70 b2 02 80 	mov    $0xffffffff8002b270,%rdx
ffffffff8001fd4b:	48 c7 c0 95 bc 02 80 	mov    $0xffffffff8002bc95,%rax
ffffffff8001fd52:	48 0f 45 c2          	cmovne %rdx,%rax
ffffffff8001fd56:	c3                   	ret
ffffffff8001fd57:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001fd5e:	00 00 
                return "Memory Controller";
ffffffff8001fd60:	48 c7 c0 39 bd 02 80 	mov    $0xffffffff8002bd39,%rax
ffffffff8001fd67:	c3                   	ret
ffffffff8001fd68:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001fd6f:	00 
            case 0x03:
ffffffff8001fd70:	48 c7 c0 10 bd 02 80 	mov    $0xffffffff8002bd10,%rax
ffffffff8001fd77:	40 80 fe 02          	cmp    $0x2,%sil
ffffffff8001fd7b:	0f 87 6e 01 00 00    	ja     ffffffff8001feef <_ZN3Pci12GetClassNameEhh+0x1cf>
ffffffff8001fd81:	40 0f b6 f6          	movzbl %sil,%esi
ffffffff8001fd85:	48 8b 04 f5 60 de 02 	mov    -0x7ffd21a0(,%rsi,8),%rax
ffffffff8001fd8c:	80 
ffffffff8001fd8d:	c3                   	ret
ffffffff8001fd8e:	66 90                	xchg   %ax,%ax
                    case 0x00: return "Ethernet Controller";
ffffffff8001fd90:	48 c7 c0 b8 bc 02 80 	mov    $0xffffffff8002bcb8,%rax
                switch (subClass) {
ffffffff8001fd97:	40 84 f6             	test   %sil,%sil
ffffffff8001fd9a:	0f 84 4f 01 00 00    	je     ffffffff8001feef <_ZN3Pci12GetClassNameEhh+0x1cf>
                    default:   return "Network Controller";
ffffffff8001fda0:	40 80 fe 80          	cmp    $0x80,%sil
ffffffff8001fda4:	48 c7 c2 d2 bc 02 80 	mov    $0xffffffff8002bcd2,%rdx
ffffffff8001fdab:	48 c7 c0 cc bc 02 80 	mov    $0xffffffff8002bccc,%rax
ffffffff8001fdb2:	48 0f 45 c2          	cmovne %rdx,%rax
ffffffff8001fdb6:	c3                   	ret
ffffffff8001fdb7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001fdbe:	00 00 
            case 0x01:
ffffffff8001fdc0:	48 c7 c0 a0 bc 02 80 	mov    $0xffffffff8002bca0,%rax
ffffffff8001fdc7:	40 80 fe 08          	cmp    $0x8,%sil
ffffffff8001fdcb:	0f 87 1e 01 00 00    	ja     ffffffff8001feef <_ZN3Pci12GetClassNameEhh+0x1cf>
ffffffff8001fdd1:	40 0f b6 f6          	movzbl %sil,%esi
ffffffff8001fdd5:	48 8b 04 f5 80 de 02 	mov    -0x7ffd2180(,%rsi,8),%rax
ffffffff8001fddc:	80 
ffffffff8001fddd:	c3                   	ret
ffffffff8001fdde:	66 90                	xchg   %ax,%ax
                return "Signal Processing Controller";
ffffffff8001fde0:	48 c7 c0 78 bc 02 80 	mov    $0xffffffff8002bc78,%rax
ffffffff8001fde7:	c3                   	ret
ffffffff8001fde8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001fdef:	00 
                return "Encryption Controller";
ffffffff8001fdf0:	48 c7 c0 62 bc 02 80 	mov    $0xffffffff8002bc62,%rax
ffffffff8001fdf7:	c3                   	ret
ffffffff8001fdf8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001fdff:	00 
                return "Satellite Communication Controller";
ffffffff8001fe00:	48 c7 c0 58 d0 02 80 	mov    $0xffffffff8002d058,%rax
ffffffff8001fe07:	c3                   	ret
ffffffff8001fe08:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001fe0f:	00 
                return "Intelligent Controller";
ffffffff8001fe10:	48 c7 c0 f9 bc 02 80 	mov    $0xffffffff8002bcf9,%rax
ffffffff8001fe17:	c3                   	ret
ffffffff8001fe18:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001fe1f:	00 
                return "Wireless Controller";
ffffffff8001fe20:	48 c7 c0 e5 bc 02 80 	mov    $0xffffffff8002bce5,%rax
ffffffff8001fe27:	c3                   	ret
ffffffff8001fe28:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001fe2f:	00 
                    case 0x03: return "USB Controller";
ffffffff8001fe30:	48 c7 c0 ce bd 02 80 	mov    $0xffffffff8002bdce,%rax
                switch (subClass) {
ffffffff8001fe37:	40 80 fe 03          	cmp    $0x3,%sil
ffffffff8001fe3b:	0f 84 ae 00 00 00    	je     ffffffff8001feef <_ZN3Pci12GetClassNameEhh+0x1cf>
                    default:   return "Serial Bus Controller";
ffffffff8001fe41:	40 80 fe 05          	cmp    $0x5,%sil
ffffffff8001fe45:	48 c7 c2 23 bd 02 80 	mov    $0xffffffff8002bd23,%rdx
ffffffff8001fe4c:	48 c7 c0 dd bd 02 80 	mov    $0xffffffff8002bddd,%rax
ffffffff8001fe53:	48 0f 45 c2          	cmovne %rdx,%rax
ffffffff8001fe57:	c3                   	ret
ffffffff8001fe58:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001fe5f:	00 
                return "Processor";
ffffffff8001fe60:	48 c7 c0 ed a2 02 80 	mov    $0xffffffff8002a2ed,%rax
ffffffff8001fe67:	c3                   	ret
ffffffff8001fe68:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001fe6f:	00 
                return "Docking Station";
ffffffff8001fe70:	48 c7 c0 be bd 02 80 	mov    $0xffffffff8002bdbe,%rax
ffffffff8001fe77:	c3                   	ret
ffffffff8001fe78:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001fe7f:	00 
                return "Input Device Controller";
ffffffff8001fe80:	48 c7 c0 a6 bd 02 80 	mov    $0xffffffff8002bda6,%rax
ffffffff8001fe87:	c3                   	ret
ffffffff8001fe88:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001fe8f:	00 
                return "Base System Peripheral";
ffffffff8001fe90:	48 c7 c0 8f bd 02 80 	mov    $0xffffffff8002bd8f,%rax
ffffffff8001fe97:	c3                   	ret
ffffffff8001fe98:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001fe9f:	00 
                return "Simple Communication Controller";
ffffffff8001fea0:	48 c7 c0 80 d0 02 80 	mov    $0xffffffff8002d080,%rax
ffffffff8001fea7:	c3                   	ret
ffffffff8001fea8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8001feaf:	00 
                switch (subClass) {
ffffffff8001feb0:	40 80 fe 04          	cmp    $0x4,%sil
ffffffff8001feb4:	74 32                	je     ffffffff8001fee8 <_ZN3Pci12GetClassNameEhh+0x1c8>
ffffffff8001feb6:	77 38                	ja     ffffffff8001fef0 <_ZN3Pci12GetClassNameEhh+0x1d0>
                    case 0x00: return "Host Bridge";
ffffffff8001feb8:	48 c7 c0 4b bd 02 80 	mov    $0xffffffff8002bd4b,%rax
                switch (subClass) {
ffffffff8001febf:	40 84 f6             	test   %sil,%sil
ffffffff8001fec2:	74 2b                	je     ffffffff8001feef <_ZN3Pci12GetClassNameEhh+0x1cf>
ffffffff8001fec4:	40 80 fe 01          	cmp    $0x1,%sil
ffffffff8001fec8:	48 c7 c2 57 bd 02 80 	mov    $0xffffffff8002bd57,%rdx
ffffffff8001fecf:	48 c7 c0 81 bd 02 80 	mov    $0xffffffff8002bd81,%rax
ffffffff8001fed6:	48 0f 44 c2          	cmove  %rdx,%rax
ffffffff8001feda:	c3                   	ret
ffffffff8001fedb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
                return "Unclassified";
ffffffff8001fee0:	48 c7 c0 55 bc 02 80 	mov    $0xffffffff8002bc55,%rax
ffffffff8001fee7:	c3                   	ret
                    case 0x04: return "PCI-to-PCI Bridge";
ffffffff8001fee8:	48 c7 c0 62 bd 02 80 	mov    $0xffffffff8002bd62,%rax
        }
    }
ffffffff8001feef:	c3                   	ret
                    case 0x80: return "Other Bridge";
ffffffff8001fef0:	40 80 fe 80          	cmp    $0x80,%sil
ffffffff8001fef4:	48 c7 c2 74 bd 02 80 	mov    $0xffffffff8002bd74,%rdx
ffffffff8001fefb:	48 c7 c0 81 bd 02 80 	mov    $0xffffffff8002bd81,%rax
ffffffff8001ff02:	48 0f 44 c2          	cmove  %rdx,%rax
ffffffff8001ff06:	c3                   	ret
ffffffff8001ff07:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8001ff0e:	00 00 

ffffffff8001ff10 <_ZN3PciL17EnumerateFunctionEhhh>:

    // -------------------------------------------------------------------------
    // Device enumeration
    // -------------------------------------------------------------------------

    static void EnumerateFunction(uint8_t bus, uint8_t device, uint8_t function) {
ffffffff8001ff10:	55                   	push   %rbp
        uint16_t vendorId = ReadConfig16(bus, device, function, RegVendorId);
ffffffff8001ff11:	44 0f b6 d2          	movzbl %dl,%r10d
ffffffff8001ff15:	44 0f b6 ce          	movzbl %sil,%r9d
ffffffff8001ff19:	44 0f b6 c7          	movzbl %dil,%r8d
ffffffff8001ff1d:	31 c9                	xor    %ecx,%ecx
    static void EnumerateFunction(uint8_t bus, uint8_t device, uint8_t function) {
ffffffff8001ff1f:	48 89 e5             	mov    %rsp,%rbp
ffffffff8001ff22:	41 57                	push   %r15
ffffffff8001ff24:	41 56                	push   %r14
ffffffff8001ff26:	41 89 fe             	mov    %edi,%r14d
        uint16_t vendorId = ReadConfig16(bus, device, function, RegVendorId);
ffffffff8001ff29:	44 89 c7             	mov    %r8d,%edi
    static void EnumerateFunction(uint8_t bus, uint8_t device, uint8_t function) {
ffffffff8001ff2c:	41 55                	push   %r13
ffffffff8001ff2e:	41 89 f5             	mov    %esi,%r13d
        uint16_t vendorId = ReadConfig16(bus, device, function, RegVendorId);
ffffffff8001ff31:	44 89 ce             	mov    %r9d,%esi
    static void EnumerateFunction(uint8_t bus, uint8_t device, uint8_t function) {
ffffffff8001ff34:	41 54                	push   %r12
ffffffff8001ff36:	41 89 d4             	mov    %edx,%r12d
        uint16_t vendorId = ReadConfig16(bus, device, function, RegVendorId);
ffffffff8001ff39:	44 89 d2             	mov    %r10d,%edx
    static void EnumerateFunction(uint8_t bus, uint8_t device, uint8_t function) {
ffffffff8001ff3c:	53                   	push   %rbx
ffffffff8001ff3d:	48 83 ec 18          	sub    $0x18,%rsp
        uint16_t vendorId = ReadConfig16(bus, device, function, RegVendorId);
ffffffff8001ff41:	e8 9a fa ff ff       	call   ffffffff8001f9e0 <_ZN3PciL12ReadConfig16Ehhht>
        if (vendorId == 0xFFFF) {
ffffffff8001ff46:	66 83 f8 ff          	cmp    $0xffff,%ax
ffffffff8001ff4a:	0f 84 51 02 00 00    	je     ffffffff800201a1 <_ZN3PciL17EnumerateFunctionEhhh+0x291>
        dev.Segment = 0;
        dev.Bus = bus;
        dev.Device = device;
        dev.Function = function;
        dev.VendorId = vendorId;
        dev.DeviceId = ReadConfig16(bus, device, function, RegDeviceId);
ffffffff8001ff50:	b9 02 00 00 00       	mov    $0x2,%ecx
ffffffff8001ff55:	44 89 d2             	mov    %r10d,%edx
ffffffff8001ff58:	44 89 ce             	mov    %r9d,%esi
ffffffff8001ff5b:	44 89 c7             	mov    %r8d,%edi
ffffffff8001ff5e:	89 c3                	mov    %eax,%ebx
ffffffff8001ff60:	e8 7b fa ff ff       	call   ffffffff8001f9e0 <_ZN3PciL12ReadConfig16Ehhht>
        dev.ClassCode = ReadConfig8(bus, device, function, RegClassCode);
ffffffff8001ff65:	b9 0b 00 00 00       	mov    $0xb,%ecx
ffffffff8001ff6a:	44 89 d2             	mov    %r10d,%edx
ffffffff8001ff6d:	44 89 ce             	mov    %r9d,%esi
ffffffff8001ff70:	44 89 c7             	mov    %r8d,%edi
        dev.DeviceId = ReadConfig16(bus, device, function, RegDeviceId);
ffffffff8001ff73:	66 89 45 ce          	mov    %ax,-0x32(%rbp)
        dev.ClassCode = ReadConfig8(bus, device, function, RegClassCode);
ffffffff8001ff77:	e8 f4 fa ff ff       	call   ffffffff8001fa70 <_ZN3PciL11ReadConfig8Ehhht>
        dev.SubClass = ReadConfig8(bus, device, function, RegSubClass);
ffffffff8001ff7c:	b9 0a 00 00 00       	mov    $0xa,%ecx
ffffffff8001ff81:	44 89 d2             	mov    %r10d,%edx
ffffffff8001ff84:	44 89 ce             	mov    %r9d,%esi
ffffffff8001ff87:	44 89 c7             	mov    %r8d,%edi
        dev.ClassCode = ReadConfig8(bus, device, function, RegClassCode);
ffffffff8001ff8a:	88 45 cd             	mov    %al,-0x33(%rbp)
        dev.SubClass = ReadConfig8(bus, device, function, RegSubClass);
ffffffff8001ff8d:	e8 de fa ff ff       	call   ffffffff8001fa70 <_ZN3PciL11ReadConfig8Ehhht>
        dev.ProgIf = ReadConfig8(bus, device, function, RegProgIf);
ffffffff8001ff92:	b9 09 00 00 00       	mov    $0x9,%ecx
ffffffff8001ff97:	44 89 d2             	mov    %r10d,%edx
ffffffff8001ff9a:	44 89 ce             	mov    %r9d,%esi
ffffffff8001ff9d:	44 89 c7             	mov    %r8d,%edi
        dev.SubClass = ReadConfig8(bus, device, function, RegSubClass);
ffffffff8001ffa0:	41 89 c7             	mov    %eax,%r15d
        dev.ProgIf = ReadConfig8(bus, device, function, RegProgIf);
ffffffff8001ffa3:	e8 c8 fa ff ff       	call   ffffffff8001fa70 <_ZN3PciL11ReadConfig8Ehhht>
        dev.RevisionId = ReadConfig8(bus, device, function, RegRevisionId);
ffffffff8001ffa8:	b9 08 00 00 00       	mov    $0x8,%ecx
ffffffff8001ffad:	44 89 d2             	mov    %r10d,%edx
ffffffff8001ffb0:	44 89 ce             	mov    %r9d,%esi
ffffffff8001ffb3:	44 89 c7             	mov    %r8d,%edi
        dev.ProgIf = ReadConfig8(bus, device, function, RegProgIf);
ffffffff8001ffb6:	88 45 cc             	mov    %al,-0x34(%rbp)
        dev.RevisionId = ReadConfig8(bus, device, function, RegRevisionId);
ffffffff8001ffb9:	e8 b2 fa ff ff       	call   ffffffff8001fa70 <_ZN3PciL11ReadConfig8Ehhht>
        dev.HeaderType = ReadConfig8(bus, device, function, RegHeaderType);
ffffffff8001ffbe:	b9 0e 00 00 00       	mov    $0xe,%ecx
ffffffff8001ffc3:	44 89 d2             	mov    %r10d,%edx
ffffffff8001ffc6:	44 89 ce             	mov    %r9d,%esi
ffffffff8001ffc9:	44 89 c7             	mov    %r8d,%edi
        dev.RevisionId = ReadConfig8(bus, device, function, RegRevisionId);
ffffffff8001ffcc:	88 45 cb             	mov    %al,-0x35(%rbp)
        dev.HeaderType = ReadConfig8(bus, device, function, RegHeaderType);
ffffffff8001ffcf:	e8 9c fa ff ff       	call   ffffffff8001fa70 <_ZN3PciL11ReadConfig8Ehhht>

        size_t push_back(T value) {
            size_t _sz = sz;

            if (capacity < sz + 1) {
                array = (T *)Memory::g_heap->Realloc(array, sizeof(T) * (sz + 1));
ffffffff8001ffd4:	48 8b 35 35 74 15 00 	mov    0x157435(%rip),%rsi        # ffffffff80177410 <_ZN3PciL9g_devicesE>
ffffffff8001ffdb:	89 c1                	mov    %eax,%ecx
            size_t _sz = sz;
ffffffff8001ffdd:	48 8b 05 34 74 15 00 	mov    0x157434(%rip),%rax        # ffffffff80177418 <_ZN3PciL9g_devicesE+0x8>
            if (capacity < sz + 1) {
ffffffff8001ffe4:	48 8d 50 01          	lea    0x1(%rax),%rdx
ffffffff8001ffe8:	48 39 15 31 74 15 00 	cmp    %rdx,0x157431(%rip)        # ffffffff80177420 <_ZN3PciL9g_devicesE+0x10>
ffffffff8001ffef:	0f 82 bb 01 00 00    	jb     ffffffff800201b0 <_ZN3PciL17EnumerateFunctionEhhh+0x2a0>
                capacity++;
            }

            array[sz++] = value;
ffffffff8001fff5:	48 c1 e0 04          	shl    $0x4,%rax
ffffffff8001fff9:	48 89 15 18 74 15 00 	mov    %rdx,0x157418(%rip)        # ffffffff80177418 <_ZN3PciL9g_devicesE+0x8>
ffffffff80020000:	0f b6 55 cc          	movzbl -0x34(%rbp),%edx
            Print(string);
ffffffff80020004:	48 c7 c7 04 be 02 80 	mov    $0xffffffff8002be04,%rdi
ffffffff8002000b:	48 01 c6             	add    %rax,%rsi
ffffffff8002000e:	31 c0                	xor    %eax,%eax
ffffffff80020010:	66 89 06             	mov    %ax,(%rsi)
ffffffff80020013:	0f b7 45 ce          	movzwl -0x32(%rbp),%eax
ffffffff80020017:	88 56 0c             	mov    %dl,0xc(%rsi)
ffffffff8002001a:	0f b6 55 cb          	movzbl -0x35(%rbp),%edx
ffffffff8002001e:	66 89 46 08          	mov    %ax,0x8(%rsi)
ffffffff80020022:	0f b6 45 cd          	movzbl -0x33(%rbp),%eax
ffffffff80020026:	88 56 0d             	mov    %dl,0xd(%rsi)
ffffffff80020029:	88 4e 0e             	mov    %cl,0xe(%rsi)
ffffffff8002002c:	44 88 76 02          	mov    %r14b,0x2(%rsi)
ffffffff80020030:	44 88 6e 03          	mov    %r13b,0x3(%rsi)
ffffffff80020034:	66 89 5e 06          	mov    %bx,0x6(%rsi)
ffffffff80020038:	88 46 0a             	mov    %al,0xa(%rsi)
ffffffff8002003b:	44 88 66 04          	mov    %r12b,0x4(%rsi)
ffffffff8002003f:	44 88 7e 0b          	mov    %r15b,0xb(%rsi)
            g_kernelLogDepth++;
ffffffff80020043:	83 05 5a f4 1b 00 01 	addl   $0x1,0x1bf45a(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff8002004a:	e8 71 31 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002004f:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80020056:	e8 65 31 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002005b:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80020062:	e8 59 31 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020067:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff8002006e:	e8 4d 31 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020073:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8002007a:	e8 41 31 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8002007f:	be 10 00 00 00       	mov    $0x10,%esi

        g_devices.push_back(dev);

        KernelLogStream(DEBUG, "PCI") << base::hex
            << (uint64_t)bus << ":" << (uint64_t)device << "." << (uint64_t)function
ffffffff80020084:	41 0f b6 fe          	movzbl %r14b,%edi
ffffffff80020088:	e8 03 a4 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8002008d:	48 89 c7             	mov    %rax,%rdi
ffffffff80020090:	e8 2b 31 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80020095:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff8002009c:	e8 1f 31 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800200a1:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff800200a6:	41 0f b6 fd          	movzbl %r13b,%edi
ffffffff800200aa:	e8 e1 a3 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800200af:	48 89 c7             	mov    %rax,%rdi
ffffffff800200b2:	e8 09 31 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800200b7:	48 c7 c7 57 ae 02 80 	mov    $0xffffffff8002ae57,%rdi
ffffffff800200be:	e8 fd 30 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800200c3:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff800200c8:	41 0f b6 fc          	movzbl %r12b,%edi
ffffffff800200cc:	e8 bf a3 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800200d1:	48 89 c7             	mov    %rax,%rdi
ffffffff800200d4:	e8 e7 30 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800200d9:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff800200e0:	e8 db 30 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800200e5:	be 10 00 00 00       	mov    $0x10,%esi
            << " " << (uint64_t)vendorId << ":" << (uint64_t)dev.DeviceId
ffffffff800200ea:	0f b7 fb             	movzwl %bx,%edi
ffffffff800200ed:	e8 9e a3 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800200f2:	48 89 c7             	mov    %rax,%rdi
ffffffff800200f5:	e8 c6 30 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800200fa:	48 c7 c7 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rdi
ffffffff80020101:	e8 ba 30 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020106:	0f b7 7d ce          	movzwl -0x32(%rbp),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8002010a:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff8002010f:	e8 7c a3 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80020114:	48 89 c7             	mov    %rax,%rdi
ffffffff80020117:	e8 a4 30 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8002011c:	48 c7 c7 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rdi
ffffffff80020123:	e8 98 30 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << " " << GetClassName(dev.ClassCode, dev.SubClass)
ffffffff80020128:	0f b6 7d cd          	movzbl -0x33(%rbp),%edi
ffffffff8002012c:	41 0f b6 f7          	movzbl %r15b,%esi
ffffffff80020130:	89 fb                	mov    %edi,%ebx
ffffffff80020132:	e8 e9 fb ff ff       	call   ffffffff8001fd20 <_ZN3Pci12GetClassNameEhh>
ffffffff80020137:	48 89 c7             	mov    %rax,%rdi
ffffffff8002013a:	e8 81 30 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002013f:	48 c7 c7 08 be 02 80 	mov    $0xffffffff8002be08,%rdi
ffffffff80020146:	e8 75 30 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8002014b:	be 10 00 00 00       	mov    $0x10,%esi
            << " (class " << (uint64_t)dev.ClassCode << "." << (uint64_t)dev.SubClass << ")";
ffffffff80020150:	0f b6 fb             	movzbl %bl,%edi
ffffffff80020153:	e8 38 a3 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80020158:	48 89 c7             	mov    %rax,%rdi
ffffffff8002015b:	e8 60 30 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80020160:	48 c7 c7 57 ae 02 80 	mov    $0xffffffff8002ae57,%rdi
ffffffff80020167:	e8 54 30 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8002016c:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80020171:	41 0f b6 ff          	movzbl %r15b,%edi
ffffffff80020175:	e8 16 a3 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8002017a:	48 89 c7             	mov    %rax,%rdi
ffffffff8002017d:	e8 3e 30 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80020182:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff80020189:	e8 32 30 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002018e:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80020195:	e8 26 30 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8002019a:	83 2d 03 f3 1b 00 01 	subl   $0x1,0x1bf303(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff800201a1:	48 83 c4 18          	add    $0x18,%rsp
ffffffff800201a5:	5b                   	pop    %rbx
ffffffff800201a6:	41 5c                	pop    %r12
ffffffff800201a8:	41 5d                	pop    %r13
ffffffff800201aa:	41 5e                	pop    %r14
ffffffff800201ac:	41 5f                	pop    %r15
ffffffff800201ae:	5d                   	pop    %rbp
ffffffff800201af:	c3                   	ret
                array = (T *)Memory::g_heap->Realloc(array, sizeof(T) * (sz + 1));
ffffffff800201b0:	48 8b 3d 01 c8 12 00 	mov    0x12c801(%rip),%rdi        # ffffffff8014c9b8 <_ZN6Memory6g_heapE>
ffffffff800201b7:	48 c1 e2 04          	shl    $0x4,%rdx
ffffffff800201bb:	88 4d ca             	mov    %cl,-0x36(%rbp)
ffffffff800201be:	e8 cd ac ff ff       	call   ffffffff8001ae90 <_ZN6Memory13HeapAllocator7ReallocEPvm>
                capacity++;
ffffffff800201c3:	48 83 05 55 72 15 00 	addq   $0x1,0x157255(%rip)        # ffffffff80177420 <_ZN3PciL9g_devicesE+0x10>
ffffffff800201ca:	01 
            array[sz++] = value;
ffffffff800201cb:	0f b6 4d ca          	movzbl -0x36(%rbp),%ecx
                array = (T *)Memory::g_heap->Realloc(array, sizeof(T) * (sz + 1));
ffffffff800201cf:	48 89 05 3a 72 15 00 	mov    %rax,0x15723a(%rip)        # ffffffff80177410 <_ZN3PciL9g_devicesE>
ffffffff800201d6:	48 89 c6             	mov    %rax,%rsi
            array[sz++] = value;
ffffffff800201d9:	48 8b 05 38 72 15 00 	mov    0x157238(%rip),%rax        # ffffffff80177418 <_ZN3PciL9g_devicesE+0x8>
ffffffff800201e0:	48 8d 50 01          	lea    0x1(%rax),%rdx
ffffffff800201e4:	e9 0c fe ff ff       	jmp    ffffffff8001fff5 <_ZN3PciL17EnumerateFunctionEhhh+0xe5>
ffffffff800201e9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff800201f0 <_ZN3Pci10GetDevicesEv>:
    // Public API
    // -------------------------------------------------------------------------

    kcp::vector<PciDevice>& GetDevices() {
        return g_devices;
    }
ffffffff800201f0:	48 c7 c0 10 74 17 80 	mov    $0xffffffff80177410,%rax
ffffffff800201f7:	c3                   	ret
ffffffff800201f8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff800201ff:	00 

ffffffff80020200 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE>:

    void Initialize(Hal::ACPI::CommonSDTHeader* xsdt) {
ffffffff80020200:	55                   	push   %rbp
ffffffff80020201:	48 89 e5             	mov    %rsp,%rbp
ffffffff80020204:	41 57                	push   %r15
ffffffff80020206:	41 56                	push   %r14
ffffffff80020208:	41 55                	push   %r13
ffffffff8002020a:	41 54                	push   %r12
ffffffff8002020c:	53                   	push   %rbx
ffffffff8002020d:	48 89 fb             	mov    %rdi,%rbx
            Print(string);
ffffffff80020210:	48 c7 c7 04 be 02 80 	mov    $0xffffffff8002be04,%rdi
ffffffff80020217:	48 83 ec 18          	sub    $0x18,%rsp
            g_kernelLogDepth++;
ffffffff8002021b:	83 05 82 f2 1b 00 01 	addl   $0x1,0x1bf282(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80020222:	e8 99 2f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020227:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8002022e:	e8 8d 2f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020233:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8002023a:	e8 81 2f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002023f:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff80020246:	e8 75 2f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002024b:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80020252:	e8 69 2f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020257:	48 c7 c7 11 be 02 80 	mov    $0xffffffff8002be11,%rdi
ffffffff8002025e:	e8 5d 2f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020263:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8002026a:	e8 51 2f 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8002026f:	44 8b 0d 2e f2 1b 00 	mov    0x1bf22e(%rip),%r9d        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80020276:	41 8d 41 ff          	lea    -0x1(%r9),%eax
ffffffff8002027a:	89 05 24 f2 1b 00    	mov    %eax,0x1bf224(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        uint32_t entryCount = (xsdt->Length - sizeof(Hal::ACPI::CommonSDTHeader)) / 8;
ffffffff80020280:	8b 43 04             	mov    0x4(%rbx),%eax
ffffffff80020283:	48 83 e8 24          	sub    $0x24,%rax
ffffffff80020287:	48 c1 e8 03          	shr    $0x3,%rax
        for (uint32_t i = 0; i < entryCount; i++) {
ffffffff8002028b:	85 c0                	test   %eax,%eax
ffffffff8002028d:	0f 84 2b 04 00 00    	je     ffffffff800206be <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x4be>
ffffffff80020293:	83 e8 01             	sub    $0x1,%eax
ffffffff80020296:	48 8b 3d 0b c7 12 00 	mov    0x12c70b(%rip),%rdi        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8002029d:	48 8d 73 24          	lea    0x24(%rbx),%rsi
ffffffff800202a1:	48 c7 c1 30 be 02 80 	mov    $0xffffffff8002be30,%rcx
ffffffff800202a8:	4c 8d 44 c3 2c       	lea    0x2c(%rbx,%rax,8),%r8
ffffffff800202ad:	0f 1f 00             	nopl   (%rax)
ffffffff800202b0:	48 8b 1e             	mov    (%rsi),%rbx
ffffffff800202b3:	48 c7 c0 2c be 02 80 	mov    $0xffffffff8002be2c,%rax
ffffffff800202ba:	48 01 fb             	add    %rdi,%rbx
            if (sig[i] != target[i]) return false;
ffffffff800202bd:	48 89 da             	mov    %rbx,%rdx
ffffffff800202c0:	48 29 c2             	sub    %rax,%rdx
ffffffff800202c3:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800202ca:	00 00 00 00 
ffffffff800202ce:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800202d5:	00 00 00 00 
ffffffff800202d9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
ffffffff800202e0:	44 0f b6 10          	movzbl (%rax),%r10d
ffffffff800202e4:	44 38 14 02          	cmp    %r10b,(%rdx,%rax,1)
ffffffff800202e8:	0f 85 c3 03 00 00    	jne    ffffffff800206b1 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x4b1>
        for (int i = 0; i < len; i++) {
ffffffff800202ee:	48 83 c0 01          	add    $0x1,%rax
ffffffff800202f2:	48 39 c1             	cmp    %rax,%rcx
ffffffff800202f5:	75 e9                	jne    ffffffff800202e0 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0xe0>
        if (mcfgHeader == nullptr) {
ffffffff800202f7:	48 85 db             	test   %rbx,%rbx
ffffffff800202fa:	0f 84 be 03 00 00    	je     ffffffff800206be <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x4be>
        if (!Hal::ACPI::TestChecksum(mcfgHeader)) {
ffffffff80020300:	48 89 df             	mov    %rbx,%rdi
ffffffff80020303:	e8 28 70 fe ff       	call   ffffffff80007330 <_ZN3Hal4ACPI12TestChecksumEPNS0_15CommonSDTHeaderE>
            Print(string);
ffffffff80020308:	48 c7 c7 04 be 02 80 	mov    $0xffffffff8002be04,%rdi
ffffffff8002030f:	89 c2                	mov    %eax,%edx
            g_kernelLogDepth++;
ffffffff80020311:	8b 05 8d f1 1b 00    	mov    0x1bf18d(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80020317:	83 c0 01             	add    $0x1,%eax
ffffffff8002031a:	89 05 84 f1 1b 00    	mov    %eax,0x1bf184(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80020320:	84 d2                	test   %dl,%dl
ffffffff80020322:	0f 84 17 05 00 00    	je     ffffffff8002083f <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x63f>
            Print(string);
ffffffff80020328:	e8 93 2e 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002032d:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80020334:	e8 87 2e 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020339:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80020340:	e8 7b 2e 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020345:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8002034c:	e8 6f 2e 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020351:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80020358:	e8 63 2e 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002035d:	48 c7 c7 46 be 02 80 	mov    $0xffffffff8002be46,%rdi
ffffffff80020364:	e8 57 2e 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020369:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80020370:	e8 4b 2e 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        uint32_t entriesSize = mcfg->SDTHeader.Length - sizeof(McfgHeader);
ffffffff80020375:	8b 43 04             	mov    0x4(%rbx),%eax
ffffffff80020378:	83 e8 2c             	sub    $0x2c,%eax
        if (entryCount == 0) {
ffffffff8002037b:	83 f8 0f             	cmp    $0xf,%eax
ffffffff8002037e:	0f 86 69 05 00 00    	jbe    ffffffff800208ed <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x6ed>
        g_ecamBase = entries[0].BaseAddress;
ffffffff80020384:	48 8b 53 2c          	mov    0x2c(%rbx),%rdx
        g_ecamEndBus = entries[0].EndBus;
ffffffff80020388:	0f b6 43 37          	movzbl 0x37(%rbx),%eax
ffffffff8002038c:	48 c7 c7 04 be 02 80 	mov    $0xffffffff8002be04,%rdi
        g_ecamBase = entries[0].BaseAddress;
ffffffff80020393:	48 89 15 6e 70 15 00 	mov    %rdx,0x15706e(%rip)        # ffffffff80177408 <_ZN3PciL10g_ecamBaseE>
        g_ecamStartBus = entries[0].StartBus;
ffffffff8002039a:	0f b6 53 36          	movzbl 0x36(%rbx),%edx
        g_ecamEndBus = entries[0].EndBus;
ffffffff8002039e:	88 05 5d 70 15 00    	mov    %al,0x15705d(%rip)        # ffffffff80177401 <_ZN3PciL12g_ecamEndBusE>
        g_ecamStartBus = entries[0].StartBus;
ffffffff800203a4:	88 15 58 70 15 00    	mov    %dl,0x157058(%rip)        # ffffffff80177402 <_ZN3PciL14g_ecamStartBusE>
ffffffff800203aa:	e8 11 2e 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800203af:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800203b6:	e8 05 2e 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800203bb:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800203c2:	e8 f9 2d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800203c7:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff800203ce:	e8 ed 2d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800203d3:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800203da:	e8 e1 2d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800203df:	48 c7 c7 70 be 02 80 	mov    $0xffffffff8002be70,%rdi
ffffffff800203e6:	e8 d5 2d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800203eb:	48 8b 3d 16 70 15 00 	mov    0x157016(%rip),%rdi        # ffffffff80177408 <_ZN3PciL10g_ecamBaseE>
ffffffff800203f2:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff800203f7:	e8 94 a0 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800203fc:	48 89 c7             	mov    %rax,%rdi
ffffffff800203ff:	e8 bc 2d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80020404:	48 c7 c7 7c be 02 80 	mov    $0xffffffff8002be7c,%rdi
ffffffff8002040b:	e8 b0 2d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << " buses " << base::dec << (uint64_t)g_ecamStartBus
ffffffff80020410:	0f b6 3d eb 6f 15 00 	movzbl 0x156feb(%rip),%edi        # ffffffff80177402 <_ZN3PciL14g_ecamStartBusE>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80020417:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8002041c:	e8 6f a0 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80020421:	48 89 c7             	mov    %rax,%rdi
ffffffff80020424:	e8 97 2d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80020429:	48 c7 c7 fe b7 02 80 	mov    $0xffffffff8002b7fe,%rdi
ffffffff80020430:	e8 8b 2d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << "-" << (uint64_t)g_ecamEndBus;
ffffffff80020435:	0f b6 3d c5 6f 15 00 	movzbl 0x156fc5(%rip),%edi        # ffffffff80177401 <_ZN3PciL12g_ecamEndBusE>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8002043c:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80020441:	e8 4a a0 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80020446:	48 89 c7             	mov    %rax,%rdi
ffffffff80020449:	e8 72 2d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8002044e:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80020455:	e8 66 2d 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8002045a:	8b 05 44 f0 1b 00    	mov    0x1bf044(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        if (Memory::VMM::g_paging) {
ffffffff80020460:	48 8b 3d 59 c5 12 00 	mov    0x12c559(%rip),%rdi        # ffffffff8014c9c0 <_ZN6Memory3VMM8g_pagingE>
ffffffff80020467:	8d 50 ff             	lea    -0x1(%rax),%edx
ffffffff8002046a:	89 15 34 f0 1b 00    	mov    %edx,0x1bf034(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80020470:	48 85 ff             	test   %rdi,%rdi
ffffffff80020473:	0f 84 d7 00 00 00    	je     ffffffff80020550 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x350>
        uint64_t busCount = (uint64_t)(g_ecamEndBus - g_ecamStartBus + 1);
ffffffff80020479:	0f b6 1d 81 6f 15 00 	movzbl 0x156f81(%rip),%ebx        # ffffffff80177401 <_ZN3PciL12g_ecamEndBusE>
ffffffff80020480:	0f b6 15 7b 6f 15 00 	movzbl 0x156f7b(%rip),%edx        # ffffffff80177402 <_ZN3PciL14g_ecamStartBusE>
ffffffff80020487:	29 d3                	sub    %edx,%ebx
ffffffff80020489:	83 c3 01             	add    $0x1,%ebx
ffffffff8002048c:	48 63 db             	movslq %ebx,%rbx
            for (uint64_t offset = 0; offset < ecamSize; offset += 0x1000) {
ffffffff8002048f:	48 c1 e3 14          	shl    $0x14,%rbx
ffffffff80020493:	74 3a                	je     ffffffff800204cf <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x2cf>
ffffffff80020495:	45 31 e4             	xor    %r12d,%r12d
ffffffff80020498:	eb 07                	jmp    ffffffff800204a1 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x2a1>
                Memory::VMM::g_paging->MapMMIO(phys, Memory::HHDM(phys));
ffffffff8002049a:	48 8b 3d 1f c5 12 00 	mov    0x12c51f(%rip),%rdi        # ffffffff8014c9c0 <_ZN6Memory3VMM8g_pagingE>
                uint64_t phys = g_ecamBase + offset;
ffffffff800204a1:	48 8b 35 60 6f 15 00 	mov    0x156f60(%rip),%rsi        # ffffffff80177408 <_ZN3PciL10g_ecamBaseE>
ffffffff800204a8:	48 8b 15 f9 c4 12 00 	mov    0x12c4f9(%rip),%rdx        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff800204af:	4c 01 e6             	add    %r12,%rsi
            for (uint64_t offset = 0; offset < ecamSize; offset += 0x1000) {
ffffffff800204b2:	49 81 c4 00 10 00 00 	add    $0x1000,%r12
ffffffff800204b9:	48 01 f2             	add    %rsi,%rdx
                Memory::VMM::g_paging->MapMMIO(phys, Memory::HHDM(phys));
ffffffff800204bc:	e8 ff b3 ff ff       	call   ffffffff8001b8c0 <_ZN6Memory3VMM6Paging7MapMMIOEmm>
            for (uint64_t offset = 0; offset < ecamSize; offset += 0x1000) {
ffffffff800204c1:	49 39 dc             	cmp    %rbx,%r12
ffffffff800204c4:	72 d4                	jb     ffffffff8002049a <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x29a>
            g_kernelLogDepth++;
ffffffff800204c6:	8b 05 d8 ef 1b 00    	mov    0x1befd8(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800204cc:	83 c0 01             	add    $0x1,%eax
            Print(string);
ffffffff800204cf:	48 c7 c7 04 be 02 80 	mov    $0xffffffff8002be04,%rdi
            g_kernelLogDepth++;
ffffffff800204d6:	89 05 c8 ef 1b 00    	mov    %eax,0x1befc8(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800204dc:	e8 df 2c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800204e1:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800204e8:	e8 d3 2c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800204ed:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800204f4:	e8 c7 2c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800204f9:	48 c7 c7 78 a1 02 80 	mov    $0xffffffff8002a178,%rdi
ffffffff80020500:	e8 bb 2c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020505:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8002050c:	e8 af 2c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020511:	48 c7 c7 84 be 02 80 	mov    $0xffffffff8002be84,%rdi
ffffffff80020518:	e8 a3 2c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8002051d:	be 10 00 00 00       	mov    $0x10,%esi
ffffffff80020522:	48 89 df             	mov    %rbx,%rdi
ffffffff80020525:	e8 66 9f ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8002052a:	48 89 c7             	mov    %rax,%rdi
ffffffff8002052d:	e8 8e 2c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80020532:	48 c7 c7 74 a7 02 80 	mov    $0xffffffff8002a774,%rdi
ffffffff80020539:	e8 82 2c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002053e:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80020545:	e8 76 2c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8002054a:	8b 05 54 ef 1b 00    	mov    0x1bef54(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        g_useEcam = true;
ffffffff80020550:	c6 05 a9 6e 15 00 01 	movb   $0x1,0x156ea9(%rip)        # ffffffff80177400 <_ZN3PciL9g_useEcamE>
            Print(string);
ffffffff80020557:	48 c7 c7 04 be 02 80 	mov    $0xffffffff8002be04,%rdi
            g_kernelLogDepth++;
ffffffff8002055e:	89 05 40 ef 1b 00    	mov    %eax,0x1bef40(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80020564:	e8 57 2c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020569:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80020570:	e8 4b 2c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020575:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8002057c:	e8 3f 2c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020581:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80020588:	e8 33 2c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002058d:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80020594:	e8 27 2c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020599:	48 c7 c7 e0 d0 02 80 	mov    $0xffffffff8002d0e0,%rdi
ffffffff800205a0:	e8 1b 2c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800205a5:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800205ac:	e8 0f 2c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff800205b1:	8b 05 ed ee 1b 00    	mov    0x1beeed(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800205b7:	83 e8 01             	sub    $0x1,%eax
ffffffff800205ba:	89 05 e4 ee 1b 00    	mov    %eax,0x1beee4(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        uint8_t startBus = g_useEcam ? g_ecamStartBus : 0;
ffffffff800205c0:	0f b6 05 39 6e 15 00 	movzbl 0x156e39(%rip),%eax        # ffffffff80177400 <_ZN3PciL9g_useEcamE>
ffffffff800205c7:	84 c0                	test   %al,%al
ffffffff800205c9:	0f 84 5d 02 00 00    	je     ffffffff8002082c <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x62c>
ffffffff800205cf:	0f b6 35 2c 6e 15 00 	movzbl 0x156e2c(%rip),%esi        # ffffffff80177402 <_ZN3PciL14g_ecamStartBusE>
        uint8_t endBus = g_useEcam ? g_ecamEndBus : 255;
ffffffff800205d6:	0f b6 15 24 6e 15 00 	movzbl 0x156e24(%rip),%edx        # ffffffff80177401 <_ZN3PciL12g_ecamEndBusE>
        for (uint32_t bus = startBus; bus <= (uint32_t)endBus; bus++) {
ffffffff800205dd:	89 75 cc             	mov    %esi,-0x34(%rbp)
ffffffff800205e0:	40 38 f2             	cmp    %sil,%dl
ffffffff800205e3:	0f 82 ad 01 00 00    	jb     ffffffff80020796 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x596>
ffffffff800205e9:	0f b6 ca             	movzbl %dl,%ecx
ffffffff800205ec:	89 4d c4             	mov    %ecx,-0x3c(%rbp)
ffffffff800205ef:	8b 5d cc             	mov    -0x34(%rbp),%ebx
ffffffff800205f2:	48 89 d9             	mov    %rbx,%rcx
ffffffff800205f5:	48 c1 e3 14          	shl    $0x14,%rbx
ffffffff800205f9:	c1 e1 10             	shl    $0x10,%ecx
ffffffff800205fc:	41 89 ce             	mov    %ecx,%r14d
ffffffff800205ff:	90                   	nop
        uint16_t vendorId = ReadConfig16(bus, device, 0, RegVendorId);
ffffffff80020600:	c7 45 c8 00 00 00 00 	movl   $0x0,-0x38(%rbp)
ffffffff80020607:	45 31 ff             	xor    %r15d,%r15d
ffffffff8002060a:	45 31 e4             	xor    %r12d,%r12d
ffffffff8002060d:	eb 7e                	jmp    ffffffff8002068d <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x48d>
ffffffff8002060f:	90                   	nop
ffffffff80020610:	48 8b 05 91 c3 12 00 	mov    0x12c391(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff80020617:	48 03 05 ea 6d 15 00 	add    0x156dea(%rip),%rax        # ffffffff80177408 <_ZN3PciL10g_ecamBaseE>
ffffffff8002061e:	48 01 d8             	add    %rbx,%rax
ffffffff80020621:	4c 01 e0             	add    %r12,%rax
        return *(volatile uint16_t*)EcamAddress(ecamBase, bus, device, function, offset);
ffffffff80020624:	0f b7 00             	movzwl (%rax),%eax
        if (vendorId == 0xFFFF) {
ffffffff80020627:	66 83 f8 ff          	cmp    $0xffff,%ax
ffffffff8002062b:	74 3b                	je     ffffffff80020668 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x468>
        EnumerateFunction(bus, device, 0);
ffffffff8002062d:	8b 75 c8             	mov    -0x38(%rbp),%esi
ffffffff80020630:	8b 7d cc             	mov    -0x34(%rbp),%edi
ffffffff80020633:	31 d2                	xor    %edx,%edx
ffffffff80020635:	e8 d6 f8 ff ff       	call   ffffffff8001ff10 <_ZN3PciL17EnumerateFunctionEhhh>
        if (g_useEcam) {
ffffffff8002063a:	80 3d bf 6d 15 00 00 	cmpb   $0x0,0x156dbf(%rip)        # ffffffff80177400 <_ZN3PciL9g_useEcamE>
ffffffff80020641:	0f 84 09 01 00 00    	je     ffffffff80020750 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x550>
ffffffff80020647:	48 8b 05 5a c3 12 00 	mov    0x12c35a(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff8002064e:	48 03 05 b3 6d 15 00 	add    0x156db3(%rip),%rax        # ffffffff80177408 <_ZN3PciL10g_ecamBaseE>
ffffffff80020655:	48 8d 44 03 0e       	lea    0xe(%rbx,%rax,1),%rax
ffffffff8002065a:	4c 01 e0             	add    %r12,%rax
        return *EcamAddress(ecamBase, bus, device, function, offset);
ffffffff8002065d:	0f b6 00             	movzbl (%rax),%eax
        if (headerType & 0x80) {
ffffffff80020660:	84 c0                	test   %al,%al
ffffffff80020662:	0f 88 c0 00 00 00    	js     ffffffff80020728 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x528>
        for (uint8_t device = 0; device < 32; device++) {
ffffffff80020668:	83 45 c8 01          	addl   $0x1,-0x38(%rbp)
ffffffff8002066c:	8b 45 c8             	mov    -0x38(%rbp),%eax
ffffffff8002066f:	49 81 c4 00 80 00 00 	add    $0x8000,%r12
ffffffff80020676:	41 81 c7 00 08 00 00 	add    $0x800,%r15d
ffffffff8002067d:	83 f8 20             	cmp    $0x20,%eax
ffffffff80020680:	0f 84 ea 00 00 00    	je     ffffffff80020770 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x570>
        if (g_useEcam) {
ffffffff80020686:	0f b6 05 73 6d 15 00 	movzbl 0x156d73(%rip),%eax        # ffffffff80177400 <_ZN3PciL9g_useEcamE>
ffffffff8002068d:	84 c0                	test   %al,%al
ffffffff8002068f:	0f 85 7b ff ff ff    	jne    ffffffff80020610 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x410>
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff80020695:	44 89 f0             	mov    %r14d,%eax
ffffffff80020698:	ba f8 0c 00 00       	mov    $0xcf8,%edx
ffffffff8002069d:	44 09 f8             	or     %r15d,%eax
             | (offset & 0xFC);
ffffffff800206a0:	0d 00 00 00 80       	or     $0x80000000,%eax
ffffffff800206a5:	ef                   	out    %eax,(%dx)
        asm volatile("inl %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff800206a6:	ba fc 0c 00 00       	mov    $0xcfc,%edx
ffffffff800206ab:	ed                   	in     (%dx),%eax
        return LegacyRead16(bus, device, function, (uint8_t)offset);
ffffffff800206ac:	e9 76 ff ff ff       	jmp    ffffffff80020627 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x427>
        for (uint32_t i = 0; i < entryCount; i++) {
ffffffff800206b1:	48 83 c6 08          	add    $0x8,%rsi
ffffffff800206b5:	4c 39 c6             	cmp    %r8,%rsi
ffffffff800206b8:	0f 85 f2 fb ff ff    	jne    ffffffff800202b0 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0xb0>
            Print(string);
ffffffff800206be:	48 c7 c7 04 be 02 80 	mov    $0xffffffff8002be04,%rdi
            g_kernelLogDepth++;
ffffffff800206c5:	44 89 0d d8 ed 1b 00 	mov    %r9d,0x1bedd8(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800206cc:	e8 ef 2a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800206d1:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800206d8:	e8 e3 2a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800206dd:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800206e4:	e8 d7 2a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800206e9:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff800206f0:	e8 cb 2a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800206f5:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800206fc:	e8 bf 2a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020701:	48 c7 c7 a0 d0 02 80 	mov    $0xffffffff8002d0a0,%rdi
ffffffff80020708:	e8 b3 2a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002070d:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80020714:	e8 a7 2a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80020719:	8b 05 85 ed 1b 00    	mov    0x1bed85(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            return false;
ffffffff8002071f:	e9 6e 01 00 00       	jmp    ffffffff80020892 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x692>
ffffffff80020724:	0f 1f 40 00          	nopl   0x0(%rax)
ffffffff80020728:	41 bd 01 00 00 00    	mov    $0x1,%r13d
ffffffff8002072e:	66 90                	xchg   %ax,%ax
                EnumerateFunction(bus, device, func);
ffffffff80020730:	8b 75 c8             	mov    -0x38(%rbp),%esi
ffffffff80020733:	8b 7d cc             	mov    -0x34(%rbp),%edi
ffffffff80020736:	44 89 ea             	mov    %r13d,%edx
            for (uint8_t func = 1; func < 8; func++) {
ffffffff80020739:	41 83 c5 01          	add    $0x1,%r13d
                EnumerateFunction(bus, device, func);
ffffffff8002073d:	e8 ce f7 ff ff       	call   ffffffff8001ff10 <_ZN3PciL17EnumerateFunctionEhhh>
            for (uint8_t func = 1; func < 8; func++) {
ffffffff80020742:	41 83 fd 08          	cmp    $0x8,%r13d
ffffffff80020746:	75 e8                	jne    ffffffff80020730 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x530>
ffffffff80020748:	e9 1b ff ff ff       	jmp    ffffffff80020668 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x468>
ffffffff8002074d:	0f 1f 00             	nopl   (%rax)
             | ((uint32_t)(device & 0x1F) << 11)
ffffffff80020750:	44 89 f0             	mov    %r14d,%eax
        asm ("outl %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80020753:	ba f8 0c 00 00       	mov    $0xcf8,%edx
ffffffff80020758:	44 09 f8             	or     %r15d,%eax
             | (offset & 0xFC);
ffffffff8002075b:	0d 0c 00 00 80       	or     $0x8000000c,%eax
ffffffff80020760:	ef                   	out    %eax,(%dx)
        asm volatile("inl %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80020761:	ba fc 0c 00 00       	mov    $0xcfc,%edx
ffffffff80020766:	ed                   	in     (%dx),%eax
        return (uint8_t)(val >> ((offset & 3) * 8));
ffffffff80020767:	c1 e8 10             	shr    $0x10,%eax
        return LegacyRead8(bus, device, function, (uint8_t)offset);
ffffffff8002076a:	e9 f1 fe ff ff       	jmp    ffffffff80020660 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x460>
ffffffff8002076f:	90                   	nop
        for (uint32_t bus = startBus; bus <= (uint32_t)endBus; bus++) {
ffffffff80020770:	83 45 cc 01          	addl   $0x1,-0x34(%rbp)
ffffffff80020774:	48 81 c3 00 00 10 00 	add    $0x100000,%rbx
ffffffff8002077b:	8b 45 cc             	mov    -0x34(%rbp),%eax
ffffffff8002077e:	41 81 c6 00 00 01 00 	add    $0x10000,%r14d
ffffffff80020785:	39 45 c4             	cmp    %eax,-0x3c(%rbp)
ffffffff80020788:	72 0c                	jb     ffffffff80020796 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x596>
        if (g_useEcam) {
ffffffff8002078a:	0f b6 05 6f 6c 15 00 	movzbl 0x156c6f(%rip),%eax        # ffffffff80177400 <_ZN3PciL9g_useEcamE>
ffffffff80020791:	e9 6a fe ff ff       	jmp    ffffffff80020600 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x400>
            Print(string);
ffffffff80020796:	48 c7 c7 04 be 02 80 	mov    $0xffffffff8002be04,%rdi
            g_kernelLogDepth++;
ffffffff8002079d:	83 05 00 ed 1b 00 01 	addl   $0x1,0x1bed00(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800207a4:	e8 17 2a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800207a9:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800207b0:	e8 0b 2a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800207b5:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800207bc:	e8 ff 29 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800207c1:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff800207c8:	e8 f3 29 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800207cd:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800207d4:	e8 e7 29 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800207d9:	48 c7 c7 99 be 02 80 	mov    $0xffffffff8002be99,%rdi
ffffffff800207e0:	e8 db 29 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800207e5:	48 8b 3d 2c 6c 15 00 	mov    0x156c2c(%rip),%rdi        # ffffffff80177418 <_ZN3PciL9g_devicesE+0x8>
ffffffff800207ec:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800207f1:	e8 9a 9c ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800207f6:	48 89 c7             	mov    %rax,%rdi
ffffffff800207f9:	e8 c2 29 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800207fe:	48 c7 c7 b0 be 02 80 	mov    $0xffffffff8002beb0,%rdi
ffffffff80020805:	e8 b6 29 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002080a:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80020811:	e8 aa 29 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80020816:	83 2d 87 ec 1b 00 01 	subl   $0x1,0x1bec87(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

        // Enumerate all PCI devices
        EnumerateAll();

        KernelLogStream(OK, "PCI") << "Enumeration complete: " << base::dec << (uint64_t)g_devices.size() << " devices found";
    }
ffffffff8002081d:	48 83 c4 18          	add    $0x18,%rsp
ffffffff80020821:	5b                   	pop    %rbx
ffffffff80020822:	41 5c                	pop    %r12
ffffffff80020824:	41 5d                	pop    %r13
ffffffff80020826:	41 5e                	pop    %r14
ffffffff80020828:	41 5f                	pop    %r15
ffffffff8002082a:	5d                   	pop    %rbp
ffffffff8002082b:	c3                   	ret
ffffffff8002082c:	c7 45 c4 ff 00 00 00 	movl   $0xff,-0x3c(%rbp)
        for (uint32_t bus = startBus; bus <= (uint32_t)endBus; bus++) {
ffffffff80020833:	c7 45 cc 00 00 00 00 	movl   $0x0,-0x34(%rbp)
ffffffff8002083a:	e9 b0 fd ff ff       	jmp    ffffffff800205ef <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x3ef>
            Print(string);
ffffffff8002083f:	e8 7c 29 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020844:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8002084b:	e8 70 29 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020850:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80020857:	e8 64 29 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002085c:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80020863:	e8 58 29 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020868:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8002086f:	e8 4c 29 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020874:	48 c7 c7 31 be 02 80 	mov    $0xffffffff8002be31,%rdi
ffffffff8002087b:	e8 40 29 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020880:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80020887:	e8 34 29 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8002088c:	8b 05 12 ec 1b 00    	mov    0x1bec12(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        if (g_useEcam) {
ffffffff80020892:	80 3d 67 6b 15 00 00 	cmpb   $0x0,0x156b67(%rip)        # ffffffff80177400 <_ZN3PciL9g_useEcamE>
ffffffff80020899:	0f 85 b8 fc ff ff    	jne    ffffffff80020557 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x357>
            Print(string);
ffffffff8002089f:	48 c7 c7 04 be 02 80 	mov    $0xffffffff8002be04,%rdi
            g_kernelLogDepth++;
ffffffff800208a6:	89 05 f8 eb 1b 00    	mov    %eax,0x1bebf8(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800208ac:	e8 0f 29 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800208b1:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800208b8:	e8 03 29 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800208bd:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800208c4:	e8 f7 28 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800208c9:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff800208d0:	e8 eb 28 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800208d5:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800208dc:	e8 df 28 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800208e1:	48 c7 c7 10 d1 02 80 	mov    $0xffffffff8002d110,%rdi
ffffffff800208e8:	e9 b3 fc ff ff       	jmp    ffffffff800205a0 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x3a0>
ffffffff800208ed:	48 c7 c7 04 be 02 80 	mov    $0xffffffff8002be04,%rdi
ffffffff800208f4:	e8 c7 28 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800208f9:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80020900:	e8 bb 28 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020905:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8002090c:	e8 af 28 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020911:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff80020918:	e8 a3 28 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002091d:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80020924:	e8 97 28 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020929:	48 c7 c7 57 be 02 80 	mov    $0xffffffff8002be57,%rdi
ffffffff80020930:	e8 8b 28 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020935:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8002093c:	e8 7f 28 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80020941:	8b 05 5d eb 1b 00    	mov    0x1beb5d(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            return false;
ffffffff80020947:	e9 46 ff ff ff       	jmp    ffffffff80020892 <_ZN3Pci10InitializeEPN3Hal4ACPI15CommonSDTHeaderE+0x692>
ffffffff8002094c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff80020950 <_GLOBAL__sub_I__ZN3Pci9EcamRead8Emhhht>:
            sz = 0;
ffffffff80020950:	48 c7 05 bd 6a 15 00 	movq   $0x0,0x156abd(%rip)        # ffffffff80177418 <_ZN3PciL9g_devicesE+0x8>
ffffffff80020957:	00 00 00 00 
            array = nullptr;
ffffffff8002095b:	48 c7 05 aa 6a 15 00 	movq   $0x0,0x156aaa(%rip)        # ffffffff80177410 <_ZN3PciL9g_devicesE>
ffffffff80020962:	00 00 00 00 
};
ffffffff80020966:	c3                   	ret
ffffffff80020967:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8002096e:	00 00 

ffffffff80020970 <_ZN3Hal4HaltEv>:
    __attribute__((noreturn)) void Halt()
    {
        for (;;)
        {
    #if defined(__x86_64__)
            asm("hlt");
ffffffff80020970:	f4                   	hlt
        for (;;)
ffffffff80020971:	eb fd                	jmp    ffffffff80020970 <_ZN3Hal4HaltEv>
ffffffff80020973:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8002097a:	00 00 00 
ffffffff8002097d:	0f 1f 00             	nopl   (%rax)

ffffffff80020980 <_ZN5Sched7ElfLoadEPKcm>:
        }

        return true;
    }

    uint64_t ElfLoad(const char* vfsPath, uint64_t pml4Phys) {
ffffffff80020980:	55                   	push   %rbp
ffffffff80020981:	48 89 e5             	mov    %rsp,%rbp
ffffffff80020984:	41 57                	push   %r15
ffffffff80020986:	41 56                	push   %r14
ffffffff80020988:	41 55                	push   %r13
ffffffff8002098a:	41 54                	push   %r12
ffffffff8002098c:	53                   	push   %rbx
ffffffff8002098d:	48 83 ec 28          	sub    $0x28,%rsp
ffffffff80020991:	48 89 75 c0          	mov    %rsi,-0x40(%rbp)
        int handle = Fs::Vfs::VfsOpen(vfsPath);
ffffffff80020995:	e8 e6 6d ff ff       	call   ffffffff80017780 <_ZN2Fs3Vfs7VfsOpenEPKc>
        if (handle < 0) {
ffffffff8002099a:	85 c0                	test   %eax,%eax
ffffffff8002099c:	0f 88 17 02 00 00    	js     ffffffff80020bb9 <_ZN5Sched7ElfLoadEPKcm+0x239>
            return 0;
        }

        uint64_t fileSize = Fs::Vfs::VfsGetSize(handle);
ffffffff800209a2:	89 c7                	mov    %eax,%edi
ffffffff800209a4:	89 c3                	mov    %eax,%ebx
ffffffff800209a6:	e8 55 70 ff ff       	call   ffffffff80017a00 <_ZN2Fs3Vfs10VfsGetSizeEi>
ffffffff800209ab:	49 89 c4             	mov    %rax,%r12
        if (fileSize < sizeof(Elf64Header)) {
ffffffff800209ae:	48 83 f8 3f          	cmp    $0x3f,%rax
ffffffff800209b2:	0f 86 18 02 00 00    	jbe    ffffffff80020bd0 <_ZN5Sched7ElfLoadEPKcm+0x250>
            Fs::Vfs::VfsClose(handle);
            return 0;
        }

        // Read entire file into a heap buffer
        uint8_t* fileData = (uint8_t*)Memory::g_heap->Request(fileSize);
ffffffff800209b8:	48 8b 3d f9 bf 12 00 	mov    0x12bff9(%rip),%rdi        # ffffffff8014c9b8 <_ZN6Memory6g_heapE>
ffffffff800209bf:	48 89 c6             	mov    %rax,%rsi
ffffffff800209c2:	e8 39 a3 ff ff       	call   ffffffff8001ad00 <_ZN6Memory13HeapAllocator7RequestEm>
ffffffff800209c7:	49 89 c5             	mov    %rax,%r13
        if (fileData == nullptr) {
ffffffff800209ca:	48 85 c0             	test   %rax,%rax
ffffffff800209cd:	0f 84 dd 02 00 00    	je     ffffffff80020cb0 <_ZN5Sched7ElfLoadEPKcm+0x330>
            Kt::KernelLogStream(Kt::ERROR, "ELF") << "Failed to allocate " << fileSize << " bytes for file";
            Fs::Vfs::VfsClose(handle);
            return 0;
        }

        Fs::Vfs::VfsRead(handle, fileData, 0, fileSize);
ffffffff800209d3:	4c 89 e1             	mov    %r12,%rcx
ffffffff800209d6:	31 d2                	xor    %edx,%edx
ffffffff800209d8:	48 89 c6             	mov    %rax,%rsi
ffffffff800209db:	89 df                	mov    %ebx,%edi
ffffffff800209dd:	e8 de 6f ff ff       	call   ffffffff800179c0 <_ZN2Fs3Vfs7VfsReadEiPhmm>
        Fs::Vfs::VfsClose(handle);
ffffffff800209e2:	89 df                	mov    %ebx,%edi
ffffffff800209e4:	e8 57 70 ff ff       	call   ffffffff80017a40 <_ZN2Fs3Vfs8VfsCloseEi>
        if (hdr->e_ident[0] != 0x7f ||
ffffffff800209e9:	41 81 7d 00 7f 45 4c 	cmpl   $0x464c457f,0x0(%r13)
ffffffff800209f0:	46 
ffffffff800209f1:	0f 85 69 02 00 00    	jne    ffffffff80020c60 <_ZN5Sched7ElfLoadEPKcm+0x2e0>
        if (hdr->e_ident[4] != 2) {
ffffffff800209f7:	41 80 7d 04 02       	cmpb   $0x2,0x4(%r13)
ffffffff800209fc:	0f 85 3e 01 00 00    	jne    ffffffff80020b40 <_ZN5Sched7ElfLoadEPKcm+0x1c0>
        if (hdr->e_ident[5] != 1) {
ffffffff80020a02:	41 80 7d 05 01       	cmpb   $0x1,0x5(%r13)
ffffffff80020a07:	0f 85 23 04 00 00    	jne    ffffffff80020e30 <_ZN5Sched7ElfLoadEPKcm+0x4b0>
        if (hdr->e_type != ET_EXEC) {
ffffffff80020a0d:	66 41 83 7d 10 02    	cmpw   $0x2,0x10(%r13)
ffffffff80020a13:	0f 85 67 04 00 00    	jne    ffffffff80020e80 <_ZN5Sched7ElfLoadEPKcm+0x500>
        if (hdr->e_machine != EM_X86_64) {
ffffffff80020a19:	66 41 83 7d 12 3e    	cmpw   $0x3e,0x12(%r13)
ffffffff80020a1f:	0f 85 fb 02 00 00    	jne    ffffffff80020d20 <_ZN5Sched7ElfLoadEPKcm+0x3a0>
            Memory::g_heap->Free(fileData);
            return 0;
        }

        // Process program headers
        for (uint16_t i = 0; i < hdr->e_phnum; i++) {
ffffffff80020a25:	66 41 83 7d 38 00    	cmpw   $0x0,0x38(%r13)
ffffffff80020a2b:	c7 45 c8 00 00 00 00 	movl   $0x0,-0x38(%rbp)
ffffffff80020a32:	75 1e                	jne    ffffffff80020a52 <_ZN5Sched7ElfLoadEPKcm+0xd2>
ffffffff80020a34:	e9 d7 03 00 00       	jmp    ffffffff80020e10 <_ZN5Sched7ElfLoadEPKcm+0x490>
ffffffff80020a39:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
ffffffff80020a40:	83 45 c8 01          	addl   $0x1,-0x38(%rbp)
ffffffff80020a44:	8b 45 c8             	mov    -0x38(%rbp),%eax
ffffffff80020a47:	66 41 3b 45 38       	cmp    0x38(%r13),%ax
ffffffff80020a4c:	0f 83 be 03 00 00    	jae    ffffffff80020e10 <_ZN5Sched7ElfLoadEPKcm+0x490>
            Elf64ProgramHeader* phdr = (Elf64ProgramHeader*)(fileData + hdr->e_phoff + i * hdr->e_phentsize);
ffffffff80020a52:	41 0f b7 5d 36       	movzwl 0x36(%r13),%ebx
ffffffff80020a57:	8b 45 c8             	mov    -0x38(%rbp),%eax
ffffffff80020a5a:	0f af d8             	imul   %eax,%ebx
ffffffff80020a5d:	48 63 db             	movslq %ebx,%rbx
ffffffff80020a60:	49 03 5d 20          	add    0x20(%r13),%rbx
ffffffff80020a64:	4c 01 eb             	add    %r13,%rbx

            if (phdr->p_type != PT_LOAD) {
ffffffff80020a67:	83 3b 01             	cmpl   $0x1,(%rbx)
ffffffff80020a6a:	75 d4                	jne    ffffffff80020a40 <_ZN5Sched7ElfLoadEPKcm+0xc0>
                continue;
            }

            if (phdr->p_memsz == 0) {
ffffffff80020a6c:	48 8b 43 28          	mov    0x28(%rbx),%rax
ffffffff80020a70:	48 85 c0             	test   %rax,%rax
ffffffff80020a73:	74 cb                	je     ffffffff80020a40 <_ZN5Sched7ElfLoadEPKcm+0xc0>
                continue;
            }

            // Allocate pages and map them in the process PML4 with User bit
            uint64_t segBase = phdr->p_vaddr & ~0xFFFULL;
ffffffff80020a75:	48 8b 4b 10          	mov    0x10(%rbx),%rcx
ffffffff80020a79:	49 89 cf             	mov    %rcx,%r15
            uint64_t segEnd = (phdr->p_vaddr + phdr->p_memsz + 0xFFF) & ~0xFFFULL;
ffffffff80020a7c:	4c 8d b4 08 ff 0f 00 	lea    0xfff(%rax,%rcx,1),%r14
ffffffff80020a83:	00 
            uint64_t segBase = phdr->p_vaddr & ~0xFFFULL;
ffffffff80020a84:	49 81 e7 00 f0 ff ff 	and    $0xfffffffffffff000,%r15
            uint64_t segEnd = (phdr->p_vaddr + phdr->p_memsz + 0xFFF) & ~0xFFFULL;
ffffffff80020a8b:	49 81 e6 00 f0 ff ff 	and    $0xfffffffffffff000,%r14
            uint64_t numPages = (segEnd - segBase) / 0x1000;
ffffffff80020a92:	4d 29 fe             	sub    %r15,%r14

            for (uint64_t p = 0; p < numPages; p++) {
ffffffff80020a95:	49 c1 ee 0c          	shr    $0xc,%r14
ffffffff80020a99:	74 a5                	je     ffffffff80020a40 <_ZN5Sched7ElfLoadEPKcm+0xc0>
ffffffff80020a9b:	49 c1 e6 0c          	shl    $0xc,%r14
ffffffff80020a9f:	4d 01 fe             	add    %r15,%r14
ffffffff80020aa2:	eb 0c                	jmp    ffffffff80020ab0 <_ZN5Sched7ElfLoadEPKcm+0x130>
ffffffff80020aa4:	0f 1f 40 00          	nopl   0x0(%rax)
ffffffff80020aa8:	4c 39 f1             	cmp    %r14,%rcx
ffffffff80020aab:	74 93                	je     ffffffff80020a40 <_ZN5Sched7ElfLoadEPKcm+0xc0>
ffffffff80020aad:	49 89 cf             	mov    %rcx,%r15
                void* page = Memory::g_pfa->AllocateZeroed();
ffffffff80020ab0:	48 8b 3d f9 be 12 00 	mov    0x12bef9(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff80020ab7:	e8 54 a7 ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff80020abc:	49 89 c4             	mov    %rax,%r12
                if (page == nullptr) {
ffffffff80020abf:	48 85 c0             	test   %rax,%rax
ffffffff80020ac2:	0f 84 d0 02 00 00    	je     ffffffff80020d98 <_ZN5Sched7ElfLoadEPKcm+0x418>
        return address - HHDMBase;
ffffffff80020ac8:	4c 2b 25 d9 be 12 00 	sub    0x12bed9(%rip),%r12        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>

                uint64_t physAddr = Memory::SubHHDM((uint64_t)page);
                uint64_t virtAddr = segBase + p * 0x1000;

                // Map into the process's PML4 with User bit set
                Memory::VMM::Paging::MapUserIn(pml4Phys, physAddr, virtAddr);
ffffffff80020acf:	48 8b 7d c0          	mov    -0x40(%rbp),%rdi
ffffffff80020ad3:	4c 89 fa             	mov    %r15,%rdx
ffffffff80020ad6:	4c 89 e6             	mov    %r12,%rsi
ffffffff80020ad9:	e8 82 b0 ff ff       	call   ffffffff8001bb60 <_ZN6Memory3VMM6Paging9MapUserInEmmm>

                // Copy file data that overlaps this page (via HHDM)
                uint64_t pageStart = virtAddr;
                uint64_t pageEnd = virtAddr + 0x1000;

                uint64_t segFileStart = phdr->p_vaddr;
ffffffff80020ade:	4c 8b 43 10          	mov    0x10(%rbx),%r8
                uint64_t segFileEnd = phdr->p_vaddr + phdr->p_filesz;
ffffffff80020ae2:	48 8b 43 20          	mov    0x20(%rbx),%rax

                uint64_t copyStart = (pageStart > segFileStart) ? pageStart : segFileStart;
ffffffff80020ae6:	4c 89 ff             	mov    %r15,%rdi
                uint64_t pageEnd = virtAddr + 0x1000;
ffffffff80020ae9:	49 8d 8f 00 10 00 00 	lea    0x1000(%r15),%rcx
                uint64_t copyStart = (pageStart > segFileStart) ? pageStart : segFileStart;
ffffffff80020af0:	4d 39 f8             	cmp    %r15,%r8
ffffffff80020af3:	49 0f 43 f8          	cmovae %r8,%rdi
                uint64_t segFileEnd = phdr->p_vaddr + phdr->p_filesz;
ffffffff80020af7:	4c 01 c0             	add    %r8,%rax
                uint64_t copyEnd = (pageEnd < segFileEnd) ? pageEnd : segFileEnd;
ffffffff80020afa:	48 39 c8             	cmp    %rcx,%rax
ffffffff80020afd:	48 0f 47 c1          	cmova  %rcx,%rax

                if (copyStart < copyEnd) {
ffffffff80020b01:	48 39 c7             	cmp    %rax,%rdi
ffffffff80020b04:	73 a2                	jae    ffffffff80020aa8 <_ZN5Sched7ElfLoadEPKcm+0x128>
                    uint64_t dstOffset = copyStart - pageStart;
                    uint64_t srcOffset = copyStart - phdr->p_vaddr + phdr->p_offset;
ffffffff80020b06:	48 8b 73 08          	mov    0x8(%rbx),%rsi
                    uint64_t copySize = copyEnd - copyStart;
ffffffff80020b0a:	48 29 f8             	sub    %rdi,%rax
ffffffff80020b0d:	48 89 4d b8          	mov    %rcx,-0x48(%rbp)
ffffffff80020b11:	48 89 c2             	mov    %rax,%rdx
                    uint64_t srcOffset = copyStart - phdr->p_vaddr + phdr->p_offset;
ffffffff80020b14:	48 01 fe             	add    %rdi,%rsi

                    uint8_t* dst = (uint8_t*)Memory::HHDM(physAddr) + dstOffset;
ffffffff80020b17:	4c 01 e7             	add    %r12,%rdi
ffffffff80020b1a:	48 03 3d 87 be 12 00 	add    0x12be87(%rip),%rdi        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
                    uint64_t srcOffset = copyStart - phdr->p_vaddr + phdr->p_offset;
ffffffff80020b21:	4c 29 c6             	sub    %r8,%rsi
                    uint8_t* dst = (uint8_t*)Memory::HHDM(physAddr) + dstOffset;
ffffffff80020b24:	4c 29 ff             	sub    %r15,%rdi
                    uint8_t* src = fileData + srcOffset;
ffffffff80020b27:	4c 01 ee             	add    %r13,%rsi
                    memcpy(dst, src, copySize);
ffffffff80020b2a:	e8 b1 96 ff ff       	call   ffffffff8001a1e0 <memcpy>
ffffffff80020b2f:	48 8b 4d b8          	mov    -0x48(%rbp),%rcx
ffffffff80020b33:	e9 70 ff ff ff       	jmp    ffffffff80020aa8 <_ZN5Sched7ElfLoadEPKcm+0x128>
ffffffff80020b38:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80020b3f:	00 
            Print(string);
ffffffff80020b40:	48 c7 c7 a3 bf 02 80 	mov    $0xffffffff8002bfa3,%rdi
            g_kernelLogDepth++;
ffffffff80020b47:	83 05 56 e9 1b 00 01 	addl   $0x1,0x1be956(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80020b4e:	e8 6d 26 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020b53:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80020b5a:	e8 61 26 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020b5f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80020b66:	e8 55 26 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020b6b:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80020b72:	e8 49 26 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020b77:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80020b7e:	e8 3d 26 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020b83:	48 c7 c7 96 bf 02 80 	mov    $0xffffffff8002bf96,%rdi
ffffffff80020b8a:	e8 31 26 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020b8f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80020b96:	e8 25 26 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80020b9b:	8b 05 03 e9 1b 00    	mov    0x1be903(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Memory::g_heap->Free(fileData);
ffffffff80020ba1:	48 8b 3d 10 be 12 00 	mov    0x12be10(%rip),%rdi        # ffffffff8014c9b8 <_ZN6Memory6g_heapE>
ffffffff80020ba8:	4c 89 ee             	mov    %r13,%rsi
ffffffff80020bab:	83 e8 01             	sub    $0x1,%eax
ffffffff80020bae:	89 05 f0 e8 1b 00    	mov    %eax,0x1be8f0(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80020bb4:	e8 57 a2 ff ff       	call   ffffffff8001ae10 <_ZN6Memory13HeapAllocator4FreeEPv>
            return 0;
ffffffff80020bb9:	31 c0                	xor    %eax,%eax

        uint64_t entryPoint = hdr->e_entry;
        Memory::g_heap->Free(fileData);

        return entryPoint;
    }
ffffffff80020bbb:	48 83 c4 28          	add    $0x28,%rsp
ffffffff80020bbf:	5b                   	pop    %rbx
ffffffff80020bc0:	41 5c                	pop    %r12
ffffffff80020bc2:	41 5d                	pop    %r13
ffffffff80020bc4:	41 5e                	pop    %r14
ffffffff80020bc6:	41 5f                	pop    %r15
ffffffff80020bc8:	5d                   	pop    %rbp
ffffffff80020bc9:	c3                   	ret
ffffffff80020bca:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            Print(string);
ffffffff80020bd0:	48 c7 c7 a3 bf 02 80 	mov    $0xffffffff8002bfa3,%rdi
            g_kernelLogDepth++;
ffffffff80020bd7:	83 05 c6 e8 1b 00 01 	addl   $0x1,0x1be8c6(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80020bde:	e8 dd 25 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020be3:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80020bea:	e8 d1 25 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020bef:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80020bf6:	e8 c5 25 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020bfb:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80020c02:	e8 b9 25 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020c07:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80020c0e:	e8 ad 25 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020c13:	48 c7 c7 4f bf 02 80 	mov    $0xffffffff8002bf4f,%rdi
ffffffff80020c1a:	e8 a1 25 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80020c1f:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80020c24:	4c 89 e7             	mov    %r12,%rdi
ffffffff80020c27:	e8 64 98 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80020c2c:	48 89 c7             	mov    %rax,%rdi
ffffffff80020c2f:	e8 8c 25 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80020c34:	48 c7 c7 5f b6 02 80 	mov    $0xffffffff8002b65f,%rdi
ffffffff80020c3b:	e8 80 25 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020c40:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80020c47:	e8 74 25 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Fs::Vfs::VfsClose(handle);
ffffffff80020c4c:	89 df                	mov    %ebx,%edi
            g_kernelLogDepth--;
ffffffff80020c4e:	83 2d 4f e8 1b 00 01 	subl   $0x1,0x1be84f(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80020c55:	e8 e6 6d ff ff       	call   ffffffff80017a40 <_ZN2Fs3Vfs8VfsCloseEi>
            return 0;
ffffffff80020c5a:	e9 5a ff ff ff       	jmp    ffffffff80020bb9 <_ZN5Sched7ElfLoadEPKcm+0x239>
ffffffff80020c5f:	90                   	nop
            Print(string);
ffffffff80020c60:	48 c7 c7 a3 bf 02 80 	mov    $0xffffffff8002bfa3,%rdi
            g_kernelLogDepth++;
ffffffff80020c67:	83 05 36 e8 1b 00 01 	addl   $0x1,0x1be836(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80020c6e:	e8 4d 25 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020c73:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80020c7a:	e8 41 25 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020c7f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80020c86:	e8 35 25 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020c8b:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80020c92:	e8 29 25 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020c97:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80020c9e:	e8 1d 25 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020ca3:	48 c7 c7 84 bf 02 80 	mov    $0xffffffff8002bf84,%rdi
ffffffff80020caa:	e9 db fe ff ff       	jmp    ffffffff80020b8a <_ZN5Sched7ElfLoadEPKcm+0x20a>
ffffffff80020caf:	90                   	nop
ffffffff80020cb0:	48 c7 c7 a3 bf 02 80 	mov    $0xffffffff8002bfa3,%rdi
            g_kernelLogDepth++;
ffffffff80020cb7:	83 05 e6 e7 1b 00 01 	addl   $0x1,0x1be7e6(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80020cbe:	e8 fd 24 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020cc3:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80020cca:	e8 f1 24 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020ccf:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80020cd6:	e8 e5 24 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020cdb:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80020ce2:	e8 d9 24 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020ce7:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80020cee:	e8 cd 24 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020cf3:	48 c7 c7 60 bf 02 80 	mov    $0xffffffff8002bf60,%rdi
ffffffff80020cfa:	e8 c1 24 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80020cff:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80020d04:	4c 89 e7             	mov    %r12,%rdi
ffffffff80020d07:	e8 84 97 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80020d0c:	48 89 c7             	mov    %rax,%rdi
ffffffff80020d0f:	e8 ac 24 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80020d14:	48 c7 c7 74 bf 02 80 	mov    $0xffffffff8002bf74,%rdi
ffffffff80020d1b:	e9 1b ff ff ff       	jmp    ffffffff80020c3b <_ZN5Sched7ElfLoadEPKcm+0x2bb>
ffffffff80020d20:	48 c7 c7 a3 bf 02 80 	mov    $0xffffffff8002bfa3,%rdi
            g_kernelLogDepth++;
ffffffff80020d27:	83 05 76 e7 1b 00 01 	addl   $0x1,0x1be776(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80020d2e:	e8 8d 24 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020d33:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80020d3a:	e8 81 24 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020d3f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80020d46:	e8 75 24 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020d4b:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80020d52:	e8 69 24 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020d57:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80020d5e:	e8 5d 24 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020d63:	48 c7 c7 d2 bf 02 80 	mov    $0xffffffff8002bfd2,%rdi
ffffffff80020d6a:	e8 51 24 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Kt::KernelLogStream(Kt::ERROR, "ELF") << "Not x86_64 (machine=" << (uint64_t)hdr->e_machine << ")";
ffffffff80020d6f:	41 0f b7 7d 12       	movzwl 0x12(%r13),%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80020d74:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80020d79:	e8 12 97 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80020d7e:	48 89 c7             	mov    %rax,%rdi
ffffffff80020d81:	e8 3a 24 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80020d86:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff80020d8d:	e9 f8 fd ff ff       	jmp    ffffffff80020b8a <_ZN5Sched7ElfLoadEPKcm+0x20a>
ffffffff80020d92:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff80020d98:	48 c7 c7 a3 bf 02 80 	mov    $0xffffffff8002bfa3,%rdi
            g_kernelLogDepth++;
ffffffff80020d9f:	83 05 fe e6 1b 00 01 	addl   $0x1,0x1be6fe(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80020da6:	e8 15 24 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020dab:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80020db2:	e8 09 24 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020db7:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80020dbe:	e8 fd 23 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020dc3:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80020dca:	e8 f1 23 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020dcf:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80020dd6:	e8 e5 23 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020ddb:	48 c7 c7 e7 bf 02 80 	mov    $0xffffffff8002bfe7,%rdi
ffffffff80020de2:	e8 d9 23 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020de7:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80020dee:	e8 cd 23 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
                    Memory::g_heap->Free(fileData);
ffffffff80020df3:	48 8b 3d be bb 12 00 	mov    0x12bbbe(%rip),%rdi        # ffffffff8014c9b8 <_ZN6Memory6g_heapE>
ffffffff80020dfa:	4c 89 ee             	mov    %r13,%rsi
            g_kernelLogDepth--;
ffffffff80020dfd:	83 2d a0 e6 1b 00 01 	subl   $0x1,0x1be6a0(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80020e04:	e8 07 a0 ff ff       	call   ffffffff8001ae10 <_ZN6Memory13HeapAllocator4FreeEPv>
                    return 0;
ffffffff80020e09:	e9 ab fd ff ff       	jmp    ffffffff80020bb9 <_ZN5Sched7ElfLoadEPKcm+0x239>
ffffffff80020e0e:	66 90                	xchg   %ax,%ax
        uint64_t entryPoint = hdr->e_entry;
ffffffff80020e10:	49 8b 45 18          	mov    0x18(%r13),%rax
        Memory::g_heap->Free(fileData);
ffffffff80020e14:	48 8b 3d 9d bb 12 00 	mov    0x12bb9d(%rip),%rdi        # ffffffff8014c9b8 <_ZN6Memory6g_heapE>
ffffffff80020e1b:	4c 89 ee             	mov    %r13,%rsi
        uint64_t entryPoint = hdr->e_entry;
ffffffff80020e1e:	48 89 45 c8          	mov    %rax,-0x38(%rbp)
        Memory::g_heap->Free(fileData);
ffffffff80020e22:	e8 e9 9f ff ff       	call   ffffffff8001ae10 <_ZN6Memory13HeapAllocator4FreeEPv>
ffffffff80020e27:	48 8b 45 c8          	mov    -0x38(%rbp),%rax
        return entryPoint;
ffffffff80020e2b:	e9 8b fd ff ff       	jmp    ffffffff80020bbb <_ZN5Sched7ElfLoadEPKcm+0x23b>
            Print(string);
ffffffff80020e30:	48 c7 c7 a3 bf 02 80 	mov    $0xffffffff8002bfa3,%rdi
            g_kernelLogDepth++;
ffffffff80020e37:	83 05 66 e6 1b 00 01 	addl   $0x1,0x1be666(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80020e3e:	e8 7d 23 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020e43:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80020e4a:	e8 71 23 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020e4f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80020e56:	e8 65 23 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020e5b:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80020e62:	e8 59 23 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020e67:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80020e6e:	e8 4d 23 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020e73:	48 c7 c7 a7 bf 02 80 	mov    $0xffffffff8002bfa7,%rdi
ffffffff80020e7a:	e9 0b fd ff ff       	jmp    ffffffff80020b8a <_ZN5Sched7ElfLoadEPKcm+0x20a>
ffffffff80020e7f:	90                   	nop
ffffffff80020e80:	48 c7 c7 a3 bf 02 80 	mov    $0xffffffff8002bfa3,%rdi
            g_kernelLogDepth++;
ffffffff80020e87:	83 05 16 e6 1b 00 01 	addl   $0x1,0x1be616(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80020e8e:	e8 2d 23 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020e93:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80020e9a:	e8 21 23 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020e9f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80020ea6:	e8 15 23 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020eab:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80020eb2:	e8 09 23 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020eb7:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80020ebe:	e8 fd 22 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80020ec3:	48 c7 c7 b9 bf 02 80 	mov    $0xffffffff8002bfb9,%rdi
ffffffff80020eca:	e8 f1 22 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Kt::KernelLogStream(Kt::ERROR, "ELF") << "Not an executable (type=" << (uint64_t)hdr->e_type << ")";
ffffffff80020ecf:	41 0f b7 7d 10       	movzwl 0x10(%r13),%edi
ffffffff80020ed4:	e9 9b fe ff ff       	jmp    ffffffff80020d74 <_ZN5Sched7ElfLoadEPKcm+0x3f4>
ffffffff80020ed9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff80020ee0 <_ZN5Sched10InitializeEv>:
        for (;;) {
            asm volatile("hlt");
        }
    }

    void Initialize() {
ffffffff80020ee0:	55                   	push   %rbp
ffffffff80020ee1:	48 c7 c0 f8 75 17 80 	mov    $0xffffffff801775f8,%rax
ffffffff80020ee8:	48 ba 00 00 00 00 01 	movabs $0x100000000,%rdx
ffffffff80020eef:	00 00 00 
ffffffff80020ef2:	48 89 e5             	mov    %rsp,%rbp
ffffffff80020ef5:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80020efc:	00 00 00 00 
ffffffff80020f00:	48 89 d7             	mov    %rdx,%rdi
ffffffff80020f03:	48 89 d6             	mov    %rdx,%rsi
ffffffff80020f06:	89 d1                	mov    %edx,%ecx
ffffffff80020f08:	83 c2 08             	add    $0x8,%edx
ffffffff80020f0b:	48 c1 ee 20          	shr    $0x20,%rsi
ffffffff80020f0f:	48 c1 ff 20          	sar    $0x20,%rdi
        for (int i = 0; i < MaxProcesses; i++) {
            processTable[i].pid = i;
            processTable[i].state = ProcessState::Free;
ffffffff80020f13:	89 88 68 fe ff ff    	mov    %ecx,-0x198(%rax)
ffffffff80020f19:	48 05 00 2a 00 00    	add    $0x2a00,%rax
ffffffff80020f1f:	89 b8 a8 d9 ff ff    	mov    %edi,-0x2658(%rax)
ffffffff80020f25:	44 8d 46 08          	lea    0x8(%rsi),%r8d
ffffffff80020f29:	83 c7 02             	add    $0x2,%edi
ffffffff80020f2c:	89 b8 28 e4 ff ff    	mov    %edi,-0x1bd8(%rax)
ffffffff80020f32:	49 c1 e0 20          	shl    $0x20,%r8
ffffffff80020f36:	8d 79 04             	lea    0x4(%rcx),%edi
ffffffff80020f39:	89 b8 68 e9 ff ff    	mov    %edi,-0x1698(%rax)
ffffffff80020f3f:	4c 09 c2             	or     %r8,%rdx
ffffffff80020f42:	8d 7e 04             	lea    0x4(%rsi),%edi
ffffffff80020f45:	44 8d 41 02          	lea    0x2(%rcx),%r8d
ffffffff80020f49:	83 c6 06             	add    $0x6,%esi
ffffffff80020f4c:	83 c1 06             	add    $0x6,%ecx
ffffffff80020f4f:	44 89 80 e8 de ff ff 	mov    %r8d,-0x2118(%rax)
ffffffff80020f56:	89 b8 a8 ee ff ff    	mov    %edi,-0x1158(%rax)
ffffffff80020f5c:	89 88 e8 f3 ff ff    	mov    %ecx,-0xc18(%rax)
ffffffff80020f62:	89 b0 28 f9 ff ff    	mov    %esi,-0x6d8(%rax)
ffffffff80020f68:	c7 80 6c d4 ff ff 00 	movl   $0x0,-0x2b94(%rax)
ffffffff80020f6f:	00 00 00 
ffffffff80020f72:	c7 80 ac d9 ff ff 00 	movl   $0x0,-0x2654(%rax)
ffffffff80020f79:	00 00 00 
ffffffff80020f7c:	c7 80 ec de ff ff 00 	movl   $0x0,-0x2114(%rax)
ffffffff80020f83:	00 00 00 
ffffffff80020f86:	c7 80 2c e4 ff ff 00 	movl   $0x0,-0x1bd4(%rax)
ffffffff80020f8d:	00 00 00 
ffffffff80020f90:	c7 80 6c e9 ff ff 00 	movl   $0x0,-0x1694(%rax)
ffffffff80020f97:	00 00 00 
ffffffff80020f9a:	c7 80 ac ee ff ff 00 	movl   $0x0,-0x1154(%rax)
ffffffff80020fa1:	00 00 00 
ffffffff80020fa4:	c7 80 ec f3 ff ff 00 	movl   $0x0,-0xc14(%rax)
ffffffff80020fab:	00 00 00 
ffffffff80020fae:	c7 80 2c f9 ff ff 00 	movl   $0x0,-0x6d4(%rax)
ffffffff80020fb5:	00 00 00 
            processTable[i].name[0] = '\0';
ffffffff80020fb8:	c6 80 70 d4 ff ff 00 	movb   $0x0,-0x2b90(%rax)
ffffffff80020fbf:	c6 80 b0 d9 ff ff 00 	movb   $0x0,-0x2650(%rax)
ffffffff80020fc6:	c6 80 f0 de ff ff 00 	movb   $0x0,-0x2110(%rax)
ffffffff80020fcd:	c6 80 30 e4 ff ff 00 	movb   $0x0,-0x1bd0(%rax)
ffffffff80020fd4:	c6 80 70 e9 ff ff 00 	movb   $0x0,-0x1690(%rax)
ffffffff80020fdb:	c6 80 b0 ee ff ff 00 	movb   $0x0,-0x1150(%rax)
ffffffff80020fe2:	c6 80 f0 f3 ff ff 00 	movb   $0x0,-0xc10(%rax)
ffffffff80020fe9:	c6 80 30 f9 ff ff 00 	movb   $0x0,-0x6d0(%rax)
            processTable[i].savedRsp = 0;
ffffffff80020ff0:	48 c7 80 b0 d4 ff ff 	movq   $0x0,-0x2b50(%rax)
ffffffff80020ff7:	00 00 00 00 
ffffffff80020ffb:	48 c7 80 b8 d4 ff ff 	movq   $0x0,-0x2b48(%rax)
ffffffff80021002:	00 00 00 00 
ffffffff80021006:	48 c7 80 c0 d4 ff ff 	movq   $0x0,-0x2b40(%rax)
ffffffff8002100d:	00 00 00 00 
ffffffff80021011:	48 c7 80 c8 d4 ff ff 	movq   $0x0,-0x2b38(%rax)
ffffffff80021018:	00 00 00 00 
ffffffff8002101c:	48 c7 80 d0 d4 ff ff 	movq   $0x0,-0x2b30(%rax)
ffffffff80021023:	00 00 00 00 
ffffffff80021027:	48 c7 80 d8 d4 ff ff 	movq   $0x0,-0x2b28(%rax)
ffffffff8002102e:	00 00 00 00 
ffffffff80021032:	48 c7 80 e0 d4 ff ff 	movq   $0x0,-0x2b20(%rax)
ffffffff80021039:	00 00 00 00 
ffffffff8002103d:	48 c7 80 e8 d4 ff ff 	movq   $0x0,-0x2b18(%rax)
ffffffff80021044:	00 00 00 00 
ffffffff80021048:	48 c7 80 f0 d9 ff ff 	movq   $0x0,-0x2610(%rax)
ffffffff8002104f:	00 00 00 00 
ffffffff80021053:	48 c7 80 f8 d9 ff ff 	movq   $0x0,-0x2608(%rax)
ffffffff8002105a:	00 00 00 00 
ffffffff8002105e:	48 c7 80 00 da ff ff 	movq   $0x0,-0x2600(%rax)
ffffffff80021065:	00 00 00 00 
ffffffff80021069:	48 c7 80 08 da ff ff 	movq   $0x0,-0x25f8(%rax)
ffffffff80021070:	00 00 00 00 
ffffffff80021074:	48 c7 80 10 da ff ff 	movq   $0x0,-0x25f0(%rax)
ffffffff8002107b:	00 00 00 00 
ffffffff8002107f:	48 c7 80 18 da ff ff 	movq   $0x0,-0x25e8(%rax)
ffffffff80021086:	00 00 00 00 
ffffffff8002108a:	48 c7 80 20 da ff ff 	movq   $0x0,-0x25e0(%rax)
ffffffff80021091:	00 00 00 00 
ffffffff80021095:	48 c7 80 28 da ff ff 	movq   $0x0,-0x25d8(%rax)
ffffffff8002109c:	00 00 00 00 
ffffffff800210a0:	48 c7 80 30 df ff ff 	movq   $0x0,-0x20d0(%rax)
ffffffff800210a7:	00 00 00 00 
ffffffff800210ab:	48 c7 80 38 df ff ff 	movq   $0x0,-0x20c8(%rax)
ffffffff800210b2:	00 00 00 00 
ffffffff800210b6:	48 c7 80 40 df ff ff 	movq   $0x0,-0x20c0(%rax)
ffffffff800210bd:	00 00 00 00 
ffffffff800210c1:	48 c7 80 48 df ff ff 	movq   $0x0,-0x20b8(%rax)
ffffffff800210c8:	00 00 00 00 
ffffffff800210cc:	48 c7 80 50 df ff ff 	movq   $0x0,-0x20b0(%rax)
ffffffff800210d3:	00 00 00 00 
ffffffff800210d7:	48 c7 80 58 df ff ff 	movq   $0x0,-0x20a8(%rax)
ffffffff800210de:	00 00 00 00 
ffffffff800210e2:	48 c7 80 60 df ff ff 	movq   $0x0,-0x20a0(%rax)
ffffffff800210e9:	00 00 00 00 
ffffffff800210ed:	48 c7 80 68 df ff ff 	movq   $0x0,-0x2098(%rax)
ffffffff800210f4:	00 00 00 00 
ffffffff800210f8:	48 c7 80 70 e4 ff ff 	movq   $0x0,-0x1b90(%rax)
ffffffff800210ff:	00 00 00 00 
ffffffff80021103:	48 c7 80 78 e4 ff ff 	movq   $0x0,-0x1b88(%rax)
ffffffff8002110a:	00 00 00 00 
ffffffff8002110e:	48 c7 80 80 e4 ff ff 	movq   $0x0,-0x1b80(%rax)
ffffffff80021115:	00 00 00 00 
ffffffff80021119:	48 c7 80 88 e4 ff ff 	movq   $0x0,-0x1b78(%rax)
ffffffff80021120:	00 00 00 00 
ffffffff80021124:	48 c7 80 90 e4 ff ff 	movq   $0x0,-0x1b70(%rax)
ffffffff8002112b:	00 00 00 00 
ffffffff8002112f:	48 c7 80 98 e4 ff ff 	movq   $0x0,-0x1b68(%rax)
ffffffff80021136:	00 00 00 00 
ffffffff8002113a:	48 c7 80 a0 e4 ff ff 	movq   $0x0,-0x1b60(%rax)
ffffffff80021141:	00 00 00 00 
ffffffff80021145:	48 c7 80 a8 e4 ff ff 	movq   $0x0,-0x1b58(%rax)
ffffffff8002114c:	00 00 00 00 
ffffffff80021150:	48 c7 80 b0 e9 ff ff 	movq   $0x0,-0x1650(%rax)
ffffffff80021157:	00 00 00 00 
ffffffff8002115b:	48 c7 80 b8 e9 ff ff 	movq   $0x0,-0x1648(%rax)
ffffffff80021162:	00 00 00 00 
ffffffff80021166:	48 c7 80 c0 e9 ff ff 	movq   $0x0,-0x1640(%rax)
ffffffff8002116d:	00 00 00 00 
ffffffff80021171:	48 c7 80 c8 e9 ff ff 	movq   $0x0,-0x1638(%rax)
ffffffff80021178:	00 00 00 00 
ffffffff8002117c:	48 c7 80 d0 e9 ff ff 	movq   $0x0,-0x1630(%rax)
ffffffff80021183:	00 00 00 00 
ffffffff80021187:	48 c7 80 d8 e9 ff ff 	movq   $0x0,-0x1628(%rax)
ffffffff8002118e:	00 00 00 00 
ffffffff80021192:	48 c7 80 e0 e9 ff ff 	movq   $0x0,-0x1620(%rax)
ffffffff80021199:	00 00 00 00 
ffffffff8002119d:	48 c7 80 e8 e9 ff ff 	movq   $0x0,-0x1618(%rax)
ffffffff800211a4:	00 00 00 00 
ffffffff800211a8:	48 c7 80 f0 ee ff ff 	movq   $0x0,-0x1110(%rax)
ffffffff800211af:	00 00 00 00 
ffffffff800211b3:	48 c7 80 f8 ee ff ff 	movq   $0x0,-0x1108(%rax)
ffffffff800211ba:	00 00 00 00 
ffffffff800211be:	48 c7 80 00 ef ff ff 	movq   $0x0,-0x1100(%rax)
ffffffff800211c5:	00 00 00 00 
ffffffff800211c9:	48 c7 80 08 ef ff ff 	movq   $0x0,-0x10f8(%rax)
ffffffff800211d0:	00 00 00 00 
ffffffff800211d4:	48 c7 80 10 ef ff ff 	movq   $0x0,-0x10f0(%rax)
ffffffff800211db:	00 00 00 00 
ffffffff800211df:	48 c7 80 18 ef ff ff 	movq   $0x0,-0x10e8(%rax)
ffffffff800211e6:	00 00 00 00 
ffffffff800211ea:	48 c7 80 20 ef ff ff 	movq   $0x0,-0x10e0(%rax)
ffffffff800211f1:	00 00 00 00 
ffffffff800211f5:	48 c7 80 28 ef ff ff 	movq   $0x0,-0x10d8(%rax)
ffffffff800211fc:	00 00 00 00 
ffffffff80021200:	48 c7 80 30 f4 ff ff 	movq   $0x0,-0xbd0(%rax)
ffffffff80021207:	00 00 00 00 
ffffffff8002120b:	48 c7 80 38 f4 ff ff 	movq   $0x0,-0xbc8(%rax)
ffffffff80021212:	00 00 00 00 
ffffffff80021216:	48 c7 80 40 f4 ff ff 	movq   $0x0,-0xbc0(%rax)
ffffffff8002121d:	00 00 00 00 
ffffffff80021221:	48 c7 80 48 f4 ff ff 	movq   $0x0,-0xbb8(%rax)
ffffffff80021228:	00 00 00 00 
ffffffff8002122c:	48 c7 80 50 f4 ff ff 	movq   $0x0,-0xbb0(%rax)
ffffffff80021233:	00 00 00 00 
ffffffff80021237:	48 c7 80 58 f4 ff ff 	movq   $0x0,-0xba8(%rax)
ffffffff8002123e:	00 00 00 00 
ffffffff80021242:	48 c7 80 60 f4 ff ff 	movq   $0x0,-0xba0(%rax)
ffffffff80021249:	00 00 00 00 
ffffffff8002124d:	48 c7 80 68 f4 ff ff 	movq   $0x0,-0xb98(%rax)
ffffffff80021254:	00 00 00 00 
ffffffff80021258:	48 c7 80 70 f9 ff ff 	movq   $0x0,-0x690(%rax)
ffffffff8002125f:	00 00 00 00 
ffffffff80021263:	48 c7 80 78 f9 ff ff 	movq   $0x0,-0x688(%rax)
ffffffff8002126a:	00 00 00 00 
ffffffff8002126e:	48 c7 80 80 f9 ff ff 	movq   $0x0,-0x680(%rax)
ffffffff80021275:	00 00 00 00 
ffffffff80021279:	48 c7 80 88 f9 ff ff 	movq   $0x0,-0x678(%rax)
ffffffff80021280:	00 00 00 00 
ffffffff80021284:	48 c7 80 90 f9 ff ff 	movq   $0x0,-0x670(%rax)
ffffffff8002128b:	00 00 00 00 
ffffffff8002128f:	48 c7 80 98 f9 ff ff 	movq   $0x0,-0x668(%rax)
ffffffff80021296:	00 00 00 00 
ffffffff8002129a:	48 c7 80 a0 f9 ff ff 	movq   $0x0,-0x660(%rax)
ffffffff800212a1:	00 00 00 00 
ffffffff800212a5:	48 c7 80 a8 f9 ff ff 	movq   $0x0,-0x658(%rax)
ffffffff800212ac:	00 00 00 00 
            processTable[i].sliceRemaining = 0;
            processTable[i].pml4Phys = 0;
            processTable[i].kernelStackTop = 0;
            processTable[i].userStackTop = 0;
            processTable[i].heapNext = 0;
            processTable[i].args[0] = '\0';
ffffffff800212b0:	c6 80 f0 d4 ff ff 00 	movb   $0x0,-0x2b10(%rax)
ffffffff800212b7:	c6 80 30 da ff ff 00 	movb   $0x0,-0x25d0(%rax)
ffffffff800212be:	c6 80 70 df ff ff 00 	movb   $0x0,-0x2090(%rax)
ffffffff800212c5:	c6 80 b0 e4 ff ff 00 	movb   $0x0,-0x1b50(%rax)
ffffffff800212cc:	c6 80 f0 e9 ff ff 00 	movb   $0x0,-0x1610(%rax)
ffffffff800212d3:	c6 80 30 ef ff ff 00 	movb   $0x0,-0x10d0(%rax)
ffffffff800212da:	c6 80 70 f4 ff ff 00 	movb   $0x0,-0xb90(%rax)
ffffffff800212e1:	c6 80 b0 f9 ff ff 00 	movb   $0x0,-0x650(%rax)
            processTable[i].redirected = false;
ffffffff800212e8:	c6 80 f0 d5 ff ff 00 	movb   $0x0,-0x2a10(%rax)
ffffffff800212ef:	c6 80 30 db ff ff 00 	movb   $0x0,-0x24d0(%rax)
ffffffff800212f6:	c6 80 70 e0 ff ff 00 	movb   $0x0,-0x1f90(%rax)
ffffffff800212fd:	c6 80 b0 e5 ff ff 00 	movb   $0x0,-0x1a50(%rax)
ffffffff80021304:	c6 80 f0 ea ff ff 00 	movb   $0x0,-0x1510(%rax)
ffffffff8002130b:	c6 80 30 f0 ff ff 00 	movb   $0x0,-0xfd0(%rax)
ffffffff80021312:	c6 80 70 f5 ff ff 00 	movb   $0x0,-0xa90(%rax)
ffffffff80021319:	c6 80 b0 fa ff ff 00 	movb   $0x0,-0x550(%rax)
            processTable[i].parentPid = -1;
ffffffff80021320:	c7 80 f4 d5 ff ff ff 	movl   $0xffffffff,-0x2a0c(%rax)
ffffffff80021327:	ff ff ff 
ffffffff8002132a:	c7 80 34 db ff ff ff 	movl   $0xffffffff,-0x24cc(%rax)
ffffffff80021331:	ff ff ff 
ffffffff80021334:	c7 80 74 e0 ff ff ff 	movl   $0xffffffff,-0x1f8c(%rax)
ffffffff8002133b:	ff ff ff 
ffffffff8002133e:	c7 80 b4 e5 ff ff ff 	movl   $0xffffffff,-0x1a4c(%rax)
ffffffff80021345:	ff ff ff 
ffffffff80021348:	c7 80 f4 ea ff ff ff 	movl   $0xffffffff,-0x150c(%rax)
ffffffff8002134f:	ff ff ff 
ffffffff80021352:	c7 80 34 f0 ff ff ff 	movl   $0xffffffff,-0xfcc(%rax)
ffffffff80021359:	ff ff ff 
ffffffff8002135c:	c7 80 74 f5 ff ff ff 	movl   $0xffffffff,-0xa8c(%rax)
ffffffff80021363:	ff ff ff 
ffffffff80021366:	c7 80 b4 fa ff ff ff 	movl   $0xffffffff,-0x54c(%rax)
ffffffff8002136d:	ff ff ff 
            processTable[i].outBuf = nullptr;
ffffffff80021370:	48 c7 80 f8 d5 ff ff 	movq   $0x0,-0x2a08(%rax)
ffffffff80021377:	00 00 00 00 
ffffffff8002137b:	48 c7 80 38 db ff ff 	movq   $0x0,-0x24c8(%rax)
ffffffff80021382:	00 00 00 00 
ffffffff80021386:	48 c7 80 78 e0 ff ff 	movq   $0x0,-0x1f88(%rax)
ffffffff8002138d:	00 00 00 00 
ffffffff80021391:	48 c7 80 b8 e5 ff ff 	movq   $0x0,-0x1a48(%rax)
ffffffff80021398:	00 00 00 00 
ffffffff8002139c:	48 c7 80 f8 ea ff ff 	movq   $0x0,-0x1508(%rax)
ffffffff800213a3:	00 00 00 00 
ffffffff800213a7:	48 c7 80 38 f0 ff ff 	movq   $0x0,-0xfc8(%rax)
ffffffff800213ae:	00 00 00 00 
ffffffff800213b2:	48 c7 80 78 f5 ff ff 	movq   $0x0,-0xa88(%rax)
ffffffff800213b9:	00 00 00 00 
ffffffff800213bd:	48 c7 80 b8 fa ff ff 	movq   $0x0,-0x548(%rax)
ffffffff800213c4:	00 00 00 00 
            processTable[i].outHead = 0;
ffffffff800213c8:	48 c7 80 00 d6 ff ff 	movq   $0x0,-0x2a00(%rax)
ffffffff800213cf:	00 00 00 00 
ffffffff800213d3:	48 c7 80 40 db ff ff 	movq   $0x0,-0x24c0(%rax)
ffffffff800213da:	00 00 00 00 
ffffffff800213de:	48 c7 80 80 e0 ff ff 	movq   $0x0,-0x1f80(%rax)
ffffffff800213e5:	00 00 00 00 
ffffffff800213e9:	48 c7 80 c0 e5 ff ff 	movq   $0x0,-0x1a40(%rax)
ffffffff800213f0:	00 00 00 00 
ffffffff800213f4:	48 c7 80 00 eb ff ff 	movq   $0x0,-0x1500(%rax)
ffffffff800213fb:	00 00 00 00 
ffffffff800213ff:	48 c7 80 40 f0 ff ff 	movq   $0x0,-0xfc0(%rax)
ffffffff80021406:	00 00 00 00 
ffffffff8002140a:	48 c7 80 80 f5 ff ff 	movq   $0x0,-0xa80(%rax)
ffffffff80021411:	00 00 00 00 
ffffffff80021415:	48 c7 80 c0 fa ff ff 	movq   $0x0,-0x540(%rax)
ffffffff8002141c:	00 00 00 00 
            processTable[i].outTail = 0;
            processTable[i].inBuf = nullptr;
ffffffff80021420:	48 c7 80 08 d6 ff ff 	movq   $0x0,-0x29f8(%rax)
ffffffff80021427:	00 00 00 00 
ffffffff8002142b:	48 c7 80 48 db ff ff 	movq   $0x0,-0x24b8(%rax)
ffffffff80021432:	00 00 00 00 
ffffffff80021436:	48 c7 80 88 e0 ff ff 	movq   $0x0,-0x1f78(%rax)
ffffffff8002143d:	00 00 00 00 
ffffffff80021441:	48 c7 80 c8 e5 ff ff 	movq   $0x0,-0x1a38(%rax)
ffffffff80021448:	00 00 00 00 
ffffffff8002144c:	48 c7 80 08 eb ff ff 	movq   $0x0,-0x14f8(%rax)
ffffffff80021453:	00 00 00 00 
ffffffff80021457:	48 c7 80 48 f0 ff ff 	movq   $0x0,-0xfb8(%rax)
ffffffff8002145e:	00 00 00 00 
ffffffff80021462:	48 c7 80 88 f5 ff ff 	movq   $0x0,-0xa78(%rax)
ffffffff80021469:	00 00 00 00 
ffffffff8002146d:	48 c7 80 c8 fa ff ff 	movq   $0x0,-0x538(%rax)
ffffffff80021474:	00 00 00 00 
            processTable[i].inHead = 0;
ffffffff80021478:	48 c7 80 10 d6 ff ff 	movq   $0x0,-0x29f0(%rax)
ffffffff8002147f:	00 00 00 00 
ffffffff80021483:	48 c7 80 50 db ff ff 	movq   $0x0,-0x24b0(%rax)
ffffffff8002148a:	00 00 00 00 
ffffffff8002148e:	48 c7 80 90 e0 ff ff 	movq   $0x0,-0x1f70(%rax)
ffffffff80021495:	00 00 00 00 
ffffffff80021499:	48 c7 80 d0 e5 ff ff 	movq   $0x0,-0x1a30(%rax)
ffffffff800214a0:	00 00 00 00 
ffffffff800214a4:	48 c7 80 10 eb ff ff 	movq   $0x0,-0x14f0(%rax)
ffffffff800214ab:	00 00 00 00 
ffffffff800214af:	48 c7 80 50 f0 ff ff 	movq   $0x0,-0xfb0(%rax)
ffffffff800214b6:	00 00 00 00 
ffffffff800214ba:	48 c7 80 90 f5 ff ff 	movq   $0x0,-0xa70(%rax)
ffffffff800214c1:	00 00 00 00 
ffffffff800214c5:	48 c7 80 d0 fa ff ff 	movq   $0x0,-0x530(%rax)
ffffffff800214cc:	00 00 00 00 
            processTable[i].inTail = 0;
            processTable[i].keyHead = 0;
ffffffff800214d0:	48 c7 80 98 d7 ff ff 	movq   $0x0,-0x2868(%rax)
ffffffff800214d7:	00 00 00 00 
ffffffff800214db:	48 c7 80 d8 dc ff ff 	movq   $0x0,-0x2328(%rax)
ffffffff800214e2:	00 00 00 00 
ffffffff800214e6:	48 c7 80 18 e2 ff ff 	movq   $0x0,-0x1de8(%rax)
ffffffff800214ed:	00 00 00 00 
ffffffff800214f1:	48 c7 80 58 e7 ff ff 	movq   $0x0,-0x18a8(%rax)
ffffffff800214f8:	00 00 00 00 
ffffffff800214fc:	48 c7 80 98 ec ff ff 	movq   $0x0,-0x1368(%rax)
ffffffff80021503:	00 00 00 00 
ffffffff80021507:	48 c7 80 d8 f1 ff ff 	movq   $0x0,-0xe28(%rax)
ffffffff8002150e:	00 00 00 00 
ffffffff80021512:	48 c7 80 18 f7 ff ff 	movq   $0x0,-0x8e8(%rax)
ffffffff80021519:	00 00 00 00 
ffffffff8002151d:	48 c7 80 58 fc ff ff 	movq   $0x0,-0x3a8(%rax)
ffffffff80021524:	00 00 00 00 
            processTable[i].keyTail = 0;
            processTable[i].termCols = 0;
ffffffff80021528:	48 c7 80 a0 d7 ff ff 	movq   $0x0,-0x2860(%rax)
ffffffff8002152f:	00 00 00 00 
ffffffff80021533:	48 c7 80 e0 dc ff ff 	movq   $0x0,-0x2320(%rax)
ffffffff8002153a:	00 00 00 00 
ffffffff8002153e:	48 c7 80 20 e2 ff ff 	movq   $0x0,-0x1de0(%rax)
ffffffff80021545:	00 00 00 00 
ffffffff80021549:	48 c7 80 60 e7 ff ff 	movq   $0x0,-0x18a0(%rax)
ffffffff80021550:	00 00 00 00 
ffffffff80021554:	48 c7 80 a0 ec ff ff 	movq   $0x0,-0x1360(%rax)
ffffffff8002155b:	00 00 00 00 
ffffffff8002155f:	48 c7 80 e0 f1 ff ff 	movq   $0x0,-0xe20(%rax)
ffffffff80021566:	00 00 00 00 
ffffffff8002156a:	48 c7 80 20 f7 ff ff 	movq   $0x0,-0x8e0(%rax)
ffffffff80021571:	00 00 00 00 
ffffffff80021575:	48 c7 80 60 fc ff ff 	movq   $0x0,-0x3a0(%rax)
ffffffff8002157c:	00 00 00 00 
        for (int i = 0; i < MaxProcesses; i++) {
ffffffff80021580:	48 3d f8 b5 1c 80    	cmp    $0xffffffff801cb5f8,%rax
ffffffff80021586:	0f 85 74 f9 ff ff    	jne    ffffffff80020f00 <_ZN5Sched10InitializeEv+0x20>
ffffffff8002158c:	48 c7 c7 fd bf 02 80 	mov    $0xffffffff8002bffd,%rdi
            g_kernelLogDepth++;
ffffffff80021593:	83 05 0a df 1b 00 01 	addl   $0x1,0x1bdf0a(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            processTable[i].termRows = 0;
        }

        nextPid = 0;
ffffffff8002159a:	c7 05 9c 5e 15 00 00 	movl   $0x0,0x155e9c(%rip)        # ffffffff80177440 <_ZN5SchedL7nextPidE>
ffffffff800215a1:	00 00 00 
            Print(string);
ffffffff800215a4:	e8 17 1c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800215a9:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800215b0:	e8 0b 1c 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800215b5:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800215bc:	e8 ff 1b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800215c1:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff800215c8:	e8 f3 1b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800215cd:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800215d4:	e8 e7 1b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800215d9:	48 c7 c7 73 b6 02 80 	mov    $0xffffffff8002b673,%rdi
ffffffff800215e0:	e8 db 1b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::int2basestr(number, t.streamBaseType));
ffffffff800215e5:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800215ea:	bf 00 01 00 00       	mov    $0x100,%edi
ffffffff800215ef:	e8 8c 8d ff ff       	call   ffffffff8001a380 <_ZN3Lib11int2basestrEim>
ffffffff800215f4:	48 89 c7             	mov    %rax,%rdi
ffffffff800215f7:	e8 c4 1b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800215fc:	48 c7 c7 03 c0 02 80 	mov    $0xffffffff8002c003,%rdi
ffffffff80021603:	e8 b8 1b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80021608:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8002160d:	bf 0a 00 00 00       	mov    $0xa,%edi
ffffffff80021612:	e8 79 8e ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80021617:	48 89 c7             	mov    %rax,%rdi
ffffffff8002161a:	e8 a1 1b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8002161f:	48 c7 c7 14 c0 02 80 	mov    $0xffffffff8002c014,%rdi
ffffffff80021626:	e8 95 1b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002162b:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80021632:	e8 89 1b 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80021637:	83 2d 66 de 1b 00 01 	subl   $0x1,0x1bde66(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

        Kt::KernelLogStream(Kt::OK, "Sched") << "Initialized (" << MaxProcesses
            << " process slots, " << (uint64_t)TimeSliceMs << " ms time slice)";
    }
ffffffff8002163e:	5d                   	pop    %rbp
ffffffff8002163f:	c3                   	ret

ffffffff80021640 <_ZN5Sched5SpawnEPKcS1_>:

    int Spawn(const char* vfsPath, const char* args) {
ffffffff80021640:	55                   	push   %rbp
ffffffff80021641:	48 89 e5             	mov    %rsp,%rbp
ffffffff80021644:	41 57                	push   %r15
ffffffff80021646:	41 56                	push   %r14
ffffffff80021648:	49 89 f6             	mov    %rsi,%r14
ffffffff8002164b:	41 55                	push   %r13
ffffffff8002164d:	41 54                	push   %r12
ffffffff8002164f:	49 89 fc             	mov    %rdi,%r12
ffffffff80021652:	53                   	push   %rbx
ffffffff80021653:	48 83 ec 38          	sub    $0x38,%rsp
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff80021657:	9c                   	pushf
ffffffff80021658:	41 5d                	pop    %r13
ffffffff8002165a:	fa                   	cli
            inner.Acquire();
ffffffff8002165b:	48 c7 c7 30 74 17 80 	mov    $0xffffffff80177430,%rdi
        g_schedLock.Acquire();

        int slot = -1;
        for (int i = 0; i < MaxProcesses; i++) {
ffffffff80021662:	31 db                	xor    %ebx,%ebx
ffffffff80021664:	e8 47 aa fe ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
            savedFlags = flags;
ffffffff80021669:	4c 89 2d c8 5d 15 00 	mov    %r13,0x155dc8(%rip)        # ffffffff80177438 <_ZN5SchedL11g_schedLockE+0x8>
ffffffff80021670:	48 c7 c0 64 74 17 80 	mov    $0xffffffff80177464,%rax
ffffffff80021677:	eb 1c                	jmp    ffffffff80021695 <_ZN5Sched5SpawnEPKcS1_+0x55>
ffffffff80021679:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
ffffffff80021680:	83 c3 01             	add    $0x1,%ebx
ffffffff80021683:	48 05 40 05 00 00    	add    $0x540,%rax
ffffffff80021689:	81 fb 00 01 00 00    	cmp    $0x100,%ebx
ffffffff8002168f:	0f 84 db 04 00 00    	je     ffffffff80021b70 <_ZN5Sched5SpawnEPKcS1_+0x530>
            if (processTable[i].state == ProcessState::Free) {
ffffffff80021695:	8b 08                	mov    (%rax),%ecx
ffffffff80021697:	85 c9                	test   %ecx,%ecx
ffffffff80021699:	75 e5                	jne    ffffffff80021680 <_ZN5Sched5SpawnEPKcS1_+0x40>
            Kt::KernelLogStream(Kt::ERROR, "Sched") << "No free process slots";
            return -1;
        }

        // Reserve the slot so other CPUs don't grab it during ELF loading
        processTable[slot].state = ProcessState::Terminated;
ffffffff8002169b:	48 63 db             	movslq %ebx,%rbx
            inner.Release();
ffffffff8002169e:	48 c7 c7 30 74 17 80 	mov    $0xffffffff80177430,%rdi
ffffffff800216a5:	48 8d 04 9b          	lea    (%rbx,%rbx,4),%rax
ffffffff800216a9:	48 8d 04 83          	lea    (%rbx,%rax,4),%rax
ffffffff800216ad:	48 c1 e0 06          	shl    $0x6,%rax
ffffffff800216b1:	4c 8d b8 60 74 17 80 	lea    -0x7fe88ba0(%rax),%r15
        int pid = nextPid++;
ffffffff800216b8:	8b 05 82 5d 15 00    	mov    0x155d82(%rip),%eax        # ffffffff80177440 <_ZN5SchedL7nextPidE>
        processTable[slot].state = ProcessState::Terminated;
ffffffff800216be:	41 c7 47 04 03 00 00 	movl   $0x3,0x4(%r15)
ffffffff800216c5:	00 
        int pid = nextPid++;
ffffffff800216c6:	89 45 b4             	mov    %eax,-0x4c(%rbp)
ffffffff800216c9:	83 c0 01             	add    $0x1,%eax
ffffffff800216cc:	89 05 6e 5d 15 00    	mov    %eax,0x155d6e(%rip)        # ffffffff80177440 <_ZN5SchedL7nextPidE>
ffffffff800216d2:	e8 f9 a9 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff800216d7:	41 55                	push   %r13
ffffffff800216d9:	9d                   	popf
        g_schedLock.Release();

        // Heavy I/O: ELF loading and memory allocation (done without lock)

        // Create per-process PML4 with kernel-half copied
        uint64_t pml4Phys = Memory::VMM::Paging::CreateUserPML4();
ffffffff800216da:	e8 21 a4 ff ff       	call   ffffffff8001bb00 <_ZN6Memory3VMM6Paging14CreateUserPML4Ev>

        // Load ELF into the process's address space
        uint64_t entry = ElfLoad(vfsPath, pml4Phys);
ffffffff800216df:	4c 89 e7             	mov    %r12,%rdi
ffffffff800216e2:	48 89 c6             	mov    %rax,%rsi
        uint64_t pml4Phys = Memory::VMM::Paging::CreateUserPML4();
ffffffff800216e5:	48 89 45 c8          	mov    %rax,-0x38(%rbp)
        uint64_t entry = ElfLoad(vfsPath, pml4Phys);
ffffffff800216e9:	e8 92 f2 ff ff       	call   ffffffff80020980 <_ZN5Sched7ElfLoadEPKcm>
ffffffff800216ee:	48 89 45 a8          	mov    %rax,-0x58(%rbp)
        if (entry == 0) {
ffffffff800216f2:	48 85 c0             	test   %rax,%rax
ffffffff800216f5:	0f 84 43 04 00 00    	je     ffffffff80021b3e <_ZN5Sched5SpawnEPKcS1_+0x4fe>
            g_schedLock.Release();
            return -1;
        }

        // Allocate kernel stack (used during syscalls and interrupts)
        void* firstPage = Memory::g_pfa->AllocateZeroed();
ffffffff800216fb:	48 8b 3d ae b2 12 00 	mov    0x12b2ae(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff80021702:	e8 09 9b ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff80021707:	49 89 c5             	mov    %rax,%r13
        if (firstPage == nullptr) {
ffffffff8002170a:	48 85 c0             	test   %rax,%rax
ffffffff8002170d:	0f 84 c9 03 00 00    	je     ffffffff80021adc <_ZN5Sched5SpawnEPKcS1_+0x49c>
            g_schedLock.Acquire();
            processTable[slot].state = ProcessState::Free;
            g_schedLock.Release();
            return -1;
        }
        void* stackMem = Memory::g_pfa->ReallocConsecutive(firstPage, StackPages);
ffffffff80021713:	48 8b 3d 96 b2 12 00 	mov    0x12b296(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff8002171a:	ba 04 00 00 00       	mov    $0x4,%edx
ffffffff8002171f:	48 89 c6             	mov    %rax,%rsi
ffffffff80021722:	e8 19 9b ff ff       	call   ffffffff8001b240 <_ZN6Memory18PageFrameAllocator18ReallocConsecutiveEPvi>
ffffffff80021727:	48 89 45 b8          	mov    %rax,-0x48(%rbp)
        if (stackMem == nullptr) {
ffffffff8002172b:	48 85 c0             	test   %rax,%rax
ffffffff8002172e:	0f 84 01 05 00 00    	je     ffffffff80021c35 <_ZN5Sched5SpawnEPKcS1_+0x5f5>
            g_schedLock.Release();
            return -1;
        }

        uint8_t* kernelStackBase = (uint8_t*)stackMem;
        uint64_t kernelStackTop = (uint64_t)kernelStackBase + StackSize;
ffffffff80021734:	49 bd 00 b0 ff ff 7f 	movabs $0x7fffffb000,%r13
ffffffff8002173b:	00 00 00 
ffffffff8002173e:	48 8b 45 b8          	mov    -0x48(%rbp),%rax
ffffffff80021742:	4c 8d b8 00 40 00 00 	lea    0x4000(%rax),%r15

        // Allocate user stack pages and map them in the process PML4
        uint64_t userStackBase = UserStackTop - UserStackSize;
        uint64_t topStackPagePhys = 0;
        for (uint64_t i = 0; i < UserStackPages; i++) {
            void* page = Memory::g_pfa->AllocateZeroed();
ffffffff80021749:	48 8b 3d 60 b2 12 00 	mov    0x12b260(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff80021750:	e8 bb 9a ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
            if (page == nullptr) {
ffffffff80021755:	48 85 c0             	test   %rax,%rax
ffffffff80021758:	0f 84 c2 02 00 00    	je     ffffffff80021a20 <_ZN5Sched5SpawnEPKcS1_+0x3e0>
ffffffff8002175e:	48 2b 05 43 b2 12 00 	sub    0x12b243(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
                processTable[slot].state = ProcessState::Free;
                g_schedLock.Release();
                return -1;
            }
            uint64_t physAddr = Memory::SubHHDM((uint64_t)page);
            Memory::VMM::Paging::MapUserIn(pml4Phys, physAddr, userStackBase + i * 0x1000);
ffffffff80021765:	48 8b 7d c8          	mov    -0x38(%rbp),%rdi
ffffffff80021769:	4c 89 ea             	mov    %r13,%rdx
            if (i == UserStackPages - 1) topStackPagePhys = physAddr;
ffffffff8002176c:	49 81 c5 00 10 00 00 	add    $0x1000,%r13
            Memory::VMM::Paging::MapUserIn(pml4Phys, physAddr, userStackBase + i * 0x1000);
ffffffff80021773:	48 89 c6             	mov    %rax,%rsi
ffffffff80021776:	48 89 45 c0          	mov    %rax,-0x40(%rbp)
ffffffff8002177a:	e8 e1 a3 ff ff       	call   ffffffff8001bb60 <_ZN6Memory3VMM6Paging9MapUserInEmmm>
            if (i == UserStackPages - 1) topStackPagePhys = physAddr;
ffffffff8002177f:	48 b8 00 f0 ff ff 7f 	movabs $0x7ffffff000,%rax
ffffffff80021786:	00 00 00 
ffffffff80021789:	49 39 c5             	cmp    %rax,%r13
ffffffff8002178c:	75 bb                	jne    ffffffff80021749 <_ZN5Sched5SpawnEPKcS1_+0x109>
        }

        // Allocate and map a user-space exit stub page.
        // When _start() returns, it jumps here and calls SYS_EXIT(0).
        {
            void* stubPage = Memory::g_pfa->AllocateZeroed();
ffffffff8002178e:	48 8b 3d 1b b2 12 00 	mov    0x12b21b(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff80021795:	e8 76 9a ff ff       	call   ffffffff8001b210 <_ZN6Memory18PageFrameAllocator14AllocateZeroedEv>
ffffffff8002179a:	49 89 c5             	mov    %rax,%r13
            if (stubPage == nullptr) {
ffffffff8002179d:	48 85 c0             	test   %rax,%rax
ffffffff800217a0:	0f 84 40 04 00 00    	je     ffffffff80021be6 <_ZN5Sched5SpawnEPKcS1_+0x5a6>
                processTable[slot].state = ProcessState::Free;
                g_schedLock.Release();
                return -1;
            }
            uint64_t stubPhys = Memory::SubHHDM((uint64_t)stubPage);
            Memory::VMM::Paging::MapUserIn(pml4Phys, stubPhys, ExitStubAddr);
ffffffff800217a6:	48 8b 7d c8          	mov    -0x38(%rbp),%rdi
ffffffff800217aa:	48 89 c6             	mov    %rax,%rsi
ffffffff800217ad:	ba 00 f0 3f 00       	mov    $0x3ff000,%edx
ffffffff800217b2:	48 2b 35 ef b1 12 00 	sub    0x12b1ef(%rip),%rsi        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff800217b9:	e8 a2 a3 ff ff       	call   ffffffff8001bb60 <_ZN6Memory3VMM6Paging9MapUserInEmmm>

            // Write: xor edi, edi; xor eax, eax; syscall
            uint8_t* stub = (uint8_t*)stubPage;
            stub[0] = 0x31; stub[1] = 0xFF;  // xor edi, edi  (exit code 0)
            stub[2] = 0x31; stub[3] = 0xC0;  // xor eax, eax  (SYS_EXIT = 0)
            stub[4] = 0x0F; stub[5] = 0x05;  // syscall
ffffffff800217be:	ba 0f 05 00 00       	mov    $0x50f,%edx

        // Push exit stub address as the return address on the user stack.
        // UserStackTop - 8 falls at offset 0xFF8 within the top stack page.
        {
            uint8_t* topPage = (uint8_t*)Memory::HHDM(topStackPagePhys);
            *(uint64_t*)(topPage + 0xFF8) = ExitStubAddr;
ffffffff800217c3:	48 8b 4d c0          	mov    -0x40(%rbp),%rcx
            stub[0] = 0x31; stub[1] = 0xFF;  // xor edi, edi  (exit code 0)
ffffffff800217c7:	41 c7 45 00 31 ff 31 	movl   $0xc031ff31,0x0(%r13)
ffffffff800217ce:	c0 
            stub[4] = 0x0F; stub[5] = 0x05;  // syscall
ffffffff800217cf:	66 41 89 55 04       	mov    %dx,0x4(%r13)
            *(uint64_t*)(topPage + 0xFF8) = ExitStubAddr;
ffffffff800217d4:	48 8b 05 cd b1 12 00 	mov    0x12b1cd(%rip),%rax        # ffffffff8014c9a8 <_ZN6Memory8HHDMBaseE>
ffffffff800217db:	48 c7 84 01 f8 0f 00 	movq   $0x3ff000,0xff8(%rcx,%rax,1)
ffffffff800217e2:	00 00 f0 3f 00 
        *(--sp) = 0;  // rbp
        *(--sp) = 0;  // rbx
        *(--sp) = 0;  // r12
        *(--sp) = 0;  // r13
        *(--sp) = 0;  // r14
        *(--sp) = 0;  // r15
ffffffff800217e7:	49 8d 4f c8          	lea    -0x38(%r15),%rcx
        *(--sp) = (uint64_t)ProcessStartup;  // return addr
ffffffff800217eb:	49 c7 47 f8 b0 20 02 	movq   $0xffffffff800220b0,-0x8(%r15)
ffffffff800217f2:	80 
        *(--sp) = 0;  // rbp
ffffffff800217f3:	49 c7 47 f0 00 00 00 	movq   $0x0,-0x10(%r15)
ffffffff800217fa:	00 
        *(--sp) = 0;  // rbx
ffffffff800217fb:	49 c7 47 e8 00 00 00 	movq   $0x0,-0x18(%r15)
ffffffff80021802:	00 
        *(--sp) = 0;  // r12
ffffffff80021803:	49 c7 47 e0 00 00 00 	movq   $0x0,-0x20(%r15)
ffffffff8002180a:	00 
        *(--sp) = 0;  // r13
ffffffff8002180b:	49 c7 47 d8 00 00 00 	movq   $0x0,-0x28(%r15)
ffffffff80021812:	00 
        *(--sp) = 0;  // r14
ffffffff80021813:	49 c7 47 d0 00 00 00 	movq   $0x0,-0x30(%r15)
ffffffff8002181a:	00 
        *(--sp) = 0;  // r15
ffffffff8002181b:	48 89 4d c0          	mov    %rcx,-0x40(%rbp)
ffffffff8002181f:	49 c7 47 c8 00 00 00 	movq   $0x0,-0x38(%r15)
ffffffff80021826:	00 
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff80021827:	9c                   	pushf
ffffffff80021828:	41 5d                	pop    %r13
ffffffff8002182a:	fa                   	cli
            inner.Acquire();
ffffffff8002182b:	48 c7 c7 30 74 17 80 	mov    $0xffffffff80177430,%rdi
ffffffff80021832:	e8 79 a8 fe ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>

        // Re-acquire lock to finalize process state
        g_schedLock.Acquire();

        Process& proc = processTable[slot];
        proc.pid = pid;
ffffffff80021837:	48 8d 04 9b          	lea    (%rbx,%rbx,4),%rax
            savedFlags = flags;
ffffffff8002183b:	4c 89 2d f6 5b 15 00 	mov    %r13,0x155bf6(%rip)        # ffffffff80177438 <_ZN5SchedL11g_schedLockE+0x8>
ffffffff80021842:	48 8b 4d c0          	mov    -0x40(%rbp),%rcx
ffffffff80021846:	4c 8d 2c 83          	lea    (%rbx,%rax,4),%r13
ffffffff8002184a:	8b 45 b4             	mov    -0x4c(%rbp),%eax
ffffffff8002184d:	49 c1 e5 06          	shl    $0x6,%r13
ffffffff80021851:	41 89 85 60 74 17 80 	mov    %eax,-0x7fe88ba0(%r13)
        proc.state = ProcessState::Ready;
ffffffff80021858:	31 c0                	xor    %eax,%eax
ffffffff8002185a:	41 c7 85 64 74 17 80 	movl   $0x1,-0x7fe88b9c(%r13)
ffffffff80021861:	01 00 00 00 
        {
            int i = 0;
            for (; i < 63 && vfsPath[i]; i++) proc.name[i] = vfsPath[i];
ffffffff80021865:	eb 2f                	jmp    ffffffff80021896 <_ZN5Sched5SpawnEPKcS1_+0x256>
ffffffff80021867:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8002186e:	00 00 00 00 
ffffffff80021872:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80021879:	00 00 00 00 
ffffffff8002187d:	0f 1f 00             	nopl   (%rax)
ffffffff80021880:	41 88 94 05 68 74 17 	mov    %dl,-0x7fe88b98(%r13,%rax,1)
ffffffff80021887:	80 
ffffffff80021888:	48 83 c0 01          	add    $0x1,%rax
ffffffff8002188c:	48 83 f8 3f          	cmp    $0x3f,%rax
ffffffff80021890:	0f 84 7a 01 00 00    	je     ffffffff80021a10 <_ZN5Sched5SpawnEPKcS1_+0x3d0>
ffffffff80021896:	41 0f b6 14 04       	movzbl (%r12,%rax,1),%edx
ffffffff8002189b:	84 d2                	test   %dl,%dl
ffffffff8002189d:	75 e1                	jne    ffffffff80021880 <_ZN5Sched5SpawnEPKcS1_+0x240>
            proc.name[i] = '\0';
ffffffff8002189f:	48 8d 14 9b          	lea    (%rbx,%rbx,4),%rdx
ffffffff800218a3:	48 98                	cltq
ffffffff800218a5:	48 8d 14 93          	lea    (%rbx,%rdx,4),%rdx
ffffffff800218a9:	48 c1 e2 06          	shl    $0x6,%rdx
ffffffff800218ad:	c6 84 10 68 74 17 80 	movb   $0x0,-0x7fe88b98(%rax,%rdx,1)
ffffffff800218b4:	00 
        }
        proc.savedRsp = (uint64_t)sp;
        proc.stackBase = (uint64_t)kernelStackBase;
ffffffff800218b5:	48 8b 45 b8          	mov    -0x48(%rbp),%rax
        proc.savedRsp = (uint64_t)sp;
ffffffff800218b9:	48 89 8a a8 74 17 80 	mov    %rcx,-0x7fe88b58(%rdx)
        proc.stackBase = (uint64_t)kernelStackBase;
ffffffff800218c0:	48 89 82 b0 74 17 80 	mov    %rax,-0x7fe88b50(%rdx)
        proc.entryPoint = entry;
ffffffff800218c7:	48 8b 45 a8          	mov    -0x58(%rbp),%rax
        proc.sliceRemaining = TimeSliceMs;
ffffffff800218cb:	48 c7 82 c0 74 17 80 	movq   $0xa,-0x7fe88b40(%rdx)
ffffffff800218d2:	0a 00 00 00 
        proc.entryPoint = entry;
ffffffff800218d6:	48 89 82 b8 74 17 80 	mov    %rax,-0x7fe88b48(%rdx)
        proc.pml4Phys = pml4Phys;
ffffffff800218dd:	48 8b 45 c8          	mov    -0x38(%rbp),%rax
        proc.kernelStackTop = kernelStackTop;
ffffffff800218e1:	4c 89 ba d0 74 17 80 	mov    %r15,-0x7fe88b30(%rdx)
        proc.pml4Phys = pml4Phys;
ffffffff800218e8:	48 89 82 c8 74 17 80 	mov    %rax,-0x7fe88b38(%rdx)
        proc.userStackTop = UserStackTop - 8;  // account for pushed exit stub return address
ffffffff800218ef:	48 b8 f8 ef ff ff 7f 	movabs $0x7fffffeff8,%rax
ffffffff800218f6:	00 00 00 
ffffffff800218f9:	48 89 82 d8 74 17 80 	mov    %rax,-0x7fe88b28(%rdx)
        proc.heapNext = UserHeapBase;
ffffffff80021900:	31 c0                	xor    %eax,%eax
ffffffff80021902:	48 c7 82 e0 74 17 80 	movq   $0x40000000,-0x7fe88b20(%rdx)
ffffffff80021909:	00 00 00 40 

        // Copy arguments string into process
        proc.args[0] = '\0';
ffffffff8002190d:	c6 82 e8 74 17 80 00 	movb   $0x0,-0x7fe88b18(%rdx)
        if (args != nullptr) {
ffffffff80021914:	4d 85 f6             	test   %r14,%r14
ffffffff80021917:	75 1f                	jne    ffffffff80021938 <_ZN5Sched5SpawnEPKcS1_+0x2f8>
ffffffff80021919:	eb 3c                	jmp    ffffffff80021957 <_ZN5Sched5SpawnEPKcS1_+0x317>
ffffffff8002191b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            int i = 0;
            for (; i < 255 && args[i]; i++) {
                proc.args[i] = args[i];
ffffffff80021920:	41 88 94 05 e8 74 17 	mov    %dl,-0x7fe88b18(%r13,%rax,1)
ffffffff80021927:	80 
            for (; i < 255 && args[i]; i++) {
ffffffff80021928:	48 83 c0 01          	add    $0x1,%rax
ffffffff8002192c:	48 3d ff 00 00 00    	cmp    $0xff,%rax
ffffffff80021932:	0f 84 9a 01 00 00    	je     ffffffff80021ad2 <_ZN5Sched5SpawnEPKcS1_+0x492>
ffffffff80021938:	41 0f b6 14 06       	movzbl (%r14,%rax,1),%edx
ffffffff8002193d:	84 d2                	test   %dl,%dl
ffffffff8002193f:	75 df                	jne    ffffffff80021920 <_ZN5Sched5SpawnEPKcS1_+0x2e0>
            }
            proc.args[i] = '\0';
ffffffff80021941:	48 8d 14 9b          	lea    (%rbx,%rbx,4),%rdx
ffffffff80021945:	48 98                	cltq
ffffffff80021947:	48 8d 14 93          	lea    (%rbx,%rdx,4),%rdx
ffffffff8002194b:	48 c1 e2 06          	shl    $0x6,%rdx
ffffffff8002194f:	c6 84 10 e8 74 17 80 	movb   $0x0,-0x7fe88b18(%rax,%rdx,1)
ffffffff80021956:	00 
        }

        proc.redirected = false;
ffffffff80021957:	48 8d 04 9b          	lea    (%rbx,%rbx,4),%rax
        proc.keyTail = 0;
        proc.termCols = 0;
        proc.termRows = 0;

        // Initialize FPU state: zero out, then set default FCW and MXCSR
        memset(proc.fpuState, 0, 512);
ffffffff8002195b:	49 8d bd a0 77 17 80 	lea    -0x7fe88860(%r13),%rdi
ffffffff80021962:	ba 00 02 00 00       	mov    $0x200,%edx
ffffffff80021967:	31 f6                	xor    %esi,%esi
        proc.redirected = false;
ffffffff80021969:	48 8d 1c 83          	lea    (%rbx,%rax,4),%rbx
ffffffff8002196d:	48 c1 e3 06          	shl    $0x6,%rbx
        proc.outHead = 0;
ffffffff80021971:	48 c7 83 f8 75 17 80 	movq   $0x0,-0x7fe88a08(%rbx)
ffffffff80021978:	00 00 00 00 
        proc.inHead = 0;
ffffffff8002197c:	48 c7 83 08 76 17 80 	movq   $0x0,-0x7fe889f8(%rbx)
ffffffff80021983:	00 00 00 00 
        proc.keyHead = 0;
ffffffff80021987:	48 c7 83 90 77 17 80 	movq   $0x0,-0x7fe88870(%rbx)
ffffffff8002198e:	00 00 00 00 
        proc.termCols = 0;
ffffffff80021992:	48 c7 83 98 77 17 80 	movq   $0x0,-0x7fe88868(%rbx)
ffffffff80021999:	00 00 00 00 
        proc.redirected = false;
ffffffff8002199d:	c6 83 e8 75 17 80 00 	movb   $0x0,-0x7fe88a18(%rbx)
        proc.parentPid = -1;
ffffffff800219a4:	c7 83 ec 75 17 80 ff 	movl   $0xffffffff,-0x7fe88a14(%rbx)
ffffffff800219ab:	ff ff ff 
        proc.outBuf = nullptr;
ffffffff800219ae:	48 c7 83 f0 75 17 80 	movq   $0x0,-0x7fe88a10(%rbx)
ffffffff800219b5:	00 00 00 00 
        proc.inBuf = nullptr;
ffffffff800219b9:	48 c7 83 00 76 17 80 	movq   $0x0,-0x7fe88a00(%rbx)
ffffffff800219c0:	00 00 00 00 
        memset(proc.fpuState, 0, 512);
ffffffff800219c4:	e8 57 88 ff ff       	call   ffffffff8001a220 <memset>
        *(uint16_t*)&proc.fpuState[0] = 0x037F;   // FCW: default x87 control word
ffffffff800219c9:	b8 7f 03 00 00       	mov    $0x37f,%eax
        *(uint32_t*)&proc.fpuState[24] = 0x1F80;   // MXCSR: default SSE control/status
ffffffff800219ce:	41 c7 85 b8 77 17 80 	movl   $0x1f80,-0x7fe88848(%r13)
ffffffff800219d5:	80 1f 00 00 
            inner.Release();
ffffffff800219d9:	48 c7 c7 30 74 17 80 	mov    $0xffffffff80177430,%rdi
        *(uint16_t*)&proc.fpuState[0] = 0x037F;   // FCW: default x87 control word
ffffffff800219e0:	66 41 89 85 a0 77 17 	mov    %ax,-0x7fe88860(%r13)
ffffffff800219e7:	80 
            uint64_t flags = savedFlags;
ffffffff800219e8:	4c 8b 25 49 5a 15 00 	mov    0x155a49(%rip),%r12        # ffffffff80177438 <_ZN5SchedL11g_schedLockE+0x8>
            inner.Release();
ffffffff800219ef:	e8 dc a6 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff800219f4:	41 54                	push   %r12
ffffffff800219f6:	9d                   	popf

        g_schedLock.Release();

        return proc.pid;
ffffffff800219f7:	8b 83 60 74 17 80    	mov    -0x7fe88ba0(%rbx),%eax
    }
ffffffff800219fd:	48 83 c4 38          	add    $0x38,%rsp
ffffffff80021a01:	5b                   	pop    %rbx
ffffffff80021a02:	41 5c                	pop    %r12
ffffffff80021a04:	41 5d                	pop    %r13
ffffffff80021a06:	41 5e                	pop    %r14
ffffffff80021a08:	41 5f                	pop    %r15
ffffffff80021a0a:	5d                   	pop    %rbp
ffffffff80021a0b:	c3                   	ret
ffffffff80021a0c:	0f 1f 40 00          	nopl   0x0(%rax)
ffffffff80021a10:	b8 3f 00 00 00       	mov    $0x3f,%eax
ffffffff80021a15:	e9 85 fe ff ff       	jmp    ffffffff8002189f <_ZN5Sched5SpawnEPKcS1_+0x25f>
ffffffff80021a1a:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
            Print(string);
ffffffff80021a20:	48 c7 c7 fd bf 02 80 	mov    $0xffffffff8002bffd,%rdi
            g_kernelLogDepth++;
ffffffff80021a27:	83 05 76 da 1b 00 01 	addl   $0x1,0x1bda76(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80021a2e:	e8 8d 17 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021a33:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80021a3a:	e8 81 17 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021a3f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80021a46:	e8 75 17 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021a4b:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80021a52:	e8 69 17 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021a57:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80021a5e:	e8 5d 17 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021a63:	48 c7 c7 24 c0 02 80 	mov    $0xffffffff8002c024,%rdi
ffffffff80021a6a:	e8 51 17 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021a6f:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80021a76:	e8 45 17 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80021a7b:	83 2d 22 da 1b 00 01 	subl   $0x1,0x1bda22(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff80021a82:	9c                   	pushf
ffffffff80021a83:	41 5c                	pop    %r12
ffffffff80021a85:	fa                   	cli
            inner.Acquire();
ffffffff80021a86:	48 c7 c7 30 74 17 80 	mov    $0xffffffff80177430,%rdi
ffffffff80021a8d:	e8 1e a6 fe ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
                processTable[slot].state = ProcessState::Free;
ffffffff80021a92:	48 8d 04 9b          	lea    (%rbx,%rbx,4),%rax
            inner.Release();
ffffffff80021a96:	48 c7 c7 30 74 17 80 	mov    $0xffffffff80177430,%rdi
            savedFlags = flags;
ffffffff80021a9d:	4c 89 25 94 59 15 00 	mov    %r12,0x155994(%rip)        # ffffffff80177438 <_ZN5SchedL11g_schedLockE+0x8>
ffffffff80021aa4:	48 8d 04 83          	lea    (%rbx,%rax,4),%rax
ffffffff80021aa8:	48 c1 e0 06          	shl    $0x6,%rax
ffffffff80021aac:	c7 80 64 74 17 80 00 	movl   $0x0,-0x7fe88b9c(%rax)
ffffffff80021ab3:	00 00 00 
            inner.Release();
ffffffff80021ab6:	e8 15 a6 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff80021abb:	41 54                	push   %r12
ffffffff80021abd:	9d                   	popf
    }
ffffffff80021abe:	48 83 c4 38          	add    $0x38,%rsp
            return -1;
ffffffff80021ac2:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
    }
ffffffff80021ac7:	5b                   	pop    %rbx
ffffffff80021ac8:	41 5c                	pop    %r12
ffffffff80021aca:	41 5d                	pop    %r13
ffffffff80021acc:	41 5e                	pop    %r14
ffffffff80021ace:	41 5f                	pop    %r15
ffffffff80021ad0:	5d                   	pop    %rbp
ffffffff80021ad1:	c3                   	ret
ffffffff80021ad2:	b8 ff 00 00 00       	mov    $0xff,%eax
ffffffff80021ad7:	e9 65 fe ff ff       	jmp    ffffffff80021941 <_ZN5Sched5SpawnEPKcS1_+0x301>
            Print(string);
ffffffff80021adc:	48 c7 c7 fd bf 02 80 	mov    $0xffffffff8002bffd,%rdi
            g_kernelLogDepth++;
ffffffff80021ae3:	83 05 ba d9 1b 00 01 	addl   $0x1,0x1bd9ba(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80021aea:	e8 d1 16 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021aef:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80021af6:	e8 c5 16 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021afb:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80021b02:	e8 b9 16 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021b07:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80021b0e:	e8 ad 16 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021b13:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80021b1a:	e8 a1 16 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021b1f:	48 c7 c7 38 d1 02 80 	mov    $0xffffffff8002d138,%rdi
ffffffff80021b26:	e8 95 16 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021b2b:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80021b32:	e8 89 16 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80021b37:	83 2d 66 d9 1b 00 01 	subl   $0x1,0x1bd966(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff80021b3e:	9c                   	pushf
ffffffff80021b3f:	5b                   	pop    %rbx
ffffffff80021b40:	fa                   	cli
            inner.Acquire();
ffffffff80021b41:	48 c7 c7 30 74 17 80 	mov    $0xffffffff80177430,%rdi
ffffffff80021b48:	e8 63 a5 fe ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
            inner.Release();
ffffffff80021b4d:	48 c7 c7 30 74 17 80 	mov    $0xffffffff80177430,%rdi
            savedFlags = flags;
ffffffff80021b54:	48 89 1d dd 58 15 00 	mov    %rbx,0x1558dd(%rip)        # ffffffff80177438 <_ZN5SchedL11g_schedLockE+0x8>
            processTable[slot].state = ProcessState::Free;
ffffffff80021b5b:	41 c7 47 04 00 00 00 	movl   $0x0,0x4(%r15)
ffffffff80021b62:	00 
            inner.Release();
ffffffff80021b63:	e8 68 a5 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff80021b68:	53                   	push   %rbx
ffffffff80021b69:	9d                   	popf
            return -1;
ffffffff80021b6a:	e9 4f ff ff ff       	jmp    ffffffff80021abe <_ZN5Sched5SpawnEPKcS1_+0x47e>
ffffffff80021b6f:	90                   	nop
            inner.Release();
ffffffff80021b70:	48 c7 c7 30 74 17 80 	mov    $0xffffffff80177430,%rdi
ffffffff80021b77:	e8 54 a5 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff80021b7c:	41 55                	push   %r13
ffffffff80021b7e:	9d                   	popf
            Print(string);
ffffffff80021b7f:	48 c7 c7 fd bf 02 80 	mov    $0xffffffff8002bffd,%rdi
            g_kernelLogDepth++;
ffffffff80021b86:	83 05 17 d9 1b 00 01 	addl   $0x1,0x1bd917(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80021b8d:	e8 2e 16 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021b92:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80021b99:	e8 22 16 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021b9e:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80021ba5:	e8 16 16 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021baa:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80021bb1:	e8 0a 16 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021bb6:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80021bbd:	e8 fe 15 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021bc2:	48 c7 c7 5d c0 02 80 	mov    $0xffffffff8002c05d,%rdi
ffffffff80021bc9:	e8 f2 15 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021bce:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80021bd5:	e8 e6 15 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80021bda:	83 2d c3 d8 1b 00 01 	subl   $0x1,0x1bd8c3(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            return -1;
ffffffff80021be1:	e9 d8 fe ff ff       	jmp    ffffffff80021abe <_ZN5Sched5SpawnEPKcS1_+0x47e>
            Print(string);
ffffffff80021be6:	48 c7 c7 fd bf 02 80 	mov    $0xffffffff8002bffd,%rdi
            g_kernelLogDepth++;
ffffffff80021bed:	83 05 b0 d8 1b 00 01 	addl   $0x1,0x1bd8b0(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80021bf4:	e8 c7 15 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021bf9:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80021c00:	e8 bb 15 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021c05:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80021c0c:	e8 af 15 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021c11:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80021c18:	e8 a3 15 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021c1d:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80021c24:	e8 97 15 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021c29:	48 c7 c7 41 c0 02 80 	mov    $0xffffffff8002c041,%rdi
ffffffff80021c30:	e9 35 fe ff ff       	jmp    ffffffff80021a6a <_ZN5Sched5SpawnEPKcS1_+0x42a>
ffffffff80021c35:	48 c7 c7 fd bf 02 80 	mov    $0xffffffff8002bffd,%rdi
            g_kernelLogDepth++;
ffffffff80021c3c:	83 05 61 d8 1b 00 01 	addl   $0x1,0x1bd861(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80021c43:	e8 78 15 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021c48:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80021c4f:	e8 6c 15 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021c54:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80021c5b:	e8 60 15 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021c60:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff80021c67:	e8 54 15 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021c6c:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80021c73:	e8 48 15 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021c78:	48 c7 c7 58 d1 02 80 	mov    $0xffffffff8002d158,%rdi
ffffffff80021c7f:	e8 3c 15 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80021c84:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80021c8b:	e8 30 15 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Memory::g_pfa->Free(firstPage);
ffffffff80021c90:	48 8b 3d 19 ad 12 00 	mov    0x12ad19(%rip),%rdi        # ffffffff8014c9b0 <_ZN6Memory5g_pfaE>
ffffffff80021c97:	4c 89 ee             	mov    %r13,%rsi
            g_kernelLogDepth--;
ffffffff80021c9a:	83 2d 03 d8 1b 00 01 	subl   $0x1,0x1bd803(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff80021ca1:	e8 6a 96 ff ff       	call   ffffffff8001b310 <_ZN6Memory18PageFrameAllocator4FreeEPv>
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff80021ca6:	e9 93 fe ff ff       	jmp    ffffffff80021b3e <_ZN5Sched5SpawnEPKcS1_+0x4fe>
ffffffff80021cab:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80021cb2:	00 00 00 
ffffffff80021cb5:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80021cbc:	00 00 00 
ffffffff80021cbf:	90                   	nop

ffffffff80021cc0 <_ZN5Sched8ScheduleEv>:

    void Schedule() {
ffffffff80021cc0:	55                   	push   %rbp
ffffffff80021cc1:	48 89 e5             	mov    %rsp,%rbp
ffffffff80021cc4:	53                   	push   %rbx
ffffffff80021cc5:	48 83 ec 08          	sub    $0x8,%rsp
ffffffff80021cc9:	9c                   	pushf
ffffffff80021cca:	5b                   	pop    %rbx
ffffffff80021ccb:	fa                   	cli
            inner.Acquire();
ffffffff80021ccc:	48 c7 c7 30 74 17 80 	mov    $0xffffffff80177430,%rdi
ffffffff80021cd3:	e8 d8 a3 fe ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
            savedFlags = flags;
ffffffff80021cd8:	48 89 1d 59 57 15 00 	mov    %rbx,0x155759(%rip)        # ffffffff80177438 <_ZN5SchedL11g_schedLockE+0x8>
        g_schedLock.Acquire();

        Smp::PerCpu* cpu = Smp::GetCurrentCpu();
ffffffff80021cdf:	e8 3c 09 00 00       	call   ffffffff80022620 <_ZN3Smp13GetCurrentCpuEv>
        int currentSlot = cpu->currentSlot;
ffffffff80021ce4:	4c 63 48 10          	movslq 0x10(%rax),%r9
        Smp::PerCpu* cpu = Smp::GetCurrentCpu();
ffffffff80021ce8:	49 89 c2             	mov    %rax,%r10

        // Reclaim terminated process slots so they can be reused
        for (int i = 0; i < MaxProcesses; i++) {
ffffffff80021ceb:	48 c7 c0 64 74 17 80 	mov    $0xffffffff80177464,%rax
ffffffff80021cf2:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80021cf9:	00 00 00 00 
ffffffff80021cfd:	0f 1f 00             	nopl   (%rax)
            if (processTable[i].state == ProcessState::Terminated) {
ffffffff80021d00:	83 38 03             	cmpl   $0x3,(%rax)
ffffffff80021d03:	75 06                	jne    ffffffff80021d0b <_ZN5Sched8ScheduleEv+0x4b>
                processTable[i].state = ProcessState::Free;
ffffffff80021d05:	c7 00 00 00 00 00    	movl   $0x0,(%rax)
        for (int i = 0; i < MaxProcesses; i++) {
ffffffff80021d0b:	48 05 40 05 00 00    	add    $0x540,%rax
ffffffff80021d11:	48 3d 64 b4 1c 80    	cmp    $0xffffffff801cb464,%rax
ffffffff80021d17:	75 e7                	jne    ffffffff80021d00 <_ZN5Sched8ScheduleEv+0x40>
            }
        }

        int next = -1;
        int start = (currentSlot >= 0) ? currentSlot + 1 : 0;
ffffffff80021d19:	45 85 c9             	test   %r9d,%r9d
ffffffff80021d1c:	be ff ff ff ff       	mov    $0xffffffff,%esi
ffffffff80021d21:	41 0f 49 f1          	cmovns %r9d,%esi
ffffffff80021d25:	8d 56 01             	lea    0x1(%rsi),%edx
ffffffff80021d28:	81 c6 01 01 00 00    	add    $0x101,%esi
ffffffff80021d2e:	eb 1b                	jmp    ffffffff80021d4b <_ZN5Sched8ScheduleEv+0x8b>
ffffffff80021d30:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80021d37:	00 00 00 00 
ffffffff80021d3b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

        for (int i = 0; i < MaxProcesses; i++) {
ffffffff80021d40:	83 c2 01             	add    $0x1,%edx
ffffffff80021d43:	39 f2                	cmp    %esi,%edx
ffffffff80021d45:	0f 84 e0 00 00 00    	je     ffffffff80021e2b <_ZN5Sched8ScheduleEv+0x16b>
            int idx = (start + i) % MaxProcesses;
            if (processTable[idx].state == ProcessState::Ready) {
ffffffff80021d4b:	0f b6 ca             	movzbl %dl,%ecx
            int idx = (start + i) % MaxProcesses;
ffffffff80021d4e:	44 0f b6 c2          	movzbl %dl,%r8d
            if (processTable[idx].state == ProcessState::Ready) {
ffffffff80021d52:	48 8d 04 89          	lea    (%rcx,%rcx,4),%rax
ffffffff80021d56:	48 8d 04 81          	lea    (%rcx,%rax,4),%rax
ffffffff80021d5a:	48 c1 e0 06          	shl    $0x6,%rax
ffffffff80021d5e:	83 b8 64 74 17 80 01 	cmpl   $0x1,-0x7fe88b9c(%rax)
ffffffff80021d65:	48 8d b8 60 74 17 80 	lea    -0x7fe88ba0(%rax),%rdi
ffffffff80021d6c:	75 d2                	jne    ffffffff80021d40 <_ZN5Sched8ScheduleEv+0x80>
            }
            g_schedLock.Release();
            return;
        }

        if (next == currentSlot) {
ffffffff80021d6e:	45 39 c1             	cmp    %r8d,%r9d
ffffffff80021d71:	0f 84 eb 00 00 00    	je     ffffffff80021e62 <_ZN5Sched8ScheduleEv+0x1a2>
            return;
        }

        uint64_t* oldRspPtr;

        if (currentSlot >= 0) {
ffffffff80021d77:	45 85 c9             	test   %r9d,%r9d
ffffffff80021d7a:	0f 88 88 00 00 00    	js     ffffffff80021e08 <_ZN5Sched8ScheduleEv+0x148>
            processTable[currentSlot].state = ProcessState::Ready;
ffffffff80021d80:	4b 8d 04 89          	lea    (%r9,%r9,4),%rax

        cpu->currentSlot = next;
        processTable[next].state = ProcessState::Running;
        processTable[next].sliceRemaining = TimeSliceMs;

        uint64_t newCR3 = processTable[next].pml4Phys;
ffffffff80021d84:	4c 8b 5f 68          	mov    0x68(%rdi),%r11

        // Update per-CPU kernel RSP for SYSCALL entry
        cpu->kernelRsp = processTable[next].kernelStackTop;
ffffffff80021d88:	48 8b 57 70          	mov    0x70(%rdi),%rdx
            processTable[currentSlot].state = ProcessState::Ready;
ffffffff80021d8c:	49 8d 04 81          	lea    (%r9,%rax,4),%rax
ffffffff80021d90:	48 c1 e0 06          	shl    $0x6,%rax
ffffffff80021d94:	c7 80 64 74 17 80 01 	movl   $0x1,-0x7fe88b9c(%rax)
ffffffff80021d9b:	00 00 00 
            oldRspPtr = &processTable[currentSlot].savedRsp;
ffffffff80021d9e:	4c 8d 88 a8 74 17 80 	lea    -0x7fe88b58(%rax),%r9

        // Update per-CPU TSS RSP0 for hardware interrupts from ring 3
        cpu->tss.rsp0 = processTable[next].kernelStackTop;

        uint8_t* oldFpu = (currentSlot >= 0) ? processTable[currentSlot].fpuState : nullptr;
ffffffff80021da5:	48 05 a0 77 17 80    	add    $0xffffffff801777a0,%rax
        cpu->currentSlot = next;
ffffffff80021dab:	45 89 42 10          	mov    %r8d,0x10(%r10)
        processTable[next].state = ProcessState::Running;
ffffffff80021daf:	c7 47 04 02 00 00 00 	movl   $0x2,0x4(%rdi)
        processTable[next].sliceRemaining = TimeSliceMs;
ffffffff80021db6:	48 c7 47 60 0a 00 00 	movq   $0xa,0x60(%rdi)
ffffffff80021dbd:	00 
        cpu->kernelRsp = processTable[next].kernelStackTop;
ffffffff80021dbe:	49 89 12             	mov    %rdx,(%r10)

        // Lock handoff: we do NOT release the lock here.
        // The lock will be released when the destination process resumes
        // (either returning here from a previous Schedule() call, or in
        // ProcessStartup() for newly spawned processes).
        SchedContextSwitch(oldRspPtr, processTable[next].savedRsp, newCR3, oldFpu, newFpu);
ffffffff80021dc1:	4c 89 cf             	mov    %r9,%rdi
        cpu->tss.rsp0 = processTable[next].kernelStackTop;
ffffffff80021dc4:	49 89 52 60          	mov    %rdx,0x60(%r10)
        uint8_t* newFpu = processTable[next].fpuState;
ffffffff80021dc8:	48 8d 14 89          	lea    (%rcx,%rcx,4),%rdx
ffffffff80021dcc:	48 8d 14 91          	lea    (%rcx,%rdx,4),%rdx
        SchedContextSwitch(oldRspPtr, processTable[next].savedRsp, newCR3, oldFpu, newFpu);
ffffffff80021dd0:	48 89 c1             	mov    %rax,%rcx
        uint8_t* newFpu = processTable[next].fpuState;
ffffffff80021dd3:	48 c1 e2 06          	shl    $0x6,%rdx
        SchedContextSwitch(oldRspPtr, processTable[next].savedRsp, newCR3, oldFpu, newFpu);
ffffffff80021dd7:	48 8b b2 a8 74 17 80 	mov    -0x7fe88b58(%rdx),%rsi
ffffffff80021dde:	4c 8d 82 a0 77 17 80 	lea    -0x7fe88860(%rdx),%r8
ffffffff80021de5:	4c 89 da             	mov    %r11,%rdx
ffffffff80021de8:	e8 f3 21 00 00       	call   ffffffff80023fe0 <SchedContextSwitch>
            inner.Release();
ffffffff80021ded:	48 c7 c7 30 74 17 80 	mov    $0xffffffff80177430,%rdi
            uint64_t flags = savedFlags;
ffffffff80021df4:	48 8b 1d 3d 56 15 00 	mov    0x15563d(%rip),%rbx        # ffffffff80177438 <_ZN5SchedL11g_schedLockE+0x8>
            inner.Release();
ffffffff80021dfb:	e8 d0 a2 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff80021e00:	53                   	push   %rbx
ffffffff80021e01:	9d                   	popf

        // We return here when THIS process is re-scheduled later by some CPU.
        // That CPU was holding the lock — release it now.
        g_schedLock.Release();
    }
ffffffff80021e02:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff80021e06:	c9                   	leave
ffffffff80021e07:	c3                   	ret
        cpu->currentSlot = next;
ffffffff80021e08:	45 89 42 10          	mov    %r8d,0x10(%r10)
        uint64_t newCR3 = processTable[next].pml4Phys;
ffffffff80021e0c:	4c 8b 5f 68          	mov    0x68(%rdi),%r11
            oldRspPtr = &cpu->idleSavedRsp;
ffffffff80021e10:	4d 8d 4a 18          	lea    0x18(%r10),%r9
        uint8_t* oldFpu = (currentSlot >= 0) ? processTable[currentSlot].fpuState : nullptr;
ffffffff80021e14:	31 c0                	xor    %eax,%eax
        processTable[next].state = ProcessState::Running;
ffffffff80021e16:	c7 47 04 02 00 00 00 	movl   $0x2,0x4(%rdi)
        cpu->kernelRsp = processTable[next].kernelStackTop;
ffffffff80021e1d:	48 8b 57 70          	mov    0x70(%rdi),%rdx
        processTable[next].sliceRemaining = TimeSliceMs;
ffffffff80021e21:	48 c7 47 60 0a 00 00 	movq   $0xa,0x60(%rdi)
ffffffff80021e28:	00 
        uint8_t* oldFpu = (currentSlot >= 0) ? processTable[currentSlot].fpuState : nullptr;
ffffffff80021e29:	eb 93                	jmp    ffffffff80021dbe <_ZN5Sched8ScheduleEv+0xfe>
            if (currentSlot >= 0) {
ffffffff80021e2b:	45 85 c9             	test   %r9d,%r9d
ffffffff80021e2e:	78 17                	js     ffffffff80021e47 <_ZN5Sched8ScheduleEv+0x187>
                processTable[currentSlot].sliceRemaining = TimeSliceMs;
ffffffff80021e30:	4b 8d 04 89          	lea    (%r9,%r9,4),%rax
ffffffff80021e34:	49 8d 04 81          	lea    (%r9,%rax,4),%rax
ffffffff80021e38:	48 c1 e0 06          	shl    $0x6,%rax
ffffffff80021e3c:	48 c7 80 c0 74 17 80 	movq   $0xa,-0x7fe88b40(%rax)
ffffffff80021e43:	0a 00 00 00 
            inner.Release();
ffffffff80021e47:	48 c7 c7 30 74 17 80 	mov    $0xffffffff80177430,%rdi
            uint64_t flags = savedFlags;
ffffffff80021e4e:	48 8b 1d e3 55 15 00 	mov    0x1555e3(%rip),%rbx        # ffffffff80177438 <_ZN5SchedL11g_schedLockE+0x8>
            inner.Release();
ffffffff80021e55:	e8 76 a2 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff80021e5a:	53                   	push   %rbx
ffffffff80021e5b:	9d                   	popf
    }
ffffffff80021e5c:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff80021e60:	c9                   	leave
ffffffff80021e61:	c3                   	ret
            processTable[currentSlot].sliceRemaining = TimeSliceMs;
ffffffff80021e62:	48 c7 47 60 0a 00 00 	movq   $0xa,0x60(%rdi)
ffffffff80021e69:	00 
ffffffff80021e6a:	eb db                	jmp    ffffffff80021e47 <_ZN5Sched8ScheduleEv+0x187>
ffffffff80021e6c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff80021e70 <_ZN5Sched4TickEv>:

    void Tick() {
ffffffff80021e70:	55                   	push   %rbp
ffffffff80021e71:	48 89 e5             	mov    %rsp,%rbp
        Smp::PerCpu* cpu = Smp::GetCurrentCpu();
ffffffff80021e74:	e8 a7 07 00 00       	call   ffffffff80022620 <_ZN3Smp13GetCurrentCpuEv>
        int currentSlot = cpu->currentSlot;
ffffffff80021e79:	48 63 40 10          	movslq 0x10(%rax),%rax

        if (currentSlot < 0) {
ffffffff80021e7d:	85 c0                	test   %eax,%eax
ffffffff80021e7f:	78 2f                	js     ffffffff80021eb0 <_ZN5Sched4TickEv+0x40>
            // Idle — check if any process became ready
            Schedule();
            return;
        }

        if (processTable[currentSlot].sliceRemaining > 0) {
ffffffff80021e81:	48 8d 14 80          	lea    (%rax,%rax,4),%rdx
ffffffff80021e85:	48 8d 04 90          	lea    (%rax,%rdx,4),%rax
ffffffff80021e89:	48 c1 e0 06          	shl    $0x6,%rax
ffffffff80021e8d:	48 8b 90 c0 74 17 80 	mov    -0x7fe88b40(%rax),%rdx
ffffffff80021e94:	48 05 60 74 17 80    	add    $0xffffffff80177460,%rax
ffffffff80021e9a:	48 85 d2             	test   %rdx,%rdx
ffffffff80021e9d:	74 11                	je     ffffffff80021eb0 <_ZN5Sched4TickEv+0x40>
            processTable[currentSlot].sliceRemaining--;
ffffffff80021e9f:	48 83 ea 01          	sub    $0x1,%rdx
ffffffff80021ea3:	48 89 50 60          	mov    %rdx,0x60(%rax)
        }

        if (processTable[currentSlot].sliceRemaining == 0) {
ffffffff80021ea7:	74 07                	je     ffffffff80021eb0 <_ZN5Sched4TickEv+0x40>
            Schedule();
        }
    }
ffffffff80021ea9:	5d                   	pop    %rbp
ffffffff80021eaa:	c3                   	ret
ffffffff80021eab:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff80021eb0:	5d                   	pop    %rbp
            Schedule();
ffffffff80021eb1:	e9 0a fe ff ff       	jmp    ffffffff80021cc0 <_ZN5Sched8ScheduleEv>
ffffffff80021eb6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80021ebd:	00 00 00 

ffffffff80021ec0 <_ZN5Sched13GetCurrentPidEv>:

    int GetCurrentPid() {
ffffffff80021ec0:	55                   	push   %rbp
ffffffff80021ec1:	48 89 e5             	mov    %rsp,%rbp
        Smp::PerCpu* cpu = Smp::GetCurrentCpu();
ffffffff80021ec4:	e8 57 07 00 00       	call   ffffffff80022620 <_ZN3Smp13GetCurrentCpuEv>
        if (cpu->currentSlot < 0) return -1;
ffffffff80021ec9:	48 63 40 10          	movslq 0x10(%rax),%rax
ffffffff80021ecd:	85 c0                	test   %eax,%eax
ffffffff80021ecf:	78 14                	js     ffffffff80021ee5 <_ZN5Sched13GetCurrentPidEv+0x25>
        return processTable[cpu->currentSlot].pid;
ffffffff80021ed1:	48 8d 14 80          	lea    (%rax,%rax,4),%rdx
    }
ffffffff80021ed5:	5d                   	pop    %rbp
        return processTable[cpu->currentSlot].pid;
ffffffff80021ed6:	48 8d 04 90          	lea    (%rax,%rdx,4),%rax
ffffffff80021eda:	48 c1 e0 06          	shl    $0x6,%rax
ffffffff80021ede:	8b 80 60 74 17 80    	mov    -0x7fe88ba0(%rax),%eax
    }
ffffffff80021ee4:	c3                   	ret
        if (cpu->currentSlot < 0) return -1;
ffffffff80021ee5:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
    }
ffffffff80021eea:	5d                   	pop    %rbp
ffffffff80021eeb:	c3                   	ret
ffffffff80021eec:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff80021ef0 <_ZN5Sched20GetCurrentProcessPtrEv>:

    Process* GetCurrentProcessPtr() {
ffffffff80021ef0:	55                   	push   %rbp
ffffffff80021ef1:	48 89 e5             	mov    %rsp,%rbp
        Smp::PerCpu* cpu = Smp::GetCurrentCpu();
ffffffff80021ef4:	e8 27 07 00 00       	call   ffffffff80022620 <_ZN3Smp13GetCurrentCpuEv>
        if (cpu->currentSlot < 0) return nullptr;
ffffffff80021ef9:	48 63 40 10          	movslq 0x10(%rax),%rax
ffffffff80021efd:	85 c0                	test   %eax,%eax
ffffffff80021eff:	78 17                	js     ffffffff80021f18 <_ZN5Sched20GetCurrentProcessPtrEv+0x28>
        return &processTable[cpu->currentSlot];
ffffffff80021f01:	48 8d 14 80          	lea    (%rax,%rax,4),%rdx
    }
ffffffff80021f05:	5d                   	pop    %rbp
        return &processTable[cpu->currentSlot];
ffffffff80021f06:	48 8d 04 90          	lea    (%rax,%rdx,4),%rax
ffffffff80021f0a:	48 c1 e0 06          	shl    $0x6,%rax
ffffffff80021f0e:	48 05 60 74 17 80    	add    $0xffffffff80177460,%rax
    }
ffffffff80021f14:	c3                   	ret
ffffffff80021f15:	0f 1f 00             	nopl   (%rax)
        if (cpu->currentSlot < 0) return nullptr;
ffffffff80021f18:	31 c0                	xor    %eax,%eax
    }
ffffffff80021f1a:	5d                   	pop    %rbp
ffffffff80021f1b:	c3                   	ret
ffffffff80021f1c:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff80021f20 <_ZN5Sched11ExitProcessEv>:

    void ExitProcess() {
ffffffff80021f20:	55                   	push   %rbp
ffffffff80021f21:	48 89 e5             	mov    %rsp,%rbp
ffffffff80021f24:	41 55                	push   %r13
ffffffff80021f26:	41 54                	push   %r12
ffffffff80021f28:	53                   	push   %rbx
ffffffff80021f29:	48 83 ec 08          	sub    $0x8,%rsp
            asm volatile("pushfq; pop %0; cli" : "=r"(flags) :: "memory");
ffffffff80021f2d:	9c                   	pushf
ffffffff80021f2e:	5b                   	pop    %rbx
ffffffff80021f2f:	fa                   	cli
            inner.Acquire();
ffffffff80021f30:	48 c7 c7 30 74 17 80 	mov    $0xffffffff80177430,%rdi
ffffffff80021f37:	e8 74 a1 fe ff       	call   ffffffff8000c0b0 <_ZN3kcp8Spinlock7AcquireEv>
            savedFlags = flags;
ffffffff80021f3c:	48 89 1d f5 54 15 00 	mov    %rbx,0x1554f5(%rip)        # ffffffff80177438 <_ZN5SchedL11g_schedLockE+0x8>
        g_schedLock.Acquire();

        Smp::PerCpu* cpu = Smp::GetCurrentCpu();
ffffffff80021f43:	e8 d8 06 00 00       	call   ffffffff80022620 <_ZN3Smp13GetCurrentCpuEv>
        int currentSlot = cpu->currentSlot;
ffffffff80021f48:	48 63 58 10          	movslq 0x10(%rax),%rbx

        if (currentSlot < 0) {
ffffffff80021f4c:	85 db                	test   %ebx,%ebx
ffffffff80021f4e:	0f 88 ff 00 00 00    	js     ffffffff80022053 <_ZN5Sched11ExitProcessEv+0x133>
ffffffff80021f54:	49 89 c4             	mov    %rax,%r12
            g_schedLock.Release();
            return;
        }

        // Clean up any windows owned by this process
        WinServer::CleanupProcess(processTable[currentSlot].pid);
ffffffff80021f57:	48 8d 04 9b          	lea    (%rbx,%rbx,4),%rax
ffffffff80021f5b:	4c 8d 2c 83          	lea    (%rbx,%rax,4),%r13
ffffffff80021f5f:	49 c1 e5 06          	shl    $0x6,%r13
ffffffff80021f63:	41 8b bd 60 74 17 80 	mov    -0x7fe88ba0(%r13),%edi
ffffffff80021f6a:	e8 41 8d fe ff       	call   ffffffff8000acb0 <_ZN9WinServer14CleanupProcessEi>

        processTable[currentSlot].state = ProcessState::Terminated;
ffffffff80021f6f:	48 c7 c2 64 74 17 80 	mov    $0xffffffff80177464,%rdx

        int next = -1;
        for (int i = 0; i < MaxProcesses; i++) {
ffffffff80021f76:	31 c0                	xor    %eax,%eax
        processTable[currentSlot].state = ProcessState::Terminated;
ffffffff80021f78:	41 c7 85 64 74 17 80 	movl   $0x3,-0x7fe88b9c(%r13)
ffffffff80021f7f:	03 00 00 00 
        for (int i = 0; i < MaxProcesses; i++) {
ffffffff80021f83:	eb 30                	jmp    ffffffff80021fb5 <_ZN5Sched11ExitProcessEv+0x95>
ffffffff80021f85:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80021f8c:	00 00 00 00 
ffffffff80021f90:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80021f97:	00 00 00 00 
ffffffff80021f9b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
ffffffff80021fa0:	83 c0 01             	add    $0x1,%eax
ffffffff80021fa3:	48 81 c2 40 05 00 00 	add    $0x540,%rdx
ffffffff80021faa:	3d 00 01 00 00       	cmp    $0x100,%eax
ffffffff80021faf:	0f 84 be 00 00 00    	je     ffffffff80022073 <_ZN5Sched11ExitProcessEv+0x153>
            if (processTable[i].state == ProcessState::Ready) {
ffffffff80021fb5:	83 3a 01             	cmpl   $0x1,(%rdx)
ffffffff80021fb8:	75 e6                	jne    ffffffff80021fa0 <_ZN5Sched11ExitProcessEv+0x80>
            }
        }

        if (next >= 0) {
            int old = currentSlot;
            cpu->currentSlot = next;
ffffffff80021fba:	41 89 44 24 10       	mov    %eax,0x10(%r12)
            processTable[next].state = ProcessState::Running;
ffffffff80021fbf:	48 98                	cltq
ffffffff80021fc1:	48 8d 14 9b          	lea    (%rbx,%rbx,4),%rdx
ffffffff80021fc5:	48 8d 0c 80          	lea    (%rax,%rax,4),%rcx
ffffffff80021fc9:	48 8d 14 93          	lea    (%rbx,%rdx,4),%rdx
ffffffff80021fcd:	48 8d 0c 88          	lea    (%rax,%rcx,4),%rcx
ffffffff80021fd1:	48 c1 e2 06          	shl    $0x6,%rdx
ffffffff80021fd5:	48 c1 e1 06          	shl    $0x6,%rcx
            cpu->kernelRsp = processTable[next].kernelStackTop;
            cpu->tss.rsp0 = processTable[next].kernelStackTop;

            // Lock handoff — released by destination process
            SchedContextSwitch(&processTable[old].savedRsp, processTable[next].savedRsp, newCR3,
                              processTable[old].fpuState, processTable[next].fpuState);
ffffffff80021fd9:	4c 8d 92 a0 77 17 80 	lea    -0x7fe88860(%rdx),%r10
            SchedContextSwitch(&processTable[old].savedRsp, processTable[next].savedRsp, newCR3,
ffffffff80021fe0:	48 8d ba a8 74 17 80 	lea    -0x7fe88b58(%rdx),%rdi
            uint64_t newCR3 = processTable[next].pml4Phys;
ffffffff80021fe7:	4c 8b 89 c8 74 17 80 	mov    -0x7fe88b38(%rcx),%r9
            cpu->kernelRsp = processTable[next].kernelStackTop;
ffffffff80021fee:	48 8b b1 d0 74 17 80 	mov    -0x7fe88b30(%rcx),%rsi
            processTable[next].state = ProcessState::Running;
ffffffff80021ff5:	c7 81 64 74 17 80 02 	movl   $0x2,-0x7fe88b9c(%rcx)
ffffffff80021ffc:	00 00 00 
            SchedContextSwitch(&processTable[old].savedRsp, processTable[next].savedRsp, newCR3,
ffffffff80021fff:	4c 8d 81 a0 77 17 80 	lea    -0x7fe88860(%rcx),%r8
            processTable[next].sliceRemaining = TimeSliceMs;
ffffffff80022006:	48 c7 81 c0 74 17 80 	movq   $0xa,-0x7fe88b40(%rcx)
ffffffff8002200d:	0a 00 00 00 
            SchedContextSwitch(&processTable[old].savedRsp, processTable[next].savedRsp, newCR3,
ffffffff80022011:	4c 89 ca             	mov    %r9,%rdx
            cpu->kernelRsp = processTable[next].kernelStackTop;
ffffffff80022014:	49 89 34 24          	mov    %rsi,(%r12)
            cpu->tss.rsp0 = processTable[next].kernelStackTop;
ffffffff80022018:	49 89 74 24 60       	mov    %rsi,0x60(%r12)
            SchedContextSwitch(&processTable[old].savedRsp, processTable[next].savedRsp, newCR3,
ffffffff8002201d:	48 8b b1 a8 74 17 80 	mov    -0x7fe88b58(%rcx),%rsi
ffffffff80022024:	4c 89 d1             	mov    %r10,%rcx
        } else {
            int old = currentSlot;
            cpu->currentSlot = -1;

            // Lock handoff — released by destination (idle loop resumes in Schedule)
            SchedContextSwitch(&processTable[old].savedRsp, cpu->idleSavedRsp, GetKernelCR3(),
ffffffff80022027:	e8 b4 1f 00 00       	call   ffffffff80023fe0 <SchedContextSwitch>
            inner.Release();
ffffffff8002202c:	48 c7 c7 30 74 17 80 	mov    $0xffffffff80177430,%rdi
            uint64_t flags = savedFlags;
ffffffff80022033:	48 8b 1d fe 53 15 00 	mov    0x1553fe(%rip),%rbx        # ffffffff80177438 <_ZN5SchedL11g_schedLockE+0x8>
            inner.Release();
ffffffff8002203a:	e8 91 a0 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff8002203f:	53                   	push   %rbx
ffffffff80022040:	9d                   	popf
ffffffff80022041:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80022048:	00 00 00 00 
ffffffff8002204c:	0f 1f 40 00          	nopl   0x0(%rax)
            // We return here when re-scheduled
            g_schedLock.Release();
        }

        for (;;) {
            asm volatile("hlt");
ffffffff80022050:	f4                   	hlt
        for (;;) {
ffffffff80022051:	eb fd                	jmp    ffffffff80022050 <_ZN5Sched11ExitProcessEv+0x130>
            inner.Release();
ffffffff80022053:	48 c7 c7 30 74 17 80 	mov    $0xffffffff80177430,%rdi
            uint64_t flags = savedFlags;
ffffffff8002205a:	48 8b 1d d7 53 15 00 	mov    0x1553d7(%rip),%rbx        # ffffffff80177438 <_ZN5SchedL11g_schedLockE+0x8>
            inner.Release();
ffffffff80022061:	e8 6a a0 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff80022066:	53                   	push   %rbx
ffffffff80022067:	9d                   	popf
        }
    }
ffffffff80022068:	48 83 c4 08          	add    $0x8,%rsp
ffffffff8002206c:	5b                   	pop    %rbx
ffffffff8002206d:	41 5c                	pop    %r12
ffffffff8002206f:	41 5d                	pop    %r13
ffffffff80022071:	5d                   	pop    %rbp
ffffffff80022072:	c3                   	ret
        if (next >= 0) {
ffffffff80022073:	48 8d 04 9b          	lea    (%rbx,%rbx,4),%rax
        return (uint64_t)Memory::VMM::g_paging->PML4;
ffffffff80022077:	48 8b 15 42 a9 12 00 	mov    0x12a942(%rip),%rdx        # ffffffff8014c9c0 <_ZN6Memory3VMM8g_pagingE>
            SchedContextSwitch(&processTable[old].savedRsp, cpu->idleSavedRsp, GetKernelCR3(),
ffffffff8002207e:	49 8b 74 24 18       	mov    0x18(%r12),%rsi
ffffffff80022083:	45 31 c0             	xor    %r8d,%r8d
            cpu->currentSlot = -1;
ffffffff80022086:	41 c7 44 24 10 ff ff 	movl   $0xffffffff,0x10(%r12)
ffffffff8002208d:	ff ff 
ffffffff8002208f:	48 8d 04 83          	lea    (%rbx,%rax,4),%rax
ffffffff80022093:	48 c1 e0 06          	shl    $0x6,%rax
            SchedContextSwitch(&processTable[old].savedRsp, cpu->idleSavedRsp, GetKernelCR3(),
ffffffff80022097:	48 8b 12             	mov    (%rdx),%rdx
                              processTable[old].fpuState, processTable[next].fpuState);
ffffffff8002209a:	48 8d 88 a0 77 17 80 	lea    -0x7fe88860(%rax),%rcx
            SchedContextSwitch(&processTable[old].savedRsp, processTable[next].savedRsp, newCR3,
ffffffff800220a1:	48 8d b8 a8 74 17 80 	lea    -0x7fe88b58(%rax),%rdi
ffffffff800220a8:	e9 7a ff ff ff       	jmp    ffffffff80022027 <_ZN5Sched11ExitProcessEv+0x107>
ffffffff800220ad:	0f 1f 00             	nopl   (%rax)

ffffffff800220b0 <_ZN5SchedL14ProcessStartupEv>:
    static void ProcessStartup() {
ffffffff800220b0:	55                   	push   %rbp
            inner.Release();
ffffffff800220b1:	48 c7 c7 30 74 17 80 	mov    $0xffffffff80177430,%rdi
ffffffff800220b8:	48 89 e5             	mov    %rsp,%rbp
ffffffff800220bb:	53                   	push   %rbx
ffffffff800220bc:	48 83 ec 08          	sub    $0x8,%rsp
            uint64_t flags = savedFlags;
ffffffff800220c0:	48 8b 1d 71 53 15 00 	mov    0x155371(%rip),%rbx        # ffffffff80177438 <_ZN5SchedL11g_schedLockE+0x8>
            inner.Release();
ffffffff800220c7:	e8 04 a0 fe ff       	call   ffffffff8000c0d0 <_ZN3kcp8Spinlock7ReleaseEv>
            asm volatile("push %0; popfq" :: "r"(flags) : "memory");
ffffffff800220cc:	53                   	push   %rbx
ffffffff800220cd:	9d                   	popf
        Smp::PerCpu* cpu = Smp::GetCurrentCpu();
ffffffff800220ce:	e8 4d 05 00 00       	call   ffffffff80022620 <_ZN3Smp13GetCurrentCpuEv>
        if (cpu->currentSlot >= 0) {
ffffffff800220d3:	48 63 50 10          	movslq 0x10(%rax),%rdx
ffffffff800220d7:	85 d2                	test   %edx,%edx
ffffffff800220d9:	78 28                	js     ffffffff80022103 <_ZN5SchedL14ProcessStartupEv+0x53>
            cpu->kernelRsp = proc.kernelStackTop;
ffffffff800220db:	48 69 d2 40 05 00 00 	imul   $0x540,%rdx,%rdx
ffffffff800220e2:	48 8b 8a d0 74 17 80 	mov    -0x7fe88b30(%rdx),%rcx
ffffffff800220e9:	48 89 08             	mov    %rcx,(%rax)
            cpu->tss.rsp0 = proc.kernelStackTop;
ffffffff800220ec:	48 89 48 60          	mov    %rcx,0x60(%rax)
            JumpToUserMode(proc.entryPoint, proc.userStackTop);
ffffffff800220f0:	48 8b b2 d8 74 17 80 	mov    -0x7fe88b28(%rdx),%rsi
ffffffff800220f7:	48 8b ba b8 74 17 80 	mov    -0x7fe88b48(%rdx),%rdi
ffffffff800220fe:	e8 b3 1e 00 00       	call   ffffffff80023fb6 <JumpToUserMode>
        ExitProcess();
ffffffff80022103:	e8 18 fe ff ff       	call   ffffffff80021f20 <_ZN5Sched11ExitProcessEv>
ffffffff80022108:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8002210f:	00 
            asm volatile("hlt");
ffffffff80022110:	f4                   	hlt
        for (;;) {
ffffffff80022111:	eb fd                	jmp    ffffffff80022110 <_ZN5SchedL14ProcessStartupEv+0x60>
ffffffff80022113:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8002211a:	00 00 00 
ffffffff8002211d:	0f 1f 00             	nopl   (%rax)

ffffffff80022120 <_ZN5Sched7IsAliveEi>:

    bool IsAlive(int pid) {
        for (int i = 0; i < MaxProcesses; i++) {
ffffffff80022120:	48 c7 c2 60 74 17 80 	mov    $0xffffffff80177460,%rdx
ffffffff80022127:	31 c0                	xor    %eax,%eax
ffffffff80022129:	eb 26                	jmp    ffffffff80022151 <_ZN5Sched7IsAliveEi+0x31>
ffffffff8002212b:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80022132:	00 00 00 00 
ffffffff80022136:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8002213d:	00 00 00 
ffffffff80022140:	83 c0 01             	add    $0x1,%eax
ffffffff80022143:	48 81 c2 40 05 00 00 	add    $0x540,%rdx
ffffffff8002214a:	3d 00 01 00 00       	cmp    $0x100,%eax
ffffffff8002214f:	74 27                	je     ffffffff80022178 <_ZN5Sched7IsAliveEi+0x58>
            if (processTable[i].pid == pid) {
ffffffff80022151:	39 3a                	cmp    %edi,(%rdx)
ffffffff80022153:	75 eb                	jne    ffffffff80022140 <_ZN5Sched7IsAliveEi+0x20>
                return processTable[i].state == ProcessState::Ready
ffffffff80022155:	48 98                	cltq
ffffffff80022157:	48 8d 14 80          	lea    (%rax,%rax,4),%rdx
ffffffff8002215b:	48 8d 04 90          	lea    (%rax,%rdx,4),%rax
ffffffff8002215f:	48 c1 e0 06          	shl    $0x6,%rax
                    || processTable[i].state == ProcessState::Running;
ffffffff80022163:	8b 80 64 74 17 80    	mov    -0x7fe88b9c(%rax),%eax
ffffffff80022169:	83 e8 01             	sub    $0x1,%eax
ffffffff8002216c:	83 f8 01             	cmp    $0x1,%eax
ffffffff8002216f:	0f 96 c0             	setbe  %al
ffffffff80022172:	c3                   	ret
ffffffff80022173:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            }
        }
        return false;
ffffffff80022178:	31 c0                	xor    %eax,%eax
    }
ffffffff8002217a:	c3                   	ret
ffffffff8002217b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80022180 <_ZN5Sched15GetProcessByPidEi>:

    Process* GetProcessByPid(int pid) {
        for (int i = 0; i < MaxProcesses; i++) {
ffffffff80022180:	48 c7 c0 60 74 17 80 	mov    $0xffffffff80177460,%rax
ffffffff80022187:	31 d2                	xor    %edx,%edx
ffffffff80022189:	eb 26                	jmp    ffffffff800221b1 <_ZN5Sched15GetProcessByPidEi+0x31>
ffffffff8002218b:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80022192:	00 00 00 00 
ffffffff80022196:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8002219d:	00 00 00 
ffffffff800221a0:	83 c2 01             	add    $0x1,%edx
ffffffff800221a3:	48 05 40 05 00 00    	add    $0x540,%rax
ffffffff800221a9:	81 fa 00 01 00 00    	cmp    $0x100,%edx
ffffffff800221af:	74 25                	je     ffffffff800221d6 <_ZN5Sched15GetProcessByPidEi+0x56>
            if (processTable[i].pid == pid &&
ffffffff800221b1:	39 38                	cmp    %edi,(%rax)
ffffffff800221b3:	75 eb                	jne    ffffffff800221a0 <_ZN5Sched15GetProcessByPidEi+0x20>
                (processTable[i].state == ProcessState::Ready ||
ffffffff800221b5:	8b 70 04             	mov    0x4(%rax),%esi
ffffffff800221b8:	8d 4e ff             	lea    -0x1(%rsi),%ecx
            if (processTable[i].pid == pid &&
ffffffff800221bb:	83 f9 01             	cmp    $0x1,%ecx
ffffffff800221be:	77 e0                	ja     ffffffff800221a0 <_ZN5Sched15GetProcessByPidEi+0x20>
                 processTable[i].state == ProcessState::Running)) {
                return &processTable[i];
ffffffff800221c0:	48 63 d2             	movslq %edx,%rdx
ffffffff800221c3:	48 8d 04 92          	lea    (%rdx,%rdx,4),%rax
ffffffff800221c7:	48 8d 04 82          	lea    (%rdx,%rax,4),%rax
ffffffff800221cb:	48 c1 e0 06          	shl    $0x6,%rax
ffffffff800221cf:	48 05 60 74 17 80    	add    $0xffffffff80177460,%rax
ffffffff800221d5:	c3                   	ret
            }
        }
        return nullptr;
ffffffff800221d6:	31 c0                	xor    %eax,%eax
    }
ffffffff800221d8:	c3                   	ret
ffffffff800221d9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff800221e0 <_ZN5Sched14GetProcessSlotEi>:

    Process* GetProcessSlot(int slot) {
        if (slot < 0 || slot >= MaxProcesses) return nullptr;
ffffffff800221e0:	81 ff ff 00 00 00    	cmp    $0xff,%edi
ffffffff800221e6:	77 18                	ja     ffffffff80022200 <_ZN5Sched14GetProcessSlotEi+0x20>
        return &processTable[slot];
ffffffff800221e8:	48 63 ff             	movslq %edi,%rdi
ffffffff800221eb:	48 8d 04 bf          	lea    (%rdi,%rdi,4),%rax
ffffffff800221ef:	48 8d 04 87          	lea    (%rdi,%rax,4),%rax
ffffffff800221f3:	48 c1 e0 06          	shl    $0x6,%rax
ffffffff800221f7:	48 05 60 74 17 80    	add    $0xffffffff80177460,%rax
ffffffff800221fd:	c3                   	ret
ffffffff800221fe:	66 90                	xchg   %ax,%ax
        if (slot < 0 || slot >= MaxProcesses) return nullptr;
ffffffff80022200:	31 c0                	xor    %eax,%eax
    }
ffffffff80022202:	c3                   	ret
ffffffff80022203:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8002220a:	00 00 00 
ffffffff8002220d:	0f 1f 00             	nopl   (%rax)

ffffffff80022210 <_GLOBAL__sub_I__ZN5Sched10InitializeEv>:
    static Process processTable[MaxProcesses];
ffffffff80022210:	48 c7 c0 f8 75 17 80 	mov    $0xffffffff801775f8,%rax
ffffffff80022217:	48 c7 c2 f8 b5 1c 80 	mov    $0xffffffff801cb5f8,%rdx
ffffffff8002221e:	66 90                	xchg   %ax,%ax
        Ready,
        Running,
        Terminated
    };

    struct Process {
ffffffff80022220:	c6 40 f0 00          	movb   $0x0,-0x10(%rax)
ffffffff80022224:	48 05 00 2a 00 00    	add    $0x2a00,%rax
ffffffff8002222a:	c6 80 30 db ff ff 00 	movb   $0x0,-0x24d0(%rax)
ffffffff80022231:	c6 80 70 e0 ff ff 00 	movb   $0x0,-0x1f90(%rax)
ffffffff80022238:	c6 80 b0 e5 ff ff 00 	movb   $0x0,-0x1a50(%rax)
ffffffff8002223f:	c6 80 f0 ea ff ff 00 	movb   $0x0,-0x1510(%rax)
ffffffff80022246:	c6 80 30 f0 ff ff 00 	movb   $0x0,-0xfd0(%rax)
ffffffff8002224d:	c6 80 70 f5 ff ff 00 	movb   $0x0,-0xa90(%rax)
ffffffff80022254:	c6 80 b0 fa ff ff 00 	movb   $0x0,-0x550(%rax)
ffffffff8002225b:	c7 80 f4 d5 ff ff ff 	movl   $0xffffffff,-0x2a0c(%rax)
ffffffff80022262:	ff ff ff 
ffffffff80022265:	c7 80 34 db ff ff ff 	movl   $0xffffffff,-0x24cc(%rax)
ffffffff8002226c:	ff ff ff 
ffffffff8002226f:	c7 80 74 e0 ff ff ff 	movl   $0xffffffff,-0x1f8c(%rax)
ffffffff80022276:	ff ff ff 
ffffffff80022279:	c7 80 b4 e5 ff ff ff 	movl   $0xffffffff,-0x1a4c(%rax)
ffffffff80022280:	ff ff ff 
ffffffff80022283:	c7 80 f4 ea ff ff ff 	movl   $0xffffffff,-0x150c(%rax)
ffffffff8002228a:	ff ff ff 
ffffffff8002228d:	c7 80 34 f0 ff ff ff 	movl   $0xffffffff,-0xfcc(%rax)
ffffffff80022294:	ff ff ff 
ffffffff80022297:	c7 80 74 f5 ff ff ff 	movl   $0xffffffff,-0xa8c(%rax)
ffffffff8002229e:	ff ff ff 
ffffffff800222a1:	c7 80 b4 fa ff ff ff 	movl   $0xffffffff,-0x54c(%rax)
ffffffff800222a8:	ff ff ff 
ffffffff800222ab:	48 c7 80 f8 d5 ff ff 	movq   $0x0,-0x2a08(%rax)
ffffffff800222b2:	00 00 00 00 
ffffffff800222b6:	48 c7 80 38 db ff ff 	movq   $0x0,-0x24c8(%rax)
ffffffff800222bd:	00 00 00 00 
ffffffff800222c1:	48 c7 80 78 e0 ff ff 	movq   $0x0,-0x1f88(%rax)
ffffffff800222c8:	00 00 00 00 
ffffffff800222cc:	48 c7 80 b8 e5 ff ff 	movq   $0x0,-0x1a48(%rax)
ffffffff800222d3:	00 00 00 00 
ffffffff800222d7:	48 c7 80 f8 ea ff ff 	movq   $0x0,-0x1508(%rax)
ffffffff800222de:	00 00 00 00 
ffffffff800222e2:	48 c7 80 38 f0 ff ff 	movq   $0x0,-0xfc8(%rax)
ffffffff800222e9:	00 00 00 00 
ffffffff800222ed:	48 c7 80 78 f5 ff ff 	movq   $0x0,-0xa88(%rax)
ffffffff800222f4:	00 00 00 00 
ffffffff800222f8:	48 c7 80 b8 fa ff ff 	movq   $0x0,-0x548(%rax)
ffffffff800222ff:	00 00 00 00 
ffffffff80022303:	48 c7 80 00 d6 ff ff 	movq   $0x0,-0x2a00(%rax)
ffffffff8002230a:	00 00 00 00 
ffffffff8002230e:	48 c7 80 40 db ff ff 	movq   $0x0,-0x24c0(%rax)
ffffffff80022315:	00 00 00 00 
ffffffff80022319:	48 c7 80 80 e0 ff ff 	movq   $0x0,-0x1f80(%rax)
ffffffff80022320:	00 00 00 00 
ffffffff80022324:	48 c7 80 c0 e5 ff ff 	movq   $0x0,-0x1a40(%rax)
ffffffff8002232b:	00 00 00 00 
ffffffff8002232f:	48 c7 80 00 eb ff ff 	movq   $0x0,-0x1500(%rax)
ffffffff80022336:	00 00 00 00 
ffffffff8002233a:	48 c7 80 40 f0 ff ff 	movq   $0x0,-0xfc0(%rax)
ffffffff80022341:	00 00 00 00 
ffffffff80022345:	48 c7 80 80 f5 ff ff 	movq   $0x0,-0xa80(%rax)
ffffffff8002234c:	00 00 00 00 
ffffffff80022350:	48 c7 80 c0 fa ff ff 	movq   $0x0,-0x540(%rax)
ffffffff80022357:	00 00 00 00 
ffffffff8002235b:	48 c7 80 08 d6 ff ff 	movq   $0x0,-0x29f8(%rax)
ffffffff80022362:	00 00 00 00 
ffffffff80022366:	48 c7 80 48 db ff ff 	movq   $0x0,-0x24b8(%rax)
ffffffff8002236d:	00 00 00 00 
ffffffff80022371:	48 c7 80 88 e0 ff ff 	movq   $0x0,-0x1f78(%rax)
ffffffff80022378:	00 00 00 00 
ffffffff8002237c:	48 c7 80 c8 e5 ff ff 	movq   $0x0,-0x1a38(%rax)
ffffffff80022383:	00 00 00 00 
ffffffff80022387:	48 c7 80 08 eb ff ff 	movq   $0x0,-0x14f8(%rax)
ffffffff8002238e:	00 00 00 00 
ffffffff80022392:	48 c7 80 48 f0 ff ff 	movq   $0x0,-0xfb8(%rax)
ffffffff80022399:	00 00 00 00 
ffffffff8002239d:	48 c7 80 88 f5 ff ff 	movq   $0x0,-0xa78(%rax)
ffffffff800223a4:	00 00 00 00 
ffffffff800223a8:	48 c7 80 c8 fa ff ff 	movq   $0x0,-0x538(%rax)
ffffffff800223af:	00 00 00 00 
ffffffff800223b3:	48 c7 80 10 d6 ff ff 	movq   $0x0,-0x29f0(%rax)
ffffffff800223ba:	00 00 00 00 
ffffffff800223be:	48 c7 80 50 db ff ff 	movq   $0x0,-0x24b0(%rax)
ffffffff800223c5:	00 00 00 00 
ffffffff800223c9:	48 c7 80 90 e0 ff ff 	movq   $0x0,-0x1f70(%rax)
ffffffff800223d0:	00 00 00 00 
ffffffff800223d4:	48 c7 80 d0 e5 ff ff 	movq   $0x0,-0x1a30(%rax)
ffffffff800223db:	00 00 00 00 
ffffffff800223df:	48 c7 80 10 eb ff ff 	movq   $0x0,-0x14f0(%rax)
ffffffff800223e6:	00 00 00 00 
ffffffff800223ea:	48 c7 80 50 f0 ff ff 	movq   $0x0,-0xfb0(%rax)
ffffffff800223f1:	00 00 00 00 
ffffffff800223f5:	48 c7 80 90 f5 ff ff 	movq   $0x0,-0xa70(%rax)
ffffffff800223fc:	00 00 00 00 
ffffffff80022400:	48 c7 80 d0 fa ff ff 	movq   $0x0,-0x530(%rax)
ffffffff80022407:	00 00 00 00 
ffffffff8002240b:	48 c7 80 98 d7 ff ff 	movq   $0x0,-0x2868(%rax)
ffffffff80022412:	00 00 00 00 
ffffffff80022416:	48 c7 80 d8 dc ff ff 	movq   $0x0,-0x2328(%rax)
ffffffff8002241d:	00 00 00 00 
ffffffff80022421:	48 c7 80 18 e2 ff ff 	movq   $0x0,-0x1de8(%rax)
ffffffff80022428:	00 00 00 00 
ffffffff8002242c:	48 c7 80 58 e7 ff ff 	movq   $0x0,-0x18a8(%rax)
ffffffff80022433:	00 00 00 00 
ffffffff80022437:	48 c7 80 98 ec ff ff 	movq   $0x0,-0x1368(%rax)
ffffffff8002243e:	00 00 00 00 
ffffffff80022442:	48 c7 80 d8 f1 ff ff 	movq   $0x0,-0xe28(%rax)
ffffffff80022449:	00 00 00 00 
ffffffff8002244d:	48 c7 80 18 f7 ff ff 	movq   $0x0,-0x8e8(%rax)
ffffffff80022454:	00 00 00 00 
ffffffff80022458:	48 c7 80 58 fc ff ff 	movq   $0x0,-0x3a8(%rax)
ffffffff8002245f:	00 00 00 00 
ffffffff80022463:	48 c7 80 a0 d7 ff ff 	movq   $0x0,-0x2860(%rax)
ffffffff8002246a:	00 00 00 00 
ffffffff8002246e:	48 c7 80 e0 dc ff ff 	movq   $0x0,-0x2320(%rax)
ffffffff80022475:	00 00 00 00 
ffffffff80022479:	48 c7 80 20 e2 ff ff 	movq   $0x0,-0x1de0(%rax)
ffffffff80022480:	00 00 00 00 
ffffffff80022484:	48 c7 80 60 e7 ff ff 	movq   $0x0,-0x18a0(%rax)
ffffffff8002248b:	00 00 00 00 
ffffffff8002248f:	48 c7 80 a0 ec ff ff 	movq   $0x0,-0x1360(%rax)
ffffffff80022496:	00 00 00 00 
ffffffff8002249a:	48 c7 80 e0 f1 ff ff 	movq   $0x0,-0xe20(%rax)
ffffffff800224a1:	00 00 00 00 
ffffffff800224a5:	48 c7 80 20 f7 ff ff 	movq   $0x0,-0x8e0(%rax)
ffffffff800224ac:	00 00 00 00 
ffffffff800224b0:	48 c7 80 60 fc ff ff 	movq   $0x0,-0x3a0(%rax)
ffffffff800224b7:	00 00 00 00 
ffffffff800224bb:	48 39 c2             	cmp    %rax,%rdx
ffffffff800224be:	0f 85 5c fd ff ff    	jne    ffffffff80022220 <_GLOBAL__sub_I__ZN5Sched10InitializeEv+0x10>

}
ffffffff800224c4:	c3                   	ret
ffffffff800224c5:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800224cc:	00 00 00 
ffffffff800224cf:	90                   	nop

ffffffff800224d0 <ApEntry>:
        Hal::WriteMSR(Hal::IA32_FMASK, 0x200);
    }

    // AP entry point — called by Limine when an AP's goto_address is written.
    // Runs on Limine's per-AP stack. Must not return.
    extern "C" void ApEntry(limine_mp_info* info) {
ffffffff800224d0:	55                   	push   %rbp
ffffffff800224d1:	48 89 e5             	mov    %rsp,%rbp
ffffffff800224d4:	53                   	push   %rbx
ffffffff800224d5:	48 83 ec 08          	sub    $0x8,%rsp
ffffffff800224d9:	8b 5f 18             	mov    0x18(%rdi),%ebx
        uint32_t cpuIndex = (uint32_t)info->extra_argument;
        PerCpu* cpu = &g_perCpu[cpuIndex];

        // Switch to the kernel's page tables (APs start with Limine's boot page tables)
        // PML4 is already stored as a physical address in the Paging class
        uint64_t kernelCR3 = (uint64_t)Memory::VMM::g_paging->PML4;
ffffffff800224dc:	48 8b 05 dd a4 12 00 	mov    0x12a4dd(%rip),%rax        # ffffffff8014c9c0 <_ZN6Memory3VMM8g_pagingE>
ffffffff800224e3:	48 c1 e3 08          	shl    $0x8,%rbx
        asm volatile("mov %0, %%cr3" :: "r"(kernelCR3) : "memory");
ffffffff800224e7:	48 8b 00             	mov    (%rax),%rax
ffffffff800224ea:	0f 22 d8             	mov    %rax,%cr3

        // Load per-CPU GDT + TSS (already prepared by BSP in BootAPs)
        Hal::LoadGDTAndTSS(&cpu->gdtPtr);
ffffffff800224ed:	48 8d bb 44 b5 1c 80 	lea    -0x7fe34abc(%rbx),%rdi
ffffffff800224f4:	e8 d7 6b ff ff       	call   ffffffff800190d0 <_ZN3Hal13LoadGDTAndTSSEPNS_10GDTPointerE>

        // Load shared IDT
        Hal::IDTReload();
ffffffff800224f9:	e8 f2 73 ff ff       	call   ffffffff800198f0 <_ZN3Hal9IDTReloadEv>
        asm volatile("mov %%cr0, %0" : "=r"(cr0));
ffffffff800224fe:	0f 20 c0             	mov    %cr0,%rax
        cr0 &= ~(1ULL << 2);  // Clear EM
ffffffff80022501:	48 83 e0 fb          	and    $0xfffffffffffffffb,%rax
        cr0 |=  (1ULL << 1);  // Set MP
ffffffff80022505:	48 83 c8 02          	or     $0x2,%rax
        asm volatile("mov %0, %%cr0" :: "r"(cr0));
ffffffff80022509:	0f 22 c0             	mov    %rax,%cr0
        asm volatile("mov %%cr4, %0" : "=r"(cr4));
ffffffff8002250c:	0f 20 e0             	mov    %cr4,%rax
        cr4 |= (1ULL << 10);  // OSXMMEXCPT
ffffffff8002250f:	80 cc 06             	or     $0x6,%ah
        asm volatile("mov %0, %%cr4" :: "r"(cr4));
ffffffff80022512:	0f 22 e0             	mov    %rax,%cr4
ffffffff80022515:	b8 06 01 07 00       	mov    $0x70106,%eax
ffffffff8002251a:	ba 06 04 07 00       	mov    $0x70406,%edx
ffffffff8002251f:	b9 77 02 00 00       	mov    $0x277,%ecx
ffffffff80022524:	0f 30                	wrmsr
        uint32_t svr = Hal::LocalApic::ReadRegister(Hal::LocalApic::REG_SPURIOUS);
ffffffff80022526:	bf f0 00 00 00       	mov    $0xf0,%edi
        PerCpu* cpu = &g_perCpu[cpuIndex];
ffffffff8002252b:	48 81 c3 80 b4 1c 80 	add    $0xffffffff801cb480,%rbx
        uint32_t svr = Hal::LocalApic::ReadRegister(Hal::LocalApic::REG_SPURIOUS);
ffffffff80022532:	e8 79 5b ff ff       	call   ffffffff800180b0 <_ZN3Hal9LocalApic12ReadRegisterEj>
        Hal::LocalApic::WriteRegister(Hal::LocalApic::REG_SPURIOUS, svr);
ffffffff80022537:	bf f0 00 00 00       	mov    $0xf0,%edi
        svr = (svr & 0xFFFFFF00) | Hal::LocalApic::SPURIOUS_VECTOR;
ffffffff8002253c:	0d ff 01 00 00       	or     $0x1ff,%eax
ffffffff80022541:	89 c6                	mov    %eax,%esi
        Hal::LocalApic::WriteRegister(Hal::LocalApic::REG_SPURIOUS, svr);
ffffffff80022543:	e8 88 5b ff ff       	call   ffffffff800180d0 <_ZN3Hal9LocalApic13WriteRegisterEjj>
        Hal::LocalApic::WriteRegister(Hal::LocalApic::REG_TPR, 0);
ffffffff80022548:	31 f6                	xor    %esi,%esi
ffffffff8002254a:	bf 80 00 00 00       	mov    $0x80,%edi
ffffffff8002254f:	e8 7c 5b ff ff       	call   ffffffff800180d0 <_ZN3Hal9LocalApic13WriteRegisterEjj>
        uint32_t hi = (uint32_t)(value >> 32);
ffffffff80022554:	48 89 de             	mov    %rbx,%rsi
        uint32_t lo = (uint32_t)(value & 0xFFFFFFFF);
ffffffff80022557:	89 d8                	mov    %ebx,%eax
        asm volatile("wrmsr" : : "a"(lo), "d"(hi), "c"(msr));
ffffffff80022559:	b9 01 01 00 c0       	mov    $0xc0000101,%ecx
        uint32_t hi = (uint32_t)(value >> 32);
ffffffff8002255e:	48 c1 ee 20          	shr    $0x20,%rsi
ffffffff80022562:	89 f2                	mov    %esi,%edx
        asm volatile("wrmsr" : : "a"(lo), "d"(hi), "c"(msr));
ffffffff80022564:	0f 30                	wrmsr
ffffffff80022566:	b9 02 01 00 c0       	mov    $0xc0000102,%ecx
ffffffff8002256b:	0f 30                	wrmsr
        asm volatile("rdmsr" : "=a"(lo), "=d"(hi) : "c"(msr));
ffffffff8002256d:	b9 80 00 00 c0       	mov    $0xc0000080,%ecx
ffffffff80022572:	0f 32                	rdmsr
        return ((uint64_t)hi << 32) | lo;
ffffffff80022574:	48 c1 e2 20          	shl    $0x20,%rdx
ffffffff80022578:	89 c0                	mov    %eax,%eax
ffffffff8002257a:	48 09 c2             	or     %rax,%rdx
        efer |= 1;  // SCE bit (Syscall Enable)
ffffffff8002257d:	48 89 d0             	mov    %rdx,%rax
        uint32_t hi = (uint32_t)(value >> 32);
ffffffff80022580:	48 c1 ea 20          	shr    $0x20,%rdx
ffffffff80022584:	48 83 c8 01          	or     $0x1,%rax
        asm volatile("wrmsr" : : "a"(lo), "d"(hi), "c"(msr));
ffffffff80022588:	0f 30                	wrmsr
ffffffff8002258a:	31 f6                	xor    %esi,%esi
ffffffff8002258c:	ba 08 00 10 00       	mov    $0x100008,%edx
ffffffff80022591:	b9 81 00 00 c0       	mov    $0xc0000081,%ecx
ffffffff80022596:	89 f0                	mov    %esi,%eax
ffffffff80022598:	0f 30                	wrmsr
        Hal::WriteMSR(Hal::IA32_LSTAR, (uint64_t)SyscallEntry);
ffffffff8002259a:	48 c7 c0 60 3f 02 80 	mov    $0xffffffff80023f60,%rax
ffffffff800225a1:	b9 82 00 00 c0       	mov    $0xc0000082,%ecx
        uint32_t hi = (uint32_t)(value >> 32);
ffffffff800225a6:	48 89 c2             	mov    %rax,%rdx
ffffffff800225a9:	48 c1 ea 20          	shr    $0x20,%rdx
        asm volatile("wrmsr" : : "a"(lo), "d"(hi), "c"(msr));
ffffffff800225ad:	0f 30                	wrmsr
ffffffff800225af:	b8 00 02 00 00       	mov    $0x200,%eax
ffffffff800225b4:	b9 84 00 00 c0       	mov    $0xc0000084,%ecx
ffffffff800225b9:	89 f2                	mov    %esi,%edx
ffffffff800225bb:	0f 30                	wrmsr
        Hal::LocalApic::WriteRegister(Hal::LocalApic::REG_TIMER_DIVIDE, DIVIDE_BY_16);
ffffffff800225bd:	be 03 00 00 00       	mov    $0x3,%esi
ffffffff800225c2:	bf e0 03 00 00       	mov    $0x3e0,%edi
ffffffff800225c7:	e8 04 5b ff ff       	call   ffffffff800180d0 <_ZN3Hal9LocalApic13WriteRegisterEjj>
        Hal::LocalApic::WriteRegister(Hal::LocalApic::REG_TIMER_LVT, lvt);
ffffffff800225cc:	be 20 00 02 00       	mov    $0x20020,%esi
ffffffff800225d1:	bf 20 03 00 00       	mov    $0x320,%edi
ffffffff800225d6:	e8 f5 5a ff ff       	call   ffffffff800180d0 <_ZN3Hal9LocalApic13WriteRegisterEjj>
        Hal::LocalApic::WriteRegister(Hal::LocalApic::REG_TIMER_INITIAL, g_ticksPerMs);
ffffffff800225db:	8b 35 7f 8e 1a 00    	mov    0x1a8e7f(%rip),%esi        # ffffffff801cb460 <_ZN3Smp12g_ticksPerMsE>
ffffffff800225e1:	bf 80 03 00 00       	mov    $0x380,%edi
ffffffff800225e6:	e8 e5 5a ff ff       	call   ffffffff800180d0 <_ZN3Hal9LocalApic13WriteRegisterEjj>

        // Start APIC timer using BSP's calibrated ticks/ms
        StartApicTimer();

        // Signal that this AP is ready
        cpu->ready = true;
ffffffff800225eb:	c6 83 ce 00 00 00 01 	movb   $0x1,0xce(%rbx)

        // Enable interrupts and idle
        asm volatile("sti");
ffffffff800225f2:	fb                   	sti
ffffffff800225f3:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800225fa:	00 00 00 00 
ffffffff800225fe:	66 90                	xchg   %ax,%ax
        for (;;) {
            asm volatile("hlt");
ffffffff80022600:	f4                   	hlt
        for (;;) {
ffffffff80022601:	eb fd                	jmp    ffffffff80022600 <ApEntry+0x130>
ffffffff80022603:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8002260a:	00 00 00 
ffffffff8002260d:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80022614:	00 00 00 
ffffffff80022617:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff8002261e:	00 00 

ffffffff80022620 <_ZN3Smp13GetCurrentCpuEv>:
    PerCpu* GetCurrentCpu() {
ffffffff80022620:	55                   	push   %rbp
ffffffff80022621:	48 89 e5             	mov    %rsp,%rbp
        uint32_t id = Hal::LocalApic::GetId();
ffffffff80022624:	e8 d7 5c ff ff       	call   ffffffff80018300 <_ZN3Hal9LocalApic5GetIdEv>
        for (int i = 0; i < g_cpuCount; i++) {
ffffffff80022629:	48 63 35 34 8e 1a 00 	movslq 0x1a8e34(%rip),%rsi        # ffffffff801cb464 <_ZN3Smp10g_cpuCountE>
ffffffff80022630:	85 f6                	test   %esi,%esi
ffffffff80022632:	7e 3c                	jle    ffffffff80022670 <_ZN3Smp13GetCurrentCpuEv+0x50>
ffffffff80022634:	31 d2                	xor    %edx,%edx
ffffffff80022636:	eb 11                	jmp    ffffffff80022649 <_ZN3Smp13GetCurrentCpuEv+0x29>
ffffffff80022638:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8002263f:	00 
ffffffff80022640:	48 83 c2 01          	add    $0x1,%rdx
ffffffff80022644:	48 39 f2             	cmp    %rsi,%rdx
ffffffff80022647:	74 27                	je     ffffffff80022670 <_ZN3Smp13GetCurrentCpuEv+0x50>
            if (g_perCpu[i].lapicId == id)
ffffffff80022649:	48 89 d1             	mov    %rdx,%rcx
ffffffff8002264c:	48 c1 e1 08          	shl    $0x8,%rcx
ffffffff80022650:	39 81 a0 b4 1c 80    	cmp    %eax,-0x7fe34b60(%rcx)
ffffffff80022656:	75 e8                	jne    ffffffff80022640 <_ZN3Smp13GetCurrentCpuEv+0x20>
                return &g_perCpu[i];
ffffffff80022658:	48 63 c2             	movslq %edx,%rax
    }
ffffffff8002265b:	5d                   	pop    %rbp
                return &g_perCpu[i];
ffffffff8002265c:	48 c1 e0 08          	shl    $0x8,%rax
ffffffff80022660:	48 8d 80 80 b4 1c 80 	lea    -0x7fe34b80(%rax),%rax
    }
ffffffff80022667:	c3                   	ret
ffffffff80022668:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8002266f:	00 
        return &g_perCpu[0]; // fallback to BSP
ffffffff80022670:	48 c7 c0 80 b4 1c 80 	mov    $0xffffffff801cb480,%rax
    }
ffffffff80022677:	5d                   	pop    %rbp
ffffffff80022678:	c3                   	ret
ffffffff80022679:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)

ffffffff80022680 <_ZN3Smp7InitBspEj>:
    void InitBsp(uint32_t bspLapicId) {
ffffffff80022680:	55                   	push   %rbp
        memset(bsp, 0, sizeof(PerCpu));
ffffffff80022681:	31 f6                	xor    %esi,%esi
ffffffff80022683:	ba 00 01 00 00       	mov    $0x100,%edx
    void InitBsp(uint32_t bspLapicId) {
ffffffff80022688:	48 89 e5             	mov    %rsp,%rbp
ffffffff8002268b:	53                   	push   %rbx
ffffffff8002268c:	89 fb                	mov    %edi,%ebx
        memset(bsp, 0, sizeof(PerCpu));
ffffffff8002268e:	48 c7 c7 80 b4 1c 80 	mov    $0xffffffff801cb480,%rdi
    void InitBsp(uint32_t bspLapicId) {
ffffffff80022695:	48 83 ec 08          	sub    $0x8,%rsp
        memset(bsp, 0, sizeof(PerCpu));
ffffffff80022699:	e8 82 7b ff ff       	call   ffffffff8001a220 <memset>
        bsp->currentSlot = -1;
ffffffff8002269e:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
        Hal::PrepareGDTForCpu(&bsp->gdt, &bsp->tss, &bsp->gdtPtr);
ffffffff800226a3:	48 c7 c2 44 b5 1c 80 	mov    $0xffffffff801cb544,%rdx
ffffffff800226aa:	48 c7 c6 dc b4 1c 80 	mov    $0xffffffff801cb4dc,%rsi
ffffffff800226b1:	48 c7 c7 a4 b4 1c 80 	mov    $0xffffffff801cb4a4,%rdi
        bsp->currentSlot = -1;
ffffffff800226b8:	48 89 05 d1 8d 1a 00 	mov    %rax,0x1a8dd1(%rip)        # ffffffff801cb490 <_ZN3Smp8g_perCpuE+0x10>
        bsp->lapicId = bspLapicId;
ffffffff800226bf:	89 1d db 8d 1a 00    	mov    %ebx,0x1a8ddb(%rip)        # ffffffff801cb4a0 <_ZN3Smp8g_perCpuE+0x20>
        bsp->ready = true;
ffffffff800226c5:	c6 05 82 8e 1a 00 01 	movb   $0x1,0x1a8e82(%rip)        # ffffffff801cb54e <_ZN3Smp8g_perCpuE+0xce>
        Hal::PrepareGDTForCpu(&bsp->gdt, &bsp->tss, &bsp->gdtPtr);
ffffffff800226cc:	e8 2f 69 ff ff       	call   ffffffff80019000 <_ZN3Hal16PrepareGDTForCpuEPNS_8BasicGDTEPNS_5TSS64EPNS_10GDTPointerE>
        Hal::LoadGDTAndTSS(&bsp->gdtPtr);
ffffffff800226d1:	48 c7 c7 44 b5 1c 80 	mov    $0xffffffff801cb544,%rdi
ffffffff800226d8:	e8 f3 69 ff ff       	call   ffffffff800190d0 <_ZN3Hal13LoadGDTAndTSSEPNS_10GDTPointerE>
        uint32_t lo = (uint32_t)(value & 0xFFFFFFFF);
ffffffff800226dd:	48 c7 c0 80 b4 1c 80 	mov    $0xffffffff801cb480,%rax
        asm volatile("wrmsr" : : "a"(lo), "d"(hi), "c"(msr));
ffffffff800226e4:	b9 01 01 00 c0       	mov    $0xc0000101,%ecx
        uint32_t hi = (uint32_t)(value >> 32);
ffffffff800226e9:	48 89 c2             	mov    %rax,%rdx
ffffffff800226ec:	48 c1 ea 20          	shr    $0x20,%rdx
        asm volatile("wrmsr" : : "a"(lo), "d"(hi), "c"(msr));
ffffffff800226f0:	0f 30                	wrmsr
ffffffff800226f2:	b9 02 01 00 c0       	mov    $0xc0000102,%ecx
ffffffff800226f7:	0f 30                	wrmsr
            Print(string);
ffffffff800226f9:	48 c7 c7 73 c0 02 80 	mov    $0xffffffff8002c073,%rdi
            g_kernelLogDepth++;
ffffffff80022700:	83 05 9d cd 1b 00 01 	addl   $0x1,0x1bcd9d(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        g_cpuCount = 1;
ffffffff80022707:	c7 05 53 8d 1a 00 01 	movl   $0x1,0x1a8d53(%rip)        # ffffffff801cb464 <_ZN3Smp10g_cpuCountE>
ffffffff8002270e:	00 00 00 
            Print(string);
ffffffff80022711:	e8 aa 0a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022716:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8002271d:	e8 9e 0a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022722:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80022729:	e8 92 0a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002272e:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80022735:	e8 86 0a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002273a:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80022741:	e8 7a 0a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022746:	48 c7 c7 77 c0 02 80 	mov    $0xffffffff8002c077,%rdi
ffffffff8002274d:	e8 6e 0a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80022752:	be 0a 00 00 00       	mov    $0xa,%esi
            << (uint64_t)bspLapicId << ")";
ffffffff80022757:	89 df                	mov    %ebx,%edi
ffffffff80022759:	e8 32 7d ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8002275e:	48 89 c7             	mov    %rax,%rdi
ffffffff80022761:	e8 5a 0a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80022766:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff8002276d:	e8 4e 0a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022772:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80022779:	e8 42 0a 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8002277e:	83 2d 1f cd 1b 00 01 	subl   $0x1,0x1bcd1f(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff80022785:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff80022789:	c9                   	leave
ffffffff8002278a:	c3                   	ret
ffffffff8002278b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80022790 <_ZN3Smp7BootAPsEP18limine_mp_response>:
        }
    }

    void BootAPs(limine_mp_response* mpResponse) {
ffffffff80022790:	55                   	push   %rbp
ffffffff80022791:	48 89 e5             	mov    %rsp,%rbp
ffffffff80022794:	41 57                	push   %r15
ffffffff80022796:	41 56                	push   %r14
ffffffff80022798:	41 55                	push   %r13
ffffffff8002279a:	41 54                	push   %r12
ffffffff8002279c:	53                   	push   %rbx
ffffffff8002279d:	48 83 ec 28          	sub    $0x28,%rsp
            g_kernelLogDepth++;
ffffffff800227a1:	8b 05 fd cc 1b 00    	mov    0x1bccfd(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800227a7:	83 c0 01             	add    $0x1,%eax
        if (mpResponse == nullptr) {
ffffffff800227aa:	48 85 ff             	test   %rdi,%rdi
ffffffff800227ad:	0f 84 b5 02 00 00    	je     ffffffff80022a68 <_ZN3Smp7BootAPsEP18limine_mp_response+0x2d8>
            Kt::KernelLogStream(Kt::WARNING, "SMP") << "No MP response from bootloader, single CPU mode";
            return;
        }

        uint64_t cpuCount = mpResponse->cpu_count;
        uint32_t bspLapicId = mpResponse->bsp_lapic_id;
ffffffff800227b3:	44 8b 77 0c          	mov    0xc(%rdi),%r14d
        uint64_t cpuCount = mpResponse->cpu_count;
ffffffff800227b7:	48 8b 5f 10          	mov    0x10(%rdi),%rbx
ffffffff800227bb:	49 89 fc             	mov    %rdi,%r12
            Print(string);
ffffffff800227be:	48 c7 c7 73 c0 02 80 	mov    $0xffffffff8002c073,%rdi
            g_kernelLogDepth++;
ffffffff800227c5:	89 05 d9 cc 1b 00    	mov    %eax,0x1bccd9(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        uint32_t bspLapicId = mpResponse->bsp_lapic_id;
ffffffff800227cb:	44 89 75 c0          	mov    %r14d,-0x40(%rbp)
        uint64_t cpuCount = mpResponse->cpu_count;
ffffffff800227cf:	48 89 5d b8          	mov    %rbx,-0x48(%rbp)
            Print(string);
ffffffff800227d3:	e8 e8 09 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800227d8:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800227df:	e8 dc 09 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800227e4:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800227eb:	e8 d0 09 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800227f0:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff800227f7:	e8 c4 09 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800227fc:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80022803:	e8 b8 09 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022808:	48 c7 c7 92 c0 02 80 	mov    $0xffffffff8002c092,%rdi
ffffffff8002280f:	e8 ac 09 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80022814:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80022819:	48 89 df             	mov    %rbx,%rdi
ffffffff8002281c:	e8 6f 7c ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80022821:	48 89 c7             	mov    %rax,%rdi
ffffffff80022824:	e8 97 09 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80022829:	48 c7 c7 9b c0 02 80 	mov    $0xffffffff8002c09b,%rdi
ffffffff80022830:	e8 8b 09 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80022835:	be 0a 00 00 00       	mov    $0xa,%esi

        Kt::KernelLogStream(Kt::INFO, "SMP") << "Booting " << cpuCount
            << " CPUs (BSP LAPIC ID " << (uint64_t)bspLapicId << ")";
ffffffff8002283a:	44 89 f7             	mov    %r14d,%edi

        // Prepare and boot each AP
        for (uint64_t i = 0; i < cpuCount; i++) {
ffffffff8002283d:	45 31 f6             	xor    %r14d,%r14d
ffffffff80022840:	e8 4b 7c ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80022845:	48 89 c7             	mov    %rax,%rdi
ffffffff80022848:	e8 73 09 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8002284d:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff80022854:	e8 67 09 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022859:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80022860:	e8 5b 09 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80022865:	83 2d 38 cc 1b 00 01 	subl   $0x1,0x1bcc38(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff8002286c:	48 85 db             	test   %rbx,%rbx
ffffffff8002286f:	0f 84 b9 00 00 00    	je     ffffffff8002292e <_ZN3Smp7BootAPsEP18limine_mp_response+0x19e>
ffffffff80022875:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8002287c:	00 00 00 00 
            limine_mp_info* cpuInfo = mpResponse->cpus[i];
ffffffff80022880:	49 8b 44 24 18       	mov    0x18(%r12),%rax
ffffffff80022885:	4e 8b 3c f0          	mov    (%rax,%r14,8),%r15

            // Skip BSP
            if (cpuInfo->lapic_id == bspLapicId)
ffffffff80022889:	8b 45 c0             	mov    -0x40(%rbp),%eax
ffffffff8002288c:	41 39 47 04          	cmp    %eax,0x4(%r15)
ffffffff80022890:	0f 84 8a 00 00 00    	je     ffffffff80022920 <_ZN3Smp7BootAPsEP18limine_mp_response+0x190>
                continue;

            if (g_cpuCount >= MaxCpus) {
ffffffff80022896:	44 8b 1d c7 8b 1a 00 	mov    0x1a8bc7(%rip),%r11d        # ffffffff801cb464 <_ZN3Smp10g_cpuCountE>
ffffffff8002289d:	41 83 fb 3f          	cmp    $0x3f,%r11d
ffffffff800228a1:	0f 8f 5a 01 00 00    	jg     ffffffff80022a01 <_ZN3Smp7BootAPsEP18limine_mp_response+0x271>
                Kt::KernelLogStream(Kt::WARNING, "SMP") << "Max CPUs reached, skipping remaining";
                break;
            }

            int idx = g_cpuCount;
            PerCpu* cpu = &g_perCpu[idx];
ffffffff800228a7:	4d 63 eb             	movslq %r11d,%r13
            memset(cpu, 0, sizeof(PerCpu));
ffffffff800228aa:	31 f6                	xor    %esi,%esi
ffffffff800228ac:	ba 00 01 00 00       	mov    $0x100,%edx
ffffffff800228b1:	44 89 5d c4          	mov    %r11d,-0x3c(%rbp)
ffffffff800228b5:	4c 89 eb             	mov    %r13,%rbx
ffffffff800228b8:	48 c1 e3 08          	shl    $0x8,%rbx
            PerCpu* cpu = &g_perCpu[idx];
ffffffff800228bc:	48 8d 8b 80 b4 1c 80 	lea    -0x7fe34b80(%rbx),%rcx
            memset(cpu, 0, sizeof(PerCpu));
ffffffff800228c3:	48 89 cf             	mov    %rcx,%rdi
ffffffff800228c6:	48 89 4d c8          	mov    %rcx,-0x38(%rbp)
ffffffff800228ca:	e8 51 79 ff ff       	call   ffffffff8001a220 <memset>

            cpu->cpuIndex = idx;
ffffffff800228cf:	48 8b 4d c8          	mov    -0x38(%rbp),%rcx
            cpu->lapicId = cpuInfo->lapic_id;
ffffffff800228d3:	41 8b 47 04          	mov    0x4(%r15),%eax
            cpu->currentSlot = -1;
            cpu->ready = false;

            // Prepare per-CPU GDT/TSS for this AP (BSP does this so AP can just load it)
            Hal::PrepareGDTForCpu(&cpu->gdt, &cpu->tss, &cpu->gdtPtr);
ffffffff800228d7:	48 8d 93 44 b5 1c 80 	lea    -0x7fe34abc(%rbx),%rdx
            cpu->cpuIndex = idx;
ffffffff800228de:	44 8b 5d c4          	mov    -0x3c(%rbp),%r11d
            Hal::PrepareGDTForCpu(&cpu->gdt, &cpu->tss, &cpu->gdtPtr);
ffffffff800228e2:	48 8d b3 dc b4 1c 80 	lea    -0x7fe34b24(%rbx),%rsi
ffffffff800228e9:	48 8d bb a4 b4 1c 80 	lea    -0x7fe34b5c(%rbx),%rdi
            cpu->lapicId = cpuInfo->lapic_id;
ffffffff800228f0:	89 41 20             	mov    %eax,0x20(%rcx)
            cpu->cpuIndex = idx;
ffffffff800228f3:	44 89 59 14          	mov    %r11d,0x14(%rcx)
            cpu->currentSlot = -1;
ffffffff800228f7:	c7 41 10 ff ff ff ff 	movl   $0xffffffff,0x10(%rcx)
            cpu->ready = false;
ffffffff800228fe:	c6 81 ce 00 00 00 00 	movb   $0x0,0xce(%rcx)
            Hal::PrepareGDTForCpu(&cpu->gdt, &cpu->tss, &cpu->gdtPtr);
ffffffff80022905:	e8 f6 66 ff ff       	call   ffffffff80019000 <_ZN3Hal16PrepareGDTForCpuEPNS_8BasicGDTEPNS_5TSS64EPNS_10GDTPointerE>

            g_cpuCount++;

            // Set extra_argument so AP knows its index
            cpuInfo->extra_argument = idx;
ffffffff8002290a:	4d 89 6f 18          	mov    %r13,0x18(%r15)

            // Wake the AP by writing the entry point to goto_address
            __atomic_store_n(&cpuInfo->goto_address, (limine_goto_address)ApEntry, __ATOMIC_SEQ_CST);
ffffffff8002290e:	48 c7 c0 d0 24 02 80 	mov    $0xffffffff800224d0,%rax
            g_cpuCount++;
ffffffff80022915:	83 05 48 8b 1a 00 01 	addl   $0x1,0x1a8b48(%rip)        # ffffffff801cb464 <_ZN3Smp10g_cpuCountE>
            __atomic_store_n(&cpuInfo->goto_address, (limine_goto_address)ApEntry, __ATOMIC_SEQ_CST);
ffffffff8002291c:	49 87 47 10          	xchg   %rax,0x10(%r15)
        for (uint64_t i = 0; i < cpuCount; i++) {
ffffffff80022920:	49 83 c6 01          	add    $0x1,%r14
ffffffff80022924:	4c 39 75 b8          	cmp    %r14,-0x48(%rbp)
ffffffff80022928:	0f 85 52 ff ff ff    	jne    ffffffff80022880 <_ZN3Smp7BootAPsEP18limine_mp_response+0xf0>
        }

        // Wait for all APs to signal ready
        for (int i = 1; i < g_cpuCount; i++) {
ffffffff8002292e:	83 3d 2f 8b 1a 00 01 	cmpl   $0x1,0x1a8b2f(%rip)        # ffffffff801cb464 <_ZN3Smp10g_cpuCountE>
ffffffff80022935:	7e 2c                	jle    ffffffff80022963 <_ZN3Smp7BootAPsEP18limine_mp_response+0x1d3>
ffffffff80022937:	48 c7 c2 4e b6 1c 80 	mov    $0xffffffff801cb64e,%rdx
ffffffff8002293e:	b9 01 00 00 00       	mov    $0x1,%ecx
ffffffff80022943:	eb 05                	jmp    ffffffff8002294a <_ZN3Smp7BootAPsEP18limine_mp_response+0x1ba>
ffffffff80022945:	0f 1f 00             	nopl   (%rax)
            while (!__atomic_load_n(&g_perCpu[i].ready, __ATOMIC_SEQ_CST)) {
                asm volatile("pause");
ffffffff80022948:	f3 90                	pause
            while (!__atomic_load_n(&g_perCpu[i].ready, __ATOMIC_SEQ_CST)) {
ffffffff8002294a:	0f b6 02             	movzbl (%rdx),%eax
ffffffff8002294d:	84 c0                	test   %al,%al
ffffffff8002294f:	74 f7                	je     ffffffff80022948 <_ZN3Smp7BootAPsEP18limine_mp_response+0x1b8>
        for (int i = 1; i < g_cpuCount; i++) {
ffffffff80022951:	83 c1 01             	add    $0x1,%ecx
ffffffff80022954:	48 81 c2 00 01 00 00 	add    $0x100,%rdx
ffffffff8002295b:	39 0d 03 8b 1a 00    	cmp    %ecx,0x1a8b03(%rip)        # ffffffff801cb464 <_ZN3Smp10g_cpuCountE>
ffffffff80022961:	7f e7                	jg     ffffffff8002294a <_ZN3Smp7BootAPsEP18limine_mp_response+0x1ba>
            Print(string);
ffffffff80022963:	48 c7 c7 73 c0 02 80 	mov    $0xffffffff8002c073,%rdi
            g_kernelLogDepth++;
ffffffff8002296a:	83 05 33 cb 1b 00 01 	addl   $0x1,0x1bcb33(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80022971:	e8 4a 08 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022976:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8002297d:	e8 3e 08 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022982:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80022989:	e8 32 08 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002298e:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80022995:	e8 26 08 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002299a:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800229a1:	e8 1a 08 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800229a6:	48 c7 c7 b0 c0 02 80 	mov    $0xffffffff8002c0b0,%rdi
ffffffff800229ad:	e8 0e 08 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            }
        }

        Kt::KernelLogStream(Kt::OK, "SMP") << "All " << (uint64_t)g_cpuCount << " CPUs online";
ffffffff800229b2:	48 63 3d ab 8a 1a 00 	movslq 0x1a8aab(%rip),%rdi        # ffffffff801cb464 <_ZN3Smp10g_cpuCountE>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff800229b9:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff800229be:	e8 cd 7a ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff800229c3:	48 89 c7             	mov    %rax,%rdi
ffffffff800229c6:	e8 f5 07 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff800229cb:	48 c7 c7 b5 c0 02 80 	mov    $0xffffffff8002c0b5,%rdi
ffffffff800229d2:	e8 e9 07 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800229d7:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800229de:	e8 dd 07 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff800229e3:	8b 05 bb ca 1b 00    	mov    0x1bcabb(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800229e9:	83 e8 01             	sub    $0x1,%eax
ffffffff800229ec:	89 05 b2 ca 1b 00    	mov    %eax,0x1bcab2(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff800229f2:	48 83 c4 28          	add    $0x28,%rsp
ffffffff800229f6:	5b                   	pop    %rbx
ffffffff800229f7:	41 5c                	pop    %r12
ffffffff800229f9:	41 5d                	pop    %r13
ffffffff800229fb:	41 5e                	pop    %r14
ffffffff800229fd:	41 5f                	pop    %r15
ffffffff800229ff:	5d                   	pop    %rbp
ffffffff80022a00:	c3                   	ret
            Print(string);
ffffffff80022a01:	48 c7 c7 73 c0 02 80 	mov    $0xffffffff8002c073,%rdi
            g_kernelLogDepth++;
ffffffff80022a08:	83 05 95 ca 1b 00 01 	addl   $0x1,0x1bca95(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80022a0f:	e8 ac 07 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022a14:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80022a1b:	e8 a0 07 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022a20:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80022a27:	e8 94 07 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022a2c:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff80022a33:	e8 88 07 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022a38:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80022a3f:	e8 7c 07 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022a44:	48 c7 c7 b8 d1 02 80 	mov    $0xffffffff8002d1b8,%rdi
ffffffff80022a4b:	e8 70 07 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022a50:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80022a57:	e8 64 07 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80022a5c:	83 2d 41 ca 1b 00 01 	subl   $0x1,0x1bca41(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
                break;
ffffffff80022a63:	e9 c6 fe ff ff       	jmp    ffffffff8002292e <_ZN3Smp7BootAPsEP18limine_mp_response+0x19e>
            Print(string);
ffffffff80022a68:	48 c7 c7 73 c0 02 80 	mov    $0xffffffff8002c073,%rdi
            g_kernelLogDepth++;
ffffffff80022a6f:	89 05 2f ca 1b 00    	mov    %eax,0x1bca2f(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80022a75:	e8 46 07 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022a7a:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80022a81:	e8 3a 07 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022a86:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80022a8d:	e8 2e 07 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022a92:	48 c7 c7 78 a6 02 80 	mov    $0xffffffff8002a678,%rdi
ffffffff80022a99:	e8 22 07 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022a9e:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80022aa5:	e8 16 07 00 00       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80022aaa:	48 c7 c7 88 d1 02 80 	mov    $0xffffffff8002d188,%rdi
ffffffff80022ab1:	e9 1c ff ff ff       	jmp    ffffffff800229d2 <_ZN3Smp7BootAPsEP18limine_mp_response+0x242>
ffffffff80022ab6:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80022abd:	00 00 00 

ffffffff80022ac0 <_ZN2KtL16RingBufferAppendEc>:
    // ANSI escape sequence filter state
    static bool g_ansiEscape = false;

    static void RingBufferAppend(char c) {
        // Strip ANSI escape sequences
        if (c == '\033') {
ffffffff80022ac0:	40 80 ff 1b          	cmp    $0x1b,%dil
ffffffff80022ac4:	74 5a                	je     ffffffff80022b20 <_ZN2KtL16RingBufferAppendEc+0x60>
            g_ansiEscape = true;
            return;
        }
        if (g_ansiEscape) {
ffffffff80022ac6:	80 3d bb c9 1a 00 00 	cmpb   $0x0,0x1ac9bb(%rip)        # ffffffff801cf488 <_ZN2KtL12g_ansiEscapeE>
ffffffff80022acd:	75 41                	jne    ffffffff80022b10 <_ZN2KtL16RingBufferAppendEc+0x50>
                g_ansiEscape = false;
            }
            return;
        }

        g_klogBuf[g_klogHead] = c;
ffffffff80022acf:	48 8b 05 c2 c9 1a 00 	mov    0x1ac9c2(%rip),%rax        # ffffffff801cf498 <_ZN2KtL10g_klogHeadE>
ffffffff80022ad6:	40 88 b8 a0 f4 1c 80 	mov    %dil,-0x7fe30b60(%rax)
        g_klogHead = (g_klogHead + 1) % KLOG_BUF_SIZE;
ffffffff80022add:	48 83 c0 01          	add    $0x1,%rax
ffffffff80022ae1:	25 ff ff 00 00       	and    $0xffff,%eax
ffffffff80022ae6:	48 89 05 ab c9 1a 00 	mov    %rax,0x1ac9ab(%rip)        # ffffffff801cf498 <_ZN2KtL10g_klogHeadE>
        if (g_klogCount < KLOG_BUF_SIZE) {
ffffffff80022aed:	48 8b 05 9c c9 1a 00 	mov    0x1ac99c(%rip),%rax        # ffffffff801cf490 <_ZN2KtL11g_klogCountE>
ffffffff80022af4:	48 3d ff ff 00 00    	cmp    $0xffff,%rax
ffffffff80022afa:	77 0b                	ja     ffffffff80022b07 <_ZN2KtL16RingBufferAppendEc+0x47>
            g_klogCount++;
ffffffff80022afc:	48 83 c0 01          	add    $0x1,%rax
ffffffff80022b00:	48 89 05 89 c9 1a 00 	mov    %rax,0x1ac989(%rip)        # ffffffff801cf490 <_ZN2KtL11g_klogCountE>
        }
    }
ffffffff80022b07:	c3                   	ret
ffffffff80022b08:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80022b0f:	00 
            if (c == 'm') {
ffffffff80022b10:	40 80 ff 6d          	cmp    $0x6d,%dil
ffffffff80022b14:	75 f1                	jne    ffffffff80022b07 <_ZN2KtL16RingBufferAppendEc+0x47>
                g_ansiEscape = false;
ffffffff80022b16:	c6 05 6b c9 1a 00 00 	movb   $0x0,0x1ac96b(%rip)        # ffffffff801cf488 <_ZN2KtL12g_ansiEscapeE>
ffffffff80022b1d:	c3                   	ret
ffffffff80022b1e:	66 90                	xchg   %ax,%ax
            g_ansiEscape = true;
ffffffff80022b20:	c6 05 61 c9 1a 00 01 	movb   $0x1,0x1ac961(%rip)        # ffffffff801cf488 <_ZN2KtL12g_ansiEscapeE>
            return;
ffffffff80022b27:	c3                   	ret
ffffffff80022b28:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80022b2f:	00 

ffffffff80022b30 <_ZN2KtL19plot_char_universalEP16flanterm_contextP16flanterm_fb_charmm>:
    // Custom plot_char that works for any font_scale_x/y >= 1.
    // This is the same algorithm as flanterm's plot_char_scaled_uncanvas
    // but lives outside fb.c so we can install it after rescaling.
    static void plot_char_universal(struct flanterm_context *_ctx,
                                    struct flanterm_fb_char *c,
                                    size_t x, size_t y) {
ffffffff80022b30:	55                   	push   %rbp
ffffffff80022b31:	48 89 e5             	mov    %rsp,%rbp
ffffffff80022b34:	41 57                	push   %r15
ffffffff80022b36:	41 56                	push   %r14
ffffffff80022b38:	41 55                	push   %r13
ffffffff80022b3a:	41 54                	push   %r12
ffffffff80022b3c:	53                   	push   %rbx
ffffffff80022b3d:	48 89 fb             	mov    %rdi,%rbx
ffffffff80022b40:	48 83 ec 28          	sub    $0x28,%rsp
        struct flanterm_fb_context *fbctx = (struct flanterm_fb_context *)_ctx;

        if (x >= _ctx->cols || y >= _ctx->rows) {
ffffffff80022b44:	48 3b 97 f8 01 00 00 	cmp    0x1f8(%rdi),%rdx
ffffffff80022b4b:	0f 83 44 01 00 00    	jae    ffffffff80022c95 <_ZN2KtL19plot_char_universalEP16flanterm_contextP16flanterm_fb_charmm+0x165>
ffffffff80022b51:	48 3b 8f f0 01 00 00 	cmp    0x1f0(%rdi),%rcx
ffffffff80022b58:	0f 83 37 01 00 00    	jae    ffffffff80022c95 <_ZN2KtL19plot_char_universalEP16flanterm_contextP16flanterm_fb_charmm+0x165>
ffffffff80022b5e:	44 8b 76 08          	mov    0x8(%rsi),%r14d
ffffffff80022b62:	8b 06                	mov    (%rsi),%eax
ffffffff80022b64:	48 89 d7             	mov    %rdx,%rdi
            return;
        }

        uint32_t default_bg = fbctx->default_bg;
        uint32_t bg = c->bg == 0xffffffff ? default_bg : c->bg;
ffffffff80022b67:	44 8b 6e 04          	mov    0x4(%rsi),%r13d
ffffffff80022b6b:	41 83 fe ff          	cmp    $0xffffffff,%r14d
ffffffff80022b6f:	75 07                	jne    ffffffff80022b78 <_ZN2KtL19plot_char_universalEP16flanterm_contextP16flanterm_fb_charmm+0x48>
        uint32_t default_bg = fbctx->default_bg;
ffffffff80022b71:	44 8b b3 b4 03 00 00 	mov    0x3b4(%rbx),%r14d
        uint32_t fg = c->fg == 0xffffffff ? fbctx->default_fg : c->fg;
ffffffff80022b78:	41 83 fd ff          	cmp    $0xffffffff,%r13d
ffffffff80022b7c:	75 07                	jne    ffffffff80022b85 <_ZN2KtL19plot_char_universalEP16flanterm_contextP16flanterm_fb_charmm+0x55>
ffffffff80022b7e:	44 8b ab b0 03 00 00 	mov    0x3b0(%rbx),%r13d

        x = fbctx->offset_x + x * fbctx->glyph_width;
        y = fbctx->offset_y + y * fbctx->glyph_height;

        bool *glyph = &fbctx->font_bool[c->c * fbctx->font_height * fbctx->font_width];
ffffffff80022b85:	48 0f af 83 d8 02 00 	imul   0x2d8(%rbx),%rax
ffffffff80022b8c:	00 
ffffffff80022b8d:	48 8b 93 68 03 00 00 	mov    0x368(%rbx),%rdx
        y = fbctx->offset_y + y * fbctx->glyph_height;
ffffffff80022b94:	48 8b b3 e8 02 00 00 	mov    0x2e8(%rbx),%rsi
        bool *glyph = &fbctx->font_bool[c->c * fbctx->font_height * fbctx->font_width];
ffffffff80022b9b:	4c 8b 9b d0 02 00 00 	mov    0x2d0(%rbx),%r11
ffffffff80022ba2:	48 89 55 c0          	mov    %rdx,-0x40(%rbp)

        // Only ROTATE_0 is used in ZenithOS
        volatile uint32_t *dest = fbctx->framebuffer + x + y * (fbctx->pitch / 4);
ffffffff80022ba6:	48 8b 93 18 03 00 00 	mov    0x318(%rbx),%rdx
        bool *glyph = &fbctx->font_bool[c->c * fbctx->font_height * fbctx->font_width];
ffffffff80022bad:	48 89 45 b8          	mov    %rax,-0x48(%rbp)
        y = fbctx->offset_y + y * fbctx->glyph_height;
ffffffff80022bb1:	48 89 f0             	mov    %rsi,%rax
ffffffff80022bb4:	48 0f af c1          	imul   %rcx,%rax
        volatile uint32_t *dest = fbctx->framebuffer + x + y * (fbctx->pitch / 4);
ffffffff80022bb8:	48 89 d1             	mov    %rdx,%rcx
        y = fbctx->offset_y + y * fbctx->glyph_height;
ffffffff80022bbb:	48 03 83 08 03 00 00 	add    0x308(%rbx),%rax
ffffffff80022bc2:	48 89 75 c8          	mov    %rsi,-0x38(%rbp)
        volatile uint32_t *dest = fbctx->framebuffer + x + y * (fbctx->pitch / 4);
ffffffff80022bc6:	48 c1 e9 02          	shr    $0x2,%rcx
ffffffff80022bca:	48 0f af c1          	imul   %rcx,%rax
        x = fbctx->offset_x + x * fbctx->glyph_width;
ffffffff80022bce:	48 8b 8b e0 02 00 00 	mov    0x2e0(%rbx),%rcx
ffffffff80022bd5:	48 0f af cf          	imul   %rdi,%rcx
ffffffff80022bd9:	48 03 8b 00 03 00 00 	add    0x300(%rbx),%rcx
        volatile uint32_t *dest = fbctx->framebuffer + x + y * (fbctx->pitch / 4);
ffffffff80022be0:	48 01 c8             	add    %rcx,%rax
ffffffff80022be3:	48 8b 8b 10 03 00 00 	mov    0x310(%rbx),%rcx
ffffffff80022bea:	4c 8d 24 81          	lea    (%rcx,%rax,4),%r12
        size_t stride = fbctx->pitch / 4;

        for (size_t gy = 0; gy < fbctx->glyph_height; gy++) {
ffffffff80022bee:	48 85 f6             	test   %rsi,%rsi
ffffffff80022bf1:	0f 84 9e 00 00 00    	je     ffffffff80022c95 <_ZN2KtL19plot_char_universalEP16flanterm_contextP16flanterm_fb_charmm+0x165>
                    *fb_line = *glyph_pointer ? fg : bg;
                    fb_line++;
                }
                glyph_pointer++;
            }
            dest += stride;
ffffffff80022bf7:	48 83 e2 fc          	and    $0xfffffffffffffffc,%rdx
            size_t fy = gy / fbctx->font_scale_y;
ffffffff80022bfb:	4c 8b bb f8 02 00 00 	mov    0x2f8(%rbx),%r15
        for (size_t gy = 0; gy < fbctx->glyph_height; gy++) {
ffffffff80022c02:	31 c9                	xor    %ecx,%ecx
            dest += stride;
ffffffff80022c04:	48 89 55 b0          	mov    %rdx,-0x50(%rbp)
        for (size_t gy = 0; gy < fbctx->glyph_height; gy++) {
ffffffff80022c08:	4c 89 fe             	mov    %r15,%rsi
ffffffff80022c0b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            size_t fy = gy / fbctx->font_scale_y;
ffffffff80022c10:	48 89 c8             	mov    %rcx,%rax
ffffffff80022c13:	31 d2                	xor    %edx,%edx
            bool *glyph_pointer = glyph + (fy * fbctx->font_width);
ffffffff80022c15:	48 8b 7d b8          	mov    -0x48(%rbp),%rdi
            size_t fy = gy / fbctx->font_scale_y;
ffffffff80022c19:	48 f7 f6             	div    %rsi
            bool *glyph_pointer = glyph + (fy * fbctx->font_width);
ffffffff80022c1c:	48 01 f8             	add    %rdi,%rax
ffffffff80022c1f:	48 8b 7d c0          	mov    -0x40(%rbp),%rdi
ffffffff80022c23:	49 0f af c3          	imul   %r11,%rax
ffffffff80022c27:	4c 8d 04 07          	lea    (%rdi,%rax,1),%r8
            for (size_t fx = 0; fx < fbctx->font_width; fx++) {
ffffffff80022c2b:	4d 85 db             	test   %r11,%r11
ffffffff80022c2e:	74 50                	je     ffffffff80022c80 <_ZN2KtL19plot_char_universalEP16flanterm_contextP16flanterm_fb_charmm+0x150>
                for (size_t i = 0; i < fbctx->font_scale_x; i++) {
ffffffff80022c30:	48 8b bb f0 02 00 00 	mov    0x2f0(%rbx),%rdi
ffffffff80022c37:	4f 8d 14 18          	lea    (%r8,%r11,1),%r10
ffffffff80022c3b:	48 85 ff             	test   %rdi,%rdi
ffffffff80022c3e:	74 40                	je     ffffffff80022c80 <_ZN2KtL19plot_char_universalEP16flanterm_contextP16flanterm_fb_charmm+0x150>
ffffffff80022c40:	4c 89 5d d0          	mov    %r11,-0x30(%rbp)
ffffffff80022c44:	4d 89 e1             	mov    %r12,%r9
ffffffff80022c47:	4c 8d 3c bd 00 00 00 	lea    0x0(,%rdi,4),%r15
ffffffff80022c4e:	00 
ffffffff80022c4f:	90                   	nop
ffffffff80022c50:	41 80 38 00          	cmpb   $0x0,(%r8)
ffffffff80022c54:	45 89 f3             	mov    %r14d,%r11d
                    *fb_line = *glyph_pointer ? fg : bg;
ffffffff80022c57:	4c 89 ca             	mov    %r9,%rdx
ffffffff80022c5a:	45 0f 45 dd          	cmovne %r13d,%r11d
                for (size_t i = 0; i < fbctx->font_scale_x; i++) {
ffffffff80022c5e:	31 c0                	xor    %eax,%eax
ffffffff80022c60:	48 83 c0 01          	add    $0x1,%rax
                    *fb_line = *glyph_pointer ? fg : bg;
ffffffff80022c64:	44 89 1a             	mov    %r11d,(%rdx)
                    fb_line++;
ffffffff80022c67:	48 83 c2 04          	add    $0x4,%rdx
                for (size_t i = 0; i < fbctx->font_scale_x; i++) {
ffffffff80022c6b:	48 39 f8             	cmp    %rdi,%rax
ffffffff80022c6e:	75 f0                	jne    ffffffff80022c60 <_ZN2KtL19plot_char_universalEP16flanterm_contextP16flanterm_fb_charmm+0x130>
                glyph_pointer++;
ffffffff80022c70:	49 83 c0 01          	add    $0x1,%r8
ffffffff80022c74:	4d 01 f9             	add    %r15,%r9
            for (size_t fx = 0; fx < fbctx->font_width; fx++) {
ffffffff80022c77:	4d 39 d0             	cmp    %r10,%r8
ffffffff80022c7a:	75 d4                	jne    ffffffff80022c50 <_ZN2KtL19plot_char_universalEP16flanterm_contextP16flanterm_fb_charmm+0x120>
ffffffff80022c7c:	4c 8b 5d d0          	mov    -0x30(%rbp),%r11
            dest += stride;
ffffffff80022c80:	48 8b 45 b0          	mov    -0x50(%rbp),%rax
        for (size_t gy = 0; gy < fbctx->glyph_height; gy++) {
ffffffff80022c84:	48 83 c1 01          	add    $0x1,%rcx
            dest += stride;
ffffffff80022c88:	49 01 c4             	add    %rax,%r12
        for (size_t gy = 0; gy < fbctx->glyph_height; gy++) {
ffffffff80022c8b:	48 39 4d c8          	cmp    %rcx,-0x38(%rbp)
ffffffff80022c8f:	0f 85 7b ff ff ff    	jne    ffffffff80022c10 <_ZN2KtL19plot_char_universalEP16flanterm_contextP16flanterm_fb_charmm+0xe0>
        }
    }
ffffffff80022c95:	48 83 c4 28          	add    $0x28,%rsp
ffffffff80022c99:	5b                   	pop    %rbx
ffffffff80022c9a:	41 5c                	pop    %r12
ffffffff80022c9c:	41 5d                	pop    %r13
ffffffff80022c9e:	41 5e                	pop    %r14
ffffffff80022ca0:	41 5f                	pop    %r15
ffffffff80022ca2:	5d                   	pop    %rbp
ffffffff80022ca3:	c3                   	ret
ffffffff80022ca4:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80022cab:	00 00 00 
ffffffff80022cae:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80022cb5:	00 00 00 
ffffffff80022cb8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80022cbf:	00 

ffffffff80022cc0 <_ZN2Kt7RescaleEmm>:

    void Rescale(std::size_t scale_x, std::size_t scale_y) {
ffffffff80022cc0:	55                   	push   %rbp
        if (scale_x == 0) scale_x = 1;
ffffffff80022cc1:	48 85 ff             	test   %rdi,%rdi
ffffffff80022cc4:	b8 01 00 00 00       	mov    $0x1,%eax
ffffffff80022cc9:	48 0f 45 c7          	cmovne %rdi,%rax
        if (scale_y == 0) scale_y = 1;
ffffffff80022ccd:	48 85 f6             	test   %rsi,%rsi
    void Rescale(std::size_t scale_x, std::size_t scale_y) {
ffffffff80022cd0:	48 89 e5             	mov    %rsp,%rbp
ffffffff80022cd3:	41 54                	push   %r12
        if (scale_x == 0) scale_x = 1;
ffffffff80022cd5:	49 89 c2             	mov    %rax,%r10
        if (scale_y == 0) scale_y = 1;
ffffffff80022cd8:	b8 01 00 00 00       	mov    $0x1,%eax
    void Rescale(std::size_t scale_x, std::size_t scale_y) {
ffffffff80022cdd:	53                   	push   %rbx

        struct flanterm_fb_context *fbctx = (struct flanterm_fb_context *)ctx;
ffffffff80022cde:	48 8b 1d cb c7 1b 00 	mov    0x1bc7cb(%rip),%rbx        # ffffffff801df4b0 <_ZN2Kt3ctxE>
        if (scale_y == 0) scale_y = 1;
ffffffff80022ce5:	48 0f 44 f0          	cmove  %rax,%rsi

        // Calculate new dimensions
        size_t new_glyph_w = fbctx->font_width * scale_x;
ffffffff80022ce9:	4c 8b 83 d0 02 00 00 	mov    0x2d0(%rbx),%r8
        size_t new_glyph_h = fbctx->font_height * scale_y;
ffffffff80022cf0:	4c 8b 8b d8 02 00 00 	mov    0x2d8(%rbx),%r9
        size_t new_cols = fbctx->width / new_glyph_w;
ffffffff80022cf7:	48 8b 83 20 03 00 00 	mov    0x320(%rbx),%rax
        size_t new_rows = fbctx->height / new_glyph_h;
ffffffff80022cfe:	48 8b bb 28 03 00 00 	mov    0x328(%rbx),%rdi
        size_t new_glyph_w = fbctx->font_width * scale_x;
ffffffff80022d05:	4d 0f af c2          	imul   %r10,%r8
        size_t new_glyph_h = fbctx->font_height * scale_y;
ffffffff80022d09:	4c 0f af ce          	imul   %rsi,%r9

        if (new_cols == 0 || new_rows == 0) return;
ffffffff80022d0d:	4c 39 c0             	cmp    %r8,%rax
ffffffff80022d10:	0f 82 62 01 00 00    	jb     ffffffff80022e78 <_ZN2Kt7RescaleEmm+0x1b8>
ffffffff80022d16:	4c 39 cf             	cmp    %r9,%rdi
ffffffff80022d19:	0f 82 59 01 00 00    	jb     ffffffff80022e78 <_ZN2Kt7RescaleEmm+0x1b8>
ffffffff80022d1f:	31 d2                	xor    %edx,%edx
ffffffff80022d21:	49 f7 f0             	div    %r8
ffffffff80022d24:	48 89 c1             	mov    %rax,%rcx
ffffffff80022d27:	49 89 d3             	mov    %rdx,%r11
ffffffff80022d2a:	48 89 f8             	mov    %rdi,%rax
ffffffff80022d2d:	31 d2                	xor    %edx,%edx
ffffffff80022d2f:	49 f7 f1             	div    %r9

        // Ensure the new grid fits within original buffer allocation
        if (new_cols * new_rows > g_max_grid_cells) return;
ffffffff80022d32:	49 89 cc             	mov    %rcx,%r12
ffffffff80022d35:	4c 0f af e0          	imul   %rax,%r12
ffffffff80022d39:	4c 39 25 40 c7 1a 00 	cmp    %r12,0x1ac740(%rip)        # ffffffff801cf480 <_ZN2KtL16g_max_grid_cellsE>
ffffffff80022d40:	0f 82 32 01 00 00    	jb     ffffffff80022e78 <_ZN2Kt7RescaleEmm+0x1b8>
        // Update terminal grid dimensions
        ctx->cols = new_cols;
        ctx->rows = new_rows;

        // Center the text area
        fbctx->offset_x = (fbctx->width % new_glyph_w) / 2;
ffffffff80022d46:	49 d1 eb             	shr    $1,%r11
        fbctx->offset_y = (fbctx->height % new_glyph_h) / 2;
ffffffff80022d49:	48 d1 ea             	shr    $1,%rdx
        fbctx->font_scale_x = scale_x;
ffffffff80022d4c:	4c 89 93 f0 02 00 00 	mov    %r10,0x2f0(%rbx)
        fbctx->font_scale_y = scale_y;
ffffffff80022d53:	48 89 b3 f8 02 00 00 	mov    %rsi,0x2f8(%rbx)
        fbctx->glyph_width = new_glyph_w;
ffffffff80022d5a:	4c 89 83 e0 02 00 00 	mov    %r8,0x2e0(%rbx)
        fbctx->glyph_height = new_glyph_h;
ffffffff80022d61:	4c 89 8b e8 02 00 00 	mov    %r9,0x2e8(%rbx)
        ctx->cols = new_cols;
ffffffff80022d68:	48 89 8b f8 01 00 00 	mov    %rcx,0x1f8(%rbx)
        ctx->rows = new_rows;
ffffffff80022d6f:	48 89 83 f0 01 00 00 	mov    %rax,0x1f0(%rbx)
        fbctx->offset_x = (fbctx->width % new_glyph_w) / 2;
ffffffff80022d76:	4c 89 9b 00 03 00 00 	mov    %r11,0x300(%rbx)
        fbctx->offset_y = (fbctx->height % new_glyph_h) / 2;
ffffffff80022d7d:	48 89 93 08 03 00 00 	mov    %rdx,0x308(%rbx)

        // Install our universal plot_char
        fbctx->plot_char = plot_char_universal;
ffffffff80022d84:	48 c7 83 c0 02 00 00 	movq   $0xffffffff80022b30,0x2c0(%rbx)
ffffffff80022d8b:	30 2b 02 80 

        // Reinitialize grid data (reuse existing buffers)
        for (size_t i = 0; i < new_rows * new_cols; i++) {
ffffffff80022d8f:	4d 85 e4             	test   %r12,%r12
ffffffff80022d92:	74 4d                	je     ffffffff80022de1 <_ZN2Kt7RescaleEmm+0x121>
ffffffff80022d94:	48 8b 83 e8 03 00 00 	mov    0x3e8(%rbx),%rax
ffffffff80022d9b:	4b 8d 14 64          	lea    (%r12,%r12,2),%rdx
ffffffff80022d9f:	48 8d 0c 90          	lea    (%rax,%rdx,4),%rcx
ffffffff80022da3:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80022daa:	00 00 00 00 
ffffffff80022dae:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80022db5:	00 00 00 00 
ffffffff80022db9:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            fbctx->grid[i].c = ' ';
ffffffff80022dc0:	c7 00 20 00 00 00    	movl   $0x20,(%rax)
            fbctx->grid[i].fg = fbctx->text_fg;
ffffffff80022dc6:	8b 93 08 04 00 00    	mov    0x408(%rbx),%edx
        for (size_t i = 0; i < new_rows * new_cols; i++) {
ffffffff80022dcc:	48 83 c0 0c          	add    $0xc,%rax
            fbctx->grid[i].fg = fbctx->text_fg;
ffffffff80022dd0:	89 50 f8             	mov    %edx,-0x8(%rax)
            fbctx->grid[i].bg = fbctx->text_bg;
ffffffff80022dd3:	8b 93 0c 04 00 00    	mov    0x40c(%rbx),%edx
ffffffff80022dd9:	89 50 fc             	mov    %edx,-0x4(%rax)
        for (size_t i = 0; i < new_rows * new_cols; i++) {
ffffffff80022ddc:	48 39 c8             	cmp    %rcx,%rax
ffffffff80022ddf:	75 df                	jne    ffffffff80022dc0 <_ZN2Kt7RescaleEmm+0x100>
        }

        fbctx->queue_i = 0;
ffffffff80022de1:	48 c7 83 f8 03 00 00 	movq   $0x0,0x3f8(%rbx)
ffffffff80022de8:	00 00 00 00 
        memset(fbctx->queue, 0, new_rows * new_cols * sizeof(struct flanterm_fb_queue_item));
ffffffff80022dec:	48 8b bb f0 03 00 00 	mov    0x3f0(%rbx),%rdi
ffffffff80022df3:	4c 89 e2             	mov    %r12,%rdx
ffffffff80022df6:	31 f6                	xor    %esi,%esi
ffffffff80022df8:	48 c1 e2 05          	shl    $0x5,%rdx
ffffffff80022dfc:	e8 1f 74 ff ff       	call   ffffffff8001a220 <memset>
        memset(fbctx->map, 0, new_rows * new_cols * sizeof(struct flanterm_fb_queue_item *));
ffffffff80022e01:	48 8b bb 00 04 00 00 	mov    0x400(%rbx),%rdi
ffffffff80022e08:	4a 8d 14 e5 00 00 00 	lea    0x0(,%r12,8),%rdx
ffffffff80022e0f:	00 
ffffffff80022e10:	31 f6                	xor    %esi,%esi
ffffffff80022e12:	e8 09 74 ff ff       	call   ffffffff8001a220 <memset>

        // Clear the framebuffer
        for (size_t y = 0; y < fbctx->height; y++) {
ffffffff80022e17:	48 8b bb 28 03 00 00 	mov    0x328(%rbx),%rdi
ffffffff80022e1e:	48 85 ff             	test   %rdi,%rdi
ffffffff80022e21:	74 34                	je     ffffffff80022e57 <_ZN2Kt7RescaleEmm+0x197>
            volatile uint32_t *row = fbctx->framebuffer + y * (fbctx->pitch / 4);
            for (size_t x = 0; x < fbctx->width; x++) {
ffffffff80022e23:	48 8b 83 20 03 00 00 	mov    0x320(%rbx),%rax
ffffffff80022e2a:	4c 8b 83 18 03 00 00 	mov    0x318(%rbx),%r8
        for (size_t y = 0; y < fbctx->height; y++) {
ffffffff80022e31:	31 f6                	xor    %esi,%esi
            for (size_t x = 0; x < fbctx->width; x++) {
ffffffff80022e33:	48 8b 8b 10 03 00 00 	mov    0x310(%rbx),%rcx
ffffffff80022e3a:	4c 8d 0c 85 00 00 00 	lea    0x0(,%rax,4),%r9
ffffffff80022e41:	00 
ffffffff80022e42:	49 83 e0 fc          	and    $0xfffffffffffffffc,%r8
ffffffff80022e46:	4c 01 c9             	add    %r9,%rcx
ffffffff80022e49:	48 85 c0             	test   %rax,%rax
ffffffff80022e4c:	75 3e                	jne    ffffffff80022e8c <_ZN2Kt7RescaleEmm+0x1cc>
        for (size_t y = 0; y < fbctx->height; y++) {
ffffffff80022e4e:	48 83 c6 01          	add    $0x1,%rsi
ffffffff80022e52:	48 39 fe             	cmp    %rdi,%rsi
ffffffff80022e55:	75 f7                	jne    ffffffff80022e4e <_ZN2Kt7RescaleEmm+0x18e>
                row[x] = fbctx->default_bg;
            }
        }

        // Reset terminal state and refresh
        flanterm_context_reinit(ctx);
ffffffff80022e57:	48 8b 3d 52 c6 1b 00 	mov    0x1bc652(%rip),%rdi        # ffffffff801df4b0 <_ZN2Kt3ctxE>
ffffffff80022e5e:	e8 0d e8 fd ff       	call   ffffffff80001670 <flanterm_context_reinit>
        flanterm_full_refresh(ctx);
ffffffff80022e63:	48 8b 3d 46 c6 1b 00 	mov    0x1bc646(%rip),%rdi        # ffffffff801df4b0 <_ZN2Kt3ctxE>
    }
ffffffff80022e6a:	5b                   	pop    %rbx
ffffffff80022e6b:	41 5c                	pop    %r12
ffffffff80022e6d:	5d                   	pop    %rbp
        flanterm_full_refresh(ctx);
ffffffff80022e6e:	e9 bd 19 fe ff       	jmp    ffffffff80004830 <flanterm_full_refresh>
ffffffff80022e73:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
    }
ffffffff80022e78:	5b                   	pop    %rbx
ffffffff80022e79:	41 5c                	pop    %r12
ffffffff80022e7b:	5d                   	pop    %rbp
ffffffff80022e7c:	c3                   	ret
ffffffff80022e7d:	0f 1f 00             	nopl   (%rax)
        for (size_t y = 0; y < fbctx->height; y++) {
ffffffff80022e80:	48 83 c6 01          	add    $0x1,%rsi
ffffffff80022e84:	4c 01 c1             	add    %r8,%rcx
ffffffff80022e87:	48 39 f7             	cmp    %rsi,%rdi
ffffffff80022e8a:	74 cb                	je     ffffffff80022e57 <_ZN2Kt7RescaleEmm+0x197>
ffffffff80022e8c:	48 89 c8             	mov    %rcx,%rax
ffffffff80022e8f:	4c 29 c8             	sub    %r9,%rax
ffffffff80022e92:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80022e99:	00 00 00 00 
ffffffff80022e9d:	0f 1f 00             	nopl   (%rax)
                row[x] = fbctx->default_bg;
ffffffff80022ea0:	8b 93 b4 03 00 00    	mov    0x3b4(%rbx),%edx
            for (size_t x = 0; x < fbctx->width; x++) {
ffffffff80022ea6:	48 83 c0 04          	add    $0x4,%rax
                row[x] = fbctx->default_bg;
ffffffff80022eaa:	89 50 fc             	mov    %edx,-0x4(%rax)
            for (size_t x = 0; x < fbctx->width; x++) {
ffffffff80022ead:	48 39 c8             	cmp    %rcx,%rax
ffffffff80022eb0:	75 ee                	jne    ffffffff80022ea0 <_ZN2Kt7RescaleEmm+0x1e0>
ffffffff80022eb2:	eb cc                	jmp    ffffffff80022e80 <_ZN2Kt7RescaleEmm+0x1c0>
ffffffff80022eb4:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80022ebb:	00 00 00 
ffffffff80022ebe:	66 90                	xchg   %ax,%ax

ffffffff80022ec0 <_ZN2Kt13GetFontScaleXEv>:

    std::size_t GetFontScaleX() {
        struct flanterm_fb_context *fbctx = (struct flanterm_fb_context *)ctx;
        return fbctx->font_scale_x;
ffffffff80022ec0:	48 8b 05 e9 c5 1b 00 	mov    0x1bc5e9(%rip),%rax        # ffffffff801df4b0 <_ZN2Kt3ctxE>
ffffffff80022ec7:	48 8b 80 f0 02 00 00 	mov    0x2f0(%rax),%rax
    }
ffffffff80022ece:	c3                   	ret
ffffffff80022ecf:	90                   	nop

ffffffff80022ed0 <_ZN2Kt13GetFontScaleYEv>:

    std::size_t GetFontScaleY() {
        struct flanterm_fb_context *fbctx = (struct flanterm_fb_context *)ctx;
        return fbctx->font_scale_y;
ffffffff80022ed0:	48 8b 05 d9 c5 1b 00 	mov    0x1bc5d9(%rip),%rax        # ffffffff801df4b0 <_ZN2Kt3ctxE>
ffffffff80022ed7:	48 8b 80 f8 02 00 00 	mov    0x2f8(%rax),%rax
    }
ffffffff80022ede:	c3                   	ret
ffffffff80022edf:	90                   	nop

ffffffff80022ee0 <_ZN2Kt7PutcharEc>:

        UpdatePanelBar("Initializing...");
        kout << "\n\n\n";
    }

    void Putchar(char c) {
ffffffff80022ee0:	55                   	push   %rbp
ffffffff80022ee1:	48 89 e5             	mov    %rsp,%rbp
ffffffff80022ee4:	48 83 ec 10          	sub    $0x10,%rsp
        if (g_kernelLogDepth > 0) {
ffffffff80022ee8:	8b 05 b6 c5 1b 00    	mov    0x1bc5b6(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    void Putchar(char c) {
ffffffff80022eee:	40 88 7d fc          	mov    %dil,-0x4(%rbp)
        if (g_kernelLogDepth > 0) {
ffffffff80022ef2:	85 c0                	test   %eax,%eax
ffffffff80022ef4:	74 18                	je     ffffffff80022f0e <_ZN2Kt7PutcharEc+0x2e>
            if (c == '\n') {
ffffffff80022ef6:	40 80 ff 0a          	cmp    $0xa,%dil
ffffffff80022efa:	74 34                	je     ffffffff80022f30 <_ZN2Kt7PutcharEc+0x50>
                RingBufferAppend('\r');
                RingBufferAppend('\n');
            } else {
                RingBufferAppend(c);
ffffffff80022efc:	40 0f be ff          	movsbl %dil,%edi
ffffffff80022f00:	e8 bb fb ff ff       	call   ffffffff80022ac0 <_ZN2KtL16RingBufferAppendEc>
            }

            if (g_suppressKernelLog) {
ffffffff80022f05:	80 3d 94 c5 1b 00 00 	cmpb   $0x0,0x1bc594(%rip)        # ffffffff801df4a0 <_ZN2Kt19g_suppressKernelLogE>
ffffffff80022f0c:	75 1b                	jne    ffffffff80022f29 <_ZN2Kt7PutcharEc+0x49>
                return;
            }
        }

        if (c == '\n') {
ffffffff80022f0e:	80 7d fc 0a          	cmpb   $0xa,-0x4(%rbp)
            flanterm_write(ctx, "\r\n", 2);
ffffffff80022f12:	48 8b 3d 97 c5 1b 00 	mov    0x1bc597(%rip),%rdi        # ffffffff801df4b0 <_ZN2Kt3ctxE>
        if (c == '\n') {
ffffffff80022f19:	74 35                	je     ffffffff80022f50 <_ZN2Kt7PutcharEc+0x70>
            return;
        }
        flanterm_write(ctx, &c, 1);
ffffffff80022f1b:	48 8d 75 fc          	lea    -0x4(%rbp),%rsi
ffffffff80022f1f:	ba 01 00 00 00       	mov    $0x1,%edx
ffffffff80022f24:	e8 17 e8 fd ff       	call   ffffffff80001740 <flanterm_write>
    }
ffffffff80022f29:	c9                   	leave
ffffffff80022f2a:	c3                   	ret
ffffffff80022f2b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
                RingBufferAppend('\r');
ffffffff80022f30:	bf 0d 00 00 00       	mov    $0xd,%edi
ffffffff80022f35:	e8 86 fb ff ff       	call   ffffffff80022ac0 <_ZN2KtL16RingBufferAppendEc>
                RingBufferAppend('\n');
ffffffff80022f3a:	bf 0a 00 00 00       	mov    $0xa,%edi
ffffffff80022f3f:	e8 7c fb ff ff       	call   ffffffff80022ac0 <_ZN2KtL16RingBufferAppendEc>
ffffffff80022f44:	eb bf                	jmp    ffffffff80022f05 <_ZN2Kt7PutcharEc+0x25>
ffffffff80022f46:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80022f4d:	00 00 00 
            flanterm_write(ctx, "\r\n", 2);
ffffffff80022f50:	ba 02 00 00 00       	mov    $0x2,%edx
ffffffff80022f55:	48 c7 c6 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rsi
ffffffff80022f5c:	e8 df e7 fd ff       	call   ffffffff80001740 <flanterm_write>
    }
ffffffff80022f61:	c9                   	leave
ffffffff80022f62:	c3                   	ret
ffffffff80022f63:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80022f6a:	00 00 00 
ffffffff80022f6d:	0f 1f 00             	nopl   (%rax)

ffffffff80022f70 <_ZN2Kt14UpdatePanelBarEPKc>:
    void UpdatePanelBar(CString panelText) {
ffffffff80022f70:	55                   	push   %rbp
ffffffff80022f71:	48 89 e5             	mov    %rsp,%rbp
ffffffff80022f74:	41 57                	push   %r15
ffffffff80022f76:	41 56                	push   %r14
ffffffff80022f78:	41 55                	push   %r13
ffffffff80022f7a:	41 54                	push   %r12
ffffffff80022f7c:	49 c7 c4 c3 c0 02 80 	mov    $0xffffffff8002c0c3,%r12
ffffffff80022f83:	53                   	push   %rbx
ffffffff80022f84:	48 89 fb             	mov    %rdi,%rbx

    void Print(const char *text) {
        for (size_t i = 0; text[i] != '\0'; i++) {
ffffffff80022f87:	bf 1b 00 00 00       	mov    $0x1b,%edi
    void UpdatePanelBar(CString panelText) {
ffffffff80022f8c:	48 83 ec 08          	sub    $0x8,%rsp
            Putchar(text[i]);
ffffffff80022f90:	e8 4b ff ff ff       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
        for (size_t i = 0; text[i] != '\0'; i++) {
ffffffff80022f95:	41 0f be 3c 24       	movsbl (%r12),%edi
ffffffff80022f9a:	49 83 c4 01          	add    $0x1,%r12
ffffffff80022f9e:	40 84 ff             	test   %dil,%dil
ffffffff80022fa1:	75 ed                	jne    ffffffff80022f90 <_ZN2Kt14UpdatePanelBarEPKc+0x20>
ffffffff80022fa3:	49 c7 c4 c7 c0 02 80 	mov    $0xffffffff8002c0c7,%r12
ffffffff80022faa:	bf 1b 00 00 00       	mov    $0x1b,%edi
ffffffff80022faf:	90                   	nop
            Putchar(text[i]);
ffffffff80022fb0:	e8 2b ff ff ff       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
        for (size_t i = 0; text[i] != '\0'; i++) {
ffffffff80022fb5:	41 0f be 3c 24       	movsbl (%r12),%edi
ffffffff80022fba:	49 83 c4 01          	add    $0x1,%r12
ffffffff80022fbe:	40 84 ff             	test   %dil,%dil
ffffffff80022fc1:	75 ed                	jne    ffffffff80022fb0 <_ZN2Kt14UpdatePanelBarEPKc+0x40>
        int panelWidth = g_terminal_width / 9;
ffffffff80022fc3:	48 ba 8f e3 38 8e e3 	movabs $0xe38e38e38e38e38f,%rdx
ffffffff80022fca:	38 8e e3 
ffffffff80022fcd:	49 c7 c6 cb c0 02 80 	mov    $0xffffffff8002c0cb,%r14
        for (size_t i = 0; text[i] != '\0'; i++) {
ffffffff80022fd4:	bf 1b 00 00 00       	mov    $0x1b,%edi
        int panelWidth = g_terminal_width / 9;
ffffffff80022fd9:	48 89 d0             	mov    %rdx,%rax
ffffffff80022fdc:	48 f7 25 c5 c4 1b 00 	mulq   0x1bc4c5(%rip)        # ffffffff801df4a8 <_ZN2Kt16g_terminal_widthE>
ffffffff80022fe3:	48 c1 ea 03          	shr    $0x3,%rdx
ffffffff80022fe7:	49 89 d5             	mov    %rdx,%r13
ffffffff80022fea:	41 89 d4             	mov    %edx,%r12d
        for (size_t i = 0; text[i] != '\0'; i++) {
ffffffff80022fed:	0f 1f 00             	nopl   (%rax)
            Putchar(text[i]);
ffffffff80022ff0:	e8 eb fe ff ff       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
        for (size_t i = 0; text[i] != '\0'; i++) {
ffffffff80022ff5:	41 0f be 3e          	movsbl (%r14),%edi
ffffffff80022ff9:	49 83 c6 01          	add    $0x1,%r14
ffffffff80022ffd:	40 84 ff             	test   %dil,%dil
ffffffff80023000:	75 ee                	jne    ffffffff80022ff0 <_ZN2Kt14UpdatePanelBarEPKc+0x80>
ffffffff80023002:	49 c7 c6 cc a4 02 80 	mov    $0xffffffff8002a4cc,%r14
ffffffff80023009:	bf 1b 00 00 00       	mov    $0x1b,%edi
ffffffff8002300e:	66 90                	xchg   %ax,%ax
            Putchar(text[i]);
ffffffff80023010:	e8 cb fe ff ff       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
        for (size_t i = 0; text[i] != '\0'; i++) {
ffffffff80023015:	41 0f be 3e          	movsbl (%r14),%edi
ffffffff80023019:	49 83 c6 01          	add    $0x1,%r14
ffffffff8002301d:	40 84 ff             	test   %dil,%dil
ffffffff80023020:	75 ee                	jne    ffffffff80023010 <_ZN2Kt14UpdatePanelBarEPKc+0xa0>
ffffffff80023022:	0f be 3b             	movsbl (%rbx),%edi
ffffffff80023025:	40 84 ff             	test   %dil,%dil
ffffffff80023028:	0f 84 b2 00 00 00    	je     ffffffff800230e0 <_ZN2Kt14UpdatePanelBarEPKc+0x170>
ffffffff8002302e:	4c 8d 7b 01          	lea    0x1(%rbx),%r15
ffffffff80023032:	4d 89 fe             	mov    %r15,%r14
ffffffff80023035:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8002303c:	00 00 00 00 
            Putchar(text[i]);
ffffffff80023040:	e8 9b fe ff ff       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
        for (size_t i = 0; text[i] != '\0'; i++) {
ffffffff80023045:	41 0f be 3e          	movsbl (%r14),%edi
ffffffff80023049:	49 83 c6 01          	add    $0x1,%r14
ffffffff8002304d:	40 84 ff             	test   %dil,%dil
ffffffff80023050:	75 ee                	jne    ffffffff80023040 <_ZN2Kt14UpdatePanelBarEPKc+0xd0>
ffffffff80023052:	80 3b 00             	cmpb   $0x0,(%rbx)
ffffffff80023055:	0f 84 85 00 00 00    	je     ffffffff800230e0 <_ZN2Kt14UpdatePanelBarEPKc+0x170>
        int c = 0;
ffffffff8002305b:	31 db                	xor    %ebx,%ebx
ffffffff8002305d:	eb 05                	jmp    ffffffff80023064 <_ZN2Kt14UpdatePanelBarEPKc+0xf4>
ffffffff8002305f:	90                   	nop
ffffffff80023060:	49 83 c7 01          	add    $0x1,%r15
            c++;            
ffffffff80023064:	83 c3 01             	add    $0x1,%ebx
        while (*string != '\0') {
ffffffff80023067:	41 80 3f 00          	cmpb   $0x0,(%r15)
ffffffff8002306b:	75 f3                	jne    ffffffff80023060 <_ZN2Kt14UpdatePanelBarEPKc+0xf0>
        for (int i = static_cast<int>(Lib::strlen(panelText)); i < panelWidth; ++i)
ffffffff8002306d:	41 39 dd             	cmp    %ebx,%r13d
ffffffff80023070:	7e 20                	jle    ffffffff80023092 <_ZN2Kt14UpdatePanelBarEPKc+0x122>
ffffffff80023072:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80023079:	00 00 00 00 
ffffffff8002307d:	0f 1f 00             	nopl   (%rax)
            Putchar(text[i]);
ffffffff80023080:	bf 20 00 00 00       	mov    $0x20,%edi
        for (int i = static_cast<int>(Lib::strlen(panelText)); i < panelWidth; ++i)
ffffffff80023085:	83 c3 01             	add    $0x1,%ebx
            Putchar(text[i]);
ffffffff80023088:	e8 53 fe ff ff       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
        for (int i = static_cast<int>(Lib::strlen(panelText)); i < panelWidth; ++i)
ffffffff8002308d:	41 39 dc             	cmp    %ebx,%r12d
ffffffff80023090:	75 ee                	jne    ffffffff80023080 <_ZN2Kt14UpdatePanelBarEPKc+0x110>
        for (size_t i = 0; text[i] != '\0'; i++) {
ffffffff80023092:	48 c7 c3 87 a6 02 80 	mov    $0xffffffff8002a687,%rbx
ffffffff80023099:	bf 1b 00 00 00       	mov    $0x1b,%edi
ffffffff8002309e:	66 90                	xchg   %ax,%ax
            Putchar(text[i]);
ffffffff800230a0:	e8 3b fe ff ff       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
        for (size_t i = 0; text[i] != '\0'; i++) {
ffffffff800230a5:	0f be 3b             	movsbl (%rbx),%edi
ffffffff800230a8:	48 83 c3 01          	add    $0x1,%rbx
ffffffff800230ac:	40 84 ff             	test   %dil,%dil
ffffffff800230af:	75 ef                	jne    ffffffff800230a0 <_ZN2Kt14UpdatePanelBarEPKc+0x130>
ffffffff800230b1:	48 c7 c3 d1 c0 02 80 	mov    $0xffffffff8002c0d1,%rbx
ffffffff800230b8:	bf 1b 00 00 00       	mov    $0x1b,%edi
ffffffff800230bd:	0f 1f 00             	nopl   (%rax)
            Putchar(text[i]);
ffffffff800230c0:	e8 1b fe ff ff       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
        for (size_t i = 0; text[i] != '\0'; i++) {
ffffffff800230c5:	0f be 3b             	movsbl (%rbx),%edi
ffffffff800230c8:	48 83 c3 01          	add    $0x1,%rbx
ffffffff800230cc:	40 84 ff             	test   %dil,%dil
ffffffff800230cf:	75 ef                	jne    ffffffff800230c0 <_ZN2Kt14UpdatePanelBarEPKc+0x150>
    }
ffffffff800230d1:	48 83 c4 08          	add    $0x8,%rsp
ffffffff800230d5:	5b                   	pop    %rbx
ffffffff800230d6:	41 5c                	pop    %r12
ffffffff800230d8:	41 5d                	pop    %r13
ffffffff800230da:	41 5e                	pop    %r14
ffffffff800230dc:	41 5f                	pop    %r15
ffffffff800230de:	5d                   	pop    %rbp
ffffffff800230df:	c3                   	ret
        int c = 0;
ffffffff800230e0:	31 db                	xor    %ebx,%ebx
ffffffff800230e2:	eb 89                	jmp    ffffffff8002306d <_ZN2Kt14UpdatePanelBarEPKc+0xfd>
ffffffff800230e4:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800230eb:	00 00 00 
ffffffff800230ee:	66 90                	xchg   %ax,%ax

ffffffff800230f0 <_ZN2Kt10InitializeEPjmmmhhhhhh>:
    {
ffffffff800230f0:	55                   	push   %rbp
        ctx = flanterm_fb_init(
ffffffff800230f1:	45 0f b6 c9          	movzbl %r9b,%r9d
ffffffff800230f5:	45 0f b6 c0          	movzbl %r8b,%r8d
    {
ffffffff800230f9:	48 89 e5             	mov    %rsp,%rbp
ffffffff800230fc:	53                   	push   %rbx
ffffffff800230fd:	48 89 f3             	mov    %rsi,%rbx
ffffffff80023100:	48 83 ec 10          	sub    $0x10,%rsp
        ctx = flanterm_fb_init(
ffffffff80023104:	6a 00                	push   $0x0
ffffffff80023106:	6a 00                	push   $0x0
ffffffff80023108:	6a 01                	push   $0x1
ffffffff8002310a:	6a 01                	push   $0x1
ffffffff8002310c:	6a 01                	push   $0x1
ffffffff8002310e:	6a 00                	push   $0x0
ffffffff80023110:	6a 00                	push   $0x0
ffffffff80023112:	6a 00                	push   $0x0
ffffffff80023114:	6a 00                	push   $0x0
ffffffff80023116:	6a 00                	push   $0x0
ffffffff80023118:	6a 00                	push   $0x0
ffffffff8002311a:	6a 00                	push   $0x0
ffffffff8002311c:	6a 00                	push   $0x0
ffffffff8002311e:	6a 00                	push   $0x0
ffffffff80023120:	0f b6 75 28          	movzbl 0x28(%rbp),%esi
ffffffff80023124:	6a 00                	push   $0x0
ffffffff80023126:	56                   	push   %rsi
ffffffff80023127:	0f b6 75 20          	movzbl 0x20(%rbp),%esi
ffffffff8002312b:	56                   	push   %rsi
ffffffff8002312c:	0f b6 75 18          	movzbl 0x18(%rbp),%esi
ffffffff80023130:	56                   	push   %rsi
ffffffff80023131:	0f b6 75 10          	movzbl 0x10(%rbp),%esi
ffffffff80023135:	56                   	push   %rsi
ffffffff80023136:	31 f6                	xor    %esi,%esi
ffffffff80023138:	41 51                	push   %r9
ffffffff8002313a:	49 89 c9             	mov    %rcx,%r9
ffffffff8002313d:	48 89 d9             	mov    %rbx,%rcx
ffffffff80023140:	41 50                	push   %r8
ffffffff80023142:	49 89 d0             	mov    %rdx,%r8
ffffffff80023145:	48 89 fa             	mov    %rdi,%rdx
ffffffff80023148:	31 ff                	xor    %edi,%edi
ffffffff8002314a:	e8 71 2d fe ff       	call   ffffffff80005ec0 <flanterm_fb_init>
        UpdatePanelBar("Initializing...");
ffffffff8002314f:	48 c7 c7 d4 c0 02 80 	mov    $0xffffffff8002c0d4,%rdi
ffffffff80023156:	48 81 c4 b0 00 00 00 	add    $0xb0,%rsp
        g_terminal_width = width;
ffffffff8002315d:	48 89 1d 44 c3 1b 00 	mov    %rbx,0x1bc344(%rip)        # ffffffff801df4a8 <_ZN2Kt16g_terminal_widthE>
        g_max_grid_cells = ctx->cols * ctx->rows;
ffffffff80023164:	48 8b 90 f8 01 00 00 	mov    0x1f8(%rax),%rdx
ffffffff8002316b:	48 0f af 90 f0 01 00 	imul   0x1f0(%rax),%rdx
ffffffff80023172:	00 
        fbctx->plot_char = plot_char_universal;
ffffffff80023173:	48 c7 80 c0 02 00 00 	movq   $0xffffffff80022b30,0x2c0(%rax)
ffffffff8002317a:	30 2b 02 80 
ffffffff8002317e:	48 c7 c3 e5 c0 02 80 	mov    $0xffffffff8002c0e5,%rbx
        ctx = flanterm_fb_init(
ffffffff80023185:	48 89 05 24 c3 1b 00 	mov    %rax,0x1bc324(%rip)        # ffffffff801df4b0 <_ZN2Kt3ctxE>
        g_max_grid_cells = ctx->cols * ctx->rows;
ffffffff8002318c:	48 89 15 ed c2 1a 00 	mov    %rdx,0x1ac2ed(%rip)        # ffffffff801cf480 <_ZN2KtL16g_max_grid_cellsE>
        UpdatePanelBar("Initializing...");
ffffffff80023193:	e8 d8 fd ff ff       	call   ffffffff80022f70 <_ZN2Kt14UpdatePanelBarEPKc>
        for (size_t i = 0; text[i] != '\0'; i++) {
ffffffff80023198:	bf 0a 00 00 00       	mov    $0xa,%edi
ffffffff8002319d:	0f 1f 00             	nopl   (%rax)
            Putchar(text[i]);
ffffffff800231a0:	e8 3b fd ff ff       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
        for (size_t i = 0; text[i] != '\0'; i++) {
ffffffff800231a5:	0f be 3b             	movsbl (%rbx),%edi
ffffffff800231a8:	48 83 c3 01          	add    $0x1,%rbx
ffffffff800231ac:	40 84 ff             	test   %dil,%dil
ffffffff800231af:	75 ef                	jne    ffffffff800231a0 <_ZN2Kt10InitializeEPjmmmhhhhhh+0xb0>
    }
ffffffff800231b1:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff800231b5:	c9                   	leave
ffffffff800231b6:	c3                   	ret
ffffffff800231b7:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff800231be:	00 00 

ffffffff800231c0 <_ZN2Kt5PrintEPKc>:
        for (size_t i = 0; text[i] != '\0'; i++) {
ffffffff800231c0:	0f b6 07             	movzbl (%rdi),%eax
ffffffff800231c3:	84 c0                	test   %al,%al
ffffffff800231c5:	74 39                	je     ffffffff80023200 <_ZN2Kt5PrintEPKc+0x40>
    void Print(const char *text) {
ffffffff800231c7:	55                   	push   %rbp
ffffffff800231c8:	48 89 e5             	mov    %rsp,%rbp
ffffffff800231cb:	53                   	push   %rbx
ffffffff800231cc:	48 8d 5f 01          	lea    0x1(%rdi),%rbx
ffffffff800231d0:	48 83 ec 08          	sub    $0x8,%rsp
ffffffff800231d4:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800231db:	00 00 00 00 
ffffffff800231df:	90                   	nop
            Putchar(text[i]);
ffffffff800231e0:	0f be f8             	movsbl %al,%edi
        for (size_t i = 0; text[i] != '\0'; i++) {
ffffffff800231e3:	48 83 c3 01          	add    $0x1,%rbx
            Putchar(text[i]);
ffffffff800231e7:	e8 f4 fc ff ff       	call   ffffffff80022ee0 <_ZN2Kt7PutcharEc>
        for (size_t i = 0; text[i] != '\0'; i++) {
ffffffff800231ec:	0f b6 43 ff          	movzbl -0x1(%rbx),%eax
ffffffff800231f0:	84 c0                	test   %al,%al
ffffffff800231f2:	75 ec                	jne    ffffffff800231e0 <_ZN2Kt5PrintEPKc+0x20>
        }
    }
ffffffff800231f4:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff800231f8:	c9                   	leave
ffffffff800231f9:	c3                   	ret
ffffffff800231fa:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
ffffffff80023200:	c3                   	ret
ffffffff80023201:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80023208:	00 00 00 
ffffffff8002320b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80023210 <_ZN2Kt17SuppressKernelLogEv>:

    void SuppressKernelLog() {
        g_suppressKernelLog = true;
ffffffff80023210:	c6 05 89 c2 1b 00 01 	movb   $0x1,0x1bc289(%rip)        # ffffffff801df4a0 <_ZN2Kt19g_suppressKernelLogE>
    }
ffffffff80023217:	c3                   	ret
ffffffff80023218:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8002321f:	00 

ffffffff80023220 <_ZN2Kt13ReadKernelLogEPcm>:

    int64_t ReadKernelLog(char* buf, uint64_t size) {
        if (buf == nullptr || size == 0) return 0;
ffffffff80023220:	48 85 ff             	test   %rdi,%rdi
ffffffff80023223:	74 6b                	je     ffffffff80023290 <_ZN2Kt13ReadKernelLogEPcm+0x70>
ffffffff80023225:	48 85 f6             	test   %rsi,%rsi
ffffffff80023228:	74 66                	je     ffffffff80023290 <_ZN2Kt13ReadKernelLogEPcm+0x70>

        uint64_t toRead = g_klogCount;
ffffffff8002322a:	48 8b 15 5f c2 1a 00 	mov    0x1ac25f(%rip),%rdx        # ffffffff801cf490 <_ZN2KtL11g_klogCountE>
        if (toRead > size) toRead = size;
ffffffff80023231:	48 89 f0             	mov    %rsi,%rax
ffffffff80023234:	48 39 d6             	cmp    %rdx,%rsi
ffffffff80023237:	48 0f 47 c2          	cmova  %rdx,%rax

        // Start position: oldest character in the ring buffer
        uint64_t start;
        if (g_klogCount < KLOG_BUF_SIZE) {
ffffffff8002323b:	48 81 fa ff ff 00 00 	cmp    $0xffff,%rdx
ffffffff80023242:	76 3c                	jbe    ffffffff80023280 <_ZN2Kt13ReadKernelLogEPcm+0x60>
        } else {
            start = g_klogHead; // head points to the oldest entry when full
        }

        // Copy from oldest to newest, skipping entries if buffer too small
        uint64_t skipCount = g_klogCount - toRead;
ffffffff80023244:	48 29 c2             	sub    %rax,%rdx
        uint64_t readPos = (start + skipCount) % KLOG_BUF_SIZE;
ffffffff80023247:	48 03 15 4a c2 1a 00 	add    0x1ac24a(%rip),%rdx        # ffffffff801cf498 <_ZN2KtL10g_klogHeadE>
ffffffff8002324e:	0f b7 d2             	movzwl %dx,%edx

        for (uint64_t i = 0; i < toRead; i++) {
ffffffff80023251:	48 8d 34 07          	lea    (%rdi,%rax,1),%rsi
ffffffff80023255:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff8002325c:	00 00 00 00 
            buf[i] = g_klogBuf[readPos];
ffffffff80023260:	0f b6 8a a0 f4 1c 80 	movzbl -0x7fe30b60(%rdx),%ecx
        for (uint64_t i = 0; i < toRead; i++) {
ffffffff80023267:	48 83 c7 01          	add    $0x1,%rdi
            readPos = (readPos + 1) % KLOG_BUF_SIZE;
ffffffff8002326b:	48 83 c2 01          	add    $0x1,%rdx
ffffffff8002326f:	0f b7 d2             	movzwl %dx,%edx
            buf[i] = g_klogBuf[readPos];
ffffffff80023272:	88 4f ff             	mov    %cl,-0x1(%rdi)
        for (uint64_t i = 0; i < toRead; i++) {
ffffffff80023275:	48 39 f7             	cmp    %rsi,%rdi
ffffffff80023278:	75 e6                	jne    ffffffff80023260 <_ZN2Kt13ReadKernelLogEPcm+0x40>
        }

        return (int64_t)toRead;
ffffffff8002327a:	c3                   	ret
ffffffff8002327b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
        uint64_t skipCount = g_klogCount - toRead;
ffffffff80023280:	48 29 c2             	sub    %rax,%rdx
        uint64_t readPos = (start + skipCount) % KLOG_BUF_SIZE;
ffffffff80023283:	0f b7 d2             	movzwl %dx,%edx
        for (uint64_t i = 0; i < toRead; i++) {
ffffffff80023286:	48 85 c0             	test   %rax,%rax
ffffffff80023289:	75 c6                	jne    ffffffff80023251 <_ZN2Kt13ReadKernelLogEPcm+0x31>
    }
ffffffff8002328b:	c3                   	ret
ffffffff8002328c:	0f 1f 40 00          	nopl   0x0(%rax)
        if (buf == nullptr || size == 0) return 0;
ffffffff80023290:	31 c0                	xor    %eax,%eax
    }
ffffffff80023292:	c3                   	ret
ffffffff80023293:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8002329a:	00 00 00 
ffffffff8002329d:	0f 1f 00             	nopl   (%rax)

ffffffff800232a0 <_ZN11TimekeepingL12TimerHandlerEh>:
    static uint32_t g_ticksPerMs = 0;

    static bool g_schedEnabled = false;

    // Timer IRQ handler: increment tick count, poll NIC, and drive scheduler
    static void TimerHandler(uint8_t) {
ffffffff800232a0:	55                   	push   %rbp
ffffffff800232a1:	48 89 e5             	mov    %rsp,%rbp
        Smp::PerCpu* cpu = Smp::GetCurrentCpu();
ffffffff800232a4:	e8 77 f3 ff ff       	call   ffffffff80022620 <_ZN3Smp13GetCurrentCpuEv>

        // Only BSP increments tick count and polls devices
        if (cpu->cpuIndex == 0) {
ffffffff800232a9:	8b 40 14             	mov    0x14(%rax),%eax
ffffffff800232ac:	85 c0                	test   %eax,%eax
ffffffff800232ae:	74 10                	je     ffffffff800232c0 <_ZN11TimekeepingL12TimerHandlerEh+0x20>
            Drivers::Net::E1000E::Poll();
            Drivers::USB::Xhci::ProcessDeferredWork();
        }

        // All CPUs drive the scheduler
        if (g_schedEnabled) {
ffffffff800232b0:	80 3d 01 c2 1b 00 00 	cmpb   $0x0,0x1bc201(%rip)        # ffffffff801df4b8 <_ZN11TimekeepingL14g_schedEnabledE>
ffffffff800232b7:	75 2c                	jne    ffffffff800232e5 <_ZN11TimekeepingL12TimerHandlerEh+0x45>
            Sched::Tick();
        }
    }
ffffffff800232b9:	5d                   	pop    %rbp
ffffffff800232ba:	c3                   	ret
ffffffff800232bb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
            g_tickCount = g_tickCount + 1;
ffffffff800232c0:	48 8b 05 f9 c1 1b 00 	mov    0x1bc1f9(%rip),%rax        # ffffffff801df4c0 <_ZN11TimekeepingL11g_tickCountE>
ffffffff800232c7:	48 83 c0 01          	add    $0x1,%rax
ffffffff800232cb:	48 89 05 ee c1 1b 00 	mov    %rax,0x1bc1ee(%rip)        # ffffffff801df4c0 <_ZN11TimekeepingL11g_tickCountE>
            Drivers::Net::E1000E::Poll();
ffffffff800232d2:	e8 19 d4 fe ff       	call   ffffffff800106f0 <_ZN7Drivers3Net6E1000E4PollEv>
            Drivers::USB::Xhci::ProcessDeferredWork();
ffffffff800232d7:	e8 74 1d ff ff       	call   ffffffff80015050 <_ZN7Drivers3USB4Xhci19ProcessDeferredWorkEv>
        if (g_schedEnabled) {
ffffffff800232dc:	80 3d d5 c1 1b 00 00 	cmpb   $0x0,0x1bc1d5(%rip)        # ffffffff801df4b8 <_ZN11TimekeepingL14g_schedEnabledE>
ffffffff800232e3:	74 d4                	je     ffffffff800232b9 <_ZN11TimekeepingL12TimerHandlerEh+0x19>
    }
ffffffff800232e5:	5d                   	pop    %rbp
            Sched::Tick();
ffffffff800232e6:	e9 85 eb ff ff       	jmp    ffffffff80021e70 <_ZN5Sched4TickEv>
ffffffff800232eb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff800232f0 <_ZN11Timekeeping19ApicTimerInitializeEv>:
        Hal::LocalApic::WriteRegister(Hal::LocalApic::REG_TIMER_INITIAL, 0);

        return elapsed;
    }

    void ApicTimerInitialize() {
ffffffff800232f0:	55                   	push   %rbp
ffffffff800232f1:	48 c7 c7 46 a3 02 80 	mov    $0xffffffff8002a346,%rdi
ffffffff800232f8:	48 89 e5             	mov    %rsp,%rbp
ffffffff800232fb:	41 54                	push   %r12
ffffffff800232fd:	53                   	push   %rbx
            g_kernelLogDepth++;
ffffffff800232fe:	83 05 9f c1 1b 00 01 	addl   $0x1,0x1bc19f(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80023305:	e8 b6 fe ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002330a:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80023311:	e8 aa fe ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80023316:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8002331d:	e8 9e fe ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80023322:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff80023329:	e8 92 fe ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002332e:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80023335:	e8 86 fe ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002333a:	48 c7 c7 e0 d1 02 80 	mov    $0xffffffff8002d1e0,%rdi
ffffffff80023341:	e8 7a fe ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80023346:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8002334d:	e8 6e fe ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80023352:	83 2d 4b c1 1b 00 01 	subl   $0x1,0x1bc14b(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80023359:	b8 b0 ff ff ff       	mov    $0xffffffb0,%eax
ffffffff8002335e:	e6 43                	out    %al,$0x43
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff80023360:	e4 61                	in     $0x61,%al
        gate &= ~0x02;   // Disable speaker (bit 1 = 0)
ffffffff80023362:	83 e0 fc             	and    $0xfffffffc,%eax
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff80023365:	e6 61                	out    %al,$0x61
ffffffff80023367:	b8 9b ff ff ff       	mov    $0xffffff9b,%eax
ffffffff8002336c:	e6 42                	out    %al,$0x42
ffffffff8002336e:	31 c0                	xor    %eax,%eax
ffffffff80023370:	e6 80                	out    %al,$0x80
ffffffff80023372:	b8 2e 00 00 00       	mov    $0x2e,%eax
ffffffff80023377:	e6 42                	out    %al,$0x42
        Hal::LocalApic::WriteRegister(Hal::LocalApic::REG_TIMER_DIVIDE, DIVIDE_BY_16);
ffffffff80023379:	be 03 00 00 00       	mov    $0x3,%esi
ffffffff8002337e:	bf e0 03 00 00       	mov    $0x3e0,%edi
ffffffff80023383:	e8 48 4d ff ff       	call   ffffffff800180d0 <_ZN3Hal9LocalApic13WriteRegisterEjj>
        Hal::LocalApic::WriteRegister(Hal::LocalApic::REG_TIMER_LVT, LVT_MASKED);
ffffffff80023388:	be 00 00 01 00       	mov    $0x10000,%esi
ffffffff8002338d:	bf 20 03 00 00       	mov    $0x320,%edi
ffffffff80023392:	e8 39 4d ff ff       	call   ffffffff800180d0 <_ZN3Hal9LocalApic13WriteRegisterEjj>
        Hal::LocalApic::WriteRegister(Hal::LocalApic::REG_TIMER_INITIAL, 0xFFFFFFFF);
ffffffff80023397:	be ff ff ff ff       	mov    $0xffffffff,%esi
ffffffff8002339c:	bf 80 03 00 00       	mov    $0x380,%edi
ffffffff800233a1:	e8 2a 4d ff ff       	call   ffffffff800180d0 <_ZN3Hal9LocalApic13WriteRegisterEjj>
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff800233a6:	e4 61                	in     $0x61,%al
        gate |= 0x01;    // Enable gate (bit 0 = 1)
ffffffff800233a8:	83 c8 01             	or     $0x1,%eax
        asm ("outb %0, %1" : : "a"(value), "Nd"(port) : "memory");
ffffffff800233ab:	e6 61                	out    %al,$0x61
        asm volatile("inb %1, %0" : "=a"(result) : "Nd"(port) : "memory");
ffffffff800233ad:	e4 61                	in     $0x61,%al
        while (!(Io::In8(PIT_GATE_PORT) & 0x20)) {
ffffffff800233af:	a8 20                	test   $0x20,%al
ffffffff800233b1:	75 15                	jne    ffffffff800233c8 <_ZN11Timekeeping19ApicTimerInitializeEv+0xd8>
ffffffff800233b3:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff800233ba:	00 00 00 00 
ffffffff800233be:	66 90                	xchg   %ax,%ax
            asm volatile("pause");
ffffffff800233c0:	f3 90                	pause
ffffffff800233c2:	e4 61                	in     $0x61,%al
        while (!(Io::In8(PIT_GATE_PORT) & 0x20)) {
ffffffff800233c4:	a8 20                	test   $0x20,%al
ffffffff800233c6:	74 f8                	je     ffffffff800233c0 <_ZN11Timekeeping19ApicTimerInitializeEv+0xd0>
        uint32_t currentCount = Hal::LocalApic::ReadRegister(Hal::LocalApic::REG_TIMER_CURRENT);
ffffffff800233c8:	bf 90 03 00 00       	mov    $0x390,%edi
ffffffff800233cd:	e8 de 4c ff ff       	call   ffffffff800180b0 <_ZN3Hal9LocalApic12ReadRegisterEj>
        Hal::LocalApic::WriteRegister(Hal::LocalApic::REG_TIMER_INITIAL, 0);
ffffffff800233d2:	31 f6                	xor    %esi,%esi
ffffffff800233d4:	bf 80 03 00 00       	mov    $0x380,%edi
        uint32_t elapsed = 0xFFFFFFFF - currentCount;
ffffffff800233d9:	f7 d0                	not    %eax
ffffffff800233db:	89 c3                	mov    %eax,%ebx
        Hal::LocalApic::WriteRegister(Hal::LocalApic::REG_TIMER_INITIAL, 0);
ffffffff800233dd:	e8 ee 4c ff ff       	call   ffffffff800180d0 <_ZN3Hal9LocalApic13WriteRegisterEjj>
        KernelLogStream(INFO, "Timer") << "Calibrating APIC timer using PIT channel 2";

        // Calibrate: measure APIC ticks over ~10ms
        uint32_t ticksIn10ms = CalibratePit();
        g_ticksPerMs = ticksIn10ms / 10;
ffffffff800233e2:	b8 cd cc cc cc       	mov    $0xcccccccd,%eax
        uint32_t elapsed = 0xFFFFFFFF - currentCount;
ffffffff800233e7:	49 89 dc             	mov    %rbx,%r12
        g_ticksPerMs = ticksIn10ms / 10;
ffffffff800233ea:	48 0f af d8          	imul   %rax,%rbx
            g_kernelLogDepth++;
ffffffff800233ee:	8b 05 b0 c0 1b 00    	mov    0x1bc0b0(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800233f4:	83 c0 01             	add    $0x1,%eax
ffffffff800233f7:	48 c1 eb 23          	shr    $0x23,%rbx
ffffffff800233fb:	89 1d bb c0 1b 00    	mov    %ebx,0x1bc0bb(%rip)        # ffffffff801df4bc <_ZN11TimekeepingL12g_ticksPerMsE>

        if (g_ticksPerMs == 0) {
ffffffff80023401:	41 83 fc 09          	cmp    $0x9,%r12d
ffffffff80023405:	0f 86 9d 01 00 00    	jbe    ffffffff800235a8 <_ZN11Timekeeping19ApicTimerInitializeEv+0x2b8>
            Print(string);
ffffffff8002340b:	48 c7 c7 46 a3 02 80 	mov    $0xffffffff8002a346,%rdi
            g_kernelLogDepth++;
ffffffff80023412:	89 05 8c c0 1b 00    	mov    %eax,0x1bc08c(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            KernelLogStream(ERROR, "Timer") << "APIC timer calibration failed (0 ticks/ms)";
            return;
        }

        // Export calibrated value for AP use
        Smp::g_ticksPerMs = g_ticksPerMs;
ffffffff80023418:	89 1d 42 80 1a 00    	mov    %ebx,0x1a8042(%rip)        # ffffffff801cb460 <_ZN3Smp12g_ticksPerMsE>
            Print(string);
ffffffff8002341e:	e8 9d fd ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80023423:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff8002342a:	e8 91 fd ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002342f:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80023436:	e8 85 fd ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002343b:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff80023442:	e8 79 fd ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80023447:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff8002344e:	e8 6d fd ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80023453:	48 c7 c7 e8 c0 02 80 	mov    $0xffffffff8002c0e8,%rdi
ffffffff8002345a:	e8 61 fd ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>

        uint64_t timerFreqHz = (uint64_t)g_ticksPerMs * 1000;

        KernelLogStream(OK, "Timer") << "APIC timer: " << base::dec << (uint64_t)g_ticksPerMs
ffffffff8002345f:	8b 3d 57 c0 1b 00    	mov    0x1bc057(%rip),%edi        # ffffffff801df4bc <_ZN11TimekeepingL12g_ticksPerMsE>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80023465:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8002346a:	e8 21 70 ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff8002346f:	48 89 c7             	mov    %rax,%rdi
ffffffff80023472:	e8 49 fd ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80023477:	48 c7 c7 f5 c0 02 80 	mov    $0xffffffff8002c0f5,%rdi
ffffffff8002347e:	e8 3d fd ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
        uint64_t timerFreqHz = (uint64_t)g_ticksPerMs * 1000;
ffffffff80023483:	89 df                	mov    %ebx,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff80023485:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8002348a:	48 69 ff e8 03 00 00 	imul   $0x3e8,%rdi,%rdi
ffffffff80023491:	e8 fa 6f ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80023496:	48 89 c7             	mov    %rax,%rdi
ffffffff80023499:	e8 22 fd ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff8002349e:	48 c7 c7 01 c1 02 80 	mov    $0xffffffff8002c101,%rdi
ffffffff800234a5:	e8 16 fd ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800234aa:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff800234b1:	e8 0a fd ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            << " ticks/ms (" << timerFreqHz << " Hz, divide-by-16)";

        // Register IRQ handler for timer (IRQ 0 = vector 32)
        Hal::RegisterIrqHandler(Hal::IRQ_TIMER, TimerHandler);
ffffffff800234b6:	48 c7 c6 a0 32 02 80 	mov    $0xffffffff800232a0,%rsi
ffffffff800234bd:	31 ff                	xor    %edi,%edi
            g_kernelLogDepth--;
ffffffff800234bf:	83 2d de bf 1b 00 01 	subl   $0x1,0x1bbfde(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800234c6:	e8 b5 51 ff ff       	call   ffffffff80018680 <_ZN3Hal18RegisterIrqHandlerEhPFvhE>

        // Configure APIC timer: periodic mode, vector 32
        uint32_t lvt = (Hal::IRQ_VECTOR_BASE + Hal::IRQ_TIMER) | LVT_PERIODIC;
        Hal::LocalApic::WriteRegister(Hal::LocalApic::REG_TIMER_DIVIDE, DIVIDE_BY_16);
ffffffff800234cb:	be 03 00 00 00       	mov    $0x3,%esi
ffffffff800234d0:	bf e0 03 00 00       	mov    $0x3e0,%edi
ffffffff800234d5:	e8 f6 4b ff ff       	call   ffffffff800180d0 <_ZN3Hal9LocalApic13WriteRegisterEjj>
        Hal::LocalApic::WriteRegister(Hal::LocalApic::REG_TIMER_LVT, lvt);
ffffffff800234da:	be 20 00 02 00       	mov    $0x20020,%esi
ffffffff800234df:	bf 20 03 00 00       	mov    $0x320,%edi
ffffffff800234e4:	e8 e7 4b ff ff       	call   ffffffff800180d0 <_ZN3Hal9LocalApic13WriteRegisterEjj>

        // Set initial count for 1ms intervals (1000 Hz tick rate)
        uint32_t initialCount = g_ticksPerMs;
ffffffff800234e9:	8b 1d cd bf 1b 00    	mov    0x1bbfcd(%rip),%ebx        # ffffffff801df4bc <_ZN11TimekeepingL12g_ticksPerMsE>
        Hal::LocalApic::WriteRegister(Hal::LocalApic::REG_TIMER_INITIAL, initialCount);
ffffffff800234ef:	bf 80 03 00 00       	mov    $0x380,%edi
ffffffff800234f4:	89 de                	mov    %ebx,%esi
ffffffff800234f6:	e8 d5 4b ff ff       	call   ffffffff800180d0 <_ZN3Hal9LocalApic13WriteRegisterEjj>
            Print(string);
ffffffff800234fb:	48 c7 c7 46 a3 02 80 	mov    $0xffffffff8002a346,%rdi
            g_kernelLogDepth++;
ffffffff80023502:	83 05 9b bf 1b 00 01 	addl   $0x1,0x1bbf9b(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff80023509:	e8 b2 fc ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002350e:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80023515:	e8 a6 fc ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002351a:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff80023521:	e8 9a fc ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80023526:	48 c7 c7 d2 a0 02 80 	mov    $0xffffffff8002a0d2,%rdi
ffffffff8002352d:	e8 8e fc ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80023532:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80023539:	e8 82 fc ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002353e:	48 c7 c7 14 c1 02 80 	mov    $0xffffffff8002c114,%rdi
ffffffff80023545:	e8 76 fc ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8002354a:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff8002354f:	bf e8 03 00 00       	mov    $0x3e8,%edi
ffffffff80023554:	e8 37 6f ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80023559:	48 89 c7             	mov    %rax,%rdi
ffffffff8002355c:	e8 5f fc ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80023561:	48 c7 c7 29 c1 02 80 	mov    $0xffffffff8002c129,%rdi
ffffffff80023568:	e8 53 fc ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>

        KernelLogStream(OK, "Timer") << "APIC timer started: " << base::dec << (uint64_t)TIMER_HZ
            << " Hz periodic, initial count=" << (uint64_t)initialCount;
ffffffff8002356d:	89 df                	mov    %ebx,%edi
            Print(Lib::u64_2_basestr(number, t.streamBaseType));
ffffffff8002356f:	be 0a 00 00 00       	mov    $0xa,%esi
ffffffff80023574:	e8 17 6f ff ff       	call   ffffffff8001a490 <_ZN3Lib13u64_2_basestrEmm>
ffffffff80023579:	48 89 c7             	mov    %rax,%rdi
ffffffff8002357c:	e8 3f fc ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            Print(string);
ffffffff80023581:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff80023588:	e8 33 fc ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff8002358d:	8b 05 11 bf 1b 00    	mov    0x1bbf11(%rip),%eax        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
    }
ffffffff80023593:	5b                   	pop    %rbx
ffffffff80023594:	41 5c                	pop    %r12
ffffffff80023596:	5d                   	pop    %rbp
ffffffff80023597:	83 e8 01             	sub    $0x1,%eax
ffffffff8002359a:	89 05 04 bf 1b 00    	mov    %eax,0x1bbf04(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800235a0:	c3                   	ret
ffffffff800235a1:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
            Print(string);
ffffffff800235a8:	48 c7 c7 46 a3 02 80 	mov    $0xffffffff8002a346,%rdi
            g_kernelLogDepth++;
ffffffff800235af:	89 05 ef be 1b 00    	mov    %eax,0x1bbeef(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
            Print(string);
ffffffff800235b5:	e8 06 fc ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800235ba:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff800235c1:	e8 fa fb ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800235c6:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff800235cd:	e8 ee fb ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800235d2:	48 c7 c7 87 a0 02 80 	mov    $0xffffffff8002a087,%rdi
ffffffff800235d9:	e8 e2 fb ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800235de:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff800235e5:	e8 d6 fb ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800235ea:	48 c7 c7 10 d2 02 80 	mov    $0xffffffff8002d210,%rdi
ffffffff800235f1:	eb 89                	jmp    ffffffff8002357c <_ZN11Timekeeping19ApicTimerInitializeEv+0x28c>
ffffffff800235f3:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff800235fa:	00 00 00 
ffffffff800235fd:	0f 1f 00             	nopl   (%rax)

ffffffff80023600 <_ZN11Timekeeping8GetTicksEv>:

    uint64_t GetTicks() {
        return g_tickCount;
ffffffff80023600:	48 8b 05 b9 be 1b 00 	mov    0x1bbeb9(%rip),%rax        # ffffffff801df4c0 <_ZN11TimekeepingL11g_tickCountE>
    }
ffffffff80023607:	c3                   	ret
ffffffff80023608:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8002360f:	00 

ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>:

    uint64_t GetMilliseconds() {
ffffffff80023610:	48 8b 05 a9 be 1b 00 	mov    0x1bbea9(%rip),%rax        # ffffffff801df4c0 <_ZN11TimekeepingL11g_tickCountE>
ffffffff80023617:	c3                   	ret
ffffffff80023618:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8002361f:	00 

ffffffff80023620 <_ZN11Timekeeping19EnableSchedulerTickEv>:
        return g_tickCount;  // 1 tick = 1 ms at 1000 Hz
    }

    void EnableSchedulerTick() {
        g_schedEnabled = true;
ffffffff80023620:	c6 05 91 be 1b 00 01 	movb   $0x1,0x1bbe91(%rip)        # ffffffff801df4b8 <_ZN11TimekeepingL14g_schedEnabledE>
    }
ffffffff80023627:	c3                   	ret
ffffffff80023628:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff8002362f:	00 

ffffffff80023630 <_ZN11Timekeeping5SleepEm>:

    void Sleep(uint64_t ms) {
ffffffff80023630:	55                   	push   %rbp
ffffffff80023631:	48 89 e5             	mov    %rsp,%rbp
ffffffff80023634:	53                   	push   %rbx
ffffffff80023635:	48 83 ec 08          	sub    $0x8,%rsp
        uint64_t target = g_tickCount + ms;
ffffffff80023639:	48 8b 1d 80 be 1b 00 	mov    0x1bbe80(%rip),%rbx        # ffffffff801df4c0 <_ZN11TimekeepingL11g_tickCountE>
        while (g_tickCount < target) {
ffffffff80023640:	48 8b 05 79 be 1b 00 	mov    0x1bbe79(%rip),%rax        # ffffffff801df4c0 <_ZN11TimekeepingL11g_tickCountE>
        uint64_t target = g_tickCount + ms;
ffffffff80023647:	48 01 fb             	add    %rdi,%rbx
        while (g_tickCount < target) {
ffffffff8002364a:	48 39 d8             	cmp    %rbx,%rax
ffffffff8002364d:	73 12                	jae    ffffffff80023661 <_ZN11Timekeeping5SleepEm+0x31>
ffffffff8002364f:	90                   	nop
            // Yield to other processes instead of hlt. Using hlt here causes
            // a deadlock: if the timer ISR preempts us during hlt and context-
            // switches away (via Tick → Schedule), EOI is never sent, so no
            // more timer interrupts fire and any process doing hlt freezes.
            Sched::Schedule();
ffffffff80023650:	e8 6b e6 ff ff       	call   ffffffff80021cc0 <_ZN5Sched8ScheduleEv>
        while (g_tickCount < target) {
ffffffff80023655:	48 8b 05 64 be 1b 00 	mov    0x1bbe64(%rip),%rax        # ffffffff801df4c0 <_ZN11TimekeepingL11g_tickCountE>
ffffffff8002365c:	48 39 d8             	cmp    %rbx,%rax
ffffffff8002365f:	72 ef                	jb     ffffffff80023650 <_ZN11Timekeeping5SleepEm+0x20>
        }
    }
ffffffff80023661:	48 8b 5d f8          	mov    -0x8(%rbp),%rbx
ffffffff80023665:	c9                   	leave
ffffffff80023666:	c3                   	ret
ffffffff80023667:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8002366e:	00 00 00 
ffffffff80023671:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff80023678:	00 00 00 
ffffffff8002367b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

ffffffff80023680 <_ZN11Timekeeping4InitEthhhhh>:
    dt.Minute = (uint8_t)(rem / 60);
    dt.Second = (uint8_t)(rem % 60);
    return dt;
}

void Timekeeping::Init(uint16_t Year, uint8_t Month, uint8_t Day, uint8_t Hour, uint8_t Minute, uint8_t Second) {
ffffffff80023680:	55                   	push   %rbp
ffffffff80023681:	89 f8                	mov    %edi,%eax
ffffffff80023683:	89 f7                	mov    %esi,%edi
ffffffff80023685:	41 89 d3             	mov    %edx,%r11d
ffffffff80023688:	89 c6                	mov    %eax,%esi
ffffffff8002368a:	48 89 e5             	mov    %rsp,%rbp
ffffffff8002368d:	41 57                	push   %r15
    g_bootEpoch = DateToEpoch(Year, Month, Day, Hour, Minute, Second);
ffffffff8002368f:	44 0f b7 f8          	movzwl %ax,%r15d
void Timekeeping::Init(uint16_t Year, uint8_t Month, uint8_t Day, uint8_t Hour, uint8_t Minute, uint8_t Second) {
ffffffff80023693:	41 56                	push   %r14
ffffffff80023695:	45 89 ce             	mov    %r9d,%r14d
ffffffff80023698:	41 55                	push   %r13
    g_bootEpoch = DateToEpoch(Year, Month, Day, Hour, Minute, Second);
ffffffff8002369a:	45 0f b6 e8          	movzbl %r8b,%r13d
void Timekeeping::Init(uint16_t Year, uint8_t Month, uint8_t Day, uint8_t Hour, uint8_t Minute, uint8_t Second) {
ffffffff8002369e:	41 54                	push   %r12
ffffffff800236a0:	45 89 c4             	mov    %r8d,%r12d
ffffffff800236a3:	53                   	push   %rbx
    g_bootEpoch = DateToEpoch(Year, Month, Day, Hour, Minute, Second);
ffffffff800236a4:	41 0f b6 d9          	movzbl %r9b,%ebx
ffffffff800236a8:	44 0f b6 c9          	movzbl %cl,%r9d
void Timekeeping::Init(uint16_t Year, uint8_t Month, uint8_t Day, uint8_t Hour, uint8_t Minute, uint8_t Second) {
ffffffff800236ac:	48 83 ec 78          	sub    $0x78,%rsp
    g_bootEpoch = DateToEpoch(Year, Month, Day, Hour, Minute, Second);
ffffffff800236b0:	89 9d 68 ff ff ff    	mov    %ebx,-0x98(%rbp)
ffffffff800236b6:	0f b6 da             	movzbl %dl,%ebx
    int64_t days = 0;
ffffffff800236b9:	31 d2                	xor    %edx,%edx
    g_bootEpoch = DateToEpoch(Year, Month, Day, Hour, Minute, Second);
ffffffff800236bb:	89 9d 7c ff ff ff    	mov    %ebx,-0x84(%rbp)
ffffffff800236c1:	40 0f b6 df          	movzbl %dil,%ebx
void Timekeeping::Init(uint16_t Year, uint8_t Month, uint8_t Day, uint8_t Hour, uint8_t Minute, uint8_t Second) {
ffffffff800236c5:	44 88 85 70 ff ff ff 	mov    %r8b,-0x90(%rbp)
    for (int y = 1970; y < year; y++) {
ffffffff800236cc:	41 81 ff b2 07 00 00 	cmp    $0x7b2,%r15d
ffffffff800236d3:	7e 51                	jle    ffffffff80023726 <_ZN11Timekeeping4InitEthhhhh+0xa6>
ffffffff800236d5:	b8 b2 07 00 00       	mov    $0x7b2,%eax
ffffffff800236da:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
    return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
ffffffff800236e0:	a8 03                	test   $0x3,%al
ffffffff800236e2:	75 19                	jne    ffffffff800236fd <_ZN11Timekeeping4InitEthhhhh+0x7d>
ffffffff800236e4:	44 69 c0 29 5c 8f c2 	imul   $0xc28f5c29,%eax,%r8d
ffffffff800236eb:	bf 6e 01 00 00       	mov    $0x16e,%edi
ffffffff800236f0:	41 c1 c8 02          	ror    $0x2,%r8d
ffffffff800236f4:	41 81 f8 28 5c 8f 02 	cmp    $0x28f5c28,%r8d
ffffffff800236fb:	77 1e                	ja     ffffffff8002371b <_ZN11Timekeeping4InitEthhhhh+0x9b>
ffffffff800236fd:	69 f8 29 5c 8f c2    	imul   $0xc28f5c29,%eax,%edi
ffffffff80023703:	c1 cf 04             	ror    $0x4,%edi
ffffffff80023706:	81 ff 0b d7 a3 00    	cmp    $0xa3d70b,%edi
ffffffff8002370c:	40 0f 92 c7          	setb   %dil
ffffffff80023710:	40 0f b6 ff          	movzbl %dil,%edi
ffffffff80023714:	48 81 c7 6d 01 00 00 	add    $0x16d,%rdi
    for (int y = 1970; y < year; y++) {
ffffffff8002371b:	83 c0 01             	add    $0x1,%eax
        days += IsLeapYear(y) ? 366 : 365;
ffffffff8002371e:	48 01 fa             	add    %rdi,%rdx
    for (int y = 1970; y < year; y++) {
ffffffff80023721:	41 39 c7             	cmp    %eax,%r15d
ffffffff80023724:	75 ba                	jne    ffffffff800236e0 <_ZN11Timekeeping4InitEthhhhh+0x60>
    for (int m = 1; m < month; m++) {
ffffffff80023726:	83 fb 01             	cmp    $0x1,%ebx
ffffffff80023729:	7e 75                	jle    ffffffff800237a0 <_ZN11Timekeeping4InitEthhhhh+0x120>
    return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
ffffffff8002372b:	45 89 fa             	mov    %r15d,%r10d
ffffffff8002372e:	45 89 f8             	mov    %r15d,%r8d
ffffffff80023731:	83 e6 03             	and    $0x3,%esi
ffffffff80023734:	4d 69 d2 1f 85 eb 51 	imul   $0x51eb851f,%r10,%r10
ffffffff8002373b:	4c 89 d0             	mov    %r10,%rax
ffffffff8002373e:	49 c1 ea 27          	shr    $0x27,%r10
ffffffff80023742:	48 c1 e8 25          	shr    $0x25,%rax
ffffffff80023746:	6b c0 64             	imul   $0x64,%eax,%eax
ffffffff80023749:	41 29 c0             	sub    %eax,%r8d
ffffffff8002374c:	41 69 c2 90 01 00 00 	imul   $0x190,%r10d,%eax
ffffffff80023753:	45 89 fa             	mov    %r15d,%r10d
ffffffff80023756:	41 29 c2             	sub    %eax,%r10d
ffffffff80023759:	b8 01 00 00 00       	mov    $0x1,%eax
ffffffff8002375e:	eb 13                	jmp    ffffffff80023773 <_ZN11Timekeeping4InitEthhhhh+0xf3>
        days += DaysInMonth(m, year);
ffffffff80023760:	48 63 3c 85 e0 de 02 	movslq -0x7ffd2120(,%rax,4),%rdi
ffffffff80023767:	80 
    for (int m = 1; m < month; m++) {
ffffffff80023768:	48 83 c0 01          	add    $0x1,%rax
        days += DaysInMonth(m, year);
ffffffff8002376c:	48 01 fa             	add    %rdi,%rdx
    for (int m = 1; m < month; m++) {
ffffffff8002376f:	39 c3                	cmp    %eax,%ebx
ffffffff80023771:	7e 2d                	jle    ffffffff800237a0 <_ZN11Timekeeping4InitEthhhhh+0x120>
    if (month == 2 && IsLeapYear(year)) return 29;
ffffffff80023773:	83 f8 02             	cmp    $0x2,%eax
ffffffff80023776:	75 e8                	jne    ffffffff80023760 <_ZN11Timekeeping4InitEthhhhh+0xe0>
    return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
ffffffff80023778:	66 85 f6             	test   %si,%si
ffffffff8002377b:	0f 84 c7 02 00 00    	je     ffffffff80023a48 <_ZN11Timekeeping4InitEthhhhh+0x3c8>
ffffffff80023781:	bf 1d 00 00 00       	mov    $0x1d,%edi
ffffffff80023786:	45 85 d2             	test   %r10d,%r10d
ffffffff80023789:	75 d5                	jne    ffffffff80023760 <_ZN11Timekeeping4InitEthhhhh+0xe0>
    for (int m = 1; m < month; m++) {
ffffffff8002378b:	48 83 c0 01          	add    $0x1,%rax
        days += DaysInMonth(m, year);
ffffffff8002378f:	48 01 fa             	add    %rdi,%rdx
    for (int m = 1; m < month; m++) {
ffffffff80023792:	39 c3                	cmp    %eax,%ebx
ffffffff80023794:	7f dd                	jg     ffffffff80023773 <_ZN11Timekeeping4InitEthhhhh+0xf3>
ffffffff80023796:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
ffffffff8002379d:	00 00 00 
    days += day - 1;
ffffffff800237a0:	8b 85 7c ff ff ff    	mov    -0x84(%rbp),%eax
ffffffff800237a6:	48 c7 c7 46 c1 02 80 	mov    $0xffffffff8002c146,%rdi
ffffffff800237ad:	89 8d 64 ff ff ff    	mov    %ecx,-0x9c(%rbp)
ffffffff800237b3:	44 89 9d 78 ff ff ff 	mov    %r11d,-0x88(%rbp)
ffffffff800237ba:	83 e8 01             	sub    $0x1,%eax
            g_kernelLogDepth++;
ffffffff800237bd:	83 05 e0 bc 1b 00 01 	addl   $0x1,0x1bbce0(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>
ffffffff800237c4:	48 98                	cltq
ffffffff800237c6:	48 01 d0             	add    %rdx,%rax
    return days * 86400 + hour * 3600 + minute * 60 + second;
ffffffff800237c9:	41 69 d1 10 0e 00 00 	imul   $0xe10,%r9d,%edx
ffffffff800237d0:	48 69 c0 80 51 01 00 	imul   $0x15180,%rax,%rax
ffffffff800237d7:	48 63 d2             	movslq %edx,%rdx
ffffffff800237da:	48 01 d0             	add    %rdx,%rax
ffffffff800237dd:	41 6b d5 3c          	imul   $0x3c,%r13d,%edx
ffffffff800237e1:	48 63 d2             	movslq %edx,%rdx
ffffffff800237e4:	48 01 d0             	add    %rdx,%rax
ffffffff800237e7:	41 0f b6 d6          	movzbl %r14b,%edx
ffffffff800237eb:	48 01 d0             	add    %rdx,%rax
ffffffff800237ee:	48 89 05 d3 bc 1b 00 	mov    %rax,0x1bbcd3(%rip)        # ffffffff801df4c8 <_ZL11g_bootEpoch>
            Print(string);
ffffffff800237f5:	e8 c6 f9 ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff800237fa:	48 c7 c7 f3 a6 02 80 	mov    $0xffffffff8002a6f3,%rdi
ffffffff80023801:	e8 ba f9 ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80023806:	48 c7 c7 85 a0 02 80 	mov    $0xffffffff8002a085,%rdi
ffffffff8002380d:	e8 ae f9 ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80023812:	48 c7 c7 f8 a0 02 80 	mov    $0xffffffff8002a0f8,%rdi
ffffffff80023819:	e8 a2 f9 ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002381e:	48 c7 c7 98 a0 02 80 	mov    $0xffffffff8002a098,%rdi
ffffffff80023825:	e8 96 f9 ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002382a:	48 c7 c7 5a c1 02 80 	mov    $0xffffffff8002c15a,%rdi
ffffffff80023831:	e8 8a f9 ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80023836:	48 c7 c7 70 c1 02 80 	mov    $0xffffffff8002c170,%rdi
ffffffff8002383d:	e8 7e f9 ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80023842:	48 c7 c7 10 b7 02 80 	mov    $0xffffffff8002b710,%rdi
ffffffff80023849:	e8 72 f9 ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002384e:	48 c7 c7 86 c1 02 80 	mov    $0xffffffff8002c186,%rdi
ffffffff80023855:	e8 66 f9 ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff8002385a:	48 c7 c7 97 af 02 80 	mov    $0xffffffff8002af97,%rdi
ffffffff80023861:	e8 5a f9 ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
ffffffff80023866:	48 c7 c7 b6 a0 02 80 	mov    $0xffffffff8002a0b6,%rdi
ffffffff8002386d:	e8 4e f9 ff ff       	call   ffffffff800231c0 <_ZN2Kt5PrintEPKc>
            g_kernelLogDepth--;
ffffffff80023872:	83 2d 2b bc 1b 00 01 	subl   $0x1,0x1bbc2b(%rip)        # ffffffff801df4a4 <_ZN2Kt16g_kernelLogDepthE>

    Kt::KernelLogStream(INFO, "Timekeeping Service") << "Setting time zone to " << CET.TZLongName << " (" << CET.TZShortName << ")";

    Minute = Minute + CET.MinuteOffset;
    Hour = Hour + CET.HourOffset;
    if (Minute >= 60) {
ffffffff80023879:	41 80 fc 3b          	cmp    $0x3b,%r12b
ffffffff8002387d:	44 8b 9d 78 ff ff ff 	mov    -0x88(%rbp),%r11d
ffffffff80023884:	8b 8d 64 ff ff ff    	mov    -0x9c(%rbp),%ecx
ffffffff8002388a:	0f 87 e0 01 00 00    	ja     ffffffff80023a70 <_ZN11Timekeeping4InitEthhhhh+0x3f0>
    Hour = Hour + CET.HourOffset;
ffffffff80023890:	8d 41 01             	lea    0x1(%rcx),%eax
ffffffff80023893:	88 85 78 ff ff ff    	mov    %al,-0x88(%rbp)
        Minute -= 60;
        Hour += 1;
    }
    if (Hour >= 24) {
ffffffff80023899:	0f b6 85 78 ff ff ff 	movzbl -0x88(%rbp),%eax
ffffffff800238a0:	3c 17                	cmp    $0x17,%al
ffffffff800238a2:	76 17                	jbe    ffffffff800238bb <_ZN11Timekeeping4InitEthhhhh+0x23b>
        Hour -= 24;
ffffffff800238a4:	83 e8 18             	sub    $0x18,%eax
        Day += 1;
ffffffff800238a7:	41 83 c3 01          	add    $0x1,%r11d
        Hour -= 24;
ffffffff800238ab:	88 85 78 ff ff ff    	mov    %al,-0x88(%rbp)
    CString secondStr = secondStream.c_str();

    kcp::cstringstream panelStr;
    panelStr
        << " "
        << Day << " "
ffffffff800238b1:	41 0f b6 c3          	movzbl %r11b,%eax
ffffffff800238b5:	89 85 7c ff ff ff    	mov    %eax,-0x84(%rbp)
    kcp::cstringstream minuteStream;
ffffffff800238bb:	4c 8d 65 88          	lea    -0x78(%rbp),%r12
ffffffff800238bf:	4c 89 e7             	mov    %r12,%rdi
ffffffff800238c2:	e8 19 88 fe ff       	call   ffffffff8000c0e0 <_ZN3kcp13cstringstreamC1Ev>
    if (Minute < 10) {
ffffffff800238c7:	80 bd 70 ff ff ff 09 	cmpb   $0x9,-0x90(%rbp)
ffffffff800238ce:	0f 86 bc 01 00 00    	jbe    ffffffff80023a90 <_ZN11Timekeeping4InitEthhhhh+0x410>
    minuteStream << Minute;
ffffffff800238d4:	44 89 ee             	mov    %r13d,%esi
ffffffff800238d7:	4c 89 e7             	mov    %r12,%rdi
    kcp::cstringstream secondStream;
ffffffff800238da:	4c 8d 6d a0          	lea    -0x60(%rbp),%r13
    minuteStream << Minute;
ffffffff800238de:	e8 2d 89 fe ff       	call   ffffffff8000c210 <_ZN3kcp13cstringstreamlsEi>
    CString minuteStr = minuteStream.c_str();
ffffffff800238e3:	4c 89 e7             	mov    %r12,%rdi
ffffffff800238e6:	e8 75 89 fe ff       	call   ffffffff8000c260 <_ZN3kcp13cstringstream5c_strEv>
    kcp::cstringstream secondStream;
ffffffff800238eb:	4c 89 ef             	mov    %r13,%rdi
    CString minuteStr = minuteStream.c_str();
ffffffff800238ee:	48 89 85 70 ff ff ff 	mov    %rax,-0x90(%rbp)
    kcp::cstringstream secondStream;
ffffffff800238f5:	e8 e6 87 fe ff       	call   ffffffff8000c0e0 <_ZN3kcp13cstringstreamC1Ev>
    if (Second < 10) {
ffffffff800238fa:	41 80 fe 09          	cmp    $0x9,%r14b
ffffffff800238fe:	0f 86 a4 01 00 00    	jbe    ffffffff80023aa8 <_ZN11Timekeeping4InitEthhhhh+0x428>
    secondStream << Second;
ffffffff80023904:	8b b5 68 ff ff ff    	mov    -0x98(%rbp),%esi
ffffffff8002390a:	4c 89 ef             	mov    %r13,%rdi
    kcp::cstringstream panelStr;
ffffffff8002390d:	4c 8d 75 b8          	lea    -0x48(%rbp),%r14
    secondStream << Second;
ffffffff80023911:	e8 fa 88 fe ff       	call   ffffffff8000c210 <_ZN3kcp13cstringstreamlsEi>
    CString secondStr = secondStream.c_str();
ffffffff80023916:	4c 89 ef             	mov    %r13,%rdi
ffffffff80023919:	e8 42 89 fe ff       	call   ffffffff8000c260 <_ZN3kcp13cstringstream5c_strEv>
    kcp::cstringstream panelStr;
ffffffff8002391e:	4c 89 f7             	mov    %r14,%rdi
    CString secondStr = secondStream.c_str();
ffffffff80023921:	48 89 85 68 ff ff ff 	mov    %rax,-0x98(%rbp)
    kcp::cstringstream panelStr;
ffffffff80023928:	e8 b3 87 fe ff       	call   ffffffff8000c0e0 <_ZN3kcp13cstringstreamC1Ev>
        << " "
ffffffff8002392d:	4c 89 f7             	mov    %r14,%rdi
ffffffff80023930:	48 c7 c6 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rsi
ffffffff80023937:	e8 94 88 fe ff       	call   ffffffff8000c1d0 <_ZN3kcp13cstringstreamlsEPKc>
        << Day << " "
ffffffff8002393c:	8b b5 7c ff ff ff    	mov    -0x84(%rbp),%esi
        << " "
ffffffff80023942:	48 89 c7             	mov    %rax,%rdi
        << Day << " "
ffffffff80023945:	e8 c6 88 fe ff       	call   ffffffff8000c210 <_ZN3kcp13cstringstreamlsEi>
ffffffff8002394a:	48 c7 c6 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rsi
ffffffff80023951:	48 89 c7             	mov    %rax,%rdi
ffffffff80023954:	e8 77 88 fe ff       	call   ffffffff8000c1d0 <_ZN3kcp13cstringstreamlsEPKc>
        << Months[Month] << " "
ffffffff80023959:	4c 63 cb             	movslq %ebx,%r9
ffffffff8002395c:	4a 8b 34 cd 20 df 02 	mov    -0x7ffd20e0(,%r9,8),%rsi
ffffffff80023963:	80 
        << Day << " "
ffffffff80023964:	48 89 c7             	mov    %rax,%rdi
        << Months[Month] << " "
ffffffff80023967:	e8 64 88 fe ff       	call   ffffffff8000c1d0 <_ZN3kcp13cstringstreamlsEPKc>
ffffffff8002396c:	48 c7 c6 a6 a8 02 80 	mov    $0xffffffff8002a8a6,%rsi
ffffffff80023973:	48 89 c7             	mov    %rax,%rdi
ffffffff80023976:	e8 55 88 fe ff       	call   ffffffff8000c1d0 <_ZN3kcp13cstringstreamlsEPKc>
        << Year << ", "
ffffffff8002397b:	44 89 fe             	mov    %r15d,%esi
        << Months[Month] << " "
ffffffff8002397e:	48 89 c7             	mov    %rax,%rdi
        << Year << ", "
ffffffff80023981:	e8 8a 88 fe ff       	call   ffffffff8000c210 <_ZN3kcp13cstringstreamlsEi>
ffffffff80023986:	48 c7 c6 e1 a2 02 80 	mov    $0xffffffff8002a2e1,%rsi
ffffffff8002398d:	48 89 c7             	mov    %rax,%rdi
ffffffff80023990:	e8 3b 88 fe ff       	call   ffffffff8000c1d0 <_ZN3kcp13cstringstreamlsEPKc>
        << Hour << ":"
ffffffff80023995:	0f b6 b5 78 ff ff ff 	movzbl -0x88(%rbp),%esi
        << Year << ", "
ffffffff8002399c:	48 89 c7             	mov    %rax,%rdi
        << Hour << ":"
ffffffff8002399f:	e8 6c 88 fe ff       	call   ffffffff8000c210 <_ZN3kcp13cstringstreamlsEi>
ffffffff800239a4:	48 c7 c6 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rsi
ffffffff800239ab:	48 89 c7             	mov    %rax,%rdi
ffffffff800239ae:	e8 1d 88 fe ff       	call   ffffffff8000c1d0 <_ZN3kcp13cstringstreamlsEPKc>

        << minuteStr << ":"
ffffffff800239b3:	48 8b b5 70 ff ff ff 	mov    -0x90(%rbp),%rsi
        << Hour << ":"
ffffffff800239ba:	48 89 c7             	mov    %rax,%rdi
        << minuteStr << ":"
ffffffff800239bd:	e8 0e 88 fe ff       	call   ffffffff8000c1d0 <_ZN3kcp13cstringstreamlsEPKc>
ffffffff800239c2:	48 c7 c6 d2 a3 02 80 	mov    $0xffffffff8002a3d2,%rsi
ffffffff800239c9:	48 89 c7             	mov    %rax,%rdi
ffffffff800239cc:	e8 ff 87 fe ff       	call   ffffffff8000c1d0 <_ZN3kcp13cstringstreamlsEPKc>
        << secondStr
ffffffff800239d1:	48 8b b5 68 ff ff ff 	mov    -0x98(%rbp),%rsi
        << minuteStr << ":"
ffffffff800239d8:	48 89 c7             	mov    %rax,%rdi
        << secondStr
ffffffff800239db:	e8 f0 87 fe ff       	call   ffffffff8000c1d0 <_ZN3kcp13cstringstreamlsEPKc>
        << " (" << CET.TZLongName << ")";
ffffffff800239e0:	48 c7 c6 10 b7 02 80 	mov    $0xffffffff8002b710,%rsi
        << secondStr
ffffffff800239e7:	48 89 c7             	mov    %rax,%rdi
        << " (" << CET.TZLongName << ")";
ffffffff800239ea:	e8 e1 87 fe ff       	call   ffffffff8000c1d0 <_ZN3kcp13cstringstreamlsEPKc>
ffffffff800239ef:	48 c7 c6 70 c1 02 80 	mov    $0xffffffff8002c170,%rsi
ffffffff800239f6:	48 89 c7             	mov    %rax,%rdi
ffffffff800239f9:	e8 d2 87 fe ff       	call   ffffffff8000c1d0 <_ZN3kcp13cstringstreamlsEPKc>
ffffffff800239fe:	48 c7 c6 97 af 02 80 	mov    $0xffffffff8002af97,%rsi
ffffffff80023a05:	48 89 c7             	mov    %rax,%rdi
ffffffff80023a08:	e8 c3 87 fe ff       	call   ffffffff8000c1d0 <_ZN3kcp13cstringstreamlsEPKc>


    CString dateString = panelStr.c_str();
ffffffff80023a0d:	4c 89 f7             	mov    %r14,%rdi
ffffffff80023a10:	e8 4b 88 fe ff       	call   ffffffff8000c260 <_ZN3kcp13cstringstream5c_strEv>
ffffffff80023a15:	48 89 c7             	mov    %rax,%rdi

    UpdatePanelBar(dateString);
ffffffff80023a18:	e8 53 f5 ff ff       	call   ffffffff80022f70 <_ZN2Kt14UpdatePanelBarEPKc>
}
ffffffff80023a1d:	4c 89 f7             	mov    %r14,%rdi
ffffffff80023a20:	e8 db 86 fe ff       	call   ffffffff8000c100 <_ZN3kcp13cstringstreamD1Ev>
ffffffff80023a25:	4c 89 ef             	mov    %r13,%rdi
ffffffff80023a28:	e8 d3 86 fe ff       	call   ffffffff8000c100 <_ZN3kcp13cstringstreamD1Ev>
ffffffff80023a2d:	4c 89 e7             	mov    %r12,%rdi
ffffffff80023a30:	e8 cb 86 fe ff       	call   ffffffff8000c100 <_ZN3kcp13cstringstreamD1Ev>
ffffffff80023a35:	48 83 c4 78          	add    $0x78,%rsp
ffffffff80023a39:	5b                   	pop    %rbx
ffffffff80023a3a:	41 5c                	pop    %r12
ffffffff80023a3c:	41 5d                	pop    %r13
ffffffff80023a3e:	41 5e                	pop    %r14
ffffffff80023a40:	41 5f                	pop    %r15
ffffffff80023a42:	5d                   	pop    %rbp
ffffffff80023a43:	c3                   	ret
ffffffff80023a44:	0f 1f 40 00          	nopl   0x0(%rax)
    return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
ffffffff80023a48:	45 85 c0             	test   %r8d,%r8d
ffffffff80023a4b:	0f 84 30 fd ff ff    	je     ffffffff80023781 <_ZN11Timekeeping4InitEthhhhh+0x101>
    for (int m = 1; m < month; m++) {
ffffffff80023a51:	48 83 c0 01          	add    $0x1,%rax
        days += DaysInMonth(m, year);
ffffffff80023a55:	48 83 c2 1d          	add    $0x1d,%rdx
    for (int m = 1; m < month; m++) {
ffffffff80023a59:	39 c3                	cmp    %eax,%ebx
ffffffff80023a5b:	0f 8e 3f fd ff ff    	jle    ffffffff800237a0 <_ZN11Timekeeping4InitEthhhhh+0x120>
    if (month == 2 && IsLeapYear(year)) return 29;
ffffffff80023a61:	83 f8 02             	cmp    $0x2,%eax
ffffffff80023a64:	0f 85 f6 fc ff ff    	jne    ffffffff80023760 <_ZN11Timekeeping4InitEthhhhh+0xe0>
ffffffff80023a6a:	eb dc                	jmp    ffffffff80023a48 <_ZN11Timekeeping4InitEthhhhh+0x3c8>
ffffffff80023a6c:	0f 1f 40 00          	nopl   0x0(%rax)
        Minute -= 60;
ffffffff80023a70:	41 8d 44 24 c4       	lea    -0x3c(%r12),%eax
        Hour += 1;
ffffffff80023a75:	83 c1 02             	add    $0x2,%ecx
        Minute -= 60;
ffffffff80023a78:	88 85 70 ff ff ff    	mov    %al,-0x90(%rbp)
    minuteStream << Minute;
ffffffff80023a7e:	44 0f b6 e8          	movzbl %al,%r13d
        Hour += 1;
ffffffff80023a82:	88 8d 78 ff ff ff    	mov    %cl,-0x88(%rbp)
ffffffff80023a88:	e9 0c fe ff ff       	jmp    ffffffff80023899 <_ZN11Timekeeping4InitEthhhhh+0x219>
ffffffff80023a8d:	0f 1f 00             	nopl   (%rax)
        minuteStream << "0";
ffffffff80023a90:	48 c7 c6 bb a2 02 80 	mov    $0xffffffff8002a2bb,%rsi
ffffffff80023a97:	4c 89 e7             	mov    %r12,%rdi
ffffffff80023a9a:	e8 31 87 fe ff       	call   ffffffff8000c1d0 <_ZN3kcp13cstringstreamlsEPKc>
ffffffff80023a9f:	e9 30 fe ff ff       	jmp    ffffffff800238d4 <_ZN11Timekeeping4InitEthhhhh+0x254>
ffffffff80023aa4:	0f 1f 40 00          	nopl   0x0(%rax)
        secondStream << "0";
ffffffff80023aa8:	48 c7 c6 bb a2 02 80 	mov    $0xffffffff8002a2bb,%rsi
ffffffff80023aaf:	4c 89 ef             	mov    %r13,%rdi
ffffffff80023ab2:	e8 19 87 fe ff       	call   ffffffff8000c1d0 <_ZN3kcp13cstringstreamlsEPKc>
ffffffff80023ab7:	e9 48 fe ff ff       	jmp    ffffffff80023904 <_ZN11Timekeeping4InitEthhhhh+0x284>
ffffffff80023abc:	0f 1f 40 00          	nopl   0x0(%rax)

ffffffff80023ac0 <_ZN11Timekeeping11GetDateTimeEv>:

int64_t Timekeeping::GetUnixTimestamp() {
    return g_bootEpoch + (int64_t)(Timekeeping::GetMilliseconds() / 1000);
}

Timekeeping::DateTime Timekeeping::GetDateTime() {
ffffffff80023ac0:	55                   	push   %rbp
ffffffff80023ac1:	48 89 e5             	mov    %rsp,%rbp
    return g_bootEpoch + (int64_t)(Timekeeping::GetMilliseconds() / 1000);
ffffffff80023ac4:	e8 47 fb ff ff       	call   ffffffff80023610 <_ZN11Timekeeping15GetMillisecondsEv>
ffffffff80023ac9:	48 8b 3d f8 b9 1b 00 	mov    0x1bb9f8(%rip),%rdi        # ffffffff801df4c8 <_ZL11g_bootEpoch>
    int year = 1970;
ffffffff80023ad0:	be b2 07 00 00       	mov    $0x7b2,%esi
    return g_bootEpoch + (int64_t)(Timekeeping::GetMilliseconds() / 1000);
ffffffff80023ad5:	48 ba cf f7 53 e3 a5 	movabs $0x20c49ba5e353f7cf,%rdx
ffffffff80023adc:	9b c4 20 
ffffffff80023adf:	48 c1 e8 03          	shr    $0x3,%rax
ffffffff80023ae3:	48 f7 e2             	mul    %rdx
ffffffff80023ae6:	48 c1 ea 04          	shr    $0x4,%rdx
ffffffff80023aea:	48 01 d7             	add    %rdx,%rdi
    int year = 1970;
ffffffff80023aed:	eb 07                	jmp    ffffffff80023af6 <_ZN11Timekeeping11GetDateTimeEv+0x36>
ffffffff80023aef:	90                   	nop
        rem -= daysInYear * 86400;
ffffffff80023af0:	48 29 cf             	sub    %rcx,%rdi
        year++;
ffffffff80023af3:	83 c6 01             	add    $0x1,%esi
    return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
ffffffff80023af6:	41 89 f0             	mov    %esi,%r8d
ffffffff80023af9:	41 83 e0 03          	and    $0x3,%r8d
ffffffff80023afd:	75 15                	jne    ffffffff80023b14 <_ZN11Timekeeping11GetDateTimeEv+0x54>
ffffffff80023aff:	69 c6 29 5c 8f c2    	imul   $0xc28f5c29,%esi,%eax
ffffffff80023b05:	b9 00 85 e2 01       	mov    $0x1e28500,%ecx
ffffffff80023b0a:	c1 c8 02             	ror    $0x2,%eax
ffffffff80023b0d:	3d 28 5c 8f 02       	cmp    $0x28f5c28,%eax
ffffffff80023b12:	77 1e                	ja     ffffffff80023b32 <_ZN11Timekeeping11GetDateTimeEv+0x72>
ffffffff80023b14:	69 c6 29 5c 8f c2    	imul   $0xc28f5c29,%esi,%eax
ffffffff80023b1a:	c1 c8 04             	ror    $0x4,%eax
ffffffff80023b1d:	3d 0b d7 a3 00       	cmp    $0xa3d70b,%eax
ffffffff80023b22:	48 19 c9             	sbb    %rcx,%rcx
ffffffff80023b25:	81 e1 80 51 01 00    	and    $0x15180,%ecx
ffffffff80023b2b:	48 81 c1 80 33 e1 01 	add    $0x1e13380,%rcx
        if (rem < daysInYear * 86400) break;
ffffffff80023b32:	48 39 cf             	cmp    %rcx,%rdi
ffffffff80023b35:	7d b9                	jge    ffffffff80023af0 <_ZN11Timekeeping11GetDateTimeEv+0x30>
    int dayOfYear = (int)(rem / 86400);
ffffffff80023b37:	48 b8 57 29 51 ce a0 	movabs $0x1845c8a0ce512957,%rax
ffffffff80023b3e:	c8 45 18 
    return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
ffffffff80023b41:	41 89 f2             	mov    %esi,%r10d
ffffffff80023b44:	41 89 f3             	mov    %esi,%r11d
    dt.Year = (uint16_t)year;
ffffffff80023b47:	44 0f b7 ce          	movzwl %si,%r9d
    int dayOfYear = (int)(rem / 86400);
ffffffff80023b4b:	48 f7 ef             	imul   %rdi
ffffffff80023b4e:	48 89 f8             	mov    %rdi,%rax
    return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
ffffffff80023b51:	4d 69 d2 1f 85 eb 51 	imul   $0x51eb851f,%r10,%r10
    int dayOfYear = (int)(rem / 86400);
ffffffff80023b58:	48 c1 f8 3f          	sar    $0x3f,%rax
ffffffff80023b5c:	48 c1 fa 0d          	sar    $0xd,%rdx
ffffffff80023b60:	48 29 c2             	sub    %rax,%rdx
    return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
ffffffff80023b63:	4c 89 d0             	mov    %r10,%rax
ffffffff80023b66:	49 c1 ea 27          	shr    $0x27,%r10
ffffffff80023b6a:	48 c1 e8 25          	shr    $0x25,%rax
    int dayOfYear = (int)(rem / 86400);
ffffffff80023b6e:	89 d1                	mov    %edx,%ecx
    rem -= (int64_t)dayOfYear * 86400;
ffffffff80023b70:	48 63 d2             	movslq %edx,%rdx
    return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
ffffffff80023b73:	6b c0 64             	imul   $0x64,%eax,%eax
    rem -= (int64_t)dayOfYear * 86400;
ffffffff80023b76:	48 69 d2 80 ae fe ff 	imul   $0xfffffffffffeae80,%rdx,%rdx
    return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
ffffffff80023b7d:	41 29 c3             	sub    %eax,%r11d
ffffffff80023b80:	41 69 c2 90 01 00 00 	imul   $0x190,%r10d,%eax
    rem -= (int64_t)dayOfYear * 86400;
ffffffff80023b87:	48 01 d7             	add    %rdx,%rdi
    return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
ffffffff80023b8a:	29 c6                	sub    %eax,%esi
ffffffff80023b8c:	b8 01 00 00 00       	mov    $0x1,%eax
ffffffff80023b91:	41 89 f2             	mov    %esi,%r10d
ffffffff80023b94:	66 66 2e 0f 1f 84 00 	data16 cs nopw 0x0(%rax,%rax,1)
ffffffff80023b9b:	00 00 00 00 
ffffffff80023b9f:	90                   	nop
    if (month == 2 && IsLeapYear(year)) return 29;
ffffffff80023ba0:	89 c6                	mov    %eax,%esi
ffffffff80023ba2:	83 f8 02             	cmp    $0x2,%eax
ffffffff80023ba5:	0f 84 bd 00 00 00    	je     ffffffff80023c68 <_ZN11Timekeeping11GetDateTimeEv+0x1a8>
    return days[month];
ffffffff80023bab:	8b 14 85 e0 de 02 80 	mov    -0x7ffd2120(,%rax,4),%edx
        if (dayOfYear < dim) break;
ffffffff80023bb2:	39 ca                	cmp    %ecx,%edx
ffffffff80023bb4:	7f 11                	jg     ffffffff80023bc7 <_ZN11Timekeeping11GetDateTimeEv+0x107>
    while (month <= 12) {
ffffffff80023bb6:	48 83 c0 01          	add    $0x1,%rax
        dayOfYear -= dim;
ffffffff80023bba:	29 d1                	sub    %edx,%ecx
    while (month <= 12) {
ffffffff80023bbc:	48 83 f8 0d          	cmp    $0xd,%rax
ffffffff80023bc0:	75 de                	jne    ffffffff80023ba0 <_ZN11Timekeeping11GetDateTimeEv+0xe0>
ffffffff80023bc2:	be 0d 00 00 00       	mov    $0xd,%esi
    rem %= 3600;
ffffffff80023bc7:	48 b8 05 7c f3 6a e2 	movabs $0x48d159e26af37c05,%rax
ffffffff80023bce:	59 d1 48 
ffffffff80023bd1:	40 0f b6 f6          	movzbl %sil,%esi
    dt.Day = (uint8_t)(dayOfYear + 1);
ffffffff80023bd5:	83 c1 01             	add    $0x1,%ecx
    return EpochToDate(GetUnixTimestamp());
ffffffff80023bd8:	5d                   	pop    %rbp
    rem %= 3600;
ffffffff80023bd9:	48 f7 ef             	imul   %rdi
ffffffff80023bdc:	48 89 f8             	mov    %rdi,%rax
ffffffff80023bdf:	48 c1 e6 10          	shl    $0x10,%rsi
ffffffff80023be3:	0f b6 c9             	movzbl %cl,%ecx
ffffffff80023be6:	48 c1 f8 3f          	sar    $0x3f,%rax
ffffffff80023bea:	49 09 f1             	or     %rsi,%r9
ffffffff80023bed:	48 c1 e1 18          	shl    $0x18,%rcx
ffffffff80023bf1:	49 09 c9             	or     %rcx,%r9
ffffffff80023bf4:	48 c1 fa 0a          	sar    $0xa,%rdx
ffffffff80023bf8:	49 89 d0             	mov    %rdx,%r8
    dt.Hour = (uint8_t)(rem / 3600);
ffffffff80023bfb:	48 29 c2             	sub    %rax,%rdx
    rem %= 3600;
ffffffff80023bfe:	49 29 c0             	sub    %rax,%r8
ffffffff80023c01:	0f b6 f2             	movzbl %dl,%esi
    dt.Minute = (uint8_t)(rem / 60);
ffffffff80023c04:	48 b8 89 88 88 88 88 	movabs $0x8888888888888889,%rax
ffffffff80023c0b:	88 88 88 
    rem %= 3600;
ffffffff80023c0e:	4d 69 d0 10 0e 00 00 	imul   $0xe10,%r8,%r10
ffffffff80023c15:	48 c1 e6 20          	shl    $0x20,%rsi
ffffffff80023c19:	4c 29 d7             	sub    %r10,%rdi
    dt.Minute = (uint8_t)(rem / 60);
ffffffff80023c1c:	48 f7 ef             	imul   %rdi
ffffffff80023c1f:	48 89 f8             	mov    %rdi,%rax
    rem %= 3600;
ffffffff80023c22:	49 89 f8             	mov    %rdi,%r8
    dt.Minute = (uint8_t)(rem / 60);
ffffffff80023c25:	48 c1 f8 3f          	sar    $0x3f,%rax
ffffffff80023c29:	48 01 fa             	add    %rdi,%rdx
ffffffff80023c2c:	48 c1 fa 05          	sar    $0x5,%rdx
ffffffff80023c30:	48 29 c2             	sub    %rax,%rdx
ffffffff80023c33:	4c 89 c8             	mov    %r9,%rax
    dt.Second = (uint8_t)(rem % 60);
ffffffff80023c36:	48 89 d1             	mov    %rdx,%rcx
ffffffff80023c39:	0f b6 fa             	movzbl %dl,%edi
ffffffff80023c3c:	48 09 f0             	or     %rsi,%rax
ffffffff80023c3f:	48 c1 e1 04          	shl    $0x4,%rcx
ffffffff80023c43:	48 c1 e7 28          	shl    $0x28,%rdi
ffffffff80023c47:	48 29 d1             	sub    %rdx,%rcx
ffffffff80023c4a:	4c 89 c2             	mov    %r8,%rdx
ffffffff80023c4d:	48 09 f8             	or     %rdi,%rax
ffffffff80023c50:	48 c1 e1 02          	shl    $0x2,%rcx
ffffffff80023c54:	48 29 ca             	sub    %rcx,%rdx
ffffffff80023c57:	0f b6 d2             	movzbl %dl,%edx
ffffffff80023c5a:	48 c1 e2 30          	shl    $0x30,%rdx
ffffffff80023c5e:	48 09 d0             	or     %rdx,%rax
ffffffff80023c61:	c3                   	ret
ffffffff80023c62:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
    return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
ffffffff80023c68:	45 85 c0             	test   %r8d,%r8d
ffffffff80023c6b:	74 23                	je     ffffffff80023c90 <_ZN11Timekeeping11GetDateTimeEv+0x1d0>
ffffffff80023c6d:	45 85 d2             	test   %r10d,%r10d
ffffffff80023c70:	74 46                	je     ffffffff80023cb8 <_ZN11Timekeeping11GetDateTimeEv+0x1f8>
    return days[month];
ffffffff80023c72:	8b 14 85 e0 de 02 80 	mov    -0x7ffd2120(,%rax,4),%edx
        if (dayOfYear < dim) break;
ffffffff80023c79:	39 d1                	cmp    %edx,%ecx
ffffffff80023c7b:	0f 8c 46 ff ff ff    	jl     ffffffff80023bc7 <_ZN11Timekeeping11GetDateTimeEv+0x107>
        dayOfYear -= dim;
ffffffff80023c81:	29 d1                	sub    %edx,%ecx
    while (month <= 12) {
ffffffff80023c83:	48 83 c0 01          	add    $0x1,%rax
ffffffff80023c87:	e9 14 ff ff ff       	jmp    ffffffff80023ba0 <_ZN11Timekeeping11GetDateTimeEv+0xe0>
ffffffff80023c8c:	0f 1f 40 00          	nopl   0x0(%rax)
    return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
ffffffff80023c90:	45 85 db             	test   %r11d,%r11d
ffffffff80023c93:	74 d8                	je     ffffffff80023c6d <_ZN11Timekeeping11GetDateTimeEv+0x1ad>
        if (dayOfYear < dim) break;
ffffffff80023c95:	83 f9 1c             	cmp    $0x1c,%ecx
ffffffff80023c98:	0f 8e 29 ff ff ff    	jle    ffffffff80023bc7 <_ZN11Timekeeping11GetDateTimeEv+0x107>
    while (month <= 12) {
ffffffff80023c9e:	48 83 c0 01          	add    $0x1,%rax
        dayOfYear -= dim;
ffffffff80023ca2:	83 e9 1d             	sub    $0x1d,%ecx
    while (month <= 12) {
ffffffff80023ca5:	89 c6                	mov    %eax,%esi
    if (month == 2 && IsLeapYear(year)) return 29;
ffffffff80023ca7:	83 f8 02             	cmp    $0x2,%eax
ffffffff80023caa:	0f 85 fb fe ff ff    	jne    ffffffff80023bab <_ZN11Timekeeping11GetDateTimeEv+0xeb>
ffffffff80023cb0:	eb de                	jmp    ffffffff80023c90 <_ZN11Timekeeping11GetDateTimeEv+0x1d0>
ffffffff80023cb2:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
        if (dayOfYear < dim) break;
ffffffff80023cb8:	83 f9 1c             	cmp    $0x1c,%ecx
ffffffff80023cbb:	0f 8e 06 ff ff ff    	jle    ffffffff80023bc7 <_ZN11Timekeeping11GetDateTimeEv+0x107>
        dayOfYear -= dim;
ffffffff80023cc1:	83 e9 1d             	sub    $0x1d,%ecx
    while (month <= 12) {
ffffffff80023cc4:	48 83 c0 01          	add    $0x1,%rax
ffffffff80023cc8:	e9 d3 fe ff ff       	jmp    ffffffff80023ba0 <_ZN11Timekeeping11GetDateTimeEv+0xe0>
ffffffff80023ccd:	0f 1f 00             	nopl   (%rax)

ffffffff80023cd0 <IrqCommon>:
ffffffff80023cd0:	48 f7 44 24 10 03 00 	testq  $0x3,0x10(%rsp)
ffffffff80023cd7:	00 00 
ffffffff80023cd9:	74 03                	je     ffffffff80023cde <IrqCommon.no_swapgs_entry>
ffffffff80023cdb:	0f 01 f8             	swapgs

ffffffff80023cde <IrqCommon.no_swapgs_entry>:
ffffffff80023cde:	51                   	push   %rcx
ffffffff80023cdf:	52                   	push   %rdx
ffffffff80023ce0:	53                   	push   %rbx
ffffffff80023ce1:	55                   	push   %rbp
ffffffff80023ce2:	56                   	push   %rsi
ffffffff80023ce3:	57                   	push   %rdi
ffffffff80023ce4:	41 50                	push   %r8
ffffffff80023ce6:	41 51                	push   %r9
ffffffff80023ce8:	41 52                	push   %r10
ffffffff80023cea:	41 53                	push   %r11
ffffffff80023cec:	41 54                	push   %r12
ffffffff80023cee:	41 55                	push   %r13
ffffffff80023cf0:	41 56                	push   %r14
ffffffff80023cf2:	41 57                	push   %r15
ffffffff80023cf4:	48 89 c7             	mov    %rax,%rdi
ffffffff80023cf7:	fc                   	cld
ffffffff80023cf8:	e8 93 4b ff ff       	call   ffffffff80018890 <HalIrqDispatch>
ffffffff80023cfd:	41 5f                	pop    %r15
ffffffff80023cff:	41 5e                	pop    %r14
ffffffff80023d01:	41 5d                	pop    %r13
ffffffff80023d03:	41 5c                	pop    %r12
ffffffff80023d05:	41 5b                	pop    %r11
ffffffff80023d07:	41 5a                	pop    %r10
ffffffff80023d09:	41 59                	pop    %r9
ffffffff80023d0b:	41 58                	pop    %r8
ffffffff80023d0d:	5f                   	pop    %rdi
ffffffff80023d0e:	5e                   	pop    %rsi
ffffffff80023d0f:	5d                   	pop    %rbp
ffffffff80023d10:	5b                   	pop    %rbx
ffffffff80023d11:	5a                   	pop    %rdx
ffffffff80023d12:	59                   	pop    %rcx
ffffffff80023d13:	48 f7 44 24 10 03 00 	testq  $0x3,0x10(%rsp)
ffffffff80023d1a:	00 00 
ffffffff80023d1c:	74 03                	je     ffffffff80023d21 <IrqCommon.no_swapgs_exit>
ffffffff80023d1e:	0f 01 f8             	swapgs

ffffffff80023d21 <IrqCommon.no_swapgs_exit>:
ffffffff80023d21:	58                   	pop    %rax
ffffffff80023d22:	48 cf                	iretq

ffffffff80023d24 <IrqStub0>:
ffffffff80023d24:	50                   	push   %rax
ffffffff80023d25:	b8 00 00 00 00       	mov    $0x0,%eax
ffffffff80023d2a:	eb a4                	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023d2c <IrqStub1>:
ffffffff80023d2c:	50                   	push   %rax
ffffffff80023d2d:	b8 01 00 00 00       	mov    $0x1,%eax
ffffffff80023d32:	eb 9c                	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023d34 <IrqStub2>:
ffffffff80023d34:	50                   	push   %rax
ffffffff80023d35:	b8 02 00 00 00       	mov    $0x2,%eax
ffffffff80023d3a:	eb 94                	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023d3c <IrqStub3>:
ffffffff80023d3c:	50                   	push   %rax
ffffffff80023d3d:	b8 03 00 00 00       	mov    $0x3,%eax
ffffffff80023d42:	eb 8c                	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023d44 <IrqStub4>:
ffffffff80023d44:	50                   	push   %rax
ffffffff80023d45:	b8 04 00 00 00       	mov    $0x4,%eax
ffffffff80023d4a:	eb 84                	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023d4c <IrqStub5>:
ffffffff80023d4c:	50                   	push   %rax
ffffffff80023d4d:	b8 05 00 00 00       	mov    $0x5,%eax
ffffffff80023d52:	e9 79 ff ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023d57 <IrqStub6>:
ffffffff80023d57:	50                   	push   %rax
ffffffff80023d58:	b8 06 00 00 00       	mov    $0x6,%eax
ffffffff80023d5d:	e9 6e ff ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023d62 <IrqStub7>:
ffffffff80023d62:	50                   	push   %rax
ffffffff80023d63:	b8 07 00 00 00       	mov    $0x7,%eax
ffffffff80023d68:	e9 63 ff ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023d6d <IrqStub8>:
ffffffff80023d6d:	50                   	push   %rax
ffffffff80023d6e:	b8 08 00 00 00       	mov    $0x8,%eax
ffffffff80023d73:	e9 58 ff ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023d78 <IrqStub9>:
ffffffff80023d78:	50                   	push   %rax
ffffffff80023d79:	b8 09 00 00 00       	mov    $0x9,%eax
ffffffff80023d7e:	e9 4d ff ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023d83 <IrqStub10>:
ffffffff80023d83:	50                   	push   %rax
ffffffff80023d84:	b8 0a 00 00 00       	mov    $0xa,%eax
ffffffff80023d89:	e9 42 ff ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023d8e <IrqStub11>:
ffffffff80023d8e:	50                   	push   %rax
ffffffff80023d8f:	b8 0b 00 00 00       	mov    $0xb,%eax
ffffffff80023d94:	e9 37 ff ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023d99 <IrqStub12>:
ffffffff80023d99:	50                   	push   %rax
ffffffff80023d9a:	b8 0c 00 00 00       	mov    $0xc,%eax
ffffffff80023d9f:	e9 2c ff ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023da4 <IrqStub13>:
ffffffff80023da4:	50                   	push   %rax
ffffffff80023da5:	b8 0d 00 00 00       	mov    $0xd,%eax
ffffffff80023daa:	e9 21 ff ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023daf <IrqStub14>:
ffffffff80023daf:	50                   	push   %rax
ffffffff80023db0:	b8 0e 00 00 00       	mov    $0xe,%eax
ffffffff80023db5:	e9 16 ff ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023dba <IrqStub15>:
ffffffff80023dba:	50                   	push   %rax
ffffffff80023dbb:	b8 0f 00 00 00       	mov    $0xf,%eax
ffffffff80023dc0:	e9 0b ff ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023dc5 <IrqStub16>:
ffffffff80023dc5:	50                   	push   %rax
ffffffff80023dc6:	b8 10 00 00 00       	mov    $0x10,%eax
ffffffff80023dcb:	e9 00 ff ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023dd0 <IrqStub17>:
ffffffff80023dd0:	50                   	push   %rax
ffffffff80023dd1:	b8 11 00 00 00       	mov    $0x11,%eax
ffffffff80023dd6:	e9 f5 fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023ddb <IrqStub18>:
ffffffff80023ddb:	50                   	push   %rax
ffffffff80023ddc:	b8 12 00 00 00       	mov    $0x12,%eax
ffffffff80023de1:	e9 ea fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023de6 <IrqStub19>:
ffffffff80023de6:	50                   	push   %rax
ffffffff80023de7:	b8 13 00 00 00       	mov    $0x13,%eax
ffffffff80023dec:	e9 df fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023df1 <IrqStub20>:
ffffffff80023df1:	50                   	push   %rax
ffffffff80023df2:	b8 14 00 00 00       	mov    $0x14,%eax
ffffffff80023df7:	e9 d4 fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023dfc <IrqStub21>:
ffffffff80023dfc:	50                   	push   %rax
ffffffff80023dfd:	b8 15 00 00 00       	mov    $0x15,%eax
ffffffff80023e02:	e9 c9 fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023e07 <IrqStub22>:
ffffffff80023e07:	50                   	push   %rax
ffffffff80023e08:	b8 16 00 00 00       	mov    $0x16,%eax
ffffffff80023e0d:	e9 be fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023e12 <IrqStub23>:
ffffffff80023e12:	50                   	push   %rax
ffffffff80023e13:	b8 17 00 00 00       	mov    $0x17,%eax
ffffffff80023e18:	e9 b3 fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023e1d <IrqStub24>:
ffffffff80023e1d:	50                   	push   %rax
ffffffff80023e1e:	b8 18 00 00 00       	mov    $0x18,%eax
ffffffff80023e23:	e9 a8 fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023e28 <IrqStub25>:
ffffffff80023e28:	50                   	push   %rax
ffffffff80023e29:	b8 19 00 00 00       	mov    $0x19,%eax
ffffffff80023e2e:	e9 9d fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023e33 <IrqStub26>:
ffffffff80023e33:	50                   	push   %rax
ffffffff80023e34:	b8 1a 00 00 00       	mov    $0x1a,%eax
ffffffff80023e39:	e9 92 fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023e3e <IrqStub27>:
ffffffff80023e3e:	50                   	push   %rax
ffffffff80023e3f:	b8 1b 00 00 00       	mov    $0x1b,%eax
ffffffff80023e44:	e9 87 fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023e49 <IrqStub28>:
ffffffff80023e49:	50                   	push   %rax
ffffffff80023e4a:	b8 1c 00 00 00       	mov    $0x1c,%eax
ffffffff80023e4f:	e9 7c fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023e54 <IrqStub29>:
ffffffff80023e54:	50                   	push   %rax
ffffffff80023e55:	b8 1d 00 00 00       	mov    $0x1d,%eax
ffffffff80023e5a:	e9 71 fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023e5f <IrqStub30>:
ffffffff80023e5f:	50                   	push   %rax
ffffffff80023e60:	b8 1e 00 00 00       	mov    $0x1e,%eax
ffffffff80023e65:	e9 66 fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023e6a <IrqStub31>:
ffffffff80023e6a:	50                   	push   %rax
ffffffff80023e6b:	b8 1f 00 00 00       	mov    $0x1f,%eax
ffffffff80023e70:	e9 5b fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023e75 <IrqStub32>:
ffffffff80023e75:	50                   	push   %rax
ffffffff80023e76:	b8 20 00 00 00       	mov    $0x20,%eax
ffffffff80023e7b:	e9 50 fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023e80 <IrqStub33>:
ffffffff80023e80:	50                   	push   %rax
ffffffff80023e81:	b8 21 00 00 00       	mov    $0x21,%eax
ffffffff80023e86:	e9 45 fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023e8b <IrqStub34>:
ffffffff80023e8b:	50                   	push   %rax
ffffffff80023e8c:	b8 22 00 00 00       	mov    $0x22,%eax
ffffffff80023e91:	e9 3a fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023e96 <IrqStub35>:
ffffffff80023e96:	50                   	push   %rax
ffffffff80023e97:	b8 23 00 00 00       	mov    $0x23,%eax
ffffffff80023e9c:	e9 2f fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023ea1 <IrqStub36>:
ffffffff80023ea1:	50                   	push   %rax
ffffffff80023ea2:	b8 24 00 00 00       	mov    $0x24,%eax
ffffffff80023ea7:	e9 24 fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023eac <IrqStub37>:
ffffffff80023eac:	50                   	push   %rax
ffffffff80023ead:	b8 25 00 00 00       	mov    $0x25,%eax
ffffffff80023eb2:	e9 19 fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023eb7 <IrqStub38>:
ffffffff80023eb7:	50                   	push   %rax
ffffffff80023eb8:	b8 26 00 00 00       	mov    $0x26,%eax
ffffffff80023ebd:	e9 0e fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023ec2 <IrqStub39>:
ffffffff80023ec2:	50                   	push   %rax
ffffffff80023ec3:	b8 27 00 00 00       	mov    $0x27,%eax
ffffffff80023ec8:	e9 03 fe ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023ecd <IrqStub40>:
ffffffff80023ecd:	50                   	push   %rax
ffffffff80023ece:	b8 28 00 00 00       	mov    $0x28,%eax
ffffffff80023ed3:	e9 f8 fd ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023ed8 <IrqStub41>:
ffffffff80023ed8:	50                   	push   %rax
ffffffff80023ed9:	b8 29 00 00 00       	mov    $0x29,%eax
ffffffff80023ede:	e9 ed fd ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023ee3 <IrqStub42>:
ffffffff80023ee3:	50                   	push   %rax
ffffffff80023ee4:	b8 2a 00 00 00       	mov    $0x2a,%eax
ffffffff80023ee9:	e9 e2 fd ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023eee <IrqStub43>:
ffffffff80023eee:	50                   	push   %rax
ffffffff80023eef:	b8 2b 00 00 00       	mov    $0x2b,%eax
ffffffff80023ef4:	e9 d7 fd ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023ef9 <IrqStub44>:
ffffffff80023ef9:	50                   	push   %rax
ffffffff80023efa:	b8 2c 00 00 00       	mov    $0x2c,%eax
ffffffff80023eff:	e9 cc fd ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023f04 <IrqStub45>:
ffffffff80023f04:	50                   	push   %rax
ffffffff80023f05:	b8 2d 00 00 00       	mov    $0x2d,%eax
ffffffff80023f0a:	e9 c1 fd ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023f0f <IrqStub46>:
ffffffff80023f0f:	50                   	push   %rax
ffffffff80023f10:	b8 2e 00 00 00       	mov    $0x2e,%eax
ffffffff80023f15:	e9 b6 fd ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023f1a <IrqStub47>:
ffffffff80023f1a:	50                   	push   %rax
ffffffff80023f1b:	b8 2f 00 00 00       	mov    $0x2f,%eax
ffffffff80023f20:	e9 ab fd ff ff       	jmp    ffffffff80023cd0 <IrqCommon>

ffffffff80023f25 <IrqStubSpurious>:
ffffffff80023f25:	48 cf                	iretq
ffffffff80023f27:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff80023f2e:	00 00 

ffffffff80023f30 <LoadGDT>:
ffffffff80023f30:	0f 01 17             	lgdt   (%rdi)
ffffffff80023f33:	c3                   	ret

ffffffff80023f34 <ReloadSegments>:
ffffffff80023f34:	6a 08                	push   $0x8
ffffffff80023f36:	48 8d 05 03 00 00 00 	lea    0x3(%rip),%rax        # ffffffff80023f40 <ReloadSegments.reload_CS>
ffffffff80023f3d:	50                   	push   %rax
ffffffff80023f3e:	48 cb                	lretq

ffffffff80023f40 <ReloadSegments.reload_CS>:
ffffffff80023f40:	66 b8 10 00          	mov    $0x10,%ax
ffffffff80023f44:	8e d8                	mov    %eax,%ds
ffffffff80023f46:	8e c0                	mov    %eax,%es
ffffffff80023f48:	8e e0                	mov    %eax,%fs
ffffffff80023f4a:	8e e8                	mov    %eax,%gs
ffffffff80023f4c:	8e d0                	mov    %eax,%ss
ffffffff80023f4e:	c3                   	ret

ffffffff80023f4f <LoadTR>:
ffffffff80023f4f:	66 b8 28 00          	mov    $0x28,%ax
ffffffff80023f53:	0f 00 d8             	ltr    %eax
ffffffff80023f56:	c3                   	ret
ffffffff80023f57:	66 0f 1f 84 00 00 00 	nopw   0x0(%rax,%rax,1)
ffffffff80023f5e:	00 00 

ffffffff80023f60 <SyscallEntry>:
ffffffff80023f60:	0f 01 f8             	swapgs
ffffffff80023f63:	65 48 89 24 25 08 00 	mov    %rsp,%gs:0x8
ffffffff80023f6a:	00 00 
ffffffff80023f6c:	65 48 8b 24 25 00 00 	mov    %gs:0x0,%rsp
ffffffff80023f73:	00 00 
ffffffff80023f75:	65 ff 34 25 08 00 00 	push   %gs:0x8
ffffffff80023f7c:	00 
ffffffff80023f7d:	51                   	push   %rcx
ffffffff80023f7e:	41 53                	push   %r11
ffffffff80023f80:	50                   	push   %rax
ffffffff80023f81:	57                   	push   %rdi
ffffffff80023f82:	56                   	push   %rsi
ffffffff80023f83:	52                   	push   %rdx
ffffffff80023f84:	41 52                	push   %r10
ffffffff80023f86:	41 50                	push   %r8
ffffffff80023f88:	41 51                	push   %r9
ffffffff80023f8a:	53                   	push   %rbx
ffffffff80023f8b:	55                   	push   %rbp
ffffffff80023f8c:	41 54                	push   %r12
ffffffff80023f8e:	41 55                	push   %r13
ffffffff80023f90:	41 56                	push   %r14
ffffffff80023f92:	41 57                	push   %r15
ffffffff80023f94:	fb                   	sti
ffffffff80023f95:	48 89 e7             	mov    %rsp,%rdi
ffffffff80023f98:	e8 a3 40 fe ff       	call   ffffffff80008040 <SyscallDispatch>
ffffffff80023f9d:	fa                   	cli
ffffffff80023f9e:	41 5f                	pop    %r15
ffffffff80023fa0:	41 5e                	pop    %r14
ffffffff80023fa2:	41 5d                	pop    %r13
ffffffff80023fa4:	41 5c                	pop    %r12
ffffffff80023fa6:	5d                   	pop    %rbp
ffffffff80023fa7:	5b                   	pop    %rbx
ffffffff80023fa8:	48 83 c4 38          	add    $0x38,%rsp
ffffffff80023fac:	41 5b                	pop    %r11
ffffffff80023fae:	59                   	pop    %rcx
ffffffff80023faf:	5c                   	pop    %rsp
ffffffff80023fb0:	0f 01 f8             	swapgs
ffffffff80023fb3:	48 0f 07             	sysretq

ffffffff80023fb6 <JumpToUserMode>:
ffffffff80023fb6:	66 b8 1b 00          	mov    $0x1b,%ax
ffffffff80023fba:	8e d8                	mov    %eax,%ds
ffffffff80023fbc:	8e c0                	mov    %eax,%es
ffffffff80023fbe:	6a 1b                	push   $0x1b
ffffffff80023fc0:	56                   	push   %rsi
ffffffff80023fc1:	68 02 02 00 00       	push   $0x202
ffffffff80023fc6:	6a 23                	push   $0x23
ffffffff80023fc8:	57                   	push   %rdi
ffffffff80023fc9:	0f 01 f8             	swapgs
ffffffff80023fcc:	48 cf                	iretq
ffffffff80023fce:	66 90                	xchg   %ax,%ax

ffffffff80023fd0 <GetCR3>:
ffffffff80023fd0:	0f 20 d8             	mov    %cr3,%rax
ffffffff80023fd3:	c3                   	ret

ffffffff80023fd4 <LoadCR3>:
ffffffff80023fd4:	0f 22 df             	mov    %rdi,%cr3
ffffffff80023fd7:	c3                   	ret
ffffffff80023fd8:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
ffffffff80023fdf:	00 

ffffffff80023fe0 <SchedContextSwitch>:
ffffffff80023fe0:	48 85 c9             	test   %rcx,%rcx
ffffffff80023fe3:	74 03                	je     ffffffff80023fe8 <SchedContextSwitch.skip_fxsave>
ffffffff80023fe5:	0f ae 01             	fxsave (%rcx)

ffffffff80023fe8 <SchedContextSwitch.skip_fxsave>:
ffffffff80023fe8:	4d 89 c1             	mov    %r8,%r9
ffffffff80023feb:	55                   	push   %rbp
ffffffff80023fec:	53                   	push   %rbx
ffffffff80023fed:	41 54                	push   %r12
ffffffff80023fef:	41 55                	push   %r13
ffffffff80023ff1:	41 56                	push   %r14
ffffffff80023ff3:	41 57                	push   %r15
ffffffff80023ff5:	48 89 27             	mov    %rsp,(%rdi)
ffffffff80023ff8:	48 89 f4             	mov    %rsi,%rsp
ffffffff80023ffb:	0f 20 d8             	mov    %cr3,%rax
ffffffff80023ffe:	48 39 d0             	cmp    %rdx,%rax
ffffffff80024001:	74 03                	je     ffffffff80024006 <SchedContextSwitch.skip_cr3>
ffffffff80024003:	0f 22 da             	mov    %rdx,%cr3

ffffffff80024006 <SchedContextSwitch.skip_cr3>:
ffffffff80024006:	41 5f                	pop    %r15
ffffffff80024008:	41 5e                	pop    %r14
ffffffff8002400a:	41 5d                	pop    %r13
ffffffff8002400c:	41 5c                	pop    %r12
ffffffff8002400e:	5b                   	pop    %rbx
ffffffff8002400f:	5d                   	pop    %rbp
ffffffff80024010:	4d 85 c9             	test   %r9,%r9
ffffffff80024013:	74 04                	je     ffffffff80024019 <SchedContextSwitch.skip_fxrstor>
ffffffff80024015:	41 0f ae 09          	fxrstor (%r9)

ffffffff80024019 <SchedContextSwitch.skip_fxrstor>:
ffffffff80024019:	c3                   	ret
