diff --git a/src/main/scala/analysis/Cfg.scala b/src/main/scala/analysis/Cfg.scala index 2c0c2e4d7..f84516c85 100644 --- a/src/main/scala/analysis/Cfg.scala +++ b/src/main/scala/analysis/Cfg.scala @@ -689,10 +689,10 @@ class ProgramCfgFactory: case i if i > 0 => // Block contains some statements val endStmt: CfgCommandNode = visitStmts(block.statements, prevBlockEnd, cond) - visitJumps(block.jumps, endStmt, TrueLiteral, solitary = false) + visitJump(block.jump, endStmt, TrueLiteral, solitary = false) case _ => // Only jumps in this block - visitJumps(block.jumps, prevBlockEnd, cond, solitary = true) + visitJump(block.jump, prevBlockEnd, cond, solitary = true) } /** If a block has statements, we add them to the CFG. Blocks in this case are basic blocks, so we know @@ -744,9 +744,9 @@ class ProgramCfgFactory: * @param solitary * `True` if this block contains no statements, `False` otherwise */ - def visitJumps(jmps: ArrayBuffer[Jump], prevNode: CfgNode, cond: Expr, solitary: Boolean): Unit = { + def visitJump(jmp: Jump, prevNode: CfgNode, cond: Expr, solitary: Boolean): Unit = { - val jmpNode: CfgJumpNode = CfgJumpNode(data = jmps.head, block = block, parent = funcEntryNode) + val jmpNode: CfgJumpNode = CfgJumpNode(data = jmp, block = block, parent = funcEntryNode) var precNode: CfgNode = prevNode if (solitary) { @@ -758,7 +758,7 @@ class ProgramCfgFactory: Currently we display these nodes in the DOT view of the CFG, however these could be hidden if desired. */ - jmps.head match { + jmp match { case jmp: GoTo => // `GoTo`s are just edges, so introduce a fake `start of block` that can be jmp'd to val ghostNode = CfgGhostNode(block = block, parent = funcEntryNode, data = NOP(jmp.label)) @@ -773,40 +773,8 @@ class ProgramCfgFactory: // TODO this is not a robust approach - jmps.head match { - case goto: GoTo => - // Process first jump - var targetBlock: Block = goto.target - var targetCond: Expr = goto.condition match { - case Some(c) => c - case None => TrueLiteral - } - - // Jump to target block - if (visitedBlocks.contains(targetBlock)) { - val targetBlockEntry: CfgCommandNode = visitedBlocks(targetBlock) - cfg.addEdge(precNode, targetBlockEntry, targetCond) - } else { - visitBlock(targetBlock, precNode, targetCond) - } - - /* TODO it is not a safe assumption that there are a maximum of two jumps, or that a GoTo will follow a GoTo - */ - if (targetCond != TrueLiteral) { - val secondGoto: GoTo = jmps.tail.head.asInstanceOf[GoTo] - targetBlock = secondGoto.target - // IR doesn't store negation of condition, so we must do it manually - targetCond = negateConditional(targetCond) - - // Jump to target block - if (visitedBlocks.contains(targetBlock)) { - val targetBlockEntry: CfgCommandNode = visitedBlocks(targetBlock) - cfg.addEdge(precNode, targetBlockEntry, targetCond) - } else { - visitBlock(targetBlock, precNode, targetCond) - } - } - case n: NonDetGoTo => + jmp match { + case n: GoTo => for (targetBlock <- n.targets) { if (visitedBlocks.contains(targetBlock)) { val targetBlockEntry: CfgCommandNode = visitedBlocks(targetBlock) @@ -818,16 +786,14 @@ class ProgramCfgFactory: case dCall: DirectCall => val targetProc: Procedure = dCall.target - // Branch to this call - val calls = jmps.filter(_.isInstanceOf[DirectCall]).map(x => CfgJumpNode(data = x, block = block, parent = funcEntryNode)) + val callNode = CfgJumpNode(data = dCall, block = block, parent = funcEntryNode) - calls.foreach(node => { - cfg.addEdge(precNode, node) + // Branch to this call + cfg.addEdge(precNode, callNode) - procToCalls(proc) += node - procToCallers(targetProc) += node - callToNodes(funcEntryNode) += node - }) + procToCalls(proc) += callNode + procToCallers(targetProc) += callNode + callToNodes(funcEntryNode) += callNode // Record call association @@ -837,9 +803,7 @@ class ProgramCfgFactory: // Add intermediary return node (split call into call and return) val callRet = CfgCallReturnNode() - calls.foreach(node => { - cfg.addEdge(node, callRet) - }) + cfg.addEdge(callNode, callRet) if (visitedBlocks.contains(retBlock)) { val retBlockEntry: CfgCommandNode = visitedBlocks(retBlock) cfg.addEdge(callRet, retBlockEntry) @@ -848,9 +812,7 @@ class ProgramCfgFactory: } case None => val noReturn = CfgCallNoReturnNode() - calls.foreach(node => { - cfg.addEdge(node, noReturn) - }) + cfg.addEdge(callNode, noReturn) cfg.addEdge(noReturn, funcExitNode) } case iCall: IndirectCall => @@ -889,7 +851,7 @@ class ProgramCfgFactory: cfg.addEdge(jmpNode, noReturn) cfg.addEdge(noReturn, funcExitNode) } - case _ => assert(false, s"unexpected jump encountered, jumps: $jmps") + case _ => assert(false, s"unexpected jump encountered, jump: $jmp") } // `jmps.head` match } // `visitJumps` function } // `visitBlocks` function diff --git a/src/main/scala/analysis/SteensgaardAnalysis.scala b/src/main/scala/analysis/SteensgaardAnalysis.scala index d2d771ea2..63e2594db 100644 --- a/src/main/scala/analysis/SteensgaardAnalysis.scala +++ b/src/main/scala/analysis/SteensgaardAnalysis.scala @@ -121,7 +121,7 @@ class SteensgaardAnalysis(program: Program, constantPropResult: Map[CfgNode, Map case block: Block => block.statements.foreach(visit(_, ())) - block.jumps.foreach(visit(_, ())) + visit(block.jump, ()) case _ => // ignore other kinds of nodes diff --git a/src/main/scala/bap/BAPStatement.scala b/src/main/scala/bap/BAPStatement.scala index 6f8ce85aa..003669c0e 100644 --- a/src/main/scala/bap/BAPStatement.scala +++ b/src/main/scala/bap/BAPStatement.scala @@ -1,22 +1,25 @@ package bap -sealed trait BAPJump +sealed trait BAPJump { + val line: String + val instruction: String +} case class BAPDirectCall( target: String, returnTarget: Option[String], - line: String, - instruction: String + override val line: String, + override val instruction: String ) extends BAPJump case class BAPIndirectCall( target: BAPVar, returnTarget: Option[String], - line: String, - instruction: String + override val line: String, + override val instruction: String ) extends BAPJump -case class BAPGoTo(target: String, condition: BAPExpr, line: String, instruction: String) extends BAPJump +case class BAPGoTo(target: String, condition: BAPExpr, override val line: String, override val instruction: String) extends BAPJump sealed trait BAPStatement diff --git a/src/main/scala/ir/Interpreter.scala b/src/main/scala/ir/Interpreter.scala index 6f793bbf5..9cf593f9f 100644 --- a/src/main/scala/ir/Interpreter.scala +++ b/src/main/scala/ir/Interpreter.scala @@ -188,44 +188,44 @@ class Interpreter() { // Block.Jump breakable { - for ((jump, index) <- b.jumps.zipWithIndex) { - Logger.debug(s"jump[$index]:") - jump match { - case gt: GoTo => - Logger.debug(s"$gt") - gt.condition match { - case Some(value) => - eval(value, regs) match { - case TrueLiteral => - nextBlock = Some(gt.target) - break - case FalseLiteral => - } + Logger.debug(s"jump:") + b.jump match { + case gt: GoTo => + Logger.debug(s"$gt") + for (g <- gt.targets) { + val condition: Option[Expr] = g.statements.headOption.collect { case a: Assume => a.body } + condition match { + case Some(e) => eval(e, regs) match { + case TrueLiteral => + nextBlock = Some(g) + break + case _ => + } case None => - nextBlock = Some(gt.target) + nextBlock = Some(g) break } - case dc: DirectCall => - Logger.debug(s"$dc") - if (dc.returnTarget.isDefined) { - returnBlock.push(dc.returnTarget.get) - } - interpretProcedure(dc.target) - break - case ic: IndirectCall => - Logger.debug(s"$ic") - if (ic.target == Register("R30", BitVecType(64)) && ic.returnTarget.isEmpty) { - if (returnBlock.nonEmpty) { - nextBlock = Some(returnBlock.pop()) - } else { - //Exit Interpreter - nextBlock = None - } - break + } + case dc: DirectCall => + Logger.debug(s"$dc") + if (dc.returnTarget.isDefined) { + returnBlock.push(dc.returnTarget.get) + } + interpretProcedure(dc.target) + break + case ic: IndirectCall => + Logger.debug(s"$ic") + if (ic.target == Register("R30", BitVecType(64)) && ic.returnTarget.isEmpty) { + if (returnBlock.nonEmpty) { + nextBlock = Some(returnBlock.pop()) } else { - ??? + //Exit Interpreter + nextBlock = None } - } + break + } else { + ??? + } } } } @@ -253,7 +253,11 @@ class Interpreter() { case assert: Assert => Logger.debug(assert) - ??? + // TODO + + case assume: Assume => + Logger.debug(assume) + // TODO, but already taken into effect if it is a branch condition } } diff --git a/src/main/scala/ir/Program.scala b/src/main/scala/ir/Program.scala index c14ff8661..9d8e6f7aa 100644 --- a/src/main/scala/ir/Program.scala +++ b/src/main/scala/ir/Program.scala @@ -7,7 +7,7 @@ import analysis.BitVectorEval class Program(var procedures: ArrayBuffer[Procedure], var mainProcedure: Procedure, var initialMemory: ArrayBuffer[MemorySection], var readOnlyMemory: ArrayBuffer[MemorySection]) { - // This shouldn't be run before indirect calls are resolved? + // This shouldn't be run before indirect calls are resolved def stripUnreachableFunctions(): Unit = { val functionToChildren = procedures.map(f => f.name -> f.calls.map(_.name)).toMap @@ -170,13 +170,10 @@ class Procedure( } } visitedBlocks.add(b) - for (j <- b.jumps) { - j match { - case g: GoTo => visitBlock(g.target) - case d: DirectCall => d.returnTarget.foreach(visitBlock) - case i: IndirectCall => i.returnTarget.foreach(visitBlock) - case n: NonDetGoTo => n.targets.foreach(visitBlock) - } + b.jump match { + case g: GoTo => g.targets.foreach(visitBlock) + case d: DirectCall => d.returnTarget.foreach(visitBlock) + case i: IndirectCall => i.returnTarget.foreach(visitBlock) } } } @@ -187,17 +184,16 @@ class Block( var label: String, var address: Option[Int], var statements: ArrayBuffer[Statement], - var jumps: ArrayBuffer[Jump] + var jump: Jump ) { - def calls: Set[Procedure] = jumps.flatMap(_.calls).toSet + def calls: Set[Procedure] = jump.calls def modifies: Set[Global] = statements.flatMap(_.modifies).toSet //def locals: Set[Variable] = statements.flatMap(_.locals).toSet ++ jumps.flatMap(_.locals).toSet override def toString: String = { // display all statements and jumps val statementsString = statements.map(_.toString).mkString("\n") - val jumpsString = jumps.map(_.toString).mkString("\n") - s"Block $label with $statementsString\n$jumpsString" + s"Block $label with $statementsString\n$jump" } override def equals(obj: scala.Any): Boolean = diff --git a/src/main/scala/ir/Statement.scala b/src/main/scala/ir/Statement.scala index 07a65fe4b..935446d74 100644 --- a/src/main/scala/ir/Statement.scala +++ b/src/main/scala/ir/Statement.scala @@ -1,5 +1,7 @@ package ir +import scala.collection.mutable.ArrayBuffer + trait Command { val label: Option[String] def labelStr: String = label match { @@ -52,13 +54,16 @@ class Assert(var body: Expr, var comment: Option[String] = None, override val la object Assert: def unapply(a: Assert): Option[(Expr, Option[String], Option[String])] = Some(a.body, a.comment, a.label) -class Assume(var body: Expr, var comment: Option[String] = None, override val label: Option[String] = None) extends Statement { +/** + * checkSecurity is true if this is a branch condition that we want to assert has a security level of low before branching + * */ +class Assume(var body: Expr, var comment: Option[String] = None, override val label: Option[String] = None, var checkSecurity: Boolean = false) extends Statement { override def toString: String = s"${labelStr}assume $body" + comment.map(" //" + _) override def acceptVisit(visitor: Visitor): Statement = visitor.visitAssume(this) } object Assume: - def unapply(a: Assume): Option[(Expr, Option[String], Option[String])] = Some(a.body, a.comment, a.label) + def unapply(a: Assume): Option[(Expr, Option[String], Option[String], Boolean)] = Some(a.body, a.comment, a.label, a.checkSecurity) trait Jump extends Command { def modifies: Set[Global] = Set() @@ -67,23 +72,18 @@ trait Jump extends Command { def acceptVisit(visitor: Visitor): Jump = throw new Exception("visitor " + visitor + " unimplemented for: " + this) } -class GoTo(var target: Block, var condition: Option[Expr], override val label: Option[String] = None) extends Jump { +class GoTo(var targets: ArrayBuffer[Block], override val label: Option[String] = None) extends Jump { /* override def locals: Set[Variable] = condition match { case Some(c) => c.locals case None => Set() } */ - override def toString: String = s"${labelStr}GoTo(${target.label}, $condition)" + override def toString: String = s"${labelStr}GoTo(${targets.map(_.label).mkString(", ")})" override def acceptVisit(visitor: Visitor): Jump = visitor.visitGoTo(this) } object GoTo: - def unapply(g: GoTo): Option[(Block, Option[Expr], Option[String])] = Some(g.target, g.condition, g.label) - -class NonDetGoTo(var targets: Seq[Block], override val label: Option[String] = None) extends Jump { - override def toString: String = s"${labelStr}NonDetGoTo(${targets.map(_.label).mkString(", ")})" - override def acceptVisit(visitor: Visitor): Jump = visitor.visitNonDetGoTo(this) -} + def unapply(g: GoTo): Option[(ArrayBuffer[Block], Option[String])] = Some(g.targets, g.label) class DirectCall(var target: Procedure, var returnTarget: Option[Block], override val label: Option[String] = None) extends Jump { /* override def locals: Set[Variable] = condition match { diff --git a/src/main/scala/ir/Visitor.scala b/src/main/scala/ir/Visitor.scala index c121bfc4b..37768d1bd 100644 --- a/src/main/scala/ir/Visitor.scala +++ b/src/main/scala/ir/Visitor.scala @@ -34,11 +34,6 @@ abstract class Visitor { def visitJump(node: Jump): Jump = node.acceptVisit(this) def visitGoTo(node: GoTo): Jump = { - node.condition = node.condition.map(visitExpr) - node - } - - def visitNonDetGoTo(node: NonDetGoTo): Jump = { node } @@ -55,9 +50,7 @@ abstract class Visitor { for (i <- node.statements.indices) { node.statements(i) = visitStatement(node.statements(i)) } - for (i <- node.jumps.indices) { - node.jumps(i) = visitJump(node.jumps(i)) - } + node.jump = visitJump(node.jump) node } @@ -231,9 +224,7 @@ abstract class ReadOnlyVisitor extends Visitor { for (i <- node.statements) { visitStatement(i) } - for (i <- node.jumps) { - visitJump(i) - } + visitJump(node.jump) node } diff --git a/src/main/scala/translating/BAPToIR.scala b/src/main/scala/translating/BAPToIR.scala index 1ba1099d6..a601dd43e 100644 --- a/src/main/scala/translating/BAPToIR.scala +++ b/src/main/scala/translating/BAPToIR.scala @@ -1,8 +1,10 @@ package translating -import bap._ -import ir._ -import specification._ +import bap.* +import boogie.UnaryBExpr +import ir.{UnaryExpr, *} +import specification.* + import scala.collection.mutable import scala.collection.mutable.Map import scala.collection.mutable.ArrayBuffer @@ -17,8 +19,9 @@ class BAPToIR(var program: BAPProgram, mainAddress: Int) { val procedures: ArrayBuffer[Procedure] = ArrayBuffer() for (s <- program.subroutines) { val blocks: ArrayBuffer[Block] = ArrayBuffer() + val dummyJump = GoTo(ArrayBuffer(), None) for (b <- s.blocks) { - val block = Block(b.label, b.address, ArrayBuffer(), ArrayBuffer()) + val block = Block(b.label, b.address, ArrayBuffer(), dummyJump) blocks.append(block) labelToBlock.addOne(b.label, block) } @@ -39,14 +42,15 @@ class BAPToIR(var program: BAPProgram, mainAddress: Int) { } for (s <- program.subroutines) { + val procedure = nameToProcedure(s.name) for (b <- s.blocks) { val block = labelToBlock(b.label) for (st <- b.statements) { block.statements.append(translate(st)) } - for (j <- b.jumps) { - block.jumps.append(translate(j)) - } + val (jump, newBlocks) = translate(b.jumps, block) + block.jump = jump + procedure.blocks.addAll(newBlocks) } } @@ -64,59 +68,95 @@ class BAPToIR(var program: BAPProgram, mainAddress: Int) { case b: BAPLocalAssign => LocalAssign(b.lhs.toIR, b.rhs.toIR, Some(b.line)) } - private def translate(j: BAPJump) = j match { - case b: BAPDirectCall => - DirectCall( - nameToProcedure(b.target), - b.returnTarget.map(t => labelToBlock(t)), - Some(b.line) - ) - case b: BAPIndirectCall => - IndirectCall(b.target.toIR, b.returnTarget.map(t => labelToBlock(t)), Some(b.line)) - case b: BAPGoTo => - GoTo(labelToBlock(b.target), coerceToBool(b.condition), Some(b.line)) - } - /* - private def translate(e: BAPExpr) = e match { - case b: BAPConcat => BinaryExpr(BVCONCAT, left.toIR, right.toIR) - case b: BAPSignedExtend => - if (width > body.size) { - SignExtend(width - body.size, body.toIR) - } else { - BAPExtract(width - 1, 0, body).toIR - } - case b: BAPUnsignedExtend => - if (width > body.size) { - ZeroExtend(width - body.size, body.toIR) - } else { - BAPExtract(width - 1, 0, body).toIR - } - case b: BAPExtract => - val bodySize = body.size - if (size > bodySize) { - if (low == 0) { - ZeroExtend(size - bodySize, body.toIR) - } else { - Extract(high + 1, low, ZeroExtend(size - bodySize, body.toIR)) + /** + * Translates a list of jumps from BAP into a single Jump at the IR level by moving any conditions on jumps to + * Assume statements in new blocks + * */ + private def translate(jumps: List[BAPJump], block: Block): (Jump, ArrayBuffer[Block]) = { + if (jumps.size > 1) { + val targets = ArrayBuffer[Block]() + val conditions = ArrayBuffer[BAPExpr]() + val line = jumps.head.line + val newBlocks = ArrayBuffer[Block]() + for (j <- jumps) { + j match { + case b: BAPGoTo => + val target = labelToBlock(b.target) + b.condition match { + // condition is true + case l: BAPLiteral if l.value > BigInt(0) => + // condition is true and no previous conditions means no assume block needed + if (conditions.isEmpty) { + targets.append(target) + } else { + // condition is true and previous conditions existing means this condition + // is actually that all previous conditions are false + val conditionsIR = conditions.map(c => convertConditionBool(c, true)) + val condition = conditionsIR.tail.foldLeft(conditionsIR.head)((ands: Expr, next: Expr) => BinaryExpr(BoolAND, next, ands)) + val newBlock = newBlockCondition(block, target, condition) + newBlocks.append(newBlock) + targets.append(newBlock) + } + // non-true condition + case _ => + val currentCondition = convertConditionBool(b.condition, false) + val condition = if (conditions.isEmpty) { + // if this is the first condition then it is the only relevant part of the condition + currentCondition + } else { + // if this is not the first condition, then we need to need to add + // that all previous conditions are false + val conditionsIR = conditions.map(c => convertConditionBool(c, true)) + conditionsIR.tail.foldLeft(currentCondition)((ands: Expr, next: Expr) => BinaryExpr(BoolAND, next, ands)) + } + val newBlock = newBlockCondition(block, target, currentCondition) + newBlocks.append(newBlock) + targets.append(newBlock) + conditions.append(b.condition) + } + case _ => throw Exception("translation error, call where not expected: " + jumps.mkString(", ")) } - } else { - Extract(high + 1, low, body.toIR) } - case b: BAPLiteral => + (GoTo(targets, Some(line)), newBlocks) + } else { + jumps.head match { + case b: BAPDirectCall => + val call = DirectCall(nameToProcedure(b.target), b.returnTarget.map(t => labelToBlock(t)), Some(b.line)) + (call, ArrayBuffer()) + case b: BAPIndirectCall => + val call = IndirectCall(b.target.toIR, b.returnTarget.map(t => labelToBlock(t)), Some(b.line)) + (call, ArrayBuffer()) + case b: BAPGoTo => + val target = labelToBlock(b.target) + b.condition match { + // condition is true + case l: BAPLiteral if l.value > BigInt(0) => + (GoTo(ArrayBuffer(target), Some(b.line)), ArrayBuffer()) + // non-true condition + case _ => + val condition = convertConditionBool(b.condition, false) + val newBlock = newBlockCondition(block, target, condition) + (GoTo(ArrayBuffer(newBlock), Some(b.line)), ArrayBuffer(newBlock)) + } + } + } + } + /** + * Converts a BAPExpr condition that returns a bitvector of size 1 to an Expr condition that returns a Boolean + * + * If negative is true then the negation of the condition is returned + * */ + private def convertConditionBool(expr: BAPExpr, negative: Boolean): Expr = { + val op = if negative then BVEQ else BVNEQ + BinaryExpr(op, expr.toIR, BitVecLiteral(0, expr.size)) } - */ - private def coerceToBool(condition: BAPExpr): Option[Expr] = condition match { - case l: BAPLiteral if l.value > BigInt(0) => - None - case _ => - val c = condition.toIR - c.getType match { - case BoolType => Some(c) - case bv: BitVecType => Some(BinaryExpr(BVNEQ, c, BitVecLiteral(0, bv.size))) - case _ => ??? - } + private def newBlockCondition(block: Block, target: Block, condition: Expr): Block = { + val newLabel = s"${block.label}_goto_${target.label}" + val assume = Assume(condition, checkSecurity = true) + Block(newLabel, None, ArrayBuffer(assume), GoTo(ArrayBuffer(target), None)) } + } diff --git a/src/main/scala/translating/ILtoIL.scala b/src/main/scala/translating/ILtoIL.scala index 18cfa8d57..bcc818634 100644 --- a/src/main/scala/translating/ILtoIL.scala +++ b/src/main/scala/translating/ILtoIL.scala @@ -63,11 +63,7 @@ private class ILSerialiser extends ReadOnlyVisitor { override def visitGoTo(node: GoTo): Jump = { program ++= "GoTo(" // TODO - program ++= blockIdentifier(node.target) - program ++= ", " - program ++= "condition(" - node.condition.map(visitExpr) - program ++= ")" // Condition + program ++= node.targets.map(blockIdentifier).mkString(", ") program ++= ")" // GoTo node } @@ -104,14 +100,9 @@ private class ILSerialiser extends ReadOnlyVisitor { indentLevel -= 1 program ++= getIndent() + "),\n" program ++= getIndent() + "jumps(\n" - indentLevel += 1 - for (j <- node.jumps) { - program ++= getIndent() - visitJump(j) - program ++= "\n" - } - indentLevel -= 1 - program ++= getIndent() + ")\n" + program ++= getIndent() + visitJump(node.jump) + program ++= ")\n" indentLevel -= 1 program ++= getIndent() program ++= ")\n" diff --git a/src/main/scala/translating/IRToBoogie.scala b/src/main/scala/translating/IRToBoogie.scala index a20f63aa6..42d1b14d5 100644 --- a/src/main/scala/translating/IRToBoogie.scala +++ b/src/main/scala/translating/IRToBoogie.scala @@ -387,8 +387,7 @@ class IRToBoogie(var program: Program, var spec: Specification) { def translateBlock(b: Block): BBlock = { val captureState = captureStateStatement(s"${b.label}") - val cmds = List(captureState) - ++ (b.statements.flatMap(s => translate(s)) ++ b.jumps.flatMap(j => translate(j))) + val cmds = List(captureState) ++ (b.statements.flatMap(s => translate(s)) ++ translate(b.jump)) BBlock(b.label, cmds) } @@ -413,16 +412,21 @@ class IRToBoogie(var program: Program, var spec: Specification) { } } case g: GoTo => - g.condition match { - case Some(c) => - val guard = c.toBoogie - val guardGamma = c.toGamma - List(BAssert(guardGamma), IfCmd(guard, List(GoToCmd(Seq(g.target.label))))) - case None => - List(GoToCmd(Seq(g.target.label))) + // collects all targets of the goto with a branch condition that we need to check the security level for + // and collects the variables for that + val conditions = g.targets.flatMap(_.statements.headOption).collect { case a: Assume if a.checkSecurity => a } + val conditionVariables = conditions.flatMap(_.body.variables).distinct + val gammas = conditionVariables.map(_.toGamma).sorted + val conditionAssert: List[BCmd] = if (gammas.size > 1) { + val andedConditions = gammas.tail.foldLeft(gammas.head)((ands: BExpr, next: BExpr) => BinaryBExpr(BoolAND, ands, next)) + List(BAssert(andedConditions)) + } else if (gammas.size == 1) { + List(BAssert(gammas.head)) + } else { + Nil } - case n: NonDetGoTo => - List(GoToCmd(n.targets.map(_.label))) + val jump = GoToCmd(g.targets.map(_.label).toSeq) + conditionAssert :+ jump } def translate(s: Statement): List[BCmd] = s match { diff --git a/src/main/scala/util/RunUtils.scala b/src/main/scala/util/RunUtils.scala index 4e29d94c0..bcc90b7c7 100644 --- a/src/main/scala/util/RunUtils.scala +++ b/src/main/scala/util/RunUtils.scala @@ -315,7 +315,7 @@ object RunUtils { val block = c.block c.data match case indirectCall: IndirectCall => - if (!block.jumps.contains(indirectCall)) { + if (block.jump != indirectCall) { // We only replace the calls with DirectCalls in the IR, and don't replace the CommandNode.data // Hence if we have already processed this CFG node there will be no corresponding IndirectCall in the IR // to replace. @@ -327,22 +327,21 @@ object RunUtils { val targets = targetNames.map(name => IRProgram.procedures.filter(_.name.equals(name)).head) if (targets.size == 1) { modified = true - val newCall = DirectCall(targets.head, indirectCall.returnTarget) - block.jumps.remove(block.jumps.indexOf(indirectCall)) - block.jumps.append(newCall) + val newCall = DirectCall(targets.head, indirectCall.returnTarget, indirectCall.label) + block.jump = newCall } else if (targets.size > 1) { modified = true val procedure = c.parent.data - val newBlocks = for (t <- targets) yield { + val newBlocks = ArrayBuffer[Block]() + for (t <- targets) { val assume = Assume(BinaryExpr(BVEQ, indirectCall.target, BitVecLiteral(t.address.get, 64))) val newLabel: String = block.label + t.name val directCall = DirectCall(t, indirectCall.returnTarget) - Block(newLabel, None, ArrayBuffer(assume), ArrayBuffer(directCall)) + newBlocks.append(Block(newLabel, None, ArrayBuffer(assume), directCall)) } procedure.blocks.addAll(newBlocks) - block.jumps.remove(block.jumps.indexOf(indirectCall)) - val newCall = NonDetGoTo(newBlocks) - block.jumps.append(newCall) + val newCall = GoTo(newBlocks, indirectCall.label) + block.jump = newCall } case _ => case _ => diff --git a/src/test/correct/basic_function_call_reader/clang/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/clang/basic_function_call_reader.expected index 74f5ae7ad..e7add125d 100644 --- a/src/test/correct/basic_function_call_reader/clang/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/clang/basic_function_call_reader.expected @@ -233,10 +233,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000342; - } - goto l00000345; + goto lmain_goto_l00000342, lmain_goto_l00000345; l00000345: assume {:captureState "l00000345"} true; R8, Gamma_R8 := 1bv64, true; @@ -248,10 +245,7 @@ procedure main() l00000348: assume {:captureState "l00000348"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000350; - } - goto l0000037a; + goto l00000348_goto_l00000350, l00000348_goto_l0000037a; l00000350: assume {:captureState "l00000350"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -271,4 +265,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000342: + assume {:captureState "lmain_goto_l00000342"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000342; + lmain_goto_l00000345: + assume {:captureState "lmain_goto_l00000345"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000345; + l00000348_goto_l00000350: + assume {:captureState "l00000348_goto_l00000350"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000350; + l00000348_goto_l0000037a: + assume {:captureState "l00000348_goto_l0000037a"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000037a; } diff --git a/src/test/correct/basic_function_call_reader/clang_O2/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/clang_O2/basic_function_call_reader.expected index 83a41ea67..49025abea 100644 --- a/src/test/correct/basic_function_call_reader/clang_O2/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/clang_O2/basic_function_call_reader.expected @@ -215,10 +215,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000002f9; - } - goto l000002fd; + goto lmain_goto_l000002f9, lmain_goto_l000002fd; l000002fd: assume {:captureState "l000002fd"} true; R0, Gamma_R0 := zero_extend32_32(R9[32:0]), Gamma_R9; @@ -230,4 +227,12 @@ procedure main() l00000300: assume {:captureState "l00000300"} true; return; + lmain_goto_l000002f9: + assume {:captureState "lmain_goto_l000002f9"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000002f9; + lmain_goto_l000002fd: + assume {:captureState "lmain_goto_l000002fd"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000002fd; } diff --git a/src/test/correct/basic_function_call_reader/clang_no_plt_no_pic/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/clang_no_plt_no_pic/basic_function_call_reader.expected index a14b648f6..80fd49730 100644 --- a/src/test/correct/basic_function_call_reader/clang_no_plt_no_pic/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/clang_no_plt_no_pic/basic_function_call_reader.expected @@ -233,10 +233,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000985; - } - goto l00000988; + goto lmain_goto_l00000985, lmain_goto_l00000988; l00000988: assume {:captureState "l00000988"} true; R8, Gamma_R8 := 1bv64, true; @@ -248,10 +245,7 @@ procedure main() l0000098b: assume {:captureState "l0000098b"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000993; - } - goto l000009bd; + goto l0000098b_goto_l00000993, l0000098b_goto_l000009bd; l00000993: assume {:captureState "l00000993"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -271,4 +265,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000985: + assume {:captureState "lmain_goto_l00000985"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000985; + lmain_goto_l00000988: + assume {:captureState "lmain_goto_l00000988"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000988; + l0000098b_goto_l00000993: + assume {:captureState "l0000098b_goto_l00000993"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000993; + l0000098b_goto_l000009bd: + assume {:captureState "l0000098b_goto_l000009bd"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l000009bd; } diff --git a/src/test/correct/basic_function_call_reader/clang_pic/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/clang_pic/basic_function_call_reader.expected index ec772c91a..4ade8ab46 100644 --- a/src/test/correct/basic_function_call_reader/clang_pic/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/clang_pic/basic_function_call_reader.expected @@ -293,10 +293,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000358; - } - goto l0000035b; + goto lmain_goto_l00000358, lmain_goto_l0000035b; l0000035b: assume {:captureState "l0000035b"} true; R8, Gamma_R8 := 1bv64, true; @@ -308,10 +305,7 @@ procedure main() l0000035e: assume {:captureState "l0000035e"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000366; - } - goto l00000390; + goto l0000035e_goto_l00000366, l0000035e_goto_l00000390; l00000366: assume {:captureState "l00000366"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -331,4 +325,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000358: + assume {:captureState "lmain_goto_l00000358"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000358; + lmain_goto_l0000035b: + assume {:captureState "lmain_goto_l0000035b"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000035b; + l0000035e_goto_l00000366: + assume {:captureState "l0000035e_goto_l00000366"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000366; + l0000035e_goto_l00000390: + assume {:captureState "l0000035e_goto_l00000390"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000390; } diff --git a/src/test/correct/basic_function_call_reader/gcc/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/gcc/basic_function_call_reader.expected index b2e35d098..f9c7deafc 100644 --- a/src/test/correct/basic_function_call_reader/gcc/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/gcc/basic_function_call_reader.expected @@ -230,10 +230,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000332; - } - goto l00000349; + goto lmain_goto_l00000332, lmain_goto_l00000349; l00000332: assume {:captureState "l00000332"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); @@ -246,4 +243,12 @@ procedure main() assume {:captureState "l0000033e"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000332: + assume {:captureState "lmain_goto_l00000332"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000332; + lmain_goto_l00000349: + assume {:captureState "lmain_goto_l00000349"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000349; } diff --git a/src/test/correct/basic_function_call_reader/gcc_O2/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/gcc_O2/basic_function_call_reader.expected index 19620ad7e..ad0366224 100644 --- a/src/test/correct/basic_function_call_reader/gcc_O2/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/gcc_O2/basic_function_call_reader.expected @@ -189,10 +189,7 @@ procedure main() call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R0, 20bv64))), (gamma_load32(Gamma_mem, bvadd64(R0, 20bv64)) || L(mem, bvadd64(R0, 20bv64))); assert Gamma_R0; - if ((bvcomp32(R0[32:0], 0bv32) != 0bv1)) { - goto l000001bc; - } - goto l00000398; + goto lmain_goto_l000001bc, lmain_goto_l00000398; l00000398: assume {:captureState "l00000398"} true; call rely(); @@ -201,4 +198,12 @@ procedure main() l000001bc: assume {:captureState "l000001bc"} true; return; + lmain_goto_l000001bc: + assume {:captureState "lmain_goto_l000001bc"} true; + assume (bvcomp32(R0[32:0], 0bv32) != 0bv1); + goto l000001bc; + lmain_goto_l00000398: + assume {:captureState "lmain_goto_l00000398"} true; + assume (bvcomp32(R0[32:0], 0bv32) == 0bv1); + goto l00000398; } diff --git a/src/test/correct/basic_function_call_reader/gcc_no_plt_no_pic/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/gcc_no_plt_no_pic/basic_function_call_reader.expected index af2fdf5d3..d417cea69 100644 --- a/src/test/correct/basic_function_call_reader/gcc_no_plt_no_pic/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/gcc_no_plt_no_pic/basic_function_call_reader.expected @@ -230,10 +230,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000937; - } - goto l0000094e; + goto lmain_goto_l00000937, lmain_goto_l0000094e; l00000937: assume {:captureState "l00000937"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); @@ -246,4 +243,12 @@ procedure main() assume {:captureState "l00000943"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000937: + assume {:captureState "lmain_goto_l00000937"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000937; + lmain_goto_l0000094e: + assume {:captureState "lmain_goto_l0000094e"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000094e; } diff --git a/src/test/correct/basic_function_call_reader/gcc_pic/basic_function_call_reader.expected b/src/test/correct/basic_function_call_reader/gcc_pic/basic_function_call_reader.expected index fd8a35964..60dcad679 100644 --- a/src/test/correct/basic_function_call_reader/gcc_pic/basic_function_call_reader.expected +++ b/src/test/correct/basic_function_call_reader/gcc_pic/basic_function_call_reader.expected @@ -288,10 +288,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000334; - } - goto l0000034b; + goto lmain_goto_l00000334, lmain_goto_l0000034b; l00000334: assume {:captureState "l00000334"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); @@ -304,4 +301,12 @@ procedure main() assume {:captureState "l00000340"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000334: + assume {:captureState "lmain_goto_l00000334"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000334; + lmain_goto_l0000034b: + assume {:captureState "lmain_goto_l0000034b"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000034b; } diff --git a/src/test/correct/basic_lock_read/clang/basic_lock_read.expected b/src/test/correct/basic_lock_read/clang/basic_lock_read.expected index 3fe582cff..9a12d05e8 100644 --- a/src/test/correct/basic_lock_read/clang/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/clang/basic_lock_read.expected @@ -228,10 +228,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l0000032d; - } - goto l00000330; + goto lmain_goto_l0000032d, lmain_goto_l00000330; l00000330: assume {:captureState "l00000330"} true; R8, Gamma_R8 := 1bv64, true; @@ -243,10 +240,7 @@ procedure main() l00000333: assume {:captureState "l00000333"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l0000033b; - } - goto l00000352; + goto l00000333_goto_l0000033b, l00000333_goto_l00000352; l00000352: assume {:captureState "l00000352"} true; goto l00000353; @@ -269,4 +263,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l0000032d: + assume {:captureState "lmain_goto_l0000032d"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000032d; + lmain_goto_l00000330: + assume {:captureState "lmain_goto_l00000330"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000330; + l00000333_goto_l0000033b: + assume {:captureState "l00000333_goto_l0000033b"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l0000033b; + l00000333_goto_l00000352: + assume {:captureState "l00000333_goto_l00000352"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000352; } diff --git a/src/test/correct/basic_lock_read/clang_O2/basic_lock_read.expected b/src/test/correct/basic_lock_read/clang_O2/basic_lock_read.expected index 1a13cddb4..cddb678c2 100644 --- a/src/test/correct/basic_lock_read/clang_O2/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/clang_O2/basic_lock_read.expected @@ -194,10 +194,7 @@ procedure main() call rely(); R8, Gamma_R8 := zero_extend32_32(memory_load32_le(mem, bvadd64(R8, 52bv64))), (gamma_load32(Gamma_mem, bvadd64(R8, 52bv64)) || L(mem, bvadd64(R8, 52bv64))); assert Gamma_R8; - if ((bvcomp32(R8[32:0], 0bv32) != 0bv1)) { - goto l000002dc; - } - goto l000002f7; + goto lmain_goto_l000002dc, lmain_goto_l000002f7; l000002dc: assume {:captureState "l000002dc"} true; R8, Gamma_R8 := 69632bv64, true; @@ -213,4 +210,12 @@ procedure main() assume {:captureState "l000002f7"} true; R0, Gamma_R0 := 0bv64, true; return; + lmain_goto_l000002dc: + assume {:captureState "lmain_goto_l000002dc"} true; + assume (bvcomp32(R8[32:0], 0bv32) != 0bv1); + goto l000002dc; + lmain_goto_l000002f7: + assume {:captureState "lmain_goto_l000002f7"} true; + assume (bvcomp32(R8[32:0], 0bv32) == 0bv1); + goto l000002f7; } diff --git a/src/test/correct/basic_lock_read/clang_no_plt_no_pic/basic_lock_read.expected b/src/test/correct/basic_lock_read/clang_no_plt_no_pic/basic_lock_read.expected index ad72f3b57..31eb2d168 100644 --- a/src/test/correct/basic_lock_read/clang_no_plt_no_pic/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/clang_no_plt_no_pic/basic_lock_read.expected @@ -228,10 +228,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000958; - } - goto l0000095b; + goto lmain_goto_l00000958, lmain_goto_l0000095b; l0000095b: assume {:captureState "l0000095b"} true; R8, Gamma_R8 := 1bv64, true; @@ -243,10 +240,7 @@ procedure main() l0000095e: assume {:captureState "l0000095e"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000966; - } - goto l0000097d; + goto l0000095e_goto_l00000966, l0000095e_goto_l0000097d; l0000097d: assume {:captureState "l0000097d"} true; goto l0000097e; @@ -269,4 +263,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000958: + assume {:captureState "lmain_goto_l00000958"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000958; + lmain_goto_l0000095b: + assume {:captureState "lmain_goto_l0000095b"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000095b; + l0000095e_goto_l00000966: + assume {:captureState "l0000095e_goto_l00000966"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000966; + l0000095e_goto_l0000097d: + assume {:captureState "l0000095e_goto_l0000097d"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000097d; } diff --git a/src/test/correct/basic_lock_read/clang_pic/basic_lock_read.expected b/src/test/correct/basic_lock_read/clang_pic/basic_lock_read.expected index 0655b008a..e7ccaa507 100644 --- a/src/test/correct/basic_lock_read/clang_pic/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/clang_pic/basic_lock_read.expected @@ -286,10 +286,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l0000033c; - } - goto l0000033f; + goto lmain_goto_l0000033c, lmain_goto_l0000033f; l0000033f: assume {:captureState "l0000033f"} true; R8, Gamma_R8 := 1bv64, true; @@ -301,10 +298,7 @@ procedure main() l00000342: assume {:captureState "l00000342"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l0000034a; - } - goto l00000361; + goto l00000342_goto_l0000034a, l00000342_goto_l00000361; l00000361: assume {:captureState "l00000361"} true; goto l00000362; @@ -329,4 +323,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l0000033c: + assume {:captureState "lmain_goto_l0000033c"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000033c; + lmain_goto_l0000033f: + assume {:captureState "lmain_goto_l0000033f"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000033f; + l00000342_goto_l0000034a: + assume {:captureState "l00000342_goto_l0000034a"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l0000034a; + l00000342_goto_l00000361: + assume {:captureState "l00000342_goto_l00000361"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000361; } diff --git a/src/test/correct/basic_lock_read/gcc/basic_lock_read.expected b/src/test/correct/basic_lock_read/gcc/basic_lock_read.expected index b5874be65..f3d1f915f 100644 --- a/src/test/correct/basic_lock_read/gcc/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/gcc/basic_lock_read.expected @@ -224,10 +224,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000327; - } - goto l0000033e; + goto lmain_goto_l00000327, lmain_goto_l0000033e; l0000033e: assume {:captureState "l0000033e"} true; R0, Gamma_R0 := 69632bv64, true; @@ -250,4 +247,12 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000327: + assume {:captureState "lmain_goto_l00000327"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000327; + lmain_goto_l0000033e: + assume {:captureState "lmain_goto_l0000033e"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000033e; } diff --git a/src/test/correct/basic_lock_read/gcc_O2/basic_lock_read.expected b/src/test/correct/basic_lock_read/gcc_O2/basic_lock_read.expected index 72aeca101..269cc87f0 100644 --- a/src/test/correct/basic_lock_read/gcc_O2/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/gcc_O2/basic_lock_read.expected @@ -196,10 +196,7 @@ procedure main() call rely(); R0, Gamma_R0 := zero_extend32_32(memory_load32_le(mem, bvadd64(R0, 20bv64))), (gamma_load32(Gamma_mem, bvadd64(R0, 20bv64)) || L(mem, bvadd64(R0, 20bv64))); assert Gamma_R0; - if ((bvnot1(bvcomp32(R0[32:0], 0bv32)) != 0bv1)) { - goto l000001bd; - } - goto l0000039c; + goto lmain_goto_l000001bd, lmain_goto_l0000039c; l0000039c: assume {:captureState "l0000039c"} true; call rely(); @@ -213,4 +210,12 @@ procedure main() assume {:captureState "l000001bd"} true; R0, Gamma_R0 := 0bv64, true; return; + lmain_goto_l000001bd: + assume {:captureState "lmain_goto_l000001bd"} true; + assume (bvnot1(bvcomp32(R0[32:0], 0bv32)) != 0bv1); + goto l000001bd; + lmain_goto_l0000039c: + assume {:captureState "lmain_goto_l0000039c"} true; + assume (bvnot1(bvcomp32(R0[32:0], 0bv32)) == 0bv1); + goto l0000039c; } diff --git a/src/test/correct/basic_lock_read/gcc_no_plt_no_pic/basic_lock_read.expected b/src/test/correct/basic_lock_read/gcc_no_plt_no_pic/basic_lock_read.expected index 4af98550b..9156594f7 100644 --- a/src/test/correct/basic_lock_read/gcc_no_plt_no_pic/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/gcc_no_plt_no_pic/basic_lock_read.expected @@ -224,10 +224,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000948; - } - goto l0000095f; + goto lmain_goto_l00000948, lmain_goto_l0000095f; l0000095f: assume {:captureState "l0000095f"} true; R0, Gamma_R0 := 69632bv64, true; @@ -250,4 +247,12 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000948: + assume {:captureState "lmain_goto_l00000948"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000948; + lmain_goto_l0000095f: + assume {:captureState "lmain_goto_l0000095f"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000095f; } diff --git a/src/test/correct/basic_lock_read/gcc_pic/basic_lock_read.expected b/src/test/correct/basic_lock_read/gcc_pic/basic_lock_read.expected index 4b06ef422..6146649e8 100644 --- a/src/test/correct/basic_lock_read/gcc_pic/basic_lock_read.expected +++ b/src/test/correct/basic_lock_read/gcc_pic/basic_lock_read.expected @@ -281,10 +281,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000328; - } - goto l0000033f; + goto lmain_goto_l00000328, lmain_goto_l0000033f; l0000033f: assume {:captureState "l0000033f"} true; R0, Gamma_R0 := 65536bv64, true; @@ -309,4 +306,12 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000328: + assume {:captureState "lmain_goto_l00000328"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000328; + lmain_goto_l0000033f: + assume {:captureState "lmain_goto_l0000033f"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000033f; } diff --git a/src/test/correct/basic_lock_security_read/clang/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/clang/basic_lock_security_read.expected index 2aba48461..09f70f03f 100644 --- a/src/test/correct/basic_lock_security_read/clang/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/clang/basic_lock_security_read.expected @@ -226,10 +226,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000329; - } - goto l0000032c; + goto lmain_goto_l00000329, lmain_goto_l0000032c; l0000032c: assume {:captureState "l0000032c"} true; R8, Gamma_R8 := 1bv64, true; @@ -241,10 +238,7 @@ procedure main() l0000032f: assume {:captureState "l0000032f"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000337; - } - goto l0000034e; + goto l0000032f_goto_l00000337, l0000032f_goto_l0000034e; l0000034e: assume {:captureState "l0000034e"} true; goto l0000034f; @@ -261,4 +255,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000329: + assume {:captureState "lmain_goto_l00000329"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000329; + lmain_goto_l0000032c: + assume {:captureState "lmain_goto_l0000032c"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000032c; + l0000032f_goto_l00000337: + assume {:captureState "l0000032f_goto_l00000337"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000337; + l0000032f_goto_l0000034e: + assume {:captureState "l0000032f_goto_l0000034e"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000034e; } diff --git a/src/test/correct/basic_lock_security_read/clang_O2/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/clang_O2/basic_lock_security_read.expected index ac7bd7571..a2f10d1ca 100644 --- a/src/test/correct/basic_lock_security_read/clang_O2/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/clang_O2/basic_lock_security_read.expected @@ -211,10 +211,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000002fa; - } - goto l000002fd; + goto lmain_goto_l000002fa, lmain_goto_l000002fd; l000002fd: assume {:captureState "l000002fd"} true; R0, Gamma_R0 := 0bv64, true; @@ -226,4 +223,12 @@ procedure main() l00000300: assume {:captureState "l00000300"} true; return; + lmain_goto_l000002fa: + assume {:captureState "lmain_goto_l000002fa"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000002fa; + lmain_goto_l000002fd: + assume {:captureState "lmain_goto_l000002fd"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000002fd; } diff --git a/src/test/correct/basic_lock_security_read/clang_no_plt_no_pic/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/clang_no_plt_no_pic/basic_lock_security_read.expected index 3fc858b76..d4c28b724 100644 --- a/src/test/correct/basic_lock_security_read/clang_no_plt_no_pic/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/clang_no_plt_no_pic/basic_lock_security_read.expected @@ -226,10 +226,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000947; - } - goto l0000094a; + goto lmain_goto_l00000947, lmain_goto_l0000094a; l0000094a: assume {:captureState "l0000094a"} true; R8, Gamma_R8 := 1bv64, true; @@ -241,10 +238,7 @@ procedure main() l0000094d: assume {:captureState "l0000094d"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000955; - } - goto l0000096c; + goto l0000094d_goto_l00000955, l0000094d_goto_l0000096c; l0000096c: assume {:captureState "l0000096c"} true; goto l0000096d; @@ -261,4 +255,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000947: + assume {:captureState "lmain_goto_l00000947"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000947; + lmain_goto_l0000094a: + assume {:captureState "lmain_goto_l0000094a"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000094a; + l0000094d_goto_l00000955: + assume {:captureState "l0000094d_goto_l00000955"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000955; + l0000094d_goto_l0000096c: + assume {:captureState "l0000094d_goto_l0000096c"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000096c; } diff --git a/src/test/correct/basic_lock_security_read/clang_pic/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/clang_pic/basic_lock_security_read.expected index 695fc0d48..0b25229ee 100644 --- a/src/test/correct/basic_lock_security_read/clang_pic/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/clang_pic/basic_lock_security_read.expected @@ -284,10 +284,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000338; - } - goto l0000033b; + goto lmain_goto_l00000338, lmain_goto_l0000033b; l0000033b: assume {:captureState "l0000033b"} true; R8, Gamma_R8 := 1bv64, true; @@ -299,10 +296,7 @@ procedure main() l0000033e: assume {:captureState "l0000033e"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000346; - } - goto l0000035d; + goto l0000033e_goto_l00000346, l0000033e_goto_l0000035d; l0000035d: assume {:captureState "l0000035d"} true; goto l0000035e; @@ -321,4 +315,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000338: + assume {:captureState "lmain_goto_l00000338"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000338; + lmain_goto_l0000033b: + assume {:captureState "lmain_goto_l0000033b"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000033b; + l0000033e_goto_l00000346: + assume {:captureState "l0000033e_goto_l00000346"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000346; + l0000033e_goto_l0000035d: + assume {:captureState "l0000033e_goto_l0000035d"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000035d; } diff --git a/src/test/correct/basic_lock_security_read/gcc/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/gcc/basic_lock_security_read.expected index 9006b9cff..634a9333e 100644 --- a/src/test/correct/basic_lock_security_read/gcc/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/gcc/basic_lock_security_read.expected @@ -222,10 +222,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l0000031b; - } - goto l00000332; + goto lmain_goto_l0000031b, lmain_goto_l00000332; l00000332: assume {:captureState "l00000332"} true; R0, Gamma_R0 := 69632bv64, true; @@ -240,4 +237,12 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l0000031b: + assume {:captureState "lmain_goto_l0000031b"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000031b; + lmain_goto_l00000332: + assume {:captureState "lmain_goto_l00000332"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000332; } diff --git a/src/test/correct/basic_lock_security_read/gcc_O2/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/gcc_O2/basic_lock_security_read.expected index e446b0b58..e439d3e8c 100644 --- a/src/test/correct/basic_lock_security_read/gcc_O2/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/gcc_O2/basic_lock_security_read.expected @@ -189,10 +189,7 @@ procedure main() call rely(); R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 20bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 20bv64)) || L(mem, bvadd64(R1, 20bv64))); assert Gamma_R1; - if ((bvnot1(bvcomp32(R1[32:0], 0bv32)) != 0bv1)) { - goto l000001c2; - } - goto l0000039c; + goto lmain_goto_l000001c2, lmain_goto_l0000039c; l0000039c: assume {:captureState "l0000039c"} true; call rely(); @@ -201,4 +198,12 @@ procedure main() l000001c2: assume {:captureState "l000001c2"} true; return; + lmain_goto_l000001c2: + assume {:captureState "lmain_goto_l000001c2"} true; + assume (bvnot1(bvcomp32(R1[32:0], 0bv32)) != 0bv1); + goto l000001c2; + lmain_goto_l0000039c: + assume {:captureState "lmain_goto_l0000039c"} true; + assume (bvnot1(bvcomp32(R1[32:0], 0bv32)) == 0bv1); + goto l0000039c; } diff --git a/src/test/correct/basic_lock_security_read/gcc_no_plt_no_pic/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/gcc_no_plt_no_pic/basic_lock_security_read.expected index 69a940ab5..2a17426c5 100644 --- a/src/test/correct/basic_lock_security_read/gcc_no_plt_no_pic/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/gcc_no_plt_no_pic/basic_lock_security_read.expected @@ -222,10 +222,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000918; - } - goto l0000092f; + goto lmain_goto_l00000918, lmain_goto_l0000092f; l0000092f: assume {:captureState "l0000092f"} true; R0, Gamma_R0 := 69632bv64, true; @@ -240,4 +237,12 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000918: + assume {:captureState "lmain_goto_l00000918"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000918; + lmain_goto_l0000092f: + assume {:captureState "lmain_goto_l0000092f"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000092f; } diff --git a/src/test/correct/basic_lock_security_read/gcc_pic/basic_lock_security_read.expected b/src/test/correct/basic_lock_security_read/gcc_pic/basic_lock_security_read.expected index ad3910528..32ac0823c 100644 --- a/src/test/correct/basic_lock_security_read/gcc_pic/basic_lock_security_read.expected +++ b/src/test/correct/basic_lock_security_read/gcc_pic/basic_lock_security_read.expected @@ -279,10 +279,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l0000031c; - } - goto l00000333; + goto lmain_goto_l0000031c, lmain_goto_l00000333; l00000333: assume {:captureState "l00000333"} true; R0, Gamma_R0 := 65536bv64, true; @@ -298,4 +295,12 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l0000031c: + assume {:captureState "lmain_goto_l0000031c"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000031c; + lmain_goto_l00000333: + assume {:captureState "lmain_goto_l00000333"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000333; } diff --git a/src/test/correct/basic_operation_evaluation/clang/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/clang/basic_operation_evaluation.expected index ae3f7c2f7..1b7086b6a 100644 --- a/src/test/correct/basic_operation_evaluation/clang/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/clang/basic_operation_evaluation.expected @@ -254,10 +254,7 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R10, Gamma_R10 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); assert Gamma_R10; - if ((bvcomp32(R10[32:0], 0bv32) != 0bv1)) { - goto l000003c9; - } - goto l000003ce; + goto lmain_goto_l000003c9, lmain_goto_l000003ce; l000003ce: assume {:captureState "l000003ce"} true; R9, Gamma_R9 := zero_extend32_32(bvsdiv33(sign_extend1_32(R8[32:0]), sign_extend1_32(R10[32:0]))[32:0]), (Gamma_R10 && Gamma_R8); @@ -280,4 +277,12 @@ procedure main() assume {:captureState "%00000407"} true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l000003c9: + assume {:captureState "lmain_goto_l000003c9"} true; + assume (bvcomp32(R10[32:0], 0bv32) != 0bv1); + goto l000003c9; + lmain_goto_l000003ce: + assume {:captureState "lmain_goto_l000003ce"} true; + assume (bvcomp32(R10[32:0], 0bv32) == 0bv1); + goto l000003ce; } diff --git a/src/test/correct/basic_operation_evaluation/clang_no_plt_no_pic/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/clang_no_plt_no_pic/basic_operation_evaluation.expected index c41cd5c12..69b3dc72e 100644 --- a/src/test/correct/basic_operation_evaluation/clang_no_plt_no_pic/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/clang_no_plt_no_pic/basic_operation_evaluation.expected @@ -254,10 +254,7 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R10, Gamma_R10 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); assert Gamma_R10; - if ((bvcomp32(R10[32:0], 0bv32) != 0bv1)) { - goto l00000aac; - } - goto l00000ab1; + goto lmain_goto_l00000aac, lmain_goto_l00000ab1; l00000ab1: assume {:captureState "l00000ab1"} true; R9, Gamma_R9 := zero_extend32_32(bvsdiv33(sign_extend1_32(R8[32:0]), sign_extend1_32(R10[32:0]))[32:0]), (Gamma_R10 && Gamma_R8); @@ -280,4 +277,12 @@ procedure main() assume {:captureState "%00000aea"} true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l00000aac: + assume {:captureState "lmain_goto_l00000aac"} true; + assume (bvcomp32(R10[32:0], 0bv32) != 0bv1); + goto l00000aac; + lmain_goto_l00000ab1: + assume {:captureState "lmain_goto_l00000ab1"} true; + assume (bvcomp32(R10[32:0], 0bv32) == 0bv1); + goto l00000ab1; } diff --git a/src/test/correct/basic_operation_evaluation/clang_pic/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/clang_pic/basic_operation_evaluation.expected index c41cd5c12..69b3dc72e 100644 --- a/src/test/correct/basic_operation_evaluation/clang_pic/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/clang_pic/basic_operation_evaluation.expected @@ -254,10 +254,7 @@ procedure main() R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R10, Gamma_R10 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); assert Gamma_R10; - if ((bvcomp32(R10[32:0], 0bv32) != 0bv1)) { - goto l00000aac; - } - goto l00000ab1; + goto lmain_goto_l00000aac, lmain_goto_l00000ab1; l00000ab1: assume {:captureState "l00000ab1"} true; R9, Gamma_R9 := zero_extend32_32(bvsdiv33(sign_extend1_32(R8[32:0]), sign_extend1_32(R10[32:0]))[32:0]), (Gamma_R10 && Gamma_R8); @@ -280,4 +277,12 @@ procedure main() assume {:captureState "%00000aea"} true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l00000aac: + assume {:captureState "lmain_goto_l00000aac"} true; + assume (bvcomp32(R10[32:0], 0bv32) != 0bv1); + goto l00000aac; + lmain_goto_l00000ab1: + assume {:captureState "lmain_goto_l00000ab1"} true; + assume (bvcomp32(R10[32:0], 0bv32) == 0bv1); + goto l00000ab1; } diff --git a/src/test/correct/basic_operation_evaluation/gcc/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/gcc/basic_operation_evaluation.expected index 2689978a8..255fa84d0 100644 --- a/src/test/correct/basic_operation_evaluation/gcc/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/gcc/basic_operation_evaluation.expected @@ -230,10 +230,7 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 20bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 20bv64)); R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 24bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 24bv64)); assert Gamma_R1; - if ((bvcomp32(R1[32:0], 0bv32) != 0bv1)) { - goto l000003b3; - } - goto l000003b8; + goto lmain_goto_l000003b3, lmain_goto_l000003b8; l000003b8: assume {:captureState "l000003b8"} true; R2, Gamma_R2 := zero_extend32_32(bvsdiv33(sign_extend1_32(R0[32:0]), sign_extend1_32(R1[32:0]))[32:0]), (Gamma_R1 && Gamma_R0); @@ -252,4 +249,12 @@ procedure main() R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l000003b3: + assume {:captureState "lmain_goto_l000003b3"} true; + assume (bvcomp32(R1[32:0], 0bv32) != 0bv1); + goto l000003b3; + lmain_goto_l000003b8: + assume {:captureState "lmain_goto_l000003b8"} true; + assume (bvcomp32(R1[32:0], 0bv32) == 0bv1); + goto l000003b8; } diff --git a/src/test/correct/basic_operation_evaluation/gcc_no_plt_no_pic/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/gcc_no_plt_no_pic/basic_operation_evaluation.expected index dad30a297..b0c230c36 100644 --- a/src/test/correct/basic_operation_evaluation/gcc_no_plt_no_pic/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/gcc_no_plt_no_pic/basic_operation_evaluation.expected @@ -230,10 +230,7 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 20bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 20bv64)); R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 24bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 24bv64)); assert Gamma_R1; - if ((bvcomp32(R1[32:0], 0bv32) != 0bv1)) { - goto l00000a6e; - } - goto l00000a73; + goto lmain_goto_l00000a6e, lmain_goto_l00000a73; l00000a73: assume {:captureState "l00000a73"} true; R2, Gamma_R2 := zero_extend32_32(bvsdiv33(sign_extend1_32(R0[32:0]), sign_extend1_32(R1[32:0]))[32:0]), (Gamma_R1 && Gamma_R0); @@ -252,4 +249,12 @@ procedure main() R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l00000a6e: + assume {:captureState "lmain_goto_l00000a6e"} true; + assume (bvcomp32(R1[32:0], 0bv32) != 0bv1); + goto l00000a6e; + lmain_goto_l00000a73: + assume {:captureState "lmain_goto_l00000a73"} true; + assume (bvcomp32(R1[32:0], 0bv32) == 0bv1); + goto l00000a73; } diff --git a/src/test/correct/basic_operation_evaluation/gcc_pic/basic_operation_evaluation.expected b/src/test/correct/basic_operation_evaluation/gcc_pic/basic_operation_evaluation.expected index dad30a297..b0c230c36 100644 --- a/src/test/correct/basic_operation_evaluation/gcc_pic/basic_operation_evaluation.expected +++ b/src/test/correct/basic_operation_evaluation/gcc_pic/basic_operation_evaluation.expected @@ -230,10 +230,7 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 20bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 20bv64)); R1, Gamma_R1 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 24bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 24bv64)); assert Gamma_R1; - if ((bvcomp32(R1[32:0], 0bv32) != 0bv1)) { - goto l00000a6e; - } - goto l00000a73; + goto lmain_goto_l00000a6e, lmain_goto_l00000a73; l00000a73: assume {:captureState "l00000a73"} true; R2, Gamma_R2 := zero_extend32_32(bvsdiv33(sign_extend1_32(R0[32:0]), sign_extend1_32(R1[32:0]))[32:0]), (Gamma_R1 && Gamma_R0); @@ -252,4 +249,12 @@ procedure main() R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l00000a6e: + assume {:captureState "lmain_goto_l00000a6e"} true; + assume (bvcomp32(R1[32:0], 0bv32) != 0bv1); + goto l00000a6e; + lmain_goto_l00000a73: + assume {:captureState "lmain_goto_l00000a73"} true; + assume (bvcomp32(R1[32:0], 0bv32) == 0bv1); + goto l00000a73; } diff --git a/src/test/correct/basic_sec_policy_read/clang/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/clang/basic_sec_policy_read.expected index 7a3d39208..ccd417130 100644 --- a/src/test/correct/basic_sec_policy_read/clang/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/clang/basic_sec_policy_read.expected @@ -229,10 +229,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000336; - } - goto l00000339; + goto lmain_goto_l00000336, lmain_goto_l00000339; l00000339: assume {:captureState "l00000339"} true; R8, Gamma_R8 := 1bv64, true; @@ -244,10 +241,7 @@ procedure main() l0000033c: assume {:captureState "l0000033c"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000344; - } - goto l0000035b; + goto l0000033c_goto_l00000344, l0000033c_goto_l0000035b; l0000035b: assume {:captureState "l0000035b"} true; goto l0000035c; @@ -261,4 +255,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000336: + assume {:captureState "lmain_goto_l00000336"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000336; + lmain_goto_l00000339: + assume {:captureState "lmain_goto_l00000339"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000339; + l0000033c_goto_l00000344: + assume {:captureState "l0000033c_goto_l00000344"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000344; + l0000033c_goto_l0000035b: + assume {:captureState "l0000033c_goto_l0000035b"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000035b; } diff --git a/src/test/correct/basic_sec_policy_read/clang_O2/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/clang_O2/basic_sec_policy_read.expected index 60294d829..92491b85c 100644 --- a/src/test/correct/basic_sec_policy_read/clang_O2/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/clang_O2/basic_sec_policy_read.expected @@ -211,10 +211,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000002fa; - } - goto l000002fd; + goto lmain_goto_l000002fa, lmain_goto_l000002fd; l000002fd: assume {:captureState "l000002fd"} true; R0, Gamma_R0 := 0bv64, true; @@ -226,4 +223,12 @@ procedure main() l00000300: assume {:captureState "l00000300"} true; return; + lmain_goto_l000002fa: + assume {:captureState "lmain_goto_l000002fa"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000002fa; + lmain_goto_l000002fd: + assume {:captureState "lmain_goto_l000002fd"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000002fd; } diff --git a/src/test/correct/basic_sec_policy_read/clang_no_plt_no_pic/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/clang_no_plt_no_pic/basic_sec_policy_read.expected index 990413eb8..230807188 100644 --- a/src/test/correct/basic_sec_policy_read/clang_no_plt_no_pic/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/clang_no_plt_no_pic/basic_sec_policy_read.expected @@ -229,10 +229,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000954; - } - goto l00000957; + goto lmain_goto_l00000954, lmain_goto_l00000957; l00000957: assume {:captureState "l00000957"} true; R8, Gamma_R8 := 1bv64, true; @@ -244,10 +241,7 @@ procedure main() l0000095a: assume {:captureState "l0000095a"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000962; - } - goto l00000979; + goto l0000095a_goto_l00000962, l0000095a_goto_l00000979; l00000979: assume {:captureState "l00000979"} true; goto l0000097a; @@ -261,4 +255,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000954: + assume {:captureState "lmain_goto_l00000954"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000954; + lmain_goto_l00000957: + assume {:captureState "lmain_goto_l00000957"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000957; + l0000095a_goto_l00000962: + assume {:captureState "l0000095a_goto_l00000962"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000962; + l0000095a_goto_l00000979: + assume {:captureState "l0000095a_goto_l00000979"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000979; } diff --git a/src/test/correct/basic_sec_policy_read/clang_pic/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/clang_pic/basic_sec_policy_read.expected index c9874d209..4046bd5c3 100644 --- a/src/test/correct/basic_sec_policy_read/clang_pic/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/clang_pic/basic_sec_policy_read.expected @@ -289,10 +289,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l0000034c; - } - goto l0000034f; + goto lmain_goto_l0000034c, lmain_goto_l0000034f; l0000034f: assume {:captureState "l0000034f"} true; R8, Gamma_R8 := 1bv64, true; @@ -304,10 +301,7 @@ procedure main() l00000352: assume {:captureState "l00000352"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l0000035a; - } - goto l00000371; + goto l00000352_goto_l0000035a, l00000352_goto_l00000371; l00000371: assume {:captureState "l00000371"} true; goto l00000372; @@ -321,4 +315,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l0000034c: + assume {:captureState "lmain_goto_l0000034c"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000034c; + lmain_goto_l0000034f: + assume {:captureState "lmain_goto_l0000034f"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000034f; + l00000352_goto_l0000035a: + assume {:captureState "l00000352_goto_l0000035a"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l0000035a; + l00000352_goto_l00000371: + assume {:captureState "l00000352_goto_l00000371"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000371; } diff --git a/src/test/correct/basic_sec_policy_read/gcc/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/gcc/basic_sec_policy_read.expected index e2420795f..7bae9d7fb 100644 --- a/src/test/correct/basic_sec_policy_read/gcc/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/gcc/basic_sec_policy_read.expected @@ -226,10 +226,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l0000032e; - } - goto l00000345; + goto lmain_goto_l0000032e, lmain_goto_l00000345; l00000345: assume {:captureState "l00000345"} true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), 0bv32), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), true); @@ -240,4 +237,12 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l0000032e: + assume {:captureState "lmain_goto_l0000032e"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000032e; + lmain_goto_l00000345: + assume {:captureState "lmain_goto_l00000345"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000345; } diff --git a/src/test/correct/basic_sec_policy_read/gcc_O2/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/gcc_O2/basic_sec_policy_read.expected index ee799a4b7..44fc144b9 100644 --- a/src/test/correct/basic_sec_policy_read/gcc_O2/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/gcc_O2/basic_sec_policy_read.expected @@ -189,10 +189,7 @@ procedure main() call rely(); R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, bvadd64(R1, 20bv64))), (gamma_load32(Gamma_mem, bvadd64(R1, 20bv64)) || L(mem, bvadd64(R1, 20bv64))); assert Gamma_R1; - if ((bvnot1(bvcomp32(R1[32:0], 0bv32)) != 0bv1)) { - goto l000001c2; - } - goto l0000039c; + goto lmain_goto_l000001c2, lmain_goto_l0000039c; l0000039c: assume {:captureState "l0000039c"} true; call rely(); @@ -201,4 +198,12 @@ procedure main() l000001c2: assume {:captureState "l000001c2"} true; return; + lmain_goto_l000001c2: + assume {:captureState "lmain_goto_l000001c2"} true; + assume (bvnot1(bvcomp32(R1[32:0], 0bv32)) != 0bv1); + goto l000001c2; + lmain_goto_l0000039c: + assume {:captureState "lmain_goto_l0000039c"} true; + assume (bvnot1(bvcomp32(R1[32:0], 0bv32)) == 0bv1); + goto l0000039c; } diff --git a/src/test/correct/basic_sec_policy_read/gcc_no_plt_no_pic/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/gcc_no_plt_no_pic/basic_sec_policy_read.expected index 440392f1e..7882f9a88 100644 --- a/src/test/correct/basic_sec_policy_read/gcc_no_plt_no_pic/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/gcc_no_plt_no_pic/basic_sec_policy_read.expected @@ -226,10 +226,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l0000092b; - } - goto l00000942; + goto lmain_goto_l0000092b, lmain_goto_l00000942; l00000942: assume {:captureState "l00000942"} true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), 0bv32), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), true); @@ -240,4 +237,12 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l0000092b: + assume {:captureState "lmain_goto_l0000092b"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000092b; + lmain_goto_l00000942: + assume {:captureState "lmain_goto_l00000942"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000942; } diff --git a/src/test/correct/basic_sec_policy_read/gcc_pic/basic_sec_policy_read.expected b/src/test/correct/basic_sec_policy_read/gcc_pic/basic_sec_policy_read.expected index 30ee05d48..2802fe353 100644 --- a/src/test/correct/basic_sec_policy_read/gcc_pic/basic_sec_policy_read.expected +++ b/src/test/correct/basic_sec_policy_read/gcc_pic/basic_sec_policy_read.expected @@ -284,10 +284,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000330; - } - goto l00000347; + goto lmain_goto_l00000330, lmain_goto_l00000347; l00000347: assume {:captureState "l00000347"} true; stack, Gamma_stack := memory_store32_le(stack, bvadd64(R31, 12bv64), 0bv32), gamma_store32(Gamma_stack, bvadd64(R31, 12bv64), true); @@ -298,4 +295,12 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000330: + assume {:captureState "lmain_goto_l00000330"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000330; + lmain_goto_l00000347: + assume {:captureState "lmain_goto_l00000347"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000347; } diff --git a/src/test/correct/cjump/clang/cjump.expected b/src/test/correct/cjump/clang/cjump.expected index fabe193c7..539ef9a99 100644 --- a/src/test/correct/cjump/clang/cjump.expected +++ b/src/test/correct/cjump/clang/cjump.expected @@ -228,10 +228,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000343; - } - goto l00000346; + goto lmain_goto_l00000343, lmain_goto_l00000346; l00000346: assume {:captureState "l00000346"} true; R8, Gamma_R8 := 1bv64, true; @@ -243,10 +240,7 @@ procedure main() l00000349: assume {:captureState "l00000349"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000351; - } - goto l0000037e; + goto l00000349_goto_l00000351, l00000349_goto_l0000037e; l00000351: assume {:captureState "l00000351"} true; R9, Gamma_R9 := 69632bv64, true; @@ -273,4 +267,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000343: + assume {:captureState "lmain_goto_l00000343"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000343; + lmain_goto_l00000346: + assume {:captureState "lmain_goto_l00000346"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000346; + l00000349_goto_l00000351: + assume {:captureState "l00000349_goto_l00000351"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000351; + l00000349_goto_l0000037e: + assume {:captureState "l00000349_goto_l0000037e"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000037e; } diff --git a/src/test/correct/cjump/clang_no_plt_no_pic/cjump.expected b/src/test/correct/cjump/clang_no_plt_no_pic/cjump.expected index 55f0aa5e5..796eec6f1 100644 --- a/src/test/correct/cjump/clang_no_plt_no_pic/cjump.expected +++ b/src/test/correct/cjump/clang_no_plt_no_pic/cjump.expected @@ -228,10 +228,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000999; - } - goto l0000099c; + goto lmain_goto_l00000999, lmain_goto_l0000099c; l0000099c: assume {:captureState "l0000099c"} true; R8, Gamma_R8 := 1bv64, true; @@ -243,10 +240,7 @@ procedure main() l0000099f: assume {:captureState "l0000099f"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l000009a7; - } - goto l000009d4; + goto l0000099f_goto_l000009a7, l0000099f_goto_l000009d4; l000009a7: assume {:captureState "l000009a7"} true; R9, Gamma_R9 := 69632bv64, true; @@ -273,4 +267,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000999: + assume {:captureState "lmain_goto_l00000999"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000999; + lmain_goto_l0000099c: + assume {:captureState "lmain_goto_l0000099c"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000099c; + l0000099f_goto_l000009a7: + assume {:captureState "l0000099f_goto_l000009a7"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l000009a7; + l0000099f_goto_l000009d4: + assume {:captureState "l0000099f_goto_l000009d4"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l000009d4; } diff --git a/src/test/correct/cjump/clang_pic/cjump.expected b/src/test/correct/cjump/clang_pic/cjump.expected index cf22bf2b8..1ecbdeb7c 100644 --- a/src/test/correct/cjump/clang_pic/cjump.expected +++ b/src/test/correct/cjump/clang_pic/cjump.expected @@ -286,10 +286,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000356; - } - goto l00000359; + goto lmain_goto_l00000356, lmain_goto_l00000359; l00000359: assume {:captureState "l00000359"} true; R8, Gamma_R8 := 1bv64, true; @@ -301,10 +298,7 @@ procedure main() l0000035c: assume {:captureState "l0000035c"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000364; - } - goto l00000398; + goto l0000035c_goto_l00000364, l0000035c_goto_l00000398; l00000364: assume {:captureState "l00000364"} true; R9, Gamma_R9 := 65536bv64, true; @@ -335,4 +329,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000356: + assume {:captureState "lmain_goto_l00000356"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000356; + lmain_goto_l00000359: + assume {:captureState "lmain_goto_l00000359"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000359; + l0000035c_goto_l00000364: + assume {:captureState "l0000035c_goto_l00000364"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000364; + l0000035c_goto_l00000398: + assume {:captureState "l0000035c_goto_l00000398"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000398; } diff --git a/src/test/correct/cjump/gcc/cjump.expected b/src/test/correct/cjump/gcc/cjump.expected index 8c4250ee0..9a98e6265 100644 --- a/src/test/correct/cjump/gcc/cjump.expected +++ b/src/test/correct/cjump/gcc/cjump.expected @@ -219,10 +219,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l0000033e; - } - goto l00000365; + goto lmain_goto_l0000033e, lmain_goto_l00000365; l0000033e: assume {:captureState "l0000033e"} true; R0, Gamma_R0 := 69632bv64, true; @@ -247,4 +244,12 @@ procedure main() assume {:captureState "l0000035b"} true; R0, Gamma_R0 := 0bv64, true; return; + lmain_goto_l0000033e: + assume {:captureState "lmain_goto_l0000033e"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000033e; + lmain_goto_l00000365: + assume {:captureState "lmain_goto_l00000365"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000365; } diff --git a/src/test/correct/cjump/gcc_no_plt_no_pic/cjump.expected b/src/test/correct/cjump/gcc_no_plt_no_pic/cjump.expected index 6bac2205c..1f3af0871 100644 --- a/src/test/correct/cjump/gcc_no_plt_no_pic/cjump.expected +++ b/src/test/correct/cjump/gcc_no_plt_no_pic/cjump.expected @@ -219,10 +219,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l0000097c; - } - goto l000009a3; + goto lmain_goto_l0000097c, lmain_goto_l000009a3; l0000097c: assume {:captureState "l0000097c"} true; R0, Gamma_R0 := 69632bv64, true; @@ -247,4 +244,12 @@ procedure main() assume {:captureState "l00000999"} true; R0, Gamma_R0 := 0bv64, true; return; + lmain_goto_l0000097c: + assume {:captureState "lmain_goto_l0000097c"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000097c; + lmain_goto_l000009a3: + assume {:captureState "lmain_goto_l000009a3"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000009a3; } diff --git a/src/test/correct/cjump/gcc_pic/cjump.expected b/src/test/correct/cjump/gcc_pic/cjump.expected index 5b1dca745..5ca9cc9fa 100644 --- a/src/test/correct/cjump/gcc_pic/cjump.expected +++ b/src/test/correct/cjump/gcc_pic/cjump.expected @@ -277,10 +277,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000340; - } - goto l00000368; + goto lmain_goto_l00000340, lmain_goto_l00000368; l00000340: assume {:captureState "l00000340"} true; R0, Gamma_R0 := 65536bv64, true; @@ -307,4 +304,12 @@ procedure main() assume {:captureState "l0000035e"} true; R0, Gamma_R0 := 0bv64, true; return; + lmain_goto_l00000340: + assume {:captureState "lmain_goto_l00000340"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000340; + lmain_goto_l00000368: + assume {:captureState "lmain_goto_l00000368"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000368; } diff --git a/src/test/correct/ifbranches/clang/ifbranches.expected b/src/test/correct/ifbranches/clang/ifbranches.expected index 5718d9457..f43c98adb 100644 --- a/src/test/correct/ifbranches/clang/ifbranches.expected +++ b/src/test/correct/ifbranches/clang/ifbranches.expected @@ -226,10 +226,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l0000034c; - } - goto l0000034f; + goto lmain_goto_l0000034c, lmain_goto_l0000034f; l0000034f: assume {:captureState "l0000034f"} true; R8, Gamma_R8 := 1bv64, true; @@ -241,10 +238,7 @@ procedure main() l00000352: assume {:captureState "l00000352"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l0000035a; - } - goto l00000397; + goto l00000352_goto_l0000035a, l00000352_goto_l00000397; l0000035a: assume {:captureState "l0000035a"} true; R8, Gamma_R8 := 2bv64, true; @@ -269,4 +263,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l0000034c: + assume {:captureState "lmain_goto_l0000034c"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000034c; + lmain_goto_l0000034f: + assume {:captureState "lmain_goto_l0000034f"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000034f; + l00000352_goto_l0000035a: + assume {:captureState "l00000352_goto_l0000035a"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l0000035a; + l00000352_goto_l00000397: + assume {:captureState "l00000352_goto_l00000397"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000397; } diff --git a/src/test/correct/ifbranches/clang_O2/ifbranches.expected b/src/test/correct/ifbranches/clang_O2/ifbranches.expected index e7d47e243..4617d4c7f 100644 --- a/src/test/correct/ifbranches/clang_O2/ifbranches.expected +++ b/src/test/correct/ifbranches/clang_O2/ifbranches.expected @@ -183,10 +183,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000002db; - } - goto l000002df; + goto lmain_goto_l000002db, lmain_goto_l000002df; l000002df: assume {:captureState "l000002df"} true; R0, Gamma_R0 := zero_extend32_32(bvadd32(R8[32:0], 1bv32)), Gamma_R8; @@ -198,4 +195,12 @@ procedure main() l000002e2: assume {:captureState "l000002e2"} true; return; + lmain_goto_l000002db: + assume {:captureState "lmain_goto_l000002db"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000002db; + lmain_goto_l000002df: + assume {:captureState "lmain_goto_l000002df"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000002df; } diff --git a/src/test/correct/ifbranches/clang_no_plt_no_pic/ifbranches.expected b/src/test/correct/ifbranches/clang_no_plt_no_pic/ifbranches.expected index ed65fc303..852ead596 100644 --- a/src/test/correct/ifbranches/clang_no_plt_no_pic/ifbranches.expected +++ b/src/test/correct/ifbranches/clang_no_plt_no_pic/ifbranches.expected @@ -226,10 +226,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000009b8; - } - goto l000009bb; + goto lmain_goto_l000009b8, lmain_goto_l000009bb; l000009bb: assume {:captureState "l000009bb"} true; R8, Gamma_R8 := 1bv64, true; @@ -241,10 +238,7 @@ procedure main() l000009be: assume {:captureState "l000009be"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l000009c6; - } - goto l00000a03; + goto l000009be_goto_l000009c6, l000009be_goto_l00000a03; l000009c6: assume {:captureState "l000009c6"} true; R8, Gamma_R8 := 2bv64, true; @@ -269,4 +263,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l000009b8: + assume {:captureState "lmain_goto_l000009b8"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000009b8; + lmain_goto_l000009bb: + assume {:captureState "lmain_goto_l000009bb"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000009bb; + l000009be_goto_l000009c6: + assume {:captureState "l000009be_goto_l000009c6"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l000009c6; + l000009be_goto_l00000a03: + assume {:captureState "l000009be_goto_l00000a03"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000a03; } diff --git a/src/test/correct/ifbranches/clang_pic/ifbranches.expected b/src/test/correct/ifbranches/clang_pic/ifbranches.expected index ed65fc303..852ead596 100644 --- a/src/test/correct/ifbranches/clang_pic/ifbranches.expected +++ b/src/test/correct/ifbranches/clang_pic/ifbranches.expected @@ -226,10 +226,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000009b8; - } - goto l000009bb; + goto lmain_goto_l000009b8, lmain_goto_l000009bb; l000009bb: assume {:captureState "l000009bb"} true; R8, Gamma_R8 := 1bv64, true; @@ -241,10 +238,7 @@ procedure main() l000009be: assume {:captureState "l000009be"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l000009c6; - } - goto l00000a03; + goto l000009be_goto_l000009c6, l000009be_goto_l00000a03; l000009c6: assume {:captureState "l000009c6"} true; R8, Gamma_R8 := 2bv64, true; @@ -269,4 +263,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l000009b8: + assume {:captureState "lmain_goto_l000009b8"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000009b8; + lmain_goto_l000009bb: + assume {:captureState "lmain_goto_l000009bb"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000009bb; + l000009be_goto_l000009c6: + assume {:captureState "l000009be_goto_l000009c6"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l000009c6; + l000009be_goto_l00000a03: + assume {:captureState "l000009be_goto_l00000a03"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000a03; } diff --git a/src/test/correct/ifbranches/gcc/ifbranches.expected b/src/test/correct/ifbranches/gcc/ifbranches.expected index 5208e2068..cd7916e92 100644 --- a/src/test/correct/ifbranches/gcc/ifbranches.expected +++ b/src/test/correct/ifbranches/gcc/ifbranches.expected @@ -221,10 +221,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000330; - } - goto l00000369; + goto lmain_goto_l00000330, lmain_goto_l00000369; l00000330: assume {:captureState "l00000330"} true; R0, Gamma_R0 := 2bv64, true; @@ -246,4 +243,12 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l00000330: + assume {:captureState "lmain_goto_l00000330"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000330; + lmain_goto_l00000369: + assume {:captureState "lmain_goto_l00000369"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000369; } diff --git a/src/test/correct/ifbranches/gcc_O2/ifbranches.expected b/src/test/correct/ifbranches/gcc_O2/ifbranches.expected index f67aba3a9..6a212af81 100644 --- a/src/test/correct/ifbranches/gcc_O2/ifbranches.expected +++ b/src/test/correct/ifbranches/gcc_O2/ifbranches.expected @@ -180,10 +180,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#1, 1bv32), 0bv32), Gamma_#1; NF, Gamma_NF := bvadd32(#1, 1bv32)[32:31], Gamma_#1; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000001c3; - } - goto l000001c6; + goto lmain_goto_l000001c3, lmain_goto_l000001c6; l000001c6: assume {:captureState "l000001c6"} true; R0, Gamma_R0 := 1bv64, true; @@ -196,4 +193,12 @@ procedure main() assume {:captureState "l000001c9"} true; R0, Gamma_R0 := zero_extend32_32(bvadd32(R0[32:0], 2bv32)), Gamma_R0; return; + lmain_goto_l000001c3: + assume {:captureState "lmain_goto_l000001c3"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000001c3; + lmain_goto_l000001c6: + assume {:captureState "lmain_goto_l000001c6"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000001c6; } diff --git a/src/test/correct/ifbranches/gcc_no_plt_no_pic/ifbranches.expected b/src/test/correct/ifbranches/gcc_no_plt_no_pic/ifbranches.expected index 9902018f0..da091cc0a 100644 --- a/src/test/correct/ifbranches/gcc_no_plt_no_pic/ifbranches.expected +++ b/src/test/correct/ifbranches/gcc_no_plt_no_pic/ifbranches.expected @@ -221,10 +221,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000963; - } - goto l0000099c; + goto lmain_goto_l00000963, lmain_goto_l0000099c; l00000963: assume {:captureState "l00000963"} true; R0, Gamma_R0 := 2bv64, true; @@ -246,4 +243,12 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l00000963: + assume {:captureState "lmain_goto_l00000963"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000963; + lmain_goto_l0000099c: + assume {:captureState "lmain_goto_l0000099c"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000099c; } diff --git a/src/test/correct/ifbranches/gcc_pic/ifbranches.expected b/src/test/correct/ifbranches/gcc_pic/ifbranches.expected index 9902018f0..da091cc0a 100644 --- a/src/test/correct/ifbranches/gcc_pic/ifbranches.expected +++ b/src/test/correct/ifbranches/gcc_pic/ifbranches.expected @@ -221,10 +221,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000963; - } - goto l0000099c; + goto lmain_goto_l00000963, lmain_goto_l0000099c; l00000963: assume {:captureState "l00000963"} true; R0, Gamma_R0 := 2bv64, true; @@ -246,4 +243,12 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l00000963: + assume {:captureState "lmain_goto_l00000963"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000963; + lmain_goto_l0000099c: + assume {:captureState "lmain_goto_l0000099c"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000099c; } diff --git a/src/test/correct/ifglobal/clang/ifglobal.expected b/src/test/correct/ifglobal/clang/ifglobal.expected index f6cda1c81..70d46adf3 100644 --- a/src/test/correct/ifglobal/clang/ifglobal.expected +++ b/src/test/correct/ifglobal/clang/ifglobal.expected @@ -219,10 +219,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l0000031e; - } - goto l00000321; + goto lmain_goto_l0000031e, lmain_goto_l00000321; l00000321: assume {:captureState "l00000321"} true; R8, Gamma_R8 := 1bv64, true; @@ -234,10 +231,7 @@ procedure main() l00000324: assume {:captureState "l00000324"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l0000032c; - } - goto l00000343; + goto l00000324_goto_l0000032c, l00000324_goto_l00000343; l00000343: assume {:captureState "l00000343"} true; goto l00000344; @@ -255,4 +249,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l0000031e: + assume {:captureState "lmain_goto_l0000031e"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000031e; + lmain_goto_l00000321: + assume {:captureState "lmain_goto_l00000321"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000321; + l00000324_goto_l0000032c: + assume {:captureState "l00000324_goto_l0000032c"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l0000032c; + l00000324_goto_l00000343: + assume {:captureState "l00000324_goto_l00000343"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000343; } diff --git a/src/test/correct/ifglobal/clang_O2/ifglobal.expected b/src/test/correct/ifglobal/clang_O2/ifglobal.expected index afe71ccd1..2181d6c4f 100644 --- a/src/test/correct/ifglobal/clang_O2/ifglobal.expected +++ b/src/test/correct/ifglobal/clang_O2/ifglobal.expected @@ -187,10 +187,7 @@ procedure main() call rely(); R9, Gamma_R9 := zero_extend32_32(memory_load32_le(mem, bvadd64(R8, 52bv64))), (gamma_load32(Gamma_mem, bvadd64(R8, 52bv64)) || L(mem, bvadd64(R8, 52bv64))); assert Gamma_R9; - if ((bvcomp32(R9[32:0], 0bv32) != 0bv1)) { - goto l000002dc; - } - goto l000002f8; + goto lmain_goto_l000002dc, lmain_goto_l000002f8; l000002dc: assume {:captureState "l000002dc"} true; R9, Gamma_R9 := 1bv64, true; @@ -204,4 +201,12 @@ procedure main() assume {:captureState "l000002f8"} true; R0, Gamma_R0 := 0bv64, true; return; + lmain_goto_l000002dc: + assume {:captureState "lmain_goto_l000002dc"} true; + assume (bvcomp32(R9[32:0], 0bv32) != 0bv1); + goto l000002dc; + lmain_goto_l000002f8: + assume {:captureState "lmain_goto_l000002f8"} true; + assume (bvcomp32(R9[32:0], 0bv32) == 0bv1); + goto l000002f8; } diff --git a/src/test/correct/ifglobal/clang_no_plt_no_pic/ifglobal.expected b/src/test/correct/ifglobal/clang_no_plt_no_pic/ifglobal.expected index b07e23d00..8ae5517aa 100644 --- a/src/test/correct/ifglobal/clang_no_plt_no_pic/ifglobal.expected +++ b/src/test/correct/ifglobal/clang_no_plt_no_pic/ifglobal.expected @@ -219,10 +219,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l0000092d; - } - goto l00000930; + goto lmain_goto_l0000092d, lmain_goto_l00000930; l00000930: assume {:captureState "l00000930"} true; R8, Gamma_R8 := 1bv64, true; @@ -234,10 +231,7 @@ procedure main() l00000933: assume {:captureState "l00000933"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l0000093b; - } - goto l00000952; + goto l00000933_goto_l0000093b, l00000933_goto_l00000952; l00000952: assume {:captureState "l00000952"} true; goto l00000953; @@ -255,4 +249,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l0000092d: + assume {:captureState "lmain_goto_l0000092d"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000092d; + lmain_goto_l00000930: + assume {:captureState "lmain_goto_l00000930"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000930; + l00000933_goto_l0000093b: + assume {:captureState "l00000933_goto_l0000093b"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l0000093b; + l00000933_goto_l00000952: + assume {:captureState "l00000933_goto_l00000952"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000952; } diff --git a/src/test/correct/ifglobal/clang_pic/ifglobal.expected b/src/test/correct/ifglobal/clang_pic/ifglobal.expected index dfb965c3c..2f170c699 100644 --- a/src/test/correct/ifglobal/clang_pic/ifglobal.expected +++ b/src/test/correct/ifglobal/clang_pic/ifglobal.expected @@ -253,10 +253,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l0000032d; - } - goto l00000330; + goto lmain_goto_l0000032d, lmain_goto_l00000330; l00000330: assume {:captureState "l00000330"} true; R8, Gamma_R8 := 1bv64, true; @@ -268,10 +265,7 @@ procedure main() l00000333: assume {:captureState "l00000333"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l0000033b; - } - goto l00000352; + goto l00000333_goto_l0000033b, l00000333_goto_l00000352; l00000352: assume {:captureState "l00000352"} true; goto l00000353; @@ -291,4 +285,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l0000032d: + assume {:captureState "lmain_goto_l0000032d"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000032d; + lmain_goto_l00000330: + assume {:captureState "lmain_goto_l00000330"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000330; + l00000333_goto_l0000033b: + assume {:captureState "l00000333_goto_l0000033b"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l0000033b; + l00000333_goto_l00000352: + assume {:captureState "l00000333_goto_l00000352"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000352; } diff --git a/src/test/correct/ifglobal/gcc/ifglobal.expected b/src/test/correct/ifglobal/gcc/ifglobal.expected index d23d1d5bf..a82d65ba3 100644 --- a/src/test/correct/ifglobal/gcc/ifglobal.expected +++ b/src/test/correct/ifglobal/gcc/ifglobal.expected @@ -208,10 +208,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000302; - } - goto l00000311; + goto lmain_goto_l00000302, lmain_goto_l00000311; l00000311: assume {:captureState "l00000311"} true; R0, Gamma_R0 := 69632bv64, true; @@ -226,4 +223,12 @@ procedure main() assume {:captureState "l00000302"} true; R0, Gamma_R0 := 0bv64, true; return; + lmain_goto_l00000302: + assume {:captureState "lmain_goto_l00000302"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000302; + lmain_goto_l00000311: + assume {:captureState "lmain_goto_l00000311"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000311; } diff --git a/src/test/correct/ifglobal/gcc_O2/ifglobal.expected b/src/test/correct/ifglobal/gcc_O2/ifglobal.expected index 7c637d172..07170dee4 100644 --- a/src/test/correct/ifglobal/gcc_O2/ifglobal.expected +++ b/src/test/correct/ifglobal/gcc_O2/ifglobal.expected @@ -186,10 +186,7 @@ procedure main() call rely(); R1, Gamma_R1 := zero_extend32_32(memory_load32_le(mem, bvadd64(R0, 20bv64))), (gamma_load32(Gamma_mem, bvadd64(R0, 20bv64)) || L(mem, bvadd64(R0, 20bv64))); assert Gamma_R1; - if ((bvnot1(bvcomp32(R1[32:0], 0bv32)) != 0bv1)) { - goto l000001b7; - } - goto l00000396; + goto lmain_goto_l000001b7, lmain_goto_l00000396; l00000396: assume {:captureState "l00000396"} true; R1, Gamma_R1 := 1bv64, true; @@ -202,4 +199,12 @@ procedure main() assume {:captureState "l000001b7"} true; R0, Gamma_R0 := 0bv64, true; return; + lmain_goto_l000001b7: + assume {:captureState "lmain_goto_l000001b7"} true; + assume (bvnot1(bvcomp32(R1[32:0], 0bv32)) != 0bv1); + goto l000001b7; + lmain_goto_l00000396: + assume {:captureState "lmain_goto_l00000396"} true; + assume (bvnot1(bvcomp32(R1[32:0], 0bv32)) == 0bv1); + goto l00000396; } diff --git a/src/test/correct/ifglobal/gcc_no_plt_no_pic/ifglobal.expected b/src/test/correct/ifglobal/gcc_no_plt_no_pic/ifglobal.expected index 77b0fdc9a..bc013859c 100644 --- a/src/test/correct/ifglobal/gcc_no_plt_no_pic/ifglobal.expected +++ b/src/test/correct/ifglobal/gcc_no_plt_no_pic/ifglobal.expected @@ -208,10 +208,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l000008d6; - } - goto l000008e5; + goto lmain_goto_l000008d6, lmain_goto_l000008e5; l000008e5: assume {:captureState "l000008e5"} true; R0, Gamma_R0 := 69632bv64, true; @@ -226,4 +223,12 @@ procedure main() assume {:captureState "l000008d6"} true; R0, Gamma_R0 := 0bv64, true; return; + lmain_goto_l000008d6: + assume {:captureState "lmain_goto_l000008d6"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000008d6; + lmain_goto_l000008e5: + assume {:captureState "lmain_goto_l000008e5"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000008e5; } diff --git a/src/test/correct/ifglobal/gcc_pic/ifglobal.expected b/src/test/correct/ifglobal/gcc_pic/ifglobal.expected index a9559c8a6..66adb7f43 100644 --- a/src/test/correct/ifglobal/gcc_pic/ifglobal.expected +++ b/src/test/correct/ifglobal/gcc_pic/ifglobal.expected @@ -241,10 +241,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000303; - } - goto l00000312; + goto lmain_goto_l00000303, lmain_goto_l00000312; l00000312: assume {:captureState "l00000312"} true; R0, Gamma_R0 := 65536bv64, true; @@ -260,4 +257,12 @@ procedure main() assume {:captureState "l00000303"} true; R0, Gamma_R0 := 0bv64, true; return; + lmain_goto_l00000303: + assume {:captureState "lmain_goto_l00000303"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000303; + lmain_goto_l00000312: + assume {:captureState "lmain_goto_l00000312"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000312; } diff --git a/src/test/correct/jumptable3/gcc/jumptable3.expected b/src/test/correct/jumptable3/gcc/jumptable3.expected index d5441c22d..c0d970237 100644 --- a/src/test/correct/jumptable3/gcc/jumptable3.expected +++ b/src/test/correct/jumptable3/gcc/jumptable3.expected @@ -474,10 +474,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000599; - } - goto l000005e0; + goto lmain_goto_l00000599, lmain_goto_l000005e0; l000005e0: assume {:captureState "l000005e0"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -486,11 +483,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967285bv33))), (Gamma_R0 && Gamma_#6); ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005d7; - } - goto l00000608; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l000005e0_goto_l000005d7, l000005e0_goto_l00000608; l00000608: assume {:captureState "l00000608"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -500,10 +494,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#7, 1bv32), 0bv32), Gamma_#7; NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000629; - } - goto l00000643; + goto l00000608_goto_l00000629, l00000608_goto_l00000643; l00000629: assume {:captureState "l00000629"} true; R30, Gamma_R30 := 2288bv64, true; @@ -540,11 +531,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#8, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967286bv33))), (Gamma_R0 && Gamma_#8); ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005d7; - } - goto l0000066b; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000643_goto_l000005d7, l00000643_goto_l0000066b; l0000066b: assume {:captureState "l0000066b"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -554,10 +542,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#9, 1bv32), 0bv32), Gamma_#9; NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l0000068c; - } - goto l000006a3; + goto l0000066b_goto_l0000068c, l0000066b_goto_l000006a3; l0000068c: assume {:captureState "l0000068c"} true; R30, Gamma_R30 := 2276bv64, true; @@ -579,11 +564,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#10, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967287bv33))), (Gamma_R0 && Gamma_#10); ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005d7; - } - goto l000006cb; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l000006a3_goto_l000005d7, l000006a3_goto_l000006cb; l000006cb: assume {:captureState "l000006cb"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -593,10 +575,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#11, 1bv32), 0bv32), Gamma_#11; NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000006ec; - } - goto l00000703; + goto l000006cb_goto_l000006ec, l000006cb_goto_l00000703; l00000703: assume {:captureState "l00000703"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -605,11 +584,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#12, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967288bv33))), (Gamma_R0 && Gamma_#12); ZF, Gamma_ZF := bvcomp32(bvadd32(#12, 1bv32), 0bv32), Gamma_#12; NF, Gamma_NF := bvadd32(#12, 1bv32)[32:31], Gamma_#12; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005d7; - } - goto l0000072b; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000703_goto_l000005d7, l00000703_goto_l0000072b; l0000072b: assume {:captureState "l0000072b"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -619,10 +595,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#13, 1bv32), 0bv32), Gamma_#13; NF, Gamma_NF := bvadd32(#13, 1bv32)[32:31], Gamma_#13; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l0000074c; - } - goto l00000758; + goto l0000072b_goto_l0000074c, l0000072b_goto_l00000758; l00000758: assume {:captureState "l00000758"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -631,11 +604,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#14, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967289bv33))), (Gamma_R0 && Gamma_#14); ZF, Gamma_ZF := bvcomp32(bvadd32(#14, 1bv32), 0bv32), Gamma_#14; NF, Gamma_NF := bvadd32(#14, 1bv32)[32:31], Gamma_#14; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005d7; - } - goto l00000780; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000758_goto_l000005d7, l00000758_goto_l00000780; l00000780: assume {:captureState "l00000780"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -645,10 +615,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#15, 1bv32), 0bv32), Gamma_#15; NF, Gamma_NF := bvadd32(#15, 1bv32)[32:31], Gamma_#15; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000007a1; - } - goto l000007ad; + goto l00000780_goto_l000007a1, l00000780_goto_l000007ad; l000007ad: assume {:captureState "l000007ad"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -657,11 +624,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#16, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967290bv33))), (Gamma_R0 && Gamma_#16); ZF, Gamma_ZF := bvcomp32(bvadd32(#16, 1bv32), 0bv32), Gamma_#16; NF, Gamma_NF := bvadd32(#16, 1bv32)[32:31], Gamma_#16; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005d7; - } - goto l000007d5; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l000007ad_goto_l000005d7, l000007ad_goto_l000007d5; l000007d5: assume {:captureState "l000007d5"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -671,10 +635,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#17, 1bv32), 0bv32), Gamma_#17; NF, Gamma_NF := bvadd32(#17, 1bv32)[32:31], Gamma_#17; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000007f6; - } - goto l00000809; + goto l000007d5_goto_l000007f6, l000007d5_goto_l00000809; l000007f6: assume {:captureState "l000007f6"} true; R30, Gamma_R30 := 2248bv64, true; @@ -716,11 +677,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#18, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#18); ZF, Gamma_ZF := bvcomp32(bvadd32(#18, 1bv32), 0bv32), Gamma_#18; NF, Gamma_NF := bvadd32(#18, 1bv32)[32:31], Gamma_#18; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005d7; - } - goto l00000831; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000809_goto_l000005d7, l00000809_goto_l00000831; l00000831: assume {:captureState "l00000831"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -730,10 +688,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#19, 1bv32), 0bv32), Gamma_#19; NF, Gamma_NF := bvadd32(#19, 1bv32)[32:31], Gamma_#19; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000852; - } - goto l00000862; + goto l00000831_goto_l00000852, l00000831_goto_l00000862; l00000852: assume {:captureState "l00000852"} true; R30, Gamma_R30 := 2240bv64, true; @@ -750,11 +705,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#20, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#20); ZF, Gamma_ZF := bvcomp32(bvadd32(#20, 1bv32), 0bv32), Gamma_#20; NF, Gamma_NF := bvadd32(#20, 1bv32)[32:31], Gamma_#20; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005d7; - } - goto l0000088a; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000862_goto_l000005d7, l00000862_goto_l0000088a; l0000088a: assume {:captureState "l0000088a"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -764,10 +716,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#21, 1bv32), 0bv32), Gamma_#21; NF, Gamma_NF := bvadd32(#21, 1bv32)[32:31], Gamma_#21; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000008ab; - } - goto l000008c2; + goto l0000088a_goto_l000008ab, l0000088a_goto_l000008c2; l000008ab: assume {:captureState "l000008ab"} true; R30, Gamma_R30 := 2228bv64, true; @@ -789,11 +738,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#22, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#22); ZF, Gamma_ZF := bvcomp32(bvadd32(#22, 1bv32), 0bv32), Gamma_#22; NF, Gamma_NF := bvadd32(#22, 1bv32)[32:31], Gamma_#22; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005d7; - } - goto l000008ea; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l000008c2_goto_l000005d7, l000008c2_goto_l000008ea; l000008ea: assume {:captureState "l000008ea"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -803,10 +749,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#23, 1bv32), 0bv32), Gamma_#23; NF, Gamma_NF := bvadd32(#23, 1bv32)[32:31], Gamma_#23; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l0000090b; - } - goto l0000091b; + goto l000008ea_goto_l0000090b, l000008ea_goto_l0000091b; l0000091b: assume {:captureState "l0000091b"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -815,11 +758,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#24, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#24); ZF, Gamma_ZF := bvcomp32(bvadd32(#24, 1bv32), 0bv32), Gamma_#24; NF, Gamma_NF := bvadd32(#24, 1bv32)[32:31], Gamma_#24; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005d7; - } - goto l00000943; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l0000091b_goto_l000005d7, l0000091b_goto_l00000943; l00000943: assume {:captureState "l00000943"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -829,10 +769,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#25, 1bv32), 0bv32), Gamma_#25; NF, Gamma_NF := bvadd32(#25, 1bv32)[32:31], Gamma_#25; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000964; - } - goto l0000097b; + goto l00000943_goto_l00000964, l00000943_goto_l0000097b; l00000964: assume {:captureState "l00000964"} true; R30, Gamma_R30 := 2208bv64, true; @@ -850,10 +787,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#26, 1bv32), 0bv32), Gamma_#26; NF, Gamma_NF := bvadd32(#26, 1bv32)[32:31], Gamma_#26; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000974; - } - goto l000009a1; + goto l0000097b_goto_l00000974, l0000097b_goto_l000009a1; l00000974: assume {:captureState "l00000974"} true; R30, Gamma_R30 := 2216bv64, true; @@ -887,6 +821,182 @@ procedure main() R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l00000599: + assume {:captureState "lmain_goto_l00000599"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000599; + lmain_goto_l000005e0: + assume {:captureState "lmain_goto_l000005e0"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000005e0; + l000005e0_goto_l000005d7: + assume {:captureState "l000005e0_goto_l000005d7"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005d7; + l000005e0_goto_l00000608: + assume {:captureState "l000005e0_goto_l00000608"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000608; + l00000608_goto_l00000629: + assume {:captureState "l00000608_goto_l00000629"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000629; + l00000608_goto_l00000643: + assume {:captureState "l00000608_goto_l00000643"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000643; + l00000643_goto_l000005d7: + assume {:captureState "l00000643_goto_l000005d7"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005d7; + l00000643_goto_l0000066b: + assume {:captureState "l00000643_goto_l0000066b"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000066b; + l0000066b_goto_l0000068c: + assume {:captureState "l0000066b_goto_l0000068c"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000068c; + l0000066b_goto_l000006a3: + assume {:captureState "l0000066b_goto_l000006a3"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000006a3; + l000006a3_goto_l000005d7: + assume {:captureState "l000006a3_goto_l000005d7"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005d7; + l000006a3_goto_l000006cb: + assume {:captureState "l000006a3_goto_l000006cb"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l000006cb; + l000006cb_goto_l000006ec: + assume {:captureState "l000006cb_goto_l000006ec"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000006ec; + l000006cb_goto_l00000703: + assume {:captureState "l000006cb_goto_l00000703"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000703; + l00000703_goto_l000005d7: + assume {:captureState "l00000703_goto_l000005d7"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005d7; + l00000703_goto_l0000072b: + assume {:captureState "l00000703_goto_l0000072b"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000072b; + l0000072b_goto_l0000074c: + assume {:captureState "l0000072b_goto_l0000074c"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000074c; + l0000072b_goto_l00000758: + assume {:captureState "l0000072b_goto_l00000758"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000758; + l00000758_goto_l000005d7: + assume {:captureState "l00000758_goto_l000005d7"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005d7; + l00000758_goto_l00000780: + assume {:captureState "l00000758_goto_l00000780"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000780; + l00000780_goto_l000007a1: + assume {:captureState "l00000780_goto_l000007a1"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000007a1; + l00000780_goto_l000007ad: + assume {:captureState "l00000780_goto_l000007ad"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000007ad; + l000007ad_goto_l000005d7: + assume {:captureState "l000007ad_goto_l000005d7"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005d7; + l000007ad_goto_l000007d5: + assume {:captureState "l000007ad_goto_l000007d5"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l000007d5; + l000007d5_goto_l000007f6: + assume {:captureState "l000007d5_goto_l000007f6"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000007f6; + l000007d5_goto_l00000809: + assume {:captureState "l000007d5_goto_l00000809"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000809; + l00000809_goto_l000005d7: + assume {:captureState "l00000809_goto_l000005d7"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005d7; + l00000809_goto_l00000831: + assume {:captureState "l00000809_goto_l00000831"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000831; + l00000831_goto_l00000852: + assume {:captureState "l00000831_goto_l00000852"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000852; + l00000831_goto_l00000862: + assume {:captureState "l00000831_goto_l00000862"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000862; + l00000862_goto_l000005d7: + assume {:captureState "l00000862_goto_l000005d7"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005d7; + l00000862_goto_l0000088a: + assume {:captureState "l00000862_goto_l0000088a"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000088a; + l0000088a_goto_l000008ab: + assume {:captureState "l0000088a_goto_l000008ab"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000008ab; + l0000088a_goto_l000008c2: + assume {:captureState "l0000088a_goto_l000008c2"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000008c2; + l000008c2_goto_l000005d7: + assume {:captureState "l000008c2_goto_l000005d7"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005d7; + l000008c2_goto_l000008ea: + assume {:captureState "l000008c2_goto_l000008ea"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l000008ea; + l000008ea_goto_l0000090b: + assume {:captureState "l000008ea_goto_l0000090b"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000090b; + l000008ea_goto_l0000091b: + assume {:captureState "l000008ea_goto_l0000091b"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000091b; + l0000091b_goto_l000005d7: + assume {:captureState "l0000091b_goto_l000005d7"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005d7; + l0000091b_goto_l00000943: + assume {:captureState "l0000091b_goto_l00000943"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000943; + l00000943_goto_l00000964: + assume {:captureState "l00000943_goto_l00000964"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000964; + l00000943_goto_l0000097b: + assume {:captureState "l00000943_goto_l0000097b"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000097b; + l0000097b_goto_l00000974: + assume {:captureState "l0000097b_goto_l00000974"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000974; + l0000097b_goto_l000009a1: + assume {:captureState "l0000097b_goto_l000009a1"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000009a1; } procedure sub_seven() diff --git a/src/test/correct/jumptable3/gcc_O2/jumptable3.expected b/src/test/correct/jumptable3/gcc_O2/jumptable3.expected index ba99b9e81..27d281ba8 100644 --- a/src/test/correct/jumptable3/gcc_O2/jumptable3.expected +++ b/src/test/correct/jumptable3/gcc_O2/jumptable3.expected @@ -227,17 +227,11 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#1, 1bv32), 0bv32), Gamma_#1; NF, Gamma_NF := bvadd32(#1, 1bv32)[32:31], Gamma_#1; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000317; - } - goto l00000753; + goto lmain_goto_l00000317, lmain_goto_l00000753; l00000753: assume {:captureState "l00000753"} true; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000006e8; - } - goto l0000075c; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000753_goto_l000006e8, l00000753_goto_l0000075c; l000006e8: assume {:captureState "l000006e8"} true; R1, Gamma_R1 := 69632bv64, true; @@ -247,10 +241,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000005f9; - } - goto l0000070c; + goto l000006e8_goto_l000005f9, l000006e8_goto_l0000070c; l000005f9: assume {:captureState "l000005f9"} true; call rely(); @@ -263,11 +254,8 @@ procedure main() goto l00000360; l0000070c: assume {:captureState "l0000070c"} true; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvnot1(bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1))) != 0bv1)) { - goto l00000644; - } - goto l00000715; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l0000070c_goto_l00000644, l0000070c_goto_l00000715; l00000644: assume {:captureState "l00000644"} true; #6, Gamma_#6 := bvadd32(R0[32:0], 4294967288bv32), Gamma_R0; @@ -276,10 +264,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000331; - } - goto l00000663; + goto l00000644_goto_l00000331, l00000644_goto_l00000663; l00000663: assume {:captureState "l00000663"} true; #7, Gamma_#7 := bvadd32(R0[32:0], 4294967287bv32), Gamma_R0; @@ -288,10 +273,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#7, 1bv32), 0bv32), Gamma_#7; NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l0000036b; - } - goto l00000347; + goto l00000663_goto_l0000036b, l00000663_goto_l00000347; l00000715: assume {:captureState "l00000715"} true; #9, Gamma_#9 := bvadd32(R0[32:0], 4294967285bv32), Gamma_R0; @@ -300,10 +282,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#9, 1bv32), 0bv32), Gamma_#9; NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000612; - } - goto l00000734; + goto l00000715_goto_l00000612, l00000715_goto_l00000734; l00000612: assume {:captureState "l00000612"} true; call rely(); @@ -322,10 +301,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l0000036b; - } - goto l00000628; + goto l00000734_goto_l0000036b, l00000734_goto_l00000628; l00000628: assume {:captureState "l00000628"} true; call rely(); @@ -344,10 +320,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#11, 1bv32), 0bv32), Gamma_#11; NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l0000069c; - } - goto l0000077b; + goto l0000075c_goto_l0000069c, l0000075c_goto_l0000077b; l0000069c: assume {:captureState "l0000069c"} true; R1, Gamma_R1 := 69632bv64, true; @@ -361,11 +334,8 @@ procedure main() goto l00000360; l0000077b: assume {:captureState "l0000077b"} true; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005bc; - } - goto l00000784; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l0000077b_goto_l000005bc, l0000077b_goto_l00000784; l000005bc: assume {:captureState "l000005bc"} true; #5, Gamma_#5 := bvadd32(R0[32:0], 4294967291bv32), Gamma_R0; @@ -374,10 +344,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000005d6; - } - goto l00000682; + goto l000005bc_goto_l000005d6, l000005bc_goto_l00000682; l000005d6: assume {:captureState "l000005d6"} true; R1, Gamma_R1 := 69632bv64, true; @@ -439,10 +406,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#12, 1bv32), 0bv32), Gamma_#12; NF, Gamma_NF := bvadd32(#12, 1bv32)[32:31], Gamma_#12; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000006ba; - } - goto l000007a8; + goto l00000784_goto_l000006ba, l00000784_goto_l000007a8; l000006ba: assume {:captureState "l000006ba"} true; call rely(); @@ -461,17 +425,11 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#13, 1bv32), 0bv32), Gamma_#13; NF, Gamma_NF := bvadd32(#13, 1bv32)[32:31], Gamma_#13; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000368; - } - goto l000006d0; + goto l000007a8_goto_l00000368, l000007a8_goto_l000006d0; l00000368: assume {:captureState "l00000368"} true; assert Gamma_R0; - if ((bvnot1(bvcomp32(R0[32:0], 0bv32)) != 0bv1)) { - goto l0000036b; - } - goto l000005a3; + goto l00000368_goto_l0000036b, l00000368_goto_l000005a3; l0000036b: assume {:captureState "l0000036b"} true; R0, Gamma_R0 := 1bv64, true; @@ -499,4 +457,116 @@ procedure main() l00000360: assume {:captureState "l00000360"} true; return; + lmain_goto_l00000317: + assume {:captureState "lmain_goto_l00000317"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000317; + lmain_goto_l00000753: + assume {:captureState "lmain_goto_l00000753"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000753; + l00000753_goto_l000006e8: + assume {:captureState "l00000753_goto_l000006e8"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000006e8; + l00000753_goto_l0000075c: + assume {:captureState "l00000753_goto_l0000075c"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000075c; + l000006e8_goto_l000005f9: + assume {:captureState "l000006e8_goto_l000005f9"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000005f9; + l000006e8_goto_l0000070c: + assume {:captureState "l000006e8_goto_l0000070c"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000070c; + l0000070c_goto_l00000644: + assume {:captureState "l0000070c_goto_l00000644"} true; + assume (bvnot1(bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1))) != 0bv1); + goto l00000644; + l0000070c_goto_l00000715: + assume {:captureState "l0000070c_goto_l00000715"} true; + assume (bvnot1(bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1))) == 0bv1); + goto l00000715; + l00000644_goto_l00000331: + assume {:captureState "l00000644_goto_l00000331"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000331; + l00000644_goto_l00000663: + assume {:captureState "l00000644_goto_l00000663"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000663; + l00000663_goto_l0000036b: + assume {:captureState "l00000663_goto_l0000036b"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000036b; + l00000663_goto_l00000347: + assume {:captureState "l00000663_goto_l00000347"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000347; + l00000715_goto_l00000612: + assume {:captureState "l00000715_goto_l00000612"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000612; + l00000715_goto_l00000734: + assume {:captureState "l00000715_goto_l00000734"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000734; + l00000734_goto_l0000036b: + assume {:captureState "l00000734_goto_l0000036b"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000036b; + l00000734_goto_l00000628: + assume {:captureState "l00000734_goto_l00000628"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000628; + l0000075c_goto_l0000069c: + assume {:captureState "l0000075c_goto_l0000069c"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000069c; + l0000075c_goto_l0000077b: + assume {:captureState "l0000075c_goto_l0000077b"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000077b; + l0000077b_goto_l000005bc: + assume {:captureState "l0000077b_goto_l000005bc"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005bc; + l0000077b_goto_l00000784: + assume {:captureState "l0000077b_goto_l00000784"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000784; + l000005bc_goto_l000005d6: + assume {:captureState "l000005bc_goto_l000005d6"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000005d6; + l000005bc_goto_l00000682: + assume {:captureState "l000005bc_goto_l00000682"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000682; + l00000784_goto_l000006ba: + assume {:captureState "l00000784_goto_l000006ba"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000006ba; + l00000784_goto_l000007a8: + assume {:captureState "l00000784_goto_l000007a8"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000007a8; + l000007a8_goto_l00000368: + assume {:captureState "l000007a8_goto_l00000368"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000368; + l000007a8_goto_l000006d0: + assume {:captureState "l000007a8_goto_l000006d0"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000006d0; + l00000368_goto_l0000036b: + assume {:captureState "l00000368_goto_l0000036b"} true; + assume (bvnot1(bvcomp32(R0[32:0], 0bv32)) != 0bv1); + goto l0000036b; + l00000368_goto_l000005a3: + assume {:captureState "l00000368_goto_l000005a3"} true; + assume (bvnot1(bvcomp32(R0[32:0], 0bv32)) == 0bv1); + goto l000005a3; } diff --git a/src/test/correct/jumptable3/gcc_no_plt_no_pic/jumptable3.expected b/src/test/correct/jumptable3/gcc_no_plt_no_pic/jumptable3.expected index 5a02b2247..75b244d38 100644 --- a/src/test/correct/jumptable3/gcc_no_plt_no_pic/jumptable3.expected +++ b/src/test/correct/jumptable3/gcc_no_plt_no_pic/jumptable3.expected @@ -474,10 +474,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000012f4; - } - goto l0000133b; + goto lmain_goto_l000012f4, lmain_goto_l0000133b; l0000133b: assume {:captureState "l0000133b"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -486,11 +483,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967285bv33))), (Gamma_R0 && Gamma_#6); ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l00001332; - } - goto l00001363; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l0000133b_goto_l00001332, l0000133b_goto_l00001363; l00001363: assume {:captureState "l00001363"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -500,10 +494,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#7, 1bv32), 0bv32), Gamma_#7; NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00001384; - } - goto l0000139e; + goto l00001363_goto_l00001384, l00001363_goto_l0000139e; l00001384: assume {:captureState "l00001384"} true; R30, Gamma_R30 := 2288bv64, true; @@ -540,11 +531,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#8, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967286bv33))), (Gamma_R0 && Gamma_#8); ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l00001332; - } - goto l000013c6; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l0000139e_goto_l00001332, l0000139e_goto_l000013c6; l000013c6: assume {:captureState "l000013c6"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -554,10 +542,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#9, 1bv32), 0bv32), Gamma_#9; NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000013e7; - } - goto l000013fe; + goto l000013c6_goto_l000013e7, l000013c6_goto_l000013fe; l000013e7: assume {:captureState "l000013e7"} true; R30, Gamma_R30 := 2276bv64, true; @@ -579,11 +564,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#10, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967287bv33))), (Gamma_R0 && Gamma_#10); ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l00001332; - } - goto l00001426; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l000013fe_goto_l00001332, l000013fe_goto_l00001426; l00001426: assume {:captureState "l00001426"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -593,10 +575,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#11, 1bv32), 0bv32), Gamma_#11; NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00001447; - } - goto l0000145e; + goto l00001426_goto_l00001447, l00001426_goto_l0000145e; l0000145e: assume {:captureState "l0000145e"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -605,11 +584,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#12, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967288bv33))), (Gamma_R0 && Gamma_#12); ZF, Gamma_ZF := bvcomp32(bvadd32(#12, 1bv32), 0bv32), Gamma_#12; NF, Gamma_NF := bvadd32(#12, 1bv32)[32:31], Gamma_#12; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l00001332; - } - goto l00001486; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l0000145e_goto_l00001332, l0000145e_goto_l00001486; l00001486: assume {:captureState "l00001486"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -619,10 +595,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#13, 1bv32), 0bv32), Gamma_#13; NF, Gamma_NF := bvadd32(#13, 1bv32)[32:31], Gamma_#13; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000014a7; - } - goto l000014b3; + goto l00001486_goto_l000014a7, l00001486_goto_l000014b3; l000014b3: assume {:captureState "l000014b3"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -631,11 +604,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#14, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967289bv33))), (Gamma_R0 && Gamma_#14); ZF, Gamma_ZF := bvcomp32(bvadd32(#14, 1bv32), 0bv32), Gamma_#14; NF, Gamma_NF := bvadd32(#14, 1bv32)[32:31], Gamma_#14; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l00001332; - } - goto l000014db; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l000014b3_goto_l00001332, l000014b3_goto_l000014db; l000014db: assume {:captureState "l000014db"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -645,10 +615,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#15, 1bv32), 0bv32), Gamma_#15; NF, Gamma_NF := bvadd32(#15, 1bv32)[32:31], Gamma_#15; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000014fc; - } - goto l00001508; + goto l000014db_goto_l000014fc, l000014db_goto_l00001508; l00001508: assume {:captureState "l00001508"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -657,11 +624,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#16, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967290bv33))), (Gamma_R0 && Gamma_#16); ZF, Gamma_ZF := bvcomp32(bvadd32(#16, 1bv32), 0bv32), Gamma_#16; NF, Gamma_NF := bvadd32(#16, 1bv32)[32:31], Gamma_#16; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l00001332; - } - goto l00001530; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00001508_goto_l00001332, l00001508_goto_l00001530; l00001530: assume {:captureState "l00001530"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -671,10 +635,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#17, 1bv32), 0bv32), Gamma_#17; NF, Gamma_NF := bvadd32(#17, 1bv32)[32:31], Gamma_#17; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00001551; - } - goto l00001564; + goto l00001530_goto_l00001551, l00001530_goto_l00001564; l00001551: assume {:captureState "l00001551"} true; R30, Gamma_R30 := 2248bv64, true; @@ -716,11 +677,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#18, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#18); ZF, Gamma_ZF := bvcomp32(bvadd32(#18, 1bv32), 0bv32), Gamma_#18; NF, Gamma_NF := bvadd32(#18, 1bv32)[32:31], Gamma_#18; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l00001332; - } - goto l0000158c; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00001564_goto_l00001332, l00001564_goto_l0000158c; l0000158c: assume {:captureState "l0000158c"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -730,10 +688,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#19, 1bv32), 0bv32), Gamma_#19; NF, Gamma_NF := bvadd32(#19, 1bv32)[32:31], Gamma_#19; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000015ad; - } - goto l000015bd; + goto l0000158c_goto_l000015ad, l0000158c_goto_l000015bd; l000015ad: assume {:captureState "l000015ad"} true; R30, Gamma_R30 := 2240bv64, true; @@ -750,11 +705,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#20, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#20); ZF, Gamma_ZF := bvcomp32(bvadd32(#20, 1bv32), 0bv32), Gamma_#20; NF, Gamma_NF := bvadd32(#20, 1bv32)[32:31], Gamma_#20; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l00001332; - } - goto l000015e5; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l000015bd_goto_l00001332, l000015bd_goto_l000015e5; l000015e5: assume {:captureState "l000015e5"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -764,10 +716,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#21, 1bv32), 0bv32), Gamma_#21; NF, Gamma_NF := bvadd32(#21, 1bv32)[32:31], Gamma_#21; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00001606; - } - goto l0000161d; + goto l000015e5_goto_l00001606, l000015e5_goto_l0000161d; l00001606: assume {:captureState "l00001606"} true; R30, Gamma_R30 := 2228bv64, true; @@ -789,11 +738,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#22, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#22); ZF, Gamma_ZF := bvcomp32(bvadd32(#22, 1bv32), 0bv32), Gamma_#22; NF, Gamma_NF := bvadd32(#22, 1bv32)[32:31], Gamma_#22; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l00001332; - } - goto l00001645; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l0000161d_goto_l00001332, l0000161d_goto_l00001645; l00001645: assume {:captureState "l00001645"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -803,10 +749,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#23, 1bv32), 0bv32), Gamma_#23; NF, Gamma_NF := bvadd32(#23, 1bv32)[32:31], Gamma_#23; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00001666; - } - goto l00001676; + goto l00001645_goto_l00001666, l00001645_goto_l00001676; l00001676: assume {:captureState "l00001676"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -815,11 +758,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#24, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#24); ZF, Gamma_ZF := bvcomp32(bvadd32(#24, 1bv32), 0bv32), Gamma_#24; NF, Gamma_NF := bvadd32(#24, 1bv32)[32:31], Gamma_#24; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l00001332; - } - goto l0000169e; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00001676_goto_l00001332, l00001676_goto_l0000169e; l0000169e: assume {:captureState "l0000169e"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -829,10 +769,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#25, 1bv32), 0bv32), Gamma_#25; NF, Gamma_NF := bvadd32(#25, 1bv32)[32:31], Gamma_#25; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000016bf; - } - goto l000016d6; + goto l0000169e_goto_l000016bf, l0000169e_goto_l000016d6; l000016bf: assume {:captureState "l000016bf"} true; R30, Gamma_R30 := 2208bv64, true; @@ -850,10 +787,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#26, 1bv32), 0bv32), Gamma_#26; NF, Gamma_NF := bvadd32(#26, 1bv32)[32:31], Gamma_#26; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000016cf; - } - goto l000016fc; + goto l000016d6_goto_l000016cf, l000016d6_goto_l000016fc; l000016cf: assume {:captureState "l000016cf"} true; R30, Gamma_R30 := 2216bv64, true; @@ -887,6 +821,182 @@ procedure main() R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l000012f4: + assume {:captureState "lmain_goto_l000012f4"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000012f4; + lmain_goto_l0000133b: + assume {:captureState "lmain_goto_l0000133b"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000133b; + l0000133b_goto_l00001332: + assume {:captureState "l0000133b_goto_l00001332"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00001332; + l0000133b_goto_l00001363: + assume {:captureState "l0000133b_goto_l00001363"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00001363; + l00001363_goto_l00001384: + assume {:captureState "l00001363_goto_l00001384"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00001384; + l00001363_goto_l0000139e: + assume {:captureState "l00001363_goto_l0000139e"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000139e; + l0000139e_goto_l00001332: + assume {:captureState "l0000139e_goto_l00001332"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00001332; + l0000139e_goto_l000013c6: + assume {:captureState "l0000139e_goto_l000013c6"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l000013c6; + l000013c6_goto_l000013e7: + assume {:captureState "l000013c6_goto_l000013e7"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000013e7; + l000013c6_goto_l000013fe: + assume {:captureState "l000013c6_goto_l000013fe"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000013fe; + l000013fe_goto_l00001332: + assume {:captureState "l000013fe_goto_l00001332"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00001332; + l000013fe_goto_l00001426: + assume {:captureState "l000013fe_goto_l00001426"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00001426; + l00001426_goto_l00001447: + assume {:captureState "l00001426_goto_l00001447"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00001447; + l00001426_goto_l0000145e: + assume {:captureState "l00001426_goto_l0000145e"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000145e; + l0000145e_goto_l00001332: + assume {:captureState "l0000145e_goto_l00001332"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00001332; + l0000145e_goto_l00001486: + assume {:captureState "l0000145e_goto_l00001486"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00001486; + l00001486_goto_l000014a7: + assume {:captureState "l00001486_goto_l000014a7"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000014a7; + l00001486_goto_l000014b3: + assume {:captureState "l00001486_goto_l000014b3"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000014b3; + l000014b3_goto_l00001332: + assume {:captureState "l000014b3_goto_l00001332"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00001332; + l000014b3_goto_l000014db: + assume {:captureState "l000014b3_goto_l000014db"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l000014db; + l000014db_goto_l000014fc: + assume {:captureState "l000014db_goto_l000014fc"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000014fc; + l000014db_goto_l00001508: + assume {:captureState "l000014db_goto_l00001508"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00001508; + l00001508_goto_l00001332: + assume {:captureState "l00001508_goto_l00001332"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00001332; + l00001508_goto_l00001530: + assume {:captureState "l00001508_goto_l00001530"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00001530; + l00001530_goto_l00001551: + assume {:captureState "l00001530_goto_l00001551"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00001551; + l00001530_goto_l00001564: + assume {:captureState "l00001530_goto_l00001564"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00001564; + l00001564_goto_l00001332: + assume {:captureState "l00001564_goto_l00001332"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00001332; + l00001564_goto_l0000158c: + assume {:captureState "l00001564_goto_l0000158c"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000158c; + l0000158c_goto_l000015ad: + assume {:captureState "l0000158c_goto_l000015ad"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000015ad; + l0000158c_goto_l000015bd: + assume {:captureState "l0000158c_goto_l000015bd"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000015bd; + l000015bd_goto_l00001332: + assume {:captureState "l000015bd_goto_l00001332"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00001332; + l000015bd_goto_l000015e5: + assume {:captureState "l000015bd_goto_l000015e5"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l000015e5; + l000015e5_goto_l00001606: + assume {:captureState "l000015e5_goto_l00001606"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00001606; + l000015e5_goto_l0000161d: + assume {:captureState "l000015e5_goto_l0000161d"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000161d; + l0000161d_goto_l00001332: + assume {:captureState "l0000161d_goto_l00001332"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00001332; + l0000161d_goto_l00001645: + assume {:captureState "l0000161d_goto_l00001645"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00001645; + l00001645_goto_l00001666: + assume {:captureState "l00001645_goto_l00001666"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00001666; + l00001645_goto_l00001676: + assume {:captureState "l00001645_goto_l00001676"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00001676; + l00001676_goto_l00001332: + assume {:captureState "l00001676_goto_l00001332"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00001332; + l00001676_goto_l0000169e: + assume {:captureState "l00001676_goto_l0000169e"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000169e; + l0000169e_goto_l000016bf: + assume {:captureState "l0000169e_goto_l000016bf"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000016bf; + l0000169e_goto_l000016d6: + assume {:captureState "l0000169e_goto_l000016d6"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000016d6; + l000016d6_goto_l000016cf: + assume {:captureState "l000016d6_goto_l000016cf"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000016cf; + l000016d6_goto_l000016fc: + assume {:captureState "l000016d6_goto_l000016fc"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000016fc; } procedure sub_seven() diff --git a/src/test/correct/jumptable3/gcc_pic/jumptable3.expected b/src/test/correct/jumptable3/gcc_pic/jumptable3.expected index e08035a08..f0bff08a8 100644 --- a/src/test/correct/jumptable3/gcc_pic/jumptable3.expected +++ b/src/test/correct/jumptable3/gcc_pic/jumptable3.expected @@ -534,10 +534,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l0000059f; - } - goto l000005e7; + goto lmain_goto_l0000059f, lmain_goto_l000005e7; l000005e7: assume {:captureState "l000005e7"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -546,11 +543,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967285bv33))), (Gamma_R0 && Gamma_#6); ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005de; - } - goto l0000060f; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l000005e7_goto_l000005de, l000005e7_goto_l0000060f; l0000060f: assume {:captureState "l0000060f"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -560,10 +554,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#7, 1bv32), 0bv32), Gamma_#7; NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000630; - } - goto l0000064a; + goto l0000060f_goto_l00000630, l0000060f_goto_l0000064a; l00000630: assume {:captureState "l00000630"} true; R30, Gamma_R30 := 2352bv64, true; @@ -600,11 +591,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#8, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967286bv33))), (Gamma_R0 && Gamma_#8); ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005de; - } - goto l00000672; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l0000064a_goto_l000005de, l0000064a_goto_l00000672; l00000672: assume {:captureState "l00000672"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -614,10 +602,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#9, 1bv32), 0bv32), Gamma_#9; NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000693; - } - goto l000006aa; + goto l00000672_goto_l00000693, l00000672_goto_l000006aa; l00000693: assume {:captureState "l00000693"} true; R30, Gamma_R30 := 2340bv64, true; @@ -639,11 +624,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#10, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967287bv33))), (Gamma_R0 && Gamma_#10); ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005de; - } - goto l000006d2; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l000006aa_goto_l000005de, l000006aa_goto_l000006d2; l000006d2: assume {:captureState "l000006d2"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -653,10 +635,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#11, 1bv32), 0bv32), Gamma_#11; NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000006f3; - } - goto l0000070a; + goto l000006d2_goto_l000006f3, l000006d2_goto_l0000070a; l0000070a: assume {:captureState "l0000070a"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -665,11 +644,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#12, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967288bv33))), (Gamma_R0 && Gamma_#12); ZF, Gamma_ZF := bvcomp32(bvadd32(#12, 1bv32), 0bv32), Gamma_#12; NF, Gamma_NF := bvadd32(#12, 1bv32)[32:31], Gamma_#12; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005de; - } - goto l00000732; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l0000070a_goto_l000005de, l0000070a_goto_l00000732; l00000732: assume {:captureState "l00000732"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -679,10 +655,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#13, 1bv32), 0bv32), Gamma_#13; NF, Gamma_NF := bvadd32(#13, 1bv32)[32:31], Gamma_#13; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000753; - } - goto l0000075f; + goto l00000732_goto_l00000753, l00000732_goto_l0000075f; l0000075f: assume {:captureState "l0000075f"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -691,11 +664,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#14, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967289bv33))), (Gamma_R0 && Gamma_#14); ZF, Gamma_ZF := bvcomp32(bvadd32(#14, 1bv32), 0bv32), Gamma_#14; NF, Gamma_NF := bvadd32(#14, 1bv32)[32:31], Gamma_#14; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005de; - } - goto l00000787; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l0000075f_goto_l000005de, l0000075f_goto_l00000787; l00000787: assume {:captureState "l00000787"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -705,10 +675,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#15, 1bv32), 0bv32), Gamma_#15; NF, Gamma_NF := bvadd32(#15, 1bv32)[32:31], Gamma_#15; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000007a8; - } - goto l000007b4; + goto l00000787_goto_l000007a8, l00000787_goto_l000007b4; l000007b4: assume {:captureState "l000007b4"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -717,11 +684,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#16, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967290bv33))), (Gamma_R0 && Gamma_#16); ZF, Gamma_ZF := bvcomp32(bvadd32(#16, 1bv32), 0bv32), Gamma_#16; NF, Gamma_NF := bvadd32(#16, 1bv32)[32:31], Gamma_#16; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005de; - } - goto l000007dc; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l000007b4_goto_l000005de, l000007b4_goto_l000007dc; l000007dc: assume {:captureState "l000007dc"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -731,10 +695,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#17, 1bv32), 0bv32), Gamma_#17; NF, Gamma_NF := bvadd32(#17, 1bv32)[32:31], Gamma_#17; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000007fd; - } - goto l00000810; + goto l000007dc_goto_l000007fd, l000007dc_goto_l00000810; l000007fd: assume {:captureState "l000007fd"} true; R30, Gamma_R30 := 2312bv64, true; @@ -776,11 +737,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#18, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#18); ZF, Gamma_ZF := bvcomp32(bvadd32(#18, 1bv32), 0bv32), Gamma_#18; NF, Gamma_NF := bvadd32(#18, 1bv32)[32:31], Gamma_#18; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005de; - } - goto l00000838; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000810_goto_l000005de, l00000810_goto_l00000838; l00000838: assume {:captureState "l00000838"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -790,10 +748,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#19, 1bv32), 0bv32), Gamma_#19; NF, Gamma_NF := bvadd32(#19, 1bv32)[32:31], Gamma_#19; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000859; - } - goto l00000869; + goto l00000838_goto_l00000859, l00000838_goto_l00000869; l00000859: assume {:captureState "l00000859"} true; R30, Gamma_R30 := 2304bv64, true; @@ -810,11 +765,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#20, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#20); ZF, Gamma_ZF := bvcomp32(bvadd32(#20, 1bv32), 0bv32), Gamma_#20; NF, Gamma_NF := bvadd32(#20, 1bv32)[32:31], Gamma_#20; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005de; - } - goto l00000891; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000869_goto_l000005de, l00000869_goto_l00000891; l00000891: assume {:captureState "l00000891"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -824,10 +776,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#21, 1bv32), 0bv32), Gamma_#21; NF, Gamma_NF := bvadd32(#21, 1bv32)[32:31], Gamma_#21; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000008b2; - } - goto l000008c9; + goto l00000891_goto_l000008b2, l00000891_goto_l000008c9; l000008b2: assume {:captureState "l000008b2"} true; R30, Gamma_R30 := 2292bv64, true; @@ -849,11 +798,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#22, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#22); ZF, Gamma_ZF := bvcomp32(bvadd32(#22, 1bv32), 0bv32), Gamma_#22; NF, Gamma_NF := bvadd32(#22, 1bv32)[32:31], Gamma_#22; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005de; - } - goto l000008f1; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l000008c9_goto_l000005de, l000008c9_goto_l000008f1; l000008f1: assume {:captureState "l000008f1"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -863,10 +809,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#23, 1bv32), 0bv32), Gamma_#23; NF, Gamma_NF := bvadd32(#23, 1bv32)[32:31], Gamma_#23; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000912; - } - goto l00000922; + goto l000008f1_goto_l00000912, l000008f1_goto_l00000922; l00000922: assume {:captureState "l00000922"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -875,11 +818,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#24, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967294bv33))), (Gamma_R0 && Gamma_#24); ZF, Gamma_ZF := bvcomp32(bvadd32(#24, 1bv32), 0bv32), Gamma_#24; NF, Gamma_NF := bvadd32(#24, 1bv32)[32:31], Gamma_#24; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000005de; - } - goto l0000094a; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000922_goto_l000005de, l00000922_goto_l0000094a; l0000094a: assume {:captureState "l0000094a"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -889,10 +829,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#25, 1bv32), 0bv32), Gamma_#25; NF, Gamma_NF := bvadd32(#25, 1bv32)[32:31], Gamma_#25; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l0000096b; - } - goto l00000982; + goto l0000094a_goto_l0000096b, l0000094a_goto_l00000982; l0000096b: assume {:captureState "l0000096b"} true; R30, Gamma_R30 := 2272bv64, true; @@ -910,10 +847,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#26, 1bv32), 0bv32), Gamma_#26; NF, Gamma_NF := bvadd32(#26, 1bv32)[32:31], Gamma_#26; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l0000097b; - } - goto l000009a8; + goto l00000982_goto_l0000097b, l00000982_goto_l000009a8; l0000097b: assume {:captureState "l0000097b"} true; R30, Gamma_R30 := 2280bv64, true; @@ -948,6 +882,182 @@ procedure main() R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l0000059f: + assume {:captureState "lmain_goto_l0000059f"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000059f; + lmain_goto_l000005e7: + assume {:captureState "lmain_goto_l000005e7"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000005e7; + l000005e7_goto_l000005de: + assume {:captureState "l000005e7_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; + l000005e7_goto_l0000060f: + assume {:captureState "l000005e7_goto_l0000060f"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000060f; + l0000060f_goto_l00000630: + assume {:captureState "l0000060f_goto_l00000630"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000630; + l0000060f_goto_l0000064a: + assume {:captureState "l0000060f_goto_l0000064a"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000064a; + l0000064a_goto_l000005de: + assume {:captureState "l0000064a_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; + l0000064a_goto_l00000672: + assume {:captureState "l0000064a_goto_l00000672"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000672; + l00000672_goto_l00000693: + assume {:captureState "l00000672_goto_l00000693"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000693; + l00000672_goto_l000006aa: + assume {:captureState "l00000672_goto_l000006aa"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000006aa; + l000006aa_goto_l000005de: + assume {:captureState "l000006aa_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; + l000006aa_goto_l000006d2: + assume {:captureState "l000006aa_goto_l000006d2"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l000006d2; + l000006d2_goto_l000006f3: + assume {:captureState "l000006d2_goto_l000006f3"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000006f3; + l000006d2_goto_l0000070a: + assume {:captureState "l000006d2_goto_l0000070a"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000070a; + l0000070a_goto_l000005de: + assume {:captureState "l0000070a_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; + l0000070a_goto_l00000732: + assume {:captureState "l0000070a_goto_l00000732"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000732; + l00000732_goto_l00000753: + assume {:captureState "l00000732_goto_l00000753"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000753; + l00000732_goto_l0000075f: + assume {:captureState "l00000732_goto_l0000075f"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000075f; + l0000075f_goto_l000005de: + assume {:captureState "l0000075f_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; + l0000075f_goto_l00000787: + assume {:captureState "l0000075f_goto_l00000787"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000787; + l00000787_goto_l000007a8: + assume {:captureState "l00000787_goto_l000007a8"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000007a8; + l00000787_goto_l000007b4: + assume {:captureState "l00000787_goto_l000007b4"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000007b4; + l000007b4_goto_l000005de: + assume {:captureState "l000007b4_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; + l000007b4_goto_l000007dc: + assume {:captureState "l000007b4_goto_l000007dc"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l000007dc; + l000007dc_goto_l000007fd: + assume {:captureState "l000007dc_goto_l000007fd"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000007fd; + l000007dc_goto_l00000810: + assume {:captureState "l000007dc_goto_l00000810"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000810; + l00000810_goto_l000005de: + assume {:captureState "l00000810_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; + l00000810_goto_l00000838: + assume {:captureState "l00000810_goto_l00000838"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000838; + l00000838_goto_l00000859: + assume {:captureState "l00000838_goto_l00000859"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000859; + l00000838_goto_l00000869: + assume {:captureState "l00000838_goto_l00000869"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000869; + l00000869_goto_l000005de: + assume {:captureState "l00000869_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; + l00000869_goto_l00000891: + assume {:captureState "l00000869_goto_l00000891"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000891; + l00000891_goto_l000008b2: + assume {:captureState "l00000891_goto_l000008b2"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000008b2; + l00000891_goto_l000008c9: + assume {:captureState "l00000891_goto_l000008c9"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000008c9; + l000008c9_goto_l000005de: + assume {:captureState "l000008c9_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; + l000008c9_goto_l000008f1: + assume {:captureState "l000008c9_goto_l000008f1"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l000008f1; + l000008f1_goto_l00000912: + assume {:captureState "l000008f1_goto_l00000912"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000912; + l000008f1_goto_l00000922: + assume {:captureState "l000008f1_goto_l00000922"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000922; + l00000922_goto_l000005de: + assume {:captureState "l00000922_goto_l000005de"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000005de; + l00000922_goto_l0000094a: + assume {:captureState "l00000922_goto_l0000094a"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000094a; + l0000094a_goto_l0000096b: + assume {:captureState "l0000094a_goto_l0000096b"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000096b; + l0000094a_goto_l00000982: + assume {:captureState "l0000094a_goto_l00000982"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000982; + l00000982_goto_l0000097b: + assume {:captureState "l00000982_goto_l0000097b"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l0000097b; + l00000982_goto_l000009a8: + assume {:captureState "l00000982_goto_l000009a8"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000009a8; } procedure sub_seven() diff --git a/src/test/correct/nestedif/clang/nestedif.expected b/src/test/correct/nestedif/clang/nestedif.expected index 15c499b19..cc4c39950 100644 --- a/src/test/correct/nestedif/clang/nestedif.expected +++ b/src/test/correct/nestedif/clang/nestedif.expected @@ -220,10 +220,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000379; - } - goto l0000037c; + goto lmain_goto_l00000379, lmain_goto_l0000037c; l0000037c: assume {:captureState "l0000037c"} true; R8, Gamma_R8 := 1bv64, true; @@ -235,10 +232,7 @@ procedure main() l0000037f: assume {:captureState "l0000037f"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000387; - } - goto l00000442; + goto l0000037f_goto_l00000387, l0000037f_goto_l00000442; l00000387: assume {:captureState "l00000387"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -249,10 +243,7 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000003b2; - } - goto l000003b5; + goto l00000387_goto_l000003b2, l00000387_goto_l000003b5; l000003b5: assume {:captureState "l000003b5"} true; R8, Gamma_R8 := 1bv64, true; @@ -264,10 +255,7 @@ procedure main() l000003b8: assume {:captureState "l000003b8"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l000003c0; - } - goto l0000042d; + goto l000003b8_goto_l000003c0, l000003b8_goto_l0000042d; l000003c0: assume {:captureState "l000003c0"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -278,10 +266,7 @@ procedure main() NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; R8, Gamma_R8 := zero_extend32_32(bvadd32(#6, 1bv32)), Gamma_#6; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000003eb; - } - goto l000003ee; + goto l000003c0_goto_l000003eb, l000003c0_goto_l000003ee; l000003ee: assume {:captureState "l000003ee"} true; R8, Gamma_R8 := 1bv64, true; @@ -293,10 +278,7 @@ procedure main() l000003f1: assume {:captureState "l000003f1"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l000003f9; - } - goto l00000418; + goto l000003f1_goto_l000003f9, l000003f1_goto_l00000418; l00000418: assume {:captureState "l00000418"} true; goto l00000419; @@ -335,4 +317,52 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000379: + assume {:captureState "lmain_goto_l00000379"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000379; + lmain_goto_l0000037c: + assume {:captureState "lmain_goto_l0000037c"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000037c; + l0000037f_goto_l00000387: + assume {:captureState "l0000037f_goto_l00000387"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000387; + l0000037f_goto_l00000442: + assume {:captureState "l0000037f_goto_l00000442"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000442; + l00000387_goto_l000003b2: + assume {:captureState "l00000387_goto_l000003b2"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000003b2; + l00000387_goto_l000003b5: + assume {:captureState "l00000387_goto_l000003b5"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000003b5; + l000003b8_goto_l000003c0: + assume {:captureState "l000003b8_goto_l000003c0"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l000003c0; + l000003b8_goto_l0000042d: + assume {:captureState "l000003b8_goto_l0000042d"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000042d; + l000003c0_goto_l000003eb: + assume {:captureState "l000003c0_goto_l000003eb"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000003eb; + l000003c0_goto_l000003ee: + assume {:captureState "l000003c0_goto_l000003ee"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000003ee; + l000003f1_goto_l000003f9: + assume {:captureState "l000003f1_goto_l000003f9"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l000003f9; + l000003f1_goto_l00000418: + assume {:captureState "l000003f1_goto_l00000418"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000418; } diff --git a/src/test/correct/nestedif/clang_no_plt_no_pic/nestedif.expected b/src/test/correct/nestedif/clang_no_plt_no_pic/nestedif.expected index 3ca99ae3f..6e883b1f1 100644 --- a/src/test/correct/nestedif/clang_no_plt_no_pic/nestedif.expected +++ b/src/test/correct/nestedif/clang_no_plt_no_pic/nestedif.expected @@ -220,10 +220,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000aaa; - } - goto l00000aad; + goto lmain_goto_l00000aaa, lmain_goto_l00000aad; l00000aad: assume {:captureState "l00000aad"} true; R8, Gamma_R8 := 1bv64, true; @@ -235,10 +232,7 @@ procedure main() l00000ab0: assume {:captureState "l00000ab0"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000ab8; - } - goto l00000b73; + goto l00000ab0_goto_l00000ab8, l00000ab0_goto_l00000b73; l00000ab8: assume {:captureState "l00000ab8"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -249,10 +243,7 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000ae3; - } - goto l00000ae6; + goto l00000ab8_goto_l00000ae3, l00000ab8_goto_l00000ae6; l00000ae6: assume {:captureState "l00000ae6"} true; R8, Gamma_R8 := 1bv64, true; @@ -264,10 +255,7 @@ procedure main() l00000ae9: assume {:captureState "l00000ae9"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000af1; - } - goto l00000b5e; + goto l00000ae9_goto_l00000af1, l00000ae9_goto_l00000b5e; l00000af1: assume {:captureState "l00000af1"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -278,10 +266,7 @@ procedure main() NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; R8, Gamma_R8 := zero_extend32_32(bvadd32(#6, 1bv32)), Gamma_#6; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000b1c; - } - goto l00000b1f; + goto l00000af1_goto_l00000b1c, l00000af1_goto_l00000b1f; l00000b1f: assume {:captureState "l00000b1f"} true; R8, Gamma_R8 := 1bv64, true; @@ -293,10 +278,7 @@ procedure main() l00000b22: assume {:captureState "l00000b22"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000b2a; - } - goto l00000b49; + goto l00000b22_goto_l00000b2a, l00000b22_goto_l00000b49; l00000b49: assume {:captureState "l00000b49"} true; goto l00000b4a; @@ -335,4 +317,52 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000aaa: + assume {:captureState "lmain_goto_l00000aaa"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000aaa; + lmain_goto_l00000aad: + assume {:captureState "lmain_goto_l00000aad"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000aad; + l00000ab0_goto_l00000ab8: + assume {:captureState "l00000ab0_goto_l00000ab8"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000ab8; + l00000ab0_goto_l00000b73: + assume {:captureState "l00000ab0_goto_l00000b73"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000b73; + l00000ab8_goto_l00000ae3: + assume {:captureState "l00000ab8_goto_l00000ae3"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000ae3; + l00000ab8_goto_l00000ae6: + assume {:captureState "l00000ab8_goto_l00000ae6"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000ae6; + l00000ae9_goto_l00000af1: + assume {:captureState "l00000ae9_goto_l00000af1"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000af1; + l00000ae9_goto_l00000b5e: + assume {:captureState "l00000ae9_goto_l00000b5e"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000b5e; + l00000af1_goto_l00000b1c: + assume {:captureState "l00000af1_goto_l00000b1c"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000b1c; + l00000af1_goto_l00000b1f: + assume {:captureState "l00000af1_goto_l00000b1f"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000b1f; + l00000b22_goto_l00000b2a: + assume {:captureState "l00000b22_goto_l00000b2a"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000b2a; + l00000b22_goto_l00000b49: + assume {:captureState "l00000b22_goto_l00000b49"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000b49; } diff --git a/src/test/correct/nestedif/clang_pic/nestedif.expected b/src/test/correct/nestedif/clang_pic/nestedif.expected index 3ca99ae3f..6e883b1f1 100644 --- a/src/test/correct/nestedif/clang_pic/nestedif.expected +++ b/src/test/correct/nestedif/clang_pic/nestedif.expected @@ -220,10 +220,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000aaa; - } - goto l00000aad; + goto lmain_goto_l00000aaa, lmain_goto_l00000aad; l00000aad: assume {:captureState "l00000aad"} true; R8, Gamma_R8 := 1bv64, true; @@ -235,10 +232,7 @@ procedure main() l00000ab0: assume {:captureState "l00000ab0"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000ab8; - } - goto l00000b73; + goto l00000ab0_goto_l00000ab8, l00000ab0_goto_l00000b73; l00000ab8: assume {:captureState "l00000ab8"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -249,10 +243,7 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000ae3; - } - goto l00000ae6; + goto l00000ab8_goto_l00000ae3, l00000ab8_goto_l00000ae6; l00000ae6: assume {:captureState "l00000ae6"} true; R8, Gamma_R8 := 1bv64, true; @@ -264,10 +255,7 @@ procedure main() l00000ae9: assume {:captureState "l00000ae9"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000af1; - } - goto l00000b5e; + goto l00000ae9_goto_l00000af1, l00000ae9_goto_l00000b5e; l00000af1: assume {:captureState "l00000af1"} true; R8, Gamma_R8 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -278,10 +266,7 @@ procedure main() NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; R8, Gamma_R8 := zero_extend32_32(bvadd32(#6, 1bv32)), Gamma_#6; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000b1c; - } - goto l00000b1f; + goto l00000af1_goto_l00000b1c, l00000af1_goto_l00000b1f; l00000b1f: assume {:captureState "l00000b1f"} true; R8, Gamma_R8 := 1bv64, true; @@ -293,10 +278,7 @@ procedure main() l00000b22: assume {:captureState "l00000b22"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000b2a; - } - goto l00000b49; + goto l00000b22_goto_l00000b2a, l00000b22_goto_l00000b49; l00000b49: assume {:captureState "l00000b49"} true; goto l00000b4a; @@ -335,4 +317,52 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000aaa: + assume {:captureState "lmain_goto_l00000aaa"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000aaa; + lmain_goto_l00000aad: + assume {:captureState "lmain_goto_l00000aad"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000aad; + l00000ab0_goto_l00000ab8: + assume {:captureState "l00000ab0_goto_l00000ab8"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000ab8; + l00000ab0_goto_l00000b73: + assume {:captureState "l00000ab0_goto_l00000b73"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000b73; + l00000ab8_goto_l00000ae3: + assume {:captureState "l00000ab8_goto_l00000ae3"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000ae3; + l00000ab8_goto_l00000ae6: + assume {:captureState "l00000ab8_goto_l00000ae6"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000ae6; + l00000ae9_goto_l00000af1: + assume {:captureState "l00000ae9_goto_l00000af1"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000af1; + l00000ae9_goto_l00000b5e: + assume {:captureState "l00000ae9_goto_l00000b5e"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000b5e; + l00000af1_goto_l00000b1c: + assume {:captureState "l00000af1_goto_l00000b1c"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000b1c; + l00000af1_goto_l00000b1f: + assume {:captureState "l00000af1_goto_l00000b1f"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000b1f; + l00000b22_goto_l00000b2a: + assume {:captureState "l00000b22_goto_l00000b2a"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000b2a; + l00000b22_goto_l00000b49: + assume {:captureState "l00000b22_goto_l00000b49"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000b49; } diff --git a/src/test/correct/nestedif/gcc/nestedif.expected b/src/test/correct/nestedif/gcc/nestedif.expected index a2b195685..66735fb03 100644 --- a/src/test/correct/nestedif/gcc/nestedif.expected +++ b/src/test/correct/nestedif/gcc/nestedif.expected @@ -215,10 +215,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000345; - } - goto l000003c4; + goto lmain_goto_l00000345, lmain_goto_l000003c4; l00000345: assume {:captureState "l00000345"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -228,10 +225,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l0000036b; - } - goto l000003b3; + goto l00000345_goto_l0000036b, l00000345_goto_l000003b3; l0000036b: assume {:captureState "l0000036b"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -241,10 +235,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000391; - } - goto l000003a6; + goto l0000036b_goto_l00000391, l0000036b_goto_l000003a6; l000003a6: assume {:captureState "l000003a6"} true; R0, Gamma_R0 := 7bv64, true; @@ -268,4 +259,28 @@ procedure main() R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000345: + assume {:captureState "lmain_goto_l00000345"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000345; + lmain_goto_l000003c4: + assume {:captureState "lmain_goto_l000003c4"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000003c4; + l00000345_goto_l0000036b: + assume {:captureState "l00000345_goto_l0000036b"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000036b; + l00000345_goto_l000003b3: + assume {:captureState "l00000345_goto_l000003b3"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000003b3; + l0000036b_goto_l00000391: + assume {:captureState "l0000036b_goto_l00000391"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000391; + l0000036b_goto_l000003a6: + assume {:captureState "l0000036b_goto_l000003a6"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000003a6; } diff --git a/src/test/correct/nestedif/gcc_no_plt_no_pic/nestedif.expected b/src/test/correct/nestedif/gcc_no_plt_no_pic/nestedif.expected index 0f2d64903..10003d950 100644 --- a/src/test/correct/nestedif/gcc_no_plt_no_pic/nestedif.expected +++ b/src/test/correct/nestedif/gcc_no_plt_no_pic/nestedif.expected @@ -215,10 +215,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l000009e1; - } - goto l00000a60; + goto lmain_goto_l000009e1, lmain_goto_l00000a60; l000009e1: assume {:captureState "l000009e1"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -228,10 +225,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000a07; - } - goto l00000a4f; + goto l000009e1_goto_l00000a07, l000009e1_goto_l00000a4f; l00000a07: assume {:captureState "l00000a07"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -241,10 +235,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000a2d; - } - goto l00000a42; + goto l00000a07_goto_l00000a2d, l00000a07_goto_l00000a42; l00000a42: assume {:captureState "l00000a42"} true; R0, Gamma_R0 := 7bv64, true; @@ -268,4 +259,28 @@ procedure main() R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l000009e1: + assume {:captureState "lmain_goto_l000009e1"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000009e1; + lmain_goto_l00000a60: + assume {:captureState "lmain_goto_l00000a60"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000a60; + l000009e1_goto_l00000a07: + assume {:captureState "l000009e1_goto_l00000a07"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000a07; + l000009e1_goto_l00000a4f: + assume {:captureState "l000009e1_goto_l00000a4f"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000a4f; + l00000a07_goto_l00000a2d: + assume {:captureState "l00000a07_goto_l00000a2d"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000a2d; + l00000a07_goto_l00000a42: + assume {:captureState "l00000a07_goto_l00000a42"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000a42; } diff --git a/src/test/correct/nestedif/gcc_pic/nestedif.expected b/src/test/correct/nestedif/gcc_pic/nestedif.expected index 0f2d64903..10003d950 100644 --- a/src/test/correct/nestedif/gcc_pic/nestedif.expected +++ b/src/test/correct/nestedif/gcc_pic/nestedif.expected @@ -215,10 +215,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l000009e1; - } - goto l00000a60; + goto lmain_goto_l000009e1, lmain_goto_l00000a60; l000009e1: assume {:captureState "l000009e1"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -228,10 +225,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000a07; - } - goto l00000a4f; + goto l000009e1_goto_l00000a07, l000009e1_goto_l00000a4f; l00000a07: assume {:captureState "l00000a07"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -241,10 +235,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000a2d; - } - goto l00000a42; + goto l00000a07_goto_l00000a2d, l00000a07_goto_l00000a42; l00000a42: assume {:captureState "l00000a42"} true; R0, Gamma_R0 := 7bv64, true; @@ -268,4 +259,28 @@ procedure main() R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l000009e1: + assume {:captureState "lmain_goto_l000009e1"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000009e1; + lmain_goto_l00000a60: + assume {:captureState "lmain_goto_l00000a60"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000a60; + l000009e1_goto_l00000a07: + assume {:captureState "l000009e1_goto_l00000a07"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000a07; + l000009e1_goto_l00000a4f: + assume {:captureState "l000009e1_goto_l00000a4f"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000a4f; + l00000a07_goto_l00000a2d: + assume {:captureState "l00000a07_goto_l00000a2d"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000a2d; + l00000a07_goto_l00000a42: + assume {:captureState "l00000a07_goto_l00000a42"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000a42; } diff --git a/src/test/correct/simple_jump/clang/simple_jump.expected b/src/test/correct/simple_jump/clang/simple_jump.expected index 62a848c1f..8ae879c7e 100644 --- a/src/test/correct/simple_jump/clang/simple_jump.expected +++ b/src/test/correct/simple_jump/clang/simple_jump.expected @@ -214,10 +214,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000326; - } - goto l00000329; + goto lmain_goto_l00000326, lmain_goto_l00000329; l00000329: assume {:captureState "l00000329"} true; R8, Gamma_R8 := 1bv64, true; @@ -229,10 +226,7 @@ procedure main() l0000032c: assume {:captureState "l0000032c"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000334; - } - goto l0000034b; + goto l0000032c_goto_l00000334, l0000032c_goto_l0000034b; l0000034b: assume {:captureState "l0000034b"} true; goto l0000034c; @@ -247,4 +241,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000326: + assume {:captureState "lmain_goto_l00000326"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000326; + lmain_goto_l00000329: + assume {:captureState "lmain_goto_l00000329"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000329; + l0000032c_goto_l00000334: + assume {:captureState "l0000032c_goto_l00000334"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000334; + l0000032c_goto_l0000034b: + assume {:captureState "l0000032c_goto_l0000034b"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000034b; } diff --git a/src/test/correct/simple_jump/clang_no_plt_no_pic/simple_jump.expected b/src/test/correct/simple_jump/clang_no_plt_no_pic/simple_jump.expected index 0973d91cd..7d5b217e6 100644 --- a/src/test/correct/simple_jump/clang_no_plt_no_pic/simple_jump.expected +++ b/src/test/correct/simple_jump/clang_no_plt_no_pic/simple_jump.expected @@ -214,10 +214,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000938; - } - goto l0000093b; + goto lmain_goto_l00000938, lmain_goto_l0000093b; l0000093b: assume {:captureState "l0000093b"} true; R8, Gamma_R8 := 1bv64, true; @@ -229,10 +226,7 @@ procedure main() l0000093e: assume {:captureState "l0000093e"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000946; - } - goto l0000095d; + goto l0000093e_goto_l00000946, l0000093e_goto_l0000095d; l0000095d: assume {:captureState "l0000095d"} true; goto l0000095e; @@ -247,4 +241,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000938: + assume {:captureState "lmain_goto_l00000938"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000938; + lmain_goto_l0000093b: + assume {:captureState "lmain_goto_l0000093b"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000093b; + l0000093e_goto_l00000946: + assume {:captureState "l0000093e_goto_l00000946"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000946; + l0000093e_goto_l0000095d: + assume {:captureState "l0000093e_goto_l0000095d"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000095d; } diff --git a/src/test/correct/simple_jump/clang_pic/simple_jump.expected b/src/test/correct/simple_jump/clang_pic/simple_jump.expected index 0973d91cd..7d5b217e6 100644 --- a/src/test/correct/simple_jump/clang_pic/simple_jump.expected +++ b/src/test/correct/simple_jump/clang_pic/simple_jump.expected @@ -214,10 +214,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000938; - } - goto l0000093b; + goto lmain_goto_l00000938, lmain_goto_l0000093b; l0000093b: assume {:captureState "l0000093b"} true; R8, Gamma_R8 := 1bv64, true; @@ -229,10 +226,7 @@ procedure main() l0000093e: assume {:captureState "l0000093e"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000946; - } - goto l0000095d; + goto l0000093e_goto_l00000946, l0000093e_goto_l0000095d; l0000095d: assume {:captureState "l0000095d"} true; goto l0000095e; @@ -247,4 +241,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000938: + assume {:captureState "lmain_goto_l00000938"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000938; + lmain_goto_l0000093b: + assume {:captureState "lmain_goto_l0000093b"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000093b; + l0000093e_goto_l00000946: + assume {:captureState "l0000093e_goto_l00000946"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000946; + l0000093e_goto_l0000095d: + assume {:captureState "l0000093e_goto_l0000095d"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000095d; } diff --git a/src/test/correct/simple_jump/gcc/simple_jump.expected b/src/test/correct/simple_jump/gcc/simple_jump.expected index 9523ac12f..90f4f92e4 100644 --- a/src/test/correct/simple_jump/gcc/simple_jump.expected +++ b/src/test/correct/simple_jump/gcc/simple_jump.expected @@ -209,10 +209,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l0000030a; - } - goto l0000031f; + goto lmain_goto_l0000030a, lmain_goto_l0000031f; l0000031f: assume {:captureState "l0000031f"} true; R0, Gamma_R0 := 6bv64, true; @@ -224,4 +221,12 @@ procedure main() R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l0000030a: + assume {:captureState "lmain_goto_l0000030a"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000030a; + lmain_goto_l0000031f: + assume {:captureState "lmain_goto_l0000031f"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000031f; } diff --git a/src/test/correct/simple_jump/gcc_no_plt_no_pic/simple_jump.expected b/src/test/correct/simple_jump/gcc_no_plt_no_pic/simple_jump.expected index 76f57dcef..fca2ea8b1 100644 --- a/src/test/correct/simple_jump/gcc_no_plt_no_pic/simple_jump.expected +++ b/src/test/correct/simple_jump/gcc_no_plt_no_pic/simple_jump.expected @@ -209,10 +209,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l000008e1; - } - goto l000008f6; + goto lmain_goto_l000008e1, lmain_goto_l000008f6; l000008f6: assume {:captureState "l000008f6"} true; R0, Gamma_R0 := 6bv64, true; @@ -224,4 +221,12 @@ procedure main() R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l000008e1: + assume {:captureState "lmain_goto_l000008e1"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000008e1; + lmain_goto_l000008f6: + assume {:captureState "lmain_goto_l000008f6"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000008f6; } diff --git a/src/test/correct/simple_jump/gcc_pic/simple_jump.expected b/src/test/correct/simple_jump/gcc_pic/simple_jump.expected index 76f57dcef..fca2ea8b1 100644 --- a/src/test/correct/simple_jump/gcc_pic/simple_jump.expected +++ b/src/test/correct/simple_jump/gcc_pic/simple_jump.expected @@ -209,10 +209,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l000008e1; - } - goto l000008f6; + goto lmain_goto_l000008e1, lmain_goto_l000008f6; l000008f6: assume {:captureState "l000008f6"} true; R0, Gamma_R0 := 6bv64, true; @@ -224,4 +221,12 @@ procedure main() R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l000008e1: + assume {:captureState "lmain_goto_l000008e1"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000008e1; + lmain_goto_l000008f6: + assume {:captureState "lmain_goto_l000008f6"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000008f6; } diff --git a/src/test/correct/switch/clang/switch.expected b/src/test/correct/switch/clang/switch.expected index 75db57ac2..b33b54140 100644 --- a/src/test/correct/switch/clang/switch.expected +++ b/src/test/correct/switch/clang/switch.expected @@ -216,10 +216,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l0000035a; - } - goto l0000035d; + goto lmain_goto_l0000035a, lmain_goto_l0000035d; l0000035d: assume {:captureState "l0000035d"} true; R8, Gamma_R8 := 1bv64, true; @@ -231,10 +228,7 @@ procedure main() l00000360: assume {:captureState "l00000360"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000368; - } - goto l0000039a; + goto l00000360_goto_l00000368, l00000360_goto_l0000039a; l0000039a: assume {:captureState "l0000039a"} true; goto l0000039b; @@ -248,10 +242,7 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000003c4; - } - goto l000003c7; + goto l0000039b_goto_l000003c4, l0000039b_goto_l000003c7; l000003c7: assume {:captureState "l000003c7"} true; R8, Gamma_R8 := 1bv64, true; @@ -263,10 +254,7 @@ procedure main() l000003ca: assume {:captureState "l000003ca"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000389; - } - goto l000003d7; + goto l000003ca_goto_l00000389, l000003ca_goto_l000003d7; l00000389: assume {:captureState "l00000389"} true; R8, Gamma_R8 := 5bv64, true; @@ -292,4 +280,36 @@ procedure main() assume {:captureState "l0000037b"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l0000035a: + assume {:captureState "lmain_goto_l0000035a"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000035a; + lmain_goto_l0000035d: + assume {:captureState "lmain_goto_l0000035d"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000035d; + l00000360_goto_l00000368: + assume {:captureState "l00000360_goto_l00000368"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000368; + l00000360_goto_l0000039a: + assume {:captureState "l00000360_goto_l0000039a"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000039a; + l0000039b_goto_l000003c4: + assume {:captureState "l0000039b_goto_l000003c4"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000003c4; + l0000039b_goto_l000003c7: + assume {:captureState "l0000039b_goto_l000003c7"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000003c7; + l000003ca_goto_l00000389: + assume {:captureState "l000003ca_goto_l00000389"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000389; + l000003ca_goto_l000003d7: + assume {:captureState "l000003ca_goto_l000003d7"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l000003d7; } diff --git a/src/test/correct/switch/clang_no_plt_no_pic/switch.expected b/src/test/correct/switch/clang_no_plt_no_pic/switch.expected index e904c4952..198585344 100644 --- a/src/test/correct/switch/clang_no_plt_no_pic/switch.expected +++ b/src/test/correct/switch/clang_no_plt_no_pic/switch.expected @@ -216,10 +216,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000a0f; - } - goto l00000a12; + goto lmain_goto_l00000a0f, lmain_goto_l00000a12; l00000a12: assume {:captureState "l00000a12"} true; R8, Gamma_R8 := 1bv64, true; @@ -231,10 +228,7 @@ procedure main() l00000a15: assume {:captureState "l00000a15"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000a1d; - } - goto l00000a4f; + goto l00000a15_goto_l00000a1d, l00000a15_goto_l00000a4f; l00000a4f: assume {:captureState "l00000a4f"} true; goto l00000a50; @@ -248,10 +242,7 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000a79; - } - goto l00000a7c; + goto l00000a50_goto_l00000a79, l00000a50_goto_l00000a7c; l00000a7c: assume {:captureState "l00000a7c"} true; R8, Gamma_R8 := 1bv64, true; @@ -263,10 +254,7 @@ procedure main() l00000a7f: assume {:captureState "l00000a7f"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000a3e; - } - goto l00000a8c; + goto l00000a7f_goto_l00000a3e, l00000a7f_goto_l00000a8c; l00000a3e: assume {:captureState "l00000a3e"} true; R8, Gamma_R8 := 5bv64, true; @@ -292,4 +280,36 @@ procedure main() assume {:captureState "l00000a30"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000a0f: + assume {:captureState "lmain_goto_l00000a0f"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000a0f; + lmain_goto_l00000a12: + assume {:captureState "lmain_goto_l00000a12"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000a12; + l00000a15_goto_l00000a1d: + assume {:captureState "l00000a15_goto_l00000a1d"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000a1d; + l00000a15_goto_l00000a4f: + assume {:captureState "l00000a15_goto_l00000a4f"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000a4f; + l00000a50_goto_l00000a79: + assume {:captureState "l00000a50_goto_l00000a79"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000a79; + l00000a50_goto_l00000a7c: + assume {:captureState "l00000a50_goto_l00000a7c"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000a7c; + l00000a7f_goto_l00000a3e: + assume {:captureState "l00000a7f_goto_l00000a3e"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000a3e; + l00000a7f_goto_l00000a8c: + assume {:captureState "l00000a7f_goto_l00000a8c"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000a8c; } diff --git a/src/test/correct/switch/clang_pic/switch.expected b/src/test/correct/switch/clang_pic/switch.expected index e904c4952..198585344 100644 --- a/src/test/correct/switch/clang_pic/switch.expected +++ b/src/test/correct/switch/clang_pic/switch.expected @@ -216,10 +216,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000a0f; - } - goto l00000a12; + goto lmain_goto_l00000a0f, lmain_goto_l00000a12; l00000a12: assume {:captureState "l00000a12"} true; R8, Gamma_R8 := 1bv64, true; @@ -231,10 +228,7 @@ procedure main() l00000a15: assume {:captureState "l00000a15"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000a1d; - } - goto l00000a4f; + goto l00000a15_goto_l00000a1d, l00000a15_goto_l00000a4f; l00000a4f: assume {:captureState "l00000a4f"} true; goto l00000a50; @@ -248,10 +242,7 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000a79; - } - goto l00000a7c; + goto l00000a50_goto_l00000a79, l00000a50_goto_l00000a7c; l00000a7c: assume {:captureState "l00000a7c"} true; R8, Gamma_R8 := 1bv64, true; @@ -263,10 +254,7 @@ procedure main() l00000a7f: assume {:captureState "l00000a7f"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000a3e; - } - goto l00000a8c; + goto l00000a7f_goto_l00000a3e, l00000a7f_goto_l00000a8c; l00000a3e: assume {:captureState "l00000a3e"} true; R8, Gamma_R8 := 5bv64, true; @@ -292,4 +280,36 @@ procedure main() assume {:captureState "l00000a30"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000a0f: + assume {:captureState "lmain_goto_l00000a0f"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000a0f; + lmain_goto_l00000a12: + assume {:captureState "lmain_goto_l00000a12"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000a12; + l00000a15_goto_l00000a1d: + assume {:captureState "l00000a15_goto_l00000a1d"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000a1d; + l00000a15_goto_l00000a4f: + assume {:captureState "l00000a15_goto_l00000a4f"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000a4f; + l00000a50_goto_l00000a79: + assume {:captureState "l00000a50_goto_l00000a79"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000a79; + l00000a50_goto_l00000a7c: + assume {:captureState "l00000a50_goto_l00000a7c"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000a7c; + l00000a7f_goto_l00000a3e: + assume {:captureState "l00000a7f_goto_l00000a3e"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000a3e; + l00000a7f_goto_l00000a8c: + assume {:captureState "l00000a7f_goto_l00000a8c"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000a8c; } diff --git a/src/test/correct/switch/gcc/switch.expected b/src/test/correct/switch/gcc/switch.expected index de46b7181..355bb8743 100644 --- a/src/test/correct/switch/gcc/switch.expected +++ b/src/test/correct/switch/gcc/switch.expected @@ -213,10 +213,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000339; - } - goto l0000036b; + goto lmain_goto_l00000339, lmain_goto_l0000036b; l0000036b: assume {:captureState "l0000036b"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -226,10 +223,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l0000035c; - } - goto l00000391; + goto l0000036b_goto_l0000035c, l0000036b_goto_l00000391; l0000035c: assume {:captureState "l0000035c"} true; R0, Gamma_R0 := 5bv64, true; @@ -252,4 +246,20 @@ procedure main() assume {:captureState "l0000034c"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000339: + assume {:captureState "lmain_goto_l00000339"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000339; + lmain_goto_l0000036b: + assume {:captureState "lmain_goto_l0000036b"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000036b; + l0000036b_goto_l0000035c: + assume {:captureState "l0000036b_goto_l0000035c"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000035c; + l0000036b_goto_l00000391: + assume {:captureState "l0000036b_goto_l00000391"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000391; } diff --git a/src/test/correct/switch/gcc_no_plt_no_pic/switch.expected b/src/test/correct/switch/gcc_no_plt_no_pic/switch.expected index ef08dc502..6e21b2c50 100644 --- a/src/test/correct/switch/gcc_no_plt_no_pic/switch.expected +++ b/src/test/correct/switch/gcc_no_plt_no_pic/switch.expected @@ -213,10 +213,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000998; - } - goto l000009ca; + goto lmain_goto_l00000998, lmain_goto_l000009ca; l000009ca: assume {:captureState "l000009ca"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -226,10 +223,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l000009bb; - } - goto l000009f0; + goto l000009ca_goto_l000009bb, l000009ca_goto_l000009f0; l000009bb: assume {:captureState "l000009bb"} true; R0, Gamma_R0 := 5bv64, true; @@ -252,4 +246,20 @@ procedure main() assume {:captureState "l000009ab"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000998: + assume {:captureState "lmain_goto_l00000998"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000998; + lmain_goto_l000009ca: + assume {:captureState "lmain_goto_l000009ca"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000009ca; + l000009ca_goto_l000009bb: + assume {:captureState "l000009ca_goto_l000009bb"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000009bb; + l000009ca_goto_l000009f0: + assume {:captureState "l000009ca_goto_l000009f0"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000009f0; } diff --git a/src/test/correct/switch/gcc_pic/switch.expected b/src/test/correct/switch/gcc_pic/switch.expected index ef08dc502..6e21b2c50 100644 --- a/src/test/correct/switch/gcc_pic/switch.expected +++ b/src/test/correct/switch/gcc_pic/switch.expected @@ -213,10 +213,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000998; - } - goto l000009ca; + goto lmain_goto_l00000998, lmain_goto_l000009ca; l000009ca: assume {:captureState "l000009ca"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 8bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 8bv64)); @@ -226,10 +223,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l000009bb; - } - goto l000009f0; + goto l000009ca_goto_l000009bb, l000009ca_goto_l000009f0; l000009bb: assume {:captureState "l000009bb"} true; R0, Gamma_R0 := 5bv64, true; @@ -252,4 +246,20 @@ procedure main() assume {:captureState "l000009ab"} true; R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000998: + assume {:captureState "lmain_goto_l00000998"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000998; + lmain_goto_l000009ca: + assume {:captureState "lmain_goto_l000009ca"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000009ca; + l000009ca_goto_l000009bb: + assume {:captureState "l000009ca_goto_l000009bb"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000009bb; + l000009ca_goto_l000009f0: + assume {:captureState "l000009ca_goto_l000009f0"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000009f0; } diff --git a/src/test/correct/switch2/gcc/switch2.expected b/src/test/correct/switch2/gcc/switch2.expected index e577cd799..317bf93c9 100644 --- a/src/test/correct/switch2/gcc/switch2.expected +++ b/src/test/correct/switch2/gcc/switch2.expected @@ -258,10 +258,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000003d0; - } - goto l00000408; + goto lmain_goto_l000003d0, lmain_goto_l00000408; l000003d0: assume {:captureState "l000003d0"} true; R0, Gamma_R0 := 4bv64, true; @@ -276,11 +273,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#6); ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000003e2; - } - goto l00000430; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000408_goto_l000003e2, l00000408_goto_l00000430; l00000430: assume {:captureState "l00000430"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -290,10 +284,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#7, 1bv32), 0bv32), Gamma_#7; NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000451; - } - goto l00000467; + goto l00000430_goto_l00000451, l00000430_goto_l00000467; l00000467: assume {:captureState "l00000467"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -302,11 +293,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#8, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#8); ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000003e2; - } - goto l0000048f; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000467_goto_l000003e2, l00000467_goto_l0000048f; l0000048f: assume {:captureState "l0000048f"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -316,10 +304,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#9, 1bv32), 0bv32), Gamma_#9; NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000004b0; - } - goto l000004e2; + goto l0000048f_goto_l000004b0, l0000048f_goto_l000004e2; l000004b0: assume {:captureState "l000004b0"} true; R30, Gamma_R30 := 1944bv64, true; @@ -338,11 +323,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#10, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#10); ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l000003e2; - } - goto l0000050a; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l000004e2_goto_l000003e2, l000004e2_goto_l0000050a; l0000050a: assume {:captureState "l0000050a"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -352,10 +334,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#11, 1bv32), 0bv32), Gamma_#11; NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000004c4; - } - goto l00000530; + goto l0000050a_goto_l000004c4, l0000050a_goto_l00000530; l000004c4: assume {:captureState "l000004c4"} true; R0, Gamma_R0 := 1bv64, true; @@ -371,10 +350,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#12, 1bv32), 0bv32), Gamma_#12; NF, Gamma_NF := bvadd32(#12, 1bv32)[32:31], Gamma_#12; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000004d5; - } - goto l00000556; + goto l00000530_goto_l000004d5, l00000530_goto_l00000556; l000004d5: assume {:captureState "l000004d5"} true; R0, Gamma_R0 := 2bv64, true; @@ -402,6 +378,70 @@ procedure main() R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; return; + lmain_goto_l000003d0: + assume {:captureState "lmain_goto_l000003d0"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000003d0; + lmain_goto_l00000408: + assume {:captureState "lmain_goto_l00000408"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000408; + l00000408_goto_l000003e2: + assume {:captureState "l00000408_goto_l000003e2"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000003e2; + l00000408_goto_l00000430: + assume {:captureState "l00000408_goto_l00000430"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000430; + l00000430_goto_l00000451: + assume {:captureState "l00000430_goto_l00000451"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000451; + l00000430_goto_l00000467: + assume {:captureState "l00000430_goto_l00000467"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000467; + l00000467_goto_l000003e2: + assume {:captureState "l00000467_goto_l000003e2"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000003e2; + l00000467_goto_l0000048f: + assume {:captureState "l00000467_goto_l0000048f"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000048f; + l0000048f_goto_l000004b0: + assume {:captureState "l0000048f_goto_l000004b0"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000004b0; + l0000048f_goto_l000004e2: + assume {:captureState "l0000048f_goto_l000004e2"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000004e2; + l000004e2_goto_l000003e2: + assume {:captureState "l000004e2_goto_l000003e2"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l000003e2; + l000004e2_goto_l0000050a: + assume {:captureState "l000004e2_goto_l0000050a"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l0000050a; + l0000050a_goto_l000004c4: + assume {:captureState "l0000050a_goto_l000004c4"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000004c4; + l0000050a_goto_l00000530: + assume {:captureState "l0000050a_goto_l00000530"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000530; + l00000530_goto_l000004d5: + assume {:captureState "l00000530_goto_l000004d5"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000004d5; + l00000530_goto_l00000556: + assume {:captureState "l00000530_goto_l00000556"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000556; } procedure r() diff --git a/src/test/correct/switch2/gcc_no_plt_no_pic/switch2.expected b/src/test/correct/switch2/gcc_no_plt_no_pic/switch2.expected index d39a1164a..6f0e32d47 100644 --- a/src/test/correct/switch2/gcc_no_plt_no_pic/switch2.expected +++ b/src/test/correct/switch2/gcc_no_plt_no_pic/switch2.expected @@ -258,10 +258,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000c2f; - } - goto l00000c67; + goto lmain_goto_l00000c2f, lmain_goto_l00000c67; l00000c2f: assume {:captureState "l00000c2f"} true; R0, Gamma_R0 := 4bv64, true; @@ -276,11 +273,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#6); ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l00000c41; - } - goto l00000c8f; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000c67_goto_l00000c41, l00000c67_goto_l00000c8f; l00000c8f: assume {:captureState "l00000c8f"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -290,10 +284,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#7, 1bv32), 0bv32), Gamma_#7; NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000cb0; - } - goto l00000cc6; + goto l00000c8f_goto_l00000cb0, l00000c8f_goto_l00000cc6; l00000cc6: assume {:captureState "l00000cc6"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -302,11 +293,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#8, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#8); ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l00000c41; - } - goto l00000cee; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000cc6_goto_l00000c41, l00000cc6_goto_l00000cee; l00000cee: assume {:captureState "l00000cee"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -316,10 +304,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#9, 1bv32), 0bv32), Gamma_#9; NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000d0f; - } - goto l00000d41; + goto l00000cee_goto_l00000d0f, l00000cee_goto_l00000d41; l00000d0f: assume {:captureState "l00000d0f"} true; R30, Gamma_R30 := 1944bv64, true; @@ -338,11 +323,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#10, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#10); ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l00000c41; - } - goto l00000d69; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000d41_goto_l00000c41, l00000d41_goto_l00000d69; l00000d69: assume {:captureState "l00000d69"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -352,10 +334,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#11, 1bv32), 0bv32), Gamma_#11; NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000d23; - } - goto l00000d8f; + goto l00000d69_goto_l00000d23, l00000d69_goto_l00000d8f; l00000d23: assume {:captureState "l00000d23"} true; R0, Gamma_R0 := 1bv64, true; @@ -371,10 +350,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#12, 1bv32), 0bv32), Gamma_#12; NF, Gamma_NF := bvadd32(#12, 1bv32)[32:31], Gamma_#12; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000d34; - } - goto l00000db5; + goto l00000d8f_goto_l00000d34, l00000d8f_goto_l00000db5; l00000d34: assume {:captureState "l00000d34"} true; R0, Gamma_R0 := 2bv64, true; @@ -402,6 +378,70 @@ procedure main() R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; return; + lmain_goto_l00000c2f: + assume {:captureState "lmain_goto_l00000c2f"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000c2f; + lmain_goto_l00000c67: + assume {:captureState "lmain_goto_l00000c67"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000c67; + l00000c67_goto_l00000c41: + assume {:captureState "l00000c67_goto_l00000c41"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00000c41; + l00000c67_goto_l00000c8f: + assume {:captureState "l00000c67_goto_l00000c8f"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000c8f; + l00000c8f_goto_l00000cb0: + assume {:captureState "l00000c8f_goto_l00000cb0"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000cb0; + l00000c8f_goto_l00000cc6: + assume {:captureState "l00000c8f_goto_l00000cc6"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000cc6; + l00000cc6_goto_l00000c41: + assume {:captureState "l00000cc6_goto_l00000c41"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00000c41; + l00000cc6_goto_l00000cee: + assume {:captureState "l00000cc6_goto_l00000cee"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000cee; + l00000cee_goto_l00000d0f: + assume {:captureState "l00000cee_goto_l00000d0f"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000d0f; + l00000cee_goto_l00000d41: + assume {:captureState "l00000cee_goto_l00000d41"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000d41; + l00000d41_goto_l00000c41: + assume {:captureState "l00000d41_goto_l00000c41"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00000c41; + l00000d41_goto_l00000d69: + assume {:captureState "l00000d41_goto_l00000d69"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000d69; + l00000d69_goto_l00000d23: + assume {:captureState "l00000d69_goto_l00000d23"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000d23; + l00000d69_goto_l00000d8f: + assume {:captureState "l00000d69_goto_l00000d8f"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000d8f; + l00000d8f_goto_l00000d34: + assume {:captureState "l00000d8f_goto_l00000d34"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000d34; + l00000d8f_goto_l00000db5: + assume {:captureState "l00000d8f_goto_l00000db5"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000db5; } procedure r() diff --git a/src/test/correct/switch2/gcc_pic/switch2.expected b/src/test/correct/switch2/gcc_pic/switch2.expected index d39a1164a..6f0e32d47 100644 --- a/src/test/correct/switch2/gcc_pic/switch2.expected +++ b/src/test/correct/switch2/gcc_pic/switch2.expected @@ -258,10 +258,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000c2f; - } - goto l00000c67; + goto lmain_goto_l00000c2f, lmain_goto_l00000c67; l00000c2f: assume {:captureState "l00000c2f"} true; R0, Gamma_R0 := 4bv64, true; @@ -276,11 +273,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#6, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967291bv33))), (Gamma_R0 && Gamma_#6); ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l00000c41; - } - goto l00000c8f; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000c67_goto_l00000c41, l00000c67_goto_l00000c8f; l00000c8f: assume {:captureState "l00000c8f"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -290,10 +284,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#7, 1bv32), 0bv32), Gamma_#7; NF, Gamma_NF := bvadd32(#7, 1bv32)[32:31], Gamma_#7; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000cb0; - } - goto l00000cc6; + goto l00000c8f_goto_l00000cb0, l00000c8f_goto_l00000cc6; l00000cc6: assume {:captureState "l00000cc6"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -302,11 +293,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#8, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967292bv33))), (Gamma_R0 && Gamma_#8); ZF, Gamma_ZF := bvcomp32(bvadd32(#8, 1bv32), 0bv32), Gamma_#8; NF, Gamma_NF := bvadd32(#8, 1bv32)[32:31], Gamma_#8; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l00000c41; - } - goto l00000cee; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000cc6_goto_l00000c41, l00000cc6_goto_l00000cee; l00000cee: assume {:captureState "l00000cee"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -316,10 +304,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#9, 1bv32), 0bv32), Gamma_#9; NF, Gamma_NF := bvadd32(#9, 1bv32)[32:31], Gamma_#9; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000d0f; - } - goto l00000d41; + goto l00000cee_goto_l00000d0f, l00000cee_goto_l00000d41; l00000d0f: assume {:captureState "l00000d0f"} true; R30, Gamma_R30 := 1944bv64, true; @@ -338,11 +323,8 @@ procedure main() CF, Gamma_CF := bvnot1(bvcomp33(zero_extend1_32(bvadd32(#10, 1bv32)), bvadd33(zero_extend1_32(R0[32:0]), 4294967293bv33))), (Gamma_R0 && Gamma_#10); ZF, Gamma_ZF := bvcomp32(bvadd32(#10, 1bv32), 0bv32), Gamma_#10; NF, Gamma_NF := bvadd32(#10, 1bv32)[32:31], Gamma_#10; - assert (Gamma_ZF && (Gamma_VF && Gamma_NF)); - if ((bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1)) { - goto l00000c41; - } - goto l00000d69; + assert ((Gamma_NF && Gamma_VF) && Gamma_ZF); + goto l00000d41_goto_l00000c41, l00000d41_goto_l00000d69; l00000d69: assume {:captureState "l00000d69"} true; R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); @@ -352,10 +334,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#11, 1bv32), 0bv32), Gamma_#11; NF, Gamma_NF := bvadd32(#11, 1bv32)[32:31], Gamma_#11; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000d23; - } - goto l00000d8f; + goto l00000d69_goto_l00000d23, l00000d69_goto_l00000d8f; l00000d23: assume {:captureState "l00000d23"} true; R0, Gamma_R0 := 1bv64, true; @@ -371,10 +350,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#12, 1bv32), 0bv32), Gamma_#12; NF, Gamma_NF := bvadd32(#12, 1bv32)[32:31], Gamma_#12; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000d34; - } - goto l00000db5; + goto l00000d8f_goto_l00000d34, l00000d8f_goto_l00000db5; l00000d34: assume {:captureState "l00000d34"} true; R0, Gamma_R0 := 2bv64, true; @@ -402,6 +378,70 @@ procedure main() R30, Gamma_R30 := memory_load64_le(stack, bvadd64(R31, 8bv64)), gamma_load64(Gamma_stack, bvadd64(R31, 8bv64)); R31, Gamma_R31 := bvadd64(R31, 48bv64), Gamma_R31; return; + lmain_goto_l00000c2f: + assume {:captureState "lmain_goto_l00000c2f"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000c2f; + lmain_goto_l00000c67: + assume {:captureState "lmain_goto_l00000c67"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000c67; + l00000c67_goto_l00000c41: + assume {:captureState "l00000c67_goto_l00000c41"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00000c41; + l00000c67_goto_l00000c8f: + assume {:captureState "l00000c67_goto_l00000c8f"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000c8f; + l00000c8f_goto_l00000cb0: + assume {:captureState "l00000c8f_goto_l00000cb0"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000cb0; + l00000c8f_goto_l00000cc6: + assume {:captureState "l00000c8f_goto_l00000cc6"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000cc6; + l00000cc6_goto_l00000c41: + assume {:captureState "l00000cc6_goto_l00000c41"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00000c41; + l00000cc6_goto_l00000cee: + assume {:captureState "l00000cc6_goto_l00000cee"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000cee; + l00000cee_goto_l00000d0f: + assume {:captureState "l00000cee_goto_l00000d0f"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000d0f; + l00000cee_goto_l00000d41: + assume {:captureState "l00000cee_goto_l00000d41"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000d41; + l00000d41_goto_l00000c41: + assume {:captureState "l00000d41_goto_l00000c41"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) != 0bv1); + goto l00000c41; + l00000d41_goto_l00000d69: + assume {:captureState "l00000d41_goto_l00000d69"} true; + assume (bvand1(bvcomp1(NF, VF), bvcomp1(ZF, 0bv1)) == 0bv1); + goto l00000d69; + l00000d69_goto_l00000d23: + assume {:captureState "l00000d69_goto_l00000d23"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000d23; + l00000d69_goto_l00000d8f: + assume {:captureState "l00000d69_goto_l00000d8f"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000d8f; + l00000d8f_goto_l00000d34: + assume {:captureState "l00000d8f_goto_l00000d34"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000d34; + l00000d8f_goto_l00000db5: + assume {:captureState "l00000d8f_goto_l00000db5"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000db5; } procedure r() diff --git a/src/test/correct/using_gamma_conditional/clang/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/clang/using_gamma_conditional.expected index 08d8da05a..b1773a812 100644 --- a/src/test/correct/using_gamma_conditional/clang/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/clang/using_gamma_conditional.expected @@ -225,10 +225,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000322; - } - goto l00000325; + goto lmain_goto_l00000322, lmain_goto_l00000325; l00000325: assume {:captureState "l00000325"} true; R8, Gamma_R8 := 1bv64, true; @@ -240,10 +237,7 @@ procedure main() l00000328: assume {:captureState "l00000328"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000330; - } - goto l00000358; + goto l00000328_goto_l00000330, l00000328_goto_l00000358; l00000330: assume {:captureState "l00000330"} true; R8, Gamma_R8 := 1bv64, true; @@ -263,4 +257,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000322: + assume {:captureState "lmain_goto_l00000322"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000322; + lmain_goto_l00000325: + assume {:captureState "lmain_goto_l00000325"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000325; + l00000328_goto_l00000330: + assume {:captureState "l00000328_goto_l00000330"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000330; + l00000328_goto_l00000358: + assume {:captureState "l00000328_goto_l00000358"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000358; } diff --git a/src/test/correct/using_gamma_conditional/clang_O2/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/clang_O2/using_gamma_conditional.expected index 60b84aa63..3b7e9dc9d 100644 --- a/src/test/correct/using_gamma_conditional/clang_O2/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/clang_O2/using_gamma_conditional.expected @@ -207,10 +207,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l000002e5; - } - goto l000002e8; + goto lmain_goto_l000002e5, lmain_goto_l000002e8; l000002e8: assume {:captureState "l000002e8"} true; R0, Gamma_R0 := 1bv64, true; @@ -222,4 +219,12 @@ procedure main() l000002eb: assume {:captureState "l000002eb"} true; return; + lmain_goto_l000002e5: + assume {:captureState "lmain_goto_l000002e5"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000002e5; + lmain_goto_l000002e8: + assume {:captureState "lmain_goto_l000002e8"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000002e8; } diff --git a/src/test/correct/using_gamma_conditional/clang_no_plt_no_pic/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/clang_no_plt_no_pic/using_gamma_conditional.expected index 1dd67fe4c..bb9a9caa9 100644 --- a/src/test/correct/using_gamma_conditional/clang_no_plt_no_pic/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/clang_no_plt_no_pic/using_gamma_conditional.expected @@ -225,10 +225,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l0000093d; - } - goto l00000940; + goto lmain_goto_l0000093d, lmain_goto_l00000940; l00000940: assume {:captureState "l00000940"} true; R8, Gamma_R8 := 1bv64, true; @@ -240,10 +237,7 @@ procedure main() l00000943: assume {:captureState "l00000943"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l0000094b; - } - goto l00000973; + goto l00000943_goto_l0000094b, l00000943_goto_l00000973; l0000094b: assume {:captureState "l0000094b"} true; R8, Gamma_R8 := 1bv64, true; @@ -263,4 +257,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l0000093d: + assume {:captureState "lmain_goto_l0000093d"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000093d; + lmain_goto_l00000940: + assume {:captureState "lmain_goto_l00000940"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000940; + l00000943_goto_l0000094b: + assume {:captureState "l00000943_goto_l0000094b"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l0000094b; + l00000943_goto_l00000973: + assume {:captureState "l00000943_goto_l00000973"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000973; } diff --git a/src/test/correct/using_gamma_conditional/clang_pic/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/clang_pic/using_gamma_conditional.expected index 72ef22ce4..022cc6fb7 100644 --- a/src/test/correct/using_gamma_conditional/clang_pic/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/clang_pic/using_gamma_conditional.expected @@ -259,10 +259,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l0000032d; - } - goto l00000330; + goto lmain_goto_l0000032d, lmain_goto_l00000330; l00000330: assume {:captureState "l00000330"} true; R8, Gamma_R8 := 1bv64, true; @@ -274,10 +271,7 @@ procedure main() l00000333: assume {:captureState "l00000333"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l0000033b; - } - goto l00000363; + goto l00000333_goto_l0000033b, l00000333_goto_l00000363; l0000033b: assume {:captureState "l0000033b"} true; R8, Gamma_R8 := 1bv64, true; @@ -297,4 +291,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l0000032d: + assume {:captureState "lmain_goto_l0000032d"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l0000032d; + lmain_goto_l00000330: + assume {:captureState "lmain_goto_l00000330"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000330; + l00000333_goto_l0000033b: + assume {:captureState "l00000333_goto_l0000033b"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l0000033b; + l00000333_goto_l00000363: + assume {:captureState "l00000333_goto_l00000363"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000363; } diff --git a/src/test/correct/using_gamma_conditional/gcc/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/gcc/using_gamma_conditional.expected index 4ec9b160b..a078d99f9 100644 --- a/src/test/correct/using_gamma_conditional/gcc/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/gcc/using_gamma_conditional.expected @@ -206,10 +206,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000002fa; - } - goto l00000309; + goto lmain_goto_l000002fa, lmain_goto_l00000309; l000002fa: assume {:captureState "l000002fa"} true; R0, Gamma_R0 := 1bv64, true; @@ -221,4 +218,12 @@ procedure main() l00000304: assume {:captureState "l00000304"} true; return; + lmain_goto_l000002fa: + assume {:captureState "lmain_goto_l000002fa"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000002fa; + lmain_goto_l00000309: + assume {:captureState "lmain_goto_l00000309"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000309; } diff --git a/src/test/correct/using_gamma_conditional/gcc_O2/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/gcc_O2/using_gamma_conditional.expected index 10df26406..62ead8320 100644 --- a/src/test/correct/using_gamma_conditional/gcc_O2/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/gcc_O2/using_gamma_conditional.expected @@ -205,10 +205,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#1, 1bv32), 0bv32), Gamma_#1; NF, Gamma_NF := bvadd32(#1, 1bv32)[32:31], Gamma_#1; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l000001cf; - } - goto l000001d2; + goto lmain_goto_l000001cf, lmain_goto_l000001d2; l000001d2: assume {:captureState "l000001d2"} true; R0, Gamma_R0 := 1bv64, true; @@ -220,4 +217,12 @@ procedure main() l000001d5: assume {:captureState "l000001d5"} true; return; + lmain_goto_l000001cf: + assume {:captureState "lmain_goto_l000001cf"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000001cf; + lmain_goto_l000001d2: + assume {:captureState "lmain_goto_l000001d2"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000001d2; } diff --git a/src/test/correct/using_gamma_conditional/gcc_no_plt_no_pic/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/gcc_no_plt_no_pic/using_gamma_conditional.expected index 44703edf4..1eb9759f1 100644 --- a/src/test/correct/using_gamma_conditional/gcc_no_plt_no_pic/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/gcc_no_plt_no_pic/using_gamma_conditional.expected @@ -206,10 +206,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000008b3; - } - goto l000008c2; + goto lmain_goto_l000008b3, lmain_goto_l000008c2; l000008b3: assume {:captureState "l000008b3"} true; R0, Gamma_R0 := 1bv64, true; @@ -221,4 +218,12 @@ procedure main() l000008bd: assume {:captureState "l000008bd"} true; return; + lmain_goto_l000008b3: + assume {:captureState "lmain_goto_l000008b3"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000008b3; + lmain_goto_l000008c2: + assume {:captureState "lmain_goto_l000008c2"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000008c2; } diff --git a/src/test/correct/using_gamma_conditional/gcc_pic/using_gamma_conditional.expected b/src/test/correct/using_gamma_conditional/gcc_pic/using_gamma_conditional.expected index 04f503f58..661b64502 100644 --- a/src/test/correct/using_gamma_conditional/gcc_pic/using_gamma_conditional.expected +++ b/src/test/correct/using_gamma_conditional/gcc_pic/using_gamma_conditional.expected @@ -239,10 +239,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000002fb; - } - goto l0000030a; + goto lmain_goto_l000002fb, lmain_goto_l0000030a; l000002fb: assume {:captureState "l000002fb"} true; R0, Gamma_R0 := 1bv64, true; @@ -254,4 +251,12 @@ procedure main() l00000305: assume {:captureState "l00000305"} true; return; + lmain_goto_l000002fb: + assume {:captureState "lmain_goto_l000002fb"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000002fb; + lmain_goto_l0000030a: + assume {:captureState "lmain_goto_l0000030a"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000030a; } diff --git a/src/test/incorrect/iflocal/clang/iflocal.expected b/src/test/incorrect/iflocal/clang/iflocal.expected index 9be5ec85b..f90233011 100644 --- a/src/test/incorrect/iflocal/clang/iflocal.expected +++ b/src/test/incorrect/iflocal/clang/iflocal.expected @@ -214,10 +214,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000334; - } - goto l00000337; + goto lmain_goto_l00000334, lmain_goto_l00000337; l00000337: assume {:captureState "l00000337"} true; R8, Gamma_R8 := 1bv64, true; @@ -229,10 +226,7 @@ procedure main() l0000033a: assume {:captureState "l0000033a"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000342; - } - goto l00000359; + goto l0000033a_goto_l00000342, l0000033a_goto_l00000359; l00000359: assume {:captureState "l00000359"} true; goto l0000035a; @@ -247,4 +241,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000334: + assume {:captureState "lmain_goto_l00000334"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000334; + lmain_goto_l00000337: + assume {:captureState "lmain_goto_l00000337"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000337; + l0000033a_goto_l00000342: + assume {:captureState "l0000033a_goto_l00000342"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000342; + l0000033a_goto_l00000359: + assume {:captureState "l0000033a_goto_l00000359"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000359; } diff --git a/src/test/incorrect/iflocal/clang_no_plt_no_pic/iflocal.expected b/src/test/incorrect/iflocal/clang_no_plt_no_pic/iflocal.expected index 8fa6934a5..72e0f9841 100644 --- a/src/test/incorrect/iflocal/clang_no_plt_no_pic/iflocal.expected +++ b/src/test/incorrect/iflocal/clang_no_plt_no_pic/iflocal.expected @@ -214,10 +214,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000956; - } - goto l00000959; + goto lmain_goto_l00000956, lmain_goto_l00000959; l00000959: assume {:captureState "l00000959"} true; R8, Gamma_R8 := 1bv64, true; @@ -229,10 +226,7 @@ procedure main() l0000095c: assume {:captureState "l0000095c"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000964; - } - goto l0000097b; + goto l0000095c_goto_l00000964, l0000095c_goto_l0000097b; l0000097b: assume {:captureState "l0000097b"} true; goto l0000097c; @@ -247,4 +241,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000956: + assume {:captureState "lmain_goto_l00000956"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000956; + lmain_goto_l00000959: + assume {:captureState "lmain_goto_l00000959"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000959; + l0000095c_goto_l00000964: + assume {:captureState "l0000095c_goto_l00000964"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000964; + l0000095c_goto_l0000097b: + assume {:captureState "l0000095c_goto_l0000097b"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000097b; } diff --git a/src/test/incorrect/iflocal/clang_pic/iflocal.expected b/src/test/incorrect/iflocal/clang_pic/iflocal.expected index 8fa6934a5..72e0f9841 100644 --- a/src/test/incorrect/iflocal/clang_pic/iflocal.expected +++ b/src/test/incorrect/iflocal/clang_pic/iflocal.expected @@ -214,10 +214,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000956; - } - goto l00000959; + goto lmain_goto_l00000956, lmain_goto_l00000959; l00000959: assume {:captureState "l00000959"} true; R8, Gamma_R8 := 1bv64, true; @@ -229,10 +226,7 @@ procedure main() l0000095c: assume {:captureState "l0000095c"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000964; - } - goto l0000097b; + goto l0000095c_goto_l00000964, l0000095c_goto_l0000097b; l0000097b: assume {:captureState "l0000097b"} true; goto l0000097c; @@ -247,4 +241,20 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000956: + assume {:captureState "lmain_goto_l00000956"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000956; + lmain_goto_l00000959: + assume {:captureState "lmain_goto_l00000959"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000959; + l0000095c_goto_l00000964: + assume {:captureState "l0000095c_goto_l00000964"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000964; + l0000095c_goto_l0000097b: + assume {:captureState "l0000095c_goto_l0000097b"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000097b; } diff --git a/src/test/incorrect/iflocal/gcc/iflocal.expected b/src/test/incorrect/iflocal/gcc/iflocal.expected index a5b449c83..448aac10d 100644 --- a/src/test/incorrect/iflocal/gcc/iflocal.expected +++ b/src/test/incorrect/iflocal/gcc/iflocal.expected @@ -209,10 +209,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000318; - } - goto l0000032d; + goto lmain_goto_l00000318, lmain_goto_l0000032d; l0000032d: assume {:captureState "l0000032d"} true; R0, Gamma_R0 := 1bv64, true; @@ -224,4 +221,12 @@ procedure main() R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l00000318: + assume {:captureState "lmain_goto_l00000318"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000318; + lmain_goto_l0000032d: + assume {:captureState "lmain_goto_l0000032d"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000032d; } diff --git a/src/test/incorrect/iflocal/gcc_no_plt_no_pic/iflocal.expected b/src/test/incorrect/iflocal/gcc_no_plt_no_pic/iflocal.expected index 185882037..2eb140e57 100644 --- a/src/test/incorrect/iflocal/gcc_no_plt_no_pic/iflocal.expected +++ b/src/test/incorrect/iflocal/gcc_no_plt_no_pic/iflocal.expected @@ -209,10 +209,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l000008ff; - } - goto l00000914; + goto lmain_goto_l000008ff, lmain_goto_l00000914; l00000914: assume {:captureState "l00000914"} true; R0, Gamma_R0 := 1bv64, true; @@ -224,4 +221,12 @@ procedure main() R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l000008ff: + assume {:captureState "lmain_goto_l000008ff"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000008ff; + lmain_goto_l00000914: + assume {:captureState "lmain_goto_l00000914"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000914; } diff --git a/src/test/incorrect/iflocal/gcc_pic/iflocal.expected b/src/test/incorrect/iflocal/gcc_pic/iflocal.expected index 185882037..2eb140e57 100644 --- a/src/test/incorrect/iflocal/gcc_pic/iflocal.expected +++ b/src/test/incorrect/iflocal/gcc_pic/iflocal.expected @@ -209,10 +209,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l000008ff; - } - goto l00000914; + goto lmain_goto_l000008ff, lmain_goto_l00000914; l00000914: assume {:captureState "l00000914"} true; R0, Gamma_R0 := 1bv64, true; @@ -224,4 +221,12 @@ procedure main() R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l000008ff: + assume {:captureState "lmain_goto_l000008ff"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000008ff; + lmain_goto_l00000914: + assume {:captureState "lmain_goto_l00000914"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000914; } diff --git a/src/test/incorrect/nestedifglobal/clang/nestedifglobal.expected b/src/test/incorrect/nestedifglobal/clang/nestedifglobal.expected index a084acbaf..87cfa4dab 100644 --- a/src/test/incorrect/nestedifglobal/clang/nestedifglobal.expected +++ b/src/test/incorrect/nestedifglobal/clang/nestedifglobal.expected @@ -230,10 +230,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000390; - } - goto l00000393; + goto lmain_goto_l00000390, lmain_goto_l00000393; l00000393: assume {:captureState "l00000393"} true; R8, Gamma_R8 := 1bv64, true; @@ -245,10 +242,7 @@ procedure main() l00000396: assume {:captureState "l00000396"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l0000039e; - } - goto l0000045d; + goto l00000396_goto_l0000039e, l00000396_goto_l0000045d; l0000045d: assume {:captureState "l0000045d"} true; goto l0000045e; @@ -270,10 +264,7 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000003ce; - } - goto l000003d1; + goto l0000039e_goto_l000003ce, l0000039e_goto_l000003d1; l000003d1: assume {:captureState "l000003d1"} true; R8, Gamma_R8 := 1bv64, true; @@ -285,10 +276,7 @@ procedure main() l000003d4: assume {:captureState "l000003d4"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l000003dc; - } - goto l00000448; + goto l000003d4_goto_l000003dc, l000003d4_goto_l00000448; l00000448: assume {:captureState "l00000448"} true; goto l00000449; @@ -308,10 +296,7 @@ procedure main() NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; R8, Gamma_R8 := zero_extend32_32(bvadd32(#6, 1bv32)), Gamma_#6; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000407; - } - goto l0000040a; + goto l000003dc_goto_l00000407, l000003dc_goto_l0000040a; l0000040a: assume {:captureState "l0000040a"} true; R8, Gamma_R8 := 1bv64, true; @@ -323,10 +308,7 @@ procedure main() l0000040d: assume {:captureState "l0000040d"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000415; - } - goto l0000042c; + goto l0000040d_goto_l00000415, l0000040d_goto_l0000042c; l0000042c: assume {:captureState "l0000042c"} true; goto l0000042d; @@ -343,4 +325,52 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000390: + assume {:captureState "lmain_goto_l00000390"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000390; + lmain_goto_l00000393: + assume {:captureState "lmain_goto_l00000393"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000393; + l00000396_goto_l0000039e: + assume {:captureState "l00000396_goto_l0000039e"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l0000039e; + l00000396_goto_l0000045d: + assume {:captureState "l00000396_goto_l0000045d"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000045d; + l0000039e_goto_l000003ce: + assume {:captureState "l0000039e_goto_l000003ce"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000003ce; + l0000039e_goto_l000003d1: + assume {:captureState "l0000039e_goto_l000003d1"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000003d1; + l000003d4_goto_l000003dc: + assume {:captureState "l000003d4_goto_l000003dc"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l000003dc; + l000003d4_goto_l00000448: + assume {:captureState "l000003d4_goto_l00000448"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000448; + l000003dc_goto_l00000407: + assume {:captureState "l000003dc_goto_l00000407"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000407; + l000003dc_goto_l0000040a: + assume {:captureState "l000003dc_goto_l0000040a"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l0000040a; + l0000040d_goto_l00000415: + assume {:captureState "l0000040d_goto_l00000415"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000415; + l0000040d_goto_l0000042c: + assume {:captureState "l0000040d_goto_l0000042c"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000042c; } diff --git a/src/test/incorrect/nestedifglobal/clang_no_plt_no_pic/nestedifglobal.expected b/src/test/incorrect/nestedifglobal/clang_no_plt_no_pic/nestedifglobal.expected index ded3f676a..bd4cadff9 100644 --- a/src/test/incorrect/nestedifglobal/clang_no_plt_no_pic/nestedifglobal.expected +++ b/src/test/incorrect/nestedifglobal/clang_no_plt_no_pic/nestedifglobal.expected @@ -230,10 +230,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000ae0; - } - goto l00000ae3; + goto lmain_goto_l00000ae0, lmain_goto_l00000ae3; l00000ae3: assume {:captureState "l00000ae3"} true; R8, Gamma_R8 := 1bv64, true; @@ -245,10 +242,7 @@ procedure main() l00000ae6: assume {:captureState "l00000ae6"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000aee; - } - goto l00000bad; + goto l00000ae6_goto_l00000aee, l00000ae6_goto_l00000bad; l00000bad: assume {:captureState "l00000bad"} true; goto l00000bae; @@ -270,10 +264,7 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000b1e; - } - goto l00000b21; + goto l00000aee_goto_l00000b1e, l00000aee_goto_l00000b21; l00000b21: assume {:captureState "l00000b21"} true; R8, Gamma_R8 := 1bv64, true; @@ -285,10 +276,7 @@ procedure main() l00000b24: assume {:captureState "l00000b24"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000b2c; - } - goto l00000b98; + goto l00000b24_goto_l00000b2c, l00000b24_goto_l00000b98; l00000b98: assume {:captureState "l00000b98"} true; goto l00000b99; @@ -308,10 +296,7 @@ procedure main() NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; R8, Gamma_R8 := zero_extend32_32(bvadd32(#6, 1bv32)), Gamma_#6; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000b57; - } - goto l00000b5a; + goto l00000b2c_goto_l00000b57, l00000b2c_goto_l00000b5a; l00000b5a: assume {:captureState "l00000b5a"} true; R8, Gamma_R8 := 1bv64, true; @@ -323,10 +308,7 @@ procedure main() l00000b5d: assume {:captureState "l00000b5d"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000b65; - } - goto l00000b7c; + goto l00000b5d_goto_l00000b65, l00000b5d_goto_l00000b7c; l00000b7c: assume {:captureState "l00000b7c"} true; goto l00000b7d; @@ -343,4 +325,52 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 12bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 12bv64)); R31, Gamma_R31 := bvadd64(R31, 16bv64), Gamma_R31; return; + lmain_goto_l00000ae0: + assume {:captureState "lmain_goto_l00000ae0"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000ae0; + lmain_goto_l00000ae3: + assume {:captureState "lmain_goto_l00000ae3"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000ae3; + l00000ae6_goto_l00000aee: + assume {:captureState "l00000ae6_goto_l00000aee"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000aee; + l00000ae6_goto_l00000bad: + assume {:captureState "l00000ae6_goto_l00000bad"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000bad; + l00000aee_goto_l00000b1e: + assume {:captureState "l00000aee_goto_l00000b1e"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000b1e; + l00000aee_goto_l00000b21: + assume {:captureState "l00000aee_goto_l00000b21"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000b21; + l00000b24_goto_l00000b2c: + assume {:captureState "l00000b24_goto_l00000b2c"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000b2c; + l00000b24_goto_l00000b98: + assume {:captureState "l00000b24_goto_l00000b98"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000b98; + l00000b2c_goto_l00000b57: + assume {:captureState "l00000b2c_goto_l00000b57"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000b57; + l00000b2c_goto_l00000b5a: + assume {:captureState "l00000b2c_goto_l00000b5a"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000b5a; + l00000b5d_goto_l00000b65: + assume {:captureState "l00000b5d_goto_l00000b65"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000b65; + l00000b5d_goto_l00000b7c: + assume {:captureState "l00000b5d_goto_l00000b7c"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000b7c; } diff --git a/src/test/incorrect/nestedifglobal/clang_pic/nestedifglobal.expected b/src/test/incorrect/nestedifglobal/clang_pic/nestedifglobal.expected index a333a5bcf..e3f54f47c 100644 --- a/src/test/incorrect/nestedifglobal/clang_pic/nestedifglobal.expected +++ b/src/test/incorrect/nestedifglobal/clang_pic/nestedifglobal.expected @@ -298,10 +298,7 @@ procedure main() NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; R8, Gamma_R8 := zero_extend32_32(bvadd32(#4, 1bv32)), Gamma_#4; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000003ab; - } - goto l000003ae; + goto lmain_goto_l000003ab, lmain_goto_l000003ae; l000003ae: assume {:captureState "l000003ae"} true; R8, Gamma_R8 := 1bv64, true; @@ -313,10 +310,7 @@ procedure main() l000003b1: assume {:captureState "l000003b1"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l000003b9; - } - goto l00000481; + goto l000003b1_goto_l000003b9, l000003b1_goto_l00000481; l00000481: assume {:captureState "l00000481"} true; goto l00000482; @@ -338,10 +332,7 @@ procedure main() NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; R8, Gamma_R8 := zero_extend32_32(bvadd32(#5, 1bv32)), Gamma_#5; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l000003eb; - } - goto l000003ee; + goto l000003b9_goto_l000003eb, l000003b9_goto_l000003ee; l000003ee: assume {:captureState "l000003ee"} true; R8, Gamma_R8 := 1bv64, true; @@ -353,10 +344,7 @@ procedure main() l000003f1: assume {:captureState "l000003f1"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l000003f9; - } - goto l0000046c; + goto l000003f1_goto_l000003f9, l000003f1_goto_l0000046c; l0000046c: assume {:captureState "l0000046c"} true; goto l0000046d; @@ -376,10 +364,7 @@ procedure main() NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; R8, Gamma_R8 := zero_extend32_32(bvadd32(#6, 1bv32)), Gamma_#6; assert Gamma_ZF; - if ((bvcomp1(ZF, 1bv1) != 0bv1)) { - goto l00000424; - } - goto l00000427; + goto l000003f9_goto_l00000424, l000003f9_goto_l00000427; l00000427: assume {:captureState "l00000427"} true; R8, Gamma_R8 := 1bv64, true; @@ -391,10 +376,7 @@ procedure main() l0000042a: assume {:captureState "l0000042a"} true; assert Gamma_R8; - if ((bvcomp1(R8[1:0], 1bv1) != 0bv1)) { - goto l00000432; - } - goto l00000449; + goto l0000042a_goto_l00000432, l0000042a_goto_l00000449; l00000449: assume {:captureState "l00000449"} true; goto l0000044a; @@ -413,4 +395,52 @@ procedure main() R0, Gamma_R0 := zero_extend32_32(memory_load32_le(stack, bvadd64(R31, 28bv64))), gamma_load32(Gamma_stack, bvadd64(R31, 28bv64)); R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l000003ab: + assume {:captureState "lmain_goto_l000003ab"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000003ab; + lmain_goto_l000003ae: + assume {:captureState "lmain_goto_l000003ae"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000003ae; + l000003b1_goto_l000003b9: + assume {:captureState "l000003b1_goto_l000003b9"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l000003b9; + l000003b1_goto_l00000481: + assume {:captureState "l000003b1_goto_l00000481"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000481; + l000003b9_goto_l000003eb: + assume {:captureState "l000003b9_goto_l000003eb"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l000003eb; + l000003b9_goto_l000003ee: + assume {:captureState "l000003b9_goto_l000003ee"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l000003ee; + l000003f1_goto_l000003f9: + assume {:captureState "l000003f1_goto_l000003f9"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l000003f9; + l000003f1_goto_l0000046c: + assume {:captureState "l000003f1_goto_l0000046c"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l0000046c; + l000003f9_goto_l00000424: + assume {:captureState "l000003f9_goto_l00000424"} true; + assume (bvcomp1(ZF, 1bv1) != 0bv1); + goto l00000424; + l000003f9_goto_l00000427: + assume {:captureState "l000003f9_goto_l00000427"} true; + assume (bvcomp1(ZF, 1bv1) == 0bv1); + goto l00000427; + l0000042a_goto_l00000432: + assume {:captureState "l0000042a_goto_l00000432"} true; + assume (bvcomp1(R8[1:0], 1bv1) != 0bv1); + goto l00000432; + l0000042a_goto_l00000449: + assume {:captureState "l0000042a_goto_l00000449"} true; + assume (bvcomp1(R8[1:0], 1bv1) == 0bv1); + goto l00000449; } diff --git a/src/test/incorrect/nestedifglobal/gcc/nestedifglobal.expected b/src/test/incorrect/nestedifglobal/gcc/nestedifglobal.expected index 8fd6d9f25..fa0a032fa 100644 --- a/src/test/incorrect/nestedifglobal/gcc/nestedifglobal.expected +++ b/src/test/incorrect/nestedifglobal/gcc/nestedifglobal.expected @@ -228,10 +228,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000381; - } - goto l00000414; + goto lmain_goto_l00000381, lmain_goto_l00000414; l00000414: assume {:captureState "l00000414"} true; R0, Gamma_R0 := 3bv64, true; @@ -250,10 +247,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l000003b2; - } - goto l00000407; + goto l00000381_goto_l000003b2, l00000381_goto_l00000407; l00000407: assume {:captureState "l00000407"} true; R0, Gamma_R0 := 5bv64, true; @@ -269,10 +263,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l000003d8; - } - goto l000003ed; + goto l000003b2_goto_l000003d8, l000003b2_goto_l000003ed; l000003ed: assume {:captureState "l000003ed"} true; R0, Gamma_R0 := 69632bv64, true; @@ -287,4 +278,28 @@ procedure main() R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l00000381: + assume {:captureState "lmain_goto_l00000381"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000381; + lmain_goto_l00000414: + assume {:captureState "lmain_goto_l00000414"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000414; + l00000381_goto_l000003b2: + assume {:captureState "l00000381_goto_l000003b2"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000003b2; + l00000381_goto_l00000407: + assume {:captureState "l00000381_goto_l00000407"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000407; + l000003b2_goto_l000003d8: + assume {:captureState "l000003b2_goto_l000003d8"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000003d8; + l000003b2_goto_l000003ed: + assume {:captureState "l000003b2_goto_l000003ed"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000003ed; } diff --git a/src/test/incorrect/nestedifglobal/gcc_no_plt_no_pic/nestedifglobal.expected b/src/test/incorrect/nestedifglobal/gcc_no_plt_no_pic/nestedifglobal.expected index f53463dad..ccd235a1c 100644 --- a/src/test/incorrect/nestedifglobal/gcc_no_plt_no_pic/nestedifglobal.expected +++ b/src/test/incorrect/nestedifglobal/gcc_no_plt_no_pic/nestedifglobal.expected @@ -228,10 +228,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000a79; - } - goto l00000b0c; + goto lmain_goto_l00000a79, lmain_goto_l00000b0c; l00000b0c: assume {:captureState "l00000b0c"} true; R0, Gamma_R0 := 3bv64, true; @@ -250,10 +247,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000aaa; - } - goto l00000aff; + goto l00000a79_goto_l00000aaa, l00000a79_goto_l00000aff; l00000aff: assume {:captureState "l00000aff"} true; R0, Gamma_R0 := 5bv64, true; @@ -269,10 +263,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000ad0; - } - goto l00000ae5; + goto l00000aaa_goto_l00000ad0, l00000aaa_goto_l00000ae5; l00000ae5: assume {:captureState "l00000ae5"} true; R0, Gamma_R0 := 69632bv64, true; @@ -287,4 +278,28 @@ procedure main() R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l00000a79: + assume {:captureState "lmain_goto_l00000a79"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000a79; + lmain_goto_l00000b0c: + assume {:captureState "lmain_goto_l00000b0c"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000b0c; + l00000a79_goto_l00000aaa: + assume {:captureState "l00000a79_goto_l00000aaa"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000aaa; + l00000a79_goto_l00000aff: + assume {:captureState "l00000a79_goto_l00000aff"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000aff; + l00000aaa_goto_l00000ad0: + assume {:captureState "l00000aaa_goto_l00000ad0"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000ad0; + l00000aaa_goto_l00000ae5: + assume {:captureState "l00000aaa_goto_l00000ae5"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000ae5; } diff --git a/src/test/incorrect/nestedifglobal/gcc_pic/nestedifglobal.expected b/src/test/incorrect/nestedifglobal/gcc_pic/nestedifglobal.expected index 33b87b289..f2b82be6a 100644 --- a/src/test/incorrect/nestedifglobal/gcc_pic/nestedifglobal.expected +++ b/src/test/incorrect/nestedifglobal/gcc_pic/nestedifglobal.expected @@ -286,10 +286,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#4, 1bv32), 0bv32), Gamma_#4; NF, Gamma_NF := bvadd32(#4, 1bv32)[32:31], Gamma_#4; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l00000383; - } - goto l00000418; + goto lmain_goto_l00000383, lmain_goto_l00000418; l00000418: assume {:captureState "l00000418"} true; R0, Gamma_R0 := 3bv64, true; @@ -309,10 +306,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#5, 1bv32), 0bv32), Gamma_#5; NF, Gamma_NF := bvadd32(#5, 1bv32)[32:31], Gamma_#5; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l000003b5; - } - goto l0000040b; + goto l00000383_goto_l000003b5, l00000383_goto_l0000040b; l0000040b: assume {:captureState "l0000040b"} true; R0, Gamma_R0 := 5bv64, true; @@ -328,10 +322,7 @@ procedure main() ZF, Gamma_ZF := bvcomp32(bvadd32(#6, 1bv32), 0bv32), Gamma_#6; NF, Gamma_NF := bvadd32(#6, 1bv32)[32:31], Gamma_#6; assert Gamma_ZF; - if ((bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1)) { - goto l000003db; - } - goto l000003f0; + goto l000003b5_goto_l000003db, l000003b5_goto_l000003f0; l000003f0: assume {:captureState "l000003f0"} true; R0, Gamma_R0 := 65536bv64, true; @@ -347,4 +338,28 @@ procedure main() R0, Gamma_R0 := 0bv64, true; R31, Gamma_R31 := bvadd64(R31, 32bv64), Gamma_R31; return; + lmain_goto_l00000383: + assume {:captureState "lmain_goto_l00000383"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l00000383; + lmain_goto_l00000418: + assume {:captureState "lmain_goto_l00000418"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l00000418; + l00000383_goto_l000003b5: + assume {:captureState "l00000383_goto_l000003b5"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000003b5; + l00000383_goto_l0000040b: + assume {:captureState "l00000383_goto_l0000040b"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l0000040b; + l000003b5_goto_l000003db: + assume {:captureState "l000003b5_goto_l000003db"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) != 0bv1); + goto l000003db; + l000003b5_goto_l000003f0: + assume {:captureState "l000003b5_goto_l000003f0"} true; + assume (bvnot1(bvcomp1(ZF, 1bv1)) == 0bv1); + goto l000003f0; }