LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/sha2.c
// Function: sha512_Data
char* sha512_Data(const sha2_byte* data, size_t len, char digest[SHA512_DIGEST_STRING_LENGTH]) {
	SHA512_CTX	context;

	sha512_Init(&context);
	sha512_Update(&context, data, len);
	return sha512_End(&context, digest);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movaps 0x2640(%rip), %xmm0     # 0xc080
leaq -0xa0(%rbp), %r12
movaps %xmm0, -0x20(%r12)
movaps 0x261c(%rip), %xmm0     # 0xc070
movaps %xmm0, -0x30(%r12)
movaps 0x25ff(%rip), %xmm0     # 0xc060
movaps %xmm0, -0x40(%r12)
movaps 0x25e2(%rip), %xmm0     # 0xc050
movaps %xmm0, -0x50(%r12)
movl $0x80, %esi
movq %r12, %rdi
callq 0x81bc
xorps %xmm0, %xmm0
movaps %xmm0, -0x10(%r12)
leaq -0xf0(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x96b0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x9905
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/hmac.c
// Function: hmac_sha256_Init
void hmac_sha256_Init(HMAC_SHA256_CTX *hctx, const uint8_t *key,
                      const uint32_t keylen) {
  static CONFIDENTIAL uint8_t i_key_pad[SHA256_BLOCK_LENGTH];
  memzero(i_key_pad, SHA256_BLOCK_LENGTH);
  if (keylen > SHA256_BLOCK_LENGTH) {
    sha256_Raw(key, keylen, i_key_pad);
  } else {
    memcpy(i_key_pad, key, keylen);
  }
  for (int i = 0; i < SHA256_BLOCK_LENGTH; i++) {
    hctx->o_key_pad[i] = i_key_pad[i] ^ 0x5c;
    i_key_pad[i] ^= 0x36;
  }
  sha256_Init(&(hctx->ctx));
  sha256_Update(&(hctx->ctx), i_key_pad, SHA256_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 0xf029(%rip), %r14      # 0x18b00
movl $0x40, %esi
movq %r14, %rdi
callq 0x81bc
movl %r12d, %edx
cmpl $0x41, %r12d
jb 0x9b04
leaq 0xf00c(%rip), %rax      # 0x18b00
movq %r15, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x930a
jmp 0x9b13
leaq 0xeff5(%rip), %rdi      # 0x18b00
movq %r15, %rsi
callq 0x8080
xorl %eax, %eax
movb (%rax,%r14), %cl
xorb $0x5c, %cl
movb %cl, (%rbx,%rax)
xorb $0x36, (%rax,%r14)
incq %rax
cmpq $0x40, %rax
jne 0x9b15
addq $0x40, %rbx
movq %rbx, %rdi
callq 0x8e08
leaq 0xefc0(%rip), %r14      # 0x18b00
movl $0x40, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9073
movl $0x40, %esi
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x81bc
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/hmac.c
// Function: hmac_sha256_Final
void hmac_sha256_Final(HMAC_SHA256_CTX *hctx, uint8_t *hmac) {
  sha256_Final(&(hctx->ctx), hmac);
  sha256_Init(&(hctx->ctx));
  sha256_Update(&(hctx->ctx), hctx->o_key_pad, SHA256_BLOCK_LENGTH);
  sha256_Update(&(hctx->ctx), hmac, SHA256_DIGEST_LENGTH);
  sha256_Final(&(hctx->ctx), hmac);
  memzero(hctx, sizeof(HMAC_SHA256_CTX));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x40(%rdi), %r15
movq %r15, %rdi
callq 0x91ac
movq %r15, %rdi
callq 0x8e08
movl $0x40, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x9073
movl $0x20, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x9073
movq %r15, %rdi
movq %r14, %rsi
callq 0x91ac
movl $0xa8, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x81bc
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/hmac.c
// Function: hmac_sha256
void hmac_sha256(const uint8_t *key, const uint32_t keylen, const uint8_t *msg,
                 const uint32_t msglen, uint8_t *hmac) {
  static CONFIDENTIAL HMAC_SHA256_CTX hctx;
  hmac_sha256_Init(&hctx, key, keylen);
  hmac_sha256_Update(&hctx, msg, msglen);
  hmac_sha256_Final(&hctx, hmac);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movl %ecx, %r14d
movq %rdx, %r15
movl %esi, %edx
movq %rdi, %rsi
leaq 0xef45(%rip), %r12      # 0x18b40
movq %r12, %rdi
callq 0x9abc
movl %r14d, %edx
leaq 0xef73(%rip), %rdi      # 0x18b80
movq %r15, %rsi
callq 0x9073
movq %r12, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9b75
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/hmac.c
// Function: hmac_sha256_prepare
void hmac_sha256_prepare(const uint8_t *key, const uint32_t keylen,
                         uint32_t *opad_digest, uint32_t *ipad_digest) {
  static CONFIDENTIAL uint32_t key_pad[SHA256_BLOCK_LENGTH / sizeof(uint32_t)];

  memzero(key_pad, sizeof(key_pad));
  if (keylen > SHA256_BLOCK_LENGTH) {
    static CONFIDENTIAL SHA256_CTX context;
    sha256_Init(&context);
    sha256_Update(&context, key, keylen);
    sha256_Final(&context, (uint8_t *)key_pad);
  } else {
    memcpy(key_pad, key, keylen);
  }

  /* compute o_key_pad and its digest */
  for (int i = 0; i < SHA256_BLOCK_LENGTH / (int)sizeof(uint32_t); i++) {
    uint32_t data;
#if BYTE_ORDER == LITTLE_ENDIAN
    REVERSE32(key_pad[i], data);
#else
    data = key_pad[i];
#endif
    key_pad[i] = data ^ 0x5c5c5c5c;
  }
  sha256_Transform(sha256_initial_hash_value, key_pad, opad_digest);

  /* convert o_key_pad to i_key_pad and compute its digest */
  for (int i = 0; i < SHA256_BLOCK_LENGTH / (int)sizeof(uint32_t); i++) {
    key_pad[i] = key_pad[i] ^ 0x5c5c5c5c ^ 0x36363636;
  }
  sha256_Transform(sha256_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 0xefa6(%rip), %r14      # 0x18bf0
movl $0x40, %esi
movq %r14, %rdi
callq 0x81bc
cmpl $0x41, %r13d
jb 0x9c8b
leaq 0xefcc(%rip), %rbx      # 0x18c30
movq %rbx, %rdi
callq 0x8e08
movl %r13d, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x9073
leaq 0xef6f(%rip), %rsi      # 0x18bf0
movq %rbx, %rdi
callq 0x91ac
jmp 0x9c9d
movl %r13d, %edx
leaq 0xef5b(%rip), %rdi      # 0x18bf0
movq %r12, %rsi
callq 0x8080
xorl %eax, %eax
movl $0x5c5c5c5c, %ecx       # imm = 0x5C5C5C5C
movl (%rax,%r14), %edx
xorl %ecx, %edx
bswapl %edx
movl %edx, (%rax,%r14)
addq $0x4, %rax
cmpq $0x40, %rax
jne 0x9ca4
leaq 0x236f(%rip), %rdi      # 0xc030
movq %r14, %rsi
movq %r15, %rdx
callq 0x8e48
xorl %eax, %eax
xorl $0x6a6a6a6a, (%rax,%r14) # imm = 0x6A6A6A6A
addq $0x4, %rax
cmpq $0x40, %rax
jne 0x9cce
leaq 0x2349(%rip), %rdi      # 0xc030
leaq 0xef02(%rip), %rbx      # 0x18bf0
movq %rbx, %rsi
movq -0x30(%rbp), %rdx
callq 0x8e48
movl $0x40, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x81bc
// File: /workspace/github_c_makefile_star2_O1/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 0xef70(%rip), %r14      # 0x18ca0
movl $0x80, %esi
movq %r14, %rdi
callq 0x81bc
movl %r12d, %edx
cmpl $0x81, %r12d
jb 0x9d60
leaq 0xef50(%rip), %rax      # 0x18ca0
movq %r15, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x9982
jmp 0x9d6f
leaq 0xef39(%rip), %rdi      # 0x18ca0
movq %r15, %rsi
callq 0x8080
xorl %eax, %eax
movb (%rax,%r14), %cl
xorb $0x5c, %cl
movb %cl, (%rbx,%rax)
xorb $0x36, (%rax,%r14)
incq %rax
cmpq $0x80, %rax
jne 0x9d71
subq $-0x80, %rbx
movq %rbx, %rdi
callq 0x93fc
leaq 0xef02(%rip), %r14      # 0x18ca0
movl $0x80, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x96b0
movl $0x80, %esi
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x81bc
// File: /workspace/github_c_makefile_star2_O1/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 0x97ff
movq %r15, %rdi
callq 0x93fc
movl $0x80, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x96b0
movl $0x40, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x96b0
movq %r15, %rdi
movq %r14, %rsi
callq 0x97ff
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_O1/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 0x9d15
leaq -0xf0(%rbp), %rdi
movl %r14d, %edx
movq %r15, %rsi
callq 0x96b0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x9dd3
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xee66(%rip), %r14      # 0x18d20
movl $0x80, %esi
movq %r14, %rdi
callq 0x81bc
cmpl $0x81, %r13d
jb 0x9efe
leaq 0xeec9(%rip), %rbx      # 0x18da0
movq %rbx, %rdi
callq 0x93fc
movl %r13d, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x96b0
leaq 0xee2c(%rip), %rsi      # 0x18d20
movq %rbx, %rdi
callq 0x97ff
jmp 0x9f10
movl %r13d, %edx
leaq 0xee18(%rip), %rdi      # 0x18d20
movq %r12, %rsi
callq 0x8080
xorl %eax, %eax
movabsq $0x5c5c5c5c5c5c5c5c, %rcx # imm = 0x5C5C5C5C5C5C5C5C
movq (%rax,%r14), %rdx
xorq %rcx, %rdx
bswapq %rdx
movq %rdx, (%rax,%r14)
addq $0x8, %rax
cmpq $0x80, %rax
jne 0x9f1c
leaq 0x2113(%rip), %rdi      # 0xc050
movq %r14, %rsi
movq %r15, %rdx
callq 0x9451
xorl %eax, %eax
movabsq $0x6a6a6a6a6a6a6a6a, %rcx # imm = 0x6A6A6A6A6A6A6A6A
xorq %rcx, (%rax,%r14)
addq $0x8, %rax
cmpq $0x80, %rax
jne 0x9f54
leaq 0x20e5(%rip), %rdi      # 0xc050
leaq 0xedae(%rip), %rbx      # 0x18d20
movq %rbx, %rsi
movq -0x30(%rbp), %rdx
callq 0x9451
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_O1/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
testq %rsi, %rsi
je 0xa00a
xorl %eax, %eax
movl 0xee9c(%rip), %edx      # 0x18e70
xorl %r8d, %r8d
movq %rax, %rcx
andq $0x3, %rcx
jne 0x9ff5
imull $0x19660d, %edx, %edx   # imm = 0x19660D
addl $0x3c6ef35f, %edx       # imm = 0x3C6EF35F
movl %edx, 0xee7e(%rip)      # 0x18e70
movl %edx, %r8d
shll $0x3, %ecx
movl %r8d, %r9d
shrl %cl, %r9d
movb %r9b, (%rdi,%rax)
incq %rax
cmpq %rax, %rsi
jne 0x9fd7
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
leal -0x1(%rsi), %eax
testl %eax, %eax
jle 0xa0ab
movl 0xee18(%rip), %ecx      # 0x18e70
movl %eax, %r8d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %edx, %edx
divl %esi
movl %edx, %eax
notl %eax
imull $0x19660d, %ecx, %ecx   # imm = 0x19660D
addl $0x3c6ef35f, %ecx       # imm = 0x3C6EF35F
cmpl %eax, %ecx
jae 0xa068
xorl %edx, %edx
divl %esi
movl %eax, %esi
movl %ecx, %eax
xorl %edx, %edx
divl %esi
cltq
movb (%rdi,%rax), %dl
movb (%rdi,%r8), %sil
movb %sil, (%rdi,%rax)
movb %dl, (%rdi,%r8)
movl %r8d, %esi
leaq -0x1(%r8), %rax
cmpq $0x1, %r8
movq %rax, %r8
jg 0xa05b
movl %ecx, 0xedc5(%rip)      # 0x18e70
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 $0xa8, %rsp
movq %rsp, %r15
leaq -0x1c(%rbp), %rbx
movl $0x20, (%rbx)
leaq 0x234d(%rip), %rdx      # 0xc421
leaq -0x70(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb758
leaq 0x3d92(%rip), %rdi      # 0xde7c
callq 0x8050
movl (%rbx), %esi
movq %r14, %rdi
callq 0xb81c
xorl %ebx, %ebx
movl $0x16b, %edi            # imm = 0x16B
callq 0x8090
movq %rax, -0x50(%rbp,%rbx,8)
incq %rbx
cmpq $0x5, %rbx
jne 0xa0fb
movl -0x1c(%rbp), %ecx
leaq -0x50(%rbp), %rax
xorl %ebx, %ebx
leaq -0x70(%rbp), %rdx
movl $0x3, %edi
movl $0x5, %esi
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq $0x0
callq 0xa228
addq $0x10, %rsp
movl $0xa, %edi
callq 0x8040
movq -0x50(%rbp,%rbx,8), %rdi
callq 0x8050
incq %rbx
cmpq $0x5, %rbx
jne 0xa146
movl $0xa, %edi
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)
leaq -0x90(%rbp), %r14
movl $0x3, %edi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r14, %r8
movq %rbx, %r9
callq 0xae01
leaq 0x3ccf(%rip), %rdi      # 0xde7c
callq 0x8050
movl (%rbx), %esi
movq %r14, %rdi
callq 0xb81c
movslq (%rbx), %rdx
cmpl -0x1c(%rbp), %edx
jne 0xa1d8
leaq -0x70(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x80a0
testl %eax, %eax
je 0xa20c
leaq 0x2263(%rip), %rdi      # 0xc442
callq 0x8050
xorl %ebx, %ebx
movq -0x50(%rbp,%rbx,8), %rdi
callq 0x8030
incq %rbx
cmpq $0x5, %rbx
jne 0xa1e6
movq %r15, %rsp
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x223e(%rip), %rdi      # 0xc451
jmp 0xa1df
// File: /workspace/github_c_makefile_star2_O1/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 0xb2a8
movq (%r14), %rsi
movq %r8, %rdi
movq %rbx, %rdx
callq 0x8080
xorl %eax, %eax
jmp 0xb351
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 0xb5ec
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %cl, %cl
je 0xb351
movq %r12, %rdi
movl $0xfe, %esi
movq -0x40(%rbp), %rdx
movq %r14, %rcx
movl %r13d, %r8d
movq %rbx, %r9
callq 0xb5ec
movl %eax, %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testb %cl, %cl
je 0xb351
leaq 0x4(%r12), %rdi
movq -0x38(%rbp), %rcx
leal -0x4(%rcx), %esi
leaq -0x60(%rbp), %r14
movq %r15, %rdx
movq %r14, %r8
callq 0x9bdb
movl (%r12), %ecx
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
cmpl (%r14), %ecx
jne 0xb351
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 0xb2a1
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testl %edx, %edx
jle 0xb5eb
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %eax
xorl %ecx, %ecx
leaq 0x2901(%rip), %r8       # 0xdeb0
movl %eax, %r9d
shll $0xa, %eax
andl $0x3ffffc00, %eax       # imm = 0x3FFFFC00
xorl (%rsi), %eax
shrl $0x14, %r9d
movl %eax, (%rdi)
movq %r8, %r10
xorl %r11d, %r11d
btl %r11d, %r9d
jae 0xb5d3
xorl (%r10), %eax
movl %eax, (%rdi)
incq %r11
addq $0x4, %r10
cmpq $0xa, %r11
jne 0xb5c8
addq $0x4, %rsi
incl %ecx
cmpl %edx, %ecx
jne 0xb5af
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, -0x2c(%rbp)
cmpq $0x20, %r9
jbe 0xb614
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r9, %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rdi, %r15
movzbl %r8b, %r13d
testb %r13b, %r13b
je 0xb663
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0xb63c
movb (%r12,%rax), %dl
cmpb (%r12,%rcx), %dl
je 0xb603
incq %rcx
cmpq %rcx, %r13
jne 0xb62d
incq %rax
cmpq %r13, %rax
jne 0xb62b
xorl %eax, %eax
movl -0x2c(%rbp), %ecx
cmpb %cl, (%r12,%rax)
je 0xb745
incq %rax
cmpq %rax, %r13
jne 0xb651
movq %r15, %rdi
movq %rbx, %rsi
movl %r8d, -0x30(%rbp)
callq 0x81bc
movb $0x1, %al
cmpb $0x0, -0x30(%rbp)
je 0xb605
xorl %ecx, %ecx
leaq 0x285d(%rip), %rdx      # 0xdee0
movl $0x80808081, %esi       # imm = 0x80808081
leaq 0x2951(%rip), %rax      # 0xdfe0
xorl %r8d, %r8d
xorl %r9d, %r9d
cmpq %r9, %rcx
je 0xb6e0
movb (%r12,%r9), %r10b
movl %r10d, %r11d
xorb -0x2c(%rbp), %r11b
movzbl %r11b, %r11d
movzbl (%r11,%rdx), %r11d
xorb (%r12,%rcx), %r10b
addl %r11d, %r8d
movzbl %r10b, %r10d
movzbl (%r10,%rdx), %r10d
xorl $0xff, %r10d
addl %r8d, %r10d
movq %r10, %r8
imulq %rsi, %r8
shrq $0x27, %r8
movl %r8d, %r11d
shll $0x8, %r11d
subl %r11d, %r8d
addl %r10d, %r8d
incq %r9
cmpq %r9, %r13
jne 0xb695
testq %rbx, %rbx
je 0xb732
xorl %r9d, %r9d
movq (%r14,%rcx,8), %r10
movzbl (%r10,%r9), %r10d
testq %r10, %r10
je 0xb723
movzbl (%r10,%rdx), %r10d
addl %r8d, %r10d
movq %r10, %r11
imulq %rsi, %r11
shrq $0x27, %r11
movl %r11d, %edi
shll $0x8, %edi
subl %edi, %r11d
addl %r10d, %r11d
movb (%r11,%rax), %r10b
jmp 0xb726
xorl %r10d, %r10d
xorb %r10b, (%r15,%r9)
incq %r9
cmpq %r9, %rbx
jne 0xb6f0
incq %rcx
cmpq %r13, %rcx
jne 0xb68f
movb $0x1, %al
jmp 0xb605
movq (%r14,%rax,8), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x8080
jmp 0xb73e
nop
// File: /workspace/github_c_makefile_star2_O1/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
movq %rax, %rdx
shrq %rdx
movl (%rbx), %esi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rsi, %rdx
ja 0xb80f
cmpq $0x2, %rax
jb 0xb80b
xorl %eax, %eax
xorl %ecx, %ecx
movb (%r14,%rcx,2), %dil
movb 0x1(%r14,%rcx,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 %eax, %edi
leal -0x30(%rsi), %r8d
cmpb $0xa, %r8b
movzbl %r8b, %r8d
cmovael %eax, %r8d
addb %r9b, %r8b
addb %dil, %r8b
andb $-0x21, %sil
leal -0x41(%rsi), %edi
addb $-0x37, %sil
cmpb $0x6, %dil
movzbl %sil, %esi
cmovael %eax, %esi
addb %r8b, %sil
movb %sil, (%r15,%rcx)
incq %rcx
cmpq %rcx, %rdx
jne 0xb793
movl %edx, (%rbx)
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xb915
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebx
leaq 0x28a1(%rip), %r15      # 0xe0e0
cmpl $0x20, %esi
jl 0xb8b0
movq %rdi, %r12
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
movzbl (%r12,%r13), %eax
movl %eax, %ecx
shrl $0x4, %ecx
andl $0xf, %eax
movb (%rcx,%r15), %cl
movb %cl, -0x70(%rbp,%r13,2)
movb (%rax,%r15), %al
movb %al, -0x6f(%rbp,%r13,2)
movb $0x0, -0x6e(%rbp,%r13,2)
incq %r13
cmpq $0x20, %r13
jne 0xb861
leal -0x20(%rbx), %r14d
leaq -0x70(%rbp), %rdi
callq 0x8050
leaq (%r12,%r13), %rdi
cmpl $0x3f, %ebx
movl %r14d, %ebx
jg 0xb844
addq %r13, %r12
movq %r12, %rdi
jmp 0xb8b3
movl %ebx, %r14d
testl %r14d, %r14d
jle 0xb907
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
movzbl (%rdi,%rcx), %edx
movl %edx, %esi
shrl $0x4, %esi
andl $0xf, %edx
movb (%rsi,%r15), %sil
movb %sil, -0x70(%rbp,%rcx,2)
movb (%rdx,%r15), %dl
movb %dl, -0x6f(%rbp,%rcx,2)
movb $0x0, -0x6e(%rbp,%rcx,2)
incq %rcx
cmpq %rcx, %rax
jne 0xb8d4
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_O1/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 0xa713(%rip), %r15      # 0x16078
xorl %r14d, %r14d
imulq $0x110, %r14, %rax      # imm = 0x110
leaq 0xa6fa(%rip), %rcx      # 0x16070
leaq (%rcx,%rax), %rbx
addq %rcx, %rax
addq $0x8, %rax
movq %rax, -0x40(%rbp)
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq %r15, %rax
incl %r12d
cmpq $0x0, (%rax)
leaq 0x8(%rax), %rax
jne 0xb98e
movq (%rbx), %rdi
callq 0x8050
movl $0x20, -0x30(%rbp)
leaq -0x38(%rbp), %r13
movq %r13, %rdi
callq 0x8060
movl %r12d, %edi
movq -0x40(%rbp), %rsi
movq %r13, %rdx
movl %eax, %ecx
leaq -0x80(%rbp), %r8
leaq -0x30(%rbp), %r9
callq 0xae01
testl %eax, %eax
je 0xb9df
movq 0x108(%rbx), %rax
cmpb $0x0, (%rax)
jmp 0xba19
movl $0x20, -0x2c(%rbp)
movq 0x108(%rbx), %rdx
leaq -0x60(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0xb758
movslq -0x30(%rbp), %rdx
leaq 0x5980(%rip), %rdi      # 0x11385
cmpl %edx, -0x2c(%rbp)
jne 0xba2b
leaq -0x80(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x80a0
testl %eax, %eax
leaq 0x5965(%rip), %rdi      # 0x11385
leaq 0x5971(%rip), %rax      # 0x11398
cmoveq %rax, %rdi
callq 0x8050
incq %r14
addq $0x110, %r15            # imm = 0x110
cmpq $0x28, %r14
jne 0xb968
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Cloudef[P]dwm-fork/dwm.c
// Function: restart
void
restart(const Arg *arg)
{
   fprintf(stderr, "restarting dwm..");
   systray_freeicons();
   if (arg->v) {
      execvp(((char **)arg->v)[0], (char **)arg->v);
   } else {
      execlp("dwm", "dwm", "-r", NULL);
   }
   systray_acquire();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0xc80d(%rip), %rax      # 0x11fe8
movq (%rax), %rcx
leaq 0x8746(%rip), %rdi      # 0xdf2b
pushq $0x10
popq %rsi
pushq $0x1
popq %rdx
callq 0x56d0
callq 0x8552
movq (%rbx), %rsi
testq %rsi, %rsi
je 0x5807
movq (%rsi), %rdi
callq 0x5120
jmp 0x5821
leaq 0x7cd6(%rip), %rdi      # 0xd4e4
leaq 0x786d(%rip), %rdx      # 0xd082
movq %rdi, %rsi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x51e0
popq %rbx
jmp 0x695f
// File: /workspace/github_c_makefile_star2_O1/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 0x6537
movq %rsi, %rbx
movzbl 0x21(%rsi), %edx
movl %edx, %eax
xorb $0x2a, %al
movl %ecx, %esi
xorb $0x8, %sil
orb %al, %sil
je 0x6537
movl %edx, %eax
xorb $0x4a, %al
movl %ecx, %esi
xorb $0x9, %sil
orb %al, %sil
je 0x6537
movl %edx, %eax
xorb $0x46, %al
movl %ecx, %esi
xorb $0x9, %sil
orb %al, %sil
jne 0x6541
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rdi, %r14
movl %ecx, %eax
xorb $0x8, %al
movl %edx, %esi
xorb $0x42, %sil
movl %ecx, %edi
xorb $0x9, %dil
movl %edx, %r8d
xorb $0xc, %r8b
orb %al, %r8b
sete %al
orb %sil, %dil
je 0x6537
testb %al, %al
jne 0x6537
movl %edx, %eax
xorb $0x1c, %al
movl %ecx, %esi
xorb $0xa, %sil
orb %al, %sil
je 0x6537
movl %edx, %eax
xorb $0x21, %al
movl %ecx, %esi
xorb $0xa, %sil
orb %al, %sil
je 0x6537
cmpl $0x9, %ecx
jne 0x6592
cmpb $0x3e, %dl
je 0x6537
movq 0xba4f(%rip), %rax      # 0x11fe8
movq (%rax), %rdi
leaq 0x6b5d(%rip), %rsi      # 0xd100
xorl %eax, %eax
callq 0x5740
movq 0xd0af(%rip), %rax      # 0x13660
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O1/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 0xcca8(%rip), %rdi      # 0x13488
movq 0xe8(%rdi), %rax
movslq 0xce7a(%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 0x6813
movq (%rsp), %rax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x6b0a(%rip), %rdi      # 0xd324
movq %rbx, %rsi
xorl %eax, %eax
callq 0x644f
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movl $0x1, 0x58(%rsp)
movq $0x1, (%rsp)
movq $0x8004, 0x48(%rsp)     # imm = 0x8004
movq 0xcc1b(%rip), %rbx      # 0x13468
testq %rbx, %rbx
je 0x68ea
movq %rsp, %r14
xorl %r15d, %r15d
movq 0xcc25(%rip), %rdi      # 0x13488
movq 0xcde6(%rip), %rsi      # 0x13650
movl 0x18(%rbx), %edx
movl 0x1c(%rbx), %ecx
movl 0x20(%rbx), %r8d
movl 0x24(%rbx), %r9d
movq 0xe8(%rdi), %rax
movslq 0xcde2(%rip), %r10      # 0x13668
shlq $0x7, %r10
movl 0x38(%rax,%r10), %r11d
pushq %r14
pushq $0xa01                  # imm = 0xA01
pushq 0x40(%rax,%r10)
pushq %r15
pushq %r11
pushq %r15
callq 0x5230
addq $0x30, %rsp
movq %rax, 0x98(%rbx)
movq 0xcbd0(%rip), %rdi      # 0x13488
movq 0xcdc1(%rip), %rdx      # 0x13680
movq %rax, %rsi
callq 0x55a0
movq 0xcbba(%rip), %rdi      # 0x13488
movq 0x98(%rbx), %rsi
callq 0x5720
movq 0x90(%rbx), %rbx
testq %rbx, %rbx
jne 0x685c
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq 0xcd54(%rip), %rdi      # 0x13650
leaq 0xce0d(%rip), %rdx      # 0x13710
movl $0x27, %esi
movl $0x100, %ecx            # imm = 0x100
callq 0x7731
testl %eax, %eax
jne 0x6940
movups 0x6a43(%rip), %xmm0     # 0xd360
movups %xmm0, 0xce05(%rip)     # 0x13729
movups 0x6a2c(%rip), %xmm0     # 0xd357
movaps %xmm0, 0xcdee(%rip)     # 0x13720
movups 0x6a0e(%rip), %xmm0     # 0xd347
movaps %xmm0, 0xcdd0(%rip)     # 0x13710
movq 0xcb21(%rip), %rbx      # 0x13468
testq %rbx, %rbx
je 0x695d
movq %rbx, %rdi
callq 0x77ff
movq 0x90(%rbx), %rbx
jmp 0x6947
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
callq 0x8681
movabsq $0x200000000, %rax      # imm = 0x200000000
movq %rax, 0x10(%rsp)
movl 0xcd12(%rip), %eax      # 0x13818
movl %eax, 0x18(%rsp)
orl $0x2, %eax
movl %eax, 0x1c(%rsp)
movq 0xc970(%rip), %rdi      # 0x13488
movq 0xcb31(%rip), %rcx      # 0x13650
xorl %r14d, %r14d
xorl %esi, %esi
movl $0x8000, %edx           # imm = 0x8000
callq 0x5220
leaq 0xba1b(%rip), %r15      # 0x12550
movq 0xc94c(%rip), %rdi      # 0x13488
movq %r14, %r12
shlq $0x5, %r12
movq 0x8(%r12,%r15), %rsi
callq 0x5630
testb %al, %al
je 0x6b94
addq %r15, %r12
movzbl %al, %ebx
xorl %r13d, %r13d
movq 0xc927(%rip), %rdi      # 0x13488
movl 0x10(%rsp,%r13,4), %edx
orl (%r12), %edx
movq 0xcadf(%rip), %rcx      # 0x13650
movl $0x1, (%rsp)
movl %ebx, %esi
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x5670
incq %r13
cmpq $0x4, %r13
jne 0x6b5a
incq %r14
cmpq $0x49, %r14
jne 0x6b35
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x1c(%rdi)
movl %ecx, 0x3c(%rdi)
movl 0x54(%rdi), %eax
movl %eax, 0x44(%rdi)
cmpl $0x0, 0x68(%rdi)
je 0x6bfc
subl %edx, %eax
movl 0x70(%rdi), %edx
xorl %esi, %esi
testl %edx, %edx
cmovel %eax, %esi
addl %ecx, %esi
movl %eax, 0x44(%rdi)
movl %esi, 0x1c(%rdi)
testl %edx, %edx
je 0x6beb
addl 0xca93(%rip), %ecx      # 0x13674
movq 0xc0(%rdi), %rdx
addl 0x4(%rdx), %ecx
movl %ecx, 0x3c(%rdi)
movq 0xc0(%rdi), %rcx
subl 0xc(%rcx), %eax
movl %eax, 0x44(%rdi)
retq
negl %edx
movl %edx, 0x1c(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/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 $0x20, %rsp
movq %rdi, %rbx
movq 0xca3f(%rip), %rsi      # 0x13650
cmpq %rdi, %rsi
jne 0x6c5e
movq 0xc86b(%rip), %rdi      # 0x13488
subq $0x8, %rsp
leaq 0x18(%rsp), %rax
leaq 0x1c(%rsp), %r10
leaq 0x20(%rsp), %rcx
leaq 0x14(%rsp), %r8
leaq 0x10(%rsp), %r9
movq %rcx, %rdx
pushq %rax
pushq %r10
pushq %r10
callq 0x5620
addq $0x20, %rsp
testl %eax, %eax
je 0x6c5e
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
callq 0x76f8
jmp 0x6cc3
movq 0xc803(%rip), %rax      # 0x13468
testq %rax, %rax
je 0x6c7c
cmpq %rbx, 0x98(%rax)
je 0x6cc3
movq 0x90(%rax), %rax
jmp 0x6c65
movq 0xc7e5(%rip), %rcx      # 0x13468
testq %rcx, %rcx
je 0x6cac
movq 0x78(%rcx), %rax
testq %rax, %rax
je 0x6ca3
cmpq %rbx, 0x1a8(%rax)
je 0x6cae
movq 0x190(%rax), %rax
jmp 0x6c8c
movq 0x90(%rcx), %rcx
jmp 0x6c83
xorl %eax, %eax
testq %rax, %rax
je 0x6cbc
movq 0x1a0(%rax), %rax
jmp 0x6cc3
movq 0xc7ad(%rip), %rax      # 0x13470
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %rax
movq %rdi, %rbx
movq 0x78(%rdi), %rdi
callq 0x732d
movq %rax, %r14
xorl %r13d, %r13d
testq %rax, %rax
je 0x6d02
movq %r14, %rax
movq 0x190(%rax), %rdi
callq 0x732d
incl %r13d
testq %rax, %rax
jne 0x6cee
testl %r13d, %r13d
je 0x6e21
movl 0x40(%rbx), %ecx
cvtsi2ss %ecx, %xmm0
mulss 0x10(%rbx), %xmm0
cvttss2si %xmm0, %ebp
movl 0x38(%rbx), %esi
movl 0x3c(%rbx), %edx
cmpl $0x1, %r13d
cmovnel %ebp, %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 0x7373
movl %r13d, %esi
decl %esi
je 0x6e21
movl 0x38(%rbx), %eax
leal (%rax,%rbp), %ecx
movl 0x110(%r14), %edx
addl 0x108(%r14), %edx
movl %ecx, %edi
cmpl %edx, %ecx
jle 0x6d74
movl 0x150(%r14), %edi
leal (%rdx,%rdi,2), %edi
movl %edi, 0x4(%rsp)
subl %edi, %eax
negl %ebp
cmpl %edx, %ecx
cmovgl %eax, %ebp
addl 0x40(%rbx), %ebp
movl 0x44(%rbx), %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %esi
movl %eax, %r15d
cmpl 0x24(%rbx), %eax
cmovll %ecx, %r15d
movq 0x190(%r14), %rdi
callq 0x732d
testq %rax, %rax
je 0x6e21
movq %rax, %r14
movl 0x3c(%rbx), %r12d
addl $-0x2, %r13d
movl 0x150(%r14), %eax
addl %eax, %eax
subl $0x1, %r13d
jae 0x6dd2
movl 0x3c(%rbx), %r8d
subl %eax, %r8d
subl %r12d, %r8d
addl 0x44(%rbx), %r8d
jmp 0x6dd8
movl %r15d, %r8d
subl %eax, %r8d
movl %ebp, %ecx
subl %eax, %ecx
movq %r14, %rdi
movl 0x4(%rsp), %esi
movl %r12d, %edx
xorl %r9d, %r9d
callq 0x7373
cmpl 0x44(%rbx), %r15d
je 0x6e0d
movl 0x114(%r14), %eax
movl 0x150(%r14), %ecx
addl 0x10c(%r14), %eax
leal (%rax,%rcx,2), %r12d
movq 0x190(%r14), %rdi
callq 0x732d
movq %rax, %r14
testq %rax, %rax
jne 0x6db3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %rax
movq %rdi, %rbx
movq 0x78(%rdi), %rdi
callq 0x732d
movq %rax, %r14
xorl %r13d, %r13d
testq %rax, %rax
je 0x6e69
movq %r14, %rax
movq 0x190(%rax), %rdi
callq 0x732d
incl %r13d
testq %rax, %rax
jne 0x6e55
testl %r13d, %r13d
je 0x6f93
movl 0x44(%rbx), %r8d
cvtsi2ss %r8d, %xmm0
mulss 0x10(%rbx), %xmm0
cvttss2si %xmm0, %r12d
movl 0x38(%rbx), %esi
movl 0x3c(%rbx), %edx
movl 0x40(%rbx), %ecx
movl 0x150(%r14), %eax
addl %eax, %eax
subl %eax, %ecx
cmpl $0x1, %r13d
cmovnel %r12d, %r8d
subl %eax, %r8d
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x7373
movl %r13d, %ecx
decl %ecx
je 0x6f93
movl 0x3c(%rbx), %eax
leal (%rax,%r12), %edx
movl 0x114(%r14), %esi
addl 0x10c(%r14), %esi
movl %edx, %r15d
cmpl %esi, %edx
jle 0x6ee1
movl 0x150(%r14), %edi
leal (%rsi,%rdi,2), %r15d
subl %r15d, %eax
negl %r12d
cmpl %esi, %edx
cmovgl %eax, %r12d
addl 0x44(%rbx), %r12d
movl %r12d, %eax
xorl %edx, %edx
divl %ecx
movl %eax, %ebp
cmpl 0x24(%rbx), %eax
jge 0x6f02
movl 0x44(%rbx), %ebp
movl 0x38(%rbx), %eax
movl %eax, 0x4(%rsp)
movl 0x40(%rbx), %r12d
movq 0x190(%r14), %rdi
callq 0x732d
testq %rax, %rax
je 0x6f93
movq %rax, %r14
addl $-0x2, %r13d
movl 0x150(%r14), %eax
addl %eax, %eax
subl $0x1, %r13d
jae 0x6f44
movl 0x3c(%rbx), %r8d
subl %eax, %r8d
subl %r15d, %r8d
addl 0x44(%rbx), %r8d
jmp 0x6f4a
movl %ebp, %r8d
subl %eax, %r8d
movl %r12d, %ecx
subl %eax, %ecx
movq %r14, %rdi
movl 0x4(%rsp), %esi
movl %r15d, %edx
xorl %r9d, %r9d
callq 0x7373
cmpl 0x44(%rbx), %ebp
je 0x6f7f
movl 0x114(%r14), %eax
movl 0x150(%r14), %ecx
addl 0x10c(%r14), %eax
leal (%rax,%rcx,2), %r15d
movq 0x190(%r14), %rdi
callq 0x732d
movq %rax, %r14
testq %rax, %rax
jne 0x6f25
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq