-val_t stream___BufferedIStream___read_char(val_t self) {
- struct trace_t trace = {NULL, "stream::BufferedIStream::read_char (bin/../lib/standard//stream.nit:96,2--107:16)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ((stream___BufferedIStream___eof_t)CALL( self,COLOR_stream___IStream___eof))( self) /*BufferedIStream::eof*/;
- if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable0)))) { fprintf(stderr, "Assert failed: bin/../lib/standard//stream.nit:98,3--16\n"); nit_exit(1);}
- variable0 = ATTR_stream___BufferedIStream____buffer_pos( self) /*BufferedIStream::_buffer_pos*/;
- variable1 = ATTR_stream___BufferedIStream____buffer( self) /*BufferedIStream::_buffer*/;
- variable1 = ((array___AbstractArray___length_t)CALL(variable1,COLOR_abstract_collection___Collection___length))(variable1) /*String::length*/;
- variable0 = TAG_Bool(UNTAG_Int(variable0)>=UNTAG_Int(variable1));
- if (UNTAG_Bool(variable0)) { /*if*/
- ((stream___BufferedIStream___fill_buffer_t)CALL( self,COLOR_stream___BufferedIStream___fill_buffer))( self) /*BufferedIStream::fill_buffer*/;
- }
- variable0 = ATTR_stream___BufferedIStream____buffer_pos( self) /*BufferedIStream::_buffer_pos*/;
- variable1 = ATTR_stream___BufferedIStream____buffer( self) /*BufferedIStream::_buffer*/;
- variable1 = ((array___AbstractArray___length_t)CALL(variable1,COLOR_abstract_collection___Collection___length))(variable1) /*String::length*/;
- variable0 = TAG_Bool(UNTAG_Int(variable0)>=UNTAG_Int(variable1));
- if (UNTAG_Bool(variable0)) { /*if*/
- variable0 = TAG_Int(-UNTAG_Int( TAG_Int(1)));
- goto return_label7;
- }
- variable1 = ATTR_stream___BufferedIStream____buffer( self) /*BufferedIStream::_buffer*/;
- variable2 = ATTR_stream___BufferedIStream____buffer_pos( self) /*BufferedIStream::_buffer_pos*/;
- variable1 = ((string___String_____bra_t)CALL(variable1,COLOR_abstract_collection___Map_____bra))(variable1, variable2) /*String::[]*/;
- variable0 = variable1;
- ATTR_stream___BufferedIStream____buffer_pos( self) /*BufferedIStream::_buffer_pos*/ = TAG_Int(UNTAG_Int(ATTR_stream___BufferedIStream____buffer_pos( self) /*BufferedIStream::_buffer_pos*/)+UNTAG_Int( TAG_Int(1)));
- variable1 = TAG_Int((unsigned char)UNTAG_Char( variable0 /*c*/));
- variable0 = variable1;
- goto return_label7;
- return_label7: while(false);
- tracehead = trace.prev;
- return variable0;
+val_t stream___BufferedIStream___read_char(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t REGB3;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_stream;
+ fra.me.line = 96;
+ fra.me.meth = LOCATE_stream___BufferedIStream___read_char;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./../lib/standard//stream.nit:98 */
+ REGB0 = CALL_stream___IStream___eof(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_stream, 98);
+ }
+ /* ./../lib/standard//stream.nit:99 */
+ REGB0 = TAG_Bool(ATTR_stream___BufferedIStream____buffer_pos(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_stream, 99);
+ }
+ REGB0 = ATTR_stream___BufferedIStream____buffer_pos(fra.me.REG[0]);
+ fra.me.REG[1] = ATTR_stream___BufferedIStream____buffer(fra.me.REG[0]);
+ REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_stream, 99);
+ }
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
+ /* ./../lib/standard//kernel.nit:213 */
+ REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
+ /* ./../lib/standard//stream.nit:99 */
+ if (UNTAG_Bool(REGB1)) {
+ /* ./../lib/standard//stream.nit:100 */
+ CALL_stream___BufferedIStream___fill_buffer(fra.me.REG[0])(fra.me.REG[0]);
+ }
+ /* ./../lib/standard//stream.nit:102 */
+ REGB1 = TAG_Bool(ATTR_stream___BufferedIStream____buffer_pos(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_stream, 102);
+ }
+ REGB1 = ATTR_stream___BufferedIStream____buffer_pos(fra.me.REG[0]);
+ fra.me.REG[1] = ATTR_stream___BufferedIStream____buffer(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_stream, 102);
+ }
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
+ /* ./../lib/standard//kernel.nit:213 */
+ REGB0 = TAG_Bool(UNTAG_Int(REGB1)>=UNTAG_Int(REGB0));
+ /* ./../lib/standard//stream.nit:102 */
+ if (UNTAG_Bool(REGB0)) {
+ /* ./../lib/standard//stream.nit:103 */
+ REGB0 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:216 */
+ REGB0 = TAG_Int(-UNTAG_Int(REGB0));
+ /* ./../lib/standard//stream.nit:103 */
+ goto label1;
+ }
+ /* ./../lib/standard//stream.nit:105 */
+ fra.me.REG[1] = ATTR_stream___BufferedIStream____buffer(fra.me.REG[0]);
+ REGB1 = TAG_Bool(ATTR_stream___BufferedIStream____buffer_pos(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_buffer_pos", LOCATE_stream, 105);
+ }
+ REGB1 = ATTR_stream___BufferedIStream____buffer_pos(fra.me.REG[0]);
+ REGB2 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ nit_abort("Reciever is null", NULL, LOCATE_stream, 105);
+ }
+ REGB1 = CALL_abstract_collection___MapRead_____bra(fra.me.REG[1])(fra.me.REG[1], REGB1);
+ /* ./../lib/standard//stream.nit:106 */
+ REGB2 = ATTR_stream___BufferedIStream____buffer_pos(fra.me.REG[0]);
+ REGB3 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB3 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB3));
+ /* ./../lib/standard//stream.nit:106 */
+ ATTR_stream___BufferedIStream____buffer_pos(fra.me.REG[0]) = REGB3;
+ /* ./../lib/standard//kernel.nit:382 */
+ REGB1 = TAG_Int((unsigned char)UNTAG_Char(REGB1));
+ /* ./../lib/standard//stream.nit:107 */
+ REGB0 = REGB1;
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;