Label l_0 = new Label();
Label l_1 = new Label();
mv.visitInsn( Opcodes.DUP );
mv.visitVarInsn( Opcodes.ASTORE, 0 + loc );
mv.visitJumpInsn( Opcodes.IFNONNULL, l_0 );
mv.visitInsn( Opcodes.LCONST_0 );
mv.visitJumpInsn( Opcodes.GOTO, l_1 );
mv.visitLabel( l_0 );
mv.visitVarInsn( Opcodes.ALOAD, 0 + loc );
mv.visitMethodInsn( Opcodes.INVOKEVIRTUAL, "java/lang/Number", "longValue", "()J" );
mv.visitLabel( l_1 );