Advent of Code 2018
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.0 KiB

6 years ago
#ip 3
#reg0=1
; fn main()
; &1 = ((&1 + 2) ** 2) * 19(&3) * 11 = ((&1 + 2) ** 2) * 209
; &2 = ((&2 + 2) * 22(&3)) + 20 = &2 * 22 + 64
; &1 = &1 + &2
; if (&0 != 0) {
; &2 = ((((27(&3) * 28(&3)) + 29(&3)) * 30(&3)) * 14) * 32(&3) = 10550400
; &1 = &1 + &2
; &0 = 0
; }
; &5 = 1
; do {
; &4 = 1
; do {
; if (&5 * &4 == &1) {
; &0 = &0 + &5
; }
; &4 = &4 + 1
; } while (&4 <= &1)
;
; &5 = &5 + 1
; } while (&5 <= &1);
00: addi 3 16 3
01: seti 1 9 5
02: seti 1 1 4
03: mulr 5 4 2
04: eqrr 2 1 2
05: addr 2 3 3
06: addi 3 1 3
07: addr 5 0 0
08: addi 4 1 4
09: gtrr 4 1 2
10: addr 3 2 3
11: seti 2 3 3
12: addi 5 1 5
13: gtrr 5 1 2
14: addr 2 3 3
15: seti 1 4 3
16: mulr 3 3 3
17: addi 1 2 1
18: mulr 1 1 1
19: mulr 3 1 1
20: muli 1 11 1
21: addi 2 2 2
22: mulr 2 3 2
23: addi 2 20 2
24: addr 1 2 1
25: addr 3 0 3
26: seti 0 4 3
27: setr 3 9 2
28: mulr 2 3 2
29: addr 3 2 2
30: mulr 3 2 2
31: muli 2 14 2
32: mulr 2 3 2
33: addr 1 2 1
34: seti 0 6 0
35: seti 0 0 3