// File: /workspace/github_c_makefile_star2_O0/Seclabs-htc[P]slip39/misc.c
// Function: dumphex
void dumphex(uint8_t *b, int l)
{
    int i, c;
    char obuf[32 * 2 + 1];

    if (b == NULL)
        return;

    while (l >= 32)
    {
        memset(obuf, 0, sizeof(obuf));
        for (i = 0; i < 32; i++)
        {
            int c0, c1;

            c = *b++; l--;
            c0 = (c >> 4) & 0xf;
            c1 = c & 0x0f;
            obuf[i*2] = hex_table[c0];
            obuf[i*2+1] = hex_table[c1];
            obuf[i*2+2] = 0;
        }
        printf("%s\n", obuf);
    }
    if (l > 0)
    {
        memset(obuf, 0, sizeof(obuf));
        for (i = 0; i < l; i++)
        {
            int c0, c1;

            c = *b++;
            c0 = (c >> 4) & 0xf;
            c1 = c & 0x0f;
            obuf[i*2] = hex_table[c0];
            obuf[i*2+1] = hex_table[c1];
            obuf[i*2+2] = 0;
        }
        printf("%s\n", obuf);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xe19b
jmp 0xe31b
jmp 0xe19d
cmpl $0x20, -0xc(%rbp)
jl 0xe264
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x41, %edx
callq 0x8060
movl $0x0, -0x10(%rbp)
cmpl $0x20, -0x10(%rbp)
jge 0xe24d
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movzbl (%rax), %eax
movl %eax, -0x14(%rbp)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x14(%rbp), %eax
sarl $0x4, %eax
andl $0xf, %eax
movl %eax, -0x64(%rbp)
movl -0x14(%rbp), %eax
andl $0xf, %eax
movl %eax, -0x68(%rbp)
movslq -0x64(%rbp), %rcx
leaq 0xa0aa(%rip), %rax      # 0x182b0
movb (%rax,%rcx), %cl
movl -0x10(%rbp), %eax
shll %eax
cltq
movb %cl, -0x60(%rbp,%rax)
movslq -0x68(%rbp), %rcx
leaq 0xa091(%rip), %rax      # 0x182b0
movb (%rax,%rcx), %cl
movl -0x10(%rbp), %eax
shll %eax
addl $0x1, %eax
cltq
movb %cl, -0x60(%rbp,%rax)
movl -0x10(%rbp), %eax
shll %eax
addl $0x2, %eax
cltq
movb $0x0, -0x60(%rbp,%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xe1be
leaq -0x60(%rbp), %rsi
leaq 0x11ea(%rip), %rdi      # 0xf442
movb $0x0, %al
callq 0x8050
jmp 0xe19d
cmpl $0x0, -0xc(%rbp)
jle 0xe31b
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x41, %edx
callq 0x8060
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0xe309
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movzbl (%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
sarl $0x4, %eax
andl $0xf, %eax
movl %eax, -0x6c(%rbp)
movl -0x14(%rbp), %eax
andl $0xf, %eax
movl %eax, -0x70(%rbp)
movslq -0x6c(%rbp), %rcx
leaq 0x9fee(%rip), %rax      # 0x182b0
movb (%rax,%rcx), %cl
movl -0x10(%rbp), %eax
shll %eax
cltq
movb %cl, -0x60(%rbp,%rax)
movslq -0x70(%rbp), %rcx
leaq 0x9fd5(%rip), %rax      # 0x182b0
movb (%rax,%rcx), %cl
movl -0x10(%rbp), %eax
shll %eax
addl $0x1, %eax
cltq
movb %cl, -0x60(%rbp,%rax)
movl -0x10(%rbp), %eax
shll %eax
addl $0x2, %eax
cltq
movb $0x0, -0x60(%rbp,%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xe285
leaq -0x60(%rbp), %rsi
leaq 0x112e(%rip), %rdi      # 0xf442
movb $0x0, %al
callq 0x8050
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)