LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/DrYerzinia[P]C_DigiMode/src/util/Util.cpp
// Function: util::readInArguments(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void util::readInArguments(std::string args){
	std::stringstream ss(args);

	char buffer[100];
	while(!ss.eof()){
		ss.getline(buffer, 100, ' ');
		if(buffer[0] == '-'){
			std::string key(buffer);
			ss.getline(buffer, 100, ' ');
			std::string arg(buffer);
			commandlineargs.insert(std::make_pair(key, arg));
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rdi, %rsi
leaq 0xf0(%rsp), %rbx
movq %rbx, %rdi
movl $0x18, %edx
callq 0x22c0
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x110(%rsp,%rax)
jne 0x5825
leaq 0x30(%rsp), %rbp
leaq 0xf0(%rsp), %rbx
leaq 0x80(%rsp), %r14
movq %rsp, %r15
leaq 0x20(%rsp), %r12
leaq 0x40(%rsp), %r13
movl $0x64, %edx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x20, %ecx
callq 0x2340
cmpb $0x2d, 0x80(%rsp)
jne 0x580b
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r14, %rdi
callq 0x2100
leaq (%rsp,%rax), %rdx
addq $0x80, %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x33e8
movl $0x64, %edx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x20, %ecx
callq 0x2340
movq %rbp, 0x20(%rsp)
movq %r14, %rdi
callq 0x2100
leaq (%rsp,%rax), %rdx
addq $0x80, %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x33e8
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x59f0
leaq 0x3a37(%rip), %rdi      # 0x91d0
movq %r13, %rsi
callq 0x5b7a
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x57bd
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x57d9
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x57f0
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21d0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x580b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0xf0(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x110(%rsp,%rax)
je 0x5702
movq 0x3784(%rip), %rsi      # 0x8fb0
leaq 0xf0(%rsp), %rdi
callq 0x2170
leaq 0x170(%rsp), %rdi
callq 0x20d0
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5861
movq %rax, %rbx
jmp 0x5873
jmp 0x58a7
movq %rax, %rbx
jmp 0x588a
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x59b4
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x588a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21d0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x58aa
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x58aa
movq %rax, %rbx
movq 0x36ff(%rip), %rsi      # 0x8fb0
leaq 0xf0(%rsp), %rdi
callq 0x2170
leaq 0x170(%rsp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_c_makefile_star2_O1/DrYerzinia[P]C_DigiMode/src/util/Util.cpp
// Function: util::writeDebugStream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void util::writeDebugStream(std::string msg){
	if(debugfstream.is_open()){
		debugfstream << msg;
		debugfstream.flush();
	} else {
		debugfstream.open("debug");
		writeDebugStream(msg);
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x398b(%rip), %rdi      # 0x9270
callq 0x2090
testb %al, %al
je 0x5913
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
leaq 0x3904(%rip), %rbx      # 0x9200
movq %rbx, %rdi
callq 0x2200
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r14
jmp 0x2140
leaq 0x38e6(%rip), %rdi      # 0x9200
leaq 0x83e(%rip), %rsi       # 0x615f
movl $0x10, %edx
callq 0x2040
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x3358
movq %rbx, %rdi
callq 0x58d4
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x596a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x598c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x1060
testq %rax, %rax
je 0x11e5
movq %rax, %r14
movl $0x1, %edi
movl $0x18, %esi
callq 0x1060
testq %rax, %rax
je 0x11e5
movq %rax, %r15
movl $0x1, %eax
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
movl $0x18, %esi
movq %r12, %rdi
callq 0x1060
movq %rax, 0x10(%rbx)
movl $0x18, %esi
movq %r12, %rdi
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 0x11f1
callq 0x1050
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x40(%rdi)
je 0x1248
cmpq $0x0, (%rbx)
jne 0x123a
jmp 0x1248
movq (%rbx), %rax
movq 0x8(%rax), %r14
movq (%rbx), %rsi
movq %rbx, %rdi
callq 0x12d6
movq %r14, (%rbx)
cmpq $0x0, (%rbx)
jne 0x1225
movq $0x0, 0x40(%rbx)
cmpq $0x0, 0x28(%rbx)
je 0x1285
cmpq $0x0, 0x30(%rbx)
je 0x1285
movq %rbx, %rdi
movl $0x1, %esi
callq 0x1358
movq 0x28(%rbx), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq 0x30(%rbx), %rcx
jne 0x12ce
movq 0x30(%rbx), %rdi
callq 0x1040
xorl %eax, %eax
movq %rax, 0x30(%rbx)
movq %rax, 0x28(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x0, 0x28(%rbx)
jne 0x12ce
cmpq $0x0, 0x30(%rbx)
jne 0x12ce
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 %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
cmpl $0x0, 0x10(%rsi)
je 0x133d
movslq 0x38(%rbx), %rax
testq %rax, %rax
setg %cl
jle 0x1312
movq 0x10(%rbx), %rcx
cmpq %rsi, (%rcx)
je 0x133d
movl $0x1, %edi
movq %rdi, %rdx
cmpq %rdi, %rax
je 0x130c
leaq 0x1(%rdx), %rdi
cmpq %rsi, (%rcx,%rdx,8)
jne 0x12fa
cmpq %rax, %rdx
setb %cl
testb %cl, %cl
jne 0x133d
movl $0x1, %ecx
xorl %eax, %eax
lock
cmpxchgl %ecx, 0x20(%rbx)
jne 0x133d
movq $-0x1, 0x8(%rsi)
movq %rsi, %rdi
callq 0x1040
movl $0x0, 0x20(%rbx)
jmp 0x1350
movq $0x0, 0x8(%rsi)
movq %rsi, %rax
xchgq %rax, 0x30(%rbx)
movq %rsi, 0x8(%rax)
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
jmp 0x1358
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
xorl %r14d, %r14d
movl $0x1, %ecx
xorl %eax, %eax
lock
cmpxchgl %ecx, 0x20(%rdi)
jne 0x13e3
movl %esi, %ebp
movq %rdi, %rbx
movq 0x28(%rbx), %rdi
cmpl $0x0, 0x10(%rdi)
je 0x13dc
cmpq $0x0, 0x8(%rdi)
je 0x13dc
movslq 0x38(%rbx), %rax
testq %rax, %rax
setg %cl
jle 0x13b5
movq 0x10(%rbx), %rcx
cmpq %rdi, (%rcx)
je 0x13dc
movl $0x1, %esi
movq %rsi, %rdx
cmpq %rsi, %rax
je 0x13af
leaq 0x1(%rdx), %rsi
cmpq %rdi, (%rcx,%rdx,8)
jne 0x139d
cmpq %rax, %rdx
setb %cl
testb %cl, %cl
jne 0x13dc
movq 0x8(%rdi), %rax
movq %rax, 0x28(%rbx)
callq 0x1040
cmpl $0x95, %r14d
leal 0x1(%r14), %eax
setb %cl
orb %bpl, %cl
movl %eax, %r14d
jne 0x1372
movl $0x0, 0x20(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x0, 0x38(%rdi)
jle 0x14c1
xorl %ecx, %ecx
movl $0x1, %edx
movq 0x18(%rbx), %rsi
cmpl $0x0, (%rsi,%rcx,4)
jne 0x14b1
xorl %eax, %eax
lock
cmpxchgl %edx, (%rsi,%rcx,4)
je 0x14bf
incq %rcx
movslq 0x38(%rbx), %rax
cmpq %rax, %rcx
jl 0x149e
jmp 0x14c1
movl %ecx, %ebp
cmpl $-0x1, %ebp
je 0x14e0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1030
movq 0x18(%rbx), %rcx
movslq %ebp, %rdx
movl $0x0, (%rcx,%rdx,4)
jmp 0x14e7
movq $-0x1, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5891
movl %esi, %ebx
movl %edi, %ecx
leaq 0xab4(%rip), %rdx       # 0x620c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
cmpl $0x3, %ebx
ja 0x58a5
movl %ebx, %eax
leaq 0xaf9(%rip), %rcx       # 0x626c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xbdc(%rip), %rax       # 0x635f
jmp 0x5891
movl %ebx, %edi
callq 0x5666
movq %rax, %rcx
testq %rax, %rax
leaq 0x2e93(%rip), %rax      # 0x862f
jmp 0x588d
movl %ebx, %edi
callq 0x5692
movq %rax, %rcx
testq %rax, %rax
leaq 0x2eb0(%rip), %rax      # 0x8665
jmp 0x588d
movl %ebx, %edi
callq 0x5299
testq %rax, %rax
jne 0x5891
movl %ebx, %edi
callq 0x52b2
movq %rax, %rcx
testq %rax, %rax
leaq 0x2e3f(%rip), %rax      # 0x861d
jmp 0x588d
movl %ebx, %edi
callq 0x56c1
movq %rax, %rcx
testq %rax, %rax
leaq 0x2e7f(%rip), %rax      # 0x8676
jmp 0x588d
cmpl $0x8, %ebx
jae 0x5893
movl %ebx, %eax
leaq 0xad2(%rip), %rcx       # 0x62e0
jmp 0x5834
movl %ebx, %edi
callq 0x567c
movq %rax, %rcx
testq %rax, %rax
leaq 0x2e1d(%rip), %rax      # 0x8641
jmp 0x588d
cmpl $0x8, %ebx
jae 0x589c
movl %ebx, %eax
leaq 0xa8c(%rip), %rcx       # 0x62c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmp 0x5891
xorl %eax, %eax
cmpl $0x1, %ebx
leaq 0x2db4(%rip), %rcx      # 0x85fd
cmoveq %rcx, %rax
testl %ebx, %ebx
leaq 0x2d95(%rip), %rcx      # 0x85eb
cmovneq %rax, %rcx
testq %rcx, %rcx
leaq 0x2e48(%rip), %rax      # 0x86ac
jmp 0x588d
xorl %eax, %eax
cmpl $0x1, %ebx
leaq 0x2c74(%rip), %rcx      # 0x84e6
cmoveq %rcx, %rax
testl %ebx, %ebx
leaq 0x2c5d(%rip), %rcx      # 0x84dc
cmovneq %rax, %rcx
testq %rcx, %rcx
leaq 0x2e0d(%rip), %rax      # 0x869a
cmovneq %rcx, %rax
popq %rbx
retq
leaq 0x2dee(%rip), %rax      # 0x8688
jmp 0x5891
leaq 0x2db0(%rip), %rax      # 0x8653
jmp 0x5891
cmpl $0xf, %ebx
jne 0x58b3
leaq 0xade(%rip), %rax       # 0x638f
jmp 0x5891
leaq 0x2d51(%rip), %rax      # 0x860b
jmp 0x5891
leaq 0xab2(%rip), %rax       # 0x6375
jmp 0x5891
leaq 0xab7(%rip), %rax       # 0x6383
jmp 0x5891
leaq 0xa95(%rip), %rax       # 0x636a
jmp 0x5891
// File: /workspace/github_c_makefile_star2_O1/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 0x67c3(%rip), %eax      # 0xc0b0
cmpl $-0x1, %eax
setne %cl
cmpl %edx, %eax
setne %al
testb %al, %cl
jne 0x59c2
movl 0x67ae(%rip), %eax      # 0xc0b4
cmpl $-0x1, %eax
setne %cl
cmpl %ebx, %eax
setne %al
testb %al, %cl
jne 0x59c2
movl %r8d, %r14d
movl 0x6796(%rip), %eax      # 0xc0b8
cmpl $-0x1, %eax
setne %cl
cmpl %r8d, %eax
setne %al
testb %al, %cl
jne 0x59c2
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 0x2d8f(%rip), %r13      # 0x86ef
cmoveq %r13, %r12
movl %ebp, %edi
movl %ebx, %esi
callq 0x5741
movq %rax, %r10
testq %rax, %rax
cmoveq %r13, %r10
subq $0x8, %rsp
leaq 0x2d3c(%rip), %rdi      # 0x86be
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 0x6614(%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_O1/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 0x159f
movq (%rbx), %rsi
leaq 0xb1a(%rip), %rdi       # 0x20b7
jmp 0x15bd
movq 0x8(%rbx), %rdi
leaq 0x14(%rsp), %rsi
callq 0x10d0
cmpl $-0x1, %eax
jne 0x15c9
movq 0x8(%rbx), %rsi
leaq 0xb0a(%rip), %rdi       # 0x20c7
xorl %eax, %eax
callq 0x1080
jmp 0x16c0
movq 0x10(%rbx), %rdi
xorl %r15d, %r15d
xorl %esi, %esi
movl $0xa, %edx
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 -0x391(%rip), %r14      # 0x127c
movl %r15d, 0x8(%rbx)
movq %r12, 0x30(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1120
testl %eax, %eax
jne 0x1699
incq %r15
addq $0x38, %rbx
cmpq $0x4, %r15
jne 0x160d
leaq 0xb0d(%rip), %rdi       # 0x214a
callq 0x1050
leaq 0x8(%rsp), %rbx
leaq 0xaca(%rip), %r14       # 0x2118
xorl %r15d, %r15d
movq 0x20(%rsp,%r15), %rdi
movq %rbx, %rsi
callq 0x1160
testl %eax, %eax
jne 0x16ab
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
cmpq $0xe0, %r15
jne 0x1651
xorl %edi, %edi
callq 0x1150
movl %eax, %ebp
callq 0x1040
movl %ebp, (%rax)
leaq 0xa2d(%rip), %rdi       # 0x20d6
jmp 0x16bb
movl %eax, %ebp
callq 0x1040
movl %ebp, (%rax)
leaq 0xa3d(%rip), %rdi       # 0x20f8
callq 0x1130
movl $0x1, %edi
callq 0x1150
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x8bc(%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 0x1a4f
movl $0x20, %edi
callq 0x1030
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1ce2
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 0x1a9a
movl $0x20, %edi
callq 0x1030
addq $0x20, %rbx
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x1ce2
movl $0x20, %edi
callq 0x1030
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
callq 0x1ce2
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl %eax, %eax
shlq $0x17, %rax
movabsq $0x44b82fa09b5a53, %rcx # imm = 0x44B82FA09B5A53
mulq %rcx
shrq $0xb, %rdx
bswapl %edx
movl %edx, 0x2c(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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)
movl $0x30, %edx
movl %r13d, %edi
movq %rbp, %rsi
xorl %ecx, %ecx
movq %r14, %r8
movl $0x10, %r9d
callq 0x10a0
movq %rax, %rbp
leaq 0x10(%rbx), %rsi
xorl %edi, %edi
callq 0x1070
movl %eax, 0x4(%rsp)
movl $0x1, %esi
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
movl %r13d, %edi
movq %r15, %rsi
movl $0x40, %edx
callq 0x10f0
movq %rax, %r15
testl %r15d, %r15d
jns 0x1bfb
callq 0x1040
cmpl $0xb, (%rax)
movl $0x0, %eax
je 0x1c55
leaq 0x69f(%rip), %rdi       # 0x2295
callq 0x1d40
testl %ebx, %ebx
je 0x1c0b
leaq 0x697(%rip), %rdi       # 0x229d
callq 0x1d40
testl %r14d, %r14d
jns 0x1c1c
leaq 0x697(%rip), %rdi       # 0x22ae
callq 0x1d40
cmpl $0x0, 0x4(%rsp)
je 0x1c2f
leaq 0x689(%rip), %rdi       # 0x22b3
callq 0x1d40
testl %ebp, %ebp
jns 0x1c3f
leaq 0x68a(%rip), %rdi       # 0x22c4
callq 0x1d40
cmpl $0x0, 0x8(%rsp)
je 0x1c52
leaq 0x67e(%rip), %rdi       # 0x22cb
callq 0x1d40
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movq (%rdi), %rax
subq (%rsi), %rax
movq %rax, (%rdx)
movq 0x8(%rdi), %rcx
subq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rdx)
cmpq $-0x3b9aca00, %rcx      # imm = 0xC4653600
jl 0x1cae
testq %rcx, %rcx
sets %sil
testq %rax, %rax
setg %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x1cbf
decq %rax
movq %rax, (%rdx)
addq $0x3b9aca00, %rcx       # imm = 0x3B9ACA00
movq %rcx, 0x8(%rdx)
movq 0x8(%rdx), %rax
testq %rax, %rax
jle 0x1cd0
movq (%rdx), %rcx
testq %rcx, %rcx
js 0x1cd1
retq
incq %rcx
movq %rcx, (%rdx)
addq $-0x3b9aca00, %rax      # imm = 0xC4653600
movq %rax, 0x8(%rdx)
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1c79
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
testq %rdx, %rdx
sets %al
testq %rsi, %rsi
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1d25
negq %rdx
leaq 0x5d0(%rip), %rdi       # 0x22e6
movq %rdx, %rsi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
jmp 0x1080
testq %rdx, %rdx
jns 0x1d2d
negq %rdx
leaq 0x5a8(%rip), %rdi       # 0x22dc
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
jmp 0x1080
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aegis128/aesni/encrypt.c
// Function: aegis128_initialization
void aegis128_initialization(const unsigned char *key, const unsigned char *iv, __m128i *state)
{
       int i;

        __m128i  tmp;
        __m128i  keytmp = _mm_load_si128((__m128i*)key);
        __m128i  ivtmp  = _mm_load_si128((__m128i*)iv);

        state[0] =  ivtmp;
        state[1] = _mm_set_epi8(0xdd,0x28,0xb5,0x73,0x42,0x31,0x11,0x20,0xf1,0x2f,0xc2,0x6d,0x55,0x18,0x3d,0xdb);
        state[2] = _mm_set_epi8(0x62,0x79,0xe9,0x90,0x59,0x37,0x22,0x15,0x0d,0x08,0x05,0x03,0x02,0x01,0x1, 0x0);
        state[3] = _mm_xor_si128(keytmp, _mm_set_epi8(0x62,0x79,0xe9,0x90,0x59,0x37,0x22,0x15,0x0d,0x08,0x05,0x03,0x02,0x01,0x1,0x0));
        state[4] = _mm_xor_si128(keytmp, _mm_set_epi8(0xdd,0x28,0xb5,0x73,0x42,0x31,0x11,0x20,0xf1,0x2f,0xc2,0x6d,0x55,0x18,0x3d,0xdb));
        state[0] = _mm_xor_si128(state[0], keytmp);

        keytmp   = _mm_xor_si128(keytmp, ivtmp); 
        for (i = 0; i < 10; 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]
             keytmp   = _mm_xor_si128(keytmp, ivtmp);
             state[0] = _mm_xor_si128(state[0], keytmp);
        }
}

// Assembly:
vmovdqa (%rdi), %xmm4
vmovdqa (%rsi), %xmm2
vmovdqa 0xe94(%rip), %xmm0      # 0x2000
vmovdqa %xmm0, 0x10(%rdx)
vmovdqa 0xe97(%rip), %xmm1      # 0x2010
vmovdqa %xmm1, 0x20(%rdx)
vpxor %xmm1, %xmm4, %xmm3
vmovdqa %xmm3, 0x30(%rdx)
vpxor %xmm0, %xmm4, %xmm6
vmovdqa %xmm6, 0x40(%rdx)
vpxor %xmm4, %xmm2, %xmm4
vmovdqa %xmm4, (%rdx)
movl $0xa, %eax
vmovdqa %xmm4, %xmm5
vaesenc %xmm5, %xmm6, %xmm7
vaesenc %xmm6, %xmm3, %xmm6
vaesenc %xmm3, %xmm1, %xmm3
vaesenc %xmm1, %xmm0, %xmm1
vaesenc %xmm0, %xmm5, %xmm0
vpxor %xmm2, %xmm4, %xmm4
vpxor %xmm4, %xmm7, %xmm5
decl %eax
jne 0x11a1
vmovdqa %xmm6, 0x40(%rdx)
vmovdqa %xmm3, 0x30(%rdx)
vmovdqa %xmm1, 0x20(%rdx)
vmovdqa %xmm0, 0x10(%rdx)
vmovdqa %xmm5, (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O1/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 $0x88, %rsp
movq %r9, (%rsp)
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, 0x8(%rsp)
movq %rdi, %rbp
movq 0xd0(%rsp), %rsi
movq 0xc8(%rsp), %rcx
subq $0x8, %rsp
xorl %r15d, %r15d
leaq 0x1c(%rsp), %r14
movq %r14, %rdi
movl $0x10, %edx
movl $0x3a, %r8d
xorl %r9d, %r9d
pushq %r15
pushq %r15
pushq $0x0
callq 0x54f0
addq $0x20, %rsp
leaq (%rbx,%rbp), %rax
subq $0x8, %rsp
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
movq %r12, %r8
movq 0x8(%rsp), %r9
pushq %r15
pushq %r15
pushq %rax
callq 0x5610
addq $0x20, %rsp
addq $0x10, %rbx
movq 0x8(%rsp), %rax
movq %rbx, (%rax)
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x10, %r8
jb 0x11967
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r9, %rbx
movq %r8, %r12
movq %rcx, %r14
movq %rsi, %r13
movq %rdi, %r15
movq 0xc0(%rsp), %rsi
movq 0xb8(%rsp), %rcx
subq $0x8, %rsp
xorl %r10d, %r10d
movl $0x1, %eax
leaq 0xc(%rsp), %rbp
movq %rbp, %rdi
movl $0x10, %edx
movl $0x3a, %r8d
xorl %r9d, %r9d
pushq %r10
pushq %rax
pushq $0x0
callq 0x54f0
addq $0x20, %rsp
leaq -0x10(%r12), %rcx
movq %rcx, (%r13)
leaq (%r14,%r12), %rax
addq $-0x10, %rax
subq $0x8, %rsp
movq %rbp, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %r8
movq 0xb8(%rsp), %r9
xorl %r10d, %r10d
pushq %r10
movl $0x1, %ebx
pushq %rbx
pushq %rax
callq 0x5610
addq $0x20, %rsp
movl %eax, %ecx
xorl %eax, %eax
cmpl %ebx, %ecx
setne %al
negl %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1530
movq %rsi, %rbx
callq 0x2115
testq %rax, %rax
je 0x153b
movq %rax, %r14
cmpq $0x0, 0x10(%rbx)
je 0x1528
addq $0x10, %rbx
movl 0x8(%r14), %edi
addl %edi, %edi
callq 0x2240
movq %rax, %r15
movq (%r14), %rdi
movl 0x8(%r14), %edx
movq %rax, %rsi
callq 0x1f0b
movq (%rbx), %rdi
movl $0x42, %esi
movl $0x380, %edx            # imm = 0x380
xorl %eax, %eax
callq 0x10c0
cmpl $-0x1, %eax
je 0x1547
movl %eax, %r12d
movq %r15, %rdi
callq 0x1050
movl %r12d, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x1040
cmpq $-0x1, %rax
je 0x154f
movl %r12d, %edi
callq 0x1070
movq %r15, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x1154
movq %rbx, %rdi
callq 0x112a
movq %rbx, %rdi
callq 0x1100
nop
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
xorl %eax, %eax
leaq 0x3b20(%rip), %rdx      # 0x50d0
xorl %ecx, %ecx
xorl %r8d, %r8d
movslq %r8d, %r10
movzbl (%rdi,%r10), %r9d
testl %r9d, %r9d
je 0x1683
cmpl $0x3d, %r9d
je 0x1683
movb 0x3af9(%rip), %r11b     # 0x50d0
addl $0x4, %r8d
xorl %r9d, %r9d
xorl %ebx, %ebx
movzbl (%rdi,%r10), %r14d
testl %r14d, %r14d
je 0x1652
cmpl $0x3d, %r14d
je 0x1652
cmpb %r14b, %r11b
jne 0x15fa
xorl %r15d, %r15d
jmp 0x1612
xorl %r12d, %r12d
leaq 0x1(%r12), %r15
cmpb %r14b, 0x1(%r12,%rdx)
je 0x1612
cmpb $0x3f, %r12b
movq %r15, %r12
jne 0x15fd
incq %r10
cmpb $0x41, %r15b
movzbl %r15b, %r14d
cmovael %eax, %r14d
movzbl %r14b, %r14d
orl %r14d, %ebx
cmpl $0x3, %r9d
je 0x1641
movzbl (%rdi,%r10), %r14d
testl %r14d, %r14d
je 0x1641
cmpl $0x3d, %r14d
je 0x1641
shll $0x6, %ebx
incl %r9d
cmpl $0x4, %r9d
jne 0x15e0
movl $0x4, %r9d
jmp 0x1655
movl %r10d, %r8d
cmpl $0x3, %r9d
ja 0x1667
addl $-0x4, %r9d
shll $0x6, %ebx
incl %r9d
jne 0x165f
movl %ebx, %r9d
shrl $0x10, %r9d
movb %r9b, (%rsi,%rcx)
movb %bh, 0x1(%rsi,%rcx)
movb %bl, 0x2(%rsi,%rcx)
addq $0x3, %rcx
jmp 0x15b5
movl %ecx, %eax
movb $0x0, (%rsi,%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
xorl %r14d, %r14d
leaq 0x3a27(%rip), %rax      # 0x50d0
movzbl (%rdi), %ecx
cmpl $0x5c, %ecx
je 0x16be
testl %ecx, %ecx
je 0x1764
movsbl %cl, %esi
jmp 0x16c8
movsbl 0x1(%rdi), %esi
incq %rdi
addl $-0x30, %esi
movsbl 0x1(%rdi), %ecx
cmpl $0x5c, %ecx
jne 0x16db
movsbl 0x2(%rdi), %ecx
incq %rdi
addl $-0x30, %ecx
movsbl 0x2(%rdi), %edx
cmpl $0x5c, %edx
jne 0x16ee
movsbl 0x3(%rdi), %edx
incq %rdi
addl $-0x30, %edx
shll $0x10, %esi
shll $0x8, %ecx
orl %esi, %ecx
orl %edx, %ecx
movl %ecx, %esi
shrl $0x12, %esi
andl $0x3f, %esi
movb (%rsi,%rax), %sil
movb %sil, (%rbx,%r14)
movl %ecx, %esi
shrl $0xc, %esi
andl $0x3f, %esi
movb (%rsi,%rax), %sil
movb %sil, 0x1(%rbx,%r14)
cmpb $0x0, 0x1(%rdi)
je 0x174b
shrl $0x6, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x2(%rbx,%r14)
cmpb $0x0, 0x2(%rdi)
je 0x1759
andl $0x3f, %edx
movb (%rdx,%rax), %cl
movb %cl, 0x3(%rbx,%r14)
addq $0x3, %rdi
addq $0x4, %r14
jmp 0x16a9
addl $0x2, %r14d
movl $0x1, %r15d
xorl %eax, %eax
jmp 0x176c
addl $0x3, %r14d
xorl %eax, %eax
xorl %r15d, %r15d
jmp 0x176c
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movb $0x1, %al
testb %al, %al
jne 0x178a
movl %r14d, %edi
addq %rbx, %rdi
leaq 0x1(%r15), %rdx
movl $0x3d, %esi
callq 0x1060
addl %r15d, %r14d
incl %r14d
movslq %r14d, %rax
movb $0x0, (%rbx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
xorl %eax, %eax
leaq 0x38e0(%rip), %rdx      # 0x5090
xorl %ecx, %ecx
xorl %r8d, %r8d
movslq %r8d, %r10
movzbl (%rdi,%r10), %r9d
testl %r9d, %r9d
je 0x1883
cmpl $0x3d, %r9d
je 0x1883
movb 0x38b9(%rip), %r11b     # 0x5090
addl $0x4, %r8d
xorl %r9d, %r9d
xorl %ebx, %ebx
movzbl (%rdi,%r10), %r14d
testl %r14d, %r14d
je 0x1852
cmpl $0x3d, %r14d
je 0x1852
cmpb %r14b, %r11b
jne 0x17fa
xorl %r15d, %r15d
jmp 0x1812
xorl %r12d, %r12d
leaq 0x1(%r12), %r15
cmpb %r14b, 0x1(%r12,%rdx)
je 0x1812
cmpb $0x3f, %r12b
movq %r15, %r12
jne 0x17fd
incq %r10
cmpb $0x41, %r15b
movzbl %r15b, %r14d
cmovael %eax, %r14d
movzbl %r14b, %r14d
orl %r14d, %ebx
cmpl $0x3, %r9d
je 0x1841
movzbl (%rdi,%r10), %r14d
testl %r14d, %r14d
je 0x1841
cmpl $0x3d, %r14d
je 0x1841
shll $0x6, %ebx
incl %r9d
cmpl $0x4, %r9d
jne 0x17e0
movl $0x4, %r9d
jmp 0x1855
movl %r10d, %r8d
cmpl $0x3, %r9d
ja 0x1867
addl $-0x4, %r9d
shll $0x6, %ebx
incl %r9d
jne 0x185f
movl %ebx, %r9d
shrl $0x10, %r9d
movb %r9b, (%rsi,%rcx)
movb %bh, 0x1(%rsi,%rcx)
movb %bl, 0x2(%rsi,%rcx)
addq $0x3, %rcx
jmp 0x17b5
movl %ecx, %eax
movb $0x0, (%rsi,%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
xorl %r14d, %r14d
leaq 0x37e7(%rip), %rax      # 0x5090
movzbl (%rdi), %ecx
cmpl $0x5c, %ecx
je 0x18be
testl %ecx, %ecx
je 0x1964
movsbl %cl, %esi
jmp 0x18c8
movsbl 0x1(%rdi), %esi
incq %rdi
addl $-0x30, %esi
movsbl 0x1(%rdi), %ecx
cmpl $0x5c, %ecx
jne 0x18db
movsbl 0x2(%rdi), %ecx
incq %rdi
addl $-0x30, %ecx
movsbl 0x2(%rdi), %edx
cmpl $0x5c, %edx
jne 0x18ee
movsbl 0x3(%rdi), %edx
incq %rdi
addl $-0x30, %edx
shll $0x10, %esi
shll $0x8, %ecx
orl %esi, %ecx
orl %edx, %ecx
movl %ecx, %esi
shrl $0x12, %esi
andl $0x3f, %esi
movb (%rsi,%rax), %sil
movb %sil, (%rbx,%r14)
movl %ecx, %esi
shrl $0xc, %esi
andl $0x3f, %esi
movb (%rsi,%rax), %sil
movb %sil, 0x1(%rbx,%r14)
cmpb $0x0, 0x1(%rdi)
je 0x194b
shrl $0x6, %ecx
andl $0x3f, %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x2(%rbx,%r14)
cmpb $0x0, 0x2(%rdi)
je 0x1959
andl $0x3f, %edx
movb (%rdx,%rax), %cl
movb %cl, 0x3(%rbx,%r14)
addq $0x3, %rdi
addq $0x4, %r14
jmp 0x18a9
addl $0x2, %r14d
movl $0x1, %r15d
xorl %eax, %eax
jmp 0x196c
addl $0x3, %r14d
xorl %eax, %eax
xorl %r15d, %r15d
jmp 0x196c
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movb $0x1, %al
testb %al, %al
jne 0x198a
movl %r14d, %edi
addq %rbx, %rdi
leaq 0x1(%r15), %rdx
movl $0x3d, %esi
callq 0x1060
addl %r15d, %r14d
incl %r14d
movslq %r14d, %rax
movb $0x0, (%rbx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movb (%rdi), %dl
testb %dl, %dl
je 0x19e1
pushq %rbp
movq %rsp, %rbp
incq %rdi
xorl %eax, %eax
leaq 0x18be(%rip), %rcx      # 0x3270
movzbl %dl, %edx
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
movb (%rdi), %dl
incq %rdi
testb %dl, %dl
jne 0x19b2
andl $-0x2, %eax
popq %rbp
jmp 0x19e3
xorl %eax, %eax
movb $0x0, (%rsi,%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/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
movb (%rdi), %dl
xorl %eax, %eax
testb %dl, %dl
je 0x1a3b
movl $0xd0, %ecx
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)
movb 0x2(%rdi,%rax,2), %dl
incq %rax
testb %dl, %dl
jne 0x19f9
movl %eax, %eax
movb $0x0, (%rsi,%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
xorl %eax, %eax
testl %edx, %edx
je 0x1b03
leaq 0x3637(%rip), %rcx      # 0x5090
xorl %r8d, %r8d
movb $-0x1, %r10b
xorl %ebx, %ebx
xorl %r9d, %r9d
incb %r10b
movl %r8d, %r11d
movzbl (%rdi,%r11), %r14d
orl %r9d, %r14d
incl %r8d
movl %r14d, %r9d
shll $0x8, %r9d
cmpl %edx, %r8d
cmovael %r14d, %r9d
movl %ebx, %r11d
cmpb $0x2, %r10b
cmovael %r14d, %r9d
jae 0x1a99
leal 0x1(%r11), %ebx
cmpl %edx, %r8d
jb 0x1a64
cmpb $0x2, %r10b
ja 0x1aac
shll $0x8, %r9d
incb %r11b
cmpb $0x3, %r11b
jb 0x1a9f
movl %r9d, %r10d
shrl $0x1a, %r10d
movb (%r10,%rcx), %r10b
movl %eax, %r11d
movb %r10b, (%rsi,%r11)
movl %r9d, %r10d
shrl $0x14, %r10d
andl $0x3f, %r10d
movb (%r10,%rcx), %r10b
movb %r10b, 0x1(%rsi,%r11)
movl %r9d, %r10d
shrl $0xe, %r10d
andl $0x3f, %r10d
movb (%r10,%rcx), %r10b
movb %r10b, 0x2(%rsi,%r11)
shrl $0x8, %r9d
andl $0x3f, %r9d
movb (%r9,%rcx), %r9b
addl $0x4, %eax
movb %r9b, 0x3(%rsi,%r11)
cmpl %edx, %r8d
jb 0x1a5c
movl %eax, %ecx
movb $0x0, (%rsi,%rcx)
movl %edx, %ecx
movl $0xaaaaaaab, %edi       # imm = 0xAAAAAAAB
imulq %rcx, %rdi
shrq $0x21, %rdi
leal (%rdi,%rdi,2), %ecx
subl %ecx, %edx
je 0x1b37
xorl %ecx, %ecx
cmpl $0x1, %edx
sete %cl
incl %ecx
decl %eax
movl %eax, %edx
movb $0x3d, (%rsi,%rdx)
decl %eax
decl %ecx
jne 0x1b2b
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
leal -0x1(%rsi), %eax
xorl %ecx, %ecx
cmpb $0x3d, (%rdi,%rax)
jne 0x1ca0
xorl %edx, %edx
incb %dl
leal -0x1(%rsi), %eax
addl $-0x2, %esi
cmpb $0x3d, (%rdi,%rsi)
movl %eax, %esi
je 0x1c8e
jmp 0x1ca4
movl %esi, %eax
xorl %edx, %edx
shrl $0x2, %eax
leal (%rax,%rax,2), %esi
xorl %eax, %eax
cmpb $0x2, %dl
setne %al
incl %eax
testb %dl, %dl
cmovel %ecx, %eax
addl %esi, %eax
popq %rbp
retq