LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/softfloat.c
// Function: float128_compare_internal
static inline int float128_compare_internal(float128 a, float128 b,
                                            int is_quiet, float_status *status)
{
    flag aSign, bSign;

    if (( ( extractFloat128Exp( a ) == 0x7fff ) &&
          ( extractFloat128Frac0( a ) | extractFloat128Frac1( a ) ) ) ||
        ( ( extractFloat128Exp( b ) == 0x7fff ) &&
          ( extractFloat128Frac0( b ) | extractFloat128Frac1( b ) ) )) {
        if (!is_quiet ||
            float128_is_signaling_nan( a ) ||
            float128_is_signaling_nan( b ) ) {
            float_raise(float_flag_invalid, status);
        }
        return float_relation_unordered;
    }
    aSign = extractFloat128Sign( a );
    bSign = extractFloat128Sign( b );
    if ( aSign != bSign ) {
        if ( ( ( ( a.high | b.high )<<1 ) | a.low | b.low ) == 0 ) {
            /* zero case */
            return float_relation_equal;
        } else {
            return 1 - (2 * aSign);
        }
    } else {
        if (a.low == b.low && a.high == b.high) {
            return float_relation_equal;
        } else {
            return 1 - 2 * (aSign ^ ( lt128( a.high, a.low, b.high, b.low ) ));
        }
    }
}

// Assembly:
movabsq $0x7fff000000000000, %r10 # imm = 0x7FFF000000000000
movq %rsi, %r11
notq %r11
movabsq $0xffffffffffff, %rax   # imm = 0xFFFFFFFFFFFF
testq %r10, %r11
jne 0x12d1c
movq %rsi, %r11
andq %rax, %r11
orq %rdi, %r11
jne 0x12d2f
movq %rcx, %r11
notq %r11
testq %r11, %r10
jne 0x12d78
andq %rcx, %rax
orq %rdx, %rax
je 0x12d78
movl $0x2, %eax
testl %r8d, %r8d
je 0x12d72
pushq %rbx
movabsq $0x7fff800000000000, %r11 # imm = 0x7FFF800000000000
movabsq $0x7fffffffffff, %r8    # imm = 0x7FFFFFFFFFFF
movq %rsi, %rbx
andq %r11, %rbx
cmpq %r10, %rbx
popq %rbx
jne 0x12d62
andq %r8, %rsi
orq %rdi, %rsi
jne 0x12d72
andq %rcx, %r11
cmpq %r10, %r11
jne 0x12dd4
andq %r8, %rcx
orq %rdx, %rcx
je 0x12dd4
orb $0x1, 0x2(%r9)
retq
movq %rsi, %rax
shrq $0x3f, %rax
movq %rcx, %r8
shrq $0x3f, %r8
cmpq %r8, %rax
jne 0x12dba
movq %rdi, %r8
xorq %rdx, %r8
movq %rsi, %r9
xorq %rcx, %r9
orq %r8, %r9
je 0x12dd5
cmpq %rcx, %rsi
sete %cl
setb %sil
cmpq %rdx, %rdi
setb %dl
andb %cl, %dl
orb %sil, %dl
xorb %al, %dl
addb %dl, %dl
movzbl %dl, %ecx
jmp 0x12dcd
orq %rsi, %rcx
addq %rcx, %rcx
orq %rdi, %rcx
orq %rdx, %rcx
je 0x12dd5
addl %eax, %eax
movzbl %al, %ecx
movl $0x1, %eax
subl %ecx, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/softfloat.c
// Function: float32_scalbn
float32 float32_scalbn(float32 a, int n, float_status *status)
{
    flag aSign;
    int16_t aExp;
    uint32_t aSig;

    a = float32_squash_input_denormal(a, status);
    aSig = extractFloat32Frac( a );
    aExp = extractFloat32Exp( a );
    aSign = extractFloat32Sign( a );

    if ( aExp == 0xFF ) {
        if ( aSig ) {
            return propagateFloat32NaN(a, a, status);
        }
        return a;
    }
    if (aExp != 0) {
        aSig |= 0x00800000;
    } else if (aSig == 0) {
        return a;
    } else {
        aExp++;
    }

    if (n > 0x200) {
        n = 0x200;
    } else if (n < -0x200) {
        n = -0x200;
    }

    aExp += n - 1;
    aSig <<= 7;
    return normalizeRoundAndPackFloat32(aSign, aExp, aSig, status);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdx, %rsi
callq 0x91e7
movl %eax, %edx
andl $0x7fffff, %edx         # imm = 0x7FFFFF
movl %eax, %ecx
shrl $0x17, %ecx
testb %cl, %cl
je 0x13158
movzbl %cl, %esi
cmpl $0xff, %esi
jne 0x13161
testl %edx, %edx
je 0x131a5
movl %eax, %edi
movl %eax, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xa3b6
testl %edx, %edx
je 0x131a5
pushq $0x1
popq %rcx
jmp 0x1316a
movzbl %cl, %ecx
orl $0x800000, %edx         # imm = 0x800000
shrl $0x1f, %eax
cmpl $0xfffffe01, %ebp       # imm = 0xFFFFFE01
movl $0xfffffe00, %esi       # imm = 0xFFFFFE00
cmovgel %ebp, %esi
decl %esi
cmpl $0x201, %ebp            # imm = 0x201
movl $0x1ff, %edi            # imm = 0x1FF
cmovll %esi, %edi
addl %ecx, %edi
shll $0x7, %edx
movswq %di, %rsi
movzbl %al, %edi
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9270
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/softfloat.c
// Function: float64_scalbn
float64 float64_scalbn(float64 a, int n, float_status *status)
{
    flag aSign;
    int16_t aExp;
    uint64_t aSig;

    a = float64_squash_input_denormal(a, status);
    aSig = extractFloat64Frac( a );
    aExp = extractFloat64Exp( a );
    aSign = extractFloat64Sign( a );

    if ( aExp == 0x7FF ) {
        if ( aSig ) {
            return propagateFloat64NaN(a, a, status);
        }
        return a;
    }
    if (aExp != 0) {
        aSig |= LIT64( 0x0010000000000000 );
    } else if (aSig == 0) {
        return a;
    } else {
        aExp++;
    }

    if (n > 0x1000) {
        n = 0x1000;
    } else if (n < -0x1000) {
        n = -0x1000;
    }

    aExp += n - 1;
    aSig <<= 10;
    return normalizeRoundAndPackFloat64(aSign, aExp, aSig, status);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movabsq $0xfffffffffffff, %r14  # imm = 0xFFFFFFFFFFFFF
movq %rdx, %rsi
callq 0x920d
movq %rax, %rdx
andq %r14, %rdx
movq %rax, %rcx
shrq $0x34, %rcx
andq $0x7ff, %rcx            # imm = 0x7FF
je 0x131fc
cmpl $0x7ff, %ecx            # imm = 0x7FF
jne 0x13206
testq %rdx, %rdx
je 0x13247
movq %rax, %rdi
movq %rax, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0xcb8c
testq %rdx, %rdx
je 0x13247
pushq $0x1
popq %rcx
jmp 0x1320c
addq %r14, %rdx
incq %rdx
shrq $0x3f, %rax
cmpl $0xfffff001, %ebp       # imm = 0xFFFFF001
movl $0xfffff000, %esi       # imm = 0xFFFFF000
cmovgel %ebp, %esi
decl %esi
cmpl $0x1001, %ebp           # imm = 0x1001
movl $0xfff, %edi            # imm = 0xFFF
cmovll %esi, %edi
addl %ecx, %edi
shlq $0xa, %rdx
movswq %di, %rsi
movzbl %al, %edi
movq %rbx, %rcx
popq %rbx
popq %r14
popq %rbp
jmp 0x9591
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/softfloat.c
// Function: floatx80_scalbn
floatx80 floatx80_scalbn(floatx80 a, int n, float_status *status)
{
    flag aSign;
    int32_t aExp;
    uint64_t aSig;

    aSig = extractFloatx80Frac( a );
    aExp = extractFloatx80Exp( a );
    aSign = extractFloatx80Sign( a );

    if ( aExp == 0x7FFF ) {
        if ( aSig<<1 ) {
            return propagateFloatx80NaN(a, a, status);
        }
        return a;
    }

    if (aExp == 0) {
        if (aSig == 0) {
            return a;
        }
        aExp++;
    }

    if (n > 0x10000) {
        n = 0x10000;
    } else if (n < -0x10000) {
        n = -0x10000;
    }

    aExp += n;
    return normalizeRoundAndPackFloatx80(status->floatx80_rounding_precision,
                                         aSign, aExp, aSig, 0, status);
}

// Assembly:
pushq %rax
movq %rcx, %r9
movq %rdi, %rax
movl %esi, %edi
andl $0x7fff, %edi           # imm = 0x7FFF
je 0x13284
cmpl $0x7fff, %edi           # imm = 0x7FFF
jne 0x1328c
leaq (,%rax,2), %rcx
testq %rcx, %rcx
je 0x132c4
movq %rax, %rdi
movq %rax, %rdx
movl %esi, %ecx
movq %r9, %r8
callq 0xec53
jmp 0x132c2
testq %rax, %rax
je 0x132c8
pushq $0x1
popq %rdi
movzwl %si, %esi
shrl $0xf, %esi
cmpl $0xffff0001, %edx       # imm = 0xFFFF0001
movl $0xffff0000, %ecx       # imm = 0xFFFF0000
cmovgel %edx, %ecx
movl $0x10000, %edx          # imm = 0x10000
cmpl %edx, %ecx
cmovgel %edx, %ecx
addl %edi, %ecx
movsbl 0x3(%r9), %edi
movzbl %sil, %esi
movl %ecx, %edx
movq %rax, %rcx
xorl %r8d, %r8d
callq 0xfb10
movl %edx, %esi
movl %esi, %edx
popq %rcx
retq
xorl %eax, %eax
jmp 0x132c4
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/softfloat.c
// Function: float128_scalbn
float128 float128_scalbn(float128 a, int n, float_status *status)
{
    flag aSign;
    int32_t aExp;
    uint64_t aSig0, aSig1;

    aSig1 = extractFloat128Frac1( a );
    aSig0 = extractFloat128Frac0( a );
    aExp = extractFloat128Exp( a );
    aSign = extractFloat128Sign( a );
    if ( aExp == 0x7FFF ) {
        if ( aSig0 | aSig1 ) {
            return propagateFloat128NaN(a, a, status);
        }
        return a;
    }
    if (aExp != 0) {
        aSig0 |= LIT64( 0x0001000000000000 );
    } else if (aSig0 == 0 && aSig1 == 0) {
        return a;
    } else {
        aExp++;
    }

    if (n > 0x10000) {
        n = 0x10000;
    } else if (n < -0x10000) {
        n = -0x10000;
    }

    aExp += n - 1;
    return normalizeRoundAndPackFloat128( aSign, aExp, aSig0, aSig1
                                         , status);

}

// Assembly:
pushq %rax
movq %rcx, %r8
movl %edx, %ecx
movq %rsi, %r9
movq %rdi, %rax
movabsq $0xffffffffffff, %rsi   # imm = 0xFFFFFFFFFFFF
movq %r9, %rdx
andq %rsi, %rdx
movq %r9, %rdi
shrq $0x30, %rdi
andl $0x7fff, %edi           # imm = 0x7FFF
je 0x13317
cmpl $0x7fff, %edi           # imm = 0x7FFF
jne 0x13323
orq %rax, %rdx
je 0x13365
movq %rax, %rdi
movq %r9, %rsi
movq %rax, %rdx
movq %r9, %rcx
callq 0x10ca1
jmp 0x13362
movq %rdx, %rsi
orq %rax, %rsi
jne 0x1332b
xorl %eax, %eax
jmp 0x13365
addq %rsi, %rdx
incq %rdx
jmp 0x1332e
pushq $0x1
popq %rdi
shrq $0x3f, %r9
cmpl $0xffff0001, %ecx       # imm = 0xFFFF0001
movl $0xffff0000, %r10d      # imm = 0xFFFF0000
cmovgel %ecx, %r10d
decl %r10d
cmpl $0x10001, %ecx          # imm = 0x10001
movl $0xffff, %esi           # imm = 0xFFFF
cmovll %r10d, %esi
addl %edi, %esi
movzbl %r9b, %edi
movq %rax, %rcx
callq 0x98e4
movq %rdx, %r9
movq %r9, %rdx
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/simh[P]simtools/converters/noff/noff.c
// Function: main
int main (int argc, char *argv[])
{
int i, c, ffc;
char *ppos, oline[256], oname[256];
FILE *ifile, *ofile;

if ((argc < 2) || (argv[0] == NULL)) {
	printf ("Usage is: asc file [file...]\n");
	exit (0);  }

for (i = 1; i < argc; i++) {
	strcpy (oname, argv[i]);
        if (ppos = strrchr (oname, '.')) strcpy (ppos, ".new");
            else strcat (oname, ".new");
	ifile = fopen (argv[i], "ra");
	if (ifile == NULL) {
	    printf ("Error opening file: %s\n", argv[i]);
	    exit (0);  }
	ofile = fopen (oname, "wa");
	if (ofile == NULL) {
	    printf ("Error opening file: %s\n", oname);
	    exit (0);  }

	printf ("Processing file %s\n", argv[i]);
	for (ffc = 0; (c = fgetc (ifile)) != EOF; ) {
	    if (c == '\f') ffc++;
	    else fputc (c, ofile);
	    }
	if (ffc) printf ("Form feeds removed: %d\n", ffc);
	fclose (ifile);
	fclose (ofile);
	}
return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
cmpl $0x2, %edi
jl 0x1329
movq %rsi, %rbx
cmpq $0x0, (%rsi)
je 0x1329
movl %edi, %eax
movq %rax, 0x8(%rsp)
pushq $0x1
popq %r13
leaq 0x10(%rsp), %r14
cmpq 0x8(%rsp), %r13
je 0x12ee
movq (%rbx,%r13,8), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x1030
movq %r14, %rdi
pushq $0x2e
popq %rsi
callq 0x1080
testq %rax, %rax
je 0x123d
movb $0x0, 0x4(%rax)
movl $0x77656e2e, (%rax)     # imm = 0x77656E2E
movq (%rbx,%r13,8), %r15
jmp 0x1252
movq %r14, %rdi
callq 0x1060
movl $0x77656e2e, 0x10(%rsp,%rax) # imm = 0x77656E2E
movb $0x0, 0x14(%rsp,%rax)
movq %r15, %rdi
leaq 0xdad(%rip), %rsi       # 0x2009
callq 0x10b0
testq %rax, %rax
je 0x1302
movq %rax, %rbp
movq %r14, %rdi
leaq 0xdad(%rip), %rsi       # 0x2024
callq 0x10b0
testq %rax, %rax
je 0x130f
movq %rax, %r15
movq (%rbx,%r13,8), %rsi
xorl %r12d, %r12d
leaq 0xd91(%rip), %rdi       # 0x2027
xorl %eax, %eax
callq 0x1070
movq %rbp, %rdi
callq 0x1090
cmpl $-0x1, %eax
je 0x12c0
cmpl $0xc, %eax
je 0x12bb
movl %eax, %edi
movq %r15, %rsi
callq 0x10a0
jmp 0x129d
incl %r12d
jmp 0x129d
testl %r12d, %r12d
je 0x12d6
leaq 0xd6f(%rip), %rdi       # 0x203b
movl %r12d, %esi
xorl %eax, %eax
callq 0x1070
movq %rbp, %rdi
callq 0x1050
movq %r15, %rdi
callq 0x1050
incq %r13
jmp 0x1203
xorl %eax, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx,%r13,8), %rsi
leaq 0xcff(%rip), %rdi       # 0x200c
jmp 0x131b
leaq 0xcf6(%rip), %rdi       # 0x200c
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x1070
xorl %edi, %edi
callq 0x10c0
leaq 0xd23(%rip), %rdi       # 0x2053
callq 0x1040
jmp 0x1322
// File: /workspace/github_c_makefile_star2_O2/vanhauser-thc[P]vulntest/strcpy2.c
// Function: main
int main(int argc, char *argv[]) {
  char buf[16] = "";
  char *in = argv[1], *out = buf;

  if (argc > 1) {
    while (*in != 0) {
      *out++ = *in++;
    }
    *out = 0;
  }
  (void)printf(buf);

  return 0;
}

// Assembly:
subq $0x18, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
cmpl $0x2, %edi
jl 0x1165
movq 0x8(%rsi), %rcx
xorl %eax, %eax
movb (%rcx,%rax), %dl
testb %dl, %dl
je 0x1161
movb %dl, (%rsp,%rax)
incq %rax
jmp 0x1152
movb $0x0, (%rsp,%rax)
movq %rsp, %rdi
xorl %eax, %eax
callq 0x1030
xorl %eax, %eax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/giometti[P]mastering_UNIX_programming/chapter_04/access.c
// Function: main
int main(int argc, char *argv[])
{
	int ret;

	if (argc < 2) {
		fprintf(stderr, "usage: %s <file>\n", argv[0]);
		return -1;
	}

	printf("%s: ", argv[1]);
	ret = access(argv[1], F_OK);
	if (ret < 0) {
		perror("access");
		return -1;
	}
	ret = access(argv[1], R_OK);
	if (ret == 0)
		printf("r");
	ret = access(argv[1], W_OK);
	if (ret == 0)
		printf("w");
	ret = access(argv[1], X_OK);
	if (ret == 0)
		printf("x");
	printf("\n");

	return 0;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
cmpl $0x1, %edi
jle 0x11fa
movq 0x8(%rbx), %rsi
leaq 0xe86(%rip), %rdi       # 0x2016
xorl %eax, %eax
callq 0x1040
movq 0x8(%rbx), %rdi
xorl %esi, %esi
callq 0x1060
testl %eax, %eax
js 0x1217
movq 0x8(%rbx), %rdi
pushq $0x4
popq %rsi
callq 0x1060
testl %eax, %eax
jne 0x11be
pushq $0x72
popq %rdi
callq 0x1030
movq 0x8(%rbx), %rdi
pushq $0x2
popq %rsi
callq 0x1060
testl %eax, %eax
jne 0x11d6
pushq $0x77
popq %rdi
callq 0x1030
movq 0x8(%rbx), %rdi
pushq $0x1
popq %rsi
callq 0x1060
testl %eax, %eax
jne 0x11ee
pushq $0x78
popq %rdi
callq 0x1030
pushq $0xa
popq %rdi
callq 0x1030
xorl %eax, %eax
popq %rbx
retq
movq 0x2df7(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0xdf6(%rip), %rsi       # 0x2004
xorl %eax, %eax
callq 0x1050
jmp 0x1223
leaq 0xdfd(%rip), %rdi       # 0x201b
callq 0x1070
pushq $-0x1
popq %rax
jmp 0x11f8
// File: /workspace/github_c_makefile_star2_O2/antonblanchard[P]will-it-scale/tests/mmap2.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	char tmpfile[] = "/tmp/willitscale.XXXXXX";
	int fd = mkstemp(tmpfile);

	assert(ftruncate(fd, MEMSIZE) == 0);
	unlink(tmpfile);

	while (1) {
		char *c = mmap(NULL, MEMSIZE, PROT_READ|PROT_WRITE,
			       MAP_PRIVATE, fd, 0);
		assert(c != MAP_FAILED);
		munmap(c, MEMSIZE);

		(*iterations)++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movaps 0x7bc(%rip), %xmm0      # 0x3300
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movabsq $0x5858585858582e, %rax # imm = 0x5858585858582E
movq %rax, 0x10(%rdi)
callq 0x21c0
movl %eax, %ebp
movl $0x8000000, %esi        # imm = 0x8000000
movl %eax, %edi
callq 0x2110
testl %eax, %eax
jne 0x2baf
movq %rsp, %rdi
callq 0x2080
pushq $0x3
popq %r14
pushq $0x2
popq %r15
movl $0x8000000, %esi        # imm = 0x8000000
xorl %edi, %edi
movl %r14d, %edx
movl %r15d, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x20e0
cmpq $-0x1, %rax
je 0x2bc8
movl $0x8000000, %esi        # imm = 0x8000000
movq %rax, %rdi
callq 0x21d0
incq (%rbx)
jmp 0x2b7f
leaq 0x6d5(%rip), %rdi       # 0x328b
leaq 0x6ea(%rip), %rsi       # 0x32a7
leaq 0x6f1(%rip), %rcx       # 0x32b5
pushq $0x10
jmp 0x2bdf
leaq 0x719(%rip), %rdi       # 0x32e8
leaq 0x6d1(%rip), %rsi       # 0x32a7
leaq 0x6d8(%rip), %rcx       # 0x32b5
pushq $0x16
popq %rdx
callq 0x2120
// File: /workspace/github_c_makefile_star2_O2/diaxen[P]fft-garden/./sr_bf.h
// Function: sr_dit_bf4_pi4
static inline void
sr_dit_bf4_pi4(unsigned s,
           complex double * restrict out)
{
  complex double a = out[0];
  complex double b = out[s];
  complex double c = out[s * 2];
  complex double d = out[s * 3];

  double rc   = M_SQRT1_2 * creal(c);
  double rd   = M_SQRT1_2 * creal(d);
  double ic   = M_SQRT1_2 * cimag(c);
  double id   = M_SQRT1_2 * cimag(d);
  double wcr  = ic + rc;
  double wci  = ic - rc;
  double wdr  = -rd + id;
  double wdi  = -rd - id;
  double rsu  = wcr + wdr;
  double rsb  = wcr - wdr;
  double isu  = wci + wdi;
  double isb  = wci - wdi;

  out[0]     = CMPLX(creal(a) + rsu, cimag(a) + isu);
  out[s]     = CMPLX(creal(b) + isb, cimag(b) - rsb);
  out[s * 2] = CMPLX(creal(a) - rsu, cimag(a) - isu);
  out[s * 3] = CMPLX(creal(b) - isb, cimag(b) + rsb);
}

// Assembly:
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
movl %edi, %eax
shlq $0x4, %rax
movsd (%rsi,%rax), %xmm2
movsd 0x8(%rsi,%rax), %xmm3
leal (%rdi,%rdi), %edx
shlq $0x4, %rdx
leal (%rdi,%rdi,2), %ecx
shlq $0x4, %rcx
movsd (%rsi,%rcx), %xmm6
movsd 0x13d0(%rip), %xmm7     # 0x3258
movsd (%rsi,%rdx), %xmm8
mulsd %xmm7, %xmm8
movsd 0x8(%rsi,%rdx), %xmm4
mulsd %xmm7, %xmm4
mulsd 0x8(%rsi,%rcx), %xmm7
movapd %xmm8, %xmm5
addsd %xmm4, %xmm5
subsd %xmm8, %xmm4
mulsd 0x13a7(%rip), %xmm6     # 0x3260
movapd %xmm6, %xmm8
addsd %xmm7, %xmm8
subsd %xmm7, %xmm6
movapd %xmm5, %xmm7
addsd %xmm8, %xmm7
subsd %xmm8, %xmm5
movapd %xmm4, %xmm8
addsd %xmm6, %xmm8
subsd %xmm6, %xmm4
movapd %xmm0, %xmm6
addsd %xmm7, %xmm6
movapd %xmm1, %xmm9
addsd %xmm8, %xmm9
movsd %xmm6, (%rsi)
movsd %xmm9, 0x8(%rsi)
movapd %xmm2, %xmm6
addsd %xmm4, %xmm6
movapd %xmm3, %xmm9
subsd %xmm5, %xmm9
movsd %xmm6, (%rsi,%rax)
movsd %xmm9, 0x8(%rsi,%rax)
subsd %xmm7, %xmm0
subsd %xmm8, %xmm1
movsd %xmm0, (%rsi,%rdx)
movsd %xmm1, 0x8(%rsi,%rdx)
subsd %xmm4, %xmm2
addsd %xmm3, %xmm5
movsd %xmm2, (%rsi,%rcx)
movsd %xmm5, 0x8(%rsi,%rcx)
retq
// File: /workspace/github_c_makefile_star2_O2/Sidd0107[P]EXT2-File-System/a3helper.c
// Function: combine_path_and_file
char *combine_path_and_file(char *path, char *file_name){
	int copy_location = 0;
	if(path[strlen(path) - 1] != '/'){
		copy_location = 1;
	}
	char *string = malloc((strlen(path) + strlen(file_name) + 1 + copy_location) * sizeof(char));
	if(!string){
		perror("malloc");
		exit(1);
	}
	memcpy(string, path, strlen(path));
	string[strlen(path)] = '/';
	memcpy(string + strlen(path) + copy_location, file_name, strlen(file_name));
	string[strlen(path) + strlen(file_name) + copy_location] = '\0';
	return string;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %r15
callq 0x1070
movq %rax, %rbx
xorl %r14d, %r14d
cmpb $0x2f, -0x1(%r15,%rax)
setne %r14b
movq %r12, -0x30(%rbp)
movq %r12, %rdi
callq 0x1070
movq %rax, %r12
addq %rbx, %rax
leaq (%r14,%rax), %rdi
incq %rdi
callq 0x10f0
testq %rax, %rax
je 0x12d3
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x10e0
movq %r15, %rdi
callq 0x1070
movb $0x2f, (%r13,%rax)
addq %rax, %r14
addq %r13, %r14
movq %r14, %rdi
movq -0x30(%rbp), %rsi
movq %r12, %rdx
callq 0x10e0
movb $0x0, (%r12,%r14)
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1d2a(%rip), %rdi      # 0x3004
callq 0x1110
pushq $0x1
popq %rdi
callq 0x1120
// File: /workspace/github_c_makefile_star2_O2/Sidd0107[P]EXT2-File-System/a3helper.c
// Function: file_exists
int file_exists(char *path, char *inode_base, char *file_name){
	char *string = combine_path_and_file(path, file_name);
	struct basic_fileinfo fileinfo = find_file(string, inode_base);
	free(string);
	return fileinfo.inode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdx, %rsi
callq 0x123c
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x131d
movq %rax, %rbx
shrq $0x20, %rbx
movq %r14, %rdi
callq 0x1030
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Sidd0107[P]EXT2-File-System/a3helper.c
// Function: find_file
struct basic_fileinfo find_file(char *path, char *inode_base){
	struct basic_fileinfo file_info;
	file_info.type = '\0'; //default
	file_info.inode = 0;
	if(path[0] == '\0'){
		return file_info; //perhaps an error goes here?
	}
	else if (path[0] == '/' && path[1] == '\0'){
		file_info.type = 'd';
		file_info.inode = 2;
		return file_info;
	}
	struct parsed_filename *directory_linked_list = parse_directory(path);
	if(!directory_linked_list){
		return file_info;
	}
	return search_directory(inode_base, 2, directory_linked_list);
}

// Assembly:
movzbl (%rdi), %eax
testl %eax, %eax
je 0x136b
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x2f, %eax
jne 0x1338
cmpb $0x0, 0x1(%rdi)
je 0x1379
callq 0x1395
testq %rax, %rax
je 0x1373
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x1464
movq %rax, %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
andq %rax, %rdx
movzbl %cl, %eax
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
jmp 0x1388
movq %rax, %rdx
movq %rax, %rcx
jmp 0x138e
xorl %eax, %eax
xorl %edx, %edx
jmp 0x1386
movabsq $0x200000000, %rdx      # imm = 0x200000000
pushq $0x64
popq %rax
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
orq %rdx, %rax
orq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/Sidd0107[P]EXT2-File-System/a3helper.c
// Function: parse_directory
struct parsed_filename *parse_directory(char *path){
	if (path[0] != '/' || path[1] == '\0'){
		return NULL;
	}
	
	int i = 1;
	while (path[i] != '\0' && path[i] != '/'){
		i++;
	}
	
	struct parsed_filename *current_directory_filename = malloc(sizeof(struct parsed_filename));
	
	if(!current_directory_filename){
		perror("malloc for current directory filename");
   	}
	
	current_directory_filename -> file_name = malloc((i)*sizeof(char));
	if(!current_directory_filename -> file_name){
		perror("malloc for string in current directory struct");
		exit(1);
	}
	
	strncpy(current_directory_filename -> file_name, path + 1, i-1);
	current_directory_filename -> file_name[i-1] = '\0';
	
	current_directory_filename -> next = parse_directory(path + i);
	
	return current_directory_filename;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x2f, (%rdi)
jne 0x13e4
movq %rdi, %rbx
movb 0x1(%rdi), %al
testb %al, %al
je 0x13e4
incq %rbx
pushq $0x1
popq %r12
xorl %r14d, %r14d
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %rbx, %r15
testb %al, %al
je 0x13e9
movzbl %al, %eax
cmpl $0x2f, %eax
je 0x13e9
incq %r12
movb 0x1(%r15), %al
incq %r15
addq %rcx, %r14
jmp 0x13c9
xorl %r13d, %r13d
jmp 0x1430
pushq $0x10
popq %rdi
callq 0x10f0
movq %rax, %r13
testq %rax, %rax
je 0x1442
movq %r12, %rdi
callq 0x10f0
movq %rax, (%r13)
testq %rax, %rax
je 0x1450
movq %rax, %r12
sarq $0x20, %r14
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1050
movb $0x0, (%r12,%r14)
movq %r15, %rdi
callq 0x1395
movq %rax, 0x8(%r13)
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1bc2(%rip), %rdi      # 0x300b
callq 0x1110
jmp 0x13f9
leaq 0x1bda(%rip), %rdi      # 0x3031
callq 0x1110
pushq $0x1
popq %rdi
callq 0x1120
// File: /workspace/github_c_makefile_star2_O2/Sidd0107[P]EXT2-File-System/a3helper.c
// Function: get_block_from_inode
char *get_block_from_inode(char *inode_base, unsigned int inode_num, unsigned int inode_index){
	struct ext2_inode *current_inode;
	current_inode = get_inode(inode_base, inode_num);
	if (inode_index < 12){
		return get_block(disk, current_inode -> i_block[inode_index], 1024);
	}
	//assuming up to single indirect pointers!
	else{
		unsigned int *indirect_pointer_block = (unsigned int*) get_block(disk, current_inode -> i_block[12], 1024);
		return get_block(disk, indirect_pointer_block[inode_index - 12], 1024);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
decl %esi
shlq $0x7, %rsi
addq %rdi, %rsi
leaq 0x3a7d(%rip), %rax      # 0x50b8
movq (%rax), %rax
cmpl $0xb, %edx
ja 0x164f
movl %edx, %ecx
leaq (%rsi,%rcx,4), %rcx
addq $0x28, %rcx
jmp 0x1660
movl 0x58(%rsi), %ecx
shlq $0xa, %rcx
addq %rax, %rcx
addl $-0xc, %edx
leaq (%rcx,%rdx,4), %rcx
movl (%rcx), %ecx
shlq $0xa, %rcx
addq %rcx, %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Sidd0107[P]EXT2-File-System/a3helper.c
// Function: add_block_in_inode
int add_block_in_inode(struct ext2_inode *current_inode, char *block_bitmap, unsigned int inode_num){
	unsigned int new_inode_block_index = (current_inode -> i_size > 0)? ((((current_inode -> i_size) - 1) >> 10) + 1) : 0;
	if (new_inode_block_index >= 1024+12) {
		return -1;
	}
	int new_block = find_last_free_bit(block_bitmap, 128);
	if(new_block == -1){
		return -1;
	}
	set_bit(block_bitmap, new_block);
	if (new_inode_block_index <= 12) {
		current_inode -> i_block[new_inode_block_index] = new_block + 1;
		set_bit(block_bitmap, new_block);
	}
	if(new_inode_block_index == 12) {
		new_block = find_first_free_bit(block_bitmap, 0, 128);
		if(new_block == -1){
			unset_bit(block_bitmap, current_inode -> i_block[12] - 1);
			return -1;
		}
	}
	if(new_inode_block_index >= 12) {
		unsigned int *indirect_pointer_block = (unsigned int*) get_block(disk, current_inode -> i_block[12], 1024);
		indirect_pointer_block[new_inode_block_index - 12] = new_block + 1;
		set_bit(block_bitmap, new_block);
	}
	current_inode -> i_size += 1024;
	current_inode -> i_blocks += 2;
	return new_block + 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x4(%rdi), %eax
leal -0x1(%rax), %ecx
shrl $0xa, %ecx
incl %ecx
xorl %r13d, %r13d
cmpl $0x1, %eax
cmovael %ecx, %r13d
pushq $-0x1
popq %r15
cmpl $0x40b, %r13d           # imm = 0x40B
ja 0x174d
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movl $0x80, %esi
callq 0x177e
cmpl $-0x1, %eax
je 0x174d
movl %eax, %edx
shrl $0x3, %edx
movl %eax, %ecx
andb $0x7, %cl
pushq $0x1
popq %r12
movl %r12d, %esi
shll %cl, %esi
orb %sil, (%rbx,%rdx)
cmpl $0xd, %r13d
jae 0x1710
incl %eax
movl %r13d, %ecx
movl %eax, 0x28(%r14,%rcx,4)
orb %sil, (%rbx,%rdx)
cmpl $0xc, %r13d
jne 0x173d
movq %rbx, %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x17c7
cmpl $-0x1, %eax
je 0x175f
movl %eax, %ecx
andb $0x7, %cl
shll %cl, %r12d
pushq $0xc
popq %rcx
movl %r12d, %esi
jmp 0x1713
movl %r13d, %ecx
leaq 0x399e(%rip), %rdx      # 0x50b8
movl 0x58(%r14), %edi
shlq $0xa, %rdi
addq (%rdx), %rdi
leal 0x1(%rax), %r8d
movl %r8d, -0x30(%rdi,%rcx,4)
pushq $0x8
popq %rcx
cltd
idivl %ecx
cltq
orb %sil, (%rbx,%rax)
movl %r8d, %eax
addl $0x400, 0x4(%r14)       # imm = 0x400
addl $0x2, 0x1c(%r14)
movl %eax, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x58(%r14), %ecx
decl %ecx
pushq $0x8
popq %rsi
movl %ecx, %eax
cltd
idivl %esi
cltq
andb $0x7, %cl
shll %cl, %r12d
notb %r12b
andb %r12b, (%rbx,%rax)
jmp 0x174d
// File: /workspace/github_c_makefile_star2_O2/Sidd0107[P]EXT2-File-System/a3helper.c
// Function: find_last_free_bit
int find_last_free_bit(char *bitmap, int num_bits){
	int i;
	for(i = num_bits; i >= 0; i--){
		if (!(*(bitmap+(i/8)) & (1<<(i%8)))){
			return i;
		}
	}
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %esi, %esi
js 0x17a4
movl %esi, %ecx
shrl $0x3, %ecx
movzbl (%rdi,%rcx), %ecx
movl %esi, %edx
andl $0x7, %edx
btl %edx, %ecx
jae 0x17a2
decl %esi
jmp 0x1787
movl %esi, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Sidd0107[P]EXT2-File-System/a3helper.c
// Function: find_first_free_bit
int find_first_free_bit(char *bitmap, int startbit, int bitmap_num_bits){
	int i;
	for (i = startbit; i < bitmap_num_bits; i++){
		if (!(*(bitmap+(i/8)) & (1<<(i%8)))){
			return i;
		}
	}
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edx, %r8d
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x8, %r9d
cmpl %r8d, %esi
jge 0x17fa
movl %esi, %eax
cltd
idivl %r9d
cltq
movzbl (%rdi,%rax), %eax
movl %esi, %edx
andl $0x7, %edx
btl %edx, %eax
jae 0x17f8
incl %esi
jmp 0x17d9
movl %esi, %ecx
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Sidd0107[P]EXT2-File-System/a3helper.c
// Function: set_inode
void set_inode(struct ext2_inode *inode, unsigned int inode_num, unsigned int size, unsigned *blocks, int num_blocks, char *block_bitmap, char *inode_bitmap, unsigned int mode){
	set_bit(inode_bitmap, inode_num);
	unsigned int i;
	inode -> i_size = size;
	inode -> i_blocks = (inode -> i_size > 0)? 2*((inode -> i_size - 1)/ 1024) + 2: 0;
	if(inode -> i_blocks >= 25){
		inode -> i_blocks += 2;
	}
	inode -> i_mode = 0x1ff | mode;
	if(num_blocks > 12){
		inode -> i_block[12] = blocks[num_blocks - 1] + 1;
		set_bit(block_bitmap, blocks[num_blocks - 1]);
	}
	for(i = 0; i < ((num_blocks <= 12)? num_blocks : num_blocks - 1); i++){
		set_block_in_inode(inode, blocks[i] + 1, i, block_bitmap);
	}
	inode -> i_links_count = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movl %r8d, %r14d
movq %rcx, %r15
movl %edx, %r8d
movl %esi, %ecx
leal -0x1(%r8), %eax
shrl $0xa, %eax
xorl %edx, %edx
cmpl $0x1, %r8d
movq 0x10(%rbp), %r10
leal 0x2(%rax,%rax), %r11d
cmovbl %edx, %r11d
pushq $0x8
popq %r9
movl %esi, %eax
cltd
idivl %r9d
andb $0x7, %cl
pushq $0x1
popq %rsi
movl %esi, %edx
shll %cl, %edx
cltq
orb %dl, (%r10,%rax)
movq %rdi, %r12
movl %r8d, 0x4(%rdi)
leal 0x2(%r11), %eax
cmpl $0x19, %r11d
cmovbl %r11d, %eax
movl %eax, 0x1c(%rdi)
movl $0x1ff, %eax            # imm = 0x1FF
orl 0x18(%rbp), %eax
movw %ax, (%rdi)
cmpl $0xd, %r14d
jl 0x18bd
movl %r14d, %eax
movl -0x4(%r15,%rax,4), %ecx
incl %ecx
movl %ecx, 0x58(%r12)
movl -0x4(%r15,%rax,4), %ecx
movl %ecx, %eax
cltd
idivl %r9d
andb $0x7, %cl
shll %cl, %esi
cltq
orb %sil, (%rbx,%rax)
xorl %eax, %eax
cmpl $0xd, %r14d
setge %al
subl %eax, %r14d
xorl %r13d, %r13d
cmpq %r13, %r14
je 0x18ea
movl (%r15,%r13,4), %esi
incl %esi
movq %r12, %rdi
movl %r13d, %edx
movq %rbx, %rcx
callq 0x1901
incq %r13
jmp 0x18cc
movw $0x1, 0x1a(%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Sidd0107[P]EXT2-File-System/a3helper.c
// Function: set_block_in_inode
void set_block_in_inode(struct ext2_inode* inode, unsigned block_number, unsigned inode_index, char *block_bitmap){
	if(inode_index < 12){
		inode -> i_block[inode_index] = block_number;
	}
	else{
		unsigned int* indirect_pointer_block = (unsigned int *) get_block(disk, inode -> i_block[12], 1024);
		indirect_pointer_block [inode_index - 12] = block_number;
	}
	set_bit(block_bitmap, block_number - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rcx, %r8
movl %esi, %ecx
cmpl $0xb, %edx
ja 0x191b
movl %edx, %eax
leaq (%rdi,%rax,4), %rax
addq $0x28, %rax
jmp 0x1933
leaq 0x3796(%rip), %rax      # 0x50b8
movl 0x58(%rdi), %esi
shlq $0xa, %rsi
addq (%rax), %rsi
addl $-0xc, %edx
leaq (%rsi,%rdx,4), %rax
movl %ecx, (%rax)
decl %ecx
movl $0x8, %esi
movl %ecx, %eax
cltd
idivl %esi
andb $0x7, %cl
movl $0x1, %edx
shll %cl, %edx
cltq
orb %dl, (%r8,%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Sidd0107[P]EXT2-File-System/a3helper.c
// Function: extract_filename
char *extract_filename(char *filename){
	int i = 0, last_separator = 0;
	while(filename[i] != '\0'){
		if(filename[i] == '/'){
			last_separator = i + 1;
		}
		i++;
	}
	char *file_name = malloc(strlen(filename + last_separator) + 1);
	if(!file_name){
		perror("malloc");
		exit(1);
	}
	memcpy(file_name, filename + last_separator, strlen(filename + last_separator) + 1);
	return file_name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x1(%rax), %rcx
movzbl -0x1(%rbx,%rcx), %edx
testl %edx, %edx
je 0x1b01
cmpl $0x2f, %edx
je 0x1afc
incq %rcx
jmp 0x1ae9
movq %rcx, %rax
jmp 0x1ae5
cltq
addq %rax, %rbx
movq %rbx, %rdi
callq 0x1070
movq %rax, %r14
incq %r14
movq %r14, %rdi
callq 0x10f0
testq %rax, %rax
je 0x1b33
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x10e0
leaq 0x14ca(%rip), %rdi      # 0x3004
callq 0x1110
pushq $0x1
popq %rdi
callq 0x1120
// File: /workspace/github_c_makefile_star2_O2/Sidd0107[P]EXT2-File-System/a3helper.c
// Function: print_directory_contents
void print_directory_contents(char *inode_base, unsigned int inode_num){
	int i;
	struct ext2_inode *current_inode = get_inode(inode_base, inode_num);
	unsigned int block_num = current_inode->i_block[0];
	unsigned int cur_index_serviced = 0, cur_inode_index = 0;
	char *current_block = get_block(disk, block_num, 1024);
	struct ext2_dir_entry_2 *current = (struct ext2_dir_entry_2 *)current_block;

	while(cur_index_serviced < current_inode -> i_size){
		current = (struct ext2_dir_entry_2 *) (current_block + (cur_index_serviced % 1024));
		for(i = 0; i < current -> name_len; i++){
			printf("%c", current -> name[i]);
		}
		printf("\n");
		cur_index_serviced += current -> rec_len;
		if (cur_index_serviced < current_inode->i_size && cur_index_serviced % 1024 == 0){
			cur_inode_index++;
			current_block = get_block_from_inode(inode_base, inode_num, cur_inode_index);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, -0x38(%rbp)
leal -0x1(%rsi), %ecx
shlq $0x7, %rcx
movl 0x28(%rdi,%rcx), %r12d
leaq 0x3549(%rip), %rax      # 0x50b8
shlq $0xa, %r12
addq (%rax), %r12
movq %rdi, %rbx
movq %rcx, -0x40(%rbp)
movl 0x4(%rdi,%rcx), %r15d
xorl %r13d, %r13d
movl $0x0, -0x2c(%rbp)
cmpl %r15d, %r13d
jae 0x1c00
movl %r13d, %r15d
andl $0x3ff, %r15d           # imm = 0x3FF
addq %r12, %r15
xorl %r14d, %r14d
movzbl 0x6(%r15), %eax
cmpq %rax, %r14
jae 0x1bbb
movsbl 0x8(%r15,%r14), %edi
callq 0x1040
incq %r14
jmp 0x1ba1
pushq $0xa
popq %rdi
callq 0x1040
movzwl 0x4(%r15), %eax
addl %eax, %r13d
movq -0x40(%rbp), %rax
movl 0x4(%rbx,%rax), %r15d
cmpl %r15d, %r13d
setae %al
testw $0x3ff, %r13w           # imm = 0x3FF
setne %cl
orb %al, %cl
jne 0x1b8c
movl -0x2c(%rbp), %edx
incl %edx
movq %rbx, %rdi
movq -0x38(%rbp), %rsi
movl %edx, -0x2c(%rbp)
callq 0x1627
movq %rax, %r12
jmp 0x1b8c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Sidd0107[P]EXT2-File-System/a3helper.c
// Function: free_inode
void free_inode(struct ext2_inode *current_inode, void *disk, char *blockbitmap){
    unsigned int i_size = current_inode->i_size;
    unsigned int blocks = (i_size > 0)? ((i_size-1) / 1024) + 1: 0;
    int block = 0;
    for(block=0; block<blocks; block++){
        //free's indirect blocks
        if(block>=12){
            unsigned int* indirect_pointer_block = (unsigned int *) get_block(disk, current_inode->i_block[12], 1024);
            //indirect_pointer_block [inode_index - 12] = block_number;
            
             unset_bit(blockbitmap, indirect_pointer_block[block - 12] - 1);
             //free(indirect_pointer_block[block - 12]);
            
        }else{
            //free's direct blocks
            unset_bit(blockbitmap, current_inode->i_block[block] - 1);
            //free(current_inode->i_block[block-1]);
        }
        
    }
	if(blocks > 12){
		unset_bit(blockbitmap, current_inode->i_block[12] - 1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r8
movl 0x4(%rdi), %eax
leal -0x1(%rax), %r10d
shrl $0xa, %r10d
incl %r10d
xorl %ebx, %ebx
cmpl $0x1, %eax
cmovbl %ebx, %r10d
leaq 0x28(%rdi), %r14
addq $-0x30, %rsi
movl $0x8, %r11d
movl $0x1, %r9d
cmpq %rbx, %r10
je 0x1c82
cmpq $0xc, %rbx
jb 0x1c5b
movl 0x58(%rdi), %eax
shlq $0xa, %rax
addq %rsi, %rax
jmp 0x1c5f
leaq (%r14,%rbx,4), %rax
movl (%rax), %ecx
decl %ecx
movl %ecx, %eax
cltd
idivl %r11d
cltq
andb $0x7, %cl
movl %r9d, %edx
shll %cl, %edx
notb %dl
andb %dl, (%r8,%rax)
incq %rbx
addq $0x4, %rsi
jmp 0x1c44
cmpl $0xd, %r10d
jb 0x1ca2
movl 0x58(%rdi), %ecx
decl %ecx
movl %ecx, %eax
cltd
idivl %r11d
cltq
andb $0x7, %cl
shll %cl, %r9d
notb %r9b
andb %r9b, (%r8,%rax)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/vampirefrog[P]x68ksjis/sjisstat.c
// Function: main
int main(int argc, char **argv) {
	FILE *in = stdin;

	uint8_t buf[1024];
	int last_byte = 0;
	int l;
	while((l = fread(buf, 1, 1024, in)) > 0) {
		for(int i = 0; i < l; i++) {
			uint8_t b = buf[i];
			if(last_byte == 0 && SJIS_FIRST_CHAR(b)) {
				last_byte = b;
			} else {
				push_charstat((last_byte << 8) | b);
				last_byte = 0;
			}
		}
	}

	qsort(stats, sizeof(stats) / sizeof(stats[0]), sizeof(stats[0]), cmpstatfn);

	for(int i = 0; i < 65536; i++) {
		if(stats[i].cnt == 0) break;
		int chr = stats[i].chr;
		char utfbuf[5];
		if(chr < 0x20) {
			snprintf(utfbuf, 5, "0x%02x", chr);
		} else {
			int l = utf8_encode(sjis_char_to_unicode(chr), utfbuf);
			utfbuf[l] = 0;
		}
		if(chr > 0xff)
			printf("0x%02x 0x%02x %d %s\n", chr >> 8, chr & 0xff, stats[i].cnt, utfbuf);
		else
			printf("     0x%02x %d %s\n", chr & 0xff, stats[i].cnt, utfbuf);
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq 0x15e03(%rip), %rax     # 0x16fe0
movq (%rax), %r14
xorl %r13d, %r13d
leaq 0x10(%rsp), %r15
pushq $0x1
popq %r12
leaq 0x15e8d(%rip), %rbx     # 0x17080
movl $0x400, %edx            # imm = 0x400
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rcx
callq 0x1050
testl %eax, %eax
jle 0x1272
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x11f3
movzbl 0x10(%rsp,%rcx), %edx
testl %r13d, %r13d
jne 0x1257
cmpb $-0x7b, %dl
setl %sil
leal 0x78(%rdx), %edi
cmpb $0x18, %dil
setb %dil
leal 0x20(%rdx), %r8d
cmpb $0xc, %r8b
setb %r8b
orb %dil, %r8b
movl %edx, %edi
andb $-0x4, %dil
cmpb $-0x10, %dil
sete %dil
orb %sil, %dil
orb %r8b, %dil
jne 0x126a
shll $0x8, %r13d
movzwl %r13w, %esi
orl %edx, %esi
movl %esi, (%rbx,%rsi,8)
incl 0x4(%rbx,%rsi,8)
xorl %edx, %edx
incq %rcx
movl %edx, %r13d
jmp 0x1211
leaq -0xbb(%rip), %rcx       # 0x11be
pushq $0x8
popq %rdx
movl $0x10000, %esi          # imm = 0x10000
movq %rbx, %rdi
callq 0x1040
leaq 0xb(%rsp), %r15
pushq $0x5
popq %r12
leaq 0x1d87(%rip), %r13      # 0x3020
xorl %r14d, %r14d
cmpq $0x10000, %r14          # imm = 0x10000
je 0x133d
cmpl $0x0, 0x4(%rbx,%r14,8)
je 0x133d
leaq (,%r14,8), %rax
movl (%rax,%rbx), %ebp
cmpl $0x1f, %ebp
jg 0x12dd
movq %r15, %rdi
movq %r12, %rsi
leaq 0x1d32(%rip), %rdx      # 0x3004
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1070
jmp 0x131f
movzwl %bp, %edi
callq 0x16ec
movl %eax, %edi
movq %r15, %rsi
callq 0x2654
cltq
movb $0x0, 0xb(%rsp,%rax)
cmpl $0x100, %ebp            # imm = 0x100
jb 0x131f
movl %ebp, %esi
shrl $0x8, %esi
movzbl %bpl, %edx
movl 0x4(%rbx,%r14,8), %ecx
leaq 0x1cf8(%rip), %rdi      # 0x300b
movq %r15, %r8
xorl %eax, %eax
callq 0x1060
jmp 0x1335
movzbl %bpl, %esi
movl 0x4(%rbx,%r14,8), %edx
movq %r13, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x1060
incq %r14
jmp 0x129c
xorl %eax, %eax
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/vampirefrog[P]x68ksjis/sjis.c
// Function: sjis_strlen
int sjis_strlen(uint8_t *data, int len) {
	int l = 0;
	for(int i = 0; i < len; i++) {
		l++;
		if(data[i] >= 0x80) {
			l++;
			i++;
		}
	}
	return l;
}

// Assembly:
xorl %eax, %eax
xorl %ecx, %ecx
cmpl %esi, %ecx
jge 0x137c
movslq %ecx, %rdx
movzbl (%rdi,%rdx), %edx
movl %edx, %r8d
shrb $0x7, %r8b
movzbl %r8b, %r8d
addl %r8d, %eax
incl %eax
shrl $0x7, %edx
addl %edx, %ecx
incl %ecx
jmp 0x1358
retq
// File: /workspace/github_c_makefile_star2_O2/vampirefrog[P]x68ksjis/sjis.c
// Function: sjis_to_utf8
int sjis_to_utf8(uint8_t *sjis_data, int sjis_len, uint8_t *utf8_data, int utf8_len) {
	if(sjis_len < 1) return 0;
	if(utf8_len < 1) return -1;

	int j = 0, last_byte = 0;
	for(int i = 0; i < sjis_len; i++) {
		uint8_t b = sjis_data[i];
		if(last_byte == 0 && SJIS_FIRST_CHAR(b)) {
			last_byte = b;
		} else {
			char buf[4];
			int l = utf8_encode(sjis_char_to_unicode((last_byte << 8) | b), buf);
			if(j + l >= utf8_len - 1)
				return j;
			strcpy((char *)utf8_data + j, buf);
			j += l;
			last_byte = 0;
		}
	}
	return j;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x8(%rsp)
testl %esi, %esi
jle 0x1441
testl %ecx, %ecx
jle 0x1445
movq %rdi, %r15
decl %ecx
movl %ecx, 0x4(%rsp)
movl %esi, %r12d
xorl %r14d, %r14d
leaq 0x14(%rsp), %rbx
xorl %ecx, %ecx
xorl %ebp, %ebp
cmpq %r14, %r12
je 0x1448
movzbl (%r15,%r14), %eax
testl %ecx, %ecx
jne 0x13fe
cmpb $-0x7b, %al
setl %dl
leal 0x78(%rax), %esi
cmpb $0x18, %sil
setb %sil
leal 0x20(%rax), %edi
cmpb $0xc, %dil
setb %dil
orb %sil, %dil
movl %eax, %esi
andb $-0x4, %sil
cmpb $-0x10, %sil
sete %sil
orb %dl, %sil
orb %dil, %sil
jne 0x1437
shll $0x8, %ecx
orl %eax, %ecx
movzwl %cx, %edi
callq 0x16ec
movl %eax, %edi
movq %rbx, %rsi
callq 0x2654
movl %eax, %r13d
addl %ebp, %r13d
cmpl 0x4(%rsp), %r13d
jge 0x1448
movslq %ebp, %rdi
addq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x1030
xorl %eax, %eax
movl %r13d, %ebp
incq %r14
movl %eax, %ecx
jmp 0x13b8
xorl %ebp, %ebp
jmp 0x1448
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/vampirefrog[P]x68ksjis/sjis.c
// Function: sjis_write_utf8
int sjis_write_utf8(FILE *f, uint8_t *sjis_data, int sjis_len) {
	if(sjis_len < 1) return 0;

	int j = 0, last_byte = 0;
	for(int i = 0; i < sjis_len; i++) {
		uint8_t b = sjis_data[i];
		if(last_byte == 0 && SJIS_FIRST_CHAR(b)) {
			last_byte = b;
		} else {
			char buf[4];
			int l = utf8_encode(sjis_char_to_unicode((last_byte << 8) | b), buf);
			if(l) fwrite(buf, l, 1, f);
			j += l;
			last_byte = 0;
		}
	}

	return j;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
testl %edx, %edx
jle 0x151a
movq %rsi, %rbx
movl %edx, %r12d
xorl %r14d, %r14d
leaq 0x14(%rsp), %r15
xorl %eax, %eax
xorl %ebp, %ebp
cmpq %r14, %r12
je 0x151c
movzbl (%rbx,%r14), %ecx
testl %eax, %eax
jne 0x14dd
cmpb $-0x7b, %cl
setl %dl
leal 0x78(%rcx), %esi
cmpb $0x18, %sil
setb %sil
leal 0x20(%rcx), %edi
cmpb $0xc, %dil
setb %dil
orb %sil, %dil
movl %ecx, %esi
andb $-0x4, %sil
cmpb $-0x10, %sil
sete %sil
orb %dl, %sil
orb %dil, %sil
jne 0x1513
shll $0x8, %eax
orl %ecx, %eax
movzwl %ax, %edi
callq 0x16ec
movl %eax, %edi
movq %r15, %rsi
callq 0x2654
movl %eax, %r13d
testl %eax, %eax
je 0x150e
movslq %r13d, %rsi
movq %r15, %rdi
pushq $0x1
popq %rdx
movq 0x8(%rsp), %rcx
callq 0x10a0
addl %r13d, %ebp
xorl %ecx, %ecx
incq %r14
movl %ecx, %eax
jmp 0x149a
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/vampirefrog[P]x68ksjis/sjis.c
// Function: sjis_fputc
int sjis_fputc(int sjis, FILE *f) {
	uint8_t b = (sjis >> 8) & 0xff;
	if(SJIS_FIRST_CHAR(b))
		fputc(b, f); // TODO: error check
	return fputc(sjis & 0xff, f);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebx
movzbl %bh, %edi
movl %ebx, %eax
andl $0xfc00, %eax           # imm = 0xFC00
cmpl $0xf000, %eax           # imm = 0xF000
je 0x1565
leal -0x80(%rdi), %eax
cmpl $0x5, %eax
jb 0x1565
leal -0x88(%rdi), %eax
cmpl $0x18, %eax
jb 0x1565
leal -0xe0(%rdi), %eax
cmpl $0xb, %eax
ja 0x156d
movq %r14, %rsi
callq 0x1090
movzbl %bl, %edi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1090
// File: /workspace/github_c_makefile_star2_O2/vampirefrog[P]x68ksjis/sjis.c
// Function: sjis_fgetc
int sjis_fgetc(FILE *f) {
	int b = fgetc(f);
	if(b == EOF) return EOF;
	if(!SJIS_FIRST_CHAR(b))
		return b;

	int b2 = fgetc(f);
	if(b2 == EOF) return EOF;
	return b << 8 | b2;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x1080
cmpl $-0x1, %eax
je 0x15c9
movl %eax, %ebx
andl $-0x4, %eax
cmpl $0xf0, %eax
je 0x15ba
leal -0xe0(%rbx), %eax
cmpl $0xc, %eax
jb 0x15ba
leal -0x80(%rbx), %eax
cmpl $0x5, %eax
jb 0x15ba
leal -0x88(%rbx), %eax
cmpl $0x17, %eax
ja 0x15cc
movq %r14, %rdi
callq 0x1080
shll $0x8, %ebx
orl %eax, %ebx
jmp 0x15cc
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/vampirefrog[P]x68ksjis/sjis.c
// Function: jis_to_sjis
uint16_t jis_to_sjis(uint16_t val) {
	uint8_t j2 = val & 0xff;
	uint8_t j1 = val >> 8;
	uint8_t s1, s2;
	if(33 <= j1 && j1 <= 94)
		s1 = (j1 + 1) / 2 + 112;
	else
		s1 = (j1 + 1) / 2 + 176;
	if(j1 & 1)
		s2 = j2 + 31 + (j2 / 96);
	else
		s2 = j2 + 126;

	return (s1 << 8) | s2;
}

// Assembly:
btl $0x8, %edi
jb 0x15e1
leal 0x7e(%rdi), %eax
jmp 0x15f1
movzbl %dil, %eax
movb $0x60, %cl
divb %cl
movzbl %al, %eax
addl %edi, %eax
addl $0x1f, %eax
movzwl %di, %ecx
shrl $0x8, %ecx
incl %ecx
shrl %ecx
leal -0x2100(%rdi), %edx
xorl %esi, %esi
cmpw $0x3e00, %dx            # imm = 0x3E00
setae %sil
shll $0x6, %esi
addl %ecx, %esi
shll $0x8, %esi
movzbl %al, %eax
addl %esi, %eax
addl $0x7000, %eax           # imm = 0x7000
retq
// File: /workspace/github_c_makefile_star2_O2/vampirefrog[P]x68ksjis/sjis.c
// Function: jis_from_sjis
uint16_t jis_from_sjis(uint16_t val) {
	int status = 0;
	uint8_t j1 = 0;
	uint8_t j2 = 0;
	uint8_t b1 = val >> 8;
	uint8_t b2 = val & 0xff;
	if((b1 >= 0x81 && b1 <= 0x84) || (b1 >= 0x87 && b1 <= 0x9f)) {
		j1 = 2 * (b1 - 0x70) - 1;
		if (b2 >= 0x40 && b2 <= 0x9e) {
			j2 = b2 - 31;
			if (j2 > 95)
				j2 -= 1;
			status = 1;
		} else if (b2 >= 0x9f && b2 <= 0xfc) {
			j2 = b2 - 126;
			j1 += 1;
			status = 1;
		}
	} else if (b1 >= 0xe0 && b1 <= 0xef) {
		j1 = 2 * (b1 - 0xb0) - 1;
		if (b2 >= 0x40 && b2 <= 0x9e) {
			j2 = b2 - 31;
			if (j2 > 95)
				j2 -= 1;
			status = 1;
		} else if (b2 >= 0x9f && b2 <= 0xfc) {
			j2 = b2 - 126;
			j1 += 1;
			status = 1;
		}
	}

	if(status == 0) return 0;
	return (j1 << 8) | j2;
}

// Assembly:
movl %edi, %eax
shrl $0x8, %eax
leal 0x7f00(%rdi), %ecx
cmpw $0x400, %cx             # imm = 0x400
setae %cl
movl %edi, %edx
addl $0x7900, %edx           # imm = 0x7900
cmpw $0x1900, %dx            # imm = 0x1900
setae %dl
testb %dl, %cl
jne 0x1673
movzwl %ax, %esi
addl %esi, %esi
leal 0x1f(%rsi), %eax
movzbl %dil, %ecx
leal -0x40(%rcx), %edx
cmpw $0x5e, %dx
jbe 0x169b
movzwl %cx, %ecx
addl $0xffffff61, %ecx       # imm = 0xFFFFFF61
cmpw $0x5d, %cx
ja 0x16b5
leal -0x7e(%rdi), %edx
addb $0x20, %sil
jmp 0x16cf
movl %edi, %edx
andl $0xf000, %edx           # imm = 0xF000
movb $0x1, %cl
cmpw $0xe000, %dx            # imm = 0xE000
jne 0x16b1
movzwl %ax, %esi
addl %esi, %esi
leal -0x61(%rsi), %eax
movzbl %dil, %edx
leal -0x40(%rdx), %r8d
cmpw $0x5e, %r8w
ja 0x16b9
leal -0x1f(%rdi), %ecx
leal -0x20(%rdi), %edx
cmpb $0x60, %cl
movzbl %dl, %esi
movzbl %cl, %edx
cmovael %esi, %edx
xorl %ecx, %ecx
jmp 0x16d7
xorl %eax, %eax
jmp 0x16d5
movb $0x1, %cl
jmp 0x16d5
movzwl %dx, %edx
addl $0xffffff61, %edx       # imm = 0xFFFFFF61
cmpw $0x5d, %dx
ja 0x16d5
leal -0x7e(%rdi), %edx
addb $-0x60, %sil
xorl %ecx, %ecx
movl %esi, %eax
jmp 0x16d7
xorl %edx, %edx
movzbl %al, %eax
shll $0x8, %eax
movzbl %dl, %edx
orl %eax, %edx
xorl %eax, %eax
testb %cl, %cl
cmovel %edx, %eax
retq
nop