Write it with golang.
[ca/:A1,A2,A3...,A149]
A1 stands for ID.
Now:
1. Pick two lines randomly, which one of them should have (A2,A3)=(1,1) and the other should have (A2,A3) != (1,1). One line as parent1, one line as parent2, the new line which will add back to the txt with A1=MaxID+1(MaxID is the maxA1 which is already existing in the txt) called offspring.
2. Offspring's A2 is picked randomly from parent1's A2, parent1's A3, parent2's A2 and parent2's A3 (one out of four). If offspring's A2 is from parent1, offspring's A3 should be picked randomly from parent2's A2 and parent2's A3 (one out of two). If offspring's A2 is from parent2, offspring's A3 should be picked randomly from parent1's A2 and parent1's A3 (one out of two).
3. Offspring's A4 is picked randomly from parent1's A4, parent1's A5, parent2's A4 and parent2's A5 (one out of four). If offspring's A4 is from parent1, offspring's A5 should be picked randomly from parent2's A4 and parent2's A5 (one out of two). If offspring's A4 is from parent2, offspring's A5 should be picked randomly from parent1's A4 and parent1's A5 (one out of two).
4. Offspring's (A6,A7,A8,A9) should be picked randomly = parent1's (A6,A7,A8,A9) or = parent2's (A6,A7,A8,A9)  and add randomness to the mix, random offset between -10 and +10, but the value of (A6,A7,A8) within 0-255 limitation, A9 = 1.0.
5. Offspring's (A10,A11,A12) should be picked randomly = parent1's (A10,A11,A12), or = parent2's (A10,A11,A12).
6. If offspring's (A2,A3) = (1,1) or (2,2) , offspring's A13 is in the range from 0.25 to 0.5. If offspring's (A2,A3) != (1,1) or (2,2), offspring's A13 = 1.
7. Offspring's (A14,A15,A16) should be picked randomly = parent1's (A14,A15,A16), or = parent2's (A14,A15,A16).
8. If offspring's (A2,A3) = (1,1) or (2,2) , offspring's A17 is in the range from 0.25 to 0.5. If offspring's (A2,A3) != (1,1) or (2,2), offspring's A17 = 1.
9. Offspring's (A18,A19,A20) should be picked randomly = parent1's (A18,A19,A20), or = parent2's (A18,A19,A20).
10. If offspring's (A2,A3) = (1,1), offspring's A21 is in the range from 0.25 to 0.5. If offspring's (A2,A3) != (1,1), offspring's A21 = 0.
11. Offspring's (A22,A23,A24) should be picked randomly = parent1's (A22,A23,A24), or = parent2's (A22,A23,A24) .
12. If offspring's (A2,A3) = (1,1) or (2,2) , offspring's A25 = 0. If offspring's (A2,A3) != (1,1) or (2,2) , offspring's A25 = 1.
13. Offspring's (A26,A27,A28) should be picked randomly = parent1's (A26,A27,A28), or = parent2's (A26,A27,A28) .
14. If offspring's (A2,A3) = (1,1) or (2,2) , offspring's A29 = 0. If offspring's (A2,A3) != (1,1) or (2,2) , offspring's A29 = 1.
15. Offspring's (A30,A31,A32) should be picked randomly = parent1's (A30,A31,A32), or = parent2's (A30,A31,A32) .
16. If offspring's (A2,A3) = (1,1), offspring's A33 = 0. If offspring's (A2,A3) != (1,1), offspring's A33 = 1.
17. At first, offspring's A34 should be picked randomly from parent1's A34 and parent2's A34 (one out of two), offspring's A35 should be picked randomly from parent1's A35 and parent2's A35 (one out of two), offspring's A36 should be picked randomly from parent1's A36 and parent2's A36 (one out of two), offspring's A37 should be picked randomly from parent1's A37 and parent2's A37 (one out of two), offspring's A38 should be picked randomly from parent1's A38 and parent2's A38 (one out of two), offspring's A39 should be picked randomly from parent1's A39 and parent2's A39 (one out of two). But offspring's A34-A39 (which are six subjects) should randomly have 1-3 subjects being changed to be a different integer than it used to be, but the new integer should in the range between 1-10.
18. Offspring's A40 is a integer random out from the range between 1-10.
19. Offspring's A41 is a integer random out from the range between 1-10.
20. If offspring's (A2,A3,A4) = (1,1,1), offspring's A42 = 1. If offspring's (A2,A3,A4) = (1,1,2), offspring's A42 = 2.  If offspring's (A2,A3,A4) = (1,1,3), offspring's A42 = 3.  If offspring's (A2,A3,A4) = (2,2,1), offspring's A42 = 4.  If offspring's (A2,A3,A4) = (2,2,2), offspring's A42 = 5.  If offspring's (A2,A3,A4) = (2,2,3), offspring's A42 = 6. If offspring's (A2,A3,A4) = (1,2,1) or (2,1,1), offspring's A42 = 7. If offspring's (A2,A3,A4) = (1,2,2) or (2,1,2), offspring's A42 = 8. If offspring's (A2,A3,A4) = (1,2,3) or (2,1,3), offspring's A42 = 9.
21. If offspring's (A2,A3) = (1,1), offspring's A43 = A147. If offspring's (A2,A3) != (1,1), offspring's A43 = 404.
22. If offspring's (A2,A3) = (1,1), offspring's A44 = A147. If offspring's (A2,A3) != (1,1), offspring's A44 = 404.
23. If offspring's (A2,A3) = (1,1) or (2,2), offspring's A45 = 404. If offspring's (A2,A3) != (1,1) or (2,2), offspring's A44 = A147.
24. If offspring's (A2,A3) = (1,1), offspring's A46 = 404. If offspring's (A2,A3) != (1,1), offspring's A46 = A147.
25. Offspring's A47 = parent1's A47 + parent2's A47, offspring's Offspring's A48 = parent1's A48 + parent2's A48, same rule to offspring's A49-A146.
26. Compared offspring's A47-A146, which integer is the biggest. For example, if A[i] is the biggest, A147 = ([i]-46).
27. Parent1's A1= offspring's A148, parent2's A1 = offspring's A149.
Please make sure the function of rules above will be well-functioned, make the codes short and clear, memories-friendly, merge similar structures so that code is not redundant. Give the whole code back.