code "def main(input): a = input & 2047 b = input & 6144 c = input & 253952 d = input & 133955584 e = input & 939524096 f = input & 1073741824 g = input & 2147483648 a_new = a << 15 b_new = b << 18 c_new = c >> 13 d_new = d >> 13 e_new = e >> 1 f_new = f << 1 g_new = g >> 17 return a_new | b_new | c_new | d_new | e_new | f_new | g_new" "def main(x): A = x << 21 & 4292870144 B = x >> 11 & 3 C = x >> 8 & 2097120 D = x >> 27 & 28 return A | B | C | D" "def main(bf): e = bf & 4160749568 d = bf & 133693440 c = bf & 393216 b = bf & 130048 a = bf & 1023 return (e >> 25) + (d << 5) + (c >> 17) + (b << 7) + (a << 7)" "def main(x): e = x & 2147483648 d = x & 2147221504 c = x & 261632 b = x & 256 a = x & 255 e = e >> 1 b = b << 23 d = d >> 18 c = c << 4 a = a << 22 return b + e + a + c + d" "def main(x): D = x & 1 << 31 C = x & 31 << 26 B = x & 8191 << 13 A = x & 8191 return D | C >> 26 | B << 5 | A << 5" "def mask_generator(offset, count): mask = 2 ** count - 2 ** offset return mask def main(bits): a_mask = mask_generator(0, 16) b_mask = mask_generator(16, 31) c_mask = mask_generator(31, 32) a = bits & a_mask b = bits & b_mask c = bits & c_mask a_new = a << 1 b_new = b << 1 c_new = c >> 31 return a_new | b_new | c_new" "def main(x): fe = x & 3 << 30 d = x & 3 << 28 c = x & 7 << 25 b = x & 2047 << 14 a = x & 16383 return d << 2 | b << 5 | fe >> 13 | a << 3 | c >> 25" "def main(n): a_mask = 32767 a = n & a_mask b_mask = 268402688 b = (n & b_mask) >> 15 c_mask = 268435456 c = (n & c_mask) >> 28 d_mask = 1610612736 d = (n & d_mask) >> 29 e_mask = 2147483648 e = (n & e_mask) >> 31 return a | e << 15 | b << 28 - 12 | d << 29 | c << 31" "def main(x): maskMap = {'A': mask(0, 10), 'B': mask(10, 23), 'C': mask(23, 29), 'D': mask(29, 30), 'E': mask(30, 32)} a = maskMap['A'] & x b = maskMap['B'] & x c = maskMap['C'] & x d = maskMap['D'] & x e = maskMap['E'] & x return a << 22 | b >> 1 | c >> 20 | e >> 29 | d >> 29 def mask(offset, count): mask = 2 ** count - 2 ** offset return mask" "import math def main(bits): a_mask = mask(0, 8) b_mask = mask(8, 13) c_mask = mask(13, 15) d_mask = mask(15, 26) e_mask = mask(26, 28) f_mask = mask(28, 31) g_mask = mask(31, 32) a = bits & a_mask b = bits & b_mask c = bits & c_mask d = bits & d_mask e = bits & e_mask f = bits & f_mask g = bits & g_mask a_new = a b_new = b << 17 c_new = c >> 2 d_new = d >> 2 e_new = e << 4 f_new = f >> 20 g_new = g >> 7 return a_new | b_new | c_new | d_new | e_new | f_new | g_new def mask(offset, count): mask = 2 ** count - 2 ** offset return mask" "def main(x): e = (x >> 31) % (1 << 1) d = (x >> 23) % (1 << 8) c = (x >> 11) % (1 << 12) b = (x >> 4) % (1 << 7) a = x % (1 << 4) return (c << 20) + (e << 19) + (a << 15) + (b << 8) + d" "def main(x): A = (x & 31) << 14 B = (x & 96) >> 5 C = (x & 896) << 3 D = (x & 8387584) << 9 E = (x & 1065353216) >> 21 F = (x & 1073741824) >> 17 G = (x & 2147483648) >> 22 return A | B | C | D | E | F | G" "def main(x): f = (x & 2147483648) >> 30 e = (x & 2080374784) << 1 d = (x & 66846720) >> 15 c = (x & 131072) >> 15 b = (x & 65536) >> 16 a = (x & 65535) << 11 return a | b | c | d | e | f" "def bitSlice(hex, bitStart, bitEnd): mask = 0 for i in range(bitStart, bitEnd): mask |= 1 << i return hex & mask def main(hex): t = bitSlice(hex, 26, 32) t |= bitSlice(hex, 0, 10) << 16 t |= bitSlice(hex, 10, 15) << 1 t |= bitSlice(hex, 15, 26) >> 15 return t" "def main(x): A = (x & 7) << 29 B = (x & 8184) >> 3 C = (x & 2088960) << 8 D = (x & 65011712) >> 11 E = (x & 4227858432) >> 11 return A | B | C | D | E" "def main(x): A = (x & 511) << 12 B = (x & 3584) >> 9 C = (x & 8384512) << 9 D = (x & 8388608) >> 20 E = (x & 4278190080) >> 20 return A | B | C | D | E" "def main(x): A = (x & 16383) << 6 B = (x & 2080768) << 11 C = (x & 31457280) >> 1 D = (x & 2113929216) >> 25 E = (x & 2147483648) >> 7 return A | B | C | D | E" "def main(x): a = x & 16383 b = x >> 14 & 3 c = x >> 16 & 1023 d = x >> 26 & 15 e = x >> 30 return (b << 30) + (e << 28) + (c << 18) + (a << 4) + d" "def main(n): res = 0 res = res << 2 | get_bytes(n, 12, 3) res = res << 12 | get_bytes(n, 14, 4095) res = res << 4 | get_bytes(n, 26, 15) res = res << 2 | get_bytes(n, 30, 3) res = res << 1 | get_bytes(n, 6, 1) res = res << 6 | get_bytes(n, 0, 63) res = res << 5 | get_bytes(n, 7, 31) return res def get_bytes(n, start, mask): return n >> start & mask" "def main(x): return ((x & 65535) << 16) + ((x & 1073676288) >> 14) + ((x & 3221225472) >> 30)" "def main(x): e = x >> 30 b = (x >> 16 & 2 ** 3 - 1) << 2 a = (x & 2 ** 16 - 1) << 5 c = (x >> 19 & 2 ** 9 - 1) << 23 d = (x >> 28 & 2 ** 2 - 1) << 21 return c | d | a | b | e" "def main(x): A = x & 32767 B = x >> 15 & 63 C = x >> 21 & 7 D = x >> 24 & 1 E = x >> 25 & 1 F = x >> 26 & 1 G = x >> 27 & 1 H = x >> 28 & 15 result = 0 result |= D result |= F << 1 result |= B << 2 result |= H << 8 result |= C << 12 result |= A << 15 result |= G << 30 result |= E << 31 return result" "def main(x): a_mask = 511 b_mask = 4095 << 9 c_mask = 2047 << 21 a_part = x & a_mask b_part = (x & b_mask) >> 9 c_part = (x & c_mask) >> 21 return c_part | b_part << 11 | a_part << 23" "def hexToBin(num): return bin(num)[2:] def binToHexa(n): return hex(int(n, 2)) def main(num): binary = hexToBin(num).zfill(32) E = binary[0:1] D = binary[1:4] C = binary[4:13] B = binary[13:26] A = binary[26:32] newBinary = C + D + B + A + E newHex = binToHexa(newBinary) return int(newHex[0:2] + newHex[2:].zfill(8), 16)" "def main(f): x = format(f, 'b') str(x) if len(x) < 32: while len(x) < 32: x = '0' + x partA = x[23:] partB = x[22:23] partC = x[9:22] partD = x[4:9] partE = x[1:4] partF = x[:1] newF = partE + partF + partA + partB + partD + partC return newfun1(f, newF) def newfun1(x, newX): if str(x)[1] != 'x': return int(newX, 2) else: return hex(int(newX, 2))" "def main(x): a = 0 for i in range(7): a |= x & 1 << i b = 0 x >>= 7 for i in range(11): b |= x & 1 << i c = 0 x >>= 11 for i in range(3): c |= x & 1 << i d = 0 x >>= 3 for i in range(2): d |= x & 1 << i e = 0 x >>= 2 for i in range(3): e |= x & 1 << i f = 0 x >>= 3 for i in range(2): f |= x & 1 << i g = 0 x >>= 2 for i in range(3): g |= x & 1 << i h = 0 x >>= 3 h |= x & 1 p = f << 30 | b << 19 | e << 16 | a << 9 p2 = d << 7 | h << 6 | c << 3 | g return p | p2" "def main(bit_field): A = bit_field >> 10 << 10 ^ bit_field B = (bit_field >> 18 << 18 ^ bit_field ^ A) >> 10 C = (bit_field >> 20 << 20 ^ bit_field ^ B ^ A) >> 18 D = (bit_field >> 22 << 22 ^ bit_field ^ C ^ B ^ A) >> 20 E = (bit_field >> 25 << 25 ^ bit_field ^ D ^ C ^ B ^ A) >> 22 F = (bit_field >> 30 << 30 ^ bit_field ^ E ^ D ^ C ^ B ^ A) >> 25 G = (bit_field ^ F ^ E ^ D ^ C ^ B ^ A) >> 30 str_A = '0' * (10 - len(str(bin(A))[2:])) + str(bin(A))[2:] str_B = '0' * (8 - len(str(bin(B))[2:])) + str(bin(B))[2:] str_C = '0' * (2 - len(str(bin(C))[2:])) + str(bin(C))[2:] str_D = '0' * (2 - len(str(bin(D))[2:])) + str(bin(D))[2:] str_E = '0' * (3 - len(str(bin(E))[2:])) + str(bin(E))[2:] str_F = '0' * (5 - len(str(bin(F))[2:])) + str(bin(F))[2:] str_G = '0' * (2 - len(str(bin(G))[2:])) + str(bin(G))[2:] return int(str_D + str_E + str_G + str_B + str_C + str_A + str_F, 2)" "def main(x): a = 7 b = 24 c = 480 d = 4193792 e = 1069547520 f = 1073741824 g = 2147483648 return x & g | (x & a) << 28 | (x & d) << 6 | (x & b) << 10 | (x & e) >> 17 | (x & c) >> 4 | (x & f) >> 30" "def main(bit_field): A = bit_field >> 5 << 5 ^ bit_field B = (bit_field >> 8 << 8 ^ bit_field ^ A) >> 5 C = (bit_field >> 10 << 10 ^ bit_field ^ B ^ A) >> 8 D = (bit_field >> 15 << 15 ^ bit_field ^ C ^ B ^ A) >> 10 E = (bit_field >> 26 << 26 ^ bit_field ^ D ^ C ^ B ^ A) >> 15 F = (bit_field >> 27 << 27 ^ bit_field ^ E ^ D ^ C ^ B ^ A) >> 26 G = (bit_field ^ F ^ E ^ D ^ C ^ B ^ A) >> 27 str_A = '0' * (5 - len(str(bin(A))[2:])) + str(bin(A))[2:] str_B = '0' * (3 - len(str(bin(B))[2:])) + str(bin(B))[2:] str_C = '0' * (2 - len(str(bin(C))[2:])) + str(bin(C))[2:] str_D = '0' * (5 - len(str(bin(D))[2:])) + str(bin(D))[2:] str_E = '0' * (11 - len(str(bin(E))[2:])) + str(bin(E))[2:] str_F = '0' * (1 - len(str(bin(F))[2:])) + str(bin(F))[2:] str_G = '0' * (5 - len(str(bin(G))[2:])) + str(bin(G))[2:] return int(str_B + str_G + str_A + str_F + str_C + str_E + str_D, 2)" "def main(x): A = (int(x) & 127) << 25 B = int(x) >> 7 & 8191 C = int(x) >> 20 << 13 return A | B | C" "A_shift = 22 B_shift = 10 C_shift = 22 A_mask = 2 ** 10 - 1 B_mask = 2 ** 12 - 1 << B_shift C_mask = 2 ** 10 - 1 << C_shift mask = 2 ** 32 - 1 def main(byte_num): C_old = C_mask & byte_num B_old = B_mask & byte_num A_old = A_mask & byte_num A = A_old << A_shift B = B_old C = C_old >> C_shift return A | B | C" "def main(num): a = num & 3 b = num & 262140 c = num & 268173312 d = num & 805306368 e = num & 3221225472 a <<= 30 b >>= 2 d >>= 12 e >>= 2 return a | b | c | d | e" "def main(field): A = (field & 1) << 31 B = (field & 65534) >> 1 C = (field & 4128768) << 1 D = (field & 130023424) << 4 E = (field & 939524096) >> 4 F = (field & 3221225472) >> 15 return A | B | C | D | E | F" "a = {0: 26, 1: 27, 2: 23, 3: 24, 4: 25, 5: 0, 6: 1, 7: 2, 8: 3, 9: 4, 10: 28, 11: 29, 12: 30, 13: 10, 14: 11, 15: 12, 16: 13, 17: 14, 18: 15, 19: 16, 20: 17, 21: 18, 22: 19, 23: 20, 24: 21, 25: 5, 26: 6, 27: 7, 28: 8, 29: 9, 30: 31, 31: 22} mn = int(2 ** 31 - 1) def main(x): t = int(x) b = str(bin(t))[2:] b = b[::-1] if len(b) < 31: add = 31 - len(b) add = '0' * (add + 1) b += add ans = 0 for i in range(len(b)): temp = 1 val = a.get(i) temp = temp << val if int(b[i]) == 1: t = t | temp else: temp = mn - temp t = t & temp return t" "def copy_area(bits, right, length): mask = (1 << length) - 1 << right return (bits & mask) >> right def paste_area(bits, part, right, lenght): area = bits & (1 << lenght) - 1 << right bits = bits ^ area | part << right return bits def main(bits): areas = {'f': [10, 22, 22], 'e': [3, 19, 2], 'd': [1, 18, 5], 'c': [13, 5, 6], 'b': [2, 3, 0], 'a': [3, 0, 19]} parts = {} for (name, area) in areas.items(): (length, old, new) = area part = copy_area(bits, old, length) parts[name] = part for (name, part) in parts.items(): (length, old, new) = areas[name] bits = paste_area(bits, part, new, length) return bits" "def main(num): a = num & 32767 b = num & 2064384 c = num & 6291456 d = num & 58720256 e = num & 469762048 f = num & 3758096384 d <<= 6 a <<= 11 c >>= 12 f >>= 23 b >>= 15 return a + b + c + d + e + f" "def main(x): d = x >> 30 meta = x - (d << 30) c = meta >> 19 meta = meta - (c << 19) b = meta >> 16 a = meta - (b << 16) x = (b << 29) + (d << 27) + (a << 11) + c return x" "def main(x): in_num = bin(x)[2:] while len(in_num) != 32: in_num = '0' + in_num g = in_num[0:2] f = in_num[2:4] e = in_num[4] d = in_num[5:12] c = in_num[12:27] b = in_num[27] a = in_num[28:] out_num = '0b' + b + a + d + e + f + g + c return int(out_num, 2)" "from functools import reduce from typing import List def int2ba(num: int, n: int=32) -> list[int]: out = [1 if num & 1 << n - 1 - i else 0 for i in range(n)] return out def ba2int(ar: list, n: int=32) -> int: return reduce(lambda a, b: a * 2 + b, ar) def switch(ar: list, slice1: (int, int), slice2: (int, int)) -> None: x = ar[slice1[0]:slice1[1]] ar[slice1[0]:slice1[1]] = ar[slice2[0]:slice2[0]] ar[slice2[0]:slice2[1]] = x def main(x: int) -> int: ar1 = int2ba(x, 32) ar1.reverse() ar = ar1.copy() ar[26:30] = ar1[0:4] ar[2:13] = ar1[4:15] ar[0:2] = ar1[15:17] ar[13:15] = ar1[17:19] ar[15:26] = ar1[19:30] ar[30] = ar1[30] ar[31] = ar1[31] ar.reverse() return ba2int(ar, 0)" "def set_bit_value(x: int, bit: int, value: bool) -> int: return x | 1 << bit if value else x & ~(1 << bit) def bit_value(x: int, bit: int) -> bool: return (x & 1 << bit) >> bit def main(x: int): result = 0 result |= x >> 30 & 3 result |= (x >> 13 & 131071) << 2 result |= (x & 8191) << 19 return result" "def main(x): a = int('11111', 2) b = int('1111111111100000', 2) c = int('110000000000000000', 2) d = int('11111111111111000000000000000000', 2) a = x & a b = x & b c = x & c d = x & d a = a << 2 b = b << 16 c = c >> 16 d = d >> 11 x = c | a | d | b return x" "def main(x): x = x << 4 y = x z = x >> 32 << 32 x = 0 for i in range(17, 32): x = x | y & 1 << i for i in range(4, 17): x = x | (y & 1 << i) >> 1 x = x | (z & 1 << 35) >> 19 x = x | (z & 1 << 34) >> 32 x = x | (z & 1 << 33) >> 33 x = x | (z & 1 << 32) >> 31 return x" "def main(x): x1 = x & 63 x2 = (x & 2147483584) << 1 x3 = (x & 2147483648) >> 25 return x1 | x2 | x3" "def main(x): e = x & 3221225472 d = x & 939524096 c = x & 133955584 b = x & 261632 a = x & 511 e = e >> 30 d = d >> 25 c = c >> 13 b = b << 5 a = a << 23 return a + b + c + d + e" "def main(x): a = x & 31 b = x >> 5 & 255 c = x >> 13 & 3 d = x >> 15 & 32767 e = x >> 30 & 1 f = x >> 31 & 1 result = f | e << 1 | d << 2 | b << 17 | a << 25 | c << 30 return result" "def main(x): y1 = 1610612736 y2 = 2147483648 m = (x & y1) << 1 | (x & y2) >> 2 y = 0 for i in range(3, 32): y = y + (x & pow(2, 31 - i)) m = m | y return m" "def main(lol): a = lol & 2047 b = lol >> 11 & 511 c = lol >> 20 & 255 d = lol >> 28 & 15 result = a | d << 11 | b << 15 | c << 24 return result" "def main(x): a = x & 1 b = x >> 1 & 1023 c = x >> 11 & 31 d = x >> 16 & 2047 e = x >> 27 & 15 f = x >> 31 & 1 result = d | f << 11 | e << 12 | c << 16 | a << 21 | b << 22 return result" "def main(x): a = x & 1023 b = x >> 10 & 1 c = x >> 11 & 2047 d = x >> 22 & 255 e = x >> 30 & 3 result = d | a << 8 | b << 18 | e << 19 | c << 21 return result" "def main(x): a = x & 8191 b = x >> 13 & 16383 c = x >> 27 & 3 d = x >> 29 & 1 e = x >> 30 & 3 res = c | d << 2 | a << 3 | b << 16 | e << 30 return res" "def main(x): a = x >> 0 & 15 b = x >> 4 & 2047 c = x >> 15 & 31 d = x >> 20 & 2047 e = x >> 31 & 1 result = d | c << 11 | e << 16 | a << 17 | b << 21 return result" "def main(x): a = x & 32767 b = x >> 15 & 8191 c = x >> 28 & 1 d = x >> 29 & 1 e = x >> 30 & 1 f = x >> 31 & 1 result = c | a << 1 | b << 17 | d << 30 | e << 16 | f << 31 return result hex(main(2350175830))" "def main(x): a = x & 63 b = x >> 6 & 65535 c = x >> 22 & 127 d = x >> 29 & 1 e = x >> 30 & 3 result = d | e << 1 | c << 3 | b << 10 | a << 26 return result" "def main(x): mama = x E = mama >> 14 E = E & 131072 D = mama >> 14 D = D & 130944 C = mama >> 1 C = C & 786432 B = mama >> 12 B = B & 127 A = mama << 20 A = A & 4293918720 return A + C + E + D + B" "def main(x): d = (x & 4227858432) >> 26 c = (x & 67106816) << 6 b = (x & 2032) << 6 a = (x & 15) << 6 return a | b | c | d" "def main(x): a_bit = 1023 b_bit = 15360 c_bit = 8372224 d_bit = 1065353216 e_bit = 1073741824 f_bit = 2147483648 new_a = (x & a_bit) << 22 new_b = (x & b_bit) << 1 new_c = (x & c_bit) >> 12 new_d = (x & d_bit) >> 8 new_e = (x & e_bit) >> 29 new_f = (x & f_bit) >> 31 res = new_a | new_b | new_c | new_e | new_d | new_f return res" "def main(x): A = x & 65535 B = x >> 16 & 7 C = x >> 19 & 511 D = x >> 28 & 7 E = x >> 31 & 1 result = 0 result |= E result |= B << 1 result |= D << 4 result |= A << 7 result |= C << 23 return result" "def main(arg: hex) -> hex: a_mask = 3 b_mask = 4 c_mask = 1016 d_mask = 4193280 e_mask = 12582912 f_mask = 251658240 g_mask = 4026531840 a = arg & a_mask b = arg & b_mask c = arg & c_mask d = arg & d_mask e = arg & e_mask f = arg & f_mask g = arg & g_mask b = b << 2 c = c << 2 d = d << 10 e = e >> 20 f = f >> 12 g = g >> 12 return a + b + c + d + e + f + g" "def main(hex_num): c = (16128 & hex_num) << 18 g = (hex_num & 1 << 31) >> 6 f = (hex_num & 7 << 28) >> 6 a = (hex_num & 1) << 21 d = (8372224 & hex_num) >> 2 e = (260046848 & hex_num) >> 16 b = (254 & hex_num) >> 1 res = c | g | f | a | d | e | b return res" "def main(hex_num): hex_num = int(hex(hex_num), 16) res = int(hex(0), 16) temp = int(hex(2147483648), 16) H = int(hex(int(hex(hex_num & temp), 16) >> 5), 16) temp = int(hex(2013265920), 16) G = int(hex(int(hex(hex_num & temp), 16)), 16) temp = int(hex(100663296), 16) F = int(hex(int(hex(hex_num & temp), 16) >> 19), 16) temp = int(hex(33550336), 16) DE = int(hex(int(hex(hex_num & temp), 16) >> 4), 16) temp = int(hex(4032), 16) C = int(hex(int(hex(hex_num & temp), 16) >> 6), 16) temp = int(hex(32), 16) B = int(hex(int(hex(hex_num & temp), 16) << 26), 16) temp = int(hex(31), 16) A = int(hex(int(hex(hex_num & temp), 16) << 21), 16) return int(hex(res ^ H ^ G ^ F ^ DE ^ C ^ B ^ A), 16)" "def main(bits): a_mask = mask(0, 15) b_mask = mask(15, 17) c_mask = mask(17, 26) d_mask = mask(26, 28) e_mask = mask(28, 30) f_mask = mask(30, 31) g_mask = mask(31, 32) a = bits & a_mask b = bits & b_mask c = bits & c_mask d = bits & d_mask e = bits & e_mask f = bits & f_mask g = bits & g_mask a_new = a << 17 b_new = b >> 5 c_new = c >> 17 d_new = d >> 11 e_new = e >> 16 f_new = f >> 16 g_new = g >> 22 return a_new | b_new | c_new | d_new | e_new | f_new | g_new def mask(offset, count): mask = 2 ** count - 2 ** offset return mask main(3509136033)" "def main(x): e = x >> 30 tmp = x - (e << 30) d = tmp >> 22 tmp = tmp - (d << 22) c = tmp >> 20 tmp = tmp - (c << 20) b = tmp >> 11 a = tmp - (b << 11) x = (a << 21) + (d << 13) + (c << 11) + (b << 2) + e return x" "def main(field): A = (field & 8191) << 14 B = (field & 134209536) >> 13 C = (field & 939524096) << 2 D = (field & 3221225472) >> 3 return A | B | C | D" "def main(y): f = (y & 2147483648) >> 31 e = (y & 1610612736) >> 29 << 10 d = (y & 520093696) >> 24 << 12 c = (y & 16252928) >> 19 << 1 b = (y & 524272) >> 4 << 17 a = (y & 15) << 6 y_b = b | d | e | a | c | f return y_b" "def main(x): a = b = c = d = x a &= 31 b &= 8160 c &= 33546240 d &= 4261412864 b = b << 19 c = c >> 1 d = d >> 20 x = a | b | c | d return x" "def main(num): a = num & 1 b = num & 6 c = num & 32760 d = num & 4161536 e = num & 2143289344 f = num & 2147483648 return a << 31 | b << 27 | c << 4 | d >> 15 | e >> 3 | f >> 1" "def main(x): op1 = x xF = 4227858432 xE = 50331648 xD = 12582912 xC = 4063232 xB = 126976 xA = 4095 F = op1 & xF E = op1 & xE E = E >> 24 D = op1 & xD D = D >> 20 C = op1 & xC C = C >> 13 B = op1 & xB B = B >> 3 A = op1 & xA A = A << 14 answer = F + A + B + C + D + E return answer" "def main(n): d = 0 x = hex(n) temp = int(x, 16) & 15 temp = temp << 28 d = d | temp temp = int(x, 16) & 1048576 temp = temp << 7 d = d | temp temp = int(x, 16) & 4026531840 temp = temp >> 5 temp = temp & 125829120 d = d | temp temp = int(x, 16) & 67108864 temp = temp >> 4 d = d | temp temp = int(x, 16) & 58720256 temp = temp >> 4 d = d | temp temp = int(x, 16) & 134217728 temp = temp >> 9 d = d | temp temp = int(x, 16) & 1048560 temp = temp >> 2 d = d | temp temp = int(x, 16) & 6291456 temp = temp >> 21 d = d | temp return int(hex(d), 16)" "def main(hex_number): str_bin_number = str(bin(hex_number)[2:]).rjust(32, '0') return int(hex(int(str_bin_number[1:5] + str_bin_number[0] + str_bin_number[5:], 2)), 16)" "def main(x): a = x & 4095 b = x >> 12 & 127 c = x >> 19 & 15 d = x >> 23 & 15 e = x >> 27 & 15 f = x >> 31 & 1 result = b | c << 7 | a << 11 | e << 23 | d << 27 | f << 31 return result" "def main(number): end_one = number & 15 end_two = number & 240 end_three = number & 3840 number = number & 4294963200 | end_one << 8 | end_two >> 4 | end_three >> 4 red = number & 3758096384 blue = number & 268435456 green = number & 234881024 purple = number & 16777216 number = number & 16777215 | red >> 4 | blue << 3 number = number | green << 3 | purple return number" "def main(x): a = x & 8191 b = x >> 13 & 32767 c = x >> 28 & 1 d = x >> 29 & 7 result = c | a << 16 | b << 1 | d << 29 return result hex(main(2559425130))" "def main(num): a = num & 7 b = num & 1016 c = num & 4193280 d = num & 4194304 e = num & 125829120 f = num & 402653184 g = num & 3758096384 return a << 24 | b >> 3 | c >> 1 | d << 5 | e << 5 | f >> 20 | g >> 8" "def main(n): amask = 15 a = n & amask bmask = 131056 b = (n & bmask) >> 4 cmask = 33423360 c = (n & cmask) >> 17 dmask = 2113929216 d = (n & dmask) >> 25 emask = 2147483648 e = (n & emask) >> 31 res = ((((0 | d) << 13 | b) << 4 | a) << 8 | c) << 1 | e return res" "def main(x): a = format(x, '032b') a = a[16:30] + a[30:32] + a[1:16] + a[0] a = int(hex(int(a, 2)), 0) return a" "def main(x): A = (int(x) & 1) << 15 B = (int(x) >> 1 & 32767) << 17 C = (int(x) >> 16 & 255) << 7 D = (int(x) >> 24 & 63) << 1 E = (int(x) >> 30 & 1) << 16 F = int(x) >> 31 return A | B | C | D | E | F" "def main(x): binary = str(bin(x))[2:] for i in range(32 - len(binary)): binary = '0' + binary e = binary[0:1] d = binary[1:13] c = binary[13:21] b = binary[21:26] a = binary[26:32] return int(e + b + d + a + c, 2)" "def main(x): binary = str(bin(x))[2:] for i in range(32 - len(binary)): binary = '0' + binary e = binary[0:1] d = binary[1:6] c = binary[6:10] b = binary[10:19] a = binary[19:32] return int(a + e + d + c + b, 2)" "def main(x): a = str(bin(x))[2:] a = '0' * (32 - len(a)) + a b = a[-31] + a[-1] + a[-13:-1] + a[-27:-13] + a[-30:-27] + a[-32] return int(b, 2)" "def main(data): E = 3221225472 D = 1006632960 C = 66846720 B = 261632 A = 511 a = (data & A) << 4 b = (data & B) << 12 c = (data & C) >> 5 d = (data & D) >> 26 e = data & E ans = a | b | c | d | e return ans" "def main(x): d = 2147483648 d = x & d c = 2147450880 c = (x & c) >> 8 b = 32512 b = (x & b) >> 8 a = 255 a = (x & a) << 23 return a | b | c | d" "def create_number(x, y): res = 0 for i in range(x - y + 1): res = res | 1 << x - i return res >> 1 def main(x): res = 1 << 33 parts = {'F': (32, 32, 28, 0), 'E': (31, 28, 2, 1), 'D': (27, 26, 24, 0), 'C': (25, 25, 4, 1), 'B': (24, 9, 4, 0), 'A': (8, 1, 20, 1)} for (part, val) in parts.items(): mask = create_number(val[0], val[1]) temp = x & mask if val[3]: temp = temp << val[2] else: temp = temp >> val[2] res = res | temp mask = create_number(34, 34) temp = bin(mask) temp = '0b' + temp[3:].replace('0', '1') mask = int(temp, 2) return (res & mask) >> 1" "def main(x): a = x & 255 b = x >> 8 & 65535 c = x >> 24 & 1 d = x >> 25 & 3 e = x >> 27 return d + (e << 2) + (b << 7) + (a << 23) + (c << 31)" "def main(x: float): mask_a = 4095 mask_b = 4096 mask_c = 516096 mask_d = 4294443008 a = (x & mask_a) >> 0 << 7 b = (x & mask_b) >> 12 << 6 c = (x & mask_c) >> 13 << 0 d = (x & mask_d) >> 19 << 19 return a + b + c + d" "def main(input_hex): a = int(format(input_hex, '#034b')[-16:], 2) << 7 input_hex >>= 16 b = int(format(input_hex, '#034b')[-9:], 2) << 23 input_hex >>= 9 c = int(format(input_hex, '#034b')[-5:], 2) input_hex >>= 5 d = int(format(input_hex, '#034b')[-1:], 2) << 6 input_hex >>= 1 e = int(format(input_hex, '#034b')[-1:], 2) << 5 return b + a + d + e + c" "def main(input_hex): a = int(format(input_hex, '#034b')[-7:], 2) << 7 input_hex >>= 7 b = int(format(input_hex, '#034b')[-4:], 2) << 2 input_hex >>= 4 c = int(format(input_hex, '#034b')[-12:], 2) << 14 input_hex >>= 12 d = int(format(input_hex, '#034b')[-2:], 2) << 26 input_hex >>= 2 e = int(format(input_hex, '#034b')[-3:], 2) << 29 input_hex >>= 3 f = int(format(input_hex, '#034b')[-2:], 2) input_hex >>= 2 g = int(format(input_hex, '#034b')[-1:], 2) << 28 input_hex >>= 1 h = int(format(input_hex, '#034b')[-1:], 2) << 6 return a + b + c + d + e + f + g + h" "def main(x): result = 0 a = x & 127 b = x >> 7 & 255 c = x >> 15 & 1023 d = x >> 25 & 15 e = x >> 29 & 3 f = x >> 31 & 1 result |= e result |= a << 2 result |= f << 9 result |= d << 10 result |= b << 14 result |= c << 22 return result" "def get_field(x, start_bit, end_bit): mask = 2 ** (end_bit + 1 - start_bit) - 1 return x >> start_bit & mask def main(x): a = get_field(x, 0, 13) b = get_field(x, 14, 19) c = get_field(x, 20, 21) d = get_field(x, 22, 25) e = get_field(x, 26, 27) f = get_field(x, 28, 28) g = get_field(x, 29, 30) h = get_field(x, 31, 31) result = c | e << 2 | a << 4 | f << 18 | b << 19 | h << 25 | d << 26 | g << 30 return result" "def get_field(x, start_bit, end_bit): mask = 2 ** (end_bit + 1 - start_bit) - 1 return x >> start_bit & mask def main(x): a = get_field(x, 0, 6) b = get_field(x, 7, 21) c = get_field(x, 22, 23) d = get_field(x, 24, 29) e = get_field(x, 30, 30) f = get_field(x, 31, 31) return e | a << 1 | f << 8 | c << 9 | d << 11 | b << 17" "def get_field(x, start_bit, end_bit): mask = 2 ** (end_bit + 1 - start_bit) - 1 return x >> start_bit & mask def main(x): a = get_field(x, 0, 15) b = get_field(x, 16, 21) c = get_field(x, 22, 24) d = get_field(x, 25, 29) e = get_field(x, 30, 31) return e | c << 2 | b << 5 | a << 11 | d << 27" "def get_field(x, start_bit, end_bit): mask = 2 ** (end_bit + 1 - start_bit) - 1 return x >> start_bit & mask def main(x): a = get_field(x, 0, 7) b = get_field(x, 8, 10) c = get_field(x, 11, 21) d = get_field(x, 22, 31) return d | b << 10 | a << 13 | c << 21" "def main(x): A = x & 31 B = x >> 5 & 63 C = x >> 11 & 511 D = x >> 20 & 4095 result = 0 result |= B result |= A << 6 result |= C << 11 result |= D << 20 return result" "def get_field(x, start_bit, end_bit): mask = 2 ** (end_bit + 1 - start_bit) - 1 return x >> start_bit & 2 ** (end_bit + 1 - start_bit) - 1 def main(x): a = get_field(x, 0, 0) b = get_field(x, 1, 14) c = get_field(x, 15, 20) d = get_field(x, 21, 27) e = get_field(x, 28, 30) f = get_field(x, 31, 31) return a | b << 1 | e << 15 | f << 18 | d << 19 | c << 26" "def get_field(x, start_bit, end_bit): mask = 2 ** (end_bit + 1 - start_bit) - 1 return x >> start_bit & mask def main(x): a = get_field(x, 0, 9) b = get_field(x, 10, 11) c = get_field(x, 12, 20) d = get_field(x, 21, 25) e = get_field(x, 26, 27) f = get_field(x, 28, 28) g = get_field(x, 29, 30) h = get_field(x, 31, 31) return f | a << 1 | h << 11 | g << 12 | e << 14 | b << 16 | c << 18 | d << 27" "def main(x): f = (x & 2147483648) >> 31 e = (x & 1073741824) >> 21 d = (x & 1006632960) >> 21 c = (x & 62914560) >> 21 b = x & 4193280 a = (x & 1023) << 22 return a | b | c | d | e | f" "def main(x): A = x & 8191 B = x >> 13 & 127 C = x >> 20 & 1023 D = x >> 30 & 1 E = x >> 31 & 1 result = 0 result |= D << 0 result |= B << 1 result |= C << 8 result |= E << 18 result |= A << 19 return result" "def main(x): A = x & 3 B = x >> 2 & 255 C = x >> 10 & 1 D = x >> 11 & 31 E = x >> 16 & 31 F = x >> 21 & 127 G = x >> 28 & 1 H = x >> 29 & 7 result = 0 result |= H result |= B << 3 result |= C << 11 result |= D << 12 result |= F << 17 result |= E << 24 result |= G << 29 result |= A << 30 return result" "def get_field(x, start_bit, end_bit): mask = 2 ** (end_bit - start_bit + 1) - 1 return x >> start_bit & mask def main(x): a = get_field(x, 0, 9) b = get_field(x, 10, 19) c = get_field(x, 20, 23) d = get_field(x, 24, 29) e = get_field(x, 30, 30) f = get_field(x, 31, 31) return a | d << 10 | e << 16 | f << 17 | c << 18 | b << 22" "def main(x): return (31 & x) << 7 | (4064 & x) >> 5 | (67104768 & x) << 6 | (4227858432 & x) >> 14" "def main(f): a_mask = 65535 b_mask = 536805376 c_mask = 1610612736 d_mask = 2147483648 a = f & a_mask b = (f & b_mask) << 3 c = (f & c_mask) >> 13 d = (f & d_mask) >> 13 final = a + b + c + d return final" "def main(x): ab = x & 2 ** 19 - 1 c = x & 7 << 19 d = x & 63 << 22 e = x & 15 << 28 return ab | e >> 9 | d << 1 | c << 10" "def main(x): A = x & 255 B = x >> 8 & 8191 C = x >> 21 & 1023 D = x >> 31 & 1 res = 0 res |= A res |= B << 8 res |= D << 21 res |= C << 22 return res" "def main(input_hex): a = int(format(input_hex, '#034b')[-10:], 2) << 10 input_hex >>= 10 b = int(format(input_hex, '#034b')[-10:], 2) << 20 input_hex >>= 10 c = int(format(input_hex, '#034b')[-9:], 2) << 1 input_hex >>= 9 d = int(format(input_hex, '#034b')[-2:], 2) << 30 input_hex >>= 2 e = int(format(input_hex, '#034b')[-1:], 2) return a + b + c + d + e" "def main(x): A = x & 511 B = x >> 9 & 1023 C = x >> 19 & 2047 D = x >> 30 & 3 result = 0 result |= D result |= A << 2 result |= B << 11 result |= C << 21 return result" "def main(x): h = x & 1 << 31 g = x & 7 << 28 f = x & 63 << 22 e = x & 3 << 20 d = x & 1 << 19 c = x & 127 << 12 b = x & 31 << 7 a = x & 127 result = 0 result |= h >> 17 result |= g >> 13 result |= f >> 22 result |= e << 10 result |= d >> 13 result |= c >> 5 result |= b << 11 result |= a << 23 return result" "def main(s): return s & 4292870144 | (s & 1048544) >> 4 | (s & 1048576) >> 20 | (s & 31) << 16" "BITFIELD_SIZES = (10, 7, 5, 4, 5, 1) bits_transform_sequence = [0, 2, 1, 3, 4, 5] def main(x, bits_sequence=bits_transform_sequence, bitfield_sizes=BITFIELD_SIZES): result = 0 current_size = None current_bitfield = None mask = None start_bit_pos = 0 current_bit_pos = 0 for bitfield_ind in bits_sequence: current_size = bitfield_sizes[bitfield_ind] mask = (1 << current_size) - 1 start_bit_pos = sum(bitfield_sizes[:bitfield_ind]) current_bitfield = x >> start_bit_pos & mask result |= current_bitfield << current_bit_pos current_bit_pos += current_size return result" "def main(x): a = x & 511 b = x >> 9 & 1023 c = x >> 19 & 15 d = x >> 23 & 3 e = x >> 25 & 31 f = x >> 30 & 1 g = x >> 31 & 1 res = 0 res |= g res |= d << 1 res |= a << 3 res |= f << 12 res |= b << 13 res |= c << 23 res |= e << 27 return res" "def main(x): A = (x & 16383) << 17 B = (x & 67092480) >> 9 C = (x & 67108864) << 5 D = (x & 4160749568) >> 27 return A | B | C | D" "def main(num): a = num & 63 b = num & 1984 c = num & 63488 d = num & 1073676288 e = num & 3221225472 return a << 26 | b << 1 | c >> 11 | d >> 4 | e >> 25" "def main(num): a = num & 1023 b = num & 8387584 c = num & 2139095040 d = num & 2147483648 return a << 14 | b >> 9 | c << 1 | d >> 31" "def main(num): a = num & 65535 b = num & 458752 c = num & 4294443008 return a << 3 | b >> 16 | c" "def main(x): A = x & 15 B = x >> 4 & 31 C = x >> 9 & 2047 D = x >> 20 & 15 E = x >> 24 & 15 F = x >> 28 & 7 G = x >> 31 & 1 result = 0 result |= F result |= A << 3 result |= E << 7 result |= B << 11 result |= C << 16 result |= G << 27 result |= D << 28 return result" "def shuffle(x): mask_a = 63 mask_b = 8128 mask_c = 536862720 mask_d = 536870912 mask_e = 3221225472 a = (x & mask_a) >> 0 << 0 b = (x & mask_b) >> 6 << 25 c = (x & mask_c) >> 13 << 7 d = (x & mask_d) >> 29 << 6 e = (x & mask_e) >> 30 << 23 return a | b | c | d | e def main(x): return shuffle(x)" "def main(x): a = x & 16383 b = x >> 14 & 255 c = x >> 22 & 511 d = x >> 31 & 1 result = d | a << 1 | c << 15 | b << 24 return result" "def get_field(x, start, end): mask = 2 ** (end + 1 - start) - 1 return x >> start & mask def main(x): bits = [6, 5, 14, 3, 4] k = 0 a = get_field(x, k, k + bits[0] - 1) k += bits[0] b = get_field(x, k, k + bits[1] - 1) k += bits[1] c = get_field(x, k, k + bits[2] - 1) k += bits[2] d = get_field(x, k, k + bits[3] - 1) k += bits[3] e = get_field(x, k, k + bits[4] - 1) return a | e << bits[0] | d << bits[0] + bits[4] | c << bits[0] + bits[4] + bits[3] | b << bits[0] + bits[4] + bits[3] + bits[2]" "def main(num): a = num & 8191 b = num & 253952 c = num & 262144 d = num & 1073217536 e = num & 1073741824 f = num & 2147483648 return a << 5 | b >> 13 | c << 11 | d >> 1 | e | f" "def main(value): bin_value = str(bin(int(value)))[2:] if len(bin_value) < 32: bin_value = (32 - len(bin_value)) * '0' + bin_value a = bin_value[28:32] b = bin_value[13:28] c = bin_value[10:13] d = bin_value[6:10] e = bin_value[0:6] result_string_bin = d + a + e + b + c result_hex = int(result_string_bin, 2) return result_hex" "def main(x): a = x >> 0 & 2 ** 12 - 1 b = x >> 12 & 2 ** 16 - 1 c = x >> 28 & 2 ** 1 - 1 d = x >> 29 & 2 ** 1 - 1 e = x >> 30 & 2 ** 2 - 1 return (c << 31) + (b << 15) + (e << 13) + (d << 12) + a" "def main(x): x1 = bin(x) x1 = list(x1) x1.reverse() while len(x1) < 34: x1.insert(31, '0') c = [] for i in range(19, 21): c.append(x1[i]) a = [] for i in range(15): a.append(x1[i]) b = [] for i in range(15, 19): b.append(x1[i]) e = [] for i in range(29, 32): e.append(x1[i]) d = [] for i in range(21, 29): d.append(x1[i]) x2 = [] x2.extend(c) x2.extend(a) x2.extend(b) x2.extend(e) x2.extend(d) x2.reverse() n = ''.join(x2) n = int(n, 2) return n" "def main(x): y = bin(x) y = list(y) while len(y) < 34: y.insert(2, '0') y.reverse() g = [] g.extend(y[18:30]) g.extend(y[0:5]) g.extend(y[5:18]) g.extend(y[30:32]) g.reverse() v = ''.join(g) q = int(v, base=2) return q" "def main(num): num = bin(int(hex(num), 16))[2:] while len(num) < 32: num = '0' + num a = num[17:23] + num[23:26] + num[3:17] + num[26:] + num[:3] return int('0b' + a, 2)" "def main(x): a = x & 7 b = x >> 3 & 1 c = x >> 4 & 65535 d = x >> 20 & 1023 e = x >> 30 & 3 result = 0 result |= a result |= d << 3 result |= e << 13 result |= c << 15 result |= b << 31 return result" "def f(x): data_b = str(bin(x))[2:] while len(data_b) < 32: data_b = '0' + data_b data_b = data_b[6:8] + data_b[0:6] + data_b[8:] data_b = data_b[0:2] + data_b[8:22] + data_b[2:8] + data_b[22:] data_b = data_b[0:20] + data_b[22:] + data_b[20:22] return int(data_b, 2) def main(x): return f(x)" "def main(x): a = format(x, '032b') a = a[0:7] + a[15] + a[7:15] + a[16:32] a = int(hex(int(a, 2)), 0) return a" "def main(x): A = x & 15 B = x >> 4 & 255 C = x >> 12 & 32767 D = x >> 27 & 7 E = x >> 30 & 3 result = 0 result |= E result |= D << 2 result |= A << 5 result |= C << 9 result |= B << 24 return result" "def main(x): a = format(x, '032b') a = a[1] + a[6:15] + a[15:22] + a[0] + a[22:30] + a[2:6] + a[30:32] a = int(hex(int(a, 2)), 0) return a" "def main(x): a = format(x, '032b') a = a[1] + a[6:15] + a[15:22] + a[0] + a[22:30] + a[2:6] + a[30:32] a = int(hex(int(a, 2)), 0) return a" "def main(x): x1 = bin(x) x1 = list(x1) x1.reverse() while len(x1) < 34: for i in range(len(x1)): if x1[i] == 'b': x1.insert(i, '0') c = [] for i in range(14, 16): c.append(x1[i]) a = [] for i in range(5): a.append(x1[i]) b = [] for i in range(5, 14): b.append(x1[i]) e = [] for i in range(30, 32): e.append(x1[i]) d = [] for i in range(16, 30): d.append(x1[i]) x2 = [] x2.extend(c) x2.extend(e) x2.extend(b) x2.extend(d) x2.extend(a) x2.reverse() n = ''.join(x2) n = int(n, 2) return n" "def get_mask(start, end): mask = 0 for i in range(start, end): mask = mask | 1 << i return mask def get_bit_field(x, start, end, new_start): mask = get_mask(start, end + 1) shifted_x_part = mask & x if new_start < start: shifted_x_part = shifted_x_part >> start - new_start else: shifted_x_part = shifted_x_part << new_start - start return shifted_x_part def main(x): result = 0 d = get_bit_field(x, 29, 31, 29) c = get_bit_field(x, 20, 28, 20) b = get_bit_field(x, 11, 19, 0) a = get_bit_field(x, 0, 10, 9) result = d | c | b | a return result" "def main(x): temp_var = int(bin(x)[2:], 2) a = temp_var & 16383 temp_var = temp_var >> 14 b = temp_var & 16383 temp_var = temp_var >> 14 c = temp_var & 1 temp_var = temp_var >> 1 d = temp_var d = d << 29 b = b << 15 a = a << 1 return d | b | a | c" "def main(nn): aa = {1: 31, 2: 5, 4: 0} bb = {1: 992, 2: 5, 4: 5} cc = {1: 4193280, 2: 12, 4: 10} dd = {1: 29360128, 2: 3, 4: 22} ee = {1: 503316480, 2: 4, 4: 25} ff = {1: 1610612736, 2: 2, 4: 29} gg = {1: 2147483648, 2: 1, 4: 31} a = (nn & aa[1]) >> aa[4] b = (nn & bb[1]) >> bb[4] c = (nn & cc[1]) >> cc[4] d = (nn & dd[1]) >> dd[4] e = (nn & ee[1]) >> ee[4] f = (nn & ff[1]) >> ff[4] g = (nn & gg[1]) >> gg[4] r = b r = r << ff[2] | f r = r << cc[2] | c r = r << gg[2] | g r = r << aa[2] | a r = r << dd[2] | d r = r << ee[2] | e return r" "def main(num): st = str(bin(num))[2:] st = st.rjust(32, '0') dd = [3, 1, 5, 7, 6, 10] ind = ['f', 'e', 'd', 'c', 'b', 'a'] tmp = dict() for (i, d) in enumerate(dd): tmp[ind[i]] = st[:d] st = st[d:] res = '' ind_target = ['e', 'a', 'b', 'c', 'd', 'f'] for i in ind_target: res += tmp[i] return int(res, 2)" "def main(x): a = x & 511 b = x >> 9 & 31 c = x >> 14 & 2047 d = x >> 25 & 3 e = x >> 27 & 3 f = x >> 29 & 3 g = x >> 31 & 1 r = g | b << 1 | e << 6 | d << 8 | a << 10 | f << 19 | c << 21 return r" "def main(x): A = (x & 8191) << 6 B = (x & 67100672) << 6 C = (x & 67108864) >> 21 D = (x & 939524096) >> 25 E = (x & 3221225472) >> 30 return A | B | C | D | E" "def main(hex_number): s = str(bin(hex_number)[2:]).rjust(32, '0') return int(s[2] + s[16:] + s[3:16] + s[0:2], 2)" "def main(x): A = x & 3 B = x >> 2 & 3 C = x >> 4 & 127 D = x >> 11 & 4095 E = x >> 23 & 7 F = x >> 26 & 15 G = x >> 30 & 1 H = x >> 31 & 1 res = 0 res |= A res |= H << 2 res |= B << 3 res |= C << 5 res |= G << 12 res |= F << 13 res |= E << 17 res |= D << 20 return res" "def main(x): A = x & 63 B = x >> 6 & 63 C = x >> 12 & 1 D = x >> 13 & 15 E = x >> 17 & 3 F = x >> 19 & 255 G = x >> 27 & 1 H = x >> 28 & 31 res = 0 res |= D res |= B << 4 res |= H << 10 res |= C << 14 res |= G << 15 res |= A << 16 res |= E << 22 res |= F << 24 return res" "def main(x): A = x & 4095 B = x >> 12 & 7 C = x >> 15 & 2047 D = x >> 26 & 1 E = x >> 27 & 7 F = x >> 30 & 3 result = 0 result |= B result |= D << 3 result |= F << 4 result |= C << 6 result |= E << 17 result |= A << 20 return result" "def main(x): A = x & 4095 B = x >> 12 & 7 C = x >> 15 & 2047 D = x >> 26 & 1 E = x >> 27 & 7 F = x >> 30 & 3 result = 0 result |= B result |= D << 3 result |= F << 4 result |= C << 6 result |= E << 17 result |= A << 20 return result" "def main(num): a = num & 127 b = num & 16256 c = num & 49152 d = num & 65536 e = num & 8257536 f = num & 4286578688 return a << 15 | b << 1 | c >> 8 | d << 15 | e >> 17 | f >> 1" "def main(hex_num): hex_num = int(hex(hex_num), 16) res = int(hex(0), 16) temp = int(hex(4026531840), 16) G = int(hex(int(hex(hex_num & temp), 16) >> 1), 16) temp = int(hex(134217728), 16) F = int(hex(int(hex(hex_num & temp), 16) >> 14), 16) temp = int(hex(117440512), 16) E = int(hex(int(hex(hex_num & temp), 16)), 16) temp = int(hex(14680064), 16) D = int(hex(int(hex(hex_num & temp), 16) >> 11), 16) temp = int(hex(2095104), 16) C = int(hex(int(hex(hex_num & temp), 16) >> 11), 16) temp = int(hex(1024), 16) B = int(hex(int(hex(hex_num & temp), 16) << 21), 16) temp = int(hex(1023), 16) A = int(hex(int(hex(hex_num & temp), 16) << 14), 16) return int(hex(res ^ G ^ F ^ D ^ E ^ C ^ B ^ A), 16)" "def main(hex_num): hex_num = int(hex(hex_num), 16) res = int(hex(0), 16) temp = int(hex(3758096384), 16) F = int(hex(int(hex(hex_num & temp), 16) >> 10), 16) temp = int(hex(402653184), 16) E = int(hex(int(hex(hex_num & temp), 16) >> 11), 16) temp = int(hex(67108864), 16) D = int(hex(int(hex(hex_num & temp), 16) >> 26), 16) temp = int(hex(33554432), 16) C = int(hex(int(hex(hex_num & temp), 16) >> 7), 16) temp = int(hex(33553408), 16) B = int(hex(int(hex(hex_num & temp), 16) >> 9), 16) temp = int(hex(1023), 16) A = int(hex(int(hex(hex_num & temp), 16) << 22), 16) return int(hex(res ^ F ^ D ^ E ^ C ^ B ^ A), 16) main(987492037) main(345592593)" "def main(hex_num): hex_num = int(hex(hex_num), 16) res = int(hex(0), 16) temp = int(hex(4227858432), 16) G = int(hex(int(hex(hex_num & temp), 16) >> 8), 16) temp = int(hex(33554432), 16) F = int(hex(int(hex(hex_num & temp), 16) >> 21), 16) temp = int(hex(29360128), 16) E = int(hex(int(hex(hex_num & temp), 16) << 7), 16) temp = int(hex(3145728), 16) D = int(hex(int(hex(hex_num & temp), 16) >> 18), 16) temp = int(hex(1048448), 16) C = int(hex(int(hex(hex_num & temp), 16) >> 2), 16) temp = int(hex(96), 16) B = int(hex(int(hex(hex_num & temp), 16) >> 5), 16) temp = int(hex(31), 16) A = int(hex(int(hex(hex_num & temp), 16) << 24), 16) return int(hex(res ^ G ^ F ^ E ^ D ^ C ^ B ^ A), 16)" "def get_mask(b, e): m = 0 p = 1 for i in range(b, e): m |= p << i return m def get_bits(b, e, val): mask = get_mask(b, e) val &= mask return val def main(val): a = get_bits(0, 12, val) b = get_bits(12, 18, val) c = get_bits(18, 31, val) d = get_bits(31, 32, val) c <<= 1 b <<= 1 d >>= 19 return a | b | c | d" "def getfirst(x): return x & 255 def getsecond(x): x &= 1048320 return x >> 8 def getthird(x): x &= 32505856 return x >> 20 def getfourth(x): x &= 1040187392 return x >> 25 def getfifth(x): x &= 3221225472 return x def merge(y): x = getfifth(y) x = x | getfirst(y) << 22 x = x | getsecond(y) << 10 x = x | getfourth(y) << 5 x = x | getthird(y) return x def main(x): return merge(x)" "def main(x): c = x >> 21 meta = x - (c << 21) b = meta >> 14 a = meta - (b << 14) x = (c << 21) + (a << 7) + b return x" "def main(x): A = x & 31 B = x >> 5 & 2047 C = x >> 16 & 65535 result = 0 result |= B result |= A << 11 result |= C << 16 return result" "def main(num): num = bin(num)[2:] while len(num) < 32: num = '0' + num a = num[9:25] + num[25:] + num[:9] return int('0b' + a, 2)" "def main(x): mask_a = 3 mask_b = 60 mask_c = 8128 mask_d = 1040384 mask_e = 3145728 mask_f = 2143289344 mask_g = 2147483648 a = x & mask_a b = x & mask_b c = x & mask_c d = x & mask_d e = x & mask_e f = x & mask_f g = x & mask_g a = a << 16 b = b << 17 c = c << 3 d = d >> 13 e = e >> 13 f = f << 1 g = g >> 13 return a | b | c | d | e | f | g" "def main(x): A = x & 511 B = x >> 9 & 16383 C = x >> 23 & 63 D = x >> 29 & 1 E = x >> 30 & 1 F = x >> 31 & 1 result = 0 result |= B result |= E << 14 result |= F << 15 result |= A << 16 result |= D << 25 result |= C << 26 return result" "def main(x): A = int(x) & 511 B = (int(x) >> 9 & 511) << 23 C = (int(x) >> 18 & 15) << 9 D = (int(x) >> 22 & 1023) << 13 return A | B | C | D" "def main(x): A = int(x) & 32767 B = (int(x) >> 15 & 511) << 23 C = (int(x) >> 24 & 15) << 15 D = (int(x) >> 28 & 15) << 19 return A | B | C | D" "def get_field(x, start_bit, end_bit): mask = 2 ** (end_bit + 1 - start_bit) - 1 return x >> start_bit & mask def main(num): a = get_field(num, 0, 12) b = get_field(num, 13, 22) c = get_field(num, 23, 24) d = get_field(num, 25, 27) e = get_field(num, 28, 28) f = get_field(num, 29, 31) res = c | a << 2 | f << 15 | e << 18 | d << 19 | b << 22 return res" "def main(x): A = x & 63 B = x >> 6 & 511 C = x >> 15 & 3 D = x >> 17 & 32767 result = 0 result |= C result |= A << 2 result |= B << 8 result |= D << 17 return result" "def main(x): A = x & 511 B = x >> 9 & 1 C = x >> 10 & 4095 D = x >> 22 & 255 E = x >> 30 result = 0 result |= D result |= E << 8 result |= B << 10 result |= C << 11 result |= A << 23 return result" "def main(f): x = format(f, 'b') str(x) if len(x) < 32: while len(x) < 32: x = '0' + x partA = x[30:] partB = x[26:30] partC = x[21:26] partD = x[17:21] partE = x[1:17] partF = x[:1] newF = partD + partA + partB + partC + partF + partE return newfun1(f, newF) def newfun1(x, newX): strX = str(x) if strX[1] != 'x': return int(newX, 2) else: return hex(int(newX, 2))" "def main(x): a = format(x, '032b') a = a[16:25] + a[25:32] + a[0] + a[1:16] a = int(hex(int(a, 2)), 0) return a" "def main(x): return (x << 14 | x >> 18) & 4294967295" "def bitset(value, begin, end): mask = 0 for i in range(begin, end): mask |= 1 << i return value & mask def main(value): temp = bitset(value, 29, 32) >> 21 temp |= bitset(value, 27, 29) << 3 temp |= bitset(value, 23, 27) >> 20 temp |= bitset(value, 20, 23) >> 20 temp |= bitset(value, 14, 20) >> 3 temp |= bitset(value, 1, 14) << 16 temp |= bitset(value, 0, 1) << 7 return temp" "def main(x): y = bin(x) y = y[2:] if len(y) < 32: for i in range(0, 32 - len(y)): y = '0' + y a = y[29:32] b = y[17:29] c = y[12:17] d = y[1:12] e = y[0] x2 = c + b + d + a + e xx = int(x2, 2) return xx" "def main(digit): result = digit >> 19 & 15 | (digit >> 8 & 2047) << 4 | (digit & 255) << 15 | digit >> 23 << 23 return result" "def main(x): A = x & 31 B = x >> 5 & 63 C = x >> 11 & 32767 D = x >> 26 & 7 E = x >> 29 & 3 F = x >> 31 & 1 result = 0 result |= D result |= F << 3 result |= A << 4 result |= C << 9 result |= B << 24 result |= E << 30 return result" "def main(x): A = x & 1023 B = x >> 10 & 255 C = x >> 18 & 511 D = x >> 27 & 7 E = x >> 30 & 3 result = 0 result |= E result |= A << 2 result |= B << 12 result |= D << 20 result |= C << 23 return result" "def main(hex_number): str_bin_number = str(bin(hex_number)[2:]).rjust(32, '0') return int(str_bin_number[1:9] + str_bin_number[29:] + str_bin_number[0] + str_bin_number[28] + str_bin_number[13:28] + str_bin_number[9:13], 2)" "def main(x): A = x & 2047 B = x >> 11 & 63 C = x >> 17 & 1 D = x >> 18 & 2047 E = x >> 29 & 3 F = x >> 31 & 1 result = 0 result |= A << 21 result |= F << 20 result |= C << 19 result |= E << 17 result |= B << 11 result |= D return result" "def main(x): A = x & 63 B = x >> 6 & 3 C = x >> 8 & 1023 D = x >> 18 & 1 E = x >> 19 & 127 F = x >> 26 & 15 G = x >> 30 & 1 H = x >> 31 & 1 result = 0 result |= A result |= B << 6 result |= F << 8 result |= C << 12 result |= D << 22 result |= E << 23 result |= G << 30 result |= H << 31 return result" "def main(x): a = bin(x) a = a[2:] a = '0' * (32 - len(a)) + a a = a[22:25] + a[10:22] + a[2:10] + a[0:2] + a[25:32] return int(a, 2)" "def main(x): x_a = (1023 & x) << 22 x_b = 127 & x >> 10 x_c = (511 & x >> 17) << 9 x_d = (15 & x >> 26) << 18 x_e = (3 & x >> 30) << 7 return x_a + x_b + x_c + x_d + x_e" "def main(x): A = x & 3 B = x >> 2 & 2047 C = x >> 13 & 7 D = x >> 16 & 63 E = x >> 22 & 31 F = x >> 27 & 7 G = x >> 30 & 3 result = 0 result |= E result |= B << 5 result |= C << 16 result |= A << 19 result |= G << 21 result |= F << 23 result |= D << 26 return result" "def main(hex_enter): A = hex_enter & 2047 B = hex_enter >> 11 & 1023 C = hex_enter >> 21 & 15 D = hex_enter >> 25 & 3 E = hex_enter >> 27 & 15 F = hex_enter >> 31 & 1 hex_exit = 0 hex_exit |= F hex_exit |= B << 1 hex_exit |= D << 11 hex_exit |= A << 13 hex_exit |= E << 24 hex_exit |= C << 28 return hex_exit" "def main(x): A = x & 15 B = x >> 4 & 2047 C = x >> 15 & 1 D = x >> 16 & 7 E = x >> 19 & 3 F = x >> 21 & 1023 G = x >> 31 & 1 result = 0 result |= G result |= C << 1 result |= D << 2 result |= F << 5 result |= A << 15 result |= E << 19 result |= B << 21 return result" "def main(x): x_a = (1 & x) << 16 x_b = (16383 & x >> 1) << 17 x_c = 63 & x >> 15 x_d = (1023 & x >> 21) << 6 x_e = (1 & x >> 31) << 31 return x_a + x_b + x_c + x_d + x_e" "def main(hexa): E = (hexa & 2147483648) >> 25 DC = (hexa & 2147483584) << 1 BA = hexa & 63 return DC | E | BA" "def main(x): x_a = (7 & x) << 24 x_b = (2047 & x >> 3) << 7 x_c = (63 & x >> 14) << 1 x_d = (31 & x >> 20) << 27 x_e = 1 & x >> 25 x_f = (63 & x >> 26) << 18 return x_a + x_b + x_c + x_d + x_e + x_f" "def main(a): b = (a & 4095) << 4 c = (a & 61440) >> 12 d = (a & 4294901760) + b + c return int('0x' + f'{d:0>8x}', 16)" "def main(x): A = x & 7 B = x >> 3 & 15 C = x >> 7 & 2047 D = x >> 18 & 3 E = x >> 20 & 1023 F = x >> 30 & 3 result = 0 result |= C result |= A << 11 result |= F << 14 result |= D << 16 result |= E << 18 result |= B << 28 return result" "def main(n): a = [0] * 32 for i in range(32): a[i] = n % 2 n //= 2 b = 0 a = a[22:30] + a[0:2] + a[2:5] + a[19:22] + a[5:6] + a[30:31] + a[6:19] + a[-1:] for i in range(32): b += a[i] * 2 ** i return int('0x' + f'{b:0>8x}', 16)" "def main(x): e = (x & 2147483648) >> 31 dc = x & 2147418112 b = (x & 32768) << 16 a = (x & 32767) << 1 return e | b | a | dc" "def main(hex_num): hex_num = int(hex(hex_num), 16) res = int(hex(0), 16) temp = int(hex(2147483648), 16) E = int(hex(int(hex(hex_num & temp), 16) >> 19), 16) temp = int(hex(1610612736), 16) D = int(hex(int(hex(hex_num & temp), 16) << 1), 16) temp = int(hex(536739840), 16) C = int(hex(int(hex(hex_num & temp), 16) >> 17), 16) temp = int(hex(131064), 16) B = int(hex(int(hex(hex_num & temp), 16) << 10), 16) temp = int(hex(7), 16) A = int(hex(int(hex(hex_num & temp), 16) << 27), 16) return int(hex(res ^ E ^ D ^ C ^ B ^ A), 16) main(2112006230) main(227478977)" "def main(x): A = x & 1 B = x >> 1 & 63 C = x >> 7 & 15 D = x >> 11 & 255 E = x >> 19 & 127 F = x >> 26 & 1 G = x >> 27 & 7 H = x >> 30 & 3 result = 0 result |= A result |= B << 1 result |= E << 7 result |= H << 14 result |= C << 16 result |= D << 20 result |= G << 28 result |= F << 31 return result" "def main(x): test = str(x) num = format(x, 'b') str(num) if len(num) < 32: while len(num) < 32: num = '0' + num d = num[:8] c = num[8:22] b = num[22:29] a = num[29:] res = b + c + d + a if test[1] == 'x': res = hex(int(res, 2)) else: res = int(res, 2) return res" "def main(bitfield): e_mask = 2147483648 e = (bitfield & e_mask) >> 4 d_mask = 1610612736 d = (bitfield & d_mask) >> 20 c_mask = 535822336 c = (bitfield & c_mask) >> 20 b_mask = 1048560 b = (bitfield & b_mask) << 7 a_mask = 15 a = (bitfield & a_mask) << 28 r = a | e | b | d | c return r" "def main(x): e = ((1 << 32) - (1 << 31) & x) >> 31 d = ((1 << 31) - (1 << 15) & x) >> 15 c = ((1 << 15) - (1 << 11) & x) >> 11 b = ((1 << 11) - (1 << 2) & x) >> 2 a = ((1 << 2) - (1 << 0) & x) >> 0 res = d << 16 | e << 15 | c << 11 | a << 9 | b return res" "def main(x): g = ((1 << 32) - (1 << 29) & x) >> 29 f = ((1 << 29) - (1 << 28) & x) >> 28 e = ((1 << 28) - (1 << 27) & x) >> 27 d = ((1 << 27) - (1 << 17) & x) >> 17 c = ((1 << 17) - (1 << 14) & x) >> 14 b = ((1 << 14) - (1 << 10) & x) >> 10 a = (1 << 10) - 1 & x res = d << 22 | e << 21 | c << 18 | b << 14 | g << 11 | f << 10 | a return res" "def main(x): A = x & 255 B = x >> 8 & 7 C = x >> 11 & 8191 D = x >> 24 & 127 E = x >> 31 & 1 result = 0 result |= B result |= E << 3 result |= D << 4 result |= C << 11 result |= A << 24 return result" "def main(x): p1 = x p2 = x p1 = p1 & 262143 p1 = p1 << 14 p2 = p2 & 4294705152 p2 = p2 >> 18 return p1 | p2" "def main(num): mask_1 = 16383 mask_2 = 1073725440 mask_3 = 3221225472 full_mask = 4294967295 a = num & mask_1 b = num & mask_2 c = num & mask_3 c = c >> 16 b = b << 2 new_num = full_mask & a | full_mask & b | full_mask & c return new_num" "def g_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = g_mask(14, 0) b_mask = g_mask(21, 14) c_mask = g_mask(32, 21) a = x & a_mask b = x & b_mask c = x & c_mask a = a << 18 b = b >> 14 c = c >> 14 return a | b | c" "def main(x): a_mask = 1023 b_mask = 7168 c_mask = 8380416 d_mask = 4286578688 a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask a = a << 10 b = b << 10 c = c >> 13 return a | b | c | d" "def main(x): a_mask = 1023 b_mask = 4193280 c_mask = 4290772992 a = x & a_mask b = x & b_mask c = x & c_mask b = b << 10 c = c >> 12 return a | b | c" "def main(arg: hex) -> hex: a_mask = 16383 b_mask = 4177920 c_mask = 264241152 d_mask = 4026531840 a = arg & a_mask b = arg & b_mask c = arg & c_mask d = arg & d_mask c = c >> 22 a = a << 18 b = b >> 4 d = d >> 22 return a + b + d + c main(1002895797) main(2858031281)" "def main(x): a = x & 1 b = x >> 1 & 16383 c = x >> 15 & 7 d = x >> 18 & 511 e = x >> 27 & 7 f = x >> 30 & 3 res = a | c << 1 | b << 4 | d << 18 | (f << 27 | e << 29) return res" "def main(x): a = x & 15 b = x >> 4 & 1023 c = x >> 14 & 1023 d = x >> 24 & 3 e = x >> 26 & 63 res = d | a << 2 | b << 6 | e << 16 | c << 22 return res" "def set_mask(start, end): mask = 0 for i in range(start, end): mask = mask | 1 << i return mask def change_bit_field(x, start, end, new_start): mask = set_mask(start, end + 1) shifted_x_part = mask & x if new_start < start: shifted_x_part = shifted_x_part >> start - new_start else: shifted_x_part = shifted_x_part << new_start - start return shifted_x_part def main(x): result = 0 e = change_bit_field(x, 31, 31, 18) d = change_bit_field(x, 30, 30, 19) c = change_bit_field(x, 14, 29, 0) b = change_bit_field(x, 12, 13, 16) a = change_bit_field(x, 0, 11, 20) result = e | d | c | b | a return result" "def main(x): A = x & 1023 B = x >> 10 & 3 C = x >> 12 & 1 D = x >> 13 & 4095 E = x >> 25 & 127 result = 0 result |= A result |= E << 10 result |= C << 17 result |= D << 18 result |= B << 30 return result" "def main(x): f = x >> 28 e = x >> 25 e = e & 7 d = x >> 24 d = d & 1 c = x >> 14 c = c & 1023 b = x >> 5 b = b & 511 a = x & 31 num = f num = num << 10 num = num | c num = num << 3 num = num | e num = num << 9 num = num | b num = num << 1 num = num | d num = num << 5 num = num | a return num" "def main(x): f = (3221225472 & x) >> 3 e = (805306368 & x) >> 3 d = (260046848 & x) >> 11 c = (7340032 & x) << 9 b = (1044480 & x) << 5 a = 4095 & x return a | b | c | d | e | f" "def main(x): binary = str(bin(x))[2:] for i in range(32 - len(binary)): binary = '0' + binary d = binary[0:3] c = binary[3:9] b = binary[9:22] a = binary[22:32] return int(d + a + c + b, 2)" "def main(x): A = x & 4095 B = x >> 12 & 4095 C = x >> 24 & 1 D = x >> 25 & 7 E = x >> 28 & 7 F = x >> 31 & 1 result = 0 result |= C result |= E << 1 result |= A << 4 result |= B << 16 result |= F << 28 result |= D << 29 return result" "def main(x): a = int(x) & 511 b = int(x) >> 9 & 31 c = int(x) >> 14 & 15 d = int(x) >> 18 & 4095 e = int(x) >> 30 & 1 f = int(x) >> 31 result = c << 28 | f << 27 | d << 15 | a << 6 | b << 1 | e return result" "def main(num): a = num & 2 ** 3 - 2 ** 0 b = num & 2 ** 5 - 2 ** 3 c = num & 2 ** 12 - 2 ** 5 d = num & 2 ** 15 - 2 ** 12 e = num & 2 ** 24 - 2 ** 15 f = num & 2 ** 30 - 2 ** 24 g = num & 2 ** 31 - 2 ** 30 h = num & 2 ** 32 - 2 ** 31 a <<= 24 b <<= 10 c >>= 5 d <<= 15 f >>= 17 g <<= 1 h >>= 1 return a | b | c | d | e | f | g | h" "def main(x): s = str(bin(x))[2:] if len(s) != 32: s = (32 - len(s)) * '0' + s (f, e, d, c, b) = (s[-32:-21], s[-21:-18], s[-18:-12], s[-12:-5], s[-5:-1]) a = s[-1] return int(d + a + e + c + b + f, 2)" "def main(a): a = str(bin(a)) a = a[2:] while len(a) != 32: a = '0' + a A = a[27:32] B = a[11:27] C = a[10] D = a[4:10] E = a[1:4] F = a[0] ans = '0b' + B + F + D + E + C + A return int(ans, 2)" "def constr(A, B, C, D, E): x = E + (D << 1) + (A << 8) + (C << 10) + (B << 22) return x def sep(x): E = x >> 31 D = (x >> 24) - (E << 7) C = (x >> 12) - ((D << 12) + (E << 19)) B = (x >> 2) - ((C << 10) + (D << 22) + (E << 29)) A = x - ((B << 2) + (C << 12) + (D << 24) + (E << 31)) return constr(A, B, C, D, E) def main(x): return sep(x)" "def main(x): a = format(x, '032b') a = a[14:23] + a[23:32] + a[0:14] return int(hex(int(a, 2)), 0)" "def main(x): a = format(x, '032b') a = a[21:32] + a[18:21] + a[2:7] + a[:2] + a[7:13] + a[13] + a[14:18] a = int(hex(int(a, 2)), 0) return a" "def main(x): a = format(x, '032b') a = a[19:23] + a[0] + a[1:5] + a[8:19] + a[23:32] + a[5:8] a = int(hex(int(a, 2)), 0) return a" "def main(x): x1 = bin(x) x1 = list(x1) x1.reverse() while len(x1) < 34: x1.insert(31, '0') c = [] for i in range(31, 32): c.append(x1[i]) a = [] for i in range(3): a.append(x1[i]) b = [] for i in range(3, 19): b.append(x1[i]) e = [] for i in range(19, 27): e.append(x1[i]) d = [] for i in range(27, 31): d.append(x1[i]) x2 = [] x2.extend(c) x2.extend(a) x2.extend(b) x2.extend(e) x2.extend(d) x2.reverse() n = ''.join(x2) n = int(n, 2) return n" "def main(x): a = x & 16383 b = x >> 14 & 65535 c = x >> 30 & 1 d = x >> 31 & 1 res = a | c << 14 | b << 15 | d << 31 return res" "def main(stroka): A = stroka << 26 A = A & 469762048 B = stroka >> 3 B = B & 63 C = stroka << 1 C = C & 67107840 D = stroka >> 19 D = D & 192 E = stroka >> 19 E = E & 768 F = stroka << 1 F = F & 3221225472 G = stroka >> 2 G = G & 536870912 Result = A | B | C | D | E | F | G return Result" "def get_field(x, start_bit, end_bit): mask = 2 ** (end_bit + 1 - start_bit) - 1 return x >> start_bit & mask def main(x): a = get_field(x, 0, 12) b = get_field(x, 13, 28) c = get_field(x, 29, 30) d = get_field(x, 31, 31) return c | a << 2 | d << 15 | b << 16" "def main(x): A = x & 15 B = x >> 4 & 4095 C = x >> 16 & 1 D = x >> 17 & 31 E = x >> 22 & 511 F = x >> 31 & 1 result = 0 result |= F result |= C << 1 result |= E << 2 result |= A << 11 result |= D << 15 result |= B << 20 return result" "def main(num): a_mask = 31 b_mask = 131040 c_mask = 33423360 d_mask = 33554432 e_mask = 469762048 f_mask = 1610612736 g_mask = 2147483648 a = num & a_mask b = num & b_mask c = num & c_mask d = num & d_mask e = num & e_mask f = num & f_mask g = num & g_mask a = a << 6 b = b << 6 c = c << 6 d = d >> 20 e = e >> 24 f = f >> 29 new_num = a | b | c | d | e | f | g return new_num" "def main(x): a = x & 3 b = x >> 2 & 1023 c = x >> 12 & 31 d = x >> 17 & 4095 e = x >> 29 & 7 res = a | d << 2 | b << 14 | e << 24 | c << 27 return res" "def main(a): a = bin(a) a = str(a) st = a[-4:] a = a[:-4] a = a[:-15] + st + a[-15:] a = int(a, 2) return a" "def main(x): a = x & 4095 b = x >> 12 & 2047 c = x >> 23 & 511 res = b | c << 11 | a << 20 return res" "def get_field(x, start, end): mask = 2 ** (end + 1 - start) - 1 return x >> start & mask def main(x): bits = [4, 12, 2, 3, 1, 10] k = 0 a = get_field(x, k, k + bits[0] - 1) k += bits[0] b = get_field(x, k, k + bits[1] - 1) k += bits[1] c = get_field(x, k, k + bits[2] - 1) k += bits[2] d = get_field(x, k, k + bits[3] - 1) k += bits[3] e = get_field(x, k, k + bits[4] - 1) k += bits[4] f = get_field(x, k, k + bits[5] - 1) return d | e << bits[3] | a << bits[3] + bits[4] | b << bits[3] + bits[4] + bits[0] | c << bits[3] + bits[4] + bits[0] + bits[1] | f << bits[3] + bits[4] + bits[0] + bits[1] + bits[2] main(1473591095)" "def main(test): test = test | 2 ** 33 test = bin(test) test = test[4:] a = test[-13:] b = test[-21:-13] c = test[-25:-21] d = test[-30:-25] e = test[-31] f = test[-32] test = c + a + d + b + e + f test = int(test, 2) return test" "def main(x): t = x s = '' while t > 0: s = str(t % 2) + s t //= 2 if len(s) < 32: for i in range(32 - len(s)): s = '0' + s lst = [0] * 32 for i in range(len(lst)): lst[len(lst) - 1 - i] = s[len(s) - 1 - i] A = lst[-8:] B = lst[-20:-8] C = lst[-30:-20] D = lst[-32:-30] lst[-30:-18] = B lst[-18:-8] = C fin = 0 for i in range(len(lst)): fin += 2 ** i if int(lst[len(lst) - 1 - i]) == 1 else 0 return fin" "import math def main(x): A = x & 16383 B = x >> 14 & 16383 C = x >> 28 & 7 D = x >> 31 & 1 res = 0 res |= A res |= D << 14 res |= B << 15 res |= C << 29 return res" "def main(x): A = x & 1023 B = x >> 10 & 31 C = x >> 15 & 31 D = x >> 20 & 255 E = x >> 28 & 15 result = 0 result |= A result |= C << 10 result |= B << 15 result |= E << 20 result |= D << 24 return result" "def main(x): a = x & 2047 b = x >> 11 & 2047 c = x >> 22 & 31 d = x >> 27 & 3 e = x >> 29 & 1 f = x >> 30 & 3 res = a | c << 11 | f << 16 | e << 18 | b << 19 | d << 30 return res" "def main(x): a = x & 2 ** 10 - 1 b = (x & 2 ** 18 - 1) >> 10 c = x >> 18 return c + (b << 14) + (a << 22)" "def get_field(x, start_bit, end_bit): mask = 2 ** (end_bit + 1 - start_bit) - 1 return x >> start_bit & mask def main(x): a = get_field(x, 0, 3) b = get_field(x, 4, 14) c = get_field(x, 15, 30) d = get_field(x, 31, 31) return d | a << 1 | b << 5 | c << 16" "def main(x): e = x & 4160749568 d = x & 67108864 c = x & 66060288 b = x & 1048320 a = x & 255 e = e >> 13 d = d << 5 c = c >> 12 b = b << 11 return a + b + c + d + e" "def main(hex_num): hex_num = int(hex(hex_num), 16) res = int(hex(0), 16) temp = int(hex(4294836224), 16) D = int(hex(int(hex(hex_num & temp), 16)), 16) temp = int(hex(122880), 16) C = int(hex(int(hex(hex_num & temp), 16) >> 13), 16) temp = int(hex(8128), 16) B = int(hex(int(hex(hex_num & temp), 16) << 4), 16) temp = int(hex(63), 16) A = int(hex(int(hex(hex_num & temp), 16) << 4), 16) return int(hex(res ^ D ^ C ^ B ^ A), 16)" "def main(x): D = x & 63 << 26 C = (x & 1 << 25) >> 9 B = (x & 511 << 16) << 1 A = x & 2 ** 16 - 1 return D | C | B | A" "def main(x): A = x & 3 B = x >> 2 & 3 C = x >> 4 & 15 D = x >> 8 & 63 E = x >> 14 & 8191 F = x >> 27 & 31 result = 0 result |= D result |= C << 6 result |= A << 10 result |= F << 12 result |= E << 17 result |= B << 30 return result" "def main(value): bin_value = str(bin(int(value)))[2:] if len(bin_value) < 32: bin_value = (32 - len(bin_value)) * '0' + bin_value a = bin_value[24:32] b = bin_value[14:24] c = bin_value[11:14] d = bin_value[2:11] e = bin_value[1] f = bin_value[0] result_string_bin = e + f + b + d + c + a result = int(result_string_bin, 2) return result" "def main(x): op1 = x xF = 4261412864 xE = 33423360 xD = 129024 xC = 1920 xB = 96 xA = 31 F = op1 & xF F = F >> 25 E = op1 & xE E = E >> 10 D = op1 & xD D = D << 6 C = op1 & xC C = C << 21 B = op1 & xB B = B << 10 A = op1 & xA A = A << 23 answer = F + E + D + C + B + A return answer" "def transcoder(bits): a = bits & maskgen(0, 13) b = bits & maskgen(13, 14) c = bits & maskgen(14, 25) d = bits & maskgen(25, 27) e = bits & maskgen(27, 30) f = bits & maskgen(30, 31) g = bits & maskgen(31, 32) newa = a << 1 newb = b << 2 newc = c << 7 newd = d >> 6 newe = e >> 11 newf = f >> 16 newg = g >> 31 return newa | newb | newc | newd | newe | newf | newg def maskgen(offset, count): return 2 ** count - 2 ** offset def main(input): return transcoder(input)" "def transcoder(bits): a = bits & maskgen(0, 6) b = bits & maskgen(6, 21) c = bits & maskgen(21, 23) d = bits & maskgen(23, 24) e = bits & maskgen(24, 32) newa = a << 8 newb = b << 9 newc = c << 9 newd = d >> 9 newe = e >> 24 return newa | newb | newc | newd | newe def maskgen(offset, count): return 2 ** count - 2 ** offset def main(input): return transcoder(input)" "def main(x): x_a = (31 & x) << 22 x_b = (2047 & x >> 5) << 8 x_c = (31 & x >> 16) << 27 x_d = (63 & x >> 21) << 2 x_e = (7 & x >> 27) << 19 x_f = 3 & x >> 30 return x_a + x_b + x_c + x_d + x_e + x_f" "def main(x): A = x & 1 B = x >> 1 & 32767 C = x >> 16 & 255 D = x >> 24 & 3 E = x >> 26 & 15 F = x >> 30 & 3 result = 0 result |= F result |= B << 2 result |= E << 17 result |= D << 21 result |= C << 23 result |= A << 31 return result" "def main(x): A = x & 2047 B = x >> 11 & 16383 C = x >> 25 & 127 result = 0 result |= B result |= A << 14 result |= C << 25 return result" "def main(num): binary = bin(num) while len(binary) != 34: binary = binary[:2] + '0' + binary[2:] e = binary[2:5] d = binary[5:20] c = binary[20:26] b = binary[26:31] a = binary[31:34] a = int(a, 2) << 14 b = int(b, 2) << 3 c = int(c, 2) << 8 d = int(d, 2) << 17 e = int(e, 2) return a | b | c | d | e" "def main(x): a = (x & 65535) << 16 b = (x & 16711680) >> 16 c = (x & 4278190080) >> 16 return a | b | c" "def main(x): a = x & 65535 b = x & 8323072 c = x & 1065353216 d = x & 1073741824 e = x & 2147483648 return (c << 2) + (a << 9) + (d >> 22) + (e >> 24) + (b >> 16)" "def main(x): a = x & 32767 b = x >> 15 & 2047 c = x >> 26 & 7 d = x >> 29 & 7 result = 0 result |= a << 14 result |= b result |= c << 11 result |= d << 29 return result" "def main(x): y = format(x, 'b') if len(y) < 32: y = '0' * (32 - len(y)) + y temp = y[0:3] temp += y[30:] temp += y[19:26] temp += y[13:19] temp += y[26:30] temp += y[3:13] a = int(temp, 2) temp = format(a, 'd') temp = int(temp) return temp" "def main(x): a_mask = 511 b_mask = 15872 c_mask = 16384 d_mask = 32768 e_mask = 4128768 f_mask = 532676608 g_mask = 3758096384 a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask e = x & e_mask f = x & f_mask g = x & g_mask a = a << 23 b = b >> 3 c = c << 5 d = d << 3 e = e >> 16 f = f >> 11 g = g >> 9 return a | b | c | d | e | f | g" "def main(x): op1 = x xE = 3758096384 xD = 268435456 xC = 264241152 xB = 4190208 xA = 4095 E = op1 & xE E = E >> 6 D = op1 & xD D = D >> 28 C = op1 & xC C = C << 4 B = op1 & xB B = B << 1 A = op1 & xA A = A << 1 answer = C + E + B + A + D return answer" "def main(a): a = bin(a) while len(a) != 34: a = a[:2] + '0' + a[2:] b = a a = a[:2] + b[19:] + a[17:] a = a[:17] + b[2:14] + a[29:] a = a[:29] + b[14:19] + a[34:] return int(a, 2)" "def main(x): a = x << 3 & 8 b = x << 30 & 2147483648 c = x << 2 & 32752 d = x << 15 & 1879048192 e = x >> 1 & 16744448 f = x >> 25 & 7 g = x >> 4 & 251658240 return a + b + c + d + e + f + g" "def main(x): d = (x & 4227858432) >> 26 c = (x & 67043328) >> 10 b = (x & 63488) << 16 a = (x & 2047) << 16 return a | b | c | d" "def main(hex_num): hex_num = int(hex(hex_num), 16) res = int(hex(0), 16) temp = int(hex(2147483648), 16) E = int(hex(int(hex(hex_num & temp), 16)), 16) temp = int(hex(2130706432), 16) D = int(hex(int(hex(hex_num & temp), 16)), 16) temp = int(hex(16515072), 16) C = int(hex(int(hex(hex_num & temp), 16) >> 12), 16) temp = int(hex(258048), 16) B = int(hex(int(hex(hex_num & temp), 16) >> 12), 16) temp = int(hex(4095), 16) A = int(hex(int(hex(hex_num & temp), 16) << 12), 16) return int(hex(res ^ D ^ E ^ C ^ B ^ A), 16)" "def main(hex_num): hex_num = int(hex(hex_num), 16) res = int(hex(0), 16) temp = int(hex(3221225472), 16) F = int(hex(int(hex(hex_num & temp), 16)), 16) temp = int(hex(536870912), 16) E = int(hex(int(hex(hex_num & temp), 16) >> 4), 16) temp = int(hex(503316480), 16) D = int(hex(int(hex(hex_num & temp), 16) << 1), 16) temp = int(hex(16777216), 16) C = int(hex(int(hex(hex_num & temp), 16) >> 24), 16) temp = int(hex(16773120), 16) B = int(hex(int(hex(hex_num & temp), 16) << 1), 16) temp = int(hex(4095), 16) A = int(hex(int(hex(hex_num & temp), 16) << 1), 16) return int(hex(res ^ F ^ E ^ D ^ C ^ B ^ A), 16)" "def main(digit): A = digit & 7 digit = digit >> 3 B = digit & 127 digit = digit >> 7 C = digit & 16383 digit = digit >> 14 D = digit & 7 digit = digit >> 3 E = digit & 1 digit = digit >> 1 F = digit & 7 digit = digit >> 3 G = digit & 1 d = A << 29 | B << 22 | D << 19 | G << 18 | F << 15 | C << 1 | E << 0 return d" "def main(x): A = x & 1 B = x >> 1 & 32767 C = x >> 16 & 63 D = x >> 22 & 511 E = x >> 31 & 1 result = 0 result |= B result |= A << 15 result |= E << 16 result |= C << 17 result |= D << 23 return result" "def do_magic(x): a_mask = 63 b_mask = 448 c_mask = 7680 d_mask = 516096 e_mask = 1572864 f_mask = 2145386496 g_mask = 2147483648 new_a = (x & a_mask) >> 0 << 3 new_b = (x & b_mask) >> 6 << 0 new_c = (x & c_mask) >> 9 << 9 new_d = (x & d_mask) >> 13 << 25 new_e = (x & e_mask) >> 19 << 23 new_f = (x & f_mask) >> 21 << 13 new_g = (x & g_mask) >> 31 << 31 return new_a | new_b | new_c | new_d | new_e | new_f | new_g def main(x): return do_magic(x)" "def main(x): a = x & 31 b = x >> 5 & 255 c = x >> 13 & 63 d = x >> 19 & 2047 e = x >> 30 & 1 f = x >> 31 & 1 res = c | f << 6 | d << 7 | b << 18 | e << 26 | a << 27 return res" "mask_a = 511 mask_b = 65024 mask_c = 134152192 mask_d = 2013265920 mask_e = 2147483648 def main(num): a = (num & mask_a) << 12 b = (num & mask_b) << 16 c = (num & mask_c) >> 15 d = (num & mask_d) >> 6 e = (num & mask_e) >> 31 return a + b + c + d + e" "def main(x): a_mask = 255 a_pos = 31 - 7 b_mask = 16776960 b_pos = 15 - 23 c_mask = 520093696 c_pos = 23 - 28 d_mask = 1610612736 d_pos = 17 - 30 e_mask = 2147483648 e_pos = 18 - 31 a = (x & a_mask) << a_pos b = (x & b_mask) >> -b_pos c = (x & c_mask) >> -c_pos d = (x & d_mask) >> -d_pos e = (x & e_mask) >> -e_pos return a | b | c | d | e" "def main(x): A = x & 16383 B = x >> 14 & 4095 C = x >> 26 & 1 D = x >> 27 & 31 result = 0 result |= B << 20 result |= D << 15 result |= C << 14 result |= A << 0 return result" "def main(x): mask_a = 63 mask_b = 8128 mask_c = 268427264 mask_d = 805306368 mask_e = 1073741824 mask_f = 2147483648 a = x & mask_a b = x & mask_b c = x & mask_c d = x & mask_d e = x & mask_e f = x & mask_f a = a << 26 b = b << 11 c = c >> 12 d = d >> 4 e = e >> 30 f = f >> 15 return a | b | c | d | e | f" "def main(chislo): g = chislo & 2147483648 f = chislo & 1073741824 e = chislo & 939524096 d = chislo & 133693440 c = chislo & 524032 b = chislo & 128 a = chislo & 127 a = a << 24 d = d >> 3 f = f >> 15 c = c >> 4 e = e >> 26 b = b >> 7 return a + b + c + d + e + f + g" "def main(x): A = x & 31 B = x >> 5 & 2047 C = x >> 16 & 4095 D = x >> 28 & 1 E = x >> 29 & 3 F = x >> 31 & 1 result = 0 result |= C result |= B << 12 result |= F << 23 result |= D << 24 result |= E << 25 result |= A << 27 return result" "def main(x): test = str(x) num = format(x, 'b') str(num) if len(num) < 32: while len(num) < 32: num = '0' + num e = num[:1] d = num[1:5] c = num[5:19] b = num[19:31] a = num[31:] res = c + e + b + a + d if test[1] == 'x': res = hex(int(res, 2)) else: res = int(res, 2) return res" "def main(x): a = x & 7 b = x >> 3 & 31 c = x >> 8 & 1 d = x >> 9 & 2047 e = x >> 20 & 127 f = x >> 27 & 15 g = x >> 31 & 1 x = e | c << 7 | f << 8 | b << 12 | d << 17 | a << 28 | g << 31 return x" "def main(x): test = str(x) num = format(x, 'b') str(num) if len(num) < 32: while len(num) < 32: num = '0' + num c = num[:11] b = num[11:27] a = num[27:] res = b + c + a if test[1] == 'x': res = hex(int(res, 2)) else: res = int(res, 2) return res" "def get_field(x, start_bit, end_bit): mask = 2 ** (end_bit - start_bit) - 1 return x >> start_bit & mask def main(x): bits = [2, 13, 6, 1, 1, 8, 1] k = 0 a = get_field(x, k, k + bits[0]) k += bits[0] b = get_field(x, k, k + bits[1]) k += bits[1] c = get_field(x, k, k + bits[2]) k += bits[2] d = get_field(x, k, k + bits[3]) k += bits[3] e = get_field(x, k, k + bits[4]) k += bits[4] f = get_field(x, k, k + bits[5]) k += bits[5] g = get_field(x, k, k + bits[6]) return b | f << bits[1] | g << bits[1] + bits[5] | e << bits[1] + bits[5] + bits[6] | d << bits[1] + bits[5] + bits[6] + bits[4] | c << bits[1] + bits[5] + bits[6] + bits[4] + bits[3] | a << bits[1] + bits[5] + bits[6] + bits[4] + bits[3] + bits[2]" "def main(x): test = str(x) num = format(x, 'b') str(num) if len(num) < 32: while len(num) < 32: num = '0' + num f = num[:1] e = num[1:2] d = num[2:11] c = num[11:19] b = num[19:26] a = num[26:] res = b + a + f + c + d + e if test[1] == 'x': res = hex(int(res, 2)) else: res = int(res, 2) return res" "def main(num): A = num & 63 B = num >> 6 & 63 C = num >> 12 & 63 D = num >> 18 & 15 E = num >> 22 & 127 F = num >> 29 & 7 result = 0 result |= D result |= C << 4 result |= A << 10 result |= E << 16 result |= B << 23 result |= F << 29 if str(num)[0:2] == '0b': return bin(result) elif str(num)[0:2] == '0o': return oct(result) elif str(num)[0:2] == '0x': return hex(result) else: return result" "def main(x): e = x >> 31 & 1 d = x >> 20 & 2047 c = x >> 14 & 63 b = x >> 2 & 4095 a = x & 3 res = c | d << 6 | b << 17 | a << 29 | e << 31 return res" "def main(x): a = x & 8191 b = x >> 13 & 32767 c = x >> 28 & 1 d = x >> 29 & 1 e = x >> 30 & 1 f = x >> 31 & 1 result = f | a << 1 | c << 14 | d << 15 | b << 16 | e << 31 return result" "def main(x): a = x & 16383 b = x >> 14 & 8191 c = x >> 27 & 7 d = x >> 30 & 1 e = x >> 31 & 1 res = c | d << 3 | a << 4 | b << 18 | e << 31 return res" "def main(x): a = x & 511 b = x >> 9 & 1023 c = x >> 19 & 15 d = x >> 23 & 15 e = x >> 27 & 1 f = x >> 28 & 1 g = x >> 29 & 3 h = x >> 31 & 1 result = g << 0 | d << 2 | b << 6 | h << 16 | f << 17 | e << 18 | a << 19 | c << 28 return result" "def main(x): a = x & 7 b = x >> 3 & 31 c = x >> 8 & 4095 d = x >> 20 & 255 e = x >> 28 & 7 f = x >> 31 & 1 result = b << 27 | e << 24 | d << 16 | f << 15 | c << 3 | a return result" "def main(x): a = x & 3 b = x >> 2 & 3 c = x >> 4 & 63 d = x >> 10 & 63 e = x >> 16 & 4095 f = x >> 28 & 3 g = x >> 30 & 3 result = b | a << 2 | e << 4 | d << 16 return result | c << 22 | f << 28 | g << 30" "def main(x): a = x & 31 b = x >> 5 & 4095 c = x >> 17 & 15 d = x >> 21 & 31 e = x >> 26 & 7 f = x >> 29 & 3 g = x >> 31 & 1 result = b | g << 12 | a << 13 | c << 18 | f << 22 | d << 24 | e << 29 return result" "def main(x): a = x & 4095 b = x >> 12 & 16383 c = x >> 26 & 7 d = x >> 29 & 1 e = x >> 30 & 1 f = x >> 31 & 1 result = f | c << 1 | b << 4 | d << 18 | e << 19 | a << 20 return result" "def main(x): a = x & 65535 b = x >> 16 & 8191 c = x >> 29 & 7 result = c << 0 | b << 3 | a << 16 return result" "def main(x): a = x & 8191 b = x >> 13 & 15 c = x >> 17 & 7 d = x >> 20 & 63 e = x >> 26 & 31 f = x >> 31 & 1 result = c | e << 3 | f << 8 | b << 9 | d << 13 | a << 19 return result" "def main(x): a = x & 511 b = x >> 8 & 32767 c = x >> 23 & 15 d = x >> 27 & 3 e = x >> 29 & 7 result = d | b << 2 | a << 17 | e << 25 | c << 28 return result" "def main(x): a = x & 7 b = x >> 3 & 32767 c = x >> 18 & 2047 d = x >> 29 & 1 e = x >> 30 & 3 result = d | c << 1 | e << 12 | a << 14 | b << 17 return result" "def main(x): a = x & 255 b = x >> 8 & 65535 c = x >> 24 & 127 d = x >> 31 & 1 return d | a << 1 | b << 9 | c << 25" "def main(num): binary = f'{num:0>32b}' A = binary[18:] B = binary[2:18] C = binary[:2] return int(A + B + C, 2)" "def main(x): a = x & 31 b = x >> 5 & 255 c = x >> 13 & 4095 d = x >> 25 & 1 e = x >> 26 & 31 f = x >> 31 & 1 result = c | f << 12 | b << 13 | d << 21 | a << 22 | e << 27 return result" "def main(x): a = x & 2 ** 14 - 1 b = (x & 2 ** 27 - 1) >> 14 c = (x & 2 ** 30 - 1) >> 27 d = x >> 30 return c + (b << 3) + (d << 16) + (a << 18)" "def main(x): a = x & 15 b = x >> 4 & 63 c = x >> 10 & 16383 d = x >> 24 & 255 return d | c << 8 | b << 22 | a << 28" "def main(x): a = x & 31 b = x >> 5 & 65535 c = x >> 21 & 127 d = x >> 28 & 1 e = x >> 29 & 7 return d | a << 1 | b << 6 | c << 22 | e << 29" "def main(x): a = x & 65535 b = x >> 16 & 255 c = x >> 24 & 1 d = x >> 25 & 63 e = x >> 31 & 1 return a | e << 16 | c << 17 | d << 18 | b << 24" "def main(x): a = x & 65535 b = x >> 16 & 1 c = x >> 17 & 511 d = x >> 26 & 7 e = x >> 29 & 1 f = x >> 30 & 1 g = x >> 31 & 1 return d | e << 3 | c << 4 | g << 13 | b << 14 | a << 15 | f << 31" "def main(x): a = x & 511 b = x >> 9 & 32767 c = x >> 24 & 3 d = x >> 26 & 15 e = x >> 30 & 3 return d | c << 4 | b << 6 | a << 21 | e << 30" "def main(x): a = x & 7 b = x >> 3 & 63 c = x >> 9 & 63 d = x >> 15 & 65535 e = x >> 31 & 1 return d | c << 16 | e << 22 | b << 23 | a << 29" "def main(x): A = x & 4095 B = x >> 12 & 15 C = x >> 16 & 63 D = x >> 22 & 31 E = x >> 27 & 1 F = x >> 28 & 1 G = x >> 29 & 1 H = x >> 30 & 3 res = 0 res |= H res |= D << 2 res |= B << 7 res |= A << 11 res |= G << 23 res |= C << 24 res |= F << 30 res |= E << 31 return res" "def main(x): a = x & 65535 b = x >> 16 & 1 c = x >> 17 & 32767 return c | b << 15 | a << 16" "def main(x): a = x & 31 b = x >> 5 & 63 c = x >> 11 & 127 d = x >> 18 & 3 e = x >> 20 & 3 f = x >> 22 & 63 g = x >> 28 & 15 return c | f << 7 | b << 13 | e << 19 | g << 21 | d << 25 | a << 27" "def main(x): a = x & 1023 b = x >> 10 & 31 c = x >> 15 & 1 d = x >> 16 & 8191 e = x >> 29 & 3 f = x >> 31 & 1 return e | b << 2 | d << 7 | c << 20 | f << 21 | a << 22" "def main(x): a = x & 511 b = x >> 9 & 8191 c = x >> 22 & 1023 return b | c << 13 | a << 23" "def main(x): A = x & 4095 B = x & 134213632 C = (x & 402653184) << 3 D = (x & 3758096384) >> 2 return A | B | C | D" "def main(x): a = x & 4095 b = x >> 12 & 7 c = x >> 15 & 255 d = x >> 23 & 511 return c | d << 8 | b << 17 | a << 20" "def main(x): return (15 & x) << 10 | (262128 & x) << 10 | (1835008 & x) << 10 | (2145386496 & x) >> 21 | 2147483648 & x" "def main(x): a = x & 255 b = x >> 8 & 3 c = x >> 10 & 127 d = x >> 17 & 4095 e = x >> 29 & 1 f = x >> 30 & 1 g = x >> 31 & 1 return d | f << 12 | c << 13 | g << 20 | e << 21 | b << 22 | a << 24" "def main(x): a = x & 1023 b = x >> 10 & 511 c = x >> 19 & 4095 d = x >> 31 & 1 return b | a << 9 | d << 19 | c << 20" "def main(x): x_2 = str(x) x_2 = int(x_2, 10) a = x_2 % 2 ** 9 a = a << 13 b = x_2 % 2 ** 19 b = b - b % 2 ** 9 b = b >> 9 c = x_2 % 2 ** 20 c = c - c % 2 ** 19 c = c << 12 d = x_2 % 2 ** 30 d = d - d % 2 ** 20 d = d << 2 e = x_2 % 2 ** 30 e = e - e % 2 ** 29 e = e >> 17 gf = x_2 % 2 ** 32 gf = gf - gf % 2 ** 30 gf = gf >> 20 output = a | b | c | d | e | gf return output" "def main(x): g = (x & 2147483648) >> 17 f = (x & 2080374784) >> 17 e = (x & 65011712) << 6 d = (x & 1966080) >> 2 c = (x & 129024) >> 11 b = (x & 2040) << 16 a = (x & 7) << 6 return a | b | c | d | e | f | g" "def create_segment(x, original_position, length, new_position): mask = 2 ** (original_position + length) - 2 ** original_position segment = x & mask if original_position < new_position: return segment << new_position - original_position else: return segment >> original_position - new_position def main(x): result = 0 result |= create_segment(x, 0, 11, 5) result |= create_segment(x, 11, 2, 0) result |= create_segment(x, 13, 1, 3) result |= create_segment(x, 14, 6, 23) result |= create_segment(x, 20, 7, 16) result |= create_segment(x, 27, 1, 2) result |= create_segment(x, 28, 3, 29) result |= create_segment(x, 31, 1, 4) return result main(2115615165) main(2157032537)" "def main(chislo): e = chislo & 2147483648 d = chislo & 1073741824 c = chislo & 1073217536 b = chislo & 524280 a = chislo & 7 a = a << 13 d = d >> 30 c = c >> 17 e = e >> 30 b = b << 13 return a + b + c + d + e" "def main(x): a = x & 31 b = x >> 5 & 4095 c = x >> 17 & 32767 return b | a << 12 | c << 17" "def main(h): a = h & 1023 c = h & 1023 << 19 d = h & 1 << 29 a <<= 20 c >>= 19 d >>= 10 h &= 3221748736 return h | a | c | d" "def main(x): f = ((1 << 32) - (1 << 29) & x) >> 29 e = ((1 << 29) - (1 << 26) & x) >> 26 d = ((1 << 26) - (1 << 23) & x) >> 23 c = ((1 << 23) - (1 << 13) & x) >> 13 b = ((1 << 13) - (1 << 1) & x) >> 1 a = ((1 << 1) - (1 << 0) & x) >> 0 res = c << 22 | f << 19 | e << 16 | a << 15 | d << 12 | b << 0 return res" "def main(x): return 1 & x | (62 & x) << 25 | (4194240 & x) >> 5 | (2143289344 & x) >> 5 | 2147483648 & x" "def main(x): test = str(x) num = format(x, 'b') str(num) if len(num) < 32: while len(num) < 32: num = '0' + num g = num[:1] f = num[1:3] e = num[3:4] d = num[4:7] c = num[7:16] b = num[16:20] a = num[20:] res = b + g + a + e + c + f + d if test[1] == 'x': res = hex(int(res, 2)) else: res = int(res, 2) return res" "def main(x): y = format(x, 'b') line = str(y) while len(line) < 32: line = '0' + line a = '' for i in range(17, 32): a += line[i] b = '' for i in range(12, 17): b += line[i] c = '' for i in range(8, 12): c += line[i] d = '' for i in range(1, 8): d += line[i] e = line[0] line = c + a + e + b + d z = int(line, 2) return z" "def main(x): xA = 63 & x xB = (511 & x >> 6) << 23 xC = (127 & x >> 15) << 6 xD = (127 & x >> 22) << 16 xE = (7 & x >> 29) << 13 return xA + xB + xC + xD + xE" "def generate_mask(left, right): a = pow(2, left + 1) - pow(2, right) return a def main(x): a = x & generate_mask(15, 0) b = x & generate_mask(20, 16) c = x & generate_mask(29, 21) d = x & generate_mask(30, 30) e = x & generate_mask(31, 31) a1 = a << 7 b1 = b >> 15 c1 = c << 2 d1 = d >> 30 e1 = e >> 25 n = a1 | b1 | c1 | d1 | e1 return n" "def move(x, cur, new, length): m = 2 ** (cur + length) - 2 ** cur s = x & m if cur < new: return s << new - cur else: return s >> cur - new def main(x): result = 0 result |= move(x, 0, 13, 9) result |= move(x, 9, 0, 7) result |= move(x, 16, 7, 6) result |= move(x, 22, 22, 10) return result" "def generate_mask(left, right): a = pow(2, left + 1) - pow(2, right) return a def main(x): a = x & generate_mask(2, 0) b = x & generate_mask(12, 3) c = x & generate_mask(17, 13) d = x & generate_mask(24, 18) e = x & generate_mask(28, 25) f = x & generate_mask(31, 29) e1 = e << 3 f1 = f >> 4 n = a | b | c | d | e1 | f1 return n" "def main(x): A = (16383 & x) << 18 B = (65535 & x >> 14) << 1 C = 1 & x >> 30 D = (1 & x >> 31) << 17 return A + B + C + D" "def main(x): a = 32767 & x b = 63 << 15 & x c = 1023 << 21 & x d = 1 << 31 & x a = a << 17 b = b >> 4 c = c >> 21 d = d >> 21 return a + b + c + d" "def main(x): a = 2047 & x b = 8191 << 11 & x c = 31 << 24 & x d = 3 << 29 & x e = 1 << 31 & x a = a << 1 b = b << 8 c = c >> 12 d = d >> 12 e = e >> 31 return a + b + c + d + e" "def main(x): a = x & 31 b = x >> 5 & 1023 c = x >> 15 & 15 d = x >> 19 & 511 e = x >> 28 & 7 f = x >> 31 & 1 res = f | b << 1 | d << 11 | a << 20 | e << 25 | c << 28 return res" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(1, 0) b_mask = u_mask(13, 1) c_mask = u_mask(17, 13) d_mask = u_mask(18, 17) e_mask = u_mask(19, 18) f_mask = u_mask(21, 19) g_mask = u_mask(30, 21) h_mask = u_mask(32, 30) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask e = x & e_mask f = x & f_mask g = x & g_mask h = x & h_mask b = b << 16 c = c >> 3 d = d << 14 e = e >> 2 f = f >> 5 g = g >> 20 h = h >> 1 return a | b | c | d | e | f | g | h" "def main(num): a = num & 65535 b = num & 458752 c = num & 33030144 d = num & 1040187392 e = num & 1073741824 f = num & 2147483648 return a << 15 | b >> 4 | c >> 19 | d >> 18 | e << 1 | f >> 25" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(7, 0) b_mask = u_mask(23, 7) c_mask = u_mask(25, 23) d_mask = u_mask(32, 25) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask b = b << 7 c = c << 7 d = d >> 18 return a | b | c | d" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(4, 0) b_mask = u_mask(5, 4) c_mask = u_mask(19, 5) d_mask = u_mask(29, 19) e_mask = u_mask(32, 29) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask e = x & e_mask a = a << 27 b = b << 27 c = c >> 5 d = d >> 2 e = e >> 15 return a | b | c | d | e" "def generate_mask(left, right): return pow(2, left + 1) - pow(2, right) def main(x): A_mask = generate_mask(14, 0) B_mask = generate_mask(20, 15) C_mask = generate_mask(30, 21) D_mask = generate_mask(31, 31) a = x & A_mask b = x & B_mask c = x & C_mask d = x & D_mask a = a << 0 b = b << 11 c = c >> 6 d = d >> 6 return a | b | c | d" "def main(data): maskE = 2147483648 maskD = 1879048192 maskC = 264241152 maskB = 4194048 maskA = 255 tmpE = (data & maskE) >> 31 - 0 tmpD = (data & maskD) >> 30 - 25 tmpC = (data & maskC) << 31 - 27 tmpB = (data & maskB) << 22 - 21 tmpA = (data & maskA) << 8 - 7 result = tmpC | tmpD | tmpB | tmpA | tmpE return result" "def main(x): bin_x = x res = 0 D1 = 4227858432 C1 = 66977792 B1 = 131068 A1 = 3 D_final = (bin_x & D1) >> 26 A_final = (bin_x & A1) << 6 A_D = A_final | D_final C_final = (bin_x & C1) >> 9 A_D_C = C_final | A_D B_final = (bin_x & B1) << 15 res = B_final | A_D_C return res" "def main(number): s = str(bin(number)[2:]).rjust(32, '0') a = s[25:] b = s[21:25] c = s[16:21] d = s[11:16] e = s[3:11] f = s[2] g = s[0:2] res = f + a + d + e + c + g + b return int(res, 2)" "def main(hex_num): hex_num = int(hex(hex_num), 16) res = int(hex(0), 16) temp = int(hex(2147483648), 16) E = int(hex(int(hex(hex_num & temp), 16) >> 4), 16) temp = int(hex(1610612736), 16) D = int(hex(int(hex(hex_num & temp), 16) >> 4), 16) temp = int(hex(536805376), 16) C = int(hex(int(hex(hex_num & temp), 16) >> 4), 16) temp = int(hex(61440), 16) B = int(hex(int(hex(hex_num & temp), 16) << 16), 16) temp = int(hex(4095), 16) A = int(hex(int(hex(hex_num & temp), 16)), 16) return int(hex(res ^ D ^ E ^ C ^ B ^ A), 16)" "def main(number): a = number & 7 b = number & 120 c = number & 524160 d = number & 3670016 e = number & 2143289344 f = number & 2147483648 a = a << 16 b = b >> 3 c = c << 13 d = d >> 6 e = e >> 18 f = f >> 12 return a | b | c | d | e | f" "def main(x): a = x & 15 b = x >> 4 & 65535 c = x >> 20 & 255 d = x >> 28 & 15 return a | b << 4 | d << 20 | c << 24" "def f6(x): def generate_mask(left, right): return pow(2, left + 1) - pow(2, right) A_mask = generate_mask(0, 0) B_mask = generate_mask(1, 1) C_mask = generate_mask(10, 2) D_mask = generate_mask(12, 11) E_mask = generate_mask(14, 13) F_mask = generate_mask(19, 15) G_mask = generate_mask(23, 20) H_mask = generate_mask(31, 24) a = x & A_mask b = x & B_mask c = x & C_mask d = x & D_mask e = x & E_mask f = x & F_mask g = x & G_mask h = x & H_mask a = a << 9 b = b << 15 c = c >> 2 d = d << 3 e = e << 4 f = f << 12 g = g >> 10 h = h >> 5 return a | b | c | d | e | f | g | h def main(n): return f6(n)" "def move(x, cur, new, length): m = 2 ** (cur + length) - 2 ** cur s = x & m if cur < new: return s << new - cur else: return s >> cur - new def main(x): result = 0 result |= move(x, 0, 27, 5) result |= move(x, 5, 0, 9) result |= move(x, 14, 11, 16) result |= move(x, 30, 9, 1) result |= move(x, 31, 10, 1) return result" "def main(x): res = ((x & 2147483648) >> 31) + ((x & 2113929216) >> 24) + ((x & 33538048) << 7) + ((x & 16383) << 7) return res" "def main(x): a = x & 65535 b = x >> 16 & 16383 c = x >> 30 & 1 d = x >> 31 & 1 return d | a << 1 | b << 17 | c << 31" "def main(x): A = x & 65535 B = x >> 16 & 63 C = x >> 22 & 1 D = x >> 23 & 255 E = x >> 31 & 1 result = 0 result |= E result |= C << 1 result |= B << 2 result |= A << 8 result |= D << 24 return result" "def main(x): a = bin(x) a = a[2:] a = '0' * (32 - len(a)) + a a = a[1:16] + a[0:1] + a[16:32] return int(a, 2)" "def main(num): a = num & 32767 num = num >> 15 b = num & 255 num = num >> 8 c = num & 7 num = num >> 3 d = num & 31 num = num >> 5 e = num return b << 24 | a << 9 | d << 4 | c << 1 | e" "def main(x): a = (x & 4095) << 8 b = (x & 1044480) >> 12 c = x & 4293918720 return a | b | c" "def main(x): d = (x & 2147483648) >> 31 c = (x & 2147450880) << 1 b = (x & 32640) << 1 a = (x & 127) << 1 return a | b | c | d" "def main(x): e = x >> 31 & 1 d = x >> 30 & 1 c = x >> 27 & 7 b = x >> 11 & 65535 a = x & 2047 res = a | c << 11 | e << 14 | d << 15 | b << 16 return res" "def main(x): a = x & 1 b = x >> 1 & 4095 c = x >> 13 & 511 d = x >> 22 & 1 e = x >> 23 & 7 f = x >> 26 & 7 g = x >> 29 & 1 h = x >> 30 & 3 res = a | e << 1 | d << 4 | c << 5 | g << 14 | b << 15 | f << 27 | h << 30 return res" "def main(n): res = 0 res = res << 0 | n >> 31 & 1 res = res << 8 | n >> 14 & 255 res = res << 14 | n >> 0 & 16383 res = res << 1 | n >> 29 & 1 res = res << 3 | n >> 26 & 7 res = res << 4 | n >> 22 & 15 res = res << 1 | n >> 30 & 1 return res" "def main(hex_num): hex_num = int(hex(hex_num), 16) temp = int(hex(2147483648), 16) F = int(hex(int(hex(hex_num & temp), 16) >> 1), 16) temp = int(hex(1073741824), 16) E = int(hex(int(hex(hex_num & temp), 16) << 1), 16) temp = int(hex(1069547520), 16) D = int(hex(int(hex(hex_num & temp), 16) >> 22), 16) temp = int(hex(4193792), 16) C = int(hex(int(hex(hex_num & temp), 16) << 2), 16) temp = int(hex(504), 16) B = int(hex(int(hex(hex_num & temp), 16) << 21), 16) temp = int(hex(7), 16) A = int(hex(int(hex(hex_num & temp), 16) << 8), 16) return int(hex(F ^ E ^ D ^ C ^ B ^ A), 16)" "def main(hex_num): hex_num = int(hex(hex_num), 16) res = int(hex(0), 16) temp = int(hex(2143289344), 16) D = int(hex(int(hex(hex_num & temp), 16) >> 22), 16) temp = int(hex(2147483648), 16) E = int(hex(int(hex(hex_num & temp), 16) >> 22), 16) temp = int(hex(4161536), 16) C = int(hex(int(hex(hex_num & temp), 16) >> 5), 16) temp = int(hex(32736), 16) B = int(hex(int(hex(hex_num & temp), 16) << 12), 16) temp = int(hex(31), 16) A = int(hex(int(hex(hex_num & temp), 16) << 27), 16) return int(hex(res ^ E ^ D ^ C ^ B ^ A), 16)" "def main(x): a = x & 511 b = x >> 9 & 63 c = x >> 15 & 255 d = x >> 23 & 127 e = x >> 30 & 1 f = x >> 31 & 1 result = f | c << 1 | d << 9 | a << 16 | b << 25 | e << 31 return result" "def main(x): a = x & 511 b = x >> 9 & 8191 c = x >> 22 & 7 d = x >> 25 & 3 e = x >> 27 & 15 f = x >> 31 & 1 result = b | a << 13 | f << 22 | e << 23 | c << 27 | d << 30 return result" "def main(D): ken = 0 ken = ken << 4 | D >> 7 & 15 ken = ken << 7 | D >> 0 & 127 ken = ken << 12 | D >> 11 & 4095 ken = ken << 9 | D >> 23 & 511 return ken" "def main(x): a = x & 15 b = x >> 4 b = b & 8191 c = x >> 17 c = c & 16383 d = x >> 31 sum = b sum = sum << 14 sum = sum | c sum = sum << 4 sum = sum | a sum = sum << 1 sum = sum | d return sum" "def main(s): d = (s | 1073741823) & ~1073741823 c = (s | 3355443199) & ~3355443199 b = (s | 4160782335) & ~4160782335 a = (s | 4294934528) & ~4294934528 d = d >> 15 c = c << 2 b = b << 2 ans = d + c + b + a return ans" "def main(x): g = x g &= 2147483648 g = g >> 10 f = x f &= 1610612736 f = f << 1 e = x e &= 534773760 e = e << 1 d = x d &= 1835008 d = d >> 18 c = x c &= 262016 c = c >> 4 b = x b &= 120 b = b << 11 a = x a &= 7 a = a << 18 return a | b | c | d | e | f | g" "def main(x): return (15 & x) << 18 | (496 & x) << 19 | (7680 & x) << 19 | (33546240 & x) >> 13 | (234881024 & x) >> 10 | (805306368 & x) >> 15 | (1073741824 & x) >> 8 | (2147483648 & x) >> 19" "def main(num): a = num & 127 b = num & 1920 c = num & 1046528 d = num & 1072693248 e = num & 1073741824 f = num & 2147483648 return a << 15 | b << 4 | c << 12 | d >> 19 | e >> 30 | f >> 9" "def main(num): A = num & 4095 B = num >> 12 & 4095 C = num >> 24 & 3 D = num >> 26 & 63 return C | A << 2 | B << 14 | D << 26" "def main(x): a = x >> 0 & 2 ** 16 - 1 b = x >> 16 & 2 ** 9 - 1 c = x >> 25 & 2 ** 7 - 1 return (c << 25) + (a << 9) + b" "def get_field(x, start_bit, end_bit): mask = 2 ** (end_bit + 1 - start_bit) - 1 return x >> start_bit & mask def main(x): a = get_field(x, 0, 12) b = get_field(x, 13, 15) c = get_field(x, 16, 29) d = get_field(x, 30, 30) e = get_field(x, 31, 31) return e | a << 1 | d << 14 | c << 15 | b << 29" "def get_field(x, start_bit, end_bit): mask = 2 ** (end_bit - start_bit) - 1 return x >> start_bit & mask def main(x): bits = [4, 8, 13, 2, 5] k = 0 a = get_field(x, k, k + bits[0]) k += bits[0] b = get_field(x, k, k + bits[1]) k += bits[1] c = get_field(x, k, k + bits[2]) k += bits[2] d = get_field(x, k, k + bits[3]) k += bits[3] e = get_field(x, k, k + bits[4]) k += bits[4] return a | d << bits[0] | c << bits[0] + bits[3] | e << bits[0] + bits[3] + bits[2] | b << bits[0] + bits[3] + bits[2] + bits[4]" "def main(value): bin_value = str(bin(int(value)))[2:] if len(bin_value) < 32: bin_value = (32 - len(bin_value)) * '0' + bin_value a = bin_value[22:32] b = bin_value[8:22] c = bin_value[6:8] d = bin_value[4:6] e = bin_value[2:4] f = bin_value[1] g = bin_value[0] result_string_bin = g + a + e + d + c + f + b result = int(result_string_bin, 2) return result" "def main(x): op1 = x xG = 2147483648 xF = 1073741824 xE = 1065353216 xD = 8355840 xC = 32640 xB = 64 xA = 63 G = op1 & xG G = G >> 31 F = op1 & xF F = F >> 29 E = op1 & xE E = E >> 6 D = op1 & xD D = D >> 12 C = op1 & xC C = C << 17 B = op1 & xB B = B >> 4 A = op1 & xA A = A << 11 answer = G + F + E + D + C + B + A return answer" "def main(x): f = ((1 << 32) - (1 << 30) & x) >> 30 e = ((1 << 30) - (1 << 22) & x) >> 22 d = ((1 << 22) - (1 << 20) & x) >> 20 c = ((1 << 20) - (1 << 19) & x) >> 19 b = ((1 << 19) - (1 << 13) & x) >> 13 a = ((1 << 13) - (1 << 0) & x) >> 0 res = c << 31 | d << 29 | e << 21 | a << 8 | f << 6 | b return res" "def main(x): op1 = x xA = 7 xB = 56 xC = 4194240 xD = 4290772992 A = op1 & xA A = A << 10 B = op1 & xB B = B << 10 C = op1 & xC C = C << 10 D = op1 & xD D = D >> 22 biot = A + B + C + D return biot" "def main(x): return (255 & x) << 19 | (768 & x) << 7 | (3072 & x) << 3 | (12288 & x) << 17 | (134201344 & x) >> 14 | (134217728 & x) << 4 | (805306368 & x) >> 1 | (3221225472 & x) >> 13" "def main(num): a = num & 1023 b = num & 130048 c = num & 536739840 d = num & 536870912 e = num & 3221225472 return a << 19 | b >> 10 | c >> 10 | d << 2 | e >> 1" "def main(num): a = num & 1 b = num & 510 c = num & 2096640 d = num & 6291456 e = num & 8388608 f = num & 117440512 g = num & 134217728 h = num & 4026531840 return a << 27 | b << 17 | c >> 3 | d >> 17 | e << 8 | f << 4 | g >> 1 | h >> 28" "def main(x): A = x & 63 B = x >> 6 & 7 C = x >> 9 & 31 D = x >> 14 & 32767 E = x >> 29 & 1 F = x >> 30 & 1 G = x >> 31 & 1 result = 0 result |= B << 29 result |= C << 24 result |= D << 9 result |= A << 3 result |= E << 2 result |= G << 1 result |= F return result" "def main(x): A = x & 31 B = x >> 5 & 16383 C = x >> 19 & 15 D = x >> 23 & 31 E = x >> 28 & 1 F = x >> 29 & 3 G = x >> 31 & 1 result = 0 result |= F result |= A << 2 result |= E << 7 result |= B << 8 result |= C << 22 result |= G << 26 result |= D << 27 return result" "def main(x): A = x & 31 B = x >> 5 & 63 C = x >> 11 & 3 D = x >> 13 & 4095 E = x >> 25 & 127 res = 0 res |= C << 30 res |= D << 18 res |= E << 11 res |= A << 6 res |= B << 0 return res" "def main(x): d = ((1 << 32) - (1 << 26) & x) >> 26 c = ((1 << 26) - (1 << 25) & x) >> 25 b = ((1 << 25) - (1 << 10) & x) >> 10 a = ((1 << 10) - (1 << 0) & x) >> 0 result = d << 25 | c << 31 | b << 0 | a << 15 return result" "def get_bits(x: int, a=0, b=31): part_size = b - a + 1 part = x & 2 ** part_size - 1 << a return part >> a def set_bits(x, bits, a=0): x = x | bits << a return x def f(x: int) -> int: A = get_bits(x, 0, 0) B = get_bits(x, 1, 14) C = get_bits(x, 15, 21) D = get_bits(x, 22, 24) E = get_bits(x, 25, 27) F = get_bits(x, 28, 29) G = get_bits(x, 30, 30) H = get_bits(x, 31, 31) x = 0 x = set_bits(x, F, 0) x = set_bits(x, A, 2) x = set_bits(x, H, 3) x = set_bits(x, B, 4) x = set_bits(x, D, 18) x = set_bits(x, G, 21) x = set_bits(x, C, 22) x = set_bits(x, E, 29) return x def main(x): return f(x)" "def get_bits(x: int, a=0, b=31): part_size = b - a + 1 part = x & 2 ** part_size - 1 << a return part >> a def set_bits(x, bits, a=0): x = x | bits << a return x def f(x: int) -> int: A = get_bits(x, 0, 2) B = get_bits(x, 3, 5) C = get_bits(x, 6, 19) D = get_bits(x, 20, 28) E = get_bits(x, 29, 31) x = 0 x = set_bits(x, B, 0) x = set_bits(x, E, 3) x = set_bits(x, D, 6) x = set_bits(x, A, 15) x = set_bits(x, C, 18) return x def main(x): return f(x)" "def f(hexed: int) -> int: sizes = [10, 11, 2, 1, 2, 5, 1] values = [] accum_length = 0 for size in sizes: mask = 2 ** size - 1 << accum_length value = (hexed & mask) >> accum_length values.append(value) accum_length += size new_order = [3, 1, 5, 2, 6, 0, 4] result = 0 accum_length = 0 for idx in range(len(sizes)): substitute_idx = new_order[idx] value = values[substitute_idx] << accum_length result += value accum_length += sizes[substitute_idx] return result main = f" "def main(x): x1 = bin(x) x1 = list(x1) x1.reverse() if len(x1) < 34: z = [] for i in range(len(x1)): if x1[i] != 'b': z.append(x1[i]) else: f = len(x1) - i + 1 for j in range(0, f): z.append('0') z.append('b') z.append('0') break x1 = z c = [] for i in range(24, 31): c.append(x1[i]) a = [] for i in range(10): a.append(x1[i]) b = [] for i in range(10, 24): b.append(x1[i]) d = [x1[31]] x2 = [] x2.extend(b) x2.extend(a) x2.extend(d) x2.extend(c) x2.reverse() n = ''.join(x2) n = int(n, 2) return n" "def main(x): A = x & 3 B = x >> 2 & 65535 C = x >> 18 & 2047 D = x >> 29 & 7 ans = 0 ans |= C ans |= B << 11 ans |= D << 27 ans |= A << 30 return ans" "def main(x): h = x >> 30 tmp = x - (h << 30) g = tmp >> 29 tmp = tmp - (g << 29) f = tmp >> 28 tmp = tmp - (f << 28) e = tmp >> 17 tmp = tmp - (e << 17) d = tmp >> 11 tmp = tmp - (d << 11) c = tmp >> 9 tmp = tmp - (c << 9) b = tmp >> 3 a = tmp - (b << 3) x = (h << 30) + (c << 28) + (b << 22) + (e << 11) + (d << 5) + (f << 4) + (g << 3) + a return x" "def main(x): f = (x & 3758096384) >> 11 e = (x & 469762048) >> 11 d = (x & 62914560) >> 22 c = (x & 4192256) >> 7 b = (x & 1024) << 11 a = (x & 1023) << 22 return a | b | c | d | e | f" "def A(x): return x & 4095 def B(x): x &= 4190208 return x >> 12 def C(x): x &= 2143289344 return x >> 22 def D(x): x &= 2147483648 return x >> 31 def merge(y): x = B(y) << 22 x = x | C(y) << 13 x = x | A(y) << 1 x = x | D(y) << 0 return x def main(x): return merge(x)" "def main(x): return (x & 2047) << 8 | (x & 30720) << 11 | (x & 4161536) >> 15 | (x & 12582912) >> 3 | (x & 251658240) << 4 | (x & 268435456) >> 21 | (x & 536870912) >> 8 | (x & 3221225472) >> 4" "def main(param): d = 2147483648 & param c = 2147418112 & param b = 65472 & param a = 63 & param d = bin(d)[2:].zfill(32) c = bin(c)[2:].zfill(32 - 1) b = bin(b)[2:].zfill(32 - 1 - 15) a = bin(a)[2:].zfill(32 - 1 - 15 - 10) result = 0 result = result | int(d, 2) mask = 4294967295 & int(a, 2) << 25 result = result | mask mask2 = 4294967295 & int(c, 2) >> 6 result = result | mask2 mask3 = 4294967295 & int(b, 2) >> 6 result = result | mask3 return result" "def Write_To_Letter(begin, end, x): buff = '' if end > len(x) - 1: end = len(x) - 1 for i in range(begin, end + 1): buff += str(x[i]) return buff def convert(x): x = (32 - len(x)) * '0' + x x = x[::-1] g = Write_To_Letter(31, 31, x) f = Write_To_Letter(30, 30, x) e = Write_To_Letter(29, 29, x) d = Write_To_Letter(27, 28, x) d = d[::-1] c = Write_To_Letter(21, 26, x) c = c[::-1] b = Write_To_Letter(11, 20, x) b = b[::-1] a = Write_To_Letter(0, 10, x) a = a[::-1] return d + b + a + g + f + e + c def main(x): x = bin(x)[2:] x = convert(x) return int(x, 2) main(1892400320)" "def main(x): A = x & 63 B = x >> 6 & 32767 C = x >> 21 & 1 D = x >> 22 & 3 E = x >> 24 & 63 F = x >> 30 & 3 result = 0 result |= B << 0 result |= F << 15 result |= C << 17 result |= E << 18 result |= A << 24 result |= D << 30 return result" "def main(x): A = x & 16383 B = x >> 14 & 15 C = x >> 18 & 127 D = x >> 25 & 3 E = x >> 27 & 15 F = x >> 31 & 1 result = 0 result |= D << 0 result |= E << 2 result |= C << 6 result |= F << 13 result |= A << 14 result |= B << 28 return result" "def main(x): a = format(x, '032b') a = a[28:32] + a[0] + a[12:28] + a[1:12] a = int(hex(int(a, 2)), 0) return a" "def main(x): a = format(x, '032b') a = a[17:21] + a[21:32] + a[6:17] + a[0] + a[1:6] a = int(hex(int(a, 2)), 0) return a" "def main(x): a = format(x, '032b') a = a[13:28] + a[0:2] + a[28:32] + a[2:13] a = int(hex(int(a, 2)), 0) return a" "def main(x): A = x & 3 B = x >> 2 & 1023 C = x >> 12 & 31 D = x >> 17 & 8191 E = x >> 30 & 1 F = x >> 31 & 1 res = 0 res |= A res |= F << 2 res |= E << 3 res |= C << 4 res |= D << 9 res |= B << 22 return res" "def main(x): a = str(bin(x))[2:] a = '0' * (32 - len(a)) + a b = a[-17:-10] + a[-28:-17] + a[-10:] + a[-32:-28] return int(b, 2)" "def main(x): a = str(bin(x))[2:] a = '0' * (32 - len(a)) + a b = a[-29:-27] + a[-32] + a[-31] + a[-30] + a[-27:-15] + a[-15:] return int(b, 2)" "def main(x): d = x >> 26 & 2 ** 5 c = x >> 11 & 2 ** 20 - 1 - (2 ** 6 - 1) b = x >> 12 & 2 ** 5 - 1 a = x << 20 & 2 ** 32 - 1 return a | b | c | d" "def main(x): a = x & 32767 b = x >> 15 & 511 c = x >> 24 & 1 d = x >> 25 & 127 return a | c << 15 | b << 16 | d << 25" "def main(x): result = 0 A = x & 255 B = x >> 8 & 31 C = x >> 13 & 65535 D = x >> 29 & 1 E = x >> 30 & 3 result |= A << 24 result |= C << 8 result |= B << 3 result |= E << 1 result |= D << 0 return result" "def main(x): a = x & 4095 b = x >> 12 & 127 c = x >> 19 & 2047 d = x >> 30 & 3 return b | d << 7 | a << 9 | c << 21" "def main(field): A = (field & 1) << 29 B = (field & 8190) << 16 C = (field & 134209536) >> 10 D = (field & 134217728) << 3 E = (field & 1879048192) >> 28 F = field & 2147483648 return A | B | C | D | E | F" "def main(field): A = (field & 255) << 24 D = (field & 2139095040) >> 7 E = (field & 2147483648) >> 16 C = (field & 8355840) >> 15 B = field & 32512 return A | B | C | D | E" "def main(field): F = (field & 2147483648) >> 12 E = (field & 1073741824) >> 12 D = (field & 1040187392) >> 13 C = (field & 33546240) >> 13 B = (field & 4096) << 5 A = (field & 4095) << 20 return A | B | C | D | E | F" "def main(x): A = x & 7 a = 3 B = x >> 3 & 1023 b = 10 C = x >> 13 & 7 c = 3 D = x >> 16 & 2047 d = 11 E = x >> 27 & 7 e = 3 F = x >> 30 & 3 f = 2 y = D | A << d | E << a + d | F << e + a + d y = y | B << f + e + a + d | C << b + f + e + a + d return y" "def main(x): a = x & 7 b = x >> 3 & 3 c = x >> 5 & 32767 d = x >> 20 & 31 e = x >> 25 & 1 f = x >> 26 & 7 g = x >> 29 & 1 h = x >> 30 & 3 result = b | e << 2 | g << 3 | f << 4 | h << 7 | d << 9 | a << 14 | c << 17 return result" "def Write_To_Letter(begin, end, x): buff = '' if end > len(x) - 1: end = len(x) - 1 for i in range(begin, end + 1): buff += str(x[i]) return buff def convert(x): x = (32 - len(x)) * '0' + x x = x[::-1] e = Write_To_Letter(31, 31, x) d = Write_To_Letter(24, 30, x) d = d[::-1] c = Write_To_Letter(11, 23, x) c = c[::-1] b = Write_To_Letter(4, 10, x) b = b[::-1] a = Write_To_Letter(0, 3, x) a = a[::-1] return c + e + b + a + d def main(x): x = bin(x)[2:] x = convert(x) return int(x, 2) main(172180877)" "def main(x): d = (x & 2147483648) >> 13 c = (x & 2147450880) >> 13 b = (x & 32764) << 17 a = x & 3 return a | b | c | d" "def main(x): g = x & 2147483648 f = x & 2113929216 e = x & 33546240 d = x & 6144 c = x & 1792 b = x & 192 a = x & 63 g = g >> 10 f = f << 1 e = e >> 13 d = d << 13 c = c << 10 b = b << 16 a = a << 12 return a + b + c + d + e + f + g" "def main(hex_num): hex_num = int(hex(hex_num), 16) res = int(hex(0), 16) temp = int(hex(2147483648), 16) G = int(hex(int(hex(hex_num & temp), 16) >> 20), 16) temp = int(hex(2080374784), 16) F = int(hex(int(hex(hex_num & temp), 16) >> 20), 16) temp = int(hex(62914560), 16) E = int(hex(int(hex(hex_num & temp), 16) >> 20), 16) temp = int(hex(4193792), 16) D = int(hex(int(hex(hex_num & temp), 16) << 3), 16) temp = int(hex(384), 16) C = int(hex(int(hex(hex_num & temp), 16) >> 7), 16) temp = int(hex(112), 16) B = int(hex(int(hex(hex_num & temp), 16) << 21), 16) temp = int(hex(15), 16) A = int(hex(int(hex(hex_num & temp), 16) << 28), 16) return int(hex(res ^ G ^ F ^ E ^ D ^ C ^ B ^ A), 16)" "def main(test): test = test | 2 ** 33 test = bin(test) test = test[4:] a = test[-12:] b = test[-25:-12] c = test[-28:-25] d = test[-31:-28] e = test[-32] test = e + c + a + b + d test = int(test, 2) return test" "def main(x): a = x & 8191 b = x >> 13 & 31 c = x >> 18 & 31 d = x >> 23 & 1 e = x >> 24 & 15 f = x >> 28 & 3 g = x >> 30 & 1 h = x >> 31 & 1 result = g | e << 1 | d << 5 | h << 6 | a << 7 | f << 20 | b << 22 | c << 27 return result" "def main(x): d = (x & 2147483648) >> 31 c = (x & 1073872896) >> 13 b = (x & 1073725440) >> 13 a = (x & 16383) << 18 return a | b | c | d" "def main(x): a = x & 1 b = x >> 1 & 7 c = x >> 4 & 511 d = x >> 13 & 1023 e = x >> 23 & 127 f = x >> 30 & 1 g = x >> 31 & 1 r = d | b << 10 | a << 13 | f << 14 x = r | e << 15 | g << 22 | c << 23 return x" "def main(bit_num): f = (bit_num & 3221225472) >> 14 e = (bit_num & 805306368) >> 6 d = (bit_num & 267386880) << 4 c = (bit_num & 983040) << 2 b = bit_num & 61440 a = bit_num & 4095 return a | b | c | d | e | f" "def main(x): A = x & 63 B = x >> 6 & 31 C = x >> 11 & 31 D = x >> 16 & 32767 E = x >> 31 & 1 result = 0 result |= C result |= B << 5 result |= E << 10 result |= A << 11 result |= D << 17 return result" "def main(x): a = x & 127 b = x & 32640 c = x & 491520 d = x & 524288 e = x & 267386880 f = x & 268435456 g = x & 3758096384 a = a << 17 b = b << 17 c = c >> 15 d = d >> 12 e = e >> 12 f = f >> 12 g = g >> 25 return a + b + c + d + e + f + g" "def main(x): a = x & 31 b = x & 524256 c = x & 33030144 d = x & 2113929216 e = x & 2147483648 a = a << 27 b = b << 8 c = c >> 13 d = d >> 25 e = e >> 19 return a + b + c + d + e" "def main(x): f = ((1 << 32) - (1 << 30) & x) >> 30 e = ((1 << 30) - (1 << 28) & x) >> 28 d = ((1 << 28) - (1 << 22) & x) >> 22 c = ((1 << 22) - (1 << 13) & x) >> 13 b = ((1 << 13) - (1 << 1) & x) >> 1 a = ((1 << 1) - (1 << 0) & x) >> 0 res = b << 20 | e << 18 | a << 17 res = res | f << 15 | d << 9 | c << 0 return res" "def main(x): x = str(x) ver = x if x[0:2] == '0x': x = int(x, 16) else: x = int(x) x = bin(x) x = x[2:] while len(x) < 32: x = '0' + x reversed_x = ''.join(reversed(x)) a = reversed_x[0:16] a = ''.join(reversed(a)) b = reversed_x[16:20] b = ''.join(reversed(b)) c = reversed_x[20:30] c = ''.join(reversed(c)) d = reversed_x[30] e = reversed_x[31] convert = d + c + b + a + e if ver[0:2] == '0x': return '0x%08x' % int(convert, 2) else: return int(convert, 2)" "def main(x): c = ((1 << 32) - (1 << 28) & x) >> 28 b = ((1 << 28) - (1 << 14) & x) >> 14 a = ((1 << 14) - (1 << 0) & x) >> 0 res = a << 18 | b << 4 | c return res" "def main(x): x1 = x & 65535 x2 = x >> 28 x3 = x >> 16 x3 = x3 & 4095 return x1 << 16 | x3 << 4 | x2" "def main(x): e = ((1 << 32) - (1 << 27) & x) >> 27 d = ((1 << 27) - (1 << 24) & x) >> 24 c = ((1 << 24) - (1 << 17) & x) >> 17 b = ((1 << 17) - (1 << 5) & x) >> 5 a = ((1 << 5) - (1 << 0) & x) >> 0 res = b << 20 | a << 15 | d << 12 | c << 5 | e << 0 return res" "def create_segment(x, original_position, length, new_position): mask = 2 ** (original_position + length) - 2 ** original_position segment = x & mask if original_position < new_position: return segment << new_position - original_position else: return segment >> original_position - new_position def main(x): result = 0 result |= create_segment(x, 0, 3, 19) result |= create_segment(x, 3, 15, 3) result |= create_segment(x, 18, 2, 1) result |= create_segment(x, 20, 1, 0) result |= create_segment(x, 21, 8, 24) result |= create_segment(x, 29, 1, 18) result |= create_segment(x, 30, 2, 22) return result" "def main(x): y = format(x, 'b') if len(y) > 32: y = y[len(y) - 32:] if len(y) < 32: y = '0' * (32 - len(y)) + y temp = y[11:20] temp += y[0:5] temp += y[20:] temp += y[5:11] a = int(temp, 2) temp = format(a, 'd') temp = int(temp) return temp" "def main(x): y = format(x, 'b') if len(y) > 32: y = y[len(y) - 32:] if len(y) < 32: y = '0' * (32 - len(y)) + y temp = y[17:] temp += y[7:17] temp += y[0:2] temp += y[2:7] a = int(temp, 2) temp = format(a, 'd') temp = int(temp) return temp" "def main(x): x_a = (63 & x >> 13) << 26 x_b = (8191 & x) << 13 x_c = (1023 & x >> 19) << 3 x_d = 7 & x >> 29 return x_a + x_b + x_c + x_d" "def main(x): x_e = (1 & x >> 29) << 31 x_a = (65535 & x) << 15 x_c = (1 & x >> 21) << 14 x_b = (31 & x >> 16) << 9 x_g = (1 & x >> 31) << 8 x_d = (127 & x >> 22) << 1 x_f = 1 & x >> 30 x = x_e + x_a + x_c + x_b + x_g + x_d + x_f return x" "def main(x): mask_a = 255 mask_b = 15 << 8 mask_c = 7 << 12 mask_d = 63 << 15 mask_e = 3 << 21 mask_f = 255 << 23 mask_g = 1 << 31 part_a = x & mask_a part_b = (x & mask_b) >> 8 part_c = (x & mask_c) >> 12 part_d = (x & mask_d) >> 15 part_e = (x & mask_e) >> 21 part_f = (x & mask_f) >> 23 part_g = (x & mask_g) >> 31 return part_a | part_e << 8 | part_f << 10 | part_d << 18 | part_g << 24 | part_c << 25 | part_b << 28" "def main(x): return (1 & x) << 2 | (6 & x) >> 1 | (2040 & x) << 21 | (129024 & x) >> 7 | (393216 & x) << 3 | (1572864 & x) << 3 | (2097152 & x) >> 18 | (4290772992 & x) >> 12" "import cmath import math def f(x): def generate_mask(left, right): return pow(2, left + 1) - pow(2, right) a_mask = generate_mask(6, 0) b_mask = generate_mask(10, 7) c_mask = generate_mask(23, 11) d_mask = generate_mask(31, 24) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask a = a << 21 b = b << 21 c = c >> 3 d = d >> 24 return a | b | c | d def main(x): return f(x)" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(2, 0) b_mask = u_mask(13, 2) c_mask = u_mask(29, 13) d_mask = u_mask(32, 29) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask a = a << 3 b = b << 3 c = c << 3 d = d >> 29 return a | b | c | d" "def main(number: int): A = number & 16383 B = number & 114688 C = number & 917504 D = number & 1048576 E = number & 2145386496 F = number & 2147483648 result = int() result = result | C << 12 result = result | B << 12 result = result | A << 12 result = result | D >> 9 result = result | F >> 21 result = result | E >> 21 return result" "def main(x: int) -> int: before = 0 def shift(num: int) -> int: return 2 ** num - 1 def get_slice(to: int=32): nonlocal before res = x & shift(to) & ~shift(before) before = to return res a = get_slice(1) << 2 b = get_slice(16) << 15 c = get_slice(17) >> 13 d = get_slice(29) >> 28 - 15 e = get_slice(30) >> 29 - 1 f = get_slice(31) >> 30 g = get_slice() return a | b | c | d | e | f | g" "def get_field(x, start, end): mask = 2 ** (end + 1 - start) - 1 return x >> start & mask def main(x): a = get_field(x, 0, 10) b = get_field(x, 11, 22) c = get_field(x, 23, 23) d = get_field(x, 24, 29) e = get_field(x, 30, 31) r = c | a << 1 | e << 12 | b << 14 | d << 26 return r" "def main(x): e = x & 3221225472 d = x & 536870912 c = x & 536854528 b = x & 15872 a = x & 511 b = b << 18 e = e >> 5 c = c >> 4 a = a << 1 d = d >> 29 res = b | e | c | a | d return res" "def main(x): A = (x & 65535) << 15 B = (x & 268369920) >> 13 C = (x & 268435456) << 3 D = (x & 3758096384) >> 29 return C | A | B | D" "def main(value): hex_num = int(hex(value), 16) res = int(hex(0), 16) temp = int(hex(2147483648), 16) G = int(hex(int(hex(hex_num & temp), 16) >> 26), 16) temp = int(hex(1610612736), 16) F = int(hex(int(hex(hex_num & temp), 16) >> 26), 16) temp = int(hex(535822336), 16) E = int(hex(int(hex(hex_num & temp), 16) >> 9), 16) temp = int(hex(917504), 16) D = int(hex(int(hex(hex_num & temp), 16) >> 17), 16) temp = int(hex(98304), 16) C = int(hex(int(hex(hex_num & temp), 16) << 5), 16) temp = int(hex(31744), 16) B = int(hex(int(hex(hex_num & temp), 16) >> 4), 16) temp = int(hex(1023), 16) A = int(hex(int(hex(hex_num & temp), 16) << 22), 16) return int(hex(res ^ G ^ F ^ E ^ D ^ C ^ B ^ A), 16)" "def main(x): a = b = c = d = e = x a &= 2047 b &= 1046528 c &= 1048576 d &= 31457280 e &= 4261412864 a = a << 21 b = b >> 11 c = c >> 7 d = d >> 12 e = e >> 11 result = a | b | c | d | e return result" "def main(num): b = bin(num).lstrip('0b') if len(b) < 32: b = '0' * (32 - len(b)) + b A = b[-9:] B = b[-25:-9] C = b[-27:-25] D = b[-29:-27] E = b[-31:-29] F = b[-32] return int(B + E + C + A + F + D, base=2)" "def main(x): a = x & 31 b = x >> 5 & 2047 c = x >> 16 & 4095 d = x >> 28 & 7 e = x >> 31 & 1 return a | d << 5 | b << 8 | c << 19 | e << 31" "def main(num): A = num B = num C = num CB = num CB = CB >> 12 CB = CB << 12 A = CB ^ A C = C >> 28 C = C << 28 B = CB ^ C B = B << 4 C = C >> 16 result = B | C result = result | A return result" "def main(x): y = format(x, 'b') if len(y) > 32: y = y[len(y) - 32:] if len(y) < 32: y = '0' * (32 - len(y)) + y temp = y[16:32] temp += y[0:16] a = int(temp, 2) temp = format(a, 'd') temp = int(temp) return temp" "def get_field(x, start_bit, end_bit): mask = 2 ** (end_bit - start_bit) - 1 return x >> start_bit & mask old_bits = [3, 5, 9, 7, 4, 3, 1] def main(x): bits = [] k = 0 bits = old_bits a = get_field(x, k, k + bits[0]) k += bits[0] b = get_field(x, k, k + bits[1]) k += bits[1] c = get_field(x, k, k + bits[2]) k += bits[2] d = get_field(x, k, k + bits[3]) k += bits[3] e = get_field(x, k, k + bits[4]) k += bits[4] f = get_field(x, k, k + bits[5]) k += bits[5] g = get_field(x, k, k + bits[6]) return e | c << bits[4] | f << bits[4] + bits[2] | a << bits[4] + bits[2] + bits[5] | b << bits[4] + bits[2] + bits[5] + bits[0] | g << bits[4] + bits[2] + bits[5] + bits[0] + bits[1] | d << bits[4] + bits[2] + bits[5] + bits[0] + bits[1] + bits[6]" "def main(x): a = x & 3 b = x >> 2 & 511 c = x >> 11 & 65535 d = x >> 27 & 15 e = x >> 31 & 1 return b | e << 9 | d << 10 | a << 14 | c << 16" "def get_field(x, start_bit, end_bit): mask = 2 ** (end_bit + 1 - start_bit) - 1 return x >> start_bit & mask def main(x): k = 0 bits = [5, 3, 4, 1, 4, 8, 2, 5] a = get_field(x, k, k + bits[0] - 1) k += bits[0] b = get_field(x, k, k + bits[1] - 1) k += bits[1] c = get_field(x, k, k + bits[2] - 1) k += bits[2] d = get_field(x, k, k + bits[3] - 1) k += bits[3] e = get_field(x, k, k + bits[4] - 1) k += bits[4] f = get_field(x, k, k + bits[5] - 1) k += bits[5] g = get_field(x, k, k + bits[6] - 1) k += bits[6] h = get_field(x, k, k + bits[7] - 1) return a | f << bits[0] | e << bits[0] + bits[5] | g << bits[0] + bits[5] + bits[4] | c << bits[0] + bits[5] + bits[4] + bits[6] | d << bits[0] + bits[5] + bits[4] + bits[6] + bits[2] | b << bits[0] + bits[5] + bits[4] + bits[6] + bits[2] + bits[3] | h << bits[0] + bits[5] + bits[4] + bits[6] + bits[2] + bits[3] + bits[1]" "def main(x): x_bin = bin(x) k = len(x_bin) a = x_bin[k - 3:k] b = x_bin[k - 15:k - 3] s = x_bin[0:k - 15] + a + b itos = int(s, base=2) return itos" "def main(hex_number): str_bin_number = str(bin(hex_number)[2:]).rjust(32, '0') return int(str_bin_number[0] + str_bin_number[5:18] + str_bin_number[1:5] + str_bin_number[18:], 2)" "def main(x): a = x & 4095 b = x >> 12 & 2047 c = x >> 23 & 127 d = x >> 30 & 1 e = x >> 31 & 1 res = 0 res |= b res |= d << 11 res |= e << 12 res |= c << 13 res |= a << 20 return res" "def main(hex_number): str_bin_number = str(bin(hex_number)[2:]).rjust(32, '0') return int(str_bin_number[26:] + str_bin_number[:11] + str_bin_number[21:26] + str_bin_number[11:21], 2)" "def main(x): a = x & 2 ** 8 - 1 b = (x & 2 ** 22 - 1) >> 8 c = (x & 2 ** 23 - 1) >> 22 d = (x & 2 ** 25 - 1) >> 23 e = (x & 2 ** 28 - 1) >> 25 f = (x & 2 ** 30 - 1) >> 28 g = x >> 30 u = (d << 19) + (c << 21) + (a << 22) + (g << 30) return f + (b << 2) + (e << 16) + u" "def main(value): bin_value = str(bin(int(value)))[2:] if len(bin_value) < 32: bin_value = (32 - len(bin_value)) * '0' + bin_value a = bin_value[21:32] b = bin_value[9:21] c = bin_value[7:9] d = bin_value[5:7] e = bin_value[0:5] result_string_bin = d + c + e + b + a result = int(result_string_bin, 2) return result" "def get_bit(n, i): return n & 1 << i == 1 << i def f(n): b = 0 for i in range(10): b = b | get_bit(n, i + 0) << i + 8 for i in range(8): b = b | get_bit(n, i + 10) << i + 0 for i in range(1): b = b | get_bit(n, i + 18) << i + 18 for i in range(3): b = b | get_bit(n, i + 19) << i + 29 for i in range(10): b = b | get_bit(n, i + 22) << i + 19 return b def main(x): return f(x)" "def main(arg: hex) -> hex: a_mask = 1023 b_mask = 523264 c_mask = 267911168 d_mask = 805306368 e_mask = 1073741824 f_mask = 2147483648 a = arg & a_mask b = arg & b_mask c = arg & c_mask d = arg & d_mask e = arg & e_mask f = arg & f_mask a = a << 22 c = c >> 18 d = d >> 9 e = e >> 30 f = f >> 10 return a + b + c + d + e + f" "def main(hex_number): str_bin_number = str(bin(hex_number)[2:]).rjust(32, '0') return int(str_bin_number[4] + str_bin_number[16:] + str_bin_number[5:16] + str_bin_number[:4], 2)" "def main(num): a = num & 3 b = num >> 2 & 15 c = num >> 6 & 7 d = num >> 9 & 1 e = num >> 10 & 4095 f = num >> 22 & 15 g = num >> 26 & 15 h = num >> 30 & 3 result = e | d << 12 | a << 13 | g << 15 | h << 19 | c << 21 | b << 24 | f << 28 return result" "def main(x): a = x & 7 b = x & 24 c = x & 8160 d = x & 67100672 e = x & 67108864 f = x & 939524096 g = x & 1073741824 h = x & 2147483648 e = e >> 13 h = h >> 17 g = g >> 15 d = d << 3 f = f << 2 return a | b | c | d | e | f | g | h" "def main(x): result = 0 A = x & 255 B = x >> 8 & 1023 C = x >> 18 & 8191 D = x >> 31 & 1 result |= A << 24 result |= D << 23 result |= C << 10 result |= B << 0 return result" "def generate_mask(left, right): return pow(2, left + 1) - pow(2, right) def main(x): A_mask = generate_mask(5, 0) B_mask = generate_mask(16, 6) C_mask = generate_mask(21, 17) D_mask = generate_mask(27, 22) E_mask = generate_mask(29, 28) F_mask = generate_mask(30, 30) G_mask = generate_mask(31, 31) a = x & A_mask b = x & B_mask c = x & C_mask d = x & D_mask e = x & E_mask f = x & F_mask g = x & G_mask a = a << 19 b = b >> 6 c = c >> 3 d = d << 3 e = e >> 16 f = f >> 19 g = g >> 0 return a | b | c | d | e | f | g" "def main(num): a = num & 15 b = num & 112 c = num & 130944 d = num & 917504 e = num & 66060288 f = num & 4227858432 return a << 28 | b << 15 | c >> 4 | d >> 17 | e >> 7 | f >> 4" "def main(bit_16): a = bit_16 & 7 b = bit_16 >> 3 & 1023 c = bit_16 >> 13 & 31 d = bit_16 >> 18 & 7 e = bit_16 >> 21 & 2047 return e | c << 11 | a << 16 | d << 19 | b << 22" "def main(x): result = 0 A = x & 511 B = x >> 9 & 4095 C = x >> 21 & 31 D = x >> 26 & 3 E = x >> 28 & 1 F = x >> 29 & 7 result |= D << 30 result |= F << 27 result |= C << 22 result |= B << 10 result |= A << 1 result |= E << 0 return result" "def main(x): A = x & 1 B = x >> 1 & 255 C = x >> 9 & 3 D = x >> 11 & 7 E = x >> 14 & 16383 F = x >> 28 & 7 G = x >> 31 & 1 result = 0 result |= C result |= A << 2 result |= D << 3 result |= B << 6 result |= F << 14 result |= G << 17 result |= E << 18 return result" "def main(input): a = (input & 1023) << 22 b = (input & 2096128) >> 1 c = (input & 1071644672) >> 21 d = (input & 3221225472) >> 10 return a | b | c | d" "def main(input): a = input & 3 b = (input & 262140) << 3 c = (input & 786432) >> 15 d = (input & 2146435072) << 1 e = (input & 2147483648) >> 29 return a | b | c | d | e" "def main(a): str1 = '{0:b}'.format(a) str1 = (32 - len(str1)) * '0' + str1 arr = list(str1) new_arr = [] new_arr[0:3] = arr[2:5] new_arr[3:10] = arr[12:19] new_arr[10:23] = arr[19:] new_arr[23:30] = arr[5:12] new_arr[30:] = arr[:2] str2 = '0b' for i in range(0, len(new_arr)): str2 += new_arr[i] bin_b = bin(int(str2, base=2)) b = int(bin_b, base=2) return b" "def main(x): a = x & 2 ** 1 - 1 b = (x & 2 ** 13 - 1) >> 1 c = (x & 2 ** 24 - 1) >> 13 d = (x & 2 ** 28 - 1) >> 24 e = (x & 2 ** 31 - 1) >> 28 f = x >> 31 return (a << 31) + b + (e << 12) + (d << 15) + (c << 19) + (f << 30)" "def main(x): A = x & 65535 B = x >> 16 & 255 C = x >> 24 & 127 D = x >> 31 & 1 f = 0 f |= D f |= B << 1 f |= A << 9 f |= C << 25 return f" "def main(x): a = x & 32767 b = x >> 15 & 7 c = x >> 18 & 2047 d = x >> 29 & 1 e = x >> 30 & 1 f = x >> 31 & 1 result = c << 0 | d << 11 | a << 12 | f << 27 | e << 28 | b << 29 return result" "def main(x): return x & 3221226495 | (x & 536870912) >> 19 | (x & 536862720) >> 2 | (x & 7168) << 17" "def main(x): A = (int(x) & 255) << 10 B = int(x) >> 8 & 1023 C = (int(x) & 3932160) << 10 D = int(x) >> 22 << 18 E = int(x) >> 31 << 27 return A | B | C | D | E" "def main(x): bin_x = str(bin(int(x)))[2:] while len(bin_x) != 32: bin_x = '0' + bin_x a = bin_x[19:] b = bin_x[7:19] c = bin_x[5:7] d = bin_x[3:5] e = bin_x[1:3] f = bin_x[:1] return int(hex(int(f + b + c + e + a + d, 2)), 16)" "def main(x): f = x >> 31 & 1 e = x >> 30 & 1 d = x >> 26 & 15 c = x >> 21 & 31 b = x >> 10 & 2047 a = x & 1023 res = f | c << 16 | e << 31 | d << 1 | b << 5 | a << 21 return res" "def main(hex_number): sbn = str(bin(hex_number)[2:]).rjust(32, '0') return int(sbn[7:11] + sbn[29:31] + sbn[31] + sbn[3:7] + sbn[11:13] + sbn[13:29] + sbn[0:3], 2)" "def main(input): a = (input & 31) << 25 b = (input & 1048544) << 1 c = (input & 7340032) >> 17 d = (input & 125829120) >> 2 e = (input & 939524096) >> 27 f = (input & 1073741824) << 1 g = (input & 2147483648) >> 1 return a | b | c | d | e | f | g" "def main(x): y = x * 0 y = y | (x & 1) << 24 y = y | (x & 2046) << 13 y = y | x >> 11 & 1023 y = y | (x >> 21 & 3) << 11 y = y | (x >> 23 & 127) << 25 y = y | (x >> 30 & 1) << 13 y = y | (x >> 31 & 1) << 10 return y" "def main(transforming_number): transforming_number = int(transforming_number) parts = get_parts(transforming_number) return parts[0] | parts[1] | parts[2] | parts[3] def get_parts(number): part_a = get_part_a(number) part_b = get_part_b(number) part_c = get_part_c(number) part_d = get_part_d(number) return [part_a, part_b, part_c, part_d] def get_part_a(number): maska = 1 part_a = maska & number return part_a << 31 def get_part_b(number): maska = int(4094) part_b = maska & number return part_b << 19 def get_part_c(number): maska = int(520192) part_b = maska & number return part_b << 1 def get_part_d(number): maska = int(4294443008) part_b = maska & number return part_b >> 19" "def main(x): ans = 0 ans += (x & 2047) << 20 ans += (x & 32767 << 11) >> 6 ans += (x & 1 << 26) << 5 ans += (x & 31 << 27) >> 27 return ans" "def main(input): a = input & 2047 b = (input & 2048) << 8 c = (input & 16773120) << 8 d = (input & 4278190080) >> 13 return a | b | c | d" "def main(arg: hex) -> hex: f_mask = 4160749568 e_mask = 100663296 d_mask = 33030144 c_mask = 262144 b_mask = 262140 a_mask = 3 f = arg & f_mask e = arg & e_mask d = arg & d_mask c = arg & c_mask b = arg & b_mask a = arg & a_mask f = f >> 25 e = e >> 25 d = d << 5 c = c << 5 b = b << 5 a = a << 30 return a + d + c + b + f + e" "def generate_mask(left, right): a = pow(2, left + 1) - pow(2, right) return a def main(x): a = x & generate_mask(0, 0) b = x & generate_mask(16, 1) c = x & generate_mask(22, 17) d = x & generate_mask(28, 23) e = x & generate_mask(29, 29) f = x & generate_mask(31, 30) b1 = b << 9 c1 = c >> 13 d1 = d << 3 e1 = e >> 28 f1 = f >> 28 n = b1 | c1 | d1 | e1 | f1 | a return n" "def main(hex_num): hex_num = int(hex(hex_num), 16) res = int(hex(0), 16) temp = int(hex(3221225472), 16) F = int(hex(int(hex(hex_num & temp), 16) >> 2), 16) temp = int(hex(1040187392), 16) E = int(hex(int(hex(hex_num & temp), 16) >> 12), 16) temp = int(hex(25165824), 16) D = int(hex(int(hex(hex_num & temp), 16) >> 23), 16) temp = int(hex(8380416), 16) C = int(hex(int(hex(hex_num & temp), 16) << 5), 16) temp = int(hex(8188), 16) B = int(hex(int(hex(hex_num & temp), 16)), 16) temp = int(hex(3), 16) A = int(hex(int(hex(hex_num & temp), 16) << 30), 16) return int(hex(res ^ A ^ F ^ C ^ E ^ B ^ D), 16)" "def main(input): a = (input & 15) << 0 b = (input & 1008) << 12 c = (input & 1047552) << 12 d = (input & 66060288) >> 10 e = (input & 4227858432) >> 22 return a | b | c | d | e" "def main(x): CB = x >> 12 << 12 A = x - CB return (A << 20) + (x >> 12)" "def main(x): A = (x & 255) << 3 B = (x & 16128) << 17 C = (x & 16760832) >> 1 D = (x & 50331648) >> 1 E = (x & 67108864) >> 15 F = (x & 939524096) >> 27 G = (x & 1073741824) >> 18 H = x & 2147483648 return H | B | D | C | G | E | A | F" "def main(x: int) -> int: before = 0 def shift(num: int) -> int: return 2 ** num - 1 def get_slice(to: int=32): nonlocal before res = x & shift(to) & ~shift(before) before = to return res a = get_slice(14) << 7 b = get_slice(21) >> 21 - 7 c = get_slice() return a | b | c" "def main(x): a = x & 255 b = x >> 8 & 15 c = x >> 12 & 63 d = x >> 18 & 1023 e = x >> 28 & 15 return b << 28 | e << 24 | c << 18 | d << 8 | a" "def main(number): s = str(bin(number)[2:]).rjust(32, '0') a = s[22:] b = s[21] c = s[15:21] d = s[4:15] e = s[1:4] f = s[0] res = e + c + a + f + b + d return int(res, 2)" "def main(input): a = (input & 2047) << 8 b = (input & 522240) >> 11 c = (input & 1073217536) << 2 d = (input & 3221225472) >> 11 return a | b | c | d" "def main(x): inp = bin(x) inp = inp[2:] sd = int(inp, 2) maskA = int('111', 2) & sd maskB = int('00000000000000001111111111111000', 2) & sd maskC = int('00000000011111110000000000000000', 2) & sd maskD = int('00000111100000000000000000000000', 2) & sd maskE = int('00111000000000000000000000000000', 2) & sd maskF = int('01000000000000000000000000000000', 2) & sd maskG = int('10000000000000000000000000000000', 2) & sd maskA = maskA maskB = maskB << 9 maskC = maskC << 9 maskD = maskD >> 15 maskE = maskE >> 22 maskF = maskF >> 27 maskG = maskG >> 27 return maskA | maskB | maskC | maskD | maskE | maskF | maskG" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(4, 0) b_mask = u_mask(10, 4) c_mask = u_mask(22, 10) d_mask = u_mask(23, 22) e_mask = u_mask(31, 23) f_mask = u_mask(32, 31) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask e = x & e_mask f = x & f_mask b = b << 22 c = c << 2 d = d << 3 e = e >> 19 f = f >> 7 return a | b | c | d | e | f" "def main(x): a = x % (1 << 6) x >>= 6 b = x % (1 << 6) x >>= 6 c = x % (1 << 5) x >>= 5 d = x % (1 << 10) x >>= 10 e = x % (1 << 2) x >>= 2 f = x % (1 << 2) x >>= 2 g = x k = g + (c << 1) + (f << 6) + (e << 8) r = (d << 10) + (a << 20) + (b << 26) return k + r" "def main(x): ED = x >> 27 CB = x - (ED << 27) >> 7 A = x - (ED << 27) - (CB << 7) return A + (ED << 7) + (CB << 12)" "def main(x): FE = x >> 30 FED = x >> 21 D = FED - (FE << 9) CBA = x - (FED << 21) CB = CBA >> 4 A = CBA - (CB << 4) return CB + (FE << 17) + (A << 19) + (D << 23)" "def bin_from_hex(hex_str): int_value = int(hex_str, base=16) return int_value def hex_from_bin_str(bin_str): return hex(int(bin_str, 2)) input_slices = [(0, 10, 7), (7, 0, 5), (12, 17, 2), (14, 9, 1), (15, 25, 7), (22, 22, 3), (25, 19, 3), (28, 5, 4)] def shift_bits(bins_in): bins_out = 0 for i in input_slices: for j in range(i[2]): if bins_in >> j + i[0] & 1: bins_out = bins_out | 1 << i[1] + j return bin(bins_out) def main(b_in): return int(shift_bits(b_in), base=2)" "def main(x): a_mask = 32767 b_mask = 127 << 15 c_mask = 511 << 22 d_mask = 1 << 31 a_res = x & a_mask b_res = (x & b_mask) >> 15 c_res = (x & c_mask) >> 22 d_res = (x & d_mask) >> 31 return d_res | c_res << 1 | a_res << 10 | b_res << 25" "def main(x): a = 1023 b = 3072 c = 16773120 d = 16777216 e = 4261412864 a = x & a b = x & b c = x & c d = x & d e = x & e a = a << 3 b = b >> 10 c = c << 8 e = e >> 12 d = d >> 22 result = a + b + c + d + e return result" "def main(x): A = (int(x) & 3) << 14 B = (int(x) >> 2 & 1023) << 22 C = (int(x) >> 12 & 15) << 16 D = (int(x) >> 16 & 3) << 12 E = (int(x) >> 18 & 63) << 3 F = int(x) >> 24 & 7 G = (int(x) >> 27 & 7) << 9 H = int(x) >> 30 << 20 return A | B | C | D | E | F | G | H" "def main(x): A = (int(x) & 1) << 23 B = (int(x) >> 1 & 4095) << 11 C = int(x) >> 13 & 2047 D = (int(x) >> 24 & 255) << 24 return A | B | C | D" "def main(x): GFED = x >> 25 GFE = GFED >> 3 D = GFED - (GFE << 3) CBA = x - (GFED << 25) return (D << 29) + (CBA << 4) + GFE" "def main(n): a = n & 63 b = n >> 6 & 511 c = n >> 15 & 8191 d = n >> 28 & 15 res = a | c << 6 | b << 19 | d << 28 return res" "def main(x): mask_a = 65535 mask_b = 63 << 16 mask_c = 15 << 22 mask_d = 63 << 26 a = x & mask_a b = (x & mask_b) >> 16 c = (x & mask_c) >> 22 d = (x & mask_d) >> 26 return d | b << 6 | c << 12 | a << 16" "def main(x): a_mask = 3 b_mask = 15 << 2 c_mask = 3 << 6 d_mask = 7 << 8 e_mask = 65535 << 11 f_mask = 7 << 27 g_mask = 3 << 30 a = x & a_mask b = (x & b_mask) >> 2 c = (x & c_mask) >> 6 d = (x & d_mask) >> 8 e = (x & e_mask) >> 11 f = (x & f_mask) >> 27 g = (x & g_mask) >> 30 return a | d << 2 | g << 5 | b << 7 | e << 11 | f << 27 | c << 30" "def main(y): return f(y) def f(y): ab = (y & 65535) << 16 cd = (y & 4294901760) >> 16 return ab + cd" "def main(x): a = b = c = d = e = f = x a &= 511 b &= 15872 c &= 16760832 d &= 1056964608 e &= 1073741824 f &= 2147483648 a = a << 6 b = b >> 8 c = c << 8 d = d >> 9 e = e >> 30 f = f >> 10 result = a | b | c | d | e | f return result" "def generate_mask(left, right): a = pow(2, left + 1) - pow(2, right) return a def main(x): a = x & generate_mask(4, 0) b = x & generate_mask(14, 5) c = x & generate_mask(28, 15) d = x & generate_mask(30, 29) e = x & generate_mask(31, 31) a1 = a << 10 b1 = b >> 5 c1 = c << 3 d1 = d >> 14 e1 = e >> 14 n = a1 | b1 | c1 | d1 | e1 return n" "def bitwise_shift(number, start, end, new_start): mask = 2 ** (end - start + 1) - 1 << new_start if new_start > start: number <<= new_start - start else: number >>= start - new_start return number & mask def main(number): a = bitwise_shift(number, 0, 13, 18) b = bitwise_shift(number, 14, 20, 2) c = bitwise_shift(number, 21, 25, 13) d = bitwise_shift(number, 26, 29, 9) e = bitwise_shift(number, 30, 31, 0) return a + b + c + d + e" "def main(x): a = x & 65535 b = x >> 16 & 255 c = x >> 24 & 3 d = x >> 26 & 31 e = x >> 31 & 1 result = c << 0 | e << 2 | a << 3 | d << 19 | b << 24 return result" "def main(hex_number): str_bin_number = str(bin(hex_number)[2:]).rjust(32, '0') strD = str_bin_number[0:7] strC = str_bin_number[7:14] strB = str_bin_number[14:25] strA = str_bin_number[25:32] return int(strB + strD + strC + strA, 2)" "def main(hex_num): hex_num = int(hex(hex_num), 16) temp = int(hex(3758096384), 16) D = int(hex(int(hex(hex_num & temp), 16) >> 29), 16) temp = int(hex(535822336), 16) C = int(hex(int(hex(hex_num & temp), 16) << 3), 16) temp = int(hex(1032192), 16) B = int(hex(int(hex(hex_num & temp), 16) << 3), 16) temp = int(hex(16383), 16) A = int(hex(int(hex(hex_num & temp), 16) << 3), 16) return int(hex(D ^ C ^ B ^ A), 16)" "def main(x): zone_a = x & 127 zone_b = x & 1048448 zone_c = x & 267386880 zone_d = x & 805306368 zone_e = x & 3221225472 zone_a = zone_a << 23 zone_b = zone_b << 1 zone_c = zone_c >> 20 zone_d = zone_d >> 7 res = zone_e res = res | zone_a res = res | zone_d res = res | zone_b res = res | zone_c return res" "def main(x): a = x & 63 b = x >> 6 b = b & 63 c = x >> 12 c = c & 127 d = x >> 19 d = d & 4095 e = x >> 31 sum = b sum = sum << 1 sum = sum | e sum = sum << 6 sum = sum | a sum = sum << 7 sum = sum | c sum = sum << 12 sum = sum | d return sum" "def main(x): A = (int(x) >> 0 & 63) << 24 B = (int(x) >> 6 & 1) << 11 C = (int(x) >> 7 & 31) << 12 D = (int(x) >> 12 & 511) << 0 E = (int(x) >> 21 & 3) << 9 F = (int(x) >> 23 & 3) << 30 G = (int(x) >> 25 & 63) << 17 H = (int(x) >> 31 & 1) << 23 return A | B | C | D | E | F | G | H" "def main(x): a = x & 3 b = x >> 2 & 255 c = x >> 10 & 3 d = x >> 12 & 4095 e = x >> 24 & 127 f = x >> 31 & 1 result = e << 0 | c << 7 | a << 9 | b << 11 | f << 19 | d << 20 return result" "def main(x): a = format(x, '032b') a = a[2] + a[0:2] + a[20:32] + a[3:7] + a[7:20] a = int(hex(int(a, 2)), 0) return a" "def main(field): A = (field & 127) << 24 B = (field & 130944) >> 7 C = (field & 66977792) >> 6 D = (field & 1006632960) >> 6 E = (field & 1073741824) << 1 F = (field & 2147483648) >> 21 return A | B | C | D | E | F" "def main(x): a = x & 7 b = x >> 3 b = b & 1 c = x >> 4 c = c & 1 d = x >> 5 d = d & 255 e = x >> 13 e = e & 3 f = x >> 15 f = f & 511 g = x >> 24 sum = e sum = sum << 8 sum = sum | g sum = sum << 8 sum = sum | d sum = sum << 3 sum = sum | a sum = sum << 1 sum = sum | b sum = sum << 1 sum = sum | c sum = sum << 9 sum = sum | f return sum" "def main(number): a = number & 511 b = number & 1048064 c = number & 1048576 d = number & 65011712 e = number & 67108864 f = number & 939524096 g = number & 1073741824 h = number & 2147483648 return a << 9 | b << 10 | c << 10 | d >> 20 | e >> 26 | f >> 21 | g << 1 | h >> 13" "def main(x): A = x & 32767 B = x >> 15 & 127 C = x >> 22 & 1 D = x >> 23 & 1 E = x >> 24 & 7 F = x >> 27 & 3 G = x >> 29 & 1 H = x >> 30 & 3 result = 0 result |= G result |= A << 1 result |= F << 16 result |= E << 18 result |= B << 21 result |= D << 28 result |= H << 29 result |= C << 31 return result" "def main(x): a = x & 7 b = x >> 3 & 4095 c = x >> 15 & 2047 d = x >> 26 & 7 e = x >> 29 & 3 f = x >> 31 & 1 return a << 29 | f << 28 | c << 17 | b << 5 | e << 3 | d" "def main(x: int) -> int: before = 0 def shift(num: int) -> int: return 2 ** num - 1 def get_slice(to: int=32): nonlocal before result = x & shift(to) & ~shift(before) before = to return result a = get_slice(11) << 13 b = get_slice(19) << 13 c = get_slice(27) >> 14 d = get_slice() >> 27 return a | b | c | d" "def main(x): A = (int(x) & 15) << 8 B = (int(x) >> 4 & 1) << 15 C = int(x) >> 5 & 127 D = (int(x) >> 12 & 31) << 16 E = (int(x) >> 17 & 2047) << 21 F = (int(x) >> 28 & 7) << 12 G = (int(x) >> 31 & 1) << 7 return A | B | C | D | E | F | G" "def main(x): A = (int(x) & 8191) << 19 B = (int(x) >> 13 & 255) << 4 C = (int(x) >> 21 & 7) << 16 D = (int(x) >> 24 & 7) << 13 E = (int(x) >> 27 & 1) << 12 F = int(x) >> 28 & 15 return A | B | C | D | E | F" "def A(x): return x & 127 def B(x): x &= 3968 return x >> 7 def C(x): x &= 126976 return x >> 12 def D(x): x &= 4063232 return x >> 17 def E(x): x &= 62914560 return x >> 22 def F(x): x &= 469762048 return x >> 26 def G(x): x &= 536870912 return x >> 29 def H(x): x &= 3221225472 return x def merge(y): x = H(y) x = x | B(y) << 25 x = x | E(y) << 21 x = x | D(y) << 16 x = x | C(y) << 11 x = x | G(y) << 10 x = x | A(y) << 3 x = x | F(y) return x def main(x): return merge(x)" "def main(x): result = 0 A = x & 3 B = x >> 2 & 63 C = x >> 8 & 3 D = x >> 10 & 1023 E = x >> 20 & 3 F = x >> 22 & 255 G = x >> 30 & 1 H = x >> 31 & 1 result |= E << 30 result |= D << 20 result |= C << 18 result |= B << 12 result |= A << 10 result |= G << 9 result |= F << 1 result |= H << 0 return result" "def main(u): a = (u & 4095) << 14 b = (u & 67104768) >> 12 c = (u & 469762048) << 3 d = (u & 3758096384) >> 3 return a | b | c | d" "def func(x): maska = 4294967295 x = x & maska answer = 0 a = (x << 30 & maska) >> 30 b = (x << 15 & maska) >> 17 c = (x << 14 & maska) >> 31 d = (x << 12 & maska) >> 30 e = (x << 2 & maska) >> 22 f = (x << 1 & maska) >> 31 g = x >> 31 answer = answer | f << 31 | a << 29 | g << 28 | b << 13 answer = answer | d << 11 | e << 1 | c return answer def main(arg1): return func(arg1)" "def main(x): x = bin(x)[2:] x = str(x).zfill(32) digits = [int(y) for y in str(x)] A = [digits[24], digits[25], digits[26], digits[27], digits[28], digits[29], digits[30], digits[31]] list_A = [str(y) for y in A] list_A = ''.join(list_A) A = int(list_A) B = [digits[11], digits[12], digits[13], digits[14], digits[15], digits[16], digits[17], digits[18], digits[19], digits[20], digits[21], digits[22], digits[23]] list_B = [str(y) for y in B] list_B = ''.join(list_B) B = int(list_B) C = [digits[7], digits[8], digits[9], digits[10]] list_C = [str(y) for y in C] list_C = ''.join(list_C) C = int(list_C) D = [digits[2], digits[3], digits[4], digits[5], digits[6]] list_D = [str(y) for y in D] list_D = ''.join(list_D) D = int(list_D) E = digits[1] F = digits[0] newX = str(E).zfill(1) + str(B).zfill(13) + str(F).zfill(1) + str(A).zfill(8) + str(C).zfill(4) + str(D).zfill(5) return int(newX, 2)" "def main(x): a = (x & get_mask(0, 2)) << 22 b = (x & get_mask(2, 11)) << 1 c = (x & get_mask(11, 14)) >> 11 d = (x & get_mask(14, 22)) << 10 e = (x & get_mask(22, 31)) >> 9 f = (x & get_mask(31, 32)) >> 31 - 12 return a | b | c | d | e | f def get_mask(start, fin): return 4294967295 >> 32 - fin & 4294967295 << start" "def A(x): return x & 8191 def B(x): x &= 253952 return x >> 13 def C(x): x &= 66846720 return x >> 18 def D(x): x &= 4227858432 return x >> 26 def merge(y): x = A(y) << 19 x = x | B(y) << 14 x = x | D(y) << 8 x = x | C(y) return x def main(x): return merge(x)" "def main(x): A = x & 65535 B = x >> 16 & 3 C = x >> 18 & 1 D = x >> 19 & 1023 E = x >> 29 & 7 result = 0 result |= A result |= E << 16 result |= D << 19 result |= C << 29 result |= B << 30 return result" "def main(x): x = bin(x)[2:] x = str(x).zfill(32) digits = [int(y) for y in str(x)] A = [digits[16], digits[17], digits[18], digits[19], digits[20], digits[21], digits[22], digits[23], digits[24], digits[25], digits[26], digits[27], digits[28], digits[29], digits[30], digits[31]] list_A = [str(y) for y in A] list_A = ''.join(list_A) A = int(list_A) B = [digits[10], digits[11], digits[12], digits[13], digits[14], digits[15]] list_B = [str(y) for y in B] list_B = ''.join(list_B) B = int(list_B) C = [digits[6], digits[7], digits[8], digits[9]] list_C = [str(y) for y in C] list_C = ''.join(list_C) C = int(list_C) D = [digits[3], digits[4], digits[5]] list_D = [str(y) for y in D] list_D = ''.join(list_D) D = int(list_D) E = [digits[1], digits[2]] list_E = [str(y) for y in E] list_E = ''.join(list_E) E = int(list_E) F = digits[0] newX = str(E).zfill(2) + str(F).zfill(1) + str(A).zfill(16) + str(D).zfill(3) + str(B).zfill(6) + str(C).zfill(4) return int(newX, 2)" "def main(field): A = (field & 8191) << 16 B = (field & 268427264) >> 12 C = (field & 268435456) << 1 D = (field & 1610612736) << 1 E = (field & 2147483648) >> 31 return A | B | C | D | E" "def main(number): s = str(bin(number)[2:]).rjust(32, '0') a = s[29:] b = s[22:29] c = s[20:22] d = s[7:20] e = s[1:7] f = s[0] res = e + c + b + a + f + d return int(res, 2)" "def main(x): e = x & 3221225472 d = x & 1065353216 c = x & 8257536 b = x & 114688 a = x & 16383 e = e >> 14 b = b >> 14 d = d >> 14 c = c >> 14 a = a << 18 return b + e + a + c + d" "def main(x): a = x & 31 b = x >> 5 & 32767 c = x >> 20 & 7 d = x >> 23 & 255 e = x >> 31 & 1 return a | e << 5 | b << 6 | d << 21 | c << 29" "def main(x): a = x & 255 b = x >> 8 & 63 c = x >> 14 & 8191 d = x >> 27 & 15 e = x >> 31 & 1 result = 0 result |= a << 24 result |= d << 20 result |= e << 19 result |= b << 13 result |= c << 0 return result" "def main(x): f = x & 1 << 31 e = x & 7 << 28 d = x & 8191 << 15 c = x & 255 << 7 b = x & 7 << 4 a = x & 15 result = 0 result |= f >> 13 result |= e >> 28 result |= d << 4 result |= c result |= b << 11 result |= a << 3 return result" "def main(x): A = x & 1 B = x >> 1 & 16383 C = x >> 15 & 8191 D = x >> 28 & 7 E = x >> 31 & 1 result = 0 result |= A result |= E << 1 result |= C << 2 result |= B << 15 result |= D << 29 return result" "def main(num): a = num & 63 b = num & 8128 c = num & 4186112 d = num & 4194304 e = num & 25165824 f = num & 100663296 g = num & 402653184 h = num & 3758096384 temp = d << 3 | e << 3 | f << 5 | g << 1 | h >> 29 return a << 10 | b >> 3 | c << 3 | temp" "def main(num): a = num & 1023 b = num & 67107840 c = num & 1006632960 d = num & 3221225472 return a | b << 6 | c >> 16 | d >> 16" "def main(x): a = 16383 b = 33538048 c = 1040187392 d = 3221225472 a = x & a b = x & b c = x & c d = x & d a = a << 7 b = b << 7 c = c >> 25 d = d >> 25 result = a + b + c + d return result" "def main(hex_number): str_bin_number = str(bin(hex_number)[2:]).rjust(32, '0') return int(str_bin_number[22:31] + str_bin_number[0] + str_bin_number[4:6] + str_bin_number[31] + str_bin_number[1:4] + str_bin_number[6:22], 2)" "def main(x): a_multiplier = 2 ** 11 - 1 b_multiplier = 2 ** 3 - 1 a = x & a_multiplier x = x >> 11 b = x & b_multiplier x = x >> 3 x = x << 11 x = x + a x = x << 3 x = x + b return int(hex(x), 16)" "import math def main(x): a = (x & 2147483647) << 1 b = (x & 2147483648) >> 31 return a | b" "def main(x): a = 255 b = 2096896 c = 14680064 d = 117440512 e = 402653184 f = 536870912 g = 3221225472 a = x & a b = x & b c = x & c d = x & d e = x & e f = x & f g = x & g a = a << 10 b = b << 10 c = c >> 14 e = e >> 22 d = d >> 22 g = g >> 30 f = f << 2 result = a + b + c + d + e + f + g return result" "def main(number): s = str(bin(number)[2:]).rjust(32, '0') a = s[16:] b = s[8:16] c = s[5:8] d = s[4] e = s[2:4] f = s[1] g = s[0] result = a + f + c + b + e + d + g return int(result, 2)" "def main(num): a = num & 3 b = (num & 28) << 27 c = (num & 1048544) >> 3 d = (num & 4293918720) >> 3 return a | b | c | d" "def main(number): num = number partA = num & 16383 num = num >> 14 partB = num & 1 num = num >> 1 partC = num & 127 num = num >> 7 partD = num & 1 num = num >> 1 partE = num & 511 new_num = 0 new_num |= partE new_num <<= 14 new_num |= partA new_num <<= 7 new_num |= partC new_num <<= 1 new_num |= partD new_num <<= 1 new_num |= partB return new_num" "def main(number): num = number partA = num & 31 num = num >> 5 partB = num & 127 num = num >> 7 partC = num & 32767 num = num >> 15 partD = num & 15 num = num >> 4 partE = num & 1 new_num = 0 new_num |= partB new_num <<= 5 new_num |= partA new_num <<= 1 new_num |= partE new_num <<= 4 new_num |= partD new_num <<= 15 new_num |= partC return new_num" "def main(x): g = (2147483648 & x) >> 6 f = (1610612736 & x) << 1 e = (268435456 & x) << 1 d = (134217728 & x) >> 27 c = (133693440 & x) >> 2 b = (524280 & x) >> 2 a = (7 & x) << 26 return g | a | b | c | d | e | f" "def main(x): h = (x & 2147483648) >> 31 g = (x & 1073741824) >> 9 f = (x & 536870912) >> 7 e = (x & 402653184) >> 8 d = (x & 133693440) >> 18 c = (x & 491520) >> 6 b = (x & 32256) << 4 a = (x & 511) << 23 return a + b + c + d + e + f + g + h" "def main(num): a = num & 8191 b = num & 2088960 c = num & 6291456 d = num & 125829120 e = num & 2013265920 f = num & 2147483648 return a << 19 | b >> 2 | c >> 16 | d >> 16 | e >> 27 | f >> 27" "def main(x): A = x & 1 B = x >> 1 & 3 C = x >> 3 & 63 D = x >> 9 & 1023 E = x >> 19 & 15 F = x >> 23 & 511 result = 0 result |= A result |= C << 1 result |= F << 7 result |= D << 16 result |= E << 26 result |= B << 30 return result" "def main(num): a = num & 7 end_num = a << 2 b = num & 131064 end_num += b << 15 c = num & 134086656 end_num += c >> 12 d = num & 402653184 end_num += d >> 12 e = num & 1610612736 end_num += e >> 29 f = num & 2147483648 end_num += f >> 14 return end_num" "def main(x): a = x & 31 b = x >> 5 & 3 c = x >> 7 & 8191 d = x >> 20 & 2047 e = x >> 31 & 1 return a << 27 | b << 25 | c << 12 | e << 11 | d" "def main(x): A = (int(x) & 8191) << 13 B = int(x) >> 13 & 8191 C = (int(x) >> 26 & 3) << 27 D = (int(x) >> 28 & 1) << 26 E = (int(x) >> 29 & 7) << 29 return A | B | C | D | E" "def main(x): op1 = x xC = 4227858432 xB = 67076096 xA = 32767 C = op1 & xC C = C >> 26 B = op1 & xB B = B >> 9 A = op1 & xA A = A << 17 p = A + B + C return p" "def main(input): A = (input & 65535) << 8 B = (input & 4128768) << 8 C = (input & 29360128) >> 22 D = (input & 234881024) >> 22 E = (input & 268435456) >> 22 F = (input & 1610612736) << 1 G = (input & 2147483648) >> 24 return A | B | C | D | E | F | G" "def main(x): A = x & 32767 B = x >> 15 & 3 C = x >> 17 & 3 D = x >> 19 & 127 E = x >> 26 & 15 F = x >> 30 & 3 result = 0 result |= E result |= B << 4 result |= F << 6 result |= A << 8 result |= D << 23 result |= C << 30 return result" "def main(x): a = 15 b = 112 c = 128 d = 7936 e = 57344 f = 458752 g = 7864320 h = 4286578688 a = x & a b = x & b c = x & c d = x & d e = x & e f = x & f g = x & g h = x & h a = a << 12 b = b << 5 c = c >> 2 d = d >> 8 e = e << 16 f = f >> 10 g = g >> 3 h = h >> 3 result = a + b + c + d + e + f + g + h return result" "def main(x): c = (x & 4278190080) >> 24 b = (x & 16773120) >> 12 a = x & 4095 ans = c << 24 | a << 12 | b return ans" "def main(x): c = x >> 30 b = x >> 15 & 32767 a = x & 32767 ans = b << 17 | a << 2 | c return ans" "def main(x): a = x & 4095 b = x >> 12 b = b & 127 c = x >> 19 c = c & 31 d = x >> 24 d = d & 255 sum = c sum = sum << 8 sum = sum | d sum = sum << 12 sum = sum | a sum = sum << 7 sum = sum | b return sum" "def main(s): hex_ = hex(s) bin_s = f'{int(hex_, 16):0>32b}' e = bin_s[0] d = bin_s[1:3] c = bin_s[3:7] b = bin_s[7:19] a = bin_s[19:] res = hex(int(e + d + b + a + c, 2)) return int(res, 16)" "def main(f): x = format(f, 'b') str(x) if len(x) < 32: while len(x) < 32: x = '0' + x partA = x[29:] partB = x[18:29] partEDC = x[:18] newF = partEDC + partA + partB return newfun1(f, newF) def newfun1(x, newX): strX = str(x) if strX[1] != 'x': return int(newX, 2) else: return hex(int(newX, 2))" "def main(hex_number): str_bin_number = str(bin(hex_number)[2:]).rjust(32, '0') return int(str_bin_number[16:27] + str_bin_number[5:16] + str_bin_number[27:] + str_bin_number[0:5], 2)" "def main(x): a = b = c = d = e = f = x a &= 7 b &= 65528 c &= 67043328 d &= 1006632960 e &= 1073741824 f &= 2147483648 f = f >> 31 a = a << 1 e = e >> 26 c = c >> 11 d = d >> 11 b = b << 16 x = a | b | c | d | e | f return x" "def main(b): a = 2097151 c = 1 d = 1023 a = a & b b >>= 21 d = d & b b >>= 10 c = c & b b >>= 1 b <<= 10 b = b | d b <<= 1 b = b | c b <<= 21 b = b | a return b" "def main(number): s = str(bin(number)[2:]).rjust(32, '0') a = s[27:] b = s[24:27] c = s[10:24] d = s[0:10] res = b + d + a + c return int(res, 2)" "def main(val): hval = hex(val) bval = f'{int(hval, 16):0>32b}' h = bval[0:2] g = bval[2] f = bval[3:6] e = bval[6:8] d = bval[8:12] c = bval[12:14] b = bval[14:29] a = bval[29:] res = hex(int(h + f + e + g + d + b + c + a, 2)) return int(res, 16)" "def main(number): s = str(bin(number)[2:]).rjust(32, '0') a = s[29:] b = s[19:29] c = s[11:19] d = s[1:11] e = s[0] res = b + d + a + e + c return int(res, 2)" "def main(x): A = x & 31 B = x >> 5 & 63 C = x >> 11 & 1 D = x >> 12 & 255 E = x >> 20 & 4095 result = 0 result |= A result |= B << 5 result |= E << 11 result |= C << 23 result |= D << 24 return result" "def main(x): A = x & 15 B = x >> 4 & 255 C = x >> 12 & 8191 D = x >> 25 & 63 E = x >> 31 & 1 result = 0 result |= A result |= E << 4 result |= D << 5 result |= B << 11 result |= C << 19 return result" "def main(num): a = num & 511 b = num >> 9 & 511 c = num >> 18 & 8191 d = num >> 31 & 1 result = c | b << 13 | d << 22 | a << 23 return result" "import math def main(x): a = b = c = d = x a &= 32767 b &= 67076096 c &= 2080374784 d &= 3221225472 b = b >> 9 c = c >> 26 a = a << 17 d = d >> 26 x = a | b | c | d return x" "import math def main(x): a = b = c = d = e = f = x a &= 8191 b &= 8192 c &= 16760832 d &= 1056964608 e &= 1073741824 f &= 2147483648 b = b >> 11 c = c << 8 a = a << 3 e = e >> 29 d = d >> 8 f = f >> 31 x = a | b | c | d | e | f return x" "def main(input): a = (input & 1023) << 6 b = (input & 64512) >> 10 c = (input & 2147418112) << 1 d = (input & 2147483648) >> 15 return a | b | c | d" "def main(x): res = x mask = x << 5 res = res & 4294967295 - 264241152 | mask & 264241152 mask = x >> 6 res = res & 4294967295 - 2047 | mask & 2047 mask = x << 12 res = res & 4294967295 - 258048 | mask & 258048 mask = x >> 16 res = res & 4294967295 - 2048 | mask & 2048 mask = x >> 7 res = res & 4294967295 - 786432 | mask & 786432 mask = x >> 4 res = res & 4294967295 - 1048576 | mask & 1048576 mask = x >> 2 res = res & 4294967295 - 1048576 * 2 | mask & 1048576 * 2 return res" "def main(x): a = x & 2 ** 14 - 1 b = (x & 2 ** 22 - 1) >> 14 c = (x & 2 ** 31 - 1) >> 22 d = x >> 31 return a + (d << 14) + (c << 15) + (b << 24)" "def main(hex_num): hex_num = int(hex(hex_num), 16) res = int(hex(0), 16) temp = int(hex(4290772992), 16) C = int(hex(int(hex(hex_num & temp), 16) >> 13), 16) temp = int(hex(4186112), 16) B = int(hex(int(hex(hex_num & temp), 16) >> 13), 16) temp = int(hex(8191), 16) A = int(hex(int(hex(hex_num & temp), 16) << 19), 16) return int(hex(res ^ A ^ B ^ C), 16)" "def main(x): return (7 & x) << 15 | (16376 & x) << 18 | (16384 & x) << 4 | (1073709056 & x) >> 15 | (1073741824 & x) >> 11 | (2147483648 & x) >> 11" "def main(s): s = int(s) s_1 = (s & 31) << 4 s_2 = (s >> 5 & 1023) << 9 s_3 = s >> 15 & 15 s_4 = (s >> 19 & 8191) << 19 return s_1 | s_2 | s_3 | s_4" "def main(s): s = int(s) s_1 = s & 31 s_2 = (s >> 5 & 31) << 17 s_3 = (s >> 10 & 63) << 23 s_4 = (s >> 16 & 511) << 8 s_5 = (s >> 25 & 7) << 29 s_6 = (s >> 28 & 7) << 5 s_7 = (s >> 31 & 1) << 22 return s_1 | s_2 | s_3 | s_4 | s_5 | s_6 | s_7" "def main(input_hex): a = int(format(input_hex, '#034b')[-4:], 2) << 4 input_hex >>= 4 b = int(format(input_hex, '#034b')[-12:], 2) << 17 input_hex >>= 12 c = int(format(input_hex, '#034b')[-9:], 2) << 8 input_hex >>= 9 d = int(format(input_hex, '#034b')[-2:], 2) << 0 input_hex >>= 2 e = int(format(input_hex, '#034b')[-2:], 2) << 2 input_hex >>= 2 f = int(format(input_hex, '#034b')[-2:], 2) << 29 input_hex >>= 2 g = int(format(input_hex, '#034b')[-1:], 2) << 31 return a + b + c + d + e + f + g" "def main(x): a = format(x, '032b') a = a[1:5] + a[12:18] + a[18:32] + a[6:12] + a[5:6] + a[0] a = int(hex(int(a, 2)), 0) return a" "def main(x): A = x & 31 B = x >> 5 & 255 C = x >> 13 & 32767 D = x >> 28 & 1 E = x >> 29 & 7 result = 0 result |= B result |= A << 8 result |= D << 13 result |= C << 14 result |= E << 29 return result" "def main(arg): a = arg & 511 b = arg >> 9 & 15 c = arg >> 13 & 15 d = arg >> 17 & 8191 e = arg >> 30 & 1 f = arg >> 31 & 1 return a << 5 | b << 27 | c << 1 | d << 14 | e << 31 | f" "def main(arg): a = arg & 255 b = arg >> 8 & 4095 c = arg >> 20 & 3 d = arg >> 22 & 3 e = arg >> 24 return a << 16 | b << 4 | c << 2 | d | e << 24" "def main(arg): a = arg & 1023 b = arg >> 10 & 63 c = arg >> 16 & 15 d = arg >> 20 & 3 e = arg >> 22 & 31 f = arg >> 27 & 1 g = arg >> 28 & 1 h = arg >> 29 & 7 x = e << 4 | f << 29 | g << 3 | h return a << 9 | b << 19 | c << 25 | d << 30 | x" "def main(x): a = x & 65535 b = x >> 16 b = b & 65535 sum = a sum = sum << 16 sum = sum | b return sum" "def main(x): a = (x & 7) << 12 b = (x & 248) << 12 c = (x & 261888) << 14 d = (x & 1073479680) >> 18 e = (x & 3221225472) >> 10 return a + b + c + d + e" "def main(x): A = x & 8191 B = x >> 13 & 8191 C = x >> 26 & 15 D = x >> 30 & 1 E = x >> 31 & 1 y = 0 y |= C y |= D << 4 y |= A << 5 y |= B << 18 y |= E << 31 return y" "def main(x): a = x & 7 b = x >> 3 & 4095 c = x >> 15 & 8191 d = x >> 28 & 7 e = x >> 31 & 1 result = 0 result |= e result |= a << 1 result |= c << 4 result |= b << 17 result |= d << 29 return result" "import math def main(x): a = b = c = d = e = f = g = x a &= 1 b &= 510 c &= 32256 d &= 229376 e &= 16515072 f &= 2130706432 g &= 2147483648 a = a << 25 b = b << 15 c = c >> 2 d = d >> 2 e = e << 8 f = f >> 24 g = g >> 7 x = a | b | c | d | e | f | g return x" "def main(x): mask_a = 63 mask_b = 15 << 6 mask_c = 511 << 10 mask_d = 511 << 19 mask_e = 3 << 28 mask_f = 3 << 30 a = x & mask_a b = (x & mask_b) >> 6 c = (x & mask_c) >> 10 d = (x & mask_d) >> 19 e = (x & mask_e) >> 28 f = (x & mask_f) >> 30 return e | f << 2 | a << 4 | b << 10 | c << 14 | d << 23" "def main(lol): a = lol & 63 b = lol >> 6 & 65535 c = lol >> 22 & 15 d = lol >> 26 & 15 e = lol >> 30 & 3 result = e | d << 2 | a << 6 | c << 12 | b << 16 return result" "def main(x): A = x & 15 B = x >> 4 & 1 C = x >> 5 & 16383 D = x >> 19 & 511 E = x >> 28 & 7 F = x >> 31 & 1 result = 0 result |= A result |= C << 4 result |= B << 18 result |= F << 19 result |= E << 20 result |= D << 23 return result" "def main(x): a = b = c = d = e = f = x a &= 32767 b &= 1015808 c &= 15728640 d &= 251658240 e &= 268435456 f &= 3758096384 a = a << 4 b = b << 12 c = c >> 20 d = d >> 2 e = e >> 2 f = f >> 10 result = a | b | c | d | e | f return result" "def main(d): A = d & 65535 B = d & 268369920 C = d & 268435456 D = d & 536870912 E = d & 3221225472 A = A << 12 B = B >> 16 E = E >> 2 D = D << 2 C = C << 2 return A | B | C | D | E" "def main(x): x_a = (15 & x) << 25 x_b = (127 & x >> 4) << 3 x_c = (255 & x >> 11) << 12 x_d = (3 & x >> 19) << 23 x_e = (3 & x >> 21) << 10 x_f = (7 & x >> 23) << 29 x_g = 7 & x >> 26 x_h = (7 & x >> 29) << 20 return x_a + x_b + x_c + x_d + x_e + x_f + x_g + x_h" "def main(x): g_bit = 2147483648 f_bit = 1879048192 e_bit = 251658240 d_bit = 16646144 c_bit = 122880 b_bit = 8064 a_bit = 127 new_a = (x & a_bit) << 25 new_b = (x & b_bit) >> 7 new_c = (x & c_bit) >> 3 new_d = (x & d_bit) << 1 new_e = (x & e_bit) >> 18 new_f = (x & f_bit) >> 14 new_g = (x & g_bit) >> 14 res = new_a | new_b | new_c | new_d | new_e | new_f | new_g return res" "def main(x): x_a = (7 & x) << 2 x_b = (32767 & x >> 3) << 10 x_c = (31 & x >> 18) << 5 x_d = (127 & x >> 23) << 25 x_e = 1 & x >> 30 x_f = (1 & x >> 31) << 1 return x_a + x_b + x_c + x_d + x_e + x_f" "def main(x): result = 0 A = x & 127 B = x >> 7 & 15 C = x >> 11 & 127 D = x >> 18 & 63 E = x >> 24 & 3 F = x >> 26 & 15 G = x >> 30 & 1 H = x >> 31 & 1 result |= A << 0 result |= C << 25 result |= B << 10 result |= E << 7 result |= D << 19 result |= F << 15 result |= H << 14 result |= G << 9 return result" "def main(x): a = x & 16383 b = x >> 14 & 511 c = x >> 23 & 63 d = x >> 29 & 3 e = x >> 31 & 1 result = c | d << 6 | b << 8 | e << 17 | a << 18 return result" "def main(x): a = x & 16383 b = x >> 14 & 31 c = x >> 19 & 3 d = x >> 21 & 2047 result = d | a << 11 | b << 25 | c << 30 return result" "def main(s): e = (s & 3221225472) >> 30 d = (s & 1006632960) >> 26 c = (s & 66846720) >> 18 b = (s & 260096) >> 11 a = s & 2047 k = (((c << 2 | e) << 11 | a) << 4 | d) << 7 | b return k" "def main(n): num = str(bin(n)[2:]).rjust(32, '0') a = num[28:] dnc = num[:26] b = num[26:28] return int(a + dnc + b, 2)" "def main(x): b = (x & 3072) << 3 c = (x & 16773120) << 3 d = (x & 117440512) >> 14 e = x & 4160749568 a = x & 1023 return e | c | b | d | a" "def main(x): a = (8, 0, 8, 0) b = (20, 9, 31, 20) c = (27, 21, 18, 12) d = (28, 28, 19, 19) e = (29, 29, 9, 9) f = (31, 30, 11, 10) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - d[1] + 1)) * '0' + (e[0] - d[1] + 1) * '1', 2)) << e[3] F = (int(x) >> f[1] & int((32 - (f[0] - d[1] + 1)) * '0' + (f[0] - d[1] + 1) * '1', 2)) << f[3] return A | B | C | D | E | F" "def main(x): a = (6, 0, 31, 25) b = (18, 7, 11, 0) c = (28, 19, 24, 15) d = (31, 29, 14, 12) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] return A | B | C | D" "def main(x): h = x & 2147483648 g = x & 1610612736 f = x & 402653184 e = x & 67108864 d = x & 65011712 c = x & 1572864 b = x & 523776 a = x & 511 b = b << 13 f = f >> 7 e = e >> 7 c = c >> 2 a = a << 8 d = d >> 18 h = h >> 29 g = g >> 29 otvet = b + f + e + c + a + d + h + g return otvet" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(7, 0) b_mask = u_mask(14, 7) c_mask = u_mask(20, 14) d_mask = u_mask(28, 20) e_mask = u_mask(32, 28) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask e = x & e_mask a = a << 8 b = b << 18 c = c << 5 d = d >> 20 e = e >> 13 return a | b | c | d | e" "def main(x): a = x & 127 b = x >> 7 & 4095 c = x >> 19 & 7 d = x >> 22 & 1 e = x >> 23 & 31 f = x >> 28 & 1 g = x >> 29 & 3 h = x >> 31 & 1 temp = g | c << 2 | f << 5 | b << 6 result = temp | a << 18 | e << 25 | d << 30 | h << 31 return result" "def main(x): a = x & 7 b = x >> 3 & 15 c = (x >> 7 & 15) << 8 d = x >> 11 & 31 e = x >> 16 & 255 f = x >> 24 & 3 g = x >> 26 & 63 r = e | c | a << 12 | g << 15 | b << 21 | d << 25 | f << 30 return r" "def main(x): a = b = c = d = e = x a &= 1 b &= 62 c &= 4032 d &= 134213632 e &= 4160749568 a = a << 31 b = b << 10 c = c >> 1 d = d << 4 e = e >> 27 result = a | b | c | d | e return result" "def main(x): A = x & 63 B = x >> 6 & 65535 C = x >> 22 & 31 D = x >> 27 & 3 E = x >> 29 & 7 result = 0 result |= C result |= B << 5 result |= E << 21 result |= D << 24 result |= A << 26 return result" "def main(x): a = b = c = d = e = f = x a &= 15 b &= 496 c &= 130560 d &= 134086656 e &= 402653184 f &= 3758096384 a = a << 21 b = b << 21 c = c << 4 d = d >> 14 e = e << 3 f = f >> 29 result = a | b | c | d | e | f return result" "def main(x): a = b = c = d = x a &= 31 b &= 1048544 c &= 66060288 d &= 4227858432 a = a << 21 b = b >> 5 c = c >> 5 d = d >> 0 result = a | b | c | d return result" "def main(x): a = x & 63 b = x >> 6 & 16383 c = x >> 20 & 255 d = x >> 28 & 7 e = x >> 31 & 1 result = c | e << 8 | a << 9 | d << 15 | b << 18 return result" "import struct import math def main(x): f = x & 3758096384 e = x & 528482304 d = x & 8126464 c = x & 131072 b = x & 126976 a = x & 4095 c = c << 14 d = d << 8 f = f >> 6 a = a << 11 e = e >> 18 b = b >> 12 x = c + d + f + a + e + b return x" "def get_field(x, start_bit, end_bit): mask = 2 ** (end_bit + 1 - start_bit) - 1 return x >> start_bit & mask def main(x): a = get_field(x, 0, 14) b = get_field(x, 15, 20) c = get_field(x, 21, 27) d = get_field(x, 28, 30) e = get_field(x, 31, 31) r = a | e << 15 | c << 16 | b << 23 | d << 29 return r" "def main(num): a = num & 1 b = num & 2046 c = num & 1046528 d = num & 66060288 e = num & 1006632960 f = num & 1073741824 g = num & 2147483648 return a << 21 | b << 21 | c >> 1 | d >> 16 | e >> 26 | f >> 10 | g >> 12" "def main(s): return (s & 255) << 4 | s >> 8 & 7 | (s >> 11 & 31) << 27 | (s >> 16 & 1) << 3 | (s >> 17 & 8191) << 14 | (s >> 30 & 3) << 12" "def main(x): return (x & 3221225472) >> 30 | (x & 536870912) >> 13 | (x & 268435456) >> 11 | (x & 201326592) >> 5 | (x & 66977792) << 6 | (x & 131064) >> 1 | (x & 7) << 18" "def main(x): a = x & 1023 b = x & 15360 c = x & 268419072 d = x & 4026531840 c = c << 4 d = d >> 14 return a | b | c | d" "import math def main(x): a = b = c = x a &= 65535 b &= 1073709056 c &= 3221225472 a = a << 14 b = b >> 16 x = a | b | c return x" "def main(bf): g = bf & 2147483648 f = bf & 1073741824 e = bf & 805306368 d = bf & 201326592 c = bf & 33554432 b = bf & 33553408 a = bf & 1023 return (g >> 28) + (f >> 28) + (e >> 28) + (d >> 7) + (c << 6) + (b >> 6) + (a << 21)" "def main(value): mask = int('10000000000000000000000000000000', 2) d = (value & mask) >> 31 new_value = value << 1 return (new_value | d) & int('11111111111111111111111111111111', 2)" "def main(x): e = (3758096384 & x) >> 29 d = (268435456 & x) >> 11 c = (268419072 & x) << 4 b = (16352 & x) << 3 a = (31 & x) << 3 return a | b | c | d | e" "def main(number): number = str(bin(number))[2:] if len(number) < 32: number = '0' * (32 - len(number)) + number number_1 = number[6:22] + number[3] + number[22:] number_2 = number[1:3] + number[4:6] + number[0] number = number_1 + number_2 return int(number, base=2)" "def main(x): a = x & 65535 b = x >> 16 & 15 c = x >> 20 & 31 d = x >> 25 & 63 e = x >> 31 & 1 result = e | b << 1 | a << 5 | d << 21 | c << 27 return result" "def main(x): a = x & 15 b = x >> 4 & 2047 c = x >> 15 & 511 d = x >> 24 & 63 e = x >> 30 & 3 result = b | e << 11 | a << 13 | d << 17 | c << 23 return result" "def main(x): A = x & 255 B = x >> 8 & 127 C = x >> 15 & 15 D = x >> 19 & 8191 result = 0 result |= A result |= C << 8 result |= B << 12 result |= D << 19 return result" "def main(num): n_a = num & 32767 num = num >> 15 result = n_a << 12 n_b = num & 2047 num = num >> 11 result += n_b << 1 n_c = num & 15 num = num >> 4 result += n_c << 27 n_d = num & 1 num = num >> 1 result += n_d n_e = num result += n_e << 31 return result" "def main(x): result = 0 segment_a = x & 63 segment_b = x >> 6 & 1023 segment_c = x >> 16 & 7 segment_d = x >> 19 & 7 segment_e = x >> 22 & 1023 result |= segment_d << 0 result |= segment_b << 3 result |= segment_a << 13 result |= segment_c << 19 result |= segment_e << 22 return result" "def main(x): f = x & 1 << 31 e = x & 1 << 30 d = x & 7 << 27 c = x & 2047 << 16 b = x & 32767 << 1 a = x & 1 return e << 1 | b << 15 | c >> 11 | f >> 27 | d >> 26 | a" "def main(x): r1 = x >> 15 & 114688 r2 = x >> 1 & 251658240 r3 = x >> 11 & 16383 r4 = x << 21 & 4026531840 r5 = x << 17 & 16646144 return r1 | r2 | r3 | r4 | r5" "def main(x): c = x & 1023 << 22 b = x & 1023 << 12 a = x & 4095 return c | a << 10 | b >> 12" "def main(s): return int((s & 2047) << 10 | (s >> 11 & 1) << 1 | (s >> 12 & 2047) << 21 | (s >> 23 & 1) << 3 | (s >> 24 & 63) << 4 | (s >> 30 & 1) << 2 | s >> 31 & 1)" "def main(digit): digit = bin(digit) digit = digit[2:] digit = digit.zfill(32) G = digit[:1] F = digit[1:4] E = digit[4:5] D = digit[5:12] C = digit[12:25] B = digit[25:31] A = digit[31:] result = '0b' + D + F + G + A + C + B + E return int(result, 2)" "def main(s): return s & 1 | (s >> 1 & 255) << 2 | (s >> 9 & 3) << 26 | (s >> 11 & 65535) << 10 | (s >> 27 & 15) << 28 | (s >> 31 & 1) << 1" "def main(s): return (s & 4095) << 15 | s >> 12 & 15 | (s >> 16 & 1) << 4 | (s >> 17 & 1) << 31 | (s >> 18 & 511) << 6 | (s >> 27 & 15) << 27 | (s >> 31 & 1) << 5" "def main(x): s = str(bin(x)[2:]).rjust(32, '0') e = s[0:6] d = s[6:15] c = s[15:17] b = s[17:28] a = s[28:] res = e + a + b + c + d return int(res, 2)" "def false_bin(p, r): while p > 0: r = str(p % 2) + r p = p // 2 return r def decimal(example): number = 0 len_dat = len(example) for i in range(0, len_dat): number += int(example[i]) * 2 ** (len_dat - i - 1) return number def main(x): a = int(x) f = '' flag = 0 res = false_bin(a, f) chislo = int(res) b = chislo % 10000000000000 // 100000 data1 = str(b) res2 = decimal(data1) sdvig1 = res2 << 24 e = chislo // 10000000000000000000000000000000 bin_res1 = false_bin(sdvig1, f) bin_sdvig1 = int(bin_res1) c = chislo % 1000000000000000000000000000 // 10000000000000 data2 = str(c) res3 = decimal(data2) sdvig2 = res3 << 10 bin_res2 = false_bin(sdvig2, f) bin_sdvig2 = int(bin_res2) d1 = chislo % 10000000000000000000000000000000 d = d1 // 1000000000000000000000000000 data3 = str(d) res4 = decimal(data3) sdvig3 = res4 << 6 bin_res3 = false_bin(sdvig3, f) bin_sdvig3 = int(bin_res3) data4 = str(e) res5 = decimal(data4) sdvig4 = res5 << 5 bin_sdvig4 = 0 if len(str(chislo)) == 32: bin_res4 = false_bin(sdvig4, f) bin_sdvig4 = int(bin_res4) last = chislo % 100000 bin_sdvig = bin_sdvig1 + bin_sdvig2 + bin_sdvig3 + bin_sdvig4 + last s = str(bin_sdvig) norm_decimal = decimal(s) otvet = hex(norm_decimal) return norm_decimal" "def main(a): return (a & 8191) << 5 | (a & 8380416) << 6 | (a & 58720256) << 6 | (a & 201326592) >> 26 | (a & 1879048192) >> 26 | (a & 2147483648) >> 13" "def main(x): s = str(bin(x)[2:]).rjust(32, '0') h = s[0:2] g = s[2:3] f = s[3:6] e = s[6:16] d = s[16:20] c = s[20:22] b = s[22:23] a = s[23:] res = c + d + a + h + g + b + f + e return int(res, 2)" "def main(x): A = x & 255 B = x >> 8 & 31 C = x >> 13 & 32767 D = x >> 28 & 15 result = 0 result |= D << 28 result |= A << 20 result |= B << 15 result |= C << 0 return result" "def main(x): mask_a = 65535 mask_b = 983040 mask_c = 4293918720 a = x & mask_a b = x & mask_b c = x & mask_c a = a << 16 b = b >> 4 c = c >> 20 return a | b | c" "def main(x): a = x & 511 b = x >> 9 & 255 c = x >> 17 & 63 d = x >> 23 & 3 e = x >> 25 & 15 f = x >> 29 & 7 result = e | c << 4 | b << 10 | d << 18 | f << 20 | a << 23 return result" "def main(x): a = x & 255 b = x >> 8 & 1 c = x >> 9 & 63 d = x >> 15 & 16383 e = x >> 29 & 3 f = x >> 31 & 1 result = e | d << 2 | a << 16 | f << 24 | b << 25 | c << 26 return result" "def main(x): G = x & 1 << 31 F = x & 7 << 28 E = x & 255 << 20 D = x & 1 << 19 C = x & 511 << 10 B = x & 3 << 8 A = x & 255 y = D << 11 return G | F >> 10 | E >> 18 | y | C << 11 | B >> 8 | A << 10" "def main(x): a = x & 4095 b = x & 4190208 c = x & 130023424 d = x & 134217728 e = x & 268435456 f = x & 3758096384 f = f >> 12 a = a << 20 e = e >> 23 d = d >> 11 c = c >> 22 b = b >> 6 return a + f + d + b + e + c" "def main(input_data): a = input_data << 5 & 4292870144 b = input_data >> 11 & 2031616 c = input_data >> 1 & 32767 d = input_data << 15 & 32768 return a | b | c | d" "def main(x): a = x & 15 b = x >> 4 & 65535 c = x >> 20 & 127 d = x >> 27 & 31 result = d << 0 | b << 5 | a << 21 | c << 25 return result" "def main(x): a = x & 32767 b = x >> 15 & 7 c = x >> 18 & 511 d = x >> 27 & 1 e = x >> 28 & 15 result = a | d << 15 | c << 16 | e << 25 | b << 29 return result" "def main(x): A = x & 4095 B = x >> 12 & 127 C = x >> 19 & 4095 D = x >> 31 & 1 result = 0 result |= B result |= D << 7 result |= C << 8 result |= A << 20 return result" "def main(x): A = x & 15 B = x >> 4 & 4095 C = x >> 16 & 8191 D = x >> 29 & 3 E = x >> 31 & 1 result = 0 result |= B result |= A << 12 result |= D << 16 result |= C << 18 result |= E << 31 return result" "def main(a): xx = hex(a) ll16 = len(str(xx)) - 2 aa = bin(a) ll = len(aa) lladd = 0 if ll - 2 < 4 * ll16: lladd = 4 * ll16 - (ll - 2) aa = aa[0:1] + '0' * lladd + aa[2:] ll = len(aa) A = aa[ll - 14:ll] B = aa[ll - 21:ll - 14] C = aa[ll - 26:ll - 21] D = aa[ll - 32:ll - 26] bb = '0b' + B + D + C + A bb16 = hex(int(bb, 2)) return int(bb16, 16)" "def main(x): A = (int(x) & 1) << 11 B = int(x) >> 1 & 2047 C = (int(x) >> 12 & 16383) << 16 D = (int(x) >> 26 & 1) << 15 E = (int(x) >> 27 & 3) << 30 F = (int(x) >> 29 & 7) << 12 return A | B | C | D | E | F" "def main(x): a = x & 31 b = x & 524256 c = x & 524288 d = x & 133169152 e = x & 402653184 f = x & 536870912 g = x & 3221225472 an = a | b << 1 | c >> 14 | d << 5 | e >> 7 | f >> 7 | g >> 7 return an" "def main(x): a = x & 2047 b = x >> 11 & 15 c = x >> 15 & 32767 d = x >> 30 & 1 e = x >> 31 & 1 result = e | b << 1 | c << 5 | a << 20 | d << 31 return result" "def main(x): return 2047 & x | 134215680 & x | (2013265920 & x) << 1 | (2147483648 & x) >> 4" "def main(x): a = b = c = x a &= 16383 b &= 245760 c &= 4294705152 a = a << 18 c = c >> 18 result = a | b | c return result" "def main(x): A = x & 15 B = x >> 4 & 2047 C = x >> 15 & 1023 D = x >> 25 & 3 E = x >> 27 & 7 F = x >> 30 & 3 result = 0 result |= A result |= D << 4 result |= E << 6 result |= C << 9 result |= F << 19 result |= B << 21 return result" "def main(x): a = x & 32767 b = x >> 15 & 8191 c = x >> 28 & 1 d = x >> 29 & 1 e = x >> 30 & 3 result = a | b << 15 | d << 28 | e << 29 | c << 31 return result" "def main(a): a = hex(a) a = a[0:2] + a[6:10] + a[2:5] + a[5] return int(a, 16)" "def main(x): f = (x & (2 ** 32 - 1 & ~(2 ** 31 - 1))) >> 17 e = (x & (2 ** 31 - 1 & ~(2 ** 29 - 1))) >> 14 d = (x & (2 ** 29 - 1 & ~(2 ** 26 - 1))) >> 9 c = (x & (2 ** 26 - 1 & ~(2 ** 18 - 1))) >> 18 b = (x & (2 ** 18 - 1 & ~(2 ** 6 - 1))) << 14 a = (x & 2 ** 6 - 1) << 8 return b | d | e | f | a | c" "def main(x): y = format(x, 'b') if len(y) > 32: y = y[len(y) - 32:] if len(y) < 32: y = '0' * (32 - len(y)) + y temp = y[1:3] temp += y[0] temp += y[7:12] temp += y[3:7] temp += y[12:22] temp += y[27:] temp += y[22:27] a = int(temp, 2) temp = format(a, 'd') temp = int(temp) return temp" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(5, 0) b_mask = u_mask(21, 5) c_mask = u_mask(30, 21) d_mask = u_mask(31, 30) e_mask = u_mask(32, 31) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask e = x & e_mask a = a << 27 b = b >> 5 c = c >> 3 d = d >> 13 e = e >> 15 return a | b | c | d | e" "def main(x): return (x & 2047) << 17 | (x >> 11 & 2047) << 4 | x >> 22 & 15 | (x >> 26 & 1) << 15 | (x >> 27 & 15) << 28 | (x >> 31 & 1) << 16" "def main(x): D = x >> 29 C = x - (D << 29) >> 13 B = x - (D << 29) - (C << 13) >> 3 A = x - (D << 29) - (C << 13) - (B << 3) return (A << 29) + (D << 26) + (B << 16) + C" "def main(num): d = num & 3758096384 c = num & 268435456 b = num & 268419072 a = num & 16383 return d >> 28 | c >> 28 | b << 4 | a << 4" "def main(x): result = 0 A = x & 2047 B = x >> 11 & 1023 C = x >> 21 & 15 D = x >> 25 & 31 E = x >> 30 & 3 result |= A << 16 result |= C << 0 result |= B << 4 result |= E << 14 result |= D << 27 return result" "def main(hex_num): hex_num = int(hex(hex_num), 16) temp = int(hex(2147483648), 16) G = int(hex(int(hex(hex_num & temp), 16) >> 21), 16) temp = int(hex(2013265920), 16) F = int(hex(int(hex(hex_num & temp), 16) >> 21), 16) temp = int(hex(100663296), 16) E = int(hex(int(hex(hex_num & temp), 16) >> 21), 16) temp = int(hex(25165824), 16) D = int(hex(int(hex(hex_num & temp), 16) << 3), 16) temp = int(hex(7864320), 16) C = int(hex(int(hex(hex_num & temp), 16) << 9), 16) temp = int(hex(524272), 16) B = int(hex(int(hex(hex_num & temp), 16) << 7), 16) temp = int(hex(15), 16) A = int(hex(hex_num & temp), 16) return int(hex(G ^ F ^ E ^ D ^ C ^ B ^ A), 16)" "def main(input): a = (input & 63) << 26 b = (input & 2097088) << 5 c = (input & 6291456) >> 12 d = (input & 25165824) >> 16 e = (input & 2113929216) >> 25 f = (input & 2147483648) >> 25 res = a | b | c | d | e | f return res" "def main(n): a = n & 65535 b = n & 33488896 c = n & 4261412864 a = a << 16 b = b >> 9 c = c >> 25 return a | b | c" "def main(input): a = (input & 31) << 26 b = (input & 1048544) >> 4 c = (input & 1048576) << 11 d = (input & 2145386496) >> 5 e = (input & 2147483648) >> 31 return a | b | c | d | e" "def main(input): a = (input & 32767) << 17 b = (input & 229376) >> 15 c = (input & 786432) >> 7 d = (input & 267386880) >> 17 e = (input & 4026531840) >> 15 return a | b | c | d | e" "def main(input): a = (input & 1) << 17 b = (input & 6) << 19 c = (input & 8184) << 19 d = (input & 57344) >> 13 e = (input & 65536) >> 11 f = (input & 393216) >> 14 g = (input & 1572864) >> 1 h = (input & 4292870144) >> 15 return a | b | c | d | e | f | g | h" "def main(input): a = input & 2047 b = (input & 129024) << 15 c = (input & 131072) << 8 d = (input & 4294705152) >> 7 return a | b | c | d" "def main(input): a = (input & 255) << 17 b = (input & 7936) >> 8 c = (input & 16769024) >> 8 d = (input & 2130706432) << 1 e = (input & 2147483648) >> 15 return a | b | c | d | e" "def main(input): a = (input & 16383) << 13 b = (input & 114688) << 15 c = (input & 131072) << 10 d = (input & 536608768) >> 18 e = (input & 1610612736) >> 18 f = (input & 2147483648) >> 3 return a | b | c | d | e | f" "def main(input): a = input & 15 b = (input & 262128) << 14 c = (input & 2147221504) >> 13 d = (input & 2147483648) >> 27 return a | b | c | d" "def main(num): a = num & 65535 b = num & 65536 c = num & 1966080 d = num & 132120576 e = num & 939524096 f = num & 3221225472 return a << 16 | b >> 16 | c >> 8 | d >> 20 | e >> 14 | f >> 23" "def main(x): A = x & 8191 B = x >> 13 & 4095 C = x >> 25 & 63 D = x >> 31 & 1 result = 0 result |= C result |= A << 6 result |= B << 19 result |= D << 31 return result" "def main(x): A = x & 1 B = x >> 1 & 511 C = x >> 10 & 4095 D = x >> 22 & 127 E = x >> 29 & 3 F = x >> 31 & 1 result = 0 result |= A result |= C << 1 result |= D << 13 result |= B << 20 result |= E << 29 result |= F << 31 return result" "def main(x): A = x & 4095 B = x >> 12 & 7 C = x >> 15 & 2047 D = x >> 26 & 1 E = x >> 27 & 3 F = x >> 29 & 7 result = 0 result |= E result |= C << 2 result |= A << 13 result |= B << 25 result |= D << 28 result |= F << 29 return result" "def main(x): op1 = x xF = 4026531840 xE = 134217728 xD = 100663296 xC = 31457280 xB = 2064384 xA = 32767 F = op1 & xF E = op1 & xE D = op1 & xD D = D >> 10 C = op1 & xC C = C << 2 B = op1 & xB B = B << 2 A = op1 & xA answer = F + E + C + B + D + A return answer" "def main(x): return (x & 2147483648) >> 27 | (x & 2013265920) >> 27 | (x & 132120576) << 5 | (x & 2031616) << 5 | (x & 31) << 16 | x & 65504" "def main(input): a = input & 63 b = (input & 448) << 10 c = (input & 7680) << 10 d = (input & 4186112) >> 7 e = (input & 1069547520) << 2 f = (input & 1073741824) >> 15 g = (input & 2147483648) >> 8 return a | b | c | d | e | f | g" "def main(x): a = x & 1 b = x >> 1 & 16383 c = x >> 15 & 63 d = x >> 21 & 255 e = x >> 29 & 7 result = 0 result |= a << 31 result |= b << 3 result |= c << 25 result |= d << 17 result |= e << 0 return result" "def main(x): a = x & 2047 b = x >> 11 b = b & 255 c = x >> 19 c = c & 7 d = x >> 22 d = d & 3 e = x >> 24 e = e & 127 f = x >> 31 sum = f sum = sum << 8 sum = sum | b sum = sum << 2 sum = sum | d sum = sum << 11 sum = sum | a sum = sum << 3 sum = sum | c sum = sum << 7 sum = sum | e return sum" "def main(x): a = x % (1 << 3) x >>= 3 b = x % (1 << 2) x >>= 2 c = x % (1 << 5) x >>= 5 d = x % (1 << 10) x >>= 10 e = x % (1 << 5) x >>= 5 f = x % (1 << 1) x >>= 1 g = x % (1 << 4) x >>= 4 h = x % (1 << 2) x >>= 2 k = f + (h << 1) + (d << 3) + (b << 13) r = (g << 15) + (c << 19) + (e << 24) + (a << 29) return k + r" "def main(input): a = (input & 2047) << 6 b = (input & 129024) >> 11 c = (input & 268304384) << 4 d = (input & 268435456) >> 9 e = (input & 1610612736) >> 12 f = (input & 2147483648) >> 11 return a | b | c | d | e | f" "def main(input): a = (input & 31) << 23 b = (input & 96) << 8 c = (input & 1920) << 21 d = (input & 30720) >> 11 e = (input & 2064384) >> 0 f = (input & 2097152) >> 17 g = (input & 12582912) >> 1 h = (input & 4278190080) >> 19 return a | b | c | d | e | f | g | h" "def main(input): a = (input & 1023) << 22 b = (input & 31744) >> 10 c = (input & 67076096) >> 10 d = (input & 2080374784) >> 10 e = (input & 2147483648) >> 10 return a | b | c | d | e" "def main(input): a = (input & 2047) << 1 b = (input & 129024) << 4 c = (input & 4063232) << 4 d = (input & 29360128) >> 10 e = (input & 2113929216) << 1 f = (input & 2147483648) >> 31 return a | b | c | d | e | f" "def main(x): a = (x & 1023) << 18 b = (x & 2096128) >> 3 c = (x & 266338304) >> 21 d = (x & 1879048192) << 1 e = (x & 2147483648) >> 3 return a | b | c | d | e" "def main(input): a = (input & 63) << 12 b = (input & 32704) << 16 c = (input & 67076096) >> 14 d = (input & 1006632960) >> 8 e = (input & 1073741824) << 1 f = (input & 2147483648) >> 31 return a | b | c | d | e | f" "def main(x): a = x & 255 b = x >> 8 & 63 c = x >> 14 & 3 d = x >> 16 & 255 e = x >> 24 & 15 f = x >> 28 & 7 g = x >> 31 & 1 result = c | d << 2 | g << 10 | b << 11 | a << 17 | e << 25 | f << 29 return result" "def main(input): a = input & 7 b = (input & 8) << 20 c = (input & 16) << 20 d = (input & 480) << 14 e = (input & 33553920) >> 6 f = input & 2113929216 g = input & 2147483648 return a | b | c | d | e | f | g" "def main(x): return x & 127 | (x >> 7 & 2047) << 20 | (x >> 18 & 2047) << 7 | (x >> 29 & 3) << 18 | (x >> 31 & 1) << 31" "def main(input): a = (input & 8191) << 18 b = (input & 57344) >> 13 c = (input & 2147418112) >> 13 d = input & 2147483648 return a | b | c | d" "def main(input): a = input & 8191 b = (input & 2088960) << 11 c = (input & 31457280) >> 8 d = (input & 2113929216) >> 7 e = (input & 2147483648) >> 14 return a | b | c | d | e" "def main(input): a = input & 8191 b = (input & 2088960) << 11 c = (input & 31457280) >> 8 d = (input & 2113929216) >> 7 e = (input & 2147483648) >> 14 return a | b | c | d | e" "def main(input): a = input & 63 b = (input & 448) << 9 c = input & 32256 d = (input & 268402688) << 4 e = (input & 1879048192) >> 22 f = (input & 2147483648) >> 13 return a | b | c | d | e | f" "def main(input): a = (input & 3) << 12 b = (input >> 2 & 8191) << 14 c = (input >> 15 & 31) << 27 d = input >> 20 & 4095 return a | b | c | d" "def main(input): a = (input & 1) << 2 b = (input & 131070) << 15 c = (input & 1073610752) >> 14 d = (input & 1073741824) >> 30 e = (input & 2147483648) >> 30 return b | c | a | e | d" "def main(x): op1 = x xH = 3758096384 xG = 268435456 xF = 134217728 xE = 133169152 xD = 1015808 xC = 32256 xB = 496 xA = 15 H = op1 & xH H = H >> 1 G = op1 & xG G = G << 3 F = op1 & xF F = F >> 20 E = op1 & xE E = E >> 20 D = op1 & xD D = D << 8 C = op1 & xC C = C << 8 B = op1 & xB B = B << 4 A = op1 & xA A = A << 13 answer = H + G + F + E + C + B + D + A return answer" "def main(x): A = x & 16383 B = (x & 4177920) << 1 C = (x & 130023424) << 1 D = (x & 402653184) << 2 E = (x & 536870912) << 2 F = (x & 1073741824) >> 2 G = (x & 2147483648) >> 17 return A | B | C | D | E | F | G" "def main(input): a = input & 3 b = (input & 65532) << 13 c = (input & 196608) >> 14 d = (input & 268173312) >> 13 e = (input & 1879048192) << 1 f = (input & 2147483648) >> 27 return a | b | c | d | e | f" "def main(bf): f = bf & 2147483648 e = bf & 2013265920 d = bf & 67108864 c = bf & 67043328 b = bf & 65532 a = bf & 3 return (f >> 6) + (e << 1) + (d >> 2) + (c >> 2) + (b >> 2) + (a << 26)" "def main(bf): e = bf & 2147483648 d = bf & 1073741824 c = bf & 1040187392 b = bf & 33550336 a = bf & 4095 return e + (d >> 25) + (c >> 25) + (b << 6) + (a << 6)" "def main(input): a = (input & 32767) << 17 b = (input & 67076096) >> 13 c = (input & 67108864) >> 13 d = (input & 134217728) >> 13 e = (input & 805306368) >> 28 f = (input & 3221225472) >> 15 return a | b | c | d | e | f" "def main(x): a = x & 31 b = x >> 5 & 255 c = x >> 13 & 3 d = x >> 15 & 8191 e = x >> 28 & 1 f = x >> 29 & 3 g = x >> 31 & 1 result = c | f << 2 | g << 4 | b << 5 | e << 13 | d << 14 | a << 27 return result" "def main(input): a = (input & 16383) << 18 b = (input & 536854528) >> 14 c = (input & 3758096384) >> 14 return a | b | c" "def main(s): c = (528482304 & s) << 3 a = (127 & s) << 19 e = (s & 1 << 31) >> 13 d = (s & 1610612736) >> 13 b = (8388480 & s) >> 7 res = c | a | e | d | b return res" "def main(input): a = input & 3 b = input & 4092 c = (input & 28672) << 14 d = (input & 134184960) >> 1 e = (input & 402653184) >> 15 f = input & 3758096384 return a | b | c | d | e | f" "def main(x): A = x & 511 B = x >> 9 & 1023 C = x >> 19 & 127 D = x >> 26 & 7 E = x >> 29 & 7 result = 0 result |= C result |= B << 7 result |= E << 17 result |= A << 20 result |= D << 29 return result" "def main(s): A = s & 511 B = (s >> 9 & 16383) << 13 C = (s >> 23 & 7) << 27 D = (s >> 26 & 15) << 9 EF = s & 3 << 30 return int(A | B | C | D | EF)" "import math def main(input): a = (input & 127) << 24 b = (input & 896) << 14 c = (input & 1047552) >> 10 d = (input & 66060288) >> 10 e = (input & 67108864) << 5 f = (input & 4160749568) >> 11 return a | b | c | d | e | f" "def Write_To_Letter(begin, end, x): buff = '' if end > len(x) - 1: end = len(x) - 1 for i in range(begin, end + 1): buff += str(x[i]) return buff def convert(x): x = (32 - len(x)) * '0' + x x = x[::-1] f = Write_To_Letter(31, 31, x) e = Write_To_Letter(30, 30, x) d = Write_To_Letter(26, 29, x) d = d[::-1] c = Write_To_Letter(20, 25, x) c = c[::-1] b = Write_To_Letter(16, 19, x) b = b[::-1] a = Write_To_Letter(0, 15, x) a = a[::-1] return d + b + f + c + a + e def main(x): x = bin(x)[2:] x = convert(x) return int(x, 2) main(3690587365)" "def main(input): a = (input & 255) << 9 b = (input & 7936) << 18 c = (input & 57344) << 8 d = (input & 983040) << 1 e = (input & 535822336) >> 20 f = (input & 536870912) << 2 g = (input & 3221225472) >> 6 return a | b | c | d | e | f | g" "import math def main(input): a = (input & 127) << 25 b = (input & 4194176) >> 1 c = (input & 264241152) >> 22 d = (input & 1879048192) >> 7 e = (input & 2147483648) >> 7 return a | b | c | d | e" "def main(input): a = input & 8191 b = (input & 253952) << 4 c = (input & 8126464) << 4 d = (input & 260046848) << 4 e = (input & 4026531840) >> 15 return a | b | c | d | e" "def main(x): A = (x & 32767) << 6 B = (x & 2064384) >> 15 C = x & 31457280 D = x & 4261412864 return D | C | A | B" "def main(input): a = (input & 1) << 16 b = (input & 65534) << 16 c = (input & 4294901760) >> 16 return a | b | c" "def main(input): a = (input & 255) << 24 b = (input & 1792) << 13 c = (input & 67106816) >> 11 d = (input & 4227858432) >> 11 return a | b | d | c" "def main(num): a = num & 511 b = num & 7680 c = num & 57344 d = num & 4294901760 return a << 7 | b >> 9 | c >> 9 | d" "def main(input): a = (input & 3) << 26 b = (input & 60) << 26 c = (input & 1048512) >> 1 d = (input & 3145728) >> 1 e = (input & 130023424) >> 22 f = (input & 2013265920) >> 6 g = (input & 2147483648) >> 6 return a | b | c | d | e | f | g" "def main(hex_number): str_bin_number = str(bin(hex_number)[2:]).rjust(32, '0') a = str_bin_number[3:10] b = str_bin_number[:2] c = str_bin_number[23:27] d = str_bin_number[10:18] e = str_bin_number[27:] f = str_bin_number[20:23] g = str_bin_number[18:20] h = str_bin_number[2] return int(a + b + c + d + e + f + h + g, 2)" "def main(hex_number): str_bin_number = str(bin(hex_number)[2:]).rjust(32, '0') e = str_bin_number[0] d = str_bin_number[1:11] c = str_bin_number[11:18] b = str_bin_number[18:27] a = str_bin_number[27:] return int(c + a + b + e + d, 2)" "def main(hex_number): str_bin_number = str(bin(hex_number)[2:]).rjust(32, '0') d = str_bin_number[:3] c = str_bin_number[3:14] b = str_bin_number[14:20] a = str_bin_number[20:] return int(d + a + b + c, 2)" "def move(x, cur, new, length): m = 2 ** (cur + length) - 2 ** cur s = x & m if cur < new: return s << new - cur else: return s >> cur - new def main(x): result = 0 result |= move(x, 0, 5, 10) result |= move(x, 10, 15, 14) result |= move(x, 24, 0, 5) result |= move(x, 29, 30, 2) result |= move(x, 31, 29, 1) return result" "def main(x): A = x & 2047 B = x >> 11 & 65535 C = x >> 27 & 7 D = x >> 30 & 1 E = x >> 31 & 1 result = 0 result |= A result |= B << 11 result |= E << 27 result |= C << 28 result |= D << 31 return result" "def main(input): a = (input & 8191) << 2 b = (input & 8380416) << 2 c = (input & 1065353216) << 2 d = (input & 3221225472) >> 30 return a | b | c | d" "def main(x): d = (2147483648 & x) >> 31 c = (2147352576 & x) >> 16 b = 98304 & x a = (32767 & x) << 17 return a | b | c | d" "def main(num): a = num & 127 b = num & 16256 c = num & 536854528 d = num & 3758096384 return a << 25 | b >> 7 | c >> 7 | d >> 7" "def main(input): a = (input & 32767) << 17 b = (input & 536838144) >> 15 c = (input & 536870912) >> 13 d = (input & 3221225472) >> 16 return a | b | c | d" "def main(test): test = test | 2 ** 33 test = bin(test) test = test[4:] a = test[-13:] b = test[-18:-13] c = test[-32:-18] test = c + a + b test = int(test, 2) return test" "def main(x): A = x & 15 B = x >> 4 & 1 C = x >> 5 & 255 D = x >> 13 & 1023 E = x >> 23 & 7 F = x >> 26 & 15 G = x >> 30 & 3 result = 0 result |= G result |= E << 2 result |= C << 5 result |= D << 13 result |= F << 23 result |= B << 27 result |= A << 28 return result" "def main(s): return (s & 7) << 29 | (s >> 3 & 32767) << 13 | (s >> 18 & 1023) << 3 | s >> 28 & 7 | (s >> 31 & 1) << 28" "def main(test): test = test | 2 ** 33 test = bin(test) test = test[4:] a = test[-16:] b = test[-24:-16] c = test[-30:-24] d = test[-31] e = test[-32] test = c + d + b + a + e test = int(test, 2) return test" "def main(x): A = x & 4095 B = x >> 12 & 15 C = x >> 16 & 2047 D = x >> 27 & 3 E = x >> 29 & 3 F = x >> 31 & 1 ans = 0 ans |= B ans |= F << 4 ans |= D << 5 ans |= C << 7 ans |= E << 18 ans |= A << 20 return ans" "def main(x): a_mask = 31 b_mask = 3 << 5 c_mask = 1023 << 7 d_mask = 511 << 17 e_mask = 7 << 26 f_mask = 1 << 29 g_mask = 3 << 30 a = x & a_mask b = (x & b_mask) >> 5 c = (x & c_mask) >> 7 d = (x & d_mask) >> 17 e = (x & e_mask) >> 26 f = (x & f_mask) >> 29 g = (x & g_mask) >> 30 return a | c << 5 | e << 15 | d << 18 | g << 27 | f << 29 | b << 30" "def main(x): result = 0 A = x & 1023 B = x >> 10 & 63 C = x >> 16 & 15 D = x >> 20 & 16383 result |= C << 28 result |= B << 22 result |= A << 12 result |= D << 0 return result" "def main(x): return (x & 2147483648) >> 1 | (x & 1073741824) << 1 | (x & 1073479680) >> 18 | (x & 196608) << 12 | (x & 65535) << 12" "def main(x): a = x & 16383 b = x >> 14 & 31 c = x >> 19 & 31 d = x >> 24 & 255 result = d | b << 8 | c << 13 | a << 18 return result hex(main(3706793746))" "def main(x): A = x & 255 B = x >> 8 & 511 C = x >> 17 & 1 D = x >> 18 & 255 E = x >> 26 & 7 F = x >> 29 & 3 G = x >> 31 & 1 r = 0 r |= E r |= A << 3 r |= D << 11 r |= B << 19 r |= G << 28 r |= C << 29 r |= F << 30 return r" "def main(input): a = (input & 1023) << 22 b = (input & 255 << 10) >> 10 c = (input & 511 << 18) >> 5 d = (input & 3 << 27) >> 19 e = (input & 7 << 29) >> 19 return a | b | c | d | e" "def main(x): A = x & 65535 B = x >> 16 & 32767 C = x >> 31 & 1 result = 0 result |= B result |= C << 15 result |= A << 16 return result" "def main(x): a = x & 511 b = x >> 9 & 7 c = x >> 12 & 511 d = x >> 21 & 3 e = x >> 23 & 7 f = x >> 26 & 15 g = x >> 30 & 3 result = c | e << 9 | a << 12 | g << 21 | b << 23 | f << 26 | d << 30 return result" "def main(input): a = input & 65535 b = (input & 4128768) << 2 c = (input & 62914560) << 5 d = (input & 201326592) >> 10 e = (input & 268435456) << 3 f = (input & 536870912) >> 5 g = (input & 3221225472) >> 5 return a | b | c | d | e | f | g" "def main(input): a = (input & 1) << 11 b = (input & 4094) >> 1 c = (input & 258048) << 8 d = (input & 66846720) >> 6 e = input & 4227858432 return a | b | c | d | e" "def main(x): A = x & 15 B = x >> 4 & 65535 C = x >> 20 & 31 D = x >> 25 & 63 E = x >> 31 & 1 res = 0 res |= E res |= C << 1 res |= D << 6 res |= A << 12 res |= B << 16 return res" "def main(x): E = x >> 30 D = x - (E << 30) >> 28 C = x - (E << 30) - (D << 28) >> 17 B = x - (E << 30) - (D << 28) - (C << 17) >> 2 A = x - (E << 30) - (D << 28) - (C << 17) - (B << 2) return (C << 21) + (A << 19) + (D << 17) + (E << 15) + B" "def main(x): A = (x & 7) << 2 B = (x & 16376) << 15 C = (x & 114688) << 1 D = (x & 393216) >> 17 E = (x & 3670016) << 10 F = (x & 532676608) >> 17 G = (x & 3758096384) >> 17 return E | B | C | G | F | A | D" "def main(x): a = bin(x) a = a[2:] a = '0' * (32 - len(a)) + a a = a[26:32] + a[0:2] + a[14:26] + a[6:14] + a[2:6] return int(a, 2)" "def main(input): a = input & 2047 b = input & 129024 c = (input & 1966080) << 11 d = (input & 4292870144) >> 4 return a | b | c | d" "def main(x): e = (x & 3221225472) >> 26 d = (x & 1065353216) >> 17 c = (x & 8257536) >> 4 b = (x & 131056) << 15 a = x & 15 return b | c | d | e | a" "def main(x): s = format(x, '032b') s = s[30] + s[31] + s[0:2] + s[20:30] + s[10:20] + s[6:10] + s[2:6] s = int(hex(int(s, 2)), 0) return s" "def main(input): a = (input & 511) << 23 b = (input & 15872) >> 9 c = (input & 134201344) >> 9 d = (input & 2013265920) >> 8 e = (input & 2147483648) >> 13 return a | b | c | d | e" "def main(x): a = x & 255 b = x >> 8 & 31 c = x >> 13 & 127 d = x >> 20 & 4095 result = c | a << 7 | d << 15 | b << 27 return result" "def main(x): a = x & 1 b = x >> 1 & 255 c = x >> 9 & 31 d = x >> 14 & 127 e = x >> 21 & 1 f = x >> 22 & 63 g = x >> 28 & 15 result = d | a << 7 | f << 8 | b << 14 | g << 22 | e << 26 | c << 27 return result" "def main(input): a = (input & 63) << 21 b = (input & 1048512) << 1 c = (input & 7340032) << 8 d = (input & 1065353216) >> 23 e = (input & 1073741824) << 1 f = (input & 2147483648) >> 4 return a | b | c | d | e | f" "def main(input): a = (input & 7) << 1 b = (input & 8) << 7 c = (input & 131056) << 14 d = (input & 16646144) >> 6 e = (input & 1056964608) >> 20 f = (input & 1073741824) >> 30 g = input & 2147483648 return a | b | c | d | e | f | g" "def main(input): a = (input & 8191) << 2 b = (input & 134209536) << 5 c = (input & 402653184) >> 27 d = (input & 536870912) >> 14 e = (input & 3221225472) >> 14 return a | b | c | d | e" "def main(x): c = (4278190080 & x) >> 24 b = 16776960 & x a = (255 & x) << 24 return a | b | c" "def main(x): a = (8, 0, 25, 17) b = (12, 9, 14, 11) c = (22, 13, 10, 1) d = (27, 23, 30, 26) e = (28, 28, 31, 31) f = (30, 29, 16, 15) g = (31, 31, 0, 0) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] F = (int(x) >> f[1] & int((32 - (f[0] - f[1] + 1)) * '0' + (f[0] - f[1] + 1) * '1', 2)) << f[3] G = (int(x) >> g[1] & int((32 - (g[0] - g[1] + 1)) * '0' + (g[0] - g[1] + 1) * '1', 2)) << g[3] return A | B | C | D | E | F | G" "def main(number: int): A = number & 16383 B = number & 245760 C = number & 2147221504 D = number & 2147483648 result = int() result = result | D << 0 result = result | B << 13 result = result | C >> 4 result = result | A << 0 return result" "def main(x): a = x & 511 b = x >> 9 & 127 c = x >> 16 & 127 d = x >> 23 & 63 e = x >> 29 & 3 f = x >> 31 ans = e << 30 | c << 23 | a << 14 | f << 13 | b << 6 | d return ans main(3579978642)" "def main(x): A = x & 8191 B = x >> 13 & 4095 C = x >> 25 & 1 D = x >> 26 & 15 E = x >> 30 & 1 F = x >> 31 & 1 result = 0 result |= C result |= D << 1 result |= A << 5 result |= E << 18 result |= F << 19 result |= B << 20 return result" "def main(x): a = x & 31 b = x >> 5 & 32767 c = x >> 20 & 2047 d = x >> 31 & 1 result = c | b << 11 | d << 26 | a << 27 return result" "def main(input): a = input & 127 b = (input & 4194176) << 10 c = (input & 4290772992) >> 15 return a | b | c" "def main(input): a = (input & 16383) << 18 b = (input & 507904) >> 1 c = (input & 66584576) >> 14 d = (input & 2080374784) >> 26 e = (input & 2147483648) >> 19 return a | b | c | d | e" "def main(x): a = x & 8191 b = x >> 13 & 7 c = x >> 16 & 63 d = x >> 22 & 3 e = x >> 24 & 7 f = x >> 27 & 15 g = x >> 31 & 1 result = e | b << 3 | a << 6 | g << 19 | c << 20 | d << 26 | f << 28 return result" "def main(input): a = (input & 4095) << 11 b = (input & 2093056) >> 11 c = (input & 2097152) >> 11 d = (input & 264241152) << 2 e = (input & 805306368) << 2 f = (input & 1073741824) >> 7 g = (input & 2147483648) >> 31 return a | b | c | d | e | f | g" "def main(input): a = (input & 7) << 29 b = (input & 16376) >> 3 c = (input & 33538048) << 4 d = (input & 4261412864) >> 14 return a | b | c | d" "def main(num): num = bin(num)[2:] while len(num) < 32: num = '0' + num a = num[:2] + num[18:] + num[13:18] + num[2:13] return int('0b' + a, 2)" "def main(input): a = (input & 15) << 16 b = (input & 240) >> 4 c = (input & 256) << 12 d = (input & 65024) >> 5 e = (input & 983040) >> 4 f = (input & 535822336) << 3 g = (input & 536870912) >> 18 h = (input & 3221225472) >> 9 return a | b | c | d | e | f | g | h" "def main(input): a = input & 1 b = (input & 14) << 20 c = (input & 262128) >> 3 d = (input & 33292288) << 6 e = (input & 2113929216) >> 10 f = input & 2147483648 return a | b | c | d | e | f" "def main(input): a = (input & 31) << 9 b = (input & 480) << 23 c = (input & 8388096) << 5 d = (input & 4286578688) >> 23 return a | b | c | d" "def main(input): a = (input & 32767) << 13 b = (input & 268402688) >> 15 c = (input & 805306368) << 2 d = (input & 3221225472) >> 2 return a | b | c | d" "from math import * new = 0 def insert(L): global new for i in range(len(L) - 1, -1, -1): new = new << 1 new += L[i] def main(code): A = [] B = [] C = [] D = [] for i in range(32): if i < 9: if code & 1 != 0: A.append(1) else: A.append(0) if 9 <= i <= 24: if code & 1 != 0: B.append(1) else: B.append(0) if 25 <= i <= 30: if code & 1 != 0: C.append(1) else: C.append(0) if i == 31: if code & 1 != 0: D.append(1) else: D.append(0) code = code >> 1 insert(B) insert(C) insert(D) insert(A) return new" "def main(num): res = '{0:032b}'.format(num) res = res[::-1] A = res[0:10] B = res[10:12] C = res[12:16] D = res[16:18] E = res[18:21] F = res[21:22] G = res[22:29] H = res[29:32] a = 1 a >>= 2 a <<= 2 bin_num = B + C + D + F + A + G + H + E int_num = int(bin_num[::-1], 2) hex_num = hex(int_num) return int_num" "def main(x): d = x & 2147483648 c = x & 2130706432 b = x & 16711680 a = x & 65535 b = b >> 16 a = a << 8 result = a + b + c + d return result" "def main(bits): a_mask = mask(0, 9) b_mask = mask(9, 24) c_mask = mask(24, 27) d_mask = mask(27, 31) e_mask = mask(31, 32) a = bits & a_mask b = bits & b_mask c = bits & c_mask d = bits & d_mask e = bits & e_mask a_new = a << 23 b_new = b >> 5 c_new = c >> 4 d_new = d >> 27 e_new = e >> 12 return a_new | b_new | c_new | d_new | e_new def mask(offset, count): mask = 2 ** count - 2 ** offset return mask main(896139233)" "def main(input): a = (input & 127) << 25 b = (input & 8388480) >> 3 c = (input & 58720256) >> 23 d = (input & 67108864) >> 23 e = (input & 4160749568) >> 7 return a | b | c | d | e" "def main(input): a = (input & 7) << 20 b = (input & 248) >> 3 c = (input & 256) << 16 d = (input & 16776704) >> 4 e = (input & 16777216) >> 1 f = input & 2113929216 g = input & 2147483648 return a | b | c | d | e | f | g" "def main(input): a = (input & 63) << 9 b = (input & 960) >> 4 c = (input & 16776192) << 8 d = (input & 117440512) >> 18 e = (input & 402653184) >> 27 f = (input & 3758096384) >> 14 return a | b | c | d | e | f" "def f(x): a = x & 32767 b = x >> 15 & 32767 c = x >> 30 & 1 d = x >> 31 & 1 return c | d << 1 | b << 2 | a << 17 def main(x): return f(x)" "def main(x): A = (x & 127) << 9 B = (x & 2097024) << 9 C = (x & 1071644672) >> 21 D = x & 3221225472 return D | B | A | C" "def Write_To_Letter(begin, end, x): buff = '' if end > len(x) - 1: end = len(x) - 1 for i in range(begin, end + 1): buff += str(x[i]) return buff def convert(x): x = (32 - len(x)) * '0' + x x = x[::-1] e = Write_To_Letter(31, 31, x) e = e[::-1] d = Write_To_Letter(30, 30, x) d = d[::-1] c = Write_To_Letter(29, 29, x) c = c[::-1] b = Write_To_Letter(15, 28, x) b = b[::-1] a = Write_To_Letter(0, 14, x) a = a[::-1] return d + c + e + a + b def main(x): x = bin(x)[2:] x = convert(x) return int(x, 2) main(585184331)" "import math def main(i): a = (i & 3) << 21 b = i >> 2 & 1023 c = (i >> 12 & 511) << 23 d = (i >> 21 & 511) << 11 e = (i >> 30 & 1) << 20 f = (i >> 31 & 1) << 10 o = a | b | c | d | e | f return o" "def main(i): a = (i & 65535) << 6 b = (i >> 16 & 255) << 24 c = i >> 24 & 15 d = (i >> 28 & 3) << 22 e = (i >> 30 & 3) << 4 return a | b | c | d | e" "def main(x): a = x & 1 b = x >> 1 & 1023 c = x >> 11 & 15 d = x >> 15 & 511 e = x >> 24 & 31 f = x >> 29 & 3 g = x >> 31 & 1 result = f | g << 2 | e << 3 | a << 8 | b << 9 | c << 19 | d << 23 return result" "def main(input): a = (input & 65535) << 2 b = (input & 1073676288) << 2 c = (input & 3221225472) >> 30 return a | b | c" "def main(digit): A = digit & 255 digit = digit >> 8 B = digit & 4095 digit = digit >> 12 C = digit & 2047 digit = digit >> 11 D = digit & 1 d = B << 20 | D << 19 | A << 11 | C << 0 return d" "def main(digit): A = digit & 255 digit = digit >> 8 B = digit & 4095 digit = digit >> 12 C = digit & 63 digit = digit >> 6 D = digit & 3 digit = digit >> 2 E = digit & 3 digit = digit >> 2 F = digit & 3 digit = digit >> 2 d = A << 24 | E << 22 | D << 20 | B << 8 | C << 2 | F << 0 return d main(442723720) main(3996119859)" "def main(num): res = 0 C = 4160749568 C = num & C C = C >> 14 B = 134209536 B = num & B B = B << 5 A = 8191 A = num & A res = B | C | A return res" "def main(number): number = str(bin(number))[2:] if len(number) < 32: number = '0' * (32 - len(number)) + number number_1 = number[13:18] + number[2:13] + number[0] number_2 = number[1] + number[18:] number = number_1 + number_2 return int(number, base=2)" "def main(input): a = (input & 32767) << 12 b = (input & 134184960) >> 15 c = input & 4160749568 return a | b | c '/n'" "def main(x): A = (x & 4095) << 17 B = (x & 16773120) >> 12 C = (x & 117440512) << 5 D = (x & 134217728) >> 12 E = (x & 1879048192) >> 16 F = (x & 2147483648) >> 15 return A | B | C | D | E | F" "def main(input): a = (input & 511) << 16 b = (input & 1048064) >> 4 c = (input & 32505856) >> 20 d = input & 2113929216 e = input & 2147483648 return a | b | c | d | e" "def main(number) -> int: nubberCOP = number nubberCOP &= 16383 x = nubberCOP nubberCOP = number >> 14 number = number >> 14 nubberCOP &= 255 y = nubberCOP nubberCOP = number >> 8 c = nubberCOP result = c result = result << 14 result = result + x result = result << 8 result = result + y return result" "def main(x): a = (4, 0, 26, 22) b = (6, 5, 31, 30) c = (12, 7, 21, 16) d = (28, 13, 15, 0) e = (31, 29, 29, 27) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] return A | B | C | D | E" "def main(x): a = x & 2 ** 4 - 1 b = (x & 2 ** 18 - 1) >> 4 c = (x & 2 ** 24 - 1) >> 18 d = (x & 2 ** 26 - 1) >> 24 e = (x & 2 ** 28 - 1) >> 26 f = (x & 2 ** 29 - 1) >> 28 g = (x & 2 ** 31 - 1) >> 29 h = x >> 31 a1 = (h << 2) + (b << 3) + (g << 17) return e + a1 + (a << 19) + (c << 23) + (f << 29) + (d << 30)" "def main(x): a = x & 1023 b = x >> 10 & 65535 c = x >> 26 & 31 d = x >> 31 & 1 result = b | c << 16 | a << 21 | d << 31 return result" "def main(x): A = x & 2047 B = x >> 11 & 1023 C = x >> 21 & 511 D = x >> 30 & 3 result = 0 result |= D result |= B << 2 result |= C << 12 result |= A << 21 return result" "def main(input): a = (input & 16383) << 17 b = (input & 1032192) >> 14 c = (input & 133169152) >> 10 d = (input & 2013265920) >> 21 e = (input & 2147483648) >> 0 return a | b | c | d | e" "def main(x): A = (x & 2047) << 1 B = (x & 522240) << 1 C = (x & 2146959360) << 1 D = (x & 2147483648) >> 31 return C | B | A | D" "def main(input): a = (input & 16383) << 11 b = (input & 2080768) << 11 c = (input & 1071644672) >> 19 d = (input & 3221225472) >> 30 return a | b | c | d" "def main(x): a = (x & 63) << 20 b = (x & 1048512) >> 6 c = (x & 66060288) << 6 d = (x & 4227858432) >> 12 return a | b | c | d" "def main(input): a = (input & 1) << 30 b = (input & 131070) << 12 c = (input & 131072) >> 5 d = (input & 133955584) >> 15 e = (input & 939524096) >> 27 f = (input & 1073741824) << 1 g = (input & 2147483648) >> 2 return a | b | c | d | e | f | g" "def main(x): x_a = 32767 & x x_b = (1 & x >> 15) << 24 x_c = (31 & x >> 16) << 19 x_d = (3 & x >> 21) << 17 x_e = (1 & x >> 23) << 15 x_f = (1 & x >> 24) << 16 x_g = (127 & x >> 25) << 25 return x_a + x_b + x_c + x_d + x_e + x_f + x_g" "def main(x): a = x & 511 b = x >> 9 & 31 c = x >> 14 & 255 d = x >> 22 & 63 e = x >> 28 & 1 f = x >> 29 & 1 g = x >> 30 & 1 h = x >> 31 & 1 r = f << 17 | c << 18 | b << 26 | h << 31 result = d | e << 6 | g << 7 | a << 8 | r return result" "def main(x): a = x & 1 b = x >> 1 & 511 c = x >> 10 & 2047 d = x >> 21 & 1 e = x >> 22 & 15 f = x >> 26 & 15 g = x >> 30 & 3 result = a | e << 1 | g << 5 | d << 7 | c << 8 | f << 19 | b << 23 return result" "def main(x): A = x & 511 B = x >> 9 & 15 C = x >> 13 & 255 D = x >> 21 & 2047 result = 0 result |= B result |= C << 4 result |= A << 12 result |= D << 21 return result" "def main(x): a = (5, 0, 7, 2) b = (20, 6, 28, 14) c = (21, 21, 8, 8) d = (23, 22, 31, 30) e = (24, 24, 29, 29) f = (26, 25, 1, 0) g = (31, 27, 13, 9) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] F = (int(x) >> f[1] & int((32 - (f[0] - f[1] + 1)) * '0' + (f[0] - f[1] + 1) * '1', 2)) << f[3] G = (int(x) >> g[1] & int((32 - (g[0] - g[1] + 1)) * '0' + (g[0] - g[1] + 1) * '1', 2)) << g[3] return A | B | C | D | E | F | G" "def main(arg): a = arg & 15 b = arg >> 4 & 127 c = arg >> 11 & 65535 d = arg >> 27 & 15 e = arg >> 31 & 1 x = d << 28 | e << 27 | a << 23 return b << 16 | c | x" "def main(arg): a = arg & 16383 b = arg >> 14 & 4095 c = arg >> 26 & 7 d = arg >> 29 & 3 e = arg >> 31 & 1 return b | d << 12 | a << 14 | c << 28 | e << 31" "def main(x): A = x & 4095 B = (x & 126976) << 2 C = (x & 134086656) << 4 D = (x & 402653184) >> 15 E = (x & 536870912) << 2 F = (x & 3221225472) >> 11 return A | B | C | D | E | F" "def main(x): A = (x & 2047) << 13 B = (x & 16775168) >> 11 C = x & 520093696 D = x & 3758096384 return A | B | C | D" "def main(x): A = (x & 31) << 6 B = (x & 480) << 23 C = (x & 32256) >> 9 D = (x & 1073709056) >> 2 E = (x & 3221225472) >> 19 return A | B | C | D | E" "def main(x): A = (x & 16383) << 16 B = (x & 49152) << 16 C = (x & 1073676288) >> 15 D = (x & 1073741824) >> 15 E = (x & 2147483648) >> 31 return A | B | C | D | E" "def main(x): a_mask = 255 b_mask = 32767 << 8 c_mask = 15 << 23 d_mask = 15 << 27 e_mask = 1 << 31 a = x & a_mask b = (x & b_mask) >> 8 c = (x & c_mask) >> 23 d = (x & d_mask) >> 27 e = (x & e_mask) >> 31 return e | b << 1 | a << 16 | d << 24 | c << 28" "def main(x): a = x & 2047 b = (x & 6144) << 2 c = (x & 268427264) << 2 d = (x & 805306368) << 2 e = (x & 3221225472) >> 19 return a | b | c | d | e" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(8, 0) b_mask = u_mask(22, 8) c_mask = u_mask(29, 22) d_mask = u_mask(32, 29) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask a = a << 14 b = b >> 8 c = c << 3 d = d >> 7 return a | b | c | d" "def main(num): a = num & 1 b = num & 4094 c = num & 126976 d = num & 8257536 e = num & 528482304 f = num & 3758096384 return a << 6 | b << 20 | c >> 2 | d >> 17 | e >> 8 | f >> 22" "def main(num): a = num & 32767 b = num & 268402688 c = num & 268435456 d = num & 1610612736 e = num & 2147483648 return a << 3 | b << 3 | c << 3 | d >> 29 | e >> 29" "def main(input): a = (input & 8191) << 14 b = (input & 24576) << 14 c = (input & 33521664) >> 13 d = (input & 100663296) >> 13 e = (input & 939524096) << 2 f = (input & 3221225472) >> 30 return a | b | c | d | e | f" "def main(input): a = (input & 7) << 1 b = (input & 32760) << 16 c = (input & 1073709056) >> 11 d = (input & 1073741824) << 1 e = (input & 2147483648) >> 31 return a | b | c | d | e" "def main(num): a = num & 255 b = num & 1792 c = num & 30720 d = num & 32768 e = num & 2147418112 f = num & 2147483648 return a << 3 | b >> 8 | c << 2 | d >> 4 | e << 1 | f >> 19" "def main(n): res = 0 res = res << 0 | n >> 30 & 1 res = res << 16 | n >> 14 & 65535 res = res << 1 | n >> 4 & 1 res = res << 1 | n >> 31 & 1 res = res << 9 | n >> 5 & 511 res = res << 2 | n >> 0 & 3 res = res << 2 | n >> 2 & 3 return res" "def main(num): a = num & 32767 b = num & 268402688 c = num & 1879048192 d = num & 2147483648 return a << 4 | b << 4 | c >> 28 | d >> 28" "def main(input): a = (input & 511) << 23 b = (input & 523776) >> 9 c = (input & 66584576) >> 5 d = (input & 201326592) >> 5 e = (input & 4026531840) >> 18 return a | b | c | d | e" "def main(x): d = 2147483648 & x c = (2145386496 & x) >> 21 b = 2096128 & x a = (1023 & x) << 21 return a | b | c | d" "def main(input): a = (input & 4095) << 20 b = (input & 61440) >> 12 c = (input & 1073676288) >> 10 d = (input & 1073741824) >> 26 e = (input & 2147483648) >> 26 return a | b | c | d | e" "def main(x): A = x & 255 B = x >> 8 & 1 C = x >> 9 & 1023 D = x >> 19 & 1023 E = x >> 29 & 7 result = 0 result |= C result |= A << 10 result |= D << 18 result |= E << 28 result |= B << 31 return result" "def main(x): a = x & 31 b = x >> 5 & 4095 c = x >> 17 & 16383 d = x >> 31 & 1 res = c | b << 14 | d << 26 | a << 27 return res" "def main(number: int): A = number & 65535 B = number & 196608 C = number & 1835008 D = number & 14680064 E = number & 117440512 F = number & 2013265920 G = number & 2147483648 result = int() result = result | D << 8 result = result | A << 13 result = result | C >> 8 result = result | G >> 22 result = result | E >> 18 result = result | F >> 25 result = result | B >> 16 return result" "def main(x): x_a = (1023 & x) << 22 x_b = 2047 & x >> 10 x_c = (63 & x >> 21) << 16 x_d = (15 & x >> 27) << 12 x_e = (1 & x >> 31) << 11 return x_a + x_b + x_c + x_d + x_e" "def main(x): a = x & 65535 b = x >> 16 & 511 c = x >> 25 & 127 result = b | c << 9 | a << 16 return result" "from math import * def main(s): s = bin(s)[2:].zfill(32) ns = s[:2] + s[17:28] + s[-2:] + s[-4:-2] + s[2:17] return int(ns, 2)" "def main(x): a_mask = 255 b_mask = 127 << 8 c_mask = 31 << 15 d_mask = 1 << 20 e_mask = 63 << 21 f_mask = 31 << 27 a = x & a_mask b = (x & b_mask) >> 8 c = (x & c_mask) >> 15 d = (x & d_mask) >> 20 e = (x & e_mask) >> 21 f = (x & f_mask) >> 27 return b | a << 7 | e << 15 | d << 21 | f << 22 | c << 27" "def main(x): a = x & 255 b = x >> 8 & 255 c = x >> 16 & 65535 result = c | a << 16 | b << 24 return result" "import math def main(x): a = b = c = d = x a &= 16383 b &= 1073725440 c &= 1073741824 d &= 2147483648 a = a << 18 b = b >> 14 c = c >> 13 d = d >> 15 x = a | b | c | d return x" "import math def main(x): a = b = c = d = e = f = x a &= 127 b &= 128 c &= 3840 d &= 61440 e &= 1073676288 f &= 3221225472 a = a << 4 b = b << 4 c = c << 20 d = d >> 12 e = e >> 2 f = f >> 18 x = a | b | c | d | e | f return x" "def main(x): A = x & 511 B = x >> 9 & 65535 C = x >> 25 & 63 D = x >> 31 & 1 res = 0 res |= B res |= D << 16 res |= C << 17 res |= A << 23 return res" "def main(x): a = x & 16383 b = x >> 14 & 8191 c = x >> 27 & 31 result = a | c << 14 | b << 19 return result" "def main(f): a = (f & 511) << 19 b = (f & 2096640) >> 2 c = (f & 31457280) << 7 d = (f & 4261412864) >> 25 return a | b | c | d" "def main(x): A = x & 32767 B = x >> 15 & 63 C = x >> 21 & 63 D = x >> 27 & 1 E = x >> 28 & 3 F = x >> 30 & 3 result = 0 result |= C result |= E << 6 result |= F << 8 result |= B << 10 result |= D << 16 result |= A << 17 return result" "def main(x): s = str(bin(x)[2:]).rjust(32, '0') c = s[0:3] b = s[3:17] a = s[17:] res = b + c + a return int(res, 2)" "def main(x): b = [1 if x & 1 << 31 - n else 0 for n in range(32)] b.reverse() nb = b[:12] + b[25:32] + b[12:25] nb.reverse() return sum([2 ** (31 - i) for i in range(32) if nb[i] == 1])" "def main(input): a = (input & 4095) << 11 b = (input & 8384512) >> 12 c = (input & 1065353216) << 2 d = (input & 3221225472) >> 7 return a | b | c | d" "def main(x): return (x & 6) << 29 | (x & 1) << 21 | (x & 262136) << 3 | (x & 1835008) << 9 | (x & 2097152) << 1 | (x & 264241152) >> 22 | (x & 4026531840) >> 5" "def main(field): A = field & 2047 B = (field & 134215680) << 5 C = (field & 402653184) >> 16 D = (field & 3758096384) >> 16 return A | B | C | D" "def main(n): x = bin(n) p = [] new = [0] * 32 if len(x) == 32: p = ['0', '0'] elif len(x) == 33: p = ['0'] for i in range(2, len(x)): p.append(x[i]) new[0] = p[5] new[1] = p[6] new[2] = p[7] new[3] = p[-3] new[4] = p[-2] new[5] = p[-1] new[6] = p[8] new[7] = p[9] new[8] = p[10] new[9] = p[11] new[10] = p[12] new[11] = p[13] new[12] = p[14] new[13] = p[15] new[14] = p[16] new[15] = p[17] new[16] = p[18] new[17] = p[19] new[18] = p[0] new[19] = p[20] new[20] = p[21] new[21] = p[22] new[22] = p[23] new[23] = p[24] new[24] = p[25] new[25] = p[26] new[26] = p[27] new[27] = p[28] new[28] = p[1] new[29] = p[2] new[30] = p[3] new[31] = p[4] num = '' for i in range(len(new)): num += new[i] str_a = ''.join(new) bin_a = int(str_a, 2) return bin_a" "def main(x): d = (x & 2147483648) >> 24 b = (x & 1048448) << 1 c = (x & 2146435072) << 1 a = (x & 127) << 0 return a | b | c | d" "def main(input): a = (input & 3) << 30 b = (input & 262140) >> 1 c = (input & 262144) >> 18 d = (input & 7864320) >> 2 e = (input & 2139095040) >> 1 f = (input & 2147483648) >> 10 return a | b | c | d | e | f" "def main(input): a = (input & 127) << 20 b = (input & 16256) << 6 c = (input & 134201344) >> 14 d = input & 4160749568 return a | b | c | d" "def main(input): a = (input & 65535) << 16 b = (input & 33488896) >> 14 c = (input & 33554432) >> 25 d = (input & 2080374784) >> 15 e = (input & 2147483648) >> 30 return a | b | c | d | e" "def main(x): A = (x & 31) << 26 B = (x & 32) << 26 C = (x & 2097088) >> 6 D = (x & 266338304) >> 5 E = (x & 1879048192) >> 5 F = (x & 2147483648) >> 16 return A | B | C | D | E | F" "def main(x): A = x & 63 B = x >> 6 & 65535 C = x >> 22 & 63 D = x >> 28 & 7 E = x >> 31 & 1 result = 0 result |= A << 26 result |= E << 25 result |= B << 9 result |= D << 6 result |= C << 0 return result" "def main(input): a = (input & 2047) << 21 b = (input & 6144) >> 11 c = (input & 536862720) >> 8 d = (input & 536870912) >> 25 e = (input & 3221225472) >> 28 return a | b | c | d | e" "def main(x): A = x & 63 B = x >> 6 & 65535 C = x >> 22 & 31 D = x >> 27 & 1 E = x >> 28 & 15 result = 0 result |= E result |= A << 4 result |= C << 10 result |= B << 15 result |= D << 31 return result main(2809542048)" "def main(x): a = (4, 0, 10, 6) b = (12, 5, 22, 15) c = (18, 13, 5, 0) d = (25, 19, 29, 23) e = (27, 26, 31, 30) f = (31, 28, 14, 11) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] F = (int(x) >> f[1] & int((32 - (f[0] - f[1] + 1)) * '0' + (f[0] - f[1] + 1) * '1', 2)) << f[3] return A | B | C | D | E | F" "def main(input): a = (input & 7) << 3 b = (input & 24) >> 2 c = (input & 96) << 4 d = (input & 32640) << 11 e = (input & 2064384) << 11 f = (input & 266338304) >> 10 g = (input & 268435456) >> 28 h = (input & 3758096384) >> 23 return a | b | c | d | e | f | g | h" "def main(x): a = (7, 0, 31, 24) b = (9, 8, 17, 16) c = (15, 10, 23, 18) d = (29, 16, 15, 2) e = (31, 30, 1, 0) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] return A | B | C | D | E" "def main(x): a = (15, 0, 31, 16) b = (22, 16, 15, 9) c = (25, 23, 2, 0) d = (28, 26, 5, 3) e = (31, 29, 8, 6) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] return A | B | C | D | E" "def main(x): A = x & 511 B = x >> 9 & 127 C = x >> 16 & 16383 D = x >> 30 & 3 res = 0 res |= D res |= B << 2 res |= A << 9 res |= C << 18 return res" "import math def generate_mask(left, right): a = pow(2, left + 1) - pow(2, right) return a def main(x): a = x & generate_mask(4, 0) b = x & generate_mask(8, 5) c = x & generate_mask(21, 9) d = x & generate_mask(29, 22) e = x & generate_mask(31, 30) a1 = a << 27 b1 = b << 3 c1 = c << 3 d1 = d >> 22 e1 = e >> 5 n = a1 | b1 | c1 | d1 | e1 return n" "def main(x): e = x & 2147483648 d = x & 1610612736 c = x & 469762048 b = x & 67106816 a = x & 2047 e = e >> 11 b = b >> 6 d = d >> 26 c = c >> 26 a = a << 21 return b + e + a + c + d" "def main(x): a = (2, 0, 4, 2) b = (12, 3, 14, 5) c = (14, 13, 1, 0) d = (29, 15, 31, 17) e = (31, 30, 16, 15) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] return A | B | C | D | E" "def main(input): a = (input & 255) << 22 b = (input & 524032) >> 5 c = (input & 66584576) >> 4 d = (input & 201326592) >> 26 e = (input & 268435456) << 2 f = (input & 536870912) << 2 g = (input & 1073741824) >> 28 h = (input & 2147483648) >> 17 return a | b | c | d | e | f | g | h" "def main(input): a = (input & 255) << 20 b = (input & 130816) << 3 c = (input & 268304384) >> 17 d = input & 1879048192 e = input & 2147483648 return a | b | c | d | e" "def main(x): a = x & 31 b = x & 32736 dc = x & 4294934528 return dc | a << 10 | b >> 5" "def main(x): A = x & 511 B = x >> 9 & 7 C = x >> 12 & 31 D = x >> 17 & 1 E = x >> 18 & 1 F = x >> 19 & 31 G = x >> 24 & 31 H = x >> 29 & 7 result = 0 result |= E result |= F << 1 result |= D << 6 result |= G << 7 result |= B << 12 result |= H << 15 result |= C << 18 result |= A << 23 return result" "def main(input): A = input & 3 B = (input & 16380) << 18 C = (input & 4177920) >> 2 D = (input & 29360128) >> 13 E = (input & 1040187392) >> 21 F = (input & 3221225472) >> 28 return A | B | C | D | E | F" "def main(x: int) -> int: before = 0 def shift(num: int) -> int: return 2 ** num - 1 def get_slice(to: int=32): nonlocal before res = x & shift(to) & ~shift(before) before = to return res a = get_slice(15) << 15 b = get_slice(24) >> 9 c = get_slice(28) >> 22 d = get_slice(30) >> 28 e = get_slice() return a | b | c | d | e" "def main(n): a = (n & 4095) << 9 b = (n & 1044480) << 9 c = (n & 66060288) >> 17 d = (n & 201326592) << 4 e = (n & 1879048192) >> 28 f = (n & 2147483648) >> 2 return a | b | c | d | e | f" "def main(input): a = (input & 2047) << 9 b = (input & 8386560) << 9 c = (input & 8388608) >> 23 d = (input & 4278190080) >> 23 return a | b | c | d" "def main(x: int) -> int: before = 0 def shift(num: int) -> int: return 2 ** num - 1 def get_slice(to: int=32): nonlocal before res = x & shift(to) & ~shift(before) before = to return res a = get_slice(5) << 0 b = get_slice(12) << 15 c = get_slice(24) >> 4 d = get_slice(29) << 3 e = get_slice(31) >> 23 f = get_slice() >> 26 return a | b | c | d | e | f" "def main(input): a = (input & 65535) << 7 b = (input & 65536) >> 10 c = (input & 8257536) >> 17 d = input & 528482304 e = input & 3758096384 return a | b | c | d | e" "def main(x): a_mask = 4095 b_mask = 511 << 12 c_mask = 15 << 21 d_mask = 63 << 25 e_mask = 1 << 31 a = x & a_mask b = (x & b_mask) >> 12 c = (x & c_mask) >> 21 d = (x & d_mask) >> 25 e = (x & e_mask) >> 31 return d | c << 6 | e << 10 | a << 11 | b << 23" "def main(x): a = (x & 1023) << 6 b = (x & 31744) >> 10 c = (x & 1073709056) << 2 d = (x & 1073741824) >> 14 e = (x & 2147483648) >> 26 return a | b | c | d | e" "def main(x): a = x & 15 b = x >> 4 & 15 c = x >> 8 & 255 d = x >> 16 & 1023 e = x >> 26 & 63 result = b | c << 4 | e << 12 | d << 18 | a << 28 return result" "import math def main(input): a = input & 8191 b = (input & 268427264) << 4 c = (input & 1879048192) >> 14 d = (input & 2147483648) >> 18 return a | b | c | d" "def main(x): A = (x & 16383) << 2 B = (x & 536854528) << 2 C = (x & 536870912) >> 29 D = (x & 1073741824) >> 29 E = x & 2147483648 return A | B | C | D | E" "def main(x): A = (x & 8191) << 1 B = (x & 134209536) << 1 C = (x & 939524096) << 1 D = (x & 1073741824) >> 30 E = x & 2147483648 return A | B | C | D | E" "def main(input): a = (input & 2047) << 21 b = (input & 522240) >> 9 c = (input & 66584576) >> 6 d = (input & 201326592) >> 26 e = (input & 805306368) >> 18 f = (input & 1073741824) >> 18 g = (input & 2147483648) >> 11 return a | b | c | d | e | f | g" "def main(input): a = (input & 8191) << 19 b = (input & 536862720) >> 13 c = (input & 3758096384) >> 13 return a | b | c" "def main(input): a = (input & 16383) << 9 b = (input & 16384) << 9 c = (input & 2064384) << 9 d = (input & 6291456) << 9 e = (input & 4286578688) >> 23 return a | b | c | d | e" "def main(input_number): temp_low = (input_number & 65535) << 16 temp_high = (input_number & 4294901760) >> 16 answer = temp_low | temp_high return answer" "def main(s): return s & 31 | (s >> 5 & 63) << 25 | (s >> 11 & 2047) << 14 | (s >> 22 & 7) << 10 | (s >> 25 & 31) << 5 | (s >> 30 & 1) << 31 | (s >> 31 & 1) << 13" "def main(x): A = x & 65535 B = x >> 16 & 2047 C = x >> 27 & 31 res = 0 res |= B res |= C << 11 res |= A << 16 return res" "def main(x): A = x & 511 B = x >> 9 & 31 C = x >> 14 & 63 D = x >> 20 & 15 E = x >> 24 & 1 F = x >> 25 & 1 G = x >> 26 & 31 H = x >> 31 & 1 res = 0 res |= D res |= F << 4 res |= G << 5 res |= B << 10 res |= H << 15 res |= E << 16 res |= C << 17 res |= A << 23 return res" "def main(digit): A = digit & 1 digit = digit >> 1 B = digit & 2047 digit = digit >> 11 C = digit & 255 digit = digit >> 8 D = digit & 15 digit = digit >> 4 E = digit & 3 digit = digit >> 2 F = digit & 7 digit = digit >> 3 G = digit & 1 digit = digit >> 1 H = digit & 3 result = D << 28 | E << 26 | G << 25 | A << 24 | C << 16 | F << 13 | H << 11 | B << 0 return result" "def main(x): A = x & 7 B = x >> 3 & 31 C = x >> 8 & 31 D = x >> 13 & 3 E = x >> 15 & 127 F = x >> 22 & 255 G = x >> 30 & 3 result = 0 result |= F result |= G << 8 result |= A << 10 result |= D << 13 result |= C << 15 result |= B << 20 result |= E << 25 return result" "def main(x): A = x & 7 B = x >> 3 & 16383 C = x >> 17 & 16383 D = x >> 31 & 1 result = 0 result |= D result |= C << 1 result |= A << 15 result |= B << 18 return result" "def main(input): a = (input & 65535) << 8 b = (input & 458752) << 9 c = (input & 7864320) << 9 d = (input & 2139095040) >> 23 e = (input & 2147483648) >> 7 return a | b | c | d | e" "def main(x): x_a = (1023 & x) << 22 x_b = (1 & x >> 10) << 11 x_c = 2047 & x >> 11 x_d = (511 & x >> 22) << 13 x_e = (1 & x >> 31) << 12 return x_a + x_b + x_c + x_d + x_e" "def main(x): a = (x & 1) << 5 b = (x & 254) << 5 c = (x & 7936) >> 8 d = x & 4186112 e = (x & 130023424) << 5 f = (x & 4160749568) >> 5 return a | b | c | d | e | f" "def main(x): a = x >> 0 & 65535 b = x >> 16 & 255 c = x >> 24 & 1 d = x >> 25 & 7 e = x >> 28 & 7 f = x >> 31 & 1 return d << 29 | e << 26 | f << 25 | c << 24 | a << 8 | b" "def main(x): A = x & 31 B = x >> 5 & 255 C = x >> 13 & 63 D = x >> 19 & 7 E = x >> 22 & 1 F = x >> 23 & 3 G = x >> 25 & 1 H = x >> 26 & 63 result = 0 result |= D result |= G << 3 result |= A << 4 result |= E << 9 result |= C << 10 result |= F << 16 result |= B << 18 result |= H << 26 return result return main(3986200123)" "def main(x): A = x & 65535 B = x >> 16 & 15 C = x >> 20 & 15 D = x >> 24 & 1 E = x >> 25 & 7 F = x >> 28 & 3 G = x >> 30 & 3 result = 0 result |= F result |= D << 2 result |= E << 3 result |= B << 6 result |= A << 10 result |= C << 26 result |= G << 30 return result return main(2741588471)" "def main(x): A = x & 511 B = x >> 9 & 8191 C = x >> 22 & 31 D = x >> 27 & 3 E = x >> 29 & 7 result = 0 result |= D result |= A << 2 result |= B << 11 result |= C << 24 result |= E << 29 return result return main(2334717555)" "def main(x): A = x & 255 B = x >> 8 & 2047 C = x >> 19 & 31 D = x >> 24 & 255 result = 0 result |= B result |= C << 11 result |= A << 16 result |= D << 24 return result return main(2268858993)" "def main(x): A = x & 31 B = x >> 5 & 15 C = x >> 9 & 127 D = x >> 16 & 127 E = x >> 23 & 127 F = x >> 30 & 1 G = x >> 31 & 1 result = 0 result |= B result |= C << 4 result |= G << 11 result |= E << 12 result |= A << 19 result |= F << 24 result |= D << 25 return result return main(2410072536)" "def main(x): a = x & 16383 b = x >> 14 & 4095 c = x >> 26 & 3 d = x >> 28 & 3 e = x >> 30 & 3 return e | b << 2 | d << 14 | c << 16 | a << 18" "def main(x): f = x & 4227858432 e = x & 65011712 d = x & 1048576 c = x & 917504 b = x & 131008 a = x & 63 f = f >> 18 e = e >> 18 c = c >> 17 b = b << 15 a = a << 14 return a + b + c + d + e + f" "def main(input): a = (input & 127) << 21 b = (input & 130944) << 4 c = (input & 268304384) >> 17 d = input & 4026531840 return a | b | c | d" "def main(input): a = (input & 3) << 4 b = (input & 32764) << 17 c = (input & 491520) >> 15 d = (input & 4294443008) >> 13 return a | b | c | d" "def main(input): a = input & 4095 b = (input & 520192) << 11 c = (input & 1073217536) >> 7 d = input & 1073741824 e = input & 2147483648 return a | b | c | d | e" "def main(x): a = x & 32767 b = x >> 15 & 7 c = x >> 18 & 8191 d = x >> 31 & 1 res = d | c << 1 | b << 14 | a << 17 return res" "def main(x): a = (x & 65535) << 12 b = (x & 4128768) >> 10 c = (x & 4194304) >> 17 d = (x & 260046848) >> 23 e = (x & 805306368) << 1 f = (x & 1073741824) << 1 g = (x & 2147483648) >> 3 return a | b | c | d | e | f | g" "def main(input): a = (input & 2047) << 15 b = (input & 6144) << 18 c = (input & 253952) >> 13 d = (input & 133955584) >> 13 e = (input & 939524096) >> 1 f = (input & 1073741824) << 1 g = (input & 2147483648) >> 17 return a | b | c | d | e | f | g" "def main(input): a = (input & 8191) << 19 b = (input & 253952) >> 13 c = (input & 268173312) >> 12 d = (input & 1879048192) >> 12 e = (input & 2147483648) >> 26 return a | b | c | d | e" "def main(input): a = (input & 65535) << 0 b = (input & 458752) << 1 c = (input & 7864320) << 1 d = (input & 2139095040) << 1 e = (input & 2147483648) >> 15 return a | b | c | d | e" "def main(input): a = (input & 4095) << 9 b = (input & 28672) << 9 c = (input & 4161536) << 9 d = (input & 130023424) >> 18 e = (input & 2013265920) >> 27 f = input & 2147483648 return a | b | c | d | e | f" "def main(input1): a = (input1 & 8191) << 19 b = (input1 & 122880) >> 3 c = (input1 & 66977792) >> 17 d = (input1 & 1006632960) >> 11 e = (input1 & 1073741824) >> 21 f = (input1 & 2147483648) >> 17 return a | b | c | d | e | f" "def main(s): return s & 2214592511 | (s >> 26 & 7) << 28 | (s >> 29 & 3) << 26" "def main(x): a = (10, 0, 10, 0) b = (13, 11, 13, 11) c = (18, 14, 21, 17) d = (23, 19, 26, 22) e = (26, 24, 16, 14) f = (31, 27, 31, 27) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] F = (int(x) >> f[1] & int((32 - (f[0] - f[1] + 1)) * '0' + (f[0] - f[1] + 1) * '1', 2)) << f[3] return A | B | C | D | E | F" "def main(number): PART_A = number & 7 number >>= 3 PART_B = number & 31 number >>= 5 PART_C = number & 63 number >>= 6 number <<= 5 number |= PART_B number <<= 6 number |= PART_C number <<= 3 number |= PART_A return number" "def main(x): y = x s = '' while y > 0: s = str(y % 2) + s y //= 2 if len(s) < 32: for i in range(32 - len(s)): s = '0' + s lst = [0] * 32 for i in range(len(lst)): lst[len(lst) - 1 - i] = s[len(s) - 1 - i] A = lst[-15:] B = lst[-31:-15] C = lst[-32:-31] lst[-1:] = C lst[-16:-1] = A lst[-32:-16] = B f = 0 for i in range(len(lst)): f += 2 ** i if int(lst[len(lst) - 1 - i]) == 1 else 0 return f" "def main(n): d = 0 temp = n & 8191 temp = temp << 18 d = d | temp temp = n & 268427264 temp = temp >> 13 d = d | temp temp = n & 268435456 temp = temp << 3 d = d | temp temp = n & 536870912 temp = temp >> 13 d = d | temp temp = n & 1073741824 temp = temp >> 13 d = d | temp temp = n & 2147483648 temp = temp >> 16 d = d | temp return d" "def main(x): a = (13, 0, 31, 18) b = (27, 14, 13, 0) c = (30, 28, 16, 14) d = (31, 31, 17, 17) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] return A | B | C | D" "def main(x): f = ((1 << 32) - (1 << 31) & x) >> 31 e = ((1 << 31) - (1 << 29) & x) >> 29 d = ((1 << 29) - (1 << 22) & x) >> 22 c = ((1 << 22) - (1 << 7) & x) >> 7 b = ((1 << 7) - (1 << 3) & x) >> 3 a = ((1 << 3) - (1 << 0) & x) >> 0 res = b << 28 | e << 26 | f << 25 | d << 18 | a << 15 | c return res" "def main(x): a = x & 15 b = x >> 4 & 127 c = x >> 11 & 31 d = x >> 16 & 32767 e = x >> 31 & 1 result = c | a << 21 | b << 25 | d << 6 | e << 5 return result" "def main(input): a = (input & 1023) << 2 b = (input & 261120) << 14 c = (input & 1073479680) >> 6 d = (input & 3221225472) >> 30 return a | b | c | d" "def main(input): a = (input & 32767) << 17 b = (input & 268402688) >> 15 c = (input & 1879048192) >> 14 d = (input & 2147483648) >> 18 return a | b | c | d" "def main(input): a = (input & 2047) << 16 b = (input & 1046528) >> 5 c = (input & 32505856) << 7 d = (input & 100663296) >> 21 e = (input & 2013265920) >> 27 f = (input & 2147483648) >> 16 return a | b | c | d | e | f" "def main(x): a = x & 1023 b = x >> 10 & 255 c = x >> 18 & 4095 d = x >> 30 & 1 e = x >> 31 & 1 res = d | a << 1 | e << 11 | c << 12 | b << 24 return res" "def main(input): a = (input & 1023) << 22 b = (input & 261120) >> 10 c = (input & 536608768) >> 10 d = (input & 536870912) >> 10 e = (input & 3221225472) >> 10 return a | b | c | d | e" "import math def generate_mask(left, right): a = pow(2, left + 1) - pow(2, right) return a def main(x): a = x & generate_mask(7, 0) b = x & generate_mask(17, 8) c = x & generate_mask(29, 18) d = x & generate_mask(30, 30) e = x & generate_mask(31, 31) a1 = a << 24 b1 = b << 5 c1 = c >> 17 d1 = d >> 7 e1 = e >> 31 n = a1 | b1 | c1 | d1 | e1 return n" "def main(x): A = (x & 31) << 22 B = (x & 992) << 22 C = (x & 16776192) >> 3 D = (x & 2130706432) >> 24 E = (x & 2147483648) >> 10 return A | B | C | D | E" "def main(x): d = x & 1 << 31 c = x & 7 << 28 b = x & 16383 << 14 a = x & 16383 return b << 4 | d >> 14 | a << 3 | c >> 28" "def main(x): a = x & 2047 b = x >> 11 & 32767 c = x >> 26 & 31 d = x >> 31 & 3 res = c | a << 5 | d << 16 | b << 17 return res" "def main(number): part_a = number & 7 number >>= 3 part_b = number & 3 number >>= 2 part_c = number & 63 number >>= 6 part_d = number & 4095 number >>= 12 part_e = number & 3 number >>= 2 part_f = number & 127 number = 0 number <<= 6 number |= part_c number <<= 12 number |= part_d number <<= 7 number |= part_f number <<= 2 number |= part_b number <<= 3 number |= part_a number <<= 2 number |= part_e return number" "def main(num): a = num & 2047 b = num & 30720 c = num & 1073709056 d = num & 1073741824 e = num & 2147483648 return a | b | c | d << 1 | e >> 1" "def main(bf): f = bf & 2147483648 e = bf & 2013265920 d = bf & 100663296 c = bf & 16777216 b = bf & 16773120 a = bf & 4095 return (f >> 15) + (e >> 15) + (d << 4) + (c << 7) + (b << 5) + a" "def main(x): a = x & 63 b = x >> 6 & 8191 c = x >> 19 & 15 d = x >> 23 & 63 e = x >> 29 & 3 f = x >> 31 & 1 result = f | a << 1 | c << 7 | b << 11 | d << 24 | e << 30 return result" "def main(x): a = x & 511 b = x >> 9 & 32767 c = x >> 24 & 63 d = x >> 30 & 3 res = d | a << 2 | c << 11 | b << 17 return res" "def main(input): a = (input & 65535) << 16 b = (input & 196608) >> 16 c = (input & 268173312) >> 16 d = (input & 4026531840) >> 16 return a | b | c | d" "def main(input): a = (input & 2047) << 18 b = (input & 16775168) >> 11 c = (input & 520093696) >> 11 d = (input & 1610612736) << 1 e = (input & 2147483648) >> 2 return a | b | c | d | e" "def main(input): a = (input & 7) << 14 b = (input & 131064) << 14 c = (input & 4063232) >> 16 d = (input & 1069547520) >> 16 e = (input & 1073741824) << 1 f = (input & 2147483648) >> 31 return a | b | c | d | e | f" "def main(x): y = format(x, 'b') if len(y) > 32: y = y[len(y) - 32:] if len(y) < 32: y = '0' * (32 - len(y)) + y temp = y[22:24] temp += y[2:7] temp += y[24:] temp += y[0:1] temp += y[1:2] temp += y[7:18] temp += y[18:21] temp += y[21:22] a = int(temp, 2) temp = format(a, 'd') temp = int(temp) return temp" "def get_field(x, start_bit, end_bit): mask = 2 ** (end_bit + 1 - start_bit) - 1 return x >> start_bit & mask def main(x): k = 0 bits = [15, 3, 7, 2, 3, 1, 1] a = get_field(x, k, k + bits[0] - 1) k += bits[0] b = get_field(x, k, k + bits[1] - 1) k += bits[1] c = get_field(x, k, k + bits[2] - 1) k += bits[2] d = get_field(x, k, k + bits[3] - 1) k += bits[3] e = get_field(x, k, k + bits[4] - 1) k += bits[4] f = get_field(x, k, k + bits[5] - 1) k += bits[5] g = get_field(x, k, k + bits[6] - 1) return c | g << bits[2] | e << bits[2] + bits[6] | d << bits[2] + bits[6] + bits[4] | a << bits[2] + bits[6] + bits[4] + bits[3] | b << bits[2] + bits[6] + bits[4] + bits[3] + bits[0] | f << bits[2] + bits[6] + bits[4] + bits[3] + bits[0] + bits[1]" "def main(x): g = (x & 2147483648) >> 23 f = (x & 1073741824) >> 23 e = (x & 1040187392) >> 25 d = (x & 33546240) >> 4 c = (x & 6144) >> 6 b = (x & 1920) << 21 a = (x & 127) << 21 return a | b | c | d | e | f | g" "def main(inp): a = (inp & 8191) << 18 b = (inp & 134209536) >> 9 c = (inp & 939524096) >> 26 d = (inp & 1073741824) << 1 e = (inp & 2147483648) >> 31 return a | b | c | d | e" "def main(x): a = x & 4095 b = x >> 12 & 16383 c = x >> 26 & 1 d = x >> 27 & 3 e = x >> 29 & 7 result = c | d << 1 | e << 3 | a << 6 | b << 18 return result" "def main(x): a = (10, 0, 10, 0) b = (12, 11, 31, 30) c = (25, 13, 27, 15) d = (26, 26, 11, 11) e = (29, 27, 14, 12) f = (31, 30, 29, 28) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] F = (int(x) >> f[1] & int((32 - (f[0] - f[1] + 1)) * '0' + (f[0] - f[1] + 1) * '1', 2)) << f[3] return A | B | C | D | E | F" "def main(x): a = (8, 0, 20, 12) b = (19, 9, 31, 21) c = (27, 20, 7, 0) d = (29, 28, 9, 8) e = (31, 30, 11, 10) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] return A | B | C | D | E" "def main(x): a = (10, 0, 31, 21) b = (22, 11, 20, 9) c = (31, 23, 8, 0) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] return A | B | C" "def main(x): a = (7, 0, 21, 14) b = (14, 8, 30, 24) c = (20, 15, 5, 0) d = (26, 21, 12, 7) e = (27, 27, 6, 6) f = (29, 28, 23, 22) g = (30, 30, 31, 31) h = (31, 31, 13, 13) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] F = (int(x) >> f[1] & int((32 - (f[0] - f[1] + 1)) * '0' + (f[0] - f[1] + 1) * '1', 2)) << f[3] G = (int(x) >> g[1] & int((32 - (g[0] - g[1] + 1)) * '0' + (g[0] - g[1] + 1) * '1', 2)) << g[3] H = (int(x) >> h[1] & int((32 - (h[0] - h[1] + 1)) * '0' + (h[0] - h[1] + 1) * '1', 2)) << h[3] return A | B | C | D | E | F | G | H" "def main(x): a = (2, 0, 16, 14) b = (12, 3, 9, 0) c = (26, 13, 31, 18) d = (27, 27, 13, 13) e = (30, 28, 12, 10) f = (31, 31, 17, 17) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] F = (int(x) >> f[1] & int((32 - (f[0] - f[1] + 1)) * '0' + (f[0] - f[1] + 1) * '1', 2)) << f[3] return A | B | C | D | E | F" "def main(x): a = (13, 0, 24, 11) b = (15, 14, 10, 9) c = (18, 16, 3, 1) d = (23, 19, 8, 4) e = (30, 24, 31, 25) f = (31, 31, 0, 0) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] F = (int(x) >> f[1] & int((32 - (f[0] - f[1] + 1)) * '0' + (f[0] - f[1] + 1) * '1', 2)) << f[3] return A | B | C | D | E | F" "def main(x): a = (12, 0, 31, 19) b = (16, 13, 16, 13) c = (29, 17, 12, 0) d = (31, 30, 18, 17) e = (30, 24, 31, 25) f = (31, 31, 0, 0) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] return A | B | C | D" "def main(x): a_bits = 16383 b_bits = 49152 c_bits = 2147418112 d_bits = 2147483648 new_a_bits = (x & a_bits) << 18 new_b_bits = (x & b_bits) >> 13 new_c_bits = (x & c_bits) >> 13 new_d_bits = (x & d_bits) >> 31 return new_a_bits | new_b_bits | new_c_bits | new_d_bits" "def main(x): A = x & 1 B = x >> 1 & 31 C = x >> 6 & 31 D = x >> 11 & 63 E = x >> 17 & 4095 F = x >> 29 & 3 G = x >> 31 & 1 result = 0 result |= G result |= D << 1 result |= F << 7 result |= C << 9 result |= B << 14 result |= E << 19 result |= A << 31 return result" "def main(x): result = 0 A = x & 255 B = x >> 8 & 63 C = x >> 14 & 8191 D = x >> 27 & 15 E = x >> 31 & 1 result |= A << 18 result |= C << 1 result |= B << 26 result |= E << 0 result |= D << 14 return result" "def main(hex_num): hex_num = int(hex(hex_num), 16) temp = int(hex(3758096384), 16) E = int(hex(int(hex(hex_num & temp), 16) >> 0), 16) temp = int(hex(536608768), 16) D = int(hex(int(hex(hex_num & temp), 16) >> 8), 16) temp = int(hex(261120), 16) C = int(hex(int(hex(hex_num & temp), 16) << 11), 16) temp = int(hex(992), 16) B = int(hex(int(hex(hex_num & temp), 16) >> 0), 16) temp = int(hex(31), 16) A = int(hex(int(hex(hex_num & temp), 16) >> 0), 16) return int(hex(E ^ D ^ C ^ B ^ A), 16)" "def main(input): a = (input & 2047) << 21 b = (input & 14336) << 0 c = (input & 1032192) << 1 d = (input & 535822336) >> 19 e = (input & 536870912) >> 15 f = (input & 1073741824) >> 20 g = (input & 2147483648) >> 31 return a | c | e | b | f | d | g" "def main(x): FE = x >> 30 DC = x - (FE << 30) >> 16 B = x - (FE << 30) - (DC << 16) >> 15 A = x - (FE << 30) - (DC << 16) - (B << 15) return (B << 31) + (FE << 29) + (A << 14) + DC" "def main(x): d = x >> 31 t = x - (d << 31) c = t >> 17 t = t - (c << 17) b = t >> 10 a = t - (b << 10) x = (c << 18) + (a << 8) + (b << 1) + d return x" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(14, 0) b_mask = u_mask(28, 14) c_mask = u_mask(31, 28) d_mask = u_mask(32, 31) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask a = a << 18 b = b >> 13 c = c >> 13 d = d >> 31 return a | b | c | d" "def main(x): a = x & 4095 b = x >> 12 & 8191 c = x >> 25 & 3 d = x >> 27 & 1 e = x >> 28 & 1 f = x >> 29 & 7 result = b | e << 13 | a << 14 | f << 26 | c << 29 | d << 31 return result" "def get_field(x, start, end): mask = 2 ** (end + 1 - start) - 1 return x >> start & mask def main(x): bits = [9, 12, 9, 2] k = 0 a = get_field(x, k, k + bits[0] - 1) k += bits[0] b = get_field(x, k, k + bits[1] - 1) k += bits[1] c = get_field(x, k, k + bits[2] - 1) k += bits[2] d = get_field(x, k, k + bits[3] - 1) return b | d << bits[1] | (c << bits[1] + bits[3] | a << bits[1] + bits[3] + bits[2])" "def main(num): h = num & 2147483648 g = num & 1073741824 f = num & 536870912 e = num & 469762048 d = num & 58720256 c = num & 8380416 b = num & 8128 a = num & 63 g = g << 1 f = f << 1 c = c << 7 h = h >> 12 b = b << 6 d = d >> 14 e = e >> 20 a = a >> 0 return g + f + c + h + b + d + e + a" "def main(x): a = x & 4095 b = x >> 12 & 1 c = x >> 13 & 2047 d = x >> 24 & 3 e = x >> 26 & 63 res = d | b << 2 | c << 3 | a << 14 | e << 26 return res" "import math def main(x): a = b = c = d = x a &= 2047 b &= 134215680 c &= 2013265920 d &= 2147483648 a = a << 20 b = b >> 11 c = c >> 11 x = a | b | c | d return x" "def main(num): a = num & 255 b = num & 130816 c = num & 917504 d = num & 4293918720 return a | b << 15 | c >> 9 | d >> 9" "from __future__ import annotations def main(x): a = x & 1 b = x >> 1 & 2047 c = x >> 12 & 65535 d = x >> 28 & 1 e = x >> 29 & 1 f = x >> 30 & 3 res = e | c << 1 | b << 17 | a << 28 | f << 29 | d << 31 return res" "def main(x): a = x & 16383 b = x >> 14 & 63 c = x >> 20 & 15 d = x >> 24 & 3 e = x >> 26 & 1 f = x >> 27 & 15 g = x >> 31 & 1 res = d | g << 2 | f << 3 | a << 7 res2 = e << 21 | c << 22 | b << 26 return res | res2" "def main(input): a = (input & 7) << 19 b = (input & 120) << 22 c = (input & 8388480) >> 4 d = (input & 58720256) >> 1 e = (input & 469762048) << 3 f = (input & 3758096384) >> 29 return a | b | c | d | e | f" "def main(x): a_mask = 255 b_mask = 63 << 8 c_mask = 4095 << 14 d_mask = 3 << 26 e_mask = 1 << 28 f_mask = 1 << 29 g_mask = 1 << 30 h_mask = 1 << 31 a = x & a_mask b = (x & b_mask) >> 8 c = (x & c_mask) >> 14 d = (x & d_mask) >> 26 e = (x & e_mask) >> 28 f = (x & f_mask) >> 29 g = (x & g_mask) >> 30 h = (x & h_mask) >> 31 return g | f << 1 | b << 2 | a << 8 | e << 16 | h << 17 | d << 18 | c << 20" "def main(x): a = x & 32767 b = x >> 15 & 4095 c = x >> 27 & 1 d = x >> 28 & 1 e = x >> 29 & 1 f = x >> 30 & 1 g = x >> 31 & 1 res = 0 res |= f res |= b << 1 res |= a << 13 res |= e << 28 res |= c << 29 res |= g << 30 res |= d << 31 return res" "def main(input): a = (input & 31) << 5 b = (input & 992) >> 5 c = (input & 2096128) << 9 d = (input & 31457280) >> 7 e = (input & 100663296) << 5 f = (input & 2013265920) >> 17 g = (input & 2147483648) >> 13 return a | b | c | d | e | f | g" "def main(x): a = x & 4095 b = (x & 67104768) << 6 c = (x & 2080374784) >> 13 d = (x & 2147483648) >> 19 return a | b | c | d" "def main(input): a = input & 2047 b = (input & 14336) << 18 c = (input & 33538048) << 2 d = (input & 1040187392) >> 14 e = (input & 3221225472) >> 3 return a | b | c | d | e" "def main(num): a = num & 255 b = num & 65280 c = num & 1073676288 d = num & 3221225472 return a | b << 16 | c >> 6 | d >> 22" "def main(hex_number): x = str(bin(hex_number)[2:]).rjust(32, '0') return int(x[26:32] + x[6:12] + x[0:6] + x[12:26], 2)" "def main(x): f = x & 2147483648 e = x & 1073741824 d = x & 805306368 c = x & 268173312 b = x & 261632 a = x & 511 f = f >> 20 e = e >> 30 d = d >> 16 c = c >> 17 b = b << 5 a = a << 23 return a + b + c + d + e + f" "def main(x): d_bit = 4278190080 c_bit = 16711680 b_bit = 65024 a_bit = 511 new_a = (x & a_bit) << 8 new_b = (x & b_bit) << 8 new_c = (x & c_bit) >> 16 new_d = x & d_bit res = new_a | new_b | new_c | new_d return res" "def main(x): a_mask = 7 b_mask = 63 << 3 c_mask = 255 << 9 d_mask = 2047 << 17 e_mask = 7 << 28 f_mask = 1 << 31 a = x & a_mask b = (x & b_mask) >> 3 c = (x & c_mask) >> 9 d = (x & d_mask) >> 17 e = (x & e_mask) >> 28 f = (x & f_mask) >> 31 return b | a << 6 | f << 9 | e << 10 | c << 13 | d << 21" "def main(data): a = data & 511 b = data >> 9 & 127 c = data >> 16 & 1023 d = data >> 26 & 7 e = data >> 29 & 3 f = data >> 31 & 1 result = a << 0 | c << 9 | b << 19 | f << 26 | d << 27 | e << 30 return result" "def main(hex_num): hex_num = int(hex(hex_num), 16) temp = int(hex(4286578688), 16) C = int(hex(int(hex(hex_num & temp), 16) >> 15), 16) temp = int(hex(8388352), 16) B = int(hex(int(hex(hex_num & temp), 16) << 9), 16) temp = int(hex(255), 16) A = int(hex(int(hex(hex_num & temp), 16) >> 0), 16) return int(hex(C ^ B ^ A), 16)" "def main(input): a = (input & 3) << 23 b = (input & 508) << 23 c = (input & 3584) << 8 d = (input & 4096) << 8 e = (input & 253952) >> 9 f = (input & 3932160) >> 18 g = (input & 1069547520) >> 13 h = (input & 3221225472) >> 9 return a | b | c | d | e | f | g | h" "def main(x): A = x & 7 B = x >> 3 & 8191 C = x >> 16 & 1 D = x >> 17 & 511 E = x >> 26 & 31 F = x >> 31 & 1 result = 0 result |= D result |= E << 9 result |= A << 14 result |= B << 17 result |= F << 30 result |= C << 31 return result" "def main(x): a_mask = 8191 b_mask = 255 << 13 c_mask = 1 << 21 d_mask = 63 << 22 e_mask = 15 << 28 a = x & a_mask b = (x & b_mask) >> 13 c = (x & c_mask) >> 21 d = (x & d_mask) >> 22 e = (x & e_mask) >> 28 return d | e << 6 | a << 10 | c << 23 | b << 24" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(3, 0) b_mask = u_mask(17, 3) c_mask = u_mask(26, 17) d_mask = u_mask(30, 26) e_mask = u_mask(32, 30) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask e = x & e_mask a = a << 29 b = b << 1 c = c << 1 d = d >> 26 e = e >> 3 return a | b | c | d | e" "def main(x): a = x & 31 b = x >> 5 & 255 c = x >> 13 & 127 d = x >> 20 & 1 e = x >> 21 & 255 f = x >> 27 & 7 g = x >> 30 & 3 result = b | e << 8 | f << 14 | g << 17 | a << 19 | d << 24 | c << 25 return result" "def main(input): a = (input & 8191) << 16 b = (input & 24576) << 16 c = (input & 8355840) >> 8 d = (input & 8388608) >> 17 e = (input & 1056964608) >> 24 f = (input & 1073741824) >> 15 g = input & 2147483648 return a | b | c | d | e | f | g" "def main(hex_num): hex_num = int(hex(hex_num), 16) temp = int(hex(2147483648), 16) H = int(hex(int(hex(hex_num & temp), 16) >> 20), 16) temp = int(hex(1610612736), 16) GF = int(hex(int(hex(hex_num & temp), 16) << 1), 16) temp = int(hex(503316480), 16) E = int(hex(int(hex(hex_num & temp), 16) >> 18), 16) temp = int(hex(33554304), 16) DC = int(hex(int(hex(hex_num & temp), 16) << 5), 16) temp = int(hex(127), 16) BA = int(hex(int(hex(hex_num & temp), 16) >> 0), 16) return int(hex(H ^ GF ^ E ^ DC ^ BA), 16)" "def main(x): A = (x & 1) << 23 B = (x & 8190) << 10 C = (x & 516096) >> 8 D = (x & 133693440) << 5 E = (x & 402653184) >> 25 F = (x & 1610612736) >> 29 G = (x & 2147483648) >> 27 return A | B | C | D | E | F | G" "def main(input): a = (input & 16383) << 18 b = (input & 268419072) >> 11 c = (input & 1879048192) >> 28 d = (input & 2147483648) >> 14 return a | b | c | d" "def main(s): s = int(s) s_1 = (s & 2047) << 21 s_2 = s >> 11 & 31 s_3 = (s >> 16 & 4095) << 5 s_4 = (s >> 28 & 15) << 17 return s_1 | s_2 | s_3 | s_4" "def main(x): A = x & 32767 B = x & 229376 C = x & 262144 D = x & 66584576 E = (x & 2080374784) << 1 F = (x & 2147483648) >> 5 return A | B | C | D | E | F" "def main(x): a = x & 63 b = x >> 6 & 32767 c = x >> 21 & 3 d = x >> 23 & 127 e = x >> 30 & 1 f = x >> 31 & 1 result = c | b << 2 | a << 17 | e << 23 | d << 24 | f << 31 return result" "def main(input): a = (input & 65535) << 16 b = (input & 4294901760) >> 16 return a | b" "def main(x): return (7 & x) << 29 | (65528 & x) << 3 | (33488896 & x) << 3 | (503316480 & x) >> 25 | (536870912 & x) >> 25 | (1073741824 & x) >> 25 | (2147483648 & x) >> 3" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(6, 0) b_mask = u_mask(8, 6) c_mask = u_mask(15, 8) d_mask = u_mask(20, 15) e_mask = u_mask(26, 20) f_mask = u_mask(30, 26) g_mask = u_mask(32, 30) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask e = x & e_mask f = x & f_mask g = x & g_mask a = a << 13 b = b >> 6 c = c << 17 d = d >> 9 e = e >> 1 f = f >> 24 g = g >> 19 return a | b | c | d | e | f | g" "def main(input): a = (input & 16383) << 18 b = (input & 1073725440) >> 14 c = (input & 3221225472) >> 14 return a | b | c" "def main(x): A = x & 16383 B = (x & 268419072) << 4 C = (x & 4026531840) >> 14 return A | B | C" "def main(x): a = x & 16383 b = x >> 14 & 32767 c = x >> 29 & 3 d = x >> 31 & 1 result = c | b << 2 | d << 17 | a << 18 return result" "def main(s): e = (s & 3758096384) >> 29 d = (s & 536838144) >> 15 c = (s & 28672) >> 12 b = (s & 4080) >> 4 a = s & 15 k = (((d << 3 | c) << 8 | b) << 4 | a) << 3 | e return k" "def main(x): a = (1, 0, 31, 30) b = (5, 2, 14, 11) c = (11, 6, 29, 24) d = (12, 12, 17, 17) e = (16, 13, 10, 7) f = (22, 17, 23, 18) g = (29, 23, 6, 0) h = (31, 30, 16, 15) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] F = (int(x) >> f[1] & int((32 - (f[0] - f[1] + 1)) * '0' + (f[0] - f[1] + 1) * '1', 2)) << f[3] G = (int(x) >> g[1] & int((32 - (g[0] - g[1] + 1)) * '0' + (g[0] - g[1] + 1) * '1', 2)) << g[3] H = (int(x) >> h[1] & int((32 - (h[0] - h[1] + 1)) * '0' + (h[0] - h[1] + 1) * '1', 2)) << h[3] return A | B | C | D | E | F | G | H" "def main(x): A = x & 255 B = x >> 8 & 4095 C = x >> 20 & 4095 result = 0 result |= C result |= A << 12 result |= B << 20 return result" "def main(x): A = x & 7 B = x >> 3 & 1 C = x >> 4 & 1023 D = x >> 14 & 8191 E = x >> 27 & 15 F = x >> 31 & 1 result = 0 result |= D result |= E << 13 result |= A << 17 result |= B << 20 result |= C << 21 result |= F << 31 return result" "def main(input): a = input & 1023 b = (input & 31744) << 17 c = (input & 33521664) >> 3 d = (input & 1040187392) >> 3 e = (input & 3221225472) >> 20 return a | b | c | d | e" "def mask(begin, end): sum = 0 for i in range(begin, end + 1): sum += 2 ** i return sum def main(in_): a = (in_ & mask(0, 3)) << 14 b = in_ & mask(4, 13) c = (in_ & mask(14, 27)) << 4 d = (in_ & mask(28, 31)) >> 28 return a | b | c | d" "def main(num): a = num & 16383 b = num & 536854528 c = num & 536870912 d = num & 1073741824 e = num & 2147483648 return a | b << 1 | c << 2 | d >> 16 | e >> 1" "def main(input): a = input & 255 b = (input & 4194048) << 2 c = (input & 1069547520) << 2 d = (input & 1073741824) >> 21 e = (input & 2147483648) >> 23 return a | b | c | d | e" "def main(input): a = (input & 2047) << 9 b = (input & 8386560) << 9 c = (input & 4286578688) >> 23 return a | b | c" "def main(x): f = x >> 31 e = x - (f << 31) >> 29 dc = x - (f << 31) - (e << 29) >> 19 ba = x - (f << 31) - (e << 29) - (dc << 19) return (ba << 13) + (e << 11) + (f << 10) + dc" "def main(input): a = input & 1 b = input & 16382 c = (input & 1073725440) << 2 d = (input & 1073741824) >> 15 e = (input & 2147483648) >> 17 return a | b | c | d | e" "def main(input): a = (input & 1023) << 16 b = (input & 67107840) >> 10 c = (input & 1006632960) >> 0 d = (input & 3221225472) >> 0 return a | b | c | d" "def main(input): a = (input & 255) << 23 b = (input & 261888) << 1 c = (input & 3932160) << 1 d = (input & 4194304) << 9 e = (input & 125829120) >> 18 f = (input & 4160749568) >> 27 return a | b | c | d | e | f" "def main(num): a = num & 15 b = num & 16 c = num & 96 d = num & 32640 e = num & 8355840 f = num & 260046848 g = num & 805306368 h = num & 3221225472 return a << 21 | b << 27 | c << 22 | d >> 7 | e >> 7 | f >> 7 | g << 1 | h >> 5" "def main(x): A = x & 4095 B = x >> 12 & 8191 C = x >> 25 & 127 r = 0 r |= C r |= B << 7 r |= A << 20 return r" "def main(input): a = (input & 32767) << 9 b = (input & 8355840) << 9 c = (input & 260046848) >> 19 d = (input & 1879048192) >> 27 e = (input & 2147483648) >> 31 return a | b | c | d | e" "def main(x): a_mask = 65535 b_mask = 8191 << 16 c_mask = 1 << 29 d_mask = 3 << 30 a = x & a_mask b = (x & b_mask) >> 16 c = (x & c_mask) >> 29 d = (x & d_mask) >> 30 return b | d << 13 | a << 15 | c << 31" "def main(x): a = x & 127 b = x >> 7 & 31 c = x >> 12 & 4095 d = x >> 24 & 127 e = x >> 31 & 1 res = a | c << 7 | b << 19 | d << 24 | e << 31 return res" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(8, 0) b_mask = u_mask(10, 8) c_mask = u_mask(16, 10) d_mask = u_mask(31, 16) e_mask = u_mask(32, 31) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask e = x & e_mask a = a << 18 b = b >> 8 c = c << 16 d = d >> 13 e = e >> 29 return a | b | c | d | e" "def main(x): d = (x & 4160749568) >> 27 c = (x & 117440512) >> 19 b = (x & 2047) << 8 a = (x & 16775168) << 8 return a | b | c | d" "def main(number): s = str(bin(number)[2:]).rjust(32, '0') a = s[18:] b = s[16:18] c = s[3:16] d = s[2] e = s[0:2] res = b + e + d + c + a return int(res, 2)" "def main(x): A = x & 16383 B = x >> 14 & 2047 C = x >> 25 & 7 D = x >> 28 & 7 E = x >> 31 & 1 res = 0 res |= B res |= A << 11 res |= E << 25 res |= D << 26 res |= C << 29 return res" "def main(input): a = (input & 1023) << 2 b = (input & 3072) << 16 c = (input & 61440) << 16 d = (input & 196608) << 7 e = (input & 66846720) >> 3 f = (input & 201326592) >> 26 g = (input & 268435456) >> 3 h = (input & 3758096384) >> 17 return a | b | c | d | e | f | g | h" "def main(x): A = (x & 511) << 16 B = (x & 33553920) >> 9 C = (x & 33554432) << 5 D = (x & 67108864) << 5 E = (x & 4160749568) >> 2 return A | B | C | D | E" "def main(x): A = x & 16383 B = x >> 14 & 127 C = x >> 21 & 255 D = x >> 29 & 3 E = x >> 31 & 1 result = 0 result |= A result |= D << 14 result |= B << 16 result |= C << 23 result |= E << 31 return result" "def main(input): a = (input & 65535) << 12 b = (input & 196608) << 14 c = (input & 786432) << 10 d = (input & 267386880) >> 17 e = (input & 268435456) >> 17 f = (input & 3758096384) >> 29 return a | b | c | d | e | f" "def main(input): a = (input & 1023) << 22 b = (input & 33553408) >> 3 c = (input & 33554432) >> 19 d = (input & 469762048) >> 23 e = (input & 3758096384) >> 29 return a | b | c | d | e" "def main(x): f = x & 3221225472 e = x & 1056964608 d = x & 12582912 c = x & 4186112 b = x & 8176 a = x & 15 f = f >> 8 e = e << 2 d = d << 2 return f + e + d + c + b + a" "def main(x): x_a = (16383 & x) << 4 x_b = (1023 & x >> 14) << 22 x_c = 15 & x >> 24 x_d = (15 & x >> 28) << 18 return x_a + x_b + x_c + x_d" "def main(x): a_mask = 32767 b_mask = 1023 << 15 c_mask = 7 << 25 d_mask = 1 << 28 e_mask = 3 << 29 f_mask = 1 << 31 a = x & a_mask b = (x & b_mask) >> 15 c = (x & c_mask) >> 25 d = (x & d_mask) >> 28 e = (x & e_mask) >> 29 f = (x & f_mask) >> 31 return e | b << 2 | f << 12 | c << 13 | a << 16 | d << 31" "def main(x): A = x & 1023 B = x >> 10 & 127 C = x >> 17 & 4095 D = x >> 29 & 3 E = x >> 31 & 1 result = 0 result |= C result |= A << 12 result |= E << 22 result |= B << 23 result |= D << 30 return result" "def main(input): a = (input & 31) << 8 b = (input & 4064) << 20 c = (input & 16773120) << 1 d = (input & 1056964608) >> 22 e = (input & 3221225472) >> 30 return a | b | c | d | e" "def main(x): h = (2147483648 & x) >> 2 g = (1610612736 & x) << 1 f = (469762048 & x) >> 8 e = (67043328 & x) >> 8 d = (65280 & x) >> 8 cba = (255 & x) << 21 return cba | d | e | f | g | h" "def main(x): result = 0 result |= (x & 1073725440) << 2 result |= (x & 3221225472) >> 16 result |= x & 16383 return result" "def main(num): b = num & 4294901760 a = num & 65535 return a << 16 | b >> 16" "def main(hex_number): str_bin_number = str(bin(hex_number)[2:]).rjust(32, '0') return int(str_bin_number[4:11] + str_bin_number[1:4] + str_bin_number[17:21] + str_bin_number[0] + str_bin_number[11:13] + str_bin_number[21:] + str_bin_number[13:17], 2)" "def main(x): a = x & 3 b = x >> 2 & 2047 c = x >> 13 & 511 d = x >> 22 & 63 e = x >> 28 & 1 f = x >> 29 & 1 g = x >> 30 & 1 h = x >> 31 & 1 return e | a << 1 | f << 3 | c << 4 | d << 13 | g << 19 | h << 20 | b << 21" "def main(x): a = x & 2047 b = x >> 11 & 65535 c = x >> 27 & 3 d = x >> 29 & 1 e = x >> 30 & 1 f = x >> 31 & 1 res = f | e << 1 | b << 2 | a << 18 | c << 29 | d << 31 return res" "def main(input): a = input & 65535 b = (input & 16711680) << 8 c = (input & 50331648) >> 8 d = (input & 2080374784) >> 8 e = (input & 2147483648) >> 8 return a | b | c | d | e" "def main(x): a = x & 2047 b = x >> 11 & 63 c = x >> 17 & 63 d = x >> 23 & 15 e = x >> 27 & 15 f = x >> 31 & 1 result = b | f << 6 | a << 7 | d << 18 | e << 22 | c << 26 return result" "def main(input): a = (input & 511) << 21 b = (input & 130560) >> 9 c = (input & 268304384) >> 7 d = (input & 268435456) << 2 e = (input & 1610612736) >> 21 f = input & 2147483648 return a | b | c | d | e | f" "def main(num): a = num & 511 b = num & 8388096 c = num & 58720256 d = num & 1006632960 e = num & 3221225472 return a << 9 | b << 9 | c >> 17 | d >> 24 | e >> 30" "def main(x): a = x & 63 b = x >> 6 & 127 c = x >> 13 & 65535 d = x >> 29 & 7 result = c | d << 16 | a << 19 | b << 25 return result" "def generate_mask(left, right): a = pow(2, left + 1) - pow(2, right) return a def main(x): a = x & generate_mask(8, 0) b = x & generate_mask(19, 9) c = x & generate_mask(25, 20) d = x & generate_mask(27, 26) e = x & generate_mask(28, 28) f = x & generate_mask(31, 29) a1 = a << 5 b1 = b << 11 c1 = c >> 6 d1 = d >> 26 e1 = e << 3 f1 = f >> 27 n = a1 | b1 | c1 | d1 | e1 | f1 return n" "def main(x): d = x & 2147483648 c = x & 2080374784 b = x & 67106816 a = x & 2047 d = d >> 11 c = c >> 26 b = b >> 6 a = a << 21 return a + b + c + d" "def main(x): result = 0 A = x & 511 B = x >> 9 & 511 C = x >> 18 & 3 D = x >> 20 & 7 E = x >> 23 & 31 F = x >> 28 & 15 result |= B << 23 result |= F << 19 result |= A << 10 result |= C << 8 result |= D << 5 result |= E << 0 return result" "def main(hex_number): x = str(bin(hex_number)[2:]).rjust(32, '0') return int(x[0:2] + x[4:7] + x[15:23] + x[13:15] + x[2:4] + x[7:13] + x[23:32], 2)" "def main(hex_number): x = str(bin(hex_number)[2:]).rjust(32, '0') return int(x[12:25] + x[0:12] + x[25:32], 2)" "def main(x): result = 0 A = x & 3 B = x >> 2 & 1023 C = x >> 12 & 65535 D = x >> 28 & 7 E = x >> 31 & 1 result |= A << 0 result |= C << 15 result |= B << 2 result |= E << 31 result |= D << 12 return result" "def main(input): a = (input & 127) << 22 b = (input & 128) << 2 c = (input & 256) << 22 d = (input & 130560) >> 8 e = (input & 536739840) >> 7 f = input & 536870912 g = (input & 1073741824) >> 30 h = input & 2147483648 return a | b | c | d | e | f | g | h" "def main(hex_number): x = str(bin(hex_number)[2:]).rjust(32, '0') return int(x[2:17] + x[0:2] + x[17:32], 2)" "def main(x): op1 = x xD = 4160749568 xC = 125829120 xB = 8388096 xA = 511 D = op1 & xD D = D >> 9 C = op1 & xC C = C >> 23 B = op1 & xB B = B >> 5 A = op1 & xA A = A << 23 return D + C + B + A" "def main(input): a = (input & 15) << 9 b = (input & 16) << 22 c = (input & 224) << 18 d = (input & 256) << 14 e = (input & 65024) << 6 f = (input & 196608) >> 3 g = (input & 8126464) << 9 h = (input & 4286578688) >> 23 return a | b | c | d | e | f | g | h" "def main(num): a = num & 32767 b = num & 229376 c = num & 1073479680 d = num & 3221225472 return a << 2 | b << 2 | c << 2 | d >> 30" "def main(x): a_mask = 1 a_pos = 19 - 1 b_mask = 510 b_pos = 31 - 8 c_mask = 16776704 c_pos = 17 - 23 d_mask = 117440512 d_pos = 2 - 26 e_mask = 402653184 e_pos = 23 - 28 f_mask = 3758096384 f_pos = 21 - 31 a = (x & a_mask) << a_pos b = (x & b_mask) << b_pos c = (x & c_mask) >> -c_pos d = (x & d_mask) >> -d_pos e = (x & e_mask) >> -e_pos f = (x & f_mask) >> -f_pos return a | b | c | d | e | f" "def main(hex_number): x = str(bin(hex_number)[2:]).rjust(32, '0') return int(x[19:32] + x[2:12] + x[12:19] + x[0:2], 2)" "def main(x): x_a = (3 & x) << 16 x_b = (15 & x >> 2) << 12 x_c = 63 & x >> 6 x_d = (127 & x >> 12) << 21 x_e = (7 & x >> 19) << 18 x_f = (1 & x >> 22) << 6 x_g = (31 & x >> 23) << 7 x_h = (15 & x >> 28) << 28 return x_a + x_b + x_c + x_d + x_e + x_f + x_g + x_h" "def main(x): a = b = c = d = x a &= 32767 b &= 536838144 c &= 1610612736 d &= 2147483648 b = b >> 15 c = c >> 14 a = a << 17 d = d >> 17 x = a | b | c | d return x" "def main(input): a = (input & 32767) << 17 b = (input & 134184960) >> 11 c = (input & 402653184) >> 27 d = (input & 536870912) >> 13 e = (input & 3221225472) >> 28 return a | b | c | d | e" "def main(input): a = (input & 1) << 16 b = (input & 8190) >> 1 c = (input & 516096) << 4 d = (input & 3670016) << 8 e = (input & 12582912) << 8 f = (input & 251658240) >> 1 g = (input & 1879048192) >> 16 h = (input & 2147483648) >> 16 return a | b | c | d | e | f | g | h" "def main(x): d = 4294705152 c = 260096 b = 1984 a = 63 return x & a | (x & b) << 14 | (x & c) << 14 | (x & d) >> 12" "def main(input): a = (input & 3) << 17 b = (input & 60) << 10 c = (input & 64) << 10 d = (input & 1048448) << 12 e = (input & 15728640) >> 20 f = (input & 4278190080) >> 20 return a | b | c | d | e | f" "def main(x): a = (6, 0, 6, 0) b = (16, 7, 31, 22) c = (24, 17, 15, 8) d = (29, 25, 20, 16) e = (30, 30, 21, 21) f = (31, 31, 7, 7) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] F = (int(x) >> f[1] & int((32 - (f[0] - f[1] + 1)) * '0' + (f[0] - f[1] + 1) * '1', 2)) << f[3] return A | B | C | D | E | F" "def main(input): a = (input & 16383) << 3 b = (input & 536854528) << 3 c = (input & 3758096384) >> 29 return a | b | c" "def main(x): a = format(x, '032b') a = a[5:7] + a[7:22] + a[0:5] + a[22:32] a = int(hex(int(a, 2)), 0) return a" "def main(x): a = (10, 0, 10, 0) b = (19, 11, 19, 11) c = (29, 20, 29, 20) d = (30, 30, 31, 31) e = (31, 31, 30, 30) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] return A | B | C | D | E" "def main(x): A = x & 15 B = x >> 4 & 4095 C = x >> 16 & 1 D = x >> 17 & 16383 E = x >> 31 & 1 result = 0 result |= C << 0 result |= A << 1 result |= D << 5 result |= E << 19 result |= B << 20 return result" "def main(x): a = (15, 0, 15, 0) b = (27, 16, 28, 17) c = (30, 28, 31, 29) d = (31, 31, 16, 16) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] return A | B | C | D" "def main(x): a = 3 b = 32764 c = 229376 d = 16515072 e = 16777216 f = 2113929216 g = 2147483648 return (x & g) >> 19 | (x & f) >> 25 | (x & e) >> 6 | (x & d) >> 12 | x & c | (x & b) << 17 | (x & a) << 13" "def main(x): A = x & 15 B = x >> 4 & 16383 C = x >> 18 & 31 D = x >> 23 & 255 E = x >> 31 & 1 result = 0 result |= C << 0 result |= D << 5 result |= B << 13 result |= E << 27 result |= A << 28 return result" "def main(input): a = (input & 1023) << 22 b = (input & 15360) >> 9 c = (input & 536854528) >> 9 d = (input & 1610612736) >> 9 e = (input & 2147483648) >> 31 return a | b | c | d | e" "def main(x): a = x & 31 b = x >> 5 & 127 c = x >> 12 & 511 d = x >> 21 & 1023 e = x >> 31 & 1 res = c | a << 9 | e << 14 | b << 15 | d << 22 return res" "def main(x): a = 16383 b = 134201344 c = 4160749568 a = x & a b = x & b c = x & c a = a << 18 b = b >> 9 c = c >> 27 result = a + b + c return result" "def main(input): a = (input & 65535) << 16 b = (input & 196608) >> 9 c = (input & 33292288) >> 18 d = (input & 234881024) >> 16 e = (input & 4026531840) >> 16 return a | b | c | d | e" "def main(x): a = x & 255 b = x >> 8 & 2047 c = x >> 19 & 8191 result = b | a << 11 | c << 19 return result" "def main(x): c = 3221225472 b = 1073676288 a = 65535 return x & c | (x & a) << 14 | (x & b) >> 16" "def main(input): a = (input & 127) << 25 b = (input & 1920) >> 7 c = (input & 2048) >> 7 d = (input & 33550336) >> 7 e = (input & 4261412864) >> 7 return a | b | c | d | e" "def main(x): c = x & 4292870144 b = x & 2096896 a = x & 255 c = c >> 8 b = b >> 8 a = a << 24 return a + b + c" "def main(x): a_mask = 31 b_mask = 1 << 5 c_mask = 511 << 6 d_mask = 4095 << 15 e_mask = 1 << 27 f_mask = 1 << 28 g_mask = 1 << 29 h_mask = 3 << 30 a = x & a_mask b = (x & b_mask) >> 5 c = (x & c_mask) >> 6 d = (x & d_mask) >> 15 e = (x & e_mask) >> 27 f = (x & f_mask) >> 28 g = (x & g_mask) >> 29 h = (x & h_mask) >> 30 return e | g << 1 | f << 2 | d << 3 | b << 15 | h << 16 | a << 18 | c << 23" "def main(num): a = num & 2 ** 5 - 2 ** 0 b = num & 2 ** 12 - 2 ** 5 c = num & 2 ** 18 - 2 ** 12 d = num & 2 ** 23 - 2 ** 18 e = num & 2 ** 25 - 2 ** 23 f = num & 2 ** 30 - 2 ** 25 g = num & 2 ** 32 - 2 ** 30 return a << 14 | b >> 5 | c << 9 | d << 9 | e >> 16 | f >> 16 | g >> 11" "def main(num): a = num & 65535 b = num & 67043328 c = num & 469762048 d = num & 1610612736 e = num & 2147483648 return a << 5 | b << 5 | c >> 24 | d >> 29 | e" "def main(num): a = num & 15 b = num & 16 c = num & 992 d = num & 64512 e = num & 134152192 f = num & 2013265920 g = num & 2147483648 return a << 17 | b << 12 | c >> 4 | d | e << 5 | f >> 21 | g >> 31" "def main(input): a = (input & 31) << 6 b = (input & 992) << 19 c = (input & 64512) >> 10 d = (input & 458752) << 13 e = (input & 524288) << 4 f = (input & 4293918720) >> 9 return a | b | c | d | e | f" "def main(x): a = (5, 0, 5, 0) b = (18, 6, 31, 19) c = (29, 19, 16, 6) d = (30, 30, 17, 17) e = (31, 31, 18, 18) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] return A | B | C | D | E" "import math def main(input): a = (input & 8191) << 19 b = (input & 536862720) >> 13 c = (input & 536870912) >> 11 d = (input & 3221225472) >> 14 return a | b | c | d" "def main(input): a = (input & 65535) << 16 b = (input & 4128768) >> 10 c = (input & 264241152) >> 22 d = (input & 4026531840) >> 16 return a | b | c | d" "def main(input): a = (input & 127) << 17 b = (input & 16256) << 17 c = (input & 49152) >> 8 d = (input & 33488896) >> 8 e = (input & 2113929216) >> 25 f = input & 2147483648 return a | b | c | d | e | f" "def main(x): a = x & 4095 b = x >> 12 & 255 c = x >> 20 & 7 d = x >> 23 & 15 e = x >> 27 & 3 f = x >> 29 & 1 g = x >> 30 & 1 h = x >> 31 & 1 result = h << 0 | c << 1 | d << 4 | b << 8 | a << 16 | g << 28 | e << 29 | f << 31 return result" "def f(x): e = 2147483648 d = 2013265920 c = 67108864 b = 67106816 a = 2047 return (x & a) << 1 - 0 | (x & b) << 13 - 11 | (x & c) >> 26 - 0 | (x & d) << 28 - 27 | (x & e) >> 31 - 12 def main(*args): return f(*args)" "def main(input): a = (input & 2047) << 16 b = (input & 4192256) >> 6 c = (input & 62914560) >> 21 d = (input & 2080374784) << 1 e = (input & 2147483648) >> 31 return a | b | c | d | e" "def main(x): d = x & 3221225472 c = x & 1006632960 a = x & 16383 b = x & 67092480 b = b >> 10 c = c >> 26 a = a << 16 return b + a + c + d" "def main(x): a = (8, 0, 13, 5) b = (22, 9, 28, 15) c = (23, 23, 30, 30) d = (26, 24, 2, 0) e = (27, 27, 31, 31) f = (28, 28, 29, 29) g = (29, 29, 14, 14) h = (31, 30, 4, 3) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] F = (int(x) >> f[1] & int((32 - (f[0] - f[1] + 1)) * '0' + (f[0] - f[1] + 1) * '1', 2)) << f[3] G = (int(x) >> g[1] & int((32 - (g[0] - g[1] + 1)) * '0' + (g[0] - g[1] + 1) * '1', 2)) << g[3] H = (int(x) >> h[1] & int((32 - (h[0] - h[1] + 1)) * '0' + (h[0] - h[1] + 1) * '1', 2)) << h[3] return A | B | C | D | E | F | G | H" "def main(field): A = (field & 255) << 24 B = (field & 768) >> 8 C = (field & 64512) >> 8 D = (field & 268369920) >> 6 E = (field & 805306368) >> 20 F = (field & 3221225472) >> 8 return A | B | C | D | E | F" "def main(input): a = (input & 7) << 2 b = (input & 262136) << 14 c = (input & 1073479680) >> 13 d = (input & 3221225472) >> 30 return a | b | c | d" "def main(x): A = x & 1023 B = x >> 10 & 32767 C = x >> 25 & 7 D = x >> 28 & 15 result = 0 result |= D result |= C << 4 result |= A << 7 result |= B << 17 return result" "def main(input): a = (input & 31) << 1 b = (input & 2097120) << 1 c = (input & 2145386496) << 1 d = (input & 2147483648) >> 31 return a | b | c | d" "def main(num): a = num & 2047 b = num & 8386560 c = num & 125829120 d = num & 4160749568 return a << 9 | b << 9 | c >> 23 | d >> 23" "def move(x, cur, new, length): m = 2 ** (cur + length) - 2 ** cur s = x & m if cur < new: return s << new - cur else: return s >> cur - new def main(x): result = 0 result |= move(x, 0, 0, 16) result |= move(x, 16, 23, 9) result |= move(x, 25, 18, 5) result |= move(x, 30, 16, 2) return result" "def main(x): f = x & 2147483648 e = x & 1610612736 d = x & 534773760 c = x & 2093056 b = x & 4092 a = x & 3 f = f >> 18 e = e >> 18 d = d << 3 c = c >> 10 b = b << 12 result = a + b + c + d + e + f return result" "def main(x): zone_a = x & 7 zone_b = x & 8 zone_c = x & 48 zone_d = x & 262080 zone_e = x & 4294705152 zone_a = zone_a << 12 zone_b = zone_b << 14 zone_c = zone_c << 11 zone_d = zone_d >> 6 res = zone_e res = res | zone_a res = res | zone_d res = res | zone_b res = res | zone_c return res" "def main(input): a = input & 1023 b = (input & 8387584) << 2 c = (input & 8388608) << 3 d = (input & 16777216) >> 14 e = (input & 1040187392) << 2 f = (input & 1073741824) >> 19 g = (input & 2147483648) >> 6 return a | b | c | d | e | f | g" "def main(x): A = x & 3 B = x >> 2 & 63 C = x >> 8 & 16383 D = x >> 22 & 255 E = x >> 30 & 3 result = 0 result |= A result |= E << 2 result |= D << 4 result |= B << 12 result |= C << 18 return result" "def main(ch): return int(hex((ch & 8191) << 10 | (ch >> 13 & 15) << 28 | ch >> 17 & 1023 | (ch >> 27 & 31) << 23), 16)" "def main(x): D = x >> 26 C = x - (D << 26) >> 10 B = x - (D << 26) - (C << 10) >> 7 A = x - (D << 26) - (C << 10) - (B << 7) return (C << 16) + (A << 9) + (D << 3) + B" "def main(input): a = (input & 63) << 13 b = (input & 524224) << 13 c = (input & 7864320) >> 10 d = (input & 528482304) >> 20 e = (input & 3758096384) >> 29 return a | b | c | d | e" "def main(input): a = (input & 511) << 16 b = (input & 65024) << 16 c = (input & 67043328) >> 11 d = (input & 67108864) >> 23 e = (input & 939524096) >> 27 f = (input & 1073741824) >> 26 g = (input & 2147483648) >> 16 return a | b | c | d | e | f | g" "def main(input): a = (input & 255) << 19 b = (input & 7936) << 19 c = (input & 8192) >> 13 d = (input & 134201344) >> 13 e = (input & 4160749568) >> 13 return a | b | c | d | e" "def main(num): a = num & 3 b = num & 508 c = num & 16776704 d = num & 520093696 e = num & 1610612736 f = num & 2147483648 return a << 7 | b >> 2 | c << 8 | d >> 14 | e >> 14 | f >> 22" "def main(num): a = num & 63 b = num & 448 c = num & 33553920 d = num & 1040187392 e = num & 1073741824 f = num & 2147483648 return a << 1 | b << 23 | c >> 1 | d >> 1 | e >> 23 | f >> 31" "def main(input): a = (input & 15) << 28 b = (input & 8176) << 12 c = (input & 8192) << 14 d = (input & 16384) << 1 e = (input & 1073709056) >> 15 f = (input & 3221225472) >> 5 return a | b | c | d | e | f" "def f7(bytes): a = format(bytes, '032b') a = a[1] + a[19:30] + a[3:17] + a[17:19] + a[2] + a[30:32] + a[0] a = int(hex(int(a, 2)), 0) return a def main(n): return f7(n)" "def main(input): a = (input & 255) << 13 b = (input & 2096896) >> 8 c = input & 534773760 d = input & 1610612736 e = input & 2147483648 return a | b | c | d | e" "def main(input): a = (input & 3) << 14 b = (input & 65532) >> 2 c = (input & 67043328) << 1 d = (input & 1006632960) << 2 e = (input & 1073741824) >> 14 f = (input & 2147483648) >> 4 return a | b | c | d | e | f" "def main(input): a = (input & 1023) << 18 b = (input & 261120) >> 9 c = (input & 3932160) << 10 d = (input & 130023424) >> 9 e = (input & 2013265920) >> 18 f = (input & 2147483648) >> 31 return a | b | c | d | e | f" "def main(x): num = 0 num |= (x & 2047) << 21 num |= (x & 3758096384) >> 11 num |= (x & 268435456) >> 27 num |= (x & 134217728) >> 27 num |= (x & 134184960) >> 13 num |= (x & 30720) << 3 return num" "def main(s): hex_ = hex(s) bin_s = f'{int(hex_, 16):0>32b}' g = bin_s[0] f = bin_s[1:3] e = bin_s[3:13] d = bin_s[13:17] c = bin_s[17] b = bin_s[18:23] a = bin_s[23:] res = hex(int(f + a + d + b + e + c + g, 2)) return int(res, 16)" "def main(input): a = (input & 65535) << 1 b = (input & 983040) << 8 c = (input & 32505856) >> 3 d = (input & 503316480) << 3 e = (input & 536870912) >> 7 f = (input & 1073741824) >> 7 g = (input & 2147483648) >> 31 return a | b | c | d | e | f | g" "def main(inp): a = (inp & 127) << 15 b = (inp & 128) << 24 c = (inp & 130816) << 14 d = (inp & 134086656) >> 17 e = (inp & 4160749568) >> 17 return a | b | c | d | e" "def main(a): b = (a >> 1 & 15) << 12 c = (a >> 5 & 65535) << 16 d = (a >> 21 & 2047) << 1 e = a & 1 f = b | c | d | e return f" "def main(x): a = (0, 0, 31, 31) b = (4, 1, 4, 1) c = (19, 5, 30, 16) d = (30, 20, 15, 5) e = (31, 31, 0, 0) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] return A | B | C | D | E" "import math def main(input): a = (input & 511) << 17 b = (input & 3584) << 20 c = (input & 28672) >> 3 d = (input & 1015808) >> 3 e = (input & 15728640) >> 20 f = (input & 117440512) << 2 g = (input & 4160749568) >> 23 return a | b | c | d | e | f | g" "def main(x): h = ((1 << 32) - (1 << 31) & x) >> 31 g = ((1 << 31) - (1 << 25) & x) >> 25 f = ((1 << 25) - (1 << 23) & x) >> 23 e = ((1 << 23) - (1 << 18) & x) >> 18 d = ((1 << 18) - (1 << 15) & x) >> 15 c = ((1 << 15) - (1 << 11) & x) >> 11 b = ((1 << 11) - (1 << 6) & x) >> 6 a = ((1 << 6) - (1 << 0) & x) >> 0 result = h << 21 | g << 8 | f << 6 | e << 22 | d << 18 | c << 14 | b << 27 | a << 0 return result" "def main(num): a = num & 31 b = num & 524256 c = num & 2146959360 d = num & 2147483648 return a << 13 | b << 13 | c >> 18 | d >> 31" "def main(x): A = (x & 1023) << 16 B = (x & 16776192) >> 8 C = (x & 251658240) << 2 D = (x & 805306368) << 2 E = (x & 1073741824) >> 29 F = (x & 2147483648) >> 31 return A | B | C | D | E | F" "def main(input): a = (input & 255) << 20 b = (input & 2096896) >> 8 c = (input & 132120576) >> 8 d = (input & 134217728) >> 8 e = (input & 4026531840) >> 0 return a | b | c | d | e" "def main(bit_field): result = 0 result |= bit_field & 3 result |= (bit_field >> 22 & 15) << 2 result |= (bit_field >> 8 & 16383) << 6 result |= (bit_field >> 30 & 3) << 20 result |= (bit_field >> 2 & 63) << 22 result |= (bit_field >> 28 & 3) << 28 result |= (bit_field >> 27 & 1) << 30 result |= (bit_field >> 26 & 1) << 31 return result" "def main(input): f = (input & 2147483648) >> 30 e = (input & 1073741824) >> 14 d = (input & 1073479680) >> 14 c = (input & 131072) >> 17 b = (input & 98304) >> 13 a = (input & 32767) << 17 return f | e | d | c | b | a" "def main(num): a = num & 16383 b = num & 8372224 c = num & 2139095040 d = num & 2147483648 return a << 18 | b >> 13 | c >> 13 | d >> 31" "def main(input): a = (input & 127) << 24 b = (input & 32640) >> 6 c = (input & 98304) << 7 d = (input & 268304384) >> 6 e = (input & 805306368) >> 19 f = (input & 1073741824) >> 30 g = (input & 2147483648) >> 0 return a | b | c | d | e | f | g" "def main(x): E = x & 1 << 31 D = x & 1 << 30 C = x & 31 << 25 B = x & 2047 << 14 A = x & 16383 return E >> 1 | D << 1 | C | B >> 14 | A << 11" "def main(input): a = (input & 4095) << 20 b = (input & 8384512) >> 3 c = (input & 528482304) >> 22 d = (input & 536870912) >> 22 e = (input & 1073741824) >> 22 f = (input & 2147483648) >> 31 return a | b | c | d | e | f" "def main(input): a = (input & 63) << 26 b = (input & 448) << 17 c = (input & 33553920) >> 3 d = (input & 2113929216) >> 25 e = (input & 2147483648) >> 9 return a | b | c | d | e" "def main(input): a = (input & 65535) << 14 b = (input & 2031616) >> 7 c = (input & 6291456) << 9 d = (input & 4286578688) >> 23 return a | b | c | d" "def main(x): A = x & 65535 B = x >> 16 & 255 C = x >> 24 & 127 D = x >> 31 & 1 result = 0 result |= C result |= B << 7 result |= D << 15 result |= A << 16 return result" "def main(input): a = (input & 3) << 19 b = (input & 252) << 21 c = (input & 8388352) >> 4 d = (input & 58720256) << 6 e = (input & 469762048) >> 25 f = (input & 1610612736) >> 8 g = (input & 2147483648) >> 31 return a | b | c | d | e | f | g" "def main(x): a = x & 31 b = x >> 5 & 31 c = x >> 10 & 8191 d = x >> 23 & 255 e = x >> 31 & 1 result = a | c << 5 | e << 18 | b << 19 | d << 24 return result" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(3, 0) b_mask = u_mask(17, 3) c_mask = u_mask(19, 17) d_mask = u_mask(23, 19) e_mask = u_mask(28, 23) f_mask = u_mask(30, 28) g_mask = u_mask(32, 30) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask e = x & e_mask f = x & f_mask g = x & g_mask a = a << 29 b = b >> 3 c = c >> 1 d = d << 4 e = e >> 5 f = f >> 14 g = g >> 3 return a | b | c | d | e | f | g" "def main(input): a = (input & 15) << 3 b = (input & 16368) << 3 c = (input & 268419072) << 3 d = (input & 805306368) >> 27 e = (input & 1073741824) >> 30 f = (input & 2147483648) << 0 return a | b | c | d | e | f" "def main(x): g = 2147483648 f = 1073741824 e = 536870912 d = 534773760 c = 2097088 b = 60 a = 3 return (x & g) >> 31 - 9 | (x & f) >> 30 - 27 | (x & e) >> 29 - 0 | (x & d) >> 21 - 1 | (x & c) << 26 - 20 | (x & b) << 31 - 5 | (x & a) << 11 - 1" "def main(x): e = 2147483648 d = 1610612736 c = 536838144 b = 32736 a = 31 return (x & a) << 16 | (x & b) << 16 | (x & c) >> 15 | (x & d) >> 15 | x & e" "def main(x): a = (9, 0, 9, 0) b = (13, 10, 31, 28) c = (22, 14, 18, 10) d = (30, 23, 26, 19) e = (31, 31, 27, 27) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] return A | B | C | D | E" "def main(num): a = num & 255 b = num & 256 c = num & 32256 d = num & 16744448 e = num & 117440512 f = num & 134217728 g = num & 1879048192 h = num & 2147483648 return a << 16 | b << 20 | c << 1 | d >> 14 | e | f >> 27 | g << 1 | h >> 4" "def main(input): a = (input & 7) << 0 b = (input & 56) << 9 c = (input & 65472) << 9 d = (input & 983040) >> 13 e = (input & 66060288) << 6 f = (input & 469762048) >> 17 g = (input & 536870912) >> 4 h = (input & 3221225472) >> 23 return a | b | c | d | e | f | g | h" "def main(x): a = (9, 0, 25, 16) b = (10, 10, 26, 26) c = (18, 11, 10, 3) d = (23, 19, 31, 27) e = (26, 24, 2, 0) f = (31, 27, 15, 11) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] F = (int(x) >> f[1] & int((32 - (f[0] - f[1] + 1)) * '0' + (f[0] - f[1] + 1) * '1', 2)) << f[3] return A | B | C | D | E | F" "def main(input): a = input & 2047 b = (input & 63488) << 5 c = (input & 983040) >> 4 d = (input & 2146435072) << 1 e = (input & 2147483648) >> 20 return a | b | c | d | e" "def main(digit): digit = bin(digit)[2:] digit = digit.zfill(32) D = digit[:7] C = digit[7:11] B = digit[11:23] A = digit[23:] result = '0b' + B + D + C + A result = int(result, 2) return result" "def main(input): a = (input & 32767) << 5 b = (input & 32768) << 5 c = (input & 2031616) >> 16 d = (input & 1071644672) << 2 e = (input & 3221225472) >> 9 return a | b | c | d | e" "def main(hex_number): str_bin_number = str(bin(hex_number)[2:]).rjust(32, '0') f = str_bin_number[0] e = str_bin_number[1] d = str_bin_number[2] c = str_bin_number[3:10] b = str_bin_number[10:24] a = str_bin_number[24:] return int(b + d + e + f + c + a, 2)" "def main(input): a = (input & 32767) << 17 b = (input & 1015808) >> 15 c = (input & 4293918720) >> 15 return a | b | c" "def main(x): a = (13, 0, 13, 0) b = (21, 14, 29, 22) c = (23, 22, 31, 30) d = (31, 24, 21, 14) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] return A | B | C | D" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(9, 0) b_mask = u_mask(16, 9) c_mask = u_mask(20, 16) d_mask = u_mask(27, 20) e_mask = u_mask(30, 27) f_mask = u_mask(32, 30) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask e = x & e_mask f = x & f_mask a = a << 2 b = b << 2 c = c << 2 d = d << 2 e = e << 2 f = f >> 30 return a | b | c | d | e | f" "def main(x): a = x & 2 ** 16 - 1 b = (x & 2 ** 25 - 1) >> 16 c = x >> 25 return c + (b << 7) + (a << 16)" "def main(x): a = (1, 0, 14, 13) b = (10, 2, 31, 23) c = (15, 11, 21, 17) d = (28, 16, 12, 0) e = (29, 29, 22, 22) f = (31, 30, 16, 15) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] F = (int(x) >> f[1] & int((32 - (f[0] - f[1] + 1)) * '0' + (f[0] - f[1] + 1) * '1', 2)) << f[3] return A | B | C | D | E | F" "def main(input): a = (input & 8191) << 19 b = (input & 4186112) >> 6 c = (input & 532676608) >> 22 d = (input & 3758096384) >> 13 return a | b | c | d" "def main(input): a = (input & 255) << 24 b = (input & 1792) << 13 c = (input & 14336) << 1 d = (input & 245760) << 3 e = (input & 8126464) >> 18 f = (input & 25165824) >> 18 g = (input & 100663296) >> 10 h = (input & 4160749568) >> 20 return a | b | c | d | e | f | g | h" "def main(x): A = x & 32767 B = x >> 15 & 127 C = x >> 22 & 3 D = x >> 24 & 3 E = x >> 26 & 31 F = x >> 31 & 1 res = 0 res |= B res |= F << 7 res |= E << 8 res |= A << 13 res |= D << 28 res |= C << 30 return res" "def main(x): a = (6, 0, 31, 25) b = (16, 7, 24, 15) c = (20, 17, 14, 11) d = (31, 21, 10, 0) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] return A | B | C | D" "def main(x): A = (x & 7) << 21 B = (x & 32760) << 6 C = (x & 16744448) >> 15 D = x & 117440512 E = x & 4160749568 return A | B | C | D | E" "def main(input): a = (input & 4095) << 14 b = (input & 12288) >> 12 c = (input & 114688) << 15 d = (input & 917504) >> 7 e = (input & 7340032) << 6 f = (input & 260046848) >> 18 g = (input & 268435456) >> 15 h = (input & 3758096384) >> 27 return a | b | c | d | e | f | g | h" "def main(x): a = (15, 0, 16, 1) b = (30, 16, 31, 17) c = (31, 31, 0, 0) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] return A | B | C" "def main(x): a = b = c = d = e = f = x a &= 1023 b &= 1024 c &= 134215680 d &= 939524096 e &= 1073741824 f &= 2147483648 a = a << 5 b = b >> 10 c = c << 4 d = d >> 26 e = e << 1 f = f >> 27 result = a | b | c | d | e | f return result" "def main(x): f = (2147483648 & x) >> 27 e = (2080374784 & x) >> 21 d = (62914560 & x) >> 22 c = (4177920 & x) << 10 b = (16256 & x) << 3 a = (127 & x) << 17 return c | b | a | d | e | f" "def main(input): a = (input & 7) << 16 b = (input & 56) >> 3 c = (input & 1984) >> 3 d = (input & 522240) << 8 e = (input & 133693440) >> 11 f = (input & 2013265920) << 1 g = (input & 2147483648) >> 4 return a | b | c | d | e | f | g" "def main(input): a = (input & 255) << 4 b = (input & 768) << 4 c = (input & 523264) << 5 d = (input & 133693440) << 5 e = (input & 402653184) >> 27 f = (input & 1610612736) >> 27 g = (input & 2147483648) >> 17 return a | b | c | d | e | f | g" "import math def generate_mask(left, right): a = pow(2, left + 1) - pow(2, right) return a def main(x): a = x & generate_mask(12, 0) b = x & generate_mask(17, 13) c = x & generate_mask(30, 18) d = x & generate_mask(31, 31) a1 = a << 19 d1 = d >> 13 c1 = c >> 18 n = a1 | b | c1 | d1 return n" "def main(input): a = (input & 511) << 6 b = (input & 2096640) << 7 c = (input & 132120576) >> 21 d = (input & 939524096) << 2 e = (input & 1073741824) >> 2 f = (input & 2147483648) >> 16 return a | b | c | d | e | f" "def main(hex_num): hex_num = int(hex(hex_num), 16) res = int(hex(0), 16) temp = int(hex(2147483648), 16) D = int(hex(int(hex(hex_num & temp), 16) >> 31), 16) temp = int(hex(2080374784), 16) C = int(hex(int(hex(hex_num & temp), 16) << 1), 16) temp = int(hex(67107840), 16) B = int(hex(int(hex(hex_num & temp), 16) >> 9), 16) temp = int(hex(1023), 16) A = int(hex(int(hex(hex_num & temp), 16) << 17), 16) return int(hex(res ^ D ^ C ^ B ^ A), 16)" "def main(x): a = x & 63 b = x >> 6 & 255 c = x >> 14 & 8191 d = x >> 27 & 7 e = x >> 30 & 1 f = x >> 31 & 1 res = a | f << 6 | c << 7 | d << 20 | b << 23 | e << 31 return res" "def main(x): a = x & 4095 b = x >> 12 & 15 c = x >> 16 & 1 d = x >> 17 & 255 e = x >> 25 & 3 f = x >> 27 & 1 g = x >> 28 & 15 res = c | a << 1 | d << 13 | f << 21 | (e << 22 | g << 24 | b << 28) return res" "def main(x): a = (12, 0, 31, 19) b = (15, 13, 17, 15) c = (30, 16, 14, 0) d = (31, 31, 18, 18) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] return A | B | C | D" "def main(input): a = (input & 127) << 5 b = (input & 262016) << 14 c = (input & 1835008) >> 16 d = (input & 266338304) >> 7 e = (input & 268435456) >> 16 f = (input & 536870912) >> 16 g = (input & 3221225472) >> 30 return a | b | c | d | e | f | g" "def main(x): c = (x & 4286578688) >> 23 b = (x & 8387584) >> 1 a = (x & 1023) << 22 return a | b | c" "def main(input): a = (input & 2047) << 4 b = (input & 4192256) << 10 c = (input & 130023424) >> 6 d = (input & 134217728) >> 24 e = (input & 1879048192) >> 28 f = (input & 2147483648) >> 16 return a | b | c | d | e | f" "def main(input): a = (input & 2047) << 16 b = (input & 63488) << 16 c = (input & 983040) >> 16 d = (input & 2146435072) >> 16 e = (input & 2147483648) >> 16 return a | b | c | d | e" "def main(input): a = (input & 16383) << 15 b = (input & 67092480) >> 14 c = (input & 201326592) << 3 d = (input & 1879048192) >> 16 e = input & 2147483648 return a | b | c | d | e" "def main(input): a = (input & 1023) << 22 b = (input & 67107840) >> 10 c = (input & 1006632960) >> 10 d = (input & 3221225472) >> 10 return a | b | c | d" "def main(x): a = x & 15 b = x >> 4 & 2047 c = x >> 15 & 31 d = x >> 20 & 4095 res = b | d << 11 | a << 23 | c << 27 return res" "def main(x): a = x & 16383 b = x >> 14 & 4095 c = x >> 26 & 7 d = x >> 29 & 3 e = x >> 31 & 1 result = c | d << 3 | b << 5 | e << 17 | a << 18 return result" "def main(x): x_a = (511 & x) << 23 x_b = (65535 & x >> 9) << 7 x_c = 1 & x >> 25 x_d = (31 & x >> 26) << 1 x_e = (1 & x >> 31) << 6 return x_a + x_b + x_c + x_d + x_e" "def main(input): a = (input & 65535) << 14 b = (input & 536805376) >> 16 c = (input & 536870912) << 2 d = (input & 1073741824) >> 17 e = (input & 2147483648) >> 1 return a | b | c | d | e main(2173457466)" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(11, 0) b_mask = u_mask(22, 11) c_mask = u_mask(25, 22) d_mask = u_mask(27, 25) e_mask = u_mask(30, 27) f_mask = u_mask(32, 30) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask e = x & e_mask f = x & f_mask a = a << 19 b = b >> 9 c = c >> 6 d = d >> 25 e = e >> 14 return a | b | c | d | e | f" "def main(x): e = x >> 31 tmp = x - (e << 31) d = tmp >> 15 tmp = tmp - (d << 15) c = tmp >> 10 tmp = tmp - (c << 10) b = tmp >> 7 a = tmp - (b << 7) x = (d << 16) + (c << 11) + (a << 4) + (b << 1) + e return x" "def main(x): a = x & 32767 b = x >> 15 & 511 c = x >> 24 & 15 d = x >> 28 & 15 return c | a << 4 | b << 19 | d << 28" "def main(x): e = x >> 28 tmp = x - (e << 28) d = tmp >> 27 tmp = tmp - (d << 27) c = tmp >> 16 tmp = tmp - (c << 16) b = tmp >> 10 a = tmp - (b << 10) x = (a << 22) + (e << 18) + (b << 12) + (d << 11) + c return x" "def main(x): g = x >> 30 tmp = x - (g << 30) f = tmp >> 28 tmp = tmp - (f << 28) e = tmp >> 25 tmp = tmp - (e << 25) d = tmp >> 23 tmp = tmp - (d << 23) c = tmp >> 13 tmp = tmp - (c << 13) b = tmp >> 1 a = tmp - (b << 1) x = (b << 20) + (g << 18) + (f << 16) + (d << 14) + (e << 11) + (c << 1) x += a return x" "def main(x): g = x & 2147483648 f = x & 1610612736 e = x & 268435456 d = x & 234881024 c = x & 33550336 b = x & 3840 a = x & 255 g = g >> 31 f = f >> 15 e = e >> 5 d = d >> 5 c = c >> 11 b = b << 8 a = a << 24 return a + b + c + d + e + f + g" "def main(x): a = x & 2047 b = x >> 11 & 32767 c = x >> 26 & 7 d = x >> 29 & 1 e = x >> 30 & 3 result = 0 result |= d result |= e << 1 result |= c << 3 result |= a << 6 result |= b << 17 return result" "def main(input): a = (input & 15) << 24 b = (input & 4080) << 8 c = (input & 16773120) >> 12 d = (input & 251658240) << 4 e = (input & 268435456) >> 5 f = (input & 3758096384) >> 9 return a | b | c | d | e | f" "def main(input): a = (input & 31) << 3 b = (input & 992) << 17 c = (input & 7168) << 17 d = (input & 8192) >> 11 e = (input & 16384) << 17 f = (input & 536838144) >> 7 g = (input & 1610612736) >> 29 h = (input & 2147483648) >> 1 return a | b | c | d | e | f | g | h" "def main(input): a = input & 3 b = input & 4 c = (input & 24) << 26 d = (input & 4064) << 17 e = (input & 4096) << 19 f = (input & 8192) << 8 g = (input & 67092480) >> 11 h = (input & 4227858432) >> 11 return a | b | c | d | e | f | g | h" "def main(input): a = (input & 7) << 7 b = (input & 504) << 23 c = (input & 7680) >> 9 d = (input & 536862720) >> 3 e = (input & 1610612736) >> 25 f = (input & 2147483648) >> 25 return a | b | c | d | e | f" "def main(input): a = (input & 4095) << 0 b = (input & 520192) << 6 c = (input & 33030144) << 6 d = (input & 33554432) << 6 e = (input & 4227858432) >> 14 return a | b | c | d | e" "def main(x): f = (x & 2147483648) >> 31 e = (x & 1073741824) >> 15 d = (x & 536870912) >> 28 c = (x & 536608768) << 3 b = (x & 253952) << 3 a = (x & 8191) << 2 return a | b | c | d | e | f" "def main(x): g = (x & 4026531840) >> 9 f = (x & 264241152) << 4 e = (x & 3145728) << 4 d = (x & 524288) << 4 c = (x & 520192) >> 12 b = (x & 4088) << 7 a = (x & 7) << 7 return a | b | c | d | e | f | g" "def main(n): a = (n & 63) << 25 b = (n & 64) << 18 c = (n & 65408) << 8 d = (n & 2147418112) >> 16 e = (n & 2147483648) >> 0 return a | b | c | d | e" "def main(input): a = (input & 1) << 1 b = (input & 32766) << 1 c = (input & 98304) << 1 d = (input & 2147352576) << 1 e = (input & 2147483648) >> 31 return a | b | c | d | e" "def main(x): g = x & 4278190080 f = x & 8388608 e = x & 7340032 d = x & 1040384 c = x & 8188 b = x & 2 a = x & 1 return a << 28 | b >> 1 | c << 7 | d >> 12 | e << 9 | f >> 15 | g >> 4" "def main(input): a = (input & 16383) << 18 b = (input & 67092480) >> 8 c = (input & 67108864) >> 22 d = (input & 939524096) >> 27 e = (input & 1073741824) >> 27 f = (input & 2147483648) >> 26 return a | b | c | d | e | f" "def main(s): return (s & 3) << 1 | (s >> 2 & 1) << 4 | (s >> 3 & 1) << 3 | (s >> 4 & 8191) << 12 | (s >> 17 & 127) << 25 | s >> 24 & 1 | (s >> 25 & 127) << 5" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(2, 0) b_mask = u_mask(5, 2) c_mask = u_mask(12, 5) d_mask = u_mask(14, 12) e_mask = u_mask(24, 14) f_mask = u_mask(25, 24) g_mask = u_mask(26, 25) h_mask = u_mask(32, 26) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask e = x & e_mask f = x & f_mask g = x & g_mask h = x & h_mask a = a << 10 b = b << 23 c = c << 7 d = d << 18 e = e >> 14 f = f << 4 g = g << 4 h = h >> 7 return a | b | c | d | e | f | g | h" "def main(input): a = (input & 16383) << 0 b = (input & 8372224) << 0 c = (input & 58720256) << 1 d = (input & 2080374784) << 1 e = (input & 2147483648) >> 8 return a | b | c | d | e" "def main(x): a = (x & 65535) << 16 b = (x & 268369920) >> 12 dc = (x & 4026531840) >> 28 return a | b | dc" "def main(x): A = x & 31 B = x >> 5 & 127 C = x >> 12 & 63 D = x >> 18 & 4095 E = x >> 30 & 1 F = x >> 31 & 1 result = 0 result |= E result |= F << 1 result |= B << 2 result |= C << 9 result |= A << 15 result |= D << 20 return result" "def main(n): a = (n & 31) << 27 b = (n & 16352) << 13 c = (n & 134201344) >> 14 d = (n & 402653184) >> 14 e = (n & 1610612736) >> 14 f = (n & 2147483648) >> 14 return a | b | c | d | e | f" "def main(x): a = (5, 0, 31, 26) b = (8, 6, 2, 0) c = (22, 9, 21, 8) d = (25, 23, 5, 3) e = (29, 26, 25, 22) f = (31, 30, 7, 6) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] F = (int(x) >> f[1] & int((32 - (f[0] - f[1] + 1)) * '0' + (f[0] - f[1] + 1) * '1', 2)) << f[3] return A | B | C | D | E | F" "def main(x): a = x & 65535 b = x >> 16 & 7 c = x >> 19 & 1 d = x >> 20 & 31 e = x >> 25 & 127 result = d | b << 5 | c << 8 | a << 9 | e << 25 return result" "def main(x): a = x & 1023 b = x >> 10 & 32767 c = x >> 25 & 3 d = x >> 27 & 15 e = x >> 31 & 1 return c | b << 2 | a << 17 | d << 27 | e << 31" "def main(x): a = (15, 0, 16, 1) b = (24, 16, 25, 17) c = (30, 25, 31, 26) d = (31, 31, 0, 0) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] return A | B | C | D" "def main(x): a = x & 31 b = x >> 5 & 32767 c = x >> 20 & 63 d = x >> 26 & 31 e = x >> 31 & 1 res = d | a << 5 | b << 10 | c << 25 | e << 31 return res" "def main(x): e = x & 2147483648 d = x & 1073741824 c = x & 1072693248 b = x & 1044480 a = x & 4095 e = e >> 21 d = d >> 7 c = c >> 20 b = b << 12 a = a << 11 return a + b + c + d + e" "def main(input): a = (input & 32767) << 17 b = (input & 2064384) >> 11 c = (input & 14680064) >> 11 d = (input & 117440512) >> 23 e = (input & 402653184) >> 12 f = (input & 536870912) >> 29 g = (input & 1073741824) >> 17 h = (input & 2147483648) >> 17 return a | b | c | d | e | f | g | h" "def main(input): a = (input & 1023) << 5 b = (input & 67107840) << 6 c = (input & 67108864) >> 23 d = (input & 939524096) >> 27 e = (input & 1073741824) >> 26 f = (input & 2147483648) >> 16 return a | b | c | d | e | f" "def main(input): a = input & 127 b = (input & 1048448) << 1 c = (input & 7340032) << 9 d = (input & 2139095040) >> 2 e = (input & 2147483648) >> 24 return a | b | c | d | e" "def main(input): a = (input & 63) << 12 b = (input & 65472) >> 4 c = (input & 1073676288) << 2 d = (input & 3221225472) >> 30 return a | b | c | d" "def main(x): a = x & 3 b = x >> 2 & 1023 c = x >> 12 & 63 d = x >> 18 & 31 e = x >> 23 & 31 f = x >> 28 & 1 g = x >> 29 & 1 h = x >> 30 & 3 return g | d << 1 | a << 6 | c << 8 | e << 14 | h << 19 | f << 21 | b << 22" "def main(input): a = input & 8191 b = (input & 4186112) << 9 c = (input & 264241152) >> 8 d = (input & 268435456) << 3 e = (input & 1610612736) >> 9 f = (input & 2147483648) >> 18 return a | b | c | d | e | f" "def main(x): e = (x & 2147483648) >> 8 d = (x & 2013265920) >> 8 c = (x & 133693440) << 5 b = (x & 524280) >> 0 a = (x & 7) >> 0 return e | d | c | b | a" "def main(input): a = (input & 2047) << 9 b = (input & 30720) >> 6 c = (input & 16744448) << 8 d = (input & 117440512) >> 4 e = (input & 939524096) >> 27 f = (input & 3221225472) >> 27 return a | b | c | d | e | f" "def main(x): g = x >> 29 meta = x - (g << 29) f = meta >> 27 meta = meta - (f << 27) e = meta >> 24 meta = meta - (e << 24) d = meta >> 23 meta = meta - (d << 23) c = meta >> 15 meta = meta - (c << 15) b = meta >> 4 a = meta - (b << 4) x = (f << 30) + (g << 27) x += (d << 26) + (b << 15) x += (a << 11) + (c << 3) + e return x" "def main(x): d = (x & 2147483648) >> 31 c = (x & 1073872896) << 1 b = (x & 1073725440) << 1 a = (x & 16383) << 1 return a | b | c | d" "def main(x): a = x & 16383 b = x >> 14 & 1023 c = x >> 24 & 31 d = x >> 29 & 3 e = x >> 31 & 1 result = b | c << 10 | d << 15 | e << 17 | a << 18 return result" "def main(x): A = x & 32767 B = x >> 15 & 4095 C = x >> 27 & 7 D = x >> 30 & 1 E = x >> 31 & 1 result = 0 result |= E result |= B << 1 result |= A << 13 result |= D << 28 result |= C << 29 return result" "def main(input): a = (input & 32767) << 17 b = (input & 8355840) >> 13 c = (input & 125829120) >> 10 d = (input & 402653184) >> 27 e = (input & 3758096384) >> 19 return a | b | c | d | e" "def main(x): a = x & 4095 b = x >> 12 & 4095 c = x >> 24 & 127 d = x >> 31 & 1 result = c | b << 7 | a << 19 | d << 31 return result" "def main(x): a = x & 1023 b = x >> 10 & 2047 c = x >> 21 & 127 d = x >> 28 & 7 e = x >> 31 & 1 result = d | b << 3 | e << 14 | a << 15 | c << 25 return result" "def main(x): e = x & 2147483648 d = x & 1610612736 c = x & 469762048 b = x & 67043328 a = x & 65535 return a << 16 | b >> 16 | c >> 14 | d >> 19 | e >> 16" "def main(x): a = (5, 0, 21, 16) b = (15, 6, 9, 0) c = (24, 16, 30, 22) d = (30, 25, 15, 10) e = (31, 31, 31, 31) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] return A | B | C | D | E" "def main(input): a = (input & 32767) << 7 b = (input & 4161536) >> 15 c = (input & 2143289344) << 1 d = (input & 2147483648) >> 9 return a | b | c | d" "def main(x): e = (x & 4227858432) >> 10 d = (x & 62914560) << 6 c = (x & 3670016) << 6 b = (x & 524280) >> 3 a = (x & 7) << 22 return d | c | a | e | b" "def main(x): h = x >> 31 tmp = x - (h << 31) g = tmp >> 25 tmp = tmp - (g << 25) f = tmp >> 20 tmp = tmp - (f << 20) e = tmp >> 15 tmp = tmp - (e << 15) d = tmp >> 10 tmp = tmp - (d << 10) c = tmp >> 5 tmp = tmp - (c << 5) b = tmp >> 3 a = tmp - (b << 3) res = (d << 27) + (a << 24) + (g << 18) + (e << 13) + (h << 12) + (b << 10) + (f << 5) + c return res" "def main(x): A = x & 3 B = x >> 2 & 3 C = x >> 4 & 2047 D = x >> 15 & 1 E = x >> 16 & 15 F = x >> 20 & 127 G = x >> 27 & 31 result = 0 result |= F result |= B << 7 result |= A << 9 result |= D << 11 result |= C << 12 result |= G << 23 result |= E << 28 return result" "def main(x): F = (x & 2147483648) >> 8 E = (x & 1073741824) >> 8 D = (x & 1006632960) >> 2 C = (x & 62914560) << 6 B = x & 4186112 A = x & 8191 return A | B | C | D | E | F" "def main(x): a_mask = 31 b_mask = 511 << 5 c_mask = 65535 << 14 d_mask = 1 << 30 e_mask = 1 << 31 a = x & a_mask b = (x & b_mask) >> 5 c = (x & c_mask) >> 14 d = (x & d_mask) >> 30 e = (x & e_mask) >> 31 return b | e << 9 | d << 10 | c << 11 | a << 27" "def main(x): A = x & 8191 B = x >> 13 & 8191 C = x >> 26 & 1 D = x >> 27 & 7 E = x >> 30 & 3 r = 0 r |= C r |= E << 1 r |= D << 3 r |= B << 6 r |= A << 19 return r" "def main(x): a = x & 32767 b = x >> 15 & 15 c = x >> 19 & 127 d = x >> 26 & 3 e = x >> 28 & 1 f = x >> 29 & 7 res = f >> 0 | c << 3 | d << 10 | e << 12 | a << 13 | b << 28 return res" "def main(x): f = (x & 2147483648) >> 0 e = (x & 1610612736) >> 23 d = (x & 532676608) >> 5 c = (x & 4128768) >> 16 b = (x & 65024) << 15 a = (x & 511) << 8 return a | b | c | d | e | f" "def main(input): a = (input & 65535) << 3 b = (input & 65536) << 4 c = (input & 1966080) << 4 d = (input & 266338304) << 4 e = (input & 268435456) >> 9 f = (input & 3758096384) >> 29 return a | b | c | d | e | f" "def main(input): a = (input & 1023) << 6 b = (input & 4193280) << 10 c = (input & 29360128) >> 22 d = (input & 234881024) >> 22 e = (input & 805306368) >> 10 f = (input & 3221225472) >> 14 return a | b | c | d | e | f" "def main(input): a = (input & 32767) << 9 b = (input & 8355840) << 9 c = (input & 58720256) >> 23 d = (input & 2080374784) >> 23 e = (input & 2147483648) >> 23 return a | b | c | d | e" "def main(input): a = (input & 31) << 9 b = (input & 65504) << 11 c = (input & 2031616) << 11 d = (input & 1071644672) >> 21 e = (input & 3221225472) >> 16 return a | b | c | d | e" "def main(num): a = num & 65535 b = num & 2147418112 c = num & 2147483648 return a << 16 | b >> 15 | c >> 31" "def main(x): a = x & 15 b = x >> 4 & 1 c = x >> 5 & 1 d = x >> 6 & 1 e = x >> 7 & 15 f = x >> 11 & 8191 g = x >> 24 & 7 h = x >> 27 & 31 result = b | h << 1 | d << 6 | e << 7 | c << 11 | a << 12 | g << 16 | f << 19 return result" "def main(x): a = x & 1 b = (x & 4094) << 5 c = (x & 67104768) << 6 d = (x & 1006632960) >> 25 e = (x & 1073741824) >> 25 f = (x & 2147483648) >> 14 return a | b | c | d | e | f" "def main(input): a = (input & 1023) << 19 b = (input & 7168) << 19 c = (input & 516096) >> 1 d = (input & 1073217536) >> 19 e = (input & 1073741824) >> 12 f = (input & 2147483648) >> 20 return a | b | c | d | e | f" "def main(input): a = (input & 1) << 3 b = (input & 510) << 8 c = (input & 512) << 22 d = (input & 16776192) << 7 e = (input & 251658240) >> 20 f = (input & 1879048192) >> 28 g = (input & 2147483648) >> 23 return a | b | c | d | e | f | g" "def main(x): d = ((1 << 32) - (1 << 30) & x) >> 30 c = ((1 << 30) - (1 << 25) & x) >> 25 b = ((1 << 25) - (1 << 9) & x) >> 9 a = ((1 << 9) - (1 << 0) & x) >> 0 result = d << 30 | c << 16 | b << 0 | a << 21 return result" "def main(x): A = x & 3 B = x >> 2 & 4095 C = x >> 14 & 15 D = x >> 18 & 511 E = x >> 27 & 1 F = x >> 28 & 3 G = x >> 30 & 1 H = x >> 31 & 1 result = 0 result |= F result |= E << 2 result |= G << 3 result |= C << 4 result |= A << 8 result |= H << 10 result |= D << 11 result |= B << 20 return result" "def main(x): a = (x & 8191) << 19 dcb = (x & 67100672) >> 7 e = (x & 469762048) >> 23 gf = (x & 3758096384) >> 29 return a | dcb | e | gf" "def main(input): a = (input & 1) << 11 b = (input & 30) << 11 c = (input & 32736) << 11 d = (input & 32768) << 11 e = (input & 134152192) >> 16 f = (input & 2013265920) << 1 g = (input & 2147483648) >> 4 return a | b | c | d | e | f | g" "def main(x): a = x & 63 b = x >> 6 & 1 c = x >> 7 & 7 d = x >> 10 & 511 e = x >> 19 & 31 f = x >> 24 & 255 result = f | a << 8 | d << 14 | b << 23 | e << 24 | c << 29 return result" "def main(input): a = (input & 2047) << 11 b = (input & 2095104) << 11 c = (input & 31457280) >> 21 d = (input & 503316480) >> 21 e = (input & 3758096384) >> 21 return a | b | c | d | e" "def main(x): a = x & 31 b = x >> 5 & 16383 c = x >> 19 & 511 d = x >> 28 & 3 e = x >> 30 & 3 result = d | b << 2 | a << 16 | e << 21 | c << 23 return result" "def move(x, cur, new, length): m = 2 ** (cur + length) - 2 ** cur s = x & m if cur < new: return s << new - cur else: return s >> cur - new def main(x): result = 0 result |= move(x, 0, 9, 6) result |= move(x, 6, 17, 15) result |= move(x, 21, 0, 9) result |= move(x, 30, 16, 1) result |= move(x, 31, 15, 1) return result" "def main(val): a = (val & 2047) << 11 b = (val & 14336) << 11 c = (val & 2080768) << 11 d = (val & 1071644672) >> 19 e = (val & 1073741824) >> 30 f = (val & 2147483648) >> 30 return a | b | c | d | e | f" "def main(x): c = x & 127 << 25 b = x & 16383 << 11 a = x & 2047 return a << 21 | c >> 11 | b >> 11" "def main(x): A = x & 63 B = x >> 6 & 65535 C = x >> 22 & 3 D = x >> 24 & 1 E = x >> 25 & 63 F = x >> 31 & 1 r = 0 r |= A r |= B << 6 r |= C << 22 r |= E << 24 r |= D << 30 r |= F << 31 return r" "def main(input): a = input & 1023 b = (input & 523264) << 13 c = (input & 536346624) >> 6 d = (input & 3758096384) >> 19 return a | b | c | d" "def main(x): a = x & 1 b = x >> 1 & 15 c = x >> 5 & 3 d = x >> 7 & 7 e = x >> 10 & 65535 f = x >> 26 & 63 result = b | a << 4 | d << 5 | c << 8 | f << 10 | e << 16 return result" "def main(input): a = (input & 15) << 7 b = (input & 16) >> 3 c = (input & 480) >> 2 d = (input & 2096640) << 11 e = (input & 2097152) >> 19 f = (input & 2143289344) >> 11 g = (input & 2147483648) >> 31 return a | b | c | d | e | f | g" "def main(input): a = (input & 3) << 30 b = (input & 262140) << 10 c = (input & 786432) << 10 d = (input & 2146435072) >> 20 e = (input & 2147483648) >> 20 return a | b | c | d | e" "def main(hex_num): hex_num = int(hex(hex_num), 16) res = int(hex(0), 16) temp = int(hex(3758096384), 16) E = int(hex(int(hex(hex_num & temp), 16) >> 25), 16) temp = int(hex(503316480), 16) D = int(hex(int(hex(hex_num & temp), 16) >> 25), 16) temp = int(hex(33546240), 16) C = int(hex(int(hex(hex_num & temp), 16) >> 1), 16) temp = int(hex(7936), 16) B = int(hex(int(hex(hex_num & temp), 16) >> 1), 16) temp = int(hex(255), 16) A = int(hex(int(hex(hex_num & temp), 16) << 24), 16) return int(hex(res ^ E ^ D ^ C ^ B ^ A), 16)" "def main(x): a = x & 2047 b = x >> 11 & 7 c = x >> 14 & 511 d = x >> 23 & 3 e = x >> 25 & 127 res = e << 0 | d << 7 | b << 9 | c << 12 | a << 21 return res" "def main(x): a = (7, 0, 8, 1) b = (15, 8, 31, 24) c = (24, 16, 23, 15) d = (29, 25, 14, 10) e = (30, 30, 9, 9) f = (31, 31, 0, 0) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] F = (int(x) >> f[1] & int((32 - (f[0] - f[1] + 1)) * '0' + (f[0] - f[1] + 1) * '1', 2)) << f[3] return A | B | C | D | E | F" "def main(x): a = b = c = d = e = f = x a &= 8191 b &= 4186112 c &= 1069547520 d &= 3221225472 a = a << 11 b = b >> 13 c = c << 2 d = d >> 21 result = a | b | c | d return result" "def main(x): A = x & 63 B = x >> 6 & 63 C = x >> 12 & 1023 D = x >> 22 & 255 E = x >> 30 & 1 F = x >> 31 & 1 r = 0 r |= B r |= C << 6 r |= F << 16 r |= A << 17 r |= D << 23 r |= E << 31 return r" "def main(x): d = ((1 << 32) - (1 << 29) & x) >> 29 c = ((1 << 29) - (1 << 19) & x) >> 19 b = ((1 << 19) - (1 << 6) & x) >> 6 a = ((1 << 6) - (1 << 0) & x) >> 0 result = d << 10 | c << 0 | b << 19 | a << 13 return result" "def main(x): d = x & 3758096384 c = x & 520093696 b = x & 16776704 a = x & 511 b = b << 5 c = c >> 15 return d + b + c + a" "def main(x): return (x & 31) << 25 | (x >> 5 & 31) << 18 | (x >> 10 & 3) << 16 | (x >> 12 & 3) << 14 | x >> 14 & 127 | (x >> 21 & 3) << 30 | (x >> 23 & 3) << 23 | (x >> 25 & 127) << 7" "def main(x): d = x & 1 << 31 c = x & 1 << 30 b = x & 32767 << 15 a = x & 32767 return d >> 15 | b >> 14 | a << 17 | c >> 30" "def main(x): e = (4026531840 & x) >> 7 d = (134217728 & x) >> 18 c = (133169152 & x) << 5 b = (1048064 & x) << 1 a = 511 & x return c | b | a | d | e" "def main(input): a = (input & 2047) << 13 b = (input & 4192256) >> 9 c = (input & 4194304) << 7 d = (input & 125829120) << 1 e = (input & 402653184) >> 27 f = (input & 1610612736) << 1 g = (input & 2147483648) >> 3 return a | b | c | d | e | f | g" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(12, 0) b_mask = u_mask(17, 12) c_mask = u_mask(25, 17) d_mask = u_mask(32, 25) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask a = a << 5 b = b >> 12 return a | b | c | d" "def main(x): A = x & 7 B = x >> 3 & 1023 C = x >> 13 & 16383 D = x >> 27 & 31 r = 0 r |= C r |= D << 14 r |= B << 19 r |= A << 29 return r" "import re def main(x): a = (0, 0, 31, 31) b = (9, 1, 30, 22) c = (13, 10, 18, 15) d = (16, 14, 21, 19) e = (28, 17, 14, 3) f = (30, 29, 2, 1) g = (31, 31, 0, 0) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] F = (int(x) >> f[1] & int((32 - (f[0] - f[1] + 1)) * '0' + (f[0] - f[1] + 1) * '1', 2)) << f[3] G = (int(x) >> g[1] & int((32 - (g[0] - g[1] + 1)) * '0' + (g[0] - g[1] + 1) * '1', 2)) << g[3] return A | B | C | D | E | F | G" "def main(input): a = (input & 1) << 25 b = (input & 126) << 25 c = (input & 16256) >> 7 d = (input & 134201344) >> 2 e = (input & 4160749568) >> 20 return a | b | c | d | e" "def main(x): a = x & 127 b = x >> 7 & 4095 c = x >> 19 & 4095 d = x >> 31 & 1 result = c | d << 12 | a << 13 | b << 20 return result" "def main(input): a = (input & 65535) << 5 b = (input & 983040) >> 15 c = (input & 32505856) << 7 d = (input & 33554432) << 1 e = (input & 2080374784) >> 5 f = (input & 2147483648) >> 31 return a | b | c | d | e | f" "import re def main(x): a = (15, 0, 20, 5) b = (23, 16, 31, 24) c = (26, 24, 23, 21) d = (28, 27, 3, 2) e = (30, 29, 1, 0) f = (31, 31, 4, 4) A = (int(x) >> a[1] & int((32 - (a[0] - a[1] + 1)) * '0' + (a[0] - a[1] + 1) * '1', 2)) << a[3] B = (int(x) >> b[1] & int((32 - (b[0] - b[1] + 1)) * '0' + (b[0] - b[1] + 1) * '1', 2)) << b[3] C = (int(x) >> c[1] & int((32 - (c[0] - c[1] + 1)) * '0' + (c[0] - c[1] + 1) * '1', 2)) << c[3] D = (int(x) >> d[1] & int((32 - (d[0] - d[1] + 1)) * '0' + (d[0] - d[1] + 1) * '1', 2)) << d[3] E = (int(x) >> e[1] & int((32 - (e[0] - e[1] + 1)) * '0' + (e[0] - e[1] + 1) * '1', 2)) << e[3] F = (int(x) >> f[1] & int((32 - (f[0] - f[1] + 1)) * '0' + (f[0] - f[1] + 1) * '1', 2)) << f[3] return A | B | C | D | E | F" "def main(x): a = x >> 0 & 2 ** 7 - 1 b = x >> 7 & 2 ** 3 - 1 c = x >> 10 & 2 ** 9 - 1 d = x >> 19 & 2 ** 10 - 1 e = x >> 29 & 2 ** 1 - 1 f = x >> 30 & 2 ** 1 - 1 g = x >> 31 & 2 ** 1 - 1 A1 = (g << 31) + (b << 28) + (e << 27) B1 = (f << 26) + (a << 19) + (c << 10) + d return A1 + B1" "def main(x): A = (x & 32767) << 9 B = (x & 16744448) >> 15 C = x & 50331648 D = x & 201326592 E = (x & 1879048192) << 1 F = (x & 2147483648) >> 3 return A | B | C | D | E | F" "def main(num): a = num & 16383 b = num & 1073725440 c = num & 3221225472 return a << 18 | b >> 14 | c >> 14" "def main(s): return int((s & 511) << 10 | (s >> 9 & 15) << 28 | (s >> 13 & 15) << 6 | (s >> 17 & 3) << 24 | s >> 19 & 63 | (s >> 25 & 15) << 19 | (s >> 29 & 1) << 23 | (s >> 30 & 3) << 26)" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(9, 0) b_mask = u_mask(20, 9) c_mask = u_mask(31, 20) d_mask = u_mask(32, 31) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask a = a << 12 b = b >> 8 c = c << 1 d = d >> 31 return a | b | c | d" "def main(num): a = num & 511 b = num & 15872 c = num & 507904 d = num & 1572864 e = num & 132120576 f = num & 2013265920 g = num & 2147483648 return a << 12 | b >> 9 | c << 7 | d >> 9 | e << 5 | f >> 22 | g >> 22" "def get_mask(start, end): mask = 0 for i in range(start, end): mask = mask | 1 << i return mask def get_bit_field(x, start, end, new_start): mask = get_mask(start, end + 1) shifted_x_part = mask & x if new_start < start: shifted_x_part = shifted_x_part >> start - new_start else: shifted_x_part = shifted_x_part << new_start - start return shifted_x_part def main(x): result = 0 e = get_bit_field(x, 31, 31, 7) d = get_bit_field(x, 30, 30, 8) c = get_bit_field(x, 20, 29, 9) b = get_bit_field(x, 13, 19, 0) a = get_bit_field(x, 0, 12, 19) result = a | c | d | e | b return result" "import math def generate_mask(left, right): a = pow(2, left + 1) - pow(2, right) return a def main(x): a = x & generate_mask(11, 0) b = x & generate_mask(14, 12) c = x & generate_mask(20, 15) d = x & generate_mask(25, 21) e = x & generate_mask(27, 26) f = x & generate_mask(30, 28) g = x & generate_mask(31, 31) a1 = a << 17 b1 = b >> 7 c1 = c >> 4 d1 = d >> 21 e1 = e >> 17 f1 = f << 1 g1 = g >> 23 n = a1 | b1 | c1 | d1 | e1 | f1 | g1 return n" "def main(x): A = (x & 127) << 22 B = (x & 896) << 22 C = (x & 2096128) << 1 D = (x & 2145386496) >> 20 E = (x & 2147483648) >> 31 return A | B | C | D | E" "def main(x): d = x & 3221225472 c = x & 1073709056 b = x & 32736 a = x & 31 d = d >> 30 c = c >> 13 b = b << 12 a = a << 27 return a + b + c + d" "def main(x): a = x & 63 b = x >> 6 & 32767 c = x >> 21 & 7 d = x >> 24 & 31 e = x >> 29 & 1 f = x >> 30 & 3 return c | e << 3 | a << 4 | f << 10 | b << 12 | d << 27" "def u_mask(a, b): return 2 ** a - 2 ** b def main(x): a_mask = u_mask(14, 0) b_mask = u_mask(30, 14) c_mask = u_mask(31, 30) d_mask = u_mask(32, 31) a = x & a_mask b = x & b_mask c = x & c_mask d = x & d_mask c = c << 1 d = d >> 1 return a | b | c | d" "def main(s): return (s & 16383) << 15 | (s >> 14 & 1) << 29 | s >> 15 & 7 | (s >> 18 & 2047) << 3 | (s >> 29 & 1) << 14 | (s >> 30 & 3) << 30" "def main(x): a = x & 8191 b = x >> 13 & 8191 c = x >> 26 & 7 d = x >> 29 & 1 e = x >> 30 & 3 result = d | c << 1 | b << 4 | e << 17 | a << 19 return result" "def main(input): a = (input & 255) << 24 b = (input & 16128) << 10 c = (input & 16384) >> 14 d = (input & 2064384) >> 11 e = (input & 534773760) >> 11 f = (input & 3758096384) >> 28 return a | b | c | d | e | f"