LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/Seclabs-htc[P]slip39/trezor-crypto/hmac.c
// Function: hmac_sha512_Init
void hmac_sha512_Init(HMAC_SHA512_CTX *hctx, const uint8_t *key,
                      const uint32_t keylen) {
  static CONFIDENTIAL uint8_t i_key_pad[SHA512_BLOCK_LENGTH];
  memzero(i_key_pad, SHA512_BLOCK_LENGTH);
  if (keylen > SHA512_BLOCK_LENGTH) {
    sha512_Raw(key, keylen, i_key_pad);
  } else {
    memcpy(i_key_pad, key, keylen);
  }
  for (int i = 0; i < SHA512_BLOCK_LENGTH; i++) {
    hctx->o_key_pad[i] = i_key_pad[i] ^ 0x5c;
    i_key_pad[i] ^= 0x36;
  }
  sha512_Init(&(hctx->ctx));
  sha512_Update(&(hctx->ctx), i_key_pad, SHA512_BLOCK_LENGTH);
  memzero(i_key_pad, sizeof(i_key_pad));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xf174(%rip), %r14      # 0x18ca0
movl $0x80, %esi
movq %r14, %rdi
callq 0x81bc
movl %r12d, %edx
cmpl $0x81, %r12d
jb 0x9b5c
leaq 0xf154(%rip), %rax      # 0x18ca0
movq %r15, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x9813
jmp 0x9b6b
leaq 0xf13d(%rip), %rdi      # 0x18ca0
movq %r15, %rsi
callq 0x8080
xorl %eax, %eax
cmpq $0x80, %rax
je 0x9b89
movb (%rax,%r14), %cl
xorb $0x5c, %cl
movb %cl, (%rbx,%rax)
xorb $0x36, (%rax,%r14)
incq %rax
jmp 0x9b6d
subq $-0x80, %rbx
movq %rbx, %rdi
callq 0x9279
leaq 0xf104(%rip), %r14      # 0x18ca0
movl $0x80, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9537
movl $0x80, %esi
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x81bc
// File: /workspace/github_c_makefile_star2_O2/Seclabs-htc[P]slip39/trezor-crypto/hmac.c
// Function: hmac_sha512_Final
void hmac_sha512_Final(HMAC_SHA512_CTX *hctx, uint8_t *hmac) {
  sha512_Final(&(hctx->ctx), hmac);
  sha512_Init(&(hctx->ctx));
  sha512_Update(&(hctx->ctx), hctx->o_key_pad, SHA512_BLOCK_LENGTH);
  sha512_Update(&(hctx->ctx), hmac, SHA512_DIGEST_LENGTH);
  sha512_Final(&(hctx->ctx), hmac);
  memzero(hctx, sizeof(HMAC_SHA512_CTX));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x80(%rdi), %r15
movq %r15, %rdi
callq 0x969b
movq %r15, %rdi
callq 0x9279
movl $0x80, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x9537
pushq $0x40
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x9537
movq %r15, %rdi
movq %r14, %rsi
callq 0x969b
movl $0x150, %esi            # imm = 0x150
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x81bc
// File: /workspace/github_c_makefile_star2_O2/Seclabs-htc[P]slip39/trezor-crypto/hmac.c
// Function: hmac_sha512
void hmac_sha512(const uint8_t *key, const uint32_t keylen, const uint8_t *msg,
                 const uint32_t msglen, uint8_t *hmac) {
  HMAC_SHA512_CTX hctx;
  hmac_sha512_Init(&hctx, key, keylen);
  hmac_sha512_Update(&hctx, msg, msglen);
  hmac_sha512_Final(&hctx, hmac);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %r8, %rbx
movl %ecx, %r14d
movq %rdx, %r15
movl %esi, %edx
movq %rdi, %rsi
leaq -0x170(%rbp), %r12
movq %r12, %rdi
callq 0x9b11
leaq -0xf0(%rbp), %rdi
movl %r14d, %edx
movq %r15, %rsi
callq 0x9537
movq %r12, %rdi
movq %rbx, %rsi
callq 0x9bd1
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Seclabs-htc[P]slip39/trezor-crypto/hmac.c
// Function: hmac_sha512_prepare
void hmac_sha512_prepare(const uint8_t *key, const uint32_t keylen,
                         uint64_t *opad_digest, uint64_t *ipad_digest) {
  static CONFIDENTIAL uint64_t key_pad[SHA512_BLOCK_LENGTH / sizeof(uint64_t)];

  memzero(key_pad, sizeof(key_pad));
  if (keylen > SHA512_BLOCK_LENGTH) {
    static CONFIDENTIAL SHA512_CTX context;
    sha512_Init(&context);
    sha512_Update(&context, key, keylen);
    sha512_Final(&context, (uint8_t *)key_pad);
  } else {
    memcpy(key_pad, key, keylen);
  }

  /* compute o_key_pad and its digest */
  for (int i = 0; i < SHA512_BLOCK_LENGTH / (int)sizeof(uint64_t); i++) {
    uint64_t data;
#if BYTE_ORDER == LITTLE_ENDIAN
    REVERSE64(key_pad[i], data);
#else
    data = key_pad[i];
#endif
    key_pad[i] = data ^ 0x5c5c5c5c5c5c5c5c;
  }
  sha512_Transform(sha512_initial_hash_value, key_pad, opad_digest);

  /* convert o_key_pad to i_key_pad and compute its digest */
  for (int i = 0; i < SHA512_BLOCK_LENGTH / (int)sizeof(uint64_t); i++) {
    key_pad[i] = key_pad[i] ^ 0x5c5c5c5c5c5c5c5c ^ 0x3636363636363636;
  }
  sha512_Transform(sha512_initial_hash_value, key_pad, ipad_digest);
  memzero(key_pad, sizeof(key_pad));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, -0x30(%rbp)
movq %rdx, %r15
movl %esi, %r13d
movq %rdi, %r12
leaq 0xf06a(%rip), %r14      # 0x18d20
movl $0x80, %esi
movq %r14, %rdi
callq 0x81bc
cmpl $0x81, %r13d
jb 0x9cfa
leaq 0xf0cd(%rip), %rbx      # 0x18da0
movq %rbx, %rdi
callq 0x9279
movl %r13d, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x9537
leaq 0xf030(%rip), %rsi      # 0x18d20
movq %rbx, %rdi
callq 0x969b
jmp 0x9d0c
movl %r13d, %edx
leaq 0xf01c(%rip), %rdi      # 0x18d20
movq %r12, %rsi
callq 0x8080
xorl %eax, %eax
movabsq $0x5c5c5c5c5c5c5c5c, %rcx # imm = 0x5C5C5C5C5C5C5C5C
cmpq $0x80, %rax
je 0x9d34
movq (%rax,%r14), %rdx
xorq %rcx, %rdx
bswapq %rdx
movq %rdx, (%rax,%r14)
addq $0x8, %rax
jmp 0x9d18
leaq 0x2315(%rip), %rdi      # 0xc050
movq %r14, %rsi
movq %r15, %rdx
callq 0x92ce
xorl %eax, %eax
movabsq $0x6a6a6a6a6a6a6a6a, %rcx # imm = 0x6A6A6A6A6A6A6A6A
cmpq $0x80, %rax
je 0x9d64
xorq %rcx, (%rax,%r14)
addq $0x8, %rax
jmp 0x9d52
leaq 0x22e5(%rip), %rdi      # 0xc050
leaq 0xefae(%rip), %rbx      # 0x18d20
movq %rbx, %rsi
movq -0x30(%rbp), %rdx
callq 0x92ce
movl $0x80, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x81bc
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Seclabs-htc[P]slip39/trezor-crypto/rand.c
// Function: random_buffer
void __attribute__((weak)) random_buffer(uint8_t *buf, size_t len) {
  uint32_t r = 0;
  for (size_t i = 0; i < len; i++) {
    if (i % 4 == 0) {
      r = random32();
    }
    buf[i] = (r >> ((i % 4) * 8)) & 0xFF;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %r8d, %r8d
movl 0xf0a0(%rip), %eax      # 0x18e70
xorl %edx, %edx
cmpq %rdx, %rsi
je 0x9e06
movq %rdx, %rcx
andq $0x3, %rcx
jne 0x9df4
imull $0x19660d, %eax, %eax   # imm = 0x19660D
addl $0x3c6ef35f, %eax       # imm = 0x3C6EF35F
movl %eax, 0xf07f(%rip)      # 0x18e70
movl %eax, %r8d
shll $0x3, %ecx
movl %r8d, %r9d
shrl %cl, %r9d
movb %r9b, (%rdi,%rdx)
incq %rdx
jmp 0x9dd2
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Seclabs-htc[P]slip39/trezor-crypto/rand.c
// Function: random_permute
void random_permute(char *str, size_t len) {
  for (int i = len - 1; i >= 1; i--) {
    int j = random_uniform(i + 1);
    char t = str[j];
    str[j] = str[i];
    str[i] = t;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %edi
leaq -0x1(%rdi), %r14
testl %r14d, %r14d
jle 0x9e7b
callq 0x9e08
cltq
movb (%rbx,%rax), %cl
movl %r14d, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movb (%rbx,%rdx), %sil
movb %sil, (%rbx,%rax)
movb %cl, (%rbx,%rdx)
movq %r14, %rdi
jmp 0x9e4f
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Seclabs-htc[P]slip39/test.c
// Function: simple_test
int simple_test(void)
{
    uint8_t master_secret[32];
    int master_secret_len;
    uint16_t gt;
    int i, j;
    int gn = 5;
    char *ml[gn];
    char *dml[5];
    uint8_t ms[32];
    int msl;

    // create

    #if 1
    master_secret_len = sizeof(master_secret);
    fromhex(master_secret, &master_secret_len, "dbc4ac53fcc6d33e38c63fde60dae89f");
    #else
    master_secret_len = 16;
    random_buffer(master_secret, master_secret_len);
    #endif

    printf("master secret\n");
    dumphex(master_secret, master_secret_len);

    for (i = 0; i < gn; i++)
        ml[i] = (char *)malloc(MNEMONIC_LIST_LEN);

    gt = 3;
    generate_mnemonics(gt, gn, master_secret, master_secret_len,
            NULL, 0, 0, ml);

    printf("\n");
    for (i = 0; i < gn; i++)
        printf("%s\n", ml[i]);
    printf("\n");

    // choice 4, 3, 0 for decode
    dml[0] = ml[4];
    dml[1] = ml[3];
    dml[2] = ml[0];
    msl = sizeof(ms);
    combine_mnemonics(gt, dml, NULL, 0, ms, &msl);

    printf("master secret\n");
    dumphex(ms, msl);

    if ((msl == master_secret_len) &&
        memcmp(master_secret, ms, msl) == 0)
    {
        printf("\n--- pass ---\n\n");
    }
    else
    {
        printf("\n--- fail ---\n\n");
    }

    for (i = 0; i < gn; i++)
        free(ml[i]);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movq %rsp, %r15
leaq -0x1c(%rbp), %rbx
movl $0x20, (%rbx)
leaq 0x257d(%rip), %rdx      # 0xc421
leaq -0x70(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb3c0
leaq 0x3fc2(%rip), %rdi      # 0xde7c
callq 0x8050
movl (%rbx), %esi
movq %r14, %rdi
callq 0xb47a
xorl %ebx, %ebx
cmpq $0x5, %rbx
je 0x9ee5
movl $0x16b, %edi            # imm = 0x16B
callq 0x8090
movq %rax, -0x50(%rbp,%rbx,8)
incq %rbx
jmp 0x9ecb
movl -0x1c(%rbp), %ecx
andl $0x0, (%rsp)
leaq -0x50(%rbp), %rax
movq %rax, 0x8(%rsp)
xorl %ebx, %ebx
pushq $0x3
popq %rdi
pushq $0x5
popq %rsi
leaq -0x70(%rbp), %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x9ff8
pushq $0xa
popq %rdi
callq 0x8040
cmpq $0x5, %rbx
je 0x9f29
movq -0x50(%rbp,%rbx,8), %rdi
callq 0x8050
incq %rbx
jmp 0x9f14
pushq $0xa
popq %rdi
callq 0x8040
movq -0x30(%rbp), %rax
leaq -0xc0(%rbp), %rsi
movq %rax, (%rsi)
movq -0x50(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rsi)
movq %rax, 0x10(%rsi)
leaq -0x20(%rbp), %rbx
movl $0x20, (%rbx)
pushq $0x3
popq %rdi
leaq -0x90(%rbp), %r14
xorl %edx, %edx
xorl %ecx, %ecx
movq %r14, %r8
movq %rbx, %r9
callq 0xaad5
leaq 0x3f03(%rip), %rdi      # 0xde7c
callq 0x8050
movl (%rbx), %esi
movq %r14, %rdi
callq 0xb47a
movslq (%rbx), %rdx
cmpl -0x1c(%rbp), %edx
jne 0x9fa4
leaq -0x70(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x80a0
testl %eax, %eax
je 0x9fda
leaq 0x2497(%rip), %rdi      # 0xc442
callq 0x8050
xorl %ebx, %ebx
cmpq $0x5, %rbx
je 0x9fc7
movq -0x50(%rbp,%rbx,8), %rdi
callq 0x8030
incq %rbx
jmp 0x9fb2
movq %r15, %rsp
xorl %eax, %eax
addq $0xb8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2470(%rip), %rdi      # 0xc451
jmp 0x9fab
// File: /workspace/github_c_makefile_star2_O2/Seclabs-htc[P]slip39/slip39.c
// Function: recover_secret
static int _recover_secret(uint8_t t, int sl, uint8_t *gsi, const uint8_t **gs, uint8_t *result)
{
    int i, j;
    uint8_t shared_secret[sl];
    uint8_t digest_share[sl];
    uint8_t hash[SHA256_DIGEST_LENGTH];

    if (t == 1)
    {
        memcpy(result, gs[0], sl);
        return 0;
    }

    if (!shamir_interpolate(shared_secret, SECRET_INDEX, gsi, gs, t, sl))
        return -1;
    if (!shamir_interpolate(digest_share, DIGEST_INDEX, gsi, gs, t, sl))
        return -2;

    /* check digest_share hash */
    hmac_sha256(&digest_share[DIGEST_LENGTH_BYTES], sl - DIGEST_LENGTH_BYTES, shared_secret, sl, hash);
    if(memcmp(digest_share, hash, DIGEST_LENGTH_BYTES) != 0)
        return -3;  // digest error

    memcpy(result, shared_secret, sl);

    memzero(shared_secret, sl);
    memzero(digest_share, sl);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r14
movl %esi, %ebx
movq %rsp, %r15
leaq 0xf(%rbx), %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
movq %rsp, %r12
subq %rax, %r12
movq %r12, %rsp
cmpl $0x1, %edi
jne 0xaf4b
movq (%r14), %rsi
movq %r8, %rdi
movq %rbx, %rdx
callq 0x8080
xorl %eax, %eax
jmp 0xafec
movq %rsi, -0x38(%rbp)
movq %r8, -0x30(%rbp)
movzbl %dil, %r13d
movq %r15, %rdi
movl $0xff, %esi
movq %rdx, -0x40(%rbp)
movq %r14, %rcx
movl %r13d, %r8d
movq %rbx, %r9
callq 0xb290
testb %al, %al
je 0xafe1
movq %r12, %rdi
movl $0xfe, %esi
movq -0x40(%rbp), %rdx
movq %r14, %rcx
movl %r13d, %r8d
movq %rbx, %r9
callq 0xb290
testb %al, %al
je 0xafe5
leaq 0x4(%r12), %rdi
movq -0x38(%rbp), %rcx
leal -0x4(%rcx), %esi
leaq -0x60(%rbp), %r14
movq %r15, %rdx
movq %r14, %r8
callq 0x99d7
movl (%r12), %eax
cmpl (%r14), %eax
jne 0xafe9
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x8080
movq %r15, %rdi
movq %rbx, %rsi
callq 0x81bc
movq %r12, %rdi
movq %rbx, %rsi
callq 0x81bc
jmp 0xaf44
pushq $-0x1
jmp 0xafeb
pushq $-0x2
jmp 0xafeb
pushq $-0x3
popq %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Seclabs-htc[P]slip39/slip39.c
// Function: rs1024_polymod_update
static void _rs1024_polymod_update(RS1024_CTX* c, uint32_t *val, int val_len)
{
    uint32_t b, v;
    int i, j;
    static uint32_t GEN[] = {
        0x00E0E040,
        0x01C1C080,
        0x03838100,
        0x07070200,
        0x0E0E0009,
        0x1C0C2412,
        0x38086C24,
        0x3090FC48,
        0x21B1F890,
        0x03F3F120,
    };

    for (j = 0; j < val_len; j++)
    {
        v = *val++;
        b = c->c >> 20;
        c->c = (c->c & 0xFFFFF) << 10 ^ v;
        for (i = 0; i < 10; i++)
            if ((b >> i) & 1)
                c->c ^= GEN[i];
            else
                c->c ^= 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
leaq 0x2c6b(%rip), %rcx      # 0xdeb0
cmpl %edx, %eax
je 0xb28d
movl (%rdi), %r8d
movl %r8d, %r9d
shll $0xa, %r8d
andl $0x3ffffc00, %r8d       # imm = 0x3FFFFC00
xorl (%rsi), %r8d
shrl $0x14, %r9d
movl %r8d, (%rdi)
movq %rcx, %r10
xorl %r11d, %r11d
cmpq $0xa, %r11
je 0xb285
btl %r11d, %r9d
jae 0xb27c
xorl (%r10), %r8d
movl %r8d, (%rdi)
incq %r11
addq $0x4, %r10
jmp 0xb26a
addq $0x4, %rsi
incl %eax
jmp 0xb245
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Seclabs-htc[P]slip39/gf256.c
// Function: shamir_interpolate
bool shamir_interpolate(uint8_t *result, uint8_t x,
                        const uint8_t *share_indices,
                        const uint8_t **share_values, uint8_t share_count,
                        size_t len)
{
    size_t i, j;

    if (len > SHAMIR_MAX_LEN)
        return false;

    for (i = 0; i < share_count; i++)
        for (j = 0; j < share_count; j++)
            if ((i != j) && (share_indices[i] == share_indices[j]))
                return false;

    for (i = 0; i < share_count; i++)
        if (x == share_indices[i])
        {
            memcpy(result, share_values[i], len);
            return true;
        }

    memzero(result, len);
    for (i = 0; i < share_count; i++)
    {
        uint8_t t;
        uint32_t d;

        d = 0;
        for (j = 0; j < share_count; j++)
        if (i != j)
        {
            d += LOG_TABLE[x ^ share_indices[j]];
            d += 255 - LOG_TABLE[share_indices[i] ^ share_indices[j]];
            d %= 255;
        }

        for (j = 0; j < len; j++)
        {
            t = share_values[i][j];
            result[j] ^= t ? EXP_TABLE[(LOG_TABLE[t] + d) % 255] : 0;
        }
    }

    return true;
}

// Assembly:
cmpq $0x20, %r9
jbe 0xb299
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rdi, %r15
movzbl %r8b, %r13d
xorl %eax, %eax
cmpq %r13, %rax
je 0xb2ef
xorl %ecx, %ecx
cmpq %rcx, %r13
je 0xb2d9
cmpq %rcx, %rax
je 0xb2d4
movb (%r12,%rax), %dl
cmpb (%r12,%rcx), %dl
je 0xb2de
incq %rcx
jmp 0xb2c0
incq %rax
jmp 0xb2b9
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
cmpq %rax, %r13
je 0xb305
cmpb %sil, (%r12,%rax)
je 0xb3aa
incq %rax
jmp 0xb2f1
movl %esi, -0x2c(%rbp)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x81bc
xorl %esi, %esi
leaq 0x2bc4(%rip), %rdi      # 0xdee0
movl $0xff, %r8d
leaq 0x2cb7(%rip), %r9       # 0xdfe0
movl -0x2c(%rbp), %r11d
cmpq %r13, %rsi
je 0xb3b9
xorl %r10d, %r10d
xorl %ecx, %ecx
cmpq %r10, %r13
je 0xb373
cmpq %r10, %rsi
je 0xb36e
movb (%r12,%r10), %al
movl %eax, %edx
xorb %r11b, %dl
movzbl %dl, %edx
movzbl (%rdx,%rdi), %edx
addl %edx, %ecx
xorb (%r12,%rsi), %al
movzbl %al, %eax
movzbl (%rax,%rdi), %eax
xorl %r8d, %eax
addl %ecx, %eax
xorl %edx, %edx
divl %r8d
movl %edx, %ecx
incq %r10
jmp 0xb33b
xorl %r10d, %r10d
cmpq %r10, %rbx
je 0xb3a5
movq (%r14,%rsi,8), %rax
movzbl (%rax,%r10), %eax
testq %rax, %rax
je 0xb39a
movzbl (%rax,%rdi), %eax
addl %ecx, %eax
xorl %edx, %edx
divl %r8d
movb (%rdx,%r9), %al
jmp 0xb39c
xorl %eax, %eax
xorb %al, (%r15,%r10)
incq %r10
jmp 0xb376
incq %rsi
jmp 0xb32d
movq (%r14,%rax,8), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x8080
movb $0x1, %al
jmp 0xb2e0
// File: /workspace/github_c_makefile_star2_O2/Seclabs-htc[P]slip39/misc.c
// Function: fromhex
int fromhex(uint8_t *buf, uint32_t *buf_len, const char *str)
{
    size_t i, len = strlen(str) / 2;

    if (len > *buf_len)
        return -1;

    for (i = 0; i < len; i++) {
        uint8_t c = 0;
        if (str[i * 2] >= '0' && str[i*2] <= '9') c += (str[i * 2] - '0') << 4;
        if ((str[i * 2] & ~0x20) >= 'A' && (str[i*2] & ~0x20) <= 'F') c += (10 + (str[i * 2] & ~0x20) - 'A') << 4;
        if (str[i * 2 + 1] >= '0' && str[i * 2 + 1] <= '9') c += (str[i * 2 + 1] - '0');
        if ((str[i * 2 + 1] & ~0x20) >= 'A' && (str[i * 2 + 1] & ~0x20) <= 'F') c += (10 + (str[i * 2 + 1] & ~0x20) - 'A');
        buf[i] = c;
    }
    *buf_len = len;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %rdx, %rdi
callq 0x8060
shrq %rax
movl (%rbx), %ecx
cmpq %rcx, %rax
jbe 0xb3ed
pushq $-0x1
popq %rax
jmp 0xb46f
xorl %ecx, %ecx
xorl %edx, %edx
cmpq %rdx, %rax
je 0xb46b
movb (%r14,%rdx,2), %dil
movb 0x1(%r14,%rdx,2), %sil
leal -0x30(%rdi), %r8d
movl %edi, %r9d
shlb $0x4, %r9b
cmpb $0xa, %r8b
movzbl %r9b, %r8d
movl $0x0, %r9d
cmovbl %r8d, %r9d
andb $-0x21, %dil
addb $-0x41, %dil
addb $-0x70, %r8b
cmpb $0x6, %dil
movzbl %r8b, %edi
cmovael %ecx, %edi
leal -0x30(%rsi), %r8d
cmpb $0xa, %r8b
movzbl %r8b, %r8d
cmovael %ecx, %r8d
addb %r9b, %r8b
addb %dil, %r8b
andb $-0x21, %sil
leal -0x41(%rsi), %edi
addb $-0x37, %sil
cmpb $0x6, %dil
movzbl %sil, %esi
cmovael %ecx, %esi
addb %r8b, %sil
movb %sil, (%r15,%rdx)
incq %rdx
jmp 0xb3f1
movl %eax, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
testq %rdi, %rdi
je 0xb56a
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leaq -0x70(%rbp), %r15
leaq 0x2c3b(%rip), %r12      # 0xe0e0
cmpl $0x20, %r14d
jl 0xb506
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
movb $0x0, -0x30(%rbp)
xorl %r13d, %r13d
cmpq $0x20, %r13
je 0xb4f5
movzbl (%rbx,%r13), %eax
movl %eax, %ecx
shrl $0x4, %ecx
andl $0xf, %eax
movb (%rcx,%r12), %cl
movb %cl, -0x70(%rbp,%r13,2)
movb (%rax,%r12), %al
movb %al, -0x6f(%rbp,%r13,2)
movb $0x0, -0x6e(%rbp,%r13,2)
incq %r13
jmp 0xb4c5
addl $-0x20, %r14d
movq %r15, %rdi
callq 0x8050
addq %r13, %rbx
jmp 0xb4a5
testl %r14d, %r14d
jle 0xb55c
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
movb $0x0, -0x30(%rbp)
movl %r14d, %eax
xorl %ecx, %ecx
cmpq %rax, %rcx
jae 0xb553
movzbl (%rbx,%rcx), %edx
movl %edx, %esi
shrl $0x4, %esi
andl $0xf, %edx
movb (%rsi,%r12), %sil
movb %sil, -0x70(%rbp,%rcx,2)
movb (%rdx,%r12), %dl
movb %dl, -0x6f(%rbp,%rcx,2)
movb $0x0, -0x6e(%rbp,%rcx,2)
incq %rcx
jmp 0xb527
leaq -0x70(%rbp), %rdi
callq 0x8050
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Seclabs-htc[P]slip39/vectors.c
// Function: test_vectors
int test_vectors(void)
{

    int i, gn, sl;
    char **ml;
    char pass[] = "TREZOR";
    uint8_t ms[32];
    int msl;
    uint8_t vs[32];
    int vsl;
    int ret;


    for (i = 0; i < 40; i++)
    {
        ml = vectors[i].mnemonic;

        gn = 0;
        while (ml[gn] != 0)
            gn++;

        printf("%s\n", vectors[i].description);
        sl = strlen(vectors[i].secret);
        msl = sizeof(ms);
        ret = combine_mnemonics(gn ,ml, pass, strlen(pass), ms, &msl);

        if (ret == 0)
        {
            vsl = sizeof(vs);
            fromhex(vs, &vsl, vectors[i].secret);

            if (vsl == msl)
            {
                if (memcmp(ms, vs, msl) == 0)
                    printf("--> PASS\n");
                else
                {
                    printf("--> FAIL <--------\n");
                }
            }
            else
            {
                printf("--> FAIL <--------\n");
            }
        }
        else
        {
            if (strlen(vectors[i].secret) == 0)
                printf("--> PASS\n");
            else
                printf("--> FAIL <--------\n");
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
leaq -0x38(%rbp), %rax
movl $0x524f5a, 0x3(%rax)    # imm = 0x524F5A
movl $0x5a455254, (%rax)     # imm = 0x5A455254
leaq 0xaabf(%rip), %rcx      # 0x16078
xorl %r14d, %r14d
cmpq $0x28, %r14
je 0xb69f
imulq $0x110, %r14, %rax      # imm = 0x110
leaq 0xaa9c(%rip), %rdx      # 0x16070
leaq (%rdx,%rax), %rbx
leaq (%rax,%rdx), %r13
addq $0x8, %r13
movq %rcx, -0x40(%rbp)
movq %rcx, %rax
pushq $-0x1
popq %r12
incl %r12d
cmpq $0x0, (%rax)
leaq 0x8(%rax), %rax
jne 0xb5eb
movq (%rbx), %rdi
callq 0x8050
movl $0x20, -0x30(%rbp)
leaq -0x38(%rbp), %r15
movq %r15, %rdi
callq 0x8060
movl %r12d, %edi
movq %r13, %rsi
movq %r15, %rdx
movl %eax, %ecx
leaq -0x80(%rbp), %r8
leaq -0x30(%rbp), %r9
callq 0xaad5
testl %eax, %eax
je 0xb63b
movq 0x108(%rbx), %rax
cmpb $0x0, (%rax)
jmp 0xb675
movl $0x20, -0x2c(%rbp)
movq 0x108(%rbx), %rdx
leaq -0x60(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0xb3c0
movslq -0x2c(%rbp), %rdx
leaq 0x5d24(%rip), %rdi      # 0x11385
cmpl -0x30(%rbp), %edx
jne 0xb687
leaq -0x80(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x80a0
testl %eax, %eax
leaq 0x5d09(%rip), %rdi      # 0x11385
leaq 0x5d15(%rip), %rax      # 0x11398
cmoveq %rax, %rdi
callq 0x8050
incq %r14
movq -0x40(%rbp), %rcx
addq $0x110, %rcx            # imm = 0x110
jmp 0xb5bc
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Cloudef[P]dwm-fork/dwm.c
// Function: wintomenu
menu_t*
wintomenu( Window win )
{
   menu_t *m;

   if(!menu) return(NULL);
   for( m = menu; m; m = m->next )
      if(m->win == win) return(m);

   return(NULL);
}

// Assembly:
movq 0xdbcd(%rip), %rax      # 0x13480
testq %rax, %rax
je 0x58c8
testq %rax, %rax
je 0x58c8
cmpq %rdi, (%rax)
je 0x58ca
movq 0x20(%rax), %rax
jmp 0x58b8
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/Cloudef[P]dwm-fork/dwm.c
// Function: ctxtomenu
menu_t*
ctxtomenu( const menuCtx *ctx )
{
   menu_t *m;

   if(!menu) return(NULL);
   for( m = menu; m; m = m->next )
      if(m->ctx == ctx) return(m);

   return(NULL);
}

// Assembly:
movq 0xdbae(%rip), %rax      # 0x13480
testq %rax, %rax
je 0x58e8
testq %rax, %rax
je 0x58e8
cmpq %rdi, 0x30(%rax)
je 0x58ea
movq 0x20(%rax), %rax
jmp 0x58d7
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/Cloudef[P]dwm-fork/dwm.c
// Function: xerror
int
xerror(Display *dpy, XErrorEvent *ee) {
   if(ee->error_code == BadWindow
         || (ee->request_code == X_SetInputFocus && ee->error_code == BadMatch)
         || (ee->request_code == X_PolyText8 && ee->error_code == BadDrawable)
         || (ee->request_code == X_PolyFillRectangle && ee->error_code == BadDrawable)
         || (ee->request_code == X_PolySegment && ee->error_code == BadDrawable)
         || (ee->request_code == X_ConfigureWindow && ee->error_code == BadMatch)
         || (ee->request_code == X_GrabButton && ee->error_code == BadAccess)
         || (ee->request_code == X_GrabKey && ee->error_code == BadAccess)
         || (ee->request_code == X_CopyArea && ee->error_code == BadDrawable))
      return 0;
   fprintf(stderr, "dwm: fatal error: request code=%d, error code=%d\n",
         ee->request_code, ee->error_code);
   return xerrorxlib(dpy, ee); /* may call exit */
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movzbl 0x20(%rsi), %ecx
cmpl $0x3, %ecx
je 0x639f
movq %rsi, %rbx
movzbl 0x21(%rsi), %edx
movl %edx, %eax
xorb $0x2a, %al
movl %ecx, %esi
xorb $0x8, %sil
orb %al, %sil
je 0x639f
movq %rdi, %r14
cmpl $0xc, %edx
je 0x63dc
cmpl $0x1c, %edx
je 0x63a9
cmpl $0x21, %edx
je 0x63a9
cmpl $0x3e, %edx
je 0x639a
cmpl $0x42, %edx
je 0x639a
cmpl $0x46, %edx
je 0x639a
cmpl $0x4a, %edx
jne 0x63ae
cmpl $0x9, %ecx
jne 0x63ae
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpl $0xa, %ecx
je 0x639f
movq 0xbc33(%rip), %rax      # 0x11fe8
movq (%rax), %rdi
leaq 0x6d5e(%rip), %rsi      # 0xd11d
xorl %eax, %eax
callq 0x5730
movq 0xd293(%rip), %rax      # 0x13660
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
cmpl $0x8, %ecx
je 0x639f
jmp 0x63ae
// File: /workspace/github_c_makefile_star2_O2/Cloudef[P]dwm-fork/dwm.c
// Function: getcolor
unsigned long
#ifndef XFT
getcolor(const char *colstr) {
#else
getcolor(const char *colstr, XftColor *color) {
#endif
   Colormap cmap = DefaultColormap(dpy, screen);
#ifndef XFT
   XColor color;

   if(!XAllocNamedColor(dpy, cmap, colstr, &color, &color))
      die("error, cannot allocate color '%s'\n", colstr);
   return color.pixel;
#else
   Visual *vis = DefaultVisual(dpy, screen);
   if(!XftColorAllocName(dpy,vis,cmap,colstr, color))
      die("error, cannot allocate color '%s'\n", colstr);

   return color->pixel;
#endif
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0xceac(%rip), %rdi      # 0x13488
movq 0xe8(%rdi), %rax
movslq 0xd07e(%rip), %rcx      # 0x13668
shlq $0x7, %rcx
movq 0x50(%rax,%rcx), %rsi
movq %rsp, %rcx
movq %rbx, %rdx
movq %rcx, %r8
callq 0x51f0
testl %eax, %eax
je 0x660f
movq (%rsp), %rax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x6d2b(%rip), %rdi      # 0xd341
movq %rbx, %rsi
xorl %eax, %eax
callq 0x62ae
// File: /workspace/github_c_makefile_star2_O2/Cloudef[P]dwm-fork/dwm.c
// Function: updatebars
void
updatebars(void) {
   Monitor *m;
   XSetWindowAttributes wa;
   int b = 0;

   wa.override_redirect = True;
   wa.background_pixmap = ParentRelative;
   wa.event_mask = ButtonPressMask|ExposureMask;
   for(m = mons; m; m = m->next) {
      m->barwin = XCreateWindow(dpy, root, m->bx, m->by, m->bw, m->bh, 0, DefaultDepth(dpy, screen),
            CopyFromParent, DefaultVisual(dpy, screen),
            CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa);
      XDefineCursor(dpy, m->barwin, cursor[CurNormal]);
      XMapRaised(dpy, m->barwin);
      b++;
   }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x78, %rsp
leaq 0x8(%rsp), %rbx
movl $0x1, 0x58(%rbx)
movq $0x1, (%rbx)
movq $0x8004, 0x48(%rbx)     # imm = 0x8004
leaq 0xce1f(%rip), %r14      # 0x13468
movq (%r14), %r14
testq %r14, %r14
je 0x66e0
movq 0xce2c(%rip), %rdi      # 0x13488
movq 0xcfed(%rip), %rsi      # 0x13650
movl 0x18(%r14), %edx
movl 0x1c(%r14), %ecx
movl 0x20(%r14), %r8d
movl 0x24(%r14), %r9d
movq 0xe8(%rdi), %rax
movslq 0xcfe7(%rip), %r10      # 0x13668
shlq $0x7, %r10
movl 0x38(%rax,%r10), %r11d
pushq %rbx
pushq $0xa01                  # imm = 0xA01
pushq 0x40(%rax,%r10)
pushq $0x0
pushq %r11
pushq $0x0
callq 0x5230
addq $0x30, %rsp
movq %rax, 0x98(%r14)
movq 0xcdd6(%rip), %rdi      # 0x13488
movq 0xcfc7(%rip), %rdx      # 0x13680
movq %rax, %rsi
callq 0x5590
movq 0xcdc0(%rip), %rdi      # 0x13488
movq 0x98(%r14), %rsi
callq 0x5710
addq $0x90, %r14
jmp 0x6649
addq $0x78, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Cloudef[P]dwm-fork/dwm.c
// Function: updatestatus
void
updatestatus(void) {
   if(!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
      strcpy(stext, VERSION);
#ifndef STATUS_MONITOR
   if(!alwaysdrawstatus && !inversestatus)
      drawbar(selmon);
   else
      drawbars();
#else
   drawbars();
#endif
}

// Assembly:
pushq %rax
movq 0xcf60(%rip), %rdi      # 0x13650
leaq 0xd019(%rip), %rdx      # 0x13710
pushq $0x27
popq %rsi
movl $0x100, %ecx            # imm = 0x100
callq 0x75b7
testl %eax, %eax
jne 0x6732
movups 0x6c6e(%rip), %xmm0     # 0xd37d
movups %xmm0, 0xd013(%rip)     # 0x13729
movups 0x6c57(%rip), %xmm0     # 0xd374
movaps %xmm0, 0xcffc(%rip)     # 0x13720
movups 0x6c39(%rip), %xmm0     # 0xd364
movaps %xmm0, 0xcfde(%rip)     # 0x13710
popq %rax
jmp 0x7680
// File: /workspace/github_c_makefile_star2_O2/Cloudef[P]dwm-fork/dwm.c
// Function: grabkeys
void
grabkeys(void) {
   updatenumlockmask();
   {
      unsigned int i, j;
      unsigned int modifiers[] = { 0, LockMask, numlockmask, numlockmask|LockMask };
      KeyCode code;

      XUngrabKey(dpy, AnyKey, AnyModifier, root);
      for(i = 0; i < LENGTH(keys); i++) {
         if((code = XKeysymToKeycode(dpy, keys[i].keysym)))
            for(j = 0; j < LENGTH(modifiers); j++)
               XGrabKey(dpy, code, keys[i].mod | modifiers[j], root,
                     True, GrabModeAsync, GrabModeAsync);
      }
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
callq 0x83db
movabsq $0x200000000, %rax      # imm = 0x200000000
movq %rax, 0x10(%rsp)
movl 0xcef5(%rip), %eax      # 0x13818
movl %eax, 0x18(%rsp)
orl $0x2, %eax
movl %eax, 0x1c(%rsp)
movq 0xcb53(%rip), %rdi      # 0x13488
movq 0xcd14(%rip), %rcx      # 0x13650
xorl %r14d, %r14d
xorl %esi, %esi
movl $0x8000, %edx           # imm = 0x8000
callq 0x5220
leaq 0xbbfe(%rip), %r15      # 0x12550
pushq $0x1
popq %rbx
cmpq $0x49, %r14
je 0x69bb
movq 0xcb26(%rip), %rdi      # 0x13488
movq %r14, %r12
shlq $0x5, %r12
movq 0x8(%r12,%r15), %rsi
callq 0x5620
testb %al, %al
je 0x69b6
addq %r15, %r12
movzbl %al, %ebp
xorl %r13d, %r13d
cmpq $0x4, %r13
je 0x69b6
movq 0xcafb(%rip), %rdi      # 0x13488
movl 0x10(%rsp,%r13,4), %edx
orl (%r12), %edx
movq 0xccb3(%rip), %rcx      # 0x13650
movl $0x1, (%rsp)
movl %ebp, %esi
movl %ebx, %r8d
movl %ebx, %r9d
callq 0x5660
incq %r13
jmp 0x6980
incq %r14
jmp 0x6955
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Cloudef[P]dwm-fork/dwm.c
// Function: updatebarpos
void
updatebarpos(Monitor *m) {
   /* original */
   m->by = m->oy;
   m->wy = m->oy;
   m->wh = m->oh;

   /* get right stuff */
   if(m->showbar) {
      m->wh -= m->bh;
      m->by = m->topbar ? m->wy : m->wy + m->wh;
      m->wy = m->topbar ? m->wy + bh + m->margin->y : m->wy;
      m->wh -= m->margin->h;
   }
   else
      m->by = -m->bh;
}

// Assembly:
movl 0x24(%rdi), %edx
movl 0x4c(%rdi), %ecx
movl %ecx, 0x3c(%rdi)
movl 0x54(%rdi), %eax
movl %eax, 0x44(%rdi)
cmpl $0x0, 0x68(%rdi)
je 0x6a03
subl %edx, %eax
cmpl $0x0, 0x70(%rdi)
je 0x6a09
movl 0xcc86(%rip), %r8d      # 0x13674
addl %ecx, %r8d
movq 0xc0(%rdi), %rdx
addl 0x4(%rdx), %r8d
movl %ecx, %esi
movl %r8d, %ecx
jmp 0x6a13
negl %edx
movl %edx, 0x1c(%rdi)
retq
leal (%rax,%rcx), %esi
movq 0xc0(%rdi), %rdx
movl %esi, 0x1c(%rdi)
movl %ecx, 0x3c(%rdi)
subl 0xc(%rdx), %eax
movl %eax, 0x44(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/Cloudef[P]dwm-fork/dwm.c
// Function: wintomon
Monitor *
wintomon(Window w) {
   int x, y;
   Client *c;
   Monitor *m;

   if(w == root && getrootptr(&x, &y))
      return ptrtomon(x, y);
   for(m = mons; m; m = m->next)
      if(w == m->barwin)
         return m;
   if((c = wintoclient(w)))
      return c->mon;
   return selmon;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpq %rdi, 0xcc21(%rip)      # 0x13650
jne 0x6a53
leaq 0xc(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x7507
testl %eax, %eax
je 0x6a53
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
callq 0x7544
jmp 0x6a90
leaq 0xca0e(%rip), %rax      # 0x13468
movq (%rax), %rax
testq %rax, %rax
je 0x6a73
cmpq %rbx, 0x98(%rax)
je 0x6a90
addq $0x90, %rax
jmp 0x6a5a
movq %rbx, %rdi
callq 0x757f
testq %rax, %rax
je 0x6a89
movq 0x1a0(%rax), %rax
jmp 0x6a90
movq 0xc9e0(%rip), %rax      # 0x13470
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Cloudef[P]dwm-fork/dwm.c
// Function: tile
void
tile(Monitor *m) {
   int x, y, h, w, mw;
   unsigned int i, n;
   Client *c;

   for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
   if(n == 0)
      return;
   /* master */
   c = nexttiled(m->clients);
   mw = m->mfact * m->ww;
   resize(c, m->wx, m->wy, (n == 1 ? m->ww : mw) - 2 * c->bw, m->wh - 2 * c->bw, False);
   if(--n == 0)
      return;
   /* tile stack */
   x = (m->wx + mw > c->x + c->w) ? c->x + c->w + 2 * c->bw : m->wx + mw;
   y = m->wy;
   w = (m->wx + mw > c->x + c->w) ? m->wx + m->ww - x : m->ww - mw;
   h = m->wh / n;
   if(h < m->bh)
      h = m->wh;
   for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
      resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n)
               ? m->wy + m->wh - y - 2 * c->bw : h - 2 * c->bw), False);
      if(h != m->wh)
         y = c->y + HEIGHT(c);
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, 0x10(%rsp)
movq 0x78(%rdi), %rdi
callq 0x7154
movq %rax, %r14
pushq $0x1
popq %rbp
testq %rax, %rax
je 0x6acd
movq 0x190(%rax), %rdi
callq 0x7154
decl %ebp
jmp 0x6ab8
cmpl $0x1, %ebp
je 0x6c20
movq 0x10(%rsp), %rdi
movl 0x40(%rdi), %ecx
cvtsi2ss %ecx, %xmm0
mulss 0x10(%rdi), %xmm0
cvttss2si %xmm0, %ebx
movl 0x38(%rdi), %esi
movl 0x3c(%rdi), %edx
testl %ebp, %ebp
cmovnel %ebx, %ecx
movl 0x150(%r14), %eax
addl %eax, %eax
subl %eax, %ecx
movl 0x44(%rdi), %r8d
subl %eax, %r8d
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x7197
testl %ebp, %ebp
je 0x6c20
movl %ebp, %ecx
negl %ecx
movq 0x10(%rsp), %rsi
movl 0x38(%rsi), %edi
leal (%rdi,%rbx), %edx
movl 0x110(%r14), %eax
addl 0x108(%r14), %eax
movl %edx, 0xc(%rsp)
cmpl %eax, %edx
jle 0x6b5a
movl 0x150(%r14), %edx
leal (%rax,%rdx,2), %eax
addl 0x40(%rsi), %edi
movl %eax, 0xc(%rsp)
subl %eax, %edi
movq %rdi, 0x18(%rsp)
jmp 0x6b64
movl 0x40(%rsi), %eax
subl %ebx, %eax
movq %rax, 0x18(%rsp)
movl 0x3c(%rsi), %eax
movq %rax, 0x20(%rsp)
movl 0x44(%rsi), %r13d
xorl %ebx, %ebx
movl %r13d, %eax
xorl %edx, %edx
divl %ecx
movl %eax, %r15d
cmpl 0x24(%rsi), %eax
cmovll %r13d, %r15d
incl %ebp
negl %ebx
movq 0x190(%r14), %rdi
callq 0x7154
testq %rax, %rax
je 0x6c20
movq %rax, %r14
movl 0x150(%rax), %eax
addl %eax, %eax
cmpl %ebx, %ebp
jne 0x6bca
movq 0x10(%rsp), %r12
movl 0x3c(%r12), %r8d
movq 0x20(%rsp), %rdx
subl %eax, %r8d
subl %edx, %r8d
addl %r13d, %r8d
movq 0x18(%rsp), %rcx
jmp 0x6bdf
movl %r15d, %r8d
subl %eax, %r8d
movq 0x10(%rsp), %r12
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %rdx
subl %eax, %ecx
movq %r14, %rdi
movl 0xc(%rsp), %esi
xorl %r9d, %r9d
callq 0x7197
movl 0x44(%r12), %r13d
decl %ebx
cmpl %r13d, %r15d
je 0x6b87
movl 0x114(%r14), %eax
movl 0x150(%r14), %ecx
addl 0x10c(%r14), %eax
leal (%rax,%rcx,2), %eax
movq %rax, 0x20(%rsp)
negl %ebx
jmp 0x6b85
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Cloudef[P]dwm-fork/dwm.c
// Function: bstackhoriz
static void
bstackhoriz(Monitor *m) {
   int x, y, h, w, mh;
   unsigned int i, n;
   Client *c;

   for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
   if(n == 0)
      return;
   /* master */
   c = nexttiled(m->clients);
   mh = m->mfact * m->wh;
   resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False);
   if(--n == 0)
      return;
   /* tile stack */
   x = m->wx;
   y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh;
   w = m->ww;
   h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh;
   h /= n;
   if(h < m->bh)
      h = m->wh;
   for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
      resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n)
               ? m->wy + m->wh - y - 2 * c->bw : h - 2 * c->bw), False);
      if(h != m->wh)
         y = c->y + HEIGHT(c);
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, (%rsp)
movq 0x78(%rdi), %rdi
callq 0x7154
movq %rax, %r14
pushq $0x1
popq %r13
testq %rax, %rax
je 0x6c67
movq 0x190(%rax), %rdi
callq 0x7154
decl %r13d
jmp 0x6c51
cmpl $0x1, %r13d
je 0x6da8
movq (%rsp), %rax
movl 0x44(%rax), %r8d
cvtsi2ss %r8d, %xmm0
mulss 0x10(%rax), %xmm0
cvttss2si %xmm0, %ebx
movl 0x38(%rax), %esi
movl 0x3c(%rax), %edx
movl 0x40(%rax), %ecx
movl 0x150(%r14), %eax
addl %eax, %eax
subl %eax, %ecx
testl %r13d, %r13d
cmovnel %ebx, %r8d
subl %eax, %r8d
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x7197
testl %r13d, %r13d
je 0x6da8
movl %r13d, %ecx
negl %ecx
movq (%rsp), %rdi
movl 0x3c(%rdi), %eax
leal (%rax,%rbx), %esi
movl 0x114(%r14), %edx
addl 0x10c(%r14), %edx
cmpl %edx, %esi
jle 0x6ced
movl 0x150(%r14), %esi
leal (%rdx,%rsi,2), %esi
movl 0x44(%rdi), %ebp
addl %ebp, %eax
subl %esi, %eax
jmp 0x6cf4
movl 0x44(%rdi), %ebp
movl %ebp, %eax
subl %ebx, %eax
movq %rsi, 0x8(%rsp)
movl 0x38(%rdi), %edx
movl %edx, 0x14(%rsp)
movl 0x40(%rdi), %edx
movl %edx, 0x10(%rsp)
xorl %ebx, %ebx
xorl %edx, %edx
divl %ecx
movl %eax, %r12d
cmpl 0x24(%rdi), %eax
cmovll %ebp, %r12d
incl %r13d
negl %ebx
movq 0x190(%r14), %rdi
callq 0x7154
testq %rax, %rax
je 0x6da8
movq %rax, %r14
movl 0x150(%rax), %eax
addl %eax, %eax
cmpl %ebx, %r13d
jne 0x6d55
movq (%rsp), %r15
movl 0x3c(%r15), %r8d
movq 0x8(%rsp), %rdx
subl %eax, %r8d
subl %edx, %r8d
addl %ebp, %r8d
jmp 0x6d64
movl %r12d, %r8d
subl %eax, %r8d
movq (%rsp), %r15
movq 0x8(%rsp), %rdx
movl 0x10(%rsp), %ecx
subl %eax, %ecx
movq %r14, %rdi
movl 0x14(%rsp), %esi
xorl %r9d, %r9d
callq 0x7197
movl 0x44(%r15), %ebp
decl %ebx
cmpl %ebp, %r12d
je 0x6d1c
movl 0x114(%r14), %eax
movl 0x150(%r14), %ecx
addl 0x10c(%r14), %eax
leal (%rax,%rcx,2), %eax
movq %rax, 0x8(%rsp)
negl %ebx
jmp 0x6d1a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Cloudef[P]dwm-fork/dwm.c
// Function: grid
void
grid(Monitor *m) {
   unsigned int i, n, cx, cy, cw, ch, aw, ah, cols, rows;
   Client *c;

   for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next))
      n++;

   /* grid dimensions */
   for(rows = 0; rows <= n/2; rows++)
      if(rows*rows >= n)
         break;
   cols = (rows && (rows - 1) * rows >= n) ? rows - 1 : rows;

   /* window geoms (cell height/width) */
   ch = m->wh / (rows ? rows : 1);
   cw = m->ww / (cols ? cols : 1);
   for(i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
      cx = m->wx + (i / rows) * cw;
      cy = m->wy + (i % rows) * ch;
      /* adjust height/width of last row/column's windows */
      ah = ((i + 1) % rows == 0) ? m->wh - ch * rows : 0;
      aw = (i >= rows * (cols - 1)) ? m->ww - cw * cols : 0;
      resize(c, cx, cy, cw - 2 * c->bw + aw, ch - 2 * c->bw + ah, False);
      i++;
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x78(%rdi), %rdi
callq 0x7154
movq %rax, %r14
xorl %ebp, %ebp
testq %rax, %rax
je 0x6deb
incl %ebp
movq 0x190(%rax), %rdi
callq 0x7154
jmp 0x6dd6
movl %ebp, %eax
shrl %eax
pushq $-0x1
popq %r13
incl %r13d
cmpl %eax, %r13d
ja 0x6e06
movl %r13d, %ecx
imull %r13d, %ecx
cmpl %ebp, %ecx
jb 0x6df3
testl %r13d, %r13d
je 0x6e1a
leal -0x1(%r13), %r8d
movl %r8d, %eax
imull %r13d, %eax
cmpl %ebp, %eax
jae 0x6e1d
movl %r13d, %r8d
movl 0x40(%rbx), %ecx
movl 0x44(%rbx), %eax
cmpl $0x1, %r13d
movl %r13d, %esi
adcl $0x0, %esi
xorl %edi, %edi
xorl %edx, %edx
divl %esi
movl %eax, %ebp
cmpl $0x1, %r8d
movl %r8d, %esi
adcl $0x0, %esi
movl %ecx, %eax
xorl %edx, %edx
divl %esi
movl %eax, %r15d
movl %ebp, %eax
imull %r13d, %eax
movl %eax, 0x8(%rsp)
leal -0x1(%r8), %eax
imull %r13d, %eax
movl %eax, 0xc(%rsp)
imull %r15d, %r8d
movq %r8, 0x10(%rsp)
testq %r14, %r14
je 0x6ef2
movl %edi, %eax
xorl %edx, %edx
divl %r13d
movl %eax, %esi
movl %edx, %r9d
xorl %ecx, %ecx
leal 0x1(%rdi), %r12d
movl %r12d, %eax
xorl %edx, %edx
divl %r13d
movl $0x0, %r8d
testl %edx, %edx
jne 0x6e9d
movl 0x44(%rbx), %r8d
subl 0x8(%rsp), %r8d
imull %r15d, %esi
addl 0x38(%rbx), %esi
imull %ebp, %r9d
addl 0x3c(%rbx), %r9d
cmpl 0xc(%rsp), %edi
jb 0x6eb9
movl 0x40(%rbx), %ecx
subl 0x10(%rsp), %ecx
movl 0x150(%r14), %eax
addl %eax, %eax
addl %r15d, %ecx
subl %eax, %ecx
addl %ebp, %r8d
subl %eax, %r8d
movq %r14, %rdi
movl %r9d, %edx
xorl %r9d, %r9d
callq 0x7197
movq 0x190(%r14), %rdi
callq 0x7154
movq %rax, %r14
movl %r12d, %edi
jmp 0x6e67
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Cloudef[P]dwm-fork/dwm.c
// Function: bstack
void
bstack(Monitor *m) {
   int x, y, h, w, mh;
   unsigned int i, n;
   Client *c;

   for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
   if(n == 0)
      return;
   /* master */
   c = nexttiled(m->clients);
   mh = m->mfact * m->wh;
   resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False);
   if(--n == 0)
      return;
   /* tile stack */
   x = m->wx;
   y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh;
   w = m->ww / n;
   h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh;
   if(w < m->bh)
      w = m->ww;
   for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
      resize(c, x, y, /* remainder */ ((i + 1 == n)
               ? m->wx + m->ww - x - 2 * c->bw : w - 2 * c->bw), h - 2 * c->bw, False);
      if(w != m->ww)
         x = c->x + WIDTH(c);
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, 0x10(%rsp)
movq 0x78(%rdi), %rdi
callq 0x7154
movq %rax, %r14
pushq $0x1
popq %rbp
testq %rax, %rax
je 0x6f38
movq 0x190(%rax), %rdi
callq 0x7154
decl %ebp
jmp 0x6f23
cmpl $0x1, %ebp
je 0x709f
movq 0x10(%rsp), %rax
movl 0x44(%rax), %r8d
cvtsi2ss %r8d, %xmm0
mulss 0x10(%rax), %xmm0
cvttss2si %xmm0, %ebx
movl 0x38(%rax), %esi
movl 0x3c(%rax), %edx
movl 0x40(%rax), %ecx
movl 0x150(%r14), %eax
addl %eax, %eax
subl %eax, %ecx
testl %ebp, %ebp
cmovnel %ebx, %r8d
subl %eax, %r8d
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x7197
testl %ebp, %ebp
je 0x709f
movl %ebp, %ecx
negl %ecx
movq 0x10(%rsp), %rsi
movl 0x3c(%rsi), %edi
leal (%rdi,%rbx), %edx
movl 0x114(%r14), %eax
addl 0x10c(%r14), %eax
movl %edx, 0xc(%rsp)
cmpl %eax, %edx
jle 0x6fc7
movl 0x150(%r14), %edx
leal (%rax,%rdx,2), %eax
addl 0x44(%rsi), %edi
movl %eax, 0xc(%rsp)
subl %eax, %edi
movq %rdi, 0x18(%rsp)
jmp 0x6fd1
movl 0x44(%rsi), %eax
subl %ebx, %eax
movq %rax, 0x18(%rsp)
movl 0x38(%rsi), %eax
movq %rax, 0x20(%rsp)
movl 0x40(%rsi), %r13d
xorl %ebx, %ebx
movl %r13d, %eax
xorl %edx, %edx
divl %ecx
movl %eax, %r15d
cmpl 0x24(%rsi), %eax
cmovll %r13d, %r15d
incl %ebp
negl %ebx
movq 0x190(%r14), %rdi
callq 0x7154
testq %rax, %rax
je 0x709f
movq %rax, %r14
cmpl %ebx, %ebp
jne 0x7035
movl 0x150(%r14), %eax
movq 0x10(%rsp), %r12
addl 0x38(%r12), %r13d
movq 0x20(%rsp), %rsi
leal (%rsi,%rax,2), %ecx
addl %eax, %eax
subl %ecx, %r13d
movq 0x18(%rsp), %rcx
jmp 0x7053
movl 0x150(%r14), %eax
addl %eax, %eax
movl %r15d, %r13d
subl %eax, %r13d
movq 0x10(%rsp), %r12
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %rsi
movl %ecx, %r8d
subl %eax, %r8d
movq %r14, %rdi
movl 0xc(%rsp), %edx
movl %r13d, %ecx
xorl %r9d, %r9d
callq 0x7197
movl 0x40(%r12), %r13d
decl %ebx
cmpl %r13d, %r15d
je 0x6ff4
movl 0x110(%r14), %eax
movl 0x150(%r14), %ecx
addl 0x108(%r14), %eax
leal (%rax,%rcx,2), %eax
movq %rax, 0x20(%rsp)
negl %ebx
jmp 0x6ff2
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Cloudef[P]dwm-fork/dwm.c
// Function: monocle
void
monocle(Monitor *m) {
   unsigned int n = 0;
   Client *c;

   for(c = m->clients; c; c = c->next)
      if(ISVISIBLE(c) && !c->iswidget)
         n++;
   if(n > 0) /* override layout symbol */
      snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
   for(c = nexttiled(m->clients); c; c = nexttiled(c->next))
      resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, False);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x78(%rdi), %rax
xorl %ecx, %ecx
movq (%rax), %rax
testq %rax, %rax
je 0x70f4
cmpl $0x0, 0x180(%rax)
jne 0x70e2
movq 0x1a0(%rax), %rdx
movl 0x58(%rdx), %esi
movl 0x60(%rdx,%rsi,4), %edx
testl %edx, 0x15c(%rax)
je 0x70ec
cmpl $0x1, 0x170(%rax)
adcl $0x0, %ecx
addq $0x190, %rax            # imm = 0x190
jmp 0x70bb
testl %ecx, %ecx
je 0x710c
leaq 0x623d(%rip), %rdx      # 0xd33c
pushq $0x10
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x50a0
movq 0x78(%rbx), %rdi
callq 0x7154
movq %rax, %r14
testq %rax, %rax
je 0x714c
movl 0x38(%rbx), %esi
movl 0x3c(%rbx), %edx
movl 0x40(%rbx), %ecx
movl 0x150(%r14), %eax
addl %eax, %eax
subl %eax, %ecx
movl 0x44(%rbx), %r8d
subl %eax, %r8d
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x7197
movq 0x190(%r14), %rdi
jmp 0x7110
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Cloudef[P]dwm-fork/dwm.c
// Function: resizeclient
void
resizeclient(Client *c, int x, int y, int w, int h) {
   XWindowChanges wc;

   /* store old floating positions */
   if(c->isfloating && !c->isfullscreen)
   {
      c->fw = c->w;
      c->fh = c->h;
   }
   c->oldx = c->x; c->x = wc.x = x;
   c->oldy = c->y; c->y = wc.y = y;
   c->oldw = c->w; c->w = wc.width = w;
   c->oldh = c->h; c->h = wc.height = h;
   wc.border_width = c->bw;
   XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
   configure(c);
   XSync(dpy, False);
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
cmpl $0x0, 0x168(%rdi)
je 0x7435
cmpl $0x0, 0x160(%rbx)
jne 0x7435
movq 0x110(%rbx), %rax
movq %rax, 0x128(%rbx)
leaq 0x8(%rsp), %rax
movl %esi, (%rax)
movl %edx, 0x4(%rax)
movl %ecx, 0x8(%rax)
movups 0x108(%rbx), %xmm0
movl %esi, 0x108(%rbx)
movl %edx, 0x10c(%rbx)
movl %ecx, 0x110(%rbx)
movups %xmm0, 0x118(%rbx)
movl %r8d, 0xc(%rax)
movl %r8d, 0x114(%rbx)
movl 0x150(%rbx), %ecx
movl %ecx, 0x10(%rax)
movq 0xc00b(%rip), %rdi      # 0x13488
movq 0x1a8(%rbx), %rsi
pushq $0x1f
popq %rdx
movq %rax, %rcx
callq 0x50d0
movq %rbx, %rdi
callq 0x74ab
movq 0xbfea(%rip), %rdi      # 0x13488
xorl %esi, %esi
callq 0x54c0
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Cloudef[P]dwm-fork/dwm.c
// Function: configure
void
configure(Client *c) {
   XConfigureEvent ce;

   ce.type = ConfigureNotify;
   ce.display = dpy;
   ce.event = c->win;
   ce.window = c->win;
   ce.x = c->x;
   ce.y = c->y;
   ce.width = c->w;
   ce.height = c->h;
   ce.border_width = c->bw;
   ce.above = None;
   ce.override_redirect = False;
   XSendEvent(dpy, c->win, False, StructureNotifyMask, (XEvent *)&ce);
}

// Assembly:
subq $0x58, %rsp
movq %rsp, %r8
movl $0x16, (%r8)
movq 0xbfc8(%rip), %rax      # 0x13488
movq %rax, 0x18(%r8)
movq 0x1a8(%rdi), %rsi
movq %rsi, 0x20(%r8)
movq %rsi, 0x28(%r8)
movups 0x108(%rdi), %xmm0
movups %xmm0, 0x30(%r8)
movl 0x150(%rdi), %ecx
movl %ecx, 0x40(%r8)
andq $0x0, 0x48(%r8)
andl $0x0, 0x50(%r8)
movl $0x20000, %ecx          # imm = 0x20000
movq %rax, %rdi
xorl %edx, %edx
callq 0x54f0
addq $0x58, %rsp
retq