public int doScene(g g0, ad0.n n0) {
List list0;
Class class0 = k0.class;
this.d = n0;
b c$b0 = new b();
c$b0.a = new w54();
c$b0.b = new x54();
c$b0.c = "/cgi-bin/micromsg-bin/newsendmsg";
c$b0.d = 0x20A;
c$b0.e = 0xED;
c$b0.f = 1000000237;
c c0 = c$b0.a();
this.e = c0;
w54 w540 = (w54)c0.a.a;
e4 e40 = this.o;
if(e40 == null) {
list0 = ((f4)((k0)a0.q(class0)).SI()).WD0(this.g);
}
else {
if(e40.getStatus() != 5) {
Log.w("MicroMsg.NetSceneSendMsg", "msg:%d status:%d should not be resend !", new Object[]{this.o.getMsgId(), this.o.getStatus()});
}
this.o.c(1);
((f4)((k0)a0.q(class0)).SI()).FE0(this.f, this.o);
list0 = new ArrayList();
((ArrayList)list0).add(this.o);
this.o = null;
}
if(list0.size() == 0) {
Log.w("MicroMsg.NetSceneSendMsg", "no sending message");
return -2;
}
((LinkedList)this.h).clear();
for(int v1 = 0; v1 < list0.size(); ++v1) {
e4 e41 = (e4)list0.get(v1);
if(e41.z2() == 1) {
i23 i230 = new i23();
l14 l140 = new l14();
l140.d = e41.u();
l140.e = true;
i230.d = l140;
i230.g = (int)(e41.getCreateTime() / 1000L);
i230.f = e41.getType();
i230.e = e41.getContent();
i230.h = r0.a(s0.r(), e41.getCreateTime()).hashCode();
if(((ba2.s0)j.c(ba2.s0.class)).xr(e41.u())) {
i230.j = ((k0)a0.q(class0)).wl().c4(e41.u());
}
if(this.p == null) {
this.p = ((x0)j.c(x0.class)).by0();
}
Log.i("MicroMsg.NetSceneSendMsg", "using message source assembler %s", new Object[]{this.p});
this.p.e(i230, e41);
Log.i("MicroMsg.NetSceneSendMsg", "reqCmd.MsgSource:%s", new Object[]{i230.i});
w540.e.add(i230);
w540.d = w540.e.size();
((LinkedList)this.h).add(e41);
Log.i("MicroMsg.NetSceneSendMsg", "Req MsgSource %s", new Object[]{i230.i});
}
}
int v2 = this.dispatch(g0, this.e, this);
if(v2 < 0) {
Log.i("MicroMsg.NetSceneSendMsg", "mark all failed. do scene %d", new Object[]{v2});
for(int v = 0; v < ((LinkedList)this.h).size(); ++v) {
this.j1(v);
}
}
return v2;
}