@@ -84,3 +84,81 @@ subi r22, -0x1F
8484sbci r23, -1 ; buffer = Y+0x1f
8585```
8686
87+ ## ` parse_and_maybe_set_flag_printer `
88+
89+ parse_and_maybe_set_flag_printer(input){
90+ input: Yx+0x4B
91+ first_colon: Yx+2
92+ saved_position: Yx+0x4A
93+
94+ first_colon = strchr(input, ':') || return -1
95+ saved_position = 0
96+
97+
98+ saved_position ^= 1
99+ second_colon: Yx+4
100+ second_colon = strchr(first_colon + 1, ':') || return -1
101+
102+
103+ saved_position ^= 2
104+ next_dash: Yx+6
105+ next_dash = strchr(input, '-')
106+
107+
108+ if (!next_dash)
109+ next_dash > second_colon || return -1
110+
111+
112+ saved_position ^= 4
113+ first_colon_distance: Yx+8
114+ first_colon_distance = first_colon - input - 1
115+ weird_thing: Yx+0xA
116+ weird_thing = 0
117+ other_thing: Yx+0xC
118+ other_thing = first_colon
119+ change_stack(-(first_colon_distance + 1))
120+ first_colon_buffer: Y+0xE
121+ first_colon_buffer = newstack + 1
122+
123+ saved_position ^= 8
124+ distance_between_colons: Y+0x10
125+ distance_between_colons = second_colon - first_colon - 1
126+ ya_weird_thing: Y+0x12
127+ ya_weird_thing = 0
128+ ya_distance_between_colons: Y+0x14
129+ ya_distance_between_colons = distance_between_colons
130+ change_stack(-(distance_between_colons + 1))
131+ second_colon_buffer: Y+0x16
132+ second_colon_buffer = newstack + 1
133+ memcpy(first_colon_buffer, input, first_colon_distance)
134+ first_colon_buffer[first_colon_distance] = 0
135+ place_1: Y+0x28
136+ first_number: Y+0x1A
137+ after_1: Y+0x18
138+ first_number = strtoi(first_colon_buffer, place_1, 10)
139+ after_1=place_1
140+
141+ saved_position ^= 16
142+ memcpy(second_colon_buffer, first_colon, distance_between_colons)
143+ second_colon_buffer[distance_between_colons] = 0
144+ second_number: Y+0x1E
145+ after_2: Y+0x1C
146+ second_number = strtoi(second_colon_buffer, place_1, 10)
147+ after_2 = place_1
148+
149+ if (saved_position != 0x1f)
150+ die_and_remember
151+
152+
153+
154+
155+
156+
157+
158+
159+
160+
161+
162+
163+
164+
0 commit comments