LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aezv3/ref/aez_ref.c
// Function: Encrypt
void Encrypt(byte *K, unsigned kbytes,
             byte *N, unsigned nbytes,
             byte *AD[], unsigned adbytes[],
             unsigned veclen, unsigned abytes,
             byte *M, unsigned mbytes, byte *C) {
    byte delta[16], *X;
    AEZhash(K, kbytes, N, nbytes, AD, adbytes, veclen, abytes*8, delta);
    if (mbytes==0) {
        AEZprf(K, kbytes, delta, abytes, C);
    } else {
        X = (byte *)malloc(mbytes+abytes);
        memcpy(X, M, mbytes); memset(X+mbytes,0,abytes);
        Encipher(K, kbytes, delta, X, mbytes+abytes, X);
        memcpy(C, X, mbytes+abytes);
        free(X);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %r12d
movq %rdi, %r14
movq 0x90(%rsp), %r15
movl 0x88(%rsp), %ebp
movq 0x80(%rsp), %rbx
movl 0x78(%rsp), %r13d
movl 0x70(%rsp), %eax
leal (,%r13,8), %esi
leaq 0x20(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl %esi, 0x8(%rsp)
movl %eax, (%rsp)
movq %r14, %rdi
movl %r12d, %esi
callq 0x1301
testl %ebp, %ebp
je 0x1692
movl %r12d, 0x1c(%rsp)
movq %r15, 0x30(%rsp)
leal (%rbp,%r13), %r15d
movq %r15, %rdi
callq 0x1050
movq %rax, %r12
movl %ebp, %ebp
movq %rax, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x10d0
movq %r12, %rdi
addq %rbp, %rdi
movl %r13d, %edx
xorl %esi, %esi
callq 0x1040
testl %r15d, %r15d
je 0x16d5
cmpl $0x1f, %r15d
ja 0x16b7
movq %r12, (%rsp)
leaq 0x20(%rsp), %rdx
movq %r14, %rdi
movl 0x1c(%rsp), %esi
movq %r12, %rcx
movl %r15d, %r8d
xorl %r9d, %r9d
callq 0x1df6
jmp 0x16d5
leaq 0x20(%rsp), %rdx
movq %r14, %rdi
movl %r12d, %esi
movl %r13d, %ecx
movq %r15, %r8
callq 0x1516
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, (%rsp)
leaq 0x20(%rsp), %rdx
movq %r14, %rdi
movl 0x1c(%rsp), %esi
movq %r12, %rcx
movl %r15d, %r8d
xorl %r9d, %r9d
callq 0x21df
movq 0x30(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x10d0
movq %r12, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1070
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aezv3/ref/aez_ref.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
)
{
    byte *AD[] = {(byte*)ad};
    unsigned adbytes[] = {(unsigned)adlen};
    (void)nsec;
    if (clen) *clen = mlen+16;
    Encrypt((byte*)k, CRYPTO_KEYBYTES, (byte*)npub, CRYPTO_NPUBBYTES,
            AD, adbytes, 1, CRYPTO_ABYTES, (byte*)m, mlen, (byte*)c);
    return 0;
}

// Assembly:
subq $0x18, %rsp
movq %rcx, %r10
movq %rdx, %rax
movq %rdi, %r11
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rdx
movq %r8, 0x10(%rsp)
movl %r9d, 0xc(%rsp)
testq %rsi, %rsi
je 0x1728
leaq 0x10(%r10), %rcx
movq %rcx, (%rsi)
subq $0x8, %rsp
pushq $0x10
popq %rsi
pushq $0xc
popq %rcx
leaq 0x18(%rsp), %r8
leaq 0x14(%rsp), %r9
pushq %r11
pushq %r10
pushq %rax
pushq $0x10
pushq $0x1
callq 0x10a0
addq $0x30, %rsp
xorl %eax, %eax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aezv3/ref/aez_ref.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
)
{
    byte *AD[] = {(byte*)ad};
    unsigned adbytes[] = {(unsigned)adlen};
    (void)nsec;
    if (mlen) *mlen = clen-16;
    return Decrypt((byte*)k, CRYPTO_KEYBYTES, (byte*)npub, CRYPTO_NPUBBYTES,
                    AD, adbytes, 1, CRYPTO_ABYTES, (byte*)c, clen, (byte*)m);
}

// Assembly:
subq $0x18, %rsp
movq %r8, %r10
movq %rcx, %rax
movq %rdi, %r11
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rdx
movl 0x20(%rsp), %ecx
movq %r9, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
testq %rsi, %rsi
je 0x1785
leaq -0x10(%r10), %rcx
movq %rcx, (%rsi)
subq $0x8, %rsp
pushq $0x10
popq %rsi
pushq $0xc
popq %rcx
leaq 0x18(%rsp), %r8
leaq 0x14(%rsp), %r9
pushq %r11
pushq %r10
pushq %rax
pushq $0x10
pushq $0x1
callq 0x1030
addq $0x48, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aezv3/ref/aez_ref.c
// Function: mult_block
static void mult_block(unsigned x, byte *src, byte *dst) {
    byte t[16], r[16];
    memcpy(t,src,16); memset(r,0,16);
    for ( ; x; x>>=1) {
        if (x&1) xor_bytes(r,t,16,r);
        double_block(t);
    }
    memcpy(dst,r,16);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
vmovups (%rsi), %xmm0
movq %rsp, %r14
vmovaps %xmm0, (%r14)
movq %rdx, %rbx
movl %edi, %ebp
vxorps %xmm0, %xmm0, %xmm0
leaq 0x10(%rsp), %r15
vmovaps %xmm0, (%r15)
pushq $0x10
popq %r12
testl %ebp, %ebp
je 0x1ddf
testb $0x1, %bpl
je 0x1da6
movq %r15, %rdi
movq %r14, %rsi
movl %r12d, %edx
movq %r15, %rcx
callq 0x1d24
movb (%rsp), %al
xorl %ecx, %ecx
cmpq $0xf, %rcx
je 0x1dca
movb (%rsp,%rcx), %dl
movb 0x1(%rsp,%rcx), %sil
shrb $0x7, %sil
addb %dl, %dl
orb %sil, %dl
movb %dl, (%rsp,%rcx)
incq %rcx
jmp 0x1dab
movb 0xf(%rsp), %cl
addb %cl, %cl
sarb $0x7, %al
andb $-0x79, %al
xorb %cl, %al
movb %al, 0xf(%rsp)
shrl %ebp
jmp 0x1d8b
vmovaps 0x10(%rsp), %xmm0
vmovups %xmm0, (%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-flow.c
// Function: set_byte
static void set_byte(_u32 position, _u32 val) {
  _u32 f, roff;
  
  if (!cur_fuzzable) return;
  position %= cur_fuzzable;

  f = lookup_file(position, 1, &roff);
  load_data(f);

  infile[f].dirty = 1;  
  infile[f].data[roff] = val;
}

// Assembly:
movl 0x5656(%rip), %ecx      # 0x81a4
testl %ecx, %ecx
je 0x2ba2
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movl %edi, %eax
xorl %edx, %edx
divl %ecx
movl %edx, %edi
pushq $0x1
popq %rsi
leaq 0xc(%rsp), %r14
movq %r14, %rdx
callq 0x2f53
movl %eax, %ebp
movl %eax, %edi
callq 0x2fea
movq 0x5614(%rip), %rax      # 0x8198
movl %ebp, %ecx
shlq $0x5, %rcx
movb $0x1, 0x1c(%rax,%rcx)
movq 0x8(%rax,%rcx), %rax
movl (%r14), %ecx
movb %bl, (%rax,%rcx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-flow.c
// Function: set_word
static void set_word(_u32 position, _u32 val) {
  _u32 f, roff;
  
  if (!cur_fuzzable) return;
  position %= cur_fuzzable;

  f = lookup_file(position, 1, &roff);
  load_data(f);

  infile[f].dirty = 1;  
  
  if (roff + 1 < infile[f].cur_len) 
    *(_u16*)(infile[f].data + roff) = val;
  else {
    /* Assume LE - we're IA32 specific anyway */
    infile[f].data[roff] = val;
    set_byte(position + 1, val >> 8);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0x55f4(%rip), %ecx      # 0x81a4
testl %ecx, %ecx
je 0x2c02
movl %esi, %ebx
movl %edi, %eax
xorl %edx, %edx
divl %ecx
movl %edx, %ebp
pushq $0x1
popq %rsi
leaq 0x4(%rsp), %r14
movl %edx, %edi
movq %r14, %rdx
callq 0x2f53
movl %eax, %r15d
movl %eax, %edi
callq 0x2fea
movq 0x55b7(%rip), %rdx      # 0x8198
movl %r15d, %esi
shlq $0x5, %rsi
movb $0x1, 0x1c(%rdx,%rsi)
movl (%r14), %eax
leal 0x1(%rax), %edi
movq 0x8(%rdx,%rsi), %rcx
cmpl 0x18(%rdx,%rsi), %edi
jae 0x2c0d
movw %bx, (%rcx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb %bl, (%rcx,%rax)
incl %ebp
shrl $0x8, %ebx
movl %ebp, %edi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2b48
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-flow.c
// Function: remove_data
static void remove_data(_u32 position, _u32 len) {
  _u32 f, roff;

  if (!len) return;

  f = lookup_file(position, 1, &roff);
  load_data(f);
  
  if (roff == infile[f].cur_len) return; /* EOF already */

  infile[f].dirty = 1;
  
  /* Can remove in one operation? */
  if (roff + len <= infile[f].cur_len) {
    if (roff + len < infile[f].cur_len)
      memmove(infile[f].data + roff, infile[f].data + roff + len, infile[f].cur_len - roff);

    infile[f].data = myrealloc(infile[f].data, infile[f].cur_len - len);

    if (!infile[f].data) fatal("out of memory");
    infile[f].cur_len -= len;
    cur_fuzzable -= len;
  } else {
    _u32 candel = infile[f].cur_len - roff;
    /* Remove everything to EOF, repeat */
    infile[f].data = myrealloc(infile[f].data, roff);
    if (!infile[f].data) fatal("out of memory");
    cur_fuzzable -= candel;
    infile[f].cur_len = roff;
    remove_data(position, len - candel);
  }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %esi, %esi
je 0x2d09
movl %esi, %ebx
movl %edi, %ebp
pushq $0x1
popq %rsi
leaq 0x4(%rsp), %r14
movq %r14, %rdx
callq 0x2f53
movl %eax, %r15d
movl %eax, %edi
callq 0x2fea
movl (%r14), %r14d
movq 0x5535(%rip), %r12      # 0x8198
movl %r15d, %r13d
shlq $0x5, %r13
movl 0x18(%r12,%r13), %esi
movl %esi, %r15d
subl %r14d, %r15d
je 0x2d09
leaq (%r12,%r13), %rcx
movb $0x1, 0x1c(%rcx)
leal (%r14,%rbx), %eax
cmpl %esi, %eax
jbe 0x2cc7
movq 0x8(%rcx), %rdi
movl %r14d, %esi
callq 0x326d
movq %rax, 0x8(%r12,%r13)
testq %rax, %rax
je 0x2d18
subl %r15d, 0x54fc(%rip)     # 0x81a4
movl %r14d, 0x18(%r12,%r13)
subl %r15d, %ebx
movl %ebp, %edi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2c28
jae 0x2ce7
addq 0x8(%rcx), %r14
movl %ebx, %esi
addq %r14, %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %rcx, %r14
callq 0x1240
movq %r14, %rcx
movl 0x18(%r14), %esi
movq 0x8(%rcx), %rdi
subl %ebx, %esi
movq %rcx, %r14
callq 0x326d
movq %rax, 0x8(%r12,%r13)
testq %rax, %rax
je 0x2d54
subl %ebx, 0x18(%r14)
subl %ebx, 0x549b(%rip)      # 0x81a4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x42c1(%rip), %rbx      # 0x6fe0
movq (%rbx), %rcx
leaq 0x1521(%rip), %rdi      # 0x424a
pushq $0x24
popq %rsi
pushq $0x1
popq %rdx
callq 0x1290
movq (%rbx), %rdi
leaq 0x132e(%rip), %rsi      # 0x406c
leaq 0x184d(%rip), %rdx      # 0x4592
leaq 0x1335(%rip), %rcx      # 0x4081
movl $0x160, %r8d            # imm = 0x160
jmp 0x2d8e
movq 0x4285(%rip), %rbx      # 0x6fe0
movq (%rbx), %rcx
leaq 0x14e5(%rip), %rdi      # 0x424a
pushq $0x24
popq %rsi
pushq $0x1
popq %rdx
callq 0x1290
movq (%rbx), %rdi
leaq 0x12f2(%rip), %rsi      # 0x406c
leaq 0x1811(%rip), %rdx      # 0x4592
leaq 0x12f9(%rip), %rcx      # 0x4081
movl $0x159, %r8d            # imm = 0x159
xorl %eax, %eax
callq 0x11b0
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-flow.c
// Function: lookup_file
static _u32 lookup_file(_u32 position, _u8 skip_blank, _u32* offset) {
  _u32 i;
  _u32 cpos = 0;
  _s32 last0 = -1;
  
  for (i=0;i < infcount - 1;i++) {
    if (infile[i].asis) continue;
    if (position < cpos + infile[i].cur_len) break;
    if (!infile[i].cur_len && last0 < 0) last0 = i;
      else if (infile[i].cur_len) last0 = -1;
    cpos += infile[i].cur_len;
  }
  
  *offset = position - cpos;
  
  if (!*offset) {
    if (!skip_blank) return last0 > 0 ? last0 : i;
  } else {
    if (position >= cur_fuzzable) *offset = infile[i].cur_len; /* EOF */
  }
  
  return i;

}

// Assembly:
pushq %r14
pushq %rbx
movl 0x5234(%rip), %eax      # 0x8190
decl %eax
movq 0x5233(%rip), %rcx      # 0x8198
leaq 0x18(%rcx), %r10
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
xorl %r11d, %r11d
cmpq %r9, %rax
je 0x2fb9
cmpb $0x0, -0x8(%r10)
je 0x2f86
movl %r11d, %ebx
jmp 0x2faa
movl (%r10), %r14d
leal (%r14,%r11), %ebx
cmpl %edi, %ebx
ja 0x2fb6
testl %r8d, %r8d
movl %r9d, %r11d
cmovnsl %r8d, %r11d
negl %r14d
movl $0x0, %r8d
sbbl %r8d, %r8d
orl %r11d, %r8d
incq %r9
addq $0x20, %r10
movl %ebx, %r11d
jmp 0x2f75
movl %r9d, %eax
movl %edi, %r9d
subl %r11d, %r9d
movl %r9d, (%rdx)
jne 0x2fd2
testb %sil, %sil
jne 0x2fe6
testl %r8d, %r8d
cmovgl %r8d, %eax
jmp 0x2fe6
cmpl %edi, 0x51cc(%rip)      # 0x81a4
ja 0x2fe6
movl %eax, %esi
shlq $0x5, %rsi
movl 0x18(%rcx,%rsi), %ecx
movl %ecx, (%rdx)
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-flow.c
// Function: get_data
static _u8* get_data(_u32 position, _u32 len,_u8* where) {
  _u32 f, roff;
      
  if (!where) {
    where = malloc(len);
    if (!where) fatal("out of memory");
  }

  if (!len) return where;

  /* Absolutely no data left? Just return zeros */ 
  if (!cur_fuzzable) {
    memset(where, 0, len);
    return where;
  }

  /* Otherwise, just wrap the address space */
  position %= cur_fuzzable;
  
  f = lookup_file(position, 1, &roff);
  load_data(f);
  
  /* Can it be done in a single read? */
  if (roff + len <= infile[f].cur_len) {
    memcpy(where,infile[f].data + roff, len);
  /* Multiple reads needed */
  } else {
    _u32 cancopy = infile[f].cur_len - roff;
    memcpy(where,infile[f].data + roff, cancopy);
    position += cancopy;
    len -= cancopy;
    get_data(position, len, where + cancopy);
  }
  
  return where;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
movl %edi, %ebp
movl %esi, %r15d
testq %rdx, %rdx
jne 0x32a7
movq %r15, %rdi
callq 0x1190
movq %rax, %rbx
testq %rax, %rax
je 0x335a
testl %r14d, %r14d
je 0x3348
movl 0x4eee(%rip), %ecx      # 0x81a4
testl %ecx, %ecx
je 0x332a
movl %ebp, %eax
xorl %edx, %edx
divl %ecx
movl %edx, %ebp
pushq $0x1
popq %rsi
leaq 0x4(%rsp), %r12
movl %edx, %edi
movq %r12, %rdx
callq 0x2f53
movl %eax, %r13d
movl %eax, %edi
callq 0x2fea
movl (%r12), %esi
leal (%rsi,%r14), %ecx
movq 0x4eab(%rip), %rdx      # 0x8198
movl %r13d, %edi
shlq $0x5, %rdi
leaq (%rdx,%rdi), %rax
movl 0x18(%rdx,%rdi), %r12d
cmpl %r12d, %ecx
jbe 0x3339
subl %esi, %r12d
addq 0x8(%rax), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x10e0
addl %r12d, %ebp
subl %r12d, %r14d
leaq (%rbx,%r12), %rdx
movl %ebp, %edi
movl %r14d, %esi
callq 0x3278
jmp 0x3348
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x10c0
jmp 0x3348
addq 0x8(%rax), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x10e0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3c7f(%rip), %rbx      # 0x6fe0
movq (%rbx), %rcx
leaq 0xedf(%rip), %rdi       # 0x424a
pushq $0x24
popq %rsi
pushq $0x1
popq %rdx
callq 0x1290
movq (%rbx), %rdi
leaq 0xcec(%rip), %rsi       # 0x406c
leaq 0x1217(%rip), %rdx      # 0x459e
leaq 0xcf3(%rip), %rcx       # 0x4081
movl $0xee, %r8d
xorl %eax, %eax
callq 0x11b0
pushq $0x1
popq %rdi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O2/mabdi[P]bunney/bunny-flow.c
// Function: set_data
static void set_data(_u32 position, _u32 len,_u8* src) {
  _u32 f, roff;

  if (!cur_fuzzable || !len) return;
  position %= cur_fuzzable;
  
  f = lookup_file(position, 1, &roff);
  load_data(f);

  infile[f].dirty = 1;

  if (roff + len <= infile[f].cur_len) {
    memcpy(infile[f].data + roff, src, len);
  } else {
    _u32 cancopy = infile[f].cur_len - roff;
    memcpy(infile[f].data + roff, src, cancopy);
    position += cancopy;
    len -= cancopy;
    set_data(position, len, src + cancopy);
  }
  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movl 0x4dec(%rip), %ecx      # 0x81a4
testl %ecx, %ecx
sete %al
testl %esi, %esi
sete %dl
orb %al, %dl
jne 0x344d
movl %esi, %r14d
movl %edi, %eax
xorl %edx, %edx
divl %ecx
movl %edx, %ebp
pushq $0x1
popq %rsi
leaq 0xc(%rsp), %r15
movl %edx, %edi
movq %r15, %rdx
callq 0x2f53
movl %eax, %r12d
movl %eax, %edi
callq 0x2fea
movq 0x4da0(%rip), %rcx      # 0x8198
movl %r12d, %edx
shlq $0x5, %rdx
leaq (%rcx,%rdx), %rax
movb $0x1, 0x1c(%rcx,%rdx)
movl (%r15), %edi
leal (%rdi,%r14), %esi
movl 0x18(%rcx,%rdx), %r15d
cmpl %r15d, %esi
jbe 0x345a
subl %edi, %r15d
addq 0x8(%rax), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x10e0
addl %r15d, %ebp
subl %r15d, %r14d
addq %r15, %rbx
movl %ebp, %edi
movl %r14d, %esi
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x33a3
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addq 0x8(%rax), %rdi
movl %r14d, %edx
movq %rbx, %rsi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x10e0
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_06/getline.c
// Function: main
int main(void)
{
  char string[150] = "";

  get_line(string);
  puts(string);

  return 0;
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
movq %rsp, %rbx
movl $0x96, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1040
movq %rbx, %rdi
callq 0x1191
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
addq $0xa0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/KhuramAli[P]JAM-Benchmark/Single-Producer_Single-Consumer_RingBuffer_Lock-free_boost/code10.cpp
// Function: consumer()
void consumer(void)
{
	int value;
	while (!done) {
		while (spsc_queue.pop(value))
			++consumer_count;
	}

	while (spsc_queue.pop(value))
		++consumer_count;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x2e25(%rip), %rbx      # 0x40a8
leaq 0x4(%rsp), %r14
movb 0x3e6a(%rip), %al       # 0x50f8
testb $0x1, %al
je 0x129b
jmp 0x12ac
lock
incl 0x2e05(%rip)            # 0x40a0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x13f0
testb %al, %al
jne 0x1294
jmp 0x1288
leaq 0x2df5(%rip), %rbx      # 0x40a8
leaq 0x4(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x13f0
testb %al, %al
je 0x12d0
lock
incl 0x2dd2(%rip)            # 0x40a0
jmp 0x12b8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/KhuramAli[P]JAM-Benchmark/Single-Producer_Single-Consumer_RingBuffer_Lock-free_boost/code10.cpp
// Function: main
int main(int argc, char* argv[])
{
	using namespace std;
	cout << "boost::lockfree::queue is ";
	if (!spsc_queue.is_lock_free())
		cout << "not ";
	cout << "lockfree" << endl;

	std::thread producer_thread(producer);
	std::thread consumer_thread(consumer);

	producer_thread.join();
	done = true;
	consumer_thread.join();

	cout << "produced " << producer_count << " objects." << endl;
	cout << "consumed " << consumer_count << " objects." << endl;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq 0x2cf4(%rip), %rbx      # 0x3fd8
leaq 0xd19(%rip), %rsi       # 0x2004
movq %rbx, %rdi
callq 0x1090
leaq 0xd25(%rip), %rsi       # 0x201f
movq %rbx, %rdi
callq 0x1090
movq %rax, %rdi
callq 0x1050
leaq -0xe5(%rip), %rsi       # 0x122c
leaq 0x8(%rsp), %rdi
callq 0x1402
leaq -0xaa(%rip), %rsi       # 0x1278
movq %rsp, %rdi
callq 0x1402
leaq 0x8(%rsp), %rdi
callq 0x10c0
movb $0x1, %al
xchgb %al, 0x3dbc(%rip)       # 0x50f8
movq %rsp, %rdi
callq 0x10c0
movq 0x2c8d(%rip), %rdi      # 0x3fd8
leaq 0xcd6(%rip), %rsi       # 0x2028
callq 0x1090
movl 0x2d3f(%rip), %esi      # 0x409c
movq %rax, %rdi
callq 0x10d0
leaq 0xcc6(%rip), %rsi       # 0x2032
movq %rax, %rdi
callq 0x1090
movq %rax, %rdi
callq 0x1050
movq 0x2c55(%rip), %rdi      # 0x3fd8
leaq 0xcb2(%rip), %rsi       # 0x203c
callq 0x1090
movl 0x2d0b(%rip), %esi      # 0x40a0
movq %rax, %rdi
callq 0x10d0
leaq 0xc8e(%rip), %rsi       # 0x2032
movq %rax, %rdi
callq 0x1090
movq %rax, %rdi
callq 0x1050
movq %rsp, %rdi
callq 0x1468
leaq 0x8(%rsp), %rdi
callq 0x1468
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
movq %rax, %rbx
jmp 0x13de
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1468
leaq 0x8(%rsp), %rdi
callq 0x1468
movq %rbx, %rdi
callq 0x10e0
// File: /workspace/github_c_makefile_star2_O2/USArmyResearchLab[P]ARL_OpenSHMEM/src/autogen/shmem_collect32.c
// Function: shmem_collect32
void shmem_collect32(void *dest, const void *source, size_t nelems, 
	int pe_start, int log_pe_stride, int pe_size, long* psync)
{
	int pe = __shmem.my_pe;
	int pe_step = 0x1 << log_pe_stride;
	int pe_end = pe_start + pe_step * (pe_size - 1);
	int my_offset = 0;
	int inelems = (int)nelems;

	/* We know the value here is 0 and we can use it and reset it before
	 * it is needed in the barrier */

	volatile long* offset = psync + SHMEM_COLLECT_SYNC_SIZE - 1;

	int* neighbor_offset = (int*)shmem_ptr((void*)offset, pe + pe_step);

	if (__builtin_expect((pe == pe_start),0)) {

		*neighbor_offset = my_offset + inelems;

	} else {

		/// spin until neighbor sets offset 
		while (!(my_offset = *offset));

		*offset = SHMEM_SYNC_VALUE;

		if (__builtin_expect((pe != pe_end),1))
			*neighbor_offset = my_offset + inelems;
	}

	int i, j;
	for (i = pe_start; i <= pe_end; i += pe_step) {
		int32_t* dst = (int32_t*)shmem_ptr((void*)dest, i) + my_offset;
		for (j = 0; j < inelems; j++) dst[j] = ((int32_t*)source)[j];
	}

	shmem_barrier(pe_start, log_pe_stride, pe_size, psync);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r10d
movl %ecx, 0x8(%rsp)
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, 0x20(%rsp)
movq 0x60(%rsp), %rdx
leaq 0x3300(%rip), %rax      # 0x61f0
pushq $0x1
popq %rbp
movl %r8d, %ecx
shll %cl, %ebp
movq %r9, 0x18(%rsp)
leal -0x1(%r9), %r15d
movl %r8d, 0xc(%rsp)
shll %cl, %r15d
movl 0x4(%rax), %ebx
addl %r10d, %r15d
movq %rdx, 0x10(%rsp)
leaq 0x38(%rdx), %r14
leal (%rbx,%rbp), %esi
movq %r14, %rdi
callq 0x1c54
cmpl 0x8(%rsp), %ebx
je 0x2fae
movq (%r14), %rcx
testl %ecx, %ecx
je 0x2f2d
movq $0x0, (%r14)
cmpl %r15d, %ebx
je 0x2f46
leal (%rcx,%r12), %edx
movl %edx, (%rax)
movslq %ecx, %rbx
shlq $0x2, %rbx
xorl %eax, %eax
testl %r12d, %r12d
cmovlel %eax, %r12d
movl 0x8(%rsp), %r14d
cmpl %r15d, %r14d
jg 0x2f89
movq 0x20(%rsp), %rdi
movl %r14d, %esi
callq 0x1c54
addq %rbx, %rax
xorl %ecx, %ecx
cmpq %rcx, %r12
je 0x2f84
movl (%r13,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
incq %rcx
jmp 0x2f72
addl %ebp, %r14d
jmp 0x2f5b
movl 0x8(%rsp), %edi
movl 0xc(%rsp), %esi
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rcx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2fb8
xorl %ecx, %ecx
movl %r12d, %edx
jmp 0x2f44
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/kevinp89[P]Operating-System-EXT2-file-system-with-commands/./ext2_utils.c
// Function: set_dir_type
void set_dir_type(struct ext2_dir_entry *dir_entry, unsigned char type) {
	switch(type) {
		case 'f':
			dir_entry->file_type = EXT2_FT_REG_FILE;
			break;
		case 'd':
			dir_entry->file_type = EXT2_FT_DIR;
			break;
		case 'l':
			dir_entry->file_type = EXT2_FT_SYMLINK;
			break;
		case '?':
		default:
			dir_entry->file_type = EXT2_FT_UNKNOWN;
	}
}

// Assembly:
cmpl $0x6c, %esi
je 0x12fe
cmpl $0x66, %esi
je 0x12fa
cmpl $0x64, %esi
jne 0x1302
movb $0x2, %al
jmp 0x1304
movb $0x1, %al
jmp 0x1304
movb $0x7, %al
jmp 0x1304
xorl %eax, %eax
movb %al, 0x7(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/kevinp89[P]Operating-System-EXT2-file-system-with-commands/./ext2_utils.c
// Function: search_directories
unsigned int search_directories(unsigned char *disk, struct ext2_inode *node, char *target, int dir_only) {
	// Dir related
	unsigned int cur_rec_len;
	char filename[256];
	struct ext2_dir_entry *cur_dir;

	int i;
	for (i = 0; node->i_block[i] != 0; i++) {
		for (cur_rec_len = 0; cur_rec_len < 1024; ) {
			cur_dir = (struct ext2_dir_entry *)(disk + (1024 * node->i_block[i]) + cur_rec_len);
			cur_rec_len += cur_dir->rec_len;
			memset(filename, '\0', sizeof(filename));
			strncpy(filename, cur_dir->name, cur_dir->name_len);
			if (strcmp(filename, target) == 0) { // Found matching dir
				if (dir_only) { // If we're only checking for directories
					if (get_dir_type(cur_dir->file_type) == 'd') {
						return cur_dir->inode-1; // Return index, not the node itself.
					}
				} else { // Check all types of files
					return cur_dir->inode-1;
				}
			}
		}
	}
	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movl %ecx, 0x4(%rsp)
movq %rdx, %r14
movq %rdi, 0x10(%rsp)
xorl %eax, %eax
leaq 0x20(%rsp), %r13
movq %rsi, 0x8(%rsp)
movl 0x28(%rsi,%rax,4), %ebx
testl %ebx, %ebx
je 0x13d4
movq %rax, 0x18(%rsp)
shll $0xa, %ebx
addq 0x10(%rsp), %rbx
xorl %r15d, %r15d
cmpl $0x3ff, %r15d           # imm = 0x3FF
ja 0x13ab
movl %r15d, %ebp
leaq (%rbx,%rbp), %r12
addq $0x8, %r12
movzwl -0x4(%r12), %eax
addl %eax, %r15d
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
xorl %esi, %esi
callq 0x1090
movzbl -0x2(%r12), %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x1040
movq %r13, %rdi
movq %r14, %rsi
callq 0x10b0
testl %eax, %eax
jne 0x134d
addq %rbx, %rbp
cmpl $0x0, 0x4(%rsp)
je 0x13bd
cmpb $0x2, 0x7(%rbp)
jne 0x134d
jmp 0x13bd
movq 0x18(%rsp), %rax
incq %rax
movq 0x8(%rsp), %rsi
jmp 0x1331
movl (%rbp), %eax
decl %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $-0x1
popq %rax
jmp 0x13c2
// File: /workspace/github_c_makefile_star2_O2/kevinp89[P]Operating-System-EXT2-file-system-with-commands/./ext2_utils.c
// Function: check_parent
int check_parent(unsigned char *disk, char *path) {
	struct ext2_super_block *sb = (struct ext2_super_block *)(disk + 1024);
	struct ext2_group_desc *desc = (struct ext2_group_desc *)(disk + 2*1024);
	// Copying the path string into an array
	// Getting amount of dir inputs
	char *dupe = strdup(path);
	strcpy(dupe, path);
	int dircount = 0;
	int i;
	for (i = 0; dupe[i] != 0; i++) {
		if (dupe[i] == '/' && dupe[i+1] != '\0') {
			dircount++;
		}
	}
	if (dircount == 0) {
		fprintf(stderr, "Invalid directory.\n");
		exit(ENOENT);
	}
	// Creating array and copying
	char *dirs[dircount];
	char *tail = dupe;
	for (i = 0; i < dircount; i++) {
		dirs[i] = strsep(&tail, "/");
	}

	// Inode related
	struct ext2_inode *curinode;
	int node = 1; // Root directory begins at index 1
	
	i = 1;
	while (i < dircount) {
		if (strcmp(dirs[i], ".") != 0) {
			curinode = (struct ext2_inode *)((disk + 1024 * desc->bg_inode_table) + (sb->s_inode_size * node));
			node = search_directories(disk, curinode, dirs[i], 1);
			if (node == -1) {
				break;
			}
		}
		i++;
	}

	free(dupe);
	return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, -0x38(%rbp)
movq %rsi, %rdi
callq 0x1160
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x1050
movq %r14, %rax
incq %rax
xorl %ebx, %ebx
movzbl -0x1(%rax), %ecx
cmpl $0x2f, %ecx
je 0x141e
testl %ecx, %ecx
jne 0x1424
jmp 0x1429
cmpb $0x1, (%rax)
sbbl $-0x1, %ebx
incq %rax
jmp 0x140f
testl %ebx, %ebx
je 0x14fc
movl %ebx, %eax
movq %rsp, %r13
leaq 0xf(,%rax,8), %rax
andq $-0x10, %rax
subq %rax, %r13
movq %r13, %rsp
leaq -0x40(%rbp), %rax
movq %r14, -0x30(%rbp)
movq %r14, (%rax)
xorl %r15d, %r15d
testl %ebx, %ebx
movl $0x0, %r14d
cmovgl %ebx, %r14d
leaq 0xbaf(%rip), %r12       # 0x2018
cmpq %r15, %r14
je 0x1484
leaq -0x40(%rbp), %rdi
movq %r12, %rsi
callq 0x1100
movq %rax, (%r13,%r15,8)
incq %r15
jmp 0x1469
movslq %ebx, %rbx
pushq $0x1
popq %r12
pushq $0x1
popq %r15
movl %r12d, %r14d
cmpq %rbx, %r15
jge 0x14e1
movq (%r13,%r15,8), %rdx
cmpb $0x2e, (%rdx)
jne 0x14a7
cmpb $0x0, 0x1(%rdx)
je 0x14d8
movq -0x38(%rbp), %rdi
movl 0x808(%rdi), %eax
shll $0xa, %eax
addq %rdi, %rax
movzwl 0x458(%rdi), %ecx
movslq %r12d, %rsi
imulq %rcx, %rsi
addq %rax, %rsi
movl %r14d, %ecx
callq 0x1308
movl %eax, %r12d
cmpl $-0x1, %eax
je 0x14dd
incq %r15
jmp 0x1492
pushq $-0x1
popq %r12
movq -0x30(%rbp), %rdi
callq 0x1030
movl %r12d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2af5(%rip), %rax      # 0x3ff8
movq (%rax), %rcx
leaq 0xaf7(%rip), %rdi       # 0x2004
pushq $0x13
popq %rsi
pushq $0x1
popq %rdx
callq 0x1150
pushq $0x2
popq %rdi
callq 0x1140
// File: /workspace/github_c_makefile_star2_O2/kevinp89[P]Operating-System-EXT2-file-system-with-commands/ext2_cp.c
// Function: get_free_blocks
int *get_free_blocks(int blocks_need, unsigned char *block_bit_map){

	int i,j=22;
	
	int* free_blocks = malloc(sizeof(int)*blocks_need);
	
	for(i=0; i<blocks_need; i++){
		while(check_node(j, block_bit_map) == 0){
			j++;
			//if j reaches max block count, return null
			if(j==sb->s_blocks_count){
				return NULL;
			}
		}
		free_blocks[i] = j;	
		set_node(j, block_bit_map);
	}
	return free_blocks;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movslq %edi, %r14
leaq (,%r14,4), %rdi
callq 0x10f0
xorl %r8d, %r8d
testl %r14d, %r14d
cmovlel %r8d, %r14d
movq %rax, %rsi
pushq $0x16
popq %rdi
pushq $0x8
popq %r9
pushq $0x1
popq %r10
cmpq %r14, %r8
je 0x15ae
movq 0x2b5c(%rip), %r11      # 0x40d0
movl %edi, %eax
cltd
idivl %r9d
cltq
movl %edi, %ecx
andb $0x7, %cl
movl %r10d, %edx
shll %cl, %edx
movzbl (%rbx,%rax), %ecx
movl %edi, %ebp
andl $0x7, %ebp
btl %ebp, %ecx
jb 0x159e
incl %edi
cmpl 0x4(%r11), %edi
jne 0x1574
jmp 0x15ac
movl %edi, (%rsi,%r8,4)
xorb %cl, %dl
movb %dl, (%rbx,%rax)
incq %r8
jmp 0x1568
xorl %esi, %esi
movq %rsi, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kevinp89[P]Operating-System-EXT2-file-system-with-commands/ext2_cp.c
// Function: find_free_block
int find_free_block(unsigned char *bmap){
	int bnode;
	for (bnode = 22; bnode < sb->s_blocks_count; bnode++) {
		if (check_node(bnode, bmap) == 0) {
			break;
		}
	}
	if(bnode == sb->s_blocks_count){
		return -1;	
	}
	set_node(bnode, bmap);
	return bnode;
}

// Assembly:
movq 0x2b13(%rip), %rax      # 0x40d0
movl 0x4(%rax), %ecx
cmpl $0x17, %ecx
pushq $0x16
popq %rdx
movl %edx, %eax
cmovael %ecx, %eax
cmpl %ecx, %edx
jae 0x15eb
movl %edx, %esi
shrl $0x3, %esi
movzbl (%rdi,%rsi), %esi
movl %edx, %r8d
andl $0x7, %r8d
btl %r8d, %esi
jae 0x15e9
incl %edx
jmp 0x15cb
movl %edx, %eax
cmpl %ecx, %eax
jne 0x15f3
pushq $-0x1
popq %rax
retq
movl %eax, %ecx
andb $0x7, %cl
pushq $0x1
popq %rdx
shll %cl, %edx
movl %eax, %ecx
shrl $0x3, %ecx
xorb %dl, (%rdi,%rcx)
retq
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/programs/fibonacci/ADTIntVector_test.c
// Function: test_insert
void test_insert(void) {
	IntVector vec = int_vector_create(0);

	// insert 1000 στοιχεία ώστε να συμβούν πολλαπλά resizes
	for (int i = 0; i < 1000; i++) {
		int_vector_insert_last(vec, i);
		TEST_ASSERT(int_vector_size(vec) == i+1);	// Το size ενημερώθηκε;
		TEST_ASSERT(int_vector_get_at(vec, i) == i);	// Μπορούμε να κάνουμε at το στοιχείο που μόλις βάλαμε;
	}

	// Δοκιμή ότι μετά τα resizes τα στοιχεία είναι ακόμα προσπελάσιμα
	for (int i = 0; i < 1000; i++)
		TEST_ASSERT(int_vector_get_at(vec, i) == i);

	int_vector_destroy(vec);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %edi, %edi
callq 0x43ac
movq %rax, %rbx
movl $0x3e8, %r13d           # imm = 0x3E8
leaq 0x1839(%rip), %r14      # 0x5318
leaq 0x1999(%rip), %r15      # 0x547f
xorl %ebp, %ebp
subl $0x1, %r13d
jb 0x3b5e
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4415
movq %rbx, %rdi
callq 0x43fa
leal 0x1(%rbp), %r12d
xorl %edi, %edi
cmpl %r12d, %eax
sete %dil
movq %r14, %rsi
pushq $0x1b
popq %rdx
movq %r15, %rcx
leaq 0x1829(%rip), %r8       # 0x5346
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x3baf
movq %rbx, %rdi
movl %ebp, %esi
callq 0x440b
xorl %edi, %edi
cmpl %ebp, %eax
sete %dil
movq %r14, %rsi
pushq $0x1c
popq %rdx
movq %r15, %rcx
leaq 0x1814(%rip), %r8       # 0x5362
xorl %eax, %eax
callq 0x239c
movl %r12d, %ebp
testl %eax, %eax
jne 0x3ae8
jmp 0x3baf
leaq 0x17b3(%rip), %r14      # 0x5318
leaq 0x1913(%rip), %r15      # 0x547f
leaq 0x17ef(%rip), %r12      # 0x5362
pushq $0x21
popq %rbp
xorl %r13d, %r13d
cmpl $0x3e8, %r13d           # imm = 0x3E8
je 0x3bb4
movq %rbx, %rdi
movl %r13d, %esi
callq 0x440b
xorl %edi, %edi
cmpl %eax, %r13d
sete %dil
movq %r14, %rsi
movl %ebp, %edx
movq %r15, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x239c
incl %r13d
testl %eax, %eax
jne 0x3b79
callq 0x2bc0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x446b
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/programs/fibonacci/ADTIntVector_test.c
// Function: test_remove
void test_remove(void) {
	IntVector vec = int_vector_create(1000);

	// replace για προσθήκη δεδομένων, χωρίς ελέγχους (έχουμε ξεχωριστό test για το replace)
	for (int i = 0; i < 1000; i++)
		int_vector_set_at(vec, i, i);

	// Διαδοχικά remove ώστε να συμβούν και resizes
	for (int i = 999; i >= 0; i--) {
		TEST_ASSERT(int_vector_get_at(vec, i) == i);
		int_vector_remove_last(vec);
		TEST_ASSERT(int_vector_size(vec) == i);
	}

	int_vector_destroy(vec);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x43ac
movq %rax, %rbx
xorl %ebp, %ebp
cmpl $0x3e8, %ebp            # imm = 0x3E8
je 0x3bfc
movq %rbx, %rdi
movl %ebp, %esi
movl %ebp, %edx
callq 0x43ff
incl %ebp
jmp 0x3be4
movl $0x3e7, %ebp            # imm = 0x3E7
leaq 0x1710(%rip), %r14      # 0x5318
leaq 0x1870(%rip), %r15      # 0x547f
leaq 0x176b(%rip), %r12      # 0x5381
pushq $0x31
popq %r13
testl %ebp, %ebp
js 0x3c81
movq %rbx, %rdi
movl %ebp, %esi
callq 0x440b
xorl %edi, %edi
cmpl %eax, %ebp
sete %dil
movq %r14, %rsi
pushq $0x2f
popq %rdx
movq %r15, %rcx
leaq 0x1722(%rip), %r8       # 0x5362
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x3c7c
movq %rbx, %rdi
callq 0x443a
movq %rbx, %rdi
callq 0x43fa
xorl %edi, %edi
cmpl %eax, %ebp
sete %dil
movq %r14, %rsi
movl %r13d, %edx
movq %r15, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x239c
decl %ebp
testl %eax, %eax
jne 0x3c1a
callq 0x2bc0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x446b
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/programs/fibonacci/ADTIntVector_test.c
// Function: test_get_set_at
void test_get_set_at(void) {
	IntVector vec = int_vector_create(0);

	// insert πολλαπλά 0, θα τα αλλάξουμε μετά με replace
	for (int i = 0; i < 1000; i++)
		int_vector_insert_last(vec, 0);

	for (int i = 0; i < 1000; i++) {
		TEST_ASSERT(int_vector_get_at(vec, i) == 0);
		int_vector_set_at(vec, i, i);
		TEST_ASSERT(int_vector_get_at(vec, i) == i);
	}

	int_vector_destroy(vec);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %edi, %edi
callq 0x43ac
movq %rax, %rbx
movl $0x3e8, %ebp            # imm = 0x3E8
subl $0x1, %ebp
jb 0x3cc2
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4415
jmp 0x3cb1
leaq 0x164f(%rip), %r14      # 0x5318
leaq 0x17af(%rip), %r15      # 0x547f
leaq 0x168b(%rip), %r13      # 0x5362
pushq $0x41
popq %r12
xorl %ebp, %ebp
cmpl $0x3e8, %ebp            # imm = 0x3E8
je 0x3d4e
movq %rbx, %rdi
movl %ebp, %esi
callq 0x440b
xorl %edi, %edi
testl %eax, %eax
sete %dil
movq %r14, %rsi
pushq $0x3f
popq %rdx
movq %r15, %rcx
leaq 0x1694(%rip), %r8       # 0x539b
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x3d49
movq %rbx, %rdi
movl %ebp, %esi
movl %ebp, %edx
callq 0x43ff
movq %rbx, %rdi
movl %ebp, %esi
callq 0x440b
xorl %edi, %edi
cmpl %eax, %ebp
sete %dil
movq %r14, %rsi
movl %r12d, %edx
movq %r15, %rcx
movq %r13, %r8
xorl %eax, %eax
callq 0x239c
incl %ebp
testl %eax, %eax
jne 0x3cdd
callq 0x2bc0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x446b
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/programs/fibonacci/ADTIntVector_test.c
// Function: test_find
void test_find(void) {
	IntVector vec = int_vector_create(1000);

	// replace για προσθήκη δεδομένων
	for (int i = 0; i < 1000; i++)
		int_vector_set_at(vec, i, i);

	for (int i = 0; i < 1000; i++) {
		int p = int_vector_find(vec, i);
		TEST_ASSERT(p == i);
	}

	TEST_ASSERT(int_vector_find(vec, -12) == INT_MIN);

	int_vector_destroy(vec);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x43ac
movq %rax, %rbx
xorl %ebp, %ebp
cmpl $0x3e8, %ebp            # imm = 0x3E8
je 0x3d96
movq %rbx, %rdi
movl %ebp, %esi
movl %ebp, %edx
callq 0x43ff
incl %ebp
jmp 0x3d7e
leaq 0x157b(%rip), %r14      # 0x5318
leaq 0x16db(%rip), %r15      # 0x547f
leaq 0x160f(%rip), %r12      # 0x53ba
pushq $0x50
popq %rbp
xorl %r13d, %r13d
cmpl $0x3e8, %r13d           # imm = 0x3E8
je 0x3dec
movq %rbx, %rdi
movl %r13d, %esi
callq 0x4444
xorl %edi, %edi
cmpl %eax, %r13d
sete %dil
movq %r14, %rsi
movl %ebp, %edx
movq %r15, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x239c
incl %r13d
testl %eax, %eax
jne 0x3db1
callq 0x2bc0
pushq $-0xc
popq %rsi
movq %rbx, %rdi
callq 0x4444
xorl %edi, %edi
negl %eax
seto %dil
leaq 0x1512(%rip), %rsi      # 0x5318
leaq 0x1672(%rip), %rcx      # 0x547f
leaq 0x15ad(%rip), %r8       # 0x53c1
pushq $0x53
popq %rdx
xorl %eax, %eax
callq 0x239c
testl %eax, %eax
je 0x3de7
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x446b
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/programs/fibonacci/ADTIntVector_test.c
// Function: test_destroy
void test_destroy(void) {
	// Απλά εκτελούμε την destroy, για να ελέγξουμε αν όντως δουλεύει
	// σωστά τρέχουμε το test με valgrind.

	IntVector vec = int_vector_create(1);

	int_vector_set_at(vec, 0, 1);
	int_vector_insert_last(vec, 1);
	int_vector_remove_last(vec);

	int_vector_destroy(vec);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
pushq $0x1
popq %rbx
movl %ebx, %edi
callq 0x43ac
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0x43ff
movq %r14, %rdi
movl %ebx, %esi
callq 0x4415
movq %r14, %rdi
callq 0x443a
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x446b
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/programs/fibonacci/ADTIntVector.c
// Function: int_vector_create
IntVector int_vector_create(int size) {
	// Περνάμε τη free στην vector_create, ώστε κάθε στοιχείο που αφαιρείται να γίνεται free αυτόματα
	Vector vec = vector_create(size, free);

	// Ο πίνακας περιέχει size μη-αρχικοποιημένους ακεραίους, δεσμεύουμε μνήμη για αυτούς
	for (int i = 0; i < size; i ++)
		vector_set_at(vec, i, malloc(sizeof(int)));

	return (IntVector)vec;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x3c04(%rip), %rsi      # 0x7fc0
callq 0x4470
movq %rax, %r14
xorl %ebp, %ebp
testl %ebx, %ebx
cmovlel %ebp, %ebx
pushq $0x4
popq %r15
cmpl %ebp, %ebx
je 0x43ec
movq %r15, %rdi
callq 0x21a0
movq %r14, %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x44df
incl %ebp
jmp 0x43cf
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/programs/fibonacci/ADTIntVector.c
// Function: int_vector_insert_last
void int_vector_insert_last(IntVector vec, int value) {
	// Νέο στοιχείο, χρειαζόμαστε μνήμη!
	int *p = malloc(sizeof(int));
	*p = value;
	vector_insert_last((Vector)vec, p);		// προσθήκη του int pointer στο vector
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
pushq $0x4
popq %rdi
callq 0x21a0
movl %ebx, (%rax)
movq %r14, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4537
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/programs/cat/../../modules/UsingDynamicArray/ADTVector.c
// Function: vector_create
Vector vector_create(int size, DestroyFunc destroy_value) {
	// Δημιουργία του struct
	Vector vec = malloc(sizeof(*vec));

	vec->size = size;
	vec->destroy_value = destroy_value;

	// Δέσμευση μνήμης για τον πίνακα. Αρχικά το vector περιέχει size
	// μη-αρχικοποιημένα στοιχεία, αλλά εμείς δεσμεύουμε xώρο για τουλάχιστον
	// VECTOR_MIN_CAPACITY για να αποφύγουμε τα πολλαπλά resizes.
	//
	vec->capacity = size < VECTOR_MIN_CAPACITY ? VECTOR_MIN_CAPACITY : size;
	vec->array = calloc(vec->capacity, sizeof(*vec->array));		// αρχικοποίηση σε 0 (NULL)

	return vec;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
pushq $0x18
popq %rdi
callq 0x21a0
movq %rax, %r14
movl %ebp, 0x8(%rax)
movq %rbx, 0x10(%rax)
cmpl $0xb, %ebp
pushq $0xa
popq %rdi
cmovgel %ebp, %edi
movl %edi, 0xc(%rax)
pushq $0x8
popq %rsi
callq 0x2160
movq %rax, (%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/programs/cat/../../modules/UsingDynamicArray/ADTVector.c
// Function: vector_set_at
void vector_set_at(Vector vec, int pos, Pointer value) {
	assert(pos >= 0 && pos < vec->size);	// LCOV_EXCL_LINE

	// Αν υπάρχει συνάρτηση destroy_value, την καλούμε για το στοιχείο που αντικαθίσταται
	if (value != vec->array[pos].value && vec->destroy_value != NULL)
		vec->destroy_value(vec->array[pos].value);

	vec->array[pos].value = value;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testl %esi, %esi
js 0x451a
movq %rdi, %r14
cmpl %esi, 0x8(%rdi)
jle 0x451a
movq %rdx, %rbx
movq (%r14), %rax
movl %esi, %r15d
movq (%rax,%r15,8), %rdi
cmpq %rdx, %rdi
je 0x4510
movq 0x10(%r14), %rcx
testq %rcx, %rcx
je 0x4510
callq *%rcx
movq (%r14), %rax
movq %rbx, (%rax,%r15,8)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x18ee(%rip), %rdi      # 0x5e0f
leaq 0x1903(%rip), %rsi      # 0x5e2b
leaq 0x194b(%rip), %rcx      # 0x5e7a
pushq $0x3a
popq %rdx
callq 0x2110
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/programs/cat/../../modules/UsingDynamicArray/ADTVector.c
// Function: vector_insert_last
void vector_insert_last(Vector vec, Pointer value) {
	// Μεγαλώνουμε τον πίνακα (αν χρειαστεί), ώστε να χωράει τουλάχιστον size στοιχεία
	// Διπλασιάζουμε κάθε φορά το capacity (σημαντικό για την πολυπλοκότητα!)
	if (vec->capacity == vec->size) {
		// Προσοχή: δεν πρέπει να κάνουμε free τον παλιό pointer, το κάνει η realloc
		vec->capacity *= 2;
		vec->array = realloc(vec->array, vec->capacity * sizeof(*vec->array));
	}

	// Μεγαλώνουμε τον πίνακα και προσθέτουμε το στοιχείο
	vec->array[vec->size].value = value;
	vec->size++;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movslq 0xc(%rdi), %rsi
movl 0x8(%rdi), %ecx
movq (%rdi), %rax
cmpl %ecx, %esi
jne 0x4567
leal (%rsi,%rsi), %ecx
movl %ecx, 0xc(%rbx)
shlq $0x4, %rsi
movq %rax, %rdi
callq 0x21d0
movq %rax, (%rbx)
movl 0x8(%rbx), %ecx
movslq %ecx, %rcx
movq %r14, (%rax,%rcx,8)
incl %ecx
movl %ecx, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/programs/cat/../../modules/UsingDynamicArray/ADTVector.c
// Function: vector_remove_last
void vector_remove_last(Vector vec) {
	assert(vec->size != 0);		// LCOV_EXCL_LINE

	// Αν υπάρχει συνάρτηση destroy_value, την καλούμε για το στοιχείο που αφαιρείται
	if (vec->destroy_value != NULL)
		vec->destroy_value(vec->array[vec->size - 1].value);

	// Αφαιρούμε στοιχείο οπότε ο πίνακας μικραίνει
	vec->size--;

	// Μικραίνουμε τον πίνακα αν χρειαστεί, ώστε να μην υπάρχει υπερβολική σπατάλη χώρου.
	// Για την πολυπλοκότητα είναι σημαντικό να μειώνουμε το μέγεθος στο μισό, και μόνο
	// αν το capacity είναι τετραπλάσιο του size (δηλαδή το 75% του πίνακα είναι άδειος).
	//
	if (vec->capacity > vec->size * 4 && vec->capacity > 2*VECTOR_MIN_CAPACITY) {
		vec->capacity /= 2;
		vec->array = realloc(vec->array, vec->capacity * sizeof(*vec->array));
	}
}

// Assembly:
pushq %rbx
movslq 0x8(%rdi), %rax
testq %rax, %rax
je 0x45d7
movq %rdi, %rbx
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x459e
movq (%rbx), %rdx
movq -0x8(%rdx,%rax,8), %rdi
callq *%rcx
movl 0x8(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x8(%rbx)
movl 0xc(%rbx), %ecx
leal -0x4(,%rax,4), %eax
cmpl %eax, %ecx
setle %al
cmpl $0x15, %ecx
setl %dl
orb %al, %dl
jne 0x45d5
shrl %ecx
movl %ecx, 0xc(%rbx)
movq (%rbx), %rdi
leaq (,%rcx,8), %rsi
callq 0x21d0
movq %rax, (%rbx)
popq %rbx
retq
leaq 0x18c5(%rip), %rdi      # 0x5ea3
leaq 0x1846(%rip), %rsi      # 0x5e2b
leaq 0x18c6(%rip), %rcx      # 0x5eb2
pushq $0x52
popq %rdx
callq 0x2110
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/programs/cat/../../modules/UsingDynamicArray/ADTVector.c
// Function: vector_find
Pointer vector_find(Vector vec, Pointer value, CompareFunc compare) {
	// Διάσχιση του vector
	for (int i = 0; i < vec->size; i++)
		if (compare(vec->array[i].value, value) == 0)
			return vec->array[i].value;		// βρέθηκε

	return NULL;				// δεν υπάρχει
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
xorl %ebx, %ebx
xorl %r13d, %r13d
movslq 0x8(%r15), %rax
cmpq %rax, %r13
jge 0x4630
movq (%r15), %rax
movq (%rax,%r13,8), %rdi
movq %r12, %rsi
callq *%r14
incq %r13
testl %eax, %eax
jne 0x460b
movq (%r15), %rax
movq -0x8(%rax,%r13,8), %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/programs/cat/../../modules/UsingDynamicArray/ADTVector.c
// Function: vector_destroy
void vector_destroy(Vector vec) {
	// Αν υπάρχει συνάρτηση destroy_value, την καλούμε για όλα τα στοιχεία
	if (vec->destroy_value != NULL)
		for (int i = 0; i < vec->size; i++)
			vec->destroy_value(vec->array[i].value);

	// Πρέπει να κάνουμε free τόσο τον πίνακα όσο και το struct!
	free(vec->array);
	free(vec);			// τελευταίο το vec!
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x466f
xorl %r14d, %r14d
movslq 0x8(%rbx), %rax
cmpq %rax, %r14
jge 0x466f
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
callq *0x10(%rbx)
incq %r14
jmp 0x4657
movq (%rbx), %rdi
callq 0x22a0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x22a0
// File: /workspace/github_c_makefile_star2_O2/chatziko-k08[P]lecture-code/programs/cat/../../modules/UsingDynamicArray/ADTVector.c
// Function: vector_find_node
VectorNode vector_find_node(Vector vec, Pointer value, CompareFunc compare) {
	// Διάσχιση του vector
	for (int i = 0; i < vec->size; i++)
		if (compare(vec->array[i].value, value) == 0)
			return &vec->array[i];		// βρέθηκε

	return VECTOR_EOF;				// δεν υπάρχει
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
pushq $-0x8
popq %r13
xorl %ebx, %ebx
xorl %ebp, %ebp
movslq 0x8(%r14), %rax
cmpq %rax, %rbp
jge 0x471e
movq (%r14), %rax
movq 0x8(%rax,%r13), %rdi
movq %r12, %rsi
callq *%r15
incq %rbp
addq $0x8, %r13
testl %eax, %eax
jne 0x46f6
addq (%r14), %r13
movq %r13, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/martintopholm[P]xping/xping.c
// Function: target_mark
void
target_mark(struct target *t, int seq, int ch)
{
	if (ch == '.' && t->res[seq % NUM] != ' ')
		t->res[seq % NUM] = ':';
	else
		t->res[seq % NUM] = ch;
	if (a_flag && ch == '.') {
		if (a_flag == 1)
			bell();
		else if (a_flag >=2 && t->npkts >= 4 &&
		    t->res[(seq-3) % NUM] != '.' &&
		    t->res[(seq-2) % NUM] != '.' &&
		    t->res[(seq-1) % NUM] == '.' &&
		    t->res[(seq-0) % NUM] == '.')
			bell();
	}

	if (seq == t->npkts - 1)
		ui_update(t);
	else
		ui_update(NULL); /* this is a late reply, need full update to redraw this */
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ecx
movl %esi, %r14d
movq %rdi, %rbx
movl $0x12c, %esi            # imm = 0x12C
movl %r14d, %eax
cmpl $0x2e, %edx
jne 0x255d
cltd
idivl %esi
movslq %edx, %rax
cmpb $0x20, 0x44(%rbx,%rax)
je 0x2563
movb $0x3a, 0x44(%rbx,%rax)
jmp 0x2567
cltd
idivl %esi
movslq %edx, %rax
movb %cl, 0x44(%rbx,%rax)
cmpl $0x2e, %ecx
setne %cl
movl 0x5cd5(%rip), %eax      # 0x8248
testl %eax, %eax
sete %dl
orb %cl, %dl
jne 0x25d8
cmpl $0x1, %eax
jne 0x2588
callq 0x25f9
jmp 0x25d8
jle 0x25d8
cmpl $0x4, 0x40(%rbx)
jl 0x25d8
leal -0x3(%r14), %eax
movl $0x12c, %ecx            # imm = 0x12C
cltd
idivl %ecx
movslq %edx, %rax
cmpb $0x2e, 0x44(%rbx,%rax)
je 0x25d8
leal -0x2(%r14), %eax
cltd
idivl %ecx
movslq %edx, %rax
cmpb $0x2e, 0x44(%rbx,%rax)
je 0x25d8
leal -0x1(%r14), %eax
cltd
idivl %ecx
movslq %edx, %rax
cmpb $0x2e, 0x44(%rbx,%rax)
jne 0x25d8
movl %r14d, %eax
cltd
idivl %ecx
movslq %edx, %rax
cmpb $0x2e, 0x44(%rbx,%rax)
je 0x2581
movl 0x40(%rbx), %ecx
decl %ecx
movq 0x5c44(%rip), %rax      # 0x8228
cmpl %r14d, %ecx
jne 0x25ee
movq %rbx, %rdi
jmp 0x25f0
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax