LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/mbitsnbites[P]SoftFP/softfloat.c
// Function: float32_to_int16
int_fast16_t float32_to_int16(float32 a, float_status *status)
{
    int32_t v;
    int_fast16_t res;
    int old_exc_flags = get_float_exception_flags(status);

    v = float32_to_int32(a, status);
    if (v < -0x8000) {
        res = -0x8000;
    } else if (v > 0x7fff) {
        res = 0x7fff;
    } else {
        return v;
    }

    set_float_exception_flags(old_exc_flags, status);
    float_raise(float_flag_invalid, status);
    return res;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movb 0x2(%rsi), %bpl
callq 0xa4d0
movl %eax, %ecx
movq $-0x8000, %rax          # imm = 0x8000
cmpl $0xffff8000, %ecx       # imm = 0xFFFF8000
jl 0x14213
movl $0x7fff, %eax           # imm = 0x7FFF
cmpl $0x7fff, %ecx           # imm = 0x7FFF
jle 0x1421d
orb $0x1, %bpl
movb %bpl, 0x2(%rbx)
jmp 0x14220
movslq %ecx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mbitsnbites[P]SoftFP/softfloat.c
// Function: float32_to_uint16
uint_fast16_t float32_to_uint16(float32 a, float_status *status)
{
    int32_t v;
    uint_fast16_t res;
    int old_exc_flags = get_float_exception_flags(status);

    v = float32_to_int32(a, status);
    if (v < 0) {
        res = 0;
    } else if (v > 0xffff) {
        res = 0xffff;
    } else {
        return v;
    }

    set_float_exception_flags(old_exc_flags, status);
    float_raise(float_flag_invalid, status);
    return res;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movb 0x2(%rsi), %bpl
callq 0xa4d0
testl %eax, %eax
js 0x1424d
movl %eax, %ecx
movl $0xffff, %eax           # imm = 0xFFFF
cmpl $0xffff, %ecx           # imm = 0xFFFF
ja 0x1424f
movl %ecx, %eax
jmp 0x14257
xorl %eax, %eax
orb $0x1, %bpl
movb %bpl, 0x2(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mbitsnbites[P]SoftFP/softfloat.c
// Function: float32_to_uint16_round_to_zero
uint_fast16_t float32_to_uint16_round_to_zero(float32 a, float_status *status)
{
    int64_t v;
    uint_fast16_t res;
    int old_exc_flags = get_float_exception_flags(status);

    v = float32_to_int64_round_to_zero(a, status);
    if (v < 0) {
        res = 0;
    } else if (v > 0xffff) {
        res = 0xffff;
    } else {
        return v;
    }
    set_float_exception_flags(old_exc_flags, status);
    float_raise(float_flag_invalid, status);
    return res;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movb 0x2(%rsi), %bpl
callq 0xaa6f
testq %rax, %rax
js 0x14281
movl $0xffff, %ecx           # imm = 0xFFFF
cmpq $0x10000, %rax          # imm = 0x10000
jae 0x14283
jmp 0x1428e
xorl %ecx, %ecx
orb $0x1, %bpl
movb %bpl, 0x2(%rbx)
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mbitsnbites[P]SoftFP/softfloat.c
// Function: float64_to_uint32
uint32 float64_to_uint32(float64 a, float_status *status)
{
    uint64_t v;
    uint32 res;
    int old_exc_flags = get_float_exception_flags(status);

    v = float64_to_uint64(a, status);
    if (v > 0xffffffff) {
        res = 0xffffffff;
    } else {
        return v;
    }
    set_float_exception_flags(old_exc_flags, status);
    float_raise(float_flag_invalid, status);
    return res;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movb 0x2(%rsi), %bpl
callq 0x142c1
movq %rax, %rcx
shrq $0x20, %rcx
je 0x142ba
orb $0x1, %bpl
movb %bpl, 0x2(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mbitsnbites[P]SoftFP/softfloat.c
// Function: float64_to_uint64
uint64_t float64_to_uint64(float64 a, float_status *status)
{
    flag aSign;
    int_fast16_t aExp, shiftCount;
    uint64_t aSig, aSigExtra;
    a = float64_squash_input_denormal(a, status);

    aSig = extractFloat64Frac(a);
    aExp = extractFloat64Exp(a);
    aSign = extractFloat64Sign(a);
    if (aSign && (aExp > 1022)) {
        float_raise(float_flag_invalid, status);
        if (float64_is_any_nan(a)) {
            return LIT64(0xFFFFFFFFFFFFFFFF);
        } else {
            return 0;
        }
    }
    if (aExp) {
        aSig |= LIT64(0x0010000000000000);
    }
    shiftCount = 0x433 - aExp;
    if (shiftCount <= 0) {
        if (0x43E < aExp) {
            float_raise(float_flag_invalid, status);
            return LIT64(0xFFFFFFFFFFFFFFFF);
        }
        aSigExtra = 0;
        aSig <<= -shiftCount;
    } else {
        shift64ExtraRightJamming(aSig, 0, shiftCount, &aSig, &aSigExtra);
    }
    return roundAndPackUint64(aSign, aSig, aSigExtra, status);
}

// Assembly:
movq %rsi, %rax
movabsq $0x7ff0000000000000, %rdx # imm = 0x7FF0000000000000
movabsq $0xfffffffffffff, %r8   # imm = 0xFFFFFFFFFFFFF
cmpb $0x0, 0x5(%rsi)
je 0x14304
testq %rdx, %rdi
setne %cl
testq %r8, %rdi
sete %sil
orb %cl, %sil
jne 0x14304
orb $0x40, 0x2(%rax)
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
incq %rcx
andq %rcx, %rdi
movq %rdi, %rcx
shrq $0x34, %rcx
movl %ecx, %esi
andl $0x7ff, %esi            # imm = 0x7FF
testq %rdi, %rdi
setns %r9b
cmpq $0x3ff, %rsi            # imm = 0x3FF
setb %r10b
orb %r9b, %r10b
jne 0x1433c
orb $0x1, 0x2(%rax)
btrq $0x3f, %rdi
xorl %eax, %eax
cmpq %rdi, %rdx
sbbq %rax, %rax
retq
movq %rdi, %r9
andq %r8, %r9
testq %rsi, %rsi
je 0x143ad
leaq (%r8,%r9), %rdx
incq %rdx
cmpq $0x433, %rsi            # imm = 0x433
jb 0x1436b
cmpl $0x43f, %esi            # imm = 0x43F
jb 0x1438c
orb $0x1, 0x2(%rax)
movq $-0x1, %rax
retq
cmpl $0x3f4, %esi            # imm = 0x3F4
jb 0x1439f
addb $0xd, %cl
movq %rdx, %r8
shlq %cl, %r8
movb $0x33, %cl
subb %sil, %cl
shrq %cl, %rdx
movq %rdx, %rsi
movq %r8, %rdx
jmp 0x143b7
addq $-0x433, %rsi           # imm = 0xFBCD
movl %esi, %ecx
shlq %cl, %rdx
movq %rdx, %rsi
xorl %edx, %edx
jmp 0x143b7
movl $0x1, %r9d
cmpl $0x3f3, %esi            # imm = 0x3F3
je 0x143b5
xorl %edx, %edx
testq %r9, %r9
setne %dl
xorl %esi, %esi
shrq $0x3f, %rdi
movzbl %dil, %edi
movq %rax, %rcx
jmp 0xa9b7
// File: /workspace/github_c_makefile_star2_O3/mbitsnbites[P]SoftFP/softfloat.c
// Function: float64_to_uint32_round_to_zero
uint32 float64_to_uint32_round_to_zero(float64 a, float_status *status)
{
    uint64_t v;
    uint32 res;
    int old_exc_flags = get_float_exception_flags(status);

    v = float64_to_uint64_round_to_zero(a, status);
    if (v > 0xffffffff) {
        res = 0xffffffff;
    } else {
        return v;
    }
    set_float_exception_flags(old_exc_flags, status);
    float_raise(float_flag_invalid, status);
    return res;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movb 0x1(%rsi), %r14b
movb 0x2(%rsi), %bpl
movb $0x3, 0x1(%rsi)
callq 0x142c1
movb %r14b, 0x1(%rbx)
movq %rax, %rcx
shrq $0x20, %rcx
je 0x143f9
orb $0x1, %bpl
movb %bpl, 0x2(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mbitsnbites[P]SoftFP/softfloat.c
// Function: float64_to_uint64_round_to_zero
uint64_t float64_to_uint64_round_to_zero(float64 a, float_status *status)
{
    signed char current_rounding_mode = status->float_rounding_mode;
    set_float_rounding_mode(float_round_to_zero, status);
    int64_t v = float64_to_uint64(a, status);
    set_float_rounding_mode(current_rounding_mode, status);
    return v;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movb 0x1(%rsi), %bpl
movb $0x3, 0x1(%rsi)
callq 0x142c1
movb %bpl, 0x1(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mbitsnbites[P]SoftFP/softfloat.c
// Function: float64_to_int16
int_fast16_t float64_to_int16(float64 a, float_status *status)
{
    int64_t v;
    int_fast16_t res;
    int old_exc_flags = get_float_exception_flags(status);

    v = float64_to_int32(a, status);
    if (v < -0x8000) {
        res = -0x8000;
    } else if (v > 0x7fff) {
        res = 0x7fff;
    } else {
        return v;
    }

    set_float_exception_flags(old_exc_flags, status);
    float_raise(float_flag_invalid, status);
    return res;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movb 0x2(%rsi), %bpl
callq 0xce92
movl %eax, %ecx
movq $-0x8000, %rax          # imm = 0x8000
cmpl $0xffff8000, %ecx       # imm = 0xFFFF8000
jl 0x14449
movl $0x7fff, %eax           # imm = 0x7FFF
cmpl $0x8000, %ecx           # imm = 0x8000
jl 0x14453
orb $0x1, %bpl
movb %bpl, 0x2(%rbx)
jmp 0x14456
movslq %ecx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mbitsnbites[P]SoftFP/softfloat.c
// Function: float64_to_uint16
uint_fast16_t float64_to_uint16(float64 a, float_status *status)
{
    int64_t v;
    uint_fast16_t res;
    int old_exc_flags = get_float_exception_flags(status);

    v = float64_to_int32(a, status);
    if (v < 0) {
        res = 0;
    } else if (v > 0xffff) {
        res = 0xffff;
    } else {
        return v;
    }

    set_float_exception_flags(old_exc_flags, status);
    float_raise(float_flag_invalid, status);
    return res;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movb 0x2(%rsi), %bpl
callq 0xce92
testl %eax, %eax
js 0x14483
movl %eax, %ecx
movl $0xffff, %eax           # imm = 0xFFFF
cmpl $0x10000, %ecx          # imm = 0x10000
jae 0x14485
movl %ecx, %eax
jmp 0x1448d
xorl %eax, %eax
orb $0x1, %bpl
movb %bpl, 0x2(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mbitsnbites[P]SoftFP/softfloat.c
// Function: float64_to_uint16_round_to_zero
uint_fast16_t float64_to_uint16_round_to_zero(float64 a, float_status *status)
{
    int64_t v;
    uint_fast16_t res;
    int old_exc_flags = get_float_exception_flags(status);

    v = float64_to_int64_round_to_zero(a, status);
    if (v < 0) {
        res = 0;
    } else if (v > 0xffff) {
        res = 0xffff;
    } else {
        return v;
    }
    set_float_exception_flags(old_exc_flags, status);
    float_raise(float_flag_invalid, status);
    return res;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movb 0x2(%rsi), %bpl
callq 0xd1c6
testq %rax, %rax
js 0x144b7
movl $0xffff, %ecx           # imm = 0xFFFF
cmpq $0x10000, %rax          # imm = 0x10000
jae 0x144b9
jmp 0x144c4
xorl %ecx, %ecx
orb $0x1, %bpl
movb %bpl, 0x2(%rbx)
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mbitsnbites[P]SoftFP/softfloat.c
// Function: float64_compare_quiet
static inline int floatx80_compare_internal(floatx80 a, floatx80 b,
                                            int is_quiet, float_status *status)
{
    flag aSign, bSign;

    if (( ( extractFloatx80Exp( a ) == 0x7fff ) &&
          ( extractFloatx80Frac( a )<<1 ) ) ||
        ( ( extractFloatx80Exp( b ) == 0x7fff ) &&
          ( extractFloatx80Frac( b )<<1 ) )) {
        if (!is_quiet ||
            floatx80_is_signaling_nan( a ) ||
            floatx80_is_signaling_nan( b ) ) {
            float_raise(float_flag_invalid, status);
        }
        return float_relation_unordered;
    }
    aSign = extractFloatx80Sign( a );
    bSign = extractFloatx80Sign( b );
    if ( aSign != bSign ) {

        if ( ( ( (uint16_t) ( ( a.high | b.high ) << 1 ) ) == 0) &&
             ( ( 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 $0x7ff0000000000000, %rax # imm = 0x7FF0000000000000
movabsq $0xfffffffffffff, %rcx  # imm = 0xFFFFFFFFFFFFF
cmpb $0x0, 0x5(%rdx)
je 0x147a2
movabsq $-0x8000000000000000, %r8 # imm = 0x8000000000000000
testq %rax, %rdi
setne %r9b
testq %rcx, %rdi
sete %r10b
orb %r9b, %r10b
jne 0x14788
orb $0x40, 0x2(%rdx)
andq %r8, %rdi
testq %rax, %rsi
setne %r9b
testq %rcx, %rsi
sete %r10b
orb %r9b, %r10b
jne 0x147a2
orb $0x40, 0x2(%rdx)
andq %r8, %rsi
movq %rdi, %r8
notq %r8
testq %r8, %rax
sete %r8b
testq %rcx, %rdi
setne %r9b
testb %r9b, %r8b
jne 0x147f7
movq %rsi, %r8
notq %r8
testq %r8, %rax
setne %r8b
testq %rcx, %rsi
sete %cl
orb %r8b, %cl
je 0x147f7
movq %rdi, %rax
shrq $0x3f, %rax
movq %rsi, %rcx
shrq $0x3f, %rcx
cmpq %rcx, %rax
jne 0x14847
cmpq %rsi, %rdi
je 0x14867
setb %cl
movzbl %cl, %ecx
xorl %eax, %ecx
addl %ecx, %ecx
jmp 0x1485f
movabsq $0x7ff8000000000000, %rcx # imm = 0x7FF8000000000000
movq %rdi, %r8
andq %rcx, %r8
cmpq %rax, %r8
sete %r8b
shlq $0xd, %rdi
setne %dil
testb %dil, %r8b
jne 0x1483d
movabsq $0x7ffffffffffff, %rdi  # imm = 0x7FFFFFFFFFFFF
andq %rsi, %rcx
cmpq %rax, %rcx
setne %al
testq %rdi, %rsi
sete %cl
orb %al, %cl
movl $0x2, %eax
jne 0x14866
orb $0x1, 0x2(%rdx)
movl $0x2, %eax
retq
orq %rdi, %rsi
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
decq %rcx
testq %rcx, %rsi
je 0x14867
leal (%rax,%rax), %ecx
movl $0x1, %eax
subl %ecx, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movq %rdx, %rax
cmpb $0x0, 0x5(%rdx)
je 0x15520
testl $0x7f800000, %edi       # imm = 0x7F800000
setne %cl
testl $0x7fffff, %edi         # imm = 0x7FFFFF
sete %dl
orb %cl, %dl
jne 0x15520
orb $0x40, 0x2(%rax)
andl $0x80000000, %edi       # imm = 0x80000000
movl %edi, %edx
andl $0x7fffff, %edx         # imm = 0x7FFFFF
movl %edi, %ecx
shrl $0x17, %ecx
testb %cl, %cl
je 0x1554c
movzbl %cl, %r8d
cmpl $0xff, %r8d
jne 0x15558
testl %edx, %edx
je 0x15555
movl %edi, %esi
movq %rax, %rdx
jmp 0xaf64
movl $0x1, %ecx
testl %edx, %edx
jne 0x15561
movl %edi, %eax
retq
movzbl %cl, %ecx
orl $0x800000, %edx         # imm = 0x800000
shrl $0x1f, %edi
cmpl $0xfffffe01, %esi       # imm = 0xFFFFFE01
movl $0xfffffe00, %r8d       # imm = 0xFFFFFE00
cmovgel %esi, %r8d
decl %r8d
cmpl $0x201, %esi            # imm = 0x201
movl $0x1ff, %esi            # imm = 0x1FF
cmovll %r8d, %esi
addl %ecx, %esi
shll $0x7, %edx
movswq %si, %rsi
bsrl %edx, %ecx
xorl $0x1f, %ecx
decb %cl
movzbl %cl, %ecx
subq %rcx, %rsi
shll %cl, %edx
movzbl %dil, %edi
movq %rax, %rcx
jmp 0x9f46
// File: /workspace/github_c_makefile_star2_O3/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:
movq %rdx, %rax
movabsq $0xfffffffffffff, %rcx  # imm = 0xFFFFFFFFFFFFF
cmpb $0x0, 0x5(%rdx)
je 0x155eb
movabsq $0x7ff0000000000000, %rdx # imm = 0x7FF0000000000000
testq %rdx, %rdi
setne %dl
testq %rcx, %rdi
sete %r8b
orb %dl, %r8b
jne 0x155eb
orb $0x40, 0x2(%rax)
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
andq %rdx, %rdi
movq %rdi, %rdx
andq %rcx, %rdx
movq %rdi, %r8
shrq $0x34, %r8
andq $0x7ff, %r8             # imm = 0x7FF
je 0x1561a
cmpl $0x7ff, %r8d            # imm = 0x7FF
jne 0x15629
testq %rdx, %rdx
je 0x15625
movq %rdi, %rsi
movq %rax, %rdx
jmp 0xdbdb
movl $0x1, %r8d
testq %rdx, %rdx
jne 0x1562f
movq %rdi, %rax
retq
addq %rcx, %rdx
incq %rdx
shrq $0x3f, %rdi
cmpl $0xfffff001, %esi       # imm = 0xFFFFF001
movl $0xfffff000, %ecx       # imm = 0xFFFFF000
cmovgel %esi, %ecx
decl %ecx
cmpl $0x1001, %esi           # imm = 0x1001
movl $0xfff, %esi            # imm = 0xFFF
cmovll %ecx, %esi
addl %r8d, %esi
shlq $0xa, %rdx
movswq %si, %rsi
bsrq %rdx, %rcx
xorq $0x3f, %rcx
decq %rcx
subq %rcx, %rsi
shlq %cl, %rdx
movzbl %dil, %edi
movq %rax, %rcx
jmp 0xa25f
// File: /workspace/github_c_makefile_star2_O3/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 0x156b1
cmpl $0x7fff, %edi           # imm = 0x7FFF
jne 0x156bb
leaq (,%rax,2), %rcx
testq %rcx, %rcx
je 0x156f3
movq %rax, %rdi
movq %rax, %rdx
movl %esi, %ecx
movq %r9, %r8
callq 0xff00
jmp 0x156f1
movl $0x1, %edi
testq %rax, %rax
je 0x156f7
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 0x1106d
movl %edx, %esi
movl %esi, %edx
popq %rcx
retq
xorl %eax, %eax
jmp 0x156f3
// File: /workspace/github_c_makefile_star2_O3/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 0x15746
cmpl $0x7fff, %edi           # imm = 0x7FFF
jne 0x15757
orq %rax, %rdx
je 0x15794
movq %rax, %rdi
movq %r9, %rsi
movq %rax, %rdx
movq %r9, %rcx
callq 0x122b1
jmp 0x15791
movl $0x1, %edi
movq %rdx, %rsi
orq %rax, %rsi
jne 0x1575d
xorl %eax, %eax
jmp 0x15794
addq %rsi, %rdx
incq %rdx
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 0xa40a
movq %rdx, %r9
movq %r9, %rdx
popq %rcx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0x1328
movq %rsi, %rbx
cmpq $0x0, (%rsi)
je 0x1328
movl %edi, %eax
movq %rax, 0x8(%rsp)
movl $0x1, %r13d
leaq 0x10(%rsp), %r14
movq (%rbx,%r13,8), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x1030
movq %r14, %rdi
movl $0x2e, %esi
callq 0x1080
testq %rax, %rax
je 0x1236
movb $0x0, 0x4(%rax)
movl $0x77656e2e, (%rax)     # imm = 0x77656E2E
movq (%rbx,%r13,8), %r15
jmp 0x124b
movq %r14, %rdi
callq 0x1060
movl $0x77656e2e, 0x10(%rsp,%rax) # imm = 0x77656E2E
movb $0x0, 0x14(%rsp,%rax)
movq %r15, %rdi
leaq 0xdb4(%rip), %rsi       # 0x2009
callq 0x10b0
testq %rax, %rax
je 0x1301
movq %rax, %rbp
movq %r14, %rdi
leaq 0xdb4(%rip), %rsi       # 0x2024
callq 0x10b0
testq %rax, %rax
je 0x130e
movq %rax, %r15
movq (%rbx,%r13,8), %rsi
xorl %r12d, %r12d
leaq 0xd98(%rip), %rdi       # 0x2027
xorl %eax, %eax
callq 0x1070
movq %rbp, %rdi
callq 0x1090
cmpl $-0x1, %eax
je 0x12b9
cmpl $0xc, %eax
je 0x12b4
movl %eax, %edi
movq %r15, %rsi
callq 0x10a0
jmp 0x1296
incl %r12d
jmp 0x1296
testl %r12d, %r12d
je 0x12cf
leaq 0xd76(%rip), %rdi       # 0x203b
movl %r12d, %esi
xorl %eax, %eax
callq 0x1070
movq %rbp, %rdi
callq 0x1050
movq %r15, %rdi
callq 0x1050
incq %r13
cmpq 0x8(%rsp), %r13
jne 0x1205
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 0xd00(%rip), %rdi       # 0x200c
jmp 0x131a
leaq 0xcf7(%rip), %rdi       # 0x200c
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x1070
xorl %edi, %edi
callq 0x10c0
leaq 0xd24(%rip), %rdi       # 0x2053
callq 0x1040
jmp 0x1321
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movaps 0x6bc(%rip), %xmm0      # 0x3340
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 0x2ceb
movq %rsp, %rdi
callq 0x2080
movl $0x8000000, %esi        # imm = 0x8000000
xorl %edi, %edi
movl $0x3, %edx
movl $0x2, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x20e0
cmpq $-0x1, %rax
je 0x2d0a
movl $0x8000000, %esi        # imm = 0x8000000
movq %rax, %rdi
callq 0x21d0
incq (%rbx)
jmp 0x2cb7
leaq 0x5d9(%rip), %rdi       # 0x32cb
leaq 0x5ee(%rip), %rsi       # 0x32e7
leaq 0x5f5(%rip), %rcx       # 0x32f5
movl $0x10, %edx
callq 0x2120
leaq 0x617(%rip), %rdi       # 0x3328
leaq 0x5cf(%rip), %rsi       # 0x32e7
leaq 0x5d6(%rip), %rcx       # 0x32f5
movl $0x16, %edx
callq 0x2120
// File: /workspace/github_c_makefile_star2_O3/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 0x1533
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
callq 0x1150
// File: /workspace/github_c_makefile_star2_O3/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 0x149c
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x156e
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_O3/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 0x15be
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x2f, %eax
jne 0x1589
cmpb $0x0, 0x1(%rdi)
je 0x15cc
callq 0x15ea
testq %rax, %rax
je 0x15c6
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x16ae
movq %rax, %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
andq %rax, %rdx
movzbl %cl, %eax
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
jmp 0x15dd
movq %rax, %rdx
movq %rax, %rcx
jmp 0x15e3
xorl %eax, %eax
xorl %edx, %edx
jmp 0x15db
movabsq $0x200000000, %rdx      # imm = 0x200000000
movl $0x64, %eax
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
orq %rdx, %rax
orq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x163b
movq %rdi, %rbx
movb 0x1(%rdi), %al
testb %al, %al
je 0x163b
incq %rbx
movl $0x1, %r12d
xorl %r14d, %r14d
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %rbx, %r15
testb %al, %al
je 0x1640
movzbl %al, %eax
cmpl $0x2f, %eax
je 0x1640
incq %r12
movb 0x1(%r15), %al
incq %r15
addq %rcx, %r14
jmp 0x1620
xorl %r13d, %r13d
jmp 0x1689
movl $0x10, %edi
callq 0x10f0
movq %rax, %r13
testq %rax, %rax
je 0x169b
movq %r12, %rdi
callq 0x10f0
movq %rax, (%r13)
testq %rax, %rax
je 0x16a9
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 0x15ea
movq %rax, 0x8(%r13)
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1969(%rip), %rdi      # 0x300b
callq 0x1110
jmp 0x1652
callq 0x1168
// File: /workspace/github_c_makefile_star2_O3/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 0x37c5(%rip), %rax      # 0x50b8
movq (%rax), %rax
cmpl $0xb, %edx
ja 0x1907
movl %edx, %ecx
leaq (%rsi,%rcx,4), %rcx
addq $0x28, %rcx
jmp 0x1918
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_O3/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:
movl 0x4(%rdi), %eax
leal -0x1(%rax), %ecx
shrl $0xa, %ecx
incl %ecx
xorl %r11d, %r11d
cmpl $0x1, %eax
cmovael %ecx, %r11d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x40b, %r11d           # imm = 0x40B
ja 0x1a41
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movl $0x81, %r10d
leal -0x1(%r10), %edx
movl %edx, %ebx
shrl $0x3, %ebx
movl %edx, %ecx
andb $0x7, %cl
movl $0x1, %r8d
shll %cl, %r8d
movzbl (%rsi,%rbx), %ecx
movl %edx, %r9d
andl $0x7, %r9d
btl %r9d, %ecx
jae 0x1987
decl %r10d
jne 0x1955
jmp 0x1a3f
orb %r8b, %cl
movb %cl, (%rsi,%rbx)
cmpl $0xd, %r11d
jae 0x1a03
movl %r11d, %r9d
movl %r10d, 0x28(%rdi,%r9,4)
orb %r8b, (%rsi,%rbx)
cmpl $0xc, %r11d
jne 0x1a31
xorl %edx, %edx
movl %edx, %r10d
shrl $0x3, %r10d
movl %edx, %ecx
andb $0x7, %cl
movl $0x1, %r8d
shll %cl, %r8d
movzbl (%rsi,%r10), %ecx
movl %edx, %r10d
andl $0x7, %r10d
btl %r10d, %ecx
jae 0x1a06
incl %edx
cmpl $0x80, %edx
jne 0x19ab
movl 0x58(%rdi), %edx
leal -0x1(%rdx), %ecx
addl $0x6, %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
sarl $0x3, %edx
movslq %edx, %rdx
andb $0x7, %cl
movl $0x1, %edi
shll %cl, %edi
notb %dil
andb %dil, (%rsi,%rdx)
jmp 0x1a3f
movl %r11d, %r9d
leaq 0x36ab(%rip), %rax      # 0x50b8
movl 0x58(%rdi), %ecx
shlq $0xa, %rcx
addq (%rax), %rcx
leal 0x1(%rdx), %r10d
movl %r10d, -0x30(%rcx,%r9,4)
leal 0x7(%rdx), %eax
testl %edx, %edx
cmovnsl %edx, %eax
sarl $0x3, %eax
cltq
orb %r8b, (%rsi,%rax)
addl $0x400, 0x4(%rdi)       # imm = 0x400
addl $0x2, 0x1c(%rdi)
movl %r10d, %eax
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1a6f
movl %esi, %ecx
shrl $0x3, %ecx
movzbl (%rdi,%rcx), %ecx
movl %esi, %edx
andl $0x7, %edx
btl %edx, %ecx
jae 0x1a6d
leal -0x1(%rsi), %ecx
testl %esi, %esi
movl %ecx, %esi
jg 0x1a4f
jmp 0x1a6f
movl %esi, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %edx, %esi
jge 0x1ac9
leal 0x7(%rsi), %ecx
testl %esi, %esi
cmovnsl %esi, %ecx
sarl $0x3, %ecx
movslq %ecx, %rcx
movzbl (%rdi,%rcx), %ecx
movl %esi, %r8d
andl $0x7, %r8d
btl %r8d, %ecx
jae 0x1ac7
incl %esi
cmpl %esi, %edx
jne 0x1aa0
jmp 0x1ac9
movl %esi, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq %rcx, %rax
movl %esi, %ecx
leal -0x1(%rdx), %esi
shrl $0xa, %esi
xorl %r11d, %r11d
cmpl $0x1, %edx
leal 0x2(%rsi,%rsi), %r10d
cmovbl %r11d, %r10d
leal 0x7(%rcx), %esi
testl %ecx, %ecx
cmovnsl %ecx, %esi
movq 0x10(%rbp), %r11
sarl $0x3, %esi
andb $0x7, %cl
movl $0x1, %ebx
shll %cl, %ebx
movslq %esi, %rcx
orb %bl, (%r11,%rcx)
movl $0x1, %esi
movl %edx, 0x4(%rdi)
leal 0x2(%r10), %ecx
cmpl $0x19, %r10d
cmovbl %r10d, %ecx
movl %ecx, 0x1c(%rdi)
movl $0x1ff, %ecx            # imm = 0x1FF
orl 0x18(%rbp), %ecx
movw %cx, (%rdi)
cmpl $0xd, %r8d
jl 0x1b81
movl %r8d, %ecx
movl -0x4(%rax,%rcx,4), %edx
incl %edx
movl %edx, 0x58(%rdi)
movl -0x4(%rax,%rcx,4), %ecx
leal 0x7(%rcx), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
sarl $0x3, %edx
andb $0x7, %cl
shll %cl, %esi
movslq %edx, %rcx
orb %sil, (%r9,%rcx)
xorl %ecx, %ecx
cmpl $0xd, %r8d
setge %cl
subl %ecx, %r8d
je 0x1bf7
leaq 0x28(%rdi), %rdx
movl %r8d, %esi
movq $-0x30, %r8
xorl %r10d, %r10d
leaq 0x3511(%rip), %r11      # 0x50b8
cmpq $0xb, %r10
ja 0x1bb3
leaq (%rdx,%r10,4), %rbx
jmp 0x1bc0
movl 0x58(%rdi), %ebx
shlq $0xa, %rbx
addq (%r11), %rbx
addq %r8, %rbx
movl 0x30(%rax,%r8), %ecx
leal 0x1(%rcx), %r14d
leal 0x7(%rcx), %r15d
testl %ecx, %ecx
cmovnsl %ecx, %r15d
movl %r14d, (%rbx)
sarl $0x3, %r15d
andb $0x7, %cl
movl $0x1, %ebx
shll %cl, %ebx
movslq %r15d, %rcx
orb %bl, (%r9,%rcx)
incq %r10
addq $0x4, %r8
cmpq %r10, %rsi
jne 0x1ba7
movw $0x1, 0x1a(%rdi)
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, %rax
cmpl $0xb, %edx
ja 0x1c1c
movl %edx, %ecx
leaq (%rdi,%rcx,4), %rcx
addq $0x28, %rcx
jmp 0x1c34
leaq 0x3495(%rip), %rcx      # 0x50b8
movl 0x58(%rdi), %edi
shlq $0xa, %rdi
addq (%rcx), %rdi
addl $-0xc, %edx
leaq (%rdi,%rdx,4), %rcx
movl %esi, (%rcx)
leal -0x1(%rsi), %ecx
addl $0x6, %esi
testl %ecx, %ecx
cmovnsl %ecx, %esi
sarl $0x3, %esi
andb $0x7, %cl
movl $0x1, %edx
shll %cl, %edx
movslq %esi, %rcx
orb %dl, (%rax,%rcx)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1dfd
cmpl $0x2f, %edx
je 0x1df8
incq %rcx
jmp 0x1de5
movq %rcx, %rax
jmp 0x1de1
cltq
addq %rax, %rbx
movq %rbx, %rdi
callq 0x1070
movq %rax, %r14
incq %r14
movq %r14, %rdi
callq 0x10f0
testq %rax, %rax
je 0x1e2f
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x10e0
callq 0x1180
// File: /workspace/github_c_makefile_star2_O3/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:
decl %esi
shlq $0x7, %rsi
cmpl $0x0, 0x4(%rdi,%rsi)
je 0x1f32
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq (%rdi,%rsi), %rax
leaq 0x28(%rdi,%rsi), %rcx
movq %rcx, -0x38(%rbp)
leaq 0x324e(%rip), %rcx      # 0x50b8
movq %rax, -0x30(%rbp)
movl 0x28(%rax), %r12d
shlq $0xa, %r12
addq (%rcx), %r12
xorl %r14d, %r14d
xorl %r13d, %r13d
movl %r13d, %eax
andl $0x3ff, %eax            # imm = 0x3FF
leaq (%r12,%rax), %r15
cmpb $0x0, 0x6(%r12,%rax)
je 0x1ead
xorl %ebx, %ebx
movsbl 0x8(%r15,%rbx), %edi
callq 0x1040
incq %rbx
movzbl 0x6(%r15), %eax
cmpq %rax, %rbx
jb 0x1e95
movl $0xa, %edi
callq 0x1040
movzwl 0x4(%r15), %eax
addl %eax, %r13d
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
cmpl %eax, %r13d
setae %cl
testl $0x3ff, %r13d           # imm = 0x3FF
setne %dl
orb %cl, %dl
jne 0x1f1b
leal 0x1(%r14), %ecx
leaq 0x31d3(%rip), %rdx      # 0x50b8
movq (%rdx), %r12
cmpl $0xb, %ecx
ja 0x1ef9
movl %ecx, %edx
movq -0x38(%rbp), %rsi
leaq (%rsi,%rdx,4), %rdx
jmp 0x1f0f
movq -0x30(%rbp), %rdx
movl 0x58(%rdx), %edx
shlq $0xa, %rdx
addq %r12, %rdx
addl $-0xb, %r14d
leaq (%rdx,%r14,4), %rdx
movl (%rdx), %edx
shlq $0xa, %rdx
addq %rdx, %r12
movl %ecx, %r14d
cmpl %eax, %r13d
jb 0x1e7f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movl 0x4(%rdi), %eax
testl %eax, %eax
je 0x1fa0
leal -0x1(%rax), %r8d
shrl $0xa, %r8d
incl %r8d
leaq 0x28(%rdi), %r9
xorl %r10d, %r10d
movq %r9, %rcx
cmpq $0xc, %r10
jb 0x1f6c
movl 0x58(%rdi), %ecx
shlq $0xa, %rcx
addq %rsi, %rcx
leaq (%rcx,%r10,4), %rcx
addq $-0x30, %rcx
movl (%rcx), %r11d
leal -0x1(%r11), %ecx
addl $0x6, %r11d
testl %ecx, %ecx
cmovnsl %ecx, %r11d
sarl $0x3, %r11d
movslq %r11d, %r11
andb $0x7, %cl
movl $0x1, %ebx
shll %cl, %ebx
notb %bl
andb %bl, (%rdx,%r11)
incq %r10
addq $0x4, %r9
cmpq %r10, %r8
jne 0x1f51
cmpl $0x3001, %eax           # imm = 0x3001
jb 0x1fcb
movl 0x58(%rdi), %eax
leal -0x1(%rax), %ecx
addl $0x6, %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
sarl $0x3, %eax
cltq
andb $0x7, %cl
movl $0x1, %esi
shll %cl, %esi
notb %sil
andb %sil, (%rdx,%rax)
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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), %rbx
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rcx
callq 0x1050
testl %eax, %eax
jle 0x1293
xorl %r12d, %r12d
leaq 0x10(%rsp), %r14
leaq 0x15e72(%rip), %r15     # 0x17080
movl %eax, %eax
xorl %ecx, %ecx
movzbl 0x10(%rsp,%rcx), %edx
testl %r12d, %r12d
jne 0x1258
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
je 0x1258
movl %edx, %r12d
jmp 0x126e
shll $0x8, %r12d
movzwl %r12w, %esi
orl %edx, %esi
movl %esi, (%r15,%rsi,8)
incl 0x4(%r15,%rsi,8)
xorl %r12d, %r12d
incq %rcx
cmpq %rcx, %rax
jne 0x1212
movl $0x1, %esi
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
movq %rbx, %rcx
callq 0x1050
testl %eax, %eax
jg 0x120e
leaq 0x15de6(%rip), %rbx     # 0x17080
leaq -0xe3(%rip), %rcx       # 0x11be
movl $0x10000, %esi          # imm = 0x10000
movl $0x8, %edx
movq %rbx, %rdi
callq 0x1040
leaq 0x1d4a(%rip), %r14      # 0x3004
leaq 0xb(%rsp), %r15
leaq 0x1d5a(%rip), %r12      # 0x3020
xorl %r13d, %r13d
cmpl $0x0, 0x4(%rbx,%r13,8)
je 0x1363
leaq (,%r13,8), %rax
movl (%rax,%rbx), %ebp
cmpl $0x1f, %ebp
jg 0x12fb
movl $0x5, %esi
movq %r15, %rdi
movq %r14, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x1070
jmp 0x133d
movzwl %bp, %edi
callq 0x1728
movl %eax, %edi
movq %r15, %rsi
callq 0x272c
cltq
movb $0x0, 0xb(%rsp,%rax)
cmpl $0x100, %ebp            # imm = 0x100
jb 0x133d
movl %ebp, %esi
shrl $0x8, %esi
movzbl %bpl, %edx
movl 0x4(%rbx,%r13,8), %ecx
leaq 0x1cda(%rip), %rdi      # 0x300b
movq %r15, %r8
xorl %eax, %eax
callq 0x1060
jmp 0x1353
movzbl %bpl, %esi
movl 0x4(%rbx,%r13,8), %edx
movq %r12, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x1060
incq %r13
cmpq $0x10000, %r13          # imm = 0x10000
jne 0x12c9
xorl %eax, %eax
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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:
testl %esi, %esi
jle 0x13a3
xorl %ecx, %ecx
xorl %eax, %eax
movslq %ecx, %rcx
movzbl (%rdi,%rcx), %edx
movl %edx, %r8d
shrb $0x7, %r8b
movzbl %r8b, %r8d
addl %r8d, %eax
incl %eax
shrl $0x7, %edx
addl %edx, %ecx
incl %ecx
cmpl %esi, %ecx
jl 0x1380
retq
xorl %eax, %eax
retq