package app.revanced.patcher.extensions import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.builder.BuilderInstruction import org.jf.dexlib2.builder.MutableMethodImplementation class AccessFlagExtensions { companion object { infix fun AccessFlags.or(other: AccessFlags) = this.value or other.value infix fun Int.or(other: AccessFlags) = this or other.value } } fun MutableMethodImplementation.addInstructions(index: Int, instructions: List) { for (i in instructions.lastIndex downTo 0) { this.addInstruction(index, instructions[i]) } }