LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/darkautism[P]lfqueue/lfq.c
// Function: lfq_init
int lfq_init(struct lfq_ctx *ctx, int max_consume_thread) {
	struct lfq_node * tmpnode = calloc(1,sizeof(struct lfq_node));
	if (!tmpnode) 
		return -errno;
		
	struct lfq_node * free_pool_node = calloc(1,sizeof(struct lfq_node));
	if (!free_pool_node) 
		return -errno;
		
	tmpnode->can_free = free_pool_node->can_free = true;
	memset(ctx, 0, sizeof(struct lfq_ctx));
	ctx->MAXHPSIZE = max_consume_thread;
	ctx->HP = calloc(max_consume_thread,sizeof(struct lfq_node));
	ctx->tid_map = calloc(max_consume_thread,sizeof(struct lfq_node));
	ctx->head = ctx->tail=tmpnode;
	ctx->fph = ctx->fpt=free_pool_node;
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
pushq $0x1
popq %rdi
pushq $0x18
popq %rsi
callq 0x1060
testq %rax, %rax
je 0x11da
movq %rax, %r14
pushq $0x1
popq %rdi
pushq $0x18
popq %rsi
callq 0x1060
testq %rax, %rax
je 0x11da
movq %rax, %r15
pushq $0x1
popq %rax
movl %eax, 0x10(%r15)
movl %eax, 0x10(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rbx)
movaps %xmm0, 0x70(%rbx)
movaps %xmm0, 0x60(%rbx)
movaps %xmm0, 0x50(%rbx)
movaps %xmm0, 0x40(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
movl %ebp, 0x38(%rbx)
movslq %ebp, %r12
pushq $0x18
popq %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x1060
movq %rax, 0x10(%rbx)
movq %r12, %rdi
movq %r13, %rsi
callq 0x1060
movq %rax, 0x18(%rbx)
movq %r14, 0x40(%rbx)
movq %r14, (%rbx)
movq %r15, 0x30(%rbx)
movq %r15, 0x28(%rbx)
xorl %eax, %eax
jmp 0x11e6
callq 0x1050
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/darkautism[P]lfqueue/lfq.c
// Function: lfg_count_freelist
long lfg_count_freelist(const struct lfq_ctx *ctx) {
	long count=0;
	struct lfq_node *p = (struct lfq_node *)ctx->fph; // non-volatile
	while(p) {
		count++;
		p = p->free_next;
	}
	
	return count;
}

// Assembly:
addq $0x28, %rdi
xorl %eax, %eax
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x120c
incq %rax
addq $0x8, %rdi
jmp 0x11fb
retq
// File: /workspace/github_c_makefile_star2_O2/darkautism[P]lfqueue/lfq.c
// Function: lfq_clean
int lfq_clean(struct lfq_ctx *ctx){
	if ( ctx->tail && ctx->head ) { // if have data in queue
		struct lfq_node *tmp;
		while ( (struct lfq_node *) ctx->head ) { // while still have node
			tmp = (struct lfq_node *) ctx->head->next;
			safe_free(ctx, (struct lfq_node *)ctx->head);
			ctx->head = tmp;
		}
		ctx->tail = 0;
	}
	if ( ctx->fph && ctx->fpt ) {
		free_pool(ctx, true);
		if ( ctx->fph != ctx->fpt )
			return -1;
		free((void *)ctx->fpt); // free the empty node
		ctx->fph=ctx->fpt=0;
	}
	if ( !ctx->fph && !ctx->fpt ) {
		free((void *)ctx->HP);
		free((void *)ctx->tid_map);
		memset(ctx,0,sizeof(struct lfq_ctx));
	} else
		return -1;
		
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x40(%rdi)
je 0x1246
cmpq $0x0, (%rbx)
jne 0x1238
jmp 0x1246
movq (%rbx), %rax
movq 0x8(%rax), %r14
movq (%rbx), %rsi
movq %rbx, %rdi
callq 0x12ca
movq %r14, (%rbx)
cmpq $0x0, (%rbx)
jne 0x1223
movq $0x0, 0x40(%rbx)
cmpq $0x0, 0x28(%rbx)
pushq $-0x1
popq %rbp
je 0x127f
cmpq $0x0, 0x30(%rbx)
je 0x127f
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x132f
movq 0x28(%rbx), %rax
cmpq 0x30(%rbx), %rax
jne 0x12c3
movq 0x30(%rbx), %rdi
callq 0x1040
xorl %eax, %eax
movq %rax, 0x30(%rbx)
movq %rax, 0x28(%rbx)
cmpq $0x0, 0x28(%rbx)
jne 0x12c3
cmpq $0x0, 0x30(%rbx)
jne 0x12c3
movq 0x10(%rbx), %rdi
callq 0x1040
movq 0x18(%rbx), %rdi
callq 0x1040
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rbx)
movaps %xmm0, 0x60(%rbx)
movaps %xmm0, 0x50(%rbx)
movaps %xmm0, 0x40(%rbx)
movaps %xmm0, 0x30(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/darkautism[P]lfqueue/lfq.c
// Function: safe_free
static
void safe_free(struct lfq_ctx *ctx, struct lfq_node * lfn) {
	if (lfn->can_free && !inHP(ctx,lfn)) {
		// free is not thread-safe
		if (CAS(&ctx->is_freeing, 0, 1)) {
			lfn->next = (void*)-1;    // poison the pointer to detect use-after-free
			free(lfn);    // we got the lock; actually free
			ctx->is_freeing = false;
			smb();
		} else               // we didn't get the lock; only add to a freelist
			enpool(ctx, lfn);
	} else
		enpool(ctx, lfn);
	free_pool(ctx, false);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, 0x10(%rsi)
je 0x130e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x148d
testl %eax, %eax
jne 0x130e
pushq $0x1
popq %rcx
xorl %eax, %eax
lock
cmpxchgl %ecx, 0x20(%rbx)
jne 0x130e
movq $-0x1, 0x8(%r14)
movq %r14, %rdi
callq 0x1040
movl $0x0, 0x20(%rbx)
jmp 0x1321
movq $0x0, 0x8(%r14)
movq %r14, %rax
xchgq %rax, 0x30(%rbx)
movq %r14, 0x8(%rax)
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x132f
// File: /workspace/github_c_makefile_star2_O2/darkautism[P]lfqueue/lfq.c
// Function: free_pool
static
void free_pool(struct lfq_ctx *ctx, bool freeall ) {
	if (!CAS(&ctx->is_freeing, 0, 1))
		return; // this pool free is not support multithreading.
	volatile struct lfq_node * p;

	for ( int i = 0 ; i < MAXFREE || freeall ; i++ ) {
		p = ctx->fph;
		if ( (!p->can_free) || (!p->free_next) || inHP(ctx, (struct lfq_node *)p) )
			goto exit;
		ctx->fph = p->free_next;
		free((void *)p);
	}
exit:
	ctx->is_freeing = false;
	smb();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %r15d, %r15d
pushq $0x1
popq %rcx
xorl %eax, %eax
lock
cmpxchgl %ecx, 0x20(%rdi)
jne 0x139a
movl %esi, %ebp
movq %rdi, %rbx
xorb $0x1, %bpl
cmpl $0x96, %r15d
setae %al
testb %bpl, %al
jne 0x1393
movq 0x28(%rbx), %r14
cmpl $0x0, 0x10(%r14)
je 0x1393
cmpq $0x0, 0x8(%r14)
je 0x1393
movq %rbx, %rdi
movq %r14, %rsi
callq 0x148d
testl %eax, %eax
jne 0x1393
movq 0x8(%r14), %rax
movq %rax, 0x28(%rbx)
movq %r14, %rdi
callq 0x1040
incl %r15d
jmp 0x134e
movl $0x0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/darkautism[P]lfqueue/lfq.c
// Function: lfq_dequeue
void * lfq_dequeue(struct lfq_ctx *ctx ) {
	//return lfq_dequeue_tid(ctx, 0);  // TODO: let this inline even in the shared library
// old version
	int tid = alloc_tid(ctx);
	if (tid==-1)
		return (void *)-1; // To many thread race

	void * ret = lfq_dequeue_tid(ctx, tid);
	free_tid(ctx, tid);
	return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
pushq $0x1
popq %rcx
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jge 0x1469
movq 0x18(%rbx), %rdx
cmpl $0x0, (%rdx,%r14,4)
jne 0x1464
xorl %eax, %eax
lock
cmpxchgl %ecx, (%rdx,%r14,4)
je 0x146e
incq %r14
jmp 0x1446
pushq $-0x1
popq %rax
jmp 0x1485
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1030
movq 0x18(%rbx), %rcx
movl $0x0, (%rcx,%r14,4)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/darkautism[P]lfqueue/lfq.c
// Function: inHP
static
int inHP(struct lfq_ctx *ctx, struct lfq_node * lfn) {
	for ( int i = 0 ; i < ctx->MAXHPSIZE ; i++ ) {
		//lmb(); // not needed, we don't care if loads reorder here, just that we check all the elements
		if (ctx->HP[i] == lfn)
			return 1;
	}
	return 0;
}

// Assembly:
movslq 0x38(%rdi), %rcx
xorl %r8d, %r8d
testl %ecx, %ecx
movl $0x0, %eax
cmovgl %ecx, %eax
movq %r8, %rdx
cmpq %r8, %rax
je 0x14b4
movq 0x10(%rdi), %r9
leaq 0x1(%rdx), %r8
cmpq %rsi, (%r9,%rdx,8)
jne 0x149e
xorl %eax, %eax
cmpq %rcx, %rdx
setl %al
retq
// File: /workspace/github_c_makefile_star2_O2/glitchub[P]evdump/evdump.c
// Function: code
const char *code(int t, int c)
{
    switch(t)
    {
        case EV_SYN: return ed_SYN(c)?:"unknown SYN event";
        case EV_KEY: return ed_KEY(c)?:ed_BTN(c)?:"unknown KEY event";
        case EV_REL: return ed_REL(c)?:"unknown REL event";
        case EV_ABS: return ed_ABS(c)?:"unknown ABS event";
        case EV_MSC: return ed_MSC(c)?:"unknown MSC event";
        case EV_SW:  return ed_SW(c) ?:"unknown SW event";
        case EV_LED: return ed_LED(c)?:"unknown LED event";
        case EV_SND: return ed_SND(c)?:"unknown SND event";
        case EV_REP: return ed_REP(c)?:"unknown REP event";
        case EV_FF_STATUS: return ed_FF_STATUS(c)?:"unknown FF status";
    }
    return NULL;
}

// Assembly:
pushq %rbx
xorl %eax, %eax
cmpl $0x17, %edi
ja 0x5884
movl %esi, %ebx
movl %edi, %ecx
leaq 0xab4(%rip), %rdx       # 0x620c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl %ebx, %edi
callq 0x5252
movq %rax, %rcx
testq %rax, %rax
leaq 0x2e46(%rip), %rax      # 0x85bb
jmp 0x5880
movl %ebx, %edi
callq 0x5666
movq %rax, %rcx
testq %rax, %rax
leaq 0x2e51(%rip), %rax      # 0x85df
jmp 0x5880
movl %ebx, %edi
callq 0x5692
movq %rax, %rcx
testq %rax, %rax
leaq 0x2e6e(%rip), %rax      # 0x8615
jmp 0x5880
movl %ebx, %edi
callq 0x5299
testq %rax, %rax
jne 0x5884
movl %ebx, %edi
callq 0x52b2
movq %rax, %rcx
testq %rax, %rax
leaq 0x2dfd(%rip), %rax      # 0x85cd
jmp 0x5880
movl %ebx, %edi
callq 0x56c1
movq %rax, %rcx
testq %rax, %rax
leaq 0x2e3d(%rip), %rax      # 0x8626
jmp 0x5880
movl %ebx, %edi
callq 0x56f5
movq %rax, %rcx
testq %rax, %rax
leaq 0x2e36(%rip), %rax      # 0x8638
jmp 0x5880
movl %ebx, %edi
callq 0x567c
movq %rax, %rcx
testq %rax, %rax
leaq 0x2dd9(%rip), %rax      # 0x85f1
jmp 0x5880
movl %ebx, %edi
callq 0x56ab
movq %rax, %rcx
testq %rax, %rax
leaq 0x2dd5(%rip), %rax      # 0x8603
jmp 0x5880
xorl %eax, %eax
cmpl $0x1, %ebx
leaq 0x2d71(%rip), %rcx      # 0x85ad
cmoveq %rcx, %rax
testl %ebx, %ebx
leaq 0x2d52(%rip), %rcx      # 0x859b
cmovneq %rax, %rcx
testq %rcx, %rcx
leaq 0x2e05(%rip), %rax      # 0x865c
jmp 0x5880
xorl %eax, %eax
cmpl $0x1, %ebx
leaq 0x2c31(%rip), %rcx      # 0x8496
cmoveq %rcx, %rax
testl %ebx, %ebx
leaq 0x2c1a(%rip), %rcx      # 0x848c
cmovneq %rax, %rcx
testq %rcx, %rcx
leaq 0x2dca(%rip), %rax      # 0x864a
cmovneq %rcx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/glitchub[P]evdump/evdump.c
// Function: report
void report(char *ename, struct timeval *etime, int etype, int ecode, int evalue)
{
    // filter out unwanted events
    if (onlytype != -1 && etype != onlytype) return;
    if (onlycode != -1 && ecode != onlycode) return;
    if (onlyvalue != -1 && evalue != onlyvalue) return;

    printf("%s %ld.%06ld type=%d (%s) code=%d (%s) value=%d\n", ename, etime->tv_sec, etime->tv_usec, etype, ed_EV(etype)?:"unknown", ecode, code(etype,ecode)?:"unknown", evalue);
    fflush(stdout);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movl 0x6814(%rip), %eax      # 0xc0b0
cmpl $-0x1, %eax
setne %cl
cmpl %edx, %eax
setne %al
testb %al, %cl
jne 0x5971
movl 0x67ff(%rip), %eax      # 0xc0b4
cmpl $-0x1, %eax
setne %cl
cmpl %ebx, %eax
setne %al
testb %al, %cl
jne 0x5971
movl %r8d, %r14d
movl 0x67e7(%rip), %eax      # 0xc0b8
cmpl $-0x1, %eax
setne %cl
cmpl %r8d, %eax
setne %al
testb %al, %cl
jne 0x5971
movl %edx, %ebp
movq %rdi, %r15
movq (%rsi), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rsp)
movl %edx, %edi
callq 0x523c
movq %rax, %r12
testq %rax, %rax
leaq 0x2d90(%rip), %r13      # 0x869f
cmoveq %r13, %r12
movl %ebp, %edi
movl %ebx, %esi
callq 0x5741
movq %rax, %r10
testq %rax, %rax
cmoveq %r13, %r10
subq $0x8, %rsp
leaq 0x2d3d(%rip), %rdi      # 0x866e
movq %r15, %rsi
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rcx
movl %ebp, %r8d
movq %r12, %r9
xorl %eax, %eax
pushq %r14
pushq %r10
pushq %rbx
callq 0x5050
addq $0x20, %rsp
movq 0x6665(%rip), %rax      # 0xbfc0
movq (%rax), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x50a0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ddrown[P]pretend-ntp/pretend-ntp.c
// Function: main
int main(int argc, char *argv[]) {
  struct sockaddr_in addr;
  struct thread_info tinfo[THREADS];
  int status;

  if(argc < 3) {
    printf("%s [ip] [port]\n", argv[0]);
    exit(EXIT_FAILURE);
  }
  if(inet_aton(argv[1], &addr.sin_addr) == INADDR_NONE) {
    printf("invalid ip %s\n", argv[1]);
    exit(EXIT_FAILURE);
  }
  addr.sin_port = htons(strtoul(argv[2], NULL, 10));
  addr.sin_family = AF_INET;

  memset(&tinfo, 0, sizeof(tinfo));

  for (uint32_t i = 0; i < THREADS; i++) {
    tinfo[i].thread_num = i;
    tinfo[i].addr = &addr;
    status = pthread_create(&tinfo[i].thread_id, NULL, &ntp_server, &tinfo[i]);
    if (status != 0) {
      errno = status;
      perror("pthread_create(ntp_server) failed");
      exit(EXIT_FAILURE);
    }
  }

  printf("threads created\n");

  for(uint32_t i = 0; i < THREADS; i++) {
    void *res;
    status = pthread_join(tinfo[i].thread_id, &res);
    if (status != 0) {
      errno = status;
      perror("pthread_join(ntp_server) failed");
      exit(EXIT_FAILURE);
    }

    printf("reader thread %d done q=%" UINT64_FMT " !v=%" UINT64_FMT " !m=%" UINT64_FMT " ~s=%" UINT64_FMT "\n", tinfo[i].thread_num, tinfo[i].thread_queries,
        tinfo[i].unknown_version, tinfo[i].unknown_mode, tinfo[i].failed_send);
  }

  exit(EXIT_SUCCESS);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rsi, %rbx
cmpl $0x2, %edi
jg 0x1593
movq (%rbx), %rsi
leaq 0xb26(%rip), %rdi       # 0x20b7
jmp 0x15b1
movq 0x8(%rbx), %rdi
leaq 0x14(%rsp), %rsi
callq 0x10d0
cmpl $-0x1, %eax
jne 0x15c0
movq 0x8(%rbx), %rsi
leaq 0xb16(%rip), %rdi       # 0x20c7
xorl %eax, %eax
callq 0x1080
pushq $0x1
popq %rdi
callq 0x1150
movq 0x10(%rbx), %rdi
xorl %r15d, %r15d
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x1140
rolw $0x8, %ax
leaq 0x10(%rsp), %r12
movw %ax, 0x2(%r12)
movw $0x2, (%r12)
leaq 0x20(%rsp), %rbx
movl $0xe0, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1090
leaq -0x386(%rip), %r14      # 0x127c
cmpq $0x4, %r15
je 0x163d
movl %r15d, 0x8(%rbx)
movq %r12, 0x30(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1120
incq %r15
addq $0x38, %rbx
testl %eax, %eax
je 0x1602
movl %eax, %ebp
callq 0x1040
movl %ebp, (%rax)
leaq 0xa9b(%rip), %rdi       # 0x20d6
jmp 0x16b2
leaq 0xb06(%rip), %rdi       # 0x214a
callq 0x1050
leaq 0x8(%rsp), %rbx
leaq 0xac3(%rip), %r14       # 0x2118
xorl %r15d, %r15d
cmpq $0xe0, %r15
je 0x169b
movq 0x20(%rsp,%r15), %rdi
movq %rbx, %rsi
callq 0x1160
testl %eax, %eax
jne 0x16a2
movl 0x28(%rsp,%r15), %esi
movq 0x30(%rsp,%r15), %rdx
movq 0x38(%rsp,%r15), %rcx
movq 0x40(%rsp,%r15), %r8
movq 0x48(%rsp,%r15), %r9
movq %r14, %rdi
xorl %eax, %eax
callq 0x1080
addq $0x38, %r15
jmp 0x1658
xorl %edi, %edi
callq 0x1150
movl %eax, %ebp
callq 0x1040
movl %ebp, (%rax)
leaq 0xa46(%rip), %rdi       # 0x20f8
callq 0x1130
jmp 0x15b8
// File: /workspace/github_c_makefile_star2_O2/ddrown[P]pretend-ntp/ntp_msg.c
// Function: print_short_ntp
void print_short_ntp(const struct ntp_msg *m, const struct ntptimes *t) {
  struct timespec recv_time, trans_time;

  printf(" %u.%06u", ntohs(m->delay), ntp_frac_to_us(m->delay_fb));
  printf(" %u.%06u", ntohs(m->dispersion), ntp_frac_to_us(m->dispersion_fb));

  recv_time.tv_sec = ntp_s_to_unixtime(m->recv_time);
  recv_time.tv_nsec = ntp_frac_to_ns(m->recv_time_fb);
  if(t != NULL) {
    printf(" ");
    print_diff_ts(&t->before_sendto, &recv_time);
  }

  trans_time.tv_sec = ntp_s_to_unixtime(m->trans_time);
  trans_time.tv_nsec = ntp_frac_to_ns(m->trans_time_fb);
  if(t != NULL) {
    printf(" ");
    print_diff_ts(&trans_time, &t->after_recvmsg);
  }

  printf(" ");
  print_diff_ts(&trans_time, &recv_time);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x4(%rdi), %eax
movzwl 0x6(%rdi), %ecx
rolw $0x8, %ax
rolw $0x8, %cx
movzwl %ax, %esi
movzwl %cx, %eax
imull $0xf4240, %eax, %edx    # imm = 0xF4240
shrl $0x10, %edx
leaq 0x8df(%rip), %r15       # 0x228c
movq %r15, %rdi
xorl %eax, %eax
callq 0x1080
movzwl 0x8(%r14), %eax
movzwl 0xa(%r14), %ecx
rolw $0x8, %ax
rolw $0x8, %cx
movzwl %ax, %esi
movzwl %cx, %eax
imull $0xf4240, %eax, %edx    # imm = 0xF4240
shrl $0x10, %edx
movq %r15, %rdi
xorl %eax, %eax
callq 0x1080
movl 0x20(%r14), %eax
movl %eax, %ecx
bswapl %ecx
addl $0x7c558180, %ecx       # imm = 0x7C558180
testl %eax, %eax
cmovel %eax, %ecx
movq %rcx, 0x10(%rsp)
movl 0x24(%r14), %eax
bswapl %eax
imulq $0x3b9aca00, %rax, %rax # imm = 0x3B9ACA00
shrq $0x20, %rax
movq %rax, 0x18(%rsp)
testq %rbx, %rbx
je 0x1a2a
pushq $0x20
popq %rdi
callq 0x1030
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1cb3
movl 0x28(%r14), %eax
movl %eax, %ecx
bswapl %ecx
addl $0x7c558180, %ecx       # imm = 0x7C558180
testl %eax, %eax
cmovel %eax, %ecx
movq %rcx, (%rsp)
movl 0x2c(%r14), %eax
bswapl %eax
imulq $0x3b9aca00, %rax, %rax # imm = 0x3B9ACA00
shrq $0x20, %rax
movq %rax, 0x8(%rsp)
testq %rbx, %rbx
je 0x1a73
pushq $0x20
popq %rdi
callq 0x1030
addq $0x20, %rbx
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x1cb3
pushq $0x20
popq %rdi
callq 0x1030
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
callq 0x1cb3
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ddrown[P]pretend-ntp/ntp_msg.c
// Function: ntp_request
void ntp_request(struct ntp_msg *bufs) {
  struct timespec t;

  memset(bufs, 0, sizeof(*bufs));
  bufs->version = NTP_VERS_4;
  bufs->mode = NTP_MODE_CLIENT;
  clock_gettime(CLOCK_REALTIME, &t);
  bufs->trans_time = unixtime_to_ntp_s(t.tv_sec);
  bufs->trans_time_fb = ns_to_ntp_frac(t.tv_nsec);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movb $0x23, (%rdi)
leaq 0x8(%rsp), %r14
xorl %edi, %edi
movq %r14, %rsi
callq 0x1070
movl $0x83aa7e80, %eax       # imm = 0x83AA7E80
addl (%r14), %eax
bswapl %eax
movl %eax, 0x28(%rbx)
movq 0x8(%r14), %rax
shlq $0x20, %rax
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
bswapl %eax
movl %eax, 0x2c(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/ddrown[P]pretend-ntp/ntp_msg.c
// Function: ntp_xchange
int ntp_xchange(int sock, struct ntp_msg *bufs, const struct sockaddr *addr, struct ntptimes *t, struct msghdr *msgs, int timeout_ms) {
  int status[6];
  struct iovec iovecs;
  struct pollfd readfd;

  iovecs.iov_base     = bufs;
  iovecs.iov_len      = sizeof(*bufs);
  msgs->msg_iov        = &iovecs;
  msgs->msg_iovlen     = 1;

  readfd.fd = sock;
  readfd.events = POLLIN;

  status[0] = clock_gettime(CLOCK_REALTIME, &t->before_sendto);
  status[1] = sendto(sock, bufs, sizeof(*bufs), 0, addr, sizeof(*addr));
  status[2] = clock_gettime(CLOCK_REALTIME, &t->after_sendto);
  status[3] = poll(&readfd, 1, timeout_ms);
  status[4] = clock_gettime(CLOCK_REALTIME, &t->after_recvmsg);
  status[5] = recvmsg(sock, msgs, MSG_DONTWAIT);
  if(status[5] < 0) {
    if(errno == EAGAIN) {
      return 0;
    }
    perror_exit("recvmsg");
  }
  if(status[4] != 0) {
    perror_exit("clock_gettime #3");
  }
  if(status[3] < 0) {
    perror_exit("poll");
  }
  if(status[2] != 0) {
    perror_exit("clock_gettime #2");
  }
  if(status[1] < 0) {
    perror_exit("sendto");
  }
  if(status[0] != 0) {
    perror_exit("clock_gettime #1");
  }

  return status[5];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, 0xc(%rsp)
movq %r8, %r15
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %rbp
movl %edi, %r13d
leaq 0x18(%rsp), %rax
movq %rsi, (%rax)
movq $0x30, 0x8(%rax)
movq %rax, 0x10(%r8)
movq $0x1, 0x18(%r8)
leaq 0x10(%rsp), %r12
movl %edi, (%r12)
movw $0x1, 0x4(%r12)
xorl %edi, %edi
movq %rcx, %rsi
callq 0x1070
movl %eax, 0x8(%rsp)
pushq $0x30
popq %rdx
pushq $0x10
popq %r9
movl %r13d, %edi
movq %rbp, %rsi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x10a0
movq %rax, %rbp
leaq 0x10(%rbx), %rsi
xorl %edi, %edi
callq 0x1070
movl %eax, 0x4(%rsp)
pushq $0x1
popq %rsi
movq %r12, %rdi
movl 0xc(%rsp), %edx
callq 0x1100
movl %eax, %r14d
addq $0x20, %rbx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x1070
movl %eax, %ebx
pushq $0x40
popq %rdx
movl %r13d, %edi
movq %r15, %rsi
callq 0x10f0
movq %rax, %r15
testl %r15d, %r15d
jns 0x1bc1
callq 0x1040
cmpl $0xb, (%rax)
movl $0x0, %eax
je 0x1c1b
leaq 0x6d9(%rip), %rdi       # 0x2295
callq 0x1d14
testl %ebx, %ebx
je 0x1bd1
leaq 0x6d1(%rip), %rdi       # 0x229d
callq 0x1d14
testl %r14d, %r14d
jns 0x1be2
leaq 0x6d1(%rip), %rdi       # 0x22ae
callq 0x1d14
cmpl $0x0, 0x4(%rsp)
je 0x1bf5
leaq 0x6c3(%rip), %rdi       # 0x22b3
callq 0x1d14
testl %ebp, %ebp
jns 0x1c05
leaq 0x6c4(%rip), %rdi       # 0x22c4
callq 0x1d14
cmpl $0x0, 0x8(%rsp)
je 0x1c18
leaq 0x6b8(%rip), %rdi       # 0x22cb
callq 0x1d14
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/ddrown[P]pretend-ntp/timestamp.c
// Function: diff_ts
void diff_ts(const struct timespec *t1, const struct timespec *t2, struct timespec *diff) {
  diff->tv_sec = t1->tv_sec - t2->tv_sec;
  diff->tv_nsec = t1->tv_nsec - t2->tv_nsec;
  if(diff->tv_nsec < -1000000000 || (diff->tv_nsec < 0 && diff->tv_sec > 0)) {
    diff->tv_sec--;
    diff->tv_nsec += 1000000000;
  }
  if(diff->tv_nsec > 0 && diff->tv_sec < 0) {
    diff->tv_sec++;
    diff->tv_nsec -= 1000000000;
  }
}

// Assembly:
movdqu (%rdi), %xmm0
movdqu (%rsi), %xmm1
psubq %xmm1, %xmm0
movdqu %xmm0, (%rdx)
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
movq %xmm1, %rax
cmpq $-0x3b9aca00, %rax      # imm = 0xC4653600
jge 0x1c7a
movq %xmm0, %rcx
decq %rcx
movq %rcx, (%rdx)
addq $0x3b9aca00, %rax       # imm = 0x3B9ACA00
movq %rax, 0x8(%rdx)
jmp 0x1c84
movq %xmm0, %rcx
testq %rax, %rax
js 0x1cac
testq %rax, %rax
setg %sil
testq %rcx, %rcx
sets %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x1cab
incq %rcx
movq %rcx, (%rdx)
addq $-0x3b9aca00, %rax      # imm = 0xC4653600
movq %rax, 0x8(%rdx)
retq
testq %rcx, %rcx
jg 0x1c63
jmp 0x1cab
// File: /workspace/github_c_makefile_star2_O2/ddrown[P]pretend-ntp/timestamp.c
// Function: print_diff_ts
void print_diff_ts(const struct timespec *t1, const struct timespec *t2) {
  struct timespec diff;

  diff_ts(t1, t2, &diff);

  if(diff.tv_nsec < 0 && diff.tv_sec == 0) {
    printf("-0.%09ld", diff.tv_nsec*-1);
  } else if(diff.tv_nsec < 0) {
    printf("%ld.%09ld", diff.tv_sec, diff.tv_nsec*-1);
  } else {
    printf("%ld.%09ld", diff.tv_sec, diff.tv_nsec);
  }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsp, %rbx
movq %rbx, %rdx
callq 0x1c41
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
testq %rdx, %rdx
sets %al
testq %rsi, %rsi
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1cf6
negq %rdx
leaq 0x5ff(%rip), %rdi       # 0x22e6
movq %rdx, %rsi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
jmp 0x1080
testq %rdx, %rdx
jns 0x1cfe
negq %rdx
leaq 0x5d7(%rip), %rdi       # 0x22dc
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
jmp 0x1080
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aegis128/aesni/encrypt.c
// Function: aegis128_tag_generation
void aegis128_tag_generation(unsigned long long msglen, unsigned long long adlen, unsigned char maclen, unsigned char *mac, __m128i *state)
{
       int i;

        __m128i  tmp;
        __m128i  msgtmp;
        unsigned char t[16],tt[16];

        for (i = 0; i < 16; i++) tt[i] = 0;

        ((unsigned long long*)tt)[0] = adlen  << 3;
        ((unsigned long long*)tt)[1] = msglen << 3;
        msgtmp = _mm_load_si128((__m128i*)tt);

        msgtmp = _mm_xor_si128(msgtmp, state[3]);

        for (i = 0; i < 7; i++) {
             //state update function
             tmp = state[4];
             state[4] = _mm_aesenc_si128(state[3],state[4]);
             state[3] = _mm_aesenc_si128(state[2],state[3]);
             state[2] = _mm_aesenc_si128(state[1],state[2]);
             state[1] = _mm_aesenc_si128(state[0],state[1]);
             state[0] = _mm_aesenc_si128(tmp,state[0]);

             //xor "msg" with state[0]
             state[0] = _mm_xor_si128(state[0], msgtmp);
        }

        state[4] = _mm_xor_si128(state[4], state[3]);
        state[4] = _mm_xor_si128(state[4], state[2]);
        state[4] = _mm_xor_si128(state[4], state[1]);
        state[4] = _mm_xor_si128(state[4], state[0]);

        _mm_store_si128((__m128i*)t, state[4]);
        //in this program, the mac length is assumed to be multiple of bytes
        memcpy(mac,t,maclen);
}

// Assembly:
subq $0x28, %rsp
xorl %eax, %eax
cmpq $0x10, %rax
je 0x121d
movb $0x0, (%rsp,%rax)
incq %rax
jmp 0x120e
shlq $0x3, %rsi
movq %rsi, (%rsp)
shlq $0x3, %rdi
movq %rdi, 0x8(%rsp)
vmovdqa (%rsp), %xmm3
vmovdqa (%r8), %xmm0
vmovdqa 0x10(%r8), %xmm1
vmovdqa 0x20(%r8), %xmm2
vmovdqa 0x30(%r8), %xmm5
vmovdqa 0x40(%r8), %xmm4
pushq $0x7
popq %rax
vmovdqa %xmm5, %xmm6
subl $0x1, %eax
jb 0x1282
vaesenc %xmm4, %xmm6, %xmm7
vaesenc %xmm6, %xmm2, %xmm6
vaesenc %xmm2, %xmm1, %xmm2
vaesenc %xmm1, %xmm0, %xmm1
vaesenc %xmm0, %xmm4, %xmm0
vpternlogq $0x96, %xmm5, %xmm3, %xmm0
vmovdqa %xmm7, %xmm4
jmp 0x1257
vmovdqa %xmm6, 0x30(%r8)
vmovdqa %xmm2, 0x20(%r8)
vmovdqa %xmm1, 0x10(%r8)
vmovdqa %xmm0, (%r8)
vpternlogq $0x96, %xmm2, %xmm6, %xmm4
vpternlogq $0x96, %xmm0, %xmm1, %xmm4
vmovdqa %xmm4, 0x40(%r8)
leaq 0x10(%rsp), %rsi
vmovdqa %xmm4, (%rsi)
movzbl %dl, %edx
movq %rcx, %rdi
callq 0x10b0
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/riverkeyakv2/generic32lc/encrypt.c
// Function: crypto_aead_encrypt
int crypto_aead_encrypt(
    unsigned char *c,unsigned long long *clen,
    const unsigned char *m,unsigned long long mlen,
    const unsigned char *ad,unsigned long long adlen,
    const unsigned char *nsec,
    const unsigned char *npub,
    const unsigned char *k
    )
{
    RiverKeyak_Instance instance;

    RiverKeyak_Initialize( &instance, k, 16, npub, 58, 0, 0, 0, 0 );
    RiverKeyak_Wrap( &instance, m, c, (size_t)mlen, ad, (size_t)adlen, c+mlen, 0, 0 );
    *clen = mlen + 16;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r9, %r15
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, 0x18(%rsp)
movq %rdi, %rbp
movq 0xe0(%rsp), %rsi
movq 0xd8(%rsp), %rcx
andl $0x0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
andq $0x0, (%rsp)
leaq 0x24(%rsp), %r14
pushq $0x10
popq %rdx
pushq $0x3a
popq %r8
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x5510
leaq (%rbx,%rbp), %rax
movq %rax, (%rsp)
andl $0x0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
movq %r12, %r8
movq %r15, %r9
callq 0x5640
addq $0x10, %rbx
movq 0x18(%rsp), %rax
movq %rbx, (%rax)
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/riverkeyakv2/generic32lc/encrypt.c
// Function: crypto_aead_decrypt
int crypto_aead_decrypt(
    unsigned char *m,unsigned long long *mlen,
    unsigned char *nsec,
    const unsigned char *c,unsigned long long clen,
    const unsigned char *ad,unsigned long long adlen,
    const unsigned char *npub,
    const unsigned char *k
    )
{
    RiverKeyak_Instance instance;
    unsigned long long mlen_;

    if (clen < 16)
        return -1;
    RiverKeyak_Initialize( &instance, k, 16, npub, 58, 0, 0, 1, 0 );
    mlen_ = clen - 16;
    *mlen = mlen_;
    if ( RiverKeyak_Wrap( &instance, c, m, (size_t)mlen_, ad, (size_t)adlen, (unsigned char *)c+mlen_, 1, 0 ) == 1 )
        return 0;
    return -1;
}

// Assembly:
cmpq $0x10, %r8
jae 0x10fae
pushq $-0x1
popq %rax
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r9, %rbx
movq %r8, %r13
movq %rcx, %r14
movq %rsi, %rbp
movq %rdi, %r15
movq 0xe0(%rsp), %rsi
movq 0xd8(%rsp), %rcx
andl $0x0, 0x10(%rsp)
andq $0x0, (%rsp)
pushq $0x1
popq %r12
movl %r12d, 0x8(%rsp)
leaq 0x24(%rsp), %rdi
pushq $0x10
popq %rdx
pushq $0x3a
popq %r8
xorl %r9d, %r9d
callq 0x5510
leaq -0x10(%r13), %rcx
movq %rcx, (%rbp)
leaq (%r14,%r13), %rax
addq $-0x10, %rax
movl %r12d, 0x8(%rsp)
movq %rax, (%rsp)
andl $0x0, 0x10(%rsp)
leaq 0x24(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %r8
movq 0xd0(%rsp), %r9
callq 0x5640
movl %eax, %ecx
xorl %eax, %eax
cmpl %r12d, %ecx
setne %al
negl %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/orestesleal[P]base64/b16enc.c
// Function: main
int main(int argc, char *argv[])
{
	struct finfo *fd;
	char *enc_buf;
	int ofd;
	size_t wr;

	if (argv[1]) {
		/* load the input file */
		if ((fd = get_file(argv[1])) == NULL) {
			fprintf(stderr, "get_file() failed loading %s in main memory\n", argv[1]);
			exit(EXIT_FAILURE);
		}
		if (argv[2]) {
			/* encode and write the encoded file into argv[2] */
			enc_buf = alloc(fd->size*2); /* buffer for the base32 encoding string */
			b16_enc(fd->addr, enc_buf, fd->size);

            if ((ofd = open(argv[2], O_CREAT | O_RDWR, S_IRUSR | O_TRUNC | S_IWUSR)) == -1) {
            	fprintf(stderr, "open(2) error, can't create or truncate %s\n", argv[2]);
	        	exit(EXIT_FAILURE);
			}
			if ((wr = write(ofd, enc_buf, strlen(enc_buf))) == -1) {
				fprintf(stderr, "write(2) error, can't write to %s\n", argv[2]);
				exit(EXIT_FAILURE);
			}
			close(ofd);
			free(enc_buf);
        }
		free(fd);
	}
	return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0x127b
movq %rsi, %rbx
callq 0x1ecd
testq %rax, %rax
je 0x1286
movq %rax, %r14
cmpq $0x0, 0x10(%rbx)
je 0x1273
movl 0x8(%r14), %edi
addl %edi, %edi
callq 0x2013
movq %rax, %r15
movq (%r14), %rdi
movl 0x8(%r14), %edx
movq %rax, %rsi
callq 0x1ca1
movq 0x10(%rbx), %rdi
pushq $0x42
popq %rsi
movl $0x380, %edx            # imm = 0x380
xorl %eax, %eax
callq 0x10b0
cmpl $-0x1, %eax
je 0x129d
movl %eax, %r12d
movq %r15, %rdi
callq 0x1050
movl %r12d, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x1040
cmpq $-0x1, %rax
je 0x12b4
movl %r12d, %edi
callq 0x1060
movq %r15, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x3d6b(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
movq 0x8(%rbx), %rdx
leaq 0x1d69(%rip), %rsi      # 0x3004
jmp 0x12c9
movq 0x3d54(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
movq 0x10(%rbx), %rdx
leaq 0x1d7f(%rip), %rsi      # 0x3031
jmp 0x12c9
movq 0x3d3d(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
movq 0x10(%rbx), %rdx
leaq 0x1d94(%rip), %rsi      # 0x305d
xorl %eax, %eax
callq 0x1080
pushq $0x1
popq %rdi
callq 0x10c0
// File: /workspace/github_c_makefile_star2_O2/orestesleal[P]base64/base64.c
// Function: base64url_dec
void base64url_dec(char *s, char b[])
{
	unsigned int x;
	int i,z,w;

	x = w = 0;
	for (i = 0; s[i] != PAD && s[i]; i++) {
		for (x = 0, z = 0; z < 4 && s[i] && s[i] != PAD; z++) {
			x |= get_token_pos(s[i++], 64, b64_url_alp);
			z < 3 && s[i] != PAD && s[i] ? x <<= 6 : 0;
		}
		/*  if there are less than 24 bits of input, add 0s on 
			the right to make an integral number of 6 bit groups 
			(sec. 4. rfc4648 */
		for (;z < 4; z++, x <<= 6);  
		x <<= 8;
		b[w++] = x >> 24;
		b[w++] = (x << 8) >> 24;
		b[w++] = (x << 16) >> 24;
		--i;
	}
	b[w] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, -0x40(%rbp)
movq %rdi, -0x50(%rbp)
leaq 0x1(%rdi), %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x30(%rbp)
pushq $0x40
popq %r12
xorl %esi, %esi
movslq %esi, %r13
movq -0x50(%rbp), %rax
movzbl (%rax,%r13), %eax
testl %eax, %eax
je 0x13e4
cmpl $0x3d, %eax
je 0x13e4
movl %esi, -0x38(%rbp)
leal 0x4(%r13), %eax
movl %eax, -0x34(%rbp)
addq -0x48(%rbp), %r13
xorl %r15d, %r15d
pushq $0x4
popq %r14
xorl %ebx, %ebx
cmpl $0x4, %r15d
je 0x13b1
movzbl -0x1(%r13,%r15), %eax
testl %eax, %eax
je 0x13a9
cmpl $0x3d, %eax
je 0x13a9
movsbl %al, %edi
movl %r12d, %esi
leaq 0x3d41(%rip), %rdx      # 0x50c0
callq 0x12d8
movzbl %al, %eax
orl %eax, %ebx
cmpl $0x3, %r15d
je 0x13a1
movzbl (%r13,%r15), %eax
testl %eax, %eax
je 0x13a1
cmpl $0x3d, %eax
je 0x13a1
shll $0x6, %ebx
incq %r15
decl %r14d
jmp 0x135d
movl -0x38(%rbp), %esi
addl %r15d, %esi
jmp 0x13b9
movl -0x34(%rbp), %esi
jmp 0x13b9
shll $0x6, %ebx
subl $0x1, %r14d
jae 0x13b6
movl %ebx, %eax
shrl $0x10, %eax
movq -0x40(%rbp), %rcx
movq -0x30(%rbp), %rdx
movb %al, (%rcx,%rdx)
movb %bh, 0x1(%rcx,%rdx)
movb %bl, 0x2(%rcx,%rdx)
addq $0x3, %rdx
movq %rdx, -0x30(%rbp)
jmp 0x1329
movl -0x30(%rbp), %eax
movq -0x40(%rbp), %rcx
movb $0x0, (%rcx,%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/orestesleal[P]base64/base64.c
// Function: base64url_enc
void base64url_enc(char *s, char b[])
{
	unsigned int x, npad;
	int i;

	npad = 0;
	for (i = 0; *s; i++) {
		x = s[0] == ESC ? s++[1]-'0' : s[0];
		x <<= 8;
		x |= s[1] == ESC ? s++[2]-'0' : s[1];
		x <<= 8;
		x |= s[2] == ESC ? s++[3]-'0' : s[2];
		x <<= 8;
		b[i++] = b64_url_alp[x >> 26];
		b[i++] = b64_url_alp[(x << 6) >> 26];

		if (s[1] == '\0') { /* quantum of encoding of 8 bits */
			npad = 2;
			break;
		}
		b[i++] = b64_url_alp[(x << 12) >> 26];
		
		if (s[2] == '\0') { /* quantum of 16 bits */
			npad = 1;
			break;
		}
		b[i] = b64_url_alp[(x << 18) >> 26];
		s += 3; /* point to the next 24 bit group */ 
	}
	for (;npad > 0; npad--) { /* add padding if needed */
		b[i++] = PAD;
	}
	b[i] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movabsq $0x2, %rax
leaq 0x3cad(%rip), %rdx      # 0x50c0
movl $0x2, %ecx
movzbl (%rdi), %r8d
cmpl $0x5c, %r8d
je 0x1431
testl %r8d, %r8d
je 0x14e1
movsbl %r8b, %r10d
jmp 0x143d
movsbl 0x1(%rdi), %r10d
incq %rdi
addl $-0x30, %r10d
movsbl 0x1(%rdi), %r8d
cmpl $0x5c, %r8d
jne 0x1454
movsbl 0x2(%rdi), %r8d
incq %rdi
addl $-0x30, %r8d
movsbl 0x2(%rdi), %r9d
cmpl $0x5c, %r9d
jne 0x146b
movsbl 0x3(%rdi), %r9d
incq %rdi
addl $-0x30, %r9d
shll $0x10, %r10d
shll $0x8, %r8d
orl %r10d, %r8d
orl %r9d, %r8d
movl %r8d, %r10d
shrl $0x12, %r10d
andl $0x3f, %r10d
movb (%r10,%rdx), %r10b
movb %r10b, -0x2(%rsi,%rax)
movl %r8d, %r10d
shrl $0xc, %r10d
andl $0x3f, %r10d
movb (%r10,%rdx), %r10b
movb %r10b, -0x1(%rsi,%rax)
cmpb $0x0, 0x1(%rdi)
je 0x14e7
shrl $0x6, %r8d
andl $0x3f, %r8d
movb (%r8,%rdx), %r8b
movb %r8b, (%rsi,%rax)
cmpb $0x0, 0x2(%rdi)
je 0x14d7
andl $0x3f, %r9d
movb (%r9,%rdx), %r8b
movb %r8b, 0x1(%rsi,%rax)
addq $0x3, %rdi
addq $0x4, %rax
jmp 0x1418
incq %rax
movl $0x1, %ecx
jmp 0x14e7
addq $-0x2, %rax
xorl %ecx, %ecx
movl %eax, %edx
shlq $0x20, %rax
addq %rsi, %rdx
movl %ecx, %ecx
xorl %edi, %edi
movabsq $0x100000000, %r8       # imm = 0x100000000
cmpl %edi, %ecx
je 0x150e
movb $0x3d, (%rdx,%rdi)
addq %r8, %rax
incq %rdi
jmp 0x14fe
sarq $0x20, %rax
movb $0x0, (%rsi,%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/orestesleal[P]base64/base64.c
// Function: base64_dec
void base64_dec(char *s, char b[])
{
	unsigned int x;
	int i,z, w;

	x = w = 0;
	for (i = 0; s[i] != PAD && s[i]; i++) {
		for (x = 0, z = 0; z < 4 && s[i] && s[i] != PAD; z++) {
			x |= get_token_pos(s[i++], 64, b64_alp);
			z < 3 && s[i] != PAD && s[i] ? x <<= 6 : 0;
		}
		/*  TODO: update this to a single computation 
			less than 24 bits of input, add 0s on the right to make
			an integral number of 6 bit groups (sec. 4. rfc4648 */
		for (;z < 4; z++, x <<= 6);  
		x <<= 8;
		b[w++] = x >> 24;
		b[w++] = (x << 8) >> 24;
		b[w++] = (x << 16) >> 24;
		--i;
	}
	b[w] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, -0x40(%rbp)
movq %rdi, -0x50(%rbp)
leaq 0x1(%rdi), %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x30(%rbp)
pushq $0x40
popq %r12
xorl %esi, %esi
movslq %esi, %r13
movq -0x50(%rbp), %rax
movzbl (%rax,%r13), %eax
testl %eax, %eax
je 0x1602
cmpl $0x3d, %eax
je 0x1602
movl %esi, -0x38(%rbp)
leal 0x4(%r13), %eax
movl %eax, -0x34(%rbp)
addq -0x48(%rbp), %r13
xorl %r15d, %r15d
pushq $0x4
popq %r14
xorl %ebx, %ebx
cmpl $0x4, %r15d
je 0x15cf
movzbl -0x1(%r13,%r15), %eax
testl %eax, %eax
je 0x15c7
cmpl $0x3d, %eax
je 0x15c7
movsbl %al, %edi
movl %r12d, %esi
leaq 0x3ae3(%rip), %rdx      # 0x5080
callq 0x12d8
movzbl %al, %eax
orl %eax, %ebx
cmpl $0x3, %r15d
je 0x15bf
movzbl (%r13,%r15), %eax
testl %eax, %eax
je 0x15bf
cmpl $0x3d, %eax
je 0x15bf
shll $0x6, %ebx
incq %r15
decl %r14d
jmp 0x157b
movl -0x38(%rbp), %esi
addl %r15d, %esi
jmp 0x15d7
movl -0x34(%rbp), %esi
jmp 0x15d7
shll $0x6, %ebx
subl $0x1, %r14d
jae 0x15d4
movl %ebx, %eax
shrl $0x10, %eax
movq -0x40(%rbp), %rcx
movq -0x30(%rbp), %rdx
movb %al, (%rcx,%rdx)
movb %bh, 0x1(%rcx,%rdx)
movb %bl, 0x2(%rcx,%rdx)
addq $0x3, %rdx
movq %rdx, -0x30(%rbp)
jmp 0x1547
movl -0x30(%rbp), %eax
movq -0x40(%rbp), %rcx
movb $0x0, (%rcx,%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/orestesleal[P]base64/base64.c
// Function: base64_enc
void base64_enc(char *s, char b[])
{
	unsigned int x, npad;
	int i;

	npad = 0;
	for (i = 0; *s; i++) {
		x = s[0] == ESC ? s++[1]-'0' : s[0];
		x <<= 8;
		x |= s[1] == ESC ? s++[2]-'0' : s[1];
		x <<= 8;
		x |= s[2] == ESC ? s++[3]-'0' : s[2];
		x <<= 8;
		b[i++] = b64_alp[x >> 26];
		b[i++] = b64_alp[(x << 6) >> 26];

		if (s[1] == '\0') { /* quantum of encoding of 8 bits */
			npad = 2;
			break;
		}
		b[i++] = b64_alp[(x << 12) >> 26];
		
		if (s[2] == '\0') { /* quantum of 16 bits */
			npad = 1;
			break;
		}
		b[i] = b64_alp[(x << 18) >> 26];
		s += 3; /* point to the next 24 bit group */ 
	}
	for (;npad > 0; npad--) { /* add padding if needed */
		b[i++] = PAD;
	}
	b[i] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movabsq $0x2, %rax
leaq 0x3a4f(%rip), %rdx      # 0x5080
movl $0x2, %ecx
movzbl (%rdi), %r8d
cmpl $0x5c, %r8d
je 0x164f
testl %r8d, %r8d
je 0x16ff
movsbl %r8b, %r10d
jmp 0x165b
movsbl 0x1(%rdi), %r10d
incq %rdi
addl $-0x30, %r10d
movsbl 0x1(%rdi), %r8d
cmpl $0x5c, %r8d
jne 0x1672
movsbl 0x2(%rdi), %r8d
incq %rdi
addl $-0x30, %r8d
movsbl 0x2(%rdi), %r9d
cmpl $0x5c, %r9d
jne 0x1689
movsbl 0x3(%rdi), %r9d
incq %rdi
addl $-0x30, %r9d
shll $0x10, %r10d
shll $0x8, %r8d
orl %r10d, %r8d
orl %r9d, %r8d
movl %r8d, %r10d
shrl $0x12, %r10d
andl $0x3f, %r10d
movb (%r10,%rdx), %r10b
movb %r10b, -0x2(%rsi,%rax)
movl %r8d, %r10d
shrl $0xc, %r10d
andl $0x3f, %r10d
movb (%r10,%rdx), %r10b
movb %r10b, -0x1(%rsi,%rax)
cmpb $0x0, 0x1(%rdi)
je 0x1705
shrl $0x6, %r8d
andl $0x3f, %r8d
movb (%r8,%rdx), %r8b
movb %r8b, (%rsi,%rax)
cmpb $0x0, 0x2(%rdi)
je 0x16f5
andl $0x3f, %r9d
movb (%r9,%rdx), %r8b
movb %r8b, 0x1(%rsi,%rax)
addq $0x3, %rdi
addq $0x4, %rax
jmp 0x1636
incq %rax
movl $0x1, %ecx
jmp 0x1705
addq $-0x2, %rax
xorl %ecx, %ecx
movl %eax, %edx
shlq $0x20, %rax
addq %rsi, %rdx
movl %ecx, %ecx
xorl %edi, %edi
movabsq $0x100000000, %r8       # imm = 0x100000000
cmpl %edi, %ecx
je 0x172c
movb $0x3d, (%rdx,%rdi)
addq %r8, %rax
incq %rdi
jmp 0x171c
sarq $0x20, %rax
movb $0x0, (%rsi,%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/orestesleal[P]base64/base64.c
// Function: base16_encoder
void base16_encoder(char *s, char b[])
{
	char b16_alp[] = "0123456789ABCDEF";
	int i;
	for (i = 0; *s; i++, s++) { 
		unsigned char x = (unsigned char)*s >> 4;
		unsigned char z = ((unsigned char)(*s << 4)) >> 4;
		b[i] = b16_alp[x];
		b[++i] = b16_alp[z];
	}
	b[i] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
leaq 0x1b2d(%rip), %rcx      # 0x3270
movzbl (%rdi), %edx
testq %rdx, %rdx
je 0x176d
movl %edx, %r8d
shrl $0x4, %r8d
andl $0xf, %edx
movb (%r8,%rcx), %r8b
movb %r8b, (%rsi,%rax)
movb (%rdx,%rcx), %dl
movb %dl, 0x1(%rsi,%rax)
addq $0x2, %rax
incq %rdi
jmp 0x1743
andl $-0x2, %eax
movb $0x0, (%rsi,%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/orestesleal[P]base64/base64.c
// Function: base16_decoder
void base16_decoder(char *b16, char b[])
{
	int i;
	unsigned char n1, n2;
	for (i = 0; *b16; i++, b16+=2) {
		if (*b16  < 'A') {
			n1 = (*b16 - '0') << 4;
		}
		else {
			n1 = (*b16 - 0x37) << 4;
		}
		if (*(b16 + 1) < 'A') {
			n2 = *(b16 + 1) - '0';
		}
		else {
			n2 = *(b16 + 1) - 0x37;
		}
		b[i] =  n1 | n2;
	}
	b[i] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movl $0xd0, %ecx
movb (%rdi,%rax,2), %dl
testb %dl, %dl
je 0x17c2
movl %edx, %r8d
shlb $0x4, %r8b
leal -0x70(%r8), %r9d
cmpb $0x41, %dl
movzbl %r8b, %edx
movzbl %r9b, %r8d
cmovll %edx, %r8d
movb 0x1(%rdi,%rax,2), %dl
cmpb $0x41, %dl
movl $0xc9, %r9d
cmovll %ecx, %r9d
addb %dl, %r9b
orb %r8b, %r9b
movb %r9b, (%rsi,%rax)
incq %rax
jmp 0x1781
movl %eax, %eax
movb $0x0, (%rsi,%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/orestesleal[P]base64/base64.c
// Function: b64_enc
void b64_enc(unsigned const char *s, char b[], unsigned int len)
{
	register unsigned int x,i,w;
	unsigned char rm,z;

	w = 0;
	for (i = 0; i < len; i++) {
		for (x = 0, z = 0; z < 3 && i < len; z++, i++) {
			x |= s[i];	
			(z < 2 && i+1 < len) ? x <<= 8 : 0;
		}
		for (;z < 4; z++, x <<= 8);
		b[w++] = b64_alp[x >> 26];
		b[w++] = b64_alp[(x << 6) >> 26];
		b[w++] = b64_alp[(x << 12) >> 26];
		b[w++] = b64_alp[(x << 18) >> 26];
		--i;
	}
	b[w] = '\0';
	rm = len % 3; 
	if (rm) { /* padding */ 
		for (x = rm == 1 ? 2 : 1; x; --x) {
			b[--w] = PAD;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %eax
movl %edx, %edx
xorl %r8d, %r8d
movl $0xfffffffc, %ecx       # imm = 0xFFFFFFFC
leaq 0x389a(%rip), %r9       # 0x5080
xorl %r10d, %r10d
movl %r10d, %r11d
cmpl %eax, %r8d
jae 0x188c
movl %r8d, %r8d
xorl %ebx, %ebx
xorl %r14d, %r14d
cmpb $0x2, %r14b
ja 0x1834
cmpq %rdx, %r8
jae 0x1834
movzbl (%rdi,%r8), %r15d
orl %r15d, %ebx
incq %r8
movl %ebx, %r15d
shll $0x8, %r15d
cmpq %rdx, %r8
cmovael %ebx, %r15d
cmpb $0x2, %r14b
cmovbl %r15d, %ebx
incb %r14b
jmp 0x17fd
incb %r14b
shll $0x8, %ebx
cmpb $0x3, %r14b
jbe 0x182e
movl %ebx, %r14d
shrl $0x1a, %r14d
movb (%r14,%r9), %r14b
movb %r14b, (%rsi,%r11)
movl %ebx, %r14d
shrl $0x14, %r14d
andl $0x3f, %r14d
movb (%r14,%r9), %r14b
movb %r14b, 0x1(%rsi,%r11)
movl %ebx, %r14d
shrl $0xe, %r14d
andl $0x3f, %r14d
movb (%r14,%r9), %r14b
movb %r14b, 0x2(%rsi,%r11)
shrl $0x8, %ebx
andl $0x3f, %ebx
movb (%rbx,%r9), %bl
addl $0x4, %r10d
movb %bl, 0x3(%rsi,%r11)
addl $0x4, %ecx
jmp 0x17e9
movb $0x0, (%rsi,%r11)
movl $0x3, %edi
xorl %edx, %edx
divl %edi
testl %edx, %edx
je 0x18c0
xorl %eax, %eax
cmpl $0x1, %edx
sete %al
notl %eax
movl %ecx, %ecx
addq %rsi, %rcx
addq $0x3, %rcx
xorl %edx, %edx
cmpl %edx, %eax
je 0x18c0
movb $0x3d, (%rcx,%rdx)
decq %rdx
jmp 0x18b3
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/orestesleal[P]base64/base64.c
// Function: get_data_size
unsigned int get_data_size(char *s, unsigned int len)
{
	unsigned int rtsize, i;
	unsigned char pad = 0;
	for (i = len-1; s[i] == PAD; --i) {
		++pad;
		--len;
	}
	rtsize = (len >> 2) * 3;
	if (pad) {
		rtsize += pad == 2 ? 1 : 2;
	}
	return rtsize;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
incl %esi
movb $0x3, %cl
leal -0x2(%rsi), %eax
decl %esi
decb %cl
cmpb $0x3d, (%rdi,%rax)
je 0x1a11
shrl $0x2, %esi
leal (%rsi,%rsi,2), %edx
cmpb $0x1, %cl
movl $0x2, %esi
sbbl $0x0, %esi
xorl %eax, %eax
cmpb $0x2, %cl
cmovnel %esi, %eax
addl %edx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/orestesleal[P]base64/base64.c
// Function: b32_enc
void b32_enc(unsigned char *s, unsigned char *b, unsigned int len)
{
	unsigned long long x;	/* c99 only */
	unsigned int i,w,z;
	unsigned char ap[5] = {0,6,4,3,1};

	w = x = 0;
	/* 	in base32 per 5 bytes of input we get 40 bits that must
		be treated as eight 5 bits groups, each 5 bit number
		will be used as an index into the base32 alphabet  */
	for (i = 0; i < len; i++) {
		for (z = 0; z < 5 && i < len; z++, i++) {
			x |= s[i];
			x <<= 8;
		}
		/* compute the number of shifts needed to align all bytes
			to the most significant part of x, this avoids several
			iterations of one 'test, shift, and increment' loop */
		x <<= (7 - z) << 3; /* mul by 8 */ 

		/* 	this block could be optimized for size within a loop, but that
			will involve a and additional 'test and increment' step on a 
			loop, which will make the code a tiny fraction more slower,
			this is coded for speed, not size */
		b[w++] = b32_alp[x >> 59];
		b[w++] = b32_alp[(x << 5) >> 59];
		b[w++] = b32_alp[(x << 10) >> 59];
		b[w++] = b32_alp[(x << 15) >> 59];
		b[w++] = b32_alp[(x << 20) >> 59];
		b[w++] = b32_alp[(x << 25) >> 59];
		b[w++] = b32_alp[(x << 30) >> 59];
		b[w++] = b32_alp[(x << 35) >> 59];
		--i;
	}
	b[w] = '\0';
	for (i = ap[len % 5]; i; i--) {
		b[--w] = PAD; 
	}		
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %eax
movl %edx, %edx
xorl %r9d, %r9d
movabsq $0x38, %r10
leaq 0x36a2(%rip), %r11      # 0x5100
xorl %ebx, %ebx
xorl %r8d, %r8d
movl %r8d, %r14d
cmpl %eax, %ebx
jae 0x1b38
movl %ebx, %ebx
xorl %r15d, %r15d
movq %r10, %rcx
cmpl $0x4, %r15d
ja 0x1a99
cmpq %rdx, %rbx
jae 0x1a99
movzbl (%rdi,%rbx), %r12d
orq %r12, %r9
shlq $0x8, %r9
incl %r15d
incq %rbx
addq $-0x8, %rcx
jmp 0x1a76
shlq %cl, %r9
movq %r9, %rcx
shrq $0x3b, %rcx
movb (%rcx,%r11), %cl
movb %cl, (%rsi,%r14)
movq %r9, %rcx
shrq $0x36, %rcx
andl $0x1f, %ecx
movb (%rcx,%r11), %cl
movb %cl, 0x1(%rsi,%r14)
movq %r9, %rcx
shrq $0x31, %rcx
andl $0x1f, %ecx
movb (%rcx,%r11), %cl
movb %cl, 0x2(%rsi,%r14)
movq %r9, %rcx
shrq $0x2c, %rcx
andl $0x1f, %ecx
movb (%rcx,%r11), %cl
movb %cl, 0x3(%rsi,%r14)
movq %r9, %rcx
shrq $0x27, %rcx
andl $0x1f, %ecx
movb (%rcx,%r11), %cl
movb %cl, 0x4(%rsi,%r14)
movq %r9, %rcx
shrq $0x22, %rcx
andl $0x1f, %ecx
movb (%rcx,%r11), %cl
movb %cl, 0x5(%rsi,%r14)
movq %r9, %rcx
shrq $0x1d, %rcx
andl $0x1f, %ecx
movb (%rcx,%r11), %cl
movb %cl, 0x6(%rsi,%r14)
movl %r9d, %ecx
shrl $0x18, %ecx
andl $0x1f, %ecx
movb (%rcx,%r11), %cl
addl $0x8, %r8d
movb %cl, 0x7(%rsi,%r14)
jmp 0x1a63
movb $0x0, (%rsi,%r14)
movl $0x5, %ecx
xorl %edx, %edx
divl %ecx
leaq 0x1713(%rip), %rax      # 0x3260
movzbl (%rdx,%rax), %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
leal (%rax,%rcx), %edx
cmpl $-0x1, %edx
je 0x1b6a
leal (%r8,%rcx), %edx
movb $0x3d, (%rsi,%rdx)
decl %ecx
jmp 0x1b56
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/orestesleal[P]base64/base64.c
// Function: b16_enc
void b16_enc(const unsigned char *s, char *b, unsigned int len)
{
	while (len--) {
		*b++ = b16_alp[*s >> 4];
		*b++ = b16_alp[*s++ & 0x0f]; 	
	}
	*b = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edx, %eax
xorl %ecx, %ecx
leaq 0x15c0(%rip), %rdx      # 0x3270
cmpl %ecx, %eax
je 0x1cdc
movzbl (%rdi,%rcx), %r8d
shrl $0x4, %r8d
movb (%r8,%rdx), %r8b
movb %r8b, (%rsi,%rcx,2)
movzbl (%rdi,%rcx), %r8d
andl $0xf, %r8d
movb (%r8,%rdx), %r8b
movb %r8b, 0x1(%rsi,%rcx,2)
incq %rcx
jmp 0x1cb0
movb $0x0, (%rsi,%rcx,2)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/orestesleal[P]base64/base64.c
// Function: b16_dec
unsigned int b16_dec(const char *s, char *b, unsigned int len)
{
	unsigned char t[2],d;
	unsigned int i;

	d = 0;
	for (i = 0; i < len; i+=2) {
   		for (d = 0; d < 2; d++) {
			if ((s[i+d] >= '0' && s[i+d] <= '9') || 
				(s[i+d] >= 'A' && s[i+d] <= 'F')) {
				for (t[d] = 0; s[i+d] != b16_alp[t[d]]; ++t[d]); /* get position */
			}
			else { /* rfc4648 sec 3.3 paragraph #2 */ 
				fprintf(stderr, "error: non alphabet character found on encoded stream\n");
				exit(EXIT_FAILURE);
			}
		}
		t[0] <<= 4;
		t[0] |= t[1];
		*b++ = t[0];
	}	
	*b = '\0';
	return len >> 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %eax, %eax
leaq 0x157d(%rip), %rcx      # 0x3270
cmpl %edx, %eax
jae 0x1d5c
xorl %r8d, %r8d
cmpq $0x2, %r8
je 0x1d41
movl %eax, %r9d
orl %r8d, %r9d
movb (%rdi,%r9), %r9b
leal -0x30(%r9), %r10d
cmpb $0xa, %r10b
setae %r10b
leal -0x41(%r9), %r11d
cmpb $0x6, %r11b
setae %r11b
testb %r11b, %r10b
jne 0x1d69
movb $-0x1, %r10b
incb %r10b
movzbl %r10b, %r11d
cmpb (%r11,%rcx), %r9b
jne 0x1d2a
movb %r10b, -0x2(%rbp,%r8)
incq %r8
jmp 0x1cfa
movb -0x2(%rbp), %r8b
shlb $0x4, %r8b
orb -0x1(%rbp), %r8b
movb %r8b, -0x2(%rbp)
movb %r8b, (%rsi)
incq %rsi
addl $0x2, %eax
jmp 0x1cf3
movb $0x0, (%rsi)
shrl %edx
movl %edx, %eax
addq $0x10, %rsp
popq %rbp
retq
movq 0x3288(%rip), %rax      # 0x4ff8
movq (%rax), %rcx
leaq 0x1363(%rip), %rdi      # 0x30dd
pushq $0x36
popq %rsi
pushq $0x1
popq %rdx
callq 0x10d0
pushq $0x1
popq %rdi
callq 0x10c0