From 3e38acf29422055aec7df0110453ca8e187d0050 Mon Sep 17 00:00:00 2001 From: Hernan Ponce de Leon Date: Fri, 29 Sep 2023 13:57:13 +0200 Subject: [PATCH 01/33] Initial commit Signed-off-by: Hernan Ponce de Leon --- .../java/com/dat3m/dartagnan/Dartagnan.java | 2 +- .../dartagnan/program/event/EventFactory.java | 25 ++++++ .../dat3m/dartagnan/program/event/Tag.java | 10 ++- .../program/processing/Intrinsics.java | 21 +++++ .../dat3m/dartagnan/c/LKMMInterruptsTest.java | 77 +++++++++++++++++++ 5 files changed, 131 insertions(+), 4 deletions(-) create mode 100644 dartagnan/src/test/java/com/dat3m/dartagnan/c/LKMMInterruptsTest.java diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/Dartagnan.java b/dartagnan/src/main/java/com/dat3m/dartagnan/Dartagnan.java index 16ad2173e8..118ecf4923 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/Dartagnan.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/Dartagnan.java @@ -354,7 +354,7 @@ public static String generateResultSummary(VerificationTask task, ProverEnvironm private static void printWarningIfThreadStartFailed(Program p, EncodingContext encoder, ProverEnvironment prover) throws SolverException { for (Event e : p.getThreadEvents()) { - if (e.hasTag(Tag.STARTLOAD) && BigInteger.ZERO.equals(prover.getModel().evaluate(encoder.value((Load) e)))) { + if (e.hasTag(Tag.THREAD_START) && BigInteger.ZERO.equals(prover.getModel().evaluate(encoder.value((Load) e)))) { // This msg should be displayed even if the logging is off System.out.printf( "[WARNING] The call to pthread_create of thread %s failed. To force thread creation to succeed use --%s=true%n", diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/EventFactory.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/EventFactory.java index 40c082cd39..6664447df6 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/EventFactory.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/EventFactory.java @@ -447,6 +447,31 @@ public static LoopBound newLoopBound(Expression bound) { } } + // ============================================================================================= + // ======================================== Interrupts ========================================= + // ============================================================================================= + + public static class Interrupts { + private Interrupts() { + } + + public static GenericVisibleEvent newInterruptMarker() { + return new GenericVisibleEvent(Tag.INTERRUPT_HANDLER); + } + + public static GenericVisibleEvent newCompilerBarrier() { + return new GenericVisibleEvent(Tag.COMPILER_BARRIER); + } + + public static GenericVisibleEvent newDisableInterrupts() { + return new GenericVisibleEvent(Tag.DISABLE_INTERRUPT); + } + + public static GenericVisibleEvent newEnableInterrupts() { + return new GenericVisibleEvent(Tag.ENABLE_INTERRUPT); + } + } + // ============================================================================================= // ============================================ ARM ============================================ // ============================================================================================= diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/Tag.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/Tag.java index 5670e4060d..57301aeb9a 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/Tag.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/Tag.java @@ -2,8 +2,6 @@ import com.dat3m.dartagnan.configuration.Arch; import com.dat3m.dartagnan.program.event.core.Event; -import com.dat3m.dartagnan.program.event.core.Load; -import com.dat3m.dartagnan.program.event.core.Store; import java.util.List; @@ -25,6 +23,13 @@ private Tag() { } public static final String STRONG = "STRONG"; // TODO: Maybe move to C11 or IMM? public static final String RMW = "RMW"; + public static final String INTERRUPT_HANDLER = "INTERRUPT_HANDLER"; + public static final String DISABLE_INTERRUPT = "DISABLE_INTERRUPT"; + public static final String ENABLE_INTERRUPT = "ENABLE_INTERRUPT"; + public static final String COMPILER_BARRIER = "cb"; + public static final String THREAD_CREATE = "THREAD_CREATE"; // A store that spawns a thread + public static final String THREAD_START = "THREAD_START"; // A load that starts the thread + // ---------- Internally used tags (not referenced in CAT) ---------- public static final String EXCL = "__EXCL"; // Marks the event that is reachable IFF a loop has not been fully unrolled. @@ -36,7 +41,6 @@ private Tag() { } public static final String SPINLOOP = "__SPINLOOP"; // Some events should not be optimized (e.g. fake dependencies) or deleted (e.g. bounds) public static final String NOOPT = "__NOOPT"; - public static final String STARTLOAD = "__STARTLOAD"; // ============================================================================================= // =========================================== ARMv8 =========================================== diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java index e40c99a3a8..919b6a0318 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java @@ -116,6 +116,11 @@ public enum Info { "__VERIFIER_nondet_long", "__VERIFIER_nondet_ulong", "__VERIFIER_nondet_char", "__VERIFIER_nondet_uchar"), false, false, true, false, Intrinsics::inlineNonDet), + // --------------------------- Interrupts --------------------------- + VERIFIER_MAKE_INTERRUPT_HANDLER("__VERIFIER_make_interrupt_handler", true, false, true, true, Intrinsics::inlineInterruptMarker), + VERIFIER_DISABLE_IRQ("__VERIFIER_disable_irq", false, false, true, true, Intrinsics::inlineDisableInterrupts), + VERIFIER_ENABLE_IRQ("__VERIFIER_enable_irq", false, false, true, true, Intrinsics::inlineEnableInterrupts), + VERIFIER_MAKE_CB("__VERIFIER_make_cb", false, false, true, true, Intrinsics::inlineCompilerBarrier), // --------------------------- LLVM --------------------------- LLVM(List.of("llvm.smax", "llvm.umax", "llvm.smin", "llvm.umin", "llvm.ssub.sat", "llvm.usub.sat", "llvm.sadd.sat", "llvm.uadd.sat", // TODO: saturated shifts @@ -368,6 +373,22 @@ private List inlineAssert(FunctionCall call) { return List.of(assertion, abort); } + private List inlineInterruptMarker(FunctionCall ignored) { + return List.of(EventFactory.Interrupts.newInterruptMarker()); + } + + private List inlineCompilerBarrier(FunctionCall ignored) { + return List.of(EventFactory.Interrupts.newCompilerBarrier()); + } + + private List inlineDisableInterrupts(FunctionCall ignored) { + return List.of(EventFactory.Interrupts.newDisableInterrupts()); + } + + private List inlineEnableInterrupts(FunctionCall ignored) { + return List.of(EventFactory.Interrupts.newEnableInterrupts()); + } + // -------------------------------------------------------------------------------------------------------- // LLVM intrinsics diff --git a/dartagnan/src/test/java/com/dat3m/dartagnan/c/LKMMInterruptsTest.java b/dartagnan/src/test/java/com/dat3m/dartagnan/c/LKMMInterruptsTest.java new file mode 100644 index 0000000000..691fed5c82 --- /dev/null +++ b/dartagnan/src/test/java/com/dat3m/dartagnan/c/LKMMInterruptsTest.java @@ -0,0 +1,77 @@ +package com.dat3m.dartagnan.c; + +import com.dat3m.dartagnan.configuration.Arch; +import com.dat3m.dartagnan.parsers.cat.ParserCat; +import com.dat3m.dartagnan.utils.Result; +import com.dat3m.dartagnan.utils.rules.Provider; +import com.dat3m.dartagnan.verification.solving.AssumeSolver; +import com.dat3m.dartagnan.verification.solving.RefinementSolver; +import com.dat3m.dartagnan.wmm.Wmm; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +import java.io.File; +import java.io.IOException; +import java.util.Arrays; + +import static com.dat3m.dartagnan.configuration.Arch.*; +import static com.dat3m.dartagnan.utils.ResourceHelper.*; +import static com.dat3m.dartagnan.utils.Result.*; +import static org.junit.Assert.assertEquals; + +@RunWith(Parameterized.class) +public class LKMMInterruptsTest extends AbstractCTest { + + public LKMMInterruptsTest(String name, Arch target, Result expected) { + super(name, target, expected); + } + + @Override + protected Provider getProgramPathProvider() { + return Provider.fromSupplier(() -> getTestResourcePath("interrupts/" + name + ".ll")); + } + + @Override + protected long getTimeout() { + return 60000; + } + + @Override + protected Provider getWmmProvider() { + return Provider.fromSupplier(() -> new ParserCat().parse(new File(getRootPath("cat/linux-kernel.cat")))); + } + + @Parameterized.Parameters(name = "{index}: {0}, target={1}") + public static Iterable data() throws IOException { + return Arrays.asList(new Object[][]{ + {"c_disable_v1-opt", LKMM, PASS}, + {"c_disable_v2-opt", LKMM, PASS}, + {"c_disable_v3-opt", LKMM, PASS}, + {"lkmm_detour_disable_release-opt", LKMM, PASS}, + {"lkmm_detour-opt", LKMM, FAIL}, + {"lkmm_detour-opt", LKMM, FAIL}, + {"lkmm_oota-opt", LKMM, PASS}, + // {"lkmm_weak_model-opt", LKMM, PASS}, + {"lkmm_with_barrier_dec_barrier-opt", LKMM, PASS}, + {"lkmm_with_barrier_dec_wmb-opt", LKMM, PASS}, + {"lkmm_with_barrier_dec-opt", LKMM, FAIL}, + {"lkmm_with_barrier-opt", LKMM, PASS}, + {"lkmm_with_barrier_inc_split-opt", LKMM, FAIL}, + {"lkmm_with_disable_enable_as_barrier-opt", LKMM, PASS}, + {"lkmm_without_barrier-opt", LKMM, FAIL}, + }); + } + + @Test + public void testAssume() throws Exception { + AssumeSolver s = AssumeSolver.run(contextProvider.get(), proverProvider.get(), taskProvider.get()); + assertEquals(expected, s.getResult()); + } + + @Test + public void testRefinement() throws Exception { + RefinementSolver s = RefinementSolver.run(contextProvider.get(), proverProvider.get(), taskProvider.get()); + assertEquals(expected, s.getResult()); + } +} \ No newline at end of file From 3ff12e716532fc8dd51e277e7f082460c477e1c2 Mon Sep 17 00:00:00 2001 From: Hernan Ponce de Leon Date: Fri, 29 Sep 2023 13:57:52 +0200 Subject: [PATCH 02/33] Some tests Signed-off-by: Hernan Ponce de Leon --- benchmarks/interrupts/lkmm_detour.c | 48 ++++++++++++++++ benchmarks/interrupts/lkmm_detour_disable.c | 50 ++++++++++++++++ .../interrupts/lkmm_detour_disable_release.c | 50 ++++++++++++++++ benchmarks/interrupts/lkmm_oota.c | 47 +++++++++++++++ benchmarks/interrupts/lkmm_with_barrier.c | 51 +++++++++++++++++ benchmarks/interrupts/lkmm_with_barrier_dec.c | 55 ++++++++++++++++++ .../lkmm_with_barrier_dec_barrier.c | 57 +++++++++++++++++++ .../interrupts/lkmm_with_barrier_dec_wmb.c | 57 +++++++++++++++++++ .../interrupts/lkmm_with_barrier_inc_split.c | 52 +++++++++++++++++ .../lkmm_with_disable_enable_as_barrier.c | 53 +++++++++++++++++ benchmarks/interrupts/lkmm_without_barrier.c | 49 ++++++++++++++++ 11 files changed, 569 insertions(+) create mode 100644 benchmarks/interrupts/lkmm_detour.c create mode 100644 benchmarks/interrupts/lkmm_detour_disable.c create mode 100644 benchmarks/interrupts/lkmm_detour_disable_release.c create mode 100644 benchmarks/interrupts/lkmm_oota.c create mode 100644 benchmarks/interrupts/lkmm_with_barrier.c create mode 100644 benchmarks/interrupts/lkmm_with_barrier_dec.c create mode 100644 benchmarks/interrupts/lkmm_with_barrier_dec_barrier.c create mode 100644 benchmarks/interrupts/lkmm_with_barrier_dec_wmb.c create mode 100644 benchmarks/interrupts/lkmm_with_barrier_inc_split.c create mode 100644 benchmarks/interrupts/lkmm_with_disable_enable_as_barrier.c create mode 100644 benchmarks/interrupts/lkmm_without_barrier.c diff --git a/benchmarks/interrupts/lkmm_detour.c b/benchmarks/interrupts/lkmm_detour.c new file mode 100644 index 0000000000..b60f7fb902 --- /dev/null +++ b/benchmarks/interrupts/lkmm_detour.c @@ -0,0 +1,48 @@ +#include +#include +#include +#include +#include + +int x, y, a, b; + +pthread_t h; +void *handler(void *arg) +{ + WRITE_ONCE(y, 3); + return NULL; +} + +void *thread_1(void *arg) +{ + __VERIFIER_make_interrupt_handler(); + pthread_create(&h, NULL, handler, NULL); + + WRITE_ONCE(x, 1); + a = READ_ONCE(y); + + pthread_join(h, 0); + + return NULL; +} + +void *thread_2(void *arg) +{ + b = READ_ONCE(x); + smp_store_release(&y, 2); + return NULL; +} + +int main() +{ + pthread_t t1, t2; + + pthread_create(&t1, 0, thread_1, NULL); + pthread_create(&t2, 0, thread_2, NULL); + pthread_join(t1, 0); + pthread_join(t2, 0); + + assert(!(b == 1 && a == 3 && y == 3)); + + return 0; +} diff --git a/benchmarks/interrupts/lkmm_detour_disable.c b/benchmarks/interrupts/lkmm_detour_disable.c new file mode 100644 index 0000000000..1fd2ce1bda --- /dev/null +++ b/benchmarks/interrupts/lkmm_detour_disable.c @@ -0,0 +1,50 @@ +#include +#include +#include +#include +#include + +int x, y, a, b; + +pthread_t h; +void *handler(void *arg) +{ + WRITE_ONCE(y, 3); + return NULL; +} + +void *thread_1(void *arg) +{ + __VERIFIER_make_interrupt_handler(); + pthread_create(&h, NULL, handler, NULL); + + __VERIFIER_disable_irq(); + WRITE_ONCE(x, 1); + a = READ_ONCE(y); + __VERIFIER_enable_irq(); + + pthread_join(h, 0); + + return NULL; +} + +void *thread_2(void *arg) +{ + b = READ_ONCE(x); + smp_store_release(&y, 2); + return NULL; +} + +int main() +{ + pthread_t t1, t2; + + pthread_create(&t1, 0, thread_1, NULL); + pthread_create(&t2, 0, thread_2, NULL); + pthread_join(t1, 0); + pthread_join(t2, 0); + + assert(!(b == 1 && a == 3 && y == 3)); + + return 0; +} diff --git a/benchmarks/interrupts/lkmm_detour_disable_release.c b/benchmarks/interrupts/lkmm_detour_disable_release.c new file mode 100644 index 0000000000..735ff5200e --- /dev/null +++ b/benchmarks/interrupts/lkmm_detour_disable_release.c @@ -0,0 +1,50 @@ +#include +#include +#include +#include +#include + +int x, y, a, b; + +pthread_t h; +void *handler(void *arg) +{ + WRITE_ONCE(y, 3); + return NULL; +} + +void *thread_1(void *arg) +{ + __VERIFIER_make_interrupt_handler(); + pthread_create(&h, NULL, handler, NULL); + + __VERIFIER_disable_irq(); + smp_store_release(&x, 1); + a = READ_ONCE(y); + __VERIFIER_enable_irq(); + + pthread_join(h, 0); + + return NULL; +} + +void *thread_2(void *arg) +{ + b = READ_ONCE(x); + smp_store_release(&y, 2); + return NULL; +} + +int main() +{ + pthread_t t1, t2; + + pthread_create(&t1, 0, thread_1, NULL); + pthread_create(&t2, 0, thread_2, NULL); + pthread_join(t1, 0); + pthread_join(t2, 0); + + assert(!(b == 1 && a == 3 && y == 3)); + + return 0; +} diff --git a/benchmarks/interrupts/lkmm_oota.c b/benchmarks/interrupts/lkmm_oota.c new file mode 100644 index 0000000000..10c5e1e555 --- /dev/null +++ b/benchmarks/interrupts/lkmm_oota.c @@ -0,0 +1,47 @@ +#include +#include +#include +#include +#include + +int x, y, z; + +pthread_t h; +void *handler(void *arg) +{ + WRITE_ONCE(z, 3); + assert(READ_ONCE(y) == 0); + return NULL; +} + +void *thread_1(void *arg) +{ + __VERIFIER_make_interrupt_handler(); + pthread_create(&h, NULL, handler, NULL); + + if(READ_ONCE(x) == 1) { + WRITE_ONCE(y, 2); + } + + pthread_join(h, 0); + + return NULL; +} + +void *thread_2(void *arg) +{ + if(READ_ONCE(z) == 3) { + WRITE_ONCE(x, 1); + } + return NULL; +} + +int main() +{ + pthread_t t1, t2; + + pthread_create(&t1, 0, thread_1, NULL); + pthread_create(&t2, 0, thread_2, NULL); + + return 0; +} diff --git a/benchmarks/interrupts/lkmm_with_barrier.c b/benchmarks/interrupts/lkmm_with_barrier.c new file mode 100644 index 0000000000..f0de6d8aa6 --- /dev/null +++ b/benchmarks/interrupts/lkmm_with_barrier.c @@ -0,0 +1,51 @@ +#include +#include +#include +#include +#include + +/* + This test shows how interrupt handlers are spawned +*/ + +struct A { volatile int a; volatile int b; }; // Without "volatile" the compiler removes our assertions. +struct A as[10]; +int cnt = 0; + +pthread_t h; +void *handler(void *arg) +{ + int tindex = ((intptr_t) arg); + int i = cnt++; + barrier(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + return NULL; +} + +void *run(void *arg) +{ + __VERIFIER_make_interrupt_handler(); // Buggy without this marker + pthread_create(&h, NULL, handler, 0); + + int tindex = ((intptr_t) arg); + int i = cnt++; + barrier(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + pthread_join(h, NULL); + + return NULL; +} + +int main() +{ + pthread_t t; + pthread_create(&t, NULL, run, (void *)1); + + return 0; +} diff --git a/benchmarks/interrupts/lkmm_with_barrier_dec.c b/benchmarks/interrupts/lkmm_with_barrier_dec.c new file mode 100644 index 0000000000..8d3c884001 --- /dev/null +++ b/benchmarks/interrupts/lkmm_with_barrier_dec.c @@ -0,0 +1,55 @@ +#include +#include +#include +#include +#include + +/* + This test shows how interrupt handlers are spawned +*/ + +struct A { volatile int a; volatile int b; }; // Without "volatile" the compiler removes our assertions. +struct A as[10]; +int cnt = 0; + +pthread_t h; +void *handler(void *arg) +{ + int tindex = ((intptr_t) arg); + int i = cnt++; + barrier(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + cnt--; + + return NULL; +} + +void *run(void *arg) +{ + __VERIFIER_make_interrupt_handler(); // Buggy without this marker + pthread_create(&h, NULL, handler, 0); + + int tindex = ((intptr_t) arg); + int i = cnt++; + barrier(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + cnt--; + + pthread_join(h, NULL); + + return NULL; +} + +int main() +{ + pthread_t t; + pthread_create(&t, NULL, run, (void *)1); + + return 0; +} diff --git a/benchmarks/interrupts/lkmm_with_barrier_dec_barrier.c b/benchmarks/interrupts/lkmm_with_barrier_dec_barrier.c new file mode 100644 index 0000000000..c31ddb2a60 --- /dev/null +++ b/benchmarks/interrupts/lkmm_with_barrier_dec_barrier.c @@ -0,0 +1,57 @@ +#include +#include +#include +#include +#include + +/* + This test shows how interrupt handlers are spawned +*/ + +struct A { volatile int a; volatile int b; }; // Without "volatile" the compiler removes our assertions. +struct A as[10]; +int cnt = 0; + +pthread_t h; +void *handler(void *arg) +{ + int tindex = ((intptr_t) arg); + int i = cnt++; + barrier(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + barrier(); + cnt--; + + return NULL; +} + +void *run(void *arg) +{ + __VERIFIER_make_interrupt_handler(); // Buggy without this marker + pthread_create(&h, NULL, handler, 0); + + int tindex = ((intptr_t) arg); + int i = cnt++; + barrier(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + barrier(); + cnt--; + + pthread_join(h, NULL); + + return NULL; +} + +int main() +{ + pthread_t t; + pthread_create(&t, NULL, run, (void *)1); + + return 0; +} diff --git a/benchmarks/interrupts/lkmm_with_barrier_dec_wmb.c b/benchmarks/interrupts/lkmm_with_barrier_dec_wmb.c new file mode 100644 index 0000000000..119b9d7577 --- /dev/null +++ b/benchmarks/interrupts/lkmm_with_barrier_dec_wmb.c @@ -0,0 +1,57 @@ +#include +#include +#include +#include +#include + +/* + This test shows how interrupt handlers are spawned +*/ + +struct A { volatile int a; volatile int b; }; // Without "volatile" the compiler removes our assertions. +struct A as[10]; +int cnt = 0; + +pthread_t h; +void *handler(void *arg) +{ + int tindex = ((intptr_t) arg); + int i = cnt++; + barrier(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + smp_wmb(); + cnt--; + + return NULL; +} + +void *run(void *arg) +{ + __VERIFIER_make_interrupt_handler(); // Buggy without this marker + pthread_create(&h, NULL, handler, 0); + + int tindex = ((intptr_t) arg); + int i = cnt++; + barrier(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + smp_wmb(); + cnt--; + + pthread_join(h, NULL); + + return NULL; +} + +int main() +{ + pthread_t t; + pthread_create(&t, NULL, run, (void *)1); + + return 0; +} diff --git a/benchmarks/interrupts/lkmm_with_barrier_inc_split.c b/benchmarks/interrupts/lkmm_with_barrier_inc_split.c new file mode 100644 index 0000000000..f92598d6ae --- /dev/null +++ b/benchmarks/interrupts/lkmm_with_barrier_inc_split.c @@ -0,0 +1,52 @@ +#include +#include +#include +#include +#include + +/* + This test shows how interrupt handlers are spawned +*/ + +struct A { volatile int a; volatile int b; }; // Without "volatile" the compiler removes our assertions. +struct A as[10]; +int cnt = 0; + +pthread_t h; +void *handler(void *arg) +{ + int tindex = ((intptr_t) arg); + int i = cnt++; + barrier(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + return NULL; +} + +void *run(void *arg) +{ + __VERIFIER_make_interrupt_handler(); // Buggy without this marker + pthread_create(&h, NULL, handler, 0); + + int tindex = ((intptr_t) arg); + int i = cnt; + barrier(); + cnt = i+1; + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + pthread_join(h, NULL); + + return NULL; +} + +int main() +{ + pthread_t t; + pthread_create(&t, NULL, run, (void *)1); + + return 0; +} diff --git a/benchmarks/interrupts/lkmm_with_disable_enable_as_barrier.c b/benchmarks/interrupts/lkmm_with_disable_enable_as_barrier.c new file mode 100644 index 0000000000..07b0db1085 --- /dev/null +++ b/benchmarks/interrupts/lkmm_with_disable_enable_as_barrier.c @@ -0,0 +1,53 @@ +#include +#include +#include +#include +#include + +/* + This test shows how interrupt handlers are spawned +*/ + +struct A { volatile int a; volatile int b; }; // Without "volatile" the compiler removes our assertions. +struct A as[10]; +int cnt = 0; + +pthread_t h; +void *handler(void *arg) +{ + int tindex = ((intptr_t) arg); + int i = cnt++; + __VERIFIER_disable_irq(); + __VERIFIER_enable_irq(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + return NULL; +} + +void *run(void *arg) +{ + __VERIFIER_make_interrupt_handler(); // Buggy without this marker + pthread_create(&h, NULL, handler, 0); + + int tindex = ((intptr_t) arg); + int i = cnt++; + __VERIFIER_disable_irq(); + __VERIFIER_enable_irq(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + pthread_join(h, NULL); + + return NULL; +} + +int main() +{ + pthread_t t; + pthread_create(&t, NULL, run, (void *)1); + + return 0; +} diff --git a/benchmarks/interrupts/lkmm_without_barrier.c b/benchmarks/interrupts/lkmm_without_barrier.c new file mode 100644 index 0000000000..91dd7b68cb --- /dev/null +++ b/benchmarks/interrupts/lkmm_without_barrier.c @@ -0,0 +1,49 @@ +#include +#include +#include +#include +#include + +/* + This test shows how interrupt handlers are spawned +*/ + +struct A { volatile int a; volatile int b; }; // Without "volatile" the compiler removes our assertions. +struct A as[10]; +int cnt = 0; + +pthread_t h; +void *handler(void *arg) +{ + int tindex = ((intptr_t) arg); + int i = cnt++; + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + return NULL; +} + +void *run(void *arg) +{ + __VERIFIER_make_interrupt_handler(); // Buggy without this marker + pthread_create(&h, NULL, handler, 0); + + int tindex = ((intptr_t) arg); + int i = cnt++; + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + pthread_join(h, NULL); + + return NULL; +} + +int main() +{ + pthread_t t; + pthread_create(&t, NULL, run, (void *)1); + + return 0; +} From a1b405453829d3aa00c76dfc582872f3b1f65f91 Mon Sep 17 00:00:00 2001 From: Hernan Ponce de Leon Date: Fri, 29 Sep 2023 14:29:58 +0200 Subject: [PATCH 03/33] Use fences instead of GenericVisibleEvent Signed-off-by: Hernan Ponce de Leon --- .../com/dat3m/dartagnan/program/event/EventFactory.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/EventFactory.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/EventFactory.java index 6664447df6..b79e0b6a49 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/EventFactory.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/EventFactory.java @@ -456,19 +456,19 @@ private Interrupts() { } public static GenericVisibleEvent newInterruptMarker() { - return new GenericVisibleEvent(Tag.INTERRUPT_HANDLER); + return newFence(Tag.INTERRUPT_HANDLER); } public static GenericVisibleEvent newCompilerBarrier() { - return new GenericVisibleEvent(Tag.COMPILER_BARRIER); + return newFence(Tag.COMPILER_BARRIER); } public static GenericVisibleEvent newDisableInterrupts() { - return new GenericVisibleEvent(Tag.DISABLE_INTERRUPT); + return newFence(Tag.DISABLE_INTERRUPT); } public static GenericVisibleEvent newEnableInterrupts() { - return new GenericVisibleEvent(Tag.ENABLE_INTERRUPT); + return newFence(Tag.ENABLE_INTERRUPT); } } From d2a0b710622a5054267043c9e981af85647b817a Mon Sep 17 00:00:00 2001 From: Hernan Ponce de Leon Date: Fri, 29 Sep 2023 14:30:33 +0200 Subject: [PATCH 04/33] Tag thread create and start events Signed-off-by: Hernan Ponce de Leon --- .../dartagnan/program/processing/ThreadCreation.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java index 1c6fa21ee7..bfac1745bb 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java @@ -19,7 +19,9 @@ import com.dat3m.dartagnan.program.event.Tag; import com.dat3m.dartagnan.program.event.core.Event; import com.dat3m.dartagnan.program.event.core.Label; +import com.dat3m.dartagnan.program.event.core.Load; import com.dat3m.dartagnan.program.event.core.Local; +import com.dat3m.dartagnan.program.event.core.Store; import com.dat3m.dartagnan.program.event.core.threading.ThreadCreate; import com.dat3m.dartagnan.program.event.core.threading.ThreadStart; import com.dat3m.dartagnan.program.event.core.utils.RegReader; @@ -378,14 +380,18 @@ private List newReleaseStore(Expression address, Expression storeValue) { final Event releaseStore = compiler.getTarget() == Arch.LKMM ? EventFactory.Linux.newLKMMStore(address, storeValue, Tag.Linux.MO_RELEASE) : EventFactory.Atomic.newStore(address, storeValue, Tag.C11.MO_RELEASE); - return compiler.getCompilationResult(releaseStore); + List compilation = compiler.getCompilationResult(releaseStore); + compilation.stream().filter(e -> e instanceof Store).forEach(e -> e.addTags(Tag.THREAD_CREATE)); + return compilation; } private List newAcquireLoad(Register resultRegister, Expression address) { final Event acquireLoad = compiler.getTarget() == Arch.LKMM ? EventFactory.Linux.newLKMMLoad(resultRegister, address, Tag.Linux.MO_ACQUIRE) : EventFactory.Atomic.newLoad(resultRegister, address, Tag.C11.MO_ACQUIRE); - return compiler.getCompilationResult(acquireLoad); + List compilation = compiler.getCompilationResult(acquireLoad); + compilation.stream().filter(e -> e instanceof Load).forEach(e -> e.addTags(Tag.THREAD_START)); + return compilation; } From 779cd3553627008ce5369c3cc1576c123018a02b Mon Sep 17 00:00:00 2001 From: Hernan Ponce de Leon Date: Fri, 29 Sep 2023 14:53:43 +0200 Subject: [PATCH 05/33] Add test cases Signed-off-by: Hernan Ponce de Leon --- benchmarks/interrupts/c11_detour.c | 49 + benchmarks/interrupts/c11_detour_disable.c | 51 + .../interrupts/c11_detour_disable_release.c | 51 + benchmarks/interrupts/c11_oota.c | 47 + benchmarks/interrupts/c11_weak_model.c | 63 + benchmarks/interrupts/c11_with_barrier.c | 51 + benchmarks/interrupts/c11_with_barrier_dec.c | 55 + .../interrupts/c11_with_barrier_dec_barrier.c | 57 + .../interrupts/c11_with_barrier_inc_split.c | 52 + .../c11_with_disable_enable_as_barrier.c | 53 + benchmarks/interrupts/c11_without_barrier.c | 49 + benchmarks/interrupts/c_disable_v1.c | 53 + benchmarks/interrupts/c_disable_v2.c | 53 + benchmarks/interrupts/c_disable_v3.c | 53 + benchmarks/interrupts/interrupt_axiom_v1.c | 47 + benchmarks/interrupts/interrupt_axiom_v2.c | 47 + .../dat3m/dartagnan/c/LKMMInterruptsTest.java | 4 +- .../dat3m/dartagnan/c/VMMInterruptsTest.java | 76 + .../resources/interrupts/c11_detour-opt.ll | 190 + .../interrupts/c11_detour_disable-opt.ll | 198 + .../c11_detour_disable_release-opt.ll | 198 + .../test/resources/interrupts/c11_oota-opt.ll | 191 + .../interrupts/c11_weak_model-opt.ll | 271 + .../interrupts/c11_with_barrier-opt.ll | 205 + .../interrupts/c11_with_barrier_dec-opt.ll | 213 + .../c11_with_barrier_dec_barrier-opt.ll | 217 + .../c11_with_barrier_inc_split-opt.ll | 207 + .../c11_with_disable_enable_as_barrier-opt.ll | 211 + .../interrupts/c11_without_barrier-opt.ll | 199 + .../resources/interrupts/c_disable_v1-opt.ll | 211 + .../resources/interrupts/c_disable_v2-opt.ll | 211 + .../resources/interrupts/c_disable_v3-opt.ll | 211 + .../resources/interrupts/lkmm_detour-opt.ll | 197 + .../interrupts/lkmm_detour_disable-opt.ll | 205 + .../lkmm_detour_disable_release-opt.ll | 205 + .../interrupts/lkmm_disable_no_enable-opt.bpl | 16272 ---------------- .../resources/interrupts/lkmm_oota-opt.ll | 201 + .../interrupts/lkmm_with_barrier-opt.ll | 224 + .../interrupts/lkmm_with_barrier_dec-opt.ll | 232 + .../lkmm_with_barrier_dec_barrier-opt.ll | 236 + .../lkmm_with_barrier_dec_wmb-opt.ll | 236 + .../lkmm_with_barrier_inc_split-opt.ll | 226 + ...lkmm_with_disable_enable_as_barrier-opt.ll | 211 + .../interrupts/lkmm_without_barrier-opt.ll | 199 + 44 files changed, 6214 insertions(+), 16274 deletions(-) create mode 100644 benchmarks/interrupts/c11_detour.c create mode 100644 benchmarks/interrupts/c11_detour_disable.c create mode 100644 benchmarks/interrupts/c11_detour_disable_release.c create mode 100644 benchmarks/interrupts/c11_oota.c create mode 100644 benchmarks/interrupts/c11_weak_model.c create mode 100644 benchmarks/interrupts/c11_with_barrier.c create mode 100644 benchmarks/interrupts/c11_with_barrier_dec.c create mode 100644 benchmarks/interrupts/c11_with_barrier_dec_barrier.c create mode 100644 benchmarks/interrupts/c11_with_barrier_inc_split.c create mode 100644 benchmarks/interrupts/c11_with_disable_enable_as_barrier.c create mode 100644 benchmarks/interrupts/c11_without_barrier.c create mode 100644 benchmarks/interrupts/c_disable_v1.c create mode 100644 benchmarks/interrupts/c_disable_v2.c create mode 100644 benchmarks/interrupts/c_disable_v3.c create mode 100644 benchmarks/interrupts/interrupt_axiom_v1.c create mode 100644 benchmarks/interrupts/interrupt_axiom_v2.c create mode 100644 dartagnan/src/test/java/com/dat3m/dartagnan/c/VMMInterruptsTest.java create mode 100644 dartagnan/src/test/resources/interrupts/c11_detour-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_detour_disable-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_detour_disable_release-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_oota-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_weak_model-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_with_barrier-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_with_barrier_dec-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_with_barrier_dec_barrier-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_with_barrier_inc_split-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_with_disable_enable_as_barrier-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_without_barrier-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/c_disable_v1-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/c_disable_v2-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/c_disable_v3-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_detour-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_detour_disable-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_detour_disable_release-opt.ll delete mode 100644 dartagnan/src/test/resources/interrupts/lkmm_disable_no_enable-opt.bpl create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_oota-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_with_barrier-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec_barrier-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec_wmb-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_with_barrier_inc_split-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_with_disable_enable_as_barrier-opt.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_without_barrier-opt.ll diff --git a/benchmarks/interrupts/c11_detour.c b/benchmarks/interrupts/c11_detour.c new file mode 100644 index 0000000000..724359d0b4 --- /dev/null +++ b/benchmarks/interrupts/c11_detour.c @@ -0,0 +1,49 @@ +#include +#include +#include +#include +#include + +atomic_int x, y; +int a, b; + +pthread_t h; +void *handler(void *arg) +{ + atomic_store_explicit(&y, 3, memory_order_seq_cst); + return NULL; +} + +void *thread_1(void *arg) +{ + __VERIFIER_make_interrupt_handler(); + pthread_create(&h, NULL, handler, NULL); + + atomic_store_explicit(&x, 1, memory_order_relaxed); + a = atomic_load_explicit(&y, memory_order_relaxed); + + pthread_join(h, 0); + + return NULL; +} + +void *thread_2(void *arg) +{ + b = atomic_load_explicit(&x, memory_order_relaxed); + atomic_store_explicit(&y, 2, memory_order_release); + return NULL; +} + +int main() +{ + pthread_t t1, t2; + + pthread_create(&t1, 0, thread_1, NULL); + pthread_create(&t2, 0, thread_2, NULL); + pthread_join(t1, 0); + pthread_join(t2, 0); + + assert(!(b == 1 && a == 3 && y == 3)); + + return 0; +} diff --git a/benchmarks/interrupts/c11_detour_disable.c b/benchmarks/interrupts/c11_detour_disable.c new file mode 100644 index 0000000000..bcbf672a9b --- /dev/null +++ b/benchmarks/interrupts/c11_detour_disable.c @@ -0,0 +1,51 @@ +#include +#include +#include +#include +#include + +atomic_int x, y; +int a, b; + +pthread_t h; +void *handler(void *arg) +{ + atomic_store_explicit(&y, 3, memory_order_seq_cst); + return NULL; +} + +void *thread_1(void *arg) +{ + __VERIFIER_make_interrupt_handler(); + pthread_create(&h, NULL, handler, NULL); + + __VERIFIER_disable_irq(); + atomic_store_explicit(&x, 1, memory_order_relaxed); + a = atomic_load_explicit(&y, memory_order_relaxed); + __VERIFIER_enable_irq(); + + pthread_join(h, 0); + + return NULL; +} + +void *thread_2(void *arg) +{ + b = atomic_load_explicit(&x, memory_order_relaxed); + atomic_store_explicit(&y, 2, memory_order_release); + return NULL; +} + +int main() +{ + pthread_t t1, t2; + + pthread_create(&t1, 0, thread_1, NULL); + pthread_create(&t2, 0, thread_2, NULL); + pthread_join(t1, 0); + pthread_join(t2, 0); + + assert(!(b == 1 && a == 3 && y == 3)); + + return 0; +} diff --git a/benchmarks/interrupts/c11_detour_disable_release.c b/benchmarks/interrupts/c11_detour_disable_release.c new file mode 100644 index 0000000000..2a91ebbc00 --- /dev/null +++ b/benchmarks/interrupts/c11_detour_disable_release.c @@ -0,0 +1,51 @@ +#include +#include +#include +#include +#include + +atomic_int x, y; +int a, b; + +pthread_t h; +void *handler(void *arg) +{ + atomic_store_explicit(&y, 3, memory_order_seq_cst); + return NULL; +} + +void *thread_1(void *arg) +{ + __VERIFIER_make_interrupt_handler(); + pthread_create(&h, NULL, handler, NULL); + + __VERIFIER_disable_irq(); + atomic_store_explicit(&x, 1, memory_order_release); + a = atomic_load_explicit(&y, memory_order_relaxed); + __VERIFIER_enable_irq(); + + pthread_join(h, 0); + + return NULL; +} + +void *thread_2(void *arg) +{ + b = atomic_load_explicit(&x, memory_order_relaxed); + atomic_store_explicit(&y, 2, memory_order_release); + return NULL; +} + +int main() +{ + pthread_t t1, t2; + + pthread_create(&t1, 0, thread_1, NULL); + pthread_create(&t2, 0, thread_2, NULL); + pthread_join(t1, 0); + pthread_join(t2, 0); + + assert(!(b == 1 && a == 3 && y == 3)); + + return 0; +} diff --git a/benchmarks/interrupts/c11_oota.c b/benchmarks/interrupts/c11_oota.c new file mode 100644 index 0000000000..f37bb54d43 --- /dev/null +++ b/benchmarks/interrupts/c11_oota.c @@ -0,0 +1,47 @@ +#include +#include +#include +#include +#include + +atomic_int x, y, z; + +pthread_t h; +void *handler(void *arg) +{ + atomic_store_explicit(&z, 3, memory_order_relaxed); + assert(atomic_load_explicit(&y, memory_order_relaxed) == 0); + return NULL; +} + +void *thread_1(void *arg) +{ + __VERIFIER_make_interrupt_handler(); + pthread_create(&h, NULL, handler, NULL); + + if(atomic_load_explicit(&x, memory_order_relaxed) == 1) { + atomic_store_explicit(&y, 2, memory_order_relaxed); + } + + pthread_join(h, 0); + + return NULL; +} + +void *thread_2(void *arg) +{ + if(atomic_load_explicit(&z, memory_order_relaxed) == 3) { + atomic_store_explicit(&x, 1, memory_order_relaxed); + } + return NULL; +} + +int main() +{ + pthread_t t1, t2; + + pthread_create(&t1, 0, thread_1, NULL); + pthread_create(&t2, 0, thread_2, NULL); + + return 0; +} diff --git a/benchmarks/interrupts/c11_weak_model.c b/benchmarks/interrupts/c11_weak_model.c new file mode 100644 index 0000000000..159f58bda3 --- /dev/null +++ b/benchmarks/interrupts/c11_weak_model.c @@ -0,0 +1,63 @@ +#include +#include +#include +#include +#include +#include + +atomic_int x, y, a1, a2, b1, b2; +int r1, r2, t1, u1, t2, u2; + +pthread_t h; +void *handler(void *arg) +{ + r1 = atomic_load_explicit(&x, memory_order_relaxed); + atomic_thread_fence(memory_order_seq_cst); + r2 = atomic_load_explicit(&y, memory_order_relaxed); + return NULL; +} + +void *thread_1(void *arg) +{ + __VERIFIER_make_interrupt_handler(); + pthread_create(&h, NULL, handler, NULL); + + atomic_store_explicit(&b1, 1, memory_order_relaxed); + atomic_store_explicit(&x, 1, memory_order_relaxed); + atomic_store_explicit(&a1, 1, memory_order_relaxed); + atomic_store_explicit(&b2, 1, memory_order_relaxed); + atomic_store_explicit(&y, 1, memory_order_relaxed); + atomic_store_explicit(&a2, 1, memory_order_relaxed); + + pthread_join(h, 0); + + return NULL; +} + +void *thread_2(void *arg) +{ + t1 = atomic_load_explicit(&a1, memory_order_relaxed); + u1 = atomic_load_explicit(&b1, memory_order_relaxed); + atomic_thread_fence(memory_order_seq_cst); + t2 = atomic_load_explicit(&a2, memory_order_relaxed); + u2 = atomic_load_explicit(&b2, memory_order_relaxed); + return NULL; +} + +int main() +{ + pthread_t thread1, thread2; + + pthread_create(&thread1, 0, thread_1, NULL); + pthread_create(&thread2, 0, thread_2, NULL); + pthread_join(thread1, 0); + pthread_join(thread2, 0); + + bool reorder_bx = (t1 == 1 && t2 == 0); + bool reorder_ya = (u1 == 1 && u2 == 0); + if (r1 == 1 && r2 == 0) { + assert (! reorder_bx || ! reorder_ya); + } + + return 0; +} diff --git a/benchmarks/interrupts/c11_with_barrier.c b/benchmarks/interrupts/c11_with_barrier.c new file mode 100644 index 0000000000..9f67c92670 --- /dev/null +++ b/benchmarks/interrupts/c11_with_barrier.c @@ -0,0 +1,51 @@ +#include +#include +#include +#include +#include + +/* + This test shows how interrupt handlers are spawned +*/ + +struct A { volatile int a; volatile int b; }; // Without "volatile" the compiler removes our assertions. +struct A as[10]; +int cnt = 0; + +pthread_t h; +void *handler(void *arg) +{ + int tindex = ((intptr_t) arg); + int i = cnt++; + __VERIFIER_make_cb(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + return NULL; +} + +void *run(void *arg) +{ + __VERIFIER_make_interrupt_handler(); // Buggy without this marker + pthread_create(&h, NULL, handler, 0); + + int tindex = ((intptr_t) arg); + int i = cnt++; + __VERIFIER_make_cb(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + pthread_join(h, NULL); + + return NULL; +} + +int main() +{ + pthread_t t; + pthread_create(&t, NULL, run, (void *)1); + + return 0; +} diff --git a/benchmarks/interrupts/c11_with_barrier_dec.c b/benchmarks/interrupts/c11_with_barrier_dec.c new file mode 100644 index 0000000000..454ec9a2a6 --- /dev/null +++ b/benchmarks/interrupts/c11_with_barrier_dec.c @@ -0,0 +1,55 @@ +#include +#include +#include +#include +#include + +/* + This test shows how interrupt handlers are spawned +*/ + +struct A { volatile int a; volatile int b; }; // Without "volatile" the compiler removes our assertions. +struct A as[10]; +int cnt = 0; + +pthread_t h; +void *handler(void *arg) +{ + int tindex = ((intptr_t) arg); + int i = cnt++; + __VERIFIER_make_cb(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + cnt--; + + return NULL; +} + +void *run(void *arg) +{ + __VERIFIER_make_interrupt_handler(); // Buggy without this marker + pthread_create(&h, NULL, handler, 0); + + int tindex = ((intptr_t) arg); + int i = cnt++; + __VERIFIER_make_cb(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + cnt--; + + pthread_join(h, NULL); + + return NULL; +} + +int main() +{ + pthread_t t; + pthread_create(&t, NULL, run, (void *)1); + + return 0; +} diff --git a/benchmarks/interrupts/c11_with_barrier_dec_barrier.c b/benchmarks/interrupts/c11_with_barrier_dec_barrier.c new file mode 100644 index 0000000000..8dc38868bc --- /dev/null +++ b/benchmarks/interrupts/c11_with_barrier_dec_barrier.c @@ -0,0 +1,57 @@ +#include +#include +#include +#include +#include + +/* + This test shows how interrupt handlers are spawned +*/ + +struct A { volatile int a; volatile int b; }; // Without "volatile" the compiler removes our assertions. +struct A as[10]; +int cnt = 0; + +pthread_t h; +void *handler(void *arg) +{ + int tindex = ((intptr_t) arg); + int i = cnt++; + __VERIFIER_make_cb(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + __VERIFIER_make_cb(); + cnt--; + + return NULL; +} + +void *run(void *arg) +{ + __VERIFIER_make_interrupt_handler(); // Buggy without this marker + pthread_create(&h, NULL, handler, 0); + + int tindex = ((intptr_t) arg); + int i = cnt++; + __VERIFIER_make_cb(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + __VERIFIER_make_cb(); + cnt--; + + pthread_join(h, NULL); + + return NULL; +} + +int main() +{ + pthread_t t; + pthread_create(&t, NULL, run, (void *)1); + + return 0; +} diff --git a/benchmarks/interrupts/c11_with_barrier_inc_split.c b/benchmarks/interrupts/c11_with_barrier_inc_split.c new file mode 100644 index 0000000000..d934752c11 --- /dev/null +++ b/benchmarks/interrupts/c11_with_barrier_inc_split.c @@ -0,0 +1,52 @@ +#include +#include +#include +#include +#include + +/* + This test shows how interrupt handlers are spawned +*/ + +struct A { volatile int a; volatile int b; }; // Without "volatile" the compiler removes our assertions. +struct A as[10]; +int cnt = 0; + +pthread_t h; +void *handler(void *arg) +{ + int tindex = ((intptr_t) arg); + int i = cnt++; + __VERIFIER_make_cb(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + return NULL; +} + +void *run(void *arg) +{ + __VERIFIER_make_interrupt_handler(); // Buggy without this marker + pthread_create(&h, NULL, handler, 0); + + int tindex = ((intptr_t) arg); + int i = cnt; + __VERIFIER_make_cb(); + cnt = i+1; + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + pthread_join(h, NULL); + + return NULL; +} + +int main() +{ + pthread_t t; + pthread_create(&t, NULL, run, (void *)1); + + return 0; +} diff --git a/benchmarks/interrupts/c11_with_disable_enable_as_barrier.c b/benchmarks/interrupts/c11_with_disable_enable_as_barrier.c new file mode 100644 index 0000000000..05b68f6c7d --- /dev/null +++ b/benchmarks/interrupts/c11_with_disable_enable_as_barrier.c @@ -0,0 +1,53 @@ +#include +#include +#include +#include +#include + +/* + This test shows how interrupt handlers are spawned +*/ + +struct A { volatile int a; volatile int b; }; // Without "volatile" the compiler removes our assertions. +struct A as[10]; +int cnt = 0; + +pthread_t h; +void *handler(void *arg) +{ + int tindex = ((intptr_t) arg); + int i = cnt++; + __VERIFIER_disable_irq(); + __VERIFIER_enable_irq(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + return NULL; +} + +void *run(void *arg) +{ + __VERIFIER_make_interrupt_handler(); // Buggy without this marker + pthread_create(&h, NULL, handler, 0); + + int tindex = ((intptr_t) arg); + int i = cnt++; + __VERIFIER_disable_irq(); + __VERIFIER_enable_irq(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + pthread_join(h, NULL); + + return NULL; +} + +int main() +{ + pthread_t t; + pthread_create(&t, NULL, run, (void *)1); + + return 0; +} diff --git a/benchmarks/interrupts/c11_without_barrier.c b/benchmarks/interrupts/c11_without_barrier.c new file mode 100644 index 0000000000..d9e689824b --- /dev/null +++ b/benchmarks/interrupts/c11_without_barrier.c @@ -0,0 +1,49 @@ +#include +#include +#include +#include +#include + +/* + This test shows how interrupt handlers are spawned +*/ + +struct A { volatile int a; volatile int b; }; // Without "volatile" the compiler removes our assertions. +struct A as[10]; +int cnt = 0; + +pthread_t h; +void *handler(void *arg) +{ + int tindex = ((intptr_t) arg); + int i = cnt++; + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + return NULL; +} + +void *run(void *arg) +{ + __VERIFIER_make_interrupt_handler(); // Buggy without this marker + pthread_create(&h, NULL, handler, 0); + + int tindex = ((intptr_t) arg); + int i = cnt++; + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + pthread_join(h, NULL); + + return NULL; +} + +int main() +{ + pthread_t t; + pthread_create(&t, NULL, run, (void *)1); + + return 0; +} diff --git a/benchmarks/interrupts/c_disable_v1.c b/benchmarks/interrupts/c_disable_v1.c new file mode 100644 index 0000000000..d5adcbcf6c --- /dev/null +++ b/benchmarks/interrupts/c_disable_v1.c @@ -0,0 +1,53 @@ +#include +#include +#include +#include +#include + +/* + This test shows how interrupt handlers are spawned +*/ + +struct A { volatile int a; volatile int b; }; // Without "volatile" the compiler removes our assertions. +struct A as[10]; +int cnt = 0; + +pthread_t h; +void *handler(void *arg) +{ + int tindex = ((intptr_t) arg); + __VERIFIER_disable_irq(); + int i = cnt++; + __VERIFIER_enable_irq(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + return NULL; +} + +void *run(void *arg) +{ + __VERIFIER_make_interrupt_handler(); + pthread_create(&h, NULL, handler, 0); + + int tindex = ((intptr_t) arg); + __VERIFIER_disable_irq(); + int i = cnt++; + __VERIFIER_enable_irq(); + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + + pthread_join(h, NULL); + + return NULL; +} + +int main() +{ + pthread_t t; + pthread_create(&t, NULL, run, (void *)1); + + return 0; +} \ No newline at end of file diff --git a/benchmarks/interrupts/c_disable_v2.c b/benchmarks/interrupts/c_disable_v2.c new file mode 100644 index 0000000000..78d3c776a4 --- /dev/null +++ b/benchmarks/interrupts/c_disable_v2.c @@ -0,0 +1,53 @@ +#include +#include +#include +#include +#include + +/* + This test shows how interrupt handlers are spawned +*/ + +struct A { volatile int a; volatile int b; }; // Without "volatile" the compiler removes our assertions. +struct A as[10]; +int cnt = 0; + +pthread_t h; +void *handler(void *arg) +{ + int tindex = ((intptr_t) arg); + __VERIFIER_disable_irq(); + int i = cnt++; + as[i].a = tindex; + as[i].b = tindex; + __VERIFIER_enable_irq(); + assert(as[i].a == as[i].b); + + return NULL; +} + +void *run(void *arg) +{ + __VERIFIER_make_interrupt_handler(); // Buggy without this marker + pthread_create(&h, NULL, handler, 0); + + int tindex = ((intptr_t) arg); + __VERIFIER_disable_irq(); + int i = cnt++; + as[i].a = tindex; + as[i].b = tindex; + __VERIFIER_enable_irq(); + assert(as[i].a == as[i].b); + + pthread_join(h, NULL); + + return NULL; +} + +int main() +{ + pthread_t t; + pthread_create(&t, NULL, run, (void *)1); + + return 0; +} diff --git a/benchmarks/interrupts/c_disable_v3.c b/benchmarks/interrupts/c_disable_v3.c new file mode 100644 index 0000000000..544a2ef192 --- /dev/null +++ b/benchmarks/interrupts/c_disable_v3.c @@ -0,0 +1,53 @@ +#include +#include +#include +#include +#include + +/* + This test shows how interrupt handlers are spawned +*/ + +struct A { volatile int a; volatile int b; }; // Without "volatile" the compiler removes our assertions. +struct A as[10]; +int cnt = 0; + +pthread_t h; +void *handler(void *arg) +{ + int tindex = ((intptr_t) arg); + __VERIFIER_disable_irq(); + int i = cnt++; + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + __VERIFIER_enable_irq(); + + return NULL; +} + +void *run(void *arg) +{ + __VERIFIER_make_interrupt_handler(); // Buggy without this marker + pthread_create(&h, NULL, handler, 0); + + int tindex = ((intptr_t) arg); + __VERIFIER_disable_irq(); + int i = cnt++; + as[i].a = tindex; + as[i].b = tindex; + assert(as[i].a == as[i].b); + __VERIFIER_enable_irq(); + + pthread_join(h, NULL); + + return NULL; +} + +int main() +{ + pthread_t t; + pthread_create(&t, NULL, run, (void *)1); + + return 0; +} diff --git a/benchmarks/interrupts/interrupt_axiom_v1.c b/benchmarks/interrupts/interrupt_axiom_v1.c new file mode 100644 index 0000000000..2e935e366d --- /dev/null +++ b/benchmarks/interrupts/interrupt_axiom_v1.c @@ -0,0 +1,47 @@ +#include +#include +#include +#include + +atomic_int x, y, z; + +pthread_t h; +void *handler(void *arg) +{ + if(atomic_load_explicit(&x, memory_order_relaxed) == 1 && atomic_load_explicit(&y, memory_order_relaxed) == 0) { + atomic_thread_fence(memory_order_seq_cst); + atomic_store_explicit(&z, 1, memory_order_relaxed); + } + return NULL; +} + +void *thread_1(void *arg) +{ + __VERIFIER_make_interrupt_handler(); + pthread_create(&h, NULL, handler, NULL); + + atomic_store_explicit(&x, 1, memory_order_relaxed); + atomic_store_explicit(&y, 1, memory_order_relaxed); + + pthread_join(h, NULL); + + return NULL; +} + +void *thread_2(void *arg) +{ + if(atomic_load_explicit(&z, memory_order_relaxed) == 1 && atomic_load_explicit(&y, memory_order_relaxed) == 1) { + atomic_thread_fence(memory_order_seq_cst); + assert(atomic_load_explicit(&x, memory_order_relaxed) == 1); + } + return NULL; +} + +int main() +{ + pthread_t t1, t2; + pthread_create(&t1, NULL, thread_1, NULL); + pthread_create(&t2, NULL, thread_2, NULL); + + return 0; +} diff --git a/benchmarks/interrupts/interrupt_axiom_v2.c b/benchmarks/interrupts/interrupt_axiom_v2.c new file mode 100644 index 0000000000..f9d92b06aa --- /dev/null +++ b/benchmarks/interrupts/interrupt_axiom_v2.c @@ -0,0 +1,47 @@ +#include +#include +#include +#include + +atomic_int x, y, z; + +pthread_t h; +void *handler(void *arg) +{ + if(atomic_load_explicit(&x, memory_order_relaxed) == 1 && atomic_load_explicit(&y, memory_order_relaxed) == 0) { + atomic_store_explicit(&z, 1, memory_order_relaxed); + atomic_thread_fence(memory_order_seq_cst); + } + return NULL; +} + +void *thread_1(void *arg) +{ + __VERIFIER_make_interrupt_handler(); + pthread_create(&h, NULL, handler, NULL); + + atomic_store_explicit(&x, 1, memory_order_relaxed); + atomic_store_explicit(&y, 1, memory_order_relaxed); + + pthread_join(h, NULL); + + return NULL; +} + +void *thread_2(void *arg) +{ + if(atomic_load_explicit(&z, memory_order_relaxed) == 1 && atomic_load_explicit(&y, memory_order_relaxed) == 1) { + atomic_thread_fence(memory_order_seq_cst); + assert(atomic_load_explicit(&x, memory_order_relaxed) == 1); + } + return NULL; +} + +int main() +{ + pthread_t t1, t2; + pthread_create(&t1, NULL, thread_1, NULL); + pthread_create(&t2, NULL, thread_2, NULL); + + return 0; +} diff --git a/dartagnan/src/test/java/com/dat3m/dartagnan/c/LKMMInterruptsTest.java b/dartagnan/src/test/java/com/dat3m/dartagnan/c/LKMMInterruptsTest.java index 691fed5c82..bc8aaef3ff 100644 --- a/dartagnan/src/test/java/com/dat3m/dartagnan/c/LKMMInterruptsTest.java +++ b/dartagnan/src/test/java/com/dat3m/dartagnan/c/LKMMInterruptsTest.java @@ -39,7 +39,7 @@ protected long getTimeout() { @Override protected Provider getWmmProvider() { - return Provider.fromSupplier(() -> new ParserCat().parse(new File(getRootPath("cat/linux-kernel.cat")))); + return Provider.fromSupplier(() -> new ParserCat().parse(new File(getRootPath("cat/linux-kernel-interrupts.cat")))); } @Parameterized.Parameters(name = "{index}: {0}, target={1}") @@ -49,7 +49,7 @@ public static Iterable data() throws IOException { {"c_disable_v2-opt", LKMM, PASS}, {"c_disable_v3-opt", LKMM, PASS}, {"lkmm_detour_disable_release-opt", LKMM, PASS}, - {"lkmm_detour-opt", LKMM, FAIL}, + {"lkmm_detour_disable-opt", LKMM, FAIL}, {"lkmm_detour-opt", LKMM, FAIL}, {"lkmm_oota-opt", LKMM, PASS}, // {"lkmm_weak_model-opt", LKMM, PASS}, diff --git a/dartagnan/src/test/java/com/dat3m/dartagnan/c/VMMInterruptsTest.java b/dartagnan/src/test/java/com/dat3m/dartagnan/c/VMMInterruptsTest.java new file mode 100644 index 0000000000..e4d09939c8 --- /dev/null +++ b/dartagnan/src/test/java/com/dat3m/dartagnan/c/VMMInterruptsTest.java @@ -0,0 +1,76 @@ +package com.dat3m.dartagnan.c; + +import com.dat3m.dartagnan.configuration.Arch; +import com.dat3m.dartagnan.parsers.cat.ParserCat; +import com.dat3m.dartagnan.utils.Result; +import com.dat3m.dartagnan.utils.rules.Provider; +import com.dat3m.dartagnan.verification.solving.AssumeSolver; +import com.dat3m.dartagnan.verification.solving.RefinementSolver; +import com.dat3m.dartagnan.wmm.Wmm; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +import java.io.File; +import java.io.IOException; +import java.util.Arrays; + +import static com.dat3m.dartagnan.configuration.Arch.*; +import static com.dat3m.dartagnan.utils.ResourceHelper.*; +import static com.dat3m.dartagnan.utils.Result.*; +import static org.junit.Assert.assertEquals; + +@RunWith(Parameterized.class) +public class VMMInterruptsTest extends AbstractCTest { + + public VMMInterruptsTest(String name, Arch target, Result expected) { + super(name, target, expected); + } + + @Override + protected Provider getProgramPathProvider() { + return Provider.fromSupplier(() -> getTestResourcePath("interrupts/" + name + ".ll")); + } + + @Override + protected long getTimeout() { + return 60000; + } + + @Override + protected Provider getWmmProvider() { + return Provider.fromSupplier(() -> new ParserCat().parse(new File(getRootPath("cat/vmm.cat")))); + } + + @Parameterized.Parameters(name = "{index}: {0}, target={1}") + public static Iterable data() throws IOException { + return Arrays.asList(new Object[][]{ + {"c_disable_v1-opt", C11, PASS}, + {"c_disable_v2-opt", C11, PASS}, + {"c_disable_v3-opt", C11, PASS}, + {"c11_detour_disable_release-opt", C11, PASS}, + {"c11_detour_disable-opt", C11, FAIL}, + {"c11_detour-opt", C11, FAIL}, + {"c11_oota-opt", C11, PASS}, + {"c11_weak_model-opt", C11, PASS}, + {"c11_with_barrier_dec_barrier-opt", C11, PASS}, + {"c11_with_barrier_dec-opt", C11, FAIL}, + {"c11_with_barrier-opt", C11, PASS}, + {"c11_with_barrier_inc_split-opt", C11, FAIL}, + {"c11_with_disable_enable_as_barrier-opt", C11, PASS}, + {"c11_without_barrier-opt", C11, FAIL}, + }); + } + + @Test + public void testAssume() throws Exception { + AssumeSolver s = AssumeSolver.run(contextProvider.get(), proverProvider.get(), taskProvider.get()); + assertEquals(expected, s.getResult()); + } + + @Test + public void testRefinement() throws Exception { + RefinementSolver s = RefinementSolver.run(contextProvider.get(), proverProvider.get(), taskProvider.get()); + assertEquals(expected, s.getResult()); + } +} \ No newline at end of file diff --git a/dartagnan/src/test/resources/interrupts/c11_detour-opt.ll b/dartagnan/src/test/resources/interrupts/c11_detour-opt.ll new file mode 100644 index 0000000000..558e64b831 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_detour-opt.ll @@ -0,0 +1,190 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/c11_detour.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_detour.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%union.pthread_attr_t = type { i64, [48 x i8] } + +@y = dso_local global i32 0, align 4, !dbg !0 +@h = dso_local global i64 0, align 8, !dbg !28 +@x = dso_local global i32 0, align 4, !dbg !18 +@a = dso_local global i32 0, align 4, !dbg !24 +@b = dso_local global i32 0, align 4, !dbg !26 +@.str = private unnamed_addr constant [30 x i8] c"!(b == 1 && a == 3 && y == 3)\00", align 1 +@.str.1 = private unnamed_addr constant [57 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/c11_detour.c\00", align 1 +@__PRETTY_FUNCTION__.main = private unnamed_addr constant [11 x i8] c"int main()\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !41 { + call void @llvm.dbg.value(metadata i8* %0, metadata !45, metadata !DIExpression()), !dbg !46 + store atomic i32 3, i32* @y seq_cst, align 4, !dbg !47 + ret i8* null, !dbg !48 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @thread_1(i8* noundef %0) #0 !dbg !49 { + call void @llvm.dbg.value(metadata i8* %0, metadata !50, metadata !DIExpression()), !dbg !51 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !52 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #5, !dbg !53 + store atomic i32 1, i32* @x monotonic, align 4, !dbg !54 + %4 = load atomic i32, i32* @y monotonic, align 4, !dbg !55 + store i32 %4, i32* @a, align 4, !dbg !56 + %5 = load i64, i64* @h, align 8, !dbg !57 + %6 = call i32 @pthread_join(i64 noundef %5, i8** noundef null), !dbg !58 + ret i8* null, !dbg !59 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #3 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @thread_2(i8* noundef %0) #0 !dbg !60 { + call void @llvm.dbg.value(metadata i8* %0, metadata !61, metadata !DIExpression()), !dbg !62 + %2 = load atomic i32, i32* @x monotonic, align 4, !dbg !63 + store i32 %2, i32* @b, align 4, !dbg !64 + store atomic i32 2, i32* @y release, align 4, !dbg !65 + ret i8* null, !dbg !66 +} + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !67 { + %1 = alloca i64, align 8 + %2 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !70, metadata !DIExpression()), !dbg !71 + call void @llvm.dbg.declare(metadata i64* %2, metadata !72, metadata !DIExpression()), !dbg !73 + %3 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_1, i8* noundef null) #5, !dbg !74 + %4 = call i32 @pthread_create(i64* noundef %2, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_2, i8* noundef null) #5, !dbg !75 + %5 = load i64, i64* %1, align 8, !dbg !76 + %6 = call i32 @pthread_join(i64 noundef %5, i8** noundef null), !dbg !77 + %7 = load i64, i64* %2, align 8, !dbg !78 + %8 = call i32 @pthread_join(i64 noundef %7, i8** noundef null), !dbg !79 + %9 = load i32, i32* @b, align 4, !dbg !80 + %10 = icmp eq i32 %9, 1, !dbg !80 + %11 = load i32, i32* @a, align 4, !dbg !80 + %12 = icmp eq i32 %11, 3, !dbg !80 + %or.cond = select i1 %10, i1 %12, i1 false, !dbg !80 + br i1 %or.cond, label %13, label %17, !dbg !80 + +13: ; preds = %0 + %14 = load atomic i32, i32* @y seq_cst, align 4, !dbg !80 + %15 = icmp eq i32 %14, 3, !dbg !80 + br i1 %15, label %16, label %17, !dbg !83 + +16: ; preds = %13 + call void @__assert_fail(i8* noundef getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0), i32 noundef 46, i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__PRETTY_FUNCTION__.main, i64 0, i64 0)) #6, !dbg !80 + unreachable, !dbg !80 + +17: ; preds = %0, %13 + ret i32 0, !dbg !84 +} + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #4 + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { nounwind } +attributes #6 = { noreturn nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!33, !34, !35, !36, !37, !38, !39} +!llvm.ident = !{!40} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !20, line: 7, type: !21, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !15, globals: !17, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_detour.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "929b41e9fa35e2c80c8011f698234702") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 56, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "/usr/lib/llvm-14/lib/clang/14.0.6/include/stdatomic.h", directory: "", checksumkind: CSK_MD5, checksum: "de5d66a1ef2f5448cc1919ff39db92bc") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_consume", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "memory_order_acq_rel", value: 4) +!14 = !DIEnumerator(name: "memory_order_seq_cst", value: 5) +!15 = !{!16} +!16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!17 = !{!18, !0, !24, !26, !28} +!18 = !DIGlobalVariableExpression(var: !19, expr: !DIExpression()) +!19 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !20, line: 7, type: !21, isLocal: false, isDefinition: true) +!20 = !DIFile(filename: "benchmarks/interrupts/c11_detour.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "929b41e9fa35e2c80c8011f698234702") +!21 = !DIDerivedType(tag: DW_TAG_typedef, name: "atomic_int", file: !6, line: 92, baseType: !22) +!22 = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: !23) +!23 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !20, line: 8, type: !23, isLocal: false, isDefinition: true) +!26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression()) +!27 = distinct !DIGlobalVariable(name: "b", scope: !2, file: !20, line: 8, type: !23, isLocal: false, isDefinition: true) +!28 = !DIGlobalVariableExpression(var: !29, expr: !DIExpression()) +!29 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !20, line: 10, type: !30, isLocal: false, isDefinition: true) +!30 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !31, line: 27, baseType: !32) +!31 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!32 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!33 = !{i32 7, !"Dwarf Version", i32 5} +!34 = !{i32 2, !"Debug Info Version", i32 3} +!35 = !{i32 1, !"wchar_size", i32 4} +!36 = !{i32 7, !"PIC Level", i32 2} +!37 = !{i32 7, !"PIE Level", i32 2} +!38 = !{i32 7, !"uwtable", i32 1} +!39 = !{i32 7, !"frame-pointer", i32 2} +!40 = !{!"Ubuntu clang version 14.0.6"} +!41 = distinct !DISubprogram(name: "handler", scope: !20, file: !20, line: 11, type: !42, scopeLine: 12, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +!42 = !DISubroutineType(types: !43) +!43 = !{!16, !16} +!44 = !{} +!45 = !DILocalVariable(name: "arg", arg: 1, scope: !41, file: !20, line: 11, type: !16) +!46 = !DILocation(line: 0, scope: !41) +!47 = !DILocation(line: 13, column: 5, scope: !41) +!48 = !DILocation(line: 14, column: 5, scope: !41) +!49 = distinct !DISubprogram(name: "thread_1", scope: !20, file: !20, line: 17, type: !42, scopeLine: 18, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +!50 = !DILocalVariable(name: "arg", arg: 1, scope: !49, file: !20, line: 17, type: !16) +!51 = !DILocation(line: 0, scope: !49) +!52 = !DILocation(line: 19, column: 5, scope: !49) +!53 = !DILocation(line: 20, column: 5, scope: !49) +!54 = !DILocation(line: 22, column: 5, scope: !49) +!55 = !DILocation(line: 23, column: 9, scope: !49) +!56 = !DILocation(line: 23, column: 7, scope: !49) +!57 = !DILocation(line: 25, column: 18, scope: !49) +!58 = !DILocation(line: 25, column: 5, scope: !49) +!59 = !DILocation(line: 27, column: 5, scope: !49) +!60 = distinct !DISubprogram(name: "thread_2", scope: !20, file: !20, line: 30, type: !42, scopeLine: 31, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +!61 = !DILocalVariable(name: "arg", arg: 1, scope: !60, file: !20, line: 30, type: !16) +!62 = !DILocation(line: 0, scope: !60) +!63 = !DILocation(line: 32, column: 9, scope: !60) +!64 = !DILocation(line: 32, column: 7, scope: !60) +!65 = !DILocation(line: 33, column: 5, scope: !60) +!66 = !DILocation(line: 34, column: 5, scope: !60) +!67 = distinct !DISubprogram(name: "main", scope: !20, file: !20, line: 37, type: !68, scopeLine: 38, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +!68 = !DISubroutineType(types: !69) +!69 = !{!23} +!70 = !DILocalVariable(name: "t1", scope: !67, file: !20, line: 39, type: !30) +!71 = !DILocation(line: 39, column: 15, scope: !67) +!72 = !DILocalVariable(name: "t2", scope: !67, file: !20, line: 39, type: !30) +!73 = !DILocation(line: 39, column: 19, scope: !67) +!74 = !DILocation(line: 41, column: 5, scope: !67) +!75 = !DILocation(line: 42, column: 5, scope: !67) +!76 = !DILocation(line: 43, column: 18, scope: !67) +!77 = !DILocation(line: 43, column: 5, scope: !67) +!78 = !DILocation(line: 44, column: 18, scope: !67) +!79 = !DILocation(line: 44, column: 5, scope: !67) +!80 = !DILocation(line: 46, column: 5, scope: !81) +!81 = distinct !DILexicalBlock(scope: !82, file: !20, line: 46, column: 5) +!82 = distinct !DILexicalBlock(scope: !67, file: !20, line: 46, column: 5) +!83 = !DILocation(line: 46, column: 5, scope: !82) +!84 = !DILocation(line: 48, column: 5, scope: !67) diff --git a/dartagnan/src/test/resources/interrupts/c11_detour_disable-opt.ll b/dartagnan/src/test/resources/interrupts/c11_detour_disable-opt.ll new file mode 100644 index 0000000000..543648c225 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_detour_disable-opt.ll @@ -0,0 +1,198 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/c11_detour_disable.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_detour_disable.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%union.pthread_attr_t = type { i64, [48 x i8] } + +@y = dso_local global i32 0, align 4, !dbg !0 +@h = dso_local global i64 0, align 8, !dbg !28 +@x = dso_local global i32 0, align 4, !dbg !18 +@a = dso_local global i32 0, align 4, !dbg !24 +@b = dso_local global i32 0, align 4, !dbg !26 +@.str = private unnamed_addr constant [30 x i8] c"!(b == 1 && a == 3 && y == 3)\00", align 1 +@.str.1 = private unnamed_addr constant [65 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/c11_detour_disable.c\00", align 1 +@__PRETTY_FUNCTION__.main = private unnamed_addr constant [11 x i8] c"int main()\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !41 { + call void @llvm.dbg.value(metadata i8* %0, metadata !45, metadata !DIExpression()), !dbg !46 + store atomic i32 3, i32* @y seq_cst, align 4, !dbg !47 + ret i8* null, !dbg !48 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @thread_1(i8* noundef %0) #0 !dbg !49 { + call void @llvm.dbg.value(metadata i8* %0, metadata !50, metadata !DIExpression()), !dbg !51 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !52 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #5, !dbg !53 + %4 = call i32 (...) @__VERIFIER_disable_irq(), !dbg !54 + store atomic i32 1, i32* @x monotonic, align 4, !dbg !55 + %5 = load atomic i32, i32* @y monotonic, align 4, !dbg !56 + store i32 %5, i32* @a, align 4, !dbg !57 + %6 = call i32 (...) @__VERIFIER_enable_irq(), !dbg !58 + %7 = load i64, i64* @h, align 8, !dbg !59 + %8 = call i32 @pthread_join(i64 noundef %7, i8** noundef null), !dbg !60 + ret i8* null, !dbg !61 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #3 + +declare i32 @__VERIFIER_disable_irq(...) #2 + +declare i32 @__VERIFIER_enable_irq(...) #2 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @thread_2(i8* noundef %0) #0 !dbg !62 { + call void @llvm.dbg.value(metadata i8* %0, metadata !63, metadata !DIExpression()), !dbg !64 + %2 = load atomic i32, i32* @x monotonic, align 4, !dbg !65 + store i32 %2, i32* @b, align 4, !dbg !66 + store atomic i32 2, i32* @y release, align 4, !dbg !67 + ret i8* null, !dbg !68 +} + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !69 { + %1 = alloca i64, align 8 + %2 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !72, metadata !DIExpression()), !dbg !73 + call void @llvm.dbg.declare(metadata i64* %2, metadata !74, metadata !DIExpression()), !dbg !75 + %3 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_1, i8* noundef null) #5, !dbg !76 + %4 = call i32 @pthread_create(i64* noundef %2, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_2, i8* noundef null) #5, !dbg !77 + %5 = load i64, i64* %1, align 8, !dbg !78 + %6 = call i32 @pthread_join(i64 noundef %5, i8** noundef null), !dbg !79 + %7 = load i64, i64* %2, align 8, !dbg !80 + %8 = call i32 @pthread_join(i64 noundef %7, i8** noundef null), !dbg !81 + %9 = load i32, i32* @b, align 4, !dbg !82 + %10 = icmp eq i32 %9, 1, !dbg !82 + %11 = load i32, i32* @a, align 4, !dbg !82 + %12 = icmp eq i32 %11, 3, !dbg !82 + %or.cond = select i1 %10, i1 %12, i1 false, !dbg !82 + br i1 %or.cond, label %13, label %17, !dbg !82 + +13: ; preds = %0 + %14 = load atomic i32, i32* @y seq_cst, align 4, !dbg !82 + %15 = icmp eq i32 %14, 3, !dbg !82 + br i1 %15, label %16, label %17, !dbg !85 + +16: ; preds = %13 + call void @__assert_fail(i8* noundef getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0), i32 noundef 48, i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__PRETTY_FUNCTION__.main, i64 0, i64 0)) #6, !dbg !82 + unreachable, !dbg !82 + +17: ; preds = %0, %13 + ret i32 0, !dbg !86 +} + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #4 + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { nounwind } +attributes #6 = { noreturn nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!33, !34, !35, !36, !37, !38, !39} +!llvm.ident = !{!40} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !20, line: 7, type: !21, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !15, globals: !17, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_detour_disable.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "577894e706b5b839ee9d450e0afedc09") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 56, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "/usr/lib/llvm-14/lib/clang/14.0.6/include/stdatomic.h", directory: "", checksumkind: CSK_MD5, checksum: "de5d66a1ef2f5448cc1919ff39db92bc") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_consume", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "memory_order_acq_rel", value: 4) +!14 = !DIEnumerator(name: "memory_order_seq_cst", value: 5) +!15 = !{!16} +!16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!17 = !{!18, !0, !24, !26, !28} +!18 = !DIGlobalVariableExpression(var: !19, expr: !DIExpression()) +!19 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !20, line: 7, type: !21, isLocal: false, isDefinition: true) +!20 = !DIFile(filename: "benchmarks/interrupts/c11_detour_disable.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "577894e706b5b839ee9d450e0afedc09") +!21 = !DIDerivedType(tag: DW_TAG_typedef, name: "atomic_int", file: !6, line: 92, baseType: !22) +!22 = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: !23) +!23 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !20, line: 8, type: !23, isLocal: false, isDefinition: true) +!26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression()) +!27 = distinct !DIGlobalVariable(name: "b", scope: !2, file: !20, line: 8, type: !23, isLocal: false, isDefinition: true) +!28 = !DIGlobalVariableExpression(var: !29, expr: !DIExpression()) +!29 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !20, line: 10, type: !30, isLocal: false, isDefinition: true) +!30 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !31, line: 27, baseType: !32) +!31 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!32 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!33 = !{i32 7, !"Dwarf Version", i32 5} +!34 = !{i32 2, !"Debug Info Version", i32 3} +!35 = !{i32 1, !"wchar_size", i32 4} +!36 = !{i32 7, !"PIC Level", i32 2} +!37 = !{i32 7, !"PIE Level", i32 2} +!38 = !{i32 7, !"uwtable", i32 1} +!39 = !{i32 7, !"frame-pointer", i32 2} +!40 = !{!"Ubuntu clang version 14.0.6"} +!41 = distinct !DISubprogram(name: "handler", scope: !20, file: !20, line: 11, type: !42, scopeLine: 12, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +!42 = !DISubroutineType(types: !43) +!43 = !{!16, !16} +!44 = !{} +!45 = !DILocalVariable(name: "arg", arg: 1, scope: !41, file: !20, line: 11, type: !16) +!46 = !DILocation(line: 0, scope: !41) +!47 = !DILocation(line: 13, column: 5, scope: !41) +!48 = !DILocation(line: 14, column: 5, scope: !41) +!49 = distinct !DISubprogram(name: "thread_1", scope: !20, file: !20, line: 17, type: !42, scopeLine: 18, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +!50 = !DILocalVariable(name: "arg", arg: 1, scope: !49, file: !20, line: 17, type: !16) +!51 = !DILocation(line: 0, scope: !49) +!52 = !DILocation(line: 19, column: 5, scope: !49) +!53 = !DILocation(line: 20, column: 5, scope: !49) +!54 = !DILocation(line: 22, column: 5, scope: !49) +!55 = !DILocation(line: 23, column: 5, scope: !49) +!56 = !DILocation(line: 24, column: 9, scope: !49) +!57 = !DILocation(line: 24, column: 7, scope: !49) +!58 = !DILocation(line: 25, column: 5, scope: !49) +!59 = !DILocation(line: 27, column: 18, scope: !49) +!60 = !DILocation(line: 27, column: 5, scope: !49) +!61 = !DILocation(line: 29, column: 5, scope: !49) +!62 = distinct !DISubprogram(name: "thread_2", scope: !20, file: !20, line: 32, type: !42, scopeLine: 33, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +!63 = !DILocalVariable(name: "arg", arg: 1, scope: !62, file: !20, line: 32, type: !16) +!64 = !DILocation(line: 0, scope: !62) +!65 = !DILocation(line: 34, column: 9, scope: !62) +!66 = !DILocation(line: 34, column: 7, scope: !62) +!67 = !DILocation(line: 35, column: 5, scope: !62) +!68 = !DILocation(line: 36, column: 5, scope: !62) +!69 = distinct !DISubprogram(name: "main", scope: !20, file: !20, line: 39, type: !70, scopeLine: 40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +!70 = !DISubroutineType(types: !71) +!71 = !{!23} +!72 = !DILocalVariable(name: "t1", scope: !69, file: !20, line: 41, type: !30) +!73 = !DILocation(line: 41, column: 15, scope: !69) +!74 = !DILocalVariable(name: "t2", scope: !69, file: !20, line: 41, type: !30) +!75 = !DILocation(line: 41, column: 19, scope: !69) +!76 = !DILocation(line: 43, column: 5, scope: !69) +!77 = !DILocation(line: 44, column: 5, scope: !69) +!78 = !DILocation(line: 45, column: 18, scope: !69) +!79 = !DILocation(line: 45, column: 5, scope: !69) +!80 = !DILocation(line: 46, column: 18, scope: !69) +!81 = !DILocation(line: 46, column: 5, scope: !69) +!82 = !DILocation(line: 48, column: 5, scope: !83) +!83 = distinct !DILexicalBlock(scope: !84, file: !20, line: 48, column: 5) +!84 = distinct !DILexicalBlock(scope: !69, file: !20, line: 48, column: 5) +!85 = !DILocation(line: 48, column: 5, scope: !84) +!86 = !DILocation(line: 50, column: 5, scope: !69) diff --git a/dartagnan/src/test/resources/interrupts/c11_detour_disable_release-opt.ll b/dartagnan/src/test/resources/interrupts/c11_detour_disable_release-opt.ll new file mode 100644 index 0000000000..f52c47aa60 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_detour_disable_release-opt.ll @@ -0,0 +1,198 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/c11_detour_disable_release.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_detour_disable_release.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%union.pthread_attr_t = type { i64, [48 x i8] } + +@y = dso_local global i32 0, align 4, !dbg !0 +@h = dso_local global i64 0, align 8, !dbg !28 +@x = dso_local global i32 0, align 4, !dbg !18 +@a = dso_local global i32 0, align 4, !dbg !24 +@b = dso_local global i32 0, align 4, !dbg !26 +@.str = private unnamed_addr constant [30 x i8] c"!(b == 1 && a == 3 && y == 3)\00", align 1 +@.str.1 = private unnamed_addr constant [73 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/c11_detour_disable_release.c\00", align 1 +@__PRETTY_FUNCTION__.main = private unnamed_addr constant [11 x i8] c"int main()\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !41 { + call void @llvm.dbg.value(metadata i8* %0, metadata !45, metadata !DIExpression()), !dbg !46 + store atomic i32 3, i32* @y seq_cst, align 4, !dbg !47 + ret i8* null, !dbg !48 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @thread_1(i8* noundef %0) #0 !dbg !49 { + call void @llvm.dbg.value(metadata i8* %0, metadata !50, metadata !DIExpression()), !dbg !51 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !52 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #5, !dbg !53 + %4 = call i32 (...) @__VERIFIER_disable_irq(), !dbg !54 + store atomic i32 1, i32* @x release, align 4, !dbg !55 + %5 = load atomic i32, i32* @y monotonic, align 4, !dbg !56 + store i32 %5, i32* @a, align 4, !dbg !57 + %6 = call i32 (...) @__VERIFIER_enable_irq(), !dbg !58 + %7 = load i64, i64* @h, align 8, !dbg !59 + %8 = call i32 @pthread_join(i64 noundef %7, i8** noundef null), !dbg !60 + ret i8* null, !dbg !61 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #3 + +declare i32 @__VERIFIER_disable_irq(...) #2 + +declare i32 @__VERIFIER_enable_irq(...) #2 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @thread_2(i8* noundef %0) #0 !dbg !62 { + call void @llvm.dbg.value(metadata i8* %0, metadata !63, metadata !DIExpression()), !dbg !64 + %2 = load atomic i32, i32* @x monotonic, align 4, !dbg !65 + store i32 %2, i32* @b, align 4, !dbg !66 + store atomic i32 2, i32* @y release, align 4, !dbg !67 + ret i8* null, !dbg !68 +} + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !69 { + %1 = alloca i64, align 8 + %2 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !72, metadata !DIExpression()), !dbg !73 + call void @llvm.dbg.declare(metadata i64* %2, metadata !74, metadata !DIExpression()), !dbg !75 + %3 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_1, i8* noundef null) #5, !dbg !76 + %4 = call i32 @pthread_create(i64* noundef %2, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_2, i8* noundef null) #5, !dbg !77 + %5 = load i64, i64* %1, align 8, !dbg !78 + %6 = call i32 @pthread_join(i64 noundef %5, i8** noundef null), !dbg !79 + %7 = load i64, i64* %2, align 8, !dbg !80 + %8 = call i32 @pthread_join(i64 noundef %7, i8** noundef null), !dbg !81 + %9 = load i32, i32* @b, align 4, !dbg !82 + %10 = icmp eq i32 %9, 1, !dbg !82 + %11 = load i32, i32* @a, align 4, !dbg !82 + %12 = icmp eq i32 %11, 3, !dbg !82 + %or.cond = select i1 %10, i1 %12, i1 false, !dbg !82 + br i1 %or.cond, label %13, label %17, !dbg !82 + +13: ; preds = %0 + %14 = load atomic i32, i32* @y seq_cst, align 4, !dbg !82 + %15 = icmp eq i32 %14, 3, !dbg !82 + br i1 %15, label %16, label %17, !dbg !85 + +16: ; preds = %13 + call void @__assert_fail(i8* noundef getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0), i32 noundef 48, i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__PRETTY_FUNCTION__.main, i64 0, i64 0)) #6, !dbg !82 + unreachable, !dbg !82 + +17: ; preds = %0, %13 + ret i32 0, !dbg !86 +} + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #4 + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { nounwind } +attributes #6 = { noreturn nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!33, !34, !35, !36, !37, !38, !39} +!llvm.ident = !{!40} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !20, line: 7, type: !21, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !15, globals: !17, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_detour_disable_release.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "6fe69578366da87ce31c64da4fa9b992") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 56, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "/usr/lib/llvm-14/lib/clang/14.0.6/include/stdatomic.h", directory: "", checksumkind: CSK_MD5, checksum: "de5d66a1ef2f5448cc1919ff39db92bc") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_consume", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "memory_order_acq_rel", value: 4) +!14 = !DIEnumerator(name: "memory_order_seq_cst", value: 5) +!15 = !{!16} +!16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!17 = !{!18, !0, !24, !26, !28} +!18 = !DIGlobalVariableExpression(var: !19, expr: !DIExpression()) +!19 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !20, line: 7, type: !21, isLocal: false, isDefinition: true) +!20 = !DIFile(filename: "benchmarks/interrupts/c11_detour_disable_release.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "6fe69578366da87ce31c64da4fa9b992") +!21 = !DIDerivedType(tag: DW_TAG_typedef, name: "atomic_int", file: !6, line: 92, baseType: !22) +!22 = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: !23) +!23 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !20, line: 8, type: !23, isLocal: false, isDefinition: true) +!26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression()) +!27 = distinct !DIGlobalVariable(name: "b", scope: !2, file: !20, line: 8, type: !23, isLocal: false, isDefinition: true) +!28 = !DIGlobalVariableExpression(var: !29, expr: !DIExpression()) +!29 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !20, line: 10, type: !30, isLocal: false, isDefinition: true) +!30 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !31, line: 27, baseType: !32) +!31 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!32 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!33 = !{i32 7, !"Dwarf Version", i32 5} +!34 = !{i32 2, !"Debug Info Version", i32 3} +!35 = !{i32 1, !"wchar_size", i32 4} +!36 = !{i32 7, !"PIC Level", i32 2} +!37 = !{i32 7, !"PIE Level", i32 2} +!38 = !{i32 7, !"uwtable", i32 1} +!39 = !{i32 7, !"frame-pointer", i32 2} +!40 = !{!"Ubuntu clang version 14.0.6"} +!41 = distinct !DISubprogram(name: "handler", scope: !20, file: !20, line: 11, type: !42, scopeLine: 12, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +!42 = !DISubroutineType(types: !43) +!43 = !{!16, !16} +!44 = !{} +!45 = !DILocalVariable(name: "arg", arg: 1, scope: !41, file: !20, line: 11, type: !16) +!46 = !DILocation(line: 0, scope: !41) +!47 = !DILocation(line: 13, column: 5, scope: !41) +!48 = !DILocation(line: 14, column: 5, scope: !41) +!49 = distinct !DISubprogram(name: "thread_1", scope: !20, file: !20, line: 17, type: !42, scopeLine: 18, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +!50 = !DILocalVariable(name: "arg", arg: 1, scope: !49, file: !20, line: 17, type: !16) +!51 = !DILocation(line: 0, scope: !49) +!52 = !DILocation(line: 19, column: 5, scope: !49) +!53 = !DILocation(line: 20, column: 5, scope: !49) +!54 = !DILocation(line: 22, column: 5, scope: !49) +!55 = !DILocation(line: 23, column: 5, scope: !49) +!56 = !DILocation(line: 24, column: 9, scope: !49) +!57 = !DILocation(line: 24, column: 7, scope: !49) +!58 = !DILocation(line: 25, column: 5, scope: !49) +!59 = !DILocation(line: 27, column: 18, scope: !49) +!60 = !DILocation(line: 27, column: 5, scope: !49) +!61 = !DILocation(line: 29, column: 5, scope: !49) +!62 = distinct !DISubprogram(name: "thread_2", scope: !20, file: !20, line: 32, type: !42, scopeLine: 33, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +!63 = !DILocalVariable(name: "arg", arg: 1, scope: !62, file: !20, line: 32, type: !16) +!64 = !DILocation(line: 0, scope: !62) +!65 = !DILocation(line: 34, column: 9, scope: !62) +!66 = !DILocation(line: 34, column: 7, scope: !62) +!67 = !DILocation(line: 35, column: 5, scope: !62) +!68 = !DILocation(line: 36, column: 5, scope: !62) +!69 = distinct !DISubprogram(name: "main", scope: !20, file: !20, line: 39, type: !70, scopeLine: 40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !44) +!70 = !DISubroutineType(types: !71) +!71 = !{!23} +!72 = !DILocalVariable(name: "t1", scope: !69, file: !20, line: 41, type: !30) +!73 = !DILocation(line: 41, column: 15, scope: !69) +!74 = !DILocalVariable(name: "t2", scope: !69, file: !20, line: 41, type: !30) +!75 = !DILocation(line: 41, column: 19, scope: !69) +!76 = !DILocation(line: 43, column: 5, scope: !69) +!77 = !DILocation(line: 44, column: 5, scope: !69) +!78 = !DILocation(line: 45, column: 18, scope: !69) +!79 = !DILocation(line: 45, column: 5, scope: !69) +!80 = !DILocation(line: 46, column: 18, scope: !69) +!81 = !DILocation(line: 46, column: 5, scope: !69) +!82 = !DILocation(line: 48, column: 5, scope: !83) +!83 = distinct !DILexicalBlock(scope: !84, file: !20, line: 48, column: 5) +!84 = distinct !DILexicalBlock(scope: !69, file: !20, line: 48, column: 5) +!85 = !DILocation(line: 48, column: 5, scope: !84) +!86 = !DILocation(line: 50, column: 5, scope: !69) diff --git a/dartagnan/src/test/resources/interrupts/c11_oota-opt.ll b/dartagnan/src/test/resources/interrupts/c11_oota-opt.ll new file mode 100644 index 0000000000..f8c6c0e927 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_oota-opt.ll @@ -0,0 +1,191 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/c11_oota.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_oota.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%union.pthread_attr_t = type { i64, [48 x i8] } + +@z = dso_local global i32 0, align 4, !dbg !0 +@y = dso_local global i32 0, align 4, !dbg !24 +@.str = private unnamed_addr constant [52 x i8] c"atomic_load_explicit(&y, memory_order_relaxed) == 0\00", align 1 +@.str.1 = private unnamed_addr constant [55 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/c11_oota.c\00", align 1 +@__PRETTY_FUNCTION__.handler = private unnamed_addr constant [22 x i8] c"void *handler(void *)\00", align 1 +@h = dso_local global i64 0, align 8, !dbg !26 +@x = dso_local global i32 0, align 4, !dbg !18 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !39 { + call void @llvm.dbg.value(metadata i8* %0, metadata !43, metadata !DIExpression()), !dbg !44 + store atomic i32 3, i32* @z monotonic, align 4, !dbg !45 + %2 = load atomic i32, i32* @y monotonic, align 4, !dbg !46 + %3 = icmp eq i32 %2, 0, !dbg !46 + br i1 %3, label %5, label %4, !dbg !49 + +4: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i32 noundef 13, i8* noundef getelementptr inbounds ([22 x i8], [22 x i8]* @__PRETTY_FUNCTION__.handler, i64 0, i64 0)) #5, !dbg !46 + unreachable, !dbg !46 + +5: ; preds = %1 + ret i8* null, !dbg !50 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @thread_1(i8* noundef %0) #0 !dbg !51 { + call void @llvm.dbg.value(metadata i8* %0, metadata !52, metadata !DIExpression()), !dbg !53 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !54 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #6, !dbg !55 + %4 = load atomic i32, i32* @x monotonic, align 4, !dbg !56 + %5 = icmp eq i32 %4, 1, !dbg !58 + br i1 %5, label %6, label %7, !dbg !59 + +6: ; preds = %1 + store atomic i32 2, i32* @y monotonic, align 4, !dbg !60 + br label %7, !dbg !62 + +7: ; preds = %6, %1 + %8 = load i64, i64* @h, align 8, !dbg !63 + %9 = call i32 @pthread_join(i64 noundef %8, i8** noundef null), !dbg !64 + ret i8* null, !dbg !65 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #3 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #4 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #3 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @thread_2(i8* noundef %0) #0 !dbg !66 { + call void @llvm.dbg.value(metadata i8* %0, metadata !67, metadata !DIExpression()), !dbg !68 + %2 = load atomic i32, i32* @z monotonic, align 4, !dbg !69 + %3 = icmp eq i32 %2, 3, !dbg !71 + br i1 %3, label %4, label %5, !dbg !72 + +4: ; preds = %1 + store atomic i32 1, i32* @x monotonic, align 4, !dbg !73 + br label %5, !dbg !75 + +5: ; preds = %4, %1 + ret i8* null, !dbg !76 +} + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !77 { + %1 = alloca i64, align 8 + %2 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !80, metadata !DIExpression()), !dbg !81 + call void @llvm.dbg.declare(metadata i64* %2, metadata !82, metadata !DIExpression()), !dbg !83 + %3 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_1, i8* noundef null) #6, !dbg !84 + %4 = call i32 @pthread_create(i64* noundef %2, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_2, i8* noundef null) #6, !dbg !85 + ret i32 0, !dbg !86 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { noreturn nounwind } +attributes #6 = { nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!31, !32, !33, !34, !35, !36, !37} +!llvm.ident = !{!38} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "z", scope: !2, file: !20, line: 7, type: !21, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !15, globals: !17, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_oota.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "9e30c560f3cb704ac0d36fae5b978cc5") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 56, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "/usr/lib/llvm-14/lib/clang/14.0.6/include/stdatomic.h", directory: "", checksumkind: CSK_MD5, checksum: "de5d66a1ef2f5448cc1919ff39db92bc") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_consume", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "memory_order_acq_rel", value: 4) +!14 = !DIEnumerator(name: "memory_order_seq_cst", value: 5) +!15 = !{!16} +!16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!17 = !{!18, !24, !0, !26} +!18 = !DIGlobalVariableExpression(var: !19, expr: !DIExpression()) +!19 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !20, line: 7, type: !21, isLocal: false, isDefinition: true) +!20 = !DIFile(filename: "benchmarks/interrupts/c11_oota.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "9e30c560f3cb704ac0d36fae5b978cc5") +!21 = !DIDerivedType(tag: DW_TAG_typedef, name: "atomic_int", file: !6, line: 92, baseType: !22) +!22 = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: !23) +!23 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !20, line: 7, type: !21, isLocal: false, isDefinition: true) +!26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression()) +!27 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !20, line: 9, type: !28, isLocal: false, isDefinition: true) +!28 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !29, line: 27, baseType: !30) +!29 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!30 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!31 = !{i32 7, !"Dwarf Version", i32 5} +!32 = !{i32 2, !"Debug Info Version", i32 3} +!33 = !{i32 1, !"wchar_size", i32 4} +!34 = !{i32 7, !"PIC Level", i32 2} +!35 = !{i32 7, !"PIE Level", i32 2} +!36 = !{i32 7, !"uwtable", i32 1} +!37 = !{i32 7, !"frame-pointer", i32 2} +!38 = !{!"Ubuntu clang version 14.0.6"} +!39 = distinct !DISubprogram(name: "handler", scope: !20, file: !20, line: 10, type: !40, scopeLine: 11, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !42) +!40 = !DISubroutineType(types: !41) +!41 = !{!16, !16} +!42 = !{} +!43 = !DILocalVariable(name: "arg", arg: 1, scope: !39, file: !20, line: 10, type: !16) +!44 = !DILocation(line: 0, scope: !39) +!45 = !DILocation(line: 12, column: 5, scope: !39) +!46 = !DILocation(line: 13, column: 5, scope: !47) +!47 = distinct !DILexicalBlock(scope: !48, file: !20, line: 13, column: 5) +!48 = distinct !DILexicalBlock(scope: !39, file: !20, line: 13, column: 5) +!49 = !DILocation(line: 13, column: 5, scope: !48) +!50 = !DILocation(line: 14, column: 5, scope: !39) +!51 = distinct !DISubprogram(name: "thread_1", scope: !20, file: !20, line: 17, type: !40, scopeLine: 18, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !42) +!52 = !DILocalVariable(name: "arg", arg: 1, scope: !51, file: !20, line: 17, type: !16) +!53 = !DILocation(line: 0, scope: !51) +!54 = !DILocation(line: 19, column: 5, scope: !51) +!55 = !DILocation(line: 20, column: 5, scope: !51) +!56 = !DILocation(line: 22, column: 8, scope: !57) +!57 = distinct !DILexicalBlock(scope: !51, file: !20, line: 22, column: 8) +!58 = !DILocation(line: 22, column: 55, scope: !57) +!59 = !DILocation(line: 22, column: 8, scope: !51) +!60 = !DILocation(line: 23, column: 9, scope: !61) +!61 = distinct !DILexicalBlock(scope: !57, file: !20, line: 22, column: 61) +!62 = !DILocation(line: 24, column: 5, scope: !61) +!63 = !DILocation(line: 26, column: 18, scope: !51) +!64 = !DILocation(line: 26, column: 5, scope: !51) +!65 = !DILocation(line: 28, column: 5, scope: !51) +!66 = distinct !DISubprogram(name: "thread_2", scope: !20, file: !20, line: 31, type: !40, scopeLine: 32, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !42) +!67 = !DILocalVariable(name: "arg", arg: 1, scope: !66, file: !20, line: 31, type: !16) +!68 = !DILocation(line: 0, scope: !66) +!69 = !DILocation(line: 33, column: 8, scope: !70) +!70 = distinct !DILexicalBlock(scope: !66, file: !20, line: 33, column: 8) +!71 = !DILocation(line: 33, column: 55, scope: !70) +!72 = !DILocation(line: 33, column: 8, scope: !66) +!73 = !DILocation(line: 34, column: 9, scope: !74) +!74 = distinct !DILexicalBlock(scope: !70, file: !20, line: 33, column: 61) +!75 = !DILocation(line: 35, column: 5, scope: !74) +!76 = !DILocation(line: 36, column: 5, scope: !66) +!77 = distinct !DISubprogram(name: "main", scope: !20, file: !20, line: 39, type: !78, scopeLine: 40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !42) +!78 = !DISubroutineType(types: !79) +!79 = !{!23} +!80 = !DILocalVariable(name: "t1", scope: !77, file: !20, line: 41, type: !28) +!81 = !DILocation(line: 41, column: 15, scope: !77) +!82 = !DILocalVariable(name: "t2", scope: !77, file: !20, line: 41, type: !28) +!83 = !DILocation(line: 41, column: 19, scope: !77) +!84 = !DILocation(line: 43, column: 5, scope: !77) +!85 = !DILocation(line: 44, column: 5, scope: !77) +!86 = !DILocation(line: 46, column: 5, scope: !77) diff --git a/dartagnan/src/test/resources/interrupts/c11_weak_model-opt.ll b/dartagnan/src/test/resources/interrupts/c11_weak_model-opt.ll new file mode 100644 index 0000000000..3896aa09ba --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_weak_model-opt.ll @@ -0,0 +1,271 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/c11_weak_model.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_weak_model.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%union.pthread_attr_t = type { i64, [48 x i8] } + +@x = dso_local global i32 0, align 4, !dbg !0 +@r1 = dso_local global i32 0, align 4, !dbg !32 +@y = dso_local global i32 0, align 4, !dbg !18 +@r2 = dso_local global i32 0, align 4, !dbg !34 +@h = dso_local global i64 0, align 8, !dbg !44 +@b1 = dso_local global i32 0, align 4, !dbg !28 +@a1 = dso_local global i32 0, align 4, !dbg !24 +@b2 = dso_local global i32 0, align 4, !dbg !30 +@a2 = dso_local global i32 0, align 4, !dbg !26 +@t1 = dso_local global i32 0, align 4, !dbg !36 +@u1 = dso_local global i32 0, align 4, !dbg !38 +@t2 = dso_local global i32 0, align 4, !dbg !40 +@u2 = dso_local global i32 0, align 4, !dbg !42 +@.str = private unnamed_addr constant [29 x i8] c"! reorder_bx || ! reorder_ya\00", align 1 +@.str.1 = private unnamed_addr constant [61 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/c11_weak_model.c\00", align 1 +@__PRETTY_FUNCTION__.main = private unnamed_addr constant [11 x i8] c"int main()\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !57 { + call void @llvm.dbg.value(metadata i8* %0, metadata !61, metadata !DIExpression()), !dbg !62 + %2 = load atomic i32, i32* @x monotonic, align 4, !dbg !63 + store i32 %2, i32* @r1, align 4, !dbg !64 + fence seq_cst, !dbg !65 + %3 = load atomic i32, i32* @y monotonic, align 4, !dbg !66 + store i32 %3, i32* @r2, align 4, !dbg !67 + ret i8* null, !dbg !68 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @thread_1(i8* noundef %0) #0 !dbg !69 { + call void @llvm.dbg.value(metadata i8* %0, metadata !70, metadata !DIExpression()), !dbg !71 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !72 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #5, !dbg !73 + store atomic i32 1, i32* @b1 monotonic, align 4, !dbg !74 + store atomic i32 1, i32* @x monotonic, align 4, !dbg !75 + store atomic i32 1, i32* @a1 monotonic, align 4, !dbg !76 + store atomic i32 1, i32* @b2 monotonic, align 4, !dbg !77 + store atomic i32 1, i32* @y monotonic, align 4, !dbg !78 + store atomic i32 1, i32* @a2 monotonic, align 4, !dbg !79 + %4 = load i64, i64* @h, align 8, !dbg !80 + %5 = call i32 @pthread_join(i64 noundef %4, i8** noundef null), !dbg !81 + ret i8* null, !dbg !82 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #3 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @thread_2(i8* noundef %0) #0 !dbg !83 { + call void @llvm.dbg.value(metadata i8* %0, metadata !84, metadata !DIExpression()), !dbg !85 + %2 = load atomic i32, i32* @a1 monotonic, align 4, !dbg !86 + store i32 %2, i32* @t1, align 4, !dbg !87 + %3 = load atomic i32, i32* @b1 monotonic, align 4, !dbg !88 + store i32 %3, i32* @u1, align 4, !dbg !89 + fence seq_cst, !dbg !90 + %4 = load atomic i32, i32* @a2 monotonic, align 4, !dbg !91 + store i32 %4, i32* @t2, align 4, !dbg !92 + %5 = load atomic i32, i32* @b2 monotonic, align 4, !dbg !93 + store i32 %5, i32* @u2, align 4, !dbg !94 + ret i8* null, !dbg !95 +} + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !96 { + %1 = alloca i64, align 8 + %2 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !99, metadata !DIExpression()), !dbg !100 + call void @llvm.dbg.declare(metadata i64* %2, metadata !101, metadata !DIExpression()), !dbg !102 + %3 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_1, i8* noundef null) #5, !dbg !103 + %4 = call i32 @pthread_create(i64* noundef %2, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_2, i8* noundef null) #5, !dbg !104 + %5 = load i64, i64* %1, align 8, !dbg !105 + %6 = call i32 @pthread_join(i64 noundef %5, i8** noundef null), !dbg !106 + %7 = load i64, i64* %2, align 8, !dbg !107 + %8 = call i32 @pthread_join(i64 noundef %7, i8** noundef null), !dbg !108 + %9 = load i32, i32* @t1, align 4, !dbg !109 + %10 = icmp eq i32 %9, 1, !dbg !110 + %11 = load i32, i32* @t2, align 4, !dbg !111 + %12 = icmp eq i32 %11, 0, !dbg !111 + %13 = select i1 %10, i1 %12, i1 false, !dbg !111 + %14 = zext i1 %13 to i8, !dbg !112 + call void @llvm.dbg.value(metadata i8 %14, metadata !113, metadata !DIExpression()), !dbg !115 + %15 = load i32, i32* @u1, align 4, !dbg !116 + %16 = icmp eq i32 %15, 1, !dbg !117 + %17 = load i32, i32* @u2, align 4, !dbg !118 + %18 = icmp eq i32 %17, 0, !dbg !118 + %19 = select i1 %16, i1 %18, i1 false, !dbg !118 + %20 = zext i1 %19 to i8, !dbg !119 + call void @llvm.dbg.value(metadata i8 %20, metadata !120, metadata !DIExpression()), !dbg !115 + %21 = load i32, i32* @r1, align 4, !dbg !121 + %22 = icmp eq i32 %21, 1, !dbg !123 + %23 = load i32, i32* @r2, align 4 + %24 = icmp eq i32 %23, 0 + %or.cond = select i1 %22, i1 %24, i1 false, !dbg !124 + br i1 %or.cond, label %25, label %27, !dbg !124 + +25: ; preds = %0 + %.not = xor i1 %13, true, !dbg !125 + %.not2 = xor i1 %19, true, !dbg !125 + %brmerge = select i1 %.not, i1 true, i1 %.not2, !dbg !125 + br i1 %brmerge, label %27, label %26, !dbg !125 + +26: ; preds = %25 + call void @__assert_fail(i8* noundef getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0), i32 noundef 59, i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__PRETTY_FUNCTION__.main, i64 0, i64 0)) #6, !dbg !125 + unreachable, !dbg !125 + +27: ; preds = %25, %0 + ret i32 0, !dbg !129 +} + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #4 + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { nounwind } +attributes #6 = { noreturn nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!49, !50, !51, !52, !53, !54, !55} +!llvm.ident = !{!56} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !20, line: 8, type: !21, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !15, globals: !17, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_weak_model.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "b8b3e43c963dda47cddbcde87d0e8611") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 56, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "/usr/lib/llvm-14/lib/clang/14.0.6/include/stdatomic.h", directory: "", checksumkind: CSK_MD5, checksum: "de5d66a1ef2f5448cc1919ff39db92bc") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_consume", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "memory_order_acq_rel", value: 4) +!14 = !DIEnumerator(name: "memory_order_seq_cst", value: 5) +!15 = !{!16} +!16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!17 = !{!0, !18, !24, !26, !28, !30, !32, !34, !36, !38, !40, !42, !44} +!18 = !DIGlobalVariableExpression(var: !19, expr: !DIExpression()) +!19 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !20, line: 8, type: !21, isLocal: false, isDefinition: true) +!20 = !DIFile(filename: "benchmarks/interrupts/c11_weak_model.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "b8b3e43c963dda47cddbcde87d0e8611") +!21 = !DIDerivedType(tag: DW_TAG_typedef, name: "atomic_int", file: !6, line: 92, baseType: !22) +!22 = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: !23) +!23 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "a1", scope: !2, file: !20, line: 8, type: !21, isLocal: false, isDefinition: true) +!26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression()) +!27 = distinct !DIGlobalVariable(name: "a2", scope: !2, file: !20, line: 8, type: !21, isLocal: false, isDefinition: true) +!28 = !DIGlobalVariableExpression(var: !29, expr: !DIExpression()) +!29 = distinct !DIGlobalVariable(name: "b1", scope: !2, file: !20, line: 8, type: !21, isLocal: false, isDefinition: true) +!30 = !DIGlobalVariableExpression(var: !31, expr: !DIExpression()) +!31 = distinct !DIGlobalVariable(name: "b2", scope: !2, file: !20, line: 8, type: !21, isLocal: false, isDefinition: true) +!32 = !DIGlobalVariableExpression(var: !33, expr: !DIExpression()) +!33 = distinct !DIGlobalVariable(name: "r1", scope: !2, file: !20, line: 9, type: !23, isLocal: false, isDefinition: true) +!34 = !DIGlobalVariableExpression(var: !35, expr: !DIExpression()) +!35 = distinct !DIGlobalVariable(name: "r2", scope: !2, file: !20, line: 9, type: !23, isLocal: false, isDefinition: true) +!36 = !DIGlobalVariableExpression(var: !37, expr: !DIExpression()) +!37 = distinct !DIGlobalVariable(name: "t1", scope: !2, file: !20, line: 9, type: !23, isLocal: false, isDefinition: true) +!38 = !DIGlobalVariableExpression(var: !39, expr: !DIExpression()) +!39 = distinct !DIGlobalVariable(name: "u1", scope: !2, file: !20, line: 9, type: !23, isLocal: false, isDefinition: true) +!40 = !DIGlobalVariableExpression(var: !41, expr: !DIExpression()) +!41 = distinct !DIGlobalVariable(name: "t2", scope: !2, file: !20, line: 9, type: !23, isLocal: false, isDefinition: true) +!42 = !DIGlobalVariableExpression(var: !43, expr: !DIExpression()) +!43 = distinct !DIGlobalVariable(name: "u2", scope: !2, file: !20, line: 9, type: !23, isLocal: false, isDefinition: true) +!44 = !DIGlobalVariableExpression(var: !45, expr: !DIExpression()) +!45 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !20, line: 11, type: !46, isLocal: false, isDefinition: true) +!46 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !47, line: 27, baseType: !48) +!47 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!48 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!49 = !{i32 7, !"Dwarf Version", i32 5} +!50 = !{i32 2, !"Debug Info Version", i32 3} +!51 = !{i32 1, !"wchar_size", i32 4} +!52 = !{i32 7, !"PIC Level", i32 2} +!53 = !{i32 7, !"PIE Level", i32 2} +!54 = !{i32 7, !"uwtable", i32 1} +!55 = !{i32 7, !"frame-pointer", i32 2} +!56 = !{!"Ubuntu clang version 14.0.6"} +!57 = distinct !DISubprogram(name: "handler", scope: !20, file: !20, line: 12, type: !58, scopeLine: 13, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !60) +!58 = !DISubroutineType(types: !59) +!59 = !{!16, !16} +!60 = !{} +!61 = !DILocalVariable(name: "arg", arg: 1, scope: !57, file: !20, line: 12, type: !16) +!62 = !DILocation(line: 0, scope: !57) +!63 = !DILocation(line: 14, column: 10, scope: !57) +!64 = !DILocation(line: 14, column: 8, scope: !57) +!65 = !DILocation(line: 15, column: 5, scope: !57) +!66 = !DILocation(line: 16, column: 10, scope: !57) +!67 = !DILocation(line: 16, column: 8, scope: !57) +!68 = !DILocation(line: 17, column: 5, scope: !57) +!69 = distinct !DISubprogram(name: "thread_1", scope: !20, file: !20, line: 20, type: !58, scopeLine: 21, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !60) +!70 = !DILocalVariable(name: "arg", arg: 1, scope: !69, file: !20, line: 20, type: !16) +!71 = !DILocation(line: 0, scope: !69) +!72 = !DILocation(line: 22, column: 5, scope: !69) +!73 = !DILocation(line: 23, column: 5, scope: !69) +!74 = !DILocation(line: 25, column: 5, scope: !69) +!75 = !DILocation(line: 26, column: 5, scope: !69) +!76 = !DILocation(line: 27, column: 5, scope: !69) +!77 = !DILocation(line: 28, column: 5, scope: !69) +!78 = !DILocation(line: 29, column: 5, scope: !69) +!79 = !DILocation(line: 30, column: 5, scope: !69) +!80 = !DILocation(line: 32, column: 18, scope: !69) +!81 = !DILocation(line: 32, column: 5, scope: !69) +!82 = !DILocation(line: 34, column: 5, scope: !69) +!83 = distinct !DISubprogram(name: "thread_2", scope: !20, file: !20, line: 37, type: !58, scopeLine: 38, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !60) +!84 = !DILocalVariable(name: "arg", arg: 1, scope: !83, file: !20, line: 37, type: !16) +!85 = !DILocation(line: 0, scope: !83) +!86 = !DILocation(line: 39, column: 10, scope: !83) +!87 = !DILocation(line: 39, column: 8, scope: !83) +!88 = !DILocation(line: 40, column: 10, scope: !83) +!89 = !DILocation(line: 40, column: 8, scope: !83) +!90 = !DILocation(line: 41, column: 5, scope: !83) +!91 = !DILocation(line: 42, column: 10, scope: !83) +!92 = !DILocation(line: 42, column: 8, scope: !83) +!93 = !DILocation(line: 43, column: 10, scope: !83) +!94 = !DILocation(line: 43, column: 8, scope: !83) +!95 = !DILocation(line: 44, column: 5, scope: !83) +!96 = distinct !DISubprogram(name: "main", scope: !20, file: !20, line: 47, type: !97, scopeLine: 48, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !60) +!97 = !DISubroutineType(types: !98) +!98 = !{!23} +!99 = !DILocalVariable(name: "thread1", scope: !96, file: !20, line: 49, type: !46) +!100 = !DILocation(line: 49, column: 15, scope: !96) +!101 = !DILocalVariable(name: "thread2", scope: !96, file: !20, line: 49, type: !46) +!102 = !DILocation(line: 49, column: 24, scope: !96) +!103 = !DILocation(line: 51, column: 5, scope: !96) +!104 = !DILocation(line: 52, column: 5, scope: !96) +!105 = !DILocation(line: 53, column: 18, scope: !96) +!106 = !DILocation(line: 53, column: 5, scope: !96) +!107 = !DILocation(line: 54, column: 18, scope: !96) +!108 = !DILocation(line: 54, column: 5, scope: !96) +!109 = !DILocation(line: 56, column: 24, scope: !96) +!110 = !DILocation(line: 56, column: 27, scope: !96) +!111 = !DILocation(line: 56, column: 32, scope: !96) +!112 = !DILocation(line: 56, column: 10, scope: !96) +!113 = !DILocalVariable(name: "reorder_bx", scope: !96, file: !20, line: 56, type: !114) +!114 = !DIBasicType(name: "_Bool", size: 8, encoding: DW_ATE_boolean) +!115 = !DILocation(line: 0, scope: !96) +!116 = !DILocation(line: 57, column: 24, scope: !96) +!117 = !DILocation(line: 57, column: 27, scope: !96) +!118 = !DILocation(line: 57, column: 32, scope: !96) +!119 = !DILocation(line: 57, column: 10, scope: !96) +!120 = !DILocalVariable(name: "reorder_ya", scope: !96, file: !20, line: 57, type: !114) +!121 = !DILocation(line: 58, column: 9, scope: !122) +!122 = distinct !DILexicalBlock(scope: !96, file: !20, line: 58, column: 9) +!123 = !DILocation(line: 58, column: 12, scope: !122) +!124 = !DILocation(line: 58, column: 17, scope: !122) +!125 = !DILocation(line: 59, column: 9, scope: !126) +!126 = distinct !DILexicalBlock(scope: !127, file: !20, line: 59, column: 9) +!127 = distinct !DILexicalBlock(scope: !128, file: !20, line: 59, column: 9) +!128 = distinct !DILexicalBlock(scope: !122, file: !20, line: 58, column: 29) +!129 = !DILocation(line: 62, column: 5, scope: !96) diff --git a/dartagnan/src/test/resources/interrupts/c11_with_barrier-opt.ll b/dartagnan/src/test/resources/interrupts/c11_with_barrier-opt.ll new file mode 100644 index 0000000000..dba8b4d357 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_with_barrier-opt.ll @@ -0,0 +1,205 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/c11_with_barrier.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_with_barrier.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%struct.A = type { i32, i32 } +%union.pthread_attr_t = type { i64, [48 x i8] } + +@cnt = dso_local global i32 0, align 4, !dbg !0 +@as = dso_local global [10 x %struct.A] zeroinitializer, align 16, !dbg !10 +@.str = private unnamed_addr constant [19 x i8] c"as[i].a == as[i].b\00", align 1 +@.str.1 = private unnamed_addr constant [63 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/c11_with_barrier.c\00", align 1 +@__PRETTY_FUNCTION__.handler = private unnamed_addr constant [22 x i8] c"void *handler(void *)\00", align 1 +@h = dso_local global i64 0, align 8, !dbg !22 +@__PRETTY_FUNCTION__.run = private unnamed_addr constant [18 x i8] c"void *run(void *)\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !35 { + call void @llvm.dbg.value(metadata i8* %0, metadata !39, metadata !DIExpression()), !dbg !40 + %2 = ptrtoint i8* %0 to i64, !dbg !41 + %3 = trunc i64 %2 to i32, !dbg !42 + call void @llvm.dbg.value(metadata i32 %3, metadata !43, metadata !DIExpression()), !dbg !40 + %4 = load i32, i32* @cnt, align 4, !dbg !44 + %5 = add nsw i32 %4, 1, !dbg !44 + store i32 %5, i32* @cnt, align 4, !dbg !44 + call void @llvm.dbg.value(metadata i32 %4, metadata !45, metadata !DIExpression()), !dbg !40 + %6 = call i32 (...) @__VERIFIER_make_cb(), !dbg !46 + %7 = sext i32 %4 to i64, !dbg !47 + %8 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %7, !dbg !47 + %9 = getelementptr inbounds %struct.A, %struct.A* %8, i32 0, i32 0, !dbg !48 + store volatile i32 %3, i32* %9, align 8, !dbg !49 + %10 = getelementptr inbounds %struct.A, %struct.A* %8, i32 0, i32 1, !dbg !50 + store volatile i32 %3, i32* %10, align 4, !dbg !51 + %11 = load volatile i32, i32* %9, align 8, !dbg !52 + %12 = load volatile i32, i32* %10, align 4, !dbg !52 + %13 = icmp eq i32 %11, %12, !dbg !52 + br i1 %13, label %15, label %14, !dbg !55 + +14: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), i32 noundef 23, i8* noundef getelementptr inbounds ([22 x i8], [22 x i8]* @__PRETTY_FUNCTION__.handler, i64 0, i64 0)) #5, !dbg !52 + unreachable, !dbg !52 + +15: ; preds = %1 + ret i8* null, !dbg !56 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare i32 @__VERIFIER_make_cb(...) #2 + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #3 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @run(i8* noundef %0) #0 !dbg !57 { + call void @llvm.dbg.value(metadata i8* %0, metadata !58, metadata !DIExpression()), !dbg !59 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !60 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #6, !dbg !61 + %4 = ptrtoint i8* %0 to i64, !dbg !62 + %5 = trunc i64 %4 to i32, !dbg !63 + call void @llvm.dbg.value(metadata i32 %5, metadata !64, metadata !DIExpression()), !dbg !59 + %6 = load i32, i32* @cnt, align 4, !dbg !65 + %7 = add nsw i32 %6, 1, !dbg !65 + store i32 %7, i32* @cnt, align 4, !dbg !65 + call void @llvm.dbg.value(metadata i32 %6, metadata !66, metadata !DIExpression()), !dbg !59 + %8 = call i32 (...) @__VERIFIER_make_cb(), !dbg !67 + %9 = sext i32 %6 to i64, !dbg !68 + %10 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %9, !dbg !68 + %11 = getelementptr inbounds %struct.A, %struct.A* %10, i32 0, i32 0, !dbg !69 + store volatile i32 %5, i32* %11, align 8, !dbg !70 + %12 = getelementptr inbounds %struct.A, %struct.A* %10, i32 0, i32 1, !dbg !71 + store volatile i32 %5, i32* %12, align 4, !dbg !72 + %13 = load volatile i32, i32* %11, align 8, !dbg !73 + %14 = load volatile i32, i32* %12, align 4, !dbg !73 + %15 = icmp eq i32 %13, %14, !dbg !73 + br i1 %15, label %17, label %16, !dbg !76 + +16: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0), i32 noundef 38, i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @__PRETTY_FUNCTION__.run, i64 0, i64 0)) #5, !dbg !73 + unreachable, !dbg !73 + +17: ; preds = %1 + %18 = load i64, i64* @h, align 8, !dbg !77 + %19 = call i32 @pthread_join(i64 noundef %18, i8** noundef null), !dbg !78 + ret i8* null, !dbg !79 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #4 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !80 { + %1 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !83, metadata !DIExpression()), !dbg !84 + %2 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)) #6, !dbg !85 + ret i32 0, !dbg !86 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { noreturn nounwind } +attributes #6 = { nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!27, !28, !29, !30, !31, !32, !33} +!llvm.ident = !{!34} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !12, line: 13, type: !18, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !9, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_with_barrier.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "db6c3a0c60da7cb0787851b5a59c8416") +!4 = !{!5, !8} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 87, baseType: !7) +!6 = !DIFile(filename: "/usr/include/stdint.h", directory: "", checksumkind: CSK_MD5, checksum: "24103e292ae21916e87130b926c8d2f8") +!7 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!9 = !{!0, !10, !22} +!10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression()) +!11 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !12, line: 12, type: !13, isLocal: false, isDefinition: true) +!12 = !DIFile(filename: "benchmarks/interrupts/c11_with_barrier.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "db6c3a0c60da7cb0787851b5a59c8416") +!13 = !DICompositeType(tag: DW_TAG_array_type, baseType: !14, size: 640, elements: !20) +!14 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !12, line: 11, size: 64, elements: !15) +!15 = !{!16, !19} +!16 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !14, file: !12, line: 11, baseType: !17, size: 32) +!17 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !18) +!18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!19 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !14, file: !12, line: 11, baseType: !17, size: 32, offset: 32) +!20 = !{!21} +!21 = !DISubrange(count: 10) +!22 = !DIGlobalVariableExpression(var: !23, expr: !DIExpression()) +!23 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !12, line: 15, type: !24, isLocal: false, isDefinition: true) +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !25, line: 27, baseType: !26) +!25 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!26 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!27 = !{i32 7, !"Dwarf Version", i32 5} +!28 = !{i32 2, !"Debug Info Version", i32 3} +!29 = !{i32 1, !"wchar_size", i32 4} +!30 = !{i32 7, !"PIC Level", i32 2} +!31 = !{i32 7, !"PIE Level", i32 2} +!32 = !{i32 7, !"uwtable", i32 1} +!33 = !{i32 7, !"frame-pointer", i32 2} +!34 = !{!"Ubuntu clang version 14.0.6"} +!35 = distinct !DISubprogram(name: "handler", scope: !12, file: !12, line: 16, type: !36, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!36 = !DISubroutineType(types: !37) +!37 = !{!8, !8} +!38 = !{} +!39 = !DILocalVariable(name: "arg", arg: 1, scope: !35, file: !12, line: 16, type: !8) +!40 = !DILocation(line: 0, scope: !35) +!41 = !DILocation(line: 18, column: 19, scope: !35) +!42 = !DILocation(line: 18, column: 18, scope: !35) +!43 = !DILocalVariable(name: "tindex", scope: !35, file: !12, line: 18, type: !18) +!44 = !DILocation(line: 19, column: 16, scope: !35) +!45 = !DILocalVariable(name: "i", scope: !35, file: !12, line: 19, type: !18) +!46 = !DILocation(line: 20, column: 5, scope: !35) +!47 = !DILocation(line: 21, column: 5, scope: !35) +!48 = !DILocation(line: 21, column: 11, scope: !35) +!49 = !DILocation(line: 21, column: 13, scope: !35) +!50 = !DILocation(line: 22, column: 11, scope: !35) +!51 = !DILocation(line: 22, column: 13, scope: !35) +!52 = !DILocation(line: 23, column: 5, scope: !53) +!53 = distinct !DILexicalBlock(scope: !54, file: !12, line: 23, column: 5) +!54 = distinct !DILexicalBlock(scope: !35, file: !12, line: 23, column: 5) +!55 = !DILocation(line: 23, column: 5, scope: !54) +!56 = !DILocation(line: 25, column: 5, scope: !35) +!57 = distinct !DISubprogram(name: "run", scope: !12, file: !12, line: 28, type: !36, scopeLine: 29, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!58 = !DILocalVariable(name: "arg", arg: 1, scope: !57, file: !12, line: 28, type: !8) +!59 = !DILocation(line: 0, scope: !57) +!60 = !DILocation(line: 30, column: 5, scope: !57) +!61 = !DILocation(line: 31, column: 5, scope: !57) +!62 = !DILocation(line: 33, column: 19, scope: !57) +!63 = !DILocation(line: 33, column: 18, scope: !57) +!64 = !DILocalVariable(name: "tindex", scope: !57, file: !12, line: 33, type: !18) +!65 = !DILocation(line: 34, column: 16, scope: !57) +!66 = !DILocalVariable(name: "i", scope: !57, file: !12, line: 34, type: !18) +!67 = !DILocation(line: 35, column: 5, scope: !57) +!68 = !DILocation(line: 36, column: 5, scope: !57) +!69 = !DILocation(line: 36, column: 11, scope: !57) +!70 = !DILocation(line: 36, column: 13, scope: !57) +!71 = !DILocation(line: 37, column: 11, scope: !57) +!72 = !DILocation(line: 37, column: 13, scope: !57) +!73 = !DILocation(line: 38, column: 5, scope: !74) +!74 = distinct !DILexicalBlock(scope: !75, file: !12, line: 38, column: 5) +!75 = distinct !DILexicalBlock(scope: !57, file: !12, line: 38, column: 5) +!76 = !DILocation(line: 38, column: 5, scope: !75) +!77 = !DILocation(line: 40, column: 18, scope: !57) +!78 = !DILocation(line: 40, column: 5, scope: !57) +!79 = !DILocation(line: 42, column: 5, scope: !57) +!80 = distinct !DISubprogram(name: "main", scope: !12, file: !12, line: 45, type: !81, scopeLine: 46, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!81 = !DISubroutineType(types: !82) +!82 = !{!18} +!83 = !DILocalVariable(name: "t", scope: !80, file: !12, line: 47, type: !24) +!84 = !DILocation(line: 47, column: 15, scope: !80) +!85 = !DILocation(line: 48, column: 5, scope: !80) +!86 = !DILocation(line: 50, column: 5, scope: !80) diff --git a/dartagnan/src/test/resources/interrupts/c11_with_barrier_dec-opt.ll b/dartagnan/src/test/resources/interrupts/c11_with_barrier_dec-opt.ll new file mode 100644 index 0000000000..53a8fa04d9 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_with_barrier_dec-opt.ll @@ -0,0 +1,213 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/c11_with_barrier_dec.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_with_barrier_dec.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%struct.A = type { i32, i32 } +%union.pthread_attr_t = type { i64, [48 x i8] } + +@cnt = dso_local global i32 0, align 4, !dbg !0 +@as = dso_local global [10 x %struct.A] zeroinitializer, align 16, !dbg !10 +@.str = private unnamed_addr constant [19 x i8] c"as[i].a == as[i].b\00", align 1 +@.str.1 = private unnamed_addr constant [67 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/c11_with_barrier_dec.c\00", align 1 +@__PRETTY_FUNCTION__.handler = private unnamed_addr constant [22 x i8] c"void *handler(void *)\00", align 1 +@h = dso_local global i64 0, align 8, !dbg !22 +@__PRETTY_FUNCTION__.run = private unnamed_addr constant [18 x i8] c"void *run(void *)\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !35 { + call void @llvm.dbg.value(metadata i8* %0, metadata !39, metadata !DIExpression()), !dbg !40 + %2 = ptrtoint i8* %0 to i64, !dbg !41 + %3 = trunc i64 %2 to i32, !dbg !42 + call void @llvm.dbg.value(metadata i32 %3, metadata !43, metadata !DIExpression()), !dbg !40 + %4 = load i32, i32* @cnt, align 4, !dbg !44 + %5 = add nsw i32 %4, 1, !dbg !44 + store i32 %5, i32* @cnt, align 4, !dbg !44 + call void @llvm.dbg.value(metadata i32 %4, metadata !45, metadata !DIExpression()), !dbg !40 + %6 = call i32 (...) @__VERIFIER_make_cb(), !dbg !46 + %7 = sext i32 %4 to i64, !dbg !47 + %8 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %7, !dbg !47 + %9 = getelementptr inbounds %struct.A, %struct.A* %8, i32 0, i32 0, !dbg !48 + store volatile i32 %3, i32* %9, align 8, !dbg !49 + %10 = getelementptr inbounds %struct.A, %struct.A* %8, i32 0, i32 1, !dbg !50 + store volatile i32 %3, i32* %10, align 4, !dbg !51 + %11 = load volatile i32, i32* %9, align 8, !dbg !52 + %12 = load volatile i32, i32* %10, align 4, !dbg !52 + %13 = icmp eq i32 %11, %12, !dbg !52 + br i1 %13, label %15, label %14, !dbg !55 + +14: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([67 x i8], [67 x i8]* @.str.1, i64 0, i64 0), i32 noundef 23, i8* noundef getelementptr inbounds ([22 x i8], [22 x i8]* @__PRETTY_FUNCTION__.handler, i64 0, i64 0)) #5, !dbg !52 + unreachable, !dbg !52 + +15: ; preds = %1 + %16 = load i32, i32* @cnt, align 4, !dbg !56 + %17 = add nsw i32 %16, -1, !dbg !56 + store i32 %17, i32* @cnt, align 4, !dbg !56 + ret i8* null, !dbg !57 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare i32 @__VERIFIER_make_cb(...) #2 + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #3 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @run(i8* noundef %0) #0 !dbg !58 { + call void @llvm.dbg.value(metadata i8* %0, metadata !59, metadata !DIExpression()), !dbg !60 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !61 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #6, !dbg !62 + %4 = ptrtoint i8* %0 to i64, !dbg !63 + %5 = trunc i64 %4 to i32, !dbg !64 + call void @llvm.dbg.value(metadata i32 %5, metadata !65, metadata !DIExpression()), !dbg !60 + %6 = load i32, i32* @cnt, align 4, !dbg !66 + %7 = add nsw i32 %6, 1, !dbg !66 + store i32 %7, i32* @cnt, align 4, !dbg !66 + call void @llvm.dbg.value(metadata i32 %6, metadata !67, metadata !DIExpression()), !dbg !60 + %8 = call i32 (...) @__VERIFIER_make_cb(), !dbg !68 + %9 = sext i32 %6 to i64, !dbg !69 + %10 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %9, !dbg !69 + %11 = getelementptr inbounds %struct.A, %struct.A* %10, i32 0, i32 0, !dbg !70 + store volatile i32 %5, i32* %11, align 8, !dbg !71 + %12 = getelementptr inbounds %struct.A, %struct.A* %10, i32 0, i32 1, !dbg !72 + store volatile i32 %5, i32* %12, align 4, !dbg !73 + %13 = load volatile i32, i32* %11, align 8, !dbg !74 + %14 = load volatile i32, i32* %12, align 4, !dbg !74 + %15 = icmp eq i32 %13, %14, !dbg !74 + br i1 %15, label %17, label %16, !dbg !77 + +16: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([67 x i8], [67 x i8]* @.str.1, i64 0, i64 0), i32 noundef 40, i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @__PRETTY_FUNCTION__.run, i64 0, i64 0)) #5, !dbg !74 + unreachable, !dbg !74 + +17: ; preds = %1 + %18 = load i32, i32* @cnt, align 4, !dbg !78 + %19 = add nsw i32 %18, -1, !dbg !78 + store i32 %19, i32* @cnt, align 4, !dbg !78 + %20 = load i64, i64* @h, align 8, !dbg !79 + %21 = call i32 @pthread_join(i64 noundef %20, i8** noundef null), !dbg !80 + ret i8* null, !dbg !81 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #4 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !82 { + %1 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !85, metadata !DIExpression()), !dbg !86 + %2 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)) #6, !dbg !87 + ret i32 0, !dbg !88 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { noreturn nounwind } +attributes #6 = { nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!27, !28, !29, !30, !31, !32, !33} +!llvm.ident = !{!34} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !12, line: 13, type: !18, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !9, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_with_barrier_dec.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "01cdab0c15fef088117a503b28e07171") +!4 = !{!5, !8} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 87, baseType: !7) +!6 = !DIFile(filename: "/usr/include/stdint.h", directory: "", checksumkind: CSK_MD5, checksum: "24103e292ae21916e87130b926c8d2f8") +!7 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!9 = !{!0, !10, !22} +!10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression()) +!11 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !12, line: 12, type: !13, isLocal: false, isDefinition: true) +!12 = !DIFile(filename: "benchmarks/interrupts/c11_with_barrier_dec.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "01cdab0c15fef088117a503b28e07171") +!13 = !DICompositeType(tag: DW_TAG_array_type, baseType: !14, size: 640, elements: !20) +!14 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !12, line: 11, size: 64, elements: !15) +!15 = !{!16, !19} +!16 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !14, file: !12, line: 11, baseType: !17, size: 32) +!17 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !18) +!18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!19 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !14, file: !12, line: 11, baseType: !17, size: 32, offset: 32) +!20 = !{!21} +!21 = !DISubrange(count: 10) +!22 = !DIGlobalVariableExpression(var: !23, expr: !DIExpression()) +!23 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !12, line: 15, type: !24, isLocal: false, isDefinition: true) +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !25, line: 27, baseType: !26) +!25 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!26 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!27 = !{i32 7, !"Dwarf Version", i32 5} +!28 = !{i32 2, !"Debug Info Version", i32 3} +!29 = !{i32 1, !"wchar_size", i32 4} +!30 = !{i32 7, !"PIC Level", i32 2} +!31 = !{i32 7, !"PIE Level", i32 2} +!32 = !{i32 7, !"uwtable", i32 1} +!33 = !{i32 7, !"frame-pointer", i32 2} +!34 = !{!"Ubuntu clang version 14.0.6"} +!35 = distinct !DISubprogram(name: "handler", scope: !12, file: !12, line: 16, type: !36, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!36 = !DISubroutineType(types: !37) +!37 = !{!8, !8} +!38 = !{} +!39 = !DILocalVariable(name: "arg", arg: 1, scope: !35, file: !12, line: 16, type: !8) +!40 = !DILocation(line: 0, scope: !35) +!41 = !DILocation(line: 18, column: 19, scope: !35) +!42 = !DILocation(line: 18, column: 18, scope: !35) +!43 = !DILocalVariable(name: "tindex", scope: !35, file: !12, line: 18, type: !18) +!44 = !DILocation(line: 19, column: 16, scope: !35) +!45 = !DILocalVariable(name: "i", scope: !35, file: !12, line: 19, type: !18) +!46 = !DILocation(line: 20, column: 5, scope: !35) +!47 = !DILocation(line: 21, column: 5, scope: !35) +!48 = !DILocation(line: 21, column: 11, scope: !35) +!49 = !DILocation(line: 21, column: 13, scope: !35) +!50 = !DILocation(line: 22, column: 11, scope: !35) +!51 = !DILocation(line: 22, column: 13, scope: !35) +!52 = !DILocation(line: 23, column: 5, scope: !53) +!53 = distinct !DILexicalBlock(scope: !54, file: !12, line: 23, column: 5) +!54 = distinct !DILexicalBlock(scope: !35, file: !12, line: 23, column: 5) +!55 = !DILocation(line: 23, column: 5, scope: !54) +!56 = !DILocation(line: 25, column: 8, scope: !35) +!57 = !DILocation(line: 27, column: 5, scope: !35) +!58 = distinct !DISubprogram(name: "run", scope: !12, file: !12, line: 30, type: !36, scopeLine: 31, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!59 = !DILocalVariable(name: "arg", arg: 1, scope: !58, file: !12, line: 30, type: !8) +!60 = !DILocation(line: 0, scope: !58) +!61 = !DILocation(line: 32, column: 5, scope: !58) +!62 = !DILocation(line: 33, column: 5, scope: !58) +!63 = !DILocation(line: 35, column: 19, scope: !58) +!64 = !DILocation(line: 35, column: 18, scope: !58) +!65 = !DILocalVariable(name: "tindex", scope: !58, file: !12, line: 35, type: !18) +!66 = !DILocation(line: 36, column: 16, scope: !58) +!67 = !DILocalVariable(name: "i", scope: !58, file: !12, line: 36, type: !18) +!68 = !DILocation(line: 37, column: 5, scope: !58) +!69 = !DILocation(line: 38, column: 5, scope: !58) +!70 = !DILocation(line: 38, column: 11, scope: !58) +!71 = !DILocation(line: 38, column: 13, scope: !58) +!72 = !DILocation(line: 39, column: 11, scope: !58) +!73 = !DILocation(line: 39, column: 13, scope: !58) +!74 = !DILocation(line: 40, column: 5, scope: !75) +!75 = distinct !DILexicalBlock(scope: !76, file: !12, line: 40, column: 5) +!76 = distinct !DILexicalBlock(scope: !58, file: !12, line: 40, column: 5) +!77 = !DILocation(line: 40, column: 5, scope: !76) +!78 = !DILocation(line: 42, column: 8, scope: !58) +!79 = !DILocation(line: 44, column: 18, scope: !58) +!80 = !DILocation(line: 44, column: 5, scope: !58) +!81 = !DILocation(line: 46, column: 5, scope: !58) +!82 = distinct !DISubprogram(name: "main", scope: !12, file: !12, line: 49, type: !83, scopeLine: 50, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!83 = !DISubroutineType(types: !84) +!84 = !{!18} +!85 = !DILocalVariable(name: "t", scope: !82, file: !12, line: 51, type: !24) +!86 = !DILocation(line: 51, column: 15, scope: !82) +!87 = !DILocation(line: 52, column: 5, scope: !82) +!88 = !DILocation(line: 54, column: 5, scope: !82) diff --git a/dartagnan/src/test/resources/interrupts/c11_with_barrier_dec_barrier-opt.ll b/dartagnan/src/test/resources/interrupts/c11_with_barrier_dec_barrier-opt.ll new file mode 100644 index 0000000000..c1214b7ec7 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_with_barrier_dec_barrier-opt.ll @@ -0,0 +1,217 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/c11_with_barrier_dec_barrier.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_with_barrier_dec_barrier.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%struct.A = type { i32, i32 } +%union.pthread_attr_t = type { i64, [48 x i8] } + +@cnt = dso_local global i32 0, align 4, !dbg !0 +@as = dso_local global [10 x %struct.A] zeroinitializer, align 16, !dbg !10 +@.str = private unnamed_addr constant [19 x i8] c"as[i].a == as[i].b\00", align 1 +@.str.1 = private unnamed_addr constant [75 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/c11_with_barrier_dec_barrier.c\00", align 1 +@__PRETTY_FUNCTION__.handler = private unnamed_addr constant [22 x i8] c"void *handler(void *)\00", align 1 +@h = dso_local global i64 0, align 8, !dbg !22 +@__PRETTY_FUNCTION__.run = private unnamed_addr constant [18 x i8] c"void *run(void *)\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !35 { + call void @llvm.dbg.value(metadata i8* %0, metadata !39, metadata !DIExpression()), !dbg !40 + %2 = ptrtoint i8* %0 to i64, !dbg !41 + %3 = trunc i64 %2 to i32, !dbg !42 + call void @llvm.dbg.value(metadata i32 %3, metadata !43, metadata !DIExpression()), !dbg !40 + %4 = load i32, i32* @cnt, align 4, !dbg !44 + %5 = add nsw i32 %4, 1, !dbg !44 + store i32 %5, i32* @cnt, align 4, !dbg !44 + call void @llvm.dbg.value(metadata i32 %4, metadata !45, metadata !DIExpression()), !dbg !40 + %6 = call i32 (...) @__VERIFIER_make_cb(), !dbg !46 + %7 = sext i32 %4 to i64, !dbg !47 + %8 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %7, !dbg !47 + %9 = getelementptr inbounds %struct.A, %struct.A* %8, i32 0, i32 0, !dbg !48 + store volatile i32 %3, i32* %9, align 8, !dbg !49 + %10 = getelementptr inbounds %struct.A, %struct.A* %8, i32 0, i32 1, !dbg !50 + store volatile i32 %3, i32* %10, align 4, !dbg !51 + %11 = load volatile i32, i32* %9, align 8, !dbg !52 + %12 = load volatile i32, i32* %10, align 4, !dbg !52 + %13 = icmp eq i32 %11, %12, !dbg !52 + br i1 %13, label %15, label %14, !dbg !55 + +14: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0), i32 noundef 23, i8* noundef getelementptr inbounds ([22 x i8], [22 x i8]* @__PRETTY_FUNCTION__.handler, i64 0, i64 0)) #5, !dbg !52 + unreachable, !dbg !52 + +15: ; preds = %1 + %16 = call i32 (...) @__VERIFIER_make_cb(), !dbg !56 + %17 = load i32, i32* @cnt, align 4, !dbg !57 + %18 = add nsw i32 %17, -1, !dbg !57 + store i32 %18, i32* @cnt, align 4, !dbg !57 + ret i8* null, !dbg !58 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare i32 @__VERIFIER_make_cb(...) #2 + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #3 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @run(i8* noundef %0) #0 !dbg !59 { + call void @llvm.dbg.value(metadata i8* %0, metadata !60, metadata !DIExpression()), !dbg !61 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !62 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #6, !dbg !63 + %4 = ptrtoint i8* %0 to i64, !dbg !64 + %5 = trunc i64 %4 to i32, !dbg !65 + call void @llvm.dbg.value(metadata i32 %5, metadata !66, metadata !DIExpression()), !dbg !61 + %6 = load i32, i32* @cnt, align 4, !dbg !67 + %7 = add nsw i32 %6, 1, !dbg !67 + store i32 %7, i32* @cnt, align 4, !dbg !67 + call void @llvm.dbg.value(metadata i32 %6, metadata !68, metadata !DIExpression()), !dbg !61 + %8 = call i32 (...) @__VERIFIER_make_cb(), !dbg !69 + %9 = sext i32 %6 to i64, !dbg !70 + %10 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %9, !dbg !70 + %11 = getelementptr inbounds %struct.A, %struct.A* %10, i32 0, i32 0, !dbg !71 + store volatile i32 %5, i32* %11, align 8, !dbg !72 + %12 = getelementptr inbounds %struct.A, %struct.A* %10, i32 0, i32 1, !dbg !73 + store volatile i32 %5, i32* %12, align 4, !dbg !74 + %13 = load volatile i32, i32* %11, align 8, !dbg !75 + %14 = load volatile i32, i32* %12, align 4, !dbg !75 + %15 = icmp eq i32 %13, %14, !dbg !75 + br i1 %15, label %17, label %16, !dbg !78 + +16: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0), i32 noundef 41, i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @__PRETTY_FUNCTION__.run, i64 0, i64 0)) #5, !dbg !75 + unreachable, !dbg !75 + +17: ; preds = %1 + %18 = call i32 (...) @__VERIFIER_make_cb(), !dbg !79 + %19 = load i32, i32* @cnt, align 4, !dbg !80 + %20 = add nsw i32 %19, -1, !dbg !80 + store i32 %20, i32* @cnt, align 4, !dbg !80 + %21 = load i64, i64* @h, align 8, !dbg !81 + %22 = call i32 @pthread_join(i64 noundef %21, i8** noundef null), !dbg !82 + ret i8* null, !dbg !83 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #4 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !84 { + %1 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !87, metadata !DIExpression()), !dbg !88 + %2 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)) #6, !dbg !89 + ret i32 0, !dbg !90 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { noreturn nounwind } +attributes #6 = { nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!27, !28, !29, !30, !31, !32, !33} +!llvm.ident = !{!34} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !12, line: 13, type: !18, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !9, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_with_barrier_dec_barrier.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "a2014d668aaa00b05294ce9d614a1cd0") +!4 = !{!5, !8} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 87, baseType: !7) +!6 = !DIFile(filename: "/usr/include/stdint.h", directory: "", checksumkind: CSK_MD5, checksum: "24103e292ae21916e87130b926c8d2f8") +!7 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!9 = !{!0, !10, !22} +!10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression()) +!11 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !12, line: 12, type: !13, isLocal: false, isDefinition: true) +!12 = !DIFile(filename: "benchmarks/interrupts/c11_with_barrier_dec_barrier.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "a2014d668aaa00b05294ce9d614a1cd0") +!13 = !DICompositeType(tag: DW_TAG_array_type, baseType: !14, size: 640, elements: !20) +!14 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !12, line: 11, size: 64, elements: !15) +!15 = !{!16, !19} +!16 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !14, file: !12, line: 11, baseType: !17, size: 32) +!17 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !18) +!18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!19 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !14, file: !12, line: 11, baseType: !17, size: 32, offset: 32) +!20 = !{!21} +!21 = !DISubrange(count: 10) +!22 = !DIGlobalVariableExpression(var: !23, expr: !DIExpression()) +!23 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !12, line: 15, type: !24, isLocal: false, isDefinition: true) +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !25, line: 27, baseType: !26) +!25 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!26 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!27 = !{i32 7, !"Dwarf Version", i32 5} +!28 = !{i32 2, !"Debug Info Version", i32 3} +!29 = !{i32 1, !"wchar_size", i32 4} +!30 = !{i32 7, !"PIC Level", i32 2} +!31 = !{i32 7, !"PIE Level", i32 2} +!32 = !{i32 7, !"uwtable", i32 1} +!33 = !{i32 7, !"frame-pointer", i32 2} +!34 = !{!"Ubuntu clang version 14.0.6"} +!35 = distinct !DISubprogram(name: "handler", scope: !12, file: !12, line: 16, type: !36, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!36 = !DISubroutineType(types: !37) +!37 = !{!8, !8} +!38 = !{} +!39 = !DILocalVariable(name: "arg", arg: 1, scope: !35, file: !12, line: 16, type: !8) +!40 = !DILocation(line: 0, scope: !35) +!41 = !DILocation(line: 18, column: 19, scope: !35) +!42 = !DILocation(line: 18, column: 18, scope: !35) +!43 = !DILocalVariable(name: "tindex", scope: !35, file: !12, line: 18, type: !18) +!44 = !DILocation(line: 19, column: 16, scope: !35) +!45 = !DILocalVariable(name: "i", scope: !35, file: !12, line: 19, type: !18) +!46 = !DILocation(line: 20, column: 5, scope: !35) +!47 = !DILocation(line: 21, column: 5, scope: !35) +!48 = !DILocation(line: 21, column: 11, scope: !35) +!49 = !DILocation(line: 21, column: 13, scope: !35) +!50 = !DILocation(line: 22, column: 11, scope: !35) +!51 = !DILocation(line: 22, column: 13, scope: !35) +!52 = !DILocation(line: 23, column: 5, scope: !53) +!53 = distinct !DILexicalBlock(scope: !54, file: !12, line: 23, column: 5) +!54 = distinct !DILexicalBlock(scope: !35, file: !12, line: 23, column: 5) +!55 = !DILocation(line: 23, column: 5, scope: !54) +!56 = !DILocation(line: 25, column: 5, scope: !35) +!57 = !DILocation(line: 26, column: 8, scope: !35) +!58 = !DILocation(line: 28, column: 5, scope: !35) +!59 = distinct !DISubprogram(name: "run", scope: !12, file: !12, line: 31, type: !36, scopeLine: 32, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!60 = !DILocalVariable(name: "arg", arg: 1, scope: !59, file: !12, line: 31, type: !8) +!61 = !DILocation(line: 0, scope: !59) +!62 = !DILocation(line: 33, column: 5, scope: !59) +!63 = !DILocation(line: 34, column: 5, scope: !59) +!64 = !DILocation(line: 36, column: 19, scope: !59) +!65 = !DILocation(line: 36, column: 18, scope: !59) +!66 = !DILocalVariable(name: "tindex", scope: !59, file: !12, line: 36, type: !18) +!67 = !DILocation(line: 37, column: 16, scope: !59) +!68 = !DILocalVariable(name: "i", scope: !59, file: !12, line: 37, type: !18) +!69 = !DILocation(line: 38, column: 5, scope: !59) +!70 = !DILocation(line: 39, column: 5, scope: !59) +!71 = !DILocation(line: 39, column: 11, scope: !59) +!72 = !DILocation(line: 39, column: 13, scope: !59) +!73 = !DILocation(line: 40, column: 11, scope: !59) +!74 = !DILocation(line: 40, column: 13, scope: !59) +!75 = !DILocation(line: 41, column: 5, scope: !76) +!76 = distinct !DILexicalBlock(scope: !77, file: !12, line: 41, column: 5) +!77 = distinct !DILexicalBlock(scope: !59, file: !12, line: 41, column: 5) +!78 = !DILocation(line: 41, column: 5, scope: !77) +!79 = !DILocation(line: 43, column: 5, scope: !59) +!80 = !DILocation(line: 44, column: 8, scope: !59) +!81 = !DILocation(line: 46, column: 18, scope: !59) +!82 = !DILocation(line: 46, column: 5, scope: !59) +!83 = !DILocation(line: 48, column: 5, scope: !59) +!84 = distinct !DISubprogram(name: "main", scope: !12, file: !12, line: 51, type: !85, scopeLine: 52, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!85 = !DISubroutineType(types: !86) +!86 = !{!18} +!87 = !DILocalVariable(name: "t", scope: !84, file: !12, line: 53, type: !24) +!88 = !DILocation(line: 53, column: 15, scope: !84) +!89 = !DILocation(line: 54, column: 5, scope: !84) +!90 = !DILocation(line: 56, column: 5, scope: !84) diff --git a/dartagnan/src/test/resources/interrupts/c11_with_barrier_inc_split-opt.ll b/dartagnan/src/test/resources/interrupts/c11_with_barrier_inc_split-opt.ll new file mode 100644 index 0000000000..7d65bc4f0a --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_with_barrier_inc_split-opt.ll @@ -0,0 +1,207 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/c11_with_barrier_inc_split.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_with_barrier_inc_split.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%struct.A = type { i32, i32 } +%union.pthread_attr_t = type { i64, [48 x i8] } + +@cnt = dso_local global i32 0, align 4, !dbg !0 +@as = dso_local global [10 x %struct.A] zeroinitializer, align 16, !dbg !10 +@.str = private unnamed_addr constant [19 x i8] c"as[i].a == as[i].b\00", align 1 +@.str.1 = private unnamed_addr constant [73 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/c11_with_barrier_inc_split.c\00", align 1 +@__PRETTY_FUNCTION__.handler = private unnamed_addr constant [22 x i8] c"void *handler(void *)\00", align 1 +@h = dso_local global i64 0, align 8, !dbg !22 +@__PRETTY_FUNCTION__.run = private unnamed_addr constant [18 x i8] c"void *run(void *)\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !35 { + call void @llvm.dbg.value(metadata i8* %0, metadata !39, metadata !DIExpression()), !dbg !40 + %2 = ptrtoint i8* %0 to i64, !dbg !41 + %3 = trunc i64 %2 to i32, !dbg !42 + call void @llvm.dbg.value(metadata i32 %3, metadata !43, metadata !DIExpression()), !dbg !40 + %4 = load i32, i32* @cnt, align 4, !dbg !44 + %5 = add nsw i32 %4, 1, !dbg !44 + store i32 %5, i32* @cnt, align 4, !dbg !44 + call void @llvm.dbg.value(metadata i32 %4, metadata !45, metadata !DIExpression()), !dbg !40 + %6 = call i32 (...) @__VERIFIER_make_cb(), !dbg !46 + %7 = sext i32 %4 to i64, !dbg !47 + %8 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %7, !dbg !47 + %9 = getelementptr inbounds %struct.A, %struct.A* %8, i32 0, i32 0, !dbg !48 + store volatile i32 %3, i32* %9, align 8, !dbg !49 + %10 = getelementptr inbounds %struct.A, %struct.A* %8, i32 0, i32 1, !dbg !50 + store volatile i32 %3, i32* %10, align 4, !dbg !51 + %11 = load volatile i32, i32* %9, align 8, !dbg !52 + %12 = load volatile i32, i32* %10, align 4, !dbg !52 + %13 = icmp eq i32 %11, %12, !dbg !52 + br i1 %13, label %15, label %14, !dbg !55 + +14: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0), i32 noundef 23, i8* noundef getelementptr inbounds ([22 x i8], [22 x i8]* @__PRETTY_FUNCTION__.handler, i64 0, i64 0)) #5, !dbg !52 + unreachable, !dbg !52 + +15: ; preds = %1 + ret i8* null, !dbg !56 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare i32 @__VERIFIER_make_cb(...) #2 + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #3 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @run(i8* noundef %0) #0 !dbg !57 { + call void @llvm.dbg.value(metadata i8* %0, metadata !58, metadata !DIExpression()), !dbg !59 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !60 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #6, !dbg !61 + %4 = ptrtoint i8* %0 to i64, !dbg !62 + %5 = trunc i64 %4 to i32, !dbg !63 + call void @llvm.dbg.value(metadata i32 %5, metadata !64, metadata !DIExpression()), !dbg !59 + %6 = load i32, i32* @cnt, align 4, !dbg !65 + call void @llvm.dbg.value(metadata i32 %6, metadata !66, metadata !DIExpression()), !dbg !59 + %7 = call i32 (...) @__VERIFIER_make_cb(), !dbg !67 + %8 = add nsw i32 %6, 1, !dbg !68 + store i32 %8, i32* @cnt, align 4, !dbg !69 + %9 = sext i32 %6 to i64, !dbg !70 + %10 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %9, !dbg !70 + %11 = getelementptr inbounds %struct.A, %struct.A* %10, i32 0, i32 0, !dbg !71 + store volatile i32 %5, i32* %11, align 8, !dbg !72 + %12 = getelementptr inbounds %struct.A, %struct.A* %10, i32 0, i32 1, !dbg !73 + store volatile i32 %5, i32* %12, align 4, !dbg !74 + %13 = load volatile i32, i32* %11, align 8, !dbg !75 + %14 = load volatile i32, i32* %12, align 4, !dbg !75 + %15 = icmp eq i32 %13, %14, !dbg !75 + br i1 %15, label %17, label %16, !dbg !78 + +16: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0), i32 noundef 39, i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @__PRETTY_FUNCTION__.run, i64 0, i64 0)) #5, !dbg !75 + unreachable, !dbg !75 + +17: ; preds = %1 + %18 = load i64, i64* @h, align 8, !dbg !79 + %19 = call i32 @pthread_join(i64 noundef %18, i8** noundef null), !dbg !80 + ret i8* null, !dbg !81 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #4 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !82 { + %1 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !85, metadata !DIExpression()), !dbg !86 + %2 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)) #6, !dbg !87 + ret i32 0, !dbg !88 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { noreturn nounwind } +attributes #6 = { nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!27, !28, !29, !30, !31, !32, !33} +!llvm.ident = !{!34} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !12, line: 13, type: !18, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !9, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_with_barrier_inc_split.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "cd42dd3257e122d169d4d74a0a4634ab") +!4 = !{!5, !8} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 87, baseType: !7) +!6 = !DIFile(filename: "/usr/include/stdint.h", directory: "", checksumkind: CSK_MD5, checksum: "24103e292ae21916e87130b926c8d2f8") +!7 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!9 = !{!0, !10, !22} +!10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression()) +!11 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !12, line: 12, type: !13, isLocal: false, isDefinition: true) +!12 = !DIFile(filename: "benchmarks/interrupts/c11_with_barrier_inc_split.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "cd42dd3257e122d169d4d74a0a4634ab") +!13 = !DICompositeType(tag: DW_TAG_array_type, baseType: !14, size: 640, elements: !20) +!14 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !12, line: 11, size: 64, elements: !15) +!15 = !{!16, !19} +!16 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !14, file: !12, line: 11, baseType: !17, size: 32) +!17 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !18) +!18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!19 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !14, file: !12, line: 11, baseType: !17, size: 32, offset: 32) +!20 = !{!21} +!21 = !DISubrange(count: 10) +!22 = !DIGlobalVariableExpression(var: !23, expr: !DIExpression()) +!23 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !12, line: 15, type: !24, isLocal: false, isDefinition: true) +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !25, line: 27, baseType: !26) +!25 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!26 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!27 = !{i32 7, !"Dwarf Version", i32 5} +!28 = !{i32 2, !"Debug Info Version", i32 3} +!29 = !{i32 1, !"wchar_size", i32 4} +!30 = !{i32 7, !"PIC Level", i32 2} +!31 = !{i32 7, !"PIE Level", i32 2} +!32 = !{i32 7, !"uwtable", i32 1} +!33 = !{i32 7, !"frame-pointer", i32 2} +!34 = !{!"Ubuntu clang version 14.0.6"} +!35 = distinct !DISubprogram(name: "handler", scope: !12, file: !12, line: 16, type: !36, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!36 = !DISubroutineType(types: !37) +!37 = !{!8, !8} +!38 = !{} +!39 = !DILocalVariable(name: "arg", arg: 1, scope: !35, file: !12, line: 16, type: !8) +!40 = !DILocation(line: 0, scope: !35) +!41 = !DILocation(line: 18, column: 19, scope: !35) +!42 = !DILocation(line: 18, column: 18, scope: !35) +!43 = !DILocalVariable(name: "tindex", scope: !35, file: !12, line: 18, type: !18) +!44 = !DILocation(line: 19, column: 16, scope: !35) +!45 = !DILocalVariable(name: "i", scope: !35, file: !12, line: 19, type: !18) +!46 = !DILocation(line: 20, column: 5, scope: !35) +!47 = !DILocation(line: 21, column: 5, scope: !35) +!48 = !DILocation(line: 21, column: 11, scope: !35) +!49 = !DILocation(line: 21, column: 13, scope: !35) +!50 = !DILocation(line: 22, column: 11, scope: !35) +!51 = !DILocation(line: 22, column: 13, scope: !35) +!52 = !DILocation(line: 23, column: 5, scope: !53) +!53 = distinct !DILexicalBlock(scope: !54, file: !12, line: 23, column: 5) +!54 = distinct !DILexicalBlock(scope: !35, file: !12, line: 23, column: 5) +!55 = !DILocation(line: 23, column: 5, scope: !54) +!56 = !DILocation(line: 25, column: 5, scope: !35) +!57 = distinct !DISubprogram(name: "run", scope: !12, file: !12, line: 28, type: !36, scopeLine: 29, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!58 = !DILocalVariable(name: "arg", arg: 1, scope: !57, file: !12, line: 28, type: !8) +!59 = !DILocation(line: 0, scope: !57) +!60 = !DILocation(line: 30, column: 5, scope: !57) +!61 = !DILocation(line: 31, column: 5, scope: !57) +!62 = !DILocation(line: 33, column: 19, scope: !57) +!63 = !DILocation(line: 33, column: 18, scope: !57) +!64 = !DILocalVariable(name: "tindex", scope: !57, file: !12, line: 33, type: !18) +!65 = !DILocation(line: 34, column: 13, scope: !57) +!66 = !DILocalVariable(name: "i", scope: !57, file: !12, line: 34, type: !18) +!67 = !DILocation(line: 35, column: 5, scope: !57) +!68 = !DILocation(line: 36, column: 12, scope: !57) +!69 = !DILocation(line: 36, column: 9, scope: !57) +!70 = !DILocation(line: 37, column: 5, scope: !57) +!71 = !DILocation(line: 37, column: 11, scope: !57) +!72 = !DILocation(line: 37, column: 13, scope: !57) +!73 = !DILocation(line: 38, column: 11, scope: !57) +!74 = !DILocation(line: 38, column: 13, scope: !57) +!75 = !DILocation(line: 39, column: 5, scope: !76) +!76 = distinct !DILexicalBlock(scope: !77, file: !12, line: 39, column: 5) +!77 = distinct !DILexicalBlock(scope: !57, file: !12, line: 39, column: 5) +!78 = !DILocation(line: 39, column: 5, scope: !77) +!79 = !DILocation(line: 41, column: 18, scope: !57) +!80 = !DILocation(line: 41, column: 5, scope: !57) +!81 = !DILocation(line: 43, column: 5, scope: !57) +!82 = distinct !DISubprogram(name: "main", scope: !12, file: !12, line: 46, type: !83, scopeLine: 47, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!83 = !DISubroutineType(types: !84) +!84 = !{!18} +!85 = !DILocalVariable(name: "t", scope: !82, file: !12, line: 48, type: !24) +!86 = !DILocation(line: 48, column: 15, scope: !82) +!87 = !DILocation(line: 49, column: 5, scope: !82) +!88 = !DILocation(line: 51, column: 5, scope: !82) diff --git a/dartagnan/src/test/resources/interrupts/c11_with_disable_enable_as_barrier-opt.ll b/dartagnan/src/test/resources/interrupts/c11_with_disable_enable_as_barrier-opt.ll new file mode 100644 index 0000000000..2cad97b538 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_with_disable_enable_as_barrier-opt.ll @@ -0,0 +1,211 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/c11_with_disable_enable_as_barrier.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_with_disable_enable_as_barrier.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%struct.A = type { i32, i32 } +%union.pthread_attr_t = type { i64, [48 x i8] } + +@cnt = dso_local global i32 0, align 4, !dbg !0 +@as = dso_local global [10 x %struct.A] zeroinitializer, align 16, !dbg !10 +@.str = private unnamed_addr constant [19 x i8] c"as[i].a == as[i].b\00", align 1 +@.str.1 = private unnamed_addr constant [81 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/c11_with_disable_enable_as_barrier.c\00", align 1 +@__PRETTY_FUNCTION__.handler = private unnamed_addr constant [22 x i8] c"void *handler(void *)\00", align 1 +@h = dso_local global i64 0, align 8, !dbg !22 +@__PRETTY_FUNCTION__.run = private unnamed_addr constant [18 x i8] c"void *run(void *)\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !35 { + call void @llvm.dbg.value(metadata i8* %0, metadata !39, metadata !DIExpression()), !dbg !40 + %2 = ptrtoint i8* %0 to i64, !dbg !41 + %3 = trunc i64 %2 to i32, !dbg !42 + call void @llvm.dbg.value(metadata i32 %3, metadata !43, metadata !DIExpression()), !dbg !40 + %4 = load i32, i32* @cnt, align 4, !dbg !44 + %5 = add nsw i32 %4, 1, !dbg !44 + store i32 %5, i32* @cnt, align 4, !dbg !44 + call void @llvm.dbg.value(metadata i32 %4, metadata !45, metadata !DIExpression()), !dbg !40 + %6 = call i32 (...) @__VERIFIER_disable_irq(), !dbg !46 + %7 = call i32 (...) @__VERIFIER_enable_irq(), !dbg !47 + %8 = sext i32 %4 to i64, !dbg !48 + %9 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %8, !dbg !48 + %10 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 0, !dbg !49 + store volatile i32 %3, i32* %10, align 8, !dbg !50 + %11 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 1, !dbg !51 + store volatile i32 %3, i32* %11, align 4, !dbg !52 + %12 = load volatile i32, i32* %10, align 8, !dbg !53 + %13 = load volatile i32, i32* %11, align 4, !dbg !53 + %14 = icmp eq i32 %12, %13, !dbg !53 + br i1 %14, label %16, label %15, !dbg !56 + +15: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([81 x i8], [81 x i8]* @.str.1, i64 0, i64 0), i32 noundef 24, i8* noundef getelementptr inbounds ([22 x i8], [22 x i8]* @__PRETTY_FUNCTION__.handler, i64 0, i64 0)) #5, !dbg !53 + unreachable, !dbg !53 + +16: ; preds = %1 + ret i8* null, !dbg !57 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare i32 @__VERIFIER_disable_irq(...) #2 + +declare i32 @__VERIFIER_enable_irq(...) #2 + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #3 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @run(i8* noundef %0) #0 !dbg !58 { + call void @llvm.dbg.value(metadata i8* %0, metadata !59, metadata !DIExpression()), !dbg !60 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !61 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #6, !dbg !62 + %4 = ptrtoint i8* %0 to i64, !dbg !63 + %5 = trunc i64 %4 to i32, !dbg !64 + call void @llvm.dbg.value(metadata i32 %5, metadata !65, metadata !DIExpression()), !dbg !60 + %6 = load i32, i32* @cnt, align 4, !dbg !66 + %7 = add nsw i32 %6, 1, !dbg !66 + store i32 %7, i32* @cnt, align 4, !dbg !66 + call void @llvm.dbg.value(metadata i32 %6, metadata !67, metadata !DIExpression()), !dbg !60 + %8 = call i32 (...) @__VERIFIER_disable_irq(), !dbg !68 + %9 = call i32 (...) @__VERIFIER_enable_irq(), !dbg !69 + %10 = sext i32 %6 to i64, !dbg !70 + %11 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %10, !dbg !70 + %12 = getelementptr inbounds %struct.A, %struct.A* %11, i32 0, i32 0, !dbg !71 + store volatile i32 %5, i32* %12, align 8, !dbg !72 + %13 = getelementptr inbounds %struct.A, %struct.A* %11, i32 0, i32 1, !dbg !73 + store volatile i32 %5, i32* %13, align 4, !dbg !74 + %14 = load volatile i32, i32* %12, align 8, !dbg !75 + %15 = load volatile i32, i32* %13, align 4, !dbg !75 + %16 = icmp eq i32 %14, %15, !dbg !75 + br i1 %16, label %18, label %17, !dbg !78 + +17: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([81 x i8], [81 x i8]* @.str.1, i64 0, i64 0), i32 noundef 40, i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @__PRETTY_FUNCTION__.run, i64 0, i64 0)) #5, !dbg !75 + unreachable, !dbg !75 + +18: ; preds = %1 + %19 = load i64, i64* @h, align 8, !dbg !79 + %20 = call i32 @pthread_join(i64 noundef %19, i8** noundef null), !dbg !80 + ret i8* null, !dbg !81 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #4 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !82 { + %1 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !85, metadata !DIExpression()), !dbg !86 + %2 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)) #6, !dbg !87 + ret i32 0, !dbg !88 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { noreturn nounwind } +attributes #6 = { nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!27, !28, !29, !30, !31, !32, !33} +!llvm.ident = !{!34} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !12, line: 13, type: !18, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !9, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_with_disable_enable_as_barrier.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "c3898c6a404aaaf814a0b1fb3973522e") +!4 = !{!5, !8} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 87, baseType: !7) +!6 = !DIFile(filename: "/usr/include/stdint.h", directory: "", checksumkind: CSK_MD5, checksum: "24103e292ae21916e87130b926c8d2f8") +!7 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!9 = !{!0, !10, !22} +!10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression()) +!11 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !12, line: 12, type: !13, isLocal: false, isDefinition: true) +!12 = !DIFile(filename: "benchmarks/interrupts/c11_with_disable_enable_as_barrier.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "c3898c6a404aaaf814a0b1fb3973522e") +!13 = !DICompositeType(tag: DW_TAG_array_type, baseType: !14, size: 640, elements: !20) +!14 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !12, line: 11, size: 64, elements: !15) +!15 = !{!16, !19} +!16 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !14, file: !12, line: 11, baseType: !17, size: 32) +!17 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !18) +!18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!19 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !14, file: !12, line: 11, baseType: !17, size: 32, offset: 32) +!20 = !{!21} +!21 = !DISubrange(count: 10) +!22 = !DIGlobalVariableExpression(var: !23, expr: !DIExpression()) +!23 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !12, line: 15, type: !24, isLocal: false, isDefinition: true) +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !25, line: 27, baseType: !26) +!25 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!26 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!27 = !{i32 7, !"Dwarf Version", i32 5} +!28 = !{i32 2, !"Debug Info Version", i32 3} +!29 = !{i32 1, !"wchar_size", i32 4} +!30 = !{i32 7, !"PIC Level", i32 2} +!31 = !{i32 7, !"PIE Level", i32 2} +!32 = !{i32 7, !"uwtable", i32 1} +!33 = !{i32 7, !"frame-pointer", i32 2} +!34 = !{!"Ubuntu clang version 14.0.6"} +!35 = distinct !DISubprogram(name: "handler", scope: !12, file: !12, line: 16, type: !36, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!36 = !DISubroutineType(types: !37) +!37 = !{!8, !8} +!38 = !{} +!39 = !DILocalVariable(name: "arg", arg: 1, scope: !35, file: !12, line: 16, type: !8) +!40 = !DILocation(line: 0, scope: !35) +!41 = !DILocation(line: 18, column: 19, scope: !35) +!42 = !DILocation(line: 18, column: 18, scope: !35) +!43 = !DILocalVariable(name: "tindex", scope: !35, file: !12, line: 18, type: !18) +!44 = !DILocation(line: 19, column: 16, scope: !35) +!45 = !DILocalVariable(name: "i", scope: !35, file: !12, line: 19, type: !18) +!46 = !DILocation(line: 20, column: 5, scope: !35) +!47 = !DILocation(line: 21, column: 5, scope: !35) +!48 = !DILocation(line: 22, column: 5, scope: !35) +!49 = !DILocation(line: 22, column: 11, scope: !35) +!50 = !DILocation(line: 22, column: 13, scope: !35) +!51 = !DILocation(line: 23, column: 11, scope: !35) +!52 = !DILocation(line: 23, column: 13, scope: !35) +!53 = !DILocation(line: 24, column: 5, scope: !54) +!54 = distinct !DILexicalBlock(scope: !55, file: !12, line: 24, column: 5) +!55 = distinct !DILexicalBlock(scope: !35, file: !12, line: 24, column: 5) +!56 = !DILocation(line: 24, column: 5, scope: !55) +!57 = !DILocation(line: 26, column: 5, scope: !35) +!58 = distinct !DISubprogram(name: "run", scope: !12, file: !12, line: 29, type: !36, scopeLine: 30, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!59 = !DILocalVariable(name: "arg", arg: 1, scope: !58, file: !12, line: 29, type: !8) +!60 = !DILocation(line: 0, scope: !58) +!61 = !DILocation(line: 31, column: 5, scope: !58) +!62 = !DILocation(line: 32, column: 5, scope: !58) +!63 = !DILocation(line: 34, column: 19, scope: !58) +!64 = !DILocation(line: 34, column: 18, scope: !58) +!65 = !DILocalVariable(name: "tindex", scope: !58, file: !12, line: 34, type: !18) +!66 = !DILocation(line: 35, column: 16, scope: !58) +!67 = !DILocalVariable(name: "i", scope: !58, file: !12, line: 35, type: !18) +!68 = !DILocation(line: 36, column: 5, scope: !58) +!69 = !DILocation(line: 37, column: 5, scope: !58) +!70 = !DILocation(line: 38, column: 5, scope: !58) +!71 = !DILocation(line: 38, column: 11, scope: !58) +!72 = !DILocation(line: 38, column: 13, scope: !58) +!73 = !DILocation(line: 39, column: 11, scope: !58) +!74 = !DILocation(line: 39, column: 13, scope: !58) +!75 = !DILocation(line: 40, column: 5, scope: !76) +!76 = distinct !DILexicalBlock(scope: !77, file: !12, line: 40, column: 5) +!77 = distinct !DILexicalBlock(scope: !58, file: !12, line: 40, column: 5) +!78 = !DILocation(line: 40, column: 5, scope: !77) +!79 = !DILocation(line: 42, column: 18, scope: !58) +!80 = !DILocation(line: 42, column: 5, scope: !58) +!81 = !DILocation(line: 44, column: 5, scope: !58) +!82 = distinct !DISubprogram(name: "main", scope: !12, file: !12, line: 47, type: !83, scopeLine: 48, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!83 = !DISubroutineType(types: !84) +!84 = !{!18} +!85 = !DILocalVariable(name: "t", scope: !82, file: !12, line: 49, type: !24) +!86 = !DILocation(line: 49, column: 15, scope: !82) +!87 = !DILocation(line: 50, column: 5, scope: !82) +!88 = !DILocation(line: 52, column: 5, scope: !82) diff --git a/dartagnan/src/test/resources/interrupts/c11_without_barrier-opt.ll b/dartagnan/src/test/resources/interrupts/c11_without_barrier-opt.ll new file mode 100644 index 0000000000..d7f1c37a8b --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_without_barrier-opt.ll @@ -0,0 +1,199 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/c11_without_barrier.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_without_barrier.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%struct.A = type { i32, i32 } +%union.pthread_attr_t = type { i64, [48 x i8] } + +@cnt = dso_local global i32 0, align 4, !dbg !0 +@as = dso_local global [10 x %struct.A] zeroinitializer, align 16, !dbg !10 +@.str = private unnamed_addr constant [19 x i8] c"as[i].a == as[i].b\00", align 1 +@.str.1 = private unnamed_addr constant [66 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/c11_without_barrier.c\00", align 1 +@__PRETTY_FUNCTION__.handler = private unnamed_addr constant [22 x i8] c"void *handler(void *)\00", align 1 +@h = dso_local global i64 0, align 8, !dbg !22 +@__PRETTY_FUNCTION__.run = private unnamed_addr constant [18 x i8] c"void *run(void *)\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !35 { + call void @llvm.dbg.value(metadata i8* %0, metadata !39, metadata !DIExpression()), !dbg !40 + %2 = ptrtoint i8* %0 to i64, !dbg !41 + %3 = trunc i64 %2 to i32, !dbg !42 + call void @llvm.dbg.value(metadata i32 %3, metadata !43, metadata !DIExpression()), !dbg !40 + %4 = load i32, i32* @cnt, align 4, !dbg !44 + %5 = add nsw i32 %4, 1, !dbg !44 + store i32 %5, i32* @cnt, align 4, !dbg !44 + call void @llvm.dbg.value(metadata i32 %4, metadata !45, metadata !DIExpression()), !dbg !40 + %6 = sext i32 %4 to i64, !dbg !46 + %7 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %6, !dbg !46 + %8 = getelementptr inbounds %struct.A, %struct.A* %7, i32 0, i32 0, !dbg !47 + store volatile i32 %3, i32* %8, align 8, !dbg !48 + %9 = getelementptr inbounds %struct.A, %struct.A* %7, i32 0, i32 1, !dbg !49 + store volatile i32 %3, i32* %9, align 4, !dbg !50 + %10 = load volatile i32, i32* %8, align 8, !dbg !51 + %11 = load volatile i32, i32* %9, align 4, !dbg !51 + %12 = icmp eq i32 %10, %11, !dbg !51 + br i1 %12, label %14, label %13, !dbg !54 + +13: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0), i32 noundef 22, i8* noundef getelementptr inbounds ([22 x i8], [22 x i8]* @__PRETTY_FUNCTION__.handler, i64 0, i64 0)) #5, !dbg !51 + unreachable, !dbg !51 + +14: ; preds = %1 + ret i8* null, !dbg !55 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @run(i8* noundef %0) #0 !dbg !56 { + call void @llvm.dbg.value(metadata i8* %0, metadata !57, metadata !DIExpression()), !dbg !58 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !59 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #6, !dbg !60 + %4 = ptrtoint i8* %0 to i64, !dbg !61 + %5 = trunc i64 %4 to i32, !dbg !62 + call void @llvm.dbg.value(metadata i32 %5, metadata !63, metadata !DIExpression()), !dbg !58 + %6 = load i32, i32* @cnt, align 4, !dbg !64 + %7 = add nsw i32 %6, 1, !dbg !64 + store i32 %7, i32* @cnt, align 4, !dbg !64 + call void @llvm.dbg.value(metadata i32 %6, metadata !65, metadata !DIExpression()), !dbg !58 + %8 = sext i32 %6 to i64, !dbg !66 + %9 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %8, !dbg !66 + %10 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 0, !dbg !67 + store volatile i32 %5, i32* %10, align 8, !dbg !68 + %11 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 1, !dbg !69 + store volatile i32 %5, i32* %11, align 4, !dbg !70 + %12 = load volatile i32, i32* %10, align 8, !dbg !71 + %13 = load volatile i32, i32* %11, align 4, !dbg !71 + %14 = icmp eq i32 %12, %13, !dbg !71 + br i1 %14, label %16, label %15, !dbg !74 + +15: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0), i32 noundef 36, i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @__PRETTY_FUNCTION__.run, i64 0, i64 0)) #5, !dbg !71 + unreachable, !dbg !71 + +16: ; preds = %1 + %17 = load i64, i64* @h, align 8, !dbg !75 + %18 = call i32 @pthread_join(i64 noundef %17, i8** noundef null), !dbg !76 + ret i8* null, !dbg !77 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #3 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #4 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #3 + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !78 { + %1 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !81, metadata !DIExpression()), !dbg !82 + %2 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)) #6, !dbg !83 + ret i32 0, !dbg !84 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { noreturn nounwind } +attributes #6 = { nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!27, !28, !29, !30, !31, !32, !33} +!llvm.ident = !{!34} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !12, line: 13, type: !18, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !9, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/c11_without_barrier.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "c90a0005011740e971ddcb6dbe05268e") +!4 = !{!5, !8} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 87, baseType: !7) +!6 = !DIFile(filename: "/usr/include/stdint.h", directory: "", checksumkind: CSK_MD5, checksum: "24103e292ae21916e87130b926c8d2f8") +!7 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!9 = !{!0, !10, !22} +!10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression()) +!11 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !12, line: 12, type: !13, isLocal: false, isDefinition: true) +!12 = !DIFile(filename: "benchmarks/interrupts/c11_without_barrier.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "c90a0005011740e971ddcb6dbe05268e") +!13 = !DICompositeType(tag: DW_TAG_array_type, baseType: !14, size: 640, elements: !20) +!14 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !12, line: 11, size: 64, elements: !15) +!15 = !{!16, !19} +!16 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !14, file: !12, line: 11, baseType: !17, size: 32) +!17 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !18) +!18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!19 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !14, file: !12, line: 11, baseType: !17, size: 32, offset: 32) +!20 = !{!21} +!21 = !DISubrange(count: 10) +!22 = !DIGlobalVariableExpression(var: !23, expr: !DIExpression()) +!23 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !12, line: 15, type: !24, isLocal: false, isDefinition: true) +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !25, line: 27, baseType: !26) +!25 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!26 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!27 = !{i32 7, !"Dwarf Version", i32 5} +!28 = !{i32 2, !"Debug Info Version", i32 3} +!29 = !{i32 1, !"wchar_size", i32 4} +!30 = !{i32 7, !"PIC Level", i32 2} +!31 = !{i32 7, !"PIE Level", i32 2} +!32 = !{i32 7, !"uwtable", i32 1} +!33 = !{i32 7, !"frame-pointer", i32 2} +!34 = !{!"Ubuntu clang version 14.0.6"} +!35 = distinct !DISubprogram(name: "handler", scope: !12, file: !12, line: 16, type: !36, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!36 = !DISubroutineType(types: !37) +!37 = !{!8, !8} +!38 = !{} +!39 = !DILocalVariable(name: "arg", arg: 1, scope: !35, file: !12, line: 16, type: !8) +!40 = !DILocation(line: 0, scope: !35) +!41 = !DILocation(line: 18, column: 19, scope: !35) +!42 = !DILocation(line: 18, column: 18, scope: !35) +!43 = !DILocalVariable(name: "tindex", scope: !35, file: !12, line: 18, type: !18) +!44 = !DILocation(line: 19, column: 16, scope: !35) +!45 = !DILocalVariable(name: "i", scope: !35, file: !12, line: 19, type: !18) +!46 = !DILocation(line: 20, column: 5, scope: !35) +!47 = !DILocation(line: 20, column: 11, scope: !35) +!48 = !DILocation(line: 20, column: 13, scope: !35) +!49 = !DILocation(line: 21, column: 11, scope: !35) +!50 = !DILocation(line: 21, column: 13, scope: !35) +!51 = !DILocation(line: 22, column: 5, scope: !52) +!52 = distinct !DILexicalBlock(scope: !53, file: !12, line: 22, column: 5) +!53 = distinct !DILexicalBlock(scope: !35, file: !12, line: 22, column: 5) +!54 = !DILocation(line: 22, column: 5, scope: !53) +!55 = !DILocation(line: 24, column: 5, scope: !35) +!56 = distinct !DISubprogram(name: "run", scope: !12, file: !12, line: 27, type: !36, scopeLine: 28, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!57 = !DILocalVariable(name: "arg", arg: 1, scope: !56, file: !12, line: 27, type: !8) +!58 = !DILocation(line: 0, scope: !56) +!59 = !DILocation(line: 29, column: 5, scope: !56) +!60 = !DILocation(line: 30, column: 5, scope: !56) +!61 = !DILocation(line: 32, column: 19, scope: !56) +!62 = !DILocation(line: 32, column: 18, scope: !56) +!63 = !DILocalVariable(name: "tindex", scope: !56, file: !12, line: 32, type: !18) +!64 = !DILocation(line: 33, column: 16, scope: !56) +!65 = !DILocalVariable(name: "i", scope: !56, file: !12, line: 33, type: !18) +!66 = !DILocation(line: 34, column: 5, scope: !56) +!67 = !DILocation(line: 34, column: 11, scope: !56) +!68 = !DILocation(line: 34, column: 13, scope: !56) +!69 = !DILocation(line: 35, column: 11, scope: !56) +!70 = !DILocation(line: 35, column: 13, scope: !56) +!71 = !DILocation(line: 36, column: 5, scope: !72) +!72 = distinct !DILexicalBlock(scope: !73, file: !12, line: 36, column: 5) +!73 = distinct !DILexicalBlock(scope: !56, file: !12, line: 36, column: 5) +!74 = !DILocation(line: 36, column: 5, scope: !73) +!75 = !DILocation(line: 38, column: 18, scope: !56) +!76 = !DILocation(line: 38, column: 5, scope: !56) +!77 = !DILocation(line: 40, column: 5, scope: !56) +!78 = distinct !DISubprogram(name: "main", scope: !12, file: !12, line: 43, type: !79, scopeLine: 44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!79 = !DISubroutineType(types: !80) +!80 = !{!18} +!81 = !DILocalVariable(name: "t", scope: !78, file: !12, line: 45, type: !24) +!82 = !DILocation(line: 45, column: 15, scope: !78) +!83 = !DILocation(line: 46, column: 5, scope: !78) +!84 = !DILocation(line: 48, column: 5, scope: !78) diff --git a/dartagnan/src/test/resources/interrupts/c_disable_v1-opt.ll b/dartagnan/src/test/resources/interrupts/c_disable_v1-opt.ll new file mode 100644 index 0000000000..bca723f284 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c_disable_v1-opt.ll @@ -0,0 +1,211 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/c_disable_v1.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/c_disable_v1.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%struct.A = type { i32, i32 } +%union.pthread_attr_t = type { i64, [48 x i8] } + +@cnt = dso_local global i32 0, align 4, !dbg !0 +@as = dso_local global [10 x %struct.A] zeroinitializer, align 16, !dbg !10 +@.str = private unnamed_addr constant [19 x i8] c"as[i].a == as[i].b\00", align 1 +@.str.1 = private unnamed_addr constant [59 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/c_disable_v1.c\00", align 1 +@__PRETTY_FUNCTION__.handler = private unnamed_addr constant [22 x i8] c"void *handler(void *)\00", align 1 +@h = dso_local global i64 0, align 8, !dbg !22 +@__PRETTY_FUNCTION__.run = private unnamed_addr constant [18 x i8] c"void *run(void *)\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !35 { + call void @llvm.dbg.value(metadata i8* %0, metadata !39, metadata !DIExpression()), !dbg !40 + %2 = ptrtoint i8* %0 to i64, !dbg !41 + %3 = trunc i64 %2 to i32, !dbg !42 + call void @llvm.dbg.value(metadata i32 %3, metadata !43, metadata !DIExpression()), !dbg !40 + %4 = call i32 (...) @__VERIFIER_disable_irq(), !dbg !44 + %5 = load i32, i32* @cnt, align 4, !dbg !45 + %6 = add nsw i32 %5, 1, !dbg !45 + store i32 %6, i32* @cnt, align 4, !dbg !45 + call void @llvm.dbg.value(metadata i32 %5, metadata !46, metadata !DIExpression()), !dbg !40 + %7 = call i32 (...) @__VERIFIER_enable_irq(), !dbg !47 + %8 = sext i32 %5 to i64, !dbg !48 + %9 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %8, !dbg !48 + %10 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 0, !dbg !49 + store volatile i32 %3, i32* %10, align 8, !dbg !50 + %11 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 1, !dbg !51 + store volatile i32 %3, i32* %11, align 4, !dbg !52 + %12 = load volatile i32, i32* %10, align 8, !dbg !53 + %13 = load volatile i32, i32* %11, align 4, !dbg !53 + %14 = icmp eq i32 %12, %13, !dbg !53 + br i1 %14, label %16, label %15, !dbg !56 + +15: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0), i32 noundef 24, i8* noundef getelementptr inbounds ([22 x i8], [22 x i8]* @__PRETTY_FUNCTION__.handler, i64 0, i64 0)) #5, !dbg !53 + unreachable, !dbg !53 + +16: ; preds = %1 + ret i8* null, !dbg !57 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare i32 @__VERIFIER_disable_irq(...) #2 + +declare i32 @__VERIFIER_enable_irq(...) #2 + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #3 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @run(i8* noundef %0) #0 !dbg !58 { + call void @llvm.dbg.value(metadata i8* %0, metadata !59, metadata !DIExpression()), !dbg !60 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !61 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #6, !dbg !62 + %4 = ptrtoint i8* %0 to i64, !dbg !63 + %5 = trunc i64 %4 to i32, !dbg !64 + call void @llvm.dbg.value(metadata i32 %5, metadata !65, metadata !DIExpression()), !dbg !60 + %6 = call i32 (...) @__VERIFIER_disable_irq(), !dbg !66 + %7 = load i32, i32* @cnt, align 4, !dbg !67 + %8 = add nsw i32 %7, 1, !dbg !67 + store i32 %8, i32* @cnt, align 4, !dbg !67 + call void @llvm.dbg.value(metadata i32 %7, metadata !68, metadata !DIExpression()), !dbg !60 + %9 = call i32 (...) @__VERIFIER_enable_irq(), !dbg !69 + %10 = sext i32 %7 to i64, !dbg !70 + %11 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %10, !dbg !70 + %12 = getelementptr inbounds %struct.A, %struct.A* %11, i32 0, i32 0, !dbg !71 + store volatile i32 %5, i32* %12, align 8, !dbg !72 + %13 = getelementptr inbounds %struct.A, %struct.A* %11, i32 0, i32 1, !dbg !73 + store volatile i32 %5, i32* %13, align 4, !dbg !74 + %14 = load volatile i32, i32* %12, align 8, !dbg !75 + %15 = load volatile i32, i32* %13, align 4, !dbg !75 + %16 = icmp eq i32 %14, %15, !dbg !75 + br i1 %16, label %18, label %17, !dbg !78 + +17: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0), i32 noundef 40, i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @__PRETTY_FUNCTION__.run, i64 0, i64 0)) #5, !dbg !75 + unreachable, !dbg !75 + +18: ; preds = %1 + %19 = load i64, i64* @h, align 8, !dbg !79 + %20 = call i32 @pthread_join(i64 noundef %19, i8** noundef null), !dbg !80 + ret i8* null, !dbg !81 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #4 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !82 { + %1 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !85, metadata !DIExpression()), !dbg !86 + %2 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)) #6, !dbg !87 + ret i32 0, !dbg !88 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { noreturn nounwind } +attributes #6 = { nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!27, !28, !29, !30, !31, !32, !33} +!llvm.ident = !{!34} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !12, line: 13, type: !18, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !9, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/c_disable_v1.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "34896a8a63fcaf4b23057c861624a087") +!4 = !{!5, !8} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 87, baseType: !7) +!6 = !DIFile(filename: "/usr/include/stdint.h", directory: "", checksumkind: CSK_MD5, checksum: "24103e292ae21916e87130b926c8d2f8") +!7 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!9 = !{!0, !10, !22} +!10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression()) +!11 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !12, line: 12, type: !13, isLocal: false, isDefinition: true) +!12 = !DIFile(filename: "benchmarks/interrupts/c_disable_v1.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "34896a8a63fcaf4b23057c861624a087") +!13 = !DICompositeType(tag: DW_TAG_array_type, baseType: !14, size: 640, elements: !20) +!14 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !12, line: 11, size: 64, elements: !15) +!15 = !{!16, !19} +!16 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !14, file: !12, line: 11, baseType: !17, size: 32) +!17 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !18) +!18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!19 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !14, file: !12, line: 11, baseType: !17, size: 32, offset: 32) +!20 = !{!21} +!21 = !DISubrange(count: 10) +!22 = !DIGlobalVariableExpression(var: !23, expr: !DIExpression()) +!23 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !12, line: 15, type: !24, isLocal: false, isDefinition: true) +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !25, line: 27, baseType: !26) +!25 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!26 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!27 = !{i32 7, !"Dwarf Version", i32 5} +!28 = !{i32 2, !"Debug Info Version", i32 3} +!29 = !{i32 1, !"wchar_size", i32 4} +!30 = !{i32 7, !"PIC Level", i32 2} +!31 = !{i32 7, !"PIE Level", i32 2} +!32 = !{i32 7, !"uwtable", i32 1} +!33 = !{i32 7, !"frame-pointer", i32 2} +!34 = !{!"Ubuntu clang version 14.0.6"} +!35 = distinct !DISubprogram(name: "handler", scope: !12, file: !12, line: 16, type: !36, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!36 = !DISubroutineType(types: !37) +!37 = !{!8, !8} +!38 = !{} +!39 = !DILocalVariable(name: "arg", arg: 1, scope: !35, file: !12, line: 16, type: !8) +!40 = !DILocation(line: 0, scope: !35) +!41 = !DILocation(line: 18, column: 19, scope: !35) +!42 = !DILocation(line: 18, column: 18, scope: !35) +!43 = !DILocalVariable(name: "tindex", scope: !35, file: !12, line: 18, type: !18) +!44 = !DILocation(line: 19, column: 5, scope: !35) +!45 = !DILocation(line: 20, column: 16, scope: !35) +!46 = !DILocalVariable(name: "i", scope: !35, file: !12, line: 20, type: !18) +!47 = !DILocation(line: 21, column: 5, scope: !35) +!48 = !DILocation(line: 22, column: 5, scope: !35) +!49 = !DILocation(line: 22, column: 11, scope: !35) +!50 = !DILocation(line: 22, column: 13, scope: !35) +!51 = !DILocation(line: 23, column: 11, scope: !35) +!52 = !DILocation(line: 23, column: 13, scope: !35) +!53 = !DILocation(line: 24, column: 5, scope: !54) +!54 = distinct !DILexicalBlock(scope: !55, file: !12, line: 24, column: 5) +!55 = distinct !DILexicalBlock(scope: !35, file: !12, line: 24, column: 5) +!56 = !DILocation(line: 24, column: 5, scope: !55) +!57 = !DILocation(line: 26, column: 5, scope: !35) +!58 = distinct !DISubprogram(name: "run", scope: !12, file: !12, line: 29, type: !36, scopeLine: 30, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!59 = !DILocalVariable(name: "arg", arg: 1, scope: !58, file: !12, line: 29, type: !8) +!60 = !DILocation(line: 0, scope: !58) +!61 = !DILocation(line: 31, column: 5, scope: !58) +!62 = !DILocation(line: 32, column: 5, scope: !58) +!63 = !DILocation(line: 34, column: 19, scope: !58) +!64 = !DILocation(line: 34, column: 18, scope: !58) +!65 = !DILocalVariable(name: "tindex", scope: !58, file: !12, line: 34, type: !18) +!66 = !DILocation(line: 35, column: 5, scope: !58) +!67 = !DILocation(line: 36, column: 16, scope: !58) +!68 = !DILocalVariable(name: "i", scope: !58, file: !12, line: 36, type: !18) +!69 = !DILocation(line: 37, column: 5, scope: !58) +!70 = !DILocation(line: 38, column: 5, scope: !58) +!71 = !DILocation(line: 38, column: 11, scope: !58) +!72 = !DILocation(line: 38, column: 13, scope: !58) +!73 = !DILocation(line: 39, column: 11, scope: !58) +!74 = !DILocation(line: 39, column: 13, scope: !58) +!75 = !DILocation(line: 40, column: 5, scope: !76) +!76 = distinct !DILexicalBlock(scope: !77, file: !12, line: 40, column: 5) +!77 = distinct !DILexicalBlock(scope: !58, file: !12, line: 40, column: 5) +!78 = !DILocation(line: 40, column: 5, scope: !77) +!79 = !DILocation(line: 42, column: 18, scope: !58) +!80 = !DILocation(line: 42, column: 5, scope: !58) +!81 = !DILocation(line: 44, column: 5, scope: !58) +!82 = distinct !DISubprogram(name: "main", scope: !12, file: !12, line: 47, type: !83, scopeLine: 48, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!83 = !DISubroutineType(types: !84) +!84 = !{!18} +!85 = !DILocalVariable(name: "t", scope: !82, file: !12, line: 49, type: !24) +!86 = !DILocation(line: 49, column: 15, scope: !82) +!87 = !DILocation(line: 50, column: 5, scope: !82) +!88 = !DILocation(line: 52, column: 5, scope: !82) diff --git a/dartagnan/src/test/resources/interrupts/c_disable_v2-opt.ll b/dartagnan/src/test/resources/interrupts/c_disable_v2-opt.ll new file mode 100644 index 0000000000..dcd0204f99 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c_disable_v2-opt.ll @@ -0,0 +1,211 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/c_disable_v2.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/c_disable_v2.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%struct.A = type { i32, i32 } +%union.pthread_attr_t = type { i64, [48 x i8] } + +@cnt = dso_local global i32 0, align 4, !dbg !0 +@as = dso_local global [10 x %struct.A] zeroinitializer, align 16, !dbg !10 +@.str = private unnamed_addr constant [19 x i8] c"as[i].a == as[i].b\00", align 1 +@.str.1 = private unnamed_addr constant [59 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/c_disable_v2.c\00", align 1 +@__PRETTY_FUNCTION__.handler = private unnamed_addr constant [22 x i8] c"void *handler(void *)\00", align 1 +@h = dso_local global i64 0, align 8, !dbg !22 +@__PRETTY_FUNCTION__.run = private unnamed_addr constant [18 x i8] c"void *run(void *)\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !35 { + call void @llvm.dbg.value(metadata i8* %0, metadata !39, metadata !DIExpression()), !dbg !40 + %2 = ptrtoint i8* %0 to i64, !dbg !41 + %3 = trunc i64 %2 to i32, !dbg !42 + call void @llvm.dbg.value(metadata i32 %3, metadata !43, metadata !DIExpression()), !dbg !40 + %4 = call i32 (...) @__VERIFIER_disable_irq(), !dbg !44 + %5 = load i32, i32* @cnt, align 4, !dbg !45 + %6 = add nsw i32 %5, 1, !dbg !45 + store i32 %6, i32* @cnt, align 4, !dbg !45 + call void @llvm.dbg.value(metadata i32 %5, metadata !46, metadata !DIExpression()), !dbg !40 + %7 = sext i32 %5 to i64, !dbg !47 + %8 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %7, !dbg !47 + %9 = getelementptr inbounds %struct.A, %struct.A* %8, i32 0, i32 0, !dbg !48 + store volatile i32 %3, i32* %9, align 8, !dbg !49 + %10 = getelementptr inbounds %struct.A, %struct.A* %8, i32 0, i32 1, !dbg !50 + store volatile i32 %3, i32* %10, align 4, !dbg !51 + %11 = call i32 (...) @__VERIFIER_enable_irq(), !dbg !52 + %12 = load volatile i32, i32* %9, align 8, !dbg !53 + %13 = load volatile i32, i32* %10, align 4, !dbg !53 + %14 = icmp eq i32 %12, %13, !dbg !53 + br i1 %14, label %16, label %15, !dbg !56 + +15: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0), i32 noundef 24, i8* noundef getelementptr inbounds ([22 x i8], [22 x i8]* @__PRETTY_FUNCTION__.handler, i64 0, i64 0)) #5, !dbg !53 + unreachable, !dbg !53 + +16: ; preds = %1 + ret i8* null, !dbg !57 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare i32 @__VERIFIER_disable_irq(...) #2 + +declare i32 @__VERIFIER_enable_irq(...) #2 + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #3 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @run(i8* noundef %0) #0 !dbg !58 { + call void @llvm.dbg.value(metadata i8* %0, metadata !59, metadata !DIExpression()), !dbg !60 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !61 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #6, !dbg !62 + %4 = ptrtoint i8* %0 to i64, !dbg !63 + %5 = trunc i64 %4 to i32, !dbg !64 + call void @llvm.dbg.value(metadata i32 %5, metadata !65, metadata !DIExpression()), !dbg !60 + %6 = call i32 (...) @__VERIFIER_disable_irq(), !dbg !66 + %7 = load i32, i32* @cnt, align 4, !dbg !67 + %8 = add nsw i32 %7, 1, !dbg !67 + store i32 %8, i32* @cnt, align 4, !dbg !67 + call void @llvm.dbg.value(metadata i32 %7, metadata !68, metadata !DIExpression()), !dbg !60 + %9 = sext i32 %7 to i64, !dbg !69 + %10 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %9, !dbg !69 + %11 = getelementptr inbounds %struct.A, %struct.A* %10, i32 0, i32 0, !dbg !70 + store volatile i32 %5, i32* %11, align 8, !dbg !71 + %12 = getelementptr inbounds %struct.A, %struct.A* %10, i32 0, i32 1, !dbg !72 + store volatile i32 %5, i32* %12, align 4, !dbg !73 + %13 = call i32 (...) @__VERIFIER_enable_irq(), !dbg !74 + %14 = load volatile i32, i32* %11, align 8, !dbg !75 + %15 = load volatile i32, i32* %12, align 4, !dbg !75 + %16 = icmp eq i32 %14, %15, !dbg !75 + br i1 %16, label %18, label %17, !dbg !78 + +17: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0), i32 noundef 40, i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @__PRETTY_FUNCTION__.run, i64 0, i64 0)) #5, !dbg !75 + unreachable, !dbg !75 + +18: ; preds = %1 + %19 = load i64, i64* @h, align 8, !dbg !79 + %20 = call i32 @pthread_join(i64 noundef %19, i8** noundef null), !dbg !80 + ret i8* null, !dbg !81 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #4 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !82 { + %1 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !85, metadata !DIExpression()), !dbg !86 + %2 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)) #6, !dbg !87 + ret i32 0, !dbg !88 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { noreturn nounwind } +attributes #6 = { nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!27, !28, !29, !30, !31, !32, !33} +!llvm.ident = !{!34} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !12, line: 13, type: !18, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !9, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/c_disable_v2.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "375435b3f9569141140d541dcd1d5c85") +!4 = !{!5, !8} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 87, baseType: !7) +!6 = !DIFile(filename: "/usr/include/stdint.h", directory: "", checksumkind: CSK_MD5, checksum: "24103e292ae21916e87130b926c8d2f8") +!7 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!9 = !{!0, !10, !22} +!10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression()) +!11 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !12, line: 12, type: !13, isLocal: false, isDefinition: true) +!12 = !DIFile(filename: "benchmarks/interrupts/c_disable_v2.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "375435b3f9569141140d541dcd1d5c85") +!13 = !DICompositeType(tag: DW_TAG_array_type, baseType: !14, size: 640, elements: !20) +!14 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !12, line: 11, size: 64, elements: !15) +!15 = !{!16, !19} +!16 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !14, file: !12, line: 11, baseType: !17, size: 32) +!17 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !18) +!18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!19 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !14, file: !12, line: 11, baseType: !17, size: 32, offset: 32) +!20 = !{!21} +!21 = !DISubrange(count: 10) +!22 = !DIGlobalVariableExpression(var: !23, expr: !DIExpression()) +!23 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !12, line: 15, type: !24, isLocal: false, isDefinition: true) +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !25, line: 27, baseType: !26) +!25 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!26 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!27 = !{i32 7, !"Dwarf Version", i32 5} +!28 = !{i32 2, !"Debug Info Version", i32 3} +!29 = !{i32 1, !"wchar_size", i32 4} +!30 = !{i32 7, !"PIC Level", i32 2} +!31 = !{i32 7, !"PIE Level", i32 2} +!32 = !{i32 7, !"uwtable", i32 1} +!33 = !{i32 7, !"frame-pointer", i32 2} +!34 = !{!"Ubuntu clang version 14.0.6"} +!35 = distinct !DISubprogram(name: "handler", scope: !12, file: !12, line: 16, type: !36, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!36 = !DISubroutineType(types: !37) +!37 = !{!8, !8} +!38 = !{} +!39 = !DILocalVariable(name: "arg", arg: 1, scope: !35, file: !12, line: 16, type: !8) +!40 = !DILocation(line: 0, scope: !35) +!41 = !DILocation(line: 18, column: 19, scope: !35) +!42 = !DILocation(line: 18, column: 18, scope: !35) +!43 = !DILocalVariable(name: "tindex", scope: !35, file: !12, line: 18, type: !18) +!44 = !DILocation(line: 19, column: 5, scope: !35) +!45 = !DILocation(line: 20, column: 16, scope: !35) +!46 = !DILocalVariable(name: "i", scope: !35, file: !12, line: 20, type: !18) +!47 = !DILocation(line: 21, column: 5, scope: !35) +!48 = !DILocation(line: 21, column: 11, scope: !35) +!49 = !DILocation(line: 21, column: 13, scope: !35) +!50 = !DILocation(line: 22, column: 11, scope: !35) +!51 = !DILocation(line: 22, column: 13, scope: !35) +!52 = !DILocation(line: 23, column: 5, scope: !35) +!53 = !DILocation(line: 24, column: 5, scope: !54) +!54 = distinct !DILexicalBlock(scope: !55, file: !12, line: 24, column: 5) +!55 = distinct !DILexicalBlock(scope: !35, file: !12, line: 24, column: 5) +!56 = !DILocation(line: 24, column: 5, scope: !55) +!57 = !DILocation(line: 26, column: 5, scope: !35) +!58 = distinct !DISubprogram(name: "run", scope: !12, file: !12, line: 29, type: !36, scopeLine: 30, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!59 = !DILocalVariable(name: "arg", arg: 1, scope: !58, file: !12, line: 29, type: !8) +!60 = !DILocation(line: 0, scope: !58) +!61 = !DILocation(line: 31, column: 5, scope: !58) +!62 = !DILocation(line: 32, column: 5, scope: !58) +!63 = !DILocation(line: 34, column: 19, scope: !58) +!64 = !DILocation(line: 34, column: 18, scope: !58) +!65 = !DILocalVariable(name: "tindex", scope: !58, file: !12, line: 34, type: !18) +!66 = !DILocation(line: 35, column: 5, scope: !58) +!67 = !DILocation(line: 36, column: 16, scope: !58) +!68 = !DILocalVariable(name: "i", scope: !58, file: !12, line: 36, type: !18) +!69 = !DILocation(line: 37, column: 5, scope: !58) +!70 = !DILocation(line: 37, column: 11, scope: !58) +!71 = !DILocation(line: 37, column: 13, scope: !58) +!72 = !DILocation(line: 38, column: 11, scope: !58) +!73 = !DILocation(line: 38, column: 13, scope: !58) +!74 = !DILocation(line: 39, column: 5, scope: !58) +!75 = !DILocation(line: 40, column: 5, scope: !76) +!76 = distinct !DILexicalBlock(scope: !77, file: !12, line: 40, column: 5) +!77 = distinct !DILexicalBlock(scope: !58, file: !12, line: 40, column: 5) +!78 = !DILocation(line: 40, column: 5, scope: !77) +!79 = !DILocation(line: 42, column: 18, scope: !58) +!80 = !DILocation(line: 42, column: 5, scope: !58) +!81 = !DILocation(line: 44, column: 5, scope: !58) +!82 = distinct !DISubprogram(name: "main", scope: !12, file: !12, line: 47, type: !83, scopeLine: 48, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!83 = !DISubroutineType(types: !84) +!84 = !{!18} +!85 = !DILocalVariable(name: "t", scope: !82, file: !12, line: 49, type: !24) +!86 = !DILocation(line: 49, column: 15, scope: !82) +!87 = !DILocation(line: 50, column: 5, scope: !82) +!88 = !DILocation(line: 52, column: 5, scope: !82) diff --git a/dartagnan/src/test/resources/interrupts/c_disable_v3-opt.ll b/dartagnan/src/test/resources/interrupts/c_disable_v3-opt.ll new file mode 100644 index 0000000000..e14f9f5f39 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c_disable_v3-opt.ll @@ -0,0 +1,211 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/c_disable_v3.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/c_disable_v3.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%struct.A = type { i32, i32 } +%union.pthread_attr_t = type { i64, [48 x i8] } + +@cnt = dso_local global i32 0, align 4, !dbg !0 +@as = dso_local global [10 x %struct.A] zeroinitializer, align 16, !dbg !10 +@.str = private unnamed_addr constant [19 x i8] c"as[i].a == as[i].b\00", align 1 +@.str.1 = private unnamed_addr constant [59 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/c_disable_v3.c\00", align 1 +@__PRETTY_FUNCTION__.handler = private unnamed_addr constant [22 x i8] c"void *handler(void *)\00", align 1 +@h = dso_local global i64 0, align 8, !dbg !22 +@__PRETTY_FUNCTION__.run = private unnamed_addr constant [18 x i8] c"void *run(void *)\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !35 { + call void @llvm.dbg.value(metadata i8* %0, metadata !39, metadata !DIExpression()), !dbg !40 + %2 = ptrtoint i8* %0 to i64, !dbg !41 + %3 = trunc i64 %2 to i32, !dbg !42 + call void @llvm.dbg.value(metadata i32 %3, metadata !43, metadata !DIExpression()), !dbg !40 + %4 = call i32 (...) @__VERIFIER_disable_irq(), !dbg !44 + %5 = load i32, i32* @cnt, align 4, !dbg !45 + %6 = add nsw i32 %5, 1, !dbg !45 + store i32 %6, i32* @cnt, align 4, !dbg !45 + call void @llvm.dbg.value(metadata i32 %5, metadata !46, metadata !DIExpression()), !dbg !40 + %7 = sext i32 %5 to i64, !dbg !47 + %8 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %7, !dbg !47 + %9 = getelementptr inbounds %struct.A, %struct.A* %8, i32 0, i32 0, !dbg !48 + store volatile i32 %3, i32* %9, align 8, !dbg !49 + %10 = getelementptr inbounds %struct.A, %struct.A* %8, i32 0, i32 1, !dbg !50 + store volatile i32 %3, i32* %10, align 4, !dbg !51 + %11 = load volatile i32, i32* %9, align 8, !dbg !52 + %12 = load volatile i32, i32* %10, align 4, !dbg !52 + %13 = icmp eq i32 %11, %12, !dbg !52 + br i1 %13, label %15, label %14, !dbg !55 + +14: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0), i32 noundef 23, i8* noundef getelementptr inbounds ([22 x i8], [22 x i8]* @__PRETTY_FUNCTION__.handler, i64 0, i64 0)) #5, !dbg !52 + unreachable, !dbg !52 + +15: ; preds = %1 + %16 = call i32 (...) @__VERIFIER_enable_irq(), !dbg !56 + ret i8* null, !dbg !57 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare i32 @__VERIFIER_disable_irq(...) #2 + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #3 + +declare i32 @__VERIFIER_enable_irq(...) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @run(i8* noundef %0) #0 !dbg !58 { + call void @llvm.dbg.value(metadata i8* %0, metadata !59, metadata !DIExpression()), !dbg !60 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !61 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #6, !dbg !62 + %4 = ptrtoint i8* %0 to i64, !dbg !63 + %5 = trunc i64 %4 to i32, !dbg !64 + call void @llvm.dbg.value(metadata i32 %5, metadata !65, metadata !DIExpression()), !dbg !60 + %6 = call i32 (...) @__VERIFIER_disable_irq(), !dbg !66 + %7 = load i32, i32* @cnt, align 4, !dbg !67 + %8 = add nsw i32 %7, 1, !dbg !67 + store i32 %8, i32* @cnt, align 4, !dbg !67 + call void @llvm.dbg.value(metadata i32 %7, metadata !68, metadata !DIExpression()), !dbg !60 + %9 = sext i32 %7 to i64, !dbg !69 + %10 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %9, !dbg !69 + %11 = getelementptr inbounds %struct.A, %struct.A* %10, i32 0, i32 0, !dbg !70 + store volatile i32 %5, i32* %11, align 8, !dbg !71 + %12 = getelementptr inbounds %struct.A, %struct.A* %10, i32 0, i32 1, !dbg !72 + store volatile i32 %5, i32* %12, align 4, !dbg !73 + %13 = load volatile i32, i32* %11, align 8, !dbg !74 + %14 = load volatile i32, i32* %12, align 4, !dbg !74 + %15 = icmp eq i32 %13, %14, !dbg !74 + br i1 %15, label %17, label %16, !dbg !77 + +16: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0), i32 noundef 39, i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @__PRETTY_FUNCTION__.run, i64 0, i64 0)) #5, !dbg !74 + unreachable, !dbg !74 + +17: ; preds = %1 + %18 = call i32 (...) @__VERIFIER_enable_irq(), !dbg !78 + %19 = load i64, i64* @h, align 8, !dbg !79 + %20 = call i32 @pthread_join(i64 noundef %19, i8** noundef null), !dbg !80 + ret i8* null, !dbg !81 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #4 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !82 { + %1 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !85, metadata !DIExpression()), !dbg !86 + %2 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)) #6, !dbg !87 + ret i32 0, !dbg !88 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { noreturn nounwind } +attributes #6 = { nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!27, !28, !29, !30, !31, !32, !33} +!llvm.ident = !{!34} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !12, line: 13, type: !18, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !9, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/c_disable_v3.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "efdf4f391aa1646fd03ac8aab3de9f77") +!4 = !{!5, !8} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 87, baseType: !7) +!6 = !DIFile(filename: "/usr/include/stdint.h", directory: "", checksumkind: CSK_MD5, checksum: "24103e292ae21916e87130b926c8d2f8") +!7 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!9 = !{!0, !10, !22} +!10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression()) +!11 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !12, line: 12, type: !13, isLocal: false, isDefinition: true) +!12 = !DIFile(filename: "benchmarks/interrupts/c_disable_v3.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "efdf4f391aa1646fd03ac8aab3de9f77") +!13 = !DICompositeType(tag: DW_TAG_array_type, baseType: !14, size: 640, elements: !20) +!14 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !12, line: 11, size: 64, elements: !15) +!15 = !{!16, !19} +!16 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !14, file: !12, line: 11, baseType: !17, size: 32) +!17 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !18) +!18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!19 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !14, file: !12, line: 11, baseType: !17, size: 32, offset: 32) +!20 = !{!21} +!21 = !DISubrange(count: 10) +!22 = !DIGlobalVariableExpression(var: !23, expr: !DIExpression()) +!23 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !12, line: 15, type: !24, isLocal: false, isDefinition: true) +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !25, line: 27, baseType: !26) +!25 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!26 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!27 = !{i32 7, !"Dwarf Version", i32 5} +!28 = !{i32 2, !"Debug Info Version", i32 3} +!29 = !{i32 1, !"wchar_size", i32 4} +!30 = !{i32 7, !"PIC Level", i32 2} +!31 = !{i32 7, !"PIE Level", i32 2} +!32 = !{i32 7, !"uwtable", i32 1} +!33 = !{i32 7, !"frame-pointer", i32 2} +!34 = !{!"Ubuntu clang version 14.0.6"} +!35 = distinct !DISubprogram(name: "handler", scope: !12, file: !12, line: 16, type: !36, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!36 = !DISubroutineType(types: !37) +!37 = !{!8, !8} +!38 = !{} +!39 = !DILocalVariable(name: "arg", arg: 1, scope: !35, file: !12, line: 16, type: !8) +!40 = !DILocation(line: 0, scope: !35) +!41 = !DILocation(line: 18, column: 19, scope: !35) +!42 = !DILocation(line: 18, column: 18, scope: !35) +!43 = !DILocalVariable(name: "tindex", scope: !35, file: !12, line: 18, type: !18) +!44 = !DILocation(line: 19, column: 5, scope: !35) +!45 = !DILocation(line: 20, column: 16, scope: !35) +!46 = !DILocalVariable(name: "i", scope: !35, file: !12, line: 20, type: !18) +!47 = !DILocation(line: 21, column: 5, scope: !35) +!48 = !DILocation(line: 21, column: 11, scope: !35) +!49 = !DILocation(line: 21, column: 13, scope: !35) +!50 = !DILocation(line: 22, column: 11, scope: !35) +!51 = !DILocation(line: 22, column: 13, scope: !35) +!52 = !DILocation(line: 23, column: 5, scope: !53) +!53 = distinct !DILexicalBlock(scope: !54, file: !12, line: 23, column: 5) +!54 = distinct !DILexicalBlock(scope: !35, file: !12, line: 23, column: 5) +!55 = !DILocation(line: 23, column: 5, scope: !54) +!56 = !DILocation(line: 24, column: 5, scope: !35) +!57 = !DILocation(line: 26, column: 5, scope: !35) +!58 = distinct !DISubprogram(name: "run", scope: !12, file: !12, line: 29, type: !36, scopeLine: 30, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!59 = !DILocalVariable(name: "arg", arg: 1, scope: !58, file: !12, line: 29, type: !8) +!60 = !DILocation(line: 0, scope: !58) +!61 = !DILocation(line: 31, column: 5, scope: !58) +!62 = !DILocation(line: 32, column: 5, scope: !58) +!63 = !DILocation(line: 34, column: 19, scope: !58) +!64 = !DILocation(line: 34, column: 18, scope: !58) +!65 = !DILocalVariable(name: "tindex", scope: !58, file: !12, line: 34, type: !18) +!66 = !DILocation(line: 35, column: 5, scope: !58) +!67 = !DILocation(line: 36, column: 16, scope: !58) +!68 = !DILocalVariable(name: "i", scope: !58, file: !12, line: 36, type: !18) +!69 = !DILocation(line: 37, column: 5, scope: !58) +!70 = !DILocation(line: 37, column: 11, scope: !58) +!71 = !DILocation(line: 37, column: 13, scope: !58) +!72 = !DILocation(line: 38, column: 11, scope: !58) +!73 = !DILocation(line: 38, column: 13, scope: !58) +!74 = !DILocation(line: 39, column: 5, scope: !75) +!75 = distinct !DILexicalBlock(scope: !76, file: !12, line: 39, column: 5) +!76 = distinct !DILexicalBlock(scope: !58, file: !12, line: 39, column: 5) +!77 = !DILocation(line: 39, column: 5, scope: !76) +!78 = !DILocation(line: 40, column: 5, scope: !58) +!79 = !DILocation(line: 42, column: 18, scope: !58) +!80 = !DILocation(line: 42, column: 5, scope: !58) +!81 = !DILocation(line: 44, column: 5, scope: !58) +!82 = distinct !DISubprogram(name: "main", scope: !12, file: !12, line: 47, type: !83, scopeLine: 48, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!83 = !DISubroutineType(types: !84) +!84 = !{!18} +!85 = !DILocalVariable(name: "t", scope: !82, file: !12, line: 49, type: !24) +!86 = !DILocation(line: 49, column: 15, scope: !82) +!87 = !DILocation(line: 50, column: 5, scope: !82) +!88 = !DILocation(line: 52, column: 5, scope: !82) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_detour-opt.ll b/dartagnan/src/test/resources/interrupts/lkmm_detour-opt.ll new file mode 100644 index 0000000000..cefedd2c06 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_detour-opt.ll @@ -0,0 +1,197 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/lkmm_detour.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_detour.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%union.pthread_attr_t = type { i64, [48 x i8] } + +@y = dso_local global i32 0, align 4, !dbg !0 +@h = dso_local global i64 0, align 8, !dbg !34 +@x = dso_local global i32 0, align 4, !dbg !26 +@a = dso_local global i32 0, align 4, !dbg !30 +@b = dso_local global i32 0, align 4, !dbg !32 +@.str = private unnamed_addr constant [30 x i8] c"!(b == 1 && a == 3 && y == 3)\00", align 1 +@.str.1 = private unnamed_addr constant [58 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_detour.c\00", align 1 +@__PRETTY_FUNCTION__.main = private unnamed_addr constant [11 x i8] c"int main()\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !47 { + call void @llvm.dbg.value(metadata i8* %0, metadata !51, metadata !DIExpression()), !dbg !52 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @y to i8*), i32 noundef 3, i32 noundef 1), !dbg !53 + ret i8* null, !dbg !54 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__LKMM_STORE(i8* noundef, i32 noundef, i32 noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @thread_1(i8* noundef %0) #0 !dbg !55 { + call void @llvm.dbg.value(metadata i8* %0, metadata !56, metadata !DIExpression()), !dbg !57 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !58 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #5, !dbg !59 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @x to i8*), i32 noundef 1, i32 noundef 1), !dbg !60 + %4 = call i32 @__LKMM_LOAD(i8* noundef bitcast (i32* @y to i8*), i32 noundef 1), !dbg !61 + store i32 %4, i32* @a, align 4, !dbg !62 + %5 = load i64, i64* @h, align 8, !dbg !63 + %6 = call i32 @pthread_join(i64 noundef %5, i8** noundef null), !dbg !64 + ret i8* null, !dbg !65 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #3 + +declare i32 @__LKMM_LOAD(i8* noundef, i32 noundef) #2 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @thread_2(i8* noundef %0) #0 !dbg !66 { + call void @llvm.dbg.value(metadata i8* %0, metadata !67, metadata !DIExpression()), !dbg !68 + %2 = call i32 @__LKMM_LOAD(i8* noundef bitcast (i32* @x to i8*), i32 noundef 1), !dbg !69 + store i32 %2, i32* @b, align 4, !dbg !70 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @y to i8*), i32 noundef 2, i32 noundef 3), !dbg !71 + ret i8* null, !dbg !72 +} + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !73 { + %1 = alloca i64, align 8 + %2 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !76, metadata !DIExpression()), !dbg !77 + call void @llvm.dbg.declare(metadata i64* %2, metadata !78, metadata !DIExpression()), !dbg !79 + %3 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_1, i8* noundef null) #5, !dbg !80 + %4 = call i32 @pthread_create(i64* noundef %2, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_2, i8* noundef null) #5, !dbg !81 + %5 = load i64, i64* %1, align 8, !dbg !82 + %6 = call i32 @pthread_join(i64 noundef %5, i8** noundef null), !dbg !83 + %7 = load i64, i64* %2, align 8, !dbg !84 + %8 = call i32 @pthread_join(i64 noundef %7, i8** noundef null), !dbg !85 + %9 = load i32, i32* @b, align 4, !dbg !86 + %10 = icmp eq i32 %9, 1, !dbg !86 + %11 = load i32, i32* @a, align 4, !dbg !86 + %12 = icmp eq i32 %11, 3, !dbg !86 + %or.cond = select i1 %10, i1 %12, i1 false, !dbg !86 + %13 = load i32, i32* @y, align 4, !dbg !86 + %14 = icmp eq i32 %13, 3, !dbg !86 + %or.cond3 = select i1 %or.cond, i1 %14, i1 false, !dbg !86 + br i1 %or.cond3, label %15, label %16, !dbg !86 + +15: ; preds = %0 + call void @__assert_fail(i8* noundef getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i32 noundef 45, i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__PRETTY_FUNCTION__.main, i64 0, i64 0)) #6, !dbg !86 + unreachable, !dbg !86 + +16: ; preds = %0 + ret i32 0, !dbg !89 +} + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #4 + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { nounwind } +attributes #6 = { noreturn nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!39, !40, !41, !42, !43, !44, !45} +!llvm.ident = !{!46} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !23, globals: !25, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_detour.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "9a23fa35c5735fb3738a52445b121186") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 3, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "include/lkmm.h", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "f219e5a4f2482585588927d06bb5e5c6") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_once", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "mb", value: 4) +!14 = !DIEnumerator(name: "wmb", value: 5) +!15 = !DIEnumerator(name: "rmb", value: 6) +!16 = !DIEnumerator(name: "rcu_lock", value: 7) +!17 = !DIEnumerator(name: "rcu_unlock", value: 8) +!18 = !DIEnumerator(name: "rcu_sync", value: 9) +!19 = !DIEnumerator(name: "before_atomic", value: 10) +!20 = !DIEnumerator(name: "after_atomic", value: 11) +!21 = !DIEnumerator(name: "after_spinlock", value: 12) +!22 = !DIEnumerator(name: "barrier", value: 13) +!23 = !{!24} +!24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!25 = !{!26, !0, !30, !32, !34} +!26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression()) +!27 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!28 = !DIFile(filename: "benchmarks/interrupts/lkmm_detour.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "9a23fa35c5735fb3738a52445b121186") +!29 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!30 = !DIGlobalVariableExpression(var: !31, expr: !DIExpression()) +!31 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!32 = !DIGlobalVariableExpression(var: !33, expr: !DIExpression()) +!33 = distinct !DIGlobalVariable(name: "b", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!34 = !DIGlobalVariableExpression(var: !35, expr: !DIExpression()) +!35 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !28, line: 9, type: !36, isLocal: false, isDefinition: true) +!36 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !37, line: 27, baseType: !38) +!37 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!38 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!39 = !{i32 7, !"Dwarf Version", i32 5} +!40 = !{i32 2, !"Debug Info Version", i32 3} +!41 = !{i32 1, !"wchar_size", i32 4} +!42 = !{i32 7, !"PIC Level", i32 2} +!43 = !{i32 7, !"PIE Level", i32 2} +!44 = !{i32 7, !"uwtable", i32 1} +!45 = !{i32 7, !"frame-pointer", i32 2} +!46 = !{!"Ubuntu clang version 14.0.6"} +!47 = distinct !DISubprogram(name: "handler", scope: !28, file: !28, line: 10, type: !48, scopeLine: 11, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +!48 = !DISubroutineType(types: !49) +!49 = !{!24, !24} +!50 = !{} +!51 = !DILocalVariable(name: "arg", arg: 1, scope: !47, file: !28, line: 10, type: !24) +!52 = !DILocation(line: 0, scope: !47) +!53 = !DILocation(line: 12, column: 5, scope: !47) +!54 = !DILocation(line: 13, column: 5, scope: !47) +!55 = distinct !DISubprogram(name: "thread_1", scope: !28, file: !28, line: 16, type: !48, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +!56 = !DILocalVariable(name: "arg", arg: 1, scope: !55, file: !28, line: 16, type: !24) +!57 = !DILocation(line: 0, scope: !55) +!58 = !DILocation(line: 18, column: 5, scope: !55) +!59 = !DILocation(line: 19, column: 5, scope: !55) +!60 = !DILocation(line: 21, column: 5, scope: !55) +!61 = !DILocation(line: 22, column: 9, scope: !55) +!62 = !DILocation(line: 22, column: 7, scope: !55) +!63 = !DILocation(line: 24, column: 18, scope: !55) +!64 = !DILocation(line: 24, column: 5, scope: !55) +!65 = !DILocation(line: 26, column: 5, scope: !55) +!66 = distinct !DISubprogram(name: "thread_2", scope: !28, file: !28, line: 29, type: !48, scopeLine: 30, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +!67 = !DILocalVariable(name: "arg", arg: 1, scope: !66, file: !28, line: 29, type: !24) +!68 = !DILocation(line: 0, scope: !66) +!69 = !DILocation(line: 31, column: 9, scope: !66) +!70 = !DILocation(line: 31, column: 7, scope: !66) +!71 = !DILocation(line: 32, column: 5, scope: !66) +!72 = !DILocation(line: 33, column: 5, scope: !66) +!73 = distinct !DISubprogram(name: "main", scope: !28, file: !28, line: 36, type: !74, scopeLine: 37, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +!74 = !DISubroutineType(types: !75) +!75 = !{!29} +!76 = !DILocalVariable(name: "t1", scope: !73, file: !28, line: 38, type: !36) +!77 = !DILocation(line: 38, column: 15, scope: !73) +!78 = !DILocalVariable(name: "t2", scope: !73, file: !28, line: 38, type: !36) +!79 = !DILocation(line: 38, column: 19, scope: !73) +!80 = !DILocation(line: 40, column: 5, scope: !73) +!81 = !DILocation(line: 41, column: 5, scope: !73) +!82 = !DILocation(line: 42, column: 18, scope: !73) +!83 = !DILocation(line: 42, column: 5, scope: !73) +!84 = !DILocation(line: 43, column: 18, scope: !73) +!85 = !DILocation(line: 43, column: 5, scope: !73) +!86 = !DILocation(line: 45, column: 5, scope: !87) +!87 = distinct !DILexicalBlock(scope: !88, file: !28, line: 45, column: 5) +!88 = distinct !DILexicalBlock(scope: !73, file: !28, line: 45, column: 5) +!89 = !DILocation(line: 47, column: 5, scope: !73) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_detour_disable-opt.ll b/dartagnan/src/test/resources/interrupts/lkmm_detour_disable-opt.ll new file mode 100644 index 0000000000..943e98cf6b --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_detour_disable-opt.ll @@ -0,0 +1,205 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/lkmm_detour_disable.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_detour_disable.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%union.pthread_attr_t = type { i64, [48 x i8] } + +@y = dso_local global i32 0, align 4, !dbg !0 +@h = dso_local global i64 0, align 8, !dbg !34 +@x = dso_local global i32 0, align 4, !dbg !26 +@a = dso_local global i32 0, align 4, !dbg !30 +@b = dso_local global i32 0, align 4, !dbg !32 +@.str = private unnamed_addr constant [30 x i8] c"!(b == 1 && a == 3 && y == 3)\00", align 1 +@.str.1 = private unnamed_addr constant [66 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_detour_disable.c\00", align 1 +@__PRETTY_FUNCTION__.main = private unnamed_addr constant [11 x i8] c"int main()\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !47 { + call void @llvm.dbg.value(metadata i8* %0, metadata !51, metadata !DIExpression()), !dbg !52 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @y to i8*), i32 noundef 3, i32 noundef 1), !dbg !53 + ret i8* null, !dbg !54 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__LKMM_STORE(i8* noundef, i32 noundef, i32 noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @thread_1(i8* noundef %0) #0 !dbg !55 { + call void @llvm.dbg.value(metadata i8* %0, metadata !56, metadata !DIExpression()), !dbg !57 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !58 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #5, !dbg !59 + %4 = call i32 (...) @__VERIFIER_disable_irq(), !dbg !60 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @x to i8*), i32 noundef 1, i32 noundef 1), !dbg !61 + %5 = call i32 @__LKMM_LOAD(i8* noundef bitcast (i32* @y to i8*), i32 noundef 1), !dbg !62 + store i32 %5, i32* @a, align 4, !dbg !63 + %6 = call i32 (...) @__VERIFIER_enable_irq(), !dbg !64 + %7 = load i64, i64* @h, align 8, !dbg !65 + %8 = call i32 @pthread_join(i64 noundef %7, i8** noundef null), !dbg !66 + ret i8* null, !dbg !67 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #3 + +declare i32 @__VERIFIER_disable_irq(...) #2 + +declare i32 @__LKMM_LOAD(i8* noundef, i32 noundef) #2 + +declare i32 @__VERIFIER_enable_irq(...) #2 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @thread_2(i8* noundef %0) #0 !dbg !68 { + call void @llvm.dbg.value(metadata i8* %0, metadata !69, metadata !DIExpression()), !dbg !70 + %2 = call i32 @__LKMM_LOAD(i8* noundef bitcast (i32* @x to i8*), i32 noundef 1), !dbg !71 + store i32 %2, i32* @b, align 4, !dbg !72 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @y to i8*), i32 noundef 2, i32 noundef 3), !dbg !73 + ret i8* null, !dbg !74 +} + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !75 { + %1 = alloca i64, align 8 + %2 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !78, metadata !DIExpression()), !dbg !79 + call void @llvm.dbg.declare(metadata i64* %2, metadata !80, metadata !DIExpression()), !dbg !81 + %3 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_1, i8* noundef null) #5, !dbg !82 + %4 = call i32 @pthread_create(i64* noundef %2, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_2, i8* noundef null) #5, !dbg !83 + %5 = load i64, i64* %1, align 8, !dbg !84 + %6 = call i32 @pthread_join(i64 noundef %5, i8** noundef null), !dbg !85 + %7 = load i64, i64* %2, align 8, !dbg !86 + %8 = call i32 @pthread_join(i64 noundef %7, i8** noundef null), !dbg !87 + %9 = load i32, i32* @b, align 4, !dbg !88 + %10 = icmp eq i32 %9, 1, !dbg !88 + %11 = load i32, i32* @a, align 4, !dbg !88 + %12 = icmp eq i32 %11, 3, !dbg !88 + %or.cond = select i1 %10, i1 %12, i1 false, !dbg !88 + %13 = load i32, i32* @y, align 4, !dbg !88 + %14 = icmp eq i32 %13, 3, !dbg !88 + %or.cond3 = select i1 %or.cond, i1 %14, i1 false, !dbg !88 + br i1 %or.cond3, label %15, label %16, !dbg !88 + +15: ; preds = %0 + call void @__assert_fail(i8* noundef getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0), i32 noundef 47, i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__PRETTY_FUNCTION__.main, i64 0, i64 0)) #6, !dbg !88 + unreachable, !dbg !88 + +16: ; preds = %0 + ret i32 0, !dbg !91 +} + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #4 + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { nounwind } +attributes #6 = { noreturn nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!39, !40, !41, !42, !43, !44, !45} +!llvm.ident = !{!46} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !23, globals: !25, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_detour_disable.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "a4729f2f9ca4805bc3a4900a72101bb5") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 3, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "include/lkmm.h", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "f219e5a4f2482585588927d06bb5e5c6") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_once", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "mb", value: 4) +!14 = !DIEnumerator(name: "wmb", value: 5) +!15 = !DIEnumerator(name: "rmb", value: 6) +!16 = !DIEnumerator(name: "rcu_lock", value: 7) +!17 = !DIEnumerator(name: "rcu_unlock", value: 8) +!18 = !DIEnumerator(name: "rcu_sync", value: 9) +!19 = !DIEnumerator(name: "before_atomic", value: 10) +!20 = !DIEnumerator(name: "after_atomic", value: 11) +!21 = !DIEnumerator(name: "after_spinlock", value: 12) +!22 = !DIEnumerator(name: "barrier", value: 13) +!23 = !{!24} +!24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!25 = !{!26, !0, !30, !32, !34} +!26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression()) +!27 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!28 = !DIFile(filename: "benchmarks/interrupts/lkmm_detour_disable.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "a4729f2f9ca4805bc3a4900a72101bb5") +!29 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!30 = !DIGlobalVariableExpression(var: !31, expr: !DIExpression()) +!31 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!32 = !DIGlobalVariableExpression(var: !33, expr: !DIExpression()) +!33 = distinct !DIGlobalVariable(name: "b", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!34 = !DIGlobalVariableExpression(var: !35, expr: !DIExpression()) +!35 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !28, line: 9, type: !36, isLocal: false, isDefinition: true) +!36 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !37, line: 27, baseType: !38) +!37 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!38 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!39 = !{i32 7, !"Dwarf Version", i32 5} +!40 = !{i32 2, !"Debug Info Version", i32 3} +!41 = !{i32 1, !"wchar_size", i32 4} +!42 = !{i32 7, !"PIC Level", i32 2} +!43 = !{i32 7, !"PIE Level", i32 2} +!44 = !{i32 7, !"uwtable", i32 1} +!45 = !{i32 7, !"frame-pointer", i32 2} +!46 = !{!"Ubuntu clang version 14.0.6"} +!47 = distinct !DISubprogram(name: "handler", scope: !28, file: !28, line: 10, type: !48, scopeLine: 11, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +!48 = !DISubroutineType(types: !49) +!49 = !{!24, !24} +!50 = !{} +!51 = !DILocalVariable(name: "arg", arg: 1, scope: !47, file: !28, line: 10, type: !24) +!52 = !DILocation(line: 0, scope: !47) +!53 = !DILocation(line: 12, column: 5, scope: !47) +!54 = !DILocation(line: 13, column: 5, scope: !47) +!55 = distinct !DISubprogram(name: "thread_1", scope: !28, file: !28, line: 16, type: !48, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +!56 = !DILocalVariable(name: "arg", arg: 1, scope: !55, file: !28, line: 16, type: !24) +!57 = !DILocation(line: 0, scope: !55) +!58 = !DILocation(line: 18, column: 5, scope: !55) +!59 = !DILocation(line: 19, column: 5, scope: !55) +!60 = !DILocation(line: 21, column: 5, scope: !55) +!61 = !DILocation(line: 22, column: 5, scope: !55) +!62 = !DILocation(line: 23, column: 9, scope: !55) +!63 = !DILocation(line: 23, column: 7, scope: !55) +!64 = !DILocation(line: 24, column: 5, scope: !55) +!65 = !DILocation(line: 26, column: 18, scope: !55) +!66 = !DILocation(line: 26, column: 5, scope: !55) +!67 = !DILocation(line: 28, column: 5, scope: !55) +!68 = distinct !DISubprogram(name: "thread_2", scope: !28, file: !28, line: 31, type: !48, scopeLine: 32, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +!69 = !DILocalVariable(name: "arg", arg: 1, scope: !68, file: !28, line: 31, type: !24) +!70 = !DILocation(line: 0, scope: !68) +!71 = !DILocation(line: 33, column: 9, scope: !68) +!72 = !DILocation(line: 33, column: 7, scope: !68) +!73 = !DILocation(line: 34, column: 5, scope: !68) +!74 = !DILocation(line: 35, column: 5, scope: !68) +!75 = distinct !DISubprogram(name: "main", scope: !28, file: !28, line: 38, type: !76, scopeLine: 39, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +!76 = !DISubroutineType(types: !77) +!77 = !{!29} +!78 = !DILocalVariable(name: "t1", scope: !75, file: !28, line: 40, type: !36) +!79 = !DILocation(line: 40, column: 15, scope: !75) +!80 = !DILocalVariable(name: "t2", scope: !75, file: !28, line: 40, type: !36) +!81 = !DILocation(line: 40, column: 19, scope: !75) +!82 = !DILocation(line: 42, column: 5, scope: !75) +!83 = !DILocation(line: 43, column: 5, scope: !75) +!84 = !DILocation(line: 44, column: 18, scope: !75) +!85 = !DILocation(line: 44, column: 5, scope: !75) +!86 = !DILocation(line: 45, column: 18, scope: !75) +!87 = !DILocation(line: 45, column: 5, scope: !75) +!88 = !DILocation(line: 47, column: 5, scope: !89) +!89 = distinct !DILexicalBlock(scope: !90, file: !28, line: 47, column: 5) +!90 = distinct !DILexicalBlock(scope: !75, file: !28, line: 47, column: 5) +!91 = !DILocation(line: 49, column: 5, scope: !75) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_detour_disable_release-opt.ll b/dartagnan/src/test/resources/interrupts/lkmm_detour_disable_release-opt.ll new file mode 100644 index 0000000000..9818f09148 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_detour_disable_release-opt.ll @@ -0,0 +1,205 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/lkmm_detour_disable_release.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_detour_disable_release.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%union.pthread_attr_t = type { i64, [48 x i8] } + +@y = dso_local global i32 0, align 4, !dbg !0 +@h = dso_local global i64 0, align 8, !dbg !34 +@x = dso_local global i32 0, align 4, !dbg !26 +@a = dso_local global i32 0, align 4, !dbg !30 +@b = dso_local global i32 0, align 4, !dbg !32 +@.str = private unnamed_addr constant [30 x i8] c"!(b == 1 && a == 3 && y == 3)\00", align 1 +@.str.1 = private unnamed_addr constant [74 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_detour_disable_release.c\00", align 1 +@__PRETTY_FUNCTION__.main = private unnamed_addr constant [11 x i8] c"int main()\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !47 { + call void @llvm.dbg.value(metadata i8* %0, metadata !51, metadata !DIExpression()), !dbg !52 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @y to i8*), i32 noundef 3, i32 noundef 1), !dbg !53 + ret i8* null, !dbg !54 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__LKMM_STORE(i8* noundef, i32 noundef, i32 noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @thread_1(i8* noundef %0) #0 !dbg !55 { + call void @llvm.dbg.value(metadata i8* %0, metadata !56, metadata !DIExpression()), !dbg !57 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !58 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #5, !dbg !59 + %4 = call i32 (...) @__VERIFIER_disable_irq(), !dbg !60 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @x to i8*), i32 noundef 1, i32 noundef 3), !dbg !61 + %5 = call i32 @__LKMM_LOAD(i8* noundef bitcast (i32* @y to i8*), i32 noundef 1), !dbg !62 + store i32 %5, i32* @a, align 4, !dbg !63 + %6 = call i32 (...) @__VERIFIER_enable_irq(), !dbg !64 + %7 = load i64, i64* @h, align 8, !dbg !65 + %8 = call i32 @pthread_join(i64 noundef %7, i8** noundef null), !dbg !66 + ret i8* null, !dbg !67 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #3 + +declare i32 @__VERIFIER_disable_irq(...) #2 + +declare i32 @__LKMM_LOAD(i8* noundef, i32 noundef) #2 + +declare i32 @__VERIFIER_enable_irq(...) #2 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @thread_2(i8* noundef %0) #0 !dbg !68 { + call void @llvm.dbg.value(metadata i8* %0, metadata !69, metadata !DIExpression()), !dbg !70 + %2 = call i32 @__LKMM_LOAD(i8* noundef bitcast (i32* @x to i8*), i32 noundef 1), !dbg !71 + store i32 %2, i32* @b, align 4, !dbg !72 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @y to i8*), i32 noundef 2, i32 noundef 3), !dbg !73 + ret i8* null, !dbg !74 +} + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !75 { + %1 = alloca i64, align 8 + %2 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !78, metadata !DIExpression()), !dbg !79 + call void @llvm.dbg.declare(metadata i64* %2, metadata !80, metadata !DIExpression()), !dbg !81 + %3 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_1, i8* noundef null) #5, !dbg !82 + %4 = call i32 @pthread_create(i64* noundef %2, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_2, i8* noundef null) #5, !dbg !83 + %5 = load i64, i64* %1, align 8, !dbg !84 + %6 = call i32 @pthread_join(i64 noundef %5, i8** noundef null), !dbg !85 + %7 = load i64, i64* %2, align 8, !dbg !86 + %8 = call i32 @pthread_join(i64 noundef %7, i8** noundef null), !dbg !87 + %9 = load i32, i32* @b, align 4, !dbg !88 + %10 = icmp eq i32 %9, 1, !dbg !88 + %11 = load i32, i32* @a, align 4, !dbg !88 + %12 = icmp eq i32 %11, 3, !dbg !88 + %or.cond = select i1 %10, i1 %12, i1 false, !dbg !88 + %13 = load i32, i32* @y, align 4, !dbg !88 + %14 = icmp eq i32 %13, 3, !dbg !88 + %or.cond3 = select i1 %or.cond, i1 %14, i1 false, !dbg !88 + br i1 %or.cond3, label %15, label %16, !dbg !88 + +15: ; preds = %0 + call void @__assert_fail(i8* noundef getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0), i32 noundef 47, i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__PRETTY_FUNCTION__.main, i64 0, i64 0)) #6, !dbg !88 + unreachable, !dbg !88 + +16: ; preds = %0 + ret i32 0, !dbg !91 +} + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #4 + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { nounwind } +attributes #6 = { noreturn nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!39, !40, !41, !42, !43, !44, !45} +!llvm.ident = !{!46} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !23, globals: !25, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_detour_disable_release.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "c7e127095926174bd3c7e8daf4e662c3") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 3, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "include/lkmm.h", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "f219e5a4f2482585588927d06bb5e5c6") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_once", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "mb", value: 4) +!14 = !DIEnumerator(name: "wmb", value: 5) +!15 = !DIEnumerator(name: "rmb", value: 6) +!16 = !DIEnumerator(name: "rcu_lock", value: 7) +!17 = !DIEnumerator(name: "rcu_unlock", value: 8) +!18 = !DIEnumerator(name: "rcu_sync", value: 9) +!19 = !DIEnumerator(name: "before_atomic", value: 10) +!20 = !DIEnumerator(name: "after_atomic", value: 11) +!21 = !DIEnumerator(name: "after_spinlock", value: 12) +!22 = !DIEnumerator(name: "barrier", value: 13) +!23 = !{!24} +!24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!25 = !{!26, !0, !30, !32, !34} +!26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression()) +!27 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!28 = !DIFile(filename: "benchmarks/interrupts/lkmm_detour_disable_release.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "c7e127095926174bd3c7e8daf4e662c3") +!29 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!30 = !DIGlobalVariableExpression(var: !31, expr: !DIExpression()) +!31 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!32 = !DIGlobalVariableExpression(var: !33, expr: !DIExpression()) +!33 = distinct !DIGlobalVariable(name: "b", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!34 = !DIGlobalVariableExpression(var: !35, expr: !DIExpression()) +!35 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !28, line: 9, type: !36, isLocal: false, isDefinition: true) +!36 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !37, line: 27, baseType: !38) +!37 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!38 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!39 = !{i32 7, !"Dwarf Version", i32 5} +!40 = !{i32 2, !"Debug Info Version", i32 3} +!41 = !{i32 1, !"wchar_size", i32 4} +!42 = !{i32 7, !"PIC Level", i32 2} +!43 = !{i32 7, !"PIE Level", i32 2} +!44 = !{i32 7, !"uwtable", i32 1} +!45 = !{i32 7, !"frame-pointer", i32 2} +!46 = !{!"Ubuntu clang version 14.0.6"} +!47 = distinct !DISubprogram(name: "handler", scope: !28, file: !28, line: 10, type: !48, scopeLine: 11, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +!48 = !DISubroutineType(types: !49) +!49 = !{!24, !24} +!50 = !{} +!51 = !DILocalVariable(name: "arg", arg: 1, scope: !47, file: !28, line: 10, type: !24) +!52 = !DILocation(line: 0, scope: !47) +!53 = !DILocation(line: 12, column: 5, scope: !47) +!54 = !DILocation(line: 13, column: 5, scope: !47) +!55 = distinct !DISubprogram(name: "thread_1", scope: !28, file: !28, line: 16, type: !48, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +!56 = !DILocalVariable(name: "arg", arg: 1, scope: !55, file: !28, line: 16, type: !24) +!57 = !DILocation(line: 0, scope: !55) +!58 = !DILocation(line: 18, column: 5, scope: !55) +!59 = !DILocation(line: 19, column: 5, scope: !55) +!60 = !DILocation(line: 21, column: 5, scope: !55) +!61 = !DILocation(line: 22, column: 5, scope: !55) +!62 = !DILocation(line: 23, column: 9, scope: !55) +!63 = !DILocation(line: 23, column: 7, scope: !55) +!64 = !DILocation(line: 24, column: 5, scope: !55) +!65 = !DILocation(line: 26, column: 18, scope: !55) +!66 = !DILocation(line: 26, column: 5, scope: !55) +!67 = !DILocation(line: 28, column: 5, scope: !55) +!68 = distinct !DISubprogram(name: "thread_2", scope: !28, file: !28, line: 31, type: !48, scopeLine: 32, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +!69 = !DILocalVariable(name: "arg", arg: 1, scope: !68, file: !28, line: 31, type: !24) +!70 = !DILocation(line: 0, scope: !68) +!71 = !DILocation(line: 33, column: 9, scope: !68) +!72 = !DILocation(line: 33, column: 7, scope: !68) +!73 = !DILocation(line: 34, column: 5, scope: !68) +!74 = !DILocation(line: 35, column: 5, scope: !68) +!75 = distinct !DISubprogram(name: "main", scope: !28, file: !28, line: 38, type: !76, scopeLine: 39, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +!76 = !DISubroutineType(types: !77) +!77 = !{!29} +!78 = !DILocalVariable(name: "t1", scope: !75, file: !28, line: 40, type: !36) +!79 = !DILocation(line: 40, column: 15, scope: !75) +!80 = !DILocalVariable(name: "t2", scope: !75, file: !28, line: 40, type: !36) +!81 = !DILocation(line: 40, column: 19, scope: !75) +!82 = !DILocation(line: 42, column: 5, scope: !75) +!83 = !DILocation(line: 43, column: 5, scope: !75) +!84 = !DILocation(line: 44, column: 18, scope: !75) +!85 = !DILocation(line: 44, column: 5, scope: !75) +!86 = !DILocation(line: 45, column: 18, scope: !75) +!87 = !DILocation(line: 45, column: 5, scope: !75) +!88 = !DILocation(line: 47, column: 5, scope: !89) +!89 = distinct !DILexicalBlock(scope: !90, file: !28, line: 47, column: 5) +!90 = distinct !DILexicalBlock(scope: !75, file: !28, line: 47, column: 5) +!91 = !DILocation(line: 49, column: 5, scope: !75) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_disable_no_enable-opt.bpl b/dartagnan/src/test/resources/interrupts/lkmm_disable_no_enable-opt.bpl deleted file mode 100644 index ffa37be493..0000000000 --- a/dartagnan/src/test/resources/interrupts/lkmm_disable_no_enable-opt.bpl +++ /dev/null @@ -1,16272 +0,0 @@ -// generated by SMACK version 2.8.0 for corral -// via /usr/local/bin/smack -q -t --no-memory-splitting --clang-options= -bpl /home/ponce/git/Dat3M/output/lkmm_disable_not_enable-opt.bpl /home/ponce/git/Dat3M/output/lkmm_disable_not_enable-opt.ll - -// Basic types -type i1 = int; -type i5 = int; -type i6 = int; -type i8 = int; -type i16 = int; -type i24 = int; -type i32 = int; -type i33 = int; -type i40 = int; -type i48 = int; -type i56 = int; -type i64 = int; -type i80 = int; -type i88 = int; -type i96 = int; -type i128 = int; -type i160 = int; -type i256 = int; -type ref = i64; -type float; - -// Basic constants -const $0: i32; -axiom ($0 == 0); -const $1: i32; -axiom ($1 == 1); -const $0.ref: ref; -axiom ($0.ref == 0); -const $1.ref: ref; -axiom ($1.ref == 1); -const $1024.ref: ref; -axiom ($1024.ref == 1024); -// Memory model constants -const $GLOBALS_BOTTOM: ref; -const $EXTERNS_BOTTOM: ref; -const $MALLOC_TOP: ref; - -// Memory maps (1 regions) -var $M.0: [ref] i64; - -// Memory address bounds -axiom ($GLOBALS_BOTTOM == $sub.ref(0, 37239)); -axiom ($EXTERNS_BOTTOM == $add.ref($GLOBALS_BOTTOM, $sub.ref(0, 32768))); -axiom ($MALLOC_TOP == 9223372036854775807); -function {:inline} $isExternal(p: ref) returns (bool) { $slt.ref.bool(p, $EXTERNS_BOTTOM) } - -// SMT bit-vector/integer conversion -function {:builtin "(_ int2bv 64)"} $int2bv.64(i: i64) returns (bv64); -function {:builtin "bv2nat"} $bv2int.64(i: bv64) returns (i64); - -// Integer arithmetic operations -function {:inline} $add.i1(i1: i1, i2: i1) returns (i1) { (i1 + i2) } -function {:inline} $add.i5(i1: i5, i2: i5) returns (i5) { (i1 + i2) } -function {:inline} $add.i6(i1: i6, i2: i6) returns (i6) { (i1 + i2) } -function {:inline} $add.i8(i1: i8, i2: i8) returns (i8) { (i1 + i2) } -function {:inline} $add.i16(i1: i16, i2: i16) returns (i16) { (i1 + i2) } -function {:inline} $add.i24(i1: i24, i2: i24) returns (i24) { (i1 + i2) } -function {:inline} $add.i32(i1: i32, i2: i32) returns (i32) { (i1 + i2) } -function {:inline} $add.i33(i1: i33, i2: i33) returns (i33) { (i1 + i2) } -function {:inline} $add.i40(i1: i40, i2: i40) returns (i40) { (i1 + i2) } -function {:inline} $add.i48(i1: i48, i2: i48) returns (i48) { (i1 + i2) } -function {:inline} $add.i56(i1: i56, i2: i56) returns (i56) { (i1 + i2) } -function {:inline} $add.i64(i1: i64, i2: i64) returns (i64) { (i1 + i2) } -function {:inline} $add.i80(i1: i80, i2: i80) returns (i80) { (i1 + i2) } -function {:inline} $add.i88(i1: i88, i2: i88) returns (i88) { (i1 + i2) } -function {:inline} $add.i96(i1: i96, i2: i96) returns (i96) { (i1 + i2) } -function {:inline} $add.i128(i1: i128, i2: i128) returns (i128) { (i1 + i2) } -function {:inline} $add.i160(i1: i160, i2: i160) returns (i160) { (i1 + i2) } -function {:inline} $add.i256(i1: i256, i2: i256) returns (i256) { (i1 + i2) } -function {:inline} $sub.i1(i1: i1, i2: i1) returns (i1) { (i1 - i2) } -function {:inline} $sub.i5(i1: i5, i2: i5) returns (i5) { (i1 - i2) } -function {:inline} $sub.i6(i1: i6, i2: i6) returns (i6) { (i1 - i2) } -function {:inline} $sub.i8(i1: i8, i2: i8) returns (i8) { (i1 - i2) } -function {:inline} $sub.i16(i1: i16, i2: i16) returns (i16) { (i1 - i2) } -function {:inline} $sub.i24(i1: i24, i2: i24) returns (i24) { (i1 - i2) } -function {:inline} $sub.i32(i1: i32, i2: i32) returns (i32) { (i1 - i2) } -function {:inline} $sub.i33(i1: i33, i2: i33) returns (i33) { (i1 - i2) } -function {:inline} $sub.i40(i1: i40, i2: i40) returns (i40) { (i1 - i2) } -function {:inline} $sub.i48(i1: i48, i2: i48) returns (i48) { (i1 - i2) } -function {:inline} $sub.i56(i1: i56, i2: i56) returns (i56) { (i1 - i2) } -function {:inline} $sub.i64(i1: i64, i2: i64) returns (i64) { (i1 - i2) } -function {:inline} $sub.i80(i1: i80, i2: i80) returns (i80) { (i1 - i2) } -function {:inline} $sub.i88(i1: i88, i2: i88) returns (i88) { (i1 - i2) } -function {:inline} $sub.i96(i1: i96, i2: i96) returns (i96) { (i1 - i2) } -function {:inline} $sub.i128(i1: i128, i2: i128) returns (i128) { (i1 - i2) } -function {:inline} $sub.i160(i1: i160, i2: i160) returns (i160) { (i1 - i2) } -function {:inline} $sub.i256(i1: i256, i2: i256) returns (i256) { (i1 - i2) } -function {:inline} $mul.i1(i1: i1, i2: i1) returns (i1) { (i1 * i2) } -function {:inline} $mul.i5(i1: i5, i2: i5) returns (i5) { (i1 * i2) } -function {:inline} $mul.i6(i1: i6, i2: i6) returns (i6) { (i1 * i2) } -function {:inline} $mul.i8(i1: i8, i2: i8) returns (i8) { (i1 * i2) } -function {:inline} $mul.i16(i1: i16, i2: i16) returns (i16) { (i1 * i2) } -function {:inline} $mul.i24(i1: i24, i2: i24) returns (i24) { (i1 * i2) } -function {:inline} $mul.i32(i1: i32, i2: i32) returns (i32) { (i1 * i2) } -function {:inline} $mul.i33(i1: i33, i2: i33) returns (i33) { (i1 * i2) } -function {:inline} $mul.i40(i1: i40, i2: i40) returns (i40) { (i1 * i2) } -function {:inline} $mul.i48(i1: i48, i2: i48) returns (i48) { (i1 * i2) } -function {:inline} $mul.i56(i1: i56, i2: i56) returns (i56) { (i1 * i2) } -function {:inline} $mul.i64(i1: i64, i2: i64) returns (i64) { (i1 * i2) } -function {:inline} $mul.i80(i1: i80, i2: i80) returns (i80) { (i1 * i2) } -function {:inline} $mul.i88(i1: i88, i2: i88) returns (i88) { (i1 * i2) } -function {:inline} $mul.i96(i1: i96, i2: i96) returns (i96) { (i1 * i2) } -function {:inline} $mul.i128(i1: i128, i2: i128) returns (i128) { (i1 * i2) } -function {:inline} $mul.i160(i1: i160, i2: i160) returns (i160) { (i1 * i2) } -function {:inline} $mul.i256(i1: i256, i2: i256) returns (i256) { (i1 * i2) } -function {:builtin "div"} $idiv.i1(i1: i1, i2: i1) returns (i1); -function {:builtin "div"} $idiv.i5(i1: i5, i2: i5) returns (i5); -function {:builtin "div"} $idiv.i6(i1: i6, i2: i6) returns (i6); -function {:builtin "div"} $idiv.i8(i1: i8, i2: i8) returns (i8); -function {:builtin "div"} $idiv.i16(i1: i16, i2: i16) returns (i16); -function {:builtin "div"} $idiv.i24(i1: i24, i2: i24) returns (i24); -function {:builtin "div"} $idiv.i32(i1: i32, i2: i32) returns (i32); -function {:builtin "div"} $idiv.i33(i1: i33, i2: i33) returns (i33); -function {:builtin "div"} $idiv.i40(i1: i40, i2: i40) returns (i40); -function {:builtin "div"} $idiv.i48(i1: i48, i2: i48) returns (i48); -function {:builtin "div"} $idiv.i56(i1: i56, i2: i56) returns (i56); -function {:builtin "div"} $idiv.i64(i1: i64, i2: i64) returns (i64); -function {:builtin "div"} $idiv.i80(i1: i80, i2: i80) returns (i80); -function {:builtin "div"} $idiv.i88(i1: i88, i2: i88) returns (i88); -function {:builtin "div"} $idiv.i96(i1: i96, i2: i96) returns (i96); -function {:builtin "div"} $idiv.i128(i1: i128, i2: i128) returns (i128); -function {:builtin "div"} $idiv.i160(i1: i160, i2: i160) returns (i160); -function {:builtin "div"} $idiv.i256(i1: i256, i2: i256) returns (i256); -function {:inline} $sdiv.i1(i1: i1, i2: i1) returns (i1) { $idiv.i1(i1, i2) } -function {:inline} $sdiv.i5(i1: i5, i2: i5) returns (i5) { $idiv.i5(i1, i2) } -function {:inline} $sdiv.i6(i1: i6, i2: i6) returns (i6) { $idiv.i6(i1, i2) } -function {:inline} $sdiv.i8(i1: i8, i2: i8) returns (i8) { $idiv.i8(i1, i2) } -function {:inline} $sdiv.i16(i1: i16, i2: i16) returns (i16) { $idiv.i16(i1, i2) } -function {:inline} $sdiv.i24(i1: i24, i2: i24) returns (i24) { $idiv.i24(i1, i2) } -function {:inline} $sdiv.i32(i1: i32, i2: i32) returns (i32) { $idiv.i32(i1, i2) } -function {:inline} $sdiv.i33(i1: i33, i2: i33) returns (i33) { $idiv.i33(i1, i2) } -function {:inline} $sdiv.i40(i1: i40, i2: i40) returns (i40) { $idiv.i40(i1, i2) } -function {:inline} $sdiv.i48(i1: i48, i2: i48) returns (i48) { $idiv.i48(i1, i2) } -function {:inline} $sdiv.i56(i1: i56, i2: i56) returns (i56) { $idiv.i56(i1, i2) } -function {:inline} $sdiv.i64(i1: i64, i2: i64) returns (i64) { $idiv.i64(i1, i2) } -function {:inline} $sdiv.i80(i1: i80, i2: i80) returns (i80) { $idiv.i80(i1, i2) } -function {:inline} $sdiv.i88(i1: i88, i2: i88) returns (i88) { $idiv.i88(i1, i2) } -function {:inline} $sdiv.i96(i1: i96, i2: i96) returns (i96) { $idiv.i96(i1, i2) } -function {:inline} $sdiv.i128(i1: i128, i2: i128) returns (i128) { $idiv.i128(i1, i2) } -function {:inline} $sdiv.i160(i1: i160, i2: i160) returns (i160) { $idiv.i160(i1, i2) } -function {:inline} $sdiv.i256(i1: i256, i2: i256) returns (i256) { $idiv.i256(i1, i2) } -function {:inline} $udiv.i1(i1: i1, i2: i1) returns (i1) { $idiv.i1(i1, i2) } -function {:inline} $udiv.i5(i1: i5, i2: i5) returns (i5) { $idiv.i5(i1, i2) } -function {:inline} $udiv.i6(i1: i6, i2: i6) returns (i6) { $idiv.i6(i1, i2) } -function {:inline} $udiv.i8(i1: i8, i2: i8) returns (i8) { $idiv.i8(i1, i2) } -function {:inline} $udiv.i16(i1: i16, i2: i16) returns (i16) { $idiv.i16(i1, i2) } -function {:inline} $udiv.i24(i1: i24, i2: i24) returns (i24) { $idiv.i24(i1, i2) } -function {:inline} $udiv.i32(i1: i32, i2: i32) returns (i32) { $idiv.i32(i1, i2) } -function {:inline} $udiv.i33(i1: i33, i2: i33) returns (i33) { $idiv.i33(i1, i2) } -function {:inline} $udiv.i40(i1: i40, i2: i40) returns (i40) { $idiv.i40(i1, i2) } -function {:inline} $udiv.i48(i1: i48, i2: i48) returns (i48) { $idiv.i48(i1, i2) } -function {:inline} $udiv.i56(i1: i56, i2: i56) returns (i56) { $idiv.i56(i1, i2) } -function {:inline} $udiv.i64(i1: i64, i2: i64) returns (i64) { $idiv.i64(i1, i2) } -function {:inline} $udiv.i80(i1: i80, i2: i80) returns (i80) { $idiv.i80(i1, i2) } -function {:inline} $udiv.i88(i1: i88, i2: i88) returns (i88) { $idiv.i88(i1, i2) } -function {:inline} $udiv.i96(i1: i96, i2: i96) returns (i96) { $idiv.i96(i1, i2) } -function {:inline} $udiv.i128(i1: i128, i2: i128) returns (i128) { $idiv.i128(i1, i2) } -function {:inline} $udiv.i160(i1: i160, i2: i160) returns (i160) { $idiv.i160(i1, i2) } -function {:inline} $udiv.i256(i1: i256, i2: i256) returns (i256) { $idiv.i256(i1, i2) } -function {:builtin "mod"} $smod.i1(i1: i1, i2: i1) returns (i1); -function {:builtin "mod"} $smod.i5(i1: i5, i2: i5) returns (i5); -function {:builtin "mod"} $smod.i6(i1: i6, i2: i6) returns (i6); -function {:builtin "mod"} $smod.i8(i1: i8, i2: i8) returns (i8); -function {:builtin "mod"} $smod.i16(i1: i16, i2: i16) returns (i16); -function {:builtin "mod"} $smod.i24(i1: i24, i2: i24) returns (i24); -function {:builtin "mod"} $smod.i32(i1: i32, i2: i32) returns (i32); -function {:builtin "mod"} $smod.i33(i1: i33, i2: i33) returns (i33); -function {:builtin "mod"} $smod.i40(i1: i40, i2: i40) returns (i40); -function {:builtin "mod"} $smod.i48(i1: i48, i2: i48) returns (i48); -function {:builtin "mod"} $smod.i56(i1: i56, i2: i56) returns (i56); -function {:builtin "mod"} $smod.i64(i1: i64, i2: i64) returns (i64); -function {:builtin "mod"} $smod.i80(i1: i80, i2: i80) returns (i80); -function {:builtin "mod"} $smod.i88(i1: i88, i2: i88) returns (i88); -function {:builtin "mod"} $smod.i96(i1: i96, i2: i96) returns (i96); -function {:builtin "mod"} $smod.i128(i1: i128, i2: i128) returns (i128); -function {:builtin "mod"} $smod.i160(i1: i160, i2: i160) returns (i160); -function {:builtin "mod"} $smod.i256(i1: i256, i2: i256) returns (i256); -function {:inline} $srem.i1(i1: i1, i2: i1) returns (i1) { (if ($ne.i1.bool($smod.i1(i1, i2), 0) && $slt.i1.bool(i1, 0)) then $sub.i1($smod.i1(i1, i2), $smax.i1(i2, $sub.i1(0, i2))) else $smod.i1(i1, i2)) } -function {:inline} $srem.i5(i1: i5, i2: i5) returns (i5) { (if ($ne.i5.bool($smod.i5(i1, i2), 0) && $slt.i5.bool(i1, 0)) then $sub.i5($smod.i5(i1, i2), $smax.i5(i2, $sub.i5(0, i2))) else $smod.i5(i1, i2)) } -function {:inline} $srem.i6(i1: i6, i2: i6) returns (i6) { (if ($ne.i6.bool($smod.i6(i1, i2), 0) && $slt.i6.bool(i1, 0)) then $sub.i6($smod.i6(i1, i2), $smax.i6(i2, $sub.i6(0, i2))) else $smod.i6(i1, i2)) } -function {:inline} $srem.i8(i1: i8, i2: i8) returns (i8) { (if ($ne.i8.bool($smod.i8(i1, i2), 0) && $slt.i8.bool(i1, 0)) then $sub.i8($smod.i8(i1, i2), $smax.i8(i2, $sub.i8(0, i2))) else $smod.i8(i1, i2)) } -function {:inline} $srem.i16(i1: i16, i2: i16) returns (i16) { (if ($ne.i16.bool($smod.i16(i1, i2), 0) && $slt.i16.bool(i1, 0)) then $sub.i16($smod.i16(i1, i2), $smax.i16(i2, $sub.i16(0, i2))) else $smod.i16(i1, i2)) } -function {:inline} $srem.i24(i1: i24, i2: i24) returns (i24) { (if ($ne.i24.bool($smod.i24(i1, i2), 0) && $slt.i24.bool(i1, 0)) then $sub.i24($smod.i24(i1, i2), $smax.i24(i2, $sub.i24(0, i2))) else $smod.i24(i1, i2)) } -function {:inline} $srem.i32(i1: i32, i2: i32) returns (i32) { (if ($ne.i32.bool($smod.i32(i1, i2), 0) && $slt.i32.bool(i1, 0)) then $sub.i32($smod.i32(i1, i2), $smax.i32(i2, $sub.i32(0, i2))) else $smod.i32(i1, i2)) } -function {:inline} $srem.i33(i1: i33, i2: i33) returns (i33) { (if ($ne.i33.bool($smod.i33(i1, i2), 0) && $slt.i33.bool(i1, 0)) then $sub.i33($smod.i33(i1, i2), $smax.i33(i2, $sub.i33(0, i2))) else $smod.i33(i1, i2)) } -function {:inline} $srem.i40(i1: i40, i2: i40) returns (i40) { (if ($ne.i40.bool($smod.i40(i1, i2), 0) && $slt.i40.bool(i1, 0)) then $sub.i40($smod.i40(i1, i2), $smax.i40(i2, $sub.i40(0, i2))) else $smod.i40(i1, i2)) } -function {:inline} $srem.i48(i1: i48, i2: i48) returns (i48) { (if ($ne.i48.bool($smod.i48(i1, i2), 0) && $slt.i48.bool(i1, 0)) then $sub.i48($smod.i48(i1, i2), $smax.i48(i2, $sub.i48(0, i2))) else $smod.i48(i1, i2)) } -function {:inline} $srem.i56(i1: i56, i2: i56) returns (i56) { (if ($ne.i56.bool($smod.i56(i1, i2), 0) && $slt.i56.bool(i1, 0)) then $sub.i56($smod.i56(i1, i2), $smax.i56(i2, $sub.i56(0, i2))) else $smod.i56(i1, i2)) } -function {:inline} $srem.i64(i1: i64, i2: i64) returns (i64) { (if ($ne.i64.bool($smod.i64(i1, i2), 0) && $slt.i64.bool(i1, 0)) then $sub.i64($smod.i64(i1, i2), $smax.i64(i2, $sub.i64(0, i2))) else $smod.i64(i1, i2)) } -function {:inline} $srem.i80(i1: i80, i2: i80) returns (i80) { (if ($ne.i80.bool($smod.i80(i1, i2), 0) && $slt.i80.bool(i1, 0)) then $sub.i80($smod.i80(i1, i2), $smax.i80(i2, $sub.i80(0, i2))) else $smod.i80(i1, i2)) } -function {:inline} $srem.i88(i1: i88, i2: i88) returns (i88) { (if ($ne.i88.bool($smod.i88(i1, i2), 0) && $slt.i88.bool(i1, 0)) then $sub.i88($smod.i88(i1, i2), $smax.i88(i2, $sub.i88(0, i2))) else $smod.i88(i1, i2)) } -function {:inline} $srem.i96(i1: i96, i2: i96) returns (i96) { (if ($ne.i96.bool($smod.i96(i1, i2), 0) && $slt.i96.bool(i1, 0)) then $sub.i96($smod.i96(i1, i2), $smax.i96(i2, $sub.i96(0, i2))) else $smod.i96(i1, i2)) } -function {:inline} $srem.i128(i1: i128, i2: i128) returns (i128) { (if ($ne.i128.bool($smod.i128(i1, i2), 0) && $slt.i128.bool(i1, 0)) then $sub.i128($smod.i128(i1, i2), $smax.i128(i2, $sub.i128(0, i2))) else $smod.i128(i1, i2)) } -function {:inline} $srem.i160(i1: i160, i2: i160) returns (i160) { (if ($ne.i160.bool($smod.i160(i1, i2), 0) && $slt.i160.bool(i1, 0)) then $sub.i160($smod.i160(i1, i2), $smax.i160(i2, $sub.i160(0, i2))) else $smod.i160(i1, i2)) } -function {:inline} $srem.i256(i1: i256, i2: i256) returns (i256) { (if ($ne.i256.bool($smod.i256(i1, i2), 0) && $slt.i256.bool(i1, 0)) then $sub.i256($smod.i256(i1, i2), $smax.i256(i2, $sub.i256(0, i2))) else $smod.i256(i1, i2)) } -function {:inline} $urem.i1(i1: i1, i2: i1) returns (i1) { $smod.i1(i1, i2) } -function {:inline} $urem.i5(i1: i5, i2: i5) returns (i5) { $smod.i5(i1, i2) } -function {:inline} $urem.i6(i1: i6, i2: i6) returns (i6) { $smod.i6(i1, i2) } -function {:inline} $urem.i8(i1: i8, i2: i8) returns (i8) { $smod.i8(i1, i2) } -function {:inline} $urem.i16(i1: i16, i2: i16) returns (i16) { $smod.i16(i1, i2) } -function {:inline} $urem.i24(i1: i24, i2: i24) returns (i24) { $smod.i24(i1, i2) } -function {:inline} $urem.i32(i1: i32, i2: i32) returns (i32) { $smod.i32(i1, i2) } -function {:inline} $urem.i33(i1: i33, i2: i33) returns (i33) { $smod.i33(i1, i2) } -function {:inline} $urem.i40(i1: i40, i2: i40) returns (i40) { $smod.i40(i1, i2) } -function {:inline} $urem.i48(i1: i48, i2: i48) returns (i48) { $smod.i48(i1, i2) } -function {:inline} $urem.i56(i1: i56, i2: i56) returns (i56) { $smod.i56(i1, i2) } -function {:inline} $urem.i64(i1: i64, i2: i64) returns (i64) { $smod.i64(i1, i2) } -function {:inline} $urem.i80(i1: i80, i2: i80) returns (i80) { $smod.i80(i1, i2) } -function {:inline} $urem.i88(i1: i88, i2: i88) returns (i88) { $smod.i88(i1, i2) } -function {:inline} $urem.i96(i1: i96, i2: i96) returns (i96) { $smod.i96(i1, i2) } -function {:inline} $urem.i128(i1: i128, i2: i128) returns (i128) { $smod.i128(i1, i2) } -function {:inline} $urem.i160(i1: i160, i2: i160) returns (i160) { $smod.i160(i1, i2) } -function {:inline} $urem.i256(i1: i256, i2: i256) returns (i256) { $smod.i256(i1, i2) } -function $shl.i1(i1: i1, i2: i1) returns (i1); -function $shl.i5(i1: i5, i2: i5) returns (i5); -function $shl.i6(i1: i6, i2: i6) returns (i6); -function $shl.i8(i1: i8, i2: i8) returns (i8); -function $shl.i16(i1: i16, i2: i16) returns (i16); -function $shl.i24(i1: i24, i2: i24) returns (i24); -function $shl.i32(i1: i32, i2: i32) returns (i32); -function $shl.i33(i1: i33, i2: i33) returns (i33); -function $shl.i40(i1: i40, i2: i40) returns (i40); -function $shl.i48(i1: i48, i2: i48) returns (i48); -function $shl.i56(i1: i56, i2: i56) returns (i56); -function $shl.i64(i1: i64, i2: i64) returns (i64); -function $shl.i80(i1: i80, i2: i80) returns (i80); -function $shl.i88(i1: i88, i2: i88) returns (i88); -function $shl.i96(i1: i96, i2: i96) returns (i96); -function $shl.i128(i1: i128, i2: i128) returns (i128); -function $shl.i160(i1: i160, i2: i160) returns (i160); -function $shl.i256(i1: i256, i2: i256) returns (i256); -function $lshr.i1(i1: i1, i2: i1) returns (i1); -function $lshr.i5(i1: i5, i2: i5) returns (i5); -function $lshr.i6(i1: i6, i2: i6) returns (i6); -function $lshr.i8(i1: i8, i2: i8) returns (i8); -function $lshr.i16(i1: i16, i2: i16) returns (i16); -function $lshr.i24(i1: i24, i2: i24) returns (i24); -function $lshr.i32(i1: i32, i2: i32) returns (i32); -function $lshr.i33(i1: i33, i2: i33) returns (i33); -function $lshr.i40(i1: i40, i2: i40) returns (i40); -function $lshr.i48(i1: i48, i2: i48) returns (i48); -function $lshr.i56(i1: i56, i2: i56) returns (i56); -function $lshr.i64(i1: i64, i2: i64) returns (i64); -function $lshr.i80(i1: i80, i2: i80) returns (i80); -function $lshr.i88(i1: i88, i2: i88) returns (i88); -function $lshr.i96(i1: i96, i2: i96) returns (i96); -function $lshr.i128(i1: i128, i2: i128) returns (i128); -function $lshr.i160(i1: i160, i2: i160) returns (i160); -function $lshr.i256(i1: i256, i2: i256) returns (i256); -function $ashr.i1(i1: i1, i2: i1) returns (i1); -function $ashr.i5(i1: i5, i2: i5) returns (i5); -function $ashr.i6(i1: i6, i2: i6) returns (i6); -function $ashr.i8(i1: i8, i2: i8) returns (i8); -function $ashr.i16(i1: i16, i2: i16) returns (i16); -function $ashr.i24(i1: i24, i2: i24) returns (i24); -function $ashr.i32(i1: i32, i2: i32) returns (i32); -function $ashr.i33(i1: i33, i2: i33) returns (i33); -function $ashr.i40(i1: i40, i2: i40) returns (i40); -function $ashr.i48(i1: i48, i2: i48) returns (i48); -function $ashr.i56(i1: i56, i2: i56) returns (i56); -function $ashr.i64(i1: i64, i2: i64) returns (i64); -function $ashr.i80(i1: i80, i2: i80) returns (i80); -function $ashr.i88(i1: i88, i2: i88) returns (i88); -function $ashr.i96(i1: i96, i2: i96) returns (i96); -function $ashr.i128(i1: i128, i2: i128) returns (i128); -function $ashr.i160(i1: i160, i2: i160) returns (i160); -function $ashr.i256(i1: i256, i2: i256) returns (i256); -function $and.i1(i1: i1, i2: i1) returns (i1); -function $and.i5(i1: i5, i2: i5) returns (i5); -function $and.i6(i1: i6, i2: i6) returns (i6); -function $and.i8(i1: i8, i2: i8) returns (i8); -function $and.i16(i1: i16, i2: i16) returns (i16); -function $and.i24(i1: i24, i2: i24) returns (i24); -function $and.i32(i1: i32, i2: i32) returns (i32); -function $and.i33(i1: i33, i2: i33) returns (i33); -function $and.i40(i1: i40, i2: i40) returns (i40); -function $and.i48(i1: i48, i2: i48) returns (i48); -function $and.i56(i1: i56, i2: i56) returns (i56); -function $and.i64(i1: i64, i2: i64) returns (i64); -function $and.i80(i1: i80, i2: i80) returns (i80); -function $and.i88(i1: i88, i2: i88) returns (i88); -function $and.i96(i1: i96, i2: i96) returns (i96); -function $and.i128(i1: i128, i2: i128) returns (i128); -function $and.i160(i1: i160, i2: i160) returns (i160); -function $and.i256(i1: i256, i2: i256) returns (i256); -function $or.i1(i1: i1, i2: i1) returns (i1); -function $or.i5(i1: i5, i2: i5) returns (i5); -function $or.i6(i1: i6, i2: i6) returns (i6); -function $or.i8(i1: i8, i2: i8) returns (i8); -function $or.i16(i1: i16, i2: i16) returns (i16); -function $or.i24(i1: i24, i2: i24) returns (i24); -function $or.i32(i1: i32, i2: i32) returns (i32); -function $or.i33(i1: i33, i2: i33) returns (i33); -function $or.i40(i1: i40, i2: i40) returns (i40); -function $or.i48(i1: i48, i2: i48) returns (i48); -function $or.i56(i1: i56, i2: i56) returns (i56); -function $or.i64(i1: i64, i2: i64) returns (i64); -function $or.i80(i1: i80, i2: i80) returns (i80); -function $or.i88(i1: i88, i2: i88) returns (i88); -function $or.i96(i1: i96, i2: i96) returns (i96); -function $or.i128(i1: i128, i2: i128) returns (i128); -function $or.i160(i1: i160, i2: i160) returns (i160); -function $or.i256(i1: i256, i2: i256) returns (i256); -function $xor.i1(i1: i1, i2: i1) returns (i1); -function $xor.i5(i1: i5, i2: i5) returns (i5); -function $xor.i6(i1: i6, i2: i6) returns (i6); -function $xor.i8(i1: i8, i2: i8) returns (i8); -function $xor.i16(i1: i16, i2: i16) returns (i16); -function $xor.i24(i1: i24, i2: i24) returns (i24); -function $xor.i32(i1: i32, i2: i32) returns (i32); -function $xor.i33(i1: i33, i2: i33) returns (i33); -function $xor.i40(i1: i40, i2: i40) returns (i40); -function $xor.i48(i1: i48, i2: i48) returns (i48); -function $xor.i56(i1: i56, i2: i56) returns (i56); -function $xor.i64(i1: i64, i2: i64) returns (i64); -function $xor.i80(i1: i80, i2: i80) returns (i80); -function $xor.i88(i1: i88, i2: i88) returns (i88); -function $xor.i96(i1: i96, i2: i96) returns (i96); -function $xor.i128(i1: i128, i2: i128) returns (i128); -function $xor.i160(i1: i160, i2: i160) returns (i160); -function $xor.i256(i1: i256, i2: i256) returns (i256); -function $nand.i1(i1: i1, i2: i1) returns (i1); -function $nand.i5(i1: i5, i2: i5) returns (i5); -function $nand.i6(i1: i6, i2: i6) returns (i6); -function $nand.i8(i1: i8, i2: i8) returns (i8); -function $nand.i16(i1: i16, i2: i16) returns (i16); -function $nand.i24(i1: i24, i2: i24) returns (i24); -function $nand.i32(i1: i32, i2: i32) returns (i32); -function $nand.i33(i1: i33, i2: i33) returns (i33); -function $nand.i40(i1: i40, i2: i40) returns (i40); -function $nand.i48(i1: i48, i2: i48) returns (i48); -function $nand.i56(i1: i56, i2: i56) returns (i56); -function $nand.i64(i1: i64, i2: i64) returns (i64); -function $nand.i80(i1: i80, i2: i80) returns (i80); -function $nand.i88(i1: i88, i2: i88) returns (i88); -function $nand.i96(i1: i96, i2: i96) returns (i96); -function $nand.i128(i1: i128, i2: i128) returns (i128); -function $nand.i160(i1: i160, i2: i160) returns (i160); -function $nand.i256(i1: i256, i2: i256) returns (i256); -function $not.i1(i: i1) returns (i1); -function $not.i5(i: i5) returns (i5); -function $not.i6(i: i6) returns (i6); -function $not.i8(i: i8) returns (i8); -function $not.i16(i: i16) returns (i16); -function $not.i24(i: i24) returns (i24); -function $not.i32(i: i32) returns (i32); -function $not.i33(i: i33) returns (i33); -function $not.i40(i: i40) returns (i40); -function $not.i48(i: i48) returns (i48); -function $not.i56(i: i56) returns (i56); -function $not.i64(i: i64) returns (i64); -function $not.i80(i: i80) returns (i80); -function $not.i88(i: i88) returns (i88); -function $not.i96(i: i96) returns (i96); -function $not.i128(i: i128) returns (i128); -function $not.i160(i: i160) returns (i160); -function $not.i256(i: i256) returns (i256); -function {:inline} $smin.i1(i1: i1, i2: i1) returns (i1) { (if $slt.i1.bool(i1, i2) then i1 else i2) } -function {:inline} $smin.i5(i1: i5, i2: i5) returns (i5) { (if $slt.i5.bool(i1, i2) then i1 else i2) } -function {:inline} $smin.i6(i1: i6, i2: i6) returns (i6) { (if $slt.i6.bool(i1, i2) then i1 else i2) } -function {:inline} $smin.i8(i1: i8, i2: i8) returns (i8) { (if $slt.i8.bool(i1, i2) then i1 else i2) } -function {:inline} $smin.i16(i1: i16, i2: i16) returns (i16) { (if $slt.i16.bool(i1, i2) then i1 else i2) } -function {:inline} $smin.i24(i1: i24, i2: i24) returns (i24) { (if $slt.i24.bool(i1, i2) then i1 else i2) } -function {:inline} $smin.i32(i1: i32, i2: i32) returns (i32) { (if $slt.i32.bool(i1, i2) then i1 else i2) } -function {:inline} $smin.i33(i1: i33, i2: i33) returns (i33) { (if $slt.i33.bool(i1, i2) then i1 else i2) } -function {:inline} $smin.i40(i1: i40, i2: i40) returns (i40) { (if $slt.i40.bool(i1, i2) then i1 else i2) } -function {:inline} $smin.i48(i1: i48, i2: i48) returns (i48) { (if $slt.i48.bool(i1, i2) then i1 else i2) } -function {:inline} $smin.i56(i1: i56, i2: i56) returns (i56) { (if $slt.i56.bool(i1, i2) then i1 else i2) } -function {:inline} $smin.i64(i1: i64, i2: i64) returns (i64) { (if $slt.i64.bool(i1, i2) then i1 else i2) } -function {:inline} $smin.i80(i1: i80, i2: i80) returns (i80) { (if $slt.i80.bool(i1, i2) then i1 else i2) } -function {:inline} $smin.i88(i1: i88, i2: i88) returns (i88) { (if $slt.i88.bool(i1, i2) then i1 else i2) } -function {:inline} $smin.i96(i1: i96, i2: i96) returns (i96) { (if $slt.i96.bool(i1, i2) then i1 else i2) } -function {:inline} $smin.i128(i1: i128, i2: i128) returns (i128) { (if $slt.i128.bool(i1, i2) then i1 else i2) } -function {:inline} $smin.i160(i1: i160, i2: i160) returns (i160) { (if $slt.i160.bool(i1, i2) then i1 else i2) } -function {:inline} $smin.i256(i1: i256, i2: i256) returns (i256) { (if $slt.i256.bool(i1, i2) then i1 else i2) } -function {:inline} $smax.i1(i1: i1, i2: i1) returns (i1) { (if $sgt.i1.bool(i1, i2) then i1 else i2) } -function {:inline} $smax.i5(i1: i5, i2: i5) returns (i5) { (if $sgt.i5.bool(i1, i2) then i1 else i2) } -function {:inline} $smax.i6(i1: i6, i2: i6) returns (i6) { (if $sgt.i6.bool(i1, i2) then i1 else i2) } -function {:inline} $smax.i8(i1: i8, i2: i8) returns (i8) { (if $sgt.i8.bool(i1, i2) then i1 else i2) } -function {:inline} $smax.i16(i1: i16, i2: i16) returns (i16) { (if $sgt.i16.bool(i1, i2) then i1 else i2) } -function {:inline} $smax.i24(i1: i24, i2: i24) returns (i24) { (if $sgt.i24.bool(i1, i2) then i1 else i2) } -function {:inline} $smax.i32(i1: i32, i2: i32) returns (i32) { (if $sgt.i32.bool(i1, i2) then i1 else i2) } -function {:inline} $smax.i33(i1: i33, i2: i33) returns (i33) { (if $sgt.i33.bool(i1, i2) then i1 else i2) } -function {:inline} $smax.i40(i1: i40, i2: i40) returns (i40) { (if $sgt.i40.bool(i1, i2) then i1 else i2) } -function {:inline} $smax.i48(i1: i48, i2: i48) returns (i48) { (if $sgt.i48.bool(i1, i2) then i1 else i2) } -function {:inline} $smax.i56(i1: i56, i2: i56) returns (i56) { (if $sgt.i56.bool(i1, i2) then i1 else i2) } -function {:inline} $smax.i64(i1: i64, i2: i64) returns (i64) { (if $sgt.i64.bool(i1, i2) then i1 else i2) } -function {:inline} $smax.i80(i1: i80, i2: i80) returns (i80) { (if $sgt.i80.bool(i1, i2) then i1 else i2) } -function {:inline} $smax.i88(i1: i88, i2: i88) returns (i88) { (if $sgt.i88.bool(i1, i2) then i1 else i2) } -function {:inline} $smax.i96(i1: i96, i2: i96) returns (i96) { (if $sgt.i96.bool(i1, i2) then i1 else i2) } -function {:inline} $smax.i128(i1: i128, i2: i128) returns (i128) { (if $sgt.i128.bool(i1, i2) then i1 else i2) } -function {:inline} $smax.i160(i1: i160, i2: i160) returns (i160) { (if $sgt.i160.bool(i1, i2) then i1 else i2) } -function {:inline} $smax.i256(i1: i256, i2: i256) returns (i256) { (if $sgt.i256.bool(i1, i2) then i1 else i2) } -function {:inline} $umin.i1(i1: i1, i2: i1) returns (i1) { (if $ult.i1.bool(i1, i2) then i1 else i2) } -function {:inline} $umin.i5(i1: i5, i2: i5) returns (i5) { (if $ult.i5.bool(i1, i2) then i1 else i2) } -function {:inline} $umin.i6(i1: i6, i2: i6) returns (i6) { (if $ult.i6.bool(i1, i2) then i1 else i2) } -function {:inline} $umin.i8(i1: i8, i2: i8) returns (i8) { (if $ult.i8.bool(i1, i2) then i1 else i2) } -function {:inline} $umin.i16(i1: i16, i2: i16) returns (i16) { (if $ult.i16.bool(i1, i2) then i1 else i2) } -function {:inline} $umin.i24(i1: i24, i2: i24) returns (i24) { (if $ult.i24.bool(i1, i2) then i1 else i2) } -function {:inline} $umin.i32(i1: i32, i2: i32) returns (i32) { (if $ult.i32.bool(i1, i2) then i1 else i2) } -function {:inline} $umin.i33(i1: i33, i2: i33) returns (i33) { (if $ult.i33.bool(i1, i2) then i1 else i2) } -function {:inline} $umin.i40(i1: i40, i2: i40) returns (i40) { (if $ult.i40.bool(i1, i2) then i1 else i2) } -function {:inline} $umin.i48(i1: i48, i2: i48) returns (i48) { (if $ult.i48.bool(i1, i2) then i1 else i2) } -function {:inline} $umin.i56(i1: i56, i2: i56) returns (i56) { (if $ult.i56.bool(i1, i2) then i1 else i2) } -function {:inline} $umin.i64(i1: i64, i2: i64) returns (i64) { (if $ult.i64.bool(i1, i2) then i1 else i2) } -function {:inline} $umin.i80(i1: i80, i2: i80) returns (i80) { (if $ult.i80.bool(i1, i2) then i1 else i2) } -function {:inline} $umin.i88(i1: i88, i2: i88) returns (i88) { (if $ult.i88.bool(i1, i2) then i1 else i2) } -function {:inline} $umin.i96(i1: i96, i2: i96) returns (i96) { (if $ult.i96.bool(i1, i2) then i1 else i2) } -function {:inline} $umin.i128(i1: i128, i2: i128) returns (i128) { (if $ult.i128.bool(i1, i2) then i1 else i2) } -function {:inline} $umin.i160(i1: i160, i2: i160) returns (i160) { (if $ult.i160.bool(i1, i2) then i1 else i2) } -function {:inline} $umin.i256(i1: i256, i2: i256) returns (i256) { (if $ult.i256.bool(i1, i2) then i1 else i2) } -function {:inline} $umax.i1(i1: i1, i2: i1) returns (i1) { (if $ugt.i1.bool(i1, i2) then i1 else i2) } -function {:inline} $umax.i5(i1: i5, i2: i5) returns (i5) { (if $ugt.i5.bool(i1, i2) then i1 else i2) } -function {:inline} $umax.i6(i1: i6, i2: i6) returns (i6) { (if $ugt.i6.bool(i1, i2) then i1 else i2) } -function {:inline} $umax.i8(i1: i8, i2: i8) returns (i8) { (if $ugt.i8.bool(i1, i2) then i1 else i2) } -function {:inline} $umax.i16(i1: i16, i2: i16) returns (i16) { (if $ugt.i16.bool(i1, i2) then i1 else i2) } -function {:inline} $umax.i24(i1: i24, i2: i24) returns (i24) { (if $ugt.i24.bool(i1, i2) then i1 else i2) } -function {:inline} $umax.i32(i1: i32, i2: i32) returns (i32) { (if $ugt.i32.bool(i1, i2) then i1 else i2) } -function {:inline} $umax.i33(i1: i33, i2: i33) returns (i33) { (if $ugt.i33.bool(i1, i2) then i1 else i2) } -function {:inline} $umax.i40(i1: i40, i2: i40) returns (i40) { (if $ugt.i40.bool(i1, i2) then i1 else i2) } -function {:inline} $umax.i48(i1: i48, i2: i48) returns (i48) { (if $ugt.i48.bool(i1, i2) then i1 else i2) } -function {:inline} $umax.i56(i1: i56, i2: i56) returns (i56) { (if $ugt.i56.bool(i1, i2) then i1 else i2) } -function {:inline} $umax.i64(i1: i64, i2: i64) returns (i64) { (if $ugt.i64.bool(i1, i2) then i1 else i2) } -function {:inline} $umax.i80(i1: i80, i2: i80) returns (i80) { (if $ugt.i80.bool(i1, i2) then i1 else i2) } -function {:inline} $umax.i88(i1: i88, i2: i88) returns (i88) { (if $ugt.i88.bool(i1, i2) then i1 else i2) } -function {:inline} $umax.i96(i1: i96, i2: i96) returns (i96) { (if $ugt.i96.bool(i1, i2) then i1 else i2) } -function {:inline} $umax.i128(i1: i128, i2: i128) returns (i128) { (if $ugt.i128.bool(i1, i2) then i1 else i2) } -function {:inline} $umax.i160(i1: i160, i2: i160) returns (i160) { (if $ugt.i160.bool(i1, i2) then i1 else i2) } -function {:inline} $umax.i256(i1: i256, i2: i256) returns (i256) { (if $ugt.i256.bool(i1, i2) then i1 else i2) } -axiom ($and.i1(0, 0) == 0); -axiom ($or.i1(0, 0) == 0); -axiom ($xor.i1(0, 0) == 0); -axiom ($and.i1(0, 1) == 0); -axiom ($or.i1(0, 1) == 1); -axiom ($xor.i1(0, 1) == 1); -axiom ($and.i1(1, 0) == 0); -axiom ($or.i1(1, 0) == 1); -axiom ($xor.i1(1, 0) == 1); -axiom ($and.i1(1, 1) == 1); -axiom ($or.i1(1, 1) == 1); -axiom ($xor.i1(1, 1) == 0); -axiom ($and.i32(32, 16) == 0); -// Integer predicates -function {:inline} $ule.i1.bool(i1: i1, i2: i1) returns (bool) { (i1 <= i2) } -function {:inline} $ule.i1(i1: i1, i2: i1) returns (i1) { (if $ule.i1.bool(i1, i2) then 1 else 0) } -function {:inline} $ule.i5.bool(i1: i5, i2: i5) returns (bool) { (i1 <= i2) } -function {:inline} $ule.i5(i1: i5, i2: i5) returns (i1) { (if $ule.i5.bool(i1, i2) then 1 else 0) } -function {:inline} $ule.i6.bool(i1: i6, i2: i6) returns (bool) { (i1 <= i2) } -function {:inline} $ule.i6(i1: i6, i2: i6) returns (i1) { (if $ule.i6.bool(i1, i2) then 1 else 0) } -function {:inline} $ule.i8.bool(i1: i8, i2: i8) returns (bool) { (i1 <= i2) } -function {:inline} $ule.i8(i1: i8, i2: i8) returns (i1) { (if $ule.i8.bool(i1, i2) then 1 else 0) } -function {:inline} $ule.i16.bool(i1: i16, i2: i16) returns (bool) { (i1 <= i2) } -function {:inline} $ule.i16(i1: i16, i2: i16) returns (i1) { (if $ule.i16.bool(i1, i2) then 1 else 0) } -function {:inline} $ule.i24.bool(i1: i24, i2: i24) returns (bool) { (i1 <= i2) } -function {:inline} $ule.i24(i1: i24, i2: i24) returns (i1) { (if $ule.i24.bool(i1, i2) then 1 else 0) } -function {:inline} $ule.i32.bool(i1: i32, i2: i32) returns (bool) { (i1 <= i2) } -function {:inline} $ule.i32(i1: i32, i2: i32) returns (i1) { (if $ule.i32.bool(i1, i2) then 1 else 0) } -function {:inline} $ule.i33.bool(i1: i33, i2: i33) returns (bool) { (i1 <= i2) } -function {:inline} $ule.i33(i1: i33, i2: i33) returns (i1) { (if $ule.i33.bool(i1, i2) then 1 else 0) } -function {:inline} $ule.i40.bool(i1: i40, i2: i40) returns (bool) { (i1 <= i2) } -function {:inline} $ule.i40(i1: i40, i2: i40) returns (i1) { (if $ule.i40.bool(i1, i2) then 1 else 0) } -function {:inline} $ule.i48.bool(i1: i48, i2: i48) returns (bool) { (i1 <= i2) } -function {:inline} $ule.i48(i1: i48, i2: i48) returns (i1) { (if $ule.i48.bool(i1, i2) then 1 else 0) } -function {:inline} $ule.i56.bool(i1: i56, i2: i56) returns (bool) { (i1 <= i2) } -function {:inline} $ule.i56(i1: i56, i2: i56) returns (i1) { (if $ule.i56.bool(i1, i2) then 1 else 0) } -function {:inline} $ule.i64.bool(i1: i64, i2: i64) returns (bool) { (i1 <= i2) } -function {:inline} $ule.i64(i1: i64, i2: i64) returns (i1) { (if $ule.i64.bool(i1, i2) then 1 else 0) } -function {:inline} $ule.i80.bool(i1: i80, i2: i80) returns (bool) { (i1 <= i2) } -function {:inline} $ule.i80(i1: i80, i2: i80) returns (i1) { (if $ule.i80.bool(i1, i2) then 1 else 0) } -function {:inline} $ule.i88.bool(i1: i88, i2: i88) returns (bool) { (i1 <= i2) } -function {:inline} $ule.i88(i1: i88, i2: i88) returns (i1) { (if $ule.i88.bool(i1, i2) then 1 else 0) } -function {:inline} $ule.i96.bool(i1: i96, i2: i96) returns (bool) { (i1 <= i2) } -function {:inline} $ule.i96(i1: i96, i2: i96) returns (i1) { (if $ule.i96.bool(i1, i2) then 1 else 0) } -function {:inline} $ule.i128.bool(i1: i128, i2: i128) returns (bool) { (i1 <= i2) } -function {:inline} $ule.i128(i1: i128, i2: i128) returns (i1) { (if $ule.i128.bool(i1, i2) then 1 else 0) } -function {:inline} $ule.i160.bool(i1: i160, i2: i160) returns (bool) { (i1 <= i2) } -function {:inline} $ule.i160(i1: i160, i2: i160) returns (i1) { (if $ule.i160.bool(i1, i2) then 1 else 0) } -function {:inline} $ule.i256.bool(i1: i256, i2: i256) returns (bool) { (i1 <= i2) } -function {:inline} $ule.i256(i1: i256, i2: i256) returns (i1) { (if $ule.i256.bool(i1, i2) then 1 else 0) } -function {:inline} $ult.i1.bool(i1: i1, i2: i1) returns (bool) { (i1 < i2) } -function {:inline} $ult.i1(i1: i1, i2: i1) returns (i1) { (if $ult.i1.bool(i1, i2) then 1 else 0) } -function {:inline} $ult.i5.bool(i1: i5, i2: i5) returns (bool) { (i1 < i2) } -function {:inline} $ult.i5(i1: i5, i2: i5) returns (i1) { (if $ult.i5.bool(i1, i2) then 1 else 0) } -function {:inline} $ult.i6.bool(i1: i6, i2: i6) returns (bool) { (i1 < i2) } -function {:inline} $ult.i6(i1: i6, i2: i6) returns (i1) { (if $ult.i6.bool(i1, i2) then 1 else 0) } -function {:inline} $ult.i8.bool(i1: i8, i2: i8) returns (bool) { (i1 < i2) } -function {:inline} $ult.i8(i1: i8, i2: i8) returns (i1) { (if $ult.i8.bool(i1, i2) then 1 else 0) } -function {:inline} $ult.i16.bool(i1: i16, i2: i16) returns (bool) { (i1 < i2) } -function {:inline} $ult.i16(i1: i16, i2: i16) returns (i1) { (if $ult.i16.bool(i1, i2) then 1 else 0) } -function {:inline} $ult.i24.bool(i1: i24, i2: i24) returns (bool) { (i1 < i2) } -function {:inline} $ult.i24(i1: i24, i2: i24) returns (i1) { (if $ult.i24.bool(i1, i2) then 1 else 0) } -function {:inline} $ult.i32.bool(i1: i32, i2: i32) returns (bool) { (i1 < i2) } -function {:inline} $ult.i32(i1: i32, i2: i32) returns (i1) { (if $ult.i32.bool(i1, i2) then 1 else 0) } -function {:inline} $ult.i33.bool(i1: i33, i2: i33) returns (bool) { (i1 < i2) } -function {:inline} $ult.i33(i1: i33, i2: i33) returns (i1) { (if $ult.i33.bool(i1, i2) then 1 else 0) } -function {:inline} $ult.i40.bool(i1: i40, i2: i40) returns (bool) { (i1 < i2) } -function {:inline} $ult.i40(i1: i40, i2: i40) returns (i1) { (if $ult.i40.bool(i1, i2) then 1 else 0) } -function {:inline} $ult.i48.bool(i1: i48, i2: i48) returns (bool) { (i1 < i2) } -function {:inline} $ult.i48(i1: i48, i2: i48) returns (i1) { (if $ult.i48.bool(i1, i2) then 1 else 0) } -function {:inline} $ult.i56.bool(i1: i56, i2: i56) returns (bool) { (i1 < i2) } -function {:inline} $ult.i56(i1: i56, i2: i56) returns (i1) { (if $ult.i56.bool(i1, i2) then 1 else 0) } -function {:inline} $ult.i64.bool(i1: i64, i2: i64) returns (bool) { (i1 < i2) } -function {:inline} $ult.i64(i1: i64, i2: i64) returns (i1) { (if $ult.i64.bool(i1, i2) then 1 else 0) } -function {:inline} $ult.i80.bool(i1: i80, i2: i80) returns (bool) { (i1 < i2) } -function {:inline} $ult.i80(i1: i80, i2: i80) returns (i1) { (if $ult.i80.bool(i1, i2) then 1 else 0) } -function {:inline} $ult.i88.bool(i1: i88, i2: i88) returns (bool) { (i1 < i2) } -function {:inline} $ult.i88(i1: i88, i2: i88) returns (i1) { (if $ult.i88.bool(i1, i2) then 1 else 0) } -function {:inline} $ult.i96.bool(i1: i96, i2: i96) returns (bool) { (i1 < i2) } -function {:inline} $ult.i96(i1: i96, i2: i96) returns (i1) { (if $ult.i96.bool(i1, i2) then 1 else 0) } -function {:inline} $ult.i128.bool(i1: i128, i2: i128) returns (bool) { (i1 < i2) } -function {:inline} $ult.i128(i1: i128, i2: i128) returns (i1) { (if $ult.i128.bool(i1, i2) then 1 else 0) } -function {:inline} $ult.i160.bool(i1: i160, i2: i160) returns (bool) { (i1 < i2) } -function {:inline} $ult.i160(i1: i160, i2: i160) returns (i1) { (if $ult.i160.bool(i1, i2) then 1 else 0) } -function {:inline} $ult.i256.bool(i1: i256, i2: i256) returns (bool) { (i1 < i2) } -function {:inline} $ult.i256(i1: i256, i2: i256) returns (i1) { (if $ult.i256.bool(i1, i2) then 1 else 0) } -function {:inline} $uge.i1.bool(i1: i1, i2: i1) returns (bool) { (i1 >= i2) } -function {:inline} $uge.i1(i1: i1, i2: i1) returns (i1) { (if $uge.i1.bool(i1, i2) then 1 else 0) } -function {:inline} $uge.i5.bool(i1: i5, i2: i5) returns (bool) { (i1 >= i2) } -function {:inline} $uge.i5(i1: i5, i2: i5) returns (i1) { (if $uge.i5.bool(i1, i2) then 1 else 0) } -function {:inline} $uge.i6.bool(i1: i6, i2: i6) returns (bool) { (i1 >= i2) } -function {:inline} $uge.i6(i1: i6, i2: i6) returns (i1) { (if $uge.i6.bool(i1, i2) then 1 else 0) } -function {:inline} $uge.i8.bool(i1: i8, i2: i8) returns (bool) { (i1 >= i2) } -function {:inline} $uge.i8(i1: i8, i2: i8) returns (i1) { (if $uge.i8.bool(i1, i2) then 1 else 0) } -function {:inline} $uge.i16.bool(i1: i16, i2: i16) returns (bool) { (i1 >= i2) } -function {:inline} $uge.i16(i1: i16, i2: i16) returns (i1) { (if $uge.i16.bool(i1, i2) then 1 else 0) } -function {:inline} $uge.i24.bool(i1: i24, i2: i24) returns (bool) { (i1 >= i2) } -function {:inline} $uge.i24(i1: i24, i2: i24) returns (i1) { (if $uge.i24.bool(i1, i2) then 1 else 0) } -function {:inline} $uge.i32.bool(i1: i32, i2: i32) returns (bool) { (i1 >= i2) } -function {:inline} $uge.i32(i1: i32, i2: i32) returns (i1) { (if $uge.i32.bool(i1, i2) then 1 else 0) } -function {:inline} $uge.i33.bool(i1: i33, i2: i33) returns (bool) { (i1 >= i2) } -function {:inline} $uge.i33(i1: i33, i2: i33) returns (i1) { (if $uge.i33.bool(i1, i2) then 1 else 0) } -function {:inline} $uge.i40.bool(i1: i40, i2: i40) returns (bool) { (i1 >= i2) } -function {:inline} $uge.i40(i1: i40, i2: i40) returns (i1) { (if $uge.i40.bool(i1, i2) then 1 else 0) } -function {:inline} $uge.i48.bool(i1: i48, i2: i48) returns (bool) { (i1 >= i2) } -function {:inline} $uge.i48(i1: i48, i2: i48) returns (i1) { (if $uge.i48.bool(i1, i2) then 1 else 0) } -function {:inline} $uge.i56.bool(i1: i56, i2: i56) returns (bool) { (i1 >= i2) } -function {:inline} $uge.i56(i1: i56, i2: i56) returns (i1) { (if $uge.i56.bool(i1, i2) then 1 else 0) } -function {:inline} $uge.i64.bool(i1: i64, i2: i64) returns (bool) { (i1 >= i2) } -function {:inline} $uge.i64(i1: i64, i2: i64) returns (i1) { (if $uge.i64.bool(i1, i2) then 1 else 0) } -function {:inline} $uge.i80.bool(i1: i80, i2: i80) returns (bool) { (i1 >= i2) } -function {:inline} $uge.i80(i1: i80, i2: i80) returns (i1) { (if $uge.i80.bool(i1, i2) then 1 else 0) } -function {:inline} $uge.i88.bool(i1: i88, i2: i88) returns (bool) { (i1 >= i2) } -function {:inline} $uge.i88(i1: i88, i2: i88) returns (i1) { (if $uge.i88.bool(i1, i2) then 1 else 0) } -function {:inline} $uge.i96.bool(i1: i96, i2: i96) returns (bool) { (i1 >= i2) } -function {:inline} $uge.i96(i1: i96, i2: i96) returns (i1) { (if $uge.i96.bool(i1, i2) then 1 else 0) } -function {:inline} $uge.i128.bool(i1: i128, i2: i128) returns (bool) { (i1 >= i2) } -function {:inline} $uge.i128(i1: i128, i2: i128) returns (i1) { (if $uge.i128.bool(i1, i2) then 1 else 0) } -function {:inline} $uge.i160.bool(i1: i160, i2: i160) returns (bool) { (i1 >= i2) } -function {:inline} $uge.i160(i1: i160, i2: i160) returns (i1) { (if $uge.i160.bool(i1, i2) then 1 else 0) } -function {:inline} $uge.i256.bool(i1: i256, i2: i256) returns (bool) { (i1 >= i2) } -function {:inline} $uge.i256(i1: i256, i2: i256) returns (i1) { (if $uge.i256.bool(i1, i2) then 1 else 0) } -function {:inline} $ugt.i1.bool(i1: i1, i2: i1) returns (bool) { (i1 > i2) } -function {:inline} $ugt.i1(i1: i1, i2: i1) returns (i1) { (if $ugt.i1.bool(i1, i2) then 1 else 0) } -function {:inline} $ugt.i5.bool(i1: i5, i2: i5) returns (bool) { (i1 > i2) } -function {:inline} $ugt.i5(i1: i5, i2: i5) returns (i1) { (if $ugt.i5.bool(i1, i2) then 1 else 0) } -function {:inline} $ugt.i6.bool(i1: i6, i2: i6) returns (bool) { (i1 > i2) } -function {:inline} $ugt.i6(i1: i6, i2: i6) returns (i1) { (if $ugt.i6.bool(i1, i2) then 1 else 0) } -function {:inline} $ugt.i8.bool(i1: i8, i2: i8) returns (bool) { (i1 > i2) } -function {:inline} $ugt.i8(i1: i8, i2: i8) returns (i1) { (if $ugt.i8.bool(i1, i2) then 1 else 0) } -function {:inline} $ugt.i16.bool(i1: i16, i2: i16) returns (bool) { (i1 > i2) } -function {:inline} $ugt.i16(i1: i16, i2: i16) returns (i1) { (if $ugt.i16.bool(i1, i2) then 1 else 0) } -function {:inline} $ugt.i24.bool(i1: i24, i2: i24) returns (bool) { (i1 > i2) } -function {:inline} $ugt.i24(i1: i24, i2: i24) returns (i1) { (if $ugt.i24.bool(i1, i2) then 1 else 0) } -function {:inline} $ugt.i32.bool(i1: i32, i2: i32) returns (bool) { (i1 > i2) } -function {:inline} $ugt.i32(i1: i32, i2: i32) returns (i1) { (if $ugt.i32.bool(i1, i2) then 1 else 0) } -function {:inline} $ugt.i33.bool(i1: i33, i2: i33) returns (bool) { (i1 > i2) } -function {:inline} $ugt.i33(i1: i33, i2: i33) returns (i1) { (if $ugt.i33.bool(i1, i2) then 1 else 0) } -function {:inline} $ugt.i40.bool(i1: i40, i2: i40) returns (bool) { (i1 > i2) } -function {:inline} $ugt.i40(i1: i40, i2: i40) returns (i1) { (if $ugt.i40.bool(i1, i2) then 1 else 0) } -function {:inline} $ugt.i48.bool(i1: i48, i2: i48) returns (bool) { (i1 > i2) } -function {:inline} $ugt.i48(i1: i48, i2: i48) returns (i1) { (if $ugt.i48.bool(i1, i2) then 1 else 0) } -function {:inline} $ugt.i56.bool(i1: i56, i2: i56) returns (bool) { (i1 > i2) } -function {:inline} $ugt.i56(i1: i56, i2: i56) returns (i1) { (if $ugt.i56.bool(i1, i2) then 1 else 0) } -function {:inline} $ugt.i64.bool(i1: i64, i2: i64) returns (bool) { (i1 > i2) } -function {:inline} $ugt.i64(i1: i64, i2: i64) returns (i1) { (if $ugt.i64.bool(i1, i2) then 1 else 0) } -function {:inline} $ugt.i80.bool(i1: i80, i2: i80) returns (bool) { (i1 > i2) } -function {:inline} $ugt.i80(i1: i80, i2: i80) returns (i1) { (if $ugt.i80.bool(i1, i2) then 1 else 0) } -function {:inline} $ugt.i88.bool(i1: i88, i2: i88) returns (bool) { (i1 > i2) } -function {:inline} $ugt.i88(i1: i88, i2: i88) returns (i1) { (if $ugt.i88.bool(i1, i2) then 1 else 0) } -function {:inline} $ugt.i96.bool(i1: i96, i2: i96) returns (bool) { (i1 > i2) } -function {:inline} $ugt.i96(i1: i96, i2: i96) returns (i1) { (if $ugt.i96.bool(i1, i2) then 1 else 0) } -function {:inline} $ugt.i128.bool(i1: i128, i2: i128) returns (bool) { (i1 > i2) } -function {:inline} $ugt.i128(i1: i128, i2: i128) returns (i1) { (if $ugt.i128.bool(i1, i2) then 1 else 0) } -function {:inline} $ugt.i160.bool(i1: i160, i2: i160) returns (bool) { (i1 > i2) } -function {:inline} $ugt.i160(i1: i160, i2: i160) returns (i1) { (if $ugt.i160.bool(i1, i2) then 1 else 0) } -function {:inline} $ugt.i256.bool(i1: i256, i2: i256) returns (bool) { (i1 > i2) } -function {:inline} $ugt.i256(i1: i256, i2: i256) returns (i1) { (if $ugt.i256.bool(i1, i2) then 1 else 0) } -function {:inline} $sle.i1.bool(i1: i1, i2: i1) returns (bool) { (i1 <= i2) } -function {:inline} $sle.i1(i1: i1, i2: i1) returns (i1) { (if $sle.i1.bool(i1, i2) then 1 else 0) } -function {:inline} $sle.i5.bool(i1: i5, i2: i5) returns (bool) { (i1 <= i2) } -function {:inline} $sle.i5(i1: i5, i2: i5) returns (i1) { (if $sle.i5.bool(i1, i2) then 1 else 0) } -function {:inline} $sle.i6.bool(i1: i6, i2: i6) returns (bool) { (i1 <= i2) } -function {:inline} $sle.i6(i1: i6, i2: i6) returns (i1) { (if $sle.i6.bool(i1, i2) then 1 else 0) } -function {:inline} $sle.i8.bool(i1: i8, i2: i8) returns (bool) { (i1 <= i2) } -function {:inline} $sle.i8(i1: i8, i2: i8) returns (i1) { (if $sle.i8.bool(i1, i2) then 1 else 0) } -function {:inline} $sle.i16.bool(i1: i16, i2: i16) returns (bool) { (i1 <= i2) } -function {:inline} $sle.i16(i1: i16, i2: i16) returns (i1) { (if $sle.i16.bool(i1, i2) then 1 else 0) } -function {:inline} $sle.i24.bool(i1: i24, i2: i24) returns (bool) { (i1 <= i2) } -function {:inline} $sle.i24(i1: i24, i2: i24) returns (i1) { (if $sle.i24.bool(i1, i2) then 1 else 0) } -function {:inline} $sle.i32.bool(i1: i32, i2: i32) returns (bool) { (i1 <= i2) } -function {:inline} $sle.i32(i1: i32, i2: i32) returns (i1) { (if $sle.i32.bool(i1, i2) then 1 else 0) } -function {:inline} $sle.i33.bool(i1: i33, i2: i33) returns (bool) { (i1 <= i2) } -function {:inline} $sle.i33(i1: i33, i2: i33) returns (i1) { (if $sle.i33.bool(i1, i2) then 1 else 0) } -function {:inline} $sle.i40.bool(i1: i40, i2: i40) returns (bool) { (i1 <= i2) } -function {:inline} $sle.i40(i1: i40, i2: i40) returns (i1) { (if $sle.i40.bool(i1, i2) then 1 else 0) } -function {:inline} $sle.i48.bool(i1: i48, i2: i48) returns (bool) { (i1 <= i2) } -function {:inline} $sle.i48(i1: i48, i2: i48) returns (i1) { (if $sle.i48.bool(i1, i2) then 1 else 0) } -function {:inline} $sle.i56.bool(i1: i56, i2: i56) returns (bool) { (i1 <= i2) } -function {:inline} $sle.i56(i1: i56, i2: i56) returns (i1) { (if $sle.i56.bool(i1, i2) then 1 else 0) } -function {:inline} $sle.i64.bool(i1: i64, i2: i64) returns (bool) { (i1 <= i2) } -function {:inline} $sle.i64(i1: i64, i2: i64) returns (i1) { (if $sle.i64.bool(i1, i2) then 1 else 0) } -function {:inline} $sle.i80.bool(i1: i80, i2: i80) returns (bool) { (i1 <= i2) } -function {:inline} $sle.i80(i1: i80, i2: i80) returns (i1) { (if $sle.i80.bool(i1, i2) then 1 else 0) } -function {:inline} $sle.i88.bool(i1: i88, i2: i88) returns (bool) { (i1 <= i2) } -function {:inline} $sle.i88(i1: i88, i2: i88) returns (i1) { (if $sle.i88.bool(i1, i2) then 1 else 0) } -function {:inline} $sle.i96.bool(i1: i96, i2: i96) returns (bool) { (i1 <= i2) } -function {:inline} $sle.i96(i1: i96, i2: i96) returns (i1) { (if $sle.i96.bool(i1, i2) then 1 else 0) } -function {:inline} $sle.i128.bool(i1: i128, i2: i128) returns (bool) { (i1 <= i2) } -function {:inline} $sle.i128(i1: i128, i2: i128) returns (i1) { (if $sle.i128.bool(i1, i2) then 1 else 0) } -function {:inline} $sle.i160.bool(i1: i160, i2: i160) returns (bool) { (i1 <= i2) } -function {:inline} $sle.i160(i1: i160, i2: i160) returns (i1) { (if $sle.i160.bool(i1, i2) then 1 else 0) } -function {:inline} $sle.i256.bool(i1: i256, i2: i256) returns (bool) { (i1 <= i2) } -function {:inline} $sle.i256(i1: i256, i2: i256) returns (i1) { (if $sle.i256.bool(i1, i2) then 1 else 0) } -function {:inline} $slt.i1.bool(i1: i1, i2: i1) returns (bool) { (i1 < i2) } -function {:inline} $slt.i1(i1: i1, i2: i1) returns (i1) { (if $slt.i1.bool(i1, i2) then 1 else 0) } -function {:inline} $slt.i5.bool(i1: i5, i2: i5) returns (bool) { (i1 < i2) } -function {:inline} $slt.i5(i1: i5, i2: i5) returns (i1) { (if $slt.i5.bool(i1, i2) then 1 else 0) } -function {:inline} $slt.i6.bool(i1: i6, i2: i6) returns (bool) { (i1 < i2) } -function {:inline} $slt.i6(i1: i6, i2: i6) returns (i1) { (if $slt.i6.bool(i1, i2) then 1 else 0) } -function {:inline} $slt.i8.bool(i1: i8, i2: i8) returns (bool) { (i1 < i2) } -function {:inline} $slt.i8(i1: i8, i2: i8) returns (i1) { (if $slt.i8.bool(i1, i2) then 1 else 0) } -function {:inline} $slt.i16.bool(i1: i16, i2: i16) returns (bool) { (i1 < i2) } -function {:inline} $slt.i16(i1: i16, i2: i16) returns (i1) { (if $slt.i16.bool(i1, i2) then 1 else 0) } -function {:inline} $slt.i24.bool(i1: i24, i2: i24) returns (bool) { (i1 < i2) } -function {:inline} $slt.i24(i1: i24, i2: i24) returns (i1) { (if $slt.i24.bool(i1, i2) then 1 else 0) } -function {:inline} $slt.i32.bool(i1: i32, i2: i32) returns (bool) { (i1 < i2) } -function {:inline} $slt.i32(i1: i32, i2: i32) returns (i1) { (if $slt.i32.bool(i1, i2) then 1 else 0) } -function {:inline} $slt.i33.bool(i1: i33, i2: i33) returns (bool) { (i1 < i2) } -function {:inline} $slt.i33(i1: i33, i2: i33) returns (i1) { (if $slt.i33.bool(i1, i2) then 1 else 0) } -function {:inline} $slt.i40.bool(i1: i40, i2: i40) returns (bool) { (i1 < i2) } -function {:inline} $slt.i40(i1: i40, i2: i40) returns (i1) { (if $slt.i40.bool(i1, i2) then 1 else 0) } -function {:inline} $slt.i48.bool(i1: i48, i2: i48) returns (bool) { (i1 < i2) } -function {:inline} $slt.i48(i1: i48, i2: i48) returns (i1) { (if $slt.i48.bool(i1, i2) then 1 else 0) } -function {:inline} $slt.i56.bool(i1: i56, i2: i56) returns (bool) { (i1 < i2) } -function {:inline} $slt.i56(i1: i56, i2: i56) returns (i1) { (if $slt.i56.bool(i1, i2) then 1 else 0) } -function {:inline} $slt.i64.bool(i1: i64, i2: i64) returns (bool) { (i1 < i2) } -function {:inline} $slt.i64(i1: i64, i2: i64) returns (i1) { (if $slt.i64.bool(i1, i2) then 1 else 0) } -function {:inline} $slt.i80.bool(i1: i80, i2: i80) returns (bool) { (i1 < i2) } -function {:inline} $slt.i80(i1: i80, i2: i80) returns (i1) { (if $slt.i80.bool(i1, i2) then 1 else 0) } -function {:inline} $slt.i88.bool(i1: i88, i2: i88) returns (bool) { (i1 < i2) } -function {:inline} $slt.i88(i1: i88, i2: i88) returns (i1) { (if $slt.i88.bool(i1, i2) then 1 else 0) } -function {:inline} $slt.i96.bool(i1: i96, i2: i96) returns (bool) { (i1 < i2) } -function {:inline} $slt.i96(i1: i96, i2: i96) returns (i1) { (if $slt.i96.bool(i1, i2) then 1 else 0) } -function {:inline} $slt.i128.bool(i1: i128, i2: i128) returns (bool) { (i1 < i2) } -function {:inline} $slt.i128(i1: i128, i2: i128) returns (i1) { (if $slt.i128.bool(i1, i2) then 1 else 0) } -function {:inline} $slt.i160.bool(i1: i160, i2: i160) returns (bool) { (i1 < i2) } -function {:inline} $slt.i160(i1: i160, i2: i160) returns (i1) { (if $slt.i160.bool(i1, i2) then 1 else 0) } -function {:inline} $slt.i256.bool(i1: i256, i2: i256) returns (bool) { (i1 < i2) } -function {:inline} $slt.i256(i1: i256, i2: i256) returns (i1) { (if $slt.i256.bool(i1, i2) then 1 else 0) } -function {:inline} $sge.i1.bool(i1: i1, i2: i1) returns (bool) { (i1 >= i2) } -function {:inline} $sge.i1(i1: i1, i2: i1) returns (i1) { (if $sge.i1.bool(i1, i2) then 1 else 0) } -function {:inline} $sge.i5.bool(i1: i5, i2: i5) returns (bool) { (i1 >= i2) } -function {:inline} $sge.i5(i1: i5, i2: i5) returns (i1) { (if $sge.i5.bool(i1, i2) then 1 else 0) } -function {:inline} $sge.i6.bool(i1: i6, i2: i6) returns (bool) { (i1 >= i2) } -function {:inline} $sge.i6(i1: i6, i2: i6) returns (i1) { (if $sge.i6.bool(i1, i2) then 1 else 0) } -function {:inline} $sge.i8.bool(i1: i8, i2: i8) returns (bool) { (i1 >= i2) } -function {:inline} $sge.i8(i1: i8, i2: i8) returns (i1) { (if $sge.i8.bool(i1, i2) then 1 else 0) } -function {:inline} $sge.i16.bool(i1: i16, i2: i16) returns (bool) { (i1 >= i2) } -function {:inline} $sge.i16(i1: i16, i2: i16) returns (i1) { (if $sge.i16.bool(i1, i2) then 1 else 0) } -function {:inline} $sge.i24.bool(i1: i24, i2: i24) returns (bool) { (i1 >= i2) } -function {:inline} $sge.i24(i1: i24, i2: i24) returns (i1) { (if $sge.i24.bool(i1, i2) then 1 else 0) } -function {:inline} $sge.i32.bool(i1: i32, i2: i32) returns (bool) { (i1 >= i2) } -function {:inline} $sge.i32(i1: i32, i2: i32) returns (i1) { (if $sge.i32.bool(i1, i2) then 1 else 0) } -function {:inline} $sge.i33.bool(i1: i33, i2: i33) returns (bool) { (i1 >= i2) } -function {:inline} $sge.i33(i1: i33, i2: i33) returns (i1) { (if $sge.i33.bool(i1, i2) then 1 else 0) } -function {:inline} $sge.i40.bool(i1: i40, i2: i40) returns (bool) { (i1 >= i2) } -function {:inline} $sge.i40(i1: i40, i2: i40) returns (i1) { (if $sge.i40.bool(i1, i2) then 1 else 0) } -function {:inline} $sge.i48.bool(i1: i48, i2: i48) returns (bool) { (i1 >= i2) } -function {:inline} $sge.i48(i1: i48, i2: i48) returns (i1) { (if $sge.i48.bool(i1, i2) then 1 else 0) } -function {:inline} $sge.i56.bool(i1: i56, i2: i56) returns (bool) { (i1 >= i2) } -function {:inline} $sge.i56(i1: i56, i2: i56) returns (i1) { (if $sge.i56.bool(i1, i2) then 1 else 0) } -function {:inline} $sge.i64.bool(i1: i64, i2: i64) returns (bool) { (i1 >= i2) } -function {:inline} $sge.i64(i1: i64, i2: i64) returns (i1) { (if $sge.i64.bool(i1, i2) then 1 else 0) } -function {:inline} $sge.i80.bool(i1: i80, i2: i80) returns (bool) { (i1 >= i2) } -function {:inline} $sge.i80(i1: i80, i2: i80) returns (i1) { (if $sge.i80.bool(i1, i2) then 1 else 0) } -function {:inline} $sge.i88.bool(i1: i88, i2: i88) returns (bool) { (i1 >= i2) } -function {:inline} $sge.i88(i1: i88, i2: i88) returns (i1) { (if $sge.i88.bool(i1, i2) then 1 else 0) } -function {:inline} $sge.i96.bool(i1: i96, i2: i96) returns (bool) { (i1 >= i2) } -function {:inline} $sge.i96(i1: i96, i2: i96) returns (i1) { (if $sge.i96.bool(i1, i2) then 1 else 0) } -function {:inline} $sge.i128.bool(i1: i128, i2: i128) returns (bool) { (i1 >= i2) } -function {:inline} $sge.i128(i1: i128, i2: i128) returns (i1) { (if $sge.i128.bool(i1, i2) then 1 else 0) } -function {:inline} $sge.i160.bool(i1: i160, i2: i160) returns (bool) { (i1 >= i2) } -function {:inline} $sge.i160(i1: i160, i2: i160) returns (i1) { (if $sge.i160.bool(i1, i2) then 1 else 0) } -function {:inline} $sge.i256.bool(i1: i256, i2: i256) returns (bool) { (i1 >= i2) } -function {:inline} $sge.i256(i1: i256, i2: i256) returns (i1) { (if $sge.i256.bool(i1, i2) then 1 else 0) } -function {:inline} $sgt.i1.bool(i1: i1, i2: i1) returns (bool) { (i1 > i2) } -function {:inline} $sgt.i1(i1: i1, i2: i1) returns (i1) { (if $sgt.i1.bool(i1, i2) then 1 else 0) } -function {:inline} $sgt.i5.bool(i1: i5, i2: i5) returns (bool) { (i1 > i2) } -function {:inline} $sgt.i5(i1: i5, i2: i5) returns (i1) { (if $sgt.i5.bool(i1, i2) then 1 else 0) } -function {:inline} $sgt.i6.bool(i1: i6, i2: i6) returns (bool) { (i1 > i2) } -function {:inline} $sgt.i6(i1: i6, i2: i6) returns (i1) { (if $sgt.i6.bool(i1, i2) then 1 else 0) } -function {:inline} $sgt.i8.bool(i1: i8, i2: i8) returns (bool) { (i1 > i2) } -function {:inline} $sgt.i8(i1: i8, i2: i8) returns (i1) { (if $sgt.i8.bool(i1, i2) then 1 else 0) } -function {:inline} $sgt.i16.bool(i1: i16, i2: i16) returns (bool) { (i1 > i2) } -function {:inline} $sgt.i16(i1: i16, i2: i16) returns (i1) { (if $sgt.i16.bool(i1, i2) then 1 else 0) } -function {:inline} $sgt.i24.bool(i1: i24, i2: i24) returns (bool) { (i1 > i2) } -function {:inline} $sgt.i24(i1: i24, i2: i24) returns (i1) { (if $sgt.i24.bool(i1, i2) then 1 else 0) } -function {:inline} $sgt.i32.bool(i1: i32, i2: i32) returns (bool) { (i1 > i2) } -function {:inline} $sgt.i32(i1: i32, i2: i32) returns (i1) { (if $sgt.i32.bool(i1, i2) then 1 else 0) } -function {:inline} $sgt.i33.bool(i1: i33, i2: i33) returns (bool) { (i1 > i2) } -function {:inline} $sgt.i33(i1: i33, i2: i33) returns (i1) { (if $sgt.i33.bool(i1, i2) then 1 else 0) } -function {:inline} $sgt.i40.bool(i1: i40, i2: i40) returns (bool) { (i1 > i2) } -function {:inline} $sgt.i40(i1: i40, i2: i40) returns (i1) { (if $sgt.i40.bool(i1, i2) then 1 else 0) } -function {:inline} $sgt.i48.bool(i1: i48, i2: i48) returns (bool) { (i1 > i2) } -function {:inline} $sgt.i48(i1: i48, i2: i48) returns (i1) { (if $sgt.i48.bool(i1, i2) then 1 else 0) } -function {:inline} $sgt.i56.bool(i1: i56, i2: i56) returns (bool) { (i1 > i2) } -function {:inline} $sgt.i56(i1: i56, i2: i56) returns (i1) { (if $sgt.i56.bool(i1, i2) then 1 else 0) } -function {:inline} $sgt.i64.bool(i1: i64, i2: i64) returns (bool) { (i1 > i2) } -function {:inline} $sgt.i64(i1: i64, i2: i64) returns (i1) { (if $sgt.i64.bool(i1, i2) then 1 else 0) } -function {:inline} $sgt.i80.bool(i1: i80, i2: i80) returns (bool) { (i1 > i2) } -function {:inline} $sgt.i80(i1: i80, i2: i80) returns (i1) { (if $sgt.i80.bool(i1, i2) then 1 else 0) } -function {:inline} $sgt.i88.bool(i1: i88, i2: i88) returns (bool) { (i1 > i2) } -function {:inline} $sgt.i88(i1: i88, i2: i88) returns (i1) { (if $sgt.i88.bool(i1, i2) then 1 else 0) } -function {:inline} $sgt.i96.bool(i1: i96, i2: i96) returns (bool) { (i1 > i2) } -function {:inline} $sgt.i96(i1: i96, i2: i96) returns (i1) { (if $sgt.i96.bool(i1, i2) then 1 else 0) } -function {:inline} $sgt.i128.bool(i1: i128, i2: i128) returns (bool) { (i1 > i2) } -function {:inline} $sgt.i128(i1: i128, i2: i128) returns (i1) { (if $sgt.i128.bool(i1, i2) then 1 else 0) } -function {:inline} $sgt.i160.bool(i1: i160, i2: i160) returns (bool) { (i1 > i2) } -function {:inline} $sgt.i160(i1: i160, i2: i160) returns (i1) { (if $sgt.i160.bool(i1, i2) then 1 else 0) } -function {:inline} $sgt.i256.bool(i1: i256, i2: i256) returns (bool) { (i1 > i2) } -function {:inline} $sgt.i256(i1: i256, i2: i256) returns (i1) { (if $sgt.i256.bool(i1, i2) then 1 else 0) } -function {:inline} $eq.i1.bool(i1: i1, i2: i1) returns (bool) { (i1 == i2) } -function {:inline} $eq.i1(i1: i1, i2: i1) returns (i1) { (if $eq.i1.bool(i1, i2) then 1 else 0) } -function {:inline} $eq.i5.bool(i1: i5, i2: i5) returns (bool) { (i1 == i2) } -function {:inline} $eq.i5(i1: i5, i2: i5) returns (i1) { (if $eq.i5.bool(i1, i2) then 1 else 0) } -function {:inline} $eq.i6.bool(i1: i6, i2: i6) returns (bool) { (i1 == i2) } -function {:inline} $eq.i6(i1: i6, i2: i6) returns (i1) { (if $eq.i6.bool(i1, i2) then 1 else 0) } -function {:inline} $eq.i8.bool(i1: i8, i2: i8) returns (bool) { (i1 == i2) } -function {:inline} $eq.i8(i1: i8, i2: i8) returns (i1) { (if $eq.i8.bool(i1, i2) then 1 else 0) } -function {:inline} $eq.i16.bool(i1: i16, i2: i16) returns (bool) { (i1 == i2) } -function {:inline} $eq.i16(i1: i16, i2: i16) returns (i1) { (if $eq.i16.bool(i1, i2) then 1 else 0) } -function {:inline} $eq.i24.bool(i1: i24, i2: i24) returns (bool) { (i1 == i2) } -function {:inline} $eq.i24(i1: i24, i2: i24) returns (i1) { (if $eq.i24.bool(i1, i2) then 1 else 0) } -function {:inline} $eq.i32.bool(i1: i32, i2: i32) returns (bool) { (i1 == i2) } -function {:inline} $eq.i32(i1: i32, i2: i32) returns (i1) { (if $eq.i32.bool(i1, i2) then 1 else 0) } -function {:inline} $eq.i33.bool(i1: i33, i2: i33) returns (bool) { (i1 == i2) } -function {:inline} $eq.i33(i1: i33, i2: i33) returns (i1) { (if $eq.i33.bool(i1, i2) then 1 else 0) } -function {:inline} $eq.i40.bool(i1: i40, i2: i40) returns (bool) { (i1 == i2) } -function {:inline} $eq.i40(i1: i40, i2: i40) returns (i1) { (if $eq.i40.bool(i1, i2) then 1 else 0) } -function {:inline} $eq.i48.bool(i1: i48, i2: i48) returns (bool) { (i1 == i2) } -function {:inline} $eq.i48(i1: i48, i2: i48) returns (i1) { (if $eq.i48.bool(i1, i2) then 1 else 0) } -function {:inline} $eq.i56.bool(i1: i56, i2: i56) returns (bool) { (i1 == i2) } -function {:inline} $eq.i56(i1: i56, i2: i56) returns (i1) { (if $eq.i56.bool(i1, i2) then 1 else 0) } -function {:inline} $eq.i64.bool(i1: i64, i2: i64) returns (bool) { (i1 == i2) } -function {:inline} $eq.i64(i1: i64, i2: i64) returns (i1) { (if $eq.i64.bool(i1, i2) then 1 else 0) } -function {:inline} $eq.i80.bool(i1: i80, i2: i80) returns (bool) { (i1 == i2) } -function {:inline} $eq.i80(i1: i80, i2: i80) returns (i1) { (if $eq.i80.bool(i1, i2) then 1 else 0) } -function {:inline} $eq.i88.bool(i1: i88, i2: i88) returns (bool) { (i1 == i2) } -function {:inline} $eq.i88(i1: i88, i2: i88) returns (i1) { (if $eq.i88.bool(i1, i2) then 1 else 0) } -function {:inline} $eq.i96.bool(i1: i96, i2: i96) returns (bool) { (i1 == i2) } -function {:inline} $eq.i96(i1: i96, i2: i96) returns (i1) { (if $eq.i96.bool(i1, i2) then 1 else 0) } -function {:inline} $eq.i128.bool(i1: i128, i2: i128) returns (bool) { (i1 == i2) } -function {:inline} $eq.i128(i1: i128, i2: i128) returns (i1) { (if $eq.i128.bool(i1, i2) then 1 else 0) } -function {:inline} $eq.i160.bool(i1: i160, i2: i160) returns (bool) { (i1 == i2) } -function {:inline} $eq.i160(i1: i160, i2: i160) returns (i1) { (if $eq.i160.bool(i1, i2) then 1 else 0) } -function {:inline} $eq.i256.bool(i1: i256, i2: i256) returns (bool) { (i1 == i2) } -function {:inline} $eq.i256(i1: i256, i2: i256) returns (i1) { (if $eq.i256.bool(i1, i2) then 1 else 0) } -function {:inline} $ne.i1.bool(i1: i1, i2: i1) returns (bool) { (i1 != i2) } -function {:inline} $ne.i1(i1: i1, i2: i1) returns (i1) { (if $ne.i1.bool(i1, i2) then 1 else 0) } -function {:inline} $ne.i5.bool(i1: i5, i2: i5) returns (bool) { (i1 != i2) } -function {:inline} $ne.i5(i1: i5, i2: i5) returns (i1) { (if $ne.i5.bool(i1, i2) then 1 else 0) } -function {:inline} $ne.i6.bool(i1: i6, i2: i6) returns (bool) { (i1 != i2) } -function {:inline} $ne.i6(i1: i6, i2: i6) returns (i1) { (if $ne.i6.bool(i1, i2) then 1 else 0) } -function {:inline} $ne.i8.bool(i1: i8, i2: i8) returns (bool) { (i1 != i2) } -function {:inline} $ne.i8(i1: i8, i2: i8) returns (i1) { (if $ne.i8.bool(i1, i2) then 1 else 0) } -function {:inline} $ne.i16.bool(i1: i16, i2: i16) returns (bool) { (i1 != i2) } -function {:inline} $ne.i16(i1: i16, i2: i16) returns (i1) { (if $ne.i16.bool(i1, i2) then 1 else 0) } -function {:inline} $ne.i24.bool(i1: i24, i2: i24) returns (bool) { (i1 != i2) } -function {:inline} $ne.i24(i1: i24, i2: i24) returns (i1) { (if $ne.i24.bool(i1, i2) then 1 else 0) } -function {:inline} $ne.i32.bool(i1: i32, i2: i32) returns (bool) { (i1 != i2) } -function {:inline} $ne.i32(i1: i32, i2: i32) returns (i1) { (if $ne.i32.bool(i1, i2) then 1 else 0) } -function {:inline} $ne.i33.bool(i1: i33, i2: i33) returns (bool) { (i1 != i2) } -function {:inline} $ne.i33(i1: i33, i2: i33) returns (i1) { (if $ne.i33.bool(i1, i2) then 1 else 0) } -function {:inline} $ne.i40.bool(i1: i40, i2: i40) returns (bool) { (i1 != i2) } -function {:inline} $ne.i40(i1: i40, i2: i40) returns (i1) { (if $ne.i40.bool(i1, i2) then 1 else 0) } -function {:inline} $ne.i48.bool(i1: i48, i2: i48) returns (bool) { (i1 != i2) } -function {:inline} $ne.i48(i1: i48, i2: i48) returns (i1) { (if $ne.i48.bool(i1, i2) then 1 else 0) } -function {:inline} $ne.i56.bool(i1: i56, i2: i56) returns (bool) { (i1 != i2) } -function {:inline} $ne.i56(i1: i56, i2: i56) returns (i1) { (if $ne.i56.bool(i1, i2) then 1 else 0) } -function {:inline} $ne.i64.bool(i1: i64, i2: i64) returns (bool) { (i1 != i2) } -function {:inline} $ne.i64(i1: i64, i2: i64) returns (i1) { (if $ne.i64.bool(i1, i2) then 1 else 0) } -function {:inline} $ne.i80.bool(i1: i80, i2: i80) returns (bool) { (i1 != i2) } -function {:inline} $ne.i80(i1: i80, i2: i80) returns (i1) { (if $ne.i80.bool(i1, i2) then 1 else 0) } -function {:inline} $ne.i88.bool(i1: i88, i2: i88) returns (bool) { (i1 != i2) } -function {:inline} $ne.i88(i1: i88, i2: i88) returns (i1) { (if $ne.i88.bool(i1, i2) then 1 else 0) } -function {:inline} $ne.i96.bool(i1: i96, i2: i96) returns (bool) { (i1 != i2) } -function {:inline} $ne.i96(i1: i96, i2: i96) returns (i1) { (if $ne.i96.bool(i1, i2) then 1 else 0) } -function {:inline} $ne.i128.bool(i1: i128, i2: i128) returns (bool) { (i1 != i2) } -function {:inline} $ne.i128(i1: i128, i2: i128) returns (i1) { (if $ne.i128.bool(i1, i2) then 1 else 0) } -function {:inline} $ne.i160.bool(i1: i160, i2: i160) returns (bool) { (i1 != i2) } -function {:inline} $ne.i160(i1: i160, i2: i160) returns (i1) { (if $ne.i160.bool(i1, i2) then 1 else 0) } -function {:inline} $ne.i256.bool(i1: i256, i2: i256) returns (bool) { (i1 != i2) } -function {:inline} $ne.i256(i1: i256, i2: i256) returns (i1) { (if $ne.i256.bool(i1, i2) then 1 else 0) } -// Integer load/store operations -function {:inline} $load.i1(M: [ref] i1, p: ref) returns (i1) { M[p] } -function {:inline} $store.i1(M: [ref] i1, p: ref, i: i1) returns ([ref] i1) { M[p := i] } -function {:inline} $load.i5(M: [ref] i5, p: ref) returns (i5) { M[p] } -function {:inline} $store.i5(M: [ref] i5, p: ref, i: i5) returns ([ref] i5) { M[p := i] } -function {:inline} $load.i6(M: [ref] i6, p: ref) returns (i6) { M[p] } -function {:inline} $store.i6(M: [ref] i6, p: ref, i: i6) returns ([ref] i6) { M[p := i] } -function {:inline} $load.i8(M: [ref] i8, p: ref) returns (i8) { M[p] } -function {:inline} $store.i8(M: [ref] i8, p: ref, i: i8) returns ([ref] i8) { M[p := i] } -function {:inline} $load.i16(M: [ref] i16, p: ref) returns (i16) { M[p] } -function {:inline} $store.i16(M: [ref] i16, p: ref, i: i16) returns ([ref] i16) { M[p := i] } -function {:inline} $load.i24(M: [ref] i24, p: ref) returns (i24) { M[p] } -function {:inline} $store.i24(M: [ref] i24, p: ref, i: i24) returns ([ref] i24) { M[p := i] } -function {:inline} $load.i32(M: [ref] i32, p: ref) returns (i32) { M[p] } -function {:inline} $store.i32(M: [ref] i32, p: ref, i: i32) returns ([ref] i32) { M[p := i] } -function {:inline} $load.i33(M: [ref] i33, p: ref) returns (i33) { M[p] } -function {:inline} $store.i33(M: [ref] i33, p: ref, i: i33) returns ([ref] i33) { M[p := i] } -function {:inline} $load.i40(M: [ref] i40, p: ref) returns (i40) { M[p] } -function {:inline} $store.i40(M: [ref] i40, p: ref, i: i40) returns ([ref] i40) { M[p := i] } -function {:inline} $load.i48(M: [ref] i48, p: ref) returns (i48) { M[p] } -function {:inline} $store.i48(M: [ref] i48, p: ref, i: i48) returns ([ref] i48) { M[p := i] } -function {:inline} $load.i56(M: [ref] i56, p: ref) returns (i56) { M[p] } -function {:inline} $store.i56(M: [ref] i56, p: ref, i: i56) returns ([ref] i56) { M[p := i] } -function {:inline} $load.i64(M: [ref] i64, p: ref) returns (i64) { M[p] } -function {:inline} $store.i64(M: [ref] i64, p: ref, i: i64) returns ([ref] i64) { M[p := i] } -function {:inline} $load.i80(M: [ref] i80, p: ref) returns (i80) { M[p] } -function {:inline} $store.i80(M: [ref] i80, p: ref, i: i80) returns ([ref] i80) { M[p := i] } -function {:inline} $load.i88(M: [ref] i88, p: ref) returns (i88) { M[p] } -function {:inline} $store.i88(M: [ref] i88, p: ref, i: i88) returns ([ref] i88) { M[p := i] } -function {:inline} $load.i96(M: [ref] i96, p: ref) returns (i96) { M[p] } -function {:inline} $store.i96(M: [ref] i96, p: ref, i: i96) returns ([ref] i96) { M[p := i] } -function {:inline} $load.i128(M: [ref] i128, p: ref) returns (i128) { M[p] } -function {:inline} $store.i128(M: [ref] i128, p: ref, i: i128) returns ([ref] i128) { M[p := i] } -function {:inline} $load.i160(M: [ref] i160, p: ref) returns (i160) { M[p] } -function {:inline} $store.i160(M: [ref] i160, p: ref, i: i160) returns ([ref] i160) { M[p := i] } -function {:inline} $load.i256(M: [ref] i256, p: ref) returns (i256) { M[p] } -function {:inline} $store.i256(M: [ref] i256, p: ref, i: i256) returns ([ref] i256) { M[p := i] } -// Conversion between integer types -function {:inline} $trunc.i5.i1(i: i5) returns (i1) { i } -function {:inline} $trunc.i6.i1(i: i6) returns (i1) { i } -function {:inline} $trunc.i8.i1(i: i8) returns (i1) { i } -function {:inline} $trunc.i16.i1(i: i16) returns (i1) { i } -function {:inline} $trunc.i24.i1(i: i24) returns (i1) { i } -function {:inline} $trunc.i32.i1(i: i32) returns (i1) { i } -function {:inline} $trunc.i33.i1(i: i33) returns (i1) { i } -function {:inline} $trunc.i40.i1(i: i40) returns (i1) { i } -function {:inline} $trunc.i48.i1(i: i48) returns (i1) { i } -function {:inline} $trunc.i56.i1(i: i56) returns (i1) { i } -function {:inline} $trunc.i64.i1(i: i64) returns (i1) { i } -function {:inline} $trunc.i80.i1(i: i80) returns (i1) { i } -function {:inline} $trunc.i88.i1(i: i88) returns (i1) { i } -function {:inline} $trunc.i96.i1(i: i96) returns (i1) { i } -function {:inline} $trunc.i128.i1(i: i128) returns (i1) { i } -function {:inline} $trunc.i160.i1(i: i160) returns (i1) { i } -function {:inline} $trunc.i256.i1(i: i256) returns (i1) { i } -function {:inline} $trunc.i6.i5(i: i6) returns (i5) { i } -function {:inline} $trunc.i8.i5(i: i8) returns (i5) { i } -function {:inline} $trunc.i16.i5(i: i16) returns (i5) { i } -function {:inline} $trunc.i24.i5(i: i24) returns (i5) { i } -function {:inline} $trunc.i32.i5(i: i32) returns (i5) { i } -function {:inline} $trunc.i33.i5(i: i33) returns (i5) { i } -function {:inline} $trunc.i40.i5(i: i40) returns (i5) { i } -function {:inline} $trunc.i48.i5(i: i48) returns (i5) { i } -function {:inline} $trunc.i56.i5(i: i56) returns (i5) { i } -function {:inline} $trunc.i64.i5(i: i64) returns (i5) { i } -function {:inline} $trunc.i80.i5(i: i80) returns (i5) { i } -function {:inline} $trunc.i88.i5(i: i88) returns (i5) { i } -function {:inline} $trunc.i96.i5(i: i96) returns (i5) { i } -function {:inline} $trunc.i128.i5(i: i128) returns (i5) { i } -function {:inline} $trunc.i160.i5(i: i160) returns (i5) { i } -function {:inline} $trunc.i256.i5(i: i256) returns (i5) { i } -function {:inline} $trunc.i8.i6(i: i8) returns (i6) { i } -function {:inline} $trunc.i16.i6(i: i16) returns (i6) { i } -function {:inline} $trunc.i24.i6(i: i24) returns (i6) { i } -function {:inline} $trunc.i32.i6(i: i32) returns (i6) { i } -function {:inline} $trunc.i33.i6(i: i33) returns (i6) { i } -function {:inline} $trunc.i40.i6(i: i40) returns (i6) { i } -function {:inline} $trunc.i48.i6(i: i48) returns (i6) { i } -function {:inline} $trunc.i56.i6(i: i56) returns (i6) { i } -function {:inline} $trunc.i64.i6(i: i64) returns (i6) { i } -function {:inline} $trunc.i80.i6(i: i80) returns (i6) { i } -function {:inline} $trunc.i88.i6(i: i88) returns (i6) { i } -function {:inline} $trunc.i96.i6(i: i96) returns (i6) { i } -function {:inline} $trunc.i128.i6(i: i128) returns (i6) { i } -function {:inline} $trunc.i160.i6(i: i160) returns (i6) { i } -function {:inline} $trunc.i256.i6(i: i256) returns (i6) { i } -function {:inline} $trunc.i16.i8(i: i16) returns (i8) { i } -function {:inline} $trunc.i24.i8(i: i24) returns (i8) { i } -function {:inline} $trunc.i32.i8(i: i32) returns (i8) { i } -function {:inline} $trunc.i33.i8(i: i33) returns (i8) { i } -function {:inline} $trunc.i40.i8(i: i40) returns (i8) { i } -function {:inline} $trunc.i48.i8(i: i48) returns (i8) { i } -function {:inline} $trunc.i56.i8(i: i56) returns (i8) { i } -function {:inline} $trunc.i64.i8(i: i64) returns (i8) { i } -function {:inline} $trunc.i80.i8(i: i80) returns (i8) { i } -function {:inline} $trunc.i88.i8(i: i88) returns (i8) { i } -function {:inline} $trunc.i96.i8(i: i96) returns (i8) { i } -function {:inline} $trunc.i128.i8(i: i128) returns (i8) { i } -function {:inline} $trunc.i160.i8(i: i160) returns (i8) { i } -function {:inline} $trunc.i256.i8(i: i256) returns (i8) { i } -function {:inline} $trunc.i24.i16(i: i24) returns (i16) { i } -function {:inline} $trunc.i32.i16(i: i32) returns (i16) { i } -function {:inline} $trunc.i33.i16(i: i33) returns (i16) { i } -function {:inline} $trunc.i40.i16(i: i40) returns (i16) { i } -function {:inline} $trunc.i48.i16(i: i48) returns (i16) { i } -function {:inline} $trunc.i56.i16(i: i56) returns (i16) { i } -function {:inline} $trunc.i64.i16(i: i64) returns (i16) { i } -function {:inline} $trunc.i80.i16(i: i80) returns (i16) { i } -function {:inline} $trunc.i88.i16(i: i88) returns (i16) { i } -function {:inline} $trunc.i96.i16(i: i96) returns (i16) { i } -function {:inline} $trunc.i128.i16(i: i128) returns (i16) { i } -function {:inline} $trunc.i160.i16(i: i160) returns (i16) { i } -function {:inline} $trunc.i256.i16(i: i256) returns (i16) { i } -function {:inline} $trunc.i32.i24(i: i32) returns (i24) { i } -function {:inline} $trunc.i33.i24(i: i33) returns (i24) { i } -function {:inline} $trunc.i40.i24(i: i40) returns (i24) { i } -function {:inline} $trunc.i48.i24(i: i48) returns (i24) { i } -function {:inline} $trunc.i56.i24(i: i56) returns (i24) { i } -function {:inline} $trunc.i64.i24(i: i64) returns (i24) { i } -function {:inline} $trunc.i80.i24(i: i80) returns (i24) { i } -function {:inline} $trunc.i88.i24(i: i88) returns (i24) { i } -function {:inline} $trunc.i96.i24(i: i96) returns (i24) { i } -function {:inline} $trunc.i128.i24(i: i128) returns (i24) { i } -function {:inline} $trunc.i160.i24(i: i160) returns (i24) { i } -function {:inline} $trunc.i256.i24(i: i256) returns (i24) { i } -function {:inline} $trunc.i33.i32(i: i33) returns (i32) { i } -function {:inline} $trunc.i40.i32(i: i40) returns (i32) { i } -function {:inline} $trunc.i48.i32(i: i48) returns (i32) { i } -function {:inline} $trunc.i56.i32(i: i56) returns (i32) { i } -function {:inline} $trunc.i64.i32(i: i64) returns (i32) { i } -function {:inline} $trunc.i80.i32(i: i80) returns (i32) { i } -function {:inline} $trunc.i88.i32(i: i88) returns (i32) { i } -function {:inline} $trunc.i96.i32(i: i96) returns (i32) { i } -function {:inline} $trunc.i128.i32(i: i128) returns (i32) { i } -function {:inline} $trunc.i160.i32(i: i160) returns (i32) { i } -function {:inline} $trunc.i256.i32(i: i256) returns (i32) { i } -function {:inline} $trunc.i40.i33(i: i40) returns (i33) { i } -function {:inline} $trunc.i48.i33(i: i48) returns (i33) { i } -function {:inline} $trunc.i56.i33(i: i56) returns (i33) { i } -function {:inline} $trunc.i64.i33(i: i64) returns (i33) { i } -function {:inline} $trunc.i80.i33(i: i80) returns (i33) { i } -function {:inline} $trunc.i88.i33(i: i88) returns (i33) { i } -function {:inline} $trunc.i96.i33(i: i96) returns (i33) { i } -function {:inline} $trunc.i128.i33(i: i128) returns (i33) { i } -function {:inline} $trunc.i160.i33(i: i160) returns (i33) { i } -function {:inline} $trunc.i256.i33(i: i256) returns (i33) { i } -function {:inline} $trunc.i48.i40(i: i48) returns (i40) { i } -function {:inline} $trunc.i56.i40(i: i56) returns (i40) { i } -function {:inline} $trunc.i64.i40(i: i64) returns (i40) { i } -function {:inline} $trunc.i80.i40(i: i80) returns (i40) { i } -function {:inline} $trunc.i88.i40(i: i88) returns (i40) { i } -function {:inline} $trunc.i96.i40(i: i96) returns (i40) { i } -function {:inline} $trunc.i128.i40(i: i128) returns (i40) { i } -function {:inline} $trunc.i160.i40(i: i160) returns (i40) { i } -function {:inline} $trunc.i256.i40(i: i256) returns (i40) { i } -function {:inline} $trunc.i56.i48(i: i56) returns (i48) { i } -function {:inline} $trunc.i64.i48(i: i64) returns (i48) { i } -function {:inline} $trunc.i80.i48(i: i80) returns (i48) { i } -function {:inline} $trunc.i88.i48(i: i88) returns (i48) { i } -function {:inline} $trunc.i96.i48(i: i96) returns (i48) { i } -function {:inline} $trunc.i128.i48(i: i128) returns (i48) { i } -function {:inline} $trunc.i160.i48(i: i160) returns (i48) { i } -function {:inline} $trunc.i256.i48(i: i256) returns (i48) { i } -function {:inline} $trunc.i64.i56(i: i64) returns (i56) { i } -function {:inline} $trunc.i80.i56(i: i80) returns (i56) { i } -function {:inline} $trunc.i88.i56(i: i88) returns (i56) { i } -function {:inline} $trunc.i96.i56(i: i96) returns (i56) { i } -function {:inline} $trunc.i128.i56(i: i128) returns (i56) { i } -function {:inline} $trunc.i160.i56(i: i160) returns (i56) { i } -function {:inline} $trunc.i256.i56(i: i256) returns (i56) { i } -function {:inline} $trunc.i80.i64(i: i80) returns (i64) { i } -function {:inline} $trunc.i88.i64(i: i88) returns (i64) { i } -function {:inline} $trunc.i96.i64(i: i96) returns (i64) { i } -function {:inline} $trunc.i128.i64(i: i128) returns (i64) { i } -function {:inline} $trunc.i160.i64(i: i160) returns (i64) { i } -function {:inline} $trunc.i256.i64(i: i256) returns (i64) { i } -function {:inline} $trunc.i88.i80(i: i88) returns (i80) { i } -function {:inline} $trunc.i96.i80(i: i96) returns (i80) { i } -function {:inline} $trunc.i128.i80(i: i128) returns (i80) { i } -function {:inline} $trunc.i160.i80(i: i160) returns (i80) { i } -function {:inline} $trunc.i256.i80(i: i256) returns (i80) { i } -function {:inline} $trunc.i96.i88(i: i96) returns (i88) { i } -function {:inline} $trunc.i128.i88(i: i128) returns (i88) { i } -function {:inline} $trunc.i160.i88(i: i160) returns (i88) { i } -function {:inline} $trunc.i256.i88(i: i256) returns (i88) { i } -function {:inline} $trunc.i128.i96(i: i128) returns (i96) { i } -function {:inline} $trunc.i160.i96(i: i160) returns (i96) { i } -function {:inline} $trunc.i256.i96(i: i256) returns (i96) { i } -function {:inline} $trunc.i160.i128(i: i160) returns (i128) { i } -function {:inline} $trunc.i256.i128(i: i256) returns (i128) { i } -function {:inline} $trunc.i256.i160(i: i256) returns (i160) { i } -function {:inline} $sext.i1.i5(i: i1) returns (i5) { i } -function {:inline} $sext.i1.i6(i: i1) returns (i6) { i } -function {:inline} $sext.i1.i8(i: i1) returns (i8) { i } -function {:inline} $sext.i1.i16(i: i1) returns (i16) { i } -function {:inline} $sext.i1.i24(i: i1) returns (i24) { i } -function {:inline} $sext.i1.i32(i: i1) returns (i32) { i } -function {:inline} $sext.i1.i33(i: i1) returns (i33) { i } -function {:inline} $sext.i1.i40(i: i1) returns (i40) { i } -function {:inline} $sext.i1.i48(i: i1) returns (i48) { i } -function {:inline} $sext.i1.i56(i: i1) returns (i56) { i } -function {:inline} $sext.i1.i64(i: i1) returns (i64) { i } -function {:inline} $sext.i1.i80(i: i1) returns (i80) { i } -function {:inline} $sext.i1.i88(i: i1) returns (i88) { i } -function {:inline} $sext.i1.i96(i: i1) returns (i96) { i } -function {:inline} $sext.i1.i128(i: i1) returns (i128) { i } -function {:inline} $sext.i1.i160(i: i1) returns (i160) { i } -function {:inline} $sext.i1.i256(i: i1) returns (i256) { i } -function {:inline} $sext.i5.i6(i: i5) returns (i6) { i } -function {:inline} $sext.i5.i8(i: i5) returns (i8) { i } -function {:inline} $sext.i5.i16(i: i5) returns (i16) { i } -function {:inline} $sext.i5.i24(i: i5) returns (i24) { i } -function {:inline} $sext.i5.i32(i: i5) returns (i32) { i } -function {:inline} $sext.i5.i33(i: i5) returns (i33) { i } -function {:inline} $sext.i5.i40(i: i5) returns (i40) { i } -function {:inline} $sext.i5.i48(i: i5) returns (i48) { i } -function {:inline} $sext.i5.i56(i: i5) returns (i56) { i } -function {:inline} $sext.i5.i64(i: i5) returns (i64) { i } -function {:inline} $sext.i5.i80(i: i5) returns (i80) { i } -function {:inline} $sext.i5.i88(i: i5) returns (i88) { i } -function {:inline} $sext.i5.i96(i: i5) returns (i96) { i } -function {:inline} $sext.i5.i128(i: i5) returns (i128) { i } -function {:inline} $sext.i5.i160(i: i5) returns (i160) { i } -function {:inline} $sext.i5.i256(i: i5) returns (i256) { i } -function {:inline} $sext.i6.i8(i: i6) returns (i8) { i } -function {:inline} $sext.i6.i16(i: i6) returns (i16) { i } -function {:inline} $sext.i6.i24(i: i6) returns (i24) { i } -function {:inline} $sext.i6.i32(i: i6) returns (i32) { i } -function {:inline} $sext.i6.i33(i: i6) returns (i33) { i } -function {:inline} $sext.i6.i40(i: i6) returns (i40) { i } -function {:inline} $sext.i6.i48(i: i6) returns (i48) { i } -function {:inline} $sext.i6.i56(i: i6) returns (i56) { i } -function {:inline} $sext.i6.i64(i: i6) returns (i64) { i } -function {:inline} $sext.i6.i80(i: i6) returns (i80) { i } -function {:inline} $sext.i6.i88(i: i6) returns (i88) { i } -function {:inline} $sext.i6.i96(i: i6) returns (i96) { i } -function {:inline} $sext.i6.i128(i: i6) returns (i128) { i } -function {:inline} $sext.i6.i160(i: i6) returns (i160) { i } -function {:inline} $sext.i6.i256(i: i6) returns (i256) { i } -function {:inline} $sext.i8.i16(i: i8) returns (i16) { i } -function {:inline} $sext.i8.i24(i: i8) returns (i24) { i } -function {:inline} $sext.i8.i32(i: i8) returns (i32) { i } -function {:inline} $sext.i8.i33(i: i8) returns (i33) { i } -function {:inline} $sext.i8.i40(i: i8) returns (i40) { i } -function {:inline} $sext.i8.i48(i: i8) returns (i48) { i } -function {:inline} $sext.i8.i56(i: i8) returns (i56) { i } -function {:inline} $sext.i8.i64(i: i8) returns (i64) { i } -function {:inline} $sext.i8.i80(i: i8) returns (i80) { i } -function {:inline} $sext.i8.i88(i: i8) returns (i88) { i } -function {:inline} $sext.i8.i96(i: i8) returns (i96) { i } -function {:inline} $sext.i8.i128(i: i8) returns (i128) { i } -function {:inline} $sext.i8.i160(i: i8) returns (i160) { i } -function {:inline} $sext.i8.i256(i: i8) returns (i256) { i } -function {:inline} $sext.i16.i24(i: i16) returns (i24) { i } -function {:inline} $sext.i16.i32(i: i16) returns (i32) { i } -function {:inline} $sext.i16.i33(i: i16) returns (i33) { i } -function {:inline} $sext.i16.i40(i: i16) returns (i40) { i } -function {:inline} $sext.i16.i48(i: i16) returns (i48) { i } -function {:inline} $sext.i16.i56(i: i16) returns (i56) { i } -function {:inline} $sext.i16.i64(i: i16) returns (i64) { i } -function {:inline} $sext.i16.i80(i: i16) returns (i80) { i } -function {:inline} $sext.i16.i88(i: i16) returns (i88) { i } -function {:inline} $sext.i16.i96(i: i16) returns (i96) { i } -function {:inline} $sext.i16.i128(i: i16) returns (i128) { i } -function {:inline} $sext.i16.i160(i: i16) returns (i160) { i } -function {:inline} $sext.i16.i256(i: i16) returns (i256) { i } -function {:inline} $sext.i24.i32(i: i24) returns (i32) { i } -function {:inline} $sext.i24.i33(i: i24) returns (i33) { i } -function {:inline} $sext.i24.i40(i: i24) returns (i40) { i } -function {:inline} $sext.i24.i48(i: i24) returns (i48) { i } -function {:inline} $sext.i24.i56(i: i24) returns (i56) { i } -function {:inline} $sext.i24.i64(i: i24) returns (i64) { i } -function {:inline} $sext.i24.i80(i: i24) returns (i80) { i } -function {:inline} $sext.i24.i88(i: i24) returns (i88) { i } -function {:inline} $sext.i24.i96(i: i24) returns (i96) { i } -function {:inline} $sext.i24.i128(i: i24) returns (i128) { i } -function {:inline} $sext.i24.i160(i: i24) returns (i160) { i } -function {:inline} $sext.i24.i256(i: i24) returns (i256) { i } -function {:inline} $sext.i32.i33(i: i32) returns (i33) { i } -function {:inline} $sext.i32.i40(i: i32) returns (i40) { i } -function {:inline} $sext.i32.i48(i: i32) returns (i48) { i } -function {:inline} $sext.i32.i56(i: i32) returns (i56) { i } -function {:inline} $sext.i32.i64(i: i32) returns (i64) { i } -function {:inline} $sext.i32.i80(i: i32) returns (i80) { i } -function {:inline} $sext.i32.i88(i: i32) returns (i88) { i } -function {:inline} $sext.i32.i96(i: i32) returns (i96) { i } -function {:inline} $sext.i32.i128(i: i32) returns (i128) { i } -function {:inline} $sext.i32.i160(i: i32) returns (i160) { i } -function {:inline} $sext.i32.i256(i: i32) returns (i256) { i } -function {:inline} $sext.i33.i40(i: i33) returns (i40) { i } -function {:inline} $sext.i33.i48(i: i33) returns (i48) { i } -function {:inline} $sext.i33.i56(i: i33) returns (i56) { i } -function {:inline} $sext.i33.i64(i: i33) returns (i64) { i } -function {:inline} $sext.i33.i80(i: i33) returns (i80) { i } -function {:inline} $sext.i33.i88(i: i33) returns (i88) { i } -function {:inline} $sext.i33.i96(i: i33) returns (i96) { i } -function {:inline} $sext.i33.i128(i: i33) returns (i128) { i } -function {:inline} $sext.i33.i160(i: i33) returns (i160) { i } -function {:inline} $sext.i33.i256(i: i33) returns (i256) { i } -function {:inline} $sext.i40.i48(i: i40) returns (i48) { i } -function {:inline} $sext.i40.i56(i: i40) returns (i56) { i } -function {:inline} $sext.i40.i64(i: i40) returns (i64) { i } -function {:inline} $sext.i40.i80(i: i40) returns (i80) { i } -function {:inline} $sext.i40.i88(i: i40) returns (i88) { i } -function {:inline} $sext.i40.i96(i: i40) returns (i96) { i } -function {:inline} $sext.i40.i128(i: i40) returns (i128) { i } -function {:inline} $sext.i40.i160(i: i40) returns (i160) { i } -function {:inline} $sext.i40.i256(i: i40) returns (i256) { i } -function {:inline} $sext.i48.i56(i: i48) returns (i56) { i } -function {:inline} $sext.i48.i64(i: i48) returns (i64) { i } -function {:inline} $sext.i48.i80(i: i48) returns (i80) { i } -function {:inline} $sext.i48.i88(i: i48) returns (i88) { i } -function {:inline} $sext.i48.i96(i: i48) returns (i96) { i } -function {:inline} $sext.i48.i128(i: i48) returns (i128) { i } -function {:inline} $sext.i48.i160(i: i48) returns (i160) { i } -function {:inline} $sext.i48.i256(i: i48) returns (i256) { i } -function {:inline} $sext.i56.i64(i: i56) returns (i64) { i } -function {:inline} $sext.i56.i80(i: i56) returns (i80) { i } -function {:inline} $sext.i56.i88(i: i56) returns (i88) { i } -function {:inline} $sext.i56.i96(i: i56) returns (i96) { i } -function {:inline} $sext.i56.i128(i: i56) returns (i128) { i } -function {:inline} $sext.i56.i160(i: i56) returns (i160) { i } -function {:inline} $sext.i56.i256(i: i56) returns (i256) { i } -function {:inline} $sext.i64.i80(i: i64) returns (i80) { i } -function {:inline} $sext.i64.i88(i: i64) returns (i88) { i } -function {:inline} $sext.i64.i96(i: i64) returns (i96) { i } -function {:inline} $sext.i64.i128(i: i64) returns (i128) { i } -function {:inline} $sext.i64.i160(i: i64) returns (i160) { i } -function {:inline} $sext.i64.i256(i: i64) returns (i256) { i } -function {:inline} $sext.i80.i88(i: i80) returns (i88) { i } -function {:inline} $sext.i80.i96(i: i80) returns (i96) { i } -function {:inline} $sext.i80.i128(i: i80) returns (i128) { i } -function {:inline} $sext.i80.i160(i: i80) returns (i160) { i } -function {:inline} $sext.i80.i256(i: i80) returns (i256) { i } -function {:inline} $sext.i88.i96(i: i88) returns (i96) { i } -function {:inline} $sext.i88.i128(i: i88) returns (i128) { i } -function {:inline} $sext.i88.i160(i: i88) returns (i160) { i } -function {:inline} $sext.i88.i256(i: i88) returns (i256) { i } -function {:inline} $sext.i96.i128(i: i96) returns (i128) { i } -function {:inline} $sext.i96.i160(i: i96) returns (i160) { i } -function {:inline} $sext.i96.i256(i: i96) returns (i256) { i } -function {:inline} $sext.i128.i160(i: i128) returns (i160) { i } -function {:inline} $sext.i128.i256(i: i128) returns (i256) { i } -function {:inline} $sext.i160.i256(i: i160) returns (i256) { i } -function {:inline} $zext.i1.i5(i: i1) returns (i5) { i } -function {:inline} $zext.i1.i6(i: i1) returns (i6) { i } -function {:inline} $zext.i1.i8(i: i1) returns (i8) { i } -function {:inline} $zext.i1.i16(i: i1) returns (i16) { i } -function {:inline} $zext.i1.i24(i: i1) returns (i24) { i } -function {:inline} $zext.i1.i32(i: i1) returns (i32) { i } -function {:inline} $zext.i1.i33(i: i1) returns (i33) { i } -function {:inline} $zext.i1.i40(i: i1) returns (i40) { i } -function {:inline} $zext.i1.i48(i: i1) returns (i48) { i } -function {:inline} $zext.i1.i56(i: i1) returns (i56) { i } -function {:inline} $zext.i1.i64(i: i1) returns (i64) { i } -function {:inline} $zext.i1.i80(i: i1) returns (i80) { i } -function {:inline} $zext.i1.i88(i: i1) returns (i88) { i } -function {:inline} $zext.i1.i96(i: i1) returns (i96) { i } -function {:inline} $zext.i1.i128(i: i1) returns (i128) { i } -function {:inline} $zext.i1.i160(i: i1) returns (i160) { i } -function {:inline} $zext.i1.i256(i: i1) returns (i256) { i } -function {:inline} $zext.i5.i6(i: i5) returns (i6) { i } -function {:inline} $zext.i5.i8(i: i5) returns (i8) { i } -function {:inline} $zext.i5.i16(i: i5) returns (i16) { i } -function {:inline} $zext.i5.i24(i: i5) returns (i24) { i } -function {:inline} $zext.i5.i32(i: i5) returns (i32) { i } -function {:inline} $zext.i5.i33(i: i5) returns (i33) { i } -function {:inline} $zext.i5.i40(i: i5) returns (i40) { i } -function {:inline} $zext.i5.i48(i: i5) returns (i48) { i } -function {:inline} $zext.i5.i56(i: i5) returns (i56) { i } -function {:inline} $zext.i5.i64(i: i5) returns (i64) { i } -function {:inline} $zext.i5.i80(i: i5) returns (i80) { i } -function {:inline} $zext.i5.i88(i: i5) returns (i88) { i } -function {:inline} $zext.i5.i96(i: i5) returns (i96) { i } -function {:inline} $zext.i5.i128(i: i5) returns (i128) { i } -function {:inline} $zext.i5.i160(i: i5) returns (i160) { i } -function {:inline} $zext.i5.i256(i: i5) returns (i256) { i } -function {:inline} $zext.i6.i8(i: i6) returns (i8) { i } -function {:inline} $zext.i6.i16(i: i6) returns (i16) { i } -function {:inline} $zext.i6.i24(i: i6) returns (i24) { i } -function {:inline} $zext.i6.i32(i: i6) returns (i32) { i } -function {:inline} $zext.i6.i33(i: i6) returns (i33) { i } -function {:inline} $zext.i6.i40(i: i6) returns (i40) { i } -function {:inline} $zext.i6.i48(i: i6) returns (i48) { i } -function {:inline} $zext.i6.i56(i: i6) returns (i56) { i } -function {:inline} $zext.i6.i64(i: i6) returns (i64) { i } -function {:inline} $zext.i6.i80(i: i6) returns (i80) { i } -function {:inline} $zext.i6.i88(i: i6) returns (i88) { i } -function {:inline} $zext.i6.i96(i: i6) returns (i96) { i } -function {:inline} $zext.i6.i128(i: i6) returns (i128) { i } -function {:inline} $zext.i6.i160(i: i6) returns (i160) { i } -function {:inline} $zext.i6.i256(i: i6) returns (i256) { i } -function {:inline} $zext.i8.i16(i: i8) returns (i16) { i } -function {:inline} $zext.i8.i24(i: i8) returns (i24) { i } -function {:inline} $zext.i8.i32(i: i8) returns (i32) { i } -function {:inline} $zext.i8.i33(i: i8) returns (i33) { i } -function {:inline} $zext.i8.i40(i: i8) returns (i40) { i } -function {:inline} $zext.i8.i48(i: i8) returns (i48) { i } -function {:inline} $zext.i8.i56(i: i8) returns (i56) { i } -function {:inline} $zext.i8.i64(i: i8) returns (i64) { i } -function {:inline} $zext.i8.i80(i: i8) returns (i80) { i } -function {:inline} $zext.i8.i88(i: i8) returns (i88) { i } -function {:inline} $zext.i8.i96(i: i8) returns (i96) { i } -function {:inline} $zext.i8.i128(i: i8) returns (i128) { i } -function {:inline} $zext.i8.i160(i: i8) returns (i160) { i } -function {:inline} $zext.i8.i256(i: i8) returns (i256) { i } -function {:inline} $zext.i16.i24(i: i16) returns (i24) { i } -function {:inline} $zext.i16.i32(i: i16) returns (i32) { i } -function {:inline} $zext.i16.i33(i: i16) returns (i33) { i } -function {:inline} $zext.i16.i40(i: i16) returns (i40) { i } -function {:inline} $zext.i16.i48(i: i16) returns (i48) { i } -function {:inline} $zext.i16.i56(i: i16) returns (i56) { i } -function {:inline} $zext.i16.i64(i: i16) returns (i64) { i } -function {:inline} $zext.i16.i80(i: i16) returns (i80) { i } -function {:inline} $zext.i16.i88(i: i16) returns (i88) { i } -function {:inline} $zext.i16.i96(i: i16) returns (i96) { i } -function {:inline} $zext.i16.i128(i: i16) returns (i128) { i } -function {:inline} $zext.i16.i160(i: i16) returns (i160) { i } -function {:inline} $zext.i16.i256(i: i16) returns (i256) { i } -function {:inline} $zext.i24.i32(i: i24) returns (i32) { i } -function {:inline} $zext.i24.i33(i: i24) returns (i33) { i } -function {:inline} $zext.i24.i40(i: i24) returns (i40) { i } -function {:inline} $zext.i24.i48(i: i24) returns (i48) { i } -function {:inline} $zext.i24.i56(i: i24) returns (i56) { i } -function {:inline} $zext.i24.i64(i: i24) returns (i64) { i } -function {:inline} $zext.i24.i80(i: i24) returns (i80) { i } -function {:inline} $zext.i24.i88(i: i24) returns (i88) { i } -function {:inline} $zext.i24.i96(i: i24) returns (i96) { i } -function {:inline} $zext.i24.i128(i: i24) returns (i128) { i } -function {:inline} $zext.i24.i160(i: i24) returns (i160) { i } -function {:inline} $zext.i24.i256(i: i24) returns (i256) { i } -function {:inline} $zext.i32.i33(i: i32) returns (i33) { i } -function {:inline} $zext.i32.i40(i: i32) returns (i40) { i } -function {:inline} $zext.i32.i48(i: i32) returns (i48) { i } -function {:inline} $zext.i32.i56(i: i32) returns (i56) { i } -function {:inline} $zext.i32.i64(i: i32) returns (i64) { i } -function {:inline} $zext.i32.i80(i: i32) returns (i80) { i } -function {:inline} $zext.i32.i88(i: i32) returns (i88) { i } -function {:inline} $zext.i32.i96(i: i32) returns (i96) { i } -function {:inline} $zext.i32.i128(i: i32) returns (i128) { i } -function {:inline} $zext.i32.i160(i: i32) returns (i160) { i } -function {:inline} $zext.i32.i256(i: i32) returns (i256) { i } -function {:inline} $zext.i33.i40(i: i33) returns (i40) { i } -function {:inline} $zext.i33.i48(i: i33) returns (i48) { i } -function {:inline} $zext.i33.i56(i: i33) returns (i56) { i } -function {:inline} $zext.i33.i64(i: i33) returns (i64) { i } -function {:inline} $zext.i33.i80(i: i33) returns (i80) { i } -function {:inline} $zext.i33.i88(i: i33) returns (i88) { i } -function {:inline} $zext.i33.i96(i: i33) returns (i96) { i } -function {:inline} $zext.i33.i128(i: i33) returns (i128) { i } -function {:inline} $zext.i33.i160(i: i33) returns (i160) { i } -function {:inline} $zext.i33.i256(i: i33) returns (i256) { i } -function {:inline} $zext.i40.i48(i: i40) returns (i48) { i } -function {:inline} $zext.i40.i56(i: i40) returns (i56) { i } -function {:inline} $zext.i40.i64(i: i40) returns (i64) { i } -function {:inline} $zext.i40.i80(i: i40) returns (i80) { i } -function {:inline} $zext.i40.i88(i: i40) returns (i88) { i } -function {:inline} $zext.i40.i96(i: i40) returns (i96) { i } -function {:inline} $zext.i40.i128(i: i40) returns (i128) { i } -function {:inline} $zext.i40.i160(i: i40) returns (i160) { i } -function {:inline} $zext.i40.i256(i: i40) returns (i256) { i } -function {:inline} $zext.i48.i56(i: i48) returns (i56) { i } -function {:inline} $zext.i48.i64(i: i48) returns (i64) { i } -function {:inline} $zext.i48.i80(i: i48) returns (i80) { i } -function {:inline} $zext.i48.i88(i: i48) returns (i88) { i } -function {:inline} $zext.i48.i96(i: i48) returns (i96) { i } -function {:inline} $zext.i48.i128(i: i48) returns (i128) { i } -function {:inline} $zext.i48.i160(i: i48) returns (i160) { i } -function {:inline} $zext.i48.i256(i: i48) returns (i256) { i } -function {:inline} $zext.i56.i64(i: i56) returns (i64) { i } -function {:inline} $zext.i56.i80(i: i56) returns (i80) { i } -function {:inline} $zext.i56.i88(i: i56) returns (i88) { i } -function {:inline} $zext.i56.i96(i: i56) returns (i96) { i } -function {:inline} $zext.i56.i128(i: i56) returns (i128) { i } -function {:inline} $zext.i56.i160(i: i56) returns (i160) { i } -function {:inline} $zext.i56.i256(i: i56) returns (i256) { i } -function {:inline} $zext.i64.i80(i: i64) returns (i80) { i } -function {:inline} $zext.i64.i88(i: i64) returns (i88) { i } -function {:inline} $zext.i64.i96(i: i64) returns (i96) { i } -function {:inline} $zext.i64.i128(i: i64) returns (i128) { i } -function {:inline} $zext.i64.i160(i: i64) returns (i160) { i } -function {:inline} $zext.i64.i256(i: i64) returns (i256) { i } -function {:inline} $zext.i80.i88(i: i80) returns (i88) { i } -function {:inline} $zext.i80.i96(i: i80) returns (i96) { i } -function {:inline} $zext.i80.i128(i: i80) returns (i128) { i } -function {:inline} $zext.i80.i160(i: i80) returns (i160) { i } -function {:inline} $zext.i80.i256(i: i80) returns (i256) { i } -function {:inline} $zext.i88.i96(i: i88) returns (i96) { i } -function {:inline} $zext.i88.i128(i: i88) returns (i128) { i } -function {:inline} $zext.i88.i160(i: i88) returns (i160) { i } -function {:inline} $zext.i88.i256(i: i88) returns (i256) { i } -function {:inline} $zext.i96.i128(i: i96) returns (i128) { i } -function {:inline} $zext.i96.i160(i: i96) returns (i160) { i } -function {:inline} $zext.i96.i256(i: i96) returns (i256) { i } -function {:inline} $zext.i128.i160(i: i128) returns (i160) { i } -function {:inline} $zext.i128.i256(i: i128) returns (i256) { i } -function {:inline} $zext.i160.i256(i: i160) returns (i256) { i } -function $extractvalue.i1(p: ref, i: int) returns (i1); -function $extractvalue.i5(p: ref, i: int) returns (i5); -function $extractvalue.i6(p: ref, i: int) returns (i6); -function $extractvalue.i8(p: ref, i: int) returns (i8); -function $extractvalue.i16(p: ref, i: int) returns (i16); -function $extractvalue.i24(p: ref, i: int) returns (i24); -function $extractvalue.i32(p: ref, i: int) returns (i32); -function $extractvalue.i33(p: ref, i: int) returns (i33); -function $extractvalue.i40(p: ref, i: int) returns (i40); -function $extractvalue.i48(p: ref, i: int) returns (i48); -function $extractvalue.i56(p: ref, i: int) returns (i56); -function $extractvalue.i64(p: ref, i: int) returns (i64); -function $extractvalue.i80(p: ref, i: int) returns (i80); -function $extractvalue.i88(p: ref, i: int) returns (i88); -function $extractvalue.i96(p: ref, i: int) returns (i96); -function $extractvalue.i128(p: ref, i: int) returns (i128); -function $extractvalue.i160(p: ref, i: int) returns (i160); -function $extractvalue.i256(p: ref, i: int) returns (i256); -// Pointer arithmetic operations -function {:inline} $add.ref(p1: ref, p2: ref) returns (ref) { $add.i64(p1, p2) } -function {:inline} $sub.ref(p1: ref, p2: ref) returns (ref) { $sub.i64(p1, p2) } -function {:inline} $mul.ref(p1: ref, p2: ref) returns (ref) { $mul.i64(p1, p2) } - -// Pointer predicates -function {:inline} $eq.ref.bool(p1: ref, p2: ref) returns (bool) { (p1 == p2) } -function {:inline} $eq.ref(p1: ref, p2: ref) returns (i1) { (if $eq.ref.bool(p1, p2) then 1 else 0) } -function {:inline} $ne.ref.bool(p1: ref, p2: ref) returns (bool) { (p1 != p2) } -function {:inline} $ne.ref(p1: ref, p2: ref) returns (i1) { (if $ne.ref.bool(p1, p2) then 1 else 0) } -function {:inline} $ugt.ref.bool(p1: ref, p2: ref) returns (bool) { (p1 > p2) } -function {:inline} $ugt.ref(p1: ref, p2: ref) returns (i1) { (if $ugt.ref.bool(p1, p2) then 1 else 0) } -function {:inline} $uge.ref.bool(p1: ref, p2: ref) returns (bool) { (p1 >= p2) } -function {:inline} $uge.ref(p1: ref, p2: ref) returns (i1) { (if $uge.ref.bool(p1, p2) then 1 else 0) } -function {:inline} $ult.ref.bool(p1: ref, p2: ref) returns (bool) { (p1 < p2) } -function {:inline} $ult.ref(p1: ref, p2: ref) returns (i1) { (if $ult.ref.bool(p1, p2) then 1 else 0) } -function {:inline} $ule.ref.bool(p1: ref, p2: ref) returns (bool) { (p1 <= p2) } -function {:inline} $ule.ref(p1: ref, p2: ref) returns (i1) { (if $ule.ref.bool(p1, p2) then 1 else 0) } -function {:inline} $sgt.ref.bool(p1: ref, p2: ref) returns (bool) { (p1 > p2) } -function {:inline} $sgt.ref(p1: ref, p2: ref) returns (i1) { (if $sgt.ref.bool(p1, p2) then 1 else 0) } -function {:inline} $sge.ref.bool(p1: ref, p2: ref) returns (bool) { (p1 >= p2) } -function {:inline} $sge.ref(p1: ref, p2: ref) returns (i1) { (if $sge.ref.bool(p1, p2) then 1 else 0) } -function {:inline} $slt.ref.bool(p1: ref, p2: ref) returns (bool) { (p1 < p2) } -function {:inline} $slt.ref(p1: ref, p2: ref) returns (i1) { (if $slt.ref.bool(p1, p2) then 1 else 0) } -function {:inline} $sle.ref.bool(p1: ref, p2: ref) returns (bool) { (p1 <= p2) } -function {:inline} $sle.ref(p1: ref, p2: ref) returns (i1) { (if $sle.ref.bool(p1, p2) then 1 else 0) } - -// Pointer load/store operations -function {:inline} $load.ref(M: [ref] ref, p: ref) returns (ref) { M[p] } -function {:inline} $store.ref(M: [ref] ref, p: ref, i: ref) returns ([ref] ref) { M[p := i] } - -// Pointer conversion -function {:inline} $bitcast.ref.ref(p: ref) returns (ref) { p } -function $extractvalue.ref(p: ref, i: int) returns (ref); -// Pointer-number conversion -function {:inline} $p2i.ref.i8(p: ref) returns (i8) { $trunc.i64.i8(p) } -function {:inline} $i2p.i8.ref(i: i8) returns (ref) { $zext.i8.i64(i) } -function {:inline} $p2i.ref.i16(p: ref) returns (i16) { $trunc.i64.i16(p) } -function {:inline} $i2p.i16.ref(i: i16) returns (ref) { $zext.i16.i64(i) } -function {:inline} $p2i.ref.i32(p: ref) returns (i32) { $trunc.i64.i32(p) } -function {:inline} $i2p.i32.ref(i: i32) returns (ref) { $zext.i32.i64(i) } -function {:inline} $p2i.ref.i64(p: ref) returns (i64) { p } -function {:inline} $i2p.i64.ref(i: i64) returns (ref) { i } - -function $fp(ipart: int, fpart: int, epart: int) returns (float); -// Floating-point arithmetic operations -function $abs.float(f: float) returns (float); -function $round.float(f: float) returns (float); -function $sqrt.float(f: float) returns (float); -function $fadd.float(f1: float, f2: float) returns (float); -function $fsub.float(f1: float, f2: float) returns (float); -function $fmul.float(f1: float, f2: float) returns (float); -function $fdiv.float(f1: float, f2: float) returns (float); -function $frem.float(f1: float, f2: float) returns (float); -function $min.float(f1: float, f2: float) returns (float); -function $max.float(f1: float, f2: float) returns (float); -function $fma.float(f1: float, f2: float, f3: float) returns (float); -function $fneg.float(f: float) returns (float); -// Floating-point predicates -function $foeq.float.bool(f1: float, f2: float) returns (bool); -function $fole.float.bool(f1: float, f2: float) returns (bool); -function $folt.float.bool(f1: float, f2: float) returns (bool); -function $foge.float.bool(f1: float, f2: float) returns (bool); -function $fogt.float.bool(f1: float, f2: float) returns (bool); -function $fone.float.bool(f1: float, f2: float) returns (bool); -function $ford.float.bool(f1: float, f2: float) returns (bool); -function $fueq.float.bool(f1: float, f2: float) returns (bool); -function $fugt.float.bool(f1: float, f2: float) returns (bool); -function $fuge.float.bool(f1: float, f2: float) returns (bool); -function $fult.float.bool(f1: float, f2: float) returns (bool); -function $fule.float.bool(f1: float, f2: float) returns (bool); -function $fune.float.bool(f1: float, f2: float) returns (bool); -function $funo.float.bool(f1: float, f2: float) returns (bool); -function $ffalse.float.bool(f1: float, f2: float) returns (bool); -function $ftrue.float.bool(f1: float, f2: float) returns (bool); -// Floating-point/integer conversion -function $bitcast.float.i8(f: float) returns (i8); -function $bitcast.float.i16(f: float) returns (i16); -function $bitcast.float.i32(f: float) returns (i32); -function $bitcast.float.i64(f: float) returns (i64); -function $bitcast.float.i80(f: float) returns (i80); -function $bitcast.i8.float(i: i8) returns (float); -function $bitcast.i16.float(i: i16) returns (float); -function $bitcast.i32.float(i: i32) returns (float); -function $bitcast.i64.float(i: i64) returns (float); -function $bitcast.i80.float(i: i80) returns (float); -function $fp2si.float.i1(f: float) returns (i1); -function $fp2si.float.i5(f: float) returns (i5); -function $fp2si.float.i6(f: float) returns (i6); -function $fp2si.float.i8(f: float) returns (i8); -function $fp2si.float.i16(f: float) returns (i16); -function $fp2si.float.i24(f: float) returns (i24); -function $fp2si.float.i32(f: float) returns (i32); -function $fp2si.float.i33(f: float) returns (i33); -function $fp2si.float.i40(f: float) returns (i40); -function $fp2si.float.i48(f: float) returns (i48); -function $fp2si.float.i56(f: float) returns (i56); -function $fp2si.float.i64(f: float) returns (i64); -function $fp2si.float.i80(f: float) returns (i80); -function $fp2si.float.i88(f: float) returns (i88); -function $fp2si.float.i96(f: float) returns (i96); -function $fp2si.float.i128(f: float) returns (i128); -function $fp2si.float.i160(f: float) returns (i160); -function $fp2si.float.i256(f: float) returns (i256); -function $fp2ui.float.i1(f: float) returns (i1); -function $fp2ui.float.i5(f: float) returns (i5); -function $fp2ui.float.i6(f: float) returns (i6); -function $fp2ui.float.i8(f: float) returns (i8); -function $fp2ui.float.i16(f: float) returns (i16); -function $fp2ui.float.i24(f: float) returns (i24); -function $fp2ui.float.i32(f: float) returns (i32); -function $fp2ui.float.i33(f: float) returns (i33); -function $fp2ui.float.i40(f: float) returns (i40); -function $fp2ui.float.i48(f: float) returns (i48); -function $fp2ui.float.i56(f: float) returns (i56); -function $fp2ui.float.i64(f: float) returns (i64); -function $fp2ui.float.i80(f: float) returns (i80); -function $fp2ui.float.i88(f: float) returns (i88); -function $fp2ui.float.i96(f: float) returns (i96); -function $fp2ui.float.i128(f: float) returns (i128); -function $fp2ui.float.i160(f: float) returns (i160); -function $fp2ui.float.i256(f: float) returns (i256); -function $si2fp.i1.float(i: i1) returns (float); -function $si2fp.i5.float(i: i5) returns (float); -function $si2fp.i6.float(i: i6) returns (float); -function $si2fp.i8.float(i: i8) returns (float); -function $si2fp.i16.float(i: i16) returns (float); -function $si2fp.i24.float(i: i24) returns (float); -function $si2fp.i32.float(i: i32) returns (float); -function $si2fp.i33.float(i: i33) returns (float); -function $si2fp.i40.float(i: i40) returns (float); -function $si2fp.i48.float(i: i48) returns (float); -function $si2fp.i56.float(i: i56) returns (float); -function $si2fp.i64.float(i: i64) returns (float); -function $si2fp.i80.float(i: i80) returns (float); -function $si2fp.i88.float(i: i88) returns (float); -function $si2fp.i96.float(i: i96) returns (float); -function $si2fp.i128.float(i: i128) returns (float); -function $si2fp.i160.float(i: i160) returns (float); -function $si2fp.i256.float(i: i256) returns (float); -function $ui2fp.i1.float(i: i1) returns (float); -function $ui2fp.i5.float(i: i5) returns (float); -function $ui2fp.i6.float(i: i6) returns (float); -function $ui2fp.i8.float(i: i8) returns (float); -function $ui2fp.i16.float(i: i16) returns (float); -function $ui2fp.i24.float(i: i24) returns (float); -function $ui2fp.i32.float(i: i32) returns (float); -function $ui2fp.i33.float(i: i33) returns (float); -function $ui2fp.i40.float(i: i40) returns (float); -function $ui2fp.i48.float(i: i48) returns (float); -function $ui2fp.i56.float(i: i56) returns (float); -function $ui2fp.i64.float(i: i64) returns (float); -function $ui2fp.i80.float(i: i80) returns (float); -function $ui2fp.i88.float(i: i88) returns (float); -function $ui2fp.i96.float(i: i96) returns (float); -function $ui2fp.i128.float(i: i128) returns (float); -function $ui2fp.i160.float(i: i160) returns (float); -function $ui2fp.i256.float(i: i256) returns (float); -// Floating-point conversion -function $fpext.float.float(f: float) returns (float); -function $fptrunc.float.float(f: float) returns (float); -// Floating-point load/store operations -function {:inline} $load.float(M: [ref] float, p: ref) returns (float) { M[p] } -function {:inline} $store.float(M: [ref] float, p: ref, f: float) returns ([ref] float) { M[p := f] } -function {:inline} $load.unsafe.float(M: [ref] i8, p: ref) returns (float) { $bitcast.i8.float(M[p]) } -function {:inline} $store.unsafe.float(M: [ref] i8, p: ref, f: float) returns ([ref] i8) { M[p := $bitcast.float.i8(f)] } -function $extractvalue.float(p: ref, i: int) returns (float); -const {:allocSize 4} x: ref; -axiom (x == $sub.ref(0, 1028)); -const {:allocSize 4} y: ref; -axiom (y == $sub.ref(0, 2056)); -const {:allocSize 8} h: ref; -axiom (h == $sub.ref(0, 3088)); -const {:allocSize 26} .str: ref; -axiom (.str == $sub.ref(0, 4138)); -const {:allocSize 70} {:count 70} .str.1: ref; -axiom (.str.1 == $sub.ref(0, 5232)); -const {:allocSize 23} {:count 23} __PRETTY_FUNCTION__.thread_2: ref; -axiom (__PRETTY_FUNCTION__.thread_2 == $sub.ref(0, 6279)); -const handler: ref; -axiom (handler == $sub.ref(0, 7311)); -procedure handler($p0: ref) - returns ($r: ref) -{ -$bb0: - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 12, 5} true; - assume {:verifier.code 0} true; - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 12, 5} true; - assume {:verifier.code 0} true; - call __LKMM_STORE(x, 1, 3); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 13, 5} true; - assume {:verifier.code 0} true; - call __LKMM_STORE(y, 1, 3); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 14, 5} true; - assume {:verifier.code 0} true; - $r := $0.ref; - $exn := false; - return; -} -const llvm.dbg.value: ref; -axiom (llvm.dbg.value == $sub.ref(0, 8343)); -procedure llvm.dbg.value($p0: ref, $p1: ref, $p2: ref); -const __LKMM_STORE: ref; -axiom (__LKMM_STORE == $sub.ref(0, 9375)); -procedure __LKMM_STORE($p0: ref, $i1: i32, $i2: i32); -const thread_1: ref; -axiom (thread_1 == $sub.ref(0, 10407)); -procedure thread_1($p0: ref) - returns ($r: ref) -{ - var $i1: i32; - var $i2: i64; - var $i3: i32; -$bb0: - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 19, 5} true; - assume {:verifier.code 1} true; - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 19, 5} true; - assume {:verifier.code 1} true; - call __VERIFIER_make_interrupt_handler(); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 20, 5} true; - assume {:verifier.code 0} true; - call $i1 := pthread_create(h, $0.ref, handler, $0.ref); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 22, 5} true; - assume {:verifier.code 1} true; - call __VERIFIER_disable_irq(); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 23, 5} true; - assume {:verifier.code 0} true; - call __LKMM_STORE(y, 1, 3); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 25, 18} true; - assume {:verifier.code 0} true; - $i2 := $load.i64($M.0, h); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 25, 5} true; - assume {:verifier.code 0} true; - call $i3 := pthread_join($i2, $0.ref); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 27, 5} true; - assume {:verifier.code 0} true; - $r := $0.ref; - $exn := false; - return; -} -const __VERIFIER_make_interrupt_handler: ref; -axiom (__VERIFIER_make_interrupt_handler == $sub.ref(0, 11439)); -procedure __VERIFIER_make_interrupt_handler(); -const pthread_create: ref; -axiom (pthread_create == $sub.ref(0, 12471)); -procedure pthread_create($p0: ref, $p1: ref, $p2: ref, $p3: ref) - returns ($r: i32); -const __VERIFIER_disable_irq: ref; -axiom (__VERIFIER_disable_irq == $sub.ref(0, 13503)); -procedure __VERIFIER_disable_irq(); -const pthread_join: ref; -axiom (pthread_join == $sub.ref(0, 14535)); -procedure pthread_join($i0: i64, $p1: ref) - returns ($r: i32); -const thread_2: ref; -axiom (thread_2 == $sub.ref(0, 15567)); -procedure thread_2($p0: ref) - returns ($r: ref) -{ - var $i1: i32; - var $i2: i1; - var $i3: i32; - var $i4: i1; -$bb0: - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 32, 8} true; - assume {:verifier.code 0} true; - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 32, 8} true; - assume {:verifier.code 0} true; - call $i1 := __LKMM_LOAD(y, 2); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 32, 29} true; - assume {:verifier.code 0} true; - $i2 := $eq.i32($i1, 1); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 32, 8} true; - assume {:verifier.code 0} true; - assume {:branchcond $i2} true; - goto $bb1, $bb2; -$bb1: - assume ($i2 == 1); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 33, 9} true; - assume {:verifier.code 0} true; - call $i3 := __LKMM_LOAD(x, 2); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 33, 9} true; - assume {:verifier.code 0} true; - $i4 := $eq.i32($i3, 1); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 33, 9} true; - assume {:verifier.code 0} true; - assume {:branchcond $i4} true; - goto $bb4, $bb5; -$bb2: - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 32, 8} true; - assume {:verifier.code 0} true; - assume !(($i2 == 1)); - goto $bb3; -$bb3: - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 35, 5} true; - assume {:verifier.code 0} true; - $r := $0.ref; - $exn := false; - return; -$bb4: - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 33, 9} true; - assume {:verifier.code 0} true; - assume ($i4 == 1); - goto $bb3; -$bb5: - assume !(($i4 == 1)); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 33, 9} true; - assume {:verifier.code 0} true; - call __assert_fail(.str, .str.1, 33, __PRETTY_FUNCTION__.thread_2); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 33, 9} true; - assume {:verifier.code 0} true; - assume false; -} -const __LKMM_LOAD: ref; -axiom (__LKMM_LOAD == $sub.ref(0, 16599)); -procedure __LKMM_LOAD($p0: ref, $i1: i32) - returns ($r: i32); -const __assert_fail: ref; -axiom (__assert_fail == $sub.ref(0, 17631)); -procedure __assert_fail($p0: ref, $p1: ref, $i2: i32, $p3: ref); -const main: ref; -axiom (main == $sub.ref(0, 18663)); -procedure {:entrypoint} main() - returns ($r: i32) -{ - var $p0: ref; - var $p1: ref; - var $i2: i32; - var $i3: i32; - var $i4: i64; - var $i5: i32; - var $i6: i64; - var $i7: i32; -$bb0: - call $initialize(); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 42, 5} true; - assume {:verifier.code 0} true; - call {:cexpr "smack:entry:main"} boogie_si_record_ref(main); - assume {:verifier.code 0} true; - call $p0 := $alloc($mul.ref(8, $zext.i32.i64(1))); - assume {:verifier.code 0} true; - call $p1 := $alloc($mul.ref(8, $zext.i32.i64(1))); - assume true; - assume true; - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 42, 5} true; - assume {:verifier.code 0} true; - call $i2 := pthread_create($p0, $0.ref, thread_1, $0.ref); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 43, 5} true; - assume {:verifier.code 0} true; - call $i3 := pthread_create($p1, $0.ref, thread_2, $0.ref); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 44, 18} true; - assume {:verifier.code 0} true; - $i4 := $load.i64($M.0, $p0); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 44, 5} true; - assume {:verifier.code 0} true; - call $i5 := pthread_join($i4, $0.ref); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 45, 18} true; - assume {:verifier.code 0} true; - $i6 := $load.i64($M.0, $p1); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 45, 5} true; - assume {:verifier.code 0} true; - call $i7 := pthread_join($i6, $0.ref); - assume {:sourceloc "benchmarks/interrupts/lkmm_disable_not_enable.c", 47, 5} true; - assume {:verifier.code 0} true; - $r := 0; - $exn := false; - return; -} -const llvm.dbg.declare: ref; -axiom (llvm.dbg.declare == $sub.ref(0, 19695)); -procedure llvm.dbg.declare($p0: ref, $p1: ref, $p2: ref); -const __SMACK_code: ref; -axiom (__SMACK_code == $sub.ref(0, 20727)); -procedure __SMACK_code.ref($p0: ref); -procedure __SMACK_code.ref.i32($p0: ref, p.1: i32); -const __VERIFIER_assume: ref; -axiom (__VERIFIER_assume == $sub.ref(0, 21759)); -procedure __VERIFIER_assume($i0: i32) -{ -$bb0: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1606, 29} true; - assume {:verifier.code 1} true; - call {:cexpr "__VERIFIER_assume:arg:x"} boogie_si_record_i32($i0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1606, 29} true; - assume {:verifier.code 1} true; - assume true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 45, 3} true; - assume {:verifier.code 1} true; - assume $i0 != $0; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 46, 1} true; - assume {:verifier.code 0} true; - $exn := false; - return; -} -const __SMACK_dummy: ref; -axiom (__SMACK_dummy == $sub.ref(0, 22791)); -procedure __SMACK_dummy($i0: i32) -{ -$bb0: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1606, 29} true; - assume {:verifier.code 1} true; - call {:cexpr "__SMACK_dummy:arg:v"} boogie_si_record_i32($i0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1606, 29} true; - assume {:verifier.code 1} true; - assume true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1606, 59} true; - assume {:verifier.code 0} true; - $exn := false; - return; -} -const __SMACK_and32: ref; -axiom (__SMACK_and32 == $sub.ref(0, 23823)); -procedure __SMACK_and32($i0: i32, $i1: i32) - returns ($r: i32) -{ - var $i2: i32; - var $i3: i1; - var $i5: i1; - var $i6: i1; - var $i8: i32; - var $i7: i32; - var $i4: i32; - var $i9: i64; - var $i10: i64; - var $i11: i32; - var $i12: i32; - var $i13: i64; - var $i14: i64; - var $i15: i32; - var $i16: i32; - var $i17: i32; - var $i18: i1; - var $i20: i1; - var $i21: i1; - var $i23: i32; - var $i22: i32; - var $i19: i32; - var $i24: i64; - var $i25: i64; - var $i26: i32; - var $i27: i32; - var $i28: i64; - var $i29: i64; - var $i30: i32; - var $i31: i32; - var $i32: i32; - var $i33: i1; - var $i35: i1; - var $i36: i1; - var $i38: i32; - var $i37: i32; - var $i34: i32; - var $i39: i64; - var $i40: i64; - var $i41: i32; - var $i42: i32; - var $i43: i64; - var $i44: i64; - var $i45: i32; - var $i46: i32; - var $i47: i32; - var $i48: i1; - var $i50: i1; - var $i51: i1; - var $i53: i32; - var $i52: i32; - var $i49: i32; - var $i54: i64; - var $i55: i64; - var $i56: i32; - var $i57: i32; - var $i58: i64; - var $i59: i64; - var $i60: i32; - var $i61: i32; - var $i62: i32; - var $i63: i1; - var $i65: i1; - var $i66: i1; - var $i68: i32; - var $i67: i32; - var $i64: i32; - var $i69: i64; - var $i70: i64; - var $i71: i32; - var $i72: i32; - var $i73: i64; - var $i74: i64; - var $i75: i32; - var $i76: i32; - var $i77: i32; - var $i78: i1; - var $i80: i1; - var $i81: i1; - var $i83: i32; - var $i82: i32; - var $i79: i32; - var $i84: i64; - var $i85: i64; - var $i86: i32; - var $i87: i32; - var $i88: i64; - var $i89: i64; - var $i90: i32; - var $i91: i32; - var $i92: i32; - var $i93: i1; - var $i95: i1; - var $i96: i1; - var $i98: i32; - var $i97: i32; - var $i94: i32; - var $i99: i64; - var $i100: i64; - var $i101: i32; - var $i102: i32; - var $i103: i64; - var $i104: i64; - var $i105: i32; - var $i106: i32; - var $i107: i32; - var $i108: i1; - var $i110: i1; - var $i111: i1; - var $i113: i32; - var $i112: i32; - var $i109: i32; - var $i114: i64; - var $i115: i64; - var $i116: i32; - var $i117: i32; - var $i118: i64; - var $i119: i64; - var $i120: i32; - var $i121: i32; - var $i122: i32; - var $i123: i1; - var $i125: i1; - var $i126: i1; - var $i128: i32; - var $i127: i32; - var $i124: i32; - var $i129: i64; - var $i130: i64; - var $i131: i32; - var $i132: i32; - var $i133: i64; - var $i134: i64; - var $i135: i32; - var $i136: i32; - var $i137: i32; - var $i138: i1; - var $i140: i1; - var $i141: i1; - var $i143: i32; - var $i142: i32; - var $i139: i32; - var $i144: i64; - var $i145: i64; - var $i146: i32; - var $i147: i32; - var $i148: i64; - var $i149: i64; - var $i150: i32; - var $i151: i32; - var $i152: i32; - var $i153: i1; - var $i155: i1; - var $i156: i1; - var $i158: i32; - var $i157: i32; - var $i154: i32; - var $i159: i64; - var $i160: i64; - var $i161: i32; - var $i162: i32; - var $i163: i64; - var $i164: i64; - var $i165: i32; - var $i166: i32; - var $i167: i32; - var $i168: i1; - var $i170: i1; - var $i171: i1; - var $i173: i32; - var $i172: i32; - var $i169: i32; - var $i174: i64; - var $i175: i64; - var $i176: i32; - var $i177: i32; - var $i178: i64; - var $i179: i64; - var $i180: i32; - var $i181: i32; - var $i182: i32; - var $i183: i1; - var $i185: i1; - var $i186: i1; - var $i188: i32; - var $i187: i32; - var $i184: i32; - var $i189: i64; - var $i190: i64; - var $i191: i32; - var $i192: i32; - var $i193: i64; - var $i194: i64; - var $i195: i32; - var $i196: i32; - var $i197: i32; - var $i198: i1; - var $i200: i1; - var $i201: i1; - var $i203: i32; - var $i202: i32; - var $i199: i32; - var $i204: i64; - var $i205: i64; - var $i206: i32; - var $i207: i32; - var $i208: i64; - var $i209: i64; - var $i210: i32; - var $i211: i32; - var $i212: i32; - var $i213: i1; - var $i215: i1; - var $i216: i1; - var $i218: i32; - var $i217: i32; - var $i214: i32; - var $i219: i64; - var $i220: i64; - var $i221: i32; - var $i222: i32; - var $i223: i64; - var $i224: i64; - var $i225: i32; - var $i226: i32; - var $i227: i32; - var $i228: i1; - var $i230: i1; - var $i231: i1; - var $i233: i32; - var $i232: i32; - var $i229: i32; - var $i234: i64; - var $i235: i64; - var $i236: i32; - var $i237: i32; - var $i238: i64; - var $i239: i64; - var $i240: i32; - var $i241: i32; - var $i242: i32; - var $i243: i1; - var $i245: i1; - var $i246: i1; - var $i248: i32; - var $i247: i32; - var $i244: i32; - var $i249: i64; - var $i250: i64; - var $i251: i32; - var $i252: i32; - var $i253: i64; - var $i254: i64; - var $i255: i32; - var $i256: i32; - var $i257: i32; - var $i258: i1; - var $i260: i1; - var $i261: i1; - var $i263: i32; - var $i262: i32; - var $i259: i32; - var $i264: i64; - var $i265: i64; - var $i266: i32; - var $i267: i32; - var $i268: i64; - var $i269: i64; - var $i270: i32; - var $i271: i32; - var $i272: i32; - var $i273: i1; - var $i275: i1; - var $i276: i1; - var $i278: i32; - var $i277: i32; - var $i274: i32; - var $i279: i64; - var $i280: i64; - var $i281: i32; - var $i282: i32; - var $i283: i64; - var $i284: i64; - var $i285: i32; - var $i286: i32; - var $i287: i32; - var $i288: i1; - var $i290: i1; - var $i291: i1; - var $i293: i32; - var $i292: i32; - var $i289: i32; - var $i294: i64; - var $i295: i64; - var $i296: i32; - var $i297: i32; - var $i298: i64; - var $i299: i64; - var $i300: i32; - var $i301: i32; - var $i302: i32; - var $i303: i1; - var $i305: i1; - var $i306: i1; - var $i308: i32; - var $i307: i32; - var $i304: i32; - var $i309: i64; - var $i310: i64; - var $i311: i32; - var $i312: i32; - var $i313: i64; - var $i314: i64; - var $i315: i32; - var $i316: i32; - var $i317: i32; - var $i318: i1; - var $i320: i1; - var $i321: i1; - var $i323: i32; - var $i322: i32; - var $i319: i32; - var $i324: i64; - var $i325: i64; - var $i326: i32; - var $i327: i32; - var $i328: i64; - var $i329: i64; - var $i330: i32; - var $i331: i32; - var $i332: i32; - var $i333: i1; - var $i335: i1; - var $i336: i1; - var $i338: i32; - var $i337: i32; - var $i334: i32; - var $i339: i64; - var $i340: i64; - var $i341: i32; - var $i342: i32; - var $i343: i64; - var $i344: i64; - var $i345: i32; - var $i346: i32; - var $i347: i32; - var $i348: i1; - var $i350: i1; - var $i351: i1; - var $i353: i32; - var $i352: i32; - var $i349: i32; - var $i354: i64; - var $i355: i64; - var $i356: i32; - var $i357: i32; - var $i358: i64; - var $i359: i64; - var $i360: i32; - var $i361: i32; - var $i362: i32; - var $i363: i1; - var $i365: i1; - var $i366: i1; - var $i368: i32; - var $i367: i32; - var $i364: i32; - var $i369: i64; - var $i370: i64; - var $i371: i32; - var $i372: i32; - var $i373: i64; - var $i374: i64; - var $i375: i32; - var $i376: i32; - var $i377: i32; - var $i378: i1; - var $i380: i1; - var $i381: i1; - var $i383: i32; - var $i382: i32; - var $i379: i32; - var $i384: i64; - var $i385: i64; - var $i386: i32; - var $i387: i32; - var $i388: i64; - var $i389: i64; - var $i390: i32; - var $i391: i32; - var $i392: i32; - var $i393: i1; - var $i395: i1; - var $i396: i1; - var $i398: i32; - var $i397: i32; - var $i394: i32; - var $i399: i64; - var $i400: i64; - var $i401: i32; - var $i402: i32; - var $i403: i64; - var $i404: i64; - var $i405: i32; - var $i406: i32; - var $i407: i32; - var $i408: i1; - var $i410: i1; - var $i411: i1; - var $i413: i32; - var $i412: i32; - var $i409: i32; - var $i414: i64; - var $i415: i64; - var $i416: i32; - var $i417: i32; - var $i418: i64; - var $i419: i64; - var $i420: i32; - var $i421: i32; - var $i422: i32; - var $i423: i1; - var $i425: i1; - var $i426: i1; - var $i428: i32; - var $i427: i32; - var $i424: i32; - var $i429: i64; - var $i430: i64; - var $i431: i32; - var $i432: i32; - var $i433: i64; - var $i434: i64; - var $i435: i32; - var $i436: i32; - var $i437: i32; - var $i438: i1; - var $i440: i1; - var $i441: i1; - var $i443: i32; - var $i442: i32; - var $i439: i32; - var $i444: i64; - var $i445: i64; - var $i446: i32; - var $i447: i32; - var $i448: i64; - var $i449: i64; - var $i450: i32; - var $i451: i32; - var $i452: i32; - var $i453: i1; - var $i455: i1; - var $i456: i1; - var $i458: i32; - var $i457: i32; - var $i454: i32; - var $i459: i64; - var $i460: i64; - var $i461: i32; - var $i462: i32; - var $i463: i64; - var $i464: i64; - var $i465: i32; - var $i466: i32; - var $i467: i32; - var $i468: i1; - var $i470: i1; - var $i471: i1; - var $i473: i32; - var $i472: i32; - var $i469: i32; - var $i474: i64; - var $i475: i64; - var $i476: i32; - var $i477: i32; - var $i478: i64; - var $i479: i64; - var $i480: i32; - var $i481: i32; - var $i482: i32; - var $i483: i1; - var $i485: i1; - var $i486: i1; - var $i488: i32; - var $i487: i32; - var $i484: i32; - var $i489: i64; - var $i490: i64; - var $i491: i32; - var $i492: i32; - var $i493: i64; - var $i494: i64; - var $i495: i32; - var $i496: i32; - var $i497: i32; - var $i498: i1; - var $i500: i1; - var $i501: i1; - var $i503: i32; - var $i502: i32; - var $i499: i32; - var $i504: i64; - var $i505: i64; - var $i506: i32; - var $i507: i32; - var $i508: i64; - var $i509: i64; - var $i510: i32; - var $i511: i32; - var $i512: i32; - var $i513: i1; - var $i515: i1; - var $i516: i1; - var $i518: i32; - var $i517: i32; - var $i514: i32; - var $i519: i64; - var $i520: i64; - var $i521: i32; - var $i522: i32; - var $i523: i64; - var $i524: i64; - var $i525: i32; - var $i526: i32; - var $i527: i32; - var $i528: i1; - var $i530: i1; - var $i531: i1; - var $i533: i32; - var $i532: i32; - var $i529: i32; - var $i534: i64; - var $i535: i64; - var $i536: i32; - var $i537: i32; - var $i538: i64; - var $i539: i64; - var $i540: i32; - var $i541: i32; - var $i542: i32; - var $i543: i1; - var $i545: i1; - var $i546: i1; - var $i548: i32; - var $i547: i32; - var $i544: i32; - var $i549: i64; - var $i550: i64; - var $i551: i32; - var $i552: i32; - var $i553: i64; - var $i554: i64; - var $i555: i32; - var $i556: i32; - var $i557: i32; - var $i558: i1; - var $i560: i1; - var $i561: i1; - var $i563: i32; - var $i562: i32; - var $i559: i32; - var $i564: i64; - var $i565: i64; - var $i566: i32; - var $i567: i32; - var $i568: i64; - var $i569: i64; - var $i570: i32; - var $i571: i32; - var $i572: i32; - var $i573: i1; - var $i575: i1; - var $i576: i1; - var $i578: i32; - var $i577: i32; - var $i574: i32; - var $i579: i64; - var $i580: i64; - var $i581: i32; - var $i582: i32; - var $i583: i64; - var $i584: i64; - var $i585: i32; - var $i586: i32; - var $i587: i32; - var $i588: i1; - var $i590: i1; - var $i591: i1; - var $i593: i32; - var $i592: i32; - var $i589: i32; - var $i594: i64; - var $i595: i64; - var $i596: i32; - var $i597: i32; - var $i598: i64; - var $i599: i64; - var $i600: i32; - var $i601: i32; - var $i602: i32; - var $i603: i1; - var $i605: i1; - var $i606: i1; - var $i608: i32; - var $i607: i32; - var $i604: i32; - var $i609: i64; - var $i610: i64; - var $i611: i32; - var $i612: i32; - var $i613: i64; - var $i614: i64; - var $i615: i32; - var $i616: i32; - var $i617: i32; - var $i618: i1; - var $i620: i1; - var $i621: i1; - var $i623: i32; - var $i622: i32; - var $i619: i32; - var $i624: i64; - var $i625: i64; - var $i626: i32; - var $i627: i32; - var $i628: i64; - var $i629: i64; - var $i630: i32; - var $i631: i32; - var $i632: i32; - var $i633: i1; - var $i635: i1; - var $i636: i1; - var $i638: i32; - var $i637: i32; - var $i634: i32; - var $i639: i64; - var $i640: i64; - var $i641: i32; - var $i642: i32; - var $i643: i64; - var $i644: i64; - var $i645: i32; - var $i646: i32; - var $i647: i32; - var $i648: i1; - var $i650: i1; - var $i651: i1; - var $i653: i32; - var $i652: i32; - var $i649: i32; - var $i654: i64; - var $i655: i64; - var $i656: i32; - var $i657: i32; - var $i658: i64; - var $i659: i64; - var $i660: i32; - var $i661: i32; - var $i662: i32; - var $i663: i1; - var $i665: i1; - var $i666: i1; - var $i668: i32; - var $i667: i32; - var $i664: i32; - var $i669: i64; - var $i670: i64; - var $i671: i32; - var $i672: i32; - var $i673: i64; - var $i674: i64; - var $i675: i32; - var $i676: i32; - var $i677: i32; - var $i678: i1; - var $i680: i1; - var $i681: i1; - var $i683: i32; - var $i682: i32; - var $i679: i32; - var $i684: i64; - var $i685: i64; - var $i686: i32; - var $i687: i32; - var $i688: i64; - var $i689: i64; - var $i690: i32; - var $i691: i32; - var $i692: i32; - var $i693: i1; - var $i695: i1; - var $i696: i1; - var $i698: i32; - var $i697: i32; - var $i694: i32; - var $i699: i64; - var $i700: i64; - var $i701: i32; - var $i702: i32; - var $i703: i64; - var $i704: i64; - var $i705: i32; - var $i706: i32; - var $i707: i32; - var $i708: i1; - var $i710: i1; - var $i711: i1; - var $i713: i32; - var $i712: i32; - var $i709: i32; - var $i714: i64; - var $i715: i64; - var $i716: i32; - var $i717: i32; - var $i718: i64; - var $i719: i64; - var $i720: i32; - var $i721: i32; - var $i722: i32; - var $i723: i1; - var $i725: i1; - var $i726: i1; - var $i728: i32; - var $i727: i32; - var $i724: i32; - var $i729: i64; - var $i730: i64; - var $i731: i32; - var $i732: i32; - var $i733: i64; - var $i734: i64; - var $i735: i32; - var $i736: i32; - var $i737: i32; - var $i738: i1; - var $i740: i1; - var $i741: i1; - var $i743: i32; - var $i742: i32; - var $i739: i32; - var $i744: i64; - var $i745: i64; - var $i746: i32; - var $i747: i32; - var $i748: i64; - var $i749: i64; - var $i750: i32; - var $i751: i32; - var $i752: i32; - var $i753: i1; - var $i755: i1; - var $i756: i1; - var $i758: i32; - var $i757: i32; - var $i754: i32; - var $i759: i64; - var $i760: i64; - var $i761: i32; - var $i762: i32; - var $i763: i64; - var $i764: i64; - var $i765: i32; - var $i766: i32; - var $i767: i32; - var $i768: i1; - var $i770: i1; - var $i771: i1; - var $i773: i32; - var $i772: i32; - var $i769: i32; - var $i774: i64; - var $i775: i64; - var $i776: i32; - var $i777: i32; - var $i778: i64; - var $i779: i64; - var $i780: i32; - var $i781: i32; - var $i782: i32; - var $i783: i1; - var $i785: i1; - var $i786: i1; - var $i788: i32; - var $i787: i32; - var $i784: i32; - var $i789: i64; - var $i790: i64; - var $i791: i32; - var $i792: i32; - var $i793: i64; - var $i794: i64; - var $i795: i32; - var $i796: i32; - var $i797: i32; - var $i798: i1; - var $i800: i1; - var $i801: i1; - var $i803: i32; - var $i802: i32; - var $i799: i32; - var $i804: i64; - var $i805: i64; - var $i806: i32; - var $i807: i32; - var $i808: i64; - var $i809: i64; - var $i810: i32; - var $i811: i32; - var $i812: i32; - var $i813: i1; - var $i815: i1; - var $i816: i1; - var $i818: i32; - var $i817: i32; - var $i814: i32; - var $i819: i64; - var $i820: i64; - var $i821: i32; - var $i822: i32; - var $i823: i64; - var $i824: i64; - var $i825: i32; - var $i826: i32; - var $i827: i32; - var $i828: i1; - var $i830: i1; - var $i831: i1; - var $i833: i32; - var $i832: i32; - var $i829: i32; - var $i834: i64; - var $i835: i64; - var $i836: i32; - var $i837: i32; - var $i838: i64; - var $i839: i64; - var $i840: i32; - var $i841: i32; - var $i842: i32; - var $i843: i1; - var $i845: i1; - var $i846: i1; - var $i848: i32; - var $i847: i32; - var $i844: i32; - var $i849: i64; - var $i850: i64; - var $i851: i32; - var $i852: i32; - var $i853: i64; - var $i854: i64; - var $i855: i32; - var $i856: i32; - var $i857: i32; - var $i858: i1; - var $i860: i1; - var $i861: i1; - var $i863: i32; - var $i862: i32; - var $i859: i32; - var $i864: i64; - var $i865: i64; - var $i866: i32; - var $i867: i32; - var $i868: i64; - var $i869: i64; - var $i870: i32; - var $i871: i32; - var $i872: i32; - var $i873: i1; - var $i875: i1; - var $i876: i1; - var $i878: i32; - var $i877: i32; - var $i874: i32; - var $i879: i64; - var $i880: i64; - var $i881: i32; - var $i882: i32; - var $i883: i64; - var $i884: i64; - var $i885: i32; - var $i886: i32; - var $i887: i32; - var $i888: i1; - var $i890: i1; - var $i891: i1; - var $i893: i32; - var $i892: i32; - var $i889: i32; - var $i894: i64; - var $i895: i64; - var $i896: i32; - var $i897: i32; - var $i898: i64; - var $i899: i64; - var $i900: i32; - var $i901: i32; - var $i902: i32; - var $i903: i1; - var $i905: i1; - var $i906: i1; - var $i908: i32; - var $i907: i32; - var $i904: i32; - var $i909: i64; - var $i910: i64; - var $i911: i32; - var $i912: i32; - var $i913: i64; - var $i914: i64; - var $i915: i32; - var $i916: i32; - var $i917: i32; - var $i918: i1; - var $i920: i1; - var $i921: i1; - var $i923: i32; - var $i922: i32; - var $i919: i32; - var $i924: i64; - var $i925: i64; - var $i926: i32; - var $i927: i32; - var $i928: i64; - var $i929: i64; - var $i930: i32; - var $i931: i32; - var $i932: i32; - var $i933: i1; - var $i935: i1; - var $i936: i1; - var $i938: i32; - var $i937: i32; - var $i934: i32; - var $i939: i64; - var $i940: i64; - var $i941: i32; - var $i942: i32; - var $i943: i64; - var $i944: i64; - var $i945: i32; - var $i946: i32; - var $i947: i32; - var $i948: i1; - var $i950: i1; - var $i951: i1; - var $i953: i32; - var $i952: i32; - var $i949: i32; -$bb0: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 60, 5} true; - assume {:verifier.code 0} true; - call {:cexpr "__SMACK_and32:arg:a"} boogie_si_record_i32($i0); - call {:cexpr "__SMACK_and32:arg:b"} boogie_si_record_i32($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 60, 5} true; - assume {:verifier.code 0} true; - $i2 := $add.i32(0, 0); - call {:cexpr "c"} boogie_si_record_i32($i2); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 61, 9} true; - assume {:verifier.code 0} true; - $i3 := $slt.i32($i0, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 61, 7} true; - assume {:verifier.code 0} true; - $i4 := $i2; - assume {:branchcond $i3} true; - goto $bb1, $bb2; -$bb1: - assume ($i3 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 62, 11} true; - assume {:verifier.code 0} true; - $i5 := $slt.i32($i1, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 62, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i5} true; - goto $bb4, $bb6; -$bb2: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 61, 7} true; - assume {:verifier.code 0} true; - assume !(($i3 == 1)); - goto $bb3; -$bb3: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 66, 7} true; - assume {:verifier.code 0} true; - $i9 := $sext.i32.i64($i0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 66, 9} true; - assume {:verifier.code 0} true; - $i10 := $srem.i64($i9, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 66, 7} true; - assume {:verifier.code 0} true; - $i11 := $trunc.i64.i32($i10); - call {:cexpr "a"} boogie_si_record_i32($i11); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 67, 5} true; - assume {:verifier.code 0} true; - $i12 := $add.i32($i11, $i11); - call {:cexpr "a"} boogie_si_record_i32($i12); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 68, 7} true; - assume {:verifier.code 0} true; - $i13 := $sext.i32.i64($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 68, 9} true; - assume {:verifier.code 0} true; - $i14 := $srem.i64($i13, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 68, 7} true; - assume {:verifier.code 0} true; - $i15 := $trunc.i64.i32($i14); - call {:cexpr "b"} boogie_si_record_i32($i15); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 69, 5} true; - assume {:verifier.code 0} true; - $i16 := $add.i32($i15, $i15); - call {:cexpr "b"} boogie_si_record_i32($i16); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 71, 5} true; - assume {:verifier.code 0} true; - $i17 := $add.i32($i4, $i4); - call {:cexpr "c"} boogie_si_record_i32($i17); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 72, 9} true; - assume {:verifier.code 0} true; - $i18 := $slt.i32($i12, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 72, 7} true; - assume {:verifier.code 0} true; - $i19 := $i17; - assume {:branchcond $i18} true; - goto $bb10, $bb11; -$bb4: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 62, 15} true; - assume {:verifier.code 0} true; - assume ($i5 == 1); - goto $bb5; -$bb5: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 63, 9} true; - assume {:verifier.code 0} true; - $i8 := $add.i32($i2, 1); - call {:cexpr "c"} boogie_si_record_i32($i8); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 64, 5} true; - assume {:verifier.code 0} true; - $i7 := $i8; - goto $bb9; -$bb6: - assume !(($i5 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 62, 20} true; - assume {:verifier.code 0} true; - $i6 := $sgt.i32($i1, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 62, 9} true; - assume {:verifier.code 0} true; - $i7 := $i2; - assume {:branchcond $i6} true; - goto $bb7, $bb8; -$bb7: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 62, 9} true; - assume {:verifier.code 0} true; - assume ($i6 == 1); - goto $bb5; -$bb8: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 62, 9} true; - assume {:verifier.code 0} true; - assume !(($i6 == 1)); - goto $bb9; -$bb9: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 65, 3} true; - assume {:verifier.code 0} true; - $i4 := $i7; - goto $bb3; -$bb10: - assume ($i18 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 73, 11} true; - assume {:verifier.code 0} true; - $i20 := $slt.i32($i16, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 73, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i20} true; - goto $bb13, $bb15; -$bb11: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 72, 7} true; - assume {:verifier.code 0} true; - assume !(($i18 == 1)); - goto $bb12; -$bb12: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 77, 7} true; - assume {:verifier.code 0} true; - $i24 := $sext.i32.i64($i12); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 77, 9} true; - assume {:verifier.code 0} true; - $i25 := $srem.i64($i24, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 77, 7} true; - assume {:verifier.code 0} true; - $i26 := $trunc.i64.i32($i25); - call {:cexpr "a"} boogie_si_record_i32($i26); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 78, 5} true; - assume {:verifier.code 0} true; - $i27 := $add.i32($i26, $i26); - call {:cexpr "a"} boogie_si_record_i32($i27); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 79, 7} true; - assume {:verifier.code 0} true; - $i28 := $sext.i32.i64($i16); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 79, 9} true; - assume {:verifier.code 0} true; - $i29 := $srem.i64($i28, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 79, 7} true; - assume {:verifier.code 0} true; - $i30 := $trunc.i64.i32($i29); - call {:cexpr "b"} boogie_si_record_i32($i30); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 80, 5} true; - assume {:verifier.code 0} true; - $i31 := $add.i32($i30, $i30); - call {:cexpr "b"} boogie_si_record_i32($i31); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 82, 5} true; - assume {:verifier.code 0} true; - $i32 := $add.i32($i19, $i19); - call {:cexpr "c"} boogie_si_record_i32($i32); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 83, 9} true; - assume {:verifier.code 0} true; - $i33 := $slt.i32($i27, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 83, 7} true; - assume {:verifier.code 0} true; - $i34 := $i32; - assume {:branchcond $i33} true; - goto $bb19, $bb20; -$bb13: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 73, 15} true; - assume {:verifier.code 0} true; - assume ($i20 == 1); - goto $bb14; -$bb14: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 74, 9} true; - assume {:verifier.code 0} true; - $i23 := $add.i32($i17, 1); - call {:cexpr "c"} boogie_si_record_i32($i23); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 75, 5} true; - assume {:verifier.code 0} true; - $i22 := $i23; - goto $bb18; -$bb15: - assume !(($i20 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 73, 20} true; - assume {:verifier.code 0} true; - $i21 := $sgt.i32($i16, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 73, 9} true; - assume {:verifier.code 0} true; - $i22 := $i17; - assume {:branchcond $i21} true; - goto $bb16, $bb17; -$bb16: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 73, 9} true; - assume {:verifier.code 0} true; - assume ($i21 == 1); - goto $bb14; -$bb17: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 73, 9} true; - assume {:verifier.code 0} true; - assume !(($i21 == 1)); - goto $bb18; -$bb18: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 76, 3} true; - assume {:verifier.code 0} true; - $i19 := $i22; - goto $bb12; -$bb19: - assume ($i33 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 84, 11} true; - assume {:verifier.code 0} true; - $i35 := $slt.i32($i31, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 84, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i35} true; - goto $bb22, $bb24; -$bb20: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 83, 7} true; - assume {:verifier.code 0} true; - assume !(($i33 == 1)); - goto $bb21; -$bb21: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 88, 7} true; - assume {:verifier.code 0} true; - $i39 := $sext.i32.i64($i27); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 88, 9} true; - assume {:verifier.code 0} true; - $i40 := $srem.i64($i39, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 88, 7} true; - assume {:verifier.code 0} true; - $i41 := $trunc.i64.i32($i40); - call {:cexpr "a"} boogie_si_record_i32($i41); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 89, 5} true; - assume {:verifier.code 0} true; - $i42 := $add.i32($i41, $i41); - call {:cexpr "a"} boogie_si_record_i32($i42); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 90, 7} true; - assume {:verifier.code 0} true; - $i43 := $sext.i32.i64($i31); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 90, 9} true; - assume {:verifier.code 0} true; - $i44 := $srem.i64($i43, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 90, 7} true; - assume {:verifier.code 0} true; - $i45 := $trunc.i64.i32($i44); - call {:cexpr "b"} boogie_si_record_i32($i45); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 91, 5} true; - assume {:verifier.code 0} true; - $i46 := $add.i32($i45, $i45); - call {:cexpr "b"} boogie_si_record_i32($i46); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 93, 5} true; - assume {:verifier.code 0} true; - $i47 := $add.i32($i34, $i34); - call {:cexpr "c"} boogie_si_record_i32($i47); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 94, 9} true; - assume {:verifier.code 0} true; - $i48 := $slt.i32($i42, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 94, 7} true; - assume {:verifier.code 0} true; - $i49 := $i47; - assume {:branchcond $i48} true; - goto $bb28, $bb29; -$bb22: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 84, 15} true; - assume {:verifier.code 0} true; - assume ($i35 == 1); - goto $bb23; -$bb23: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 85, 9} true; - assume {:verifier.code 0} true; - $i38 := $add.i32($i32, 1); - call {:cexpr "c"} boogie_si_record_i32($i38); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 86, 5} true; - assume {:verifier.code 0} true; - $i37 := $i38; - goto $bb27; -$bb24: - assume !(($i35 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 84, 20} true; - assume {:verifier.code 0} true; - $i36 := $sgt.i32($i31, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 84, 9} true; - assume {:verifier.code 0} true; - $i37 := $i32; - assume {:branchcond $i36} true; - goto $bb25, $bb26; -$bb25: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 84, 9} true; - assume {:verifier.code 0} true; - assume ($i36 == 1); - goto $bb23; -$bb26: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 84, 9} true; - assume {:verifier.code 0} true; - assume !(($i36 == 1)); - goto $bb27; -$bb27: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 87, 3} true; - assume {:verifier.code 0} true; - $i34 := $i37; - goto $bb21; -$bb28: - assume ($i48 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 95, 11} true; - assume {:verifier.code 0} true; - $i50 := $slt.i32($i46, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 95, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i50} true; - goto $bb31, $bb33; -$bb29: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 94, 7} true; - assume {:verifier.code 0} true; - assume !(($i48 == 1)); - goto $bb30; -$bb30: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 99, 7} true; - assume {:verifier.code 0} true; - $i54 := $sext.i32.i64($i42); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 99, 9} true; - assume {:verifier.code 0} true; - $i55 := $srem.i64($i54, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 99, 7} true; - assume {:verifier.code 0} true; - $i56 := $trunc.i64.i32($i55); - call {:cexpr "a"} boogie_si_record_i32($i56); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 100, 5} true; - assume {:verifier.code 0} true; - $i57 := $add.i32($i56, $i56); - call {:cexpr "a"} boogie_si_record_i32($i57); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 101, 7} true; - assume {:verifier.code 0} true; - $i58 := $sext.i32.i64($i46); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 101, 9} true; - assume {:verifier.code 0} true; - $i59 := $srem.i64($i58, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 101, 7} true; - assume {:verifier.code 0} true; - $i60 := $trunc.i64.i32($i59); - call {:cexpr "b"} boogie_si_record_i32($i60); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 102, 5} true; - assume {:verifier.code 0} true; - $i61 := $add.i32($i60, $i60); - call {:cexpr "b"} boogie_si_record_i32($i61); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 104, 5} true; - assume {:verifier.code 0} true; - $i62 := $add.i32($i49, $i49); - call {:cexpr "c"} boogie_si_record_i32($i62); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 105, 9} true; - assume {:verifier.code 0} true; - $i63 := $slt.i32($i57, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 105, 7} true; - assume {:verifier.code 0} true; - $i64 := $i62; - assume {:branchcond $i63} true; - goto $bb37, $bb38; -$bb31: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 95, 15} true; - assume {:verifier.code 0} true; - assume ($i50 == 1); - goto $bb32; -$bb32: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 96, 9} true; - assume {:verifier.code 0} true; - $i53 := $add.i32($i47, 1); - call {:cexpr "c"} boogie_si_record_i32($i53); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 97, 5} true; - assume {:verifier.code 0} true; - $i52 := $i53; - goto $bb36; -$bb33: - assume !(($i50 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 95, 20} true; - assume {:verifier.code 0} true; - $i51 := $sgt.i32($i46, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 95, 9} true; - assume {:verifier.code 0} true; - $i52 := $i47; - assume {:branchcond $i51} true; - goto $bb34, $bb35; -$bb34: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 95, 9} true; - assume {:verifier.code 0} true; - assume ($i51 == 1); - goto $bb32; -$bb35: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 95, 9} true; - assume {:verifier.code 0} true; - assume !(($i51 == 1)); - goto $bb36; -$bb36: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 98, 3} true; - assume {:verifier.code 0} true; - $i49 := $i52; - goto $bb30; -$bb37: - assume ($i63 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 106, 11} true; - assume {:verifier.code 0} true; - $i65 := $slt.i32($i61, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 106, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i65} true; - goto $bb40, $bb42; -$bb38: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 105, 7} true; - assume {:verifier.code 0} true; - assume !(($i63 == 1)); - goto $bb39; -$bb39: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 110, 7} true; - assume {:verifier.code 0} true; - $i69 := $sext.i32.i64($i57); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 110, 9} true; - assume {:verifier.code 0} true; - $i70 := $srem.i64($i69, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 110, 7} true; - assume {:verifier.code 0} true; - $i71 := $trunc.i64.i32($i70); - call {:cexpr "a"} boogie_si_record_i32($i71); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 111, 5} true; - assume {:verifier.code 0} true; - $i72 := $add.i32($i71, $i71); - call {:cexpr "a"} boogie_si_record_i32($i72); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 112, 7} true; - assume {:verifier.code 0} true; - $i73 := $sext.i32.i64($i61); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 112, 9} true; - assume {:verifier.code 0} true; - $i74 := $srem.i64($i73, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 112, 7} true; - assume {:verifier.code 0} true; - $i75 := $trunc.i64.i32($i74); - call {:cexpr "b"} boogie_si_record_i32($i75); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 113, 5} true; - assume {:verifier.code 0} true; - $i76 := $add.i32($i75, $i75); - call {:cexpr "b"} boogie_si_record_i32($i76); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 115, 5} true; - assume {:verifier.code 0} true; - $i77 := $add.i32($i64, $i64); - call {:cexpr "c"} boogie_si_record_i32($i77); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 116, 9} true; - assume {:verifier.code 0} true; - $i78 := $slt.i32($i72, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 116, 7} true; - assume {:verifier.code 0} true; - $i79 := $i77; - assume {:branchcond $i78} true; - goto $bb46, $bb47; -$bb40: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 106, 15} true; - assume {:verifier.code 0} true; - assume ($i65 == 1); - goto $bb41; -$bb41: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 107, 9} true; - assume {:verifier.code 0} true; - $i68 := $add.i32($i62, 1); - call {:cexpr "c"} boogie_si_record_i32($i68); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 108, 5} true; - assume {:verifier.code 0} true; - $i67 := $i68; - goto $bb45; -$bb42: - assume !(($i65 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 106, 20} true; - assume {:verifier.code 0} true; - $i66 := $sgt.i32($i61, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 106, 9} true; - assume {:verifier.code 0} true; - $i67 := $i62; - assume {:branchcond $i66} true; - goto $bb43, $bb44; -$bb43: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 106, 9} true; - assume {:verifier.code 0} true; - assume ($i66 == 1); - goto $bb41; -$bb44: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 106, 9} true; - assume {:verifier.code 0} true; - assume !(($i66 == 1)); - goto $bb45; -$bb45: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 109, 3} true; - assume {:verifier.code 0} true; - $i64 := $i67; - goto $bb39; -$bb46: - assume ($i78 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 117, 11} true; - assume {:verifier.code 0} true; - $i80 := $slt.i32($i76, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 117, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i80} true; - goto $bb49, $bb51; -$bb47: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 116, 7} true; - assume {:verifier.code 0} true; - assume !(($i78 == 1)); - goto $bb48; -$bb48: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 121, 7} true; - assume {:verifier.code 0} true; - $i84 := $sext.i32.i64($i72); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 121, 9} true; - assume {:verifier.code 0} true; - $i85 := $srem.i64($i84, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 121, 7} true; - assume {:verifier.code 0} true; - $i86 := $trunc.i64.i32($i85); - call {:cexpr "a"} boogie_si_record_i32($i86); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 122, 5} true; - assume {:verifier.code 0} true; - $i87 := $add.i32($i86, $i86); - call {:cexpr "a"} boogie_si_record_i32($i87); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 123, 7} true; - assume {:verifier.code 0} true; - $i88 := $sext.i32.i64($i76); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 123, 9} true; - assume {:verifier.code 0} true; - $i89 := $srem.i64($i88, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 123, 7} true; - assume {:verifier.code 0} true; - $i90 := $trunc.i64.i32($i89); - call {:cexpr "b"} boogie_si_record_i32($i90); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 124, 5} true; - assume {:verifier.code 0} true; - $i91 := $add.i32($i90, $i90); - call {:cexpr "b"} boogie_si_record_i32($i91); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 126, 5} true; - assume {:verifier.code 0} true; - $i92 := $add.i32($i79, $i79); - call {:cexpr "c"} boogie_si_record_i32($i92); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 127, 9} true; - assume {:verifier.code 0} true; - $i93 := $slt.i32($i87, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 127, 7} true; - assume {:verifier.code 0} true; - $i94 := $i92; - assume {:branchcond $i93} true; - goto $bb55, $bb56; -$bb49: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 117, 15} true; - assume {:verifier.code 0} true; - assume ($i80 == 1); - goto $bb50; -$bb50: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 118, 9} true; - assume {:verifier.code 0} true; - $i83 := $add.i32($i77, 1); - call {:cexpr "c"} boogie_si_record_i32($i83); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 119, 5} true; - assume {:verifier.code 0} true; - $i82 := $i83; - goto $bb54; -$bb51: - assume !(($i80 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 117, 20} true; - assume {:verifier.code 0} true; - $i81 := $sgt.i32($i76, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 117, 9} true; - assume {:verifier.code 0} true; - $i82 := $i77; - assume {:branchcond $i81} true; - goto $bb52, $bb53; -$bb52: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 117, 9} true; - assume {:verifier.code 0} true; - assume ($i81 == 1); - goto $bb50; -$bb53: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 117, 9} true; - assume {:verifier.code 0} true; - assume !(($i81 == 1)); - goto $bb54; -$bb54: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 120, 3} true; - assume {:verifier.code 0} true; - $i79 := $i82; - goto $bb48; -$bb55: - assume ($i93 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 128, 11} true; - assume {:verifier.code 0} true; - $i95 := $slt.i32($i91, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 128, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i95} true; - goto $bb58, $bb60; -$bb56: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 127, 7} true; - assume {:verifier.code 0} true; - assume !(($i93 == 1)); - goto $bb57; -$bb57: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 132, 7} true; - assume {:verifier.code 0} true; - $i99 := $sext.i32.i64($i87); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 132, 9} true; - assume {:verifier.code 0} true; - $i100 := $srem.i64($i99, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 132, 7} true; - assume {:verifier.code 0} true; - $i101 := $trunc.i64.i32($i100); - call {:cexpr "a"} boogie_si_record_i32($i101); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 133, 5} true; - assume {:verifier.code 0} true; - $i102 := $add.i32($i101, $i101); - call {:cexpr "a"} boogie_si_record_i32($i102); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 134, 7} true; - assume {:verifier.code 0} true; - $i103 := $sext.i32.i64($i91); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 134, 9} true; - assume {:verifier.code 0} true; - $i104 := $srem.i64($i103, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 134, 7} true; - assume {:verifier.code 0} true; - $i105 := $trunc.i64.i32($i104); - call {:cexpr "b"} boogie_si_record_i32($i105); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 135, 5} true; - assume {:verifier.code 0} true; - $i106 := $add.i32($i105, $i105); - call {:cexpr "b"} boogie_si_record_i32($i106); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 137, 5} true; - assume {:verifier.code 0} true; - $i107 := $add.i32($i94, $i94); - call {:cexpr "c"} boogie_si_record_i32($i107); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 138, 9} true; - assume {:verifier.code 0} true; - $i108 := $slt.i32($i102, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 138, 7} true; - assume {:verifier.code 0} true; - $i109 := $i107; - assume {:branchcond $i108} true; - goto $bb64, $bb65; -$bb58: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 128, 15} true; - assume {:verifier.code 0} true; - assume ($i95 == 1); - goto $bb59; -$bb59: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 129, 9} true; - assume {:verifier.code 0} true; - $i98 := $add.i32($i92, 1); - call {:cexpr "c"} boogie_si_record_i32($i98); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 130, 5} true; - assume {:verifier.code 0} true; - $i97 := $i98; - goto $bb63; -$bb60: - assume !(($i95 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 128, 20} true; - assume {:verifier.code 0} true; - $i96 := $sgt.i32($i91, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 128, 9} true; - assume {:verifier.code 0} true; - $i97 := $i92; - assume {:branchcond $i96} true; - goto $bb61, $bb62; -$bb61: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 128, 9} true; - assume {:verifier.code 0} true; - assume ($i96 == 1); - goto $bb59; -$bb62: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 128, 9} true; - assume {:verifier.code 0} true; - assume !(($i96 == 1)); - goto $bb63; -$bb63: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 131, 3} true; - assume {:verifier.code 0} true; - $i94 := $i97; - goto $bb57; -$bb64: - assume ($i108 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 139, 11} true; - assume {:verifier.code 0} true; - $i110 := $slt.i32($i106, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 139, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i110} true; - goto $bb67, $bb69; -$bb65: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 138, 7} true; - assume {:verifier.code 0} true; - assume !(($i108 == 1)); - goto $bb66; -$bb66: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 143, 7} true; - assume {:verifier.code 0} true; - $i114 := $sext.i32.i64($i102); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 143, 9} true; - assume {:verifier.code 0} true; - $i115 := $srem.i64($i114, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 143, 7} true; - assume {:verifier.code 0} true; - $i116 := $trunc.i64.i32($i115); - call {:cexpr "a"} boogie_si_record_i32($i116); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 144, 5} true; - assume {:verifier.code 0} true; - $i117 := $add.i32($i116, $i116); - call {:cexpr "a"} boogie_si_record_i32($i117); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 145, 7} true; - assume {:verifier.code 0} true; - $i118 := $sext.i32.i64($i106); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 145, 9} true; - assume {:verifier.code 0} true; - $i119 := $srem.i64($i118, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 145, 7} true; - assume {:verifier.code 0} true; - $i120 := $trunc.i64.i32($i119); - call {:cexpr "b"} boogie_si_record_i32($i120); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 146, 5} true; - assume {:verifier.code 0} true; - $i121 := $add.i32($i120, $i120); - call {:cexpr "b"} boogie_si_record_i32($i121); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 148, 5} true; - assume {:verifier.code 0} true; - $i122 := $add.i32($i109, $i109); - call {:cexpr "c"} boogie_si_record_i32($i122); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 149, 9} true; - assume {:verifier.code 0} true; - $i123 := $slt.i32($i117, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 149, 7} true; - assume {:verifier.code 0} true; - $i124 := $i122; - assume {:branchcond $i123} true; - goto $bb73, $bb74; -$bb67: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 139, 15} true; - assume {:verifier.code 0} true; - assume ($i110 == 1); - goto $bb68; -$bb68: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 140, 9} true; - assume {:verifier.code 0} true; - $i113 := $add.i32($i107, 1); - call {:cexpr "c"} boogie_si_record_i32($i113); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 141, 5} true; - assume {:verifier.code 0} true; - $i112 := $i113; - goto $bb72; -$bb69: - assume !(($i110 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 139, 20} true; - assume {:verifier.code 0} true; - $i111 := $sgt.i32($i106, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 139, 9} true; - assume {:verifier.code 0} true; - $i112 := $i107; - assume {:branchcond $i111} true; - goto $bb70, $bb71; -$bb70: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 139, 9} true; - assume {:verifier.code 0} true; - assume ($i111 == 1); - goto $bb68; -$bb71: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 139, 9} true; - assume {:verifier.code 0} true; - assume !(($i111 == 1)); - goto $bb72; -$bb72: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 142, 3} true; - assume {:verifier.code 0} true; - $i109 := $i112; - goto $bb66; -$bb73: - assume ($i123 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 150, 11} true; - assume {:verifier.code 0} true; - $i125 := $slt.i32($i121, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 150, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i125} true; - goto $bb76, $bb78; -$bb74: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 149, 7} true; - assume {:verifier.code 0} true; - assume !(($i123 == 1)); - goto $bb75; -$bb75: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 154, 7} true; - assume {:verifier.code 0} true; - $i129 := $sext.i32.i64($i117); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 154, 9} true; - assume {:verifier.code 0} true; - $i130 := $srem.i64($i129, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 154, 7} true; - assume {:verifier.code 0} true; - $i131 := $trunc.i64.i32($i130); - call {:cexpr "a"} boogie_si_record_i32($i131); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 155, 5} true; - assume {:verifier.code 0} true; - $i132 := $add.i32($i131, $i131); - call {:cexpr "a"} boogie_si_record_i32($i132); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 156, 7} true; - assume {:verifier.code 0} true; - $i133 := $sext.i32.i64($i121); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 156, 9} true; - assume {:verifier.code 0} true; - $i134 := $srem.i64($i133, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 156, 7} true; - assume {:verifier.code 0} true; - $i135 := $trunc.i64.i32($i134); - call {:cexpr "b"} boogie_si_record_i32($i135); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 157, 5} true; - assume {:verifier.code 0} true; - $i136 := $add.i32($i135, $i135); - call {:cexpr "b"} boogie_si_record_i32($i136); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 159, 5} true; - assume {:verifier.code 0} true; - $i137 := $add.i32($i124, $i124); - call {:cexpr "c"} boogie_si_record_i32($i137); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 160, 9} true; - assume {:verifier.code 0} true; - $i138 := $slt.i32($i132, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 160, 7} true; - assume {:verifier.code 0} true; - $i139 := $i137; - assume {:branchcond $i138} true; - goto $bb82, $bb83; -$bb76: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 150, 15} true; - assume {:verifier.code 0} true; - assume ($i125 == 1); - goto $bb77; -$bb77: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 151, 9} true; - assume {:verifier.code 0} true; - $i128 := $add.i32($i122, 1); - call {:cexpr "c"} boogie_si_record_i32($i128); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 152, 5} true; - assume {:verifier.code 0} true; - $i127 := $i128; - goto $bb81; -$bb78: - assume !(($i125 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 150, 20} true; - assume {:verifier.code 0} true; - $i126 := $sgt.i32($i121, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 150, 9} true; - assume {:verifier.code 0} true; - $i127 := $i122; - assume {:branchcond $i126} true; - goto $bb79, $bb80; -$bb79: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 150, 9} true; - assume {:verifier.code 0} true; - assume ($i126 == 1); - goto $bb77; -$bb80: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 150, 9} true; - assume {:verifier.code 0} true; - assume !(($i126 == 1)); - goto $bb81; -$bb81: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 153, 3} true; - assume {:verifier.code 0} true; - $i124 := $i127; - goto $bb75; -$bb82: - assume ($i138 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 161, 11} true; - assume {:verifier.code 0} true; - $i140 := $slt.i32($i136, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 161, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i140} true; - goto $bb85, $bb87; -$bb83: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 160, 7} true; - assume {:verifier.code 0} true; - assume !(($i138 == 1)); - goto $bb84; -$bb84: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 165, 7} true; - assume {:verifier.code 0} true; - $i144 := $sext.i32.i64($i132); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 165, 9} true; - assume {:verifier.code 0} true; - $i145 := $srem.i64($i144, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 165, 7} true; - assume {:verifier.code 0} true; - $i146 := $trunc.i64.i32($i145); - call {:cexpr "a"} boogie_si_record_i32($i146); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 166, 5} true; - assume {:verifier.code 0} true; - $i147 := $add.i32($i146, $i146); - call {:cexpr "a"} boogie_si_record_i32($i147); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 167, 7} true; - assume {:verifier.code 0} true; - $i148 := $sext.i32.i64($i136); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 167, 9} true; - assume {:verifier.code 0} true; - $i149 := $srem.i64($i148, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 167, 7} true; - assume {:verifier.code 0} true; - $i150 := $trunc.i64.i32($i149); - call {:cexpr "b"} boogie_si_record_i32($i150); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 168, 5} true; - assume {:verifier.code 0} true; - $i151 := $add.i32($i150, $i150); - call {:cexpr "b"} boogie_si_record_i32($i151); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 170, 5} true; - assume {:verifier.code 0} true; - $i152 := $add.i32($i139, $i139); - call {:cexpr "c"} boogie_si_record_i32($i152); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 171, 9} true; - assume {:verifier.code 0} true; - $i153 := $slt.i32($i147, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 171, 7} true; - assume {:verifier.code 0} true; - $i154 := $i152; - assume {:branchcond $i153} true; - goto $bb91, $bb92; -$bb85: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 161, 15} true; - assume {:verifier.code 0} true; - assume ($i140 == 1); - goto $bb86; -$bb86: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 162, 9} true; - assume {:verifier.code 0} true; - $i143 := $add.i32($i137, 1); - call {:cexpr "c"} boogie_si_record_i32($i143); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 163, 5} true; - assume {:verifier.code 0} true; - $i142 := $i143; - goto $bb90; -$bb87: - assume !(($i140 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 161, 20} true; - assume {:verifier.code 0} true; - $i141 := $sgt.i32($i136, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 161, 9} true; - assume {:verifier.code 0} true; - $i142 := $i137; - assume {:branchcond $i141} true; - goto $bb88, $bb89; -$bb88: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 161, 9} true; - assume {:verifier.code 0} true; - assume ($i141 == 1); - goto $bb86; -$bb89: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 161, 9} true; - assume {:verifier.code 0} true; - assume !(($i141 == 1)); - goto $bb90; -$bb90: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 164, 3} true; - assume {:verifier.code 0} true; - $i139 := $i142; - goto $bb84; -$bb91: - assume ($i153 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 172, 11} true; - assume {:verifier.code 0} true; - $i155 := $slt.i32($i151, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 172, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i155} true; - goto $bb94, $bb96; -$bb92: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 171, 7} true; - assume {:verifier.code 0} true; - assume !(($i153 == 1)); - goto $bb93; -$bb93: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 176, 7} true; - assume {:verifier.code 0} true; - $i159 := $sext.i32.i64($i147); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 176, 9} true; - assume {:verifier.code 0} true; - $i160 := $srem.i64($i159, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 176, 7} true; - assume {:verifier.code 0} true; - $i161 := $trunc.i64.i32($i160); - call {:cexpr "a"} boogie_si_record_i32($i161); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 177, 5} true; - assume {:verifier.code 0} true; - $i162 := $add.i32($i161, $i161); - call {:cexpr "a"} boogie_si_record_i32($i162); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 178, 7} true; - assume {:verifier.code 0} true; - $i163 := $sext.i32.i64($i151); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 178, 9} true; - assume {:verifier.code 0} true; - $i164 := $srem.i64($i163, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 178, 7} true; - assume {:verifier.code 0} true; - $i165 := $trunc.i64.i32($i164); - call {:cexpr "b"} boogie_si_record_i32($i165); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 179, 5} true; - assume {:verifier.code 0} true; - $i166 := $add.i32($i165, $i165); - call {:cexpr "b"} boogie_si_record_i32($i166); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 181, 5} true; - assume {:verifier.code 0} true; - $i167 := $add.i32($i154, $i154); - call {:cexpr "c"} boogie_si_record_i32($i167); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 182, 9} true; - assume {:verifier.code 0} true; - $i168 := $slt.i32($i162, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 182, 7} true; - assume {:verifier.code 0} true; - $i169 := $i167; - assume {:branchcond $i168} true; - goto $bb100, $bb101; -$bb94: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 172, 15} true; - assume {:verifier.code 0} true; - assume ($i155 == 1); - goto $bb95; -$bb95: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 173, 9} true; - assume {:verifier.code 0} true; - $i158 := $add.i32($i152, 1); - call {:cexpr "c"} boogie_si_record_i32($i158); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 174, 5} true; - assume {:verifier.code 0} true; - $i157 := $i158; - goto $bb99; -$bb96: - assume !(($i155 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 172, 20} true; - assume {:verifier.code 0} true; - $i156 := $sgt.i32($i151, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 172, 9} true; - assume {:verifier.code 0} true; - $i157 := $i152; - assume {:branchcond $i156} true; - goto $bb97, $bb98; -$bb97: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 172, 9} true; - assume {:verifier.code 0} true; - assume ($i156 == 1); - goto $bb95; -$bb98: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 172, 9} true; - assume {:verifier.code 0} true; - assume !(($i156 == 1)); - goto $bb99; -$bb99: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 175, 3} true; - assume {:verifier.code 0} true; - $i154 := $i157; - goto $bb93; -$bb100: - assume ($i168 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 183, 11} true; - assume {:verifier.code 0} true; - $i170 := $slt.i32($i166, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 183, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i170} true; - goto $bb103, $bb105; -$bb101: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 182, 7} true; - assume {:verifier.code 0} true; - assume !(($i168 == 1)); - goto $bb102; -$bb102: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 187, 7} true; - assume {:verifier.code 0} true; - $i174 := $sext.i32.i64($i162); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 187, 9} true; - assume {:verifier.code 0} true; - $i175 := $srem.i64($i174, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 187, 7} true; - assume {:verifier.code 0} true; - $i176 := $trunc.i64.i32($i175); - call {:cexpr "a"} boogie_si_record_i32($i176); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 188, 5} true; - assume {:verifier.code 0} true; - $i177 := $add.i32($i176, $i176); - call {:cexpr "a"} boogie_si_record_i32($i177); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 189, 7} true; - assume {:verifier.code 0} true; - $i178 := $sext.i32.i64($i166); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 189, 9} true; - assume {:verifier.code 0} true; - $i179 := $srem.i64($i178, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 189, 7} true; - assume {:verifier.code 0} true; - $i180 := $trunc.i64.i32($i179); - call {:cexpr "b"} boogie_si_record_i32($i180); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 190, 5} true; - assume {:verifier.code 0} true; - $i181 := $add.i32($i180, $i180); - call {:cexpr "b"} boogie_si_record_i32($i181); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 192, 5} true; - assume {:verifier.code 0} true; - $i182 := $add.i32($i169, $i169); - call {:cexpr "c"} boogie_si_record_i32($i182); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 193, 9} true; - assume {:verifier.code 0} true; - $i183 := $slt.i32($i177, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 193, 7} true; - assume {:verifier.code 0} true; - $i184 := $i182; - assume {:branchcond $i183} true; - goto $bb109, $bb110; -$bb103: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 183, 15} true; - assume {:verifier.code 0} true; - assume ($i170 == 1); - goto $bb104; -$bb104: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 184, 9} true; - assume {:verifier.code 0} true; - $i173 := $add.i32($i167, 1); - call {:cexpr "c"} boogie_si_record_i32($i173); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 185, 5} true; - assume {:verifier.code 0} true; - $i172 := $i173; - goto $bb108; -$bb105: - assume !(($i170 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 183, 20} true; - assume {:verifier.code 0} true; - $i171 := $sgt.i32($i166, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 183, 9} true; - assume {:verifier.code 0} true; - $i172 := $i167; - assume {:branchcond $i171} true; - goto $bb106, $bb107; -$bb106: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 183, 9} true; - assume {:verifier.code 0} true; - assume ($i171 == 1); - goto $bb104; -$bb107: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 183, 9} true; - assume {:verifier.code 0} true; - assume !(($i171 == 1)); - goto $bb108; -$bb108: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 186, 3} true; - assume {:verifier.code 0} true; - $i169 := $i172; - goto $bb102; -$bb109: - assume ($i183 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 194, 11} true; - assume {:verifier.code 0} true; - $i185 := $slt.i32($i181, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 194, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i185} true; - goto $bb112, $bb114; -$bb110: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 193, 7} true; - assume {:verifier.code 0} true; - assume !(($i183 == 1)); - goto $bb111; -$bb111: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 198, 7} true; - assume {:verifier.code 0} true; - $i189 := $sext.i32.i64($i177); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 198, 9} true; - assume {:verifier.code 0} true; - $i190 := $srem.i64($i189, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 198, 7} true; - assume {:verifier.code 0} true; - $i191 := $trunc.i64.i32($i190); - call {:cexpr "a"} boogie_si_record_i32($i191); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 199, 5} true; - assume {:verifier.code 0} true; - $i192 := $add.i32($i191, $i191); - call {:cexpr "a"} boogie_si_record_i32($i192); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 200, 7} true; - assume {:verifier.code 0} true; - $i193 := $sext.i32.i64($i181); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 200, 9} true; - assume {:verifier.code 0} true; - $i194 := $srem.i64($i193, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 200, 7} true; - assume {:verifier.code 0} true; - $i195 := $trunc.i64.i32($i194); - call {:cexpr "b"} boogie_si_record_i32($i195); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 201, 5} true; - assume {:verifier.code 0} true; - $i196 := $add.i32($i195, $i195); - call {:cexpr "b"} boogie_si_record_i32($i196); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 203, 5} true; - assume {:verifier.code 0} true; - $i197 := $add.i32($i184, $i184); - call {:cexpr "c"} boogie_si_record_i32($i197); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 204, 9} true; - assume {:verifier.code 0} true; - $i198 := $slt.i32($i192, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 204, 7} true; - assume {:verifier.code 0} true; - $i199 := $i197; - assume {:branchcond $i198} true; - goto $bb118, $bb119; -$bb112: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 194, 15} true; - assume {:verifier.code 0} true; - assume ($i185 == 1); - goto $bb113; -$bb113: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 195, 9} true; - assume {:verifier.code 0} true; - $i188 := $add.i32($i182, 1); - call {:cexpr "c"} boogie_si_record_i32($i188); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 196, 5} true; - assume {:verifier.code 0} true; - $i187 := $i188; - goto $bb117; -$bb114: - assume !(($i185 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 194, 20} true; - assume {:verifier.code 0} true; - $i186 := $sgt.i32($i181, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 194, 9} true; - assume {:verifier.code 0} true; - $i187 := $i182; - assume {:branchcond $i186} true; - goto $bb115, $bb116; -$bb115: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 194, 9} true; - assume {:verifier.code 0} true; - assume ($i186 == 1); - goto $bb113; -$bb116: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 194, 9} true; - assume {:verifier.code 0} true; - assume !(($i186 == 1)); - goto $bb117; -$bb117: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 197, 3} true; - assume {:verifier.code 0} true; - $i184 := $i187; - goto $bb111; -$bb118: - assume ($i198 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 205, 11} true; - assume {:verifier.code 0} true; - $i200 := $slt.i32($i196, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 205, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i200} true; - goto $bb121, $bb123; -$bb119: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 204, 7} true; - assume {:verifier.code 0} true; - assume !(($i198 == 1)); - goto $bb120; -$bb120: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 209, 7} true; - assume {:verifier.code 0} true; - $i204 := $sext.i32.i64($i192); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 209, 9} true; - assume {:verifier.code 0} true; - $i205 := $srem.i64($i204, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 209, 7} true; - assume {:verifier.code 0} true; - $i206 := $trunc.i64.i32($i205); - call {:cexpr "a"} boogie_si_record_i32($i206); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 210, 5} true; - assume {:verifier.code 0} true; - $i207 := $add.i32($i206, $i206); - call {:cexpr "a"} boogie_si_record_i32($i207); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 211, 7} true; - assume {:verifier.code 0} true; - $i208 := $sext.i32.i64($i196); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 211, 9} true; - assume {:verifier.code 0} true; - $i209 := $srem.i64($i208, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 211, 7} true; - assume {:verifier.code 0} true; - $i210 := $trunc.i64.i32($i209); - call {:cexpr "b"} boogie_si_record_i32($i210); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 212, 5} true; - assume {:verifier.code 0} true; - $i211 := $add.i32($i210, $i210); - call {:cexpr "b"} boogie_si_record_i32($i211); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 214, 5} true; - assume {:verifier.code 0} true; - $i212 := $add.i32($i199, $i199); - call {:cexpr "c"} boogie_si_record_i32($i212); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 215, 9} true; - assume {:verifier.code 0} true; - $i213 := $slt.i32($i207, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 215, 7} true; - assume {:verifier.code 0} true; - $i214 := $i212; - assume {:branchcond $i213} true; - goto $bb127, $bb128; -$bb121: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 205, 15} true; - assume {:verifier.code 0} true; - assume ($i200 == 1); - goto $bb122; -$bb122: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 206, 9} true; - assume {:verifier.code 0} true; - $i203 := $add.i32($i197, 1); - call {:cexpr "c"} boogie_si_record_i32($i203); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 207, 5} true; - assume {:verifier.code 0} true; - $i202 := $i203; - goto $bb126; -$bb123: - assume !(($i200 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 205, 20} true; - assume {:verifier.code 0} true; - $i201 := $sgt.i32($i196, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 205, 9} true; - assume {:verifier.code 0} true; - $i202 := $i197; - assume {:branchcond $i201} true; - goto $bb124, $bb125; -$bb124: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 205, 9} true; - assume {:verifier.code 0} true; - assume ($i201 == 1); - goto $bb122; -$bb125: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 205, 9} true; - assume {:verifier.code 0} true; - assume !(($i201 == 1)); - goto $bb126; -$bb126: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 208, 3} true; - assume {:verifier.code 0} true; - $i199 := $i202; - goto $bb120; -$bb127: - assume ($i213 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 216, 11} true; - assume {:verifier.code 0} true; - $i215 := $slt.i32($i211, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 216, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i215} true; - goto $bb130, $bb132; -$bb128: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 215, 7} true; - assume {:verifier.code 0} true; - assume !(($i213 == 1)); - goto $bb129; -$bb129: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 220, 7} true; - assume {:verifier.code 0} true; - $i219 := $sext.i32.i64($i207); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 220, 9} true; - assume {:verifier.code 0} true; - $i220 := $srem.i64($i219, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 220, 7} true; - assume {:verifier.code 0} true; - $i221 := $trunc.i64.i32($i220); - call {:cexpr "a"} boogie_si_record_i32($i221); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 221, 5} true; - assume {:verifier.code 0} true; - $i222 := $add.i32($i221, $i221); - call {:cexpr "a"} boogie_si_record_i32($i222); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 222, 7} true; - assume {:verifier.code 0} true; - $i223 := $sext.i32.i64($i211); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 222, 9} true; - assume {:verifier.code 0} true; - $i224 := $srem.i64($i223, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 222, 7} true; - assume {:verifier.code 0} true; - $i225 := $trunc.i64.i32($i224); - call {:cexpr "b"} boogie_si_record_i32($i225); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 223, 5} true; - assume {:verifier.code 0} true; - $i226 := $add.i32($i225, $i225); - call {:cexpr "b"} boogie_si_record_i32($i226); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 225, 5} true; - assume {:verifier.code 0} true; - $i227 := $add.i32($i214, $i214); - call {:cexpr "c"} boogie_si_record_i32($i227); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 226, 9} true; - assume {:verifier.code 0} true; - $i228 := $slt.i32($i222, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 226, 7} true; - assume {:verifier.code 0} true; - $i229 := $i227; - assume {:branchcond $i228} true; - goto $bb136, $bb137; -$bb130: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 216, 15} true; - assume {:verifier.code 0} true; - assume ($i215 == 1); - goto $bb131; -$bb131: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 217, 9} true; - assume {:verifier.code 0} true; - $i218 := $add.i32($i212, 1); - call {:cexpr "c"} boogie_si_record_i32($i218); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 218, 5} true; - assume {:verifier.code 0} true; - $i217 := $i218; - goto $bb135; -$bb132: - assume !(($i215 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 216, 20} true; - assume {:verifier.code 0} true; - $i216 := $sgt.i32($i211, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 216, 9} true; - assume {:verifier.code 0} true; - $i217 := $i212; - assume {:branchcond $i216} true; - goto $bb133, $bb134; -$bb133: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 216, 9} true; - assume {:verifier.code 0} true; - assume ($i216 == 1); - goto $bb131; -$bb134: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 216, 9} true; - assume {:verifier.code 0} true; - assume !(($i216 == 1)); - goto $bb135; -$bb135: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 219, 3} true; - assume {:verifier.code 0} true; - $i214 := $i217; - goto $bb129; -$bb136: - assume ($i228 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 227, 11} true; - assume {:verifier.code 0} true; - $i230 := $slt.i32($i226, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 227, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i230} true; - goto $bb139, $bb141; -$bb137: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 226, 7} true; - assume {:verifier.code 0} true; - assume !(($i228 == 1)); - goto $bb138; -$bb138: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 231, 7} true; - assume {:verifier.code 0} true; - $i234 := $sext.i32.i64($i222); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 231, 9} true; - assume {:verifier.code 0} true; - $i235 := $srem.i64($i234, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 231, 7} true; - assume {:verifier.code 0} true; - $i236 := $trunc.i64.i32($i235); - call {:cexpr "a"} boogie_si_record_i32($i236); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 232, 5} true; - assume {:verifier.code 0} true; - $i237 := $add.i32($i236, $i236); - call {:cexpr "a"} boogie_si_record_i32($i237); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 233, 7} true; - assume {:verifier.code 0} true; - $i238 := $sext.i32.i64($i226); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 233, 9} true; - assume {:verifier.code 0} true; - $i239 := $srem.i64($i238, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 233, 7} true; - assume {:verifier.code 0} true; - $i240 := $trunc.i64.i32($i239); - call {:cexpr "b"} boogie_si_record_i32($i240); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 234, 5} true; - assume {:verifier.code 0} true; - $i241 := $add.i32($i240, $i240); - call {:cexpr "b"} boogie_si_record_i32($i241); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 236, 5} true; - assume {:verifier.code 0} true; - $i242 := $add.i32($i229, $i229); - call {:cexpr "c"} boogie_si_record_i32($i242); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 237, 9} true; - assume {:verifier.code 0} true; - $i243 := $slt.i32($i237, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 237, 7} true; - assume {:verifier.code 0} true; - $i244 := $i242; - assume {:branchcond $i243} true; - goto $bb145, $bb146; -$bb139: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 227, 15} true; - assume {:verifier.code 0} true; - assume ($i230 == 1); - goto $bb140; -$bb140: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 228, 9} true; - assume {:verifier.code 0} true; - $i233 := $add.i32($i227, 1); - call {:cexpr "c"} boogie_si_record_i32($i233); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 229, 5} true; - assume {:verifier.code 0} true; - $i232 := $i233; - goto $bb144; -$bb141: - assume !(($i230 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 227, 20} true; - assume {:verifier.code 0} true; - $i231 := $sgt.i32($i226, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 227, 9} true; - assume {:verifier.code 0} true; - $i232 := $i227; - assume {:branchcond $i231} true; - goto $bb142, $bb143; -$bb142: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 227, 9} true; - assume {:verifier.code 0} true; - assume ($i231 == 1); - goto $bb140; -$bb143: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 227, 9} true; - assume {:verifier.code 0} true; - assume !(($i231 == 1)); - goto $bb144; -$bb144: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 230, 3} true; - assume {:verifier.code 0} true; - $i229 := $i232; - goto $bb138; -$bb145: - assume ($i243 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 238, 11} true; - assume {:verifier.code 0} true; - $i245 := $slt.i32($i241, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 238, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i245} true; - goto $bb148, $bb150; -$bb146: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 237, 7} true; - assume {:verifier.code 0} true; - assume !(($i243 == 1)); - goto $bb147; -$bb147: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 242, 7} true; - assume {:verifier.code 0} true; - $i249 := $sext.i32.i64($i237); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 242, 9} true; - assume {:verifier.code 0} true; - $i250 := $srem.i64($i249, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 242, 7} true; - assume {:verifier.code 0} true; - $i251 := $trunc.i64.i32($i250); - call {:cexpr "a"} boogie_si_record_i32($i251); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 243, 5} true; - assume {:verifier.code 0} true; - $i252 := $add.i32($i251, $i251); - call {:cexpr "a"} boogie_si_record_i32($i252); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 244, 7} true; - assume {:verifier.code 0} true; - $i253 := $sext.i32.i64($i241); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 244, 9} true; - assume {:verifier.code 0} true; - $i254 := $srem.i64($i253, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 244, 7} true; - assume {:verifier.code 0} true; - $i255 := $trunc.i64.i32($i254); - call {:cexpr "b"} boogie_si_record_i32($i255); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 245, 5} true; - assume {:verifier.code 0} true; - $i256 := $add.i32($i255, $i255); - call {:cexpr "b"} boogie_si_record_i32($i256); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 247, 5} true; - assume {:verifier.code 0} true; - $i257 := $add.i32($i244, $i244); - call {:cexpr "c"} boogie_si_record_i32($i257); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 248, 9} true; - assume {:verifier.code 0} true; - $i258 := $slt.i32($i252, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 248, 7} true; - assume {:verifier.code 0} true; - $i259 := $i257; - assume {:branchcond $i258} true; - goto $bb154, $bb155; -$bb148: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 238, 15} true; - assume {:verifier.code 0} true; - assume ($i245 == 1); - goto $bb149; -$bb149: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 239, 9} true; - assume {:verifier.code 0} true; - $i248 := $add.i32($i242, 1); - call {:cexpr "c"} boogie_si_record_i32($i248); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 240, 5} true; - assume {:verifier.code 0} true; - $i247 := $i248; - goto $bb153; -$bb150: - assume !(($i245 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 238, 20} true; - assume {:verifier.code 0} true; - $i246 := $sgt.i32($i241, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 238, 9} true; - assume {:verifier.code 0} true; - $i247 := $i242; - assume {:branchcond $i246} true; - goto $bb151, $bb152; -$bb151: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 238, 9} true; - assume {:verifier.code 0} true; - assume ($i246 == 1); - goto $bb149; -$bb152: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 238, 9} true; - assume {:verifier.code 0} true; - assume !(($i246 == 1)); - goto $bb153; -$bb153: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 241, 3} true; - assume {:verifier.code 0} true; - $i244 := $i247; - goto $bb147; -$bb154: - assume ($i258 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 249, 11} true; - assume {:verifier.code 0} true; - $i260 := $slt.i32($i256, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 249, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i260} true; - goto $bb157, $bb159; -$bb155: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 248, 7} true; - assume {:verifier.code 0} true; - assume !(($i258 == 1)); - goto $bb156; -$bb156: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 253, 7} true; - assume {:verifier.code 0} true; - $i264 := $sext.i32.i64($i252); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 253, 9} true; - assume {:verifier.code 0} true; - $i265 := $srem.i64($i264, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 253, 7} true; - assume {:verifier.code 0} true; - $i266 := $trunc.i64.i32($i265); - call {:cexpr "a"} boogie_si_record_i32($i266); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 254, 5} true; - assume {:verifier.code 0} true; - $i267 := $add.i32($i266, $i266); - call {:cexpr "a"} boogie_si_record_i32($i267); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 255, 7} true; - assume {:verifier.code 0} true; - $i268 := $sext.i32.i64($i256); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 255, 9} true; - assume {:verifier.code 0} true; - $i269 := $srem.i64($i268, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 255, 7} true; - assume {:verifier.code 0} true; - $i270 := $trunc.i64.i32($i269); - call {:cexpr "b"} boogie_si_record_i32($i270); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 256, 5} true; - assume {:verifier.code 0} true; - $i271 := $add.i32($i270, $i270); - call {:cexpr "b"} boogie_si_record_i32($i271); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 258, 5} true; - assume {:verifier.code 0} true; - $i272 := $add.i32($i259, $i259); - call {:cexpr "c"} boogie_si_record_i32($i272); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 259, 9} true; - assume {:verifier.code 0} true; - $i273 := $slt.i32($i267, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 259, 7} true; - assume {:verifier.code 0} true; - $i274 := $i272; - assume {:branchcond $i273} true; - goto $bb163, $bb164; -$bb157: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 249, 15} true; - assume {:verifier.code 0} true; - assume ($i260 == 1); - goto $bb158; -$bb158: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 250, 9} true; - assume {:verifier.code 0} true; - $i263 := $add.i32($i257, 1); - call {:cexpr "c"} boogie_si_record_i32($i263); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 251, 5} true; - assume {:verifier.code 0} true; - $i262 := $i263; - goto $bb162; -$bb159: - assume !(($i260 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 249, 20} true; - assume {:verifier.code 0} true; - $i261 := $sgt.i32($i256, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 249, 9} true; - assume {:verifier.code 0} true; - $i262 := $i257; - assume {:branchcond $i261} true; - goto $bb160, $bb161; -$bb160: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 249, 9} true; - assume {:verifier.code 0} true; - assume ($i261 == 1); - goto $bb158; -$bb161: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 249, 9} true; - assume {:verifier.code 0} true; - assume !(($i261 == 1)); - goto $bb162; -$bb162: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 252, 3} true; - assume {:verifier.code 0} true; - $i259 := $i262; - goto $bb156; -$bb163: - assume ($i273 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 260, 11} true; - assume {:verifier.code 0} true; - $i275 := $slt.i32($i271, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 260, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i275} true; - goto $bb166, $bb168; -$bb164: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 259, 7} true; - assume {:verifier.code 0} true; - assume !(($i273 == 1)); - goto $bb165; -$bb165: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 264, 7} true; - assume {:verifier.code 0} true; - $i279 := $sext.i32.i64($i267); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 264, 9} true; - assume {:verifier.code 0} true; - $i280 := $srem.i64($i279, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 264, 7} true; - assume {:verifier.code 0} true; - $i281 := $trunc.i64.i32($i280); - call {:cexpr "a"} boogie_si_record_i32($i281); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 265, 5} true; - assume {:verifier.code 0} true; - $i282 := $add.i32($i281, $i281); - call {:cexpr "a"} boogie_si_record_i32($i282); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 266, 7} true; - assume {:verifier.code 0} true; - $i283 := $sext.i32.i64($i271); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 266, 9} true; - assume {:verifier.code 0} true; - $i284 := $srem.i64($i283, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 266, 7} true; - assume {:verifier.code 0} true; - $i285 := $trunc.i64.i32($i284); - call {:cexpr "b"} boogie_si_record_i32($i285); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 267, 5} true; - assume {:verifier.code 0} true; - $i286 := $add.i32($i285, $i285); - call {:cexpr "b"} boogie_si_record_i32($i286); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 269, 5} true; - assume {:verifier.code 0} true; - $i287 := $add.i32($i274, $i274); - call {:cexpr "c"} boogie_si_record_i32($i287); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 270, 9} true; - assume {:verifier.code 0} true; - $i288 := $slt.i32($i282, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 270, 7} true; - assume {:verifier.code 0} true; - $i289 := $i287; - assume {:branchcond $i288} true; - goto $bb172, $bb173; -$bb166: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 260, 15} true; - assume {:verifier.code 0} true; - assume ($i275 == 1); - goto $bb167; -$bb167: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 261, 9} true; - assume {:verifier.code 0} true; - $i278 := $add.i32($i272, 1); - call {:cexpr "c"} boogie_si_record_i32($i278); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 262, 5} true; - assume {:verifier.code 0} true; - $i277 := $i278; - goto $bb171; -$bb168: - assume !(($i275 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 260, 20} true; - assume {:verifier.code 0} true; - $i276 := $sgt.i32($i271, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 260, 9} true; - assume {:verifier.code 0} true; - $i277 := $i272; - assume {:branchcond $i276} true; - goto $bb169, $bb170; -$bb169: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 260, 9} true; - assume {:verifier.code 0} true; - assume ($i276 == 1); - goto $bb167; -$bb170: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 260, 9} true; - assume {:verifier.code 0} true; - assume !(($i276 == 1)); - goto $bb171; -$bb171: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 263, 3} true; - assume {:verifier.code 0} true; - $i274 := $i277; - goto $bb165; -$bb172: - assume ($i288 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 271, 11} true; - assume {:verifier.code 0} true; - $i290 := $slt.i32($i286, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 271, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i290} true; - goto $bb175, $bb177; -$bb173: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 270, 7} true; - assume {:verifier.code 0} true; - assume !(($i288 == 1)); - goto $bb174; -$bb174: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 275, 7} true; - assume {:verifier.code 0} true; - $i294 := $sext.i32.i64($i282); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 275, 9} true; - assume {:verifier.code 0} true; - $i295 := $srem.i64($i294, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 275, 7} true; - assume {:verifier.code 0} true; - $i296 := $trunc.i64.i32($i295); - call {:cexpr "a"} boogie_si_record_i32($i296); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 276, 5} true; - assume {:verifier.code 0} true; - $i297 := $add.i32($i296, $i296); - call {:cexpr "a"} boogie_si_record_i32($i297); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 277, 7} true; - assume {:verifier.code 0} true; - $i298 := $sext.i32.i64($i286); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 277, 9} true; - assume {:verifier.code 0} true; - $i299 := $srem.i64($i298, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 277, 7} true; - assume {:verifier.code 0} true; - $i300 := $trunc.i64.i32($i299); - call {:cexpr "b"} boogie_si_record_i32($i300); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 278, 5} true; - assume {:verifier.code 0} true; - $i301 := $add.i32($i300, $i300); - call {:cexpr "b"} boogie_si_record_i32($i301); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 280, 5} true; - assume {:verifier.code 0} true; - $i302 := $add.i32($i289, $i289); - call {:cexpr "c"} boogie_si_record_i32($i302); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 281, 9} true; - assume {:verifier.code 0} true; - $i303 := $slt.i32($i297, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 281, 7} true; - assume {:verifier.code 0} true; - $i304 := $i302; - assume {:branchcond $i303} true; - goto $bb181, $bb182; -$bb175: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 271, 15} true; - assume {:verifier.code 0} true; - assume ($i290 == 1); - goto $bb176; -$bb176: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 272, 9} true; - assume {:verifier.code 0} true; - $i293 := $add.i32($i287, 1); - call {:cexpr "c"} boogie_si_record_i32($i293); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 273, 5} true; - assume {:verifier.code 0} true; - $i292 := $i293; - goto $bb180; -$bb177: - assume !(($i290 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 271, 20} true; - assume {:verifier.code 0} true; - $i291 := $sgt.i32($i286, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 271, 9} true; - assume {:verifier.code 0} true; - $i292 := $i287; - assume {:branchcond $i291} true; - goto $bb178, $bb179; -$bb178: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 271, 9} true; - assume {:verifier.code 0} true; - assume ($i291 == 1); - goto $bb176; -$bb179: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 271, 9} true; - assume {:verifier.code 0} true; - assume !(($i291 == 1)); - goto $bb180; -$bb180: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 274, 3} true; - assume {:verifier.code 0} true; - $i289 := $i292; - goto $bb174; -$bb181: - assume ($i303 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 282, 11} true; - assume {:verifier.code 0} true; - $i305 := $slt.i32($i301, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 282, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i305} true; - goto $bb184, $bb186; -$bb182: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 281, 7} true; - assume {:verifier.code 0} true; - assume !(($i303 == 1)); - goto $bb183; -$bb183: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 286, 7} true; - assume {:verifier.code 0} true; - $i309 := $sext.i32.i64($i297); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 286, 9} true; - assume {:verifier.code 0} true; - $i310 := $srem.i64($i309, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 286, 7} true; - assume {:verifier.code 0} true; - $i311 := $trunc.i64.i32($i310); - call {:cexpr "a"} boogie_si_record_i32($i311); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 287, 5} true; - assume {:verifier.code 0} true; - $i312 := $add.i32($i311, $i311); - call {:cexpr "a"} boogie_si_record_i32($i312); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 288, 7} true; - assume {:verifier.code 0} true; - $i313 := $sext.i32.i64($i301); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 288, 9} true; - assume {:verifier.code 0} true; - $i314 := $srem.i64($i313, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 288, 7} true; - assume {:verifier.code 0} true; - $i315 := $trunc.i64.i32($i314); - call {:cexpr "b"} boogie_si_record_i32($i315); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 289, 5} true; - assume {:verifier.code 0} true; - $i316 := $add.i32($i315, $i315); - call {:cexpr "b"} boogie_si_record_i32($i316); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 291, 5} true; - assume {:verifier.code 0} true; - $i317 := $add.i32($i304, $i304); - call {:cexpr "c"} boogie_si_record_i32($i317); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 292, 9} true; - assume {:verifier.code 0} true; - $i318 := $slt.i32($i312, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 292, 7} true; - assume {:verifier.code 0} true; - $i319 := $i317; - assume {:branchcond $i318} true; - goto $bb190, $bb191; -$bb184: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 282, 15} true; - assume {:verifier.code 0} true; - assume ($i305 == 1); - goto $bb185; -$bb185: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 283, 9} true; - assume {:verifier.code 0} true; - $i308 := $add.i32($i302, 1); - call {:cexpr "c"} boogie_si_record_i32($i308); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 284, 5} true; - assume {:verifier.code 0} true; - $i307 := $i308; - goto $bb189; -$bb186: - assume !(($i305 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 282, 20} true; - assume {:verifier.code 0} true; - $i306 := $sgt.i32($i301, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 282, 9} true; - assume {:verifier.code 0} true; - $i307 := $i302; - assume {:branchcond $i306} true; - goto $bb187, $bb188; -$bb187: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 282, 9} true; - assume {:verifier.code 0} true; - assume ($i306 == 1); - goto $bb185; -$bb188: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 282, 9} true; - assume {:verifier.code 0} true; - assume !(($i306 == 1)); - goto $bb189; -$bb189: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 285, 3} true; - assume {:verifier.code 0} true; - $i304 := $i307; - goto $bb183; -$bb190: - assume ($i318 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 293, 11} true; - assume {:verifier.code 0} true; - $i320 := $slt.i32($i316, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 293, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i320} true; - goto $bb193, $bb195; -$bb191: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 292, 7} true; - assume {:verifier.code 0} true; - assume !(($i318 == 1)); - goto $bb192; -$bb192: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 297, 7} true; - assume {:verifier.code 0} true; - $i324 := $sext.i32.i64($i312); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 297, 9} true; - assume {:verifier.code 0} true; - $i325 := $srem.i64($i324, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 297, 7} true; - assume {:verifier.code 0} true; - $i326 := $trunc.i64.i32($i325); - call {:cexpr "a"} boogie_si_record_i32($i326); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 298, 5} true; - assume {:verifier.code 0} true; - $i327 := $add.i32($i326, $i326); - call {:cexpr "a"} boogie_si_record_i32($i327); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 299, 7} true; - assume {:verifier.code 0} true; - $i328 := $sext.i32.i64($i316); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 299, 9} true; - assume {:verifier.code 0} true; - $i329 := $srem.i64($i328, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 299, 7} true; - assume {:verifier.code 0} true; - $i330 := $trunc.i64.i32($i329); - call {:cexpr "b"} boogie_si_record_i32($i330); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 300, 5} true; - assume {:verifier.code 0} true; - $i331 := $add.i32($i330, $i330); - call {:cexpr "b"} boogie_si_record_i32($i331); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 302, 5} true; - assume {:verifier.code 0} true; - $i332 := $add.i32($i319, $i319); - call {:cexpr "c"} boogie_si_record_i32($i332); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 303, 9} true; - assume {:verifier.code 0} true; - $i333 := $slt.i32($i327, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 303, 7} true; - assume {:verifier.code 0} true; - $i334 := $i332; - assume {:branchcond $i333} true; - goto $bb199, $bb200; -$bb193: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 293, 15} true; - assume {:verifier.code 0} true; - assume ($i320 == 1); - goto $bb194; -$bb194: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 294, 9} true; - assume {:verifier.code 0} true; - $i323 := $add.i32($i317, 1); - call {:cexpr "c"} boogie_si_record_i32($i323); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 295, 5} true; - assume {:verifier.code 0} true; - $i322 := $i323; - goto $bb198; -$bb195: - assume !(($i320 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 293, 20} true; - assume {:verifier.code 0} true; - $i321 := $sgt.i32($i316, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 293, 9} true; - assume {:verifier.code 0} true; - $i322 := $i317; - assume {:branchcond $i321} true; - goto $bb196, $bb197; -$bb196: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 293, 9} true; - assume {:verifier.code 0} true; - assume ($i321 == 1); - goto $bb194; -$bb197: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 293, 9} true; - assume {:verifier.code 0} true; - assume !(($i321 == 1)); - goto $bb198; -$bb198: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 296, 3} true; - assume {:verifier.code 0} true; - $i319 := $i322; - goto $bb192; -$bb199: - assume ($i333 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 304, 11} true; - assume {:verifier.code 0} true; - $i335 := $slt.i32($i331, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 304, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i335} true; - goto $bb202, $bb204; -$bb200: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 303, 7} true; - assume {:verifier.code 0} true; - assume !(($i333 == 1)); - goto $bb201; -$bb201: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 308, 7} true; - assume {:verifier.code 0} true; - $i339 := $sext.i32.i64($i327); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 308, 9} true; - assume {:verifier.code 0} true; - $i340 := $srem.i64($i339, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 308, 7} true; - assume {:verifier.code 0} true; - $i341 := $trunc.i64.i32($i340); - call {:cexpr "a"} boogie_si_record_i32($i341); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 309, 5} true; - assume {:verifier.code 0} true; - $i342 := $add.i32($i341, $i341); - call {:cexpr "a"} boogie_si_record_i32($i342); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 310, 7} true; - assume {:verifier.code 0} true; - $i343 := $sext.i32.i64($i331); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 310, 9} true; - assume {:verifier.code 0} true; - $i344 := $srem.i64($i343, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 310, 7} true; - assume {:verifier.code 0} true; - $i345 := $trunc.i64.i32($i344); - call {:cexpr "b"} boogie_si_record_i32($i345); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 311, 5} true; - assume {:verifier.code 0} true; - $i346 := $add.i32($i345, $i345); - call {:cexpr "b"} boogie_si_record_i32($i346); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 313, 5} true; - assume {:verifier.code 0} true; - $i347 := $add.i32($i334, $i334); - call {:cexpr "c"} boogie_si_record_i32($i347); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 314, 9} true; - assume {:verifier.code 0} true; - $i348 := $slt.i32($i342, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 314, 7} true; - assume {:verifier.code 0} true; - $i349 := $i347; - assume {:branchcond $i348} true; - goto $bb208, $bb209; -$bb202: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 304, 15} true; - assume {:verifier.code 0} true; - assume ($i335 == 1); - goto $bb203; -$bb203: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 305, 9} true; - assume {:verifier.code 0} true; - $i338 := $add.i32($i332, 1); - call {:cexpr "c"} boogie_si_record_i32($i338); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 306, 5} true; - assume {:verifier.code 0} true; - $i337 := $i338; - goto $bb207; -$bb204: - assume !(($i335 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 304, 20} true; - assume {:verifier.code 0} true; - $i336 := $sgt.i32($i331, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 304, 9} true; - assume {:verifier.code 0} true; - $i337 := $i332; - assume {:branchcond $i336} true; - goto $bb205, $bb206; -$bb205: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 304, 9} true; - assume {:verifier.code 0} true; - assume ($i336 == 1); - goto $bb203; -$bb206: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 304, 9} true; - assume {:verifier.code 0} true; - assume !(($i336 == 1)); - goto $bb207; -$bb207: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 307, 3} true; - assume {:verifier.code 0} true; - $i334 := $i337; - goto $bb201; -$bb208: - assume ($i348 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 315, 11} true; - assume {:verifier.code 0} true; - $i350 := $slt.i32($i346, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 315, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i350} true; - goto $bb211, $bb213; -$bb209: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 314, 7} true; - assume {:verifier.code 0} true; - assume !(($i348 == 1)); - goto $bb210; -$bb210: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 319, 7} true; - assume {:verifier.code 0} true; - $i354 := $sext.i32.i64($i342); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 319, 9} true; - assume {:verifier.code 0} true; - $i355 := $srem.i64($i354, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 319, 7} true; - assume {:verifier.code 0} true; - $i356 := $trunc.i64.i32($i355); - call {:cexpr "a"} boogie_si_record_i32($i356); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 320, 5} true; - assume {:verifier.code 0} true; - $i357 := $add.i32($i356, $i356); - call {:cexpr "a"} boogie_si_record_i32($i357); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 321, 7} true; - assume {:verifier.code 0} true; - $i358 := $sext.i32.i64($i346); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 321, 9} true; - assume {:verifier.code 0} true; - $i359 := $srem.i64($i358, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 321, 7} true; - assume {:verifier.code 0} true; - $i360 := $trunc.i64.i32($i359); - call {:cexpr "b"} boogie_si_record_i32($i360); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 322, 5} true; - assume {:verifier.code 0} true; - $i361 := $add.i32($i360, $i360); - call {:cexpr "b"} boogie_si_record_i32($i361); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 324, 5} true; - assume {:verifier.code 0} true; - $i362 := $add.i32($i349, $i349); - call {:cexpr "c"} boogie_si_record_i32($i362); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 325, 9} true; - assume {:verifier.code 0} true; - $i363 := $slt.i32($i357, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 325, 7} true; - assume {:verifier.code 0} true; - $i364 := $i362; - assume {:branchcond $i363} true; - goto $bb217, $bb218; -$bb211: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 315, 15} true; - assume {:verifier.code 0} true; - assume ($i350 == 1); - goto $bb212; -$bb212: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 316, 9} true; - assume {:verifier.code 0} true; - $i353 := $add.i32($i347, 1); - call {:cexpr "c"} boogie_si_record_i32($i353); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 317, 5} true; - assume {:verifier.code 0} true; - $i352 := $i353; - goto $bb216; -$bb213: - assume !(($i350 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 315, 20} true; - assume {:verifier.code 0} true; - $i351 := $sgt.i32($i346, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 315, 9} true; - assume {:verifier.code 0} true; - $i352 := $i347; - assume {:branchcond $i351} true; - goto $bb214, $bb215; -$bb214: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 315, 9} true; - assume {:verifier.code 0} true; - assume ($i351 == 1); - goto $bb212; -$bb215: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 315, 9} true; - assume {:verifier.code 0} true; - assume !(($i351 == 1)); - goto $bb216; -$bb216: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 318, 3} true; - assume {:verifier.code 0} true; - $i349 := $i352; - goto $bb210; -$bb217: - assume ($i363 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 326, 11} true; - assume {:verifier.code 0} true; - $i365 := $slt.i32($i361, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 326, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i365} true; - goto $bb220, $bb222; -$bb218: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 325, 7} true; - assume {:verifier.code 0} true; - assume !(($i363 == 1)); - goto $bb219; -$bb219: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 330, 7} true; - assume {:verifier.code 0} true; - $i369 := $sext.i32.i64($i357); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 330, 9} true; - assume {:verifier.code 0} true; - $i370 := $srem.i64($i369, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 330, 7} true; - assume {:verifier.code 0} true; - $i371 := $trunc.i64.i32($i370); - call {:cexpr "a"} boogie_si_record_i32($i371); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 331, 5} true; - assume {:verifier.code 0} true; - $i372 := $add.i32($i371, $i371); - call {:cexpr "a"} boogie_si_record_i32($i372); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 332, 7} true; - assume {:verifier.code 0} true; - $i373 := $sext.i32.i64($i361); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 332, 9} true; - assume {:verifier.code 0} true; - $i374 := $srem.i64($i373, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 332, 7} true; - assume {:verifier.code 0} true; - $i375 := $trunc.i64.i32($i374); - call {:cexpr "b"} boogie_si_record_i32($i375); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 333, 5} true; - assume {:verifier.code 0} true; - $i376 := $add.i32($i375, $i375); - call {:cexpr "b"} boogie_si_record_i32($i376); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 335, 5} true; - assume {:verifier.code 0} true; - $i377 := $add.i32($i364, $i364); - call {:cexpr "c"} boogie_si_record_i32($i377); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 336, 9} true; - assume {:verifier.code 0} true; - $i378 := $slt.i32($i372, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 336, 7} true; - assume {:verifier.code 0} true; - $i379 := $i377; - assume {:branchcond $i378} true; - goto $bb226, $bb227; -$bb220: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 326, 15} true; - assume {:verifier.code 0} true; - assume ($i365 == 1); - goto $bb221; -$bb221: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 327, 9} true; - assume {:verifier.code 0} true; - $i368 := $add.i32($i362, 1); - call {:cexpr "c"} boogie_si_record_i32($i368); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 328, 5} true; - assume {:verifier.code 0} true; - $i367 := $i368; - goto $bb225; -$bb222: - assume !(($i365 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 326, 20} true; - assume {:verifier.code 0} true; - $i366 := $sgt.i32($i361, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 326, 9} true; - assume {:verifier.code 0} true; - $i367 := $i362; - assume {:branchcond $i366} true; - goto $bb223, $bb224; -$bb223: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 326, 9} true; - assume {:verifier.code 0} true; - assume ($i366 == 1); - goto $bb221; -$bb224: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 326, 9} true; - assume {:verifier.code 0} true; - assume !(($i366 == 1)); - goto $bb225; -$bb225: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 329, 3} true; - assume {:verifier.code 0} true; - $i364 := $i367; - goto $bb219; -$bb226: - assume ($i378 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 337, 11} true; - assume {:verifier.code 0} true; - $i380 := $slt.i32($i376, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 337, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i380} true; - goto $bb229, $bb231; -$bb227: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 336, 7} true; - assume {:verifier.code 0} true; - assume !(($i378 == 1)); - goto $bb228; -$bb228: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 341, 7} true; - assume {:verifier.code 0} true; - $i384 := $sext.i32.i64($i372); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 341, 9} true; - assume {:verifier.code 0} true; - $i385 := $srem.i64($i384, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 341, 7} true; - assume {:verifier.code 0} true; - $i386 := $trunc.i64.i32($i385); - call {:cexpr "a"} boogie_si_record_i32($i386); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 342, 5} true; - assume {:verifier.code 0} true; - $i387 := $add.i32($i386, $i386); - call {:cexpr "a"} boogie_si_record_i32($i387); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 343, 7} true; - assume {:verifier.code 0} true; - $i388 := $sext.i32.i64($i376); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 343, 9} true; - assume {:verifier.code 0} true; - $i389 := $srem.i64($i388, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 343, 7} true; - assume {:verifier.code 0} true; - $i390 := $trunc.i64.i32($i389); - call {:cexpr "b"} boogie_si_record_i32($i390); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 344, 5} true; - assume {:verifier.code 0} true; - $i391 := $add.i32($i390, $i390); - call {:cexpr "b"} boogie_si_record_i32($i391); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 346, 5} true; - assume {:verifier.code 0} true; - $i392 := $add.i32($i379, $i379); - call {:cexpr "c"} boogie_si_record_i32($i392); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 347, 9} true; - assume {:verifier.code 0} true; - $i393 := $slt.i32($i387, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 347, 7} true; - assume {:verifier.code 0} true; - $i394 := $i392; - assume {:branchcond $i393} true; - goto $bb235, $bb236; -$bb229: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 337, 15} true; - assume {:verifier.code 0} true; - assume ($i380 == 1); - goto $bb230; -$bb230: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 338, 9} true; - assume {:verifier.code 0} true; - $i383 := $add.i32($i377, 1); - call {:cexpr "c"} boogie_si_record_i32($i383); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 339, 5} true; - assume {:verifier.code 0} true; - $i382 := $i383; - goto $bb234; -$bb231: - assume !(($i380 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 337, 20} true; - assume {:verifier.code 0} true; - $i381 := $sgt.i32($i376, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 337, 9} true; - assume {:verifier.code 0} true; - $i382 := $i377; - assume {:branchcond $i381} true; - goto $bb232, $bb233; -$bb232: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 337, 9} true; - assume {:verifier.code 0} true; - assume ($i381 == 1); - goto $bb230; -$bb233: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 337, 9} true; - assume {:verifier.code 0} true; - assume !(($i381 == 1)); - goto $bb234; -$bb234: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 340, 3} true; - assume {:verifier.code 0} true; - $i379 := $i382; - goto $bb228; -$bb235: - assume ($i393 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 348, 11} true; - assume {:verifier.code 0} true; - $i395 := $slt.i32($i391, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 348, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i395} true; - goto $bb238, $bb240; -$bb236: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 347, 7} true; - assume {:verifier.code 0} true; - assume !(($i393 == 1)); - goto $bb237; -$bb237: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 352, 7} true; - assume {:verifier.code 0} true; - $i399 := $sext.i32.i64($i387); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 352, 9} true; - assume {:verifier.code 0} true; - $i400 := $srem.i64($i399, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 352, 7} true; - assume {:verifier.code 0} true; - $i401 := $trunc.i64.i32($i400); - call {:cexpr "a"} boogie_si_record_i32($i401); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 353, 5} true; - assume {:verifier.code 0} true; - $i402 := $add.i32($i401, $i401); - call {:cexpr "a"} boogie_si_record_i32($i402); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 354, 7} true; - assume {:verifier.code 0} true; - $i403 := $sext.i32.i64($i391); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 354, 9} true; - assume {:verifier.code 0} true; - $i404 := $srem.i64($i403, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 354, 7} true; - assume {:verifier.code 0} true; - $i405 := $trunc.i64.i32($i404); - call {:cexpr "b"} boogie_si_record_i32($i405); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 355, 5} true; - assume {:verifier.code 0} true; - $i406 := $add.i32($i405, $i405); - call {:cexpr "b"} boogie_si_record_i32($i406); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 357, 5} true; - assume {:verifier.code 0} true; - $i407 := $add.i32($i394, $i394); - call {:cexpr "c"} boogie_si_record_i32($i407); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 358, 9} true; - assume {:verifier.code 0} true; - $i408 := $slt.i32($i402, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 358, 7} true; - assume {:verifier.code 0} true; - $i409 := $i407; - assume {:branchcond $i408} true; - goto $bb244, $bb245; -$bb238: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 348, 15} true; - assume {:verifier.code 0} true; - assume ($i395 == 1); - goto $bb239; -$bb239: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 349, 9} true; - assume {:verifier.code 0} true; - $i398 := $add.i32($i392, 1); - call {:cexpr "c"} boogie_si_record_i32($i398); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 350, 5} true; - assume {:verifier.code 0} true; - $i397 := $i398; - goto $bb243; -$bb240: - assume !(($i395 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 348, 20} true; - assume {:verifier.code 0} true; - $i396 := $sgt.i32($i391, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 348, 9} true; - assume {:verifier.code 0} true; - $i397 := $i392; - assume {:branchcond $i396} true; - goto $bb241, $bb242; -$bb241: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 348, 9} true; - assume {:verifier.code 0} true; - assume ($i396 == 1); - goto $bb239; -$bb242: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 348, 9} true; - assume {:verifier.code 0} true; - assume !(($i396 == 1)); - goto $bb243; -$bb243: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 351, 3} true; - assume {:verifier.code 0} true; - $i394 := $i397; - goto $bb237; -$bb244: - assume ($i408 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 359, 11} true; - assume {:verifier.code 0} true; - $i410 := $slt.i32($i406, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 359, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i410} true; - goto $bb247, $bb249; -$bb245: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 358, 7} true; - assume {:verifier.code 0} true; - assume !(($i408 == 1)); - goto $bb246; -$bb246: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 363, 7} true; - assume {:verifier.code 0} true; - $i414 := $sext.i32.i64($i402); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 363, 9} true; - assume {:verifier.code 0} true; - $i415 := $srem.i64($i414, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 363, 7} true; - assume {:verifier.code 0} true; - $i416 := $trunc.i64.i32($i415); - call {:cexpr "a"} boogie_si_record_i32($i416); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 364, 5} true; - assume {:verifier.code 0} true; - $i417 := $add.i32($i416, $i416); - call {:cexpr "a"} boogie_si_record_i32($i417); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 365, 7} true; - assume {:verifier.code 0} true; - $i418 := $sext.i32.i64($i406); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 365, 9} true; - assume {:verifier.code 0} true; - $i419 := $srem.i64($i418, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 365, 7} true; - assume {:verifier.code 0} true; - $i420 := $trunc.i64.i32($i419); - call {:cexpr "b"} boogie_si_record_i32($i420); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 366, 5} true; - assume {:verifier.code 0} true; - $i421 := $add.i32($i420, $i420); - call {:cexpr "b"} boogie_si_record_i32($i421); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 368, 5} true; - assume {:verifier.code 0} true; - $i422 := $add.i32($i409, $i409); - call {:cexpr "c"} boogie_si_record_i32($i422); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 369, 9} true; - assume {:verifier.code 0} true; - $i423 := $slt.i32($i417, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 369, 7} true; - assume {:verifier.code 0} true; - $i424 := $i422; - assume {:branchcond $i423} true; - goto $bb253, $bb254; -$bb247: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 359, 15} true; - assume {:verifier.code 0} true; - assume ($i410 == 1); - goto $bb248; -$bb248: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 360, 9} true; - assume {:verifier.code 0} true; - $i413 := $add.i32($i407, 1); - call {:cexpr "c"} boogie_si_record_i32($i413); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 361, 5} true; - assume {:verifier.code 0} true; - $i412 := $i413; - goto $bb252; -$bb249: - assume !(($i410 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 359, 20} true; - assume {:verifier.code 0} true; - $i411 := $sgt.i32($i406, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 359, 9} true; - assume {:verifier.code 0} true; - $i412 := $i407; - assume {:branchcond $i411} true; - goto $bb250, $bb251; -$bb250: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 359, 9} true; - assume {:verifier.code 0} true; - assume ($i411 == 1); - goto $bb248; -$bb251: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 359, 9} true; - assume {:verifier.code 0} true; - assume !(($i411 == 1)); - goto $bb252; -$bb252: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 362, 3} true; - assume {:verifier.code 0} true; - $i409 := $i412; - goto $bb246; -$bb253: - assume ($i423 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 370, 11} true; - assume {:verifier.code 0} true; - $i425 := $slt.i32($i421, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 370, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i425} true; - goto $bb256, $bb258; -$bb254: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 369, 7} true; - assume {:verifier.code 0} true; - assume !(($i423 == 1)); - goto $bb255; -$bb255: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 374, 7} true; - assume {:verifier.code 0} true; - $i429 := $sext.i32.i64($i417); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 374, 9} true; - assume {:verifier.code 0} true; - $i430 := $srem.i64($i429, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 374, 7} true; - assume {:verifier.code 0} true; - $i431 := $trunc.i64.i32($i430); - call {:cexpr "a"} boogie_si_record_i32($i431); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 375, 5} true; - assume {:verifier.code 0} true; - $i432 := $add.i32($i431, $i431); - call {:cexpr "a"} boogie_si_record_i32($i432); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 376, 7} true; - assume {:verifier.code 0} true; - $i433 := $sext.i32.i64($i421); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 376, 9} true; - assume {:verifier.code 0} true; - $i434 := $srem.i64($i433, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 376, 7} true; - assume {:verifier.code 0} true; - $i435 := $trunc.i64.i32($i434); - call {:cexpr "b"} boogie_si_record_i32($i435); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 377, 5} true; - assume {:verifier.code 0} true; - $i436 := $add.i32($i435, $i435); - call {:cexpr "b"} boogie_si_record_i32($i436); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 379, 5} true; - assume {:verifier.code 0} true; - $i437 := $add.i32($i424, $i424); - call {:cexpr "c"} boogie_si_record_i32($i437); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 380, 9} true; - assume {:verifier.code 0} true; - $i438 := $slt.i32($i432, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 380, 7} true; - assume {:verifier.code 0} true; - $i439 := $i437; - assume {:branchcond $i438} true; - goto $bb262, $bb263; -$bb256: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 370, 15} true; - assume {:verifier.code 0} true; - assume ($i425 == 1); - goto $bb257; -$bb257: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 371, 9} true; - assume {:verifier.code 0} true; - $i428 := $add.i32($i422, 1); - call {:cexpr "c"} boogie_si_record_i32($i428); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 372, 5} true; - assume {:verifier.code 0} true; - $i427 := $i428; - goto $bb261; -$bb258: - assume !(($i425 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 370, 20} true; - assume {:verifier.code 0} true; - $i426 := $sgt.i32($i421, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 370, 9} true; - assume {:verifier.code 0} true; - $i427 := $i422; - assume {:branchcond $i426} true; - goto $bb259, $bb260; -$bb259: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 370, 9} true; - assume {:verifier.code 0} true; - assume ($i426 == 1); - goto $bb257; -$bb260: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 370, 9} true; - assume {:verifier.code 0} true; - assume !(($i426 == 1)); - goto $bb261; -$bb261: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 373, 3} true; - assume {:verifier.code 0} true; - $i424 := $i427; - goto $bb255; -$bb262: - assume ($i438 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 381, 11} true; - assume {:verifier.code 0} true; - $i440 := $slt.i32($i436, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 381, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i440} true; - goto $bb265, $bb267; -$bb263: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 380, 7} true; - assume {:verifier.code 0} true; - assume !(($i438 == 1)); - goto $bb264; -$bb264: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 385, 7} true; - assume {:verifier.code 0} true; - $i444 := $sext.i32.i64($i432); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 385, 9} true; - assume {:verifier.code 0} true; - $i445 := $srem.i64($i444, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 385, 7} true; - assume {:verifier.code 0} true; - $i446 := $trunc.i64.i32($i445); - call {:cexpr "a"} boogie_si_record_i32($i446); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 386, 5} true; - assume {:verifier.code 0} true; - $i447 := $add.i32($i446, $i446); - call {:cexpr "a"} boogie_si_record_i32($i447); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 387, 7} true; - assume {:verifier.code 0} true; - $i448 := $sext.i32.i64($i436); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 387, 9} true; - assume {:verifier.code 0} true; - $i449 := $srem.i64($i448, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 387, 7} true; - assume {:verifier.code 0} true; - $i450 := $trunc.i64.i32($i449); - call {:cexpr "b"} boogie_si_record_i32($i450); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 388, 5} true; - assume {:verifier.code 0} true; - $i451 := $add.i32($i450, $i450); - call {:cexpr "b"} boogie_si_record_i32($i451); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 390, 5} true; - assume {:verifier.code 0} true; - $i452 := $add.i32($i439, $i439); - call {:cexpr "c"} boogie_si_record_i32($i452); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 391, 9} true; - assume {:verifier.code 0} true; - $i453 := $slt.i32($i447, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 391, 7} true; - assume {:verifier.code 0} true; - $i454 := $i452; - assume {:branchcond $i453} true; - goto $bb271, $bb272; -$bb265: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 381, 15} true; - assume {:verifier.code 0} true; - assume ($i440 == 1); - goto $bb266; -$bb266: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 382, 9} true; - assume {:verifier.code 0} true; - $i443 := $add.i32($i437, 1); - call {:cexpr "c"} boogie_si_record_i32($i443); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 383, 5} true; - assume {:verifier.code 0} true; - $i442 := $i443; - goto $bb270; -$bb267: - assume !(($i440 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 381, 20} true; - assume {:verifier.code 0} true; - $i441 := $sgt.i32($i436, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 381, 9} true; - assume {:verifier.code 0} true; - $i442 := $i437; - assume {:branchcond $i441} true; - goto $bb268, $bb269; -$bb268: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 381, 9} true; - assume {:verifier.code 0} true; - assume ($i441 == 1); - goto $bb266; -$bb269: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 381, 9} true; - assume {:verifier.code 0} true; - assume !(($i441 == 1)); - goto $bb270; -$bb270: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 384, 3} true; - assume {:verifier.code 0} true; - $i439 := $i442; - goto $bb264; -$bb271: - assume ($i453 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 392, 11} true; - assume {:verifier.code 0} true; - $i455 := $slt.i32($i451, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 392, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i455} true; - goto $bb274, $bb276; -$bb272: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 391, 7} true; - assume {:verifier.code 0} true; - assume !(($i453 == 1)); - goto $bb273; -$bb273: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 396, 7} true; - assume {:verifier.code 0} true; - $i459 := $sext.i32.i64($i447); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 396, 9} true; - assume {:verifier.code 0} true; - $i460 := $srem.i64($i459, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 396, 7} true; - assume {:verifier.code 0} true; - $i461 := $trunc.i64.i32($i460); - call {:cexpr "a"} boogie_si_record_i32($i461); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 397, 5} true; - assume {:verifier.code 0} true; - $i462 := $add.i32($i461, $i461); - call {:cexpr "a"} boogie_si_record_i32($i462); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 398, 7} true; - assume {:verifier.code 0} true; - $i463 := $sext.i32.i64($i451); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 398, 9} true; - assume {:verifier.code 0} true; - $i464 := $srem.i64($i463, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 398, 7} true; - assume {:verifier.code 0} true; - $i465 := $trunc.i64.i32($i464); - call {:cexpr "b"} boogie_si_record_i32($i465); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 399, 5} true; - assume {:verifier.code 0} true; - $i466 := $add.i32($i465, $i465); - call {:cexpr "b"} boogie_si_record_i32($i466); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 401, 5} true; - assume {:verifier.code 0} true; - $i467 := $add.i32($i454, $i454); - call {:cexpr "c"} boogie_si_record_i32($i467); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 402, 9} true; - assume {:verifier.code 0} true; - $i468 := $slt.i32($i462, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 402, 7} true; - assume {:verifier.code 0} true; - $i469 := $i467; - assume {:branchcond $i468} true; - goto $bb280, $bb281; -$bb274: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 392, 15} true; - assume {:verifier.code 0} true; - assume ($i455 == 1); - goto $bb275; -$bb275: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 393, 9} true; - assume {:verifier.code 0} true; - $i458 := $add.i32($i452, 1); - call {:cexpr "c"} boogie_si_record_i32($i458); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 394, 5} true; - assume {:verifier.code 0} true; - $i457 := $i458; - goto $bb279; -$bb276: - assume !(($i455 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 392, 20} true; - assume {:verifier.code 0} true; - $i456 := $sgt.i32($i451, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 392, 9} true; - assume {:verifier.code 0} true; - $i457 := $i452; - assume {:branchcond $i456} true; - goto $bb277, $bb278; -$bb277: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 392, 9} true; - assume {:verifier.code 0} true; - assume ($i456 == 1); - goto $bb275; -$bb278: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 392, 9} true; - assume {:verifier.code 0} true; - assume !(($i456 == 1)); - goto $bb279; -$bb279: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 395, 3} true; - assume {:verifier.code 0} true; - $i454 := $i457; - goto $bb273; -$bb280: - assume ($i468 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 403, 11} true; - assume {:verifier.code 0} true; - $i470 := $slt.i32($i466, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 403, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i470} true; - goto $bb283, $bb285; -$bb281: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 402, 7} true; - assume {:verifier.code 0} true; - assume !(($i468 == 1)); - goto $bb282; -$bb282: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 407, 7} true; - assume {:verifier.code 0} true; - $i474 := $sext.i32.i64($i462); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 407, 9} true; - assume {:verifier.code 0} true; - $i475 := $srem.i64($i474, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 407, 7} true; - assume {:verifier.code 0} true; - $i476 := $trunc.i64.i32($i475); - call {:cexpr "a"} boogie_si_record_i32($i476); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 408, 5} true; - assume {:verifier.code 0} true; - $i477 := $add.i32($i476, $i476); - call {:cexpr "a"} boogie_si_record_i32($i477); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 409, 7} true; - assume {:verifier.code 0} true; - $i478 := $sext.i32.i64($i466); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 409, 9} true; - assume {:verifier.code 0} true; - $i479 := $srem.i64($i478, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 409, 7} true; - assume {:verifier.code 0} true; - $i480 := $trunc.i64.i32($i479); - call {:cexpr "b"} boogie_si_record_i32($i480); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 410, 5} true; - assume {:verifier.code 0} true; - $i481 := $add.i32($i480, $i480); - call {:cexpr "b"} boogie_si_record_i32($i481); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 412, 5} true; - assume {:verifier.code 0} true; - $i482 := $add.i32($i469, $i469); - call {:cexpr "c"} boogie_si_record_i32($i482); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 413, 9} true; - assume {:verifier.code 0} true; - $i483 := $slt.i32($i477, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 413, 7} true; - assume {:verifier.code 0} true; - $i484 := $i482; - assume {:branchcond $i483} true; - goto $bb289, $bb290; -$bb283: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 403, 15} true; - assume {:verifier.code 0} true; - assume ($i470 == 1); - goto $bb284; -$bb284: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 404, 9} true; - assume {:verifier.code 0} true; - $i473 := $add.i32($i467, 1); - call {:cexpr "c"} boogie_si_record_i32($i473); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 405, 5} true; - assume {:verifier.code 0} true; - $i472 := $i473; - goto $bb288; -$bb285: - assume !(($i470 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 403, 20} true; - assume {:verifier.code 0} true; - $i471 := $sgt.i32($i466, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 403, 9} true; - assume {:verifier.code 0} true; - $i472 := $i467; - assume {:branchcond $i471} true; - goto $bb286, $bb287; -$bb286: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 403, 9} true; - assume {:verifier.code 0} true; - assume ($i471 == 1); - goto $bb284; -$bb287: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 403, 9} true; - assume {:verifier.code 0} true; - assume !(($i471 == 1)); - goto $bb288; -$bb288: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 406, 3} true; - assume {:verifier.code 0} true; - $i469 := $i472; - goto $bb282; -$bb289: - assume ($i483 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 414, 11} true; - assume {:verifier.code 0} true; - $i485 := $slt.i32($i481, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 414, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i485} true; - goto $bb292, $bb294; -$bb290: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 413, 7} true; - assume {:verifier.code 0} true; - assume !(($i483 == 1)); - goto $bb291; -$bb291: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 418, 7} true; - assume {:verifier.code 0} true; - $i489 := $sext.i32.i64($i477); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 418, 9} true; - assume {:verifier.code 0} true; - $i490 := $srem.i64($i489, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 418, 7} true; - assume {:verifier.code 0} true; - $i491 := $trunc.i64.i32($i490); - call {:cexpr "a"} boogie_si_record_i32($i491); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 419, 5} true; - assume {:verifier.code 0} true; - $i492 := $add.i32($i491, $i491); - call {:cexpr "a"} boogie_si_record_i32($i492); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 420, 7} true; - assume {:verifier.code 0} true; - $i493 := $sext.i32.i64($i481); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 420, 9} true; - assume {:verifier.code 0} true; - $i494 := $srem.i64($i493, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 420, 7} true; - assume {:verifier.code 0} true; - $i495 := $trunc.i64.i32($i494); - call {:cexpr "b"} boogie_si_record_i32($i495); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 421, 5} true; - assume {:verifier.code 0} true; - $i496 := $add.i32($i495, $i495); - call {:cexpr "b"} boogie_si_record_i32($i496); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 423, 5} true; - assume {:verifier.code 0} true; - $i497 := $add.i32($i484, $i484); - call {:cexpr "c"} boogie_si_record_i32($i497); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 424, 9} true; - assume {:verifier.code 0} true; - $i498 := $slt.i32($i492, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 424, 7} true; - assume {:verifier.code 0} true; - $i499 := $i497; - assume {:branchcond $i498} true; - goto $bb298, $bb299; -$bb292: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 414, 15} true; - assume {:verifier.code 0} true; - assume ($i485 == 1); - goto $bb293; -$bb293: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 415, 9} true; - assume {:verifier.code 0} true; - $i488 := $add.i32($i482, 1); - call {:cexpr "c"} boogie_si_record_i32($i488); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 416, 5} true; - assume {:verifier.code 0} true; - $i487 := $i488; - goto $bb297; -$bb294: - assume !(($i485 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 414, 20} true; - assume {:verifier.code 0} true; - $i486 := $sgt.i32($i481, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 414, 9} true; - assume {:verifier.code 0} true; - $i487 := $i482; - assume {:branchcond $i486} true; - goto $bb295, $bb296; -$bb295: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 414, 9} true; - assume {:verifier.code 0} true; - assume ($i486 == 1); - goto $bb293; -$bb296: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 414, 9} true; - assume {:verifier.code 0} true; - assume !(($i486 == 1)); - goto $bb297; -$bb297: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 417, 3} true; - assume {:verifier.code 0} true; - $i484 := $i487; - goto $bb291; -$bb298: - assume ($i498 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 425, 11} true; - assume {:verifier.code 0} true; - $i500 := $slt.i32($i496, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 425, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i500} true; - goto $bb301, $bb303; -$bb299: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 424, 7} true; - assume {:verifier.code 0} true; - assume !(($i498 == 1)); - goto $bb300; -$bb300: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 429, 7} true; - assume {:verifier.code 0} true; - $i504 := $sext.i32.i64($i492); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 429, 9} true; - assume {:verifier.code 0} true; - $i505 := $srem.i64($i504, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 429, 7} true; - assume {:verifier.code 0} true; - $i506 := $trunc.i64.i32($i505); - call {:cexpr "a"} boogie_si_record_i32($i506); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 430, 5} true; - assume {:verifier.code 0} true; - $i507 := $add.i32($i506, $i506); - call {:cexpr "a"} boogie_si_record_i32($i507); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 431, 7} true; - assume {:verifier.code 0} true; - $i508 := $sext.i32.i64($i496); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 431, 9} true; - assume {:verifier.code 0} true; - $i509 := $srem.i64($i508, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 431, 7} true; - assume {:verifier.code 0} true; - $i510 := $trunc.i64.i32($i509); - call {:cexpr "b"} boogie_si_record_i32($i510); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 432, 5} true; - assume {:verifier.code 0} true; - $i511 := $add.i32($i510, $i510); - call {:cexpr "b"} boogie_si_record_i32($i511); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 434, 5} true; - assume {:verifier.code 0} true; - $i512 := $add.i32($i499, $i499); - call {:cexpr "c"} boogie_si_record_i32($i512); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 435, 9} true; - assume {:verifier.code 0} true; - $i513 := $slt.i32($i507, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 435, 7} true; - assume {:verifier.code 0} true; - $i514 := $i512; - assume {:branchcond $i513} true; - goto $bb307, $bb308; -$bb301: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 425, 15} true; - assume {:verifier.code 0} true; - assume ($i500 == 1); - goto $bb302; -$bb302: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 426, 9} true; - assume {:verifier.code 0} true; - $i503 := $add.i32($i497, 1); - call {:cexpr "c"} boogie_si_record_i32($i503); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 427, 5} true; - assume {:verifier.code 0} true; - $i502 := $i503; - goto $bb306; -$bb303: - assume !(($i500 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 425, 20} true; - assume {:verifier.code 0} true; - $i501 := $sgt.i32($i496, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 425, 9} true; - assume {:verifier.code 0} true; - $i502 := $i497; - assume {:branchcond $i501} true; - goto $bb304, $bb305; -$bb304: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 425, 9} true; - assume {:verifier.code 0} true; - assume ($i501 == 1); - goto $bb302; -$bb305: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 425, 9} true; - assume {:verifier.code 0} true; - assume !(($i501 == 1)); - goto $bb306; -$bb306: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 428, 3} true; - assume {:verifier.code 0} true; - $i499 := $i502; - goto $bb300; -$bb307: - assume ($i513 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 436, 11} true; - assume {:verifier.code 0} true; - $i515 := $slt.i32($i511, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 436, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i515} true; - goto $bb310, $bb312; -$bb308: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 435, 7} true; - assume {:verifier.code 0} true; - assume !(($i513 == 1)); - goto $bb309; -$bb309: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 440, 7} true; - assume {:verifier.code 0} true; - $i519 := $sext.i32.i64($i507); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 440, 9} true; - assume {:verifier.code 0} true; - $i520 := $srem.i64($i519, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 440, 7} true; - assume {:verifier.code 0} true; - $i521 := $trunc.i64.i32($i520); - call {:cexpr "a"} boogie_si_record_i32($i521); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 441, 5} true; - assume {:verifier.code 0} true; - $i522 := $add.i32($i521, $i521); - call {:cexpr "a"} boogie_si_record_i32($i522); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 442, 7} true; - assume {:verifier.code 0} true; - $i523 := $sext.i32.i64($i511); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 442, 9} true; - assume {:verifier.code 0} true; - $i524 := $srem.i64($i523, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 442, 7} true; - assume {:verifier.code 0} true; - $i525 := $trunc.i64.i32($i524); - call {:cexpr "b"} boogie_si_record_i32($i525); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 443, 5} true; - assume {:verifier.code 0} true; - $i526 := $add.i32($i525, $i525); - call {:cexpr "b"} boogie_si_record_i32($i526); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 445, 5} true; - assume {:verifier.code 0} true; - $i527 := $add.i32($i514, $i514); - call {:cexpr "c"} boogie_si_record_i32($i527); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 446, 9} true; - assume {:verifier.code 0} true; - $i528 := $slt.i32($i522, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 446, 7} true; - assume {:verifier.code 0} true; - $i529 := $i527; - assume {:branchcond $i528} true; - goto $bb316, $bb317; -$bb310: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 436, 15} true; - assume {:verifier.code 0} true; - assume ($i515 == 1); - goto $bb311; -$bb311: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 437, 9} true; - assume {:verifier.code 0} true; - $i518 := $add.i32($i512, 1); - call {:cexpr "c"} boogie_si_record_i32($i518); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 438, 5} true; - assume {:verifier.code 0} true; - $i517 := $i518; - goto $bb315; -$bb312: - assume !(($i515 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 436, 20} true; - assume {:verifier.code 0} true; - $i516 := $sgt.i32($i511, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 436, 9} true; - assume {:verifier.code 0} true; - $i517 := $i512; - assume {:branchcond $i516} true; - goto $bb313, $bb314; -$bb313: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 436, 9} true; - assume {:verifier.code 0} true; - assume ($i516 == 1); - goto $bb311; -$bb314: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 436, 9} true; - assume {:verifier.code 0} true; - assume !(($i516 == 1)); - goto $bb315; -$bb315: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 439, 3} true; - assume {:verifier.code 0} true; - $i514 := $i517; - goto $bb309; -$bb316: - assume ($i528 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 447, 11} true; - assume {:verifier.code 0} true; - $i530 := $slt.i32($i526, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 447, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i530} true; - goto $bb319, $bb321; -$bb317: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 446, 7} true; - assume {:verifier.code 0} true; - assume !(($i528 == 1)); - goto $bb318; -$bb318: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 451, 7} true; - assume {:verifier.code 0} true; - $i534 := $sext.i32.i64($i522); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 451, 9} true; - assume {:verifier.code 0} true; - $i535 := $srem.i64($i534, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 451, 7} true; - assume {:verifier.code 0} true; - $i536 := $trunc.i64.i32($i535); - call {:cexpr "a"} boogie_si_record_i32($i536); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 452, 5} true; - assume {:verifier.code 0} true; - $i537 := $add.i32($i536, $i536); - call {:cexpr "a"} boogie_si_record_i32($i537); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 453, 7} true; - assume {:verifier.code 0} true; - $i538 := $sext.i32.i64($i526); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 453, 9} true; - assume {:verifier.code 0} true; - $i539 := $srem.i64($i538, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 453, 7} true; - assume {:verifier.code 0} true; - $i540 := $trunc.i64.i32($i539); - call {:cexpr "b"} boogie_si_record_i32($i540); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 454, 5} true; - assume {:verifier.code 0} true; - $i541 := $add.i32($i540, $i540); - call {:cexpr "b"} boogie_si_record_i32($i541); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 456, 5} true; - assume {:verifier.code 0} true; - $i542 := $add.i32($i529, $i529); - call {:cexpr "c"} boogie_si_record_i32($i542); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 457, 9} true; - assume {:verifier.code 0} true; - $i543 := $slt.i32($i537, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 457, 7} true; - assume {:verifier.code 0} true; - $i544 := $i542; - assume {:branchcond $i543} true; - goto $bb325, $bb326; -$bb319: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 447, 15} true; - assume {:verifier.code 0} true; - assume ($i530 == 1); - goto $bb320; -$bb320: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 448, 9} true; - assume {:verifier.code 0} true; - $i533 := $add.i32($i527, 1); - call {:cexpr "c"} boogie_si_record_i32($i533); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 449, 5} true; - assume {:verifier.code 0} true; - $i532 := $i533; - goto $bb324; -$bb321: - assume !(($i530 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 447, 20} true; - assume {:verifier.code 0} true; - $i531 := $sgt.i32($i526, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 447, 9} true; - assume {:verifier.code 0} true; - $i532 := $i527; - assume {:branchcond $i531} true; - goto $bb322, $bb323; -$bb322: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 447, 9} true; - assume {:verifier.code 0} true; - assume ($i531 == 1); - goto $bb320; -$bb323: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 447, 9} true; - assume {:verifier.code 0} true; - assume !(($i531 == 1)); - goto $bb324; -$bb324: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 450, 3} true; - assume {:verifier.code 0} true; - $i529 := $i532; - goto $bb318; -$bb325: - assume ($i543 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 458, 11} true; - assume {:verifier.code 0} true; - $i545 := $slt.i32($i541, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 458, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i545} true; - goto $bb328, $bb330; -$bb326: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 457, 7} true; - assume {:verifier.code 0} true; - assume !(($i543 == 1)); - goto $bb327; -$bb327: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 462, 7} true; - assume {:verifier.code 0} true; - $i549 := $sext.i32.i64($i537); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 462, 9} true; - assume {:verifier.code 0} true; - $i550 := $srem.i64($i549, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 462, 7} true; - assume {:verifier.code 0} true; - $i551 := $trunc.i64.i32($i550); - call {:cexpr "a"} boogie_si_record_i32($i551); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 463, 5} true; - assume {:verifier.code 0} true; - $i552 := $add.i32($i551, $i551); - call {:cexpr "a"} boogie_si_record_i32($i552); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 464, 7} true; - assume {:verifier.code 0} true; - $i553 := $sext.i32.i64($i541); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 464, 9} true; - assume {:verifier.code 0} true; - $i554 := $srem.i64($i553, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 464, 7} true; - assume {:verifier.code 0} true; - $i555 := $trunc.i64.i32($i554); - call {:cexpr "b"} boogie_si_record_i32($i555); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 465, 5} true; - assume {:verifier.code 0} true; - $i556 := $add.i32($i555, $i555); - call {:cexpr "b"} boogie_si_record_i32($i556); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 467, 5} true; - assume {:verifier.code 0} true; - $i557 := $add.i32($i544, $i544); - call {:cexpr "c"} boogie_si_record_i32($i557); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 468, 9} true; - assume {:verifier.code 0} true; - $i558 := $slt.i32($i552, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 468, 7} true; - assume {:verifier.code 0} true; - $i559 := $i557; - assume {:branchcond $i558} true; - goto $bb334, $bb335; -$bb328: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 458, 15} true; - assume {:verifier.code 0} true; - assume ($i545 == 1); - goto $bb329; -$bb329: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 459, 9} true; - assume {:verifier.code 0} true; - $i548 := $add.i32($i542, 1); - call {:cexpr "c"} boogie_si_record_i32($i548); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 460, 5} true; - assume {:verifier.code 0} true; - $i547 := $i548; - goto $bb333; -$bb330: - assume !(($i545 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 458, 20} true; - assume {:verifier.code 0} true; - $i546 := $sgt.i32($i541, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 458, 9} true; - assume {:verifier.code 0} true; - $i547 := $i542; - assume {:branchcond $i546} true; - goto $bb331, $bb332; -$bb331: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 458, 9} true; - assume {:verifier.code 0} true; - assume ($i546 == 1); - goto $bb329; -$bb332: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 458, 9} true; - assume {:verifier.code 0} true; - assume !(($i546 == 1)); - goto $bb333; -$bb333: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 461, 3} true; - assume {:verifier.code 0} true; - $i544 := $i547; - goto $bb327; -$bb334: - assume ($i558 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 469, 11} true; - assume {:verifier.code 0} true; - $i560 := $slt.i32($i556, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 469, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i560} true; - goto $bb337, $bb339; -$bb335: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 468, 7} true; - assume {:verifier.code 0} true; - assume !(($i558 == 1)); - goto $bb336; -$bb336: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 473, 7} true; - assume {:verifier.code 0} true; - $i564 := $sext.i32.i64($i552); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 473, 9} true; - assume {:verifier.code 0} true; - $i565 := $srem.i64($i564, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 473, 7} true; - assume {:verifier.code 0} true; - $i566 := $trunc.i64.i32($i565); - call {:cexpr "a"} boogie_si_record_i32($i566); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 474, 5} true; - assume {:verifier.code 0} true; - $i567 := $add.i32($i566, $i566); - call {:cexpr "a"} boogie_si_record_i32($i567); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 475, 7} true; - assume {:verifier.code 0} true; - $i568 := $sext.i32.i64($i556); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 475, 9} true; - assume {:verifier.code 0} true; - $i569 := $srem.i64($i568, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 475, 7} true; - assume {:verifier.code 0} true; - $i570 := $trunc.i64.i32($i569); - call {:cexpr "b"} boogie_si_record_i32($i570); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 476, 5} true; - assume {:verifier.code 0} true; - $i571 := $add.i32($i570, $i570); - call {:cexpr "b"} boogie_si_record_i32($i571); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 478, 5} true; - assume {:verifier.code 0} true; - $i572 := $add.i32($i559, $i559); - call {:cexpr "c"} boogie_si_record_i32($i572); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 479, 9} true; - assume {:verifier.code 0} true; - $i573 := $slt.i32($i567, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 479, 7} true; - assume {:verifier.code 0} true; - $i574 := $i572; - assume {:branchcond $i573} true; - goto $bb343, $bb344; -$bb337: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 469, 15} true; - assume {:verifier.code 0} true; - assume ($i560 == 1); - goto $bb338; -$bb338: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 470, 9} true; - assume {:verifier.code 0} true; - $i563 := $add.i32($i557, 1); - call {:cexpr "c"} boogie_si_record_i32($i563); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 471, 5} true; - assume {:verifier.code 0} true; - $i562 := $i563; - goto $bb342; -$bb339: - assume !(($i560 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 469, 20} true; - assume {:verifier.code 0} true; - $i561 := $sgt.i32($i556, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 469, 9} true; - assume {:verifier.code 0} true; - $i562 := $i557; - assume {:branchcond $i561} true; - goto $bb340, $bb341; -$bb340: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 469, 9} true; - assume {:verifier.code 0} true; - assume ($i561 == 1); - goto $bb338; -$bb341: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 469, 9} true; - assume {:verifier.code 0} true; - assume !(($i561 == 1)); - goto $bb342; -$bb342: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 472, 3} true; - assume {:verifier.code 0} true; - $i559 := $i562; - goto $bb336; -$bb343: - assume ($i573 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 480, 11} true; - assume {:verifier.code 0} true; - $i575 := $slt.i32($i571, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 480, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i575} true; - goto $bb346, $bb348; -$bb344: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 479, 7} true; - assume {:verifier.code 0} true; - assume !(($i573 == 1)); - goto $bb345; -$bb345: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 484, 7} true; - assume {:verifier.code 0} true; - $i579 := $sext.i32.i64($i567); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 484, 9} true; - assume {:verifier.code 0} true; - $i580 := $srem.i64($i579, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 484, 7} true; - assume {:verifier.code 0} true; - $i581 := $trunc.i64.i32($i580); - call {:cexpr "a"} boogie_si_record_i32($i581); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 485, 5} true; - assume {:verifier.code 0} true; - $i582 := $add.i32($i581, $i581); - call {:cexpr "a"} boogie_si_record_i32($i582); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 486, 7} true; - assume {:verifier.code 0} true; - $i583 := $sext.i32.i64($i571); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 486, 9} true; - assume {:verifier.code 0} true; - $i584 := $srem.i64($i583, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 486, 7} true; - assume {:verifier.code 0} true; - $i585 := $trunc.i64.i32($i584); - call {:cexpr "b"} boogie_si_record_i32($i585); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 487, 5} true; - assume {:verifier.code 0} true; - $i586 := $add.i32($i585, $i585); - call {:cexpr "b"} boogie_si_record_i32($i586); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 489, 5} true; - assume {:verifier.code 0} true; - $i587 := $add.i32($i574, $i574); - call {:cexpr "c"} boogie_si_record_i32($i587); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 490, 9} true; - assume {:verifier.code 0} true; - $i588 := $slt.i32($i582, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 490, 7} true; - assume {:verifier.code 0} true; - $i589 := $i587; - assume {:branchcond $i588} true; - goto $bb352, $bb353; -$bb346: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 480, 15} true; - assume {:verifier.code 0} true; - assume ($i575 == 1); - goto $bb347; -$bb347: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 481, 9} true; - assume {:verifier.code 0} true; - $i578 := $add.i32($i572, 1); - call {:cexpr "c"} boogie_si_record_i32($i578); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 482, 5} true; - assume {:verifier.code 0} true; - $i577 := $i578; - goto $bb351; -$bb348: - assume !(($i575 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 480, 20} true; - assume {:verifier.code 0} true; - $i576 := $sgt.i32($i571, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 480, 9} true; - assume {:verifier.code 0} true; - $i577 := $i572; - assume {:branchcond $i576} true; - goto $bb349, $bb350; -$bb349: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 480, 9} true; - assume {:verifier.code 0} true; - assume ($i576 == 1); - goto $bb347; -$bb350: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 480, 9} true; - assume {:verifier.code 0} true; - assume !(($i576 == 1)); - goto $bb351; -$bb351: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 483, 3} true; - assume {:verifier.code 0} true; - $i574 := $i577; - goto $bb345; -$bb352: - assume ($i588 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 491, 11} true; - assume {:verifier.code 0} true; - $i590 := $slt.i32($i586, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 491, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i590} true; - goto $bb355, $bb357; -$bb353: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 490, 7} true; - assume {:verifier.code 0} true; - assume !(($i588 == 1)); - goto $bb354; -$bb354: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 495, 7} true; - assume {:verifier.code 0} true; - $i594 := $sext.i32.i64($i582); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 495, 9} true; - assume {:verifier.code 0} true; - $i595 := $srem.i64($i594, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 495, 7} true; - assume {:verifier.code 0} true; - $i596 := $trunc.i64.i32($i595); - call {:cexpr "a"} boogie_si_record_i32($i596); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 496, 5} true; - assume {:verifier.code 0} true; - $i597 := $add.i32($i596, $i596); - call {:cexpr "a"} boogie_si_record_i32($i597); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 497, 7} true; - assume {:verifier.code 0} true; - $i598 := $sext.i32.i64($i586); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 497, 9} true; - assume {:verifier.code 0} true; - $i599 := $srem.i64($i598, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 497, 7} true; - assume {:verifier.code 0} true; - $i600 := $trunc.i64.i32($i599); - call {:cexpr "b"} boogie_si_record_i32($i600); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 498, 5} true; - assume {:verifier.code 0} true; - $i601 := $add.i32($i600, $i600); - call {:cexpr "b"} boogie_si_record_i32($i601); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 500, 5} true; - assume {:verifier.code 0} true; - $i602 := $add.i32($i589, $i589); - call {:cexpr "c"} boogie_si_record_i32($i602); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 501, 9} true; - assume {:verifier.code 0} true; - $i603 := $slt.i32($i597, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 501, 7} true; - assume {:verifier.code 0} true; - $i604 := $i602; - assume {:branchcond $i603} true; - goto $bb361, $bb362; -$bb355: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 491, 15} true; - assume {:verifier.code 0} true; - assume ($i590 == 1); - goto $bb356; -$bb356: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 492, 9} true; - assume {:verifier.code 0} true; - $i593 := $add.i32($i587, 1); - call {:cexpr "c"} boogie_si_record_i32($i593); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 493, 5} true; - assume {:verifier.code 0} true; - $i592 := $i593; - goto $bb360; -$bb357: - assume !(($i590 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 491, 20} true; - assume {:verifier.code 0} true; - $i591 := $sgt.i32($i586, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 491, 9} true; - assume {:verifier.code 0} true; - $i592 := $i587; - assume {:branchcond $i591} true; - goto $bb358, $bb359; -$bb358: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 491, 9} true; - assume {:verifier.code 0} true; - assume ($i591 == 1); - goto $bb356; -$bb359: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 491, 9} true; - assume {:verifier.code 0} true; - assume !(($i591 == 1)); - goto $bb360; -$bb360: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 494, 3} true; - assume {:verifier.code 0} true; - $i589 := $i592; - goto $bb354; -$bb361: - assume ($i603 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 502, 11} true; - assume {:verifier.code 0} true; - $i605 := $slt.i32($i601, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 502, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i605} true; - goto $bb364, $bb366; -$bb362: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 501, 7} true; - assume {:verifier.code 0} true; - assume !(($i603 == 1)); - goto $bb363; -$bb363: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 506, 7} true; - assume {:verifier.code 0} true; - $i609 := $sext.i32.i64($i597); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 506, 9} true; - assume {:verifier.code 0} true; - $i610 := $srem.i64($i609, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 506, 7} true; - assume {:verifier.code 0} true; - $i611 := $trunc.i64.i32($i610); - call {:cexpr "a"} boogie_si_record_i32($i611); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 507, 5} true; - assume {:verifier.code 0} true; - $i612 := $add.i32($i611, $i611); - call {:cexpr "a"} boogie_si_record_i32($i612); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 508, 7} true; - assume {:verifier.code 0} true; - $i613 := $sext.i32.i64($i601); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 508, 9} true; - assume {:verifier.code 0} true; - $i614 := $srem.i64($i613, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 508, 7} true; - assume {:verifier.code 0} true; - $i615 := $trunc.i64.i32($i614); - call {:cexpr "b"} boogie_si_record_i32($i615); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 509, 5} true; - assume {:verifier.code 0} true; - $i616 := $add.i32($i615, $i615); - call {:cexpr "b"} boogie_si_record_i32($i616); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 511, 5} true; - assume {:verifier.code 0} true; - $i617 := $add.i32($i604, $i604); - call {:cexpr "c"} boogie_si_record_i32($i617); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 512, 9} true; - assume {:verifier.code 0} true; - $i618 := $slt.i32($i612, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 512, 7} true; - assume {:verifier.code 0} true; - $i619 := $i617; - assume {:branchcond $i618} true; - goto $bb370, $bb371; -$bb364: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 502, 15} true; - assume {:verifier.code 0} true; - assume ($i605 == 1); - goto $bb365; -$bb365: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 503, 9} true; - assume {:verifier.code 0} true; - $i608 := $add.i32($i602, 1); - call {:cexpr "c"} boogie_si_record_i32($i608); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 504, 5} true; - assume {:verifier.code 0} true; - $i607 := $i608; - goto $bb369; -$bb366: - assume !(($i605 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 502, 20} true; - assume {:verifier.code 0} true; - $i606 := $sgt.i32($i601, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 502, 9} true; - assume {:verifier.code 0} true; - $i607 := $i602; - assume {:branchcond $i606} true; - goto $bb367, $bb368; -$bb367: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 502, 9} true; - assume {:verifier.code 0} true; - assume ($i606 == 1); - goto $bb365; -$bb368: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 502, 9} true; - assume {:verifier.code 0} true; - assume !(($i606 == 1)); - goto $bb369; -$bb369: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 505, 3} true; - assume {:verifier.code 0} true; - $i604 := $i607; - goto $bb363; -$bb370: - assume ($i618 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 513, 11} true; - assume {:verifier.code 0} true; - $i620 := $slt.i32($i616, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 513, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i620} true; - goto $bb373, $bb375; -$bb371: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 512, 7} true; - assume {:verifier.code 0} true; - assume !(($i618 == 1)); - goto $bb372; -$bb372: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 517, 7} true; - assume {:verifier.code 0} true; - $i624 := $sext.i32.i64($i612); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 517, 9} true; - assume {:verifier.code 0} true; - $i625 := $srem.i64($i624, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 517, 7} true; - assume {:verifier.code 0} true; - $i626 := $trunc.i64.i32($i625); - call {:cexpr "a"} boogie_si_record_i32($i626); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 518, 5} true; - assume {:verifier.code 0} true; - $i627 := $add.i32($i626, $i626); - call {:cexpr "a"} boogie_si_record_i32($i627); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 519, 7} true; - assume {:verifier.code 0} true; - $i628 := $sext.i32.i64($i616); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 519, 9} true; - assume {:verifier.code 0} true; - $i629 := $srem.i64($i628, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 519, 7} true; - assume {:verifier.code 0} true; - $i630 := $trunc.i64.i32($i629); - call {:cexpr "b"} boogie_si_record_i32($i630); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 520, 5} true; - assume {:verifier.code 0} true; - $i631 := $add.i32($i630, $i630); - call {:cexpr "b"} boogie_si_record_i32($i631); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 522, 5} true; - assume {:verifier.code 0} true; - $i632 := $add.i32($i619, $i619); - call {:cexpr "c"} boogie_si_record_i32($i632); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 523, 9} true; - assume {:verifier.code 0} true; - $i633 := $slt.i32($i627, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 523, 7} true; - assume {:verifier.code 0} true; - $i634 := $i632; - assume {:branchcond $i633} true; - goto $bb379, $bb380; -$bb373: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 513, 15} true; - assume {:verifier.code 0} true; - assume ($i620 == 1); - goto $bb374; -$bb374: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 514, 9} true; - assume {:verifier.code 0} true; - $i623 := $add.i32($i617, 1); - call {:cexpr "c"} boogie_si_record_i32($i623); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 515, 5} true; - assume {:verifier.code 0} true; - $i622 := $i623; - goto $bb378; -$bb375: - assume !(($i620 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 513, 20} true; - assume {:verifier.code 0} true; - $i621 := $sgt.i32($i616, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 513, 9} true; - assume {:verifier.code 0} true; - $i622 := $i617; - assume {:branchcond $i621} true; - goto $bb376, $bb377; -$bb376: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 513, 9} true; - assume {:verifier.code 0} true; - assume ($i621 == 1); - goto $bb374; -$bb377: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 513, 9} true; - assume {:verifier.code 0} true; - assume !(($i621 == 1)); - goto $bb378; -$bb378: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 516, 3} true; - assume {:verifier.code 0} true; - $i619 := $i622; - goto $bb372; -$bb379: - assume ($i633 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 524, 11} true; - assume {:verifier.code 0} true; - $i635 := $slt.i32($i631, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 524, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i635} true; - goto $bb382, $bb384; -$bb380: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 523, 7} true; - assume {:verifier.code 0} true; - assume !(($i633 == 1)); - goto $bb381; -$bb381: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 528, 7} true; - assume {:verifier.code 0} true; - $i639 := $sext.i32.i64($i627); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 528, 9} true; - assume {:verifier.code 0} true; - $i640 := $srem.i64($i639, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 528, 7} true; - assume {:verifier.code 0} true; - $i641 := $trunc.i64.i32($i640); - call {:cexpr "a"} boogie_si_record_i32($i641); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 529, 5} true; - assume {:verifier.code 0} true; - $i642 := $add.i32($i641, $i641); - call {:cexpr "a"} boogie_si_record_i32($i642); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 530, 7} true; - assume {:verifier.code 0} true; - $i643 := $sext.i32.i64($i631); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 530, 9} true; - assume {:verifier.code 0} true; - $i644 := $srem.i64($i643, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 530, 7} true; - assume {:verifier.code 0} true; - $i645 := $trunc.i64.i32($i644); - call {:cexpr "b"} boogie_si_record_i32($i645); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 531, 5} true; - assume {:verifier.code 0} true; - $i646 := $add.i32($i645, $i645); - call {:cexpr "b"} boogie_si_record_i32($i646); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 533, 5} true; - assume {:verifier.code 0} true; - $i647 := $add.i32($i634, $i634); - call {:cexpr "c"} boogie_si_record_i32($i647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 534, 9} true; - assume {:verifier.code 0} true; - $i648 := $slt.i32($i642, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 534, 7} true; - assume {:verifier.code 0} true; - $i649 := $i647; - assume {:branchcond $i648} true; - goto $bb388, $bb389; -$bb382: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 524, 15} true; - assume {:verifier.code 0} true; - assume ($i635 == 1); - goto $bb383; -$bb383: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 525, 9} true; - assume {:verifier.code 0} true; - $i638 := $add.i32($i632, 1); - call {:cexpr "c"} boogie_si_record_i32($i638); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 526, 5} true; - assume {:verifier.code 0} true; - $i637 := $i638; - goto $bb387; -$bb384: - assume !(($i635 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 524, 20} true; - assume {:verifier.code 0} true; - $i636 := $sgt.i32($i631, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 524, 9} true; - assume {:verifier.code 0} true; - $i637 := $i632; - assume {:branchcond $i636} true; - goto $bb385, $bb386; -$bb385: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 524, 9} true; - assume {:verifier.code 0} true; - assume ($i636 == 1); - goto $bb383; -$bb386: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 524, 9} true; - assume {:verifier.code 0} true; - assume !(($i636 == 1)); - goto $bb387; -$bb387: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 527, 3} true; - assume {:verifier.code 0} true; - $i634 := $i637; - goto $bb381; -$bb388: - assume ($i648 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 535, 11} true; - assume {:verifier.code 0} true; - $i650 := $slt.i32($i646, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 535, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i650} true; - goto $bb391, $bb393; -$bb389: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 534, 7} true; - assume {:verifier.code 0} true; - assume !(($i648 == 1)); - goto $bb390; -$bb390: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 539, 7} true; - assume {:verifier.code 0} true; - $i654 := $sext.i32.i64($i642); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 539, 9} true; - assume {:verifier.code 0} true; - $i655 := $srem.i64($i654, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 539, 7} true; - assume {:verifier.code 0} true; - $i656 := $trunc.i64.i32($i655); - call {:cexpr "a"} boogie_si_record_i32($i656); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 540, 5} true; - assume {:verifier.code 0} true; - $i657 := $add.i32($i656, $i656); - call {:cexpr "a"} boogie_si_record_i32($i657); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 541, 7} true; - assume {:verifier.code 0} true; - $i658 := $sext.i32.i64($i646); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 541, 9} true; - assume {:verifier.code 0} true; - $i659 := $srem.i64($i658, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 541, 7} true; - assume {:verifier.code 0} true; - $i660 := $trunc.i64.i32($i659); - call {:cexpr "b"} boogie_si_record_i32($i660); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 542, 5} true; - assume {:verifier.code 0} true; - $i661 := $add.i32($i660, $i660); - call {:cexpr "b"} boogie_si_record_i32($i661); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 544, 5} true; - assume {:verifier.code 0} true; - $i662 := $add.i32($i649, $i649); - call {:cexpr "c"} boogie_si_record_i32($i662); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 545, 9} true; - assume {:verifier.code 0} true; - $i663 := $slt.i32($i657, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 545, 7} true; - assume {:verifier.code 0} true; - $i664 := $i662; - assume {:branchcond $i663} true; - goto $bb397, $bb398; -$bb391: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 535, 15} true; - assume {:verifier.code 0} true; - assume ($i650 == 1); - goto $bb392; -$bb392: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 536, 9} true; - assume {:verifier.code 0} true; - $i653 := $add.i32($i647, 1); - call {:cexpr "c"} boogie_si_record_i32($i653); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 537, 5} true; - assume {:verifier.code 0} true; - $i652 := $i653; - goto $bb396; -$bb393: - assume !(($i650 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 535, 20} true; - assume {:verifier.code 0} true; - $i651 := $sgt.i32($i646, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 535, 9} true; - assume {:verifier.code 0} true; - $i652 := $i647; - assume {:branchcond $i651} true; - goto $bb394, $bb395; -$bb394: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 535, 9} true; - assume {:verifier.code 0} true; - assume ($i651 == 1); - goto $bb392; -$bb395: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 535, 9} true; - assume {:verifier.code 0} true; - assume !(($i651 == 1)); - goto $bb396; -$bb396: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 538, 3} true; - assume {:verifier.code 0} true; - $i649 := $i652; - goto $bb390; -$bb397: - assume ($i663 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 546, 11} true; - assume {:verifier.code 0} true; - $i665 := $slt.i32($i661, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 546, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i665} true; - goto $bb400, $bb402; -$bb398: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 545, 7} true; - assume {:verifier.code 0} true; - assume !(($i663 == 1)); - goto $bb399; -$bb399: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 550, 7} true; - assume {:verifier.code 0} true; - $i669 := $sext.i32.i64($i657); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 550, 9} true; - assume {:verifier.code 0} true; - $i670 := $srem.i64($i669, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 550, 7} true; - assume {:verifier.code 0} true; - $i671 := $trunc.i64.i32($i670); - call {:cexpr "a"} boogie_si_record_i32($i671); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 551, 5} true; - assume {:verifier.code 0} true; - $i672 := $add.i32($i671, $i671); - call {:cexpr "a"} boogie_si_record_i32($i672); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 552, 7} true; - assume {:verifier.code 0} true; - $i673 := $sext.i32.i64($i661); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 552, 9} true; - assume {:verifier.code 0} true; - $i674 := $srem.i64($i673, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 552, 7} true; - assume {:verifier.code 0} true; - $i675 := $trunc.i64.i32($i674); - call {:cexpr "b"} boogie_si_record_i32($i675); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 553, 5} true; - assume {:verifier.code 0} true; - $i676 := $add.i32($i675, $i675); - call {:cexpr "b"} boogie_si_record_i32($i676); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 555, 5} true; - assume {:verifier.code 0} true; - $i677 := $add.i32($i664, $i664); - call {:cexpr "c"} boogie_si_record_i32($i677); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 556, 9} true; - assume {:verifier.code 0} true; - $i678 := $slt.i32($i672, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 556, 7} true; - assume {:verifier.code 0} true; - $i679 := $i677; - assume {:branchcond $i678} true; - goto $bb406, $bb407; -$bb400: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 546, 15} true; - assume {:verifier.code 0} true; - assume ($i665 == 1); - goto $bb401; -$bb401: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 547, 9} true; - assume {:verifier.code 0} true; - $i668 := $add.i32($i662, 1); - call {:cexpr "c"} boogie_si_record_i32($i668); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 548, 5} true; - assume {:verifier.code 0} true; - $i667 := $i668; - goto $bb405; -$bb402: - assume !(($i665 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 546, 20} true; - assume {:verifier.code 0} true; - $i666 := $sgt.i32($i661, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 546, 9} true; - assume {:verifier.code 0} true; - $i667 := $i662; - assume {:branchcond $i666} true; - goto $bb403, $bb404; -$bb403: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 546, 9} true; - assume {:verifier.code 0} true; - assume ($i666 == 1); - goto $bb401; -$bb404: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 546, 9} true; - assume {:verifier.code 0} true; - assume !(($i666 == 1)); - goto $bb405; -$bb405: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 549, 3} true; - assume {:verifier.code 0} true; - $i664 := $i667; - goto $bb399; -$bb406: - assume ($i678 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 557, 11} true; - assume {:verifier.code 0} true; - $i680 := $slt.i32($i676, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 557, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i680} true; - goto $bb409, $bb411; -$bb407: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 556, 7} true; - assume {:verifier.code 0} true; - assume !(($i678 == 1)); - goto $bb408; -$bb408: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 561, 7} true; - assume {:verifier.code 0} true; - $i684 := $sext.i32.i64($i672); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 561, 9} true; - assume {:verifier.code 0} true; - $i685 := $srem.i64($i684, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 561, 7} true; - assume {:verifier.code 0} true; - $i686 := $trunc.i64.i32($i685); - call {:cexpr "a"} boogie_si_record_i32($i686); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 562, 5} true; - assume {:verifier.code 0} true; - $i687 := $add.i32($i686, $i686); - call {:cexpr "a"} boogie_si_record_i32($i687); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 563, 7} true; - assume {:verifier.code 0} true; - $i688 := $sext.i32.i64($i676); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 563, 9} true; - assume {:verifier.code 0} true; - $i689 := $srem.i64($i688, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 563, 7} true; - assume {:verifier.code 0} true; - $i690 := $trunc.i64.i32($i689); - call {:cexpr "b"} boogie_si_record_i32($i690); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 564, 5} true; - assume {:verifier.code 0} true; - $i691 := $add.i32($i690, $i690); - call {:cexpr "b"} boogie_si_record_i32($i691); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 566, 5} true; - assume {:verifier.code 0} true; - $i692 := $add.i32($i679, $i679); - call {:cexpr "c"} boogie_si_record_i32($i692); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 567, 9} true; - assume {:verifier.code 0} true; - $i693 := $slt.i32($i687, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 567, 7} true; - assume {:verifier.code 0} true; - $i694 := $i692; - assume {:branchcond $i693} true; - goto $bb415, $bb416; -$bb409: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 557, 15} true; - assume {:verifier.code 0} true; - assume ($i680 == 1); - goto $bb410; -$bb410: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 558, 9} true; - assume {:verifier.code 0} true; - $i683 := $add.i32($i677, 1); - call {:cexpr "c"} boogie_si_record_i32($i683); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 559, 5} true; - assume {:verifier.code 0} true; - $i682 := $i683; - goto $bb414; -$bb411: - assume !(($i680 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 557, 20} true; - assume {:verifier.code 0} true; - $i681 := $sgt.i32($i676, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 557, 9} true; - assume {:verifier.code 0} true; - $i682 := $i677; - assume {:branchcond $i681} true; - goto $bb412, $bb413; -$bb412: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 557, 9} true; - assume {:verifier.code 0} true; - assume ($i681 == 1); - goto $bb410; -$bb413: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 557, 9} true; - assume {:verifier.code 0} true; - assume !(($i681 == 1)); - goto $bb414; -$bb414: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 560, 3} true; - assume {:verifier.code 0} true; - $i679 := $i682; - goto $bb408; -$bb415: - assume ($i693 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 568, 11} true; - assume {:verifier.code 0} true; - $i695 := $slt.i32($i691, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 568, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i695} true; - goto $bb418, $bb420; -$bb416: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 567, 7} true; - assume {:verifier.code 0} true; - assume !(($i693 == 1)); - goto $bb417; -$bb417: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 572, 7} true; - assume {:verifier.code 0} true; - $i699 := $sext.i32.i64($i687); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 572, 9} true; - assume {:verifier.code 0} true; - $i700 := $srem.i64($i699, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 572, 7} true; - assume {:verifier.code 0} true; - $i701 := $trunc.i64.i32($i700); - call {:cexpr "a"} boogie_si_record_i32($i701); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 573, 5} true; - assume {:verifier.code 0} true; - $i702 := $add.i32($i701, $i701); - call {:cexpr "a"} boogie_si_record_i32($i702); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 574, 7} true; - assume {:verifier.code 0} true; - $i703 := $sext.i32.i64($i691); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 574, 9} true; - assume {:verifier.code 0} true; - $i704 := $srem.i64($i703, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 574, 7} true; - assume {:verifier.code 0} true; - $i705 := $trunc.i64.i32($i704); - call {:cexpr "b"} boogie_si_record_i32($i705); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 575, 5} true; - assume {:verifier.code 0} true; - $i706 := $add.i32($i705, $i705); - call {:cexpr "b"} boogie_si_record_i32($i706); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 577, 5} true; - assume {:verifier.code 0} true; - $i707 := $add.i32($i694, $i694); - call {:cexpr "c"} boogie_si_record_i32($i707); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 578, 9} true; - assume {:verifier.code 0} true; - $i708 := $slt.i32($i702, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 578, 7} true; - assume {:verifier.code 0} true; - $i709 := $i707; - assume {:branchcond $i708} true; - goto $bb424, $bb425; -$bb418: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 568, 15} true; - assume {:verifier.code 0} true; - assume ($i695 == 1); - goto $bb419; -$bb419: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 569, 9} true; - assume {:verifier.code 0} true; - $i698 := $add.i32($i692, 1); - call {:cexpr "c"} boogie_si_record_i32($i698); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 570, 5} true; - assume {:verifier.code 0} true; - $i697 := $i698; - goto $bb423; -$bb420: - assume !(($i695 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 568, 20} true; - assume {:verifier.code 0} true; - $i696 := $sgt.i32($i691, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 568, 9} true; - assume {:verifier.code 0} true; - $i697 := $i692; - assume {:branchcond $i696} true; - goto $bb421, $bb422; -$bb421: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 568, 9} true; - assume {:verifier.code 0} true; - assume ($i696 == 1); - goto $bb419; -$bb422: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 568, 9} true; - assume {:verifier.code 0} true; - assume !(($i696 == 1)); - goto $bb423; -$bb423: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 571, 3} true; - assume {:verifier.code 0} true; - $i694 := $i697; - goto $bb417; -$bb424: - assume ($i708 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 579, 11} true; - assume {:verifier.code 0} true; - $i710 := $slt.i32($i706, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 579, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i710} true; - goto $bb427, $bb429; -$bb425: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 578, 7} true; - assume {:verifier.code 0} true; - assume !(($i708 == 1)); - goto $bb426; -$bb426: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 583, 7} true; - assume {:verifier.code 0} true; - $i714 := $sext.i32.i64($i702); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 583, 9} true; - assume {:verifier.code 0} true; - $i715 := $srem.i64($i714, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 583, 7} true; - assume {:verifier.code 0} true; - $i716 := $trunc.i64.i32($i715); - call {:cexpr "a"} boogie_si_record_i32($i716); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 584, 5} true; - assume {:verifier.code 0} true; - $i717 := $add.i32($i716, $i716); - call {:cexpr "a"} boogie_si_record_i32($i717); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 585, 7} true; - assume {:verifier.code 0} true; - $i718 := $sext.i32.i64($i706); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 585, 9} true; - assume {:verifier.code 0} true; - $i719 := $srem.i64($i718, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 585, 7} true; - assume {:verifier.code 0} true; - $i720 := $trunc.i64.i32($i719); - call {:cexpr "b"} boogie_si_record_i32($i720); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 586, 5} true; - assume {:verifier.code 0} true; - $i721 := $add.i32($i720, $i720); - call {:cexpr "b"} boogie_si_record_i32($i721); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 588, 5} true; - assume {:verifier.code 0} true; - $i722 := $add.i32($i709, $i709); - call {:cexpr "c"} boogie_si_record_i32($i722); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 589, 9} true; - assume {:verifier.code 0} true; - $i723 := $slt.i32($i717, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 589, 7} true; - assume {:verifier.code 0} true; - $i724 := $i722; - assume {:branchcond $i723} true; - goto $bb433, $bb434; -$bb427: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 579, 15} true; - assume {:verifier.code 0} true; - assume ($i710 == 1); - goto $bb428; -$bb428: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 580, 9} true; - assume {:verifier.code 0} true; - $i713 := $add.i32($i707, 1); - call {:cexpr "c"} boogie_si_record_i32($i713); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 581, 5} true; - assume {:verifier.code 0} true; - $i712 := $i713; - goto $bb432; -$bb429: - assume !(($i710 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 579, 20} true; - assume {:verifier.code 0} true; - $i711 := $sgt.i32($i706, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 579, 9} true; - assume {:verifier.code 0} true; - $i712 := $i707; - assume {:branchcond $i711} true; - goto $bb430, $bb431; -$bb430: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 579, 9} true; - assume {:verifier.code 0} true; - assume ($i711 == 1); - goto $bb428; -$bb431: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 579, 9} true; - assume {:verifier.code 0} true; - assume !(($i711 == 1)); - goto $bb432; -$bb432: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 582, 3} true; - assume {:verifier.code 0} true; - $i709 := $i712; - goto $bb426; -$bb433: - assume ($i723 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 590, 11} true; - assume {:verifier.code 0} true; - $i725 := $slt.i32($i721, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 590, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i725} true; - goto $bb436, $bb438; -$bb434: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 589, 7} true; - assume {:verifier.code 0} true; - assume !(($i723 == 1)); - goto $bb435; -$bb435: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 594, 7} true; - assume {:verifier.code 0} true; - $i729 := $sext.i32.i64($i717); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 594, 9} true; - assume {:verifier.code 0} true; - $i730 := $srem.i64($i729, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 594, 7} true; - assume {:verifier.code 0} true; - $i731 := $trunc.i64.i32($i730); - call {:cexpr "a"} boogie_si_record_i32($i731); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 595, 5} true; - assume {:verifier.code 0} true; - $i732 := $add.i32($i731, $i731); - call {:cexpr "a"} boogie_si_record_i32($i732); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 596, 7} true; - assume {:verifier.code 0} true; - $i733 := $sext.i32.i64($i721); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 596, 9} true; - assume {:verifier.code 0} true; - $i734 := $srem.i64($i733, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 596, 7} true; - assume {:verifier.code 0} true; - $i735 := $trunc.i64.i32($i734); - call {:cexpr "b"} boogie_si_record_i32($i735); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 597, 5} true; - assume {:verifier.code 0} true; - $i736 := $add.i32($i735, $i735); - call {:cexpr "b"} boogie_si_record_i32($i736); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 599, 5} true; - assume {:verifier.code 0} true; - $i737 := $add.i32($i724, $i724); - call {:cexpr "c"} boogie_si_record_i32($i737); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 600, 9} true; - assume {:verifier.code 0} true; - $i738 := $slt.i32($i732, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 600, 7} true; - assume {:verifier.code 0} true; - $i739 := $i737; - assume {:branchcond $i738} true; - goto $bb442, $bb443; -$bb436: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 590, 15} true; - assume {:verifier.code 0} true; - assume ($i725 == 1); - goto $bb437; -$bb437: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 591, 9} true; - assume {:verifier.code 0} true; - $i728 := $add.i32($i722, 1); - call {:cexpr "c"} boogie_si_record_i32($i728); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 592, 5} true; - assume {:verifier.code 0} true; - $i727 := $i728; - goto $bb441; -$bb438: - assume !(($i725 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 590, 20} true; - assume {:verifier.code 0} true; - $i726 := $sgt.i32($i721, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 590, 9} true; - assume {:verifier.code 0} true; - $i727 := $i722; - assume {:branchcond $i726} true; - goto $bb439, $bb440; -$bb439: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 590, 9} true; - assume {:verifier.code 0} true; - assume ($i726 == 1); - goto $bb437; -$bb440: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 590, 9} true; - assume {:verifier.code 0} true; - assume !(($i726 == 1)); - goto $bb441; -$bb441: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 593, 3} true; - assume {:verifier.code 0} true; - $i724 := $i727; - goto $bb435; -$bb442: - assume ($i738 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 601, 11} true; - assume {:verifier.code 0} true; - $i740 := $slt.i32($i736, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 601, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i740} true; - goto $bb445, $bb447; -$bb443: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 600, 7} true; - assume {:verifier.code 0} true; - assume !(($i738 == 1)); - goto $bb444; -$bb444: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 605, 7} true; - assume {:verifier.code 0} true; - $i744 := $sext.i32.i64($i732); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 605, 9} true; - assume {:verifier.code 0} true; - $i745 := $srem.i64($i744, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 605, 7} true; - assume {:verifier.code 0} true; - $i746 := $trunc.i64.i32($i745); - call {:cexpr "a"} boogie_si_record_i32($i746); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 606, 5} true; - assume {:verifier.code 0} true; - $i747 := $add.i32($i746, $i746); - call {:cexpr "a"} boogie_si_record_i32($i747); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 607, 7} true; - assume {:verifier.code 0} true; - $i748 := $sext.i32.i64($i736); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 607, 9} true; - assume {:verifier.code 0} true; - $i749 := $srem.i64($i748, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 607, 7} true; - assume {:verifier.code 0} true; - $i750 := $trunc.i64.i32($i749); - call {:cexpr "b"} boogie_si_record_i32($i750); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 608, 5} true; - assume {:verifier.code 0} true; - $i751 := $add.i32($i750, $i750); - call {:cexpr "b"} boogie_si_record_i32($i751); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 610, 5} true; - assume {:verifier.code 0} true; - $i752 := $add.i32($i739, $i739); - call {:cexpr "c"} boogie_si_record_i32($i752); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 611, 9} true; - assume {:verifier.code 0} true; - $i753 := $slt.i32($i747, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 611, 7} true; - assume {:verifier.code 0} true; - $i754 := $i752; - assume {:branchcond $i753} true; - goto $bb451, $bb452; -$bb445: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 601, 15} true; - assume {:verifier.code 0} true; - assume ($i740 == 1); - goto $bb446; -$bb446: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 602, 9} true; - assume {:verifier.code 0} true; - $i743 := $add.i32($i737, 1); - call {:cexpr "c"} boogie_si_record_i32($i743); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 603, 5} true; - assume {:verifier.code 0} true; - $i742 := $i743; - goto $bb450; -$bb447: - assume !(($i740 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 601, 20} true; - assume {:verifier.code 0} true; - $i741 := $sgt.i32($i736, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 601, 9} true; - assume {:verifier.code 0} true; - $i742 := $i737; - assume {:branchcond $i741} true; - goto $bb448, $bb449; -$bb448: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 601, 9} true; - assume {:verifier.code 0} true; - assume ($i741 == 1); - goto $bb446; -$bb449: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 601, 9} true; - assume {:verifier.code 0} true; - assume !(($i741 == 1)); - goto $bb450; -$bb450: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 604, 3} true; - assume {:verifier.code 0} true; - $i739 := $i742; - goto $bb444; -$bb451: - assume ($i753 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 612, 11} true; - assume {:verifier.code 0} true; - $i755 := $slt.i32($i751, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 612, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i755} true; - goto $bb454, $bb456; -$bb452: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 611, 7} true; - assume {:verifier.code 0} true; - assume !(($i753 == 1)); - goto $bb453; -$bb453: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 616, 7} true; - assume {:verifier.code 0} true; - $i759 := $sext.i32.i64($i747); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 616, 9} true; - assume {:verifier.code 0} true; - $i760 := $srem.i64($i759, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 616, 7} true; - assume {:verifier.code 0} true; - $i761 := $trunc.i64.i32($i760); - call {:cexpr "a"} boogie_si_record_i32($i761); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 617, 5} true; - assume {:verifier.code 0} true; - $i762 := $add.i32($i761, $i761); - call {:cexpr "a"} boogie_si_record_i32($i762); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 618, 7} true; - assume {:verifier.code 0} true; - $i763 := $sext.i32.i64($i751); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 618, 9} true; - assume {:verifier.code 0} true; - $i764 := $srem.i64($i763, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 618, 7} true; - assume {:verifier.code 0} true; - $i765 := $trunc.i64.i32($i764); - call {:cexpr "b"} boogie_si_record_i32($i765); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 619, 5} true; - assume {:verifier.code 0} true; - $i766 := $add.i32($i765, $i765); - call {:cexpr "b"} boogie_si_record_i32($i766); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 621, 5} true; - assume {:verifier.code 0} true; - $i767 := $add.i32($i754, $i754); - call {:cexpr "c"} boogie_si_record_i32($i767); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 622, 9} true; - assume {:verifier.code 0} true; - $i768 := $slt.i32($i762, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 622, 7} true; - assume {:verifier.code 0} true; - $i769 := $i767; - assume {:branchcond $i768} true; - goto $bb460, $bb461; -$bb454: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 612, 15} true; - assume {:verifier.code 0} true; - assume ($i755 == 1); - goto $bb455; -$bb455: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 613, 9} true; - assume {:verifier.code 0} true; - $i758 := $add.i32($i752, 1); - call {:cexpr "c"} boogie_si_record_i32($i758); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 614, 5} true; - assume {:verifier.code 0} true; - $i757 := $i758; - goto $bb459; -$bb456: - assume !(($i755 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 612, 20} true; - assume {:verifier.code 0} true; - $i756 := $sgt.i32($i751, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 612, 9} true; - assume {:verifier.code 0} true; - $i757 := $i752; - assume {:branchcond $i756} true; - goto $bb457, $bb458; -$bb457: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 612, 9} true; - assume {:verifier.code 0} true; - assume ($i756 == 1); - goto $bb455; -$bb458: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 612, 9} true; - assume {:verifier.code 0} true; - assume !(($i756 == 1)); - goto $bb459; -$bb459: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 615, 3} true; - assume {:verifier.code 0} true; - $i754 := $i757; - goto $bb453; -$bb460: - assume ($i768 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 623, 11} true; - assume {:verifier.code 0} true; - $i770 := $slt.i32($i766, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 623, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i770} true; - goto $bb463, $bb465; -$bb461: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 622, 7} true; - assume {:verifier.code 0} true; - assume !(($i768 == 1)); - goto $bb462; -$bb462: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 627, 7} true; - assume {:verifier.code 0} true; - $i774 := $sext.i32.i64($i762); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 627, 9} true; - assume {:verifier.code 0} true; - $i775 := $srem.i64($i774, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 627, 7} true; - assume {:verifier.code 0} true; - $i776 := $trunc.i64.i32($i775); - call {:cexpr "a"} boogie_si_record_i32($i776); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 628, 5} true; - assume {:verifier.code 0} true; - $i777 := $add.i32($i776, $i776); - call {:cexpr "a"} boogie_si_record_i32($i777); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 629, 7} true; - assume {:verifier.code 0} true; - $i778 := $sext.i32.i64($i766); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 629, 9} true; - assume {:verifier.code 0} true; - $i779 := $srem.i64($i778, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 629, 7} true; - assume {:verifier.code 0} true; - $i780 := $trunc.i64.i32($i779); - call {:cexpr "b"} boogie_si_record_i32($i780); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 630, 5} true; - assume {:verifier.code 0} true; - $i781 := $add.i32($i780, $i780); - call {:cexpr "b"} boogie_si_record_i32($i781); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 632, 5} true; - assume {:verifier.code 0} true; - $i782 := $add.i32($i769, $i769); - call {:cexpr "c"} boogie_si_record_i32($i782); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 633, 9} true; - assume {:verifier.code 0} true; - $i783 := $slt.i32($i777, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 633, 7} true; - assume {:verifier.code 0} true; - $i784 := $i782; - assume {:branchcond $i783} true; - goto $bb469, $bb470; -$bb463: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 623, 15} true; - assume {:verifier.code 0} true; - assume ($i770 == 1); - goto $bb464; -$bb464: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 624, 9} true; - assume {:verifier.code 0} true; - $i773 := $add.i32($i767, 1); - call {:cexpr "c"} boogie_si_record_i32($i773); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 625, 5} true; - assume {:verifier.code 0} true; - $i772 := $i773; - goto $bb468; -$bb465: - assume !(($i770 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 623, 20} true; - assume {:verifier.code 0} true; - $i771 := $sgt.i32($i766, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 623, 9} true; - assume {:verifier.code 0} true; - $i772 := $i767; - assume {:branchcond $i771} true; - goto $bb466, $bb467; -$bb466: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 623, 9} true; - assume {:verifier.code 0} true; - assume ($i771 == 1); - goto $bb464; -$bb467: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 623, 9} true; - assume {:verifier.code 0} true; - assume !(($i771 == 1)); - goto $bb468; -$bb468: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 626, 3} true; - assume {:verifier.code 0} true; - $i769 := $i772; - goto $bb462; -$bb469: - assume ($i783 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 634, 11} true; - assume {:verifier.code 0} true; - $i785 := $slt.i32($i781, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 634, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i785} true; - goto $bb472, $bb474; -$bb470: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 633, 7} true; - assume {:verifier.code 0} true; - assume !(($i783 == 1)); - goto $bb471; -$bb471: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 638, 7} true; - assume {:verifier.code 0} true; - $i789 := $sext.i32.i64($i777); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 638, 9} true; - assume {:verifier.code 0} true; - $i790 := $srem.i64($i789, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 638, 7} true; - assume {:verifier.code 0} true; - $i791 := $trunc.i64.i32($i790); - call {:cexpr "a"} boogie_si_record_i32($i791); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 639, 5} true; - assume {:verifier.code 0} true; - $i792 := $add.i32($i791, $i791); - call {:cexpr "a"} boogie_si_record_i32($i792); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 640, 7} true; - assume {:verifier.code 0} true; - $i793 := $sext.i32.i64($i781); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 640, 9} true; - assume {:verifier.code 0} true; - $i794 := $srem.i64($i793, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 640, 7} true; - assume {:verifier.code 0} true; - $i795 := $trunc.i64.i32($i794); - call {:cexpr "b"} boogie_si_record_i32($i795); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 641, 5} true; - assume {:verifier.code 0} true; - $i796 := $add.i32($i795, $i795); - call {:cexpr "b"} boogie_si_record_i32($i796); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 643, 5} true; - assume {:verifier.code 0} true; - $i797 := $add.i32($i784, $i784); - call {:cexpr "c"} boogie_si_record_i32($i797); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 644, 9} true; - assume {:verifier.code 0} true; - $i798 := $slt.i32($i792, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 644, 7} true; - assume {:verifier.code 0} true; - $i799 := $i797; - assume {:branchcond $i798} true; - goto $bb478, $bb479; -$bb472: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 634, 15} true; - assume {:verifier.code 0} true; - assume ($i785 == 1); - goto $bb473; -$bb473: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 635, 9} true; - assume {:verifier.code 0} true; - $i788 := $add.i32($i782, 1); - call {:cexpr "c"} boogie_si_record_i32($i788); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 636, 5} true; - assume {:verifier.code 0} true; - $i787 := $i788; - goto $bb477; -$bb474: - assume !(($i785 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 634, 20} true; - assume {:verifier.code 0} true; - $i786 := $sgt.i32($i781, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 634, 9} true; - assume {:verifier.code 0} true; - $i787 := $i782; - assume {:branchcond $i786} true; - goto $bb475, $bb476; -$bb475: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 634, 9} true; - assume {:verifier.code 0} true; - assume ($i786 == 1); - goto $bb473; -$bb476: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 634, 9} true; - assume {:verifier.code 0} true; - assume !(($i786 == 1)); - goto $bb477; -$bb477: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 637, 3} true; - assume {:verifier.code 0} true; - $i784 := $i787; - goto $bb471; -$bb478: - assume ($i798 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 645, 11} true; - assume {:verifier.code 0} true; - $i800 := $slt.i32($i796, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 645, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i800} true; - goto $bb481, $bb483; -$bb479: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 644, 7} true; - assume {:verifier.code 0} true; - assume !(($i798 == 1)); - goto $bb480; -$bb480: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 649, 7} true; - assume {:verifier.code 0} true; - $i804 := $sext.i32.i64($i792); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 649, 9} true; - assume {:verifier.code 0} true; - $i805 := $srem.i64($i804, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 649, 7} true; - assume {:verifier.code 0} true; - $i806 := $trunc.i64.i32($i805); - call {:cexpr "a"} boogie_si_record_i32($i806); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 650, 5} true; - assume {:verifier.code 0} true; - $i807 := $add.i32($i806, $i806); - call {:cexpr "a"} boogie_si_record_i32($i807); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 651, 7} true; - assume {:verifier.code 0} true; - $i808 := $sext.i32.i64($i796); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 651, 9} true; - assume {:verifier.code 0} true; - $i809 := $srem.i64($i808, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 651, 7} true; - assume {:verifier.code 0} true; - $i810 := $trunc.i64.i32($i809); - call {:cexpr "b"} boogie_si_record_i32($i810); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 652, 5} true; - assume {:verifier.code 0} true; - $i811 := $add.i32($i810, $i810); - call {:cexpr "b"} boogie_si_record_i32($i811); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 654, 5} true; - assume {:verifier.code 0} true; - $i812 := $add.i32($i799, $i799); - call {:cexpr "c"} boogie_si_record_i32($i812); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 655, 9} true; - assume {:verifier.code 0} true; - $i813 := $slt.i32($i807, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 655, 7} true; - assume {:verifier.code 0} true; - $i814 := $i812; - assume {:branchcond $i813} true; - goto $bb487, $bb488; -$bb481: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 645, 15} true; - assume {:verifier.code 0} true; - assume ($i800 == 1); - goto $bb482; -$bb482: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 646, 9} true; - assume {:verifier.code 0} true; - $i803 := $add.i32($i797, 1); - call {:cexpr "c"} boogie_si_record_i32($i803); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 647, 5} true; - assume {:verifier.code 0} true; - $i802 := $i803; - goto $bb486; -$bb483: - assume !(($i800 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 645, 20} true; - assume {:verifier.code 0} true; - $i801 := $sgt.i32($i796, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 645, 9} true; - assume {:verifier.code 0} true; - $i802 := $i797; - assume {:branchcond $i801} true; - goto $bb484, $bb485; -$bb484: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 645, 9} true; - assume {:verifier.code 0} true; - assume ($i801 == 1); - goto $bb482; -$bb485: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 645, 9} true; - assume {:verifier.code 0} true; - assume !(($i801 == 1)); - goto $bb486; -$bb486: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 648, 3} true; - assume {:verifier.code 0} true; - $i799 := $i802; - goto $bb480; -$bb487: - assume ($i813 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 656, 11} true; - assume {:verifier.code 0} true; - $i815 := $slt.i32($i811, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 656, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i815} true; - goto $bb490, $bb492; -$bb488: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 655, 7} true; - assume {:verifier.code 0} true; - assume !(($i813 == 1)); - goto $bb489; -$bb489: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 660, 7} true; - assume {:verifier.code 0} true; - $i819 := $sext.i32.i64($i807); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 660, 9} true; - assume {:verifier.code 0} true; - $i820 := $srem.i64($i819, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 660, 7} true; - assume {:verifier.code 0} true; - $i821 := $trunc.i64.i32($i820); - call {:cexpr "a"} boogie_si_record_i32($i821); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 661, 5} true; - assume {:verifier.code 0} true; - $i822 := $add.i32($i821, $i821); - call {:cexpr "a"} boogie_si_record_i32($i822); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 662, 7} true; - assume {:verifier.code 0} true; - $i823 := $sext.i32.i64($i811); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 662, 9} true; - assume {:verifier.code 0} true; - $i824 := $srem.i64($i823, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 662, 7} true; - assume {:verifier.code 0} true; - $i825 := $trunc.i64.i32($i824); - call {:cexpr "b"} boogie_si_record_i32($i825); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 663, 5} true; - assume {:verifier.code 0} true; - $i826 := $add.i32($i825, $i825); - call {:cexpr "b"} boogie_si_record_i32($i826); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 665, 5} true; - assume {:verifier.code 0} true; - $i827 := $add.i32($i814, $i814); - call {:cexpr "c"} boogie_si_record_i32($i827); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 666, 9} true; - assume {:verifier.code 0} true; - $i828 := $slt.i32($i822, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 666, 7} true; - assume {:verifier.code 0} true; - $i829 := $i827; - assume {:branchcond $i828} true; - goto $bb496, $bb497; -$bb490: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 656, 15} true; - assume {:verifier.code 0} true; - assume ($i815 == 1); - goto $bb491; -$bb491: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 657, 9} true; - assume {:verifier.code 0} true; - $i818 := $add.i32($i812, 1); - call {:cexpr "c"} boogie_si_record_i32($i818); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 658, 5} true; - assume {:verifier.code 0} true; - $i817 := $i818; - goto $bb495; -$bb492: - assume !(($i815 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 656, 20} true; - assume {:verifier.code 0} true; - $i816 := $sgt.i32($i811, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 656, 9} true; - assume {:verifier.code 0} true; - $i817 := $i812; - assume {:branchcond $i816} true; - goto $bb493, $bb494; -$bb493: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 656, 9} true; - assume {:verifier.code 0} true; - assume ($i816 == 1); - goto $bb491; -$bb494: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 656, 9} true; - assume {:verifier.code 0} true; - assume !(($i816 == 1)); - goto $bb495; -$bb495: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 659, 3} true; - assume {:verifier.code 0} true; - $i814 := $i817; - goto $bb489; -$bb496: - assume ($i828 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 667, 11} true; - assume {:verifier.code 0} true; - $i830 := $slt.i32($i826, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 667, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i830} true; - goto $bb499, $bb501; -$bb497: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 666, 7} true; - assume {:verifier.code 0} true; - assume !(($i828 == 1)); - goto $bb498; -$bb498: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 671, 7} true; - assume {:verifier.code 0} true; - $i834 := $sext.i32.i64($i822); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 671, 9} true; - assume {:verifier.code 0} true; - $i835 := $srem.i64($i834, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 671, 7} true; - assume {:verifier.code 0} true; - $i836 := $trunc.i64.i32($i835); - call {:cexpr "a"} boogie_si_record_i32($i836); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 672, 5} true; - assume {:verifier.code 0} true; - $i837 := $add.i32($i836, $i836); - call {:cexpr "a"} boogie_si_record_i32($i837); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 673, 7} true; - assume {:verifier.code 0} true; - $i838 := $sext.i32.i64($i826); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 673, 9} true; - assume {:verifier.code 0} true; - $i839 := $srem.i64($i838, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 673, 7} true; - assume {:verifier.code 0} true; - $i840 := $trunc.i64.i32($i839); - call {:cexpr "b"} boogie_si_record_i32($i840); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 674, 5} true; - assume {:verifier.code 0} true; - $i841 := $add.i32($i840, $i840); - call {:cexpr "b"} boogie_si_record_i32($i841); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 676, 5} true; - assume {:verifier.code 0} true; - $i842 := $add.i32($i829, $i829); - call {:cexpr "c"} boogie_si_record_i32($i842); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 677, 9} true; - assume {:verifier.code 0} true; - $i843 := $slt.i32($i837, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 677, 7} true; - assume {:verifier.code 0} true; - $i844 := $i842; - assume {:branchcond $i843} true; - goto $bb505, $bb506; -$bb499: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 667, 15} true; - assume {:verifier.code 0} true; - assume ($i830 == 1); - goto $bb500; -$bb500: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 668, 9} true; - assume {:verifier.code 0} true; - $i833 := $add.i32($i827, 1); - call {:cexpr "c"} boogie_si_record_i32($i833); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 669, 5} true; - assume {:verifier.code 0} true; - $i832 := $i833; - goto $bb504; -$bb501: - assume !(($i830 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 667, 20} true; - assume {:verifier.code 0} true; - $i831 := $sgt.i32($i826, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 667, 9} true; - assume {:verifier.code 0} true; - $i832 := $i827; - assume {:branchcond $i831} true; - goto $bb502, $bb503; -$bb502: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 667, 9} true; - assume {:verifier.code 0} true; - assume ($i831 == 1); - goto $bb500; -$bb503: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 667, 9} true; - assume {:verifier.code 0} true; - assume !(($i831 == 1)); - goto $bb504; -$bb504: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 670, 3} true; - assume {:verifier.code 0} true; - $i829 := $i832; - goto $bb498; -$bb505: - assume ($i843 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 678, 11} true; - assume {:verifier.code 0} true; - $i845 := $slt.i32($i841, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 678, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i845} true; - goto $bb508, $bb510; -$bb506: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 677, 7} true; - assume {:verifier.code 0} true; - assume !(($i843 == 1)); - goto $bb507; -$bb507: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 682, 7} true; - assume {:verifier.code 0} true; - $i849 := $sext.i32.i64($i837); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 682, 9} true; - assume {:verifier.code 0} true; - $i850 := $srem.i64($i849, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 682, 7} true; - assume {:verifier.code 0} true; - $i851 := $trunc.i64.i32($i850); - call {:cexpr "a"} boogie_si_record_i32($i851); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 683, 5} true; - assume {:verifier.code 0} true; - $i852 := $add.i32($i851, $i851); - call {:cexpr "a"} boogie_si_record_i32($i852); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 684, 7} true; - assume {:verifier.code 0} true; - $i853 := $sext.i32.i64($i841); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 684, 9} true; - assume {:verifier.code 0} true; - $i854 := $srem.i64($i853, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 684, 7} true; - assume {:verifier.code 0} true; - $i855 := $trunc.i64.i32($i854); - call {:cexpr "b"} boogie_si_record_i32($i855); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 685, 5} true; - assume {:verifier.code 0} true; - $i856 := $add.i32($i855, $i855); - call {:cexpr "b"} boogie_si_record_i32($i856); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 687, 5} true; - assume {:verifier.code 0} true; - $i857 := $add.i32($i844, $i844); - call {:cexpr "c"} boogie_si_record_i32($i857); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 688, 9} true; - assume {:verifier.code 0} true; - $i858 := $slt.i32($i852, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 688, 7} true; - assume {:verifier.code 0} true; - $i859 := $i857; - assume {:branchcond $i858} true; - goto $bb514, $bb515; -$bb508: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 678, 15} true; - assume {:verifier.code 0} true; - assume ($i845 == 1); - goto $bb509; -$bb509: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 679, 9} true; - assume {:verifier.code 0} true; - $i848 := $add.i32($i842, 1); - call {:cexpr "c"} boogie_si_record_i32($i848); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 680, 5} true; - assume {:verifier.code 0} true; - $i847 := $i848; - goto $bb513; -$bb510: - assume !(($i845 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 678, 20} true; - assume {:verifier.code 0} true; - $i846 := $sgt.i32($i841, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 678, 9} true; - assume {:verifier.code 0} true; - $i847 := $i842; - assume {:branchcond $i846} true; - goto $bb511, $bb512; -$bb511: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 678, 9} true; - assume {:verifier.code 0} true; - assume ($i846 == 1); - goto $bb509; -$bb512: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 678, 9} true; - assume {:verifier.code 0} true; - assume !(($i846 == 1)); - goto $bb513; -$bb513: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 681, 3} true; - assume {:verifier.code 0} true; - $i844 := $i847; - goto $bb507; -$bb514: - assume ($i858 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 689, 11} true; - assume {:verifier.code 0} true; - $i860 := $slt.i32($i856, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 689, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i860} true; - goto $bb517, $bb519; -$bb515: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 688, 7} true; - assume {:verifier.code 0} true; - assume !(($i858 == 1)); - goto $bb516; -$bb516: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 693, 7} true; - assume {:verifier.code 0} true; - $i864 := $sext.i32.i64($i852); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 693, 9} true; - assume {:verifier.code 0} true; - $i865 := $srem.i64($i864, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 693, 7} true; - assume {:verifier.code 0} true; - $i866 := $trunc.i64.i32($i865); - call {:cexpr "a"} boogie_si_record_i32($i866); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 694, 5} true; - assume {:verifier.code 0} true; - $i867 := $add.i32($i866, $i866); - call {:cexpr "a"} boogie_si_record_i32($i867); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 695, 7} true; - assume {:verifier.code 0} true; - $i868 := $sext.i32.i64($i856); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 695, 9} true; - assume {:verifier.code 0} true; - $i869 := $srem.i64($i868, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 695, 7} true; - assume {:verifier.code 0} true; - $i870 := $trunc.i64.i32($i869); - call {:cexpr "b"} boogie_si_record_i32($i870); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 696, 5} true; - assume {:verifier.code 0} true; - $i871 := $add.i32($i870, $i870); - call {:cexpr "b"} boogie_si_record_i32($i871); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 698, 5} true; - assume {:verifier.code 0} true; - $i872 := $add.i32($i859, $i859); - call {:cexpr "c"} boogie_si_record_i32($i872); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 699, 9} true; - assume {:verifier.code 0} true; - $i873 := $slt.i32($i867, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 699, 7} true; - assume {:verifier.code 0} true; - $i874 := $i872; - assume {:branchcond $i873} true; - goto $bb523, $bb524; -$bb517: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 689, 15} true; - assume {:verifier.code 0} true; - assume ($i860 == 1); - goto $bb518; -$bb518: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 690, 9} true; - assume {:verifier.code 0} true; - $i863 := $add.i32($i857, 1); - call {:cexpr "c"} boogie_si_record_i32($i863); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 691, 5} true; - assume {:verifier.code 0} true; - $i862 := $i863; - goto $bb522; -$bb519: - assume !(($i860 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 689, 20} true; - assume {:verifier.code 0} true; - $i861 := $sgt.i32($i856, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 689, 9} true; - assume {:verifier.code 0} true; - $i862 := $i857; - assume {:branchcond $i861} true; - goto $bb520, $bb521; -$bb520: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 689, 9} true; - assume {:verifier.code 0} true; - assume ($i861 == 1); - goto $bb518; -$bb521: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 689, 9} true; - assume {:verifier.code 0} true; - assume !(($i861 == 1)); - goto $bb522; -$bb522: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 692, 3} true; - assume {:verifier.code 0} true; - $i859 := $i862; - goto $bb516; -$bb523: - assume ($i873 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 700, 11} true; - assume {:verifier.code 0} true; - $i875 := $slt.i32($i871, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 700, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i875} true; - goto $bb526, $bb528; -$bb524: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 699, 7} true; - assume {:verifier.code 0} true; - assume !(($i873 == 1)); - goto $bb525; -$bb525: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 704, 7} true; - assume {:verifier.code 0} true; - $i879 := $sext.i32.i64($i867); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 704, 9} true; - assume {:verifier.code 0} true; - $i880 := $srem.i64($i879, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 704, 7} true; - assume {:verifier.code 0} true; - $i881 := $trunc.i64.i32($i880); - call {:cexpr "a"} boogie_si_record_i32($i881); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 705, 5} true; - assume {:verifier.code 0} true; - $i882 := $add.i32($i881, $i881); - call {:cexpr "a"} boogie_si_record_i32($i882); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 706, 7} true; - assume {:verifier.code 0} true; - $i883 := $sext.i32.i64($i871); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 706, 9} true; - assume {:verifier.code 0} true; - $i884 := $srem.i64($i883, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 706, 7} true; - assume {:verifier.code 0} true; - $i885 := $trunc.i64.i32($i884); - call {:cexpr "b"} boogie_si_record_i32($i885); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 707, 5} true; - assume {:verifier.code 0} true; - $i886 := $add.i32($i885, $i885); - call {:cexpr "b"} boogie_si_record_i32($i886); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 709, 5} true; - assume {:verifier.code 0} true; - $i887 := $add.i32($i874, $i874); - call {:cexpr "c"} boogie_si_record_i32($i887); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 710, 9} true; - assume {:verifier.code 0} true; - $i888 := $slt.i32($i882, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 710, 7} true; - assume {:verifier.code 0} true; - $i889 := $i887; - assume {:branchcond $i888} true; - goto $bb532, $bb533; -$bb526: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 700, 15} true; - assume {:verifier.code 0} true; - assume ($i875 == 1); - goto $bb527; -$bb527: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 701, 9} true; - assume {:verifier.code 0} true; - $i878 := $add.i32($i872, 1); - call {:cexpr "c"} boogie_si_record_i32($i878); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 702, 5} true; - assume {:verifier.code 0} true; - $i877 := $i878; - goto $bb531; -$bb528: - assume !(($i875 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 700, 20} true; - assume {:verifier.code 0} true; - $i876 := $sgt.i32($i871, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 700, 9} true; - assume {:verifier.code 0} true; - $i877 := $i872; - assume {:branchcond $i876} true; - goto $bb529, $bb530; -$bb529: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 700, 9} true; - assume {:verifier.code 0} true; - assume ($i876 == 1); - goto $bb527; -$bb530: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 700, 9} true; - assume {:verifier.code 0} true; - assume !(($i876 == 1)); - goto $bb531; -$bb531: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 703, 3} true; - assume {:verifier.code 0} true; - $i874 := $i877; - goto $bb525; -$bb532: - assume ($i888 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 711, 11} true; - assume {:verifier.code 0} true; - $i890 := $slt.i32($i886, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 711, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i890} true; - goto $bb535, $bb537; -$bb533: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 710, 7} true; - assume {:verifier.code 0} true; - assume !(($i888 == 1)); - goto $bb534; -$bb534: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 715, 7} true; - assume {:verifier.code 0} true; - $i894 := $sext.i32.i64($i882); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 715, 9} true; - assume {:verifier.code 0} true; - $i895 := $srem.i64($i894, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 715, 7} true; - assume {:verifier.code 0} true; - $i896 := $trunc.i64.i32($i895); - call {:cexpr "a"} boogie_si_record_i32($i896); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 716, 5} true; - assume {:verifier.code 0} true; - $i897 := $add.i32($i896, $i896); - call {:cexpr "a"} boogie_si_record_i32($i897); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 717, 7} true; - assume {:verifier.code 0} true; - $i898 := $sext.i32.i64($i886); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 717, 9} true; - assume {:verifier.code 0} true; - $i899 := $srem.i64($i898, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 717, 7} true; - assume {:verifier.code 0} true; - $i900 := $trunc.i64.i32($i899); - call {:cexpr "b"} boogie_si_record_i32($i900); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 718, 5} true; - assume {:verifier.code 0} true; - $i901 := $add.i32($i900, $i900); - call {:cexpr "b"} boogie_si_record_i32($i901); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 720, 5} true; - assume {:verifier.code 0} true; - $i902 := $add.i32($i889, $i889); - call {:cexpr "c"} boogie_si_record_i32($i902); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 721, 9} true; - assume {:verifier.code 0} true; - $i903 := $slt.i32($i897, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 721, 7} true; - assume {:verifier.code 0} true; - $i904 := $i902; - assume {:branchcond $i903} true; - goto $bb541, $bb542; -$bb535: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 711, 15} true; - assume {:verifier.code 0} true; - assume ($i890 == 1); - goto $bb536; -$bb536: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 712, 9} true; - assume {:verifier.code 0} true; - $i893 := $add.i32($i887, 1); - call {:cexpr "c"} boogie_si_record_i32($i893); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 713, 5} true; - assume {:verifier.code 0} true; - $i892 := $i893; - goto $bb540; -$bb537: - assume !(($i890 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 711, 20} true; - assume {:verifier.code 0} true; - $i891 := $sgt.i32($i886, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 711, 9} true; - assume {:verifier.code 0} true; - $i892 := $i887; - assume {:branchcond $i891} true; - goto $bb538, $bb539; -$bb538: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 711, 9} true; - assume {:verifier.code 0} true; - assume ($i891 == 1); - goto $bb536; -$bb539: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 711, 9} true; - assume {:verifier.code 0} true; - assume !(($i891 == 1)); - goto $bb540; -$bb540: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 714, 3} true; - assume {:verifier.code 0} true; - $i889 := $i892; - goto $bb534; -$bb541: - assume ($i903 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 722, 11} true; - assume {:verifier.code 0} true; - $i905 := $slt.i32($i901, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 722, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i905} true; - goto $bb544, $bb546; -$bb542: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 721, 7} true; - assume {:verifier.code 0} true; - assume !(($i903 == 1)); - goto $bb543; -$bb543: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 726, 7} true; - assume {:verifier.code 0} true; - $i909 := $sext.i32.i64($i897); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 726, 9} true; - assume {:verifier.code 0} true; - $i910 := $srem.i64($i909, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 726, 7} true; - assume {:verifier.code 0} true; - $i911 := $trunc.i64.i32($i910); - call {:cexpr "a"} boogie_si_record_i32($i911); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 727, 5} true; - assume {:verifier.code 0} true; - $i912 := $add.i32($i911, $i911); - call {:cexpr "a"} boogie_si_record_i32($i912); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 728, 7} true; - assume {:verifier.code 0} true; - $i913 := $sext.i32.i64($i901); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 728, 9} true; - assume {:verifier.code 0} true; - $i914 := $srem.i64($i913, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 728, 7} true; - assume {:verifier.code 0} true; - $i915 := $trunc.i64.i32($i914); - call {:cexpr "b"} boogie_si_record_i32($i915); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 729, 5} true; - assume {:verifier.code 0} true; - $i916 := $add.i32($i915, $i915); - call {:cexpr "b"} boogie_si_record_i32($i916); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 731, 5} true; - assume {:verifier.code 0} true; - $i917 := $add.i32($i904, $i904); - call {:cexpr "c"} boogie_si_record_i32($i917); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 732, 9} true; - assume {:verifier.code 0} true; - $i918 := $slt.i32($i912, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 732, 7} true; - assume {:verifier.code 0} true; - $i919 := $i917; - assume {:branchcond $i918} true; - goto $bb550, $bb551; -$bb544: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 722, 15} true; - assume {:verifier.code 0} true; - assume ($i905 == 1); - goto $bb545; -$bb545: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 723, 9} true; - assume {:verifier.code 0} true; - $i908 := $add.i32($i902, 1); - call {:cexpr "c"} boogie_si_record_i32($i908); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 724, 5} true; - assume {:verifier.code 0} true; - $i907 := $i908; - goto $bb549; -$bb546: - assume !(($i905 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 722, 20} true; - assume {:verifier.code 0} true; - $i906 := $sgt.i32($i901, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 722, 9} true; - assume {:verifier.code 0} true; - $i907 := $i902; - assume {:branchcond $i906} true; - goto $bb547, $bb548; -$bb547: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 722, 9} true; - assume {:verifier.code 0} true; - assume ($i906 == 1); - goto $bb545; -$bb548: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 722, 9} true; - assume {:verifier.code 0} true; - assume !(($i906 == 1)); - goto $bb549; -$bb549: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 725, 3} true; - assume {:verifier.code 0} true; - $i904 := $i907; - goto $bb543; -$bb550: - assume ($i918 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 733, 11} true; - assume {:verifier.code 0} true; - $i920 := $slt.i32($i916, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 733, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i920} true; - goto $bb553, $bb555; -$bb551: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 732, 7} true; - assume {:verifier.code 0} true; - assume !(($i918 == 1)); - goto $bb552; -$bb552: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 737, 7} true; - assume {:verifier.code 0} true; - $i924 := $sext.i32.i64($i912); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 737, 9} true; - assume {:verifier.code 0} true; - $i925 := $srem.i64($i924, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 737, 7} true; - assume {:verifier.code 0} true; - $i926 := $trunc.i64.i32($i925); - call {:cexpr "a"} boogie_si_record_i32($i926); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 738, 5} true; - assume {:verifier.code 0} true; - $i927 := $add.i32($i926, $i926); - call {:cexpr "a"} boogie_si_record_i32($i927); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 739, 7} true; - assume {:verifier.code 0} true; - $i928 := $sext.i32.i64($i916); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 739, 9} true; - assume {:verifier.code 0} true; - $i929 := $srem.i64($i928, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 739, 7} true; - assume {:verifier.code 0} true; - $i930 := $trunc.i64.i32($i929); - call {:cexpr "b"} boogie_si_record_i32($i930); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 740, 5} true; - assume {:verifier.code 0} true; - $i931 := $add.i32($i930, $i930); - call {:cexpr "b"} boogie_si_record_i32($i931); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 742, 5} true; - assume {:verifier.code 0} true; - $i932 := $add.i32($i919, $i919); - call {:cexpr "c"} boogie_si_record_i32($i932); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 743, 9} true; - assume {:verifier.code 0} true; - $i933 := $slt.i32($i927, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 743, 7} true; - assume {:verifier.code 0} true; - $i934 := $i932; - assume {:branchcond $i933} true; - goto $bb559, $bb560; -$bb553: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 733, 15} true; - assume {:verifier.code 0} true; - assume ($i920 == 1); - goto $bb554; -$bb554: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 734, 9} true; - assume {:verifier.code 0} true; - $i923 := $add.i32($i917, 1); - call {:cexpr "c"} boogie_si_record_i32($i923); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 735, 5} true; - assume {:verifier.code 0} true; - $i922 := $i923; - goto $bb558; -$bb555: - assume !(($i920 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 733, 20} true; - assume {:verifier.code 0} true; - $i921 := $sgt.i32($i916, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 733, 9} true; - assume {:verifier.code 0} true; - $i922 := $i917; - assume {:branchcond $i921} true; - goto $bb556, $bb557; -$bb556: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 733, 9} true; - assume {:verifier.code 0} true; - assume ($i921 == 1); - goto $bb554; -$bb557: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 733, 9} true; - assume {:verifier.code 0} true; - assume !(($i921 == 1)); - goto $bb558; -$bb558: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 736, 3} true; - assume {:verifier.code 0} true; - $i919 := $i922; - goto $bb552; -$bb559: - assume ($i933 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 744, 11} true; - assume {:verifier.code 0} true; - $i935 := $slt.i32($i931, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 744, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i935} true; - goto $bb562, $bb564; -$bb560: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 743, 7} true; - assume {:verifier.code 0} true; - assume !(($i933 == 1)); - goto $bb561; -$bb561: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 748, 7} true; - assume {:verifier.code 0} true; - $i939 := $sext.i32.i64($i927); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 748, 9} true; - assume {:verifier.code 0} true; - $i940 := $srem.i64($i939, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 748, 7} true; - assume {:verifier.code 0} true; - $i941 := $trunc.i64.i32($i940); - call {:cexpr "a"} boogie_si_record_i32($i941); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 749, 5} true; - assume {:verifier.code 0} true; - $i942 := $add.i32($i941, $i941); - call {:cexpr "a"} boogie_si_record_i32($i942); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 750, 7} true; - assume {:verifier.code 0} true; - $i943 := $sext.i32.i64($i931); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 750, 9} true; - assume {:verifier.code 0} true; - $i944 := $srem.i64($i943, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 750, 7} true; - assume {:verifier.code 0} true; - $i945 := $trunc.i64.i32($i944); - call {:cexpr "b"} boogie_si_record_i32($i945); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 751, 5} true; - assume {:verifier.code 0} true; - $i946 := $add.i32($i945, $i945); - call {:cexpr "b"} boogie_si_record_i32($i946); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 753, 5} true; - assume {:verifier.code 0} true; - $i947 := $add.i32($i934, $i934); - call {:cexpr "c"} boogie_si_record_i32($i947); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 754, 9} true; - assume {:verifier.code 0} true; - $i948 := $slt.i32($i942, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 754, 7} true; - assume {:verifier.code 0} true; - $i949 := $i947; - assume {:branchcond $i948} true; - goto $bb568, $bb569; -$bb562: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 744, 15} true; - assume {:verifier.code 0} true; - assume ($i935 == 1); - goto $bb563; -$bb563: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 745, 9} true; - assume {:verifier.code 0} true; - $i938 := $add.i32($i932, 1); - call {:cexpr "c"} boogie_si_record_i32($i938); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 746, 5} true; - assume {:verifier.code 0} true; - $i937 := $i938; - goto $bb567; -$bb564: - assume !(($i935 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 744, 20} true; - assume {:verifier.code 0} true; - $i936 := $sgt.i32($i931, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 744, 9} true; - assume {:verifier.code 0} true; - $i937 := $i932; - assume {:branchcond $i936} true; - goto $bb565, $bb566; -$bb565: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 744, 9} true; - assume {:verifier.code 0} true; - assume ($i936 == 1); - goto $bb563; -$bb566: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 744, 9} true; - assume {:verifier.code 0} true; - assume !(($i936 == 1)); - goto $bb567; -$bb567: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 747, 3} true; - assume {:verifier.code 0} true; - $i934 := $i937; - goto $bb561; -$bb568: - assume ($i948 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 755, 11} true; - assume {:verifier.code 0} true; - $i950 := $slt.i32($i946, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 755, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i950} true; - goto $bb571, $bb573; -$bb569: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 754, 7} true; - assume {:verifier.code 0} true; - assume !(($i948 == 1)); - goto $bb570; -$bb570: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 764, 3} true; - assume {:verifier.code 0} true; - $r := $i949; - $exn := false; - return; -$bb571: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 755, 15} true; - assume {:verifier.code 0} true; - assume ($i950 == 1); - goto $bb572; -$bb572: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 756, 9} true; - assume {:verifier.code 0} true; - $i953 := $add.i32($i947, 1); - call {:cexpr "c"} boogie_si_record_i32($i953); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 757, 5} true; - assume {:verifier.code 0} true; - $i952 := $i953; - goto $bb576; -$bb573: - assume !(($i950 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 755, 20} true; - assume {:verifier.code 0} true; - $i951 := $sgt.i32($i946, 2147483647); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 755, 9} true; - assume {:verifier.code 0} true; - $i952 := $i947; - assume {:branchcond $i951} true; - goto $bb574, $bb575; -$bb574: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 755, 9} true; - assume {:verifier.code 0} true; - assume ($i951 == 1); - goto $bb572; -$bb575: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 755, 9} true; - assume {:verifier.code 0} true; - assume !(($i951 == 1)); - goto $bb576; -$bb576: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 758, 3} true; - assume {:verifier.code 0} true; - $i949 := $i952; - goto $bb570; -} -const __SMACK_and64: ref; -axiom (__SMACK_and64 == $sub.ref(0, 24855)); -procedure __SMACK_and64($i0: i64, $i1: i64) - returns ($r: i64) -{ - var $i2: i32; - var $i3: i32; - var $i4: i32; - var $i5: i64; -$bb0: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 767, 65} true; - assume {:verifier.code 1} true; - call {:cexpr "__SMACK_and64:arg:a"} boogie_si_record_i64($i0); - call {:cexpr "__SMACK_and64:arg:b"} boogie_si_record_i64($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 767, 65} true; - assume {:verifier.code 1} true; - $i2 := $trunc.i64.i32($i0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 767, 68} true; - assume {:verifier.code 1} true; - $i3 := $trunc.i64.i32($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 767, 51} true; - assume {:verifier.code 1} true; - call $i4 := __SMACK_and32($i2, $i3); - call {:cexpr "smack:ext:__SMACK_and32"} boogie_si_record_i32($i4); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 767, 45} true; - assume {:verifier.code 0} true; - $i5 := $sext.i32.i64($i4); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 767, 38} true; - assume {:verifier.code 0} true; - $r := $i5; - $exn := false; - return; -} -const __SMACK_and16: ref; -axiom (__SMACK_and16 == $sub.ref(0, 25887)); -procedure __SMACK_and16($i0: i16, $i1: i16) - returns ($r: i16) -{ - var $i2: i32; - var $i3: i32; - var $i4: i32; - var $i5: i16; - var $i6: i32; - var $i7: i1; - var $i9: i32; - var $i10: i1; - var $i11: i32; - var $i12: i1; - var $i14: i32; - var $i15: i32; - var $i16: i16; - var $i13: i16; - var $i8: i16; - var $i17: i32; - var $i18: i32; - var $i19: i16; - var $i20: i32; - var $i21: i32; - var $i22: i32; - var $i23: i16; - var $i24: i32; - var $i25: i32; - var $i26: i16; - var $i27: i32; - var $i28: i32; - var $i29: i32; - var $i30: i16; - var $i31: i32; - var $i32: i32; - var $i33: i32; - var $i34: i16; - var $i35: i32; - var $i36: i1; - var $i38: i32; - var $i39: i1; - var $i40: i32; - var $i41: i1; - var $i43: i32; - var $i44: i32; - var $i45: i16; - var $i42: i16; - var $i37: i16; - var $i46: i32; - var $i47: i32; - var $i48: i16; - var $i49: i32; - var $i50: i32; - var $i51: i32; - var $i52: i16; - var $i53: i32; - var $i54: i32; - var $i55: i16; - var $i56: i32; - var $i57: i32; - var $i58: i32; - var $i59: i16; - var $i60: i32; - var $i61: i32; - var $i62: i32; - var $i63: i16; - var $i64: i32; - var $i65: i1; - var $i67: i32; - var $i68: i1; - var $i69: i32; - var $i70: i1; - var $i72: i32; - var $i73: i32; - var $i74: i16; - var $i71: i16; - var $i66: i16; - var $i75: i32; - var $i76: i32; - var $i77: i16; - var $i78: i32; - var $i79: i32; - var $i80: i32; - var $i81: i16; - var $i82: i32; - var $i83: i32; - var $i84: i16; - var $i85: i32; - var $i86: i32; - var $i87: i32; - var $i88: i16; - var $i89: i32; - var $i90: i32; - var $i91: i32; - var $i92: i16; - var $i93: i32; - var $i94: i1; - var $i96: i32; - var $i97: i1; - var $i98: i32; - var $i99: i1; - var $i101: i32; - var $i102: i32; - var $i103: i16; - var $i100: i16; - var $i95: i16; - var $i104: i32; - var $i105: i32; - var $i106: i16; - var $i107: i32; - var $i108: i32; - var $i109: i32; - var $i110: i16; - var $i111: i32; - var $i112: i32; - var $i113: i16; - var $i114: i32; - var $i115: i32; - var $i116: i32; - var $i117: i16; - var $i118: i32; - var $i119: i32; - var $i120: i32; - var $i121: i16; - var $i122: i32; - var $i123: i1; - var $i125: i32; - var $i126: i1; - var $i127: i32; - var $i128: i1; - var $i130: i32; - var $i131: i32; - var $i132: i16; - var $i129: i16; - var $i124: i16; - var $i133: i32; - var $i134: i32; - var $i135: i16; - var $i136: i32; - var $i137: i32; - var $i138: i32; - var $i139: i16; - var $i140: i32; - var $i141: i32; - var $i142: i16; - var $i143: i32; - var $i144: i32; - var $i145: i32; - var $i146: i16; - var $i147: i32; - var $i148: i32; - var $i149: i32; - var $i150: i16; - var $i151: i32; - var $i152: i1; - var $i154: i32; - var $i155: i1; - var $i156: i32; - var $i157: i1; - var $i159: i32; - var $i160: i32; - var $i161: i16; - var $i158: i16; - var $i153: i16; - var $i162: i32; - var $i163: i32; - var $i164: i16; - var $i165: i32; - var $i166: i32; - var $i167: i32; - var $i168: i16; - var $i169: i32; - var $i170: i32; - var $i171: i16; - var $i172: i32; - var $i173: i32; - var $i174: i32; - var $i175: i16; - var $i176: i32; - var $i177: i32; - var $i178: i32; - var $i179: i16; - var $i180: i32; - var $i181: i1; - var $i183: i32; - var $i184: i1; - var $i185: i32; - var $i186: i1; - var $i188: i32; - var $i189: i32; - var $i190: i16; - var $i187: i16; - var $i182: i16; - var $i191: i32; - var $i192: i32; - var $i193: i16; - var $i194: i32; - var $i195: i32; - var $i196: i32; - var $i197: i16; - var $i198: i32; - var $i199: i32; - var $i200: i16; - var $i201: i32; - var $i202: i32; - var $i203: i32; - var $i204: i16; - var $i205: i32; - var $i206: i32; - var $i207: i32; - var $i208: i16; - var $i209: i32; - var $i210: i1; - var $i212: i32; - var $i213: i1; - var $i214: i32; - var $i215: i1; - var $i217: i32; - var $i218: i32; - var $i219: i16; - var $i216: i16; - var $i211: i16; - var $i220: i32; - var $i221: i32; - var $i222: i16; - var $i223: i32; - var $i224: i32; - var $i225: i32; - var $i226: i16; - var $i227: i32; - var $i228: i32; - var $i229: i16; - var $i230: i32; - var $i231: i32; - var $i232: i32; - var $i233: i16; - var $i234: i32; - var $i235: i32; - var $i236: i32; - var $i237: i16; - var $i238: i32; - var $i239: i1; - var $i241: i32; - var $i242: i1; - var $i243: i32; - var $i244: i1; - var $i246: i32; - var $i247: i32; - var $i248: i16; - var $i245: i16; - var $i240: i16; - var $i249: i32; - var $i250: i32; - var $i251: i16; - var $i252: i32; - var $i253: i32; - var $i254: i32; - var $i255: i16; - var $i256: i32; - var $i257: i32; - var $i258: i16; - var $i259: i32; - var $i260: i32; - var $i261: i32; - var $i262: i16; - var $i263: i32; - var $i264: i32; - var $i265: i32; - var $i266: i16; - var $i267: i32; - var $i268: i1; - var $i270: i32; - var $i271: i1; - var $i272: i32; - var $i273: i1; - var $i275: i32; - var $i276: i32; - var $i277: i16; - var $i274: i16; - var $i269: i16; - var $i278: i32; - var $i279: i32; - var $i280: i16; - var $i281: i32; - var $i282: i32; - var $i283: i32; - var $i284: i16; - var $i285: i32; - var $i286: i32; - var $i287: i16; - var $i288: i32; - var $i289: i32; - var $i290: i32; - var $i291: i16; - var $i292: i32; - var $i293: i32; - var $i294: i32; - var $i295: i16; - var $i296: i32; - var $i297: i1; - var $i299: i32; - var $i300: i1; - var $i301: i32; - var $i302: i1; - var $i304: i32; - var $i305: i32; - var $i306: i16; - var $i303: i16; - var $i298: i16; - var $i307: i32; - var $i308: i32; - var $i309: i16; - var $i310: i32; - var $i311: i32; - var $i312: i32; - var $i313: i16; - var $i314: i32; - var $i315: i32; - var $i316: i16; - var $i317: i32; - var $i318: i32; - var $i319: i32; - var $i320: i16; - var $i321: i32; - var $i322: i32; - var $i323: i32; - var $i324: i16; - var $i325: i32; - var $i326: i1; - var $i328: i32; - var $i329: i1; - var $i330: i32; - var $i331: i1; - var $i333: i32; - var $i334: i32; - var $i335: i16; - var $i332: i16; - var $i327: i16; - var $i336: i32; - var $i337: i32; - var $i338: i16; - var $i339: i32; - var $i340: i32; - var $i341: i32; - var $i342: i16; - var $i343: i32; - var $i344: i32; - var $i345: i16; - var $i346: i32; - var $i347: i32; - var $i348: i32; - var $i349: i16; - var $i350: i32; - var $i351: i32; - var $i352: i32; - var $i353: i16; - var $i354: i32; - var $i355: i1; - var $i357: i32; - var $i358: i1; - var $i359: i32; - var $i360: i1; - var $i362: i32; - var $i363: i32; - var $i364: i16; - var $i361: i16; - var $i356: i16; - var $i365: i32; - var $i366: i32; - var $i367: i16; - var $i368: i32; - var $i369: i32; - var $i370: i32; - var $i371: i16; - var $i372: i32; - var $i373: i32; - var $i374: i16; - var $i375: i32; - var $i376: i32; - var $i377: i32; - var $i378: i16; - var $i379: i32; - var $i380: i32; - var $i381: i32; - var $i382: i16; - var $i383: i32; - var $i384: i1; - var $i386: i32; - var $i387: i1; - var $i388: i32; - var $i389: i1; - var $i391: i32; - var $i392: i32; - var $i393: i16; - var $i390: i16; - var $i385: i16; - var $i394: i32; - var $i395: i32; - var $i396: i16; - var $i397: i32; - var $i398: i32; - var $i399: i32; - var $i400: i16; - var $i401: i32; - var $i402: i32; - var $i403: i16; - var $i404: i32; - var $i405: i32; - var $i406: i32; - var $i407: i16; - var $i408: i32; - var $i409: i32; - var $i410: i32; - var $i411: i16; - var $i412: i32; - var $i413: i1; - var $i415: i32; - var $i416: i1; - var $i417: i32; - var $i418: i1; - var $i420: i32; - var $i421: i32; - var $i422: i16; - var $i419: i16; - var $i414: i16; - var $i423: i32; - var $i424: i32; - var $i425: i16; - var $i426: i32; - var $i427: i32; - var $i428: i32; - var $i429: i16; - var $i430: i32; - var $i431: i32; - var $i432: i16; - var $i433: i32; - var $i434: i32; - var $i435: i32; - var $i436: i16; - var $i437: i32; - var $i438: i32; - var $i439: i32; - var $i440: i16; - var $i441: i32; - var $i442: i1; - var $i444: i32; - var $i445: i1; - var $i446: i32; - var $i447: i1; - var $i449: i32; - var $i450: i32; - var $i451: i16; - var $i448: i16; - var $i443: i16; -$bb0: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 772, 8} true; - assume {:verifier.code 0} true; - call {:cexpr "__SMACK_and16:arg:a"} boogie_si_record_i16($i0); - call {:cexpr "__SMACK_and16:arg:b"} boogie_si_record_i16($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 772, 8} true; - assume {:verifier.code 0} true; - $i2 := $sext.i16.i32(0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 772, 5} true; - assume {:verifier.code 0} true; - $i3 := $sext.i16.i32(0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 772, 5} true; - assume {:verifier.code 0} true; - $i4 := $add.i32($i3, $i2); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 772, 5} true; - assume {:verifier.code 0} true; - $i5 := $trunc.i32.i16($i4); - call {:cexpr "c"} boogie_si_record_i16($i5); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 773, 7} true; - assume {:verifier.code 0} true; - $i6 := $sext.i16.i32($i0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 773, 9} true; - assume {:verifier.code 0} true; - $i7 := $slt.i32($i6, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 773, 7} true; - assume {:verifier.code 0} true; - $i8 := $i5; - assume {:branchcond $i7} true; - goto $bb1, $bb2; -$bb1: - assume ($i7 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 774, 9} true; - assume {:verifier.code 0} true; - $i9 := $sext.i16.i32($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 774, 11} true; - assume {:verifier.code 0} true; - $i10 := $slt.i32($i9, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 774, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i10} true; - goto $bb4, $bb6; -$bb2: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 773, 7} true; - assume {:verifier.code 0} true; - assume !(($i7 == 1)); - goto $bb3; -$bb3: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 778, 7} true; - assume {:verifier.code 0} true; - $i17 := $sext.i16.i32($i0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 778, 9} true; - assume {:verifier.code 0} true; - $i18 := $srem.i32($i17, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 778, 7} true; - assume {:verifier.code 0} true; - $i19 := $trunc.i32.i16($i18); - call {:cexpr "a"} boogie_si_record_i16($i19); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 779, 8} true; - assume {:verifier.code 0} true; - $i20 := $sext.i16.i32($i19); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 779, 5} true; - assume {:verifier.code 0} true; - $i21 := $sext.i16.i32($i19); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 779, 5} true; - assume {:verifier.code 0} true; - $i22 := $add.i32($i21, $i20); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 779, 5} true; - assume {:verifier.code 0} true; - $i23 := $trunc.i32.i16($i22); - call {:cexpr "a"} boogie_si_record_i16($i23); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 780, 7} true; - assume {:verifier.code 0} true; - $i24 := $sext.i16.i32($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 780, 9} true; - assume {:verifier.code 0} true; - $i25 := $srem.i32($i24, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 780, 7} true; - assume {:verifier.code 0} true; - $i26 := $trunc.i32.i16($i25); - call {:cexpr "b"} boogie_si_record_i16($i26); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 781, 8} true; - assume {:verifier.code 0} true; - $i27 := $sext.i16.i32($i26); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 781, 5} true; - assume {:verifier.code 0} true; - $i28 := $sext.i16.i32($i26); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 781, 5} true; - assume {:verifier.code 0} true; - $i29 := $add.i32($i28, $i27); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 781, 5} true; - assume {:verifier.code 0} true; - $i30 := $trunc.i32.i16($i29); - call {:cexpr "b"} boogie_si_record_i16($i30); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 783, 8} true; - assume {:verifier.code 0} true; - $i31 := $sext.i16.i32($i8); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 783, 5} true; - assume {:verifier.code 0} true; - $i32 := $sext.i16.i32($i8); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 783, 5} true; - assume {:verifier.code 0} true; - $i33 := $add.i32($i32, $i31); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 783, 5} true; - assume {:verifier.code 0} true; - $i34 := $trunc.i32.i16($i33); - call {:cexpr "c"} boogie_si_record_i16($i34); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 784, 7} true; - assume {:verifier.code 0} true; - $i35 := $sext.i16.i32($i23); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 784, 9} true; - assume {:verifier.code 0} true; - $i36 := $slt.i32($i35, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 784, 7} true; - assume {:verifier.code 0} true; - $i37 := $i34; - assume {:branchcond $i36} true; - goto $bb10, $bb11; -$bb4: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 774, 15} true; - assume {:verifier.code 0} true; - assume ($i10 == 1); - goto $bb5; -$bb5: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 775, 9} true; - assume {:verifier.code 0} true; - $i14 := $sext.i16.i32($i5); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 775, 9} true; - assume {:verifier.code 0} true; - $i15 := $add.i32($i14, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 775, 9} true; - assume {:verifier.code 0} true; - $i16 := $trunc.i32.i16($i15); - call {:cexpr "c"} boogie_si_record_i16($i16); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 776, 5} true; - assume {:verifier.code 0} true; - $i13 := $i16; - goto $bb9; -$bb6: - assume !(($i10 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 774, 18} true; - assume {:verifier.code 0} true; - $i11 := $sext.i16.i32($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 774, 20} true; - assume {:verifier.code 0} true; - $i12 := $sgt.i32($i11, 32767); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 774, 9} true; - assume {:verifier.code 0} true; - $i13 := $i5; - assume {:branchcond $i12} true; - goto $bb7, $bb8; -$bb7: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 774, 9} true; - assume {:verifier.code 0} true; - assume ($i12 == 1); - goto $bb5; -$bb8: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 774, 9} true; - assume {:verifier.code 0} true; - assume !(($i12 == 1)); - goto $bb9; -$bb9: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 777, 3} true; - assume {:verifier.code 0} true; - $i8 := $i13; - goto $bb3; -$bb10: - assume ($i36 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 785, 9} true; - assume {:verifier.code 0} true; - $i38 := $sext.i16.i32($i30); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 785, 11} true; - assume {:verifier.code 0} true; - $i39 := $slt.i32($i38, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 785, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i39} true; - goto $bb13, $bb15; -$bb11: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 784, 7} true; - assume {:verifier.code 0} true; - assume !(($i36 == 1)); - goto $bb12; -$bb12: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 789, 7} true; - assume {:verifier.code 0} true; - $i46 := $sext.i16.i32($i23); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 789, 9} true; - assume {:verifier.code 0} true; - $i47 := $srem.i32($i46, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 789, 7} true; - assume {:verifier.code 0} true; - $i48 := $trunc.i32.i16($i47); - call {:cexpr "a"} boogie_si_record_i16($i48); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 790, 8} true; - assume {:verifier.code 0} true; - $i49 := $sext.i16.i32($i48); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 790, 5} true; - assume {:verifier.code 0} true; - $i50 := $sext.i16.i32($i48); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 790, 5} true; - assume {:verifier.code 0} true; - $i51 := $add.i32($i50, $i49); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 790, 5} true; - assume {:verifier.code 0} true; - $i52 := $trunc.i32.i16($i51); - call {:cexpr "a"} boogie_si_record_i16($i52); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 791, 7} true; - assume {:verifier.code 0} true; - $i53 := $sext.i16.i32($i30); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 791, 9} true; - assume {:verifier.code 0} true; - $i54 := $srem.i32($i53, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 791, 7} true; - assume {:verifier.code 0} true; - $i55 := $trunc.i32.i16($i54); - call {:cexpr "b"} boogie_si_record_i16($i55); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 792, 8} true; - assume {:verifier.code 0} true; - $i56 := $sext.i16.i32($i55); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 792, 5} true; - assume {:verifier.code 0} true; - $i57 := $sext.i16.i32($i55); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 792, 5} true; - assume {:verifier.code 0} true; - $i58 := $add.i32($i57, $i56); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 792, 5} true; - assume {:verifier.code 0} true; - $i59 := $trunc.i32.i16($i58); - call {:cexpr "b"} boogie_si_record_i16($i59); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 794, 8} true; - assume {:verifier.code 0} true; - $i60 := $sext.i16.i32($i37); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 794, 5} true; - assume {:verifier.code 0} true; - $i61 := $sext.i16.i32($i37); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 794, 5} true; - assume {:verifier.code 0} true; - $i62 := $add.i32($i61, $i60); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 794, 5} true; - assume {:verifier.code 0} true; - $i63 := $trunc.i32.i16($i62); - call {:cexpr "c"} boogie_si_record_i16($i63); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 795, 7} true; - assume {:verifier.code 0} true; - $i64 := $sext.i16.i32($i52); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 795, 9} true; - assume {:verifier.code 0} true; - $i65 := $slt.i32($i64, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 795, 7} true; - assume {:verifier.code 0} true; - $i66 := $i63; - assume {:branchcond $i65} true; - goto $bb19, $bb20; -$bb13: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 785, 15} true; - assume {:verifier.code 0} true; - assume ($i39 == 1); - goto $bb14; -$bb14: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 786, 9} true; - assume {:verifier.code 0} true; - $i43 := $sext.i16.i32($i34); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 786, 9} true; - assume {:verifier.code 0} true; - $i44 := $add.i32($i43, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 786, 9} true; - assume {:verifier.code 0} true; - $i45 := $trunc.i32.i16($i44); - call {:cexpr "c"} boogie_si_record_i16($i45); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 787, 5} true; - assume {:verifier.code 0} true; - $i42 := $i45; - goto $bb18; -$bb15: - assume !(($i39 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 785, 18} true; - assume {:verifier.code 0} true; - $i40 := $sext.i16.i32($i30); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 785, 20} true; - assume {:verifier.code 0} true; - $i41 := $sgt.i32($i40, 32767); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 785, 9} true; - assume {:verifier.code 0} true; - $i42 := $i34; - assume {:branchcond $i41} true; - goto $bb16, $bb17; -$bb16: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 785, 9} true; - assume {:verifier.code 0} true; - assume ($i41 == 1); - goto $bb14; -$bb17: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 785, 9} true; - assume {:verifier.code 0} true; - assume !(($i41 == 1)); - goto $bb18; -$bb18: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 788, 3} true; - assume {:verifier.code 0} true; - $i37 := $i42; - goto $bb12; -$bb19: - assume ($i65 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 796, 9} true; - assume {:verifier.code 0} true; - $i67 := $sext.i16.i32($i59); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 796, 11} true; - assume {:verifier.code 0} true; - $i68 := $slt.i32($i67, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 796, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i68} true; - goto $bb22, $bb24; -$bb20: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 795, 7} true; - assume {:verifier.code 0} true; - assume !(($i65 == 1)); - goto $bb21; -$bb21: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 800, 7} true; - assume {:verifier.code 0} true; - $i75 := $sext.i16.i32($i52); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 800, 9} true; - assume {:verifier.code 0} true; - $i76 := $srem.i32($i75, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 800, 7} true; - assume {:verifier.code 0} true; - $i77 := $trunc.i32.i16($i76); - call {:cexpr "a"} boogie_si_record_i16($i77); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 801, 8} true; - assume {:verifier.code 0} true; - $i78 := $sext.i16.i32($i77); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 801, 5} true; - assume {:verifier.code 0} true; - $i79 := $sext.i16.i32($i77); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 801, 5} true; - assume {:verifier.code 0} true; - $i80 := $add.i32($i79, $i78); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 801, 5} true; - assume {:verifier.code 0} true; - $i81 := $trunc.i32.i16($i80); - call {:cexpr "a"} boogie_si_record_i16($i81); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 802, 7} true; - assume {:verifier.code 0} true; - $i82 := $sext.i16.i32($i59); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 802, 9} true; - assume {:verifier.code 0} true; - $i83 := $srem.i32($i82, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 802, 7} true; - assume {:verifier.code 0} true; - $i84 := $trunc.i32.i16($i83); - call {:cexpr "b"} boogie_si_record_i16($i84); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 803, 8} true; - assume {:verifier.code 0} true; - $i85 := $sext.i16.i32($i84); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 803, 5} true; - assume {:verifier.code 0} true; - $i86 := $sext.i16.i32($i84); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 803, 5} true; - assume {:verifier.code 0} true; - $i87 := $add.i32($i86, $i85); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 803, 5} true; - assume {:verifier.code 0} true; - $i88 := $trunc.i32.i16($i87); - call {:cexpr "b"} boogie_si_record_i16($i88); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 805, 8} true; - assume {:verifier.code 0} true; - $i89 := $sext.i16.i32($i66); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 805, 5} true; - assume {:verifier.code 0} true; - $i90 := $sext.i16.i32($i66); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 805, 5} true; - assume {:verifier.code 0} true; - $i91 := $add.i32($i90, $i89); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 805, 5} true; - assume {:verifier.code 0} true; - $i92 := $trunc.i32.i16($i91); - call {:cexpr "c"} boogie_si_record_i16($i92); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 806, 7} true; - assume {:verifier.code 0} true; - $i93 := $sext.i16.i32($i81); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 806, 9} true; - assume {:verifier.code 0} true; - $i94 := $slt.i32($i93, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 806, 7} true; - assume {:verifier.code 0} true; - $i95 := $i92; - assume {:branchcond $i94} true; - goto $bb28, $bb29; -$bb22: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 796, 15} true; - assume {:verifier.code 0} true; - assume ($i68 == 1); - goto $bb23; -$bb23: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 797, 9} true; - assume {:verifier.code 0} true; - $i72 := $sext.i16.i32($i63); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 797, 9} true; - assume {:verifier.code 0} true; - $i73 := $add.i32($i72, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 797, 9} true; - assume {:verifier.code 0} true; - $i74 := $trunc.i32.i16($i73); - call {:cexpr "c"} boogie_si_record_i16($i74); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 798, 5} true; - assume {:verifier.code 0} true; - $i71 := $i74; - goto $bb27; -$bb24: - assume !(($i68 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 796, 18} true; - assume {:verifier.code 0} true; - $i69 := $sext.i16.i32($i59); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 796, 20} true; - assume {:verifier.code 0} true; - $i70 := $sgt.i32($i69, 32767); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 796, 9} true; - assume {:verifier.code 0} true; - $i71 := $i63; - assume {:branchcond $i70} true; - goto $bb25, $bb26; -$bb25: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 796, 9} true; - assume {:verifier.code 0} true; - assume ($i70 == 1); - goto $bb23; -$bb26: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 796, 9} true; - assume {:verifier.code 0} true; - assume !(($i70 == 1)); - goto $bb27; -$bb27: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 799, 3} true; - assume {:verifier.code 0} true; - $i66 := $i71; - goto $bb21; -$bb28: - assume ($i94 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 807, 9} true; - assume {:verifier.code 0} true; - $i96 := $sext.i16.i32($i88); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 807, 11} true; - assume {:verifier.code 0} true; - $i97 := $slt.i32($i96, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 807, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i97} true; - goto $bb31, $bb33; -$bb29: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 806, 7} true; - assume {:verifier.code 0} true; - assume !(($i94 == 1)); - goto $bb30; -$bb30: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 811, 7} true; - assume {:verifier.code 0} true; - $i104 := $sext.i16.i32($i81); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 811, 9} true; - assume {:verifier.code 0} true; - $i105 := $srem.i32($i104, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 811, 7} true; - assume {:verifier.code 0} true; - $i106 := $trunc.i32.i16($i105); - call {:cexpr "a"} boogie_si_record_i16($i106); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 812, 8} true; - assume {:verifier.code 0} true; - $i107 := $sext.i16.i32($i106); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 812, 5} true; - assume {:verifier.code 0} true; - $i108 := $sext.i16.i32($i106); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 812, 5} true; - assume {:verifier.code 0} true; - $i109 := $add.i32($i108, $i107); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 812, 5} true; - assume {:verifier.code 0} true; - $i110 := $trunc.i32.i16($i109); - call {:cexpr "a"} boogie_si_record_i16($i110); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 813, 7} true; - assume {:verifier.code 0} true; - $i111 := $sext.i16.i32($i88); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 813, 9} true; - assume {:verifier.code 0} true; - $i112 := $srem.i32($i111, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 813, 7} true; - assume {:verifier.code 0} true; - $i113 := $trunc.i32.i16($i112); - call {:cexpr "b"} boogie_si_record_i16($i113); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 814, 8} true; - assume {:verifier.code 0} true; - $i114 := $sext.i16.i32($i113); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 814, 5} true; - assume {:verifier.code 0} true; - $i115 := $sext.i16.i32($i113); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 814, 5} true; - assume {:verifier.code 0} true; - $i116 := $add.i32($i115, $i114); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 814, 5} true; - assume {:verifier.code 0} true; - $i117 := $trunc.i32.i16($i116); - call {:cexpr "b"} boogie_si_record_i16($i117); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 816, 8} true; - assume {:verifier.code 0} true; - $i118 := $sext.i16.i32($i95); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 816, 5} true; - assume {:verifier.code 0} true; - $i119 := $sext.i16.i32($i95); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 816, 5} true; - assume {:verifier.code 0} true; - $i120 := $add.i32($i119, $i118); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 816, 5} true; - assume {:verifier.code 0} true; - $i121 := $trunc.i32.i16($i120); - call {:cexpr "c"} boogie_si_record_i16($i121); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 817, 7} true; - assume {:verifier.code 0} true; - $i122 := $sext.i16.i32($i110); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 817, 9} true; - assume {:verifier.code 0} true; - $i123 := $slt.i32($i122, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 817, 7} true; - assume {:verifier.code 0} true; - $i124 := $i121; - assume {:branchcond $i123} true; - goto $bb37, $bb38; -$bb31: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 807, 15} true; - assume {:verifier.code 0} true; - assume ($i97 == 1); - goto $bb32; -$bb32: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 808, 9} true; - assume {:verifier.code 0} true; - $i101 := $sext.i16.i32($i92); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 808, 9} true; - assume {:verifier.code 0} true; - $i102 := $add.i32($i101, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 808, 9} true; - assume {:verifier.code 0} true; - $i103 := $trunc.i32.i16($i102); - call {:cexpr "c"} boogie_si_record_i16($i103); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 809, 5} true; - assume {:verifier.code 0} true; - $i100 := $i103; - goto $bb36; -$bb33: - assume !(($i97 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 807, 18} true; - assume {:verifier.code 0} true; - $i98 := $sext.i16.i32($i88); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 807, 20} true; - assume {:verifier.code 0} true; - $i99 := $sgt.i32($i98, 32767); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 807, 9} true; - assume {:verifier.code 0} true; - $i100 := $i92; - assume {:branchcond $i99} true; - goto $bb34, $bb35; -$bb34: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 807, 9} true; - assume {:verifier.code 0} true; - assume ($i99 == 1); - goto $bb32; -$bb35: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 807, 9} true; - assume {:verifier.code 0} true; - assume !(($i99 == 1)); - goto $bb36; -$bb36: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 810, 3} true; - assume {:verifier.code 0} true; - $i95 := $i100; - goto $bb30; -$bb37: - assume ($i123 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 818, 9} true; - assume {:verifier.code 0} true; - $i125 := $sext.i16.i32($i117); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 818, 11} true; - assume {:verifier.code 0} true; - $i126 := $slt.i32($i125, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 818, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i126} true; - goto $bb40, $bb42; -$bb38: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 817, 7} true; - assume {:verifier.code 0} true; - assume !(($i123 == 1)); - goto $bb39; -$bb39: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 822, 7} true; - assume {:verifier.code 0} true; - $i133 := $sext.i16.i32($i110); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 822, 9} true; - assume {:verifier.code 0} true; - $i134 := $srem.i32($i133, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 822, 7} true; - assume {:verifier.code 0} true; - $i135 := $trunc.i32.i16($i134); - call {:cexpr "a"} boogie_si_record_i16($i135); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 823, 8} true; - assume {:verifier.code 0} true; - $i136 := $sext.i16.i32($i135); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 823, 5} true; - assume {:verifier.code 0} true; - $i137 := $sext.i16.i32($i135); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 823, 5} true; - assume {:verifier.code 0} true; - $i138 := $add.i32($i137, $i136); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 823, 5} true; - assume {:verifier.code 0} true; - $i139 := $trunc.i32.i16($i138); - call {:cexpr "a"} boogie_si_record_i16($i139); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 824, 7} true; - assume {:verifier.code 0} true; - $i140 := $sext.i16.i32($i117); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 824, 9} true; - assume {:verifier.code 0} true; - $i141 := $srem.i32($i140, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 824, 7} true; - assume {:verifier.code 0} true; - $i142 := $trunc.i32.i16($i141); - call {:cexpr "b"} boogie_si_record_i16($i142); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 825, 8} true; - assume {:verifier.code 0} true; - $i143 := $sext.i16.i32($i142); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 825, 5} true; - assume {:verifier.code 0} true; - $i144 := $sext.i16.i32($i142); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 825, 5} true; - assume {:verifier.code 0} true; - $i145 := $add.i32($i144, $i143); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 825, 5} true; - assume {:verifier.code 0} true; - $i146 := $trunc.i32.i16($i145); - call {:cexpr "b"} boogie_si_record_i16($i146); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 827, 8} true; - assume {:verifier.code 0} true; - $i147 := $sext.i16.i32($i124); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 827, 5} true; - assume {:verifier.code 0} true; - $i148 := $sext.i16.i32($i124); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 827, 5} true; - assume {:verifier.code 0} true; - $i149 := $add.i32($i148, $i147); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 827, 5} true; - assume {:verifier.code 0} true; - $i150 := $trunc.i32.i16($i149); - call {:cexpr "c"} boogie_si_record_i16($i150); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 828, 7} true; - assume {:verifier.code 0} true; - $i151 := $sext.i16.i32($i139); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 828, 9} true; - assume {:verifier.code 0} true; - $i152 := $slt.i32($i151, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 828, 7} true; - assume {:verifier.code 0} true; - $i153 := $i150; - assume {:branchcond $i152} true; - goto $bb46, $bb47; -$bb40: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 818, 15} true; - assume {:verifier.code 0} true; - assume ($i126 == 1); - goto $bb41; -$bb41: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 819, 9} true; - assume {:verifier.code 0} true; - $i130 := $sext.i16.i32($i121); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 819, 9} true; - assume {:verifier.code 0} true; - $i131 := $add.i32($i130, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 819, 9} true; - assume {:verifier.code 0} true; - $i132 := $trunc.i32.i16($i131); - call {:cexpr "c"} boogie_si_record_i16($i132); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 820, 5} true; - assume {:verifier.code 0} true; - $i129 := $i132; - goto $bb45; -$bb42: - assume !(($i126 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 818, 18} true; - assume {:verifier.code 0} true; - $i127 := $sext.i16.i32($i117); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 818, 20} true; - assume {:verifier.code 0} true; - $i128 := $sgt.i32($i127, 32767); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 818, 9} true; - assume {:verifier.code 0} true; - $i129 := $i121; - assume {:branchcond $i128} true; - goto $bb43, $bb44; -$bb43: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 818, 9} true; - assume {:verifier.code 0} true; - assume ($i128 == 1); - goto $bb41; -$bb44: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 818, 9} true; - assume {:verifier.code 0} true; - assume !(($i128 == 1)); - goto $bb45; -$bb45: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 821, 3} true; - assume {:verifier.code 0} true; - $i124 := $i129; - goto $bb39; -$bb46: - assume ($i152 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 829, 9} true; - assume {:verifier.code 0} true; - $i154 := $sext.i16.i32($i146); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 829, 11} true; - assume {:verifier.code 0} true; - $i155 := $slt.i32($i154, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 829, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i155} true; - goto $bb49, $bb51; -$bb47: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 828, 7} true; - assume {:verifier.code 0} true; - assume !(($i152 == 1)); - goto $bb48; -$bb48: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 833, 7} true; - assume {:verifier.code 0} true; - $i162 := $sext.i16.i32($i139); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 833, 9} true; - assume {:verifier.code 0} true; - $i163 := $srem.i32($i162, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 833, 7} true; - assume {:verifier.code 0} true; - $i164 := $trunc.i32.i16($i163); - call {:cexpr "a"} boogie_si_record_i16($i164); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 834, 8} true; - assume {:verifier.code 0} true; - $i165 := $sext.i16.i32($i164); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 834, 5} true; - assume {:verifier.code 0} true; - $i166 := $sext.i16.i32($i164); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 834, 5} true; - assume {:verifier.code 0} true; - $i167 := $add.i32($i166, $i165); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 834, 5} true; - assume {:verifier.code 0} true; - $i168 := $trunc.i32.i16($i167); - call {:cexpr "a"} boogie_si_record_i16($i168); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 835, 7} true; - assume {:verifier.code 0} true; - $i169 := $sext.i16.i32($i146); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 835, 9} true; - assume {:verifier.code 0} true; - $i170 := $srem.i32($i169, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 835, 7} true; - assume {:verifier.code 0} true; - $i171 := $trunc.i32.i16($i170); - call {:cexpr "b"} boogie_si_record_i16($i171); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 836, 8} true; - assume {:verifier.code 0} true; - $i172 := $sext.i16.i32($i171); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 836, 5} true; - assume {:verifier.code 0} true; - $i173 := $sext.i16.i32($i171); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 836, 5} true; - assume {:verifier.code 0} true; - $i174 := $add.i32($i173, $i172); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 836, 5} true; - assume {:verifier.code 0} true; - $i175 := $trunc.i32.i16($i174); - call {:cexpr "b"} boogie_si_record_i16($i175); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 838, 8} true; - assume {:verifier.code 0} true; - $i176 := $sext.i16.i32($i153); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 838, 5} true; - assume {:verifier.code 0} true; - $i177 := $sext.i16.i32($i153); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 838, 5} true; - assume {:verifier.code 0} true; - $i178 := $add.i32($i177, $i176); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 838, 5} true; - assume {:verifier.code 0} true; - $i179 := $trunc.i32.i16($i178); - call {:cexpr "c"} boogie_si_record_i16($i179); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 839, 7} true; - assume {:verifier.code 0} true; - $i180 := $sext.i16.i32($i168); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 839, 9} true; - assume {:verifier.code 0} true; - $i181 := $slt.i32($i180, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 839, 7} true; - assume {:verifier.code 0} true; - $i182 := $i179; - assume {:branchcond $i181} true; - goto $bb55, $bb56; -$bb49: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 829, 15} true; - assume {:verifier.code 0} true; - assume ($i155 == 1); - goto $bb50; -$bb50: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 830, 9} true; - assume {:verifier.code 0} true; - $i159 := $sext.i16.i32($i150); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 830, 9} true; - assume {:verifier.code 0} true; - $i160 := $add.i32($i159, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 830, 9} true; - assume {:verifier.code 0} true; - $i161 := $trunc.i32.i16($i160); - call {:cexpr "c"} boogie_si_record_i16($i161); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 831, 5} true; - assume {:verifier.code 0} true; - $i158 := $i161; - goto $bb54; -$bb51: - assume !(($i155 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 829, 18} true; - assume {:verifier.code 0} true; - $i156 := $sext.i16.i32($i146); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 829, 20} true; - assume {:verifier.code 0} true; - $i157 := $sgt.i32($i156, 32767); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 829, 9} true; - assume {:verifier.code 0} true; - $i158 := $i150; - assume {:branchcond $i157} true; - goto $bb52, $bb53; -$bb52: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 829, 9} true; - assume {:verifier.code 0} true; - assume ($i157 == 1); - goto $bb50; -$bb53: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 829, 9} true; - assume {:verifier.code 0} true; - assume !(($i157 == 1)); - goto $bb54; -$bb54: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 832, 3} true; - assume {:verifier.code 0} true; - $i153 := $i158; - goto $bb48; -$bb55: - assume ($i181 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 840, 9} true; - assume {:verifier.code 0} true; - $i183 := $sext.i16.i32($i175); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 840, 11} true; - assume {:verifier.code 0} true; - $i184 := $slt.i32($i183, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 840, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i184} true; - goto $bb58, $bb60; -$bb56: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 839, 7} true; - assume {:verifier.code 0} true; - assume !(($i181 == 1)); - goto $bb57; -$bb57: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 844, 7} true; - assume {:verifier.code 0} true; - $i191 := $sext.i16.i32($i168); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 844, 9} true; - assume {:verifier.code 0} true; - $i192 := $srem.i32($i191, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 844, 7} true; - assume {:verifier.code 0} true; - $i193 := $trunc.i32.i16($i192); - call {:cexpr "a"} boogie_si_record_i16($i193); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 845, 8} true; - assume {:verifier.code 0} true; - $i194 := $sext.i16.i32($i193); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 845, 5} true; - assume {:verifier.code 0} true; - $i195 := $sext.i16.i32($i193); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 845, 5} true; - assume {:verifier.code 0} true; - $i196 := $add.i32($i195, $i194); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 845, 5} true; - assume {:verifier.code 0} true; - $i197 := $trunc.i32.i16($i196); - call {:cexpr "a"} boogie_si_record_i16($i197); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 846, 7} true; - assume {:verifier.code 0} true; - $i198 := $sext.i16.i32($i175); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 846, 9} true; - assume {:verifier.code 0} true; - $i199 := $srem.i32($i198, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 846, 7} true; - assume {:verifier.code 0} true; - $i200 := $trunc.i32.i16($i199); - call {:cexpr "b"} boogie_si_record_i16($i200); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 847, 8} true; - assume {:verifier.code 0} true; - $i201 := $sext.i16.i32($i200); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 847, 5} true; - assume {:verifier.code 0} true; - $i202 := $sext.i16.i32($i200); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 847, 5} true; - assume {:verifier.code 0} true; - $i203 := $add.i32($i202, $i201); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 847, 5} true; - assume {:verifier.code 0} true; - $i204 := $trunc.i32.i16($i203); - call {:cexpr "b"} boogie_si_record_i16($i204); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 849, 8} true; - assume {:verifier.code 0} true; - $i205 := $sext.i16.i32($i182); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 849, 5} true; - assume {:verifier.code 0} true; - $i206 := $sext.i16.i32($i182); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 849, 5} true; - assume {:verifier.code 0} true; - $i207 := $add.i32($i206, $i205); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 849, 5} true; - assume {:verifier.code 0} true; - $i208 := $trunc.i32.i16($i207); - call {:cexpr "c"} boogie_si_record_i16($i208); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 850, 7} true; - assume {:verifier.code 0} true; - $i209 := $sext.i16.i32($i197); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 850, 9} true; - assume {:verifier.code 0} true; - $i210 := $slt.i32($i209, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 850, 7} true; - assume {:verifier.code 0} true; - $i211 := $i208; - assume {:branchcond $i210} true; - goto $bb64, $bb65; -$bb58: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 840, 15} true; - assume {:verifier.code 0} true; - assume ($i184 == 1); - goto $bb59; -$bb59: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 841, 9} true; - assume {:verifier.code 0} true; - $i188 := $sext.i16.i32($i179); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 841, 9} true; - assume {:verifier.code 0} true; - $i189 := $add.i32($i188, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 841, 9} true; - assume {:verifier.code 0} true; - $i190 := $trunc.i32.i16($i189); - call {:cexpr "c"} boogie_si_record_i16($i190); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 842, 5} true; - assume {:verifier.code 0} true; - $i187 := $i190; - goto $bb63; -$bb60: - assume !(($i184 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 840, 18} true; - assume {:verifier.code 0} true; - $i185 := $sext.i16.i32($i175); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 840, 20} true; - assume {:verifier.code 0} true; - $i186 := $sgt.i32($i185, 32767); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 840, 9} true; - assume {:verifier.code 0} true; - $i187 := $i179; - assume {:branchcond $i186} true; - goto $bb61, $bb62; -$bb61: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 840, 9} true; - assume {:verifier.code 0} true; - assume ($i186 == 1); - goto $bb59; -$bb62: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 840, 9} true; - assume {:verifier.code 0} true; - assume !(($i186 == 1)); - goto $bb63; -$bb63: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 843, 3} true; - assume {:verifier.code 0} true; - $i182 := $i187; - goto $bb57; -$bb64: - assume ($i210 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 851, 9} true; - assume {:verifier.code 0} true; - $i212 := $sext.i16.i32($i204); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 851, 11} true; - assume {:verifier.code 0} true; - $i213 := $slt.i32($i212, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 851, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i213} true; - goto $bb67, $bb69; -$bb65: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 850, 7} true; - assume {:verifier.code 0} true; - assume !(($i210 == 1)); - goto $bb66; -$bb66: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 855, 7} true; - assume {:verifier.code 0} true; - $i220 := $sext.i16.i32($i197); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 855, 9} true; - assume {:verifier.code 0} true; - $i221 := $srem.i32($i220, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 855, 7} true; - assume {:verifier.code 0} true; - $i222 := $trunc.i32.i16($i221); - call {:cexpr "a"} boogie_si_record_i16($i222); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 856, 8} true; - assume {:verifier.code 0} true; - $i223 := $sext.i16.i32($i222); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 856, 5} true; - assume {:verifier.code 0} true; - $i224 := $sext.i16.i32($i222); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 856, 5} true; - assume {:verifier.code 0} true; - $i225 := $add.i32($i224, $i223); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 856, 5} true; - assume {:verifier.code 0} true; - $i226 := $trunc.i32.i16($i225); - call {:cexpr "a"} boogie_si_record_i16($i226); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 857, 7} true; - assume {:verifier.code 0} true; - $i227 := $sext.i16.i32($i204); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 857, 9} true; - assume {:verifier.code 0} true; - $i228 := $srem.i32($i227, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 857, 7} true; - assume {:verifier.code 0} true; - $i229 := $trunc.i32.i16($i228); - call {:cexpr "b"} boogie_si_record_i16($i229); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 858, 8} true; - assume {:verifier.code 0} true; - $i230 := $sext.i16.i32($i229); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 858, 5} true; - assume {:verifier.code 0} true; - $i231 := $sext.i16.i32($i229); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 858, 5} true; - assume {:verifier.code 0} true; - $i232 := $add.i32($i231, $i230); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 858, 5} true; - assume {:verifier.code 0} true; - $i233 := $trunc.i32.i16($i232); - call {:cexpr "b"} boogie_si_record_i16($i233); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 860, 8} true; - assume {:verifier.code 0} true; - $i234 := $sext.i16.i32($i211); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 860, 5} true; - assume {:verifier.code 0} true; - $i235 := $sext.i16.i32($i211); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 860, 5} true; - assume {:verifier.code 0} true; - $i236 := $add.i32($i235, $i234); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 860, 5} true; - assume {:verifier.code 0} true; - $i237 := $trunc.i32.i16($i236); - call {:cexpr "c"} boogie_si_record_i16($i237); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 861, 7} true; - assume {:verifier.code 0} true; - $i238 := $sext.i16.i32($i226); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 861, 9} true; - assume {:verifier.code 0} true; - $i239 := $slt.i32($i238, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 861, 7} true; - assume {:verifier.code 0} true; - $i240 := $i237; - assume {:branchcond $i239} true; - goto $bb73, $bb74; -$bb67: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 851, 15} true; - assume {:verifier.code 0} true; - assume ($i213 == 1); - goto $bb68; -$bb68: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 852, 9} true; - assume {:verifier.code 0} true; - $i217 := $sext.i16.i32($i208); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 852, 9} true; - assume {:verifier.code 0} true; - $i218 := $add.i32($i217, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 852, 9} true; - assume {:verifier.code 0} true; - $i219 := $trunc.i32.i16($i218); - call {:cexpr "c"} boogie_si_record_i16($i219); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 853, 5} true; - assume {:verifier.code 0} true; - $i216 := $i219; - goto $bb72; -$bb69: - assume !(($i213 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 851, 18} true; - assume {:verifier.code 0} true; - $i214 := $sext.i16.i32($i204); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 851, 20} true; - assume {:verifier.code 0} true; - $i215 := $sgt.i32($i214, 32767); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 851, 9} true; - assume {:verifier.code 0} true; - $i216 := $i208; - assume {:branchcond $i215} true; - goto $bb70, $bb71; -$bb70: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 851, 9} true; - assume {:verifier.code 0} true; - assume ($i215 == 1); - goto $bb68; -$bb71: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 851, 9} true; - assume {:verifier.code 0} true; - assume !(($i215 == 1)); - goto $bb72; -$bb72: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 854, 3} true; - assume {:verifier.code 0} true; - $i211 := $i216; - goto $bb66; -$bb73: - assume ($i239 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 862, 9} true; - assume {:verifier.code 0} true; - $i241 := $sext.i16.i32($i233); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 862, 11} true; - assume {:verifier.code 0} true; - $i242 := $slt.i32($i241, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 862, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i242} true; - goto $bb76, $bb78; -$bb74: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 861, 7} true; - assume {:verifier.code 0} true; - assume !(($i239 == 1)); - goto $bb75; -$bb75: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 866, 7} true; - assume {:verifier.code 0} true; - $i249 := $sext.i16.i32($i226); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 866, 9} true; - assume {:verifier.code 0} true; - $i250 := $srem.i32($i249, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 866, 7} true; - assume {:verifier.code 0} true; - $i251 := $trunc.i32.i16($i250); - call {:cexpr "a"} boogie_si_record_i16($i251); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 867, 8} true; - assume {:verifier.code 0} true; - $i252 := $sext.i16.i32($i251); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 867, 5} true; - assume {:verifier.code 0} true; - $i253 := $sext.i16.i32($i251); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 867, 5} true; - assume {:verifier.code 0} true; - $i254 := $add.i32($i253, $i252); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 867, 5} true; - assume {:verifier.code 0} true; - $i255 := $trunc.i32.i16($i254); - call {:cexpr "a"} boogie_si_record_i16($i255); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 868, 7} true; - assume {:verifier.code 0} true; - $i256 := $sext.i16.i32($i233); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 868, 9} true; - assume {:verifier.code 0} true; - $i257 := $srem.i32($i256, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 868, 7} true; - assume {:verifier.code 0} true; - $i258 := $trunc.i32.i16($i257); - call {:cexpr "b"} boogie_si_record_i16($i258); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 869, 8} true; - assume {:verifier.code 0} true; - $i259 := $sext.i16.i32($i258); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 869, 5} true; - assume {:verifier.code 0} true; - $i260 := $sext.i16.i32($i258); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 869, 5} true; - assume {:verifier.code 0} true; - $i261 := $add.i32($i260, $i259); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 869, 5} true; - assume {:verifier.code 0} true; - $i262 := $trunc.i32.i16($i261); - call {:cexpr "b"} boogie_si_record_i16($i262); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 871, 8} true; - assume {:verifier.code 0} true; - $i263 := $sext.i16.i32($i240); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 871, 5} true; - assume {:verifier.code 0} true; - $i264 := $sext.i16.i32($i240); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 871, 5} true; - assume {:verifier.code 0} true; - $i265 := $add.i32($i264, $i263); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 871, 5} true; - assume {:verifier.code 0} true; - $i266 := $trunc.i32.i16($i265); - call {:cexpr "c"} boogie_si_record_i16($i266); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 872, 7} true; - assume {:verifier.code 0} true; - $i267 := $sext.i16.i32($i255); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 872, 9} true; - assume {:verifier.code 0} true; - $i268 := $slt.i32($i267, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 872, 7} true; - assume {:verifier.code 0} true; - $i269 := $i266; - assume {:branchcond $i268} true; - goto $bb82, $bb83; -$bb76: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 862, 15} true; - assume {:verifier.code 0} true; - assume ($i242 == 1); - goto $bb77; -$bb77: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 863, 9} true; - assume {:verifier.code 0} true; - $i246 := $sext.i16.i32($i237); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 863, 9} true; - assume {:verifier.code 0} true; - $i247 := $add.i32($i246, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 863, 9} true; - assume {:verifier.code 0} true; - $i248 := $trunc.i32.i16($i247); - call {:cexpr "c"} boogie_si_record_i16($i248); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 864, 5} true; - assume {:verifier.code 0} true; - $i245 := $i248; - goto $bb81; -$bb78: - assume !(($i242 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 862, 18} true; - assume {:verifier.code 0} true; - $i243 := $sext.i16.i32($i233); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 862, 20} true; - assume {:verifier.code 0} true; - $i244 := $sgt.i32($i243, 32767); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 862, 9} true; - assume {:verifier.code 0} true; - $i245 := $i237; - assume {:branchcond $i244} true; - goto $bb79, $bb80; -$bb79: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 862, 9} true; - assume {:verifier.code 0} true; - assume ($i244 == 1); - goto $bb77; -$bb80: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 862, 9} true; - assume {:verifier.code 0} true; - assume !(($i244 == 1)); - goto $bb81; -$bb81: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 865, 3} true; - assume {:verifier.code 0} true; - $i240 := $i245; - goto $bb75; -$bb82: - assume ($i268 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 873, 9} true; - assume {:verifier.code 0} true; - $i270 := $sext.i16.i32($i262); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 873, 11} true; - assume {:verifier.code 0} true; - $i271 := $slt.i32($i270, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 873, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i271} true; - goto $bb85, $bb87; -$bb83: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 872, 7} true; - assume {:verifier.code 0} true; - assume !(($i268 == 1)); - goto $bb84; -$bb84: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 877, 7} true; - assume {:verifier.code 0} true; - $i278 := $sext.i16.i32($i255); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 877, 9} true; - assume {:verifier.code 0} true; - $i279 := $srem.i32($i278, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 877, 7} true; - assume {:verifier.code 0} true; - $i280 := $trunc.i32.i16($i279); - call {:cexpr "a"} boogie_si_record_i16($i280); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 878, 8} true; - assume {:verifier.code 0} true; - $i281 := $sext.i16.i32($i280); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 878, 5} true; - assume {:verifier.code 0} true; - $i282 := $sext.i16.i32($i280); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 878, 5} true; - assume {:verifier.code 0} true; - $i283 := $add.i32($i282, $i281); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 878, 5} true; - assume {:verifier.code 0} true; - $i284 := $trunc.i32.i16($i283); - call {:cexpr "a"} boogie_si_record_i16($i284); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 879, 7} true; - assume {:verifier.code 0} true; - $i285 := $sext.i16.i32($i262); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 879, 9} true; - assume {:verifier.code 0} true; - $i286 := $srem.i32($i285, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 879, 7} true; - assume {:verifier.code 0} true; - $i287 := $trunc.i32.i16($i286); - call {:cexpr "b"} boogie_si_record_i16($i287); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 880, 8} true; - assume {:verifier.code 0} true; - $i288 := $sext.i16.i32($i287); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 880, 5} true; - assume {:verifier.code 0} true; - $i289 := $sext.i16.i32($i287); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 880, 5} true; - assume {:verifier.code 0} true; - $i290 := $add.i32($i289, $i288); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 880, 5} true; - assume {:verifier.code 0} true; - $i291 := $trunc.i32.i16($i290); - call {:cexpr "b"} boogie_si_record_i16($i291); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 882, 8} true; - assume {:verifier.code 0} true; - $i292 := $sext.i16.i32($i269); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 882, 5} true; - assume {:verifier.code 0} true; - $i293 := $sext.i16.i32($i269); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 882, 5} true; - assume {:verifier.code 0} true; - $i294 := $add.i32($i293, $i292); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 882, 5} true; - assume {:verifier.code 0} true; - $i295 := $trunc.i32.i16($i294); - call {:cexpr "c"} boogie_si_record_i16($i295); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 883, 7} true; - assume {:verifier.code 0} true; - $i296 := $sext.i16.i32($i284); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 883, 9} true; - assume {:verifier.code 0} true; - $i297 := $slt.i32($i296, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 883, 7} true; - assume {:verifier.code 0} true; - $i298 := $i295; - assume {:branchcond $i297} true; - goto $bb91, $bb92; -$bb85: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 873, 15} true; - assume {:verifier.code 0} true; - assume ($i271 == 1); - goto $bb86; -$bb86: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 874, 9} true; - assume {:verifier.code 0} true; - $i275 := $sext.i16.i32($i266); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 874, 9} true; - assume {:verifier.code 0} true; - $i276 := $add.i32($i275, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 874, 9} true; - assume {:verifier.code 0} true; - $i277 := $trunc.i32.i16($i276); - call {:cexpr "c"} boogie_si_record_i16($i277); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 875, 5} true; - assume {:verifier.code 0} true; - $i274 := $i277; - goto $bb90; -$bb87: - assume !(($i271 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 873, 18} true; - assume {:verifier.code 0} true; - $i272 := $sext.i16.i32($i262); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 873, 20} true; - assume {:verifier.code 0} true; - $i273 := $sgt.i32($i272, 32767); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 873, 9} true; - assume {:verifier.code 0} true; - $i274 := $i266; - assume {:branchcond $i273} true; - goto $bb88, $bb89; -$bb88: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 873, 9} true; - assume {:verifier.code 0} true; - assume ($i273 == 1); - goto $bb86; -$bb89: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 873, 9} true; - assume {:verifier.code 0} true; - assume !(($i273 == 1)); - goto $bb90; -$bb90: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 876, 3} true; - assume {:verifier.code 0} true; - $i269 := $i274; - goto $bb84; -$bb91: - assume ($i297 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 884, 9} true; - assume {:verifier.code 0} true; - $i299 := $sext.i16.i32($i291); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 884, 11} true; - assume {:verifier.code 0} true; - $i300 := $slt.i32($i299, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 884, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i300} true; - goto $bb94, $bb96; -$bb92: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 883, 7} true; - assume {:verifier.code 0} true; - assume !(($i297 == 1)); - goto $bb93; -$bb93: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 888, 7} true; - assume {:verifier.code 0} true; - $i307 := $sext.i16.i32($i284); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 888, 9} true; - assume {:verifier.code 0} true; - $i308 := $srem.i32($i307, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 888, 7} true; - assume {:verifier.code 0} true; - $i309 := $trunc.i32.i16($i308); - call {:cexpr "a"} boogie_si_record_i16($i309); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 889, 8} true; - assume {:verifier.code 0} true; - $i310 := $sext.i16.i32($i309); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 889, 5} true; - assume {:verifier.code 0} true; - $i311 := $sext.i16.i32($i309); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 889, 5} true; - assume {:verifier.code 0} true; - $i312 := $add.i32($i311, $i310); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 889, 5} true; - assume {:verifier.code 0} true; - $i313 := $trunc.i32.i16($i312); - call {:cexpr "a"} boogie_si_record_i16($i313); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 890, 7} true; - assume {:verifier.code 0} true; - $i314 := $sext.i16.i32($i291); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 890, 9} true; - assume {:verifier.code 0} true; - $i315 := $srem.i32($i314, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 890, 7} true; - assume {:verifier.code 0} true; - $i316 := $trunc.i32.i16($i315); - call {:cexpr "b"} boogie_si_record_i16($i316); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 891, 8} true; - assume {:verifier.code 0} true; - $i317 := $sext.i16.i32($i316); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 891, 5} true; - assume {:verifier.code 0} true; - $i318 := $sext.i16.i32($i316); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 891, 5} true; - assume {:verifier.code 0} true; - $i319 := $add.i32($i318, $i317); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 891, 5} true; - assume {:verifier.code 0} true; - $i320 := $trunc.i32.i16($i319); - call {:cexpr "b"} boogie_si_record_i16($i320); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 893, 8} true; - assume {:verifier.code 0} true; - $i321 := $sext.i16.i32($i298); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 893, 5} true; - assume {:verifier.code 0} true; - $i322 := $sext.i16.i32($i298); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 893, 5} true; - assume {:verifier.code 0} true; - $i323 := $add.i32($i322, $i321); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 893, 5} true; - assume {:verifier.code 0} true; - $i324 := $trunc.i32.i16($i323); - call {:cexpr "c"} boogie_si_record_i16($i324); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 894, 7} true; - assume {:verifier.code 0} true; - $i325 := $sext.i16.i32($i313); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 894, 9} true; - assume {:verifier.code 0} true; - $i326 := $slt.i32($i325, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 894, 7} true; - assume {:verifier.code 0} true; - $i327 := $i324; - assume {:branchcond $i326} true; - goto $bb100, $bb101; -$bb94: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 884, 15} true; - assume {:verifier.code 0} true; - assume ($i300 == 1); - goto $bb95; -$bb95: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 885, 9} true; - assume {:verifier.code 0} true; - $i304 := $sext.i16.i32($i295); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 885, 9} true; - assume {:verifier.code 0} true; - $i305 := $add.i32($i304, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 885, 9} true; - assume {:verifier.code 0} true; - $i306 := $trunc.i32.i16($i305); - call {:cexpr "c"} boogie_si_record_i16($i306); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 886, 5} true; - assume {:verifier.code 0} true; - $i303 := $i306; - goto $bb99; -$bb96: - assume !(($i300 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 884, 18} true; - assume {:verifier.code 0} true; - $i301 := $sext.i16.i32($i291); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 884, 20} true; - assume {:verifier.code 0} true; - $i302 := $sgt.i32($i301, 32767); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 884, 9} true; - assume {:verifier.code 0} true; - $i303 := $i295; - assume {:branchcond $i302} true; - goto $bb97, $bb98; -$bb97: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 884, 9} true; - assume {:verifier.code 0} true; - assume ($i302 == 1); - goto $bb95; -$bb98: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 884, 9} true; - assume {:verifier.code 0} true; - assume !(($i302 == 1)); - goto $bb99; -$bb99: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 887, 3} true; - assume {:verifier.code 0} true; - $i298 := $i303; - goto $bb93; -$bb100: - assume ($i326 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 895, 9} true; - assume {:verifier.code 0} true; - $i328 := $sext.i16.i32($i320); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 895, 11} true; - assume {:verifier.code 0} true; - $i329 := $slt.i32($i328, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 895, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i329} true; - goto $bb103, $bb105; -$bb101: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 894, 7} true; - assume {:verifier.code 0} true; - assume !(($i326 == 1)); - goto $bb102; -$bb102: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 899, 7} true; - assume {:verifier.code 0} true; - $i336 := $sext.i16.i32($i313); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 899, 9} true; - assume {:verifier.code 0} true; - $i337 := $srem.i32($i336, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 899, 7} true; - assume {:verifier.code 0} true; - $i338 := $trunc.i32.i16($i337); - call {:cexpr "a"} boogie_si_record_i16($i338); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 900, 8} true; - assume {:verifier.code 0} true; - $i339 := $sext.i16.i32($i338); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 900, 5} true; - assume {:verifier.code 0} true; - $i340 := $sext.i16.i32($i338); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 900, 5} true; - assume {:verifier.code 0} true; - $i341 := $add.i32($i340, $i339); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 900, 5} true; - assume {:verifier.code 0} true; - $i342 := $trunc.i32.i16($i341); - call {:cexpr "a"} boogie_si_record_i16($i342); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 901, 7} true; - assume {:verifier.code 0} true; - $i343 := $sext.i16.i32($i320); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 901, 9} true; - assume {:verifier.code 0} true; - $i344 := $srem.i32($i343, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 901, 7} true; - assume {:verifier.code 0} true; - $i345 := $trunc.i32.i16($i344); - call {:cexpr "b"} boogie_si_record_i16($i345); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 902, 8} true; - assume {:verifier.code 0} true; - $i346 := $sext.i16.i32($i345); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 902, 5} true; - assume {:verifier.code 0} true; - $i347 := $sext.i16.i32($i345); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 902, 5} true; - assume {:verifier.code 0} true; - $i348 := $add.i32($i347, $i346); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 902, 5} true; - assume {:verifier.code 0} true; - $i349 := $trunc.i32.i16($i348); - call {:cexpr "b"} boogie_si_record_i16($i349); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 904, 8} true; - assume {:verifier.code 0} true; - $i350 := $sext.i16.i32($i327); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 904, 5} true; - assume {:verifier.code 0} true; - $i351 := $sext.i16.i32($i327); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 904, 5} true; - assume {:verifier.code 0} true; - $i352 := $add.i32($i351, $i350); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 904, 5} true; - assume {:verifier.code 0} true; - $i353 := $trunc.i32.i16($i352); - call {:cexpr "c"} boogie_si_record_i16($i353); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 905, 7} true; - assume {:verifier.code 0} true; - $i354 := $sext.i16.i32($i342); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 905, 9} true; - assume {:verifier.code 0} true; - $i355 := $slt.i32($i354, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 905, 7} true; - assume {:verifier.code 0} true; - $i356 := $i353; - assume {:branchcond $i355} true; - goto $bb109, $bb110; -$bb103: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 895, 15} true; - assume {:verifier.code 0} true; - assume ($i329 == 1); - goto $bb104; -$bb104: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 896, 9} true; - assume {:verifier.code 0} true; - $i333 := $sext.i16.i32($i324); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 896, 9} true; - assume {:verifier.code 0} true; - $i334 := $add.i32($i333, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 896, 9} true; - assume {:verifier.code 0} true; - $i335 := $trunc.i32.i16($i334); - call {:cexpr "c"} boogie_si_record_i16($i335); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 897, 5} true; - assume {:verifier.code 0} true; - $i332 := $i335; - goto $bb108; -$bb105: - assume !(($i329 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 895, 18} true; - assume {:verifier.code 0} true; - $i330 := $sext.i16.i32($i320); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 895, 20} true; - assume {:verifier.code 0} true; - $i331 := $sgt.i32($i330, 32767); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 895, 9} true; - assume {:verifier.code 0} true; - $i332 := $i324; - assume {:branchcond $i331} true; - goto $bb106, $bb107; -$bb106: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 895, 9} true; - assume {:verifier.code 0} true; - assume ($i331 == 1); - goto $bb104; -$bb107: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 895, 9} true; - assume {:verifier.code 0} true; - assume !(($i331 == 1)); - goto $bb108; -$bb108: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 898, 3} true; - assume {:verifier.code 0} true; - $i327 := $i332; - goto $bb102; -$bb109: - assume ($i355 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 906, 9} true; - assume {:verifier.code 0} true; - $i357 := $sext.i16.i32($i349); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 906, 11} true; - assume {:verifier.code 0} true; - $i358 := $slt.i32($i357, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 906, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i358} true; - goto $bb112, $bb114; -$bb110: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 905, 7} true; - assume {:verifier.code 0} true; - assume !(($i355 == 1)); - goto $bb111; -$bb111: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 910, 7} true; - assume {:verifier.code 0} true; - $i365 := $sext.i16.i32($i342); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 910, 9} true; - assume {:verifier.code 0} true; - $i366 := $srem.i32($i365, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 910, 7} true; - assume {:verifier.code 0} true; - $i367 := $trunc.i32.i16($i366); - call {:cexpr "a"} boogie_si_record_i16($i367); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 911, 8} true; - assume {:verifier.code 0} true; - $i368 := $sext.i16.i32($i367); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 911, 5} true; - assume {:verifier.code 0} true; - $i369 := $sext.i16.i32($i367); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 911, 5} true; - assume {:verifier.code 0} true; - $i370 := $add.i32($i369, $i368); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 911, 5} true; - assume {:verifier.code 0} true; - $i371 := $trunc.i32.i16($i370); - call {:cexpr "a"} boogie_si_record_i16($i371); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 912, 7} true; - assume {:verifier.code 0} true; - $i372 := $sext.i16.i32($i349); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 912, 9} true; - assume {:verifier.code 0} true; - $i373 := $srem.i32($i372, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 912, 7} true; - assume {:verifier.code 0} true; - $i374 := $trunc.i32.i16($i373); - call {:cexpr "b"} boogie_si_record_i16($i374); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 913, 8} true; - assume {:verifier.code 0} true; - $i375 := $sext.i16.i32($i374); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 913, 5} true; - assume {:verifier.code 0} true; - $i376 := $sext.i16.i32($i374); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 913, 5} true; - assume {:verifier.code 0} true; - $i377 := $add.i32($i376, $i375); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 913, 5} true; - assume {:verifier.code 0} true; - $i378 := $trunc.i32.i16($i377); - call {:cexpr "b"} boogie_si_record_i16($i378); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 915, 8} true; - assume {:verifier.code 0} true; - $i379 := $sext.i16.i32($i356); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 915, 5} true; - assume {:verifier.code 0} true; - $i380 := $sext.i16.i32($i356); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 915, 5} true; - assume {:verifier.code 0} true; - $i381 := $add.i32($i380, $i379); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 915, 5} true; - assume {:verifier.code 0} true; - $i382 := $trunc.i32.i16($i381); - call {:cexpr "c"} boogie_si_record_i16($i382); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 916, 7} true; - assume {:verifier.code 0} true; - $i383 := $sext.i16.i32($i371); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 916, 9} true; - assume {:verifier.code 0} true; - $i384 := $slt.i32($i383, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 916, 7} true; - assume {:verifier.code 0} true; - $i385 := $i382; - assume {:branchcond $i384} true; - goto $bb118, $bb119; -$bb112: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 906, 15} true; - assume {:verifier.code 0} true; - assume ($i358 == 1); - goto $bb113; -$bb113: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 907, 9} true; - assume {:verifier.code 0} true; - $i362 := $sext.i16.i32($i353); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 907, 9} true; - assume {:verifier.code 0} true; - $i363 := $add.i32($i362, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 907, 9} true; - assume {:verifier.code 0} true; - $i364 := $trunc.i32.i16($i363); - call {:cexpr "c"} boogie_si_record_i16($i364); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 908, 5} true; - assume {:verifier.code 0} true; - $i361 := $i364; - goto $bb117; -$bb114: - assume !(($i358 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 906, 18} true; - assume {:verifier.code 0} true; - $i359 := $sext.i16.i32($i349); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 906, 20} true; - assume {:verifier.code 0} true; - $i360 := $sgt.i32($i359, 32767); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 906, 9} true; - assume {:verifier.code 0} true; - $i361 := $i353; - assume {:branchcond $i360} true; - goto $bb115, $bb116; -$bb115: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 906, 9} true; - assume {:verifier.code 0} true; - assume ($i360 == 1); - goto $bb113; -$bb116: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 906, 9} true; - assume {:verifier.code 0} true; - assume !(($i360 == 1)); - goto $bb117; -$bb117: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 909, 3} true; - assume {:verifier.code 0} true; - $i356 := $i361; - goto $bb111; -$bb118: - assume ($i384 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 917, 9} true; - assume {:verifier.code 0} true; - $i386 := $sext.i16.i32($i378); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 917, 11} true; - assume {:verifier.code 0} true; - $i387 := $slt.i32($i386, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 917, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i387} true; - goto $bb121, $bb123; -$bb119: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 916, 7} true; - assume {:verifier.code 0} true; - assume !(($i384 == 1)); - goto $bb120; -$bb120: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 921, 7} true; - assume {:verifier.code 0} true; - $i394 := $sext.i16.i32($i371); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 921, 9} true; - assume {:verifier.code 0} true; - $i395 := $srem.i32($i394, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 921, 7} true; - assume {:verifier.code 0} true; - $i396 := $trunc.i32.i16($i395); - call {:cexpr "a"} boogie_si_record_i16($i396); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 922, 8} true; - assume {:verifier.code 0} true; - $i397 := $sext.i16.i32($i396); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 922, 5} true; - assume {:verifier.code 0} true; - $i398 := $sext.i16.i32($i396); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 922, 5} true; - assume {:verifier.code 0} true; - $i399 := $add.i32($i398, $i397); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 922, 5} true; - assume {:verifier.code 0} true; - $i400 := $trunc.i32.i16($i399); - call {:cexpr "a"} boogie_si_record_i16($i400); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 923, 7} true; - assume {:verifier.code 0} true; - $i401 := $sext.i16.i32($i378); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 923, 9} true; - assume {:verifier.code 0} true; - $i402 := $srem.i32($i401, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 923, 7} true; - assume {:verifier.code 0} true; - $i403 := $trunc.i32.i16($i402); - call {:cexpr "b"} boogie_si_record_i16($i403); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 924, 8} true; - assume {:verifier.code 0} true; - $i404 := $sext.i16.i32($i403); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 924, 5} true; - assume {:verifier.code 0} true; - $i405 := $sext.i16.i32($i403); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 924, 5} true; - assume {:verifier.code 0} true; - $i406 := $add.i32($i405, $i404); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 924, 5} true; - assume {:verifier.code 0} true; - $i407 := $trunc.i32.i16($i406); - call {:cexpr "b"} boogie_si_record_i16($i407); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 926, 8} true; - assume {:verifier.code 0} true; - $i408 := $sext.i16.i32($i385); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 926, 5} true; - assume {:verifier.code 0} true; - $i409 := $sext.i16.i32($i385); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 926, 5} true; - assume {:verifier.code 0} true; - $i410 := $add.i32($i409, $i408); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 926, 5} true; - assume {:verifier.code 0} true; - $i411 := $trunc.i32.i16($i410); - call {:cexpr "c"} boogie_si_record_i16($i411); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 927, 7} true; - assume {:verifier.code 0} true; - $i412 := $sext.i16.i32($i400); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 927, 9} true; - assume {:verifier.code 0} true; - $i413 := $slt.i32($i412, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 927, 7} true; - assume {:verifier.code 0} true; - $i414 := $i411; - assume {:branchcond $i413} true; - goto $bb127, $bb128; -$bb121: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 917, 15} true; - assume {:verifier.code 0} true; - assume ($i387 == 1); - goto $bb122; -$bb122: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 918, 9} true; - assume {:verifier.code 0} true; - $i391 := $sext.i16.i32($i382); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 918, 9} true; - assume {:verifier.code 0} true; - $i392 := $add.i32($i391, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 918, 9} true; - assume {:verifier.code 0} true; - $i393 := $trunc.i32.i16($i392); - call {:cexpr "c"} boogie_si_record_i16($i393); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 919, 5} true; - assume {:verifier.code 0} true; - $i390 := $i393; - goto $bb126; -$bb123: - assume !(($i387 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 917, 18} true; - assume {:verifier.code 0} true; - $i388 := $sext.i16.i32($i378); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 917, 20} true; - assume {:verifier.code 0} true; - $i389 := $sgt.i32($i388, 32767); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 917, 9} true; - assume {:verifier.code 0} true; - $i390 := $i382; - assume {:branchcond $i389} true; - goto $bb124, $bb125; -$bb124: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 917, 9} true; - assume {:verifier.code 0} true; - assume ($i389 == 1); - goto $bb122; -$bb125: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 917, 9} true; - assume {:verifier.code 0} true; - assume !(($i389 == 1)); - goto $bb126; -$bb126: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 920, 3} true; - assume {:verifier.code 0} true; - $i385 := $i390; - goto $bb120; -$bb127: - assume ($i413 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 928, 9} true; - assume {:verifier.code 0} true; - $i415 := $sext.i16.i32($i407); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 928, 11} true; - assume {:verifier.code 0} true; - $i416 := $slt.i32($i415, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 928, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i416} true; - goto $bb130, $bb132; -$bb128: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 927, 7} true; - assume {:verifier.code 0} true; - assume !(($i413 == 1)); - goto $bb129; -$bb129: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 932, 7} true; - assume {:verifier.code 0} true; - $i423 := $sext.i16.i32($i400); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 932, 9} true; - assume {:verifier.code 0} true; - $i424 := $srem.i32($i423, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 932, 7} true; - assume {:verifier.code 0} true; - $i425 := $trunc.i32.i16($i424); - call {:cexpr "a"} boogie_si_record_i16($i425); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 933, 8} true; - assume {:verifier.code 0} true; - $i426 := $sext.i16.i32($i425); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 933, 5} true; - assume {:verifier.code 0} true; - $i427 := $sext.i16.i32($i425); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 933, 5} true; - assume {:verifier.code 0} true; - $i428 := $add.i32($i427, $i426); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 933, 5} true; - assume {:verifier.code 0} true; - $i429 := $trunc.i32.i16($i428); - call {:cexpr "a"} boogie_si_record_i16($i429); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 934, 7} true; - assume {:verifier.code 0} true; - $i430 := $sext.i16.i32($i407); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 934, 9} true; - assume {:verifier.code 0} true; - $i431 := $srem.i32($i430, 32768); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 934, 7} true; - assume {:verifier.code 0} true; - $i432 := $trunc.i32.i16($i431); - call {:cexpr "b"} boogie_si_record_i16($i432); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 935, 8} true; - assume {:verifier.code 0} true; - $i433 := $sext.i16.i32($i432); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 935, 5} true; - assume {:verifier.code 0} true; - $i434 := $sext.i16.i32($i432); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 935, 5} true; - assume {:verifier.code 0} true; - $i435 := $add.i32($i434, $i433); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 935, 5} true; - assume {:verifier.code 0} true; - $i436 := $trunc.i32.i16($i435); - call {:cexpr "b"} boogie_si_record_i16($i436); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 937, 8} true; - assume {:verifier.code 0} true; - $i437 := $sext.i16.i32($i414); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 937, 5} true; - assume {:verifier.code 0} true; - $i438 := $sext.i16.i32($i414); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 937, 5} true; - assume {:verifier.code 0} true; - $i439 := $add.i32($i438, $i437); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 937, 5} true; - assume {:verifier.code 0} true; - $i440 := $trunc.i32.i16($i439); - call {:cexpr "c"} boogie_si_record_i16($i440); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 938, 7} true; - assume {:verifier.code 0} true; - $i441 := $sext.i16.i32($i429); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 938, 9} true; - assume {:verifier.code 0} true; - $i442 := $slt.i32($i441, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 938, 7} true; - assume {:verifier.code 0} true; - $i443 := $i440; - assume {:branchcond $i442} true; - goto $bb136, $bb137; -$bb130: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 928, 15} true; - assume {:verifier.code 0} true; - assume ($i416 == 1); - goto $bb131; -$bb131: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 929, 9} true; - assume {:verifier.code 0} true; - $i420 := $sext.i16.i32($i411); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 929, 9} true; - assume {:verifier.code 0} true; - $i421 := $add.i32($i420, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 929, 9} true; - assume {:verifier.code 0} true; - $i422 := $trunc.i32.i16($i421); - call {:cexpr "c"} boogie_si_record_i16($i422); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 930, 5} true; - assume {:verifier.code 0} true; - $i419 := $i422; - goto $bb135; -$bb132: - assume !(($i416 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 928, 18} true; - assume {:verifier.code 0} true; - $i417 := $sext.i16.i32($i407); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 928, 20} true; - assume {:verifier.code 0} true; - $i418 := $sgt.i32($i417, 32767); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 928, 9} true; - assume {:verifier.code 0} true; - $i419 := $i411; - assume {:branchcond $i418} true; - goto $bb133, $bb134; -$bb133: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 928, 9} true; - assume {:verifier.code 0} true; - assume ($i418 == 1); - goto $bb131; -$bb134: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 928, 9} true; - assume {:verifier.code 0} true; - assume !(($i418 == 1)); - goto $bb135; -$bb135: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 931, 3} true; - assume {:verifier.code 0} true; - $i414 := $i419; - goto $bb129; -$bb136: - assume ($i442 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 939, 9} true; - assume {:verifier.code 0} true; - $i444 := $sext.i16.i32($i436); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 939, 11} true; - assume {:verifier.code 0} true; - $i445 := $slt.i32($i444, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 939, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i445} true; - goto $bb139, $bb141; -$bb137: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 938, 7} true; - assume {:verifier.code 0} true; - assume !(($i442 == 1)); - goto $bb138; -$bb138: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 948, 3} true; - assume {:verifier.code 0} true; - $r := $i443; - $exn := false; - return; -$bb139: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 939, 15} true; - assume {:verifier.code 0} true; - assume ($i445 == 1); - goto $bb140; -$bb140: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 940, 9} true; - assume {:verifier.code 0} true; - $i449 := $sext.i16.i32($i440); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 940, 9} true; - assume {:verifier.code 0} true; - $i450 := $add.i32($i449, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 940, 9} true; - assume {:verifier.code 0} true; - $i451 := $trunc.i32.i16($i450); - call {:cexpr "c"} boogie_si_record_i16($i451); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 941, 5} true; - assume {:verifier.code 0} true; - $i448 := $i451; - goto $bb144; -$bb141: - assume !(($i445 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 939, 18} true; - assume {:verifier.code 0} true; - $i446 := $sext.i16.i32($i436); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 939, 20} true; - assume {:verifier.code 0} true; - $i447 := $sgt.i32($i446, 32767); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 939, 9} true; - assume {:verifier.code 0} true; - $i448 := $i440; - assume {:branchcond $i447} true; - goto $bb142, $bb143; -$bb142: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 939, 9} true; - assume {:verifier.code 0} true; - assume ($i447 == 1); - goto $bb140; -$bb143: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 939, 9} true; - assume {:verifier.code 0} true; - assume !(($i447 == 1)); - goto $bb144; -$bb144: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 942, 3} true; - assume {:verifier.code 0} true; - $i443 := $i448; - goto $bb138; -} -const __SMACK_and8: ref; -axiom (__SMACK_and8 == $sub.ref(0, 26919)); -procedure __SMACK_and8($i0: i8, $i1: i8) - returns ($r: i8) -{ - var $i2: i32; - var $i3: i32; - var $i4: i32; - var $i5: i8; - var $i6: i32; - var $i7: i1; - var $i9: i32; - var $i10: i1; - var $i11: i32; - var $i12: i1; - var $i14: i32; - var $i15: i32; - var $i16: i8; - var $i13: i8; - var $i8: i8; - var $i17: i32; - var $i18: i32; - var $i19: i8; - var $i20: i32; - var $i21: i32; - var $i22: i32; - var $i23: i8; - var $i24: i32; - var $i25: i32; - var $i26: i8; - var $i27: i32; - var $i28: i32; - var $i29: i32; - var $i30: i8; - var $i31: i32; - var $i32: i32; - var $i33: i32; - var $i34: i8; - var $i35: i32; - var $i36: i1; - var $i38: i32; - var $i39: i1; - var $i40: i32; - var $i41: i1; - var $i43: i32; - var $i44: i32; - var $i45: i8; - var $i42: i8; - var $i37: i8; - var $i46: i32; - var $i47: i32; - var $i48: i8; - var $i49: i32; - var $i50: i32; - var $i51: i32; - var $i52: i8; - var $i53: i32; - var $i54: i32; - var $i55: i8; - var $i56: i32; - var $i57: i32; - var $i58: i32; - var $i59: i8; - var $i60: i32; - var $i61: i32; - var $i62: i32; - var $i63: i8; - var $i64: i32; - var $i65: i1; - var $i67: i32; - var $i68: i1; - var $i69: i32; - var $i70: i1; - var $i72: i32; - var $i73: i32; - var $i74: i8; - var $i71: i8; - var $i66: i8; - var $i75: i32; - var $i76: i32; - var $i77: i8; - var $i78: i32; - var $i79: i32; - var $i80: i32; - var $i81: i8; - var $i82: i32; - var $i83: i32; - var $i84: i8; - var $i85: i32; - var $i86: i32; - var $i87: i32; - var $i88: i8; - var $i89: i32; - var $i90: i32; - var $i91: i32; - var $i92: i8; - var $i93: i32; - var $i94: i1; - var $i96: i32; - var $i97: i1; - var $i98: i32; - var $i99: i1; - var $i101: i32; - var $i102: i32; - var $i103: i8; - var $i100: i8; - var $i95: i8; - var $i104: i32; - var $i105: i32; - var $i106: i8; - var $i107: i32; - var $i108: i32; - var $i109: i32; - var $i110: i8; - var $i111: i32; - var $i112: i32; - var $i113: i8; - var $i114: i32; - var $i115: i32; - var $i116: i32; - var $i117: i8; - var $i118: i32; - var $i119: i32; - var $i120: i32; - var $i121: i8; - var $i122: i32; - var $i123: i1; - var $i125: i32; - var $i126: i1; - var $i127: i32; - var $i128: i1; - var $i130: i32; - var $i131: i32; - var $i132: i8; - var $i129: i8; - var $i124: i8; - var $i133: i32; - var $i134: i32; - var $i135: i8; - var $i136: i32; - var $i137: i32; - var $i138: i32; - var $i139: i8; - var $i140: i32; - var $i141: i32; - var $i142: i8; - var $i143: i32; - var $i144: i32; - var $i145: i32; - var $i146: i8; - var $i147: i32; - var $i148: i32; - var $i149: i32; - var $i150: i8; - var $i151: i32; - var $i152: i1; - var $i154: i32; - var $i155: i1; - var $i156: i32; - var $i157: i1; - var $i159: i32; - var $i160: i32; - var $i161: i8; - var $i158: i8; - var $i153: i8; - var $i162: i32; - var $i163: i32; - var $i164: i8; - var $i165: i32; - var $i166: i32; - var $i167: i32; - var $i168: i8; - var $i169: i32; - var $i170: i32; - var $i171: i8; - var $i172: i32; - var $i173: i32; - var $i174: i32; - var $i175: i8; - var $i176: i32; - var $i177: i32; - var $i178: i32; - var $i179: i8; - var $i180: i32; - var $i181: i1; - var $i183: i32; - var $i184: i1; - var $i185: i32; - var $i186: i1; - var $i188: i32; - var $i189: i32; - var $i190: i8; - var $i187: i8; - var $i182: i8; - var $i191: i32; - var $i192: i32; - var $i193: i8; - var $i194: i32; - var $i195: i32; - var $i196: i32; - var $i197: i8; - var $i198: i32; - var $i199: i32; - var $i200: i8; - var $i201: i32; - var $i202: i32; - var $i203: i32; - var $i204: i8; - var $i205: i32; - var $i206: i32; - var $i207: i32; - var $i208: i8; - var $i209: i32; - var $i210: i1; - var $i212: i32; - var $i213: i1; - var $i214: i32; - var $i215: i1; - var $i217: i32; - var $i218: i32; - var $i219: i8; - var $i216: i8; - var $i211: i8; -$bb0: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 954, 8} true; - assume {:verifier.code 0} true; - call {:cexpr "__SMACK_and8:arg:a"} boogie_si_record_i8($i0); - call {:cexpr "__SMACK_and8:arg:b"} boogie_si_record_i8($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 954, 8} true; - assume {:verifier.code 0} true; - $i2 := $sext.i8.i32(0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 954, 5} true; - assume {:verifier.code 0} true; - $i3 := $sext.i8.i32(0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 954, 5} true; - assume {:verifier.code 0} true; - $i4 := $add.i32($i3, $i2); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 954, 5} true; - assume {:verifier.code 0} true; - $i5 := $trunc.i32.i8($i4); - call {:cexpr "c"} boogie_si_record_i8($i5); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 955, 7} true; - assume {:verifier.code 0} true; - $i6 := $sext.i8.i32($i0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 955, 9} true; - assume {:verifier.code 0} true; - $i7 := $slt.i32($i6, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 955, 7} true; - assume {:verifier.code 0} true; - $i8 := $i5; - assume {:branchcond $i7} true; - goto $bb1, $bb2; -$bb1: - assume ($i7 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 956, 9} true; - assume {:verifier.code 0} true; - $i9 := $sext.i8.i32($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 956, 11} true; - assume {:verifier.code 0} true; - $i10 := $slt.i32($i9, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 956, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i10} true; - goto $bb4, $bb6; -$bb2: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 955, 7} true; - assume {:verifier.code 0} true; - assume !(($i7 == 1)); - goto $bb3; -$bb3: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 960, 7} true; - assume {:verifier.code 0} true; - $i17 := $sext.i8.i32($i0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 960, 9} true; - assume {:verifier.code 0} true; - $i18 := $srem.i32($i17, 128); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 960, 7} true; - assume {:verifier.code 0} true; - $i19 := $trunc.i32.i8($i18); - call {:cexpr "a"} boogie_si_record_i8($i19); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 961, 8} true; - assume {:verifier.code 0} true; - $i20 := $sext.i8.i32($i19); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 961, 5} true; - assume {:verifier.code 0} true; - $i21 := $sext.i8.i32($i19); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 961, 5} true; - assume {:verifier.code 0} true; - $i22 := $add.i32($i21, $i20); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 961, 5} true; - assume {:verifier.code 0} true; - $i23 := $trunc.i32.i8($i22); - call {:cexpr "a"} boogie_si_record_i8($i23); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 962, 7} true; - assume {:verifier.code 0} true; - $i24 := $sext.i8.i32($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 962, 9} true; - assume {:verifier.code 0} true; - $i25 := $srem.i32($i24, 128); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 962, 7} true; - assume {:verifier.code 0} true; - $i26 := $trunc.i32.i8($i25); - call {:cexpr "b"} boogie_si_record_i8($i26); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 963, 8} true; - assume {:verifier.code 0} true; - $i27 := $sext.i8.i32($i26); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 963, 5} true; - assume {:verifier.code 0} true; - $i28 := $sext.i8.i32($i26); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 963, 5} true; - assume {:verifier.code 0} true; - $i29 := $add.i32($i28, $i27); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 963, 5} true; - assume {:verifier.code 0} true; - $i30 := $trunc.i32.i8($i29); - call {:cexpr "b"} boogie_si_record_i8($i30); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 965, 8} true; - assume {:verifier.code 0} true; - $i31 := $sext.i8.i32($i8); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 965, 5} true; - assume {:verifier.code 0} true; - $i32 := $sext.i8.i32($i8); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 965, 5} true; - assume {:verifier.code 0} true; - $i33 := $add.i32($i32, $i31); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 965, 5} true; - assume {:verifier.code 0} true; - $i34 := $trunc.i32.i8($i33); - call {:cexpr "c"} boogie_si_record_i8($i34); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 966, 7} true; - assume {:verifier.code 0} true; - $i35 := $sext.i8.i32($i23); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 966, 9} true; - assume {:verifier.code 0} true; - $i36 := $slt.i32($i35, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 966, 7} true; - assume {:verifier.code 0} true; - $i37 := $i34; - assume {:branchcond $i36} true; - goto $bb10, $bb11; -$bb4: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 956, 15} true; - assume {:verifier.code 0} true; - assume ($i10 == 1); - goto $bb5; -$bb5: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 957, 9} true; - assume {:verifier.code 0} true; - $i14 := $sext.i8.i32($i5); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 957, 9} true; - assume {:verifier.code 0} true; - $i15 := $add.i32($i14, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 957, 9} true; - assume {:verifier.code 0} true; - $i16 := $trunc.i32.i8($i15); - call {:cexpr "c"} boogie_si_record_i8($i16); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 958, 5} true; - assume {:verifier.code 0} true; - $i13 := $i16; - goto $bb9; -$bb6: - assume !(($i10 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 956, 18} true; - assume {:verifier.code 0} true; - $i11 := $sext.i8.i32($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 956, 20} true; - assume {:verifier.code 0} true; - $i12 := $sgt.i32($i11, 127); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 956, 9} true; - assume {:verifier.code 0} true; - $i13 := $i5; - assume {:branchcond $i12} true; - goto $bb7, $bb8; -$bb7: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 956, 9} true; - assume {:verifier.code 0} true; - assume ($i12 == 1); - goto $bb5; -$bb8: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 956, 9} true; - assume {:verifier.code 0} true; - assume !(($i12 == 1)); - goto $bb9; -$bb9: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 959, 3} true; - assume {:verifier.code 0} true; - $i8 := $i13; - goto $bb3; -$bb10: - assume ($i36 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 967, 9} true; - assume {:verifier.code 0} true; - $i38 := $sext.i8.i32($i30); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 967, 11} true; - assume {:verifier.code 0} true; - $i39 := $slt.i32($i38, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 967, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i39} true; - goto $bb13, $bb15; -$bb11: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 966, 7} true; - assume {:verifier.code 0} true; - assume !(($i36 == 1)); - goto $bb12; -$bb12: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 971, 7} true; - assume {:verifier.code 0} true; - $i46 := $sext.i8.i32($i23); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 971, 9} true; - assume {:verifier.code 0} true; - $i47 := $srem.i32($i46, 128); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 971, 7} true; - assume {:verifier.code 0} true; - $i48 := $trunc.i32.i8($i47); - call {:cexpr "a"} boogie_si_record_i8($i48); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 972, 8} true; - assume {:verifier.code 0} true; - $i49 := $sext.i8.i32($i48); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 972, 5} true; - assume {:verifier.code 0} true; - $i50 := $sext.i8.i32($i48); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 972, 5} true; - assume {:verifier.code 0} true; - $i51 := $add.i32($i50, $i49); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 972, 5} true; - assume {:verifier.code 0} true; - $i52 := $trunc.i32.i8($i51); - call {:cexpr "a"} boogie_si_record_i8($i52); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 973, 7} true; - assume {:verifier.code 0} true; - $i53 := $sext.i8.i32($i30); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 973, 9} true; - assume {:verifier.code 0} true; - $i54 := $srem.i32($i53, 128); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 973, 7} true; - assume {:verifier.code 0} true; - $i55 := $trunc.i32.i8($i54); - call {:cexpr "b"} boogie_si_record_i8($i55); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 974, 8} true; - assume {:verifier.code 0} true; - $i56 := $sext.i8.i32($i55); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 974, 5} true; - assume {:verifier.code 0} true; - $i57 := $sext.i8.i32($i55); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 974, 5} true; - assume {:verifier.code 0} true; - $i58 := $add.i32($i57, $i56); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 974, 5} true; - assume {:verifier.code 0} true; - $i59 := $trunc.i32.i8($i58); - call {:cexpr "b"} boogie_si_record_i8($i59); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 976, 8} true; - assume {:verifier.code 0} true; - $i60 := $sext.i8.i32($i37); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 976, 5} true; - assume {:verifier.code 0} true; - $i61 := $sext.i8.i32($i37); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 976, 5} true; - assume {:verifier.code 0} true; - $i62 := $add.i32($i61, $i60); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 976, 5} true; - assume {:verifier.code 0} true; - $i63 := $trunc.i32.i8($i62); - call {:cexpr "c"} boogie_si_record_i8($i63); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 977, 7} true; - assume {:verifier.code 0} true; - $i64 := $sext.i8.i32($i52); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 977, 9} true; - assume {:verifier.code 0} true; - $i65 := $slt.i32($i64, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 977, 7} true; - assume {:verifier.code 0} true; - $i66 := $i63; - assume {:branchcond $i65} true; - goto $bb19, $bb20; -$bb13: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 967, 15} true; - assume {:verifier.code 0} true; - assume ($i39 == 1); - goto $bb14; -$bb14: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 968, 9} true; - assume {:verifier.code 0} true; - $i43 := $sext.i8.i32($i34); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 968, 9} true; - assume {:verifier.code 0} true; - $i44 := $add.i32($i43, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 968, 9} true; - assume {:verifier.code 0} true; - $i45 := $trunc.i32.i8($i44); - call {:cexpr "c"} boogie_si_record_i8($i45); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 969, 5} true; - assume {:verifier.code 0} true; - $i42 := $i45; - goto $bb18; -$bb15: - assume !(($i39 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 967, 18} true; - assume {:verifier.code 0} true; - $i40 := $sext.i8.i32($i30); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 967, 20} true; - assume {:verifier.code 0} true; - $i41 := $sgt.i32($i40, 127); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 967, 9} true; - assume {:verifier.code 0} true; - $i42 := $i34; - assume {:branchcond $i41} true; - goto $bb16, $bb17; -$bb16: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 967, 9} true; - assume {:verifier.code 0} true; - assume ($i41 == 1); - goto $bb14; -$bb17: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 967, 9} true; - assume {:verifier.code 0} true; - assume !(($i41 == 1)); - goto $bb18; -$bb18: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 970, 3} true; - assume {:verifier.code 0} true; - $i37 := $i42; - goto $bb12; -$bb19: - assume ($i65 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 978, 9} true; - assume {:verifier.code 0} true; - $i67 := $sext.i8.i32($i59); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 978, 11} true; - assume {:verifier.code 0} true; - $i68 := $slt.i32($i67, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 978, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i68} true; - goto $bb22, $bb24; -$bb20: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 977, 7} true; - assume {:verifier.code 0} true; - assume !(($i65 == 1)); - goto $bb21; -$bb21: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 982, 7} true; - assume {:verifier.code 0} true; - $i75 := $sext.i8.i32($i52); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 982, 9} true; - assume {:verifier.code 0} true; - $i76 := $srem.i32($i75, 128); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 982, 7} true; - assume {:verifier.code 0} true; - $i77 := $trunc.i32.i8($i76); - call {:cexpr "a"} boogie_si_record_i8($i77); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 983, 8} true; - assume {:verifier.code 0} true; - $i78 := $sext.i8.i32($i77); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 983, 5} true; - assume {:verifier.code 0} true; - $i79 := $sext.i8.i32($i77); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 983, 5} true; - assume {:verifier.code 0} true; - $i80 := $add.i32($i79, $i78); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 983, 5} true; - assume {:verifier.code 0} true; - $i81 := $trunc.i32.i8($i80); - call {:cexpr "a"} boogie_si_record_i8($i81); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 984, 7} true; - assume {:verifier.code 0} true; - $i82 := $sext.i8.i32($i59); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 984, 9} true; - assume {:verifier.code 0} true; - $i83 := $srem.i32($i82, 128); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 984, 7} true; - assume {:verifier.code 0} true; - $i84 := $trunc.i32.i8($i83); - call {:cexpr "b"} boogie_si_record_i8($i84); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 985, 8} true; - assume {:verifier.code 0} true; - $i85 := $sext.i8.i32($i84); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 985, 5} true; - assume {:verifier.code 0} true; - $i86 := $sext.i8.i32($i84); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 985, 5} true; - assume {:verifier.code 0} true; - $i87 := $add.i32($i86, $i85); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 985, 5} true; - assume {:verifier.code 0} true; - $i88 := $trunc.i32.i8($i87); - call {:cexpr "b"} boogie_si_record_i8($i88); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 987, 8} true; - assume {:verifier.code 0} true; - $i89 := $sext.i8.i32($i66); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 987, 5} true; - assume {:verifier.code 0} true; - $i90 := $sext.i8.i32($i66); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 987, 5} true; - assume {:verifier.code 0} true; - $i91 := $add.i32($i90, $i89); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 987, 5} true; - assume {:verifier.code 0} true; - $i92 := $trunc.i32.i8($i91); - call {:cexpr "c"} boogie_si_record_i8($i92); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 988, 7} true; - assume {:verifier.code 0} true; - $i93 := $sext.i8.i32($i81); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 988, 9} true; - assume {:verifier.code 0} true; - $i94 := $slt.i32($i93, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 988, 7} true; - assume {:verifier.code 0} true; - $i95 := $i92; - assume {:branchcond $i94} true; - goto $bb28, $bb29; -$bb22: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 978, 15} true; - assume {:verifier.code 0} true; - assume ($i68 == 1); - goto $bb23; -$bb23: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 979, 9} true; - assume {:verifier.code 0} true; - $i72 := $sext.i8.i32($i63); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 979, 9} true; - assume {:verifier.code 0} true; - $i73 := $add.i32($i72, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 979, 9} true; - assume {:verifier.code 0} true; - $i74 := $trunc.i32.i8($i73); - call {:cexpr "c"} boogie_si_record_i8($i74); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 980, 5} true; - assume {:verifier.code 0} true; - $i71 := $i74; - goto $bb27; -$bb24: - assume !(($i68 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 978, 18} true; - assume {:verifier.code 0} true; - $i69 := $sext.i8.i32($i59); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 978, 20} true; - assume {:verifier.code 0} true; - $i70 := $sgt.i32($i69, 127); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 978, 9} true; - assume {:verifier.code 0} true; - $i71 := $i63; - assume {:branchcond $i70} true; - goto $bb25, $bb26; -$bb25: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 978, 9} true; - assume {:verifier.code 0} true; - assume ($i70 == 1); - goto $bb23; -$bb26: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 978, 9} true; - assume {:verifier.code 0} true; - assume !(($i70 == 1)); - goto $bb27; -$bb27: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 981, 3} true; - assume {:verifier.code 0} true; - $i66 := $i71; - goto $bb21; -$bb28: - assume ($i94 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 989, 9} true; - assume {:verifier.code 0} true; - $i96 := $sext.i8.i32($i88); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 989, 11} true; - assume {:verifier.code 0} true; - $i97 := $slt.i32($i96, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 989, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i97} true; - goto $bb31, $bb33; -$bb29: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 988, 7} true; - assume {:verifier.code 0} true; - assume !(($i94 == 1)); - goto $bb30; -$bb30: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 993, 7} true; - assume {:verifier.code 0} true; - $i104 := $sext.i8.i32($i81); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 993, 9} true; - assume {:verifier.code 0} true; - $i105 := $srem.i32($i104, 128); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 993, 7} true; - assume {:verifier.code 0} true; - $i106 := $trunc.i32.i8($i105); - call {:cexpr "a"} boogie_si_record_i8($i106); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 994, 8} true; - assume {:verifier.code 0} true; - $i107 := $sext.i8.i32($i106); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 994, 5} true; - assume {:verifier.code 0} true; - $i108 := $sext.i8.i32($i106); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 994, 5} true; - assume {:verifier.code 0} true; - $i109 := $add.i32($i108, $i107); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 994, 5} true; - assume {:verifier.code 0} true; - $i110 := $trunc.i32.i8($i109); - call {:cexpr "a"} boogie_si_record_i8($i110); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 995, 7} true; - assume {:verifier.code 0} true; - $i111 := $sext.i8.i32($i88); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 995, 9} true; - assume {:verifier.code 0} true; - $i112 := $srem.i32($i111, 128); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 995, 7} true; - assume {:verifier.code 0} true; - $i113 := $trunc.i32.i8($i112); - call {:cexpr "b"} boogie_si_record_i8($i113); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 996, 8} true; - assume {:verifier.code 0} true; - $i114 := $sext.i8.i32($i113); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 996, 5} true; - assume {:verifier.code 0} true; - $i115 := $sext.i8.i32($i113); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 996, 5} true; - assume {:verifier.code 0} true; - $i116 := $add.i32($i115, $i114); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 996, 5} true; - assume {:verifier.code 0} true; - $i117 := $trunc.i32.i8($i116); - call {:cexpr "b"} boogie_si_record_i8($i117); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 998, 8} true; - assume {:verifier.code 0} true; - $i118 := $sext.i8.i32($i95); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 998, 5} true; - assume {:verifier.code 0} true; - $i119 := $sext.i8.i32($i95); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 998, 5} true; - assume {:verifier.code 0} true; - $i120 := $add.i32($i119, $i118); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 998, 5} true; - assume {:verifier.code 0} true; - $i121 := $trunc.i32.i8($i120); - call {:cexpr "c"} boogie_si_record_i8($i121); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 999, 7} true; - assume {:verifier.code 0} true; - $i122 := $sext.i8.i32($i110); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 999, 9} true; - assume {:verifier.code 0} true; - $i123 := $slt.i32($i122, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 999, 7} true; - assume {:verifier.code 0} true; - $i124 := $i121; - assume {:branchcond $i123} true; - goto $bb37, $bb38; -$bb31: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 989, 15} true; - assume {:verifier.code 0} true; - assume ($i97 == 1); - goto $bb32; -$bb32: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 990, 9} true; - assume {:verifier.code 0} true; - $i101 := $sext.i8.i32($i92); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 990, 9} true; - assume {:verifier.code 0} true; - $i102 := $add.i32($i101, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 990, 9} true; - assume {:verifier.code 0} true; - $i103 := $trunc.i32.i8($i102); - call {:cexpr "c"} boogie_si_record_i8($i103); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 991, 5} true; - assume {:verifier.code 0} true; - $i100 := $i103; - goto $bb36; -$bb33: - assume !(($i97 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 989, 18} true; - assume {:verifier.code 0} true; - $i98 := $sext.i8.i32($i88); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 989, 20} true; - assume {:verifier.code 0} true; - $i99 := $sgt.i32($i98, 127); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 989, 9} true; - assume {:verifier.code 0} true; - $i100 := $i92; - assume {:branchcond $i99} true; - goto $bb34, $bb35; -$bb34: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 989, 9} true; - assume {:verifier.code 0} true; - assume ($i99 == 1); - goto $bb32; -$bb35: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 989, 9} true; - assume {:verifier.code 0} true; - assume !(($i99 == 1)); - goto $bb36; -$bb36: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 992, 3} true; - assume {:verifier.code 0} true; - $i95 := $i100; - goto $bb30; -$bb37: - assume ($i123 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1000, 9} true; - assume {:verifier.code 0} true; - $i125 := $sext.i8.i32($i117); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1000, 11} true; - assume {:verifier.code 0} true; - $i126 := $slt.i32($i125, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1000, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i126} true; - goto $bb40, $bb42; -$bb38: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 999, 7} true; - assume {:verifier.code 0} true; - assume !(($i123 == 1)); - goto $bb39; -$bb39: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1004, 7} true; - assume {:verifier.code 0} true; - $i133 := $sext.i8.i32($i110); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1004, 9} true; - assume {:verifier.code 0} true; - $i134 := $srem.i32($i133, 128); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1004, 7} true; - assume {:verifier.code 0} true; - $i135 := $trunc.i32.i8($i134); - call {:cexpr "a"} boogie_si_record_i8($i135); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1005, 8} true; - assume {:verifier.code 0} true; - $i136 := $sext.i8.i32($i135); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1005, 5} true; - assume {:verifier.code 0} true; - $i137 := $sext.i8.i32($i135); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1005, 5} true; - assume {:verifier.code 0} true; - $i138 := $add.i32($i137, $i136); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1005, 5} true; - assume {:verifier.code 0} true; - $i139 := $trunc.i32.i8($i138); - call {:cexpr "a"} boogie_si_record_i8($i139); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1006, 7} true; - assume {:verifier.code 0} true; - $i140 := $sext.i8.i32($i117); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1006, 9} true; - assume {:verifier.code 0} true; - $i141 := $srem.i32($i140, 128); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1006, 7} true; - assume {:verifier.code 0} true; - $i142 := $trunc.i32.i8($i141); - call {:cexpr "b"} boogie_si_record_i8($i142); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1007, 8} true; - assume {:verifier.code 0} true; - $i143 := $sext.i8.i32($i142); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1007, 5} true; - assume {:verifier.code 0} true; - $i144 := $sext.i8.i32($i142); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1007, 5} true; - assume {:verifier.code 0} true; - $i145 := $add.i32($i144, $i143); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1007, 5} true; - assume {:verifier.code 0} true; - $i146 := $trunc.i32.i8($i145); - call {:cexpr "b"} boogie_si_record_i8($i146); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1009, 8} true; - assume {:verifier.code 0} true; - $i147 := $sext.i8.i32($i124); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1009, 5} true; - assume {:verifier.code 0} true; - $i148 := $sext.i8.i32($i124); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1009, 5} true; - assume {:verifier.code 0} true; - $i149 := $add.i32($i148, $i147); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1009, 5} true; - assume {:verifier.code 0} true; - $i150 := $trunc.i32.i8($i149); - call {:cexpr "c"} boogie_si_record_i8($i150); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1010, 7} true; - assume {:verifier.code 0} true; - $i151 := $sext.i8.i32($i139); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1010, 9} true; - assume {:verifier.code 0} true; - $i152 := $slt.i32($i151, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1010, 7} true; - assume {:verifier.code 0} true; - $i153 := $i150; - assume {:branchcond $i152} true; - goto $bb46, $bb47; -$bb40: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1000, 15} true; - assume {:verifier.code 0} true; - assume ($i126 == 1); - goto $bb41; -$bb41: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1001, 9} true; - assume {:verifier.code 0} true; - $i130 := $sext.i8.i32($i121); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1001, 9} true; - assume {:verifier.code 0} true; - $i131 := $add.i32($i130, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1001, 9} true; - assume {:verifier.code 0} true; - $i132 := $trunc.i32.i8($i131); - call {:cexpr "c"} boogie_si_record_i8($i132); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1002, 5} true; - assume {:verifier.code 0} true; - $i129 := $i132; - goto $bb45; -$bb42: - assume !(($i126 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1000, 18} true; - assume {:verifier.code 0} true; - $i127 := $sext.i8.i32($i117); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1000, 20} true; - assume {:verifier.code 0} true; - $i128 := $sgt.i32($i127, 127); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1000, 9} true; - assume {:verifier.code 0} true; - $i129 := $i121; - assume {:branchcond $i128} true; - goto $bb43, $bb44; -$bb43: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1000, 9} true; - assume {:verifier.code 0} true; - assume ($i128 == 1); - goto $bb41; -$bb44: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1000, 9} true; - assume {:verifier.code 0} true; - assume !(($i128 == 1)); - goto $bb45; -$bb45: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1003, 3} true; - assume {:verifier.code 0} true; - $i124 := $i129; - goto $bb39; -$bb46: - assume ($i152 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1011, 9} true; - assume {:verifier.code 0} true; - $i154 := $sext.i8.i32($i146); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1011, 11} true; - assume {:verifier.code 0} true; - $i155 := $slt.i32($i154, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1011, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i155} true; - goto $bb49, $bb51; -$bb47: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1010, 7} true; - assume {:verifier.code 0} true; - assume !(($i152 == 1)); - goto $bb48; -$bb48: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1015, 7} true; - assume {:verifier.code 0} true; - $i162 := $sext.i8.i32($i139); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1015, 9} true; - assume {:verifier.code 0} true; - $i163 := $srem.i32($i162, 128); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1015, 7} true; - assume {:verifier.code 0} true; - $i164 := $trunc.i32.i8($i163); - call {:cexpr "a"} boogie_si_record_i8($i164); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1016, 8} true; - assume {:verifier.code 0} true; - $i165 := $sext.i8.i32($i164); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1016, 5} true; - assume {:verifier.code 0} true; - $i166 := $sext.i8.i32($i164); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1016, 5} true; - assume {:verifier.code 0} true; - $i167 := $add.i32($i166, $i165); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1016, 5} true; - assume {:verifier.code 0} true; - $i168 := $trunc.i32.i8($i167); - call {:cexpr "a"} boogie_si_record_i8($i168); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1017, 7} true; - assume {:verifier.code 0} true; - $i169 := $sext.i8.i32($i146); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1017, 9} true; - assume {:verifier.code 0} true; - $i170 := $srem.i32($i169, 128); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1017, 7} true; - assume {:verifier.code 0} true; - $i171 := $trunc.i32.i8($i170); - call {:cexpr "b"} boogie_si_record_i8($i171); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1018, 8} true; - assume {:verifier.code 0} true; - $i172 := $sext.i8.i32($i171); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1018, 5} true; - assume {:verifier.code 0} true; - $i173 := $sext.i8.i32($i171); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1018, 5} true; - assume {:verifier.code 0} true; - $i174 := $add.i32($i173, $i172); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1018, 5} true; - assume {:verifier.code 0} true; - $i175 := $trunc.i32.i8($i174); - call {:cexpr "b"} boogie_si_record_i8($i175); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1020, 8} true; - assume {:verifier.code 0} true; - $i176 := $sext.i8.i32($i153); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1020, 5} true; - assume {:verifier.code 0} true; - $i177 := $sext.i8.i32($i153); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1020, 5} true; - assume {:verifier.code 0} true; - $i178 := $add.i32($i177, $i176); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1020, 5} true; - assume {:verifier.code 0} true; - $i179 := $trunc.i32.i8($i178); - call {:cexpr "c"} boogie_si_record_i8($i179); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1021, 7} true; - assume {:verifier.code 0} true; - $i180 := $sext.i8.i32($i168); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1021, 9} true; - assume {:verifier.code 0} true; - $i181 := $slt.i32($i180, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1021, 7} true; - assume {:verifier.code 0} true; - $i182 := $i179; - assume {:branchcond $i181} true; - goto $bb55, $bb56; -$bb49: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1011, 15} true; - assume {:verifier.code 0} true; - assume ($i155 == 1); - goto $bb50; -$bb50: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1012, 9} true; - assume {:verifier.code 0} true; - $i159 := $sext.i8.i32($i150); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1012, 9} true; - assume {:verifier.code 0} true; - $i160 := $add.i32($i159, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1012, 9} true; - assume {:verifier.code 0} true; - $i161 := $trunc.i32.i8($i160); - call {:cexpr "c"} boogie_si_record_i8($i161); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1013, 5} true; - assume {:verifier.code 0} true; - $i158 := $i161; - goto $bb54; -$bb51: - assume !(($i155 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1011, 18} true; - assume {:verifier.code 0} true; - $i156 := $sext.i8.i32($i146); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1011, 20} true; - assume {:verifier.code 0} true; - $i157 := $sgt.i32($i156, 127); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1011, 9} true; - assume {:verifier.code 0} true; - $i158 := $i150; - assume {:branchcond $i157} true; - goto $bb52, $bb53; -$bb52: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1011, 9} true; - assume {:verifier.code 0} true; - assume ($i157 == 1); - goto $bb50; -$bb53: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1011, 9} true; - assume {:verifier.code 0} true; - assume !(($i157 == 1)); - goto $bb54; -$bb54: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1014, 3} true; - assume {:verifier.code 0} true; - $i153 := $i158; - goto $bb48; -$bb55: - assume ($i181 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1022, 9} true; - assume {:verifier.code 0} true; - $i183 := $sext.i8.i32($i175); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1022, 11} true; - assume {:verifier.code 0} true; - $i184 := $slt.i32($i183, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1022, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i184} true; - goto $bb58, $bb60; -$bb56: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1021, 7} true; - assume {:verifier.code 0} true; - assume !(($i181 == 1)); - goto $bb57; -$bb57: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1026, 7} true; - assume {:verifier.code 0} true; - $i191 := $sext.i8.i32($i168); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1026, 9} true; - assume {:verifier.code 0} true; - $i192 := $srem.i32($i191, 128); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1026, 7} true; - assume {:verifier.code 0} true; - $i193 := $trunc.i32.i8($i192); - call {:cexpr "a"} boogie_si_record_i8($i193); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1027, 8} true; - assume {:verifier.code 0} true; - $i194 := $sext.i8.i32($i193); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1027, 5} true; - assume {:verifier.code 0} true; - $i195 := $sext.i8.i32($i193); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1027, 5} true; - assume {:verifier.code 0} true; - $i196 := $add.i32($i195, $i194); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1027, 5} true; - assume {:verifier.code 0} true; - $i197 := $trunc.i32.i8($i196); - call {:cexpr "a"} boogie_si_record_i8($i197); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1028, 7} true; - assume {:verifier.code 0} true; - $i198 := $sext.i8.i32($i175); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1028, 9} true; - assume {:verifier.code 0} true; - $i199 := $srem.i32($i198, 128); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1028, 7} true; - assume {:verifier.code 0} true; - $i200 := $trunc.i32.i8($i199); - call {:cexpr "b"} boogie_si_record_i8($i200); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1029, 8} true; - assume {:verifier.code 0} true; - $i201 := $sext.i8.i32($i200); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1029, 5} true; - assume {:verifier.code 0} true; - $i202 := $sext.i8.i32($i200); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1029, 5} true; - assume {:verifier.code 0} true; - $i203 := $add.i32($i202, $i201); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1029, 5} true; - assume {:verifier.code 0} true; - $i204 := $trunc.i32.i8($i203); - call {:cexpr "b"} boogie_si_record_i8($i204); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1031, 8} true; - assume {:verifier.code 0} true; - $i205 := $sext.i8.i32($i182); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1031, 5} true; - assume {:verifier.code 0} true; - $i206 := $sext.i8.i32($i182); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1031, 5} true; - assume {:verifier.code 0} true; - $i207 := $add.i32($i206, $i205); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1031, 5} true; - assume {:verifier.code 0} true; - $i208 := $trunc.i32.i8($i207); - call {:cexpr "c"} boogie_si_record_i8($i208); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1032, 7} true; - assume {:verifier.code 0} true; - $i209 := $sext.i8.i32($i197); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1032, 9} true; - assume {:verifier.code 0} true; - $i210 := $slt.i32($i209, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1032, 7} true; - assume {:verifier.code 0} true; - $i211 := $i208; - assume {:branchcond $i210} true; - goto $bb64, $bb65; -$bb58: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1022, 15} true; - assume {:verifier.code 0} true; - assume ($i184 == 1); - goto $bb59; -$bb59: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1023, 9} true; - assume {:verifier.code 0} true; - $i188 := $sext.i8.i32($i179); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1023, 9} true; - assume {:verifier.code 0} true; - $i189 := $add.i32($i188, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1023, 9} true; - assume {:verifier.code 0} true; - $i190 := $trunc.i32.i8($i189); - call {:cexpr "c"} boogie_si_record_i8($i190); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1024, 5} true; - assume {:verifier.code 0} true; - $i187 := $i190; - goto $bb63; -$bb60: - assume !(($i184 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1022, 18} true; - assume {:verifier.code 0} true; - $i185 := $sext.i8.i32($i175); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1022, 20} true; - assume {:verifier.code 0} true; - $i186 := $sgt.i32($i185, 127); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1022, 9} true; - assume {:verifier.code 0} true; - $i187 := $i179; - assume {:branchcond $i186} true; - goto $bb61, $bb62; -$bb61: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1022, 9} true; - assume {:verifier.code 0} true; - assume ($i186 == 1); - goto $bb59; -$bb62: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1022, 9} true; - assume {:verifier.code 0} true; - assume !(($i186 == 1)); - goto $bb63; -$bb63: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1025, 3} true; - assume {:verifier.code 0} true; - $i182 := $i187; - goto $bb57; -$bb64: - assume ($i210 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1033, 9} true; - assume {:verifier.code 0} true; - $i212 := $sext.i8.i32($i204); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1033, 11} true; - assume {:verifier.code 0} true; - $i213 := $slt.i32($i212, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1033, 15} true; - assume {:verifier.code 0} true; - assume {:branchcond $i213} true; - goto $bb67, $bb69; -$bb65: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1032, 7} true; - assume {:verifier.code 0} true; - assume !(($i210 == 1)); - goto $bb66; -$bb66: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1042, 3} true; - assume {:verifier.code 0} true; - $r := $i211; - $exn := false; - return; -$bb67: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1033, 15} true; - assume {:verifier.code 0} true; - assume ($i213 == 1); - goto $bb68; -$bb68: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1034, 9} true; - assume {:verifier.code 0} true; - $i217 := $sext.i8.i32($i208); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1034, 9} true; - assume {:verifier.code 0} true; - $i218 := $add.i32($i217, 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1034, 9} true; - assume {:verifier.code 0} true; - $i219 := $trunc.i32.i8($i218); - call {:cexpr "c"} boogie_si_record_i8($i219); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1035, 5} true; - assume {:verifier.code 0} true; - $i216 := $i219; - goto $bb72; -$bb69: - assume !(($i213 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1033, 18} true; - assume {:verifier.code 0} true; - $i214 := $sext.i8.i32($i204); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1033, 20} true; - assume {:verifier.code 0} true; - $i215 := $sgt.i32($i214, 127); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1033, 9} true; - assume {:verifier.code 0} true; - $i216 := $i208; - assume {:branchcond $i215} true; - goto $bb70, $bb71; -$bb70: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1033, 9} true; - assume {:verifier.code 0} true; - assume ($i215 == 1); - goto $bb68; -$bb71: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1033, 9} true; - assume {:verifier.code 0} true; - assume !(($i215 == 1)); - goto $bb72; -$bb72: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1036, 3} true; - assume {:verifier.code 0} true; - $i211 := $i216; - goto $bb66; -} -const __SMACK_or32: ref; -axiom (__SMACK_or32 == $sub.ref(0, 27951)); -procedure __SMACK_or32($i0: i32, $i1: i32) - returns ($r: i32) -{ - var $i2: i32; - var $i3: i1; - var $i4: i32; - var $i6: i1; - var $i8: i32; - var $i7: i32; - var $i5: i32; - var $i9: i32; - var $i10: i64; - var $i11: i64; - var $i12: i32; - var $i13: i32; - var $i14: i64; - var $i15: i64; - var $i16: i32; - var $i17: i32; - var $i18: i1; - var $i19: i32; - var $i21: i1; - var $i23: i32; - var $i22: i32; - var $i20: i32; - var $i24: i32; - var $i25: i64; - var $i26: i64; - var $i27: i32; - var $i28: i32; - var $i29: i64; - var $i30: i64; - var $i31: i32; - var $i32: i32; - var $i33: i1; - var $i34: i32; - var $i36: i1; - var $i38: i32; - var $i37: i32; - var $i35: i32; - var $i39: i32; - var $i40: i64; - var $i41: i64; - var $i42: i32; - var $i43: i32; - var $i44: i64; - var $i45: i64; - var $i46: i32; - var $i47: i32; - var $i48: i1; - var $i49: i32; - var $i51: i1; - var $i53: i32; - var $i52: i32; - var $i50: i32; - var $i54: i32; - var $i55: i64; - var $i56: i64; - var $i57: i32; - var $i58: i32; - var $i59: i64; - var $i60: i64; - var $i61: i32; - var $i62: i32; - var $i63: i1; - var $i64: i32; - var $i66: i1; - var $i68: i32; - var $i67: i32; - var $i65: i32; - var $i69: i32; - var $i70: i64; - var $i71: i64; - var $i72: i32; - var $i73: i32; - var $i74: i64; - var $i75: i64; - var $i76: i32; - var $i77: i32; - var $i78: i1; - var $i79: i32; - var $i81: i1; - var $i83: i32; - var $i82: i32; - var $i80: i32; - var $i84: i32; - var $i85: i64; - var $i86: i64; - var $i87: i32; - var $i88: i32; - var $i89: i64; - var $i90: i64; - var $i91: i32; - var $i92: i32; - var $i93: i1; - var $i94: i32; - var $i96: i1; - var $i98: i32; - var $i97: i32; - var $i95: i32; - var $i99: i32; - var $i100: i64; - var $i101: i64; - var $i102: i32; - var $i103: i32; - var $i104: i64; - var $i105: i64; - var $i106: i32; - var $i107: i32; - var $i108: i1; - var $i109: i32; - var $i111: i1; - var $i113: i32; - var $i112: i32; - var $i110: i32; - var $i114: i32; - var $i115: i64; - var $i116: i64; - var $i117: i32; - var $i118: i32; - var $i119: i64; - var $i120: i64; - var $i121: i32; - var $i122: i32; - var $i123: i1; - var $i124: i32; - var $i126: i1; - var $i128: i32; - var $i127: i32; - var $i125: i32; - var $i129: i32; - var $i130: i64; - var $i131: i64; - var $i132: i32; - var $i133: i32; - var $i134: i64; - var $i135: i64; - var $i136: i32; - var $i137: i32; - var $i138: i1; - var $i139: i32; - var $i141: i1; - var $i143: i32; - var $i142: i32; - var $i140: i32; - var $i144: i32; - var $i145: i64; - var $i146: i64; - var $i147: i32; - var $i148: i32; - var $i149: i64; - var $i150: i64; - var $i151: i32; - var $i152: i32; - var $i153: i1; - var $i154: i32; - var $i156: i1; - var $i158: i32; - var $i157: i32; - var $i155: i32; - var $i159: i32; - var $i160: i64; - var $i161: i64; - var $i162: i32; - var $i163: i32; - var $i164: i64; - var $i165: i64; - var $i166: i32; - var $i167: i32; - var $i168: i1; - var $i169: i32; - var $i171: i1; - var $i173: i32; - var $i172: i32; - var $i170: i32; - var $i174: i32; - var $i175: i64; - var $i176: i64; - var $i177: i32; - var $i178: i32; - var $i179: i64; - var $i180: i64; - var $i181: i32; - var $i182: i32; - var $i183: i1; - var $i184: i32; - var $i186: i1; - var $i188: i32; - var $i187: i32; - var $i185: i32; - var $i189: i32; - var $i190: i64; - var $i191: i64; - var $i192: i32; - var $i193: i32; - var $i194: i64; - var $i195: i64; - var $i196: i32; - var $i197: i32; - var $i198: i1; - var $i199: i32; - var $i201: i1; - var $i203: i32; - var $i202: i32; - var $i200: i32; - var $i204: i32; - var $i205: i64; - var $i206: i64; - var $i207: i32; - var $i208: i32; - var $i209: i64; - var $i210: i64; - var $i211: i32; - var $i212: i32; - var $i213: i1; - var $i214: i32; - var $i216: i1; - var $i218: i32; - var $i217: i32; - var $i215: i32; - var $i219: i32; - var $i220: i64; - var $i221: i64; - var $i222: i32; - var $i223: i32; - var $i224: i64; - var $i225: i64; - var $i226: i32; - var $i227: i32; - var $i228: i1; - var $i229: i32; - var $i231: i1; - var $i233: i32; - var $i232: i32; - var $i230: i32; - var $i234: i32; - var $i235: i64; - var $i236: i64; - var $i237: i32; - var $i238: i32; - var $i239: i64; - var $i240: i64; - var $i241: i32; - var $i242: i32; - var $i243: i1; - var $i244: i32; - var $i246: i1; - var $i248: i32; - var $i247: i32; - var $i245: i32; - var $i249: i32; - var $i250: i64; - var $i251: i64; - var $i252: i32; - var $i253: i32; - var $i254: i64; - var $i255: i64; - var $i256: i32; - var $i257: i32; - var $i258: i1; - var $i259: i32; - var $i261: i1; - var $i263: i32; - var $i262: i32; - var $i260: i32; - var $i264: i32; - var $i265: i64; - var $i266: i64; - var $i267: i32; - var $i268: i32; - var $i269: i64; - var $i270: i64; - var $i271: i32; - var $i272: i32; - var $i273: i1; - var $i274: i32; - var $i276: i1; - var $i278: i32; - var $i277: i32; - var $i275: i32; - var $i279: i32; - var $i280: i64; - var $i281: i64; - var $i282: i32; - var $i283: i32; - var $i284: i64; - var $i285: i64; - var $i286: i32; - var $i287: i32; - var $i288: i1; - var $i289: i32; - var $i291: i1; - var $i293: i32; - var $i292: i32; - var $i290: i32; - var $i294: i32; - var $i295: i64; - var $i296: i64; - var $i297: i32; - var $i298: i32; - var $i299: i64; - var $i300: i64; - var $i301: i32; - var $i302: i32; - var $i303: i1; - var $i304: i32; - var $i306: i1; - var $i308: i32; - var $i307: i32; - var $i305: i32; - var $i309: i32; - var $i310: i64; - var $i311: i64; - var $i312: i32; - var $i313: i32; - var $i314: i64; - var $i315: i64; - var $i316: i32; - var $i317: i32; - var $i318: i1; - var $i319: i32; - var $i321: i1; - var $i323: i32; - var $i322: i32; - var $i320: i32; - var $i324: i32; - var $i325: i64; - var $i326: i64; - var $i327: i32; - var $i328: i32; - var $i329: i64; - var $i330: i64; - var $i331: i32; - var $i332: i32; - var $i333: i1; - var $i334: i32; - var $i336: i1; - var $i338: i32; - var $i337: i32; - var $i335: i32; - var $i339: i32; - var $i340: i64; - var $i341: i64; - var $i342: i32; - var $i343: i32; - var $i344: i64; - var $i345: i64; - var $i346: i32; - var $i347: i32; - var $i348: i1; - var $i349: i32; - var $i351: i1; - var $i353: i32; - var $i352: i32; - var $i350: i32; - var $i354: i32; - var $i355: i64; - var $i356: i64; - var $i357: i32; - var $i358: i32; - var $i359: i64; - var $i360: i64; - var $i361: i32; - var $i362: i32; - var $i363: i1; - var $i364: i32; - var $i366: i1; - var $i368: i32; - var $i367: i32; - var $i365: i32; - var $i369: i32; - var $i370: i64; - var $i371: i64; - var $i372: i32; - var $i373: i32; - var $i374: i64; - var $i375: i64; - var $i376: i32; - var $i377: i32; - var $i378: i1; - var $i379: i32; - var $i381: i1; - var $i383: i32; - var $i382: i32; - var $i380: i32; - var $i384: i32; - var $i385: i64; - var $i386: i64; - var $i387: i32; - var $i388: i32; - var $i389: i64; - var $i390: i64; - var $i391: i32; - var $i392: i32; - var $i393: i1; - var $i394: i32; - var $i396: i1; - var $i398: i32; - var $i397: i32; - var $i395: i32; - var $i399: i32; - var $i400: i64; - var $i401: i64; - var $i402: i32; - var $i403: i32; - var $i404: i64; - var $i405: i64; - var $i406: i32; - var $i407: i32; - var $i408: i1; - var $i409: i32; - var $i411: i1; - var $i413: i32; - var $i412: i32; - var $i410: i32; - var $i414: i32; - var $i415: i64; - var $i416: i64; - var $i417: i32; - var $i418: i32; - var $i419: i64; - var $i420: i64; - var $i421: i32; - var $i422: i32; - var $i423: i1; - var $i424: i32; - var $i426: i1; - var $i428: i32; - var $i427: i32; - var $i425: i32; - var $i429: i32; - var $i430: i64; - var $i431: i64; - var $i432: i32; - var $i433: i32; - var $i434: i64; - var $i435: i64; - var $i436: i32; - var $i437: i32; - var $i438: i1; - var $i439: i32; - var $i441: i1; - var $i443: i32; - var $i442: i32; - var $i440: i32; - var $i444: i32; - var $i445: i64; - var $i446: i64; - var $i447: i32; - var $i448: i32; - var $i449: i64; - var $i450: i64; - var $i451: i32; - var $i452: i32; - var $i453: i1; - var $i454: i32; - var $i456: i1; - var $i458: i32; - var $i457: i32; - var $i455: i32; - var $i459: i32; - var $i460: i64; - var $i461: i64; - var $i462: i32; - var $i463: i32; - var $i464: i64; - var $i465: i64; - var $i466: i32; - var $i467: i32; - var $i468: i1; - var $i469: i32; - var $i471: i1; - var $i473: i32; - var $i472: i32; - var $i470: i32; -$bb0: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1048, 5} true; - assume {:verifier.code 0} true; - call {:cexpr "__SMACK_or32:arg:a"} boogie_si_record_i32($i0); - call {:cexpr "__SMACK_or32:arg:b"} boogie_si_record_i32($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1048, 5} true; - assume {:verifier.code 0} true; - $i2 := $add.i32(0, 0); - call {:cexpr "c"} boogie_si_record_i32($i2); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1049, 9} true; - assume {:verifier.code 0} true; - $i3 := $slt.i32($i0, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1049, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i3} true; - goto $bb1, $bb2; -$bb1: - assume ($i3 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1050, 7} true; - assume {:verifier.code 0} true; - $i4 := $add.i32($i2, 1); - call {:cexpr "c"} boogie_si_record_i32($i4); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1051, 3} true; - assume {:verifier.code 0} true; - $i5 := $i4; - goto $bb3; -$bb2: - assume !(($i3 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1051, 16} true; - assume {:verifier.code 0} true; - $i6 := $slt.i32($i1, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1051, 14} true; - assume {:verifier.code 0} true; - $i7 := $i2; - assume {:branchcond $i6} true; - goto $bb4, $bb5; -$bb3: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1054, 5} true; - assume {:verifier.code 0} true; - $i9 := $add.i32($i0, $i0); - call {:cexpr "a"} boogie_si_record_i32($i9); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1055, 7} true; - assume {:verifier.code 0} true; - $i10 := $sext.i32.i64($i9); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1055, 9} true; - assume {:verifier.code 0} true; - $i11 := $srem.i64($i10, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1055, 7} true; - assume {:verifier.code 0} true; - $i12 := $trunc.i64.i32($i11); - call {:cexpr "a"} boogie_si_record_i32($i12); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1056, 5} true; - assume {:verifier.code 0} true; - $i13 := $add.i32($i1, $i1); - call {:cexpr "b"} boogie_si_record_i32($i13); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1057, 7} true; - assume {:verifier.code 0} true; - $i14 := $sext.i32.i64($i13); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1057, 9} true; - assume {:verifier.code 0} true; - $i15 := $srem.i64($i14, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1057, 7} true; - assume {:verifier.code 0} true; - $i16 := $trunc.i64.i32($i15); - call {:cexpr "b"} boogie_si_record_i32($i16); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1059, 5} true; - assume {:verifier.code 0} true; - $i17 := $add.i32($i5, $i5); - call {:cexpr "c"} boogie_si_record_i32($i17); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1060, 9} true; - assume {:verifier.code 0} true; - $i18 := $slt.i32($i12, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1060, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i18} true; - goto $bb7, $bb8; -$bb4: - assume ($i6 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1052, 7} true; - assume {:verifier.code 0} true; - $i8 := $add.i32($i2, 1); - call {:cexpr "c"} boogie_si_record_i32($i8); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1053, 3} true; - assume {:verifier.code 0} true; - $i7 := $i8; - goto $bb6; -$bb5: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1051, 14} true; - assume {:verifier.code 0} true; - assume !(($i6 == 1)); - goto $bb6; -$bb6: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i5 := $i7; - goto $bb3; -$bb7: - assume ($i18 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1061, 7} true; - assume {:verifier.code 0} true; - $i19 := $add.i32($i17, 1); - call {:cexpr "c"} boogie_si_record_i32($i19); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1062, 3} true; - assume {:verifier.code 0} true; - $i20 := $i19; - goto $bb9; -$bb8: - assume !(($i18 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1062, 16} true; - assume {:verifier.code 0} true; - $i21 := $slt.i32($i16, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1062, 14} true; - assume {:verifier.code 0} true; - $i22 := $i17; - assume {:branchcond $i21} true; - goto $bb10, $bb11; -$bb9: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1065, 5} true; - assume {:verifier.code 0} true; - $i24 := $add.i32($i12, $i12); - call {:cexpr "a"} boogie_si_record_i32($i24); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1066, 7} true; - assume {:verifier.code 0} true; - $i25 := $sext.i32.i64($i24); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1066, 9} true; - assume {:verifier.code 0} true; - $i26 := $srem.i64($i25, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1066, 7} true; - assume {:verifier.code 0} true; - $i27 := $trunc.i64.i32($i26); - call {:cexpr "a"} boogie_si_record_i32($i27); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1067, 5} true; - assume {:verifier.code 0} true; - $i28 := $add.i32($i16, $i16); - call {:cexpr "b"} boogie_si_record_i32($i28); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1068, 7} true; - assume {:verifier.code 0} true; - $i29 := $sext.i32.i64($i28); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1068, 9} true; - assume {:verifier.code 0} true; - $i30 := $srem.i64($i29, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1068, 7} true; - assume {:verifier.code 0} true; - $i31 := $trunc.i64.i32($i30); - call {:cexpr "b"} boogie_si_record_i32($i31); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1070, 5} true; - assume {:verifier.code 0} true; - $i32 := $add.i32($i20, $i20); - call {:cexpr "c"} boogie_si_record_i32($i32); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1071, 9} true; - assume {:verifier.code 0} true; - $i33 := $slt.i32($i27, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1071, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i33} true; - goto $bb13, $bb14; -$bb10: - assume ($i21 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1063, 7} true; - assume {:verifier.code 0} true; - $i23 := $add.i32($i17, 1); - call {:cexpr "c"} boogie_si_record_i32($i23); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1064, 3} true; - assume {:verifier.code 0} true; - $i22 := $i23; - goto $bb12; -$bb11: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1062, 14} true; - assume {:verifier.code 0} true; - assume !(($i21 == 1)); - goto $bb12; -$bb12: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i20 := $i22; - goto $bb9; -$bb13: - assume ($i33 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1072, 7} true; - assume {:verifier.code 0} true; - $i34 := $add.i32($i32, 1); - call {:cexpr "c"} boogie_si_record_i32($i34); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1073, 3} true; - assume {:verifier.code 0} true; - $i35 := $i34; - goto $bb15; -$bb14: - assume !(($i33 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1073, 16} true; - assume {:verifier.code 0} true; - $i36 := $slt.i32($i31, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1073, 14} true; - assume {:verifier.code 0} true; - $i37 := $i32; - assume {:branchcond $i36} true; - goto $bb16, $bb17; -$bb15: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1076, 5} true; - assume {:verifier.code 0} true; - $i39 := $add.i32($i27, $i27); - call {:cexpr "a"} boogie_si_record_i32($i39); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1077, 7} true; - assume {:verifier.code 0} true; - $i40 := $sext.i32.i64($i39); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1077, 9} true; - assume {:verifier.code 0} true; - $i41 := $srem.i64($i40, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1077, 7} true; - assume {:verifier.code 0} true; - $i42 := $trunc.i64.i32($i41); - call {:cexpr "a"} boogie_si_record_i32($i42); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1078, 5} true; - assume {:verifier.code 0} true; - $i43 := $add.i32($i31, $i31); - call {:cexpr "b"} boogie_si_record_i32($i43); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1079, 7} true; - assume {:verifier.code 0} true; - $i44 := $sext.i32.i64($i43); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1079, 9} true; - assume {:verifier.code 0} true; - $i45 := $srem.i64($i44, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1079, 7} true; - assume {:verifier.code 0} true; - $i46 := $trunc.i64.i32($i45); - call {:cexpr "b"} boogie_si_record_i32($i46); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1081, 5} true; - assume {:verifier.code 0} true; - $i47 := $add.i32($i35, $i35); - call {:cexpr "c"} boogie_si_record_i32($i47); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1082, 9} true; - assume {:verifier.code 0} true; - $i48 := $slt.i32($i42, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1082, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i48} true; - goto $bb19, $bb20; -$bb16: - assume ($i36 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1074, 7} true; - assume {:verifier.code 0} true; - $i38 := $add.i32($i32, 1); - call {:cexpr "c"} boogie_si_record_i32($i38); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1075, 3} true; - assume {:verifier.code 0} true; - $i37 := $i38; - goto $bb18; -$bb17: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1073, 14} true; - assume {:verifier.code 0} true; - assume !(($i36 == 1)); - goto $bb18; -$bb18: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i35 := $i37; - goto $bb15; -$bb19: - assume ($i48 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1083, 7} true; - assume {:verifier.code 0} true; - $i49 := $add.i32($i47, 1); - call {:cexpr "c"} boogie_si_record_i32($i49); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1084, 3} true; - assume {:verifier.code 0} true; - $i50 := $i49; - goto $bb21; -$bb20: - assume !(($i48 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1084, 16} true; - assume {:verifier.code 0} true; - $i51 := $slt.i32($i46, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1084, 14} true; - assume {:verifier.code 0} true; - $i52 := $i47; - assume {:branchcond $i51} true; - goto $bb22, $bb23; -$bb21: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1087, 5} true; - assume {:verifier.code 0} true; - $i54 := $add.i32($i42, $i42); - call {:cexpr "a"} boogie_si_record_i32($i54); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1088, 7} true; - assume {:verifier.code 0} true; - $i55 := $sext.i32.i64($i54); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1088, 9} true; - assume {:verifier.code 0} true; - $i56 := $srem.i64($i55, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1088, 7} true; - assume {:verifier.code 0} true; - $i57 := $trunc.i64.i32($i56); - call {:cexpr "a"} boogie_si_record_i32($i57); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1089, 5} true; - assume {:verifier.code 0} true; - $i58 := $add.i32($i46, $i46); - call {:cexpr "b"} boogie_si_record_i32($i58); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1090, 7} true; - assume {:verifier.code 0} true; - $i59 := $sext.i32.i64($i58); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1090, 9} true; - assume {:verifier.code 0} true; - $i60 := $srem.i64($i59, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1090, 7} true; - assume {:verifier.code 0} true; - $i61 := $trunc.i64.i32($i60); - call {:cexpr "b"} boogie_si_record_i32($i61); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1092, 5} true; - assume {:verifier.code 0} true; - $i62 := $add.i32($i50, $i50); - call {:cexpr "c"} boogie_si_record_i32($i62); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1093, 9} true; - assume {:verifier.code 0} true; - $i63 := $slt.i32($i57, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1093, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i63} true; - goto $bb25, $bb26; -$bb22: - assume ($i51 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1085, 7} true; - assume {:verifier.code 0} true; - $i53 := $add.i32($i47, 1); - call {:cexpr "c"} boogie_si_record_i32($i53); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1086, 3} true; - assume {:verifier.code 0} true; - $i52 := $i53; - goto $bb24; -$bb23: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1084, 14} true; - assume {:verifier.code 0} true; - assume !(($i51 == 1)); - goto $bb24; -$bb24: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i50 := $i52; - goto $bb21; -$bb25: - assume ($i63 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1094, 7} true; - assume {:verifier.code 0} true; - $i64 := $add.i32($i62, 1); - call {:cexpr "c"} boogie_si_record_i32($i64); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1095, 3} true; - assume {:verifier.code 0} true; - $i65 := $i64; - goto $bb27; -$bb26: - assume !(($i63 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1095, 16} true; - assume {:verifier.code 0} true; - $i66 := $slt.i32($i61, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1095, 14} true; - assume {:verifier.code 0} true; - $i67 := $i62; - assume {:branchcond $i66} true; - goto $bb28, $bb29; -$bb27: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1098, 5} true; - assume {:verifier.code 0} true; - $i69 := $add.i32($i57, $i57); - call {:cexpr "a"} boogie_si_record_i32($i69); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1099, 7} true; - assume {:verifier.code 0} true; - $i70 := $sext.i32.i64($i69); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1099, 9} true; - assume {:verifier.code 0} true; - $i71 := $srem.i64($i70, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1099, 7} true; - assume {:verifier.code 0} true; - $i72 := $trunc.i64.i32($i71); - call {:cexpr "a"} boogie_si_record_i32($i72); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1100, 5} true; - assume {:verifier.code 0} true; - $i73 := $add.i32($i61, $i61); - call {:cexpr "b"} boogie_si_record_i32($i73); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1101, 7} true; - assume {:verifier.code 0} true; - $i74 := $sext.i32.i64($i73); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1101, 9} true; - assume {:verifier.code 0} true; - $i75 := $srem.i64($i74, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1101, 7} true; - assume {:verifier.code 0} true; - $i76 := $trunc.i64.i32($i75); - call {:cexpr "b"} boogie_si_record_i32($i76); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1103, 5} true; - assume {:verifier.code 0} true; - $i77 := $add.i32($i65, $i65); - call {:cexpr "c"} boogie_si_record_i32($i77); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1104, 9} true; - assume {:verifier.code 0} true; - $i78 := $slt.i32($i72, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1104, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i78} true; - goto $bb31, $bb32; -$bb28: - assume ($i66 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1096, 7} true; - assume {:verifier.code 0} true; - $i68 := $add.i32($i62, 1); - call {:cexpr "c"} boogie_si_record_i32($i68); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1097, 3} true; - assume {:verifier.code 0} true; - $i67 := $i68; - goto $bb30; -$bb29: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1095, 14} true; - assume {:verifier.code 0} true; - assume !(($i66 == 1)); - goto $bb30; -$bb30: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i65 := $i67; - goto $bb27; -$bb31: - assume ($i78 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1105, 7} true; - assume {:verifier.code 0} true; - $i79 := $add.i32($i77, 1); - call {:cexpr "c"} boogie_si_record_i32($i79); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1106, 3} true; - assume {:verifier.code 0} true; - $i80 := $i79; - goto $bb33; -$bb32: - assume !(($i78 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1106, 16} true; - assume {:verifier.code 0} true; - $i81 := $slt.i32($i76, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1106, 14} true; - assume {:verifier.code 0} true; - $i82 := $i77; - assume {:branchcond $i81} true; - goto $bb34, $bb35; -$bb33: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1109, 5} true; - assume {:verifier.code 0} true; - $i84 := $add.i32($i72, $i72); - call {:cexpr "a"} boogie_si_record_i32($i84); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1110, 7} true; - assume {:verifier.code 0} true; - $i85 := $sext.i32.i64($i84); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1110, 9} true; - assume {:verifier.code 0} true; - $i86 := $srem.i64($i85, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1110, 7} true; - assume {:verifier.code 0} true; - $i87 := $trunc.i64.i32($i86); - call {:cexpr "a"} boogie_si_record_i32($i87); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1111, 5} true; - assume {:verifier.code 0} true; - $i88 := $add.i32($i76, $i76); - call {:cexpr "b"} boogie_si_record_i32($i88); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1112, 7} true; - assume {:verifier.code 0} true; - $i89 := $sext.i32.i64($i88); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1112, 9} true; - assume {:verifier.code 0} true; - $i90 := $srem.i64($i89, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1112, 7} true; - assume {:verifier.code 0} true; - $i91 := $trunc.i64.i32($i90); - call {:cexpr "b"} boogie_si_record_i32($i91); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1114, 5} true; - assume {:verifier.code 0} true; - $i92 := $add.i32($i80, $i80); - call {:cexpr "c"} boogie_si_record_i32($i92); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1115, 9} true; - assume {:verifier.code 0} true; - $i93 := $slt.i32($i87, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1115, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i93} true; - goto $bb37, $bb38; -$bb34: - assume ($i81 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1107, 7} true; - assume {:verifier.code 0} true; - $i83 := $add.i32($i77, 1); - call {:cexpr "c"} boogie_si_record_i32($i83); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1108, 3} true; - assume {:verifier.code 0} true; - $i82 := $i83; - goto $bb36; -$bb35: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1106, 14} true; - assume {:verifier.code 0} true; - assume !(($i81 == 1)); - goto $bb36; -$bb36: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i80 := $i82; - goto $bb33; -$bb37: - assume ($i93 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1116, 7} true; - assume {:verifier.code 0} true; - $i94 := $add.i32($i92, 1); - call {:cexpr "c"} boogie_si_record_i32($i94); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1117, 3} true; - assume {:verifier.code 0} true; - $i95 := $i94; - goto $bb39; -$bb38: - assume !(($i93 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1117, 16} true; - assume {:verifier.code 0} true; - $i96 := $slt.i32($i91, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1117, 14} true; - assume {:verifier.code 0} true; - $i97 := $i92; - assume {:branchcond $i96} true; - goto $bb40, $bb41; -$bb39: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1120, 5} true; - assume {:verifier.code 0} true; - $i99 := $add.i32($i87, $i87); - call {:cexpr "a"} boogie_si_record_i32($i99); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1121, 7} true; - assume {:verifier.code 0} true; - $i100 := $sext.i32.i64($i99); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1121, 9} true; - assume {:verifier.code 0} true; - $i101 := $srem.i64($i100, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1121, 7} true; - assume {:verifier.code 0} true; - $i102 := $trunc.i64.i32($i101); - call {:cexpr "a"} boogie_si_record_i32($i102); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1122, 5} true; - assume {:verifier.code 0} true; - $i103 := $add.i32($i91, $i91); - call {:cexpr "b"} boogie_si_record_i32($i103); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1123, 7} true; - assume {:verifier.code 0} true; - $i104 := $sext.i32.i64($i103); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1123, 9} true; - assume {:verifier.code 0} true; - $i105 := $srem.i64($i104, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1123, 7} true; - assume {:verifier.code 0} true; - $i106 := $trunc.i64.i32($i105); - call {:cexpr "b"} boogie_si_record_i32($i106); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1125, 5} true; - assume {:verifier.code 0} true; - $i107 := $add.i32($i95, $i95); - call {:cexpr "c"} boogie_si_record_i32($i107); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1126, 9} true; - assume {:verifier.code 0} true; - $i108 := $slt.i32($i102, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1126, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i108} true; - goto $bb43, $bb44; -$bb40: - assume ($i96 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1118, 7} true; - assume {:verifier.code 0} true; - $i98 := $add.i32($i92, 1); - call {:cexpr "c"} boogie_si_record_i32($i98); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1119, 3} true; - assume {:verifier.code 0} true; - $i97 := $i98; - goto $bb42; -$bb41: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1117, 14} true; - assume {:verifier.code 0} true; - assume !(($i96 == 1)); - goto $bb42; -$bb42: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i95 := $i97; - goto $bb39; -$bb43: - assume ($i108 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1127, 7} true; - assume {:verifier.code 0} true; - $i109 := $add.i32($i107, 1); - call {:cexpr "c"} boogie_si_record_i32($i109); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1128, 3} true; - assume {:verifier.code 0} true; - $i110 := $i109; - goto $bb45; -$bb44: - assume !(($i108 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1128, 16} true; - assume {:verifier.code 0} true; - $i111 := $slt.i32($i106, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1128, 14} true; - assume {:verifier.code 0} true; - $i112 := $i107; - assume {:branchcond $i111} true; - goto $bb46, $bb47; -$bb45: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1131, 5} true; - assume {:verifier.code 0} true; - $i114 := $add.i32($i102, $i102); - call {:cexpr "a"} boogie_si_record_i32($i114); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1132, 7} true; - assume {:verifier.code 0} true; - $i115 := $sext.i32.i64($i114); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1132, 9} true; - assume {:verifier.code 0} true; - $i116 := $srem.i64($i115, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1132, 7} true; - assume {:verifier.code 0} true; - $i117 := $trunc.i64.i32($i116); - call {:cexpr "a"} boogie_si_record_i32($i117); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1133, 5} true; - assume {:verifier.code 0} true; - $i118 := $add.i32($i106, $i106); - call {:cexpr "b"} boogie_si_record_i32($i118); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1134, 7} true; - assume {:verifier.code 0} true; - $i119 := $sext.i32.i64($i118); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1134, 9} true; - assume {:verifier.code 0} true; - $i120 := $srem.i64($i119, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1134, 7} true; - assume {:verifier.code 0} true; - $i121 := $trunc.i64.i32($i120); - call {:cexpr "b"} boogie_si_record_i32($i121); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1136, 5} true; - assume {:verifier.code 0} true; - $i122 := $add.i32($i110, $i110); - call {:cexpr "c"} boogie_si_record_i32($i122); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1137, 9} true; - assume {:verifier.code 0} true; - $i123 := $slt.i32($i117, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1137, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i123} true; - goto $bb49, $bb50; -$bb46: - assume ($i111 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1129, 7} true; - assume {:verifier.code 0} true; - $i113 := $add.i32($i107, 1); - call {:cexpr "c"} boogie_si_record_i32($i113); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1130, 3} true; - assume {:verifier.code 0} true; - $i112 := $i113; - goto $bb48; -$bb47: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1128, 14} true; - assume {:verifier.code 0} true; - assume !(($i111 == 1)); - goto $bb48; -$bb48: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i110 := $i112; - goto $bb45; -$bb49: - assume ($i123 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1138, 7} true; - assume {:verifier.code 0} true; - $i124 := $add.i32($i122, 1); - call {:cexpr "c"} boogie_si_record_i32($i124); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1139, 3} true; - assume {:verifier.code 0} true; - $i125 := $i124; - goto $bb51; -$bb50: - assume !(($i123 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1139, 16} true; - assume {:verifier.code 0} true; - $i126 := $slt.i32($i121, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1139, 14} true; - assume {:verifier.code 0} true; - $i127 := $i122; - assume {:branchcond $i126} true; - goto $bb52, $bb53; -$bb51: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1142, 5} true; - assume {:verifier.code 0} true; - $i129 := $add.i32($i117, $i117); - call {:cexpr "a"} boogie_si_record_i32($i129); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1143, 7} true; - assume {:verifier.code 0} true; - $i130 := $sext.i32.i64($i129); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1143, 9} true; - assume {:verifier.code 0} true; - $i131 := $srem.i64($i130, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1143, 7} true; - assume {:verifier.code 0} true; - $i132 := $trunc.i64.i32($i131); - call {:cexpr "a"} boogie_si_record_i32($i132); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1144, 5} true; - assume {:verifier.code 0} true; - $i133 := $add.i32($i121, $i121); - call {:cexpr "b"} boogie_si_record_i32($i133); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1145, 7} true; - assume {:verifier.code 0} true; - $i134 := $sext.i32.i64($i133); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1145, 9} true; - assume {:verifier.code 0} true; - $i135 := $srem.i64($i134, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1145, 7} true; - assume {:verifier.code 0} true; - $i136 := $trunc.i64.i32($i135); - call {:cexpr "b"} boogie_si_record_i32($i136); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1147, 5} true; - assume {:verifier.code 0} true; - $i137 := $add.i32($i125, $i125); - call {:cexpr "c"} boogie_si_record_i32($i137); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1148, 9} true; - assume {:verifier.code 0} true; - $i138 := $slt.i32($i132, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1148, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i138} true; - goto $bb55, $bb56; -$bb52: - assume ($i126 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1140, 7} true; - assume {:verifier.code 0} true; - $i128 := $add.i32($i122, 1); - call {:cexpr "c"} boogie_si_record_i32($i128); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1141, 3} true; - assume {:verifier.code 0} true; - $i127 := $i128; - goto $bb54; -$bb53: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1139, 14} true; - assume {:verifier.code 0} true; - assume !(($i126 == 1)); - goto $bb54; -$bb54: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i125 := $i127; - goto $bb51; -$bb55: - assume ($i138 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1149, 7} true; - assume {:verifier.code 0} true; - $i139 := $add.i32($i137, 1); - call {:cexpr "c"} boogie_si_record_i32($i139); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1150, 3} true; - assume {:verifier.code 0} true; - $i140 := $i139; - goto $bb57; -$bb56: - assume !(($i138 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1150, 16} true; - assume {:verifier.code 0} true; - $i141 := $slt.i32($i136, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1150, 14} true; - assume {:verifier.code 0} true; - $i142 := $i137; - assume {:branchcond $i141} true; - goto $bb58, $bb59; -$bb57: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1153, 5} true; - assume {:verifier.code 0} true; - $i144 := $add.i32($i132, $i132); - call {:cexpr "a"} boogie_si_record_i32($i144); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1154, 7} true; - assume {:verifier.code 0} true; - $i145 := $sext.i32.i64($i144); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1154, 9} true; - assume {:verifier.code 0} true; - $i146 := $srem.i64($i145, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1154, 7} true; - assume {:verifier.code 0} true; - $i147 := $trunc.i64.i32($i146); - call {:cexpr "a"} boogie_si_record_i32($i147); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1155, 5} true; - assume {:verifier.code 0} true; - $i148 := $add.i32($i136, $i136); - call {:cexpr "b"} boogie_si_record_i32($i148); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1156, 7} true; - assume {:verifier.code 0} true; - $i149 := $sext.i32.i64($i148); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1156, 9} true; - assume {:verifier.code 0} true; - $i150 := $srem.i64($i149, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1156, 7} true; - assume {:verifier.code 0} true; - $i151 := $trunc.i64.i32($i150); - call {:cexpr "b"} boogie_si_record_i32($i151); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1158, 5} true; - assume {:verifier.code 0} true; - $i152 := $add.i32($i140, $i140); - call {:cexpr "c"} boogie_si_record_i32($i152); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1159, 9} true; - assume {:verifier.code 0} true; - $i153 := $slt.i32($i147, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1159, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i153} true; - goto $bb61, $bb62; -$bb58: - assume ($i141 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1151, 7} true; - assume {:verifier.code 0} true; - $i143 := $add.i32($i137, 1); - call {:cexpr "c"} boogie_si_record_i32($i143); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1152, 3} true; - assume {:verifier.code 0} true; - $i142 := $i143; - goto $bb60; -$bb59: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1150, 14} true; - assume {:verifier.code 0} true; - assume !(($i141 == 1)); - goto $bb60; -$bb60: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i140 := $i142; - goto $bb57; -$bb61: - assume ($i153 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1160, 7} true; - assume {:verifier.code 0} true; - $i154 := $add.i32($i152, 1); - call {:cexpr "c"} boogie_si_record_i32($i154); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1161, 3} true; - assume {:verifier.code 0} true; - $i155 := $i154; - goto $bb63; -$bb62: - assume !(($i153 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1161, 16} true; - assume {:verifier.code 0} true; - $i156 := $slt.i32($i151, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1161, 14} true; - assume {:verifier.code 0} true; - $i157 := $i152; - assume {:branchcond $i156} true; - goto $bb64, $bb65; -$bb63: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1164, 5} true; - assume {:verifier.code 0} true; - $i159 := $add.i32($i147, $i147); - call {:cexpr "a"} boogie_si_record_i32($i159); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1165, 7} true; - assume {:verifier.code 0} true; - $i160 := $sext.i32.i64($i159); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1165, 9} true; - assume {:verifier.code 0} true; - $i161 := $srem.i64($i160, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1165, 7} true; - assume {:verifier.code 0} true; - $i162 := $trunc.i64.i32($i161); - call {:cexpr "a"} boogie_si_record_i32($i162); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1166, 5} true; - assume {:verifier.code 0} true; - $i163 := $add.i32($i151, $i151); - call {:cexpr "b"} boogie_si_record_i32($i163); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1167, 7} true; - assume {:verifier.code 0} true; - $i164 := $sext.i32.i64($i163); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1167, 9} true; - assume {:verifier.code 0} true; - $i165 := $srem.i64($i164, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1167, 7} true; - assume {:verifier.code 0} true; - $i166 := $trunc.i64.i32($i165); - call {:cexpr "b"} boogie_si_record_i32($i166); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1169, 5} true; - assume {:verifier.code 0} true; - $i167 := $add.i32($i155, $i155); - call {:cexpr "c"} boogie_si_record_i32($i167); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1170, 9} true; - assume {:verifier.code 0} true; - $i168 := $slt.i32($i162, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1170, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i168} true; - goto $bb67, $bb68; -$bb64: - assume ($i156 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1162, 7} true; - assume {:verifier.code 0} true; - $i158 := $add.i32($i152, 1); - call {:cexpr "c"} boogie_si_record_i32($i158); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1163, 3} true; - assume {:verifier.code 0} true; - $i157 := $i158; - goto $bb66; -$bb65: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1161, 14} true; - assume {:verifier.code 0} true; - assume !(($i156 == 1)); - goto $bb66; -$bb66: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i155 := $i157; - goto $bb63; -$bb67: - assume ($i168 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1171, 7} true; - assume {:verifier.code 0} true; - $i169 := $add.i32($i167, 1); - call {:cexpr "c"} boogie_si_record_i32($i169); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1172, 3} true; - assume {:verifier.code 0} true; - $i170 := $i169; - goto $bb69; -$bb68: - assume !(($i168 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1172, 16} true; - assume {:verifier.code 0} true; - $i171 := $slt.i32($i166, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1172, 14} true; - assume {:verifier.code 0} true; - $i172 := $i167; - assume {:branchcond $i171} true; - goto $bb70, $bb71; -$bb69: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1175, 5} true; - assume {:verifier.code 0} true; - $i174 := $add.i32($i162, $i162); - call {:cexpr "a"} boogie_si_record_i32($i174); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1176, 7} true; - assume {:verifier.code 0} true; - $i175 := $sext.i32.i64($i174); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1176, 9} true; - assume {:verifier.code 0} true; - $i176 := $srem.i64($i175, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1176, 7} true; - assume {:verifier.code 0} true; - $i177 := $trunc.i64.i32($i176); - call {:cexpr "a"} boogie_si_record_i32($i177); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1177, 5} true; - assume {:verifier.code 0} true; - $i178 := $add.i32($i166, $i166); - call {:cexpr "b"} boogie_si_record_i32($i178); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1178, 7} true; - assume {:verifier.code 0} true; - $i179 := $sext.i32.i64($i178); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1178, 9} true; - assume {:verifier.code 0} true; - $i180 := $srem.i64($i179, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1178, 7} true; - assume {:verifier.code 0} true; - $i181 := $trunc.i64.i32($i180); - call {:cexpr "b"} boogie_si_record_i32($i181); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1180, 5} true; - assume {:verifier.code 0} true; - $i182 := $add.i32($i170, $i170); - call {:cexpr "c"} boogie_si_record_i32($i182); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1181, 9} true; - assume {:verifier.code 0} true; - $i183 := $slt.i32($i177, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1181, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i183} true; - goto $bb73, $bb74; -$bb70: - assume ($i171 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1173, 7} true; - assume {:verifier.code 0} true; - $i173 := $add.i32($i167, 1); - call {:cexpr "c"} boogie_si_record_i32($i173); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1174, 3} true; - assume {:verifier.code 0} true; - $i172 := $i173; - goto $bb72; -$bb71: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1172, 14} true; - assume {:verifier.code 0} true; - assume !(($i171 == 1)); - goto $bb72; -$bb72: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i170 := $i172; - goto $bb69; -$bb73: - assume ($i183 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1182, 7} true; - assume {:verifier.code 0} true; - $i184 := $add.i32($i182, 1); - call {:cexpr "c"} boogie_si_record_i32($i184); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1183, 3} true; - assume {:verifier.code 0} true; - $i185 := $i184; - goto $bb75; -$bb74: - assume !(($i183 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1183, 16} true; - assume {:verifier.code 0} true; - $i186 := $slt.i32($i181, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1183, 14} true; - assume {:verifier.code 0} true; - $i187 := $i182; - assume {:branchcond $i186} true; - goto $bb76, $bb77; -$bb75: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1186, 5} true; - assume {:verifier.code 0} true; - $i189 := $add.i32($i177, $i177); - call {:cexpr "a"} boogie_si_record_i32($i189); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1187, 7} true; - assume {:verifier.code 0} true; - $i190 := $sext.i32.i64($i189); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1187, 9} true; - assume {:verifier.code 0} true; - $i191 := $srem.i64($i190, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1187, 7} true; - assume {:verifier.code 0} true; - $i192 := $trunc.i64.i32($i191); - call {:cexpr "a"} boogie_si_record_i32($i192); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1188, 5} true; - assume {:verifier.code 0} true; - $i193 := $add.i32($i181, $i181); - call {:cexpr "b"} boogie_si_record_i32($i193); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1189, 7} true; - assume {:verifier.code 0} true; - $i194 := $sext.i32.i64($i193); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1189, 9} true; - assume {:verifier.code 0} true; - $i195 := $srem.i64($i194, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1189, 7} true; - assume {:verifier.code 0} true; - $i196 := $trunc.i64.i32($i195); - call {:cexpr "b"} boogie_si_record_i32($i196); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1191, 5} true; - assume {:verifier.code 0} true; - $i197 := $add.i32($i185, $i185); - call {:cexpr "c"} boogie_si_record_i32($i197); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1192, 9} true; - assume {:verifier.code 0} true; - $i198 := $slt.i32($i192, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1192, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i198} true; - goto $bb79, $bb80; -$bb76: - assume ($i186 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1184, 7} true; - assume {:verifier.code 0} true; - $i188 := $add.i32($i182, 1); - call {:cexpr "c"} boogie_si_record_i32($i188); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1185, 3} true; - assume {:verifier.code 0} true; - $i187 := $i188; - goto $bb78; -$bb77: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1183, 14} true; - assume {:verifier.code 0} true; - assume !(($i186 == 1)); - goto $bb78; -$bb78: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i185 := $i187; - goto $bb75; -$bb79: - assume ($i198 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1193, 7} true; - assume {:verifier.code 0} true; - $i199 := $add.i32($i197, 1); - call {:cexpr "c"} boogie_si_record_i32($i199); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1194, 3} true; - assume {:verifier.code 0} true; - $i200 := $i199; - goto $bb81; -$bb80: - assume !(($i198 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1194, 16} true; - assume {:verifier.code 0} true; - $i201 := $slt.i32($i196, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1194, 14} true; - assume {:verifier.code 0} true; - $i202 := $i197; - assume {:branchcond $i201} true; - goto $bb82, $bb83; -$bb81: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1197, 5} true; - assume {:verifier.code 0} true; - $i204 := $add.i32($i192, $i192); - call {:cexpr "a"} boogie_si_record_i32($i204); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1198, 7} true; - assume {:verifier.code 0} true; - $i205 := $sext.i32.i64($i204); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1198, 9} true; - assume {:verifier.code 0} true; - $i206 := $srem.i64($i205, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1198, 7} true; - assume {:verifier.code 0} true; - $i207 := $trunc.i64.i32($i206); - call {:cexpr "a"} boogie_si_record_i32($i207); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1199, 5} true; - assume {:verifier.code 0} true; - $i208 := $add.i32($i196, $i196); - call {:cexpr "b"} boogie_si_record_i32($i208); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1200, 7} true; - assume {:verifier.code 0} true; - $i209 := $sext.i32.i64($i208); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1200, 9} true; - assume {:verifier.code 0} true; - $i210 := $srem.i64($i209, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1200, 7} true; - assume {:verifier.code 0} true; - $i211 := $trunc.i64.i32($i210); - call {:cexpr "b"} boogie_si_record_i32($i211); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1202, 5} true; - assume {:verifier.code 0} true; - $i212 := $add.i32($i200, $i200); - call {:cexpr "c"} boogie_si_record_i32($i212); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1203, 9} true; - assume {:verifier.code 0} true; - $i213 := $slt.i32($i207, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1203, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i213} true; - goto $bb85, $bb86; -$bb82: - assume ($i201 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1195, 7} true; - assume {:verifier.code 0} true; - $i203 := $add.i32($i197, 1); - call {:cexpr "c"} boogie_si_record_i32($i203); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1196, 3} true; - assume {:verifier.code 0} true; - $i202 := $i203; - goto $bb84; -$bb83: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1194, 14} true; - assume {:verifier.code 0} true; - assume !(($i201 == 1)); - goto $bb84; -$bb84: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i200 := $i202; - goto $bb81; -$bb85: - assume ($i213 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1204, 7} true; - assume {:verifier.code 0} true; - $i214 := $add.i32($i212, 1); - call {:cexpr "c"} boogie_si_record_i32($i214); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1205, 3} true; - assume {:verifier.code 0} true; - $i215 := $i214; - goto $bb87; -$bb86: - assume !(($i213 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1205, 16} true; - assume {:verifier.code 0} true; - $i216 := $slt.i32($i211, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1205, 14} true; - assume {:verifier.code 0} true; - $i217 := $i212; - assume {:branchcond $i216} true; - goto $bb88, $bb89; -$bb87: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1208, 5} true; - assume {:verifier.code 0} true; - $i219 := $add.i32($i207, $i207); - call {:cexpr "a"} boogie_si_record_i32($i219); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1209, 7} true; - assume {:verifier.code 0} true; - $i220 := $sext.i32.i64($i219); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1209, 9} true; - assume {:verifier.code 0} true; - $i221 := $srem.i64($i220, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1209, 7} true; - assume {:verifier.code 0} true; - $i222 := $trunc.i64.i32($i221); - call {:cexpr "a"} boogie_si_record_i32($i222); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1210, 5} true; - assume {:verifier.code 0} true; - $i223 := $add.i32($i211, $i211); - call {:cexpr "b"} boogie_si_record_i32($i223); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1211, 7} true; - assume {:verifier.code 0} true; - $i224 := $sext.i32.i64($i223); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1211, 9} true; - assume {:verifier.code 0} true; - $i225 := $srem.i64($i224, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1211, 7} true; - assume {:verifier.code 0} true; - $i226 := $trunc.i64.i32($i225); - call {:cexpr "b"} boogie_si_record_i32($i226); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1213, 5} true; - assume {:verifier.code 0} true; - $i227 := $add.i32($i215, $i215); - call {:cexpr "c"} boogie_si_record_i32($i227); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1214, 9} true; - assume {:verifier.code 0} true; - $i228 := $slt.i32($i222, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1214, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i228} true; - goto $bb91, $bb92; -$bb88: - assume ($i216 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1206, 7} true; - assume {:verifier.code 0} true; - $i218 := $add.i32($i212, 1); - call {:cexpr "c"} boogie_si_record_i32($i218); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1207, 3} true; - assume {:verifier.code 0} true; - $i217 := $i218; - goto $bb90; -$bb89: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1205, 14} true; - assume {:verifier.code 0} true; - assume !(($i216 == 1)); - goto $bb90; -$bb90: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i215 := $i217; - goto $bb87; -$bb91: - assume ($i228 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1215, 7} true; - assume {:verifier.code 0} true; - $i229 := $add.i32($i227, 1); - call {:cexpr "c"} boogie_si_record_i32($i229); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1216, 3} true; - assume {:verifier.code 0} true; - $i230 := $i229; - goto $bb93; -$bb92: - assume !(($i228 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1216, 16} true; - assume {:verifier.code 0} true; - $i231 := $slt.i32($i226, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1216, 14} true; - assume {:verifier.code 0} true; - $i232 := $i227; - assume {:branchcond $i231} true; - goto $bb94, $bb95; -$bb93: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1219, 5} true; - assume {:verifier.code 0} true; - $i234 := $add.i32($i222, $i222); - call {:cexpr "a"} boogie_si_record_i32($i234); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1220, 7} true; - assume {:verifier.code 0} true; - $i235 := $sext.i32.i64($i234); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1220, 9} true; - assume {:verifier.code 0} true; - $i236 := $srem.i64($i235, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1220, 7} true; - assume {:verifier.code 0} true; - $i237 := $trunc.i64.i32($i236); - call {:cexpr "a"} boogie_si_record_i32($i237); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1221, 5} true; - assume {:verifier.code 0} true; - $i238 := $add.i32($i226, $i226); - call {:cexpr "b"} boogie_si_record_i32($i238); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1222, 7} true; - assume {:verifier.code 0} true; - $i239 := $sext.i32.i64($i238); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1222, 9} true; - assume {:verifier.code 0} true; - $i240 := $srem.i64($i239, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1222, 7} true; - assume {:verifier.code 0} true; - $i241 := $trunc.i64.i32($i240); - call {:cexpr "b"} boogie_si_record_i32($i241); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1224, 5} true; - assume {:verifier.code 0} true; - $i242 := $add.i32($i230, $i230); - call {:cexpr "c"} boogie_si_record_i32($i242); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1225, 9} true; - assume {:verifier.code 0} true; - $i243 := $slt.i32($i237, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1225, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i243} true; - goto $bb97, $bb98; -$bb94: - assume ($i231 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1217, 7} true; - assume {:verifier.code 0} true; - $i233 := $add.i32($i227, 1); - call {:cexpr "c"} boogie_si_record_i32($i233); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1218, 3} true; - assume {:verifier.code 0} true; - $i232 := $i233; - goto $bb96; -$bb95: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1216, 14} true; - assume {:verifier.code 0} true; - assume !(($i231 == 1)); - goto $bb96; -$bb96: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i230 := $i232; - goto $bb93; -$bb97: - assume ($i243 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1226, 7} true; - assume {:verifier.code 0} true; - $i244 := $add.i32($i242, 1); - call {:cexpr "c"} boogie_si_record_i32($i244); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1227, 3} true; - assume {:verifier.code 0} true; - $i245 := $i244; - goto $bb99; -$bb98: - assume !(($i243 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1227, 16} true; - assume {:verifier.code 0} true; - $i246 := $slt.i32($i241, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1227, 14} true; - assume {:verifier.code 0} true; - $i247 := $i242; - assume {:branchcond $i246} true; - goto $bb100, $bb101; -$bb99: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1230, 5} true; - assume {:verifier.code 0} true; - $i249 := $add.i32($i237, $i237); - call {:cexpr "a"} boogie_si_record_i32($i249); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1231, 7} true; - assume {:verifier.code 0} true; - $i250 := $sext.i32.i64($i249); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1231, 9} true; - assume {:verifier.code 0} true; - $i251 := $srem.i64($i250, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1231, 7} true; - assume {:verifier.code 0} true; - $i252 := $trunc.i64.i32($i251); - call {:cexpr "a"} boogie_si_record_i32($i252); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1232, 5} true; - assume {:verifier.code 0} true; - $i253 := $add.i32($i241, $i241); - call {:cexpr "b"} boogie_si_record_i32($i253); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1233, 7} true; - assume {:verifier.code 0} true; - $i254 := $sext.i32.i64($i253); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1233, 9} true; - assume {:verifier.code 0} true; - $i255 := $srem.i64($i254, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1233, 7} true; - assume {:verifier.code 0} true; - $i256 := $trunc.i64.i32($i255); - call {:cexpr "b"} boogie_si_record_i32($i256); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1235, 5} true; - assume {:verifier.code 0} true; - $i257 := $add.i32($i245, $i245); - call {:cexpr "c"} boogie_si_record_i32($i257); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1236, 9} true; - assume {:verifier.code 0} true; - $i258 := $slt.i32($i252, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1236, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i258} true; - goto $bb103, $bb104; -$bb100: - assume ($i246 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1228, 7} true; - assume {:verifier.code 0} true; - $i248 := $add.i32($i242, 1); - call {:cexpr "c"} boogie_si_record_i32($i248); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1229, 3} true; - assume {:verifier.code 0} true; - $i247 := $i248; - goto $bb102; -$bb101: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1227, 14} true; - assume {:verifier.code 0} true; - assume !(($i246 == 1)); - goto $bb102; -$bb102: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i245 := $i247; - goto $bb99; -$bb103: - assume ($i258 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1237, 7} true; - assume {:verifier.code 0} true; - $i259 := $add.i32($i257, 1); - call {:cexpr "c"} boogie_si_record_i32($i259); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1238, 3} true; - assume {:verifier.code 0} true; - $i260 := $i259; - goto $bb105; -$bb104: - assume !(($i258 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1238, 16} true; - assume {:verifier.code 0} true; - $i261 := $slt.i32($i256, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1238, 14} true; - assume {:verifier.code 0} true; - $i262 := $i257; - assume {:branchcond $i261} true; - goto $bb106, $bb107; -$bb105: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1241, 5} true; - assume {:verifier.code 0} true; - $i264 := $add.i32($i252, $i252); - call {:cexpr "a"} boogie_si_record_i32($i264); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1242, 7} true; - assume {:verifier.code 0} true; - $i265 := $sext.i32.i64($i264); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1242, 9} true; - assume {:verifier.code 0} true; - $i266 := $srem.i64($i265, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1242, 7} true; - assume {:verifier.code 0} true; - $i267 := $trunc.i64.i32($i266); - call {:cexpr "a"} boogie_si_record_i32($i267); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1243, 5} true; - assume {:verifier.code 0} true; - $i268 := $add.i32($i256, $i256); - call {:cexpr "b"} boogie_si_record_i32($i268); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1244, 7} true; - assume {:verifier.code 0} true; - $i269 := $sext.i32.i64($i268); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1244, 9} true; - assume {:verifier.code 0} true; - $i270 := $srem.i64($i269, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1244, 7} true; - assume {:verifier.code 0} true; - $i271 := $trunc.i64.i32($i270); - call {:cexpr "b"} boogie_si_record_i32($i271); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1246, 5} true; - assume {:verifier.code 0} true; - $i272 := $add.i32($i260, $i260); - call {:cexpr "c"} boogie_si_record_i32($i272); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1247, 9} true; - assume {:verifier.code 0} true; - $i273 := $slt.i32($i267, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1247, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i273} true; - goto $bb109, $bb110; -$bb106: - assume ($i261 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1239, 7} true; - assume {:verifier.code 0} true; - $i263 := $add.i32($i257, 1); - call {:cexpr "c"} boogie_si_record_i32($i263); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1240, 3} true; - assume {:verifier.code 0} true; - $i262 := $i263; - goto $bb108; -$bb107: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1238, 14} true; - assume {:verifier.code 0} true; - assume !(($i261 == 1)); - goto $bb108; -$bb108: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i260 := $i262; - goto $bb105; -$bb109: - assume ($i273 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1248, 7} true; - assume {:verifier.code 0} true; - $i274 := $add.i32($i272, 1); - call {:cexpr "c"} boogie_si_record_i32($i274); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1249, 3} true; - assume {:verifier.code 0} true; - $i275 := $i274; - goto $bb111; -$bb110: - assume !(($i273 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1249, 16} true; - assume {:verifier.code 0} true; - $i276 := $slt.i32($i271, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1249, 14} true; - assume {:verifier.code 0} true; - $i277 := $i272; - assume {:branchcond $i276} true; - goto $bb112, $bb113; -$bb111: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1252, 5} true; - assume {:verifier.code 0} true; - $i279 := $add.i32($i267, $i267); - call {:cexpr "a"} boogie_si_record_i32($i279); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1253, 7} true; - assume {:verifier.code 0} true; - $i280 := $sext.i32.i64($i279); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1253, 9} true; - assume {:verifier.code 0} true; - $i281 := $srem.i64($i280, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1253, 7} true; - assume {:verifier.code 0} true; - $i282 := $trunc.i64.i32($i281); - call {:cexpr "a"} boogie_si_record_i32($i282); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1254, 5} true; - assume {:verifier.code 0} true; - $i283 := $add.i32($i271, $i271); - call {:cexpr "b"} boogie_si_record_i32($i283); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1255, 7} true; - assume {:verifier.code 0} true; - $i284 := $sext.i32.i64($i283); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1255, 9} true; - assume {:verifier.code 0} true; - $i285 := $srem.i64($i284, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1255, 7} true; - assume {:verifier.code 0} true; - $i286 := $trunc.i64.i32($i285); - call {:cexpr "b"} boogie_si_record_i32($i286); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1257, 5} true; - assume {:verifier.code 0} true; - $i287 := $add.i32($i275, $i275); - call {:cexpr "c"} boogie_si_record_i32($i287); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1258, 9} true; - assume {:verifier.code 0} true; - $i288 := $slt.i32($i282, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1258, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i288} true; - goto $bb115, $bb116; -$bb112: - assume ($i276 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1250, 7} true; - assume {:verifier.code 0} true; - $i278 := $add.i32($i272, 1); - call {:cexpr "c"} boogie_si_record_i32($i278); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1251, 3} true; - assume {:verifier.code 0} true; - $i277 := $i278; - goto $bb114; -$bb113: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1249, 14} true; - assume {:verifier.code 0} true; - assume !(($i276 == 1)); - goto $bb114; -$bb114: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i275 := $i277; - goto $bb111; -$bb115: - assume ($i288 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1259, 7} true; - assume {:verifier.code 0} true; - $i289 := $add.i32($i287, 1); - call {:cexpr "c"} boogie_si_record_i32($i289); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1260, 3} true; - assume {:verifier.code 0} true; - $i290 := $i289; - goto $bb117; -$bb116: - assume !(($i288 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1260, 16} true; - assume {:verifier.code 0} true; - $i291 := $slt.i32($i286, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1260, 14} true; - assume {:verifier.code 0} true; - $i292 := $i287; - assume {:branchcond $i291} true; - goto $bb118, $bb119; -$bb117: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1263, 5} true; - assume {:verifier.code 0} true; - $i294 := $add.i32($i282, $i282); - call {:cexpr "a"} boogie_si_record_i32($i294); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1264, 7} true; - assume {:verifier.code 0} true; - $i295 := $sext.i32.i64($i294); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1264, 9} true; - assume {:verifier.code 0} true; - $i296 := $srem.i64($i295, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1264, 7} true; - assume {:verifier.code 0} true; - $i297 := $trunc.i64.i32($i296); - call {:cexpr "a"} boogie_si_record_i32($i297); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1265, 5} true; - assume {:verifier.code 0} true; - $i298 := $add.i32($i286, $i286); - call {:cexpr "b"} boogie_si_record_i32($i298); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1266, 7} true; - assume {:verifier.code 0} true; - $i299 := $sext.i32.i64($i298); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1266, 9} true; - assume {:verifier.code 0} true; - $i300 := $srem.i64($i299, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1266, 7} true; - assume {:verifier.code 0} true; - $i301 := $trunc.i64.i32($i300); - call {:cexpr "b"} boogie_si_record_i32($i301); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1268, 5} true; - assume {:verifier.code 0} true; - $i302 := $add.i32($i290, $i290); - call {:cexpr "c"} boogie_si_record_i32($i302); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1269, 9} true; - assume {:verifier.code 0} true; - $i303 := $slt.i32($i297, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1269, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i303} true; - goto $bb121, $bb122; -$bb118: - assume ($i291 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1261, 7} true; - assume {:verifier.code 0} true; - $i293 := $add.i32($i287, 1); - call {:cexpr "c"} boogie_si_record_i32($i293); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1262, 3} true; - assume {:verifier.code 0} true; - $i292 := $i293; - goto $bb120; -$bb119: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1260, 14} true; - assume {:verifier.code 0} true; - assume !(($i291 == 1)); - goto $bb120; -$bb120: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i290 := $i292; - goto $bb117; -$bb121: - assume ($i303 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1270, 7} true; - assume {:verifier.code 0} true; - $i304 := $add.i32($i302, 1); - call {:cexpr "c"} boogie_si_record_i32($i304); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1271, 3} true; - assume {:verifier.code 0} true; - $i305 := $i304; - goto $bb123; -$bb122: - assume !(($i303 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1271, 16} true; - assume {:verifier.code 0} true; - $i306 := $slt.i32($i301, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1271, 14} true; - assume {:verifier.code 0} true; - $i307 := $i302; - assume {:branchcond $i306} true; - goto $bb124, $bb125; -$bb123: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1274, 5} true; - assume {:verifier.code 0} true; - $i309 := $add.i32($i297, $i297); - call {:cexpr "a"} boogie_si_record_i32($i309); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1275, 7} true; - assume {:verifier.code 0} true; - $i310 := $sext.i32.i64($i309); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1275, 9} true; - assume {:verifier.code 0} true; - $i311 := $srem.i64($i310, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1275, 7} true; - assume {:verifier.code 0} true; - $i312 := $trunc.i64.i32($i311); - call {:cexpr "a"} boogie_si_record_i32($i312); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1276, 5} true; - assume {:verifier.code 0} true; - $i313 := $add.i32($i301, $i301); - call {:cexpr "b"} boogie_si_record_i32($i313); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1277, 7} true; - assume {:verifier.code 0} true; - $i314 := $sext.i32.i64($i313); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1277, 9} true; - assume {:verifier.code 0} true; - $i315 := $srem.i64($i314, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1277, 7} true; - assume {:verifier.code 0} true; - $i316 := $trunc.i64.i32($i315); - call {:cexpr "b"} boogie_si_record_i32($i316); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1279, 5} true; - assume {:verifier.code 0} true; - $i317 := $add.i32($i305, $i305); - call {:cexpr "c"} boogie_si_record_i32($i317); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1280, 9} true; - assume {:verifier.code 0} true; - $i318 := $slt.i32($i312, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1280, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i318} true; - goto $bb127, $bb128; -$bb124: - assume ($i306 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1272, 7} true; - assume {:verifier.code 0} true; - $i308 := $add.i32($i302, 1); - call {:cexpr "c"} boogie_si_record_i32($i308); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1273, 3} true; - assume {:verifier.code 0} true; - $i307 := $i308; - goto $bb126; -$bb125: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1271, 14} true; - assume {:verifier.code 0} true; - assume !(($i306 == 1)); - goto $bb126; -$bb126: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i305 := $i307; - goto $bb123; -$bb127: - assume ($i318 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1281, 7} true; - assume {:verifier.code 0} true; - $i319 := $add.i32($i317, 1); - call {:cexpr "c"} boogie_si_record_i32($i319); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1282, 3} true; - assume {:verifier.code 0} true; - $i320 := $i319; - goto $bb129; -$bb128: - assume !(($i318 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1282, 16} true; - assume {:verifier.code 0} true; - $i321 := $slt.i32($i316, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1282, 14} true; - assume {:verifier.code 0} true; - $i322 := $i317; - assume {:branchcond $i321} true; - goto $bb130, $bb131; -$bb129: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1285, 5} true; - assume {:verifier.code 0} true; - $i324 := $add.i32($i312, $i312); - call {:cexpr "a"} boogie_si_record_i32($i324); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1286, 7} true; - assume {:verifier.code 0} true; - $i325 := $sext.i32.i64($i324); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1286, 9} true; - assume {:verifier.code 0} true; - $i326 := $srem.i64($i325, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1286, 7} true; - assume {:verifier.code 0} true; - $i327 := $trunc.i64.i32($i326); - call {:cexpr "a"} boogie_si_record_i32($i327); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1287, 5} true; - assume {:verifier.code 0} true; - $i328 := $add.i32($i316, $i316); - call {:cexpr "b"} boogie_si_record_i32($i328); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1288, 7} true; - assume {:verifier.code 0} true; - $i329 := $sext.i32.i64($i328); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1288, 9} true; - assume {:verifier.code 0} true; - $i330 := $srem.i64($i329, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1288, 7} true; - assume {:verifier.code 0} true; - $i331 := $trunc.i64.i32($i330); - call {:cexpr "b"} boogie_si_record_i32($i331); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1290, 5} true; - assume {:verifier.code 0} true; - $i332 := $add.i32($i320, $i320); - call {:cexpr "c"} boogie_si_record_i32($i332); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1291, 9} true; - assume {:verifier.code 0} true; - $i333 := $slt.i32($i327, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1291, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i333} true; - goto $bb133, $bb134; -$bb130: - assume ($i321 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1283, 7} true; - assume {:verifier.code 0} true; - $i323 := $add.i32($i317, 1); - call {:cexpr "c"} boogie_si_record_i32($i323); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1284, 3} true; - assume {:verifier.code 0} true; - $i322 := $i323; - goto $bb132; -$bb131: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1282, 14} true; - assume {:verifier.code 0} true; - assume !(($i321 == 1)); - goto $bb132; -$bb132: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i320 := $i322; - goto $bb129; -$bb133: - assume ($i333 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1292, 7} true; - assume {:verifier.code 0} true; - $i334 := $add.i32($i332, 1); - call {:cexpr "c"} boogie_si_record_i32($i334); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1293, 3} true; - assume {:verifier.code 0} true; - $i335 := $i334; - goto $bb135; -$bb134: - assume !(($i333 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1293, 16} true; - assume {:verifier.code 0} true; - $i336 := $slt.i32($i331, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1293, 14} true; - assume {:verifier.code 0} true; - $i337 := $i332; - assume {:branchcond $i336} true; - goto $bb136, $bb137; -$bb135: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1296, 5} true; - assume {:verifier.code 0} true; - $i339 := $add.i32($i327, $i327); - call {:cexpr "a"} boogie_si_record_i32($i339); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1297, 7} true; - assume {:verifier.code 0} true; - $i340 := $sext.i32.i64($i339); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1297, 9} true; - assume {:verifier.code 0} true; - $i341 := $srem.i64($i340, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1297, 7} true; - assume {:verifier.code 0} true; - $i342 := $trunc.i64.i32($i341); - call {:cexpr "a"} boogie_si_record_i32($i342); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1298, 5} true; - assume {:verifier.code 0} true; - $i343 := $add.i32($i331, $i331); - call {:cexpr "b"} boogie_si_record_i32($i343); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1299, 7} true; - assume {:verifier.code 0} true; - $i344 := $sext.i32.i64($i343); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1299, 9} true; - assume {:verifier.code 0} true; - $i345 := $srem.i64($i344, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1299, 7} true; - assume {:verifier.code 0} true; - $i346 := $trunc.i64.i32($i345); - call {:cexpr "b"} boogie_si_record_i32($i346); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1301, 5} true; - assume {:verifier.code 0} true; - $i347 := $add.i32($i335, $i335); - call {:cexpr "c"} boogie_si_record_i32($i347); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1302, 9} true; - assume {:verifier.code 0} true; - $i348 := $slt.i32($i342, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1302, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i348} true; - goto $bb139, $bb140; -$bb136: - assume ($i336 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1294, 7} true; - assume {:verifier.code 0} true; - $i338 := $add.i32($i332, 1); - call {:cexpr "c"} boogie_si_record_i32($i338); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1295, 3} true; - assume {:verifier.code 0} true; - $i337 := $i338; - goto $bb138; -$bb137: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1293, 14} true; - assume {:verifier.code 0} true; - assume !(($i336 == 1)); - goto $bb138; -$bb138: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i335 := $i337; - goto $bb135; -$bb139: - assume ($i348 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1303, 7} true; - assume {:verifier.code 0} true; - $i349 := $add.i32($i347, 1); - call {:cexpr "c"} boogie_si_record_i32($i349); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1304, 3} true; - assume {:verifier.code 0} true; - $i350 := $i349; - goto $bb141; -$bb140: - assume !(($i348 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1304, 16} true; - assume {:verifier.code 0} true; - $i351 := $slt.i32($i346, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1304, 14} true; - assume {:verifier.code 0} true; - $i352 := $i347; - assume {:branchcond $i351} true; - goto $bb142, $bb143; -$bb141: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1307, 5} true; - assume {:verifier.code 0} true; - $i354 := $add.i32($i342, $i342); - call {:cexpr "a"} boogie_si_record_i32($i354); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1308, 7} true; - assume {:verifier.code 0} true; - $i355 := $sext.i32.i64($i354); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1308, 9} true; - assume {:verifier.code 0} true; - $i356 := $srem.i64($i355, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1308, 7} true; - assume {:verifier.code 0} true; - $i357 := $trunc.i64.i32($i356); - call {:cexpr "a"} boogie_si_record_i32($i357); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1309, 5} true; - assume {:verifier.code 0} true; - $i358 := $add.i32($i346, $i346); - call {:cexpr "b"} boogie_si_record_i32($i358); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1310, 7} true; - assume {:verifier.code 0} true; - $i359 := $sext.i32.i64($i358); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1310, 9} true; - assume {:verifier.code 0} true; - $i360 := $srem.i64($i359, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1310, 7} true; - assume {:verifier.code 0} true; - $i361 := $trunc.i64.i32($i360); - call {:cexpr "b"} boogie_si_record_i32($i361); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1312, 5} true; - assume {:verifier.code 0} true; - $i362 := $add.i32($i350, $i350); - call {:cexpr "c"} boogie_si_record_i32($i362); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1313, 9} true; - assume {:verifier.code 0} true; - $i363 := $slt.i32($i357, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1313, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i363} true; - goto $bb145, $bb146; -$bb142: - assume ($i351 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1305, 7} true; - assume {:verifier.code 0} true; - $i353 := $add.i32($i347, 1); - call {:cexpr "c"} boogie_si_record_i32($i353); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1306, 3} true; - assume {:verifier.code 0} true; - $i352 := $i353; - goto $bb144; -$bb143: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1304, 14} true; - assume {:verifier.code 0} true; - assume !(($i351 == 1)); - goto $bb144; -$bb144: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i350 := $i352; - goto $bb141; -$bb145: - assume ($i363 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1314, 7} true; - assume {:verifier.code 0} true; - $i364 := $add.i32($i362, 1); - call {:cexpr "c"} boogie_si_record_i32($i364); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1315, 3} true; - assume {:verifier.code 0} true; - $i365 := $i364; - goto $bb147; -$bb146: - assume !(($i363 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1315, 16} true; - assume {:verifier.code 0} true; - $i366 := $slt.i32($i361, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1315, 14} true; - assume {:verifier.code 0} true; - $i367 := $i362; - assume {:branchcond $i366} true; - goto $bb148, $bb149; -$bb147: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1318, 5} true; - assume {:verifier.code 0} true; - $i369 := $add.i32($i357, $i357); - call {:cexpr "a"} boogie_si_record_i32($i369); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1319, 7} true; - assume {:verifier.code 0} true; - $i370 := $sext.i32.i64($i369); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1319, 9} true; - assume {:verifier.code 0} true; - $i371 := $srem.i64($i370, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1319, 7} true; - assume {:verifier.code 0} true; - $i372 := $trunc.i64.i32($i371); - call {:cexpr "a"} boogie_si_record_i32($i372); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1320, 5} true; - assume {:verifier.code 0} true; - $i373 := $add.i32($i361, $i361); - call {:cexpr "b"} boogie_si_record_i32($i373); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1321, 7} true; - assume {:verifier.code 0} true; - $i374 := $sext.i32.i64($i373); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1321, 9} true; - assume {:verifier.code 0} true; - $i375 := $srem.i64($i374, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1321, 7} true; - assume {:verifier.code 0} true; - $i376 := $trunc.i64.i32($i375); - call {:cexpr "b"} boogie_si_record_i32($i376); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1323, 5} true; - assume {:verifier.code 0} true; - $i377 := $add.i32($i365, $i365); - call {:cexpr "c"} boogie_si_record_i32($i377); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1324, 9} true; - assume {:verifier.code 0} true; - $i378 := $slt.i32($i372, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1324, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i378} true; - goto $bb151, $bb152; -$bb148: - assume ($i366 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1316, 7} true; - assume {:verifier.code 0} true; - $i368 := $add.i32($i362, 1); - call {:cexpr "c"} boogie_si_record_i32($i368); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1317, 3} true; - assume {:verifier.code 0} true; - $i367 := $i368; - goto $bb150; -$bb149: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1315, 14} true; - assume {:verifier.code 0} true; - assume !(($i366 == 1)); - goto $bb150; -$bb150: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i365 := $i367; - goto $bb147; -$bb151: - assume ($i378 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1325, 7} true; - assume {:verifier.code 0} true; - $i379 := $add.i32($i377, 1); - call {:cexpr "c"} boogie_si_record_i32($i379); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1326, 3} true; - assume {:verifier.code 0} true; - $i380 := $i379; - goto $bb153; -$bb152: - assume !(($i378 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1326, 16} true; - assume {:verifier.code 0} true; - $i381 := $slt.i32($i376, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1326, 14} true; - assume {:verifier.code 0} true; - $i382 := $i377; - assume {:branchcond $i381} true; - goto $bb154, $bb155; -$bb153: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1329, 5} true; - assume {:verifier.code 0} true; - $i384 := $add.i32($i372, $i372); - call {:cexpr "a"} boogie_si_record_i32($i384); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1330, 7} true; - assume {:verifier.code 0} true; - $i385 := $sext.i32.i64($i384); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1330, 9} true; - assume {:verifier.code 0} true; - $i386 := $srem.i64($i385, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1330, 7} true; - assume {:verifier.code 0} true; - $i387 := $trunc.i64.i32($i386); - call {:cexpr "a"} boogie_si_record_i32($i387); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1331, 5} true; - assume {:verifier.code 0} true; - $i388 := $add.i32($i376, $i376); - call {:cexpr "b"} boogie_si_record_i32($i388); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1332, 7} true; - assume {:verifier.code 0} true; - $i389 := $sext.i32.i64($i388); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1332, 9} true; - assume {:verifier.code 0} true; - $i390 := $srem.i64($i389, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1332, 7} true; - assume {:verifier.code 0} true; - $i391 := $trunc.i64.i32($i390); - call {:cexpr "b"} boogie_si_record_i32($i391); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1334, 5} true; - assume {:verifier.code 0} true; - $i392 := $add.i32($i380, $i380); - call {:cexpr "c"} boogie_si_record_i32($i392); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1335, 9} true; - assume {:verifier.code 0} true; - $i393 := $slt.i32($i387, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1335, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i393} true; - goto $bb157, $bb158; -$bb154: - assume ($i381 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1327, 7} true; - assume {:verifier.code 0} true; - $i383 := $add.i32($i377, 1); - call {:cexpr "c"} boogie_si_record_i32($i383); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1328, 3} true; - assume {:verifier.code 0} true; - $i382 := $i383; - goto $bb156; -$bb155: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1326, 14} true; - assume {:verifier.code 0} true; - assume !(($i381 == 1)); - goto $bb156; -$bb156: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i380 := $i382; - goto $bb153; -$bb157: - assume ($i393 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1336, 7} true; - assume {:verifier.code 0} true; - $i394 := $add.i32($i392, 1); - call {:cexpr "c"} boogie_si_record_i32($i394); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1337, 3} true; - assume {:verifier.code 0} true; - $i395 := $i394; - goto $bb159; -$bb158: - assume !(($i393 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1337, 16} true; - assume {:verifier.code 0} true; - $i396 := $slt.i32($i391, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1337, 14} true; - assume {:verifier.code 0} true; - $i397 := $i392; - assume {:branchcond $i396} true; - goto $bb160, $bb161; -$bb159: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1340, 5} true; - assume {:verifier.code 0} true; - $i399 := $add.i32($i387, $i387); - call {:cexpr "a"} boogie_si_record_i32($i399); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1341, 7} true; - assume {:verifier.code 0} true; - $i400 := $sext.i32.i64($i399); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1341, 9} true; - assume {:verifier.code 0} true; - $i401 := $srem.i64($i400, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1341, 7} true; - assume {:verifier.code 0} true; - $i402 := $trunc.i64.i32($i401); - call {:cexpr "a"} boogie_si_record_i32($i402); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1342, 5} true; - assume {:verifier.code 0} true; - $i403 := $add.i32($i391, $i391); - call {:cexpr "b"} boogie_si_record_i32($i403); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1343, 7} true; - assume {:verifier.code 0} true; - $i404 := $sext.i32.i64($i403); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1343, 9} true; - assume {:verifier.code 0} true; - $i405 := $srem.i64($i404, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1343, 7} true; - assume {:verifier.code 0} true; - $i406 := $trunc.i64.i32($i405); - call {:cexpr "b"} boogie_si_record_i32($i406); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1345, 5} true; - assume {:verifier.code 0} true; - $i407 := $add.i32($i395, $i395); - call {:cexpr "c"} boogie_si_record_i32($i407); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1346, 9} true; - assume {:verifier.code 0} true; - $i408 := $slt.i32($i402, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1346, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i408} true; - goto $bb163, $bb164; -$bb160: - assume ($i396 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1338, 7} true; - assume {:verifier.code 0} true; - $i398 := $add.i32($i392, 1); - call {:cexpr "c"} boogie_si_record_i32($i398); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1339, 3} true; - assume {:verifier.code 0} true; - $i397 := $i398; - goto $bb162; -$bb161: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1337, 14} true; - assume {:verifier.code 0} true; - assume !(($i396 == 1)); - goto $bb162; -$bb162: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i395 := $i397; - goto $bb159; -$bb163: - assume ($i408 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1347, 7} true; - assume {:verifier.code 0} true; - $i409 := $add.i32($i407, 1); - call {:cexpr "c"} boogie_si_record_i32($i409); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1348, 3} true; - assume {:verifier.code 0} true; - $i410 := $i409; - goto $bb165; -$bb164: - assume !(($i408 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1348, 16} true; - assume {:verifier.code 0} true; - $i411 := $slt.i32($i406, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1348, 14} true; - assume {:verifier.code 0} true; - $i412 := $i407; - assume {:branchcond $i411} true; - goto $bb166, $bb167; -$bb165: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1351, 5} true; - assume {:verifier.code 0} true; - $i414 := $add.i32($i402, $i402); - call {:cexpr "a"} boogie_si_record_i32($i414); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1352, 7} true; - assume {:verifier.code 0} true; - $i415 := $sext.i32.i64($i414); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1352, 9} true; - assume {:verifier.code 0} true; - $i416 := $srem.i64($i415, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1352, 7} true; - assume {:verifier.code 0} true; - $i417 := $trunc.i64.i32($i416); - call {:cexpr "a"} boogie_si_record_i32($i417); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1353, 5} true; - assume {:verifier.code 0} true; - $i418 := $add.i32($i406, $i406); - call {:cexpr "b"} boogie_si_record_i32($i418); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1354, 7} true; - assume {:verifier.code 0} true; - $i419 := $sext.i32.i64($i418); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1354, 9} true; - assume {:verifier.code 0} true; - $i420 := $srem.i64($i419, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1354, 7} true; - assume {:verifier.code 0} true; - $i421 := $trunc.i64.i32($i420); - call {:cexpr "b"} boogie_si_record_i32($i421); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1356, 5} true; - assume {:verifier.code 0} true; - $i422 := $add.i32($i410, $i410); - call {:cexpr "c"} boogie_si_record_i32($i422); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1357, 9} true; - assume {:verifier.code 0} true; - $i423 := $slt.i32($i417, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1357, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i423} true; - goto $bb169, $bb170; -$bb166: - assume ($i411 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1349, 7} true; - assume {:verifier.code 0} true; - $i413 := $add.i32($i407, 1); - call {:cexpr "c"} boogie_si_record_i32($i413); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1350, 3} true; - assume {:verifier.code 0} true; - $i412 := $i413; - goto $bb168; -$bb167: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1348, 14} true; - assume {:verifier.code 0} true; - assume !(($i411 == 1)); - goto $bb168; -$bb168: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i410 := $i412; - goto $bb165; -$bb169: - assume ($i423 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1358, 7} true; - assume {:verifier.code 0} true; - $i424 := $add.i32($i422, 1); - call {:cexpr "c"} boogie_si_record_i32($i424); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1359, 3} true; - assume {:verifier.code 0} true; - $i425 := $i424; - goto $bb171; -$bb170: - assume !(($i423 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1359, 16} true; - assume {:verifier.code 0} true; - $i426 := $slt.i32($i421, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1359, 14} true; - assume {:verifier.code 0} true; - $i427 := $i422; - assume {:branchcond $i426} true; - goto $bb172, $bb173; -$bb171: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1362, 5} true; - assume {:verifier.code 0} true; - $i429 := $add.i32($i417, $i417); - call {:cexpr "a"} boogie_si_record_i32($i429); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1363, 7} true; - assume {:verifier.code 0} true; - $i430 := $sext.i32.i64($i429); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1363, 9} true; - assume {:verifier.code 0} true; - $i431 := $srem.i64($i430, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1363, 7} true; - assume {:verifier.code 0} true; - $i432 := $trunc.i64.i32($i431); - call {:cexpr "a"} boogie_si_record_i32($i432); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1364, 5} true; - assume {:verifier.code 0} true; - $i433 := $add.i32($i421, $i421); - call {:cexpr "b"} boogie_si_record_i32($i433); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1365, 7} true; - assume {:verifier.code 0} true; - $i434 := $sext.i32.i64($i433); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1365, 9} true; - assume {:verifier.code 0} true; - $i435 := $srem.i64($i434, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1365, 7} true; - assume {:verifier.code 0} true; - $i436 := $trunc.i64.i32($i435); - call {:cexpr "b"} boogie_si_record_i32($i436); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1367, 5} true; - assume {:verifier.code 0} true; - $i437 := $add.i32($i425, $i425); - call {:cexpr "c"} boogie_si_record_i32($i437); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1368, 9} true; - assume {:verifier.code 0} true; - $i438 := $slt.i32($i432, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1368, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i438} true; - goto $bb175, $bb176; -$bb172: - assume ($i426 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1360, 7} true; - assume {:verifier.code 0} true; - $i428 := $add.i32($i422, 1); - call {:cexpr "c"} boogie_si_record_i32($i428); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1361, 3} true; - assume {:verifier.code 0} true; - $i427 := $i428; - goto $bb174; -$bb173: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1359, 14} true; - assume {:verifier.code 0} true; - assume !(($i426 == 1)); - goto $bb174; -$bb174: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i425 := $i427; - goto $bb171; -$bb175: - assume ($i438 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1369, 7} true; - assume {:verifier.code 0} true; - $i439 := $add.i32($i437, 1); - call {:cexpr "c"} boogie_si_record_i32($i439); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1370, 3} true; - assume {:verifier.code 0} true; - $i440 := $i439; - goto $bb177; -$bb176: - assume !(($i438 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1370, 16} true; - assume {:verifier.code 0} true; - $i441 := $slt.i32($i436, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1370, 14} true; - assume {:verifier.code 0} true; - $i442 := $i437; - assume {:branchcond $i441} true; - goto $bb178, $bb179; -$bb177: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1373, 5} true; - assume {:verifier.code 0} true; - $i444 := $add.i32($i432, $i432); - call {:cexpr "a"} boogie_si_record_i32($i444); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1374, 7} true; - assume {:verifier.code 0} true; - $i445 := $sext.i32.i64($i444); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1374, 9} true; - assume {:verifier.code 0} true; - $i446 := $srem.i64($i445, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1374, 7} true; - assume {:verifier.code 0} true; - $i447 := $trunc.i64.i32($i446); - call {:cexpr "a"} boogie_si_record_i32($i447); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1375, 5} true; - assume {:verifier.code 0} true; - $i448 := $add.i32($i436, $i436); - call {:cexpr "b"} boogie_si_record_i32($i448); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1376, 7} true; - assume {:verifier.code 0} true; - $i449 := $sext.i32.i64($i448); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1376, 9} true; - assume {:verifier.code 0} true; - $i450 := $srem.i64($i449, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1376, 7} true; - assume {:verifier.code 0} true; - $i451 := $trunc.i64.i32($i450); - call {:cexpr "b"} boogie_si_record_i32($i451); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1378, 5} true; - assume {:verifier.code 0} true; - $i452 := $add.i32($i440, $i440); - call {:cexpr "c"} boogie_si_record_i32($i452); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1379, 9} true; - assume {:verifier.code 0} true; - $i453 := $slt.i32($i447, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1379, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i453} true; - goto $bb181, $bb182; -$bb178: - assume ($i441 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1371, 7} true; - assume {:verifier.code 0} true; - $i443 := $add.i32($i437, 1); - call {:cexpr "c"} boogie_si_record_i32($i443); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1372, 3} true; - assume {:verifier.code 0} true; - $i442 := $i443; - goto $bb180; -$bb179: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1370, 14} true; - assume {:verifier.code 0} true; - assume !(($i441 == 1)); - goto $bb180; -$bb180: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i440 := $i442; - goto $bb177; -$bb181: - assume ($i453 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1380, 7} true; - assume {:verifier.code 0} true; - $i454 := $add.i32($i452, 1); - call {:cexpr "c"} boogie_si_record_i32($i454); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1381, 3} true; - assume {:verifier.code 0} true; - $i455 := $i454; - goto $bb183; -$bb182: - assume !(($i453 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1381, 16} true; - assume {:verifier.code 0} true; - $i456 := $slt.i32($i451, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1381, 14} true; - assume {:verifier.code 0} true; - $i457 := $i452; - assume {:branchcond $i456} true; - goto $bb184, $bb185; -$bb183: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1384, 5} true; - assume {:verifier.code 0} true; - $i459 := $add.i32($i447, $i447); - call {:cexpr "a"} boogie_si_record_i32($i459); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1385, 7} true; - assume {:verifier.code 0} true; - $i460 := $sext.i32.i64($i459); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1385, 9} true; - assume {:verifier.code 0} true; - $i461 := $srem.i64($i460, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1385, 7} true; - assume {:verifier.code 0} true; - $i462 := $trunc.i64.i32($i461); - call {:cexpr "a"} boogie_si_record_i32($i462); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1386, 5} true; - assume {:verifier.code 0} true; - $i463 := $add.i32($i451, $i451); - call {:cexpr "b"} boogie_si_record_i32($i463); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1387, 7} true; - assume {:verifier.code 0} true; - $i464 := $sext.i32.i64($i463); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1387, 9} true; - assume {:verifier.code 0} true; - $i465 := $srem.i64($i464, 2147483648); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1387, 7} true; - assume {:verifier.code 0} true; - $i466 := $trunc.i64.i32($i465); - call {:cexpr "b"} boogie_si_record_i32($i466); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1389, 5} true; - assume {:verifier.code 0} true; - $i467 := $add.i32($i455, $i455); - call {:cexpr "c"} boogie_si_record_i32($i467); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1390, 9} true; - assume {:verifier.code 0} true; - $i468 := $slt.i32($i462, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1390, 7} true; - assume {:verifier.code 0} true; - assume {:branchcond $i468} true; - goto $bb187, $bb188; -$bb184: - assume ($i456 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1382, 7} true; - assume {:verifier.code 0} true; - $i458 := $add.i32($i452, 1); - call {:cexpr "c"} boogie_si_record_i32($i458); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1383, 3} true; - assume {:verifier.code 0} true; - $i457 := $i458; - goto $bb186; -$bb185: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1381, 14} true; - assume {:verifier.code 0} true; - assume !(($i456 == 1)); - goto $bb186; -$bb186: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i455 := $i457; - goto $bb183; -$bb187: - assume ($i468 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1391, 7} true; - assume {:verifier.code 0} true; - $i469 := $add.i32($i467, 1); - call {:cexpr "c"} boogie_si_record_i32($i469); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1392, 3} true; - assume {:verifier.code 0} true; - $i470 := $i469; - goto $bb189; -$bb188: - assume !(($i468 == 1)); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1392, 16} true; - assume {:verifier.code 0} true; - $i471 := $slt.i32($i466, 0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1392, 14} true; - assume {:verifier.code 0} true; - $i472 := $i467; - assume {:branchcond $i471} true; - goto $bb190, $bb191; -$bb189: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1400, 3} true; - assume {:verifier.code 0} true; - $r := $i470; - $exn := false; - return; -$bb190: - assume ($i471 == 1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1393, 7} true; - assume {:verifier.code 0} true; - $i473 := $add.i32($i467, 1); - call {:cexpr "c"} boogie_si_record_i32($i473); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1394, 3} true; - assume {:verifier.code 0} true; - $i472 := $i473; - goto $bb192; -$bb191: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1392, 14} true; - assume {:verifier.code 0} true; - assume !(($i471 == 1)); - goto $bb192; -$bb192: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 0, 0} true; - assume {:verifier.code 0} true; - assume {:verifier.code 0} true; - $i470 := $i472; - goto $bb189; -} -const __SMACK_or64: ref; -axiom (__SMACK_or64 == $sub.ref(0, 28983)); -procedure __SMACK_or64($i0: i64, $i1: i64) - returns ($r: i64) -{ - var $i2: i32; - var $i3: i32; - var $i4: i32; - var $i5: i64; -$bb0: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1403, 63} true; - assume {:verifier.code 1} true; - call {:cexpr "__SMACK_or64:arg:a"} boogie_si_record_i64($i0); - call {:cexpr "__SMACK_or64:arg:b"} boogie_si_record_i64($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1403, 63} true; - assume {:verifier.code 1} true; - $i2 := $trunc.i64.i32($i0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1403, 66} true; - assume {:verifier.code 1} true; - $i3 := $trunc.i64.i32($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1403, 50} true; - assume {:verifier.code 1} true; - call $i4 := __SMACK_or32($i2, $i3); - call {:cexpr "smack:ext:__SMACK_or32"} boogie_si_record_i32($i4); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1403, 44} true; - assume {:verifier.code 0} true; - $i5 := $sext.i32.i64($i4); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1403, 37} true; - assume {:verifier.code 0} true; - $r := $i5; - $exn := false; - return; -} -const __SMACK_or16: ref; -axiom (__SMACK_or16 == $sub.ref(0, 30015)); -procedure __SMACK_or16($i0: i16, $i1: i16) - returns ($r: i16) -{ - var $i2: i32; - var $i3: i32; - var $i4: i32; - var $i5: i16; -$bb0: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1404, 67} true; - assume {:verifier.code 1} true; - call {:cexpr "__SMACK_or16:arg:a"} boogie_si_record_i16($i0); - call {:cexpr "__SMACK_or16:arg:b"} boogie_si_record_i16($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1404, 67} true; - assume {:verifier.code 1} true; - $i2 := $sext.i16.i32($i0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1404, 70} true; - assume {:verifier.code 1} true; - $i3 := $sext.i16.i32($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1404, 54} true; - assume {:verifier.code 1} true; - call $i4 := __SMACK_or32($i2, $i3); - call {:cexpr "smack:ext:__SMACK_or32"} boogie_si_record_i32($i4); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1404, 47} true; - assume {:verifier.code 0} true; - $i5 := $trunc.i32.i16($i4); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1404, 40} true; - assume {:verifier.code 0} true; - $r := $i5; - $exn := false; - return; -} -const __SMACK_or8: ref; -axiom (__SMACK_or8 == $sub.ref(0, 31047)); -procedure __SMACK_or8($i0: i8, $i1: i8) - returns ($r: i8) -{ - var $i2: i32; - var $i3: i32; - var $i4: i32; - var $i5: i8; -$bb0: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1405, 62} true; - assume {:verifier.code 1} true; - call {:cexpr "__SMACK_or8:arg:a"} boogie_si_record_i8($i0); - call {:cexpr "__SMACK_or8:arg:b"} boogie_si_record_i8($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1405, 62} true; - assume {:verifier.code 1} true; - $i2 := $sext.i8.i32($i0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1405, 65} true; - assume {:verifier.code 1} true; - $i3 := $sext.i8.i32($i1); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1405, 49} true; - assume {:verifier.code 1} true; - call $i4 := __SMACK_or32($i2, $i3); - call {:cexpr "smack:ext:__SMACK_or32"} boogie_si_record_i32($i4); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1405, 43} true; - assume {:verifier.code 0} true; - $i5 := $trunc.i32.i8($i4); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1405, 36} true; - assume {:verifier.code 0} true; - $r := $i5; - $exn := false; - return; -} -const __SMACK_check_overflow: ref; -axiom (__SMACK_check_overflow == $sub.ref(0, 32079)); -procedure __SMACK_check_overflow($i0: i32) -{ -$bb0: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1606, 29} true; - assume {:verifier.code 1} true; - call {:cexpr "__SMACK_check_overflow:arg:flag"} boogie_si_record_i32($i0); - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1606, 29} true; - assume {:verifier.code 1} true; - assume true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1409, 3} true; - assume {:verifier.code 1} true; - assert {:overflow} $i0 == $0; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1410, 1} true; - assume {:verifier.code 0} true; - $exn := false; - return; -} -const __SMACK_loop_exit: ref; -axiom (__SMACK_loop_exit == $sub.ref(0, 33111)); -procedure __SMACK_loop_exit() -{ -$bb0: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1412, 32} true; - assume {:verifier.code 1} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1412, 32} true; - assume {:verifier.code 1} true; - assert {:loopexit} false; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1412, 75} true; - assume {:verifier.code 0} true; - $exn := false; - return; -} -const __SMACK_decls: ref; -axiom (__SMACK_decls == $sub.ref(0, 34143)); -type $mop; -procedure boogie_si_record_mop(m: $mop); -const $MOP: $mop; -var $exn: bool; -var $exnv: int; -procedure corral_atomic_begin(); -procedure corral_atomic_end(); -procedure $alloc(n: ref) returns (p: ref) -{ - call corral_atomic_begin(); - call p := $$alloc(n); - call corral_atomic_end(); -} - -procedure $malloc(n: ref) returns (p: ref) -{ - call corral_atomic_begin(); - call p := $$alloc(n); - call corral_atomic_end(); -} - -var $CurrAddr:ref; - -procedure {:inline 1} $$alloc(n: ref) returns (p: ref) -modifies $CurrAddr; -{ - assume $sge.ref.bool(n, $0.ref); - if ($sgt.ref.bool(n, $0.ref)) { - p := $CurrAddr; - havoc $CurrAddr; - assume $sge.ref.bool($sub.ref($CurrAddr, n), p); - assume $sgt.ref.bool($CurrAddr, $0.ref) && $slt.ref.bool($CurrAddr, $MALLOC_TOP); - } -} - -procedure $free(p: ref); - -const __SMACK_top_decl: ref; -axiom (__SMACK_top_decl == $sub.ref(0, 35175)); -procedure __SMACK_top_decl.ref($p0: ref); -const __SMACK_init_func_memory_model: ref; -axiom (__SMACK_init_func_memory_model == $sub.ref(0, 36207)); -procedure __SMACK_init_func_memory_model() -{ -$bb0: - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1885, 3} true; - assume {:verifier.code 1} true; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1885, 3} true; - assume {:verifier.code 1} true; - $CurrAddr := $1024.ref; - assume {:sourceloc "/usr/local/share/smack/lib/smack.c", 1890, 1} true; - assume {:verifier.code 0} true; - $exn := false; - return; -} -const __SMACK_static_init: ref; -axiom (__SMACK_static_init == $sub.ref(0, 37239)); -procedure __SMACK_static_init() -{ -$bb0: - $M.0 := $store.i64($M.0, h, 0); - call {:cexpr "h"} boogie_si_record_i64(0); - $exn := false; - return; -} -procedure boogie_si_record_i16(x: i16); -procedure boogie_si_record_i32(x: i32); -procedure boogie_si_record_i64(x: i64); -procedure boogie_si_record_i8(x: i8); -procedure boogie_si_record_ref(x: ref); -procedure $initialize() -{ - call __SMACK_static_init(); - call __SMACK_init_func_memory_model(); - return; -} diff --git a/dartagnan/src/test/resources/interrupts/lkmm_oota-opt.ll b/dartagnan/src/test/resources/interrupts/lkmm_oota-opt.ll new file mode 100644 index 0000000000..3497712402 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_oota-opt.ll @@ -0,0 +1,201 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/lkmm_oota.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_oota.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%union.pthread_attr_t = type { i64, [48 x i8] } + +@z = dso_local global i32 0, align 4, !dbg !0 +@y = dso_local global i32 0, align 4, !dbg !30 +@.str = private unnamed_addr constant [18 x i8] c"READ_ONCE(y) == 0\00", align 1 +@.str.1 = private unnamed_addr constant [56 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_oota.c\00", align 1 +@__PRETTY_FUNCTION__.handler = private unnamed_addr constant [22 x i8] c"void *handler(void *)\00", align 1 +@h = dso_local global i64 0, align 8, !dbg !32 +@x = dso_local global i32 0, align 4, !dbg !26 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !45 { + call void @llvm.dbg.value(metadata i8* %0, metadata !49, metadata !DIExpression()), !dbg !50 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @z to i8*), i32 noundef 3, i32 noundef 1), !dbg !51 + %2 = call i32 @__LKMM_LOAD(i8* noundef bitcast (i32* @y to i8*), i32 noundef 1), !dbg !52 + %3 = icmp eq i32 %2, 0, !dbg !52 + br i1 %3, label %5, label %4, !dbg !55 + +4: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0), i32 noundef 13, i8* noundef getelementptr inbounds ([22 x i8], [22 x i8]* @__PRETTY_FUNCTION__.handler, i64 0, i64 0)) #5, !dbg !52 + unreachable, !dbg !52 + +5: ; preds = %1 + ret i8* null, !dbg !56 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__LKMM_STORE(i8* noundef, i32 noundef, i32 noundef) #2 + +declare i32 @__LKMM_LOAD(i8* noundef, i32 noundef) #2 + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #3 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @thread_1(i8* noundef %0) #0 !dbg !57 { + call void @llvm.dbg.value(metadata i8* %0, metadata !58, metadata !DIExpression()), !dbg !59 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !60 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #6, !dbg !61 + %4 = call i32 @__LKMM_LOAD(i8* noundef bitcast (i32* @x to i8*), i32 noundef 1), !dbg !62 + %5 = icmp eq i32 %4, 1, !dbg !64 + br i1 %5, label %6, label %7, !dbg !65 + +6: ; preds = %1 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @y to i8*), i32 noundef 2, i32 noundef 1), !dbg !66 + br label %7, !dbg !68 + +7: ; preds = %6, %1 + %8 = load i64, i64* @h, align 8, !dbg !69 + %9 = call i32 @pthread_join(i64 noundef %8, i8** noundef null), !dbg !70 + ret i8* null, !dbg !71 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #4 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @thread_2(i8* noundef %0) #0 !dbg !72 { + call void @llvm.dbg.value(metadata i8* %0, metadata !73, metadata !DIExpression()), !dbg !74 + %2 = call i32 @__LKMM_LOAD(i8* noundef bitcast (i32* @z to i8*), i32 noundef 1), !dbg !75 + %3 = icmp eq i32 %2, 3, !dbg !77 + br i1 %3, label %4, label %5, !dbg !78 + +4: ; preds = %1 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @x to i8*), i32 noundef 1, i32 noundef 1), !dbg !79 + br label %5, !dbg !81 + +5: ; preds = %4, %1 + ret i8* null, !dbg !82 +} + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !83 { + %1 = alloca i64, align 8 + %2 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !86, metadata !DIExpression()), !dbg !87 + call void @llvm.dbg.declare(metadata i64* %2, metadata !88, metadata !DIExpression()), !dbg !89 + %3 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_1, i8* noundef null) #6, !dbg !90 + %4 = call i32 @pthread_create(i64* noundef %2, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_2, i8* noundef null) #6, !dbg !91 + ret i32 0, !dbg !92 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { noreturn nounwind } +attributes #6 = { nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!37, !38, !39, !40, !41, !42, !43} +!llvm.ident = !{!44} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "z", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !23, globals: !25, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_oota.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "046214f5cc2f6747b6f50936d730fc05") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 3, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "include/lkmm.h", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "f219e5a4f2482585588927d06bb5e5c6") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_once", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "mb", value: 4) +!14 = !DIEnumerator(name: "wmb", value: 5) +!15 = !DIEnumerator(name: "rmb", value: 6) +!16 = !DIEnumerator(name: "rcu_lock", value: 7) +!17 = !DIEnumerator(name: "rcu_unlock", value: 8) +!18 = !DIEnumerator(name: "rcu_sync", value: 9) +!19 = !DIEnumerator(name: "before_atomic", value: 10) +!20 = !DIEnumerator(name: "after_atomic", value: 11) +!21 = !DIEnumerator(name: "after_spinlock", value: 12) +!22 = !DIEnumerator(name: "barrier", value: 13) +!23 = !{!24} +!24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!25 = !{!26, !30, !0, !32} +!26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression()) +!27 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!28 = !DIFile(filename: "benchmarks/interrupts/lkmm_oota.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "046214f5cc2f6747b6f50936d730fc05") +!29 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!30 = !DIGlobalVariableExpression(var: !31, expr: !DIExpression()) +!31 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!32 = !DIGlobalVariableExpression(var: !33, expr: !DIExpression()) +!33 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !28, line: 9, type: !34, isLocal: false, isDefinition: true) +!34 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !35, line: 27, baseType: !36) +!35 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!36 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!37 = !{i32 7, !"Dwarf Version", i32 5} +!38 = !{i32 2, !"Debug Info Version", i32 3} +!39 = !{i32 1, !"wchar_size", i32 4} +!40 = !{i32 7, !"PIC Level", i32 2} +!41 = !{i32 7, !"PIE Level", i32 2} +!42 = !{i32 7, !"uwtable", i32 1} +!43 = !{i32 7, !"frame-pointer", i32 2} +!44 = !{!"Ubuntu clang version 14.0.6"} +!45 = distinct !DISubprogram(name: "handler", scope: !28, file: !28, line: 10, type: !46, scopeLine: 11, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !48) +!46 = !DISubroutineType(types: !47) +!47 = !{!24, !24} +!48 = !{} +!49 = !DILocalVariable(name: "arg", arg: 1, scope: !45, file: !28, line: 10, type: !24) +!50 = !DILocation(line: 0, scope: !45) +!51 = !DILocation(line: 12, column: 5, scope: !45) +!52 = !DILocation(line: 13, column: 5, scope: !53) +!53 = distinct !DILexicalBlock(scope: !54, file: !28, line: 13, column: 5) +!54 = distinct !DILexicalBlock(scope: !45, file: !28, line: 13, column: 5) +!55 = !DILocation(line: 13, column: 5, scope: !54) +!56 = !DILocation(line: 14, column: 5, scope: !45) +!57 = distinct !DISubprogram(name: "thread_1", scope: !28, file: !28, line: 17, type: !46, scopeLine: 18, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !48) +!58 = !DILocalVariable(name: "arg", arg: 1, scope: !57, file: !28, line: 17, type: !24) +!59 = !DILocation(line: 0, scope: !57) +!60 = !DILocation(line: 19, column: 5, scope: !57) +!61 = !DILocation(line: 20, column: 5, scope: !57) +!62 = !DILocation(line: 22, column: 8, scope: !63) +!63 = distinct !DILexicalBlock(scope: !57, file: !28, line: 22, column: 8) +!64 = !DILocation(line: 22, column: 21, scope: !63) +!65 = !DILocation(line: 22, column: 8, scope: !57) +!66 = !DILocation(line: 23, column: 9, scope: !67) +!67 = distinct !DILexicalBlock(scope: !63, file: !28, line: 22, column: 27) +!68 = !DILocation(line: 24, column: 5, scope: !67) +!69 = !DILocation(line: 26, column: 18, scope: !57) +!70 = !DILocation(line: 26, column: 5, scope: !57) +!71 = !DILocation(line: 28, column: 5, scope: !57) +!72 = distinct !DISubprogram(name: "thread_2", scope: !28, file: !28, line: 31, type: !46, scopeLine: 32, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !48) +!73 = !DILocalVariable(name: "arg", arg: 1, scope: !72, file: !28, line: 31, type: !24) +!74 = !DILocation(line: 0, scope: !72) +!75 = !DILocation(line: 33, column: 8, scope: !76) +!76 = distinct !DILexicalBlock(scope: !72, file: !28, line: 33, column: 8) +!77 = !DILocation(line: 33, column: 21, scope: !76) +!78 = !DILocation(line: 33, column: 8, scope: !72) +!79 = !DILocation(line: 34, column: 9, scope: !80) +!80 = distinct !DILexicalBlock(scope: !76, file: !28, line: 33, column: 27) +!81 = !DILocation(line: 35, column: 5, scope: !80) +!82 = !DILocation(line: 36, column: 5, scope: !72) +!83 = distinct !DISubprogram(name: "main", scope: !28, file: !28, line: 39, type: !84, scopeLine: 40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !48) +!84 = !DISubroutineType(types: !85) +!85 = !{!29} +!86 = !DILocalVariable(name: "t1", scope: !83, file: !28, line: 41, type: !34) +!87 = !DILocation(line: 41, column: 15, scope: !83) +!88 = !DILocalVariable(name: "t2", scope: !83, file: !28, line: 41, type: !34) +!89 = !DILocation(line: 41, column: 19, scope: !83) +!90 = !DILocation(line: 43, column: 5, scope: !83) +!91 = !DILocation(line: 44, column: 5, scope: !83) +!92 = !DILocation(line: 46, column: 5, scope: !83) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_with_barrier-opt.ll b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier-opt.ll new file mode 100644 index 0000000000..a99ca23356 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier-opt.ll @@ -0,0 +1,224 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/lkmm_with_barrier.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_with_barrier.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%struct.A = type { i32, i32 } +%union.pthread_attr_t = type { i64, [48 x i8] } + +@cnt = dso_local global i32 0, align 4, !dbg !0 +@as = dso_local global [10 x %struct.A] zeroinitializer, align 16, !dbg !29 +@.str = private unnamed_addr constant [19 x i8] c"as[i].a == as[i].b\00", align 1 +@.str.1 = private unnamed_addr constant [64 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_with_barrier.c\00", align 1 +@__PRETTY_FUNCTION__.handler = private unnamed_addr constant [22 x i8] c"void *handler(void *)\00", align 1 +@h = dso_local global i64 0, align 8, !dbg !41 +@__PRETTY_FUNCTION__.run = private unnamed_addr constant [18 x i8] c"void *run(void *)\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !54 { + call void @llvm.dbg.value(metadata i8* %0, metadata !58, metadata !DIExpression()), !dbg !59 + %2 = ptrtoint i8* %0 to i64, !dbg !60 + %3 = trunc i64 %2 to i32, !dbg !61 + call void @llvm.dbg.value(metadata i32 %3, metadata !62, metadata !DIExpression()), !dbg !59 + %4 = load i32, i32* @cnt, align 4, !dbg !63 + %5 = add nsw i32 %4, 1, !dbg !63 + store i32 %5, i32* @cnt, align 4, !dbg !63 + call void @llvm.dbg.value(metadata i32 %4, metadata !64, metadata !DIExpression()), !dbg !59 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !65 + %6 = sext i32 %4 to i64, !dbg !66 + %7 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %6, !dbg !66 + %8 = getelementptr inbounds %struct.A, %struct.A* %7, i32 0, i32 0, !dbg !67 + store volatile i32 %3, i32* %8, align 8, !dbg !68 + %9 = getelementptr inbounds %struct.A, %struct.A* %7, i32 0, i32 1, !dbg !69 + store volatile i32 %3, i32* %9, align 4, !dbg !70 + %10 = load volatile i32, i32* %8, align 8, !dbg !71 + %11 = load volatile i32, i32* %9, align 4, !dbg !71 + %12 = icmp eq i32 %10, %11, !dbg !71 + br i1 %12, label %14, label %13, !dbg !74 + +13: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0), i32 noundef 23, i8* noundef getelementptr inbounds ([22 x i8], [22 x i8]* @__PRETTY_FUNCTION__.handler, i64 0, i64 0)) #5, !dbg !71 + unreachable, !dbg !71 + +14: ; preds = %1 + ret i8* null, !dbg !75 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__LKMM_FENCE(i32 noundef) #2 + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #3 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @run(i8* noundef %0) #0 !dbg !76 { + call void @llvm.dbg.value(metadata i8* %0, metadata !77, metadata !DIExpression()), !dbg !78 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !79 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #6, !dbg !80 + %4 = ptrtoint i8* %0 to i64, !dbg !81 + %5 = trunc i64 %4 to i32, !dbg !82 + call void @llvm.dbg.value(metadata i32 %5, metadata !83, metadata !DIExpression()), !dbg !78 + %6 = load i32, i32* @cnt, align 4, !dbg !84 + %7 = add nsw i32 %6, 1, !dbg !84 + store i32 %7, i32* @cnt, align 4, !dbg !84 + call void @llvm.dbg.value(metadata i32 %6, metadata !85, metadata !DIExpression()), !dbg !78 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !86 + %8 = sext i32 %6 to i64, !dbg !87 + %9 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %8, !dbg !87 + %10 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 0, !dbg !88 + store volatile i32 %5, i32* %10, align 8, !dbg !89 + %11 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 1, !dbg !90 + store volatile i32 %5, i32* %11, align 4, !dbg !91 + %12 = load volatile i32, i32* %10, align 8, !dbg !92 + %13 = load volatile i32, i32* %11, align 4, !dbg !92 + %14 = icmp eq i32 %12, %13, !dbg !92 + br i1 %14, label %16, label %15, !dbg !95 + +15: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0), i32 noundef 38, i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @__PRETTY_FUNCTION__.run, i64 0, i64 0)) #5, !dbg !92 + unreachable, !dbg !92 + +16: ; preds = %1 + %17 = load i64, i64* @h, align 8, !dbg !96 + %18 = call i32 @pthread_join(i64 noundef %17, i8** noundef null), !dbg !97 + ret i8* null, !dbg !98 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #4 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !99 { + %1 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !102, metadata !DIExpression()), !dbg !103 + %2 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)) #6, !dbg !104 + ret i32 0, !dbg !105 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { noreturn nounwind } +attributes #6 = { nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!46, !47, !48, !49, !50, !51, !52} +!llvm.ident = !{!53} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !31, line: 13, type: !37, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !23, globals: !28, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_with_barrier.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "5a7b863b73f17281194923457d79d9ea") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 3, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "include/lkmm.h", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "f219e5a4f2482585588927d06bb5e5c6") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_once", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "mb", value: 4) +!14 = !DIEnumerator(name: "wmb", value: 5) +!15 = !DIEnumerator(name: "rmb", value: 6) +!16 = !DIEnumerator(name: "rcu_lock", value: 7) +!17 = !DIEnumerator(name: "rcu_unlock", value: 8) +!18 = !DIEnumerator(name: "rcu_sync", value: 9) +!19 = !DIEnumerator(name: "before_atomic", value: 10) +!20 = !DIEnumerator(name: "after_atomic", value: 11) +!21 = !DIEnumerator(name: "after_spinlock", value: 12) +!22 = !DIEnumerator(name: "barrier", value: 13) +!23 = !{!24, !27} +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !25, line: 87, baseType: !26) +!25 = !DIFile(filename: "/usr/include/stdint.h", directory: "", checksumkind: CSK_MD5, checksum: "24103e292ae21916e87130b926c8d2f8") +!26 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!27 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!28 = !{!0, !29, !41} +!29 = !DIGlobalVariableExpression(var: !30, expr: !DIExpression()) +!30 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !31, line: 12, type: !32, isLocal: false, isDefinition: true) +!31 = !DIFile(filename: "benchmarks/interrupts/lkmm_with_barrier.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "5a7b863b73f17281194923457d79d9ea") +!32 = !DICompositeType(tag: DW_TAG_array_type, baseType: !33, size: 640, elements: !39) +!33 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !31, line: 11, size: 64, elements: !34) +!34 = !{!35, !38} +!35 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !33, file: !31, line: 11, baseType: !36, size: 32) +!36 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !37) +!37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!38 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !33, file: !31, line: 11, baseType: !36, size: 32, offset: 32) +!39 = !{!40} +!40 = !DISubrange(count: 10) +!41 = !DIGlobalVariableExpression(var: !42, expr: !DIExpression()) +!42 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !31, line: 15, type: !43, isLocal: false, isDefinition: true) +!43 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !44, line: 27, baseType: !45) +!44 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!45 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!46 = !{i32 7, !"Dwarf Version", i32 5} +!47 = !{i32 2, !"Debug Info Version", i32 3} +!48 = !{i32 1, !"wchar_size", i32 4} +!49 = !{i32 7, !"PIC Level", i32 2} +!50 = !{i32 7, !"PIE Level", i32 2} +!51 = !{i32 7, !"uwtable", i32 1} +!52 = !{i32 7, !"frame-pointer", i32 2} +!53 = !{!"Ubuntu clang version 14.0.6"} +!54 = distinct !DISubprogram(name: "handler", scope: !31, file: !31, line: 16, type: !55, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !57) +!55 = !DISubroutineType(types: !56) +!56 = !{!27, !27} +!57 = !{} +!58 = !DILocalVariable(name: "arg", arg: 1, scope: !54, file: !31, line: 16, type: !27) +!59 = !DILocation(line: 0, scope: !54) +!60 = !DILocation(line: 18, column: 19, scope: !54) +!61 = !DILocation(line: 18, column: 18, scope: !54) +!62 = !DILocalVariable(name: "tindex", scope: !54, file: !31, line: 18, type: !37) +!63 = !DILocation(line: 19, column: 16, scope: !54) +!64 = !DILocalVariable(name: "i", scope: !54, file: !31, line: 19, type: !37) +!65 = !DILocation(line: 20, column: 5, scope: !54) +!66 = !DILocation(line: 21, column: 5, scope: !54) +!67 = !DILocation(line: 21, column: 11, scope: !54) +!68 = !DILocation(line: 21, column: 13, scope: !54) +!69 = !DILocation(line: 22, column: 11, scope: !54) +!70 = !DILocation(line: 22, column: 13, scope: !54) +!71 = !DILocation(line: 23, column: 5, scope: !72) +!72 = distinct !DILexicalBlock(scope: !73, file: !31, line: 23, column: 5) +!73 = distinct !DILexicalBlock(scope: !54, file: !31, line: 23, column: 5) +!74 = !DILocation(line: 23, column: 5, scope: !73) +!75 = !DILocation(line: 25, column: 5, scope: !54) +!76 = distinct !DISubprogram(name: "run", scope: !31, file: !31, line: 28, type: !55, scopeLine: 29, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !57) +!77 = !DILocalVariable(name: "arg", arg: 1, scope: !76, file: !31, line: 28, type: !27) +!78 = !DILocation(line: 0, scope: !76) +!79 = !DILocation(line: 30, column: 5, scope: !76) +!80 = !DILocation(line: 31, column: 5, scope: !76) +!81 = !DILocation(line: 33, column: 19, scope: !76) +!82 = !DILocation(line: 33, column: 18, scope: !76) +!83 = !DILocalVariable(name: "tindex", scope: !76, file: !31, line: 33, type: !37) +!84 = !DILocation(line: 34, column: 16, scope: !76) +!85 = !DILocalVariable(name: "i", scope: !76, file: !31, line: 34, type: !37) +!86 = !DILocation(line: 35, column: 5, scope: !76) +!87 = !DILocation(line: 36, column: 5, scope: !76) +!88 = !DILocation(line: 36, column: 11, scope: !76) +!89 = !DILocation(line: 36, column: 13, scope: !76) +!90 = !DILocation(line: 37, column: 11, scope: !76) +!91 = !DILocation(line: 37, column: 13, scope: !76) +!92 = !DILocation(line: 38, column: 5, scope: !93) +!93 = distinct !DILexicalBlock(scope: !94, file: !31, line: 38, column: 5) +!94 = distinct !DILexicalBlock(scope: !76, file: !31, line: 38, column: 5) +!95 = !DILocation(line: 38, column: 5, scope: !94) +!96 = !DILocation(line: 40, column: 18, scope: !76) +!97 = !DILocation(line: 40, column: 5, scope: !76) +!98 = !DILocation(line: 42, column: 5, scope: !76) +!99 = distinct !DISubprogram(name: "main", scope: !31, file: !31, line: 45, type: !100, scopeLine: 46, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !57) +!100 = !DISubroutineType(types: !101) +!101 = !{!37} +!102 = !DILocalVariable(name: "t", scope: !99, file: !31, line: 47, type: !43) +!103 = !DILocation(line: 47, column: 15, scope: !99) +!104 = !DILocation(line: 48, column: 5, scope: !99) +!105 = !DILocation(line: 50, column: 5, scope: !99) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec-opt.ll b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec-opt.ll new file mode 100644 index 0000000000..7374c176b2 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec-opt.ll @@ -0,0 +1,232 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/lkmm_with_barrier_dec.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_with_barrier_dec.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%struct.A = type { i32, i32 } +%union.pthread_attr_t = type { i64, [48 x i8] } + +@cnt = dso_local global i32 0, align 4, !dbg !0 +@as = dso_local global [10 x %struct.A] zeroinitializer, align 16, !dbg !29 +@.str = private unnamed_addr constant [19 x i8] c"as[i].a == as[i].b\00", align 1 +@.str.1 = private unnamed_addr constant [68 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_with_barrier_dec.c\00", align 1 +@__PRETTY_FUNCTION__.handler = private unnamed_addr constant [22 x i8] c"void *handler(void *)\00", align 1 +@h = dso_local global i64 0, align 8, !dbg !41 +@__PRETTY_FUNCTION__.run = private unnamed_addr constant [18 x i8] c"void *run(void *)\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !54 { + call void @llvm.dbg.value(metadata i8* %0, metadata !58, metadata !DIExpression()), !dbg !59 + %2 = ptrtoint i8* %0 to i64, !dbg !60 + %3 = trunc i64 %2 to i32, !dbg !61 + call void @llvm.dbg.value(metadata i32 %3, metadata !62, metadata !DIExpression()), !dbg !59 + %4 = load i32, i32* @cnt, align 4, !dbg !63 + %5 = add nsw i32 %4, 1, !dbg !63 + store i32 %5, i32* @cnt, align 4, !dbg !63 + call void @llvm.dbg.value(metadata i32 %4, metadata !64, metadata !DIExpression()), !dbg !59 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !65 + %6 = sext i32 %4 to i64, !dbg !66 + %7 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %6, !dbg !66 + %8 = getelementptr inbounds %struct.A, %struct.A* %7, i32 0, i32 0, !dbg !67 + store volatile i32 %3, i32* %8, align 8, !dbg !68 + %9 = getelementptr inbounds %struct.A, %struct.A* %7, i32 0, i32 1, !dbg !69 + store volatile i32 %3, i32* %9, align 4, !dbg !70 + %10 = load volatile i32, i32* %8, align 8, !dbg !71 + %11 = load volatile i32, i32* %9, align 4, !dbg !71 + %12 = icmp eq i32 %10, %11, !dbg !71 + br i1 %12, label %14, label %13, !dbg !74 + +13: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([68 x i8], [68 x i8]* @.str.1, i64 0, i64 0), i32 noundef 23, i8* noundef getelementptr inbounds ([22 x i8], [22 x i8]* @__PRETTY_FUNCTION__.handler, i64 0, i64 0)) #5, !dbg !71 + unreachable, !dbg !71 + +14: ; preds = %1 + %15 = load i32, i32* @cnt, align 4, !dbg !75 + %16 = add nsw i32 %15, -1, !dbg !75 + store i32 %16, i32* @cnt, align 4, !dbg !75 + ret i8* null, !dbg !76 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__LKMM_FENCE(i32 noundef) #2 + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #3 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @run(i8* noundef %0) #0 !dbg !77 { + call void @llvm.dbg.value(metadata i8* %0, metadata !78, metadata !DIExpression()), !dbg !79 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !80 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #6, !dbg !81 + %4 = ptrtoint i8* %0 to i64, !dbg !82 + %5 = trunc i64 %4 to i32, !dbg !83 + call void @llvm.dbg.value(metadata i32 %5, metadata !84, metadata !DIExpression()), !dbg !79 + %6 = load i32, i32* @cnt, align 4, !dbg !85 + %7 = add nsw i32 %6, 1, !dbg !85 + store i32 %7, i32* @cnt, align 4, !dbg !85 + call void @llvm.dbg.value(metadata i32 %6, metadata !86, metadata !DIExpression()), !dbg !79 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !87 + %8 = sext i32 %6 to i64, !dbg !88 + %9 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %8, !dbg !88 + %10 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 0, !dbg !89 + store volatile i32 %5, i32* %10, align 8, !dbg !90 + %11 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 1, !dbg !91 + store volatile i32 %5, i32* %11, align 4, !dbg !92 + %12 = load volatile i32, i32* %10, align 8, !dbg !93 + %13 = load volatile i32, i32* %11, align 4, !dbg !93 + %14 = icmp eq i32 %12, %13, !dbg !93 + br i1 %14, label %16, label %15, !dbg !96 + +15: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([68 x i8], [68 x i8]* @.str.1, i64 0, i64 0), i32 noundef 40, i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @__PRETTY_FUNCTION__.run, i64 0, i64 0)) #5, !dbg !93 + unreachable, !dbg !93 + +16: ; preds = %1 + %17 = load i32, i32* @cnt, align 4, !dbg !97 + %18 = add nsw i32 %17, -1, !dbg !97 + store i32 %18, i32* @cnt, align 4, !dbg !97 + %19 = load i64, i64* @h, align 8, !dbg !98 + %20 = call i32 @pthread_join(i64 noundef %19, i8** noundef null), !dbg !99 + ret i8* null, !dbg !100 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #4 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !101 { + %1 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !104, metadata !DIExpression()), !dbg !105 + %2 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)) #6, !dbg !106 + ret i32 0, !dbg !107 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { noreturn nounwind } +attributes #6 = { nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!46, !47, !48, !49, !50, !51, !52} +!llvm.ident = !{!53} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !31, line: 13, type: !37, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !23, globals: !28, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_with_barrier_dec.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "8e2e6e47c41396ae6f53c9a5ad4df53b") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 3, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "include/lkmm.h", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "f219e5a4f2482585588927d06bb5e5c6") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_once", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "mb", value: 4) +!14 = !DIEnumerator(name: "wmb", value: 5) +!15 = !DIEnumerator(name: "rmb", value: 6) +!16 = !DIEnumerator(name: "rcu_lock", value: 7) +!17 = !DIEnumerator(name: "rcu_unlock", value: 8) +!18 = !DIEnumerator(name: "rcu_sync", value: 9) +!19 = !DIEnumerator(name: "before_atomic", value: 10) +!20 = !DIEnumerator(name: "after_atomic", value: 11) +!21 = !DIEnumerator(name: "after_spinlock", value: 12) +!22 = !DIEnumerator(name: "barrier", value: 13) +!23 = !{!24, !27} +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !25, line: 87, baseType: !26) +!25 = !DIFile(filename: "/usr/include/stdint.h", directory: "", checksumkind: CSK_MD5, checksum: "24103e292ae21916e87130b926c8d2f8") +!26 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!27 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!28 = !{!0, !29, !41} +!29 = !DIGlobalVariableExpression(var: !30, expr: !DIExpression()) +!30 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !31, line: 12, type: !32, isLocal: false, isDefinition: true) +!31 = !DIFile(filename: "benchmarks/interrupts/lkmm_with_barrier_dec.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "8e2e6e47c41396ae6f53c9a5ad4df53b") +!32 = !DICompositeType(tag: DW_TAG_array_type, baseType: !33, size: 640, elements: !39) +!33 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !31, line: 11, size: 64, elements: !34) +!34 = !{!35, !38} +!35 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !33, file: !31, line: 11, baseType: !36, size: 32) +!36 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !37) +!37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!38 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !33, file: !31, line: 11, baseType: !36, size: 32, offset: 32) +!39 = !{!40} +!40 = !DISubrange(count: 10) +!41 = !DIGlobalVariableExpression(var: !42, expr: !DIExpression()) +!42 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !31, line: 15, type: !43, isLocal: false, isDefinition: true) +!43 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !44, line: 27, baseType: !45) +!44 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!45 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!46 = !{i32 7, !"Dwarf Version", i32 5} +!47 = !{i32 2, !"Debug Info Version", i32 3} +!48 = !{i32 1, !"wchar_size", i32 4} +!49 = !{i32 7, !"PIC Level", i32 2} +!50 = !{i32 7, !"PIE Level", i32 2} +!51 = !{i32 7, !"uwtable", i32 1} +!52 = !{i32 7, !"frame-pointer", i32 2} +!53 = !{!"Ubuntu clang version 14.0.6"} +!54 = distinct !DISubprogram(name: "handler", scope: !31, file: !31, line: 16, type: !55, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !57) +!55 = !DISubroutineType(types: !56) +!56 = !{!27, !27} +!57 = !{} +!58 = !DILocalVariable(name: "arg", arg: 1, scope: !54, file: !31, line: 16, type: !27) +!59 = !DILocation(line: 0, scope: !54) +!60 = !DILocation(line: 18, column: 19, scope: !54) +!61 = !DILocation(line: 18, column: 18, scope: !54) +!62 = !DILocalVariable(name: "tindex", scope: !54, file: !31, line: 18, type: !37) +!63 = !DILocation(line: 19, column: 16, scope: !54) +!64 = !DILocalVariable(name: "i", scope: !54, file: !31, line: 19, type: !37) +!65 = !DILocation(line: 20, column: 5, scope: !54) +!66 = !DILocation(line: 21, column: 5, scope: !54) +!67 = !DILocation(line: 21, column: 11, scope: !54) +!68 = !DILocation(line: 21, column: 13, scope: !54) +!69 = !DILocation(line: 22, column: 11, scope: !54) +!70 = !DILocation(line: 22, column: 13, scope: !54) +!71 = !DILocation(line: 23, column: 5, scope: !72) +!72 = distinct !DILexicalBlock(scope: !73, file: !31, line: 23, column: 5) +!73 = distinct !DILexicalBlock(scope: !54, file: !31, line: 23, column: 5) +!74 = !DILocation(line: 23, column: 5, scope: !73) +!75 = !DILocation(line: 25, column: 8, scope: !54) +!76 = !DILocation(line: 27, column: 5, scope: !54) +!77 = distinct !DISubprogram(name: "run", scope: !31, file: !31, line: 30, type: !55, scopeLine: 31, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !57) +!78 = !DILocalVariable(name: "arg", arg: 1, scope: !77, file: !31, line: 30, type: !27) +!79 = !DILocation(line: 0, scope: !77) +!80 = !DILocation(line: 32, column: 5, scope: !77) +!81 = !DILocation(line: 33, column: 5, scope: !77) +!82 = !DILocation(line: 35, column: 19, scope: !77) +!83 = !DILocation(line: 35, column: 18, scope: !77) +!84 = !DILocalVariable(name: "tindex", scope: !77, file: !31, line: 35, type: !37) +!85 = !DILocation(line: 36, column: 16, scope: !77) +!86 = !DILocalVariable(name: "i", scope: !77, file: !31, line: 36, type: !37) +!87 = !DILocation(line: 37, column: 5, scope: !77) +!88 = !DILocation(line: 38, column: 5, scope: !77) +!89 = !DILocation(line: 38, column: 11, scope: !77) +!90 = !DILocation(line: 38, column: 13, scope: !77) +!91 = !DILocation(line: 39, column: 11, scope: !77) +!92 = !DILocation(line: 39, column: 13, scope: !77) +!93 = !DILocation(line: 40, column: 5, scope: !94) +!94 = distinct !DILexicalBlock(scope: !95, file: !31, line: 40, column: 5) +!95 = distinct !DILexicalBlock(scope: !77, file: !31, line: 40, column: 5) +!96 = !DILocation(line: 40, column: 5, scope: !95) +!97 = !DILocation(line: 42, column: 8, scope: !77) +!98 = !DILocation(line: 44, column: 18, scope: !77) +!99 = !DILocation(line: 44, column: 5, scope: !77) +!100 = !DILocation(line: 46, column: 5, scope: !77) +!101 = distinct !DISubprogram(name: "main", scope: !31, file: !31, line: 49, type: !102, scopeLine: 50, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !57) +!102 = !DISubroutineType(types: !103) +!103 = !{!37} +!104 = !DILocalVariable(name: "t", scope: !101, file: !31, line: 51, type: !43) +!105 = !DILocation(line: 51, column: 15, scope: !101) +!106 = !DILocation(line: 52, column: 5, scope: !101) +!107 = !DILocation(line: 54, column: 5, scope: !101) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec_barrier-opt.ll b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec_barrier-opt.ll new file mode 100644 index 0000000000..97b24fee66 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec_barrier-opt.ll @@ -0,0 +1,236 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/lkmm_with_barrier_dec_barrier.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_with_barrier_dec_barrier.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%struct.A = type { i32, i32 } +%union.pthread_attr_t = type { i64, [48 x i8] } + +@cnt = dso_local global i32 0, align 4, !dbg !0 +@as = dso_local global [10 x %struct.A] zeroinitializer, align 16, !dbg !29 +@.str = private unnamed_addr constant [19 x i8] c"as[i].a == as[i].b\00", align 1 +@.str.1 = private unnamed_addr constant [76 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_with_barrier_dec_barrier.c\00", align 1 +@__PRETTY_FUNCTION__.handler = private unnamed_addr constant [22 x i8] c"void *handler(void *)\00", align 1 +@h = dso_local global i64 0, align 8, !dbg !41 +@__PRETTY_FUNCTION__.run = private unnamed_addr constant [18 x i8] c"void *run(void *)\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !54 { + call void @llvm.dbg.value(metadata i8* %0, metadata !58, metadata !DIExpression()), !dbg !59 + %2 = ptrtoint i8* %0 to i64, !dbg !60 + %3 = trunc i64 %2 to i32, !dbg !61 + call void @llvm.dbg.value(metadata i32 %3, metadata !62, metadata !DIExpression()), !dbg !59 + %4 = load i32, i32* @cnt, align 4, !dbg !63 + %5 = add nsw i32 %4, 1, !dbg !63 + store i32 %5, i32* @cnt, align 4, !dbg !63 + call void @llvm.dbg.value(metadata i32 %4, metadata !64, metadata !DIExpression()), !dbg !59 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !65 + %6 = sext i32 %4 to i64, !dbg !66 + %7 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %6, !dbg !66 + %8 = getelementptr inbounds %struct.A, %struct.A* %7, i32 0, i32 0, !dbg !67 + store volatile i32 %3, i32* %8, align 8, !dbg !68 + %9 = getelementptr inbounds %struct.A, %struct.A* %7, i32 0, i32 1, !dbg !69 + store volatile i32 %3, i32* %9, align 4, !dbg !70 + %10 = load volatile i32, i32* %8, align 8, !dbg !71 + %11 = load volatile i32, i32* %9, align 4, !dbg !71 + %12 = icmp eq i32 %10, %11, !dbg !71 + br i1 %12, label %14, label %13, !dbg !74 + +13: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i32 noundef 23, i8* noundef getelementptr inbounds ([22 x i8], [22 x i8]* @__PRETTY_FUNCTION__.handler, i64 0, i64 0)) #5, !dbg !71 + unreachable, !dbg !71 + +14: ; preds = %1 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !75 + %15 = load i32, i32* @cnt, align 4, !dbg !76 + %16 = add nsw i32 %15, -1, !dbg !76 + store i32 %16, i32* @cnt, align 4, !dbg !76 + ret i8* null, !dbg !77 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__LKMM_FENCE(i32 noundef) #2 + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #3 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @run(i8* noundef %0) #0 !dbg !78 { + call void @llvm.dbg.value(metadata i8* %0, metadata !79, metadata !DIExpression()), !dbg !80 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !81 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #6, !dbg !82 + %4 = ptrtoint i8* %0 to i64, !dbg !83 + %5 = trunc i64 %4 to i32, !dbg !84 + call void @llvm.dbg.value(metadata i32 %5, metadata !85, metadata !DIExpression()), !dbg !80 + %6 = load i32, i32* @cnt, align 4, !dbg !86 + %7 = add nsw i32 %6, 1, !dbg !86 + store i32 %7, i32* @cnt, align 4, !dbg !86 + call void @llvm.dbg.value(metadata i32 %6, metadata !87, metadata !DIExpression()), !dbg !80 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !88 + %8 = sext i32 %6 to i64, !dbg !89 + %9 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %8, !dbg !89 + %10 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 0, !dbg !90 + store volatile i32 %5, i32* %10, align 8, !dbg !91 + %11 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 1, !dbg !92 + store volatile i32 %5, i32* %11, align 4, !dbg !93 + %12 = load volatile i32, i32* %10, align 8, !dbg !94 + %13 = load volatile i32, i32* %11, align 4, !dbg !94 + %14 = icmp eq i32 %12, %13, !dbg !94 + br i1 %14, label %16, label %15, !dbg !97 + +15: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i32 noundef 41, i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @__PRETTY_FUNCTION__.run, i64 0, i64 0)) #5, !dbg !94 + unreachable, !dbg !94 + +16: ; preds = %1 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !98 + %17 = load i32, i32* @cnt, align 4, !dbg !99 + %18 = add nsw i32 %17, -1, !dbg !99 + store i32 %18, i32* @cnt, align 4, !dbg !99 + %19 = load i64, i64* @h, align 8, !dbg !100 + %20 = call i32 @pthread_join(i64 noundef %19, i8** noundef null), !dbg !101 + ret i8* null, !dbg !102 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #4 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !103 { + %1 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !106, metadata !DIExpression()), !dbg !107 + %2 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)) #6, !dbg !108 + ret i32 0, !dbg !109 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { noreturn nounwind } +attributes #6 = { nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!46, !47, !48, !49, !50, !51, !52} +!llvm.ident = !{!53} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !31, line: 13, type: !37, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !23, globals: !28, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_with_barrier_dec_barrier.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "c5b1ce20ef284672409facba64c3f36b") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 3, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "include/lkmm.h", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "f219e5a4f2482585588927d06bb5e5c6") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_once", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "mb", value: 4) +!14 = !DIEnumerator(name: "wmb", value: 5) +!15 = !DIEnumerator(name: "rmb", value: 6) +!16 = !DIEnumerator(name: "rcu_lock", value: 7) +!17 = !DIEnumerator(name: "rcu_unlock", value: 8) +!18 = !DIEnumerator(name: "rcu_sync", value: 9) +!19 = !DIEnumerator(name: "before_atomic", value: 10) +!20 = !DIEnumerator(name: "after_atomic", value: 11) +!21 = !DIEnumerator(name: "after_spinlock", value: 12) +!22 = !DIEnumerator(name: "barrier", value: 13) +!23 = !{!24, !27} +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !25, line: 87, baseType: !26) +!25 = !DIFile(filename: "/usr/include/stdint.h", directory: "", checksumkind: CSK_MD5, checksum: "24103e292ae21916e87130b926c8d2f8") +!26 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!27 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!28 = !{!0, !29, !41} +!29 = !DIGlobalVariableExpression(var: !30, expr: !DIExpression()) +!30 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !31, line: 12, type: !32, isLocal: false, isDefinition: true) +!31 = !DIFile(filename: "benchmarks/interrupts/lkmm_with_barrier_dec_barrier.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "c5b1ce20ef284672409facba64c3f36b") +!32 = !DICompositeType(tag: DW_TAG_array_type, baseType: !33, size: 640, elements: !39) +!33 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !31, line: 11, size: 64, elements: !34) +!34 = !{!35, !38} +!35 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !33, file: !31, line: 11, baseType: !36, size: 32) +!36 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !37) +!37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!38 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !33, file: !31, line: 11, baseType: !36, size: 32, offset: 32) +!39 = !{!40} +!40 = !DISubrange(count: 10) +!41 = !DIGlobalVariableExpression(var: !42, expr: !DIExpression()) +!42 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !31, line: 15, type: !43, isLocal: false, isDefinition: true) +!43 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !44, line: 27, baseType: !45) +!44 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!45 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!46 = !{i32 7, !"Dwarf Version", i32 5} +!47 = !{i32 2, !"Debug Info Version", i32 3} +!48 = !{i32 1, !"wchar_size", i32 4} +!49 = !{i32 7, !"PIC Level", i32 2} +!50 = !{i32 7, !"PIE Level", i32 2} +!51 = !{i32 7, !"uwtable", i32 1} +!52 = !{i32 7, !"frame-pointer", i32 2} +!53 = !{!"Ubuntu clang version 14.0.6"} +!54 = distinct !DISubprogram(name: "handler", scope: !31, file: !31, line: 16, type: !55, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !57) +!55 = !DISubroutineType(types: !56) +!56 = !{!27, !27} +!57 = !{} +!58 = !DILocalVariable(name: "arg", arg: 1, scope: !54, file: !31, line: 16, type: !27) +!59 = !DILocation(line: 0, scope: !54) +!60 = !DILocation(line: 18, column: 19, scope: !54) +!61 = !DILocation(line: 18, column: 18, scope: !54) +!62 = !DILocalVariable(name: "tindex", scope: !54, file: !31, line: 18, type: !37) +!63 = !DILocation(line: 19, column: 16, scope: !54) +!64 = !DILocalVariable(name: "i", scope: !54, file: !31, line: 19, type: !37) +!65 = !DILocation(line: 20, column: 5, scope: !54) +!66 = !DILocation(line: 21, column: 5, scope: !54) +!67 = !DILocation(line: 21, column: 11, scope: !54) +!68 = !DILocation(line: 21, column: 13, scope: !54) +!69 = !DILocation(line: 22, column: 11, scope: !54) +!70 = !DILocation(line: 22, column: 13, scope: !54) +!71 = !DILocation(line: 23, column: 5, scope: !72) +!72 = distinct !DILexicalBlock(scope: !73, file: !31, line: 23, column: 5) +!73 = distinct !DILexicalBlock(scope: !54, file: !31, line: 23, column: 5) +!74 = !DILocation(line: 23, column: 5, scope: !73) +!75 = !DILocation(line: 25, column: 5, scope: !54) +!76 = !DILocation(line: 26, column: 8, scope: !54) +!77 = !DILocation(line: 28, column: 5, scope: !54) +!78 = distinct !DISubprogram(name: "run", scope: !31, file: !31, line: 31, type: !55, scopeLine: 32, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !57) +!79 = !DILocalVariable(name: "arg", arg: 1, scope: !78, file: !31, line: 31, type: !27) +!80 = !DILocation(line: 0, scope: !78) +!81 = !DILocation(line: 33, column: 5, scope: !78) +!82 = !DILocation(line: 34, column: 5, scope: !78) +!83 = !DILocation(line: 36, column: 19, scope: !78) +!84 = !DILocation(line: 36, column: 18, scope: !78) +!85 = !DILocalVariable(name: "tindex", scope: !78, file: !31, line: 36, type: !37) +!86 = !DILocation(line: 37, column: 16, scope: !78) +!87 = !DILocalVariable(name: "i", scope: !78, file: !31, line: 37, type: !37) +!88 = !DILocation(line: 38, column: 5, scope: !78) +!89 = !DILocation(line: 39, column: 5, scope: !78) +!90 = !DILocation(line: 39, column: 11, scope: !78) +!91 = !DILocation(line: 39, column: 13, scope: !78) +!92 = !DILocation(line: 40, column: 11, scope: !78) +!93 = !DILocation(line: 40, column: 13, scope: !78) +!94 = !DILocation(line: 41, column: 5, scope: !95) +!95 = distinct !DILexicalBlock(scope: !96, file: !31, line: 41, column: 5) +!96 = distinct !DILexicalBlock(scope: !78, file: !31, line: 41, column: 5) +!97 = !DILocation(line: 41, column: 5, scope: !96) +!98 = !DILocation(line: 43, column: 5, scope: !78) +!99 = !DILocation(line: 44, column: 8, scope: !78) +!100 = !DILocation(line: 46, column: 18, scope: !78) +!101 = !DILocation(line: 46, column: 5, scope: !78) +!102 = !DILocation(line: 48, column: 5, scope: !78) +!103 = distinct !DISubprogram(name: "main", scope: !31, file: !31, line: 51, type: !104, scopeLine: 52, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !57) +!104 = !DISubroutineType(types: !105) +!105 = !{!37} +!106 = !DILocalVariable(name: "t", scope: !103, file: !31, line: 53, type: !43) +!107 = !DILocation(line: 53, column: 15, scope: !103) +!108 = !DILocation(line: 54, column: 5, scope: !103) +!109 = !DILocation(line: 56, column: 5, scope: !103) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec_wmb-opt.ll b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec_wmb-opt.ll new file mode 100644 index 0000000000..2f0e371b1b --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec_wmb-opt.ll @@ -0,0 +1,236 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/lkmm_with_barrier_dec_wmb.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_with_barrier_dec_wmb.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%struct.A = type { i32, i32 } +%union.pthread_attr_t = type { i64, [48 x i8] } + +@cnt = dso_local global i32 0, align 4, !dbg !0 +@as = dso_local global [10 x %struct.A] zeroinitializer, align 16, !dbg !29 +@.str = private unnamed_addr constant [19 x i8] c"as[i].a == as[i].b\00", align 1 +@.str.1 = private unnamed_addr constant [72 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_with_barrier_dec_wmb.c\00", align 1 +@__PRETTY_FUNCTION__.handler = private unnamed_addr constant [22 x i8] c"void *handler(void *)\00", align 1 +@h = dso_local global i64 0, align 8, !dbg !41 +@__PRETTY_FUNCTION__.run = private unnamed_addr constant [18 x i8] c"void *run(void *)\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !54 { + call void @llvm.dbg.value(metadata i8* %0, metadata !58, metadata !DIExpression()), !dbg !59 + %2 = ptrtoint i8* %0 to i64, !dbg !60 + %3 = trunc i64 %2 to i32, !dbg !61 + call void @llvm.dbg.value(metadata i32 %3, metadata !62, metadata !DIExpression()), !dbg !59 + %4 = load i32, i32* @cnt, align 4, !dbg !63 + %5 = add nsw i32 %4, 1, !dbg !63 + store i32 %5, i32* @cnt, align 4, !dbg !63 + call void @llvm.dbg.value(metadata i32 %4, metadata !64, metadata !DIExpression()), !dbg !59 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !65 + %6 = sext i32 %4 to i64, !dbg !66 + %7 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %6, !dbg !66 + %8 = getelementptr inbounds %struct.A, %struct.A* %7, i32 0, i32 0, !dbg !67 + store volatile i32 %3, i32* %8, align 8, !dbg !68 + %9 = getelementptr inbounds %struct.A, %struct.A* %7, i32 0, i32 1, !dbg !69 + store volatile i32 %3, i32* %9, align 4, !dbg !70 + %10 = load volatile i32, i32* %8, align 8, !dbg !71 + %11 = load volatile i32, i32* %9, align 4, !dbg !71 + %12 = icmp eq i32 %10, %11, !dbg !71 + br i1 %12, label %14, label %13, !dbg !74 + +13: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([72 x i8], [72 x i8]* @.str.1, i64 0, i64 0), i32 noundef 23, i8* noundef getelementptr inbounds ([22 x i8], [22 x i8]* @__PRETTY_FUNCTION__.handler, i64 0, i64 0)) #5, !dbg !71 + unreachable, !dbg !71 + +14: ; preds = %1 + call void @__LKMM_FENCE(i32 noundef 5), !dbg !75 + %15 = load i32, i32* @cnt, align 4, !dbg !76 + %16 = add nsw i32 %15, -1, !dbg !76 + store i32 %16, i32* @cnt, align 4, !dbg !76 + ret i8* null, !dbg !77 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__LKMM_FENCE(i32 noundef) #2 + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #3 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @run(i8* noundef %0) #0 !dbg !78 { + call void @llvm.dbg.value(metadata i8* %0, metadata !79, metadata !DIExpression()), !dbg !80 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !81 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #6, !dbg !82 + %4 = ptrtoint i8* %0 to i64, !dbg !83 + %5 = trunc i64 %4 to i32, !dbg !84 + call void @llvm.dbg.value(metadata i32 %5, metadata !85, metadata !DIExpression()), !dbg !80 + %6 = load i32, i32* @cnt, align 4, !dbg !86 + %7 = add nsw i32 %6, 1, !dbg !86 + store i32 %7, i32* @cnt, align 4, !dbg !86 + call void @llvm.dbg.value(metadata i32 %6, metadata !87, metadata !DIExpression()), !dbg !80 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !88 + %8 = sext i32 %6 to i64, !dbg !89 + %9 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %8, !dbg !89 + %10 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 0, !dbg !90 + store volatile i32 %5, i32* %10, align 8, !dbg !91 + %11 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 1, !dbg !92 + store volatile i32 %5, i32* %11, align 4, !dbg !93 + %12 = load volatile i32, i32* %10, align 8, !dbg !94 + %13 = load volatile i32, i32* %11, align 4, !dbg !94 + %14 = icmp eq i32 %12, %13, !dbg !94 + br i1 %14, label %16, label %15, !dbg !97 + +15: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([72 x i8], [72 x i8]* @.str.1, i64 0, i64 0), i32 noundef 41, i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @__PRETTY_FUNCTION__.run, i64 0, i64 0)) #5, !dbg !94 + unreachable, !dbg !94 + +16: ; preds = %1 + call void @__LKMM_FENCE(i32 noundef 5), !dbg !98 + %17 = load i32, i32* @cnt, align 4, !dbg !99 + %18 = add nsw i32 %17, -1, !dbg !99 + store i32 %18, i32* @cnt, align 4, !dbg !99 + %19 = load i64, i64* @h, align 8, !dbg !100 + %20 = call i32 @pthread_join(i64 noundef %19, i8** noundef null), !dbg !101 + ret i8* null, !dbg !102 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #4 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !103 { + %1 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !106, metadata !DIExpression()), !dbg !107 + %2 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)) #6, !dbg !108 + ret i32 0, !dbg !109 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { noreturn nounwind } +attributes #6 = { nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!46, !47, !48, !49, !50, !51, !52} +!llvm.ident = !{!53} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !31, line: 13, type: !37, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !23, globals: !28, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_with_barrier_dec_wmb.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "c38d8c7c8671768a5aa270fb78f8bb01") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 3, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "include/lkmm.h", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "f219e5a4f2482585588927d06bb5e5c6") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_once", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "mb", value: 4) +!14 = !DIEnumerator(name: "wmb", value: 5) +!15 = !DIEnumerator(name: "rmb", value: 6) +!16 = !DIEnumerator(name: "rcu_lock", value: 7) +!17 = !DIEnumerator(name: "rcu_unlock", value: 8) +!18 = !DIEnumerator(name: "rcu_sync", value: 9) +!19 = !DIEnumerator(name: "before_atomic", value: 10) +!20 = !DIEnumerator(name: "after_atomic", value: 11) +!21 = !DIEnumerator(name: "after_spinlock", value: 12) +!22 = !DIEnumerator(name: "barrier", value: 13) +!23 = !{!24, !27} +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !25, line: 87, baseType: !26) +!25 = !DIFile(filename: "/usr/include/stdint.h", directory: "", checksumkind: CSK_MD5, checksum: "24103e292ae21916e87130b926c8d2f8") +!26 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!27 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!28 = !{!0, !29, !41} +!29 = !DIGlobalVariableExpression(var: !30, expr: !DIExpression()) +!30 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !31, line: 12, type: !32, isLocal: false, isDefinition: true) +!31 = !DIFile(filename: "benchmarks/interrupts/lkmm_with_barrier_dec_wmb.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "c38d8c7c8671768a5aa270fb78f8bb01") +!32 = !DICompositeType(tag: DW_TAG_array_type, baseType: !33, size: 640, elements: !39) +!33 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !31, line: 11, size: 64, elements: !34) +!34 = !{!35, !38} +!35 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !33, file: !31, line: 11, baseType: !36, size: 32) +!36 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !37) +!37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!38 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !33, file: !31, line: 11, baseType: !36, size: 32, offset: 32) +!39 = !{!40} +!40 = !DISubrange(count: 10) +!41 = !DIGlobalVariableExpression(var: !42, expr: !DIExpression()) +!42 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !31, line: 15, type: !43, isLocal: false, isDefinition: true) +!43 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !44, line: 27, baseType: !45) +!44 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!45 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!46 = !{i32 7, !"Dwarf Version", i32 5} +!47 = !{i32 2, !"Debug Info Version", i32 3} +!48 = !{i32 1, !"wchar_size", i32 4} +!49 = !{i32 7, !"PIC Level", i32 2} +!50 = !{i32 7, !"PIE Level", i32 2} +!51 = !{i32 7, !"uwtable", i32 1} +!52 = !{i32 7, !"frame-pointer", i32 2} +!53 = !{!"Ubuntu clang version 14.0.6"} +!54 = distinct !DISubprogram(name: "handler", scope: !31, file: !31, line: 16, type: !55, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !57) +!55 = !DISubroutineType(types: !56) +!56 = !{!27, !27} +!57 = !{} +!58 = !DILocalVariable(name: "arg", arg: 1, scope: !54, file: !31, line: 16, type: !27) +!59 = !DILocation(line: 0, scope: !54) +!60 = !DILocation(line: 18, column: 19, scope: !54) +!61 = !DILocation(line: 18, column: 18, scope: !54) +!62 = !DILocalVariable(name: "tindex", scope: !54, file: !31, line: 18, type: !37) +!63 = !DILocation(line: 19, column: 16, scope: !54) +!64 = !DILocalVariable(name: "i", scope: !54, file: !31, line: 19, type: !37) +!65 = !DILocation(line: 20, column: 5, scope: !54) +!66 = !DILocation(line: 21, column: 5, scope: !54) +!67 = !DILocation(line: 21, column: 11, scope: !54) +!68 = !DILocation(line: 21, column: 13, scope: !54) +!69 = !DILocation(line: 22, column: 11, scope: !54) +!70 = !DILocation(line: 22, column: 13, scope: !54) +!71 = !DILocation(line: 23, column: 5, scope: !72) +!72 = distinct !DILexicalBlock(scope: !73, file: !31, line: 23, column: 5) +!73 = distinct !DILexicalBlock(scope: !54, file: !31, line: 23, column: 5) +!74 = !DILocation(line: 23, column: 5, scope: !73) +!75 = !DILocation(line: 25, column: 5, scope: !54) +!76 = !DILocation(line: 26, column: 8, scope: !54) +!77 = !DILocation(line: 28, column: 5, scope: !54) +!78 = distinct !DISubprogram(name: "run", scope: !31, file: !31, line: 31, type: !55, scopeLine: 32, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !57) +!79 = !DILocalVariable(name: "arg", arg: 1, scope: !78, file: !31, line: 31, type: !27) +!80 = !DILocation(line: 0, scope: !78) +!81 = !DILocation(line: 33, column: 5, scope: !78) +!82 = !DILocation(line: 34, column: 5, scope: !78) +!83 = !DILocation(line: 36, column: 19, scope: !78) +!84 = !DILocation(line: 36, column: 18, scope: !78) +!85 = !DILocalVariable(name: "tindex", scope: !78, file: !31, line: 36, type: !37) +!86 = !DILocation(line: 37, column: 16, scope: !78) +!87 = !DILocalVariable(name: "i", scope: !78, file: !31, line: 37, type: !37) +!88 = !DILocation(line: 38, column: 5, scope: !78) +!89 = !DILocation(line: 39, column: 5, scope: !78) +!90 = !DILocation(line: 39, column: 11, scope: !78) +!91 = !DILocation(line: 39, column: 13, scope: !78) +!92 = !DILocation(line: 40, column: 11, scope: !78) +!93 = !DILocation(line: 40, column: 13, scope: !78) +!94 = !DILocation(line: 41, column: 5, scope: !95) +!95 = distinct !DILexicalBlock(scope: !96, file: !31, line: 41, column: 5) +!96 = distinct !DILexicalBlock(scope: !78, file: !31, line: 41, column: 5) +!97 = !DILocation(line: 41, column: 5, scope: !96) +!98 = !DILocation(line: 43, column: 5, scope: !78) +!99 = !DILocation(line: 44, column: 8, scope: !78) +!100 = !DILocation(line: 46, column: 18, scope: !78) +!101 = !DILocation(line: 46, column: 5, scope: !78) +!102 = !DILocation(line: 48, column: 5, scope: !78) +!103 = distinct !DISubprogram(name: "main", scope: !31, file: !31, line: 51, type: !104, scopeLine: 52, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !57) +!104 = !DISubroutineType(types: !105) +!105 = !{!37} +!106 = !DILocalVariable(name: "t", scope: !103, file: !31, line: 53, type: !43) +!107 = !DILocation(line: 53, column: 15, scope: !103) +!108 = !DILocation(line: 54, column: 5, scope: !103) +!109 = !DILocation(line: 56, column: 5, scope: !103) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_inc_split-opt.ll b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_inc_split-opt.ll new file mode 100644 index 0000000000..d7ec8b9299 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_inc_split-opt.ll @@ -0,0 +1,226 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/lkmm_with_barrier_inc_split.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_with_barrier_inc_split.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%struct.A = type { i32, i32 } +%union.pthread_attr_t = type { i64, [48 x i8] } + +@cnt = dso_local global i32 0, align 4, !dbg !0 +@as = dso_local global [10 x %struct.A] zeroinitializer, align 16, !dbg !29 +@.str = private unnamed_addr constant [19 x i8] c"as[i].a == as[i].b\00", align 1 +@.str.1 = private unnamed_addr constant [74 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_with_barrier_inc_split.c\00", align 1 +@__PRETTY_FUNCTION__.handler = private unnamed_addr constant [22 x i8] c"void *handler(void *)\00", align 1 +@h = dso_local global i64 0, align 8, !dbg !41 +@__PRETTY_FUNCTION__.run = private unnamed_addr constant [18 x i8] c"void *run(void *)\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !54 { + call void @llvm.dbg.value(metadata i8* %0, metadata !58, metadata !DIExpression()), !dbg !59 + %2 = ptrtoint i8* %0 to i64, !dbg !60 + %3 = trunc i64 %2 to i32, !dbg !61 + call void @llvm.dbg.value(metadata i32 %3, metadata !62, metadata !DIExpression()), !dbg !59 + %4 = load i32, i32* @cnt, align 4, !dbg !63 + %5 = add nsw i32 %4, 1, !dbg !63 + store i32 %5, i32* @cnt, align 4, !dbg !63 + call void @llvm.dbg.value(metadata i32 %4, metadata !64, metadata !DIExpression()), !dbg !59 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !65 + %6 = sext i32 %4 to i64, !dbg !66 + %7 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %6, !dbg !66 + %8 = getelementptr inbounds %struct.A, %struct.A* %7, i32 0, i32 0, !dbg !67 + store volatile i32 %3, i32* %8, align 8, !dbg !68 + %9 = getelementptr inbounds %struct.A, %struct.A* %7, i32 0, i32 1, !dbg !69 + store volatile i32 %3, i32* %9, align 4, !dbg !70 + %10 = load volatile i32, i32* %8, align 8, !dbg !71 + %11 = load volatile i32, i32* %9, align 4, !dbg !71 + %12 = icmp eq i32 %10, %11, !dbg !71 + br i1 %12, label %14, label %13, !dbg !74 + +13: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0), i32 noundef 23, i8* noundef getelementptr inbounds ([22 x i8], [22 x i8]* @__PRETTY_FUNCTION__.handler, i64 0, i64 0)) #5, !dbg !71 + unreachable, !dbg !71 + +14: ; preds = %1 + ret i8* null, !dbg !75 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__LKMM_FENCE(i32 noundef) #2 + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #3 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @run(i8* noundef %0) #0 !dbg !76 { + call void @llvm.dbg.value(metadata i8* %0, metadata !77, metadata !DIExpression()), !dbg !78 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !79 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #6, !dbg !80 + %4 = ptrtoint i8* %0 to i64, !dbg !81 + %5 = trunc i64 %4 to i32, !dbg !82 + call void @llvm.dbg.value(metadata i32 %5, metadata !83, metadata !DIExpression()), !dbg !78 + %6 = load i32, i32* @cnt, align 4, !dbg !84 + call void @llvm.dbg.value(metadata i32 %6, metadata !85, metadata !DIExpression()), !dbg !78 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !86 + %7 = add nsw i32 %6, 1, !dbg !87 + store i32 %7, i32* @cnt, align 4, !dbg !88 + %8 = sext i32 %6 to i64, !dbg !89 + %9 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %8, !dbg !89 + %10 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 0, !dbg !90 + store volatile i32 %5, i32* %10, align 8, !dbg !91 + %11 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 1, !dbg !92 + store volatile i32 %5, i32* %11, align 4, !dbg !93 + %12 = load volatile i32, i32* %10, align 8, !dbg !94 + %13 = load volatile i32, i32* %11, align 4, !dbg !94 + %14 = icmp eq i32 %12, %13, !dbg !94 + br i1 %14, label %16, label %15, !dbg !97 + +15: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0), i32 noundef 39, i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @__PRETTY_FUNCTION__.run, i64 0, i64 0)) #5, !dbg !94 + unreachable, !dbg !94 + +16: ; preds = %1 + %17 = load i64, i64* @h, align 8, !dbg !98 + %18 = call i32 @pthread_join(i64 noundef %17, i8** noundef null), !dbg !99 + ret i8* null, !dbg !100 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #4 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !101 { + %1 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !104, metadata !DIExpression()), !dbg !105 + %2 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)) #6, !dbg !106 + ret i32 0, !dbg !107 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { noreturn nounwind } +attributes #6 = { nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!46, !47, !48, !49, !50, !51, !52} +!llvm.ident = !{!53} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !31, line: 13, type: !37, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !23, globals: !28, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_with_barrier_inc_split.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "8c92938bab9d8b13dd5a318d815981d9") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 3, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "include/lkmm.h", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "f219e5a4f2482585588927d06bb5e5c6") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_once", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "mb", value: 4) +!14 = !DIEnumerator(name: "wmb", value: 5) +!15 = !DIEnumerator(name: "rmb", value: 6) +!16 = !DIEnumerator(name: "rcu_lock", value: 7) +!17 = !DIEnumerator(name: "rcu_unlock", value: 8) +!18 = !DIEnumerator(name: "rcu_sync", value: 9) +!19 = !DIEnumerator(name: "before_atomic", value: 10) +!20 = !DIEnumerator(name: "after_atomic", value: 11) +!21 = !DIEnumerator(name: "after_spinlock", value: 12) +!22 = !DIEnumerator(name: "barrier", value: 13) +!23 = !{!24, !27} +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !25, line: 87, baseType: !26) +!25 = !DIFile(filename: "/usr/include/stdint.h", directory: "", checksumkind: CSK_MD5, checksum: "24103e292ae21916e87130b926c8d2f8") +!26 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!27 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!28 = !{!0, !29, !41} +!29 = !DIGlobalVariableExpression(var: !30, expr: !DIExpression()) +!30 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !31, line: 12, type: !32, isLocal: false, isDefinition: true) +!31 = !DIFile(filename: "benchmarks/interrupts/lkmm_with_barrier_inc_split.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "8c92938bab9d8b13dd5a318d815981d9") +!32 = !DICompositeType(tag: DW_TAG_array_type, baseType: !33, size: 640, elements: !39) +!33 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !31, line: 11, size: 64, elements: !34) +!34 = !{!35, !38} +!35 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !33, file: !31, line: 11, baseType: !36, size: 32) +!36 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !37) +!37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!38 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !33, file: !31, line: 11, baseType: !36, size: 32, offset: 32) +!39 = !{!40} +!40 = !DISubrange(count: 10) +!41 = !DIGlobalVariableExpression(var: !42, expr: !DIExpression()) +!42 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !31, line: 15, type: !43, isLocal: false, isDefinition: true) +!43 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !44, line: 27, baseType: !45) +!44 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!45 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!46 = !{i32 7, !"Dwarf Version", i32 5} +!47 = !{i32 2, !"Debug Info Version", i32 3} +!48 = !{i32 1, !"wchar_size", i32 4} +!49 = !{i32 7, !"PIC Level", i32 2} +!50 = !{i32 7, !"PIE Level", i32 2} +!51 = !{i32 7, !"uwtable", i32 1} +!52 = !{i32 7, !"frame-pointer", i32 2} +!53 = !{!"Ubuntu clang version 14.0.6"} +!54 = distinct !DISubprogram(name: "handler", scope: !31, file: !31, line: 16, type: !55, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !57) +!55 = !DISubroutineType(types: !56) +!56 = !{!27, !27} +!57 = !{} +!58 = !DILocalVariable(name: "arg", arg: 1, scope: !54, file: !31, line: 16, type: !27) +!59 = !DILocation(line: 0, scope: !54) +!60 = !DILocation(line: 18, column: 19, scope: !54) +!61 = !DILocation(line: 18, column: 18, scope: !54) +!62 = !DILocalVariable(name: "tindex", scope: !54, file: !31, line: 18, type: !37) +!63 = !DILocation(line: 19, column: 16, scope: !54) +!64 = !DILocalVariable(name: "i", scope: !54, file: !31, line: 19, type: !37) +!65 = !DILocation(line: 20, column: 5, scope: !54) +!66 = !DILocation(line: 21, column: 5, scope: !54) +!67 = !DILocation(line: 21, column: 11, scope: !54) +!68 = !DILocation(line: 21, column: 13, scope: !54) +!69 = !DILocation(line: 22, column: 11, scope: !54) +!70 = !DILocation(line: 22, column: 13, scope: !54) +!71 = !DILocation(line: 23, column: 5, scope: !72) +!72 = distinct !DILexicalBlock(scope: !73, file: !31, line: 23, column: 5) +!73 = distinct !DILexicalBlock(scope: !54, file: !31, line: 23, column: 5) +!74 = !DILocation(line: 23, column: 5, scope: !73) +!75 = !DILocation(line: 25, column: 5, scope: !54) +!76 = distinct !DISubprogram(name: "run", scope: !31, file: !31, line: 28, type: !55, scopeLine: 29, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !57) +!77 = !DILocalVariable(name: "arg", arg: 1, scope: !76, file: !31, line: 28, type: !27) +!78 = !DILocation(line: 0, scope: !76) +!79 = !DILocation(line: 30, column: 5, scope: !76) +!80 = !DILocation(line: 31, column: 5, scope: !76) +!81 = !DILocation(line: 33, column: 19, scope: !76) +!82 = !DILocation(line: 33, column: 18, scope: !76) +!83 = !DILocalVariable(name: "tindex", scope: !76, file: !31, line: 33, type: !37) +!84 = !DILocation(line: 34, column: 13, scope: !76) +!85 = !DILocalVariable(name: "i", scope: !76, file: !31, line: 34, type: !37) +!86 = !DILocation(line: 35, column: 5, scope: !76) +!87 = !DILocation(line: 36, column: 12, scope: !76) +!88 = !DILocation(line: 36, column: 9, scope: !76) +!89 = !DILocation(line: 37, column: 5, scope: !76) +!90 = !DILocation(line: 37, column: 11, scope: !76) +!91 = !DILocation(line: 37, column: 13, scope: !76) +!92 = !DILocation(line: 38, column: 11, scope: !76) +!93 = !DILocation(line: 38, column: 13, scope: !76) +!94 = !DILocation(line: 39, column: 5, scope: !95) +!95 = distinct !DILexicalBlock(scope: !96, file: !31, line: 39, column: 5) +!96 = distinct !DILexicalBlock(scope: !76, file: !31, line: 39, column: 5) +!97 = !DILocation(line: 39, column: 5, scope: !96) +!98 = !DILocation(line: 41, column: 18, scope: !76) +!99 = !DILocation(line: 41, column: 5, scope: !76) +!100 = !DILocation(line: 43, column: 5, scope: !76) +!101 = distinct !DISubprogram(name: "main", scope: !31, file: !31, line: 46, type: !102, scopeLine: 47, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !57) +!102 = !DISubroutineType(types: !103) +!103 = !{!37} +!104 = !DILocalVariable(name: "t", scope: !101, file: !31, line: 48, type: !43) +!105 = !DILocation(line: 48, column: 15, scope: !101) +!106 = !DILocation(line: 49, column: 5, scope: !101) +!107 = !DILocation(line: 51, column: 5, scope: !101) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_with_disable_enable_as_barrier-opt.ll b/dartagnan/src/test/resources/interrupts/lkmm_with_disable_enable_as_barrier-opt.ll new file mode 100644 index 0000000000..435828f52f --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_with_disable_enable_as_barrier-opt.ll @@ -0,0 +1,211 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/lkmm_with_disable_enable_as_barrier.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_with_disable_enable_as_barrier.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%struct.A = type { i32, i32 } +%union.pthread_attr_t = type { i64, [48 x i8] } + +@cnt = dso_local global i32 0, align 4, !dbg !0 +@as = dso_local global [10 x %struct.A] zeroinitializer, align 16, !dbg !10 +@.str = private unnamed_addr constant [19 x i8] c"as[i].a == as[i].b\00", align 1 +@.str.1 = private unnamed_addr constant [82 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_with_disable_enable_as_barrier.c\00", align 1 +@__PRETTY_FUNCTION__.handler = private unnamed_addr constant [22 x i8] c"void *handler(void *)\00", align 1 +@h = dso_local global i64 0, align 8, !dbg !22 +@__PRETTY_FUNCTION__.run = private unnamed_addr constant [18 x i8] c"void *run(void *)\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !35 { + call void @llvm.dbg.value(metadata i8* %0, metadata !39, metadata !DIExpression()), !dbg !40 + %2 = ptrtoint i8* %0 to i64, !dbg !41 + %3 = trunc i64 %2 to i32, !dbg !42 + call void @llvm.dbg.value(metadata i32 %3, metadata !43, metadata !DIExpression()), !dbg !40 + %4 = load i32, i32* @cnt, align 4, !dbg !44 + %5 = add nsw i32 %4, 1, !dbg !44 + store i32 %5, i32* @cnt, align 4, !dbg !44 + call void @llvm.dbg.value(metadata i32 %4, metadata !45, metadata !DIExpression()), !dbg !40 + %6 = call i32 (...) @__VERIFIER_disable_irq(), !dbg !46 + %7 = call i32 (...) @__VERIFIER_enable_irq(), !dbg !47 + %8 = sext i32 %4 to i64, !dbg !48 + %9 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %8, !dbg !48 + %10 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 0, !dbg !49 + store volatile i32 %3, i32* %10, align 8, !dbg !50 + %11 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 1, !dbg !51 + store volatile i32 %3, i32* %11, align 4, !dbg !52 + %12 = load volatile i32, i32* %10, align 8, !dbg !53 + %13 = load volatile i32, i32* %11, align 4, !dbg !53 + %14 = icmp eq i32 %12, %13, !dbg !53 + br i1 %14, label %16, label %15, !dbg !56 + +15: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0), i32 noundef 24, i8* noundef getelementptr inbounds ([22 x i8], [22 x i8]* @__PRETTY_FUNCTION__.handler, i64 0, i64 0)) #5, !dbg !53 + unreachable, !dbg !53 + +16: ; preds = %1 + ret i8* null, !dbg !57 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare i32 @__VERIFIER_disable_irq(...) #2 + +declare i32 @__VERIFIER_enable_irq(...) #2 + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #3 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @run(i8* noundef %0) #0 !dbg !58 { + call void @llvm.dbg.value(metadata i8* %0, metadata !59, metadata !DIExpression()), !dbg !60 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !61 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #6, !dbg !62 + %4 = ptrtoint i8* %0 to i64, !dbg !63 + %5 = trunc i64 %4 to i32, !dbg !64 + call void @llvm.dbg.value(metadata i32 %5, metadata !65, metadata !DIExpression()), !dbg !60 + %6 = load i32, i32* @cnt, align 4, !dbg !66 + %7 = add nsw i32 %6, 1, !dbg !66 + store i32 %7, i32* @cnt, align 4, !dbg !66 + call void @llvm.dbg.value(metadata i32 %6, metadata !67, metadata !DIExpression()), !dbg !60 + %8 = call i32 (...) @__VERIFIER_disable_irq(), !dbg !68 + %9 = call i32 (...) @__VERIFIER_enable_irq(), !dbg !69 + %10 = sext i32 %6 to i64, !dbg !70 + %11 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %10, !dbg !70 + %12 = getelementptr inbounds %struct.A, %struct.A* %11, i32 0, i32 0, !dbg !71 + store volatile i32 %5, i32* %12, align 8, !dbg !72 + %13 = getelementptr inbounds %struct.A, %struct.A* %11, i32 0, i32 1, !dbg !73 + store volatile i32 %5, i32* %13, align 4, !dbg !74 + %14 = load volatile i32, i32* %12, align 8, !dbg !75 + %15 = load volatile i32, i32* %13, align 4, !dbg !75 + %16 = icmp eq i32 %14, %15, !dbg !75 + br i1 %16, label %18, label %17, !dbg !78 + +17: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0), i32 noundef 40, i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @__PRETTY_FUNCTION__.run, i64 0, i64 0)) #5, !dbg !75 + unreachable, !dbg !75 + +18: ; preds = %1 + %19 = load i64, i64* @h, align 8, !dbg !79 + %20 = call i32 @pthread_join(i64 noundef %19, i8** noundef null), !dbg !80 + ret i8* null, !dbg !81 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #2 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #4 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !82 { + %1 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !85, metadata !DIExpression()), !dbg !86 + %2 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)) #6, !dbg !87 + ret i32 0, !dbg !88 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { noreturn nounwind } +attributes #6 = { nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!27, !28, !29, !30, !31, !32, !33} +!llvm.ident = !{!34} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !12, line: 13, type: !18, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !9, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_with_disable_enable_as_barrier.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "843b635b0f14f995fa99487741e6f217") +!4 = !{!5, !8} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 87, baseType: !7) +!6 = !DIFile(filename: "/usr/include/stdint.h", directory: "", checksumkind: CSK_MD5, checksum: "24103e292ae21916e87130b926c8d2f8") +!7 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!9 = !{!0, !10, !22} +!10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression()) +!11 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !12, line: 12, type: !13, isLocal: false, isDefinition: true) +!12 = !DIFile(filename: "benchmarks/interrupts/lkmm_with_disable_enable_as_barrier.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "843b635b0f14f995fa99487741e6f217") +!13 = !DICompositeType(tag: DW_TAG_array_type, baseType: !14, size: 640, elements: !20) +!14 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !12, line: 11, size: 64, elements: !15) +!15 = !{!16, !19} +!16 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !14, file: !12, line: 11, baseType: !17, size: 32) +!17 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !18) +!18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!19 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !14, file: !12, line: 11, baseType: !17, size: 32, offset: 32) +!20 = !{!21} +!21 = !DISubrange(count: 10) +!22 = !DIGlobalVariableExpression(var: !23, expr: !DIExpression()) +!23 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !12, line: 15, type: !24, isLocal: false, isDefinition: true) +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !25, line: 27, baseType: !26) +!25 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!26 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!27 = !{i32 7, !"Dwarf Version", i32 5} +!28 = !{i32 2, !"Debug Info Version", i32 3} +!29 = !{i32 1, !"wchar_size", i32 4} +!30 = !{i32 7, !"PIC Level", i32 2} +!31 = !{i32 7, !"PIE Level", i32 2} +!32 = !{i32 7, !"uwtable", i32 1} +!33 = !{i32 7, !"frame-pointer", i32 2} +!34 = !{!"Ubuntu clang version 14.0.6"} +!35 = distinct !DISubprogram(name: "handler", scope: !12, file: !12, line: 16, type: !36, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!36 = !DISubroutineType(types: !37) +!37 = !{!8, !8} +!38 = !{} +!39 = !DILocalVariable(name: "arg", arg: 1, scope: !35, file: !12, line: 16, type: !8) +!40 = !DILocation(line: 0, scope: !35) +!41 = !DILocation(line: 18, column: 19, scope: !35) +!42 = !DILocation(line: 18, column: 18, scope: !35) +!43 = !DILocalVariable(name: "tindex", scope: !35, file: !12, line: 18, type: !18) +!44 = !DILocation(line: 19, column: 16, scope: !35) +!45 = !DILocalVariable(name: "i", scope: !35, file: !12, line: 19, type: !18) +!46 = !DILocation(line: 20, column: 5, scope: !35) +!47 = !DILocation(line: 21, column: 5, scope: !35) +!48 = !DILocation(line: 22, column: 5, scope: !35) +!49 = !DILocation(line: 22, column: 11, scope: !35) +!50 = !DILocation(line: 22, column: 13, scope: !35) +!51 = !DILocation(line: 23, column: 11, scope: !35) +!52 = !DILocation(line: 23, column: 13, scope: !35) +!53 = !DILocation(line: 24, column: 5, scope: !54) +!54 = distinct !DILexicalBlock(scope: !55, file: !12, line: 24, column: 5) +!55 = distinct !DILexicalBlock(scope: !35, file: !12, line: 24, column: 5) +!56 = !DILocation(line: 24, column: 5, scope: !55) +!57 = !DILocation(line: 26, column: 5, scope: !35) +!58 = distinct !DISubprogram(name: "run", scope: !12, file: !12, line: 29, type: !36, scopeLine: 30, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!59 = !DILocalVariable(name: "arg", arg: 1, scope: !58, file: !12, line: 29, type: !8) +!60 = !DILocation(line: 0, scope: !58) +!61 = !DILocation(line: 31, column: 5, scope: !58) +!62 = !DILocation(line: 32, column: 5, scope: !58) +!63 = !DILocation(line: 34, column: 19, scope: !58) +!64 = !DILocation(line: 34, column: 18, scope: !58) +!65 = !DILocalVariable(name: "tindex", scope: !58, file: !12, line: 34, type: !18) +!66 = !DILocation(line: 35, column: 16, scope: !58) +!67 = !DILocalVariable(name: "i", scope: !58, file: !12, line: 35, type: !18) +!68 = !DILocation(line: 36, column: 5, scope: !58) +!69 = !DILocation(line: 37, column: 5, scope: !58) +!70 = !DILocation(line: 38, column: 5, scope: !58) +!71 = !DILocation(line: 38, column: 11, scope: !58) +!72 = !DILocation(line: 38, column: 13, scope: !58) +!73 = !DILocation(line: 39, column: 11, scope: !58) +!74 = !DILocation(line: 39, column: 13, scope: !58) +!75 = !DILocation(line: 40, column: 5, scope: !76) +!76 = distinct !DILexicalBlock(scope: !77, file: !12, line: 40, column: 5) +!77 = distinct !DILexicalBlock(scope: !58, file: !12, line: 40, column: 5) +!78 = !DILocation(line: 40, column: 5, scope: !77) +!79 = !DILocation(line: 42, column: 18, scope: !58) +!80 = !DILocation(line: 42, column: 5, scope: !58) +!81 = !DILocation(line: 44, column: 5, scope: !58) +!82 = distinct !DISubprogram(name: "main", scope: !12, file: !12, line: 47, type: !83, scopeLine: 48, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!83 = !DISubroutineType(types: !84) +!84 = !{!18} +!85 = !DILocalVariable(name: "t", scope: !82, file: !12, line: 49, type: !24) +!86 = !DILocation(line: 49, column: 15, scope: !82) +!87 = !DILocation(line: 50, column: 5, scope: !82) +!88 = !DILocation(line: 52, column: 5, scope: !82) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_without_barrier-opt.ll b/dartagnan/src/test/resources/interrupts/lkmm_without_barrier-opt.ll new file mode 100644 index 0000000000..dc85654501 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_without_barrier-opt.ll @@ -0,0 +1,199 @@ +; ModuleID = '/home/ponce/git/Dat3M/output/lkmm_without_barrier.ll' +source_filename = "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_without_barrier.c" +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-pc-linux-gnu" + +%struct.A = type { i32, i32 } +%union.pthread_attr_t = type { i64, [48 x i8] } + +@cnt = dso_local global i32 0, align 4, !dbg !0 +@as = dso_local global [10 x %struct.A] zeroinitializer, align 16, !dbg !10 +@.str = private unnamed_addr constant [19 x i8] c"as[i].a == as[i].b\00", align 1 +@.str.1 = private unnamed_addr constant [67 x i8] c"/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_without_barrier.c\00", align 1 +@__PRETTY_FUNCTION__.handler = private unnamed_addr constant [22 x i8] c"void *handler(void *)\00", align 1 +@h = dso_local global i64 0, align 8, !dbg !22 +@__PRETTY_FUNCTION__.run = private unnamed_addr constant [18 x i8] c"void *run(void *)\00", align 1 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @handler(i8* noundef %0) #0 !dbg !35 { + call void @llvm.dbg.value(metadata i8* %0, metadata !39, metadata !DIExpression()), !dbg !40 + %2 = ptrtoint i8* %0 to i64, !dbg !41 + %3 = trunc i64 %2 to i32, !dbg !42 + call void @llvm.dbg.value(metadata i32 %3, metadata !43, metadata !DIExpression()), !dbg !40 + %4 = load i32, i32* @cnt, align 4, !dbg !44 + %5 = add nsw i32 %4, 1, !dbg !44 + store i32 %5, i32* @cnt, align 4, !dbg !44 + call void @llvm.dbg.value(metadata i32 %4, metadata !45, metadata !DIExpression()), !dbg !40 + %6 = sext i32 %4 to i64, !dbg !46 + %7 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %6, !dbg !46 + %8 = getelementptr inbounds %struct.A, %struct.A* %7, i32 0, i32 0, !dbg !47 + store volatile i32 %3, i32* %8, align 8, !dbg !48 + %9 = getelementptr inbounds %struct.A, %struct.A* %7, i32 0, i32 1, !dbg !49 + store volatile i32 %3, i32* %9, align 4, !dbg !50 + %10 = load volatile i32, i32* %8, align 8, !dbg !51 + %11 = load volatile i32, i32* %9, align 4, !dbg !51 + %12 = icmp eq i32 %10, %11, !dbg !51 + br i1 %12, label %14, label %13, !dbg !54 + +13: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([67 x i8], [67 x i8]* @.str.1, i64 0, i64 0), i32 noundef 22, i8* noundef getelementptr inbounds ([22 x i8], [22 x i8]* @__PRETTY_FUNCTION__.handler, i64 0, i64 0)) #5, !dbg !51 + unreachable, !dbg !51 + +14: ; preds = %1 + ret i8* null, !dbg !55 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +; Function Attrs: noreturn nounwind +declare void @__assert_fail(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #2 + +; Function Attrs: noinline nounwind uwtable +define dso_local i8* @run(i8* noundef %0) #0 !dbg !56 { + call void @llvm.dbg.value(metadata i8* %0, metadata !57, metadata !DIExpression()), !dbg !58 + %2 = call i32 (...) @__VERIFIER_make_interrupt_handler(), !dbg !59 + %3 = call i32 @pthread_create(i64* noundef @h, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null) #6, !dbg !60 + %4 = ptrtoint i8* %0 to i64, !dbg !61 + %5 = trunc i64 %4 to i32, !dbg !62 + call void @llvm.dbg.value(metadata i32 %5, metadata !63, metadata !DIExpression()), !dbg !58 + %6 = load i32, i32* @cnt, align 4, !dbg !64 + %7 = add nsw i32 %6, 1, !dbg !64 + store i32 %7, i32* @cnt, align 4, !dbg !64 + call void @llvm.dbg.value(metadata i32 %6, metadata !65, metadata !DIExpression()), !dbg !58 + %8 = sext i32 %6 to i64, !dbg !66 + %9 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %8, !dbg !66 + %10 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 0, !dbg !67 + store volatile i32 %5, i32* %10, align 8, !dbg !68 + %11 = getelementptr inbounds %struct.A, %struct.A* %9, i32 0, i32 1, !dbg !69 + store volatile i32 %5, i32* %11, align 4, !dbg !70 + %12 = load volatile i32, i32* %10, align 8, !dbg !71 + %13 = load volatile i32, i32* %11, align 4, !dbg !71 + %14 = icmp eq i32 %12, %13, !dbg !71 + br i1 %14, label %16, label %15, !dbg !74 + +15: ; preds = %1 + call void @__assert_fail(i8* noundef getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([67 x i8], [67 x i8]* @.str.1, i64 0, i64 0), i32 noundef 36, i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @__PRETTY_FUNCTION__.run, i64 0, i64 0)) #5, !dbg !71 + unreachable, !dbg !71 + +16: ; preds = %1 + %17 = load i64, i64* @h, align 8, !dbg !75 + %18 = call i32 @pthread_join(i64 noundef %17, i8** noundef null), !dbg !76 + ret i8* null, !dbg !77 +} + +declare i32 @__VERIFIER_make_interrupt_handler(...) #3 + +; Function Attrs: nounwind +declare i32 @pthread_create(i64* noundef, %union.pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #4 + +declare i32 @pthread_join(i64 noundef, i8** noundef) #3 + +; Function Attrs: noinline nounwind uwtable +define dso_local i32 @main() #0 !dbg !78 { + %1 = alloca i64, align 8 + call void @llvm.dbg.declare(metadata i64* %1, metadata !81, metadata !DIExpression()), !dbg !82 + %2 = call i32 @pthread_create(i64* noundef %1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)) #6, !dbg !83 + ret i32 0, !dbg !84 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) #1 + +attributes #0 = { noinline nounwind uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { noreturn nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #3 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #4 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } +attributes #5 = { noreturn nounwind } +attributes #6 = { nounwind } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!27, !28, !29, !30, !31, !32, !33} +!llvm.ident = !{!34} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !12, line: 13, type: !18, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Ubuntu clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !9, splitDebugInlining: false, nameTableKind: None) +!3 = !DIFile(filename: "/home/ponce/git/Dat3M/benchmarks/interrupts/lkmm_without_barrier.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "47ab4afad7e2a278be4dc64d610b3f0c") +!4 = !{!5, !8} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 87, baseType: !7) +!6 = !DIFile(filename: "/usr/include/stdint.h", directory: "", checksumkind: CSK_MD5, checksum: "24103e292ae21916e87130b926c8d2f8") +!7 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!9 = !{!0, !10, !22} +!10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression()) +!11 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !12, line: 12, type: !13, isLocal: false, isDefinition: true) +!12 = !DIFile(filename: "benchmarks/interrupts/lkmm_without_barrier.c", directory: "/home/ponce/git/Dat3M", checksumkind: CSK_MD5, checksum: "47ab4afad7e2a278be4dc64d610b3f0c") +!13 = !DICompositeType(tag: DW_TAG_array_type, baseType: !14, size: 640, elements: !20) +!14 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !12, line: 11, size: 64, elements: !15) +!15 = !{!16, !19} +!16 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !14, file: !12, line: 11, baseType: !17, size: 32) +!17 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !18) +!18 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!19 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !14, file: !12, line: 11, baseType: !17, size: 32, offset: 32) +!20 = !{!21} +!21 = !DISubrange(count: 10) +!22 = !DIGlobalVariableExpression(var: !23, expr: !DIExpression()) +!23 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !12, line: 15, type: !24, isLocal: false, isDefinition: true) +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !25, line: 27, baseType: !26) +!25 = !DIFile(filename: "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h", directory: "", checksumkind: CSK_MD5, checksum: "2d764266ce95ab26d4a4767c2ec78176") +!26 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!27 = !{i32 7, !"Dwarf Version", i32 5} +!28 = !{i32 2, !"Debug Info Version", i32 3} +!29 = !{i32 1, !"wchar_size", i32 4} +!30 = !{i32 7, !"PIC Level", i32 2} +!31 = !{i32 7, !"PIE Level", i32 2} +!32 = !{i32 7, !"uwtable", i32 1} +!33 = !{i32 7, !"frame-pointer", i32 2} +!34 = !{!"Ubuntu clang version 14.0.6"} +!35 = distinct !DISubprogram(name: "handler", scope: !12, file: !12, line: 16, type: !36, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!36 = !DISubroutineType(types: !37) +!37 = !{!8, !8} +!38 = !{} +!39 = !DILocalVariable(name: "arg", arg: 1, scope: !35, file: !12, line: 16, type: !8) +!40 = !DILocation(line: 0, scope: !35) +!41 = !DILocation(line: 18, column: 19, scope: !35) +!42 = !DILocation(line: 18, column: 18, scope: !35) +!43 = !DILocalVariable(name: "tindex", scope: !35, file: !12, line: 18, type: !18) +!44 = !DILocation(line: 19, column: 16, scope: !35) +!45 = !DILocalVariable(name: "i", scope: !35, file: !12, line: 19, type: !18) +!46 = !DILocation(line: 20, column: 5, scope: !35) +!47 = !DILocation(line: 20, column: 11, scope: !35) +!48 = !DILocation(line: 20, column: 13, scope: !35) +!49 = !DILocation(line: 21, column: 11, scope: !35) +!50 = !DILocation(line: 21, column: 13, scope: !35) +!51 = !DILocation(line: 22, column: 5, scope: !52) +!52 = distinct !DILexicalBlock(scope: !53, file: !12, line: 22, column: 5) +!53 = distinct !DILexicalBlock(scope: !35, file: !12, line: 22, column: 5) +!54 = !DILocation(line: 22, column: 5, scope: !53) +!55 = !DILocation(line: 24, column: 5, scope: !35) +!56 = distinct !DISubprogram(name: "run", scope: !12, file: !12, line: 27, type: !36, scopeLine: 28, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!57 = !DILocalVariable(name: "arg", arg: 1, scope: !56, file: !12, line: 27, type: !8) +!58 = !DILocation(line: 0, scope: !56) +!59 = !DILocation(line: 29, column: 5, scope: !56) +!60 = !DILocation(line: 30, column: 5, scope: !56) +!61 = !DILocation(line: 32, column: 19, scope: !56) +!62 = !DILocation(line: 32, column: 18, scope: !56) +!63 = !DILocalVariable(name: "tindex", scope: !56, file: !12, line: 32, type: !18) +!64 = !DILocation(line: 33, column: 16, scope: !56) +!65 = !DILocalVariable(name: "i", scope: !56, file: !12, line: 33, type: !18) +!66 = !DILocation(line: 34, column: 5, scope: !56) +!67 = !DILocation(line: 34, column: 11, scope: !56) +!68 = !DILocation(line: 34, column: 13, scope: !56) +!69 = !DILocation(line: 35, column: 11, scope: !56) +!70 = !DILocation(line: 35, column: 13, scope: !56) +!71 = !DILocation(line: 36, column: 5, scope: !72) +!72 = distinct !DILexicalBlock(scope: !73, file: !12, line: 36, column: 5) +!73 = distinct !DILexicalBlock(scope: !56, file: !12, line: 36, column: 5) +!74 = !DILocation(line: 36, column: 5, scope: !73) +!75 = !DILocation(line: 38, column: 18, scope: !56) +!76 = !DILocation(line: 38, column: 5, scope: !56) +!77 = !DILocation(line: 40, column: 5, scope: !56) +!78 = distinct !DISubprogram(name: "main", scope: !12, file: !12, line: 43, type: !79, scopeLine: 44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !38) +!79 = !DISubroutineType(types: !80) +!80 = !{!18} +!81 = !DILocalVariable(name: "t", scope: !78, file: !12, line: 45, type: !24) +!82 = !DILocation(line: 45, column: 15, scope: !78) +!83 = !DILocation(line: 46, column: 5, scope: !78) +!84 = !DILocation(line: 48, column: 5, scope: !78) From e3db3642d6dae5f47f70219135e8c44ea27a41cf Mon Sep 17 00:00:00 2001 From: Hernan Ponce de Leon Date: Fri, 29 Sep 2023 15:22:10 +0200 Subject: [PATCH 06/33] Add harmless racy access annotation Signed-off-by: Hernan Ponce de Leon --- .../dat3m/dartagnan/program/event/Tag.java | 1 + .../program/processing/Intrinsics.java | 19 +++++++++++++++++++ include/dat3m.h | 9 +++++++++ 3 files changed, 29 insertions(+) diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/Tag.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/Tag.java index 57301aeb9a..3b4be9d67d 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/Tag.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/Tag.java @@ -27,6 +27,7 @@ private Tag() { } public static final String DISABLE_INTERRUPT = "DISABLE_INTERRUPT"; public static final String ENABLE_INTERRUPT = "ENABLE_INTERRUPT"; public static final String COMPILER_BARRIER = "cb"; + public static final String HARMLESS_RACY = "HARMLESS_RACY"; public static final String THREAD_CREATE = "THREAD_CREATE"; // A store that spawns a thread public static final String THREAD_START = "THREAD_START"; // A load that starts the thread diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java index 919b6a0318..d18d15306b 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java @@ -121,6 +121,8 @@ public enum Info { VERIFIER_DISABLE_IRQ("__VERIFIER_disable_irq", false, false, true, true, Intrinsics::inlineDisableInterrupts), VERIFIER_ENABLE_IRQ("__VERIFIER_enable_irq", false, false, true, true, Intrinsics::inlineEnableInterrupts), VERIFIER_MAKE_CB("__VERIFIER_make_cb", false, false, true, true, Intrinsics::inlineCompilerBarrier), + VERIFIER_HARMLESS_RACY_READ("__VERIFIER_racy_read", true, false, true, true, Intrinsics::inlineHarmelessRacyRead), + VERIFIER_HARMLESS_RACY_WRITE("__VERIFIER_racy_write", true, false, true, true, Intrinsics::inlineHarmelessRacyWrite), // --------------------------- LLVM --------------------------- LLVM(List.of("llvm.smax", "llvm.umax", "llvm.smin", "llvm.umin", "llvm.ssub.sat", "llvm.usub.sat", "llvm.sadd.sat", "llvm.uadd.sat", // TODO: saturated shifts @@ -389,6 +391,23 @@ private List inlineEnableInterrupts(FunctionCall ignored) { return List.of(EventFactory.Interrupts.newEnableInterrupts()); } + private List inlineHarmelessRacyRead(FunctionCall call) { + checkArgument(call.getArguments().size() == 1, + "Expected 2 parameters for \"__VERIFIER_racy_read\", got %s.", call.getArguments().size()); + assert call instanceof ValueFunctionCall && call.isDirectCall(); + final Register resultReg = ((ValueFunctionCall) call).getResultRegister(); + final Expression address = call.getArguments().get(0); + return List.of(EventFactory.newLoadWithMo(resultReg, address, Tag.HARMLESS_RACY)); + } + + private List inlineHarmelessRacyWrite(FunctionCall call) { + checkArgument(call.getArguments().size() == 2, + "Expected 2 parameters for \"__VERIFIER_racy_read\", got %s.", call.getArguments().size()); + final Expression address = call.getArguments().get(0); + final Expression value = call.getArguments().get(1); + return List.of(EventFactory.newStoreWithMo(address, value, Tag.HARMLESS_RACY)); + } + // -------------------------------------------------------------------------------------------------------- // LLVM intrinsics diff --git a/include/dat3m.h b/include/dat3m.h index 4797c59ea9..adc25d58bd 100644 --- a/include/dat3m.h +++ b/include/dat3m.h @@ -9,6 +9,15 @@ extern void __VERIFIER_loop_begin(void); extern void __VERIFIER_spin_start(void); extern void __VERIFIER_spin_end(int); +// Used for interrupt model +extern void __VERIFIER_make_interrupt_handler(void); +extern void __VERIFIER_disable_irq(void); +extern void __VERIFIER_enable_irq(void); +extern void __VERIFIER_make_cb(void); + +extern int __VERIFIER_racy_read(int*); +extern void __VERIFIER_racy_write(int*, int); + #define await_while(cond) \ for (int tmp = (__VERIFIER_loop_begin(), 0); __VERIFIER_spin_start(), \ tmp = cond, __VERIFIER_spin_end(!tmp), tmp;) From d7a97e2f3dffbdd37d1596a7bdeb526aa9580a77 Mon Sep 17 00:00:00 2001 From: Thomas Haas Date: Fri, 21 Mar 2025 11:10:07 +0100 Subject: [PATCH 07/33] added interrupts models and fixed tests --- cat/lkmm-interrupts.cat | 280 ++++++++++++++++++ cat/vmm-interrupts.cat | 116 ++++++++ .../dat3m/dartagnan/program/event/Tag.java | 1 - .../dartagnan/llvm/LKMMInterruptsTest.java | 12 +- .../dartagnan/llvm/VMMInterruptsTest.java | 12 +- 5 files changed, 410 insertions(+), 11 deletions(-) create mode 100644 cat/lkmm-interrupts.cat create mode 100644 cat/vmm-interrupts.cat diff --git a/cat/lkmm-interrupts.cat b/cat/lkmm-interrupts.cat new file mode 100644 index 0000000000..449e4c1d0f --- /dev/null +++ b/cat/lkmm-interrupts.cat @@ -0,0 +1,280 @@ +// SPDX-License-Identifier: GPL-2.0+ +(* + * Copyright (C) 2015 Jade Alglave , + * Copyright (C) 2016 Luc Maranget for Inria + * Copyright (C) 2017 Alan Stern , + * Andrea Parri + * + * An earlier version of this file appeared in the companion webpage for + * "Frightening small children and disconcerting grown-ups: Concurrency + * in the Linux kernel" by Alglave, Maranget, McKenney, Parri, and Stern, + * which appeared in ASPLOS 2018. + *) + +"Linux-kernel memory consistency model" + +(* + * File "lock.cat" handles locks and is experimental. + * It can be replaced by include "cos.cat" for tests that do not use locks. + *) + +include "lock.cat" + +(* Compute matching pairs of nested Srcu-lock and Srcu-unlock *) +let carry-srcu-data = (data ; [~ Srcu-unlock] ; rf)* +let pass-cookie = carry-srcu-data ; data +let srcu-rscs = ([Srcu-lock] ; pass-cookie ; [Srcu-unlock]) & loc + +(* Compute marked and plain memory accesses *) +let Marked = (~M) | IW | Once | Release | Acquire | (RMW & R) | (RMW & W) | + LKR | LKW | UL | LF | RL | RU | Srcu-lock | Srcu-unlock +let Plain = M \ Marked + +(* interrupt model *) +let ih = po^-1; ([INTERRUPT_HANDLER]; (po \ (po; [THREAD_CREATE]; po)); [THREAD_CREATE]; rf; [THREAD_START]); po +let th-int = int (* thread-internal *) +let int = int | (ih^-1* ; ih*) (* core-internal *) +let ext = ext \ (ih^-1* ; ih*) +let rfe = rf & ext +let coe = co & ext +let fre = fr & ext +let rfi = rf & int +let coi = co & int +let fri = fr & int +let eco = rf | co;(rf?) | fr;(rf?) + +let nint = (po \ (po; [ENABLE_INTERRUPT] ; po?))^-1 ; [DISABLE_INTERRUPT] ; (po \ (po; [ENABLE_INTERRUPT] ; po?)) + +let barrier = fencerel(Barrier | Rmb | Wmb | Mb | Sync-rcu | Sync-srcu | + Before-atomic | After-atomic | Acquire | Release | + Rcu-lock | Rcu-unlock | Srcu-lock | Srcu-unlock | + ENABLE_INTERRUPT | DISABLE_INTERRUPT) | + (po ; [Release]) | ([Acquire] ; po) | (([Marked] ; po)? ; [Marked]) | [HARMLESS_RACY] + +let ihb = ((nint | barrier) ; (eco & ih+) ; th-int) | (th-int ; (eco & ih+^-1) ; (nint | barrier)) +let po = po | ihb+ +let po-loc = po & loc +let ctrl = ctrl ; ihb* + +acyclic ihb + + +(* Redefine dependencies to include those carried through plain accesses *) +let carry-dep = (data ; [~ Srcu-unlock] ; rfi)* +let addr = carry-dep ; addr +let ctrl = carry-dep ; ctrl +let data = carry-dep ; data + +(*******************) +(* Basic relations *) +(*******************) + +(* Release Acquire *) +let acq-po = [Acquire] ; po ; [M] +let po-rel = [M] ; po ; [Release] +let po-unlock-lock-po = po ; [UL] ; (po|rf) ; [LKR] ; po + +(* Fences *) +let R4rmb = R \ Noreturn (* Reads for which rmb works *) +let rmb = [R4rmb] ; po ; [Rmb] ; po ; [R4rmb] +let wmb = [W] ; po ; [Wmb] ; po ; [W] +let mb = ([M] ; po ; [Mb] ; po ; [M]) | + ([M] ; po ; [Before-atomic] ; po ; [RMW] ; po? ; [M]) | + ([M] ; po? ; [RMW] ; po ; [After-atomic] ; po ; [M]) | + ([M] ; po? ; [LKW] ; po ; [After-spinlock] ; po ; [M]) | +(* + * Note: The po-unlock-lock-po relation only passes the lock to the direct + * successor, perhaps giving the impression that the ordering of the + * smp_mb__after_unlock_lock() fence only affects a single lock handover. + * However, in a longer sequence of lock handovers, the implicit + * A-cumulative release fences of lock-release ensure that any stores that + * propagate to one of the involved CPUs before it hands over the lock to + * the next CPU will also propagate to the final CPU handing over the lock + * to the CPU that executes the fence. Therefore, all those stores are + * also affected by the fence. + *) + ([M] ; po-unlock-lock-po ; + [After-unlock-lock] ; po ; [M]) | + ([M] ; po? ; [Srcu-unlock] ; po ; [After-srcu-read-unlock] ; po ; [M]) +let gp = po ; [Sync-rcu | Sync-srcu] ; po? +let strong-fence = mb | gp + +let nonrw-fence = strong-fence | po-rel | acq-po +let fence = nonrw-fence | wmb | rmb + +(**********************************) +(* Fundamental coherence ordering *) +(**********************************) + +(* Sequential Consistency Per Variable *) +let com = rf | co | fr +acyclic po-loc | com as coherence + +(* Atomic Read-Modify-Write *) +empty rmw & (fre ; coe) as atomic + +(**********************************) +(* Instruction execution ordering *) +(**********************************) + +(* Preserved Program Order *) +let dep = addr | data +let rwdep = (dep | ctrl) ; [W] +let overwrite = co | fr +let to-w = rwdep | (overwrite & int) | (addr ; [Plain] ; wmb) +let to-r = addr | (dep ; [Marked] ; rfi) +let ppo = to-r | to-w | fence | (po-unlock-lock-po & int) + +(* Propagation: Ordering from release operations and strong fences. *) +let rmw-sequence = (rf ; rmw)* +let cumul-fence = [Marked] ; ((rfe ; [Marked])? ; (strong-fence | po-rel) | wmb | + po-unlock-lock-po) ; [Marked] ; rmw-sequence +let prop = [Marked] ; (overwrite & ext)? ; cumul-fence* ; + [Marked] ; rfe? ; [Marked] + +(* + * Happens Before: Ordering from the passage of time. + * No fences needed here for prop because relation confined to one process. + *) +let hb = [Marked] ; (ppo | rfe | ((prop \ id) & int)) ; [Marked] +acyclic hb as happens-before + +(****************************************) +(* Write and fence propagation ordering *) +(****************************************) + +(* Propagation: Each non-rf link needs a strong fence. *) +let pb = prop ; strong-fence ; hb* ; [Marked] +acyclic pb as propagation + +(*******) +(* RCU *) +(*******) + +(* + * Effects of read-side critical sections proceed from the rcu_read_unlock() + * or srcu_read_unlock() backwards on the one hand, and from the + * rcu_read_lock() or srcu_read_lock() forwards on the other hand. + * + * In the definition of rcu-fence below, the po term at the left-hand side + * of each disjunct and the po? term at the right-hand end have been factored + * out. They have been moved into the definitions of rcu-link and rb. + * This was necessary in order to apply the "& loc" tests correctly. + *) +let rcu-gp = [Sync-rcu] (* Compare with gp *) +let srcu-gp = [Sync-srcu] +let rcu-rscsi = rcu-rscs^-1 +let srcu-rscsi = srcu-rscs^-1 + +(* + * The synchronize_rcu() strong fence is special in that it can order not + * one but two non-rf relations, but only in conjunction with an RCU + * read-side critical section. + *) +let rcu-link = po? ; hb* ; pb* ; prop ; po + +(* + * Any sequence containing at least as many grace periods as RCU read-side + * critical sections (joined by rcu-link) induces order like a generalized + * inter-CPU strong fence. + * Likewise for SRCU grace periods and read-side critical sections, provided + * the synchronize_srcu() and srcu_read_[un]lock() calls refer to the same + * struct srcu_struct location. + *) +let rec rcu-order = rcu-gp | srcu-gp | + (rcu-gp ; rcu-link ; rcu-rscsi) | + ((srcu-gp ; rcu-link ; srcu-rscsi) & loc) | + (rcu-rscsi ; rcu-link ; rcu-gp) | + ((srcu-rscsi ; rcu-link ; srcu-gp) & loc) | + (rcu-gp ; rcu-link ; rcu-order ; rcu-link ; rcu-rscsi) | + ((srcu-gp ; rcu-link ; rcu-order ; rcu-link ; srcu-rscsi) & loc) | + (rcu-rscsi ; rcu-link ; rcu-order ; rcu-link ; rcu-gp) | + ((srcu-rscsi ; rcu-link ; rcu-order ; rcu-link ; srcu-gp) & loc) | + (rcu-order ; rcu-link ; rcu-order) +let rcu-fence = po ; rcu-order ; po? +let fence = fence | rcu-fence +let strong-fence = strong-fence | rcu-fence + +(* rb orders instructions just as pb does *) +let rb = prop ; rcu-fence ; hb* ; pb* ; [Marked] + +irreflexive rb as rcu + +(* + * The happens-before, propagation, and rcu constraints are all + * expressions of temporal ordering. They could be replaced by + * a single constraint on an "executes-before" relation, xb: + * + * let xb = hb | pb | rb + * acyclic xb as executes-before + *) + + let full-hb = hb | pb | rb + + +let hbi = full-hb* & th-int + +let would-ppo-down = ([domain(po ; [Mb])] ; (M * M)) | ((M * M) ; [range([Mb] ; (po & nint))]) | ([domain(ctrl)] ; (M * W)) | coi | fri +let would-ppo-up = ([domain((po & nint) ; [Mb])] ; (M * M)) | ((M * M) ; [range([Mb] ; po)]) | ([domain(ctrl)] ; (M * W)) | coi | fri + +let order-up = (barrier | nint) ; (full-hb+ & ih+ & (hbi ; would-ppo-down ; hbi)^-1) ; th-int +let order-down = th-int ; (full-hb+ & ih+^-1 & (hbi ; would-ppo-up ; hbi)^-1) ; (barrier | nint) + +(* F axiom *) +irreflexive order-up ; order-down + +(*********************************) +(* Plain accesses and data races *) +(*********************************) + +(* Warn about plain writes and marked accesses in the same region *) +let mixed-accesses = ([Plain & W] ; (po-loc \ barrier) ; [Marked]) | + ([Marked] ; (po-loc \ barrier) ; [Plain & W]) +flag ~empty mixed-accesses as mixed-accesses + +(* Executes-before and visibility *) +let xbstar = (hb | pb | rb)* +let vis = cumul-fence* ; rfe? ; [Marked] ; + ((strong-fence ; [Marked] ; xbstar) | (xbstar & int)) + +(* Boundaries for lifetimes of plain accesses *) +let w-pre-bounded = [Marked] ; (addr | fence)? +let r-pre-bounded = [Marked] ; (addr | nonrw-fence | + ([R4rmb] ; po ; [Rmb] ; po ; [~Noreturn]))? +let w-post-bounded = fence? ; [Marked] ; rmw-sequence +let r-post-bounded = (nonrw-fence | ([~Noreturn] ; po ; [Rmb] ; po ; [R4rmb]))? ; + [Marked] + +(* Visibility and executes-before for plain accesses *) +let ww-vis = fence | (strong-fence ; xbstar ; w-pre-bounded) | + (w-post-bounded ; vis ; w-pre-bounded) +let wr-vis = fence | (strong-fence ; xbstar ; r-pre-bounded) | + (w-post-bounded ; vis ; r-pre-bounded) +let rw-xbstar = fence | (r-post-bounded ; xbstar ; w-pre-bounded) + +(* Potential races *) +let pre-race = ext & ((Plain * M) | ((M \ IW) * Plain)) + +(* Coherence requirements for plain accesses *) +let wr-incoh = pre-race & rf & rw-xbstar^-1 +let rw-incoh = pre-race & fr & wr-vis^-1 +let ww-incoh = pre-race & co & ww-vis^-1 +empty (wr-incoh | rw-incoh | ww-incoh) as plain-coherence + +(* Actual races *) +let ww-nonrace = ww-vis & ((Marked * W) | rw-xbstar) & ((W * Marked) | wr-vis) +let ww-race = (pre-race & co) \ ww-nonrace +let wr-race = (pre-race & (co? ; rf)) \ wr-vis \ rw-xbstar^-1 +let rw-race = (pre-race & fr) \ rw-xbstar + +flag ~empty (ww-race | wr-race | rw-race) as data-race + +(** Interrupt Data Races **) + +let i-race-fix = ihb+ | order-up | order-down +let i-race = (eco & (ih+ | ih+^-1)) \ i-race-fix +flag ~empty i-race as i-data-race + +(** Interrupt handlers disable **) + +empty ([domain(ihb)] ; nint ; (id \ [domain(po \ nint)])) as ih-dis diff --git a/cat/vmm-interrupts.cat b/cat/vmm-interrupts.cat new file mode 100644 index 0000000000..4764a63333 --- /dev/null +++ b/cat/vmm-interrupts.cat @@ -0,0 +1,116 @@ +let ih = po^-1;([INTERRUPT_HANDLER];(po \ (po;[THREAD_CREATE];po));[THREAD_CREATE];rf;[THREAD_START]);po +let ext = ext & ((~IW) * M) +let int = int | (IW * M) +let rfe = (rf & ext) \ (ih^-1* ; ih*) +let coe = (co & ext) \ (ih^-1* ; ih*) +let fre = (fr & ext) \ (ih^-1* ; ih*) +let rfi = rf & (int | (ih^-1* ; ih*)) +let coi = co & (int | (ih^-1* ; ih*)) +let fri = fr & (int | (ih^-1* ; ih*)) +let eco = rf | co;(rf?) | fr;(rf?) + +let Marked = RLX | ACQ | REL | SC +let Plain = ~Marked +let Acq = ACQ | (SC & R) +let Rel = REL | (SC & W) + +(* Interrupt handling *) +let barrier = po?; [cb | Marked | F | ENABLE_INTERRUPT | DISABLE_INTERRUPT]; po? | [HARMLESS_RACY] +let nint = (po \ (po; [ENABLE_INTERRUPT] ; po?))^-1 ; [DISABLE_INTERRUPT] ; (po \ (po; [ENABLE_INTERRUPT] ; po?)) +let ihb = ((nint | barrier) ; (eco & ih+) ; int) | (int ; (eco & ih+^-1) ; (nint | barrier)) +let po = po | ihb+ +let ctrl = ctrl ; ihb* + +(** Atomicity **) +empty rmw & (fre;coe) + +(** SC per location **) +acyclic co | rf | fr | po-loc + +(** Ordering **) +let dep = (data;rfi | addr | ctrl)*;(ctrl | addr | data) + +(* Plain writes can be elided and therefore are generally not ordered by things that order writes *) +let bob = [Acq];po | po;[Rel] | [SC];po;[SC] | po;[SC & F];po | [R];po;[Acq & F];po | po;[Rel & F];po;[W & Marked] +let ppo = bob | [Marked];(dep | coi | fri);[W & Marked] + +(* + If there is no w-race, plain writes are slightly better-behaved: if they are read-from, then either + 1) they exist and provide ordering, or + 2) an older store with the same value exists and that store is also a candidate for the read, in which case the ordering provided in this graph is ignored in the graph in which the older store is observed + + However, the plain writes may not exist in the form supposed by dependencies etc. + This is especially true for data dependencies, which may be speculatively elided. + Only ctrl and addr dependencies are not elided, because the compiler is not allowed to speculatively modify memory regions (which might be protected by a lock owned by another thread). +*) +let WRF-ppo = po;[Rel & F];po;[W & Plain] | [Marked];(ctrl | addr);[W & Plain] + +let hb = ppo | WRF-ppo | rfe | fre | coe +acyclic hb + +(* Interrupt Axioms *) +(* ihb axiom *) +acyclic ihb + +let full-hb = hb + +let would-ppo-up = + Acq * M + | [domain([R] ; (po & nint) ; [Acq & F])] ; (M * M) + | (R * M) ; [range([Acq & F] ; po)] + | M * Rel + | [domain((po & nint) ; [Rel & F])] ; (M * (W & Marked)) + | (M * M) ; [range([Rel & F] ; po ; [W & Marked])] + | SC * SC + | [domain((po & nint) ; [SC & F])] ; (M * M) + | (M * M) ; [range([SC & F] ; po)] + | [domain(ctrl)] ; (M * W) + | coi + | fri + +let would-ppo-down = + Acq * M + | [domain([R] ; po ; [Acq & F])] ; (M * M) + | (R * M) ; [range([Acq & F] ; (po & nint))] + | M * Rel + | [domain(po ; [Rel & F])] ; (M * (W & Marked)) + | (M * M) ; [range([Rel & F] ; (po & nint) ; [W & Marked])] + | SC * SC + | [domain(po ; [SC & F])] ; (M * M) + | (M * M) ; [range([SC & F] ; (po & nint))] + | [domain(ctrl)] ; (M * W) + | coi + | fri + +let hbi = full-hb* & int + +let order-up = (barrier | nint) ; (full-hb+ & ih+ & (hbi ; would-ppo-down ; hbi)^-1) ; int +let order-down = int ; (full-hb+ & ih+^-1 & (hbi ; would-ppo-up ; hbi)^-1) ; (barrier | nint) + +(* F axiom *) +irreflexive order-up ; order-down + +(** Data Races **) + +let w-race-fix = ([Marked] | ppo);hb+;([Marked] | ppo) + +let w-race = coe \ w-race-fix +let w-racy = [domain(w-race)] | [range(w-race)] +flag ~empty w-racy as w-data-race + +let r-race-fix = w-race-fix | ([Marked] | ppo);hb+; WRF-ppo + +let r-race = (fre | rfe) \ r-race-fix +let r-racy = [domain(r-race)] | [range(r-race)] +let obs-dep = (data;rfi)*;(ctrl | addr | data;rfe) +flag ~empty [domain(obs-dep)] & r-racy as r-data-race + +(** Interrupt Data Races **) + +let i-race-fix = ihb+ | order-up | order-down +let i-race = (eco & (ih+ | ih+^-1)) \ i-race-fix +flag ~empty i-race as i-data-race + +(** Interrupt handlers disable **) + +empty ([domain(ihb)] ; nint ; (id \ [domain(po \ nint)])) as ih-dis diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/Tag.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/Tag.java index 47197913a8..0f1ae2597b 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/Tag.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/Tag.java @@ -1,7 +1,6 @@ package com.dat3m.dartagnan.program.event; import com.dat3m.dartagnan.configuration.Arch; -import com.dat3m.dartagnan.program.event.core.Event; import java.util.List; import java.util.Set; diff --git a/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/LKMMInterruptsTest.java b/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/LKMMInterruptsTest.java index bc8aaef3ff..8f0c674204 100644 --- a/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/LKMMInterruptsTest.java +++ b/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/LKMMInterruptsTest.java @@ -1,4 +1,4 @@ -package com.dat3m.dartagnan.c; +package com.dat3m.dartagnan.llvm; import com.dat3m.dartagnan.configuration.Arch; import com.dat3m.dartagnan.parsers.cat.ParserCat; @@ -15,9 +15,11 @@ import java.io.IOException; import java.util.Arrays; -import static com.dat3m.dartagnan.configuration.Arch.*; -import static com.dat3m.dartagnan.utils.ResourceHelper.*; -import static com.dat3m.dartagnan.utils.Result.*; +import static com.dat3m.dartagnan.configuration.Arch.LKMM; +import static com.dat3m.dartagnan.utils.ResourceHelper.getRootPath; +import static com.dat3m.dartagnan.utils.ResourceHelper.getTestResourcePath; +import static com.dat3m.dartagnan.utils.Result.FAIL; +import static com.dat3m.dartagnan.utils.Result.PASS; import static org.junit.Assert.assertEquals; @RunWith(Parameterized.class) @@ -39,7 +41,7 @@ protected long getTimeout() { @Override protected Provider getWmmProvider() { - return Provider.fromSupplier(() -> new ParserCat().parse(new File(getRootPath("cat/linux-kernel-interrupts.cat")))); + return Provider.fromSupplier(() -> new ParserCat().parse(new File(getRootPath("cat/lkmm-interrupts.cat")))); } @Parameterized.Parameters(name = "{index}: {0}, target={1}") diff --git a/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/VMMInterruptsTest.java b/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/VMMInterruptsTest.java index e4d09939c8..bf6c47be48 100644 --- a/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/VMMInterruptsTest.java +++ b/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/VMMInterruptsTest.java @@ -1,4 +1,4 @@ -package com.dat3m.dartagnan.c; +package com.dat3m.dartagnan.llvm; import com.dat3m.dartagnan.configuration.Arch; import com.dat3m.dartagnan.parsers.cat.ParserCat; @@ -15,9 +15,11 @@ import java.io.IOException; import java.util.Arrays; -import static com.dat3m.dartagnan.configuration.Arch.*; -import static com.dat3m.dartagnan.utils.ResourceHelper.*; -import static com.dat3m.dartagnan.utils.Result.*; +import static com.dat3m.dartagnan.configuration.Arch.C11; +import static com.dat3m.dartagnan.utils.ResourceHelper.getRootPath; +import static com.dat3m.dartagnan.utils.ResourceHelper.getTestResourcePath; +import static com.dat3m.dartagnan.utils.Result.FAIL; +import static com.dat3m.dartagnan.utils.Result.PASS; import static org.junit.Assert.assertEquals; @RunWith(Parameterized.class) @@ -39,7 +41,7 @@ protected long getTimeout() { @Override protected Provider getWmmProvider() { - return Provider.fromSupplier(() -> new ParserCat().parse(new File(getRootPath("cat/vmm.cat")))); + return Provider.fromSupplier(() -> new ParserCat().parse(new File(getRootPath("cat/vmm-interrupts.cat")))); } @Parameterized.Parameters(name = "{index}: {0}, target={1}") From aac60ec9270502bca85738922eed4d14cab9d9fb Mon Sep 17 00:00:00 2001 From: Thomas Haas Date: Tue, 25 Mar 2025 17:32:49 +0100 Subject: [PATCH 08/33] Changed assert to __VERIFIER_assert in vmm interrupts test (not yet in LKMM tests). --- benchmarks/interrupts/c11_detour.c | 2 +- benchmarks/interrupts/c11_detour_disable.c | 2 +- .../interrupts/c11_detour_disable_release.c | 2 +- benchmarks/interrupts/c11_oota.c | 2 +- benchmarks/interrupts/c11_weak_model.c | 2 +- benchmarks/interrupts/c11_with_barrier.c | 4 +- benchmarks/interrupts/c11_with_barrier_dec.c | 4 +- .../interrupts/c11_with_barrier_dec_barrier.c | 4 +- .../interrupts/c11_with_barrier_inc_split.c | 4 +- .../c11_with_disable_enable_as_barrier.c | 4 +- benchmarks/interrupts/c11_without_barrier.c | 4 +- benchmarks/interrupts/c_disable_v1.c | 4 +- benchmarks/interrupts/c_disable_v2.c | 4 +- benchmarks/interrupts/c_disable_v3.c | 4 +- .../dartagnan/llvm/VMMInterruptsTest.java | 28 +- .../test/resources/interrupts/c11_detour.ll | 236 ++++++++++++++ .../interrupts/c11_detour_disable.ll | 244 +++++++++++++++ .../interrupts/c11_detour_disable_release.ll | 244 +++++++++++++++ .../src/test/resources/interrupts/c11_oota.ll | 225 ++++++++++++++ .../resources/interrupts/c11_with_barrier.ll | 277 +++++++++++++++++ .../interrupts/c11_with_barrier_dec.ll | 285 +++++++++++++++++ .../c11_with_barrier_dec_barrier.ll | 289 ++++++++++++++++++ .../interrupts/c11_with_barrier_inc_split.ll | 281 +++++++++++++++++ .../c11_with_disable_enable_as_barrier.ll | 283 +++++++++++++++++ .../interrupts/c11_without_barrier.ll | 271 ++++++++++++++++ .../test/resources/interrupts/c_disable_v1.ll | 283 +++++++++++++++++ .../test/resources/interrupts/c_disable_v2.ll | 283 +++++++++++++++++ .../test/resources/interrupts/c_disable_v3.ll | 283 +++++++++++++++++ 28 files changed, 3521 insertions(+), 37 deletions(-) create mode 100644 dartagnan/src/test/resources/interrupts/c11_detour.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_detour_disable.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_detour_disable_release.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_oota.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_with_barrier.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_with_barrier_dec.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_with_barrier_dec_barrier.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_with_barrier_inc_split.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_with_disable_enable_as_barrier.ll create mode 100644 dartagnan/src/test/resources/interrupts/c11_without_barrier.ll create mode 100644 dartagnan/src/test/resources/interrupts/c_disable_v1.ll create mode 100644 dartagnan/src/test/resources/interrupts/c_disable_v2.ll create mode 100644 dartagnan/src/test/resources/interrupts/c_disable_v3.ll diff --git a/benchmarks/interrupts/c11_detour.c b/benchmarks/interrupts/c11_detour.c index 724359d0b4..c986dae8c7 100644 --- a/benchmarks/interrupts/c11_detour.c +++ b/benchmarks/interrupts/c11_detour.c @@ -43,7 +43,7 @@ int main() pthread_join(t1, 0); pthread_join(t2, 0); - assert(!(b == 1 && a == 3 && y == 3)); + __VERIFIER_assert(!(b == 1 && a == 3 && y == 3)); return 0; } diff --git a/benchmarks/interrupts/c11_detour_disable.c b/benchmarks/interrupts/c11_detour_disable.c index bcbf672a9b..2e311949be 100644 --- a/benchmarks/interrupts/c11_detour_disable.c +++ b/benchmarks/interrupts/c11_detour_disable.c @@ -45,7 +45,7 @@ int main() pthread_join(t1, 0); pthread_join(t2, 0); - assert(!(b == 1 && a == 3 && y == 3)); + __VERIFIER_assert(!(b == 1 && a == 3 && y == 3)); return 0; } diff --git a/benchmarks/interrupts/c11_detour_disable_release.c b/benchmarks/interrupts/c11_detour_disable_release.c index 2a91ebbc00..a4798221fa 100644 --- a/benchmarks/interrupts/c11_detour_disable_release.c +++ b/benchmarks/interrupts/c11_detour_disable_release.c @@ -45,7 +45,7 @@ int main() pthread_join(t1, 0); pthread_join(t2, 0); - assert(!(b == 1 && a == 3 && y == 3)); + __VERIFIER_assert(!(b == 1 && a == 3 && y == 3)); return 0; } diff --git a/benchmarks/interrupts/c11_oota.c b/benchmarks/interrupts/c11_oota.c index f37bb54d43..c8e4db4beb 100644 --- a/benchmarks/interrupts/c11_oota.c +++ b/benchmarks/interrupts/c11_oota.c @@ -10,7 +10,7 @@ pthread_t h; void *handler(void *arg) { atomic_store_explicit(&z, 3, memory_order_relaxed); - assert(atomic_load_explicit(&y, memory_order_relaxed) == 0); + __VERIFIER_assert(atomic_load_explicit(&y, memory_order_relaxed) == 0); return NULL; } diff --git a/benchmarks/interrupts/c11_weak_model.c b/benchmarks/interrupts/c11_weak_model.c index 159f58bda3..7730706351 100644 --- a/benchmarks/interrupts/c11_weak_model.c +++ b/benchmarks/interrupts/c11_weak_model.c @@ -56,7 +56,7 @@ int main() bool reorder_bx = (t1 == 1 && t2 == 0); bool reorder_ya = (u1 == 1 && u2 == 0); if (r1 == 1 && r2 == 0) { - assert (! reorder_bx || ! reorder_ya); + __VERIFIER_assert(! reorder_bx || ! reorder_ya); } return 0; diff --git a/benchmarks/interrupts/c11_with_barrier.c b/benchmarks/interrupts/c11_with_barrier.c index 9f67c92670..7f8b1a15f9 100644 --- a/benchmarks/interrupts/c11_with_barrier.c +++ b/benchmarks/interrupts/c11_with_barrier.c @@ -20,7 +20,7 @@ void *handler(void *arg) __VERIFIER_make_cb(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); return NULL; } @@ -35,7 +35,7 @@ void *run(void *arg) __VERIFIER_make_cb(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); pthread_join(h, NULL); diff --git a/benchmarks/interrupts/c11_with_barrier_dec.c b/benchmarks/interrupts/c11_with_barrier_dec.c index 454ec9a2a6..e2e305fef0 100644 --- a/benchmarks/interrupts/c11_with_barrier_dec.c +++ b/benchmarks/interrupts/c11_with_barrier_dec.c @@ -20,7 +20,7 @@ void *handler(void *arg) __VERIFIER_make_cb(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); cnt--; @@ -37,7 +37,7 @@ void *run(void *arg) __VERIFIER_make_cb(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); cnt--; diff --git a/benchmarks/interrupts/c11_with_barrier_dec_barrier.c b/benchmarks/interrupts/c11_with_barrier_dec_barrier.c index 8dc38868bc..2ad8f7e4a6 100644 --- a/benchmarks/interrupts/c11_with_barrier_dec_barrier.c +++ b/benchmarks/interrupts/c11_with_barrier_dec_barrier.c @@ -20,7 +20,7 @@ void *handler(void *arg) __VERIFIER_make_cb(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); __VERIFIER_make_cb(); cnt--; @@ -38,7 +38,7 @@ void *run(void *arg) __VERIFIER_make_cb(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); __VERIFIER_make_cb(); cnt--; diff --git a/benchmarks/interrupts/c11_with_barrier_inc_split.c b/benchmarks/interrupts/c11_with_barrier_inc_split.c index d934752c11..6c2471efa0 100644 --- a/benchmarks/interrupts/c11_with_barrier_inc_split.c +++ b/benchmarks/interrupts/c11_with_barrier_inc_split.c @@ -20,7 +20,7 @@ void *handler(void *arg) __VERIFIER_make_cb(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); return NULL; } @@ -36,7 +36,7 @@ void *run(void *arg) cnt = i+1; as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); pthread_join(h, NULL); diff --git a/benchmarks/interrupts/c11_with_disable_enable_as_barrier.c b/benchmarks/interrupts/c11_with_disable_enable_as_barrier.c index 05b68f6c7d..13440c4bae 100644 --- a/benchmarks/interrupts/c11_with_disable_enable_as_barrier.c +++ b/benchmarks/interrupts/c11_with_disable_enable_as_barrier.c @@ -21,7 +21,7 @@ void *handler(void *arg) __VERIFIER_enable_irq(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); return NULL; } @@ -37,7 +37,7 @@ void *run(void *arg) __VERIFIER_enable_irq(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); pthread_join(h, NULL); diff --git a/benchmarks/interrupts/c11_without_barrier.c b/benchmarks/interrupts/c11_without_barrier.c index d9e689824b..c7098a800d 100644 --- a/benchmarks/interrupts/c11_without_barrier.c +++ b/benchmarks/interrupts/c11_without_barrier.c @@ -19,7 +19,7 @@ void *handler(void *arg) int i = cnt++; as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); return NULL; } @@ -33,7 +33,7 @@ void *run(void *arg) int i = cnt++; as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); pthread_join(h, NULL); diff --git a/benchmarks/interrupts/c_disable_v1.c b/benchmarks/interrupts/c_disable_v1.c index d5adcbcf6c..0793d51e58 100644 --- a/benchmarks/interrupts/c_disable_v1.c +++ b/benchmarks/interrupts/c_disable_v1.c @@ -21,7 +21,7 @@ void *handler(void *arg) __VERIFIER_enable_irq(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); return NULL; } @@ -37,7 +37,7 @@ void *run(void *arg) __VERIFIER_enable_irq(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); pthread_join(h, NULL); diff --git a/benchmarks/interrupts/c_disable_v2.c b/benchmarks/interrupts/c_disable_v2.c index 78d3c776a4..8bc088505b 100644 --- a/benchmarks/interrupts/c_disable_v2.c +++ b/benchmarks/interrupts/c_disable_v2.c @@ -21,7 +21,7 @@ void *handler(void *arg) as[i].a = tindex; as[i].b = tindex; __VERIFIER_enable_irq(); - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); return NULL; } @@ -37,7 +37,7 @@ void *run(void *arg) as[i].a = tindex; as[i].b = tindex; __VERIFIER_enable_irq(); - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); pthread_join(h, NULL); diff --git a/benchmarks/interrupts/c_disable_v3.c b/benchmarks/interrupts/c_disable_v3.c index 544a2ef192..4b03e49562 100644 --- a/benchmarks/interrupts/c_disable_v3.c +++ b/benchmarks/interrupts/c_disable_v3.c @@ -20,7 +20,7 @@ void *handler(void *arg) int i = cnt++; as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); __VERIFIER_enable_irq(); return NULL; @@ -36,7 +36,7 @@ void *run(void *arg) int i = cnt++; as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); __VERIFIER_enable_irq(); pthread_join(h, NULL); diff --git a/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/VMMInterruptsTest.java b/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/VMMInterruptsTest.java index bf6c47be48..ffe069f8bc 100644 --- a/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/VMMInterruptsTest.java +++ b/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/VMMInterruptsTest.java @@ -47,20 +47,20 @@ protected Provider getWmmProvider() { @Parameterized.Parameters(name = "{index}: {0}, target={1}") public static Iterable data() throws IOException { return Arrays.asList(new Object[][]{ - {"c_disable_v1-opt", C11, PASS}, - {"c_disable_v2-opt", C11, PASS}, - {"c_disable_v3-opt", C11, PASS}, - {"c11_detour_disable_release-opt", C11, PASS}, - {"c11_detour_disable-opt", C11, FAIL}, - {"c11_detour-opt", C11, FAIL}, - {"c11_oota-opt", C11, PASS}, - {"c11_weak_model-opt", C11, PASS}, - {"c11_with_barrier_dec_barrier-opt", C11, PASS}, - {"c11_with_barrier_dec-opt", C11, FAIL}, - {"c11_with_barrier-opt", C11, PASS}, - {"c11_with_barrier_inc_split-opt", C11, FAIL}, - {"c11_with_disable_enable_as_barrier-opt", C11, PASS}, - {"c11_without_barrier-opt", C11, FAIL}, + {"c_disable_v1", C11, PASS}, + {"c_disable_v2", C11, PASS}, + {"c_disable_v3", C11, PASS}, + {"c11_detour_disable_release", C11, PASS}, + {"c11_detour_disable", C11, FAIL}, + {"c11_detour", C11, FAIL}, + {"c11_oota", C11, PASS}, + //{"c11_weak_model", C11, PASS}, + {"c11_with_barrier_dec_barrier", C11, PASS}, + {"c11_with_barrier_dec", C11, FAIL}, + {"c11_with_barrier", C11, PASS}, + {"c11_with_barrier_inc_split", C11, FAIL}, + {"c11_with_disable_enable_as_barrier", C11, PASS}, + {"c11_without_barrier", C11, FAIL}, }); } diff --git a/dartagnan/src/test/resources/interrupts/c11_detour.ll b/dartagnan/src/test/resources/interrupts/c11_detour.ll new file mode 100644 index 0000000000..18896eedce --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_detour.ll @@ -0,0 +1,236 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_detour.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_detour.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@y = global i32 0, align 4, !dbg !0 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !28 +@x = global i32 0, align 4, !dbg !18 +@a = global i32 0, align 4, !dbg !24 +@b = global i32 0, align 4, !dbg !26 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !65 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !69, metadata !DIExpression()), !dbg !70 + store i32 3, i32* %3, align 4, !dbg !71 + %4 = load i32, i32* %3, align 4, !dbg !71 + store atomic i32 %4, i32* @y seq_cst, align 4, !dbg !71 + ret i8* null, !dbg !72 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread_1(i8* noundef %0) #0 !dbg !73 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !74, metadata !DIExpression()), !dbg !75 + call void @__VERIFIER_make_interrupt_handler(), !dbg !76 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !77 + store i32 1, i32* %3, align 4, !dbg !78 + %6 = load i32, i32* %3, align 4, !dbg !78 + store atomic i32 %6, i32* @x monotonic, align 4, !dbg !78 + %7 = load atomic i32, i32* @y monotonic, align 4, !dbg !79 + store i32 %7, i32* %4, align 4, !dbg !79 + %8 = load i32, i32* %4, align 4, !dbg !79 + store i32 %8, i32* @a, align 4, !dbg !80 + %9 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !81 + %10 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %9, i8** noundef null), !dbg !82 + ret i8* null, !dbg !83 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread_2(i8* noundef %0) #0 !dbg !84 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !85, metadata !DIExpression()), !dbg !86 + %5 = load atomic i32, i32* @x monotonic, align 4, !dbg !87 + store i32 %5, i32* %3, align 4, !dbg !87 + %6 = load i32, i32* %3, align 4, !dbg !87 + store i32 %6, i32* @b, align 4, !dbg !88 + store i32 2, i32* %4, align 4, !dbg !89 + %7 = load i32, i32* %4, align 4, !dbg !89 + store atomic i32 %7, i32* @y release, align 4, !dbg !89 + ret i8* null, !dbg !90 +} + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !91 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + %3 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !94, metadata !DIExpression()), !dbg !95 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %3, metadata !96, metadata !DIExpression()), !dbg !97 + %4 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_1, i8* noundef null), !dbg !98 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %3, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_2, i8* noundef null), !dbg !99 + %6 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %2, align 8, !dbg !100 + %7 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %6, i8** noundef null), !dbg !101 + %8 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %3, align 8, !dbg !102 + %9 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %8, i8** noundef null), !dbg !103 + %10 = load i32, i32* @b, align 4, !dbg !104 + %11 = icmp eq i32 %10, 1, !dbg !105 + br i1 %11, label %12, label %18, !dbg !106 + +12: ; preds = %0 + %13 = load i32, i32* @a, align 4, !dbg !107 + %14 = icmp eq i32 %13, 3, !dbg !108 + br i1 %14, label %15, label %18, !dbg !109 + +15: ; preds = %12 + %16 = load atomic i32, i32* @y seq_cst, align 4, !dbg !110 + %17 = icmp eq i32 %16, 3, !dbg !111 + br label %18 + +18: ; preds = %15, %12, %0 + %19 = phi i1 [ false, %12 ], [ false, %0 ], [ %17, %15 ], !dbg !112 + %20 = xor i1 %19, true, !dbg !113 + %21 = zext i1 %20 to i32, !dbg !113 + call void @__VERIFIER_assert(i32 noundef %21), !dbg !114 + ret i32 0, !dbg !115 +} + +declare void @__VERIFIER_assert(i32 noundef) #2 + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!54, !55, !56, !57, !58, !59, !60, !61, !62, !63} +!llvm.ident = !{!64} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !20, line: 7, type: !21, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !15, globals: !17, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_detour.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 56, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "/opt/homebrew/Cellar/llvm@14/14.0.6/lib/clang/14.0.6/include/stdatomic.h", directory: "") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_consume", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "memory_order_acq_rel", value: 4) +!14 = !DIEnumerator(name: "memory_order_seq_cst", value: 5) +!15 = !{!16} +!16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!17 = !{!18, !0, !24, !26, !28} +!18 = !DIGlobalVariableExpression(var: !19, expr: !DIExpression()) +!19 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !20, line: 7, type: !21, isLocal: false, isDefinition: true) +!20 = !DIFile(filename: "benchmarks/interrupts/c11_detour.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!21 = !DIDerivedType(tag: DW_TAG_typedef, name: "atomic_int", file: !6, line: 92, baseType: !22) +!22 = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: !23) +!23 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !20, line: 8, type: !23, isLocal: false, isDefinition: true) +!26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression()) +!27 = distinct !DIGlobalVariable(name: "b", scope: !2, file: !20, line: 8, type: !23, isLocal: false, isDefinition: true) +!28 = !DIGlobalVariableExpression(var: !29, expr: !DIExpression()) +!29 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !20, line: 10, type: !30, isLocal: false, isDefinition: true) +!30 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !31, line: 31, baseType: !32) +!31 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!32 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !33, line: 118, baseType: !34) +!33 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !35, size: 64) +!35 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !33, line: 103, size: 65536, elements: !36) +!36 = !{!37, !39, !49} +!37 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !35, file: !33, line: 104, baseType: !38, size: 64) +!38 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!39 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !35, file: !33, line: 105, baseType: !40, size: 64, offset: 64) +!40 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !41, size: 64) +!41 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !33, line: 57, size: 192, elements: !42) +!42 = !{!43, !47, !48} +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !41, file: !33, line: 58, baseType: !44, size: 64) +!44 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !45, size: 64) +!45 = !DISubroutineType(types: !46) +!46 = !{null, !16} +!47 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !41, file: !33, line: 59, baseType: !16, size: 64, offset: 64) +!48 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !41, file: !33, line: 60, baseType: !40, size: 64, offset: 128) +!49 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !35, file: !33, line: 106, baseType: !50, size: 65408, offset: 128) +!50 = !DICompositeType(tag: DW_TAG_array_type, baseType: !51, size: 65408, elements: !52) +!51 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!52 = !{!53} +!53 = !DISubrange(count: 8176) +!54 = !{i32 7, !"Dwarf Version", i32 4} +!55 = !{i32 2, !"Debug Info Version", i32 3} +!56 = !{i32 1, !"wchar_size", i32 4} +!57 = !{i32 1, !"branch-target-enforcement", i32 0} +!58 = !{i32 1, !"sign-return-address", i32 0} +!59 = !{i32 1, !"sign-return-address-all", i32 0} +!60 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!61 = !{i32 7, !"PIC Level", i32 2} +!62 = !{i32 7, !"uwtable", i32 1} +!63 = !{i32 7, !"frame-pointer", i32 1} +!64 = !{!"Homebrew clang version 14.0.6"} +!65 = distinct !DISubprogram(name: "handler", scope: !20, file: !20, line: 11, type: !66, scopeLine: 12, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +!66 = !DISubroutineType(types: !67) +!67 = !{!16, !16} +!68 = !{} +!69 = !DILocalVariable(name: "arg", arg: 1, scope: !65, file: !20, line: 11, type: !16) +!70 = !DILocation(line: 11, column: 21, scope: !65) +!71 = !DILocation(line: 13, column: 5, scope: !65) +!72 = !DILocation(line: 14, column: 5, scope: !65) +!73 = distinct !DISubprogram(name: "thread_1", scope: !20, file: !20, line: 17, type: !66, scopeLine: 18, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +!74 = !DILocalVariable(name: "arg", arg: 1, scope: !73, file: !20, line: 17, type: !16) +!75 = !DILocation(line: 17, column: 22, scope: !73) +!76 = !DILocation(line: 19, column: 5, scope: !73) +!77 = !DILocation(line: 20, column: 5, scope: !73) +!78 = !DILocation(line: 22, column: 5, scope: !73) +!79 = !DILocation(line: 23, column: 9, scope: !73) +!80 = !DILocation(line: 23, column: 7, scope: !73) +!81 = !DILocation(line: 25, column: 18, scope: !73) +!82 = !DILocation(line: 25, column: 5, scope: !73) +!83 = !DILocation(line: 27, column: 5, scope: !73) +!84 = distinct !DISubprogram(name: "thread_2", scope: !20, file: !20, line: 30, type: !66, scopeLine: 31, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +!85 = !DILocalVariable(name: "arg", arg: 1, scope: !84, file: !20, line: 30, type: !16) +!86 = !DILocation(line: 30, column: 22, scope: !84) +!87 = !DILocation(line: 32, column: 9, scope: !84) +!88 = !DILocation(line: 32, column: 7, scope: !84) +!89 = !DILocation(line: 33, column: 5, scope: !84) +!90 = !DILocation(line: 34, column: 5, scope: !84) +!91 = distinct !DISubprogram(name: "main", scope: !20, file: !20, line: 37, type: !92, scopeLine: 38, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +!92 = !DISubroutineType(types: !93) +!93 = !{!23} +!94 = !DILocalVariable(name: "t1", scope: !91, file: !20, line: 39, type: !30) +!95 = !DILocation(line: 39, column: 15, scope: !91) +!96 = !DILocalVariable(name: "t2", scope: !91, file: !20, line: 39, type: !30) +!97 = !DILocation(line: 39, column: 19, scope: !91) +!98 = !DILocation(line: 41, column: 5, scope: !91) +!99 = !DILocation(line: 42, column: 5, scope: !91) +!100 = !DILocation(line: 43, column: 18, scope: !91) +!101 = !DILocation(line: 43, column: 5, scope: !91) +!102 = !DILocation(line: 44, column: 18, scope: !91) +!103 = !DILocation(line: 44, column: 5, scope: !91) +!104 = !DILocation(line: 46, column: 25, scope: !91) +!105 = !DILocation(line: 46, column: 27, scope: !91) +!106 = !DILocation(line: 46, column: 32, scope: !91) +!107 = !DILocation(line: 46, column: 35, scope: !91) +!108 = !DILocation(line: 46, column: 37, scope: !91) +!109 = !DILocation(line: 46, column: 42, scope: !91) +!110 = !DILocation(line: 46, column: 45, scope: !91) +!111 = !DILocation(line: 46, column: 47, scope: !91) +!112 = !DILocation(line: 0, scope: !91) +!113 = !DILocation(line: 46, column: 23, scope: !91) +!114 = !DILocation(line: 46, column: 5, scope: !91) +!115 = !DILocation(line: 48, column: 5, scope: !91) diff --git a/dartagnan/src/test/resources/interrupts/c11_detour_disable.ll b/dartagnan/src/test/resources/interrupts/c11_detour_disable.ll new file mode 100644 index 0000000000..9647750777 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_detour_disable.ll @@ -0,0 +1,244 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_detour_disable.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_detour_disable.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@y = global i32 0, align 4, !dbg !0 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !28 +@x = global i32 0, align 4, !dbg !18 +@a = global i32 0, align 4, !dbg !24 +@b = global i32 0, align 4, !dbg !26 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !65 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !69, metadata !DIExpression()), !dbg !70 + store i32 3, i32* %3, align 4, !dbg !71 + %4 = load i32, i32* %3, align 4, !dbg !71 + store atomic i32 %4, i32* @y seq_cst, align 4, !dbg !71 + ret i8* null, !dbg !72 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread_1(i8* noundef %0) #0 !dbg !73 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !74, metadata !DIExpression()), !dbg !75 + call void @__VERIFIER_make_interrupt_handler(), !dbg !76 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !77 + call void @__VERIFIER_disable_irq(), !dbg !78 + store i32 1, i32* %3, align 4, !dbg !79 + %6 = load i32, i32* %3, align 4, !dbg !79 + store atomic i32 %6, i32* @x monotonic, align 4, !dbg !79 + %7 = load atomic i32, i32* @y monotonic, align 4, !dbg !80 + store i32 %7, i32* %4, align 4, !dbg !80 + %8 = load i32, i32* %4, align 4, !dbg !80 + store i32 %8, i32* @a, align 4, !dbg !81 + call void @__VERIFIER_enable_irq(), !dbg !82 + %9 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !83 + %10 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %9, i8** noundef null), !dbg !84 + ret i8* null, !dbg !85 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare void @__VERIFIER_disable_irq() #2 + +declare void @__VERIFIER_enable_irq() #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread_2(i8* noundef %0) #0 !dbg !86 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !87, metadata !DIExpression()), !dbg !88 + %5 = load atomic i32, i32* @x monotonic, align 4, !dbg !89 + store i32 %5, i32* %3, align 4, !dbg !89 + %6 = load i32, i32* %3, align 4, !dbg !89 + store i32 %6, i32* @b, align 4, !dbg !90 + store i32 2, i32* %4, align 4, !dbg !91 + %7 = load i32, i32* %4, align 4, !dbg !91 + store atomic i32 %7, i32* @y release, align 4, !dbg !91 + ret i8* null, !dbg !92 +} + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !93 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + %3 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !96, metadata !DIExpression()), !dbg !97 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %3, metadata !98, metadata !DIExpression()), !dbg !99 + %4 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_1, i8* noundef null), !dbg !100 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %3, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_2, i8* noundef null), !dbg !101 + %6 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %2, align 8, !dbg !102 + %7 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %6, i8** noundef null), !dbg !103 + %8 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %3, align 8, !dbg !104 + %9 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %8, i8** noundef null), !dbg !105 + %10 = load i32, i32* @b, align 4, !dbg !106 + %11 = icmp eq i32 %10, 1, !dbg !107 + br i1 %11, label %12, label %18, !dbg !108 + +12: ; preds = %0 + %13 = load i32, i32* @a, align 4, !dbg !109 + %14 = icmp eq i32 %13, 3, !dbg !110 + br i1 %14, label %15, label %18, !dbg !111 + +15: ; preds = %12 + %16 = load atomic i32, i32* @y seq_cst, align 4, !dbg !112 + %17 = icmp eq i32 %16, 3, !dbg !113 + br label %18 + +18: ; preds = %15, %12, %0 + %19 = phi i1 [ false, %12 ], [ false, %0 ], [ %17, %15 ], !dbg !114 + %20 = xor i1 %19, true, !dbg !115 + %21 = zext i1 %20 to i32, !dbg !115 + call void @__VERIFIER_assert(i32 noundef %21), !dbg !116 + ret i32 0, !dbg !117 +} + +declare void @__VERIFIER_assert(i32 noundef) #2 + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!54, !55, !56, !57, !58, !59, !60, !61, !62, !63} +!llvm.ident = !{!64} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !20, line: 7, type: !21, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !15, globals: !17, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_detour_disable.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 56, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "/opt/homebrew/Cellar/llvm@14/14.0.6/lib/clang/14.0.6/include/stdatomic.h", directory: "") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_consume", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "memory_order_acq_rel", value: 4) +!14 = !DIEnumerator(name: "memory_order_seq_cst", value: 5) +!15 = !{!16} +!16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!17 = !{!18, !0, !24, !26, !28} +!18 = !DIGlobalVariableExpression(var: !19, expr: !DIExpression()) +!19 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !20, line: 7, type: !21, isLocal: false, isDefinition: true) +!20 = !DIFile(filename: "benchmarks/interrupts/c11_detour_disable.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!21 = !DIDerivedType(tag: DW_TAG_typedef, name: "atomic_int", file: !6, line: 92, baseType: !22) +!22 = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: !23) +!23 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !20, line: 8, type: !23, isLocal: false, isDefinition: true) +!26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression()) +!27 = distinct !DIGlobalVariable(name: "b", scope: !2, file: !20, line: 8, type: !23, isLocal: false, isDefinition: true) +!28 = !DIGlobalVariableExpression(var: !29, expr: !DIExpression()) +!29 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !20, line: 10, type: !30, isLocal: false, isDefinition: true) +!30 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !31, line: 31, baseType: !32) +!31 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!32 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !33, line: 118, baseType: !34) +!33 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !35, size: 64) +!35 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !33, line: 103, size: 65536, elements: !36) +!36 = !{!37, !39, !49} +!37 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !35, file: !33, line: 104, baseType: !38, size: 64) +!38 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!39 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !35, file: !33, line: 105, baseType: !40, size: 64, offset: 64) +!40 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !41, size: 64) +!41 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !33, line: 57, size: 192, elements: !42) +!42 = !{!43, !47, !48} +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !41, file: !33, line: 58, baseType: !44, size: 64) +!44 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !45, size: 64) +!45 = !DISubroutineType(types: !46) +!46 = !{null, !16} +!47 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !41, file: !33, line: 59, baseType: !16, size: 64, offset: 64) +!48 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !41, file: !33, line: 60, baseType: !40, size: 64, offset: 128) +!49 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !35, file: !33, line: 106, baseType: !50, size: 65408, offset: 128) +!50 = !DICompositeType(tag: DW_TAG_array_type, baseType: !51, size: 65408, elements: !52) +!51 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!52 = !{!53} +!53 = !DISubrange(count: 8176) +!54 = !{i32 7, !"Dwarf Version", i32 4} +!55 = !{i32 2, !"Debug Info Version", i32 3} +!56 = !{i32 1, !"wchar_size", i32 4} +!57 = !{i32 1, !"branch-target-enforcement", i32 0} +!58 = !{i32 1, !"sign-return-address", i32 0} +!59 = !{i32 1, !"sign-return-address-all", i32 0} +!60 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!61 = !{i32 7, !"PIC Level", i32 2} +!62 = !{i32 7, !"uwtable", i32 1} +!63 = !{i32 7, !"frame-pointer", i32 1} +!64 = !{!"Homebrew clang version 14.0.6"} +!65 = distinct !DISubprogram(name: "handler", scope: !20, file: !20, line: 11, type: !66, scopeLine: 12, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +!66 = !DISubroutineType(types: !67) +!67 = !{!16, !16} +!68 = !{} +!69 = !DILocalVariable(name: "arg", arg: 1, scope: !65, file: !20, line: 11, type: !16) +!70 = !DILocation(line: 11, column: 21, scope: !65) +!71 = !DILocation(line: 13, column: 5, scope: !65) +!72 = !DILocation(line: 14, column: 5, scope: !65) +!73 = distinct !DISubprogram(name: "thread_1", scope: !20, file: !20, line: 17, type: !66, scopeLine: 18, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +!74 = !DILocalVariable(name: "arg", arg: 1, scope: !73, file: !20, line: 17, type: !16) +!75 = !DILocation(line: 17, column: 22, scope: !73) +!76 = !DILocation(line: 19, column: 5, scope: !73) +!77 = !DILocation(line: 20, column: 5, scope: !73) +!78 = !DILocation(line: 22, column: 5, scope: !73) +!79 = !DILocation(line: 23, column: 5, scope: !73) +!80 = !DILocation(line: 24, column: 9, scope: !73) +!81 = !DILocation(line: 24, column: 7, scope: !73) +!82 = !DILocation(line: 25, column: 5, scope: !73) +!83 = !DILocation(line: 27, column: 18, scope: !73) +!84 = !DILocation(line: 27, column: 5, scope: !73) +!85 = !DILocation(line: 29, column: 5, scope: !73) +!86 = distinct !DISubprogram(name: "thread_2", scope: !20, file: !20, line: 32, type: !66, scopeLine: 33, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +!87 = !DILocalVariable(name: "arg", arg: 1, scope: !86, file: !20, line: 32, type: !16) +!88 = !DILocation(line: 32, column: 22, scope: !86) +!89 = !DILocation(line: 34, column: 9, scope: !86) +!90 = !DILocation(line: 34, column: 7, scope: !86) +!91 = !DILocation(line: 35, column: 5, scope: !86) +!92 = !DILocation(line: 36, column: 5, scope: !86) +!93 = distinct !DISubprogram(name: "main", scope: !20, file: !20, line: 39, type: !94, scopeLine: 40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +!94 = !DISubroutineType(types: !95) +!95 = !{!23} +!96 = !DILocalVariable(name: "t1", scope: !93, file: !20, line: 41, type: !30) +!97 = !DILocation(line: 41, column: 15, scope: !93) +!98 = !DILocalVariable(name: "t2", scope: !93, file: !20, line: 41, type: !30) +!99 = !DILocation(line: 41, column: 19, scope: !93) +!100 = !DILocation(line: 43, column: 5, scope: !93) +!101 = !DILocation(line: 44, column: 5, scope: !93) +!102 = !DILocation(line: 45, column: 18, scope: !93) +!103 = !DILocation(line: 45, column: 5, scope: !93) +!104 = !DILocation(line: 46, column: 18, scope: !93) +!105 = !DILocation(line: 46, column: 5, scope: !93) +!106 = !DILocation(line: 48, column: 25, scope: !93) +!107 = !DILocation(line: 48, column: 27, scope: !93) +!108 = !DILocation(line: 48, column: 32, scope: !93) +!109 = !DILocation(line: 48, column: 35, scope: !93) +!110 = !DILocation(line: 48, column: 37, scope: !93) +!111 = !DILocation(line: 48, column: 42, scope: !93) +!112 = !DILocation(line: 48, column: 45, scope: !93) +!113 = !DILocation(line: 48, column: 47, scope: !93) +!114 = !DILocation(line: 0, scope: !93) +!115 = !DILocation(line: 48, column: 23, scope: !93) +!116 = !DILocation(line: 48, column: 5, scope: !93) +!117 = !DILocation(line: 50, column: 5, scope: !93) diff --git a/dartagnan/src/test/resources/interrupts/c11_detour_disable_release.ll b/dartagnan/src/test/resources/interrupts/c11_detour_disable_release.ll new file mode 100644 index 0000000000..6d2257c7d7 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_detour_disable_release.ll @@ -0,0 +1,244 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_detour_disable_release.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_detour_disable_release.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@y = global i32 0, align 4, !dbg !0 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !28 +@x = global i32 0, align 4, !dbg !18 +@a = global i32 0, align 4, !dbg !24 +@b = global i32 0, align 4, !dbg !26 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !65 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !69, metadata !DIExpression()), !dbg !70 + store i32 3, i32* %3, align 4, !dbg !71 + %4 = load i32, i32* %3, align 4, !dbg !71 + store atomic i32 %4, i32* @y seq_cst, align 4, !dbg !71 + ret i8* null, !dbg !72 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread_1(i8* noundef %0) #0 !dbg !73 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !74, metadata !DIExpression()), !dbg !75 + call void @__VERIFIER_make_interrupt_handler(), !dbg !76 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !77 + call void @__VERIFIER_disable_irq(), !dbg !78 + store i32 1, i32* %3, align 4, !dbg !79 + %6 = load i32, i32* %3, align 4, !dbg !79 + store atomic i32 %6, i32* @x release, align 4, !dbg !79 + %7 = load atomic i32, i32* @y monotonic, align 4, !dbg !80 + store i32 %7, i32* %4, align 4, !dbg !80 + %8 = load i32, i32* %4, align 4, !dbg !80 + store i32 %8, i32* @a, align 4, !dbg !81 + call void @__VERIFIER_enable_irq(), !dbg !82 + %9 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !83 + %10 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %9, i8** noundef null), !dbg !84 + ret i8* null, !dbg !85 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare void @__VERIFIER_disable_irq() #2 + +declare void @__VERIFIER_enable_irq() #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread_2(i8* noundef %0) #0 !dbg !86 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !87, metadata !DIExpression()), !dbg !88 + %5 = load atomic i32, i32* @x monotonic, align 4, !dbg !89 + store i32 %5, i32* %3, align 4, !dbg !89 + %6 = load i32, i32* %3, align 4, !dbg !89 + store i32 %6, i32* @b, align 4, !dbg !90 + store i32 2, i32* %4, align 4, !dbg !91 + %7 = load i32, i32* %4, align 4, !dbg !91 + store atomic i32 %7, i32* @y release, align 4, !dbg !91 + ret i8* null, !dbg !92 +} + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !93 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + %3 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !96, metadata !DIExpression()), !dbg !97 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %3, metadata !98, metadata !DIExpression()), !dbg !99 + %4 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_1, i8* noundef null), !dbg !100 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %3, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_2, i8* noundef null), !dbg !101 + %6 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %2, align 8, !dbg !102 + %7 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %6, i8** noundef null), !dbg !103 + %8 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %3, align 8, !dbg !104 + %9 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %8, i8** noundef null), !dbg !105 + %10 = load i32, i32* @b, align 4, !dbg !106 + %11 = icmp eq i32 %10, 1, !dbg !107 + br i1 %11, label %12, label %18, !dbg !108 + +12: ; preds = %0 + %13 = load i32, i32* @a, align 4, !dbg !109 + %14 = icmp eq i32 %13, 3, !dbg !110 + br i1 %14, label %15, label %18, !dbg !111 + +15: ; preds = %12 + %16 = load atomic i32, i32* @y seq_cst, align 4, !dbg !112 + %17 = icmp eq i32 %16, 3, !dbg !113 + br label %18 + +18: ; preds = %15, %12, %0 + %19 = phi i1 [ false, %12 ], [ false, %0 ], [ %17, %15 ], !dbg !114 + %20 = xor i1 %19, true, !dbg !115 + %21 = zext i1 %20 to i32, !dbg !115 + call void @__VERIFIER_assert(i32 noundef %21), !dbg !116 + ret i32 0, !dbg !117 +} + +declare void @__VERIFIER_assert(i32 noundef) #2 + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!54, !55, !56, !57, !58, !59, !60, !61, !62, !63} +!llvm.ident = !{!64} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !20, line: 7, type: !21, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !15, globals: !17, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_detour_disable_release.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 56, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "/opt/homebrew/Cellar/llvm@14/14.0.6/lib/clang/14.0.6/include/stdatomic.h", directory: "") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_consume", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "memory_order_acq_rel", value: 4) +!14 = !DIEnumerator(name: "memory_order_seq_cst", value: 5) +!15 = !{!16} +!16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!17 = !{!18, !0, !24, !26, !28} +!18 = !DIGlobalVariableExpression(var: !19, expr: !DIExpression()) +!19 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !20, line: 7, type: !21, isLocal: false, isDefinition: true) +!20 = !DIFile(filename: "benchmarks/interrupts/c11_detour_disable_release.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!21 = !DIDerivedType(tag: DW_TAG_typedef, name: "atomic_int", file: !6, line: 92, baseType: !22) +!22 = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: !23) +!23 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !20, line: 8, type: !23, isLocal: false, isDefinition: true) +!26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression()) +!27 = distinct !DIGlobalVariable(name: "b", scope: !2, file: !20, line: 8, type: !23, isLocal: false, isDefinition: true) +!28 = !DIGlobalVariableExpression(var: !29, expr: !DIExpression()) +!29 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !20, line: 10, type: !30, isLocal: false, isDefinition: true) +!30 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !31, line: 31, baseType: !32) +!31 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!32 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !33, line: 118, baseType: !34) +!33 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !35, size: 64) +!35 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !33, line: 103, size: 65536, elements: !36) +!36 = !{!37, !39, !49} +!37 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !35, file: !33, line: 104, baseType: !38, size: 64) +!38 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!39 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !35, file: !33, line: 105, baseType: !40, size: 64, offset: 64) +!40 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !41, size: 64) +!41 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !33, line: 57, size: 192, elements: !42) +!42 = !{!43, !47, !48} +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !41, file: !33, line: 58, baseType: !44, size: 64) +!44 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !45, size: 64) +!45 = !DISubroutineType(types: !46) +!46 = !{null, !16} +!47 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !41, file: !33, line: 59, baseType: !16, size: 64, offset: 64) +!48 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !41, file: !33, line: 60, baseType: !40, size: 64, offset: 128) +!49 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !35, file: !33, line: 106, baseType: !50, size: 65408, offset: 128) +!50 = !DICompositeType(tag: DW_TAG_array_type, baseType: !51, size: 65408, elements: !52) +!51 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!52 = !{!53} +!53 = !DISubrange(count: 8176) +!54 = !{i32 7, !"Dwarf Version", i32 4} +!55 = !{i32 2, !"Debug Info Version", i32 3} +!56 = !{i32 1, !"wchar_size", i32 4} +!57 = !{i32 1, !"branch-target-enforcement", i32 0} +!58 = !{i32 1, !"sign-return-address", i32 0} +!59 = !{i32 1, !"sign-return-address-all", i32 0} +!60 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!61 = !{i32 7, !"PIC Level", i32 2} +!62 = !{i32 7, !"uwtable", i32 1} +!63 = !{i32 7, !"frame-pointer", i32 1} +!64 = !{!"Homebrew clang version 14.0.6"} +!65 = distinct !DISubprogram(name: "handler", scope: !20, file: !20, line: 11, type: !66, scopeLine: 12, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +!66 = !DISubroutineType(types: !67) +!67 = !{!16, !16} +!68 = !{} +!69 = !DILocalVariable(name: "arg", arg: 1, scope: !65, file: !20, line: 11, type: !16) +!70 = !DILocation(line: 11, column: 21, scope: !65) +!71 = !DILocation(line: 13, column: 5, scope: !65) +!72 = !DILocation(line: 14, column: 5, scope: !65) +!73 = distinct !DISubprogram(name: "thread_1", scope: !20, file: !20, line: 17, type: !66, scopeLine: 18, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +!74 = !DILocalVariable(name: "arg", arg: 1, scope: !73, file: !20, line: 17, type: !16) +!75 = !DILocation(line: 17, column: 22, scope: !73) +!76 = !DILocation(line: 19, column: 5, scope: !73) +!77 = !DILocation(line: 20, column: 5, scope: !73) +!78 = !DILocation(line: 22, column: 5, scope: !73) +!79 = !DILocation(line: 23, column: 5, scope: !73) +!80 = !DILocation(line: 24, column: 9, scope: !73) +!81 = !DILocation(line: 24, column: 7, scope: !73) +!82 = !DILocation(line: 25, column: 5, scope: !73) +!83 = !DILocation(line: 27, column: 18, scope: !73) +!84 = !DILocation(line: 27, column: 5, scope: !73) +!85 = !DILocation(line: 29, column: 5, scope: !73) +!86 = distinct !DISubprogram(name: "thread_2", scope: !20, file: !20, line: 32, type: !66, scopeLine: 33, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +!87 = !DILocalVariable(name: "arg", arg: 1, scope: !86, file: !20, line: 32, type: !16) +!88 = !DILocation(line: 32, column: 22, scope: !86) +!89 = !DILocation(line: 34, column: 9, scope: !86) +!90 = !DILocation(line: 34, column: 7, scope: !86) +!91 = !DILocation(line: 35, column: 5, scope: !86) +!92 = !DILocation(line: 36, column: 5, scope: !86) +!93 = distinct !DISubprogram(name: "main", scope: !20, file: !20, line: 39, type: !94, scopeLine: 40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !68) +!94 = !DISubroutineType(types: !95) +!95 = !{!23} +!96 = !DILocalVariable(name: "t1", scope: !93, file: !20, line: 41, type: !30) +!97 = !DILocation(line: 41, column: 15, scope: !93) +!98 = !DILocalVariable(name: "t2", scope: !93, file: !20, line: 41, type: !30) +!99 = !DILocation(line: 41, column: 19, scope: !93) +!100 = !DILocation(line: 43, column: 5, scope: !93) +!101 = !DILocation(line: 44, column: 5, scope: !93) +!102 = !DILocation(line: 45, column: 18, scope: !93) +!103 = !DILocation(line: 45, column: 5, scope: !93) +!104 = !DILocation(line: 46, column: 18, scope: !93) +!105 = !DILocation(line: 46, column: 5, scope: !93) +!106 = !DILocation(line: 48, column: 25, scope: !93) +!107 = !DILocation(line: 48, column: 27, scope: !93) +!108 = !DILocation(line: 48, column: 32, scope: !93) +!109 = !DILocation(line: 48, column: 35, scope: !93) +!110 = !DILocation(line: 48, column: 37, scope: !93) +!111 = !DILocation(line: 48, column: 42, scope: !93) +!112 = !DILocation(line: 48, column: 45, scope: !93) +!113 = !DILocation(line: 48, column: 47, scope: !93) +!114 = !DILocation(line: 0, scope: !93) +!115 = !DILocation(line: 48, column: 23, scope: !93) +!116 = !DILocation(line: 48, column: 5, scope: !93) +!117 = !DILocation(line: 50, column: 5, scope: !93) diff --git a/dartagnan/src/test/resources/interrupts/c11_oota.ll b/dartagnan/src/test/resources/interrupts/c11_oota.ll new file mode 100644 index 0000000000..e9f9c0fc8b --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_oota.ll @@ -0,0 +1,225 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_oota.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_oota.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@z = global i32 0, align 4, !dbg !0 +@y = global i32 0, align 4, !dbg !24 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !26 +@x = global i32 0, align 4, !dbg !18 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !63 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !67, metadata !DIExpression()), !dbg !68 + store i32 3, i32* %3, align 4, !dbg !69 + %5 = load i32, i32* %3, align 4, !dbg !69 + store atomic i32 %5, i32* @z monotonic, align 4, !dbg !69 + %6 = load atomic i32, i32* @y monotonic, align 4, !dbg !70 + store i32 %6, i32* %4, align 4, !dbg !70 + %7 = load i32, i32* %4, align 4, !dbg !70 + %8 = icmp eq i32 %7, 0, !dbg !71 + %9 = zext i1 %8 to i32, !dbg !71 + call void @__VERIFIER_assert(i32 noundef %9), !dbg !72 + ret i8* null, !dbg !73 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__VERIFIER_assert(i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread_1(i8* noundef %0) #0 !dbg !74 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !75, metadata !DIExpression()), !dbg !76 + call void @__VERIFIER_make_interrupt_handler(), !dbg !77 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !78 + %6 = load atomic i32, i32* @x monotonic, align 4, !dbg !79 + store i32 %6, i32* %3, align 4, !dbg !79 + %7 = load i32, i32* %3, align 4, !dbg !79 + %8 = icmp eq i32 %7, 1, !dbg !81 + br i1 %8, label %9, label %11, !dbg !82 + +9: ; preds = %1 + store i32 2, i32* %4, align 4, !dbg !83 + %10 = load i32, i32* %4, align 4, !dbg !83 + store atomic i32 %10, i32* @y monotonic, align 4, !dbg !83 + br label %11, !dbg !85 + +11: ; preds = %9, %1 + %12 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !86 + %13 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %12, i8** noundef null), !dbg !87 + ret i8* null, !dbg !88 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread_2(i8* noundef %0) #0 !dbg !89 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !90, metadata !DIExpression()), !dbg !91 + %5 = load atomic i32, i32* @z monotonic, align 4, !dbg !92 + store i32 %5, i32* %3, align 4, !dbg !92 + %6 = load i32, i32* %3, align 4, !dbg !92 + %7 = icmp eq i32 %6, 3, !dbg !94 + br i1 %7, label %8, label %10, !dbg !95 + +8: ; preds = %1 + store i32 1, i32* %4, align 4, !dbg !96 + %9 = load i32, i32* %4, align 4, !dbg !96 + store atomic i32 %9, i32* @x monotonic, align 4, !dbg !96 + br label %10, !dbg !98 + +10: ; preds = %8, %1 + ret i8* null, !dbg !99 +} + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !100 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + %3 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !103, metadata !DIExpression()), !dbg !104 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %3, metadata !105, metadata !DIExpression()), !dbg !106 + %4 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_1, i8* noundef null), !dbg !107 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %3, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_2, i8* noundef null), !dbg !108 + ret i32 0, !dbg !109 +} + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!52, !53, !54, !55, !56, !57, !58, !59, !60, !61} +!llvm.ident = !{!62} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "z", scope: !2, file: !20, line: 7, type: !21, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !15, globals: !17, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_oota.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 56, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "/opt/homebrew/Cellar/llvm@14/14.0.6/lib/clang/14.0.6/include/stdatomic.h", directory: "") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_consume", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "memory_order_acq_rel", value: 4) +!14 = !DIEnumerator(name: "memory_order_seq_cst", value: 5) +!15 = !{!16} +!16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!17 = !{!18, !24, !0, !26} +!18 = !DIGlobalVariableExpression(var: !19, expr: !DIExpression()) +!19 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !20, line: 7, type: !21, isLocal: false, isDefinition: true) +!20 = !DIFile(filename: "benchmarks/interrupts/c11_oota.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!21 = !DIDerivedType(tag: DW_TAG_typedef, name: "atomic_int", file: !6, line: 92, baseType: !22) +!22 = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: !23) +!23 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !20, line: 7, type: !21, isLocal: false, isDefinition: true) +!26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression()) +!27 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !20, line: 9, type: !28, isLocal: false, isDefinition: true) +!28 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !29, line: 31, baseType: !30) +!29 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!30 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !31, line: 118, baseType: !32) +!31 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!32 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !33, size: 64) +!33 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !31, line: 103, size: 65536, elements: !34) +!34 = !{!35, !37, !47} +!35 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !33, file: !31, line: 104, baseType: !36, size: 64) +!36 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!37 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !33, file: !31, line: 105, baseType: !38, size: 64, offset: 64) +!38 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !39, size: 64) +!39 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !31, line: 57, size: 192, elements: !40) +!40 = !{!41, !45, !46} +!41 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !39, file: !31, line: 58, baseType: !42, size: 64) +!42 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !43, size: 64) +!43 = !DISubroutineType(types: !44) +!44 = !{null, !16} +!45 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !39, file: !31, line: 59, baseType: !16, size: 64, offset: 64) +!46 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !39, file: !31, line: 60, baseType: !38, size: 64, offset: 128) +!47 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !33, file: !31, line: 106, baseType: !48, size: 65408, offset: 128) +!48 = !DICompositeType(tag: DW_TAG_array_type, baseType: !49, size: 65408, elements: !50) +!49 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!50 = !{!51} +!51 = !DISubrange(count: 8176) +!52 = !{i32 7, !"Dwarf Version", i32 4} +!53 = !{i32 2, !"Debug Info Version", i32 3} +!54 = !{i32 1, !"wchar_size", i32 4} +!55 = !{i32 1, !"branch-target-enforcement", i32 0} +!56 = !{i32 1, !"sign-return-address", i32 0} +!57 = !{i32 1, !"sign-return-address-all", i32 0} +!58 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!59 = !{i32 7, !"PIC Level", i32 2} +!60 = !{i32 7, !"uwtable", i32 1} +!61 = !{i32 7, !"frame-pointer", i32 1} +!62 = !{!"Homebrew clang version 14.0.6"} +!63 = distinct !DISubprogram(name: "handler", scope: !20, file: !20, line: 10, type: !64, scopeLine: 11, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !66) +!64 = !DISubroutineType(types: !65) +!65 = !{!16, !16} +!66 = !{} +!67 = !DILocalVariable(name: "arg", arg: 1, scope: !63, file: !20, line: 10, type: !16) +!68 = !DILocation(line: 10, column: 21, scope: !63) +!69 = !DILocation(line: 12, column: 5, scope: !63) +!70 = !DILocation(line: 13, column: 23, scope: !63) +!71 = !DILocation(line: 13, column: 70, scope: !63) +!72 = !DILocation(line: 13, column: 5, scope: !63) +!73 = !DILocation(line: 14, column: 5, scope: !63) +!74 = distinct !DISubprogram(name: "thread_1", scope: !20, file: !20, line: 17, type: !64, scopeLine: 18, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !66) +!75 = !DILocalVariable(name: "arg", arg: 1, scope: !74, file: !20, line: 17, type: !16) +!76 = !DILocation(line: 17, column: 22, scope: !74) +!77 = !DILocation(line: 19, column: 5, scope: !74) +!78 = !DILocation(line: 20, column: 5, scope: !74) +!79 = !DILocation(line: 22, column: 8, scope: !80) +!80 = distinct !DILexicalBlock(scope: !74, file: !20, line: 22, column: 8) +!81 = !DILocation(line: 22, column: 55, scope: !80) +!82 = !DILocation(line: 22, column: 8, scope: !74) +!83 = !DILocation(line: 23, column: 9, scope: !84) +!84 = distinct !DILexicalBlock(scope: !80, file: !20, line: 22, column: 61) +!85 = !DILocation(line: 24, column: 5, scope: !84) +!86 = !DILocation(line: 26, column: 18, scope: !74) +!87 = !DILocation(line: 26, column: 5, scope: !74) +!88 = !DILocation(line: 28, column: 5, scope: !74) +!89 = distinct !DISubprogram(name: "thread_2", scope: !20, file: !20, line: 31, type: !64, scopeLine: 32, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !66) +!90 = !DILocalVariable(name: "arg", arg: 1, scope: !89, file: !20, line: 31, type: !16) +!91 = !DILocation(line: 31, column: 22, scope: !89) +!92 = !DILocation(line: 33, column: 8, scope: !93) +!93 = distinct !DILexicalBlock(scope: !89, file: !20, line: 33, column: 8) +!94 = !DILocation(line: 33, column: 55, scope: !93) +!95 = !DILocation(line: 33, column: 8, scope: !89) +!96 = !DILocation(line: 34, column: 9, scope: !97) +!97 = distinct !DILexicalBlock(scope: !93, file: !20, line: 33, column: 61) +!98 = !DILocation(line: 35, column: 5, scope: !97) +!99 = !DILocation(line: 36, column: 5, scope: !89) +!100 = distinct !DISubprogram(name: "main", scope: !20, file: !20, line: 39, type: !101, scopeLine: 40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !66) +!101 = !DISubroutineType(types: !102) +!102 = !{!23} +!103 = !DILocalVariable(name: "t1", scope: !100, file: !20, line: 41, type: !28) +!104 = !DILocation(line: 41, column: 15, scope: !100) +!105 = !DILocalVariable(name: "t2", scope: !100, file: !20, line: 41, type: !28) +!106 = !DILocation(line: 41, column: 19, scope: !100) +!107 = !DILocation(line: 43, column: 5, scope: !100) +!108 = !DILocation(line: 44, column: 5, scope: !100) +!109 = !DILocation(line: 46, column: 5, scope: !100) diff --git a/dartagnan/src/test/resources/interrupts/c11_with_barrier.ll b/dartagnan/src/test/resources/interrupts/c11_with_barrier.ll new file mode 100644 index 0000000000..84113d207b --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_with_barrier.ll @@ -0,0 +1,277 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_with_barrier.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_with_barrier.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct.A = type { i32, i32 } +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@cnt = global i32 0, align 4, !dbg !0 +@as = global [10 x %struct.A] zeroinitializer, align 4, !dbg !12 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !24 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !60 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !64, metadata !DIExpression()), !dbg !65 + call void @llvm.dbg.declare(metadata i32* %3, metadata !66, metadata !DIExpression()), !dbg !67 + %5 = load i8*, i8** %2, align 8, !dbg !68 + %6 = ptrtoint i8* %5 to i64, !dbg !69 + %7 = trunc i64 %6 to i32, !dbg !70 + store i32 %7, i32* %3, align 4, !dbg !67 + call void @llvm.dbg.declare(metadata i32* %4, metadata !71, metadata !DIExpression()), !dbg !72 + %8 = load i32, i32* @cnt, align 4, !dbg !73 + %9 = add nsw i32 %8, 1, !dbg !73 + store i32 %9, i32* @cnt, align 4, !dbg !73 + store i32 %8, i32* %4, align 4, !dbg !72 + call void @__VERIFIER_make_cb(), !dbg !74 + %10 = load i32, i32* %3, align 4, !dbg !75 + %11 = load i32, i32* %4, align 4, !dbg !76 + %12 = sext i32 %11 to i64, !dbg !77 + %13 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %12, !dbg !77 + %14 = getelementptr inbounds %struct.A, %struct.A* %13, i32 0, i32 0, !dbg !78 + store volatile i32 %10, i32* %14, align 4, !dbg !79 + %15 = load i32, i32* %3, align 4, !dbg !80 + %16 = load i32, i32* %4, align 4, !dbg !81 + %17 = sext i32 %16 to i64, !dbg !82 + %18 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %17, !dbg !82 + %19 = getelementptr inbounds %struct.A, %struct.A* %18, i32 0, i32 1, !dbg !83 + store volatile i32 %15, i32* %19, align 4, !dbg !84 + %20 = load i32, i32* %4, align 4, !dbg !85 + %21 = sext i32 %20 to i64, !dbg !86 + %22 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %21, !dbg !86 + %23 = getelementptr inbounds %struct.A, %struct.A* %22, i32 0, i32 0, !dbg !87 + %24 = load volatile i32, i32* %23, align 4, !dbg !87 + %25 = load i32, i32* %4, align 4, !dbg !88 + %26 = sext i32 %25 to i64, !dbg !89 + %27 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %26, !dbg !89 + %28 = getelementptr inbounds %struct.A, %struct.A* %27, i32 0, i32 1, !dbg !90 + %29 = load volatile i32, i32* %28, align 4, !dbg !90 + %30 = icmp eq i32 %24, %29, !dbg !91 + %31 = zext i1 %30 to i32, !dbg !91 + call void @__VERIFIER_assert(i32 noundef %31), !dbg !92 + ret i8* null, !dbg !93 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__VERIFIER_make_cb() #2 + +declare void @__VERIFIER_assert(i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @run(i8* noundef %0) #0 !dbg !94 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !95, metadata !DIExpression()), !dbg !96 + call void @__VERIFIER_make_interrupt_handler(), !dbg !97 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !98 + call void @llvm.dbg.declare(metadata i32* %3, metadata !99, metadata !DIExpression()), !dbg !100 + %6 = load i8*, i8** %2, align 8, !dbg !101 + %7 = ptrtoint i8* %6 to i64, !dbg !102 + %8 = trunc i64 %7 to i32, !dbg !103 + store i32 %8, i32* %3, align 4, !dbg !100 + call void @llvm.dbg.declare(metadata i32* %4, metadata !104, metadata !DIExpression()), !dbg !105 + %9 = load i32, i32* @cnt, align 4, !dbg !106 + %10 = add nsw i32 %9, 1, !dbg !106 + store i32 %10, i32* @cnt, align 4, !dbg !106 + store i32 %9, i32* %4, align 4, !dbg !105 + call void @__VERIFIER_make_cb(), !dbg !107 + %11 = load i32, i32* %3, align 4, !dbg !108 + %12 = load i32, i32* %4, align 4, !dbg !109 + %13 = sext i32 %12 to i64, !dbg !110 + %14 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %13, !dbg !110 + %15 = getelementptr inbounds %struct.A, %struct.A* %14, i32 0, i32 0, !dbg !111 + store volatile i32 %11, i32* %15, align 4, !dbg !112 + %16 = load i32, i32* %3, align 4, !dbg !113 + %17 = load i32, i32* %4, align 4, !dbg !114 + %18 = sext i32 %17 to i64, !dbg !115 + %19 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %18, !dbg !115 + %20 = getelementptr inbounds %struct.A, %struct.A* %19, i32 0, i32 1, !dbg !116 + store volatile i32 %16, i32* %20, align 4, !dbg !117 + %21 = load i32, i32* %4, align 4, !dbg !118 + %22 = sext i32 %21 to i64, !dbg !119 + %23 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %22, !dbg !119 + %24 = getelementptr inbounds %struct.A, %struct.A* %23, i32 0, i32 0, !dbg !120 + %25 = load volatile i32, i32* %24, align 4, !dbg !120 + %26 = load i32, i32* %4, align 4, !dbg !121 + %27 = sext i32 %26 to i64, !dbg !122 + %28 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %27, !dbg !122 + %29 = getelementptr inbounds %struct.A, %struct.A* %28, i32 0, i32 1, !dbg !123 + %30 = load volatile i32, i32* %29, align 4, !dbg !123 + %31 = icmp eq i32 %25, %30, !dbg !124 + %32 = zext i1 %31 to i32, !dbg !124 + call void @__VERIFIER_assert(i32 noundef %32), !dbg !125 + %33 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !126 + %34 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %33, i8** noundef null), !dbg !127 + ret i8* null, !dbg !128 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !129 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !132, metadata !DIExpression()), !dbg !133 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)), !dbg !134 + ret i32 0, !dbg !135 +} + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!49, !50, !51, !52, !53, !54, !55, !56, !57, !58} +!llvm.ident = !{!59} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !14, line: 13, type: !20, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !11, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_with_barrier.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5, !10} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 32, baseType: !7) +!6 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_types/_intptr_t.h", directory: "") +!7 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_intptr_t", file: !8, line: 27, baseType: !9) +!8 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/arm/_types.h", directory: "") +!9 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!11 = !{!0, !12, !24} +!12 = !DIGlobalVariableExpression(var: !13, expr: !DIExpression()) +!13 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !14, line: 12, type: !15, isLocal: false, isDefinition: true) +!14 = !DIFile(filename: "benchmarks/interrupts/c11_with_barrier.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!15 = !DICompositeType(tag: DW_TAG_array_type, baseType: !16, size: 640, elements: !22) +!16 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !14, line: 11, size: 64, elements: !17) +!17 = !{!18, !21} +!18 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !16, file: !14, line: 11, baseType: !19, size: 32) +!19 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !20) +!20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!21 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !16, file: !14, line: 11, baseType: !19, size: 32, offset: 32) +!22 = !{!23} +!23 = !DISubrange(count: 10) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !14, line: 15, type: !26, isLocal: false, isDefinition: true) +!26 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !27, line: 31, baseType: !28) +!27 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!28 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !29, line: 118, baseType: !30) +!29 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!30 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !31, size: 64) +!31 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !29, line: 103, size: 65536, elements: !32) +!32 = !{!33, !34, !44} +!33 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !31, file: !29, line: 104, baseType: !9, size: 64) +!34 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !31, file: !29, line: 105, baseType: !35, size: 64, offset: 64) +!35 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !36, size: 64) +!36 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !29, line: 57, size: 192, elements: !37) +!37 = !{!38, !42, !43} +!38 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !36, file: !29, line: 58, baseType: !39, size: 64) +!39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !40, size: 64) +!40 = !DISubroutineType(types: !41) +!41 = !{null, !10} +!42 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !36, file: !29, line: 59, baseType: !10, size: 64, offset: 64) +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !36, file: !29, line: 60, baseType: !35, size: 64, offset: 128) +!44 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !31, file: !29, line: 106, baseType: !45, size: 65408, offset: 128) +!45 = !DICompositeType(tag: DW_TAG_array_type, baseType: !46, size: 65408, elements: !47) +!46 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!47 = !{!48} +!48 = !DISubrange(count: 8176) +!49 = !{i32 7, !"Dwarf Version", i32 4} +!50 = !{i32 2, !"Debug Info Version", i32 3} +!51 = !{i32 1, !"wchar_size", i32 4} +!52 = !{i32 1, !"branch-target-enforcement", i32 0} +!53 = !{i32 1, !"sign-return-address", i32 0} +!54 = !{i32 1, !"sign-return-address-all", i32 0} +!55 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!56 = !{i32 7, !"PIC Level", i32 2} +!57 = !{i32 7, !"uwtable", i32 1} +!58 = !{i32 7, !"frame-pointer", i32 1} +!59 = !{!"Homebrew clang version 14.0.6"} +!60 = distinct !DISubprogram(name: "handler", scope: !14, file: !14, line: 16, type: !61, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!61 = !DISubroutineType(types: !62) +!62 = !{!10, !10} +!63 = !{} +!64 = !DILocalVariable(name: "arg", arg: 1, scope: !60, file: !14, line: 16, type: !10) +!65 = !DILocation(line: 16, column: 21, scope: !60) +!66 = !DILocalVariable(name: "tindex", scope: !60, file: !14, line: 18, type: !20) +!67 = !DILocation(line: 18, column: 9, scope: !60) +!68 = !DILocation(line: 18, column: 30, scope: !60) +!69 = !DILocation(line: 18, column: 19, scope: !60) +!70 = !DILocation(line: 18, column: 18, scope: !60) +!71 = !DILocalVariable(name: "i", scope: !60, file: !14, line: 19, type: !20) +!72 = !DILocation(line: 19, column: 9, scope: !60) +!73 = !DILocation(line: 19, column: 16, scope: !60) +!74 = !DILocation(line: 20, column: 5, scope: !60) +!75 = !DILocation(line: 21, column: 15, scope: !60) +!76 = !DILocation(line: 21, column: 8, scope: !60) +!77 = !DILocation(line: 21, column: 5, scope: !60) +!78 = !DILocation(line: 21, column: 11, scope: !60) +!79 = !DILocation(line: 21, column: 13, scope: !60) +!80 = !DILocation(line: 22, column: 15, scope: !60) +!81 = !DILocation(line: 22, column: 8, scope: !60) +!82 = !DILocation(line: 22, column: 5, scope: !60) +!83 = !DILocation(line: 22, column: 11, scope: !60) +!84 = !DILocation(line: 22, column: 13, scope: !60) +!85 = !DILocation(line: 23, column: 26, scope: !60) +!86 = !DILocation(line: 23, column: 23, scope: !60) +!87 = !DILocation(line: 23, column: 29, scope: !60) +!88 = !DILocation(line: 23, column: 37, scope: !60) +!89 = !DILocation(line: 23, column: 34, scope: !60) +!90 = !DILocation(line: 23, column: 40, scope: !60) +!91 = !DILocation(line: 23, column: 31, scope: !60) +!92 = !DILocation(line: 23, column: 5, scope: !60) +!93 = !DILocation(line: 25, column: 5, scope: !60) +!94 = distinct !DISubprogram(name: "run", scope: !14, file: !14, line: 28, type: !61, scopeLine: 29, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!95 = !DILocalVariable(name: "arg", arg: 1, scope: !94, file: !14, line: 28, type: !10) +!96 = !DILocation(line: 28, column: 17, scope: !94) +!97 = !DILocation(line: 30, column: 5, scope: !94) +!98 = !DILocation(line: 31, column: 5, scope: !94) +!99 = !DILocalVariable(name: "tindex", scope: !94, file: !14, line: 33, type: !20) +!100 = !DILocation(line: 33, column: 9, scope: !94) +!101 = !DILocation(line: 33, column: 30, scope: !94) +!102 = !DILocation(line: 33, column: 19, scope: !94) +!103 = !DILocation(line: 33, column: 18, scope: !94) +!104 = !DILocalVariable(name: "i", scope: !94, file: !14, line: 34, type: !20) +!105 = !DILocation(line: 34, column: 9, scope: !94) +!106 = !DILocation(line: 34, column: 16, scope: !94) +!107 = !DILocation(line: 35, column: 5, scope: !94) +!108 = !DILocation(line: 36, column: 15, scope: !94) +!109 = !DILocation(line: 36, column: 8, scope: !94) +!110 = !DILocation(line: 36, column: 5, scope: !94) +!111 = !DILocation(line: 36, column: 11, scope: !94) +!112 = !DILocation(line: 36, column: 13, scope: !94) +!113 = !DILocation(line: 37, column: 15, scope: !94) +!114 = !DILocation(line: 37, column: 8, scope: !94) +!115 = !DILocation(line: 37, column: 5, scope: !94) +!116 = !DILocation(line: 37, column: 11, scope: !94) +!117 = !DILocation(line: 37, column: 13, scope: !94) +!118 = !DILocation(line: 38, column: 26, scope: !94) +!119 = !DILocation(line: 38, column: 23, scope: !94) +!120 = !DILocation(line: 38, column: 29, scope: !94) +!121 = !DILocation(line: 38, column: 37, scope: !94) +!122 = !DILocation(line: 38, column: 34, scope: !94) +!123 = !DILocation(line: 38, column: 40, scope: !94) +!124 = !DILocation(line: 38, column: 31, scope: !94) +!125 = !DILocation(line: 38, column: 5, scope: !94) +!126 = !DILocation(line: 40, column: 18, scope: !94) +!127 = !DILocation(line: 40, column: 5, scope: !94) +!128 = !DILocation(line: 42, column: 5, scope: !94) +!129 = distinct !DISubprogram(name: "main", scope: !14, file: !14, line: 45, type: !130, scopeLine: 46, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!130 = !DISubroutineType(types: !131) +!131 = !{!20} +!132 = !DILocalVariable(name: "t", scope: !129, file: !14, line: 47, type: !26) +!133 = !DILocation(line: 47, column: 15, scope: !129) +!134 = !DILocation(line: 48, column: 5, scope: !129) +!135 = !DILocation(line: 50, column: 5, scope: !129) diff --git a/dartagnan/src/test/resources/interrupts/c11_with_barrier_dec.ll b/dartagnan/src/test/resources/interrupts/c11_with_barrier_dec.ll new file mode 100644 index 0000000000..7a9d27f319 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_with_barrier_dec.ll @@ -0,0 +1,285 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_with_barrier_dec.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_with_barrier_dec.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct.A = type { i32, i32 } +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@cnt = global i32 0, align 4, !dbg !0 +@as = global [10 x %struct.A] zeroinitializer, align 4, !dbg !12 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !24 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !60 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !64, metadata !DIExpression()), !dbg !65 + call void @llvm.dbg.declare(metadata i32* %3, metadata !66, metadata !DIExpression()), !dbg !67 + %5 = load i8*, i8** %2, align 8, !dbg !68 + %6 = ptrtoint i8* %5 to i64, !dbg !69 + %7 = trunc i64 %6 to i32, !dbg !70 + store i32 %7, i32* %3, align 4, !dbg !67 + call void @llvm.dbg.declare(metadata i32* %4, metadata !71, metadata !DIExpression()), !dbg !72 + %8 = load i32, i32* @cnt, align 4, !dbg !73 + %9 = add nsw i32 %8, 1, !dbg !73 + store i32 %9, i32* @cnt, align 4, !dbg !73 + store i32 %8, i32* %4, align 4, !dbg !72 + call void @__VERIFIER_make_cb(), !dbg !74 + %10 = load i32, i32* %3, align 4, !dbg !75 + %11 = load i32, i32* %4, align 4, !dbg !76 + %12 = sext i32 %11 to i64, !dbg !77 + %13 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %12, !dbg !77 + %14 = getelementptr inbounds %struct.A, %struct.A* %13, i32 0, i32 0, !dbg !78 + store volatile i32 %10, i32* %14, align 4, !dbg !79 + %15 = load i32, i32* %3, align 4, !dbg !80 + %16 = load i32, i32* %4, align 4, !dbg !81 + %17 = sext i32 %16 to i64, !dbg !82 + %18 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %17, !dbg !82 + %19 = getelementptr inbounds %struct.A, %struct.A* %18, i32 0, i32 1, !dbg !83 + store volatile i32 %15, i32* %19, align 4, !dbg !84 + %20 = load i32, i32* %4, align 4, !dbg !85 + %21 = sext i32 %20 to i64, !dbg !86 + %22 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %21, !dbg !86 + %23 = getelementptr inbounds %struct.A, %struct.A* %22, i32 0, i32 0, !dbg !87 + %24 = load volatile i32, i32* %23, align 4, !dbg !87 + %25 = load i32, i32* %4, align 4, !dbg !88 + %26 = sext i32 %25 to i64, !dbg !89 + %27 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %26, !dbg !89 + %28 = getelementptr inbounds %struct.A, %struct.A* %27, i32 0, i32 1, !dbg !90 + %29 = load volatile i32, i32* %28, align 4, !dbg !90 + %30 = icmp eq i32 %24, %29, !dbg !91 + %31 = zext i1 %30 to i32, !dbg !91 + call void @__VERIFIER_assert(i32 noundef %31), !dbg !92 + %32 = load i32, i32* @cnt, align 4, !dbg !93 + %33 = add nsw i32 %32, -1, !dbg !93 + store i32 %33, i32* @cnt, align 4, !dbg !93 + ret i8* null, !dbg !94 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__VERIFIER_make_cb() #2 + +declare void @__VERIFIER_assert(i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @run(i8* noundef %0) #0 !dbg !95 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !96, metadata !DIExpression()), !dbg !97 + call void @__VERIFIER_make_interrupt_handler(), !dbg !98 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !99 + call void @llvm.dbg.declare(metadata i32* %3, metadata !100, metadata !DIExpression()), !dbg !101 + %6 = load i8*, i8** %2, align 8, !dbg !102 + %7 = ptrtoint i8* %6 to i64, !dbg !103 + %8 = trunc i64 %7 to i32, !dbg !104 + store i32 %8, i32* %3, align 4, !dbg !101 + call void @llvm.dbg.declare(metadata i32* %4, metadata !105, metadata !DIExpression()), !dbg !106 + %9 = load i32, i32* @cnt, align 4, !dbg !107 + %10 = add nsw i32 %9, 1, !dbg !107 + store i32 %10, i32* @cnt, align 4, !dbg !107 + store i32 %9, i32* %4, align 4, !dbg !106 + call void @__VERIFIER_make_cb(), !dbg !108 + %11 = load i32, i32* %3, align 4, !dbg !109 + %12 = load i32, i32* %4, align 4, !dbg !110 + %13 = sext i32 %12 to i64, !dbg !111 + %14 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %13, !dbg !111 + %15 = getelementptr inbounds %struct.A, %struct.A* %14, i32 0, i32 0, !dbg !112 + store volatile i32 %11, i32* %15, align 4, !dbg !113 + %16 = load i32, i32* %3, align 4, !dbg !114 + %17 = load i32, i32* %4, align 4, !dbg !115 + %18 = sext i32 %17 to i64, !dbg !116 + %19 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %18, !dbg !116 + %20 = getelementptr inbounds %struct.A, %struct.A* %19, i32 0, i32 1, !dbg !117 + store volatile i32 %16, i32* %20, align 4, !dbg !118 + %21 = load i32, i32* %4, align 4, !dbg !119 + %22 = sext i32 %21 to i64, !dbg !120 + %23 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %22, !dbg !120 + %24 = getelementptr inbounds %struct.A, %struct.A* %23, i32 0, i32 0, !dbg !121 + %25 = load volatile i32, i32* %24, align 4, !dbg !121 + %26 = load i32, i32* %4, align 4, !dbg !122 + %27 = sext i32 %26 to i64, !dbg !123 + %28 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %27, !dbg !123 + %29 = getelementptr inbounds %struct.A, %struct.A* %28, i32 0, i32 1, !dbg !124 + %30 = load volatile i32, i32* %29, align 4, !dbg !124 + %31 = icmp eq i32 %25, %30, !dbg !125 + %32 = zext i1 %31 to i32, !dbg !125 + call void @__VERIFIER_assert(i32 noundef %32), !dbg !126 + %33 = load i32, i32* @cnt, align 4, !dbg !127 + %34 = add nsw i32 %33, -1, !dbg !127 + store i32 %34, i32* @cnt, align 4, !dbg !127 + %35 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !128 + %36 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %35, i8** noundef null), !dbg !129 + ret i8* null, !dbg !130 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !131 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !134, metadata !DIExpression()), !dbg !135 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)), !dbg !136 + ret i32 0, !dbg !137 +} + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!49, !50, !51, !52, !53, !54, !55, !56, !57, !58} +!llvm.ident = !{!59} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !14, line: 13, type: !20, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !11, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_with_barrier_dec.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5, !10} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 32, baseType: !7) +!6 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_types/_intptr_t.h", directory: "") +!7 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_intptr_t", file: !8, line: 27, baseType: !9) +!8 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/arm/_types.h", directory: "") +!9 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!11 = !{!0, !12, !24} +!12 = !DIGlobalVariableExpression(var: !13, expr: !DIExpression()) +!13 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !14, line: 12, type: !15, isLocal: false, isDefinition: true) +!14 = !DIFile(filename: "benchmarks/interrupts/c11_with_barrier_dec.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!15 = !DICompositeType(tag: DW_TAG_array_type, baseType: !16, size: 640, elements: !22) +!16 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !14, line: 11, size: 64, elements: !17) +!17 = !{!18, !21} +!18 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !16, file: !14, line: 11, baseType: !19, size: 32) +!19 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !20) +!20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!21 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !16, file: !14, line: 11, baseType: !19, size: 32, offset: 32) +!22 = !{!23} +!23 = !DISubrange(count: 10) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !14, line: 15, type: !26, isLocal: false, isDefinition: true) +!26 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !27, line: 31, baseType: !28) +!27 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!28 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !29, line: 118, baseType: !30) +!29 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!30 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !31, size: 64) +!31 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !29, line: 103, size: 65536, elements: !32) +!32 = !{!33, !34, !44} +!33 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !31, file: !29, line: 104, baseType: !9, size: 64) +!34 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !31, file: !29, line: 105, baseType: !35, size: 64, offset: 64) +!35 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !36, size: 64) +!36 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !29, line: 57, size: 192, elements: !37) +!37 = !{!38, !42, !43} +!38 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !36, file: !29, line: 58, baseType: !39, size: 64) +!39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !40, size: 64) +!40 = !DISubroutineType(types: !41) +!41 = !{null, !10} +!42 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !36, file: !29, line: 59, baseType: !10, size: 64, offset: 64) +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !36, file: !29, line: 60, baseType: !35, size: 64, offset: 128) +!44 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !31, file: !29, line: 106, baseType: !45, size: 65408, offset: 128) +!45 = !DICompositeType(tag: DW_TAG_array_type, baseType: !46, size: 65408, elements: !47) +!46 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!47 = !{!48} +!48 = !DISubrange(count: 8176) +!49 = !{i32 7, !"Dwarf Version", i32 4} +!50 = !{i32 2, !"Debug Info Version", i32 3} +!51 = !{i32 1, !"wchar_size", i32 4} +!52 = !{i32 1, !"branch-target-enforcement", i32 0} +!53 = !{i32 1, !"sign-return-address", i32 0} +!54 = !{i32 1, !"sign-return-address-all", i32 0} +!55 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!56 = !{i32 7, !"PIC Level", i32 2} +!57 = !{i32 7, !"uwtable", i32 1} +!58 = !{i32 7, !"frame-pointer", i32 1} +!59 = !{!"Homebrew clang version 14.0.6"} +!60 = distinct !DISubprogram(name: "handler", scope: !14, file: !14, line: 16, type: !61, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!61 = !DISubroutineType(types: !62) +!62 = !{!10, !10} +!63 = !{} +!64 = !DILocalVariable(name: "arg", arg: 1, scope: !60, file: !14, line: 16, type: !10) +!65 = !DILocation(line: 16, column: 21, scope: !60) +!66 = !DILocalVariable(name: "tindex", scope: !60, file: !14, line: 18, type: !20) +!67 = !DILocation(line: 18, column: 9, scope: !60) +!68 = !DILocation(line: 18, column: 30, scope: !60) +!69 = !DILocation(line: 18, column: 19, scope: !60) +!70 = !DILocation(line: 18, column: 18, scope: !60) +!71 = !DILocalVariable(name: "i", scope: !60, file: !14, line: 19, type: !20) +!72 = !DILocation(line: 19, column: 9, scope: !60) +!73 = !DILocation(line: 19, column: 16, scope: !60) +!74 = !DILocation(line: 20, column: 5, scope: !60) +!75 = !DILocation(line: 21, column: 15, scope: !60) +!76 = !DILocation(line: 21, column: 8, scope: !60) +!77 = !DILocation(line: 21, column: 5, scope: !60) +!78 = !DILocation(line: 21, column: 11, scope: !60) +!79 = !DILocation(line: 21, column: 13, scope: !60) +!80 = !DILocation(line: 22, column: 15, scope: !60) +!81 = !DILocation(line: 22, column: 8, scope: !60) +!82 = !DILocation(line: 22, column: 5, scope: !60) +!83 = !DILocation(line: 22, column: 11, scope: !60) +!84 = !DILocation(line: 22, column: 13, scope: !60) +!85 = !DILocation(line: 23, column: 26, scope: !60) +!86 = !DILocation(line: 23, column: 23, scope: !60) +!87 = !DILocation(line: 23, column: 29, scope: !60) +!88 = !DILocation(line: 23, column: 37, scope: !60) +!89 = !DILocation(line: 23, column: 34, scope: !60) +!90 = !DILocation(line: 23, column: 40, scope: !60) +!91 = !DILocation(line: 23, column: 31, scope: !60) +!92 = !DILocation(line: 23, column: 5, scope: !60) +!93 = !DILocation(line: 25, column: 8, scope: !60) +!94 = !DILocation(line: 27, column: 5, scope: !60) +!95 = distinct !DISubprogram(name: "run", scope: !14, file: !14, line: 30, type: !61, scopeLine: 31, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!96 = !DILocalVariable(name: "arg", arg: 1, scope: !95, file: !14, line: 30, type: !10) +!97 = !DILocation(line: 30, column: 17, scope: !95) +!98 = !DILocation(line: 32, column: 5, scope: !95) +!99 = !DILocation(line: 33, column: 5, scope: !95) +!100 = !DILocalVariable(name: "tindex", scope: !95, file: !14, line: 35, type: !20) +!101 = !DILocation(line: 35, column: 9, scope: !95) +!102 = !DILocation(line: 35, column: 30, scope: !95) +!103 = !DILocation(line: 35, column: 19, scope: !95) +!104 = !DILocation(line: 35, column: 18, scope: !95) +!105 = !DILocalVariable(name: "i", scope: !95, file: !14, line: 36, type: !20) +!106 = !DILocation(line: 36, column: 9, scope: !95) +!107 = !DILocation(line: 36, column: 16, scope: !95) +!108 = !DILocation(line: 37, column: 5, scope: !95) +!109 = !DILocation(line: 38, column: 15, scope: !95) +!110 = !DILocation(line: 38, column: 8, scope: !95) +!111 = !DILocation(line: 38, column: 5, scope: !95) +!112 = !DILocation(line: 38, column: 11, scope: !95) +!113 = !DILocation(line: 38, column: 13, scope: !95) +!114 = !DILocation(line: 39, column: 15, scope: !95) +!115 = !DILocation(line: 39, column: 8, scope: !95) +!116 = !DILocation(line: 39, column: 5, scope: !95) +!117 = !DILocation(line: 39, column: 11, scope: !95) +!118 = !DILocation(line: 39, column: 13, scope: !95) +!119 = !DILocation(line: 40, column: 26, scope: !95) +!120 = !DILocation(line: 40, column: 23, scope: !95) +!121 = !DILocation(line: 40, column: 29, scope: !95) +!122 = !DILocation(line: 40, column: 37, scope: !95) +!123 = !DILocation(line: 40, column: 34, scope: !95) +!124 = !DILocation(line: 40, column: 40, scope: !95) +!125 = !DILocation(line: 40, column: 31, scope: !95) +!126 = !DILocation(line: 40, column: 5, scope: !95) +!127 = !DILocation(line: 42, column: 8, scope: !95) +!128 = !DILocation(line: 44, column: 18, scope: !95) +!129 = !DILocation(line: 44, column: 5, scope: !95) +!130 = !DILocation(line: 46, column: 5, scope: !95) +!131 = distinct !DISubprogram(name: "main", scope: !14, file: !14, line: 49, type: !132, scopeLine: 50, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!132 = !DISubroutineType(types: !133) +!133 = !{!20} +!134 = !DILocalVariable(name: "t", scope: !131, file: !14, line: 51, type: !26) +!135 = !DILocation(line: 51, column: 15, scope: !131) +!136 = !DILocation(line: 52, column: 5, scope: !131) +!137 = !DILocation(line: 54, column: 5, scope: !131) diff --git a/dartagnan/src/test/resources/interrupts/c11_with_barrier_dec_barrier.ll b/dartagnan/src/test/resources/interrupts/c11_with_barrier_dec_barrier.ll new file mode 100644 index 0000000000..29100fbd08 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_with_barrier_dec_barrier.ll @@ -0,0 +1,289 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_with_barrier_dec_barrier.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_with_barrier_dec_barrier.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct.A = type { i32, i32 } +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@cnt = global i32 0, align 4, !dbg !0 +@as = global [10 x %struct.A] zeroinitializer, align 4, !dbg !12 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !24 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !60 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !64, metadata !DIExpression()), !dbg !65 + call void @llvm.dbg.declare(metadata i32* %3, metadata !66, metadata !DIExpression()), !dbg !67 + %5 = load i8*, i8** %2, align 8, !dbg !68 + %6 = ptrtoint i8* %5 to i64, !dbg !69 + %7 = trunc i64 %6 to i32, !dbg !70 + store i32 %7, i32* %3, align 4, !dbg !67 + call void @llvm.dbg.declare(metadata i32* %4, metadata !71, metadata !DIExpression()), !dbg !72 + %8 = load i32, i32* @cnt, align 4, !dbg !73 + %9 = add nsw i32 %8, 1, !dbg !73 + store i32 %9, i32* @cnt, align 4, !dbg !73 + store i32 %8, i32* %4, align 4, !dbg !72 + call void @__VERIFIER_make_cb(), !dbg !74 + %10 = load i32, i32* %3, align 4, !dbg !75 + %11 = load i32, i32* %4, align 4, !dbg !76 + %12 = sext i32 %11 to i64, !dbg !77 + %13 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %12, !dbg !77 + %14 = getelementptr inbounds %struct.A, %struct.A* %13, i32 0, i32 0, !dbg !78 + store volatile i32 %10, i32* %14, align 4, !dbg !79 + %15 = load i32, i32* %3, align 4, !dbg !80 + %16 = load i32, i32* %4, align 4, !dbg !81 + %17 = sext i32 %16 to i64, !dbg !82 + %18 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %17, !dbg !82 + %19 = getelementptr inbounds %struct.A, %struct.A* %18, i32 0, i32 1, !dbg !83 + store volatile i32 %15, i32* %19, align 4, !dbg !84 + %20 = load i32, i32* %4, align 4, !dbg !85 + %21 = sext i32 %20 to i64, !dbg !86 + %22 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %21, !dbg !86 + %23 = getelementptr inbounds %struct.A, %struct.A* %22, i32 0, i32 0, !dbg !87 + %24 = load volatile i32, i32* %23, align 4, !dbg !87 + %25 = load i32, i32* %4, align 4, !dbg !88 + %26 = sext i32 %25 to i64, !dbg !89 + %27 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %26, !dbg !89 + %28 = getelementptr inbounds %struct.A, %struct.A* %27, i32 0, i32 1, !dbg !90 + %29 = load volatile i32, i32* %28, align 4, !dbg !90 + %30 = icmp eq i32 %24, %29, !dbg !91 + %31 = zext i1 %30 to i32, !dbg !91 + call void @__VERIFIER_assert(i32 noundef %31), !dbg !92 + call void @__VERIFIER_make_cb(), !dbg !93 + %32 = load i32, i32* @cnt, align 4, !dbg !94 + %33 = add nsw i32 %32, -1, !dbg !94 + store i32 %33, i32* @cnt, align 4, !dbg !94 + ret i8* null, !dbg !95 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__VERIFIER_make_cb() #2 + +declare void @__VERIFIER_assert(i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @run(i8* noundef %0) #0 !dbg !96 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !97, metadata !DIExpression()), !dbg !98 + call void @__VERIFIER_make_interrupt_handler(), !dbg !99 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !100 + call void @llvm.dbg.declare(metadata i32* %3, metadata !101, metadata !DIExpression()), !dbg !102 + %6 = load i8*, i8** %2, align 8, !dbg !103 + %7 = ptrtoint i8* %6 to i64, !dbg !104 + %8 = trunc i64 %7 to i32, !dbg !105 + store i32 %8, i32* %3, align 4, !dbg !102 + call void @llvm.dbg.declare(metadata i32* %4, metadata !106, metadata !DIExpression()), !dbg !107 + %9 = load i32, i32* @cnt, align 4, !dbg !108 + %10 = add nsw i32 %9, 1, !dbg !108 + store i32 %10, i32* @cnt, align 4, !dbg !108 + store i32 %9, i32* %4, align 4, !dbg !107 + call void @__VERIFIER_make_cb(), !dbg !109 + %11 = load i32, i32* %3, align 4, !dbg !110 + %12 = load i32, i32* %4, align 4, !dbg !111 + %13 = sext i32 %12 to i64, !dbg !112 + %14 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %13, !dbg !112 + %15 = getelementptr inbounds %struct.A, %struct.A* %14, i32 0, i32 0, !dbg !113 + store volatile i32 %11, i32* %15, align 4, !dbg !114 + %16 = load i32, i32* %3, align 4, !dbg !115 + %17 = load i32, i32* %4, align 4, !dbg !116 + %18 = sext i32 %17 to i64, !dbg !117 + %19 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %18, !dbg !117 + %20 = getelementptr inbounds %struct.A, %struct.A* %19, i32 0, i32 1, !dbg !118 + store volatile i32 %16, i32* %20, align 4, !dbg !119 + %21 = load i32, i32* %4, align 4, !dbg !120 + %22 = sext i32 %21 to i64, !dbg !121 + %23 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %22, !dbg !121 + %24 = getelementptr inbounds %struct.A, %struct.A* %23, i32 0, i32 0, !dbg !122 + %25 = load volatile i32, i32* %24, align 4, !dbg !122 + %26 = load i32, i32* %4, align 4, !dbg !123 + %27 = sext i32 %26 to i64, !dbg !124 + %28 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %27, !dbg !124 + %29 = getelementptr inbounds %struct.A, %struct.A* %28, i32 0, i32 1, !dbg !125 + %30 = load volatile i32, i32* %29, align 4, !dbg !125 + %31 = icmp eq i32 %25, %30, !dbg !126 + %32 = zext i1 %31 to i32, !dbg !126 + call void @__VERIFIER_assert(i32 noundef %32), !dbg !127 + call void @__VERIFIER_make_cb(), !dbg !128 + %33 = load i32, i32* @cnt, align 4, !dbg !129 + %34 = add nsw i32 %33, -1, !dbg !129 + store i32 %34, i32* @cnt, align 4, !dbg !129 + %35 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !130 + %36 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %35, i8** noundef null), !dbg !131 + ret i8* null, !dbg !132 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !133 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !136, metadata !DIExpression()), !dbg !137 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)), !dbg !138 + ret i32 0, !dbg !139 +} + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!49, !50, !51, !52, !53, !54, !55, !56, !57, !58} +!llvm.ident = !{!59} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !14, line: 13, type: !20, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !11, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_with_barrier_dec_barrier.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5, !10} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 32, baseType: !7) +!6 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_types/_intptr_t.h", directory: "") +!7 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_intptr_t", file: !8, line: 27, baseType: !9) +!8 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/arm/_types.h", directory: "") +!9 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!11 = !{!0, !12, !24} +!12 = !DIGlobalVariableExpression(var: !13, expr: !DIExpression()) +!13 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !14, line: 12, type: !15, isLocal: false, isDefinition: true) +!14 = !DIFile(filename: "benchmarks/interrupts/c11_with_barrier_dec_barrier.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!15 = !DICompositeType(tag: DW_TAG_array_type, baseType: !16, size: 640, elements: !22) +!16 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !14, line: 11, size: 64, elements: !17) +!17 = !{!18, !21} +!18 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !16, file: !14, line: 11, baseType: !19, size: 32) +!19 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !20) +!20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!21 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !16, file: !14, line: 11, baseType: !19, size: 32, offset: 32) +!22 = !{!23} +!23 = !DISubrange(count: 10) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !14, line: 15, type: !26, isLocal: false, isDefinition: true) +!26 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !27, line: 31, baseType: !28) +!27 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!28 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !29, line: 118, baseType: !30) +!29 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!30 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !31, size: 64) +!31 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !29, line: 103, size: 65536, elements: !32) +!32 = !{!33, !34, !44} +!33 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !31, file: !29, line: 104, baseType: !9, size: 64) +!34 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !31, file: !29, line: 105, baseType: !35, size: 64, offset: 64) +!35 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !36, size: 64) +!36 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !29, line: 57, size: 192, elements: !37) +!37 = !{!38, !42, !43} +!38 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !36, file: !29, line: 58, baseType: !39, size: 64) +!39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !40, size: 64) +!40 = !DISubroutineType(types: !41) +!41 = !{null, !10} +!42 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !36, file: !29, line: 59, baseType: !10, size: 64, offset: 64) +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !36, file: !29, line: 60, baseType: !35, size: 64, offset: 128) +!44 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !31, file: !29, line: 106, baseType: !45, size: 65408, offset: 128) +!45 = !DICompositeType(tag: DW_TAG_array_type, baseType: !46, size: 65408, elements: !47) +!46 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!47 = !{!48} +!48 = !DISubrange(count: 8176) +!49 = !{i32 7, !"Dwarf Version", i32 4} +!50 = !{i32 2, !"Debug Info Version", i32 3} +!51 = !{i32 1, !"wchar_size", i32 4} +!52 = !{i32 1, !"branch-target-enforcement", i32 0} +!53 = !{i32 1, !"sign-return-address", i32 0} +!54 = !{i32 1, !"sign-return-address-all", i32 0} +!55 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!56 = !{i32 7, !"PIC Level", i32 2} +!57 = !{i32 7, !"uwtable", i32 1} +!58 = !{i32 7, !"frame-pointer", i32 1} +!59 = !{!"Homebrew clang version 14.0.6"} +!60 = distinct !DISubprogram(name: "handler", scope: !14, file: !14, line: 16, type: !61, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!61 = !DISubroutineType(types: !62) +!62 = !{!10, !10} +!63 = !{} +!64 = !DILocalVariable(name: "arg", arg: 1, scope: !60, file: !14, line: 16, type: !10) +!65 = !DILocation(line: 16, column: 21, scope: !60) +!66 = !DILocalVariable(name: "tindex", scope: !60, file: !14, line: 18, type: !20) +!67 = !DILocation(line: 18, column: 9, scope: !60) +!68 = !DILocation(line: 18, column: 30, scope: !60) +!69 = !DILocation(line: 18, column: 19, scope: !60) +!70 = !DILocation(line: 18, column: 18, scope: !60) +!71 = !DILocalVariable(name: "i", scope: !60, file: !14, line: 19, type: !20) +!72 = !DILocation(line: 19, column: 9, scope: !60) +!73 = !DILocation(line: 19, column: 16, scope: !60) +!74 = !DILocation(line: 20, column: 5, scope: !60) +!75 = !DILocation(line: 21, column: 15, scope: !60) +!76 = !DILocation(line: 21, column: 8, scope: !60) +!77 = !DILocation(line: 21, column: 5, scope: !60) +!78 = !DILocation(line: 21, column: 11, scope: !60) +!79 = !DILocation(line: 21, column: 13, scope: !60) +!80 = !DILocation(line: 22, column: 15, scope: !60) +!81 = !DILocation(line: 22, column: 8, scope: !60) +!82 = !DILocation(line: 22, column: 5, scope: !60) +!83 = !DILocation(line: 22, column: 11, scope: !60) +!84 = !DILocation(line: 22, column: 13, scope: !60) +!85 = !DILocation(line: 23, column: 26, scope: !60) +!86 = !DILocation(line: 23, column: 23, scope: !60) +!87 = !DILocation(line: 23, column: 29, scope: !60) +!88 = !DILocation(line: 23, column: 37, scope: !60) +!89 = !DILocation(line: 23, column: 34, scope: !60) +!90 = !DILocation(line: 23, column: 40, scope: !60) +!91 = !DILocation(line: 23, column: 31, scope: !60) +!92 = !DILocation(line: 23, column: 5, scope: !60) +!93 = !DILocation(line: 25, column: 5, scope: !60) +!94 = !DILocation(line: 26, column: 8, scope: !60) +!95 = !DILocation(line: 28, column: 5, scope: !60) +!96 = distinct !DISubprogram(name: "run", scope: !14, file: !14, line: 31, type: !61, scopeLine: 32, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!97 = !DILocalVariable(name: "arg", arg: 1, scope: !96, file: !14, line: 31, type: !10) +!98 = !DILocation(line: 31, column: 17, scope: !96) +!99 = !DILocation(line: 33, column: 5, scope: !96) +!100 = !DILocation(line: 34, column: 5, scope: !96) +!101 = !DILocalVariable(name: "tindex", scope: !96, file: !14, line: 36, type: !20) +!102 = !DILocation(line: 36, column: 9, scope: !96) +!103 = !DILocation(line: 36, column: 30, scope: !96) +!104 = !DILocation(line: 36, column: 19, scope: !96) +!105 = !DILocation(line: 36, column: 18, scope: !96) +!106 = !DILocalVariable(name: "i", scope: !96, file: !14, line: 37, type: !20) +!107 = !DILocation(line: 37, column: 9, scope: !96) +!108 = !DILocation(line: 37, column: 16, scope: !96) +!109 = !DILocation(line: 38, column: 5, scope: !96) +!110 = !DILocation(line: 39, column: 15, scope: !96) +!111 = !DILocation(line: 39, column: 8, scope: !96) +!112 = !DILocation(line: 39, column: 5, scope: !96) +!113 = !DILocation(line: 39, column: 11, scope: !96) +!114 = !DILocation(line: 39, column: 13, scope: !96) +!115 = !DILocation(line: 40, column: 15, scope: !96) +!116 = !DILocation(line: 40, column: 8, scope: !96) +!117 = !DILocation(line: 40, column: 5, scope: !96) +!118 = !DILocation(line: 40, column: 11, scope: !96) +!119 = !DILocation(line: 40, column: 13, scope: !96) +!120 = !DILocation(line: 41, column: 26, scope: !96) +!121 = !DILocation(line: 41, column: 23, scope: !96) +!122 = !DILocation(line: 41, column: 29, scope: !96) +!123 = !DILocation(line: 41, column: 37, scope: !96) +!124 = !DILocation(line: 41, column: 34, scope: !96) +!125 = !DILocation(line: 41, column: 40, scope: !96) +!126 = !DILocation(line: 41, column: 31, scope: !96) +!127 = !DILocation(line: 41, column: 5, scope: !96) +!128 = !DILocation(line: 43, column: 5, scope: !96) +!129 = !DILocation(line: 44, column: 8, scope: !96) +!130 = !DILocation(line: 46, column: 18, scope: !96) +!131 = !DILocation(line: 46, column: 5, scope: !96) +!132 = !DILocation(line: 48, column: 5, scope: !96) +!133 = distinct !DISubprogram(name: "main", scope: !14, file: !14, line: 51, type: !134, scopeLine: 52, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!134 = !DISubroutineType(types: !135) +!135 = !{!20} +!136 = !DILocalVariable(name: "t", scope: !133, file: !14, line: 53, type: !26) +!137 = !DILocation(line: 53, column: 15, scope: !133) +!138 = !DILocation(line: 54, column: 5, scope: !133) +!139 = !DILocation(line: 56, column: 5, scope: !133) diff --git a/dartagnan/src/test/resources/interrupts/c11_with_barrier_inc_split.ll b/dartagnan/src/test/resources/interrupts/c11_with_barrier_inc_split.ll new file mode 100644 index 0000000000..357d216c1f --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_with_barrier_inc_split.ll @@ -0,0 +1,281 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_with_barrier_inc_split.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_with_barrier_inc_split.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct.A = type { i32, i32 } +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@cnt = global i32 0, align 4, !dbg !0 +@as = global [10 x %struct.A] zeroinitializer, align 4, !dbg !12 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !24 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !60 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !64, metadata !DIExpression()), !dbg !65 + call void @llvm.dbg.declare(metadata i32* %3, metadata !66, metadata !DIExpression()), !dbg !67 + %5 = load i8*, i8** %2, align 8, !dbg !68 + %6 = ptrtoint i8* %5 to i64, !dbg !69 + %7 = trunc i64 %6 to i32, !dbg !70 + store i32 %7, i32* %3, align 4, !dbg !67 + call void @llvm.dbg.declare(metadata i32* %4, metadata !71, metadata !DIExpression()), !dbg !72 + %8 = load i32, i32* @cnt, align 4, !dbg !73 + %9 = add nsw i32 %8, 1, !dbg !73 + store i32 %9, i32* @cnt, align 4, !dbg !73 + store i32 %8, i32* %4, align 4, !dbg !72 + call void @__VERIFIER_make_cb(), !dbg !74 + %10 = load i32, i32* %3, align 4, !dbg !75 + %11 = load i32, i32* %4, align 4, !dbg !76 + %12 = sext i32 %11 to i64, !dbg !77 + %13 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %12, !dbg !77 + %14 = getelementptr inbounds %struct.A, %struct.A* %13, i32 0, i32 0, !dbg !78 + store volatile i32 %10, i32* %14, align 4, !dbg !79 + %15 = load i32, i32* %3, align 4, !dbg !80 + %16 = load i32, i32* %4, align 4, !dbg !81 + %17 = sext i32 %16 to i64, !dbg !82 + %18 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %17, !dbg !82 + %19 = getelementptr inbounds %struct.A, %struct.A* %18, i32 0, i32 1, !dbg !83 + store volatile i32 %15, i32* %19, align 4, !dbg !84 + %20 = load i32, i32* %4, align 4, !dbg !85 + %21 = sext i32 %20 to i64, !dbg !86 + %22 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %21, !dbg !86 + %23 = getelementptr inbounds %struct.A, %struct.A* %22, i32 0, i32 0, !dbg !87 + %24 = load volatile i32, i32* %23, align 4, !dbg !87 + %25 = load i32, i32* %4, align 4, !dbg !88 + %26 = sext i32 %25 to i64, !dbg !89 + %27 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %26, !dbg !89 + %28 = getelementptr inbounds %struct.A, %struct.A* %27, i32 0, i32 1, !dbg !90 + %29 = load volatile i32, i32* %28, align 4, !dbg !90 + %30 = icmp eq i32 %24, %29, !dbg !91 + %31 = zext i1 %30 to i32, !dbg !91 + call void @__VERIFIER_assert(i32 noundef %31), !dbg !92 + ret i8* null, !dbg !93 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__VERIFIER_make_cb() #2 + +declare void @__VERIFIER_assert(i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @run(i8* noundef %0) #0 !dbg !94 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !95, metadata !DIExpression()), !dbg !96 + call void @__VERIFIER_make_interrupt_handler(), !dbg !97 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !98 + call void @llvm.dbg.declare(metadata i32* %3, metadata !99, metadata !DIExpression()), !dbg !100 + %6 = load i8*, i8** %2, align 8, !dbg !101 + %7 = ptrtoint i8* %6 to i64, !dbg !102 + %8 = trunc i64 %7 to i32, !dbg !103 + store i32 %8, i32* %3, align 4, !dbg !100 + call void @llvm.dbg.declare(metadata i32* %4, metadata !104, metadata !DIExpression()), !dbg !105 + %9 = load i32, i32* @cnt, align 4, !dbg !106 + store i32 %9, i32* %4, align 4, !dbg !105 + call void @__VERIFIER_make_cb(), !dbg !107 + %10 = load i32, i32* %4, align 4, !dbg !108 + %11 = add nsw i32 %10, 1, !dbg !109 + store i32 %11, i32* @cnt, align 4, !dbg !110 + %12 = load i32, i32* %3, align 4, !dbg !111 + %13 = load i32, i32* %4, align 4, !dbg !112 + %14 = sext i32 %13 to i64, !dbg !113 + %15 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %14, !dbg !113 + %16 = getelementptr inbounds %struct.A, %struct.A* %15, i32 0, i32 0, !dbg !114 + store volatile i32 %12, i32* %16, align 4, !dbg !115 + %17 = load i32, i32* %3, align 4, !dbg !116 + %18 = load i32, i32* %4, align 4, !dbg !117 + %19 = sext i32 %18 to i64, !dbg !118 + %20 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %19, !dbg !118 + %21 = getelementptr inbounds %struct.A, %struct.A* %20, i32 0, i32 1, !dbg !119 + store volatile i32 %17, i32* %21, align 4, !dbg !120 + %22 = load i32, i32* %4, align 4, !dbg !121 + %23 = sext i32 %22 to i64, !dbg !122 + %24 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %23, !dbg !122 + %25 = getelementptr inbounds %struct.A, %struct.A* %24, i32 0, i32 0, !dbg !123 + %26 = load volatile i32, i32* %25, align 4, !dbg !123 + %27 = load i32, i32* %4, align 4, !dbg !124 + %28 = sext i32 %27 to i64, !dbg !125 + %29 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %28, !dbg !125 + %30 = getelementptr inbounds %struct.A, %struct.A* %29, i32 0, i32 1, !dbg !126 + %31 = load volatile i32, i32* %30, align 4, !dbg !126 + %32 = icmp eq i32 %26, %31, !dbg !127 + %33 = zext i1 %32 to i32, !dbg !127 + call void @__VERIFIER_assert(i32 noundef %33), !dbg !128 + %34 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !129 + %35 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %34, i8** noundef null), !dbg !130 + ret i8* null, !dbg !131 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !132 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !135, metadata !DIExpression()), !dbg !136 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)), !dbg !137 + ret i32 0, !dbg !138 +} + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!49, !50, !51, !52, !53, !54, !55, !56, !57, !58} +!llvm.ident = !{!59} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !14, line: 13, type: !20, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !11, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_with_barrier_inc_split.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5, !10} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 32, baseType: !7) +!6 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_types/_intptr_t.h", directory: "") +!7 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_intptr_t", file: !8, line: 27, baseType: !9) +!8 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/arm/_types.h", directory: "") +!9 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!11 = !{!0, !12, !24} +!12 = !DIGlobalVariableExpression(var: !13, expr: !DIExpression()) +!13 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !14, line: 12, type: !15, isLocal: false, isDefinition: true) +!14 = !DIFile(filename: "benchmarks/interrupts/c11_with_barrier_inc_split.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!15 = !DICompositeType(tag: DW_TAG_array_type, baseType: !16, size: 640, elements: !22) +!16 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !14, line: 11, size: 64, elements: !17) +!17 = !{!18, !21} +!18 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !16, file: !14, line: 11, baseType: !19, size: 32) +!19 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !20) +!20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!21 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !16, file: !14, line: 11, baseType: !19, size: 32, offset: 32) +!22 = !{!23} +!23 = !DISubrange(count: 10) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !14, line: 15, type: !26, isLocal: false, isDefinition: true) +!26 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !27, line: 31, baseType: !28) +!27 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!28 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !29, line: 118, baseType: !30) +!29 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!30 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !31, size: 64) +!31 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !29, line: 103, size: 65536, elements: !32) +!32 = !{!33, !34, !44} +!33 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !31, file: !29, line: 104, baseType: !9, size: 64) +!34 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !31, file: !29, line: 105, baseType: !35, size: 64, offset: 64) +!35 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !36, size: 64) +!36 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !29, line: 57, size: 192, elements: !37) +!37 = !{!38, !42, !43} +!38 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !36, file: !29, line: 58, baseType: !39, size: 64) +!39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !40, size: 64) +!40 = !DISubroutineType(types: !41) +!41 = !{null, !10} +!42 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !36, file: !29, line: 59, baseType: !10, size: 64, offset: 64) +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !36, file: !29, line: 60, baseType: !35, size: 64, offset: 128) +!44 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !31, file: !29, line: 106, baseType: !45, size: 65408, offset: 128) +!45 = !DICompositeType(tag: DW_TAG_array_type, baseType: !46, size: 65408, elements: !47) +!46 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!47 = !{!48} +!48 = !DISubrange(count: 8176) +!49 = !{i32 7, !"Dwarf Version", i32 4} +!50 = !{i32 2, !"Debug Info Version", i32 3} +!51 = !{i32 1, !"wchar_size", i32 4} +!52 = !{i32 1, !"branch-target-enforcement", i32 0} +!53 = !{i32 1, !"sign-return-address", i32 0} +!54 = !{i32 1, !"sign-return-address-all", i32 0} +!55 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!56 = !{i32 7, !"PIC Level", i32 2} +!57 = !{i32 7, !"uwtable", i32 1} +!58 = !{i32 7, !"frame-pointer", i32 1} +!59 = !{!"Homebrew clang version 14.0.6"} +!60 = distinct !DISubprogram(name: "handler", scope: !14, file: !14, line: 16, type: !61, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!61 = !DISubroutineType(types: !62) +!62 = !{!10, !10} +!63 = !{} +!64 = !DILocalVariable(name: "arg", arg: 1, scope: !60, file: !14, line: 16, type: !10) +!65 = !DILocation(line: 16, column: 21, scope: !60) +!66 = !DILocalVariable(name: "tindex", scope: !60, file: !14, line: 18, type: !20) +!67 = !DILocation(line: 18, column: 9, scope: !60) +!68 = !DILocation(line: 18, column: 30, scope: !60) +!69 = !DILocation(line: 18, column: 19, scope: !60) +!70 = !DILocation(line: 18, column: 18, scope: !60) +!71 = !DILocalVariable(name: "i", scope: !60, file: !14, line: 19, type: !20) +!72 = !DILocation(line: 19, column: 9, scope: !60) +!73 = !DILocation(line: 19, column: 16, scope: !60) +!74 = !DILocation(line: 20, column: 5, scope: !60) +!75 = !DILocation(line: 21, column: 15, scope: !60) +!76 = !DILocation(line: 21, column: 8, scope: !60) +!77 = !DILocation(line: 21, column: 5, scope: !60) +!78 = !DILocation(line: 21, column: 11, scope: !60) +!79 = !DILocation(line: 21, column: 13, scope: !60) +!80 = !DILocation(line: 22, column: 15, scope: !60) +!81 = !DILocation(line: 22, column: 8, scope: !60) +!82 = !DILocation(line: 22, column: 5, scope: !60) +!83 = !DILocation(line: 22, column: 11, scope: !60) +!84 = !DILocation(line: 22, column: 13, scope: !60) +!85 = !DILocation(line: 23, column: 26, scope: !60) +!86 = !DILocation(line: 23, column: 23, scope: !60) +!87 = !DILocation(line: 23, column: 29, scope: !60) +!88 = !DILocation(line: 23, column: 37, scope: !60) +!89 = !DILocation(line: 23, column: 34, scope: !60) +!90 = !DILocation(line: 23, column: 40, scope: !60) +!91 = !DILocation(line: 23, column: 31, scope: !60) +!92 = !DILocation(line: 23, column: 5, scope: !60) +!93 = !DILocation(line: 25, column: 5, scope: !60) +!94 = distinct !DISubprogram(name: "run", scope: !14, file: !14, line: 28, type: !61, scopeLine: 29, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!95 = !DILocalVariable(name: "arg", arg: 1, scope: !94, file: !14, line: 28, type: !10) +!96 = !DILocation(line: 28, column: 17, scope: !94) +!97 = !DILocation(line: 30, column: 5, scope: !94) +!98 = !DILocation(line: 31, column: 5, scope: !94) +!99 = !DILocalVariable(name: "tindex", scope: !94, file: !14, line: 33, type: !20) +!100 = !DILocation(line: 33, column: 9, scope: !94) +!101 = !DILocation(line: 33, column: 30, scope: !94) +!102 = !DILocation(line: 33, column: 19, scope: !94) +!103 = !DILocation(line: 33, column: 18, scope: !94) +!104 = !DILocalVariable(name: "i", scope: !94, file: !14, line: 34, type: !20) +!105 = !DILocation(line: 34, column: 9, scope: !94) +!106 = !DILocation(line: 34, column: 13, scope: !94) +!107 = !DILocation(line: 35, column: 5, scope: !94) +!108 = !DILocation(line: 36, column: 11, scope: !94) +!109 = !DILocation(line: 36, column: 12, scope: !94) +!110 = !DILocation(line: 36, column: 9, scope: !94) +!111 = !DILocation(line: 37, column: 15, scope: !94) +!112 = !DILocation(line: 37, column: 8, scope: !94) +!113 = !DILocation(line: 37, column: 5, scope: !94) +!114 = !DILocation(line: 37, column: 11, scope: !94) +!115 = !DILocation(line: 37, column: 13, scope: !94) +!116 = !DILocation(line: 38, column: 15, scope: !94) +!117 = !DILocation(line: 38, column: 8, scope: !94) +!118 = !DILocation(line: 38, column: 5, scope: !94) +!119 = !DILocation(line: 38, column: 11, scope: !94) +!120 = !DILocation(line: 38, column: 13, scope: !94) +!121 = !DILocation(line: 39, column: 26, scope: !94) +!122 = !DILocation(line: 39, column: 23, scope: !94) +!123 = !DILocation(line: 39, column: 29, scope: !94) +!124 = !DILocation(line: 39, column: 37, scope: !94) +!125 = !DILocation(line: 39, column: 34, scope: !94) +!126 = !DILocation(line: 39, column: 40, scope: !94) +!127 = !DILocation(line: 39, column: 31, scope: !94) +!128 = !DILocation(line: 39, column: 5, scope: !94) +!129 = !DILocation(line: 41, column: 18, scope: !94) +!130 = !DILocation(line: 41, column: 5, scope: !94) +!131 = !DILocation(line: 43, column: 5, scope: !94) +!132 = distinct !DISubprogram(name: "main", scope: !14, file: !14, line: 46, type: !133, scopeLine: 47, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!133 = !DISubroutineType(types: !134) +!134 = !{!20} +!135 = !DILocalVariable(name: "t", scope: !132, file: !14, line: 48, type: !26) +!136 = !DILocation(line: 48, column: 15, scope: !132) +!137 = !DILocation(line: 49, column: 5, scope: !132) +!138 = !DILocation(line: 51, column: 5, scope: !132) diff --git a/dartagnan/src/test/resources/interrupts/c11_with_disable_enable_as_barrier.ll b/dartagnan/src/test/resources/interrupts/c11_with_disable_enable_as_barrier.ll new file mode 100644 index 0000000000..ae02103d5a --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_with_disable_enable_as_barrier.ll @@ -0,0 +1,283 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_with_disable_enable_as_barrier.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_with_disable_enable_as_barrier.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct.A = type { i32, i32 } +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@cnt = global i32 0, align 4, !dbg !0 +@as = global [10 x %struct.A] zeroinitializer, align 4, !dbg !12 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !24 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !60 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !64, metadata !DIExpression()), !dbg !65 + call void @llvm.dbg.declare(metadata i32* %3, metadata !66, metadata !DIExpression()), !dbg !67 + %5 = load i8*, i8** %2, align 8, !dbg !68 + %6 = ptrtoint i8* %5 to i64, !dbg !69 + %7 = trunc i64 %6 to i32, !dbg !70 + store i32 %7, i32* %3, align 4, !dbg !67 + call void @llvm.dbg.declare(metadata i32* %4, metadata !71, metadata !DIExpression()), !dbg !72 + %8 = load i32, i32* @cnt, align 4, !dbg !73 + %9 = add nsw i32 %8, 1, !dbg !73 + store i32 %9, i32* @cnt, align 4, !dbg !73 + store i32 %8, i32* %4, align 4, !dbg !72 + call void @__VERIFIER_disable_irq(), !dbg !74 + call void @__VERIFIER_enable_irq(), !dbg !75 + %10 = load i32, i32* %3, align 4, !dbg !76 + %11 = load i32, i32* %4, align 4, !dbg !77 + %12 = sext i32 %11 to i64, !dbg !78 + %13 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %12, !dbg !78 + %14 = getelementptr inbounds %struct.A, %struct.A* %13, i32 0, i32 0, !dbg !79 + store volatile i32 %10, i32* %14, align 4, !dbg !80 + %15 = load i32, i32* %3, align 4, !dbg !81 + %16 = load i32, i32* %4, align 4, !dbg !82 + %17 = sext i32 %16 to i64, !dbg !83 + %18 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %17, !dbg !83 + %19 = getelementptr inbounds %struct.A, %struct.A* %18, i32 0, i32 1, !dbg !84 + store volatile i32 %15, i32* %19, align 4, !dbg !85 + %20 = load i32, i32* %4, align 4, !dbg !86 + %21 = sext i32 %20 to i64, !dbg !87 + %22 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %21, !dbg !87 + %23 = getelementptr inbounds %struct.A, %struct.A* %22, i32 0, i32 0, !dbg !88 + %24 = load volatile i32, i32* %23, align 4, !dbg !88 + %25 = load i32, i32* %4, align 4, !dbg !89 + %26 = sext i32 %25 to i64, !dbg !90 + %27 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %26, !dbg !90 + %28 = getelementptr inbounds %struct.A, %struct.A* %27, i32 0, i32 1, !dbg !91 + %29 = load volatile i32, i32* %28, align 4, !dbg !91 + %30 = icmp eq i32 %24, %29, !dbg !92 + %31 = zext i1 %30 to i32, !dbg !92 + call void @__VERIFIER_assert(i32 noundef %31), !dbg !93 + ret i8* null, !dbg !94 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__VERIFIER_disable_irq() #2 + +declare void @__VERIFIER_enable_irq() #2 + +declare void @__VERIFIER_assert(i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @run(i8* noundef %0) #0 !dbg !95 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !96, metadata !DIExpression()), !dbg !97 + call void @__VERIFIER_make_interrupt_handler(), !dbg !98 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !99 + call void @llvm.dbg.declare(metadata i32* %3, metadata !100, metadata !DIExpression()), !dbg !101 + %6 = load i8*, i8** %2, align 8, !dbg !102 + %7 = ptrtoint i8* %6 to i64, !dbg !103 + %8 = trunc i64 %7 to i32, !dbg !104 + store i32 %8, i32* %3, align 4, !dbg !101 + call void @llvm.dbg.declare(metadata i32* %4, metadata !105, metadata !DIExpression()), !dbg !106 + %9 = load i32, i32* @cnt, align 4, !dbg !107 + %10 = add nsw i32 %9, 1, !dbg !107 + store i32 %10, i32* @cnt, align 4, !dbg !107 + store i32 %9, i32* %4, align 4, !dbg !106 + call void @__VERIFIER_disable_irq(), !dbg !108 + call void @__VERIFIER_enable_irq(), !dbg !109 + %11 = load i32, i32* %3, align 4, !dbg !110 + %12 = load i32, i32* %4, align 4, !dbg !111 + %13 = sext i32 %12 to i64, !dbg !112 + %14 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %13, !dbg !112 + %15 = getelementptr inbounds %struct.A, %struct.A* %14, i32 0, i32 0, !dbg !113 + store volatile i32 %11, i32* %15, align 4, !dbg !114 + %16 = load i32, i32* %3, align 4, !dbg !115 + %17 = load i32, i32* %4, align 4, !dbg !116 + %18 = sext i32 %17 to i64, !dbg !117 + %19 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %18, !dbg !117 + %20 = getelementptr inbounds %struct.A, %struct.A* %19, i32 0, i32 1, !dbg !118 + store volatile i32 %16, i32* %20, align 4, !dbg !119 + %21 = load i32, i32* %4, align 4, !dbg !120 + %22 = sext i32 %21 to i64, !dbg !121 + %23 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %22, !dbg !121 + %24 = getelementptr inbounds %struct.A, %struct.A* %23, i32 0, i32 0, !dbg !122 + %25 = load volatile i32, i32* %24, align 4, !dbg !122 + %26 = load i32, i32* %4, align 4, !dbg !123 + %27 = sext i32 %26 to i64, !dbg !124 + %28 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %27, !dbg !124 + %29 = getelementptr inbounds %struct.A, %struct.A* %28, i32 0, i32 1, !dbg !125 + %30 = load volatile i32, i32* %29, align 4, !dbg !125 + %31 = icmp eq i32 %25, %30, !dbg !126 + %32 = zext i1 %31 to i32, !dbg !126 + call void @__VERIFIER_assert(i32 noundef %32), !dbg !127 + %33 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !128 + %34 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %33, i8** noundef null), !dbg !129 + ret i8* null, !dbg !130 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !131 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !134, metadata !DIExpression()), !dbg !135 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)), !dbg !136 + ret i32 0, !dbg !137 +} + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!49, !50, !51, !52, !53, !54, !55, !56, !57, !58} +!llvm.ident = !{!59} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !14, line: 13, type: !20, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !11, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_with_disable_enable_as_barrier.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5, !10} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 32, baseType: !7) +!6 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_types/_intptr_t.h", directory: "") +!7 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_intptr_t", file: !8, line: 27, baseType: !9) +!8 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/arm/_types.h", directory: "") +!9 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!11 = !{!0, !12, !24} +!12 = !DIGlobalVariableExpression(var: !13, expr: !DIExpression()) +!13 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !14, line: 12, type: !15, isLocal: false, isDefinition: true) +!14 = !DIFile(filename: "benchmarks/interrupts/c11_with_disable_enable_as_barrier.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!15 = !DICompositeType(tag: DW_TAG_array_type, baseType: !16, size: 640, elements: !22) +!16 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !14, line: 11, size: 64, elements: !17) +!17 = !{!18, !21} +!18 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !16, file: !14, line: 11, baseType: !19, size: 32) +!19 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !20) +!20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!21 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !16, file: !14, line: 11, baseType: !19, size: 32, offset: 32) +!22 = !{!23} +!23 = !DISubrange(count: 10) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !14, line: 15, type: !26, isLocal: false, isDefinition: true) +!26 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !27, line: 31, baseType: !28) +!27 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!28 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !29, line: 118, baseType: !30) +!29 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!30 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !31, size: 64) +!31 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !29, line: 103, size: 65536, elements: !32) +!32 = !{!33, !34, !44} +!33 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !31, file: !29, line: 104, baseType: !9, size: 64) +!34 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !31, file: !29, line: 105, baseType: !35, size: 64, offset: 64) +!35 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !36, size: 64) +!36 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !29, line: 57, size: 192, elements: !37) +!37 = !{!38, !42, !43} +!38 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !36, file: !29, line: 58, baseType: !39, size: 64) +!39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !40, size: 64) +!40 = !DISubroutineType(types: !41) +!41 = !{null, !10} +!42 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !36, file: !29, line: 59, baseType: !10, size: 64, offset: 64) +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !36, file: !29, line: 60, baseType: !35, size: 64, offset: 128) +!44 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !31, file: !29, line: 106, baseType: !45, size: 65408, offset: 128) +!45 = !DICompositeType(tag: DW_TAG_array_type, baseType: !46, size: 65408, elements: !47) +!46 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!47 = !{!48} +!48 = !DISubrange(count: 8176) +!49 = !{i32 7, !"Dwarf Version", i32 4} +!50 = !{i32 2, !"Debug Info Version", i32 3} +!51 = !{i32 1, !"wchar_size", i32 4} +!52 = !{i32 1, !"branch-target-enforcement", i32 0} +!53 = !{i32 1, !"sign-return-address", i32 0} +!54 = !{i32 1, !"sign-return-address-all", i32 0} +!55 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!56 = !{i32 7, !"PIC Level", i32 2} +!57 = !{i32 7, !"uwtable", i32 1} +!58 = !{i32 7, !"frame-pointer", i32 1} +!59 = !{!"Homebrew clang version 14.0.6"} +!60 = distinct !DISubprogram(name: "handler", scope: !14, file: !14, line: 16, type: !61, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!61 = !DISubroutineType(types: !62) +!62 = !{!10, !10} +!63 = !{} +!64 = !DILocalVariable(name: "arg", arg: 1, scope: !60, file: !14, line: 16, type: !10) +!65 = !DILocation(line: 16, column: 21, scope: !60) +!66 = !DILocalVariable(name: "tindex", scope: !60, file: !14, line: 18, type: !20) +!67 = !DILocation(line: 18, column: 9, scope: !60) +!68 = !DILocation(line: 18, column: 30, scope: !60) +!69 = !DILocation(line: 18, column: 19, scope: !60) +!70 = !DILocation(line: 18, column: 18, scope: !60) +!71 = !DILocalVariable(name: "i", scope: !60, file: !14, line: 19, type: !20) +!72 = !DILocation(line: 19, column: 9, scope: !60) +!73 = !DILocation(line: 19, column: 16, scope: !60) +!74 = !DILocation(line: 20, column: 5, scope: !60) +!75 = !DILocation(line: 21, column: 5, scope: !60) +!76 = !DILocation(line: 22, column: 15, scope: !60) +!77 = !DILocation(line: 22, column: 8, scope: !60) +!78 = !DILocation(line: 22, column: 5, scope: !60) +!79 = !DILocation(line: 22, column: 11, scope: !60) +!80 = !DILocation(line: 22, column: 13, scope: !60) +!81 = !DILocation(line: 23, column: 15, scope: !60) +!82 = !DILocation(line: 23, column: 8, scope: !60) +!83 = !DILocation(line: 23, column: 5, scope: !60) +!84 = !DILocation(line: 23, column: 11, scope: !60) +!85 = !DILocation(line: 23, column: 13, scope: !60) +!86 = !DILocation(line: 24, column: 26, scope: !60) +!87 = !DILocation(line: 24, column: 23, scope: !60) +!88 = !DILocation(line: 24, column: 29, scope: !60) +!89 = !DILocation(line: 24, column: 37, scope: !60) +!90 = !DILocation(line: 24, column: 34, scope: !60) +!91 = !DILocation(line: 24, column: 40, scope: !60) +!92 = !DILocation(line: 24, column: 31, scope: !60) +!93 = !DILocation(line: 24, column: 5, scope: !60) +!94 = !DILocation(line: 26, column: 5, scope: !60) +!95 = distinct !DISubprogram(name: "run", scope: !14, file: !14, line: 29, type: !61, scopeLine: 30, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!96 = !DILocalVariable(name: "arg", arg: 1, scope: !95, file: !14, line: 29, type: !10) +!97 = !DILocation(line: 29, column: 17, scope: !95) +!98 = !DILocation(line: 31, column: 5, scope: !95) +!99 = !DILocation(line: 32, column: 5, scope: !95) +!100 = !DILocalVariable(name: "tindex", scope: !95, file: !14, line: 34, type: !20) +!101 = !DILocation(line: 34, column: 9, scope: !95) +!102 = !DILocation(line: 34, column: 30, scope: !95) +!103 = !DILocation(line: 34, column: 19, scope: !95) +!104 = !DILocation(line: 34, column: 18, scope: !95) +!105 = !DILocalVariable(name: "i", scope: !95, file: !14, line: 35, type: !20) +!106 = !DILocation(line: 35, column: 9, scope: !95) +!107 = !DILocation(line: 35, column: 16, scope: !95) +!108 = !DILocation(line: 36, column: 5, scope: !95) +!109 = !DILocation(line: 37, column: 5, scope: !95) +!110 = !DILocation(line: 38, column: 15, scope: !95) +!111 = !DILocation(line: 38, column: 8, scope: !95) +!112 = !DILocation(line: 38, column: 5, scope: !95) +!113 = !DILocation(line: 38, column: 11, scope: !95) +!114 = !DILocation(line: 38, column: 13, scope: !95) +!115 = !DILocation(line: 39, column: 15, scope: !95) +!116 = !DILocation(line: 39, column: 8, scope: !95) +!117 = !DILocation(line: 39, column: 5, scope: !95) +!118 = !DILocation(line: 39, column: 11, scope: !95) +!119 = !DILocation(line: 39, column: 13, scope: !95) +!120 = !DILocation(line: 40, column: 26, scope: !95) +!121 = !DILocation(line: 40, column: 23, scope: !95) +!122 = !DILocation(line: 40, column: 29, scope: !95) +!123 = !DILocation(line: 40, column: 37, scope: !95) +!124 = !DILocation(line: 40, column: 34, scope: !95) +!125 = !DILocation(line: 40, column: 40, scope: !95) +!126 = !DILocation(line: 40, column: 31, scope: !95) +!127 = !DILocation(line: 40, column: 5, scope: !95) +!128 = !DILocation(line: 42, column: 18, scope: !95) +!129 = !DILocation(line: 42, column: 5, scope: !95) +!130 = !DILocation(line: 44, column: 5, scope: !95) +!131 = distinct !DISubprogram(name: "main", scope: !14, file: !14, line: 47, type: !132, scopeLine: 48, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!132 = !DISubroutineType(types: !133) +!133 = !{!20} +!134 = !DILocalVariable(name: "t", scope: !131, file: !14, line: 49, type: !26) +!135 = !DILocation(line: 49, column: 15, scope: !131) +!136 = !DILocation(line: 50, column: 5, scope: !131) +!137 = !DILocation(line: 52, column: 5, scope: !131) diff --git a/dartagnan/src/test/resources/interrupts/c11_without_barrier.ll b/dartagnan/src/test/resources/interrupts/c11_without_barrier.ll new file mode 100644 index 0000000000..c43a044afe --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c11_without_barrier.ll @@ -0,0 +1,271 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_without_barrier.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_without_barrier.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct.A = type { i32, i32 } +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@cnt = global i32 0, align 4, !dbg !0 +@as = global [10 x %struct.A] zeroinitializer, align 4, !dbg !12 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !24 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !60 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !64, metadata !DIExpression()), !dbg !65 + call void @llvm.dbg.declare(metadata i32* %3, metadata !66, metadata !DIExpression()), !dbg !67 + %5 = load i8*, i8** %2, align 8, !dbg !68 + %6 = ptrtoint i8* %5 to i64, !dbg !69 + %7 = trunc i64 %6 to i32, !dbg !70 + store i32 %7, i32* %3, align 4, !dbg !67 + call void @llvm.dbg.declare(metadata i32* %4, metadata !71, metadata !DIExpression()), !dbg !72 + %8 = load i32, i32* @cnt, align 4, !dbg !73 + %9 = add nsw i32 %8, 1, !dbg !73 + store i32 %9, i32* @cnt, align 4, !dbg !73 + store i32 %8, i32* %4, align 4, !dbg !72 + %10 = load i32, i32* %3, align 4, !dbg !74 + %11 = load i32, i32* %4, align 4, !dbg !75 + %12 = sext i32 %11 to i64, !dbg !76 + %13 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %12, !dbg !76 + %14 = getelementptr inbounds %struct.A, %struct.A* %13, i32 0, i32 0, !dbg !77 + store volatile i32 %10, i32* %14, align 4, !dbg !78 + %15 = load i32, i32* %3, align 4, !dbg !79 + %16 = load i32, i32* %4, align 4, !dbg !80 + %17 = sext i32 %16 to i64, !dbg !81 + %18 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %17, !dbg !81 + %19 = getelementptr inbounds %struct.A, %struct.A* %18, i32 0, i32 1, !dbg !82 + store volatile i32 %15, i32* %19, align 4, !dbg !83 + %20 = load i32, i32* %4, align 4, !dbg !84 + %21 = sext i32 %20 to i64, !dbg !85 + %22 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %21, !dbg !85 + %23 = getelementptr inbounds %struct.A, %struct.A* %22, i32 0, i32 0, !dbg !86 + %24 = load volatile i32, i32* %23, align 4, !dbg !86 + %25 = load i32, i32* %4, align 4, !dbg !87 + %26 = sext i32 %25 to i64, !dbg !88 + %27 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %26, !dbg !88 + %28 = getelementptr inbounds %struct.A, %struct.A* %27, i32 0, i32 1, !dbg !89 + %29 = load volatile i32, i32* %28, align 4, !dbg !89 + %30 = icmp eq i32 %24, %29, !dbg !90 + %31 = zext i1 %30 to i32, !dbg !90 + call void @__VERIFIER_assert(i32 noundef %31), !dbg !91 + ret i8* null, !dbg !92 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__VERIFIER_assert(i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @run(i8* noundef %0) #0 !dbg !93 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !94, metadata !DIExpression()), !dbg !95 + call void @__VERIFIER_make_interrupt_handler(), !dbg !96 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !97 + call void @llvm.dbg.declare(metadata i32* %3, metadata !98, metadata !DIExpression()), !dbg !99 + %6 = load i8*, i8** %2, align 8, !dbg !100 + %7 = ptrtoint i8* %6 to i64, !dbg !101 + %8 = trunc i64 %7 to i32, !dbg !102 + store i32 %8, i32* %3, align 4, !dbg !99 + call void @llvm.dbg.declare(metadata i32* %4, metadata !103, metadata !DIExpression()), !dbg !104 + %9 = load i32, i32* @cnt, align 4, !dbg !105 + %10 = add nsw i32 %9, 1, !dbg !105 + store i32 %10, i32* @cnt, align 4, !dbg !105 + store i32 %9, i32* %4, align 4, !dbg !104 + %11 = load i32, i32* %3, align 4, !dbg !106 + %12 = load i32, i32* %4, align 4, !dbg !107 + %13 = sext i32 %12 to i64, !dbg !108 + %14 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %13, !dbg !108 + %15 = getelementptr inbounds %struct.A, %struct.A* %14, i32 0, i32 0, !dbg !109 + store volatile i32 %11, i32* %15, align 4, !dbg !110 + %16 = load i32, i32* %3, align 4, !dbg !111 + %17 = load i32, i32* %4, align 4, !dbg !112 + %18 = sext i32 %17 to i64, !dbg !113 + %19 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %18, !dbg !113 + %20 = getelementptr inbounds %struct.A, %struct.A* %19, i32 0, i32 1, !dbg !114 + store volatile i32 %16, i32* %20, align 4, !dbg !115 + %21 = load i32, i32* %4, align 4, !dbg !116 + %22 = sext i32 %21 to i64, !dbg !117 + %23 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %22, !dbg !117 + %24 = getelementptr inbounds %struct.A, %struct.A* %23, i32 0, i32 0, !dbg !118 + %25 = load volatile i32, i32* %24, align 4, !dbg !118 + %26 = load i32, i32* %4, align 4, !dbg !119 + %27 = sext i32 %26 to i64, !dbg !120 + %28 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %27, !dbg !120 + %29 = getelementptr inbounds %struct.A, %struct.A* %28, i32 0, i32 1, !dbg !121 + %30 = load volatile i32, i32* %29, align 4, !dbg !121 + %31 = icmp eq i32 %25, %30, !dbg !122 + %32 = zext i1 %31 to i32, !dbg !122 + call void @__VERIFIER_assert(i32 noundef %32), !dbg !123 + %33 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !124 + %34 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %33, i8** noundef null), !dbg !125 + ret i8* null, !dbg !126 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !127 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !130, metadata !DIExpression()), !dbg !131 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)), !dbg !132 + ret i32 0, !dbg !133 +} + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!49, !50, !51, !52, !53, !54, !55, !56, !57, !58} +!llvm.ident = !{!59} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !14, line: 13, type: !20, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !11, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c11_without_barrier.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5, !10} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 32, baseType: !7) +!6 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_types/_intptr_t.h", directory: "") +!7 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_intptr_t", file: !8, line: 27, baseType: !9) +!8 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/arm/_types.h", directory: "") +!9 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!11 = !{!0, !12, !24} +!12 = !DIGlobalVariableExpression(var: !13, expr: !DIExpression()) +!13 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !14, line: 12, type: !15, isLocal: false, isDefinition: true) +!14 = !DIFile(filename: "benchmarks/interrupts/c11_without_barrier.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!15 = !DICompositeType(tag: DW_TAG_array_type, baseType: !16, size: 640, elements: !22) +!16 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !14, line: 11, size: 64, elements: !17) +!17 = !{!18, !21} +!18 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !16, file: !14, line: 11, baseType: !19, size: 32) +!19 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !20) +!20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!21 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !16, file: !14, line: 11, baseType: !19, size: 32, offset: 32) +!22 = !{!23} +!23 = !DISubrange(count: 10) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !14, line: 15, type: !26, isLocal: false, isDefinition: true) +!26 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !27, line: 31, baseType: !28) +!27 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!28 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !29, line: 118, baseType: !30) +!29 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!30 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !31, size: 64) +!31 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !29, line: 103, size: 65536, elements: !32) +!32 = !{!33, !34, !44} +!33 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !31, file: !29, line: 104, baseType: !9, size: 64) +!34 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !31, file: !29, line: 105, baseType: !35, size: 64, offset: 64) +!35 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !36, size: 64) +!36 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !29, line: 57, size: 192, elements: !37) +!37 = !{!38, !42, !43} +!38 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !36, file: !29, line: 58, baseType: !39, size: 64) +!39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !40, size: 64) +!40 = !DISubroutineType(types: !41) +!41 = !{null, !10} +!42 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !36, file: !29, line: 59, baseType: !10, size: 64, offset: 64) +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !36, file: !29, line: 60, baseType: !35, size: 64, offset: 128) +!44 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !31, file: !29, line: 106, baseType: !45, size: 65408, offset: 128) +!45 = !DICompositeType(tag: DW_TAG_array_type, baseType: !46, size: 65408, elements: !47) +!46 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!47 = !{!48} +!48 = !DISubrange(count: 8176) +!49 = !{i32 7, !"Dwarf Version", i32 4} +!50 = !{i32 2, !"Debug Info Version", i32 3} +!51 = !{i32 1, !"wchar_size", i32 4} +!52 = !{i32 1, !"branch-target-enforcement", i32 0} +!53 = !{i32 1, !"sign-return-address", i32 0} +!54 = !{i32 1, !"sign-return-address-all", i32 0} +!55 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!56 = !{i32 7, !"PIC Level", i32 2} +!57 = !{i32 7, !"uwtable", i32 1} +!58 = !{i32 7, !"frame-pointer", i32 1} +!59 = !{!"Homebrew clang version 14.0.6"} +!60 = distinct !DISubprogram(name: "handler", scope: !14, file: !14, line: 16, type: !61, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!61 = !DISubroutineType(types: !62) +!62 = !{!10, !10} +!63 = !{} +!64 = !DILocalVariable(name: "arg", arg: 1, scope: !60, file: !14, line: 16, type: !10) +!65 = !DILocation(line: 16, column: 21, scope: !60) +!66 = !DILocalVariable(name: "tindex", scope: !60, file: !14, line: 18, type: !20) +!67 = !DILocation(line: 18, column: 9, scope: !60) +!68 = !DILocation(line: 18, column: 30, scope: !60) +!69 = !DILocation(line: 18, column: 19, scope: !60) +!70 = !DILocation(line: 18, column: 18, scope: !60) +!71 = !DILocalVariable(name: "i", scope: !60, file: !14, line: 19, type: !20) +!72 = !DILocation(line: 19, column: 9, scope: !60) +!73 = !DILocation(line: 19, column: 16, scope: !60) +!74 = !DILocation(line: 20, column: 15, scope: !60) +!75 = !DILocation(line: 20, column: 8, scope: !60) +!76 = !DILocation(line: 20, column: 5, scope: !60) +!77 = !DILocation(line: 20, column: 11, scope: !60) +!78 = !DILocation(line: 20, column: 13, scope: !60) +!79 = !DILocation(line: 21, column: 15, scope: !60) +!80 = !DILocation(line: 21, column: 8, scope: !60) +!81 = !DILocation(line: 21, column: 5, scope: !60) +!82 = !DILocation(line: 21, column: 11, scope: !60) +!83 = !DILocation(line: 21, column: 13, scope: !60) +!84 = !DILocation(line: 22, column: 26, scope: !60) +!85 = !DILocation(line: 22, column: 23, scope: !60) +!86 = !DILocation(line: 22, column: 29, scope: !60) +!87 = !DILocation(line: 22, column: 37, scope: !60) +!88 = !DILocation(line: 22, column: 34, scope: !60) +!89 = !DILocation(line: 22, column: 40, scope: !60) +!90 = !DILocation(line: 22, column: 31, scope: !60) +!91 = !DILocation(line: 22, column: 5, scope: !60) +!92 = !DILocation(line: 24, column: 5, scope: !60) +!93 = distinct !DISubprogram(name: "run", scope: !14, file: !14, line: 27, type: !61, scopeLine: 28, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!94 = !DILocalVariable(name: "arg", arg: 1, scope: !93, file: !14, line: 27, type: !10) +!95 = !DILocation(line: 27, column: 17, scope: !93) +!96 = !DILocation(line: 29, column: 5, scope: !93) +!97 = !DILocation(line: 30, column: 5, scope: !93) +!98 = !DILocalVariable(name: "tindex", scope: !93, file: !14, line: 32, type: !20) +!99 = !DILocation(line: 32, column: 9, scope: !93) +!100 = !DILocation(line: 32, column: 30, scope: !93) +!101 = !DILocation(line: 32, column: 19, scope: !93) +!102 = !DILocation(line: 32, column: 18, scope: !93) +!103 = !DILocalVariable(name: "i", scope: !93, file: !14, line: 33, type: !20) +!104 = !DILocation(line: 33, column: 9, scope: !93) +!105 = !DILocation(line: 33, column: 16, scope: !93) +!106 = !DILocation(line: 34, column: 15, scope: !93) +!107 = !DILocation(line: 34, column: 8, scope: !93) +!108 = !DILocation(line: 34, column: 5, scope: !93) +!109 = !DILocation(line: 34, column: 11, scope: !93) +!110 = !DILocation(line: 34, column: 13, scope: !93) +!111 = !DILocation(line: 35, column: 15, scope: !93) +!112 = !DILocation(line: 35, column: 8, scope: !93) +!113 = !DILocation(line: 35, column: 5, scope: !93) +!114 = !DILocation(line: 35, column: 11, scope: !93) +!115 = !DILocation(line: 35, column: 13, scope: !93) +!116 = !DILocation(line: 36, column: 26, scope: !93) +!117 = !DILocation(line: 36, column: 23, scope: !93) +!118 = !DILocation(line: 36, column: 29, scope: !93) +!119 = !DILocation(line: 36, column: 37, scope: !93) +!120 = !DILocation(line: 36, column: 34, scope: !93) +!121 = !DILocation(line: 36, column: 40, scope: !93) +!122 = !DILocation(line: 36, column: 31, scope: !93) +!123 = !DILocation(line: 36, column: 5, scope: !93) +!124 = !DILocation(line: 38, column: 18, scope: !93) +!125 = !DILocation(line: 38, column: 5, scope: !93) +!126 = !DILocation(line: 40, column: 5, scope: !93) +!127 = distinct !DISubprogram(name: "main", scope: !14, file: !14, line: 43, type: !128, scopeLine: 44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!128 = !DISubroutineType(types: !129) +!129 = !{!20} +!130 = !DILocalVariable(name: "t", scope: !127, file: !14, line: 45, type: !26) +!131 = !DILocation(line: 45, column: 15, scope: !127) +!132 = !DILocation(line: 46, column: 5, scope: !127) +!133 = !DILocation(line: 48, column: 5, scope: !127) diff --git a/dartagnan/src/test/resources/interrupts/c_disable_v1.ll b/dartagnan/src/test/resources/interrupts/c_disable_v1.ll new file mode 100644 index 0000000000..c4a7c9ac5d --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c_disable_v1.ll @@ -0,0 +1,283 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c_disable_v1.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c_disable_v1.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct.A = type { i32, i32 } +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@cnt = global i32 0, align 4, !dbg !0 +@as = global [10 x %struct.A] zeroinitializer, align 4, !dbg !12 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !24 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !60 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !64, metadata !DIExpression()), !dbg !65 + call void @llvm.dbg.declare(metadata i32* %3, metadata !66, metadata !DIExpression()), !dbg !67 + %5 = load i8*, i8** %2, align 8, !dbg !68 + %6 = ptrtoint i8* %5 to i64, !dbg !69 + %7 = trunc i64 %6 to i32, !dbg !70 + store i32 %7, i32* %3, align 4, !dbg !67 + call void @__VERIFIER_disable_irq(), !dbg !71 + call void @llvm.dbg.declare(metadata i32* %4, metadata !72, metadata !DIExpression()), !dbg !73 + %8 = load i32, i32* @cnt, align 4, !dbg !74 + %9 = add nsw i32 %8, 1, !dbg !74 + store i32 %9, i32* @cnt, align 4, !dbg !74 + store i32 %8, i32* %4, align 4, !dbg !73 + call void @__VERIFIER_enable_irq(), !dbg !75 + %10 = load i32, i32* %3, align 4, !dbg !76 + %11 = load i32, i32* %4, align 4, !dbg !77 + %12 = sext i32 %11 to i64, !dbg !78 + %13 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %12, !dbg !78 + %14 = getelementptr inbounds %struct.A, %struct.A* %13, i32 0, i32 0, !dbg !79 + store volatile i32 %10, i32* %14, align 4, !dbg !80 + %15 = load i32, i32* %3, align 4, !dbg !81 + %16 = load i32, i32* %4, align 4, !dbg !82 + %17 = sext i32 %16 to i64, !dbg !83 + %18 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %17, !dbg !83 + %19 = getelementptr inbounds %struct.A, %struct.A* %18, i32 0, i32 1, !dbg !84 + store volatile i32 %15, i32* %19, align 4, !dbg !85 + %20 = load i32, i32* %4, align 4, !dbg !86 + %21 = sext i32 %20 to i64, !dbg !87 + %22 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %21, !dbg !87 + %23 = getelementptr inbounds %struct.A, %struct.A* %22, i32 0, i32 0, !dbg !88 + %24 = load volatile i32, i32* %23, align 4, !dbg !88 + %25 = load i32, i32* %4, align 4, !dbg !89 + %26 = sext i32 %25 to i64, !dbg !90 + %27 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %26, !dbg !90 + %28 = getelementptr inbounds %struct.A, %struct.A* %27, i32 0, i32 1, !dbg !91 + %29 = load volatile i32, i32* %28, align 4, !dbg !91 + %30 = icmp eq i32 %24, %29, !dbg !92 + %31 = zext i1 %30 to i32, !dbg !92 + call void @__VERIFIER_assert(i32 noundef %31), !dbg !93 + ret i8* null, !dbg !94 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__VERIFIER_disable_irq() #2 + +declare void @__VERIFIER_enable_irq() #2 + +declare void @__VERIFIER_assert(i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @run(i8* noundef %0) #0 !dbg !95 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !96, metadata !DIExpression()), !dbg !97 + call void @__VERIFIER_make_interrupt_handler(), !dbg !98 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !99 + call void @llvm.dbg.declare(metadata i32* %3, metadata !100, metadata !DIExpression()), !dbg !101 + %6 = load i8*, i8** %2, align 8, !dbg !102 + %7 = ptrtoint i8* %6 to i64, !dbg !103 + %8 = trunc i64 %7 to i32, !dbg !104 + store i32 %8, i32* %3, align 4, !dbg !101 + call void @__VERIFIER_disable_irq(), !dbg !105 + call void @llvm.dbg.declare(metadata i32* %4, metadata !106, metadata !DIExpression()), !dbg !107 + %9 = load i32, i32* @cnt, align 4, !dbg !108 + %10 = add nsw i32 %9, 1, !dbg !108 + store i32 %10, i32* @cnt, align 4, !dbg !108 + store i32 %9, i32* %4, align 4, !dbg !107 + call void @__VERIFIER_enable_irq(), !dbg !109 + %11 = load i32, i32* %3, align 4, !dbg !110 + %12 = load i32, i32* %4, align 4, !dbg !111 + %13 = sext i32 %12 to i64, !dbg !112 + %14 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %13, !dbg !112 + %15 = getelementptr inbounds %struct.A, %struct.A* %14, i32 0, i32 0, !dbg !113 + store volatile i32 %11, i32* %15, align 4, !dbg !114 + %16 = load i32, i32* %3, align 4, !dbg !115 + %17 = load i32, i32* %4, align 4, !dbg !116 + %18 = sext i32 %17 to i64, !dbg !117 + %19 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %18, !dbg !117 + %20 = getelementptr inbounds %struct.A, %struct.A* %19, i32 0, i32 1, !dbg !118 + store volatile i32 %16, i32* %20, align 4, !dbg !119 + %21 = load i32, i32* %4, align 4, !dbg !120 + %22 = sext i32 %21 to i64, !dbg !121 + %23 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %22, !dbg !121 + %24 = getelementptr inbounds %struct.A, %struct.A* %23, i32 0, i32 0, !dbg !122 + %25 = load volatile i32, i32* %24, align 4, !dbg !122 + %26 = load i32, i32* %4, align 4, !dbg !123 + %27 = sext i32 %26 to i64, !dbg !124 + %28 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %27, !dbg !124 + %29 = getelementptr inbounds %struct.A, %struct.A* %28, i32 0, i32 1, !dbg !125 + %30 = load volatile i32, i32* %29, align 4, !dbg !125 + %31 = icmp eq i32 %25, %30, !dbg !126 + %32 = zext i1 %31 to i32, !dbg !126 + call void @__VERIFIER_assert(i32 noundef %32), !dbg !127 + %33 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !128 + %34 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %33, i8** noundef null), !dbg !129 + ret i8* null, !dbg !130 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !131 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !134, metadata !DIExpression()), !dbg !135 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)), !dbg !136 + ret i32 0, !dbg !137 +} + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!49, !50, !51, !52, !53, !54, !55, !56, !57, !58} +!llvm.ident = !{!59} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !14, line: 13, type: !20, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !11, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c_disable_v1.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5, !10} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 32, baseType: !7) +!6 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_types/_intptr_t.h", directory: "") +!7 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_intptr_t", file: !8, line: 27, baseType: !9) +!8 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/arm/_types.h", directory: "") +!9 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!11 = !{!0, !12, !24} +!12 = !DIGlobalVariableExpression(var: !13, expr: !DIExpression()) +!13 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !14, line: 12, type: !15, isLocal: false, isDefinition: true) +!14 = !DIFile(filename: "benchmarks/interrupts/c_disable_v1.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!15 = !DICompositeType(tag: DW_TAG_array_type, baseType: !16, size: 640, elements: !22) +!16 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !14, line: 11, size: 64, elements: !17) +!17 = !{!18, !21} +!18 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !16, file: !14, line: 11, baseType: !19, size: 32) +!19 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !20) +!20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!21 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !16, file: !14, line: 11, baseType: !19, size: 32, offset: 32) +!22 = !{!23} +!23 = !DISubrange(count: 10) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !14, line: 15, type: !26, isLocal: false, isDefinition: true) +!26 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !27, line: 31, baseType: !28) +!27 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!28 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !29, line: 118, baseType: !30) +!29 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!30 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !31, size: 64) +!31 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !29, line: 103, size: 65536, elements: !32) +!32 = !{!33, !34, !44} +!33 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !31, file: !29, line: 104, baseType: !9, size: 64) +!34 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !31, file: !29, line: 105, baseType: !35, size: 64, offset: 64) +!35 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !36, size: 64) +!36 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !29, line: 57, size: 192, elements: !37) +!37 = !{!38, !42, !43} +!38 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !36, file: !29, line: 58, baseType: !39, size: 64) +!39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !40, size: 64) +!40 = !DISubroutineType(types: !41) +!41 = !{null, !10} +!42 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !36, file: !29, line: 59, baseType: !10, size: 64, offset: 64) +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !36, file: !29, line: 60, baseType: !35, size: 64, offset: 128) +!44 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !31, file: !29, line: 106, baseType: !45, size: 65408, offset: 128) +!45 = !DICompositeType(tag: DW_TAG_array_type, baseType: !46, size: 65408, elements: !47) +!46 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!47 = !{!48} +!48 = !DISubrange(count: 8176) +!49 = !{i32 7, !"Dwarf Version", i32 4} +!50 = !{i32 2, !"Debug Info Version", i32 3} +!51 = !{i32 1, !"wchar_size", i32 4} +!52 = !{i32 1, !"branch-target-enforcement", i32 0} +!53 = !{i32 1, !"sign-return-address", i32 0} +!54 = !{i32 1, !"sign-return-address-all", i32 0} +!55 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!56 = !{i32 7, !"PIC Level", i32 2} +!57 = !{i32 7, !"uwtable", i32 1} +!58 = !{i32 7, !"frame-pointer", i32 1} +!59 = !{!"Homebrew clang version 14.0.6"} +!60 = distinct !DISubprogram(name: "handler", scope: !14, file: !14, line: 16, type: !61, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!61 = !DISubroutineType(types: !62) +!62 = !{!10, !10} +!63 = !{} +!64 = !DILocalVariable(name: "arg", arg: 1, scope: !60, file: !14, line: 16, type: !10) +!65 = !DILocation(line: 16, column: 21, scope: !60) +!66 = !DILocalVariable(name: "tindex", scope: !60, file: !14, line: 18, type: !20) +!67 = !DILocation(line: 18, column: 9, scope: !60) +!68 = !DILocation(line: 18, column: 30, scope: !60) +!69 = !DILocation(line: 18, column: 19, scope: !60) +!70 = !DILocation(line: 18, column: 18, scope: !60) +!71 = !DILocation(line: 19, column: 5, scope: !60) +!72 = !DILocalVariable(name: "i", scope: !60, file: !14, line: 20, type: !20) +!73 = !DILocation(line: 20, column: 9, scope: !60) +!74 = !DILocation(line: 20, column: 16, scope: !60) +!75 = !DILocation(line: 21, column: 5, scope: !60) +!76 = !DILocation(line: 22, column: 15, scope: !60) +!77 = !DILocation(line: 22, column: 8, scope: !60) +!78 = !DILocation(line: 22, column: 5, scope: !60) +!79 = !DILocation(line: 22, column: 11, scope: !60) +!80 = !DILocation(line: 22, column: 13, scope: !60) +!81 = !DILocation(line: 23, column: 15, scope: !60) +!82 = !DILocation(line: 23, column: 8, scope: !60) +!83 = !DILocation(line: 23, column: 5, scope: !60) +!84 = !DILocation(line: 23, column: 11, scope: !60) +!85 = !DILocation(line: 23, column: 13, scope: !60) +!86 = !DILocation(line: 24, column: 26, scope: !60) +!87 = !DILocation(line: 24, column: 23, scope: !60) +!88 = !DILocation(line: 24, column: 29, scope: !60) +!89 = !DILocation(line: 24, column: 37, scope: !60) +!90 = !DILocation(line: 24, column: 34, scope: !60) +!91 = !DILocation(line: 24, column: 40, scope: !60) +!92 = !DILocation(line: 24, column: 31, scope: !60) +!93 = !DILocation(line: 24, column: 5, scope: !60) +!94 = !DILocation(line: 26, column: 5, scope: !60) +!95 = distinct !DISubprogram(name: "run", scope: !14, file: !14, line: 29, type: !61, scopeLine: 30, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!96 = !DILocalVariable(name: "arg", arg: 1, scope: !95, file: !14, line: 29, type: !10) +!97 = !DILocation(line: 29, column: 17, scope: !95) +!98 = !DILocation(line: 31, column: 5, scope: !95) +!99 = !DILocation(line: 32, column: 5, scope: !95) +!100 = !DILocalVariable(name: "tindex", scope: !95, file: !14, line: 34, type: !20) +!101 = !DILocation(line: 34, column: 9, scope: !95) +!102 = !DILocation(line: 34, column: 30, scope: !95) +!103 = !DILocation(line: 34, column: 19, scope: !95) +!104 = !DILocation(line: 34, column: 18, scope: !95) +!105 = !DILocation(line: 35, column: 5, scope: !95) +!106 = !DILocalVariable(name: "i", scope: !95, file: !14, line: 36, type: !20) +!107 = !DILocation(line: 36, column: 9, scope: !95) +!108 = !DILocation(line: 36, column: 16, scope: !95) +!109 = !DILocation(line: 37, column: 5, scope: !95) +!110 = !DILocation(line: 38, column: 15, scope: !95) +!111 = !DILocation(line: 38, column: 8, scope: !95) +!112 = !DILocation(line: 38, column: 5, scope: !95) +!113 = !DILocation(line: 38, column: 11, scope: !95) +!114 = !DILocation(line: 38, column: 13, scope: !95) +!115 = !DILocation(line: 39, column: 15, scope: !95) +!116 = !DILocation(line: 39, column: 8, scope: !95) +!117 = !DILocation(line: 39, column: 5, scope: !95) +!118 = !DILocation(line: 39, column: 11, scope: !95) +!119 = !DILocation(line: 39, column: 13, scope: !95) +!120 = !DILocation(line: 40, column: 26, scope: !95) +!121 = !DILocation(line: 40, column: 23, scope: !95) +!122 = !DILocation(line: 40, column: 29, scope: !95) +!123 = !DILocation(line: 40, column: 37, scope: !95) +!124 = !DILocation(line: 40, column: 34, scope: !95) +!125 = !DILocation(line: 40, column: 40, scope: !95) +!126 = !DILocation(line: 40, column: 31, scope: !95) +!127 = !DILocation(line: 40, column: 5, scope: !95) +!128 = !DILocation(line: 42, column: 18, scope: !95) +!129 = !DILocation(line: 42, column: 5, scope: !95) +!130 = !DILocation(line: 44, column: 5, scope: !95) +!131 = distinct !DISubprogram(name: "main", scope: !14, file: !14, line: 47, type: !132, scopeLine: 48, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!132 = !DISubroutineType(types: !133) +!133 = !{!20} +!134 = !DILocalVariable(name: "t", scope: !131, file: !14, line: 49, type: !26) +!135 = !DILocation(line: 49, column: 15, scope: !131) +!136 = !DILocation(line: 50, column: 5, scope: !131) +!137 = !DILocation(line: 52, column: 5, scope: !131) diff --git a/dartagnan/src/test/resources/interrupts/c_disable_v2.ll b/dartagnan/src/test/resources/interrupts/c_disable_v2.ll new file mode 100644 index 0000000000..642d4719e1 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c_disable_v2.ll @@ -0,0 +1,283 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c_disable_v2.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c_disable_v2.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct.A = type { i32, i32 } +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@cnt = global i32 0, align 4, !dbg !0 +@as = global [10 x %struct.A] zeroinitializer, align 4, !dbg !12 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !24 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !60 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !64, metadata !DIExpression()), !dbg !65 + call void @llvm.dbg.declare(metadata i32* %3, metadata !66, metadata !DIExpression()), !dbg !67 + %5 = load i8*, i8** %2, align 8, !dbg !68 + %6 = ptrtoint i8* %5 to i64, !dbg !69 + %7 = trunc i64 %6 to i32, !dbg !70 + store i32 %7, i32* %3, align 4, !dbg !67 + call void @__VERIFIER_disable_irq(), !dbg !71 + call void @llvm.dbg.declare(metadata i32* %4, metadata !72, metadata !DIExpression()), !dbg !73 + %8 = load i32, i32* @cnt, align 4, !dbg !74 + %9 = add nsw i32 %8, 1, !dbg !74 + store i32 %9, i32* @cnt, align 4, !dbg !74 + store i32 %8, i32* %4, align 4, !dbg !73 + %10 = load i32, i32* %3, align 4, !dbg !75 + %11 = load i32, i32* %4, align 4, !dbg !76 + %12 = sext i32 %11 to i64, !dbg !77 + %13 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %12, !dbg !77 + %14 = getelementptr inbounds %struct.A, %struct.A* %13, i32 0, i32 0, !dbg !78 + store volatile i32 %10, i32* %14, align 4, !dbg !79 + %15 = load i32, i32* %3, align 4, !dbg !80 + %16 = load i32, i32* %4, align 4, !dbg !81 + %17 = sext i32 %16 to i64, !dbg !82 + %18 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %17, !dbg !82 + %19 = getelementptr inbounds %struct.A, %struct.A* %18, i32 0, i32 1, !dbg !83 + store volatile i32 %15, i32* %19, align 4, !dbg !84 + call void @__VERIFIER_enable_irq(), !dbg !85 + %20 = load i32, i32* %4, align 4, !dbg !86 + %21 = sext i32 %20 to i64, !dbg !87 + %22 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %21, !dbg !87 + %23 = getelementptr inbounds %struct.A, %struct.A* %22, i32 0, i32 0, !dbg !88 + %24 = load volatile i32, i32* %23, align 4, !dbg !88 + %25 = load i32, i32* %4, align 4, !dbg !89 + %26 = sext i32 %25 to i64, !dbg !90 + %27 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %26, !dbg !90 + %28 = getelementptr inbounds %struct.A, %struct.A* %27, i32 0, i32 1, !dbg !91 + %29 = load volatile i32, i32* %28, align 4, !dbg !91 + %30 = icmp eq i32 %24, %29, !dbg !92 + %31 = zext i1 %30 to i32, !dbg !92 + call void @__VERIFIER_assert(i32 noundef %31), !dbg !93 + ret i8* null, !dbg !94 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__VERIFIER_disable_irq() #2 + +declare void @__VERIFIER_enable_irq() #2 + +declare void @__VERIFIER_assert(i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @run(i8* noundef %0) #0 !dbg !95 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !96, metadata !DIExpression()), !dbg !97 + call void @__VERIFIER_make_interrupt_handler(), !dbg !98 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !99 + call void @llvm.dbg.declare(metadata i32* %3, metadata !100, metadata !DIExpression()), !dbg !101 + %6 = load i8*, i8** %2, align 8, !dbg !102 + %7 = ptrtoint i8* %6 to i64, !dbg !103 + %8 = trunc i64 %7 to i32, !dbg !104 + store i32 %8, i32* %3, align 4, !dbg !101 + call void @__VERIFIER_disable_irq(), !dbg !105 + call void @llvm.dbg.declare(metadata i32* %4, metadata !106, metadata !DIExpression()), !dbg !107 + %9 = load i32, i32* @cnt, align 4, !dbg !108 + %10 = add nsw i32 %9, 1, !dbg !108 + store i32 %10, i32* @cnt, align 4, !dbg !108 + store i32 %9, i32* %4, align 4, !dbg !107 + %11 = load i32, i32* %3, align 4, !dbg !109 + %12 = load i32, i32* %4, align 4, !dbg !110 + %13 = sext i32 %12 to i64, !dbg !111 + %14 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %13, !dbg !111 + %15 = getelementptr inbounds %struct.A, %struct.A* %14, i32 0, i32 0, !dbg !112 + store volatile i32 %11, i32* %15, align 4, !dbg !113 + %16 = load i32, i32* %3, align 4, !dbg !114 + %17 = load i32, i32* %4, align 4, !dbg !115 + %18 = sext i32 %17 to i64, !dbg !116 + %19 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %18, !dbg !116 + %20 = getelementptr inbounds %struct.A, %struct.A* %19, i32 0, i32 1, !dbg !117 + store volatile i32 %16, i32* %20, align 4, !dbg !118 + call void @__VERIFIER_enable_irq(), !dbg !119 + %21 = load i32, i32* %4, align 4, !dbg !120 + %22 = sext i32 %21 to i64, !dbg !121 + %23 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %22, !dbg !121 + %24 = getelementptr inbounds %struct.A, %struct.A* %23, i32 0, i32 0, !dbg !122 + %25 = load volatile i32, i32* %24, align 4, !dbg !122 + %26 = load i32, i32* %4, align 4, !dbg !123 + %27 = sext i32 %26 to i64, !dbg !124 + %28 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %27, !dbg !124 + %29 = getelementptr inbounds %struct.A, %struct.A* %28, i32 0, i32 1, !dbg !125 + %30 = load volatile i32, i32* %29, align 4, !dbg !125 + %31 = icmp eq i32 %25, %30, !dbg !126 + %32 = zext i1 %31 to i32, !dbg !126 + call void @__VERIFIER_assert(i32 noundef %32), !dbg !127 + %33 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !128 + %34 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %33, i8** noundef null), !dbg !129 + ret i8* null, !dbg !130 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !131 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !134, metadata !DIExpression()), !dbg !135 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)), !dbg !136 + ret i32 0, !dbg !137 +} + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!49, !50, !51, !52, !53, !54, !55, !56, !57, !58} +!llvm.ident = !{!59} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !14, line: 13, type: !20, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !11, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c_disable_v2.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5, !10} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 32, baseType: !7) +!6 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_types/_intptr_t.h", directory: "") +!7 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_intptr_t", file: !8, line: 27, baseType: !9) +!8 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/arm/_types.h", directory: "") +!9 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!11 = !{!0, !12, !24} +!12 = !DIGlobalVariableExpression(var: !13, expr: !DIExpression()) +!13 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !14, line: 12, type: !15, isLocal: false, isDefinition: true) +!14 = !DIFile(filename: "benchmarks/interrupts/c_disable_v2.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!15 = !DICompositeType(tag: DW_TAG_array_type, baseType: !16, size: 640, elements: !22) +!16 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !14, line: 11, size: 64, elements: !17) +!17 = !{!18, !21} +!18 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !16, file: !14, line: 11, baseType: !19, size: 32) +!19 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !20) +!20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!21 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !16, file: !14, line: 11, baseType: !19, size: 32, offset: 32) +!22 = !{!23} +!23 = !DISubrange(count: 10) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !14, line: 15, type: !26, isLocal: false, isDefinition: true) +!26 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !27, line: 31, baseType: !28) +!27 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!28 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !29, line: 118, baseType: !30) +!29 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!30 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !31, size: 64) +!31 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !29, line: 103, size: 65536, elements: !32) +!32 = !{!33, !34, !44} +!33 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !31, file: !29, line: 104, baseType: !9, size: 64) +!34 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !31, file: !29, line: 105, baseType: !35, size: 64, offset: 64) +!35 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !36, size: 64) +!36 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !29, line: 57, size: 192, elements: !37) +!37 = !{!38, !42, !43} +!38 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !36, file: !29, line: 58, baseType: !39, size: 64) +!39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !40, size: 64) +!40 = !DISubroutineType(types: !41) +!41 = !{null, !10} +!42 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !36, file: !29, line: 59, baseType: !10, size: 64, offset: 64) +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !36, file: !29, line: 60, baseType: !35, size: 64, offset: 128) +!44 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !31, file: !29, line: 106, baseType: !45, size: 65408, offset: 128) +!45 = !DICompositeType(tag: DW_TAG_array_type, baseType: !46, size: 65408, elements: !47) +!46 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!47 = !{!48} +!48 = !DISubrange(count: 8176) +!49 = !{i32 7, !"Dwarf Version", i32 4} +!50 = !{i32 2, !"Debug Info Version", i32 3} +!51 = !{i32 1, !"wchar_size", i32 4} +!52 = !{i32 1, !"branch-target-enforcement", i32 0} +!53 = !{i32 1, !"sign-return-address", i32 0} +!54 = !{i32 1, !"sign-return-address-all", i32 0} +!55 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!56 = !{i32 7, !"PIC Level", i32 2} +!57 = !{i32 7, !"uwtable", i32 1} +!58 = !{i32 7, !"frame-pointer", i32 1} +!59 = !{!"Homebrew clang version 14.0.6"} +!60 = distinct !DISubprogram(name: "handler", scope: !14, file: !14, line: 16, type: !61, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!61 = !DISubroutineType(types: !62) +!62 = !{!10, !10} +!63 = !{} +!64 = !DILocalVariable(name: "arg", arg: 1, scope: !60, file: !14, line: 16, type: !10) +!65 = !DILocation(line: 16, column: 21, scope: !60) +!66 = !DILocalVariable(name: "tindex", scope: !60, file: !14, line: 18, type: !20) +!67 = !DILocation(line: 18, column: 9, scope: !60) +!68 = !DILocation(line: 18, column: 30, scope: !60) +!69 = !DILocation(line: 18, column: 19, scope: !60) +!70 = !DILocation(line: 18, column: 18, scope: !60) +!71 = !DILocation(line: 19, column: 5, scope: !60) +!72 = !DILocalVariable(name: "i", scope: !60, file: !14, line: 20, type: !20) +!73 = !DILocation(line: 20, column: 9, scope: !60) +!74 = !DILocation(line: 20, column: 16, scope: !60) +!75 = !DILocation(line: 21, column: 15, scope: !60) +!76 = !DILocation(line: 21, column: 8, scope: !60) +!77 = !DILocation(line: 21, column: 5, scope: !60) +!78 = !DILocation(line: 21, column: 11, scope: !60) +!79 = !DILocation(line: 21, column: 13, scope: !60) +!80 = !DILocation(line: 22, column: 15, scope: !60) +!81 = !DILocation(line: 22, column: 8, scope: !60) +!82 = !DILocation(line: 22, column: 5, scope: !60) +!83 = !DILocation(line: 22, column: 11, scope: !60) +!84 = !DILocation(line: 22, column: 13, scope: !60) +!85 = !DILocation(line: 23, column: 5, scope: !60) +!86 = !DILocation(line: 24, column: 26, scope: !60) +!87 = !DILocation(line: 24, column: 23, scope: !60) +!88 = !DILocation(line: 24, column: 29, scope: !60) +!89 = !DILocation(line: 24, column: 37, scope: !60) +!90 = !DILocation(line: 24, column: 34, scope: !60) +!91 = !DILocation(line: 24, column: 40, scope: !60) +!92 = !DILocation(line: 24, column: 31, scope: !60) +!93 = !DILocation(line: 24, column: 5, scope: !60) +!94 = !DILocation(line: 26, column: 5, scope: !60) +!95 = distinct !DISubprogram(name: "run", scope: !14, file: !14, line: 29, type: !61, scopeLine: 30, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!96 = !DILocalVariable(name: "arg", arg: 1, scope: !95, file: !14, line: 29, type: !10) +!97 = !DILocation(line: 29, column: 17, scope: !95) +!98 = !DILocation(line: 31, column: 5, scope: !95) +!99 = !DILocation(line: 32, column: 5, scope: !95) +!100 = !DILocalVariable(name: "tindex", scope: !95, file: !14, line: 34, type: !20) +!101 = !DILocation(line: 34, column: 9, scope: !95) +!102 = !DILocation(line: 34, column: 30, scope: !95) +!103 = !DILocation(line: 34, column: 19, scope: !95) +!104 = !DILocation(line: 34, column: 18, scope: !95) +!105 = !DILocation(line: 35, column: 5, scope: !95) +!106 = !DILocalVariable(name: "i", scope: !95, file: !14, line: 36, type: !20) +!107 = !DILocation(line: 36, column: 9, scope: !95) +!108 = !DILocation(line: 36, column: 16, scope: !95) +!109 = !DILocation(line: 37, column: 15, scope: !95) +!110 = !DILocation(line: 37, column: 8, scope: !95) +!111 = !DILocation(line: 37, column: 5, scope: !95) +!112 = !DILocation(line: 37, column: 11, scope: !95) +!113 = !DILocation(line: 37, column: 13, scope: !95) +!114 = !DILocation(line: 38, column: 15, scope: !95) +!115 = !DILocation(line: 38, column: 8, scope: !95) +!116 = !DILocation(line: 38, column: 5, scope: !95) +!117 = !DILocation(line: 38, column: 11, scope: !95) +!118 = !DILocation(line: 38, column: 13, scope: !95) +!119 = !DILocation(line: 39, column: 5, scope: !95) +!120 = !DILocation(line: 40, column: 26, scope: !95) +!121 = !DILocation(line: 40, column: 23, scope: !95) +!122 = !DILocation(line: 40, column: 29, scope: !95) +!123 = !DILocation(line: 40, column: 37, scope: !95) +!124 = !DILocation(line: 40, column: 34, scope: !95) +!125 = !DILocation(line: 40, column: 40, scope: !95) +!126 = !DILocation(line: 40, column: 31, scope: !95) +!127 = !DILocation(line: 40, column: 5, scope: !95) +!128 = !DILocation(line: 42, column: 18, scope: !95) +!129 = !DILocation(line: 42, column: 5, scope: !95) +!130 = !DILocation(line: 44, column: 5, scope: !95) +!131 = distinct !DISubprogram(name: "main", scope: !14, file: !14, line: 47, type: !132, scopeLine: 48, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!132 = !DISubroutineType(types: !133) +!133 = !{!20} +!134 = !DILocalVariable(name: "t", scope: !131, file: !14, line: 49, type: !26) +!135 = !DILocation(line: 49, column: 15, scope: !131) +!136 = !DILocation(line: 50, column: 5, scope: !131) +!137 = !DILocation(line: 52, column: 5, scope: !131) diff --git a/dartagnan/src/test/resources/interrupts/c_disable_v3.ll b/dartagnan/src/test/resources/interrupts/c_disable_v3.ll new file mode 100644 index 0000000000..bb24ad7378 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/c_disable_v3.ll @@ -0,0 +1,283 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c_disable_v3.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c_disable_v3.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct.A = type { i32, i32 } +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@cnt = global i32 0, align 4, !dbg !0 +@as = global [10 x %struct.A] zeroinitializer, align 4, !dbg !12 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !24 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !60 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !64, metadata !DIExpression()), !dbg !65 + call void @llvm.dbg.declare(metadata i32* %3, metadata !66, metadata !DIExpression()), !dbg !67 + %5 = load i8*, i8** %2, align 8, !dbg !68 + %6 = ptrtoint i8* %5 to i64, !dbg !69 + %7 = trunc i64 %6 to i32, !dbg !70 + store i32 %7, i32* %3, align 4, !dbg !67 + call void @__VERIFIER_disable_irq(), !dbg !71 + call void @llvm.dbg.declare(metadata i32* %4, metadata !72, metadata !DIExpression()), !dbg !73 + %8 = load i32, i32* @cnt, align 4, !dbg !74 + %9 = add nsw i32 %8, 1, !dbg !74 + store i32 %9, i32* @cnt, align 4, !dbg !74 + store i32 %8, i32* %4, align 4, !dbg !73 + %10 = load i32, i32* %3, align 4, !dbg !75 + %11 = load i32, i32* %4, align 4, !dbg !76 + %12 = sext i32 %11 to i64, !dbg !77 + %13 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %12, !dbg !77 + %14 = getelementptr inbounds %struct.A, %struct.A* %13, i32 0, i32 0, !dbg !78 + store volatile i32 %10, i32* %14, align 4, !dbg !79 + %15 = load i32, i32* %3, align 4, !dbg !80 + %16 = load i32, i32* %4, align 4, !dbg !81 + %17 = sext i32 %16 to i64, !dbg !82 + %18 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %17, !dbg !82 + %19 = getelementptr inbounds %struct.A, %struct.A* %18, i32 0, i32 1, !dbg !83 + store volatile i32 %15, i32* %19, align 4, !dbg !84 + %20 = load i32, i32* %4, align 4, !dbg !85 + %21 = sext i32 %20 to i64, !dbg !86 + %22 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %21, !dbg !86 + %23 = getelementptr inbounds %struct.A, %struct.A* %22, i32 0, i32 0, !dbg !87 + %24 = load volatile i32, i32* %23, align 4, !dbg !87 + %25 = load i32, i32* %4, align 4, !dbg !88 + %26 = sext i32 %25 to i64, !dbg !89 + %27 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %26, !dbg !89 + %28 = getelementptr inbounds %struct.A, %struct.A* %27, i32 0, i32 1, !dbg !90 + %29 = load volatile i32, i32* %28, align 4, !dbg !90 + %30 = icmp eq i32 %24, %29, !dbg !91 + %31 = zext i1 %30 to i32, !dbg !91 + call void @__VERIFIER_assert(i32 noundef %31), !dbg !92 + call void @__VERIFIER_enable_irq(), !dbg !93 + ret i8* null, !dbg !94 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__VERIFIER_disable_irq() #2 + +declare void @__VERIFIER_assert(i32 noundef) #2 + +declare void @__VERIFIER_enable_irq() #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @run(i8* noundef %0) #0 !dbg !95 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !96, metadata !DIExpression()), !dbg !97 + call void @__VERIFIER_make_interrupt_handler(), !dbg !98 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !99 + call void @llvm.dbg.declare(metadata i32* %3, metadata !100, metadata !DIExpression()), !dbg !101 + %6 = load i8*, i8** %2, align 8, !dbg !102 + %7 = ptrtoint i8* %6 to i64, !dbg !103 + %8 = trunc i64 %7 to i32, !dbg !104 + store i32 %8, i32* %3, align 4, !dbg !101 + call void @__VERIFIER_disable_irq(), !dbg !105 + call void @llvm.dbg.declare(metadata i32* %4, metadata !106, metadata !DIExpression()), !dbg !107 + %9 = load i32, i32* @cnt, align 4, !dbg !108 + %10 = add nsw i32 %9, 1, !dbg !108 + store i32 %10, i32* @cnt, align 4, !dbg !108 + store i32 %9, i32* %4, align 4, !dbg !107 + %11 = load i32, i32* %3, align 4, !dbg !109 + %12 = load i32, i32* %4, align 4, !dbg !110 + %13 = sext i32 %12 to i64, !dbg !111 + %14 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %13, !dbg !111 + %15 = getelementptr inbounds %struct.A, %struct.A* %14, i32 0, i32 0, !dbg !112 + store volatile i32 %11, i32* %15, align 4, !dbg !113 + %16 = load i32, i32* %3, align 4, !dbg !114 + %17 = load i32, i32* %4, align 4, !dbg !115 + %18 = sext i32 %17 to i64, !dbg !116 + %19 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %18, !dbg !116 + %20 = getelementptr inbounds %struct.A, %struct.A* %19, i32 0, i32 1, !dbg !117 + store volatile i32 %16, i32* %20, align 4, !dbg !118 + %21 = load i32, i32* %4, align 4, !dbg !119 + %22 = sext i32 %21 to i64, !dbg !120 + %23 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %22, !dbg !120 + %24 = getelementptr inbounds %struct.A, %struct.A* %23, i32 0, i32 0, !dbg !121 + %25 = load volatile i32, i32* %24, align 4, !dbg !121 + %26 = load i32, i32* %4, align 4, !dbg !122 + %27 = sext i32 %26 to i64, !dbg !123 + %28 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %27, !dbg !123 + %29 = getelementptr inbounds %struct.A, %struct.A* %28, i32 0, i32 1, !dbg !124 + %30 = load volatile i32, i32* %29, align 4, !dbg !124 + %31 = icmp eq i32 %25, %30, !dbg !125 + %32 = zext i1 %31 to i32, !dbg !125 + call void @__VERIFIER_assert(i32 noundef %32), !dbg !126 + call void @__VERIFIER_enable_irq(), !dbg !127 + %33 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !128 + %34 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %33, i8** noundef null), !dbg !129 + ret i8* null, !dbg !130 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !131 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !134, metadata !DIExpression()), !dbg !135 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)), !dbg !136 + ret i32 0, !dbg !137 +} + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!49, !50, !51, !52, !53, !54, !55, !56, !57, !58} +!llvm.ident = !{!59} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !14, line: 13, type: !20, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !11, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/c_disable_v3.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5, !10} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 32, baseType: !7) +!6 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_types/_intptr_t.h", directory: "") +!7 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_intptr_t", file: !8, line: 27, baseType: !9) +!8 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/arm/_types.h", directory: "") +!9 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!11 = !{!0, !12, !24} +!12 = !DIGlobalVariableExpression(var: !13, expr: !DIExpression()) +!13 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !14, line: 12, type: !15, isLocal: false, isDefinition: true) +!14 = !DIFile(filename: "benchmarks/interrupts/c_disable_v3.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!15 = !DICompositeType(tag: DW_TAG_array_type, baseType: !16, size: 640, elements: !22) +!16 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !14, line: 11, size: 64, elements: !17) +!17 = !{!18, !21} +!18 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !16, file: !14, line: 11, baseType: !19, size: 32) +!19 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !20) +!20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!21 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !16, file: !14, line: 11, baseType: !19, size: 32, offset: 32) +!22 = !{!23} +!23 = !DISubrange(count: 10) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !14, line: 15, type: !26, isLocal: false, isDefinition: true) +!26 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !27, line: 31, baseType: !28) +!27 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!28 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !29, line: 118, baseType: !30) +!29 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!30 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !31, size: 64) +!31 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !29, line: 103, size: 65536, elements: !32) +!32 = !{!33, !34, !44} +!33 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !31, file: !29, line: 104, baseType: !9, size: 64) +!34 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !31, file: !29, line: 105, baseType: !35, size: 64, offset: 64) +!35 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !36, size: 64) +!36 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !29, line: 57, size: 192, elements: !37) +!37 = !{!38, !42, !43} +!38 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !36, file: !29, line: 58, baseType: !39, size: 64) +!39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !40, size: 64) +!40 = !DISubroutineType(types: !41) +!41 = !{null, !10} +!42 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !36, file: !29, line: 59, baseType: !10, size: 64, offset: 64) +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !36, file: !29, line: 60, baseType: !35, size: 64, offset: 128) +!44 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !31, file: !29, line: 106, baseType: !45, size: 65408, offset: 128) +!45 = !DICompositeType(tag: DW_TAG_array_type, baseType: !46, size: 65408, elements: !47) +!46 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!47 = !{!48} +!48 = !DISubrange(count: 8176) +!49 = !{i32 7, !"Dwarf Version", i32 4} +!50 = !{i32 2, !"Debug Info Version", i32 3} +!51 = !{i32 1, !"wchar_size", i32 4} +!52 = !{i32 1, !"branch-target-enforcement", i32 0} +!53 = !{i32 1, !"sign-return-address", i32 0} +!54 = !{i32 1, !"sign-return-address-all", i32 0} +!55 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!56 = !{i32 7, !"PIC Level", i32 2} +!57 = !{i32 7, !"uwtable", i32 1} +!58 = !{i32 7, !"frame-pointer", i32 1} +!59 = !{!"Homebrew clang version 14.0.6"} +!60 = distinct !DISubprogram(name: "handler", scope: !14, file: !14, line: 16, type: !61, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!61 = !DISubroutineType(types: !62) +!62 = !{!10, !10} +!63 = !{} +!64 = !DILocalVariable(name: "arg", arg: 1, scope: !60, file: !14, line: 16, type: !10) +!65 = !DILocation(line: 16, column: 21, scope: !60) +!66 = !DILocalVariable(name: "tindex", scope: !60, file: !14, line: 18, type: !20) +!67 = !DILocation(line: 18, column: 9, scope: !60) +!68 = !DILocation(line: 18, column: 30, scope: !60) +!69 = !DILocation(line: 18, column: 19, scope: !60) +!70 = !DILocation(line: 18, column: 18, scope: !60) +!71 = !DILocation(line: 19, column: 5, scope: !60) +!72 = !DILocalVariable(name: "i", scope: !60, file: !14, line: 20, type: !20) +!73 = !DILocation(line: 20, column: 9, scope: !60) +!74 = !DILocation(line: 20, column: 16, scope: !60) +!75 = !DILocation(line: 21, column: 15, scope: !60) +!76 = !DILocation(line: 21, column: 8, scope: !60) +!77 = !DILocation(line: 21, column: 5, scope: !60) +!78 = !DILocation(line: 21, column: 11, scope: !60) +!79 = !DILocation(line: 21, column: 13, scope: !60) +!80 = !DILocation(line: 22, column: 15, scope: !60) +!81 = !DILocation(line: 22, column: 8, scope: !60) +!82 = !DILocation(line: 22, column: 5, scope: !60) +!83 = !DILocation(line: 22, column: 11, scope: !60) +!84 = !DILocation(line: 22, column: 13, scope: !60) +!85 = !DILocation(line: 23, column: 26, scope: !60) +!86 = !DILocation(line: 23, column: 23, scope: !60) +!87 = !DILocation(line: 23, column: 29, scope: !60) +!88 = !DILocation(line: 23, column: 37, scope: !60) +!89 = !DILocation(line: 23, column: 34, scope: !60) +!90 = !DILocation(line: 23, column: 40, scope: !60) +!91 = !DILocation(line: 23, column: 31, scope: !60) +!92 = !DILocation(line: 23, column: 5, scope: !60) +!93 = !DILocation(line: 24, column: 5, scope: !60) +!94 = !DILocation(line: 26, column: 5, scope: !60) +!95 = distinct !DISubprogram(name: "run", scope: !14, file: !14, line: 29, type: !61, scopeLine: 30, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!96 = !DILocalVariable(name: "arg", arg: 1, scope: !95, file: !14, line: 29, type: !10) +!97 = !DILocation(line: 29, column: 17, scope: !95) +!98 = !DILocation(line: 31, column: 5, scope: !95) +!99 = !DILocation(line: 32, column: 5, scope: !95) +!100 = !DILocalVariable(name: "tindex", scope: !95, file: !14, line: 34, type: !20) +!101 = !DILocation(line: 34, column: 9, scope: !95) +!102 = !DILocation(line: 34, column: 30, scope: !95) +!103 = !DILocation(line: 34, column: 19, scope: !95) +!104 = !DILocation(line: 34, column: 18, scope: !95) +!105 = !DILocation(line: 35, column: 5, scope: !95) +!106 = !DILocalVariable(name: "i", scope: !95, file: !14, line: 36, type: !20) +!107 = !DILocation(line: 36, column: 9, scope: !95) +!108 = !DILocation(line: 36, column: 16, scope: !95) +!109 = !DILocation(line: 37, column: 15, scope: !95) +!110 = !DILocation(line: 37, column: 8, scope: !95) +!111 = !DILocation(line: 37, column: 5, scope: !95) +!112 = !DILocation(line: 37, column: 11, scope: !95) +!113 = !DILocation(line: 37, column: 13, scope: !95) +!114 = !DILocation(line: 38, column: 15, scope: !95) +!115 = !DILocation(line: 38, column: 8, scope: !95) +!116 = !DILocation(line: 38, column: 5, scope: !95) +!117 = !DILocation(line: 38, column: 11, scope: !95) +!118 = !DILocation(line: 38, column: 13, scope: !95) +!119 = !DILocation(line: 39, column: 26, scope: !95) +!120 = !DILocation(line: 39, column: 23, scope: !95) +!121 = !DILocation(line: 39, column: 29, scope: !95) +!122 = !DILocation(line: 39, column: 37, scope: !95) +!123 = !DILocation(line: 39, column: 34, scope: !95) +!124 = !DILocation(line: 39, column: 40, scope: !95) +!125 = !DILocation(line: 39, column: 31, scope: !95) +!126 = !DILocation(line: 39, column: 5, scope: !95) +!127 = !DILocation(line: 40, column: 5, scope: !95) +!128 = !DILocation(line: 42, column: 18, scope: !95) +!129 = !DILocation(line: 42, column: 5, scope: !95) +!130 = !DILocation(line: 44, column: 5, scope: !95) +!131 = distinct !DISubprogram(name: "main", scope: !14, file: !14, line: 47, type: !132, scopeLine: 48, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!132 = !DISubroutineType(types: !133) +!133 = !{!20} +!134 = !DILocalVariable(name: "t", scope: !131, file: !14, line: 49, type: !26) +!135 = !DILocation(line: 49, column: 15, scope: !131) +!136 = !DILocation(line: 50, column: 5, scope: !131) +!137 = !DILocation(line: 52, column: 5, scope: !131) From 35f58f785a13d7d8fc4f019a47c09a713415ca6c Mon Sep 17 00:00:00 2001 From: Thomas Haas Date: Wed, 26 Mar 2025 16:28:40 +0100 Subject: [PATCH 09/33] Updated remaining interrupt tests (mainly LKMM) to use __VERIFIER_assert --- benchmarks/interrupts/interrupt_axiom_v1.c | 2 +- benchmarks/interrupts/interrupt_axiom_v2.c | 2 +- benchmarks/interrupts/lkmm_detour.c | 2 +- benchmarks/interrupts/lkmm_detour_disable.c | 2 +- .../interrupts/lkmm_detour_disable_release.c | 2 +- benchmarks/interrupts/lkmm_oota.c | 2 +- benchmarks/interrupts/lkmm_with_barrier.c | 4 +- benchmarks/interrupts/lkmm_with_barrier_dec.c | 4 +- .../lkmm_with_barrier_dec_barrier.c | 4 +- .../interrupts/lkmm_with_barrier_dec_wmb.c | 4 +- .../interrupts/lkmm_with_barrier_inc_split.c | 4 +- .../lkmm_with_disable_enable_as_barrier.c | 4 +- benchmarks/interrupts/lkmm_without_barrier.c | 4 +- .../dartagnan/llvm/LKMMInterruptsTest.java | 30 +- .../test/resources/interrupts/lkmm_detour.ll | 231 +++++++++++++ .../interrupts/lkmm_detour_disable.ll | 239 ++++++++++++++ .../interrupts/lkmm_detour_disable_release.ll | 239 ++++++++++++++ .../test/resources/interrupts/lkmm_oota.ll | 217 ++++++++++++ .../resources/interrupts/lkmm_with_barrier.ll | 296 +++++++++++++++++ .../interrupts/lkmm_with_barrier_dec.ll | 304 +++++++++++++++++ .../lkmm_with_barrier_dec_barrier.ll | 308 ++++++++++++++++++ .../interrupts/lkmm_with_barrier_dec_wmb.ll | 308 ++++++++++++++++++ .../interrupts/lkmm_with_barrier_inc_split.ll | 300 +++++++++++++++++ .../lkmm_with_disable_enable_as_barrier.ll | 283 ++++++++++++++++ .../interrupts/lkmm_without_barrier.ll | 271 +++++++++++++++ 25 files changed, 3031 insertions(+), 35 deletions(-) create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_detour.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_detour_disable.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_detour_disable_release.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_oota.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_with_barrier.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec_barrier.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec_wmb.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_with_barrier_inc_split.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_with_disable_enable_as_barrier.ll create mode 100644 dartagnan/src/test/resources/interrupts/lkmm_without_barrier.ll diff --git a/benchmarks/interrupts/interrupt_axiom_v1.c b/benchmarks/interrupts/interrupt_axiom_v1.c index 2e935e366d..c4c23e0185 100644 --- a/benchmarks/interrupts/interrupt_axiom_v1.c +++ b/benchmarks/interrupts/interrupt_axiom_v1.c @@ -32,7 +32,7 @@ void *thread_2(void *arg) { if(atomic_load_explicit(&z, memory_order_relaxed) == 1 && atomic_load_explicit(&y, memory_order_relaxed) == 1) { atomic_thread_fence(memory_order_seq_cst); - assert(atomic_load_explicit(&x, memory_order_relaxed) == 1); + __VERIFIER_assert(atomic_load_explicit(&x, memory_order_relaxed) == 1); } return NULL; } diff --git a/benchmarks/interrupts/interrupt_axiom_v2.c b/benchmarks/interrupts/interrupt_axiom_v2.c index f9d92b06aa..ee7fdf2cf7 100644 --- a/benchmarks/interrupts/interrupt_axiom_v2.c +++ b/benchmarks/interrupts/interrupt_axiom_v2.c @@ -32,7 +32,7 @@ void *thread_2(void *arg) { if(atomic_load_explicit(&z, memory_order_relaxed) == 1 && atomic_load_explicit(&y, memory_order_relaxed) == 1) { atomic_thread_fence(memory_order_seq_cst); - assert(atomic_load_explicit(&x, memory_order_relaxed) == 1); + __VERIFIER_assert(atomic_load_explicit(&x, memory_order_relaxed) == 1); } return NULL; } diff --git a/benchmarks/interrupts/lkmm_detour.c b/benchmarks/interrupts/lkmm_detour.c index b60f7fb902..01f319fc04 100644 --- a/benchmarks/interrupts/lkmm_detour.c +++ b/benchmarks/interrupts/lkmm_detour.c @@ -42,7 +42,7 @@ int main() pthread_join(t1, 0); pthread_join(t2, 0); - assert(!(b == 1 && a == 3 && y == 3)); + __VERIFIER_assert(!(b == 1 && a == 3 && y == 3)); return 0; } diff --git a/benchmarks/interrupts/lkmm_detour_disable.c b/benchmarks/interrupts/lkmm_detour_disable.c index 1fd2ce1bda..20386f6935 100644 --- a/benchmarks/interrupts/lkmm_detour_disable.c +++ b/benchmarks/interrupts/lkmm_detour_disable.c @@ -44,7 +44,7 @@ int main() pthread_join(t1, 0); pthread_join(t2, 0); - assert(!(b == 1 && a == 3 && y == 3)); + __VERIFIER_assert(!(b == 1 && a == 3 && y == 3)); return 0; } diff --git a/benchmarks/interrupts/lkmm_detour_disable_release.c b/benchmarks/interrupts/lkmm_detour_disable_release.c index 735ff5200e..eac21acd7a 100644 --- a/benchmarks/interrupts/lkmm_detour_disable_release.c +++ b/benchmarks/interrupts/lkmm_detour_disable_release.c @@ -44,7 +44,7 @@ int main() pthread_join(t1, 0); pthread_join(t2, 0); - assert(!(b == 1 && a == 3 && y == 3)); + __VERIFIER_assert(!(b == 1 && a == 3 && y == 3)); return 0; } diff --git a/benchmarks/interrupts/lkmm_oota.c b/benchmarks/interrupts/lkmm_oota.c index 10c5e1e555..821c45ad5b 100644 --- a/benchmarks/interrupts/lkmm_oota.c +++ b/benchmarks/interrupts/lkmm_oota.c @@ -10,7 +10,7 @@ pthread_t h; void *handler(void *arg) { WRITE_ONCE(z, 3); - assert(READ_ONCE(y) == 0); + __VERIFIER_assert(READ_ONCE(y) == 0); return NULL; } diff --git a/benchmarks/interrupts/lkmm_with_barrier.c b/benchmarks/interrupts/lkmm_with_barrier.c index f0de6d8aa6..d10db45ec0 100644 --- a/benchmarks/interrupts/lkmm_with_barrier.c +++ b/benchmarks/interrupts/lkmm_with_barrier.c @@ -20,7 +20,7 @@ void *handler(void *arg) barrier(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); return NULL; } @@ -35,7 +35,7 @@ void *run(void *arg) barrier(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); pthread_join(h, NULL); diff --git a/benchmarks/interrupts/lkmm_with_barrier_dec.c b/benchmarks/interrupts/lkmm_with_barrier_dec.c index 8d3c884001..5967e6c6e0 100644 --- a/benchmarks/interrupts/lkmm_with_barrier_dec.c +++ b/benchmarks/interrupts/lkmm_with_barrier_dec.c @@ -20,7 +20,7 @@ void *handler(void *arg) barrier(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); cnt--; @@ -37,7 +37,7 @@ void *run(void *arg) barrier(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); cnt--; diff --git a/benchmarks/interrupts/lkmm_with_barrier_dec_barrier.c b/benchmarks/interrupts/lkmm_with_barrier_dec_barrier.c index c31ddb2a60..2111eef38c 100644 --- a/benchmarks/interrupts/lkmm_with_barrier_dec_barrier.c +++ b/benchmarks/interrupts/lkmm_with_barrier_dec_barrier.c @@ -20,7 +20,7 @@ void *handler(void *arg) barrier(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); barrier(); cnt--; @@ -38,7 +38,7 @@ void *run(void *arg) barrier(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); barrier(); cnt--; diff --git a/benchmarks/interrupts/lkmm_with_barrier_dec_wmb.c b/benchmarks/interrupts/lkmm_with_barrier_dec_wmb.c index 119b9d7577..3a23ca40a9 100644 --- a/benchmarks/interrupts/lkmm_with_barrier_dec_wmb.c +++ b/benchmarks/interrupts/lkmm_with_barrier_dec_wmb.c @@ -20,7 +20,7 @@ void *handler(void *arg) barrier(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); smp_wmb(); cnt--; @@ -38,7 +38,7 @@ void *run(void *arg) barrier(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); smp_wmb(); cnt--; diff --git a/benchmarks/interrupts/lkmm_with_barrier_inc_split.c b/benchmarks/interrupts/lkmm_with_barrier_inc_split.c index f92598d6ae..87a290825f 100644 --- a/benchmarks/interrupts/lkmm_with_barrier_inc_split.c +++ b/benchmarks/interrupts/lkmm_with_barrier_inc_split.c @@ -20,7 +20,7 @@ void *handler(void *arg) barrier(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); return NULL; } @@ -36,7 +36,7 @@ void *run(void *arg) cnt = i+1; as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); pthread_join(h, NULL); diff --git a/benchmarks/interrupts/lkmm_with_disable_enable_as_barrier.c b/benchmarks/interrupts/lkmm_with_disable_enable_as_barrier.c index 07b0db1085..7771e43667 100644 --- a/benchmarks/interrupts/lkmm_with_disable_enable_as_barrier.c +++ b/benchmarks/interrupts/lkmm_with_disable_enable_as_barrier.c @@ -21,7 +21,7 @@ void *handler(void *arg) __VERIFIER_enable_irq(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); return NULL; } @@ -37,7 +37,7 @@ void *run(void *arg) __VERIFIER_enable_irq(); as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); pthread_join(h, NULL); diff --git a/benchmarks/interrupts/lkmm_without_barrier.c b/benchmarks/interrupts/lkmm_without_barrier.c index 91dd7b68cb..6f53213fde 100644 --- a/benchmarks/interrupts/lkmm_without_barrier.c +++ b/benchmarks/interrupts/lkmm_without_barrier.c @@ -19,7 +19,7 @@ void *handler(void *arg) int i = cnt++; as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); return NULL; } @@ -33,7 +33,7 @@ void *run(void *arg) int i = cnt++; as[i].a = tindex; as[i].b = tindex; - assert(as[i].a == as[i].b); + __VERIFIER_assert(as[i].a == as[i].b); pthread_join(h, NULL); diff --git a/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/LKMMInterruptsTest.java b/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/LKMMInterruptsTest.java index 8f0c674204..5af2a6ffb1 100644 --- a/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/LKMMInterruptsTest.java +++ b/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/LKMMInterruptsTest.java @@ -47,21 +47,21 @@ protected Provider getWmmProvider() { @Parameterized.Parameters(name = "{index}: {0}, target={1}") public static Iterable data() throws IOException { return Arrays.asList(new Object[][]{ - {"c_disable_v1-opt", LKMM, PASS}, - {"c_disable_v2-opt", LKMM, PASS}, - {"c_disable_v3-opt", LKMM, PASS}, - {"lkmm_detour_disable_release-opt", LKMM, PASS}, - {"lkmm_detour_disable-opt", LKMM, FAIL}, - {"lkmm_detour-opt", LKMM, FAIL}, - {"lkmm_oota-opt", LKMM, PASS}, - // {"lkmm_weak_model-opt", LKMM, PASS}, - {"lkmm_with_barrier_dec_barrier-opt", LKMM, PASS}, - {"lkmm_with_barrier_dec_wmb-opt", LKMM, PASS}, - {"lkmm_with_barrier_dec-opt", LKMM, FAIL}, - {"lkmm_with_barrier-opt", LKMM, PASS}, - {"lkmm_with_barrier_inc_split-opt", LKMM, FAIL}, - {"lkmm_with_disable_enable_as_barrier-opt", LKMM, PASS}, - {"lkmm_without_barrier-opt", LKMM, FAIL}, + {"c_disable_v1", LKMM, PASS}, + {"c_disable_v2", LKMM, PASS}, + {"c_disable_v3", LKMM, PASS}, + {"lkmm_detour_disable_release", LKMM, PASS}, + {"lkmm_detour_disable", LKMM, FAIL}, + {"lkmm_detour", LKMM, FAIL}, + {"lkmm_oota", LKMM, PASS}, + // {"lkmm_weak_model", LKMM, PASS}, + {"lkmm_with_barrier_dec_barrier", LKMM, PASS}, + {"lkmm_with_barrier_dec_wmb", LKMM, PASS}, + {"lkmm_with_barrier_dec", LKMM, FAIL}, + {"lkmm_with_barrier", LKMM, PASS}, + {"lkmm_with_barrier_inc_split", LKMM, FAIL}, + {"lkmm_with_disable_enable_as_barrier", LKMM, PASS}, + {"lkmm_without_barrier", LKMM, FAIL}, }); } diff --git a/dartagnan/src/test/resources/interrupts/lkmm_detour.ll b/dartagnan/src/test/resources/interrupts/lkmm_detour.ll new file mode 100644 index 0000000000..612ca43804 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_detour.ll @@ -0,0 +1,231 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_detour.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_detour.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@y = global i32 0, align 4, !dbg !0 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !34 +@x = global i32 0, align 4, !dbg !26 +@a = global i32 0, align 4, !dbg !30 +@b = global i32 0, align 4, !dbg !32 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !71 { + %2 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !75, metadata !DIExpression()), !dbg !76 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @y to i8*), i32 noundef 3, i32 noundef 1), !dbg !77 + ret i8* null, !dbg !78 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__LKMM_STORE(i8* noundef, i32 noundef, i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread_1(i8* noundef %0) #0 !dbg !79 { + %2 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !80, metadata !DIExpression()), !dbg !81 + call void @__VERIFIER_make_interrupt_handler(), !dbg !82 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !83 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @x to i8*), i32 noundef 1, i32 noundef 1), !dbg !84 + %4 = call i32 @__LKMM_LOAD(i8* noundef bitcast (i32* @y to i8*), i32 noundef 1), !dbg !85 + store i32 %4, i32* @a, align 4, !dbg !86 + %5 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !87 + %6 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %5, i8** noundef null), !dbg !88 + ret i8* null, !dbg !89 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @__LKMM_LOAD(i8* noundef, i32 noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread_2(i8* noundef %0) #0 !dbg !90 { + %2 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !91, metadata !DIExpression()), !dbg !92 + %3 = call i32 @__LKMM_LOAD(i8* noundef bitcast (i32* @x to i8*), i32 noundef 1), !dbg !93 + store i32 %3, i32* @b, align 4, !dbg !94 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @y to i8*), i32 noundef 2, i32 noundef 3), !dbg !95 + ret i8* null, !dbg !96 +} + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !97 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + %3 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !100, metadata !DIExpression()), !dbg !101 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %3, metadata !102, metadata !DIExpression()), !dbg !103 + %4 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_1, i8* noundef null), !dbg !104 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %3, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_2, i8* noundef null), !dbg !105 + %6 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %2, align 8, !dbg !106 + %7 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %6, i8** noundef null), !dbg !107 + %8 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %3, align 8, !dbg !108 + %9 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %8, i8** noundef null), !dbg !109 + %10 = load i32, i32* @b, align 4, !dbg !110 + %11 = icmp eq i32 %10, 1, !dbg !111 + br i1 %11, label %12, label %18, !dbg !112 + +12: ; preds = %0 + %13 = load i32, i32* @a, align 4, !dbg !113 + %14 = icmp eq i32 %13, 3, !dbg !114 + br i1 %14, label %15, label %18, !dbg !115 + +15: ; preds = %12 + %16 = load i32, i32* @y, align 4, !dbg !116 + %17 = icmp eq i32 %16, 3, !dbg !117 + br label %18 + +18: ; preds = %15, %12, %0 + %19 = phi i1 [ false, %12 ], [ false, %0 ], [ %17, %15 ], !dbg !118 + %20 = xor i1 %19, true, !dbg !119 + %21 = zext i1 %20 to i32, !dbg !119 + call void @__VERIFIER_assert(i32 noundef %21), !dbg !120 + ret i32 0, !dbg !121 +} + +declare void @__VERIFIER_assert(i32 noundef) #2 + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!60, !61, !62, !63, !64, !65, !66, !67, !68, !69} +!llvm.ident = !{!70} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !23, globals: !25, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_detour.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 3, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "include/lkmm.h", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_once", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "mb", value: 4) +!14 = !DIEnumerator(name: "wmb", value: 5) +!15 = !DIEnumerator(name: "rmb", value: 6) +!16 = !DIEnumerator(name: "rcu_lock", value: 7) +!17 = !DIEnumerator(name: "rcu_unlock", value: 8) +!18 = !DIEnumerator(name: "rcu_sync", value: 9) +!19 = !DIEnumerator(name: "before_atomic", value: 10) +!20 = !DIEnumerator(name: "after_atomic", value: 11) +!21 = !DIEnumerator(name: "after_spinlock", value: 12) +!22 = !DIEnumerator(name: "barrier", value: 13) +!23 = !{!24} +!24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!25 = !{!26, !0, !30, !32, !34} +!26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression()) +!27 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!28 = !DIFile(filename: "benchmarks/interrupts/lkmm_detour.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!29 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!30 = !DIGlobalVariableExpression(var: !31, expr: !DIExpression()) +!31 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!32 = !DIGlobalVariableExpression(var: !33, expr: !DIExpression()) +!33 = distinct !DIGlobalVariable(name: "b", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!34 = !DIGlobalVariableExpression(var: !35, expr: !DIExpression()) +!35 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !28, line: 9, type: !36, isLocal: false, isDefinition: true) +!36 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !37, line: 31, baseType: !38) +!37 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!38 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !39, line: 118, baseType: !40) +!39 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!40 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !41, size: 64) +!41 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !39, line: 103, size: 65536, elements: !42) +!42 = !{!43, !45, !55} +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !41, file: !39, line: 104, baseType: !44, size: 64) +!44 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!45 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !41, file: !39, line: 105, baseType: !46, size: 64, offset: 64) +!46 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !47, size: 64) +!47 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !39, line: 57, size: 192, elements: !48) +!48 = !{!49, !53, !54} +!49 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !47, file: !39, line: 58, baseType: !50, size: 64) +!50 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !51, size: 64) +!51 = !DISubroutineType(types: !52) +!52 = !{null, !24} +!53 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !47, file: !39, line: 59, baseType: !24, size: 64, offset: 64) +!54 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !47, file: !39, line: 60, baseType: !46, size: 64, offset: 128) +!55 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !41, file: !39, line: 106, baseType: !56, size: 65408, offset: 128) +!56 = !DICompositeType(tag: DW_TAG_array_type, baseType: !57, size: 65408, elements: !58) +!57 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!58 = !{!59} +!59 = !DISubrange(count: 8176) +!60 = !{i32 7, !"Dwarf Version", i32 4} +!61 = !{i32 2, !"Debug Info Version", i32 3} +!62 = !{i32 1, !"wchar_size", i32 4} +!63 = !{i32 1, !"branch-target-enforcement", i32 0} +!64 = !{i32 1, !"sign-return-address", i32 0} +!65 = !{i32 1, !"sign-return-address-all", i32 0} +!66 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!67 = !{i32 7, !"PIC Level", i32 2} +!68 = !{i32 7, !"uwtable", i32 1} +!69 = !{i32 7, !"frame-pointer", i32 1} +!70 = !{!"Homebrew clang version 14.0.6"} +!71 = distinct !DISubprogram(name: "handler", scope: !28, file: !28, line: 10, type: !72, scopeLine: 11, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +!72 = !DISubroutineType(types: !73) +!73 = !{!24, !24} +!74 = !{} +!75 = !DILocalVariable(name: "arg", arg: 1, scope: !71, file: !28, line: 10, type: !24) +!76 = !DILocation(line: 10, column: 21, scope: !71) +!77 = !DILocation(line: 12, column: 5, scope: !71) +!78 = !DILocation(line: 13, column: 5, scope: !71) +!79 = distinct !DISubprogram(name: "thread_1", scope: !28, file: !28, line: 16, type: !72, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +!80 = !DILocalVariable(name: "arg", arg: 1, scope: !79, file: !28, line: 16, type: !24) +!81 = !DILocation(line: 16, column: 22, scope: !79) +!82 = !DILocation(line: 18, column: 5, scope: !79) +!83 = !DILocation(line: 19, column: 5, scope: !79) +!84 = !DILocation(line: 21, column: 5, scope: !79) +!85 = !DILocation(line: 22, column: 9, scope: !79) +!86 = !DILocation(line: 22, column: 7, scope: !79) +!87 = !DILocation(line: 24, column: 18, scope: !79) +!88 = !DILocation(line: 24, column: 5, scope: !79) +!89 = !DILocation(line: 26, column: 5, scope: !79) +!90 = distinct !DISubprogram(name: "thread_2", scope: !28, file: !28, line: 29, type: !72, scopeLine: 30, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +!91 = !DILocalVariable(name: "arg", arg: 1, scope: !90, file: !28, line: 29, type: !24) +!92 = !DILocation(line: 29, column: 22, scope: !90) +!93 = !DILocation(line: 31, column: 9, scope: !90) +!94 = !DILocation(line: 31, column: 7, scope: !90) +!95 = !DILocation(line: 32, column: 5, scope: !90) +!96 = !DILocation(line: 33, column: 5, scope: !90) +!97 = distinct !DISubprogram(name: "main", scope: !28, file: !28, line: 36, type: !98, scopeLine: 37, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +!98 = !DISubroutineType(types: !99) +!99 = !{!29} +!100 = !DILocalVariable(name: "t1", scope: !97, file: !28, line: 38, type: !36) +!101 = !DILocation(line: 38, column: 15, scope: !97) +!102 = !DILocalVariable(name: "t2", scope: !97, file: !28, line: 38, type: !36) +!103 = !DILocation(line: 38, column: 19, scope: !97) +!104 = !DILocation(line: 40, column: 5, scope: !97) +!105 = !DILocation(line: 41, column: 5, scope: !97) +!106 = !DILocation(line: 42, column: 18, scope: !97) +!107 = !DILocation(line: 42, column: 5, scope: !97) +!108 = !DILocation(line: 43, column: 18, scope: !97) +!109 = !DILocation(line: 43, column: 5, scope: !97) +!110 = !DILocation(line: 45, column: 25, scope: !97) +!111 = !DILocation(line: 45, column: 27, scope: !97) +!112 = !DILocation(line: 45, column: 32, scope: !97) +!113 = !DILocation(line: 45, column: 35, scope: !97) +!114 = !DILocation(line: 45, column: 37, scope: !97) +!115 = !DILocation(line: 45, column: 42, scope: !97) +!116 = !DILocation(line: 45, column: 45, scope: !97) +!117 = !DILocation(line: 45, column: 47, scope: !97) +!118 = !DILocation(line: 0, scope: !97) +!119 = !DILocation(line: 45, column: 23, scope: !97) +!120 = !DILocation(line: 45, column: 5, scope: !97) +!121 = !DILocation(line: 47, column: 5, scope: !97) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_detour_disable.ll b/dartagnan/src/test/resources/interrupts/lkmm_detour_disable.ll new file mode 100644 index 0000000000..32b3d06e4e --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_detour_disable.ll @@ -0,0 +1,239 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_detour_disable.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_detour_disable.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@y = global i32 0, align 4, !dbg !0 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !34 +@x = global i32 0, align 4, !dbg !26 +@a = global i32 0, align 4, !dbg !30 +@b = global i32 0, align 4, !dbg !32 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !71 { + %2 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !75, metadata !DIExpression()), !dbg !76 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @y to i8*), i32 noundef 3, i32 noundef 1), !dbg !77 + ret i8* null, !dbg !78 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__LKMM_STORE(i8* noundef, i32 noundef, i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread_1(i8* noundef %0) #0 !dbg !79 { + %2 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !80, metadata !DIExpression()), !dbg !81 + call void @__VERIFIER_make_interrupt_handler(), !dbg !82 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !83 + call void @__VERIFIER_disable_irq(), !dbg !84 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @x to i8*), i32 noundef 1, i32 noundef 1), !dbg !85 + %4 = call i32 @__LKMM_LOAD(i8* noundef bitcast (i32* @y to i8*), i32 noundef 1), !dbg !86 + store i32 %4, i32* @a, align 4, !dbg !87 + call void @__VERIFIER_enable_irq(), !dbg !88 + %5 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !89 + %6 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %5, i8** noundef null), !dbg !90 + ret i8* null, !dbg !91 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare void @__VERIFIER_disable_irq() #2 + +declare i32 @__LKMM_LOAD(i8* noundef, i32 noundef) #2 + +declare void @__VERIFIER_enable_irq() #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread_2(i8* noundef %0) #0 !dbg !92 { + %2 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !93, metadata !DIExpression()), !dbg !94 + %3 = call i32 @__LKMM_LOAD(i8* noundef bitcast (i32* @x to i8*), i32 noundef 1), !dbg !95 + store i32 %3, i32* @b, align 4, !dbg !96 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @y to i8*), i32 noundef 2, i32 noundef 3), !dbg !97 + ret i8* null, !dbg !98 +} + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !99 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + %3 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !102, metadata !DIExpression()), !dbg !103 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %3, metadata !104, metadata !DIExpression()), !dbg !105 + %4 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_1, i8* noundef null), !dbg !106 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %3, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_2, i8* noundef null), !dbg !107 + %6 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %2, align 8, !dbg !108 + %7 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %6, i8** noundef null), !dbg !109 + %8 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %3, align 8, !dbg !110 + %9 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %8, i8** noundef null), !dbg !111 + %10 = load i32, i32* @b, align 4, !dbg !112 + %11 = icmp eq i32 %10, 1, !dbg !113 + br i1 %11, label %12, label %18, !dbg !114 + +12: ; preds = %0 + %13 = load i32, i32* @a, align 4, !dbg !115 + %14 = icmp eq i32 %13, 3, !dbg !116 + br i1 %14, label %15, label %18, !dbg !117 + +15: ; preds = %12 + %16 = load i32, i32* @y, align 4, !dbg !118 + %17 = icmp eq i32 %16, 3, !dbg !119 + br label %18 + +18: ; preds = %15, %12, %0 + %19 = phi i1 [ false, %12 ], [ false, %0 ], [ %17, %15 ], !dbg !120 + %20 = xor i1 %19, true, !dbg !121 + %21 = zext i1 %20 to i32, !dbg !121 + call void @__VERIFIER_assert(i32 noundef %21), !dbg !122 + ret i32 0, !dbg !123 +} + +declare void @__VERIFIER_assert(i32 noundef) #2 + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!60, !61, !62, !63, !64, !65, !66, !67, !68, !69} +!llvm.ident = !{!70} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !23, globals: !25, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_detour_disable.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 3, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "include/lkmm.h", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_once", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "mb", value: 4) +!14 = !DIEnumerator(name: "wmb", value: 5) +!15 = !DIEnumerator(name: "rmb", value: 6) +!16 = !DIEnumerator(name: "rcu_lock", value: 7) +!17 = !DIEnumerator(name: "rcu_unlock", value: 8) +!18 = !DIEnumerator(name: "rcu_sync", value: 9) +!19 = !DIEnumerator(name: "before_atomic", value: 10) +!20 = !DIEnumerator(name: "after_atomic", value: 11) +!21 = !DIEnumerator(name: "after_spinlock", value: 12) +!22 = !DIEnumerator(name: "barrier", value: 13) +!23 = !{!24} +!24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!25 = !{!26, !0, !30, !32, !34} +!26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression()) +!27 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!28 = !DIFile(filename: "benchmarks/interrupts/lkmm_detour_disable.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!29 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!30 = !DIGlobalVariableExpression(var: !31, expr: !DIExpression()) +!31 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!32 = !DIGlobalVariableExpression(var: !33, expr: !DIExpression()) +!33 = distinct !DIGlobalVariable(name: "b", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!34 = !DIGlobalVariableExpression(var: !35, expr: !DIExpression()) +!35 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !28, line: 9, type: !36, isLocal: false, isDefinition: true) +!36 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !37, line: 31, baseType: !38) +!37 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!38 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !39, line: 118, baseType: !40) +!39 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!40 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !41, size: 64) +!41 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !39, line: 103, size: 65536, elements: !42) +!42 = !{!43, !45, !55} +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !41, file: !39, line: 104, baseType: !44, size: 64) +!44 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!45 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !41, file: !39, line: 105, baseType: !46, size: 64, offset: 64) +!46 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !47, size: 64) +!47 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !39, line: 57, size: 192, elements: !48) +!48 = !{!49, !53, !54} +!49 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !47, file: !39, line: 58, baseType: !50, size: 64) +!50 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !51, size: 64) +!51 = !DISubroutineType(types: !52) +!52 = !{null, !24} +!53 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !47, file: !39, line: 59, baseType: !24, size: 64, offset: 64) +!54 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !47, file: !39, line: 60, baseType: !46, size: 64, offset: 128) +!55 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !41, file: !39, line: 106, baseType: !56, size: 65408, offset: 128) +!56 = !DICompositeType(tag: DW_TAG_array_type, baseType: !57, size: 65408, elements: !58) +!57 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!58 = !{!59} +!59 = !DISubrange(count: 8176) +!60 = !{i32 7, !"Dwarf Version", i32 4} +!61 = !{i32 2, !"Debug Info Version", i32 3} +!62 = !{i32 1, !"wchar_size", i32 4} +!63 = !{i32 1, !"branch-target-enforcement", i32 0} +!64 = !{i32 1, !"sign-return-address", i32 0} +!65 = !{i32 1, !"sign-return-address-all", i32 0} +!66 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!67 = !{i32 7, !"PIC Level", i32 2} +!68 = !{i32 7, !"uwtable", i32 1} +!69 = !{i32 7, !"frame-pointer", i32 1} +!70 = !{!"Homebrew clang version 14.0.6"} +!71 = distinct !DISubprogram(name: "handler", scope: !28, file: !28, line: 10, type: !72, scopeLine: 11, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +!72 = !DISubroutineType(types: !73) +!73 = !{!24, !24} +!74 = !{} +!75 = !DILocalVariable(name: "arg", arg: 1, scope: !71, file: !28, line: 10, type: !24) +!76 = !DILocation(line: 10, column: 21, scope: !71) +!77 = !DILocation(line: 12, column: 5, scope: !71) +!78 = !DILocation(line: 13, column: 5, scope: !71) +!79 = distinct !DISubprogram(name: "thread_1", scope: !28, file: !28, line: 16, type: !72, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +!80 = !DILocalVariable(name: "arg", arg: 1, scope: !79, file: !28, line: 16, type: !24) +!81 = !DILocation(line: 16, column: 22, scope: !79) +!82 = !DILocation(line: 18, column: 5, scope: !79) +!83 = !DILocation(line: 19, column: 5, scope: !79) +!84 = !DILocation(line: 21, column: 5, scope: !79) +!85 = !DILocation(line: 22, column: 5, scope: !79) +!86 = !DILocation(line: 23, column: 9, scope: !79) +!87 = !DILocation(line: 23, column: 7, scope: !79) +!88 = !DILocation(line: 24, column: 5, scope: !79) +!89 = !DILocation(line: 26, column: 18, scope: !79) +!90 = !DILocation(line: 26, column: 5, scope: !79) +!91 = !DILocation(line: 28, column: 5, scope: !79) +!92 = distinct !DISubprogram(name: "thread_2", scope: !28, file: !28, line: 31, type: !72, scopeLine: 32, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +!93 = !DILocalVariable(name: "arg", arg: 1, scope: !92, file: !28, line: 31, type: !24) +!94 = !DILocation(line: 31, column: 22, scope: !92) +!95 = !DILocation(line: 33, column: 9, scope: !92) +!96 = !DILocation(line: 33, column: 7, scope: !92) +!97 = !DILocation(line: 34, column: 5, scope: !92) +!98 = !DILocation(line: 35, column: 5, scope: !92) +!99 = distinct !DISubprogram(name: "main", scope: !28, file: !28, line: 38, type: !100, scopeLine: 39, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +!100 = !DISubroutineType(types: !101) +!101 = !{!29} +!102 = !DILocalVariable(name: "t1", scope: !99, file: !28, line: 40, type: !36) +!103 = !DILocation(line: 40, column: 15, scope: !99) +!104 = !DILocalVariable(name: "t2", scope: !99, file: !28, line: 40, type: !36) +!105 = !DILocation(line: 40, column: 19, scope: !99) +!106 = !DILocation(line: 42, column: 5, scope: !99) +!107 = !DILocation(line: 43, column: 5, scope: !99) +!108 = !DILocation(line: 44, column: 18, scope: !99) +!109 = !DILocation(line: 44, column: 5, scope: !99) +!110 = !DILocation(line: 45, column: 18, scope: !99) +!111 = !DILocation(line: 45, column: 5, scope: !99) +!112 = !DILocation(line: 47, column: 25, scope: !99) +!113 = !DILocation(line: 47, column: 27, scope: !99) +!114 = !DILocation(line: 47, column: 32, scope: !99) +!115 = !DILocation(line: 47, column: 35, scope: !99) +!116 = !DILocation(line: 47, column: 37, scope: !99) +!117 = !DILocation(line: 47, column: 42, scope: !99) +!118 = !DILocation(line: 47, column: 45, scope: !99) +!119 = !DILocation(line: 47, column: 47, scope: !99) +!120 = !DILocation(line: 0, scope: !99) +!121 = !DILocation(line: 47, column: 23, scope: !99) +!122 = !DILocation(line: 47, column: 5, scope: !99) +!123 = !DILocation(line: 49, column: 5, scope: !99) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_detour_disable_release.ll b/dartagnan/src/test/resources/interrupts/lkmm_detour_disable_release.ll new file mode 100644 index 0000000000..e95a8f93eb --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_detour_disable_release.ll @@ -0,0 +1,239 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_detour_disable_release.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_detour_disable_release.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@y = global i32 0, align 4, !dbg !0 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !34 +@x = global i32 0, align 4, !dbg !26 +@a = global i32 0, align 4, !dbg !30 +@b = global i32 0, align 4, !dbg !32 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !71 { + %2 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !75, metadata !DIExpression()), !dbg !76 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @y to i8*), i32 noundef 3, i32 noundef 1), !dbg !77 + ret i8* null, !dbg !78 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__LKMM_STORE(i8* noundef, i32 noundef, i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread_1(i8* noundef %0) #0 !dbg !79 { + %2 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !80, metadata !DIExpression()), !dbg !81 + call void @__VERIFIER_make_interrupt_handler(), !dbg !82 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !83 + call void @__VERIFIER_disable_irq(), !dbg !84 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @x to i8*), i32 noundef 1, i32 noundef 3), !dbg !85 + %4 = call i32 @__LKMM_LOAD(i8* noundef bitcast (i32* @y to i8*), i32 noundef 1), !dbg !86 + store i32 %4, i32* @a, align 4, !dbg !87 + call void @__VERIFIER_enable_irq(), !dbg !88 + %5 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !89 + %6 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %5, i8** noundef null), !dbg !90 + ret i8* null, !dbg !91 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare void @__VERIFIER_disable_irq() #2 + +declare i32 @__LKMM_LOAD(i8* noundef, i32 noundef) #2 + +declare void @__VERIFIER_enable_irq() #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread_2(i8* noundef %0) #0 !dbg !92 { + %2 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !93, metadata !DIExpression()), !dbg !94 + %3 = call i32 @__LKMM_LOAD(i8* noundef bitcast (i32* @x to i8*), i32 noundef 1), !dbg !95 + store i32 %3, i32* @b, align 4, !dbg !96 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @y to i8*), i32 noundef 2, i32 noundef 3), !dbg !97 + ret i8* null, !dbg !98 +} + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !99 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + %3 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !102, metadata !DIExpression()), !dbg !103 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %3, metadata !104, metadata !DIExpression()), !dbg !105 + %4 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_1, i8* noundef null), !dbg !106 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %3, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_2, i8* noundef null), !dbg !107 + %6 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %2, align 8, !dbg !108 + %7 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %6, i8** noundef null), !dbg !109 + %8 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %3, align 8, !dbg !110 + %9 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %8, i8** noundef null), !dbg !111 + %10 = load i32, i32* @b, align 4, !dbg !112 + %11 = icmp eq i32 %10, 1, !dbg !113 + br i1 %11, label %12, label %18, !dbg !114 + +12: ; preds = %0 + %13 = load i32, i32* @a, align 4, !dbg !115 + %14 = icmp eq i32 %13, 3, !dbg !116 + br i1 %14, label %15, label %18, !dbg !117 + +15: ; preds = %12 + %16 = load i32, i32* @y, align 4, !dbg !118 + %17 = icmp eq i32 %16, 3, !dbg !119 + br label %18 + +18: ; preds = %15, %12, %0 + %19 = phi i1 [ false, %12 ], [ false, %0 ], [ %17, %15 ], !dbg !120 + %20 = xor i1 %19, true, !dbg !121 + %21 = zext i1 %20 to i32, !dbg !121 + call void @__VERIFIER_assert(i32 noundef %21), !dbg !122 + ret i32 0, !dbg !123 +} + +declare void @__VERIFIER_assert(i32 noundef) #2 + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!60, !61, !62, !63, !64, !65, !66, !67, !68, !69} +!llvm.ident = !{!70} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !23, globals: !25, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_detour_disable_release.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 3, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "include/lkmm.h", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_once", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "mb", value: 4) +!14 = !DIEnumerator(name: "wmb", value: 5) +!15 = !DIEnumerator(name: "rmb", value: 6) +!16 = !DIEnumerator(name: "rcu_lock", value: 7) +!17 = !DIEnumerator(name: "rcu_unlock", value: 8) +!18 = !DIEnumerator(name: "rcu_sync", value: 9) +!19 = !DIEnumerator(name: "before_atomic", value: 10) +!20 = !DIEnumerator(name: "after_atomic", value: 11) +!21 = !DIEnumerator(name: "after_spinlock", value: 12) +!22 = !DIEnumerator(name: "barrier", value: 13) +!23 = !{!24} +!24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!25 = !{!26, !0, !30, !32, !34} +!26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression()) +!27 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!28 = !DIFile(filename: "benchmarks/interrupts/lkmm_detour_disable_release.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!29 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!30 = !DIGlobalVariableExpression(var: !31, expr: !DIExpression()) +!31 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!32 = !DIGlobalVariableExpression(var: !33, expr: !DIExpression()) +!33 = distinct !DIGlobalVariable(name: "b", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!34 = !DIGlobalVariableExpression(var: !35, expr: !DIExpression()) +!35 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !28, line: 9, type: !36, isLocal: false, isDefinition: true) +!36 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !37, line: 31, baseType: !38) +!37 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!38 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !39, line: 118, baseType: !40) +!39 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!40 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !41, size: 64) +!41 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !39, line: 103, size: 65536, elements: !42) +!42 = !{!43, !45, !55} +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !41, file: !39, line: 104, baseType: !44, size: 64) +!44 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!45 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !41, file: !39, line: 105, baseType: !46, size: 64, offset: 64) +!46 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !47, size: 64) +!47 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !39, line: 57, size: 192, elements: !48) +!48 = !{!49, !53, !54} +!49 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !47, file: !39, line: 58, baseType: !50, size: 64) +!50 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !51, size: 64) +!51 = !DISubroutineType(types: !52) +!52 = !{null, !24} +!53 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !47, file: !39, line: 59, baseType: !24, size: 64, offset: 64) +!54 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !47, file: !39, line: 60, baseType: !46, size: 64, offset: 128) +!55 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !41, file: !39, line: 106, baseType: !56, size: 65408, offset: 128) +!56 = !DICompositeType(tag: DW_TAG_array_type, baseType: !57, size: 65408, elements: !58) +!57 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!58 = !{!59} +!59 = !DISubrange(count: 8176) +!60 = !{i32 7, !"Dwarf Version", i32 4} +!61 = !{i32 2, !"Debug Info Version", i32 3} +!62 = !{i32 1, !"wchar_size", i32 4} +!63 = !{i32 1, !"branch-target-enforcement", i32 0} +!64 = !{i32 1, !"sign-return-address", i32 0} +!65 = !{i32 1, !"sign-return-address-all", i32 0} +!66 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!67 = !{i32 7, !"PIC Level", i32 2} +!68 = !{i32 7, !"uwtable", i32 1} +!69 = !{i32 7, !"frame-pointer", i32 1} +!70 = !{!"Homebrew clang version 14.0.6"} +!71 = distinct !DISubprogram(name: "handler", scope: !28, file: !28, line: 10, type: !72, scopeLine: 11, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +!72 = !DISubroutineType(types: !73) +!73 = !{!24, !24} +!74 = !{} +!75 = !DILocalVariable(name: "arg", arg: 1, scope: !71, file: !28, line: 10, type: !24) +!76 = !DILocation(line: 10, column: 21, scope: !71) +!77 = !DILocation(line: 12, column: 5, scope: !71) +!78 = !DILocation(line: 13, column: 5, scope: !71) +!79 = distinct !DISubprogram(name: "thread_1", scope: !28, file: !28, line: 16, type: !72, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +!80 = !DILocalVariable(name: "arg", arg: 1, scope: !79, file: !28, line: 16, type: !24) +!81 = !DILocation(line: 16, column: 22, scope: !79) +!82 = !DILocation(line: 18, column: 5, scope: !79) +!83 = !DILocation(line: 19, column: 5, scope: !79) +!84 = !DILocation(line: 21, column: 5, scope: !79) +!85 = !DILocation(line: 22, column: 5, scope: !79) +!86 = !DILocation(line: 23, column: 9, scope: !79) +!87 = !DILocation(line: 23, column: 7, scope: !79) +!88 = !DILocation(line: 24, column: 5, scope: !79) +!89 = !DILocation(line: 26, column: 18, scope: !79) +!90 = !DILocation(line: 26, column: 5, scope: !79) +!91 = !DILocation(line: 28, column: 5, scope: !79) +!92 = distinct !DISubprogram(name: "thread_2", scope: !28, file: !28, line: 31, type: !72, scopeLine: 32, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +!93 = !DILocalVariable(name: "arg", arg: 1, scope: !92, file: !28, line: 31, type: !24) +!94 = !DILocation(line: 31, column: 22, scope: !92) +!95 = !DILocation(line: 33, column: 9, scope: !92) +!96 = !DILocation(line: 33, column: 7, scope: !92) +!97 = !DILocation(line: 34, column: 5, scope: !92) +!98 = !DILocation(line: 35, column: 5, scope: !92) +!99 = distinct !DISubprogram(name: "main", scope: !28, file: !28, line: 38, type: !100, scopeLine: 39, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !74) +!100 = !DISubroutineType(types: !101) +!101 = !{!29} +!102 = !DILocalVariable(name: "t1", scope: !99, file: !28, line: 40, type: !36) +!103 = !DILocation(line: 40, column: 15, scope: !99) +!104 = !DILocalVariable(name: "t2", scope: !99, file: !28, line: 40, type: !36) +!105 = !DILocation(line: 40, column: 19, scope: !99) +!106 = !DILocation(line: 42, column: 5, scope: !99) +!107 = !DILocation(line: 43, column: 5, scope: !99) +!108 = !DILocation(line: 44, column: 18, scope: !99) +!109 = !DILocation(line: 44, column: 5, scope: !99) +!110 = !DILocation(line: 45, column: 18, scope: !99) +!111 = !DILocation(line: 45, column: 5, scope: !99) +!112 = !DILocation(line: 47, column: 25, scope: !99) +!113 = !DILocation(line: 47, column: 27, scope: !99) +!114 = !DILocation(line: 47, column: 32, scope: !99) +!115 = !DILocation(line: 47, column: 35, scope: !99) +!116 = !DILocation(line: 47, column: 37, scope: !99) +!117 = !DILocation(line: 47, column: 42, scope: !99) +!118 = !DILocation(line: 47, column: 45, scope: !99) +!119 = !DILocation(line: 47, column: 47, scope: !99) +!120 = !DILocation(line: 0, scope: !99) +!121 = !DILocation(line: 47, column: 23, scope: !99) +!122 = !DILocation(line: 47, column: 5, scope: !99) +!123 = !DILocation(line: 49, column: 5, scope: !99) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_oota.ll b/dartagnan/src/test/resources/interrupts/lkmm_oota.ll new file mode 100644 index 0000000000..c1f1b2b9f9 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_oota.ll @@ -0,0 +1,217 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_oota.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_oota.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@z = global i32 0, align 4, !dbg !0 +@y = global i32 0, align 4, !dbg !30 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !32 +@x = global i32 0, align 4, !dbg !26 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !69 { + %2 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !73, metadata !DIExpression()), !dbg !74 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @z to i8*), i32 noundef 3, i32 noundef 1), !dbg !75 + %3 = call i32 @__LKMM_LOAD(i8* noundef bitcast (i32* @y to i8*), i32 noundef 1), !dbg !76 + %4 = icmp eq i32 %3, 0, !dbg !77 + %5 = zext i1 %4 to i32, !dbg !77 + call void @__VERIFIER_assert(i32 noundef %5), !dbg !78 + ret i8* null, !dbg !79 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__LKMM_STORE(i8* noundef, i32 noundef, i32 noundef) #2 + +declare void @__VERIFIER_assert(i32 noundef) #2 + +declare i32 @__LKMM_LOAD(i8* noundef, i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread_1(i8* noundef %0) #0 !dbg !80 { + %2 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !81, metadata !DIExpression()), !dbg !82 + call void @__VERIFIER_make_interrupt_handler(), !dbg !83 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !84 + %4 = call i32 @__LKMM_LOAD(i8* noundef bitcast (i32* @x to i8*), i32 noundef 1), !dbg !85 + %5 = icmp eq i32 %4, 1, !dbg !87 + br i1 %5, label %6, label %7, !dbg !88 + +6: ; preds = %1 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @y to i8*), i32 noundef 2, i32 noundef 1), !dbg !89 + br label %7, !dbg !91 + +7: ; preds = %6, %1 + %8 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !92 + %9 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %8, i8** noundef null), !dbg !93 + ret i8* null, !dbg !94 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread_2(i8* noundef %0) #0 !dbg !95 { + %2 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !96, metadata !DIExpression()), !dbg !97 + %3 = call i32 @__LKMM_LOAD(i8* noundef bitcast (i32* @z to i8*), i32 noundef 1), !dbg !98 + %4 = icmp eq i32 %3, 3, !dbg !100 + br i1 %4, label %5, label %6, !dbg !101 + +5: ; preds = %1 + call void @__LKMM_STORE(i8* noundef bitcast (i32* @x to i8*), i32 noundef 1, i32 noundef 1), !dbg !102 + br label %6, !dbg !104 + +6: ; preds = %5, %1 + ret i8* null, !dbg !105 +} + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !106 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + %3 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !109, metadata !DIExpression()), !dbg !110 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %3, metadata !111, metadata !DIExpression()), !dbg !112 + %4 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_1, i8* noundef null), !dbg !113 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %3, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread_2, i8* noundef null), !dbg !114 + ret i32 0, !dbg !115 +} + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!58, !59, !60, !61, !62, !63, !64, !65, !66, !67} +!llvm.ident = !{!68} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "z", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !23, globals: !25, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_oota.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 3, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "include/lkmm.h", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_once", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "mb", value: 4) +!14 = !DIEnumerator(name: "wmb", value: 5) +!15 = !DIEnumerator(name: "rmb", value: 6) +!16 = !DIEnumerator(name: "rcu_lock", value: 7) +!17 = !DIEnumerator(name: "rcu_unlock", value: 8) +!18 = !DIEnumerator(name: "rcu_sync", value: 9) +!19 = !DIEnumerator(name: "before_atomic", value: 10) +!20 = !DIEnumerator(name: "after_atomic", value: 11) +!21 = !DIEnumerator(name: "after_spinlock", value: 12) +!22 = !DIEnumerator(name: "barrier", value: 13) +!23 = !{!24} +!24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!25 = !{!26, !30, !0, !32} +!26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression()) +!27 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!28 = !DIFile(filename: "benchmarks/interrupts/lkmm_oota.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!29 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!30 = !DIGlobalVariableExpression(var: !31, expr: !DIExpression()) +!31 = distinct !DIGlobalVariable(name: "y", scope: !2, file: !28, line: 7, type: !29, isLocal: false, isDefinition: true) +!32 = !DIGlobalVariableExpression(var: !33, expr: !DIExpression()) +!33 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !28, line: 9, type: !34, isLocal: false, isDefinition: true) +!34 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !35, line: 31, baseType: !36) +!35 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!36 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !37, line: 118, baseType: !38) +!37 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!38 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !39, size: 64) +!39 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !37, line: 103, size: 65536, elements: !40) +!40 = !{!41, !43, !53} +!41 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !39, file: !37, line: 104, baseType: !42, size: 64) +!42 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !39, file: !37, line: 105, baseType: !44, size: 64, offset: 64) +!44 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !45, size: 64) +!45 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !37, line: 57, size: 192, elements: !46) +!46 = !{!47, !51, !52} +!47 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !45, file: !37, line: 58, baseType: !48, size: 64) +!48 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !49, size: 64) +!49 = !DISubroutineType(types: !50) +!50 = !{null, !24} +!51 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !45, file: !37, line: 59, baseType: !24, size: 64, offset: 64) +!52 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !45, file: !37, line: 60, baseType: !44, size: 64, offset: 128) +!53 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !39, file: !37, line: 106, baseType: !54, size: 65408, offset: 128) +!54 = !DICompositeType(tag: DW_TAG_array_type, baseType: !55, size: 65408, elements: !56) +!55 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!56 = !{!57} +!57 = !DISubrange(count: 8176) +!58 = !{i32 7, !"Dwarf Version", i32 4} +!59 = !{i32 2, !"Debug Info Version", i32 3} +!60 = !{i32 1, !"wchar_size", i32 4} +!61 = !{i32 1, !"branch-target-enforcement", i32 0} +!62 = !{i32 1, !"sign-return-address", i32 0} +!63 = !{i32 1, !"sign-return-address-all", i32 0} +!64 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!65 = !{i32 7, !"PIC Level", i32 2} +!66 = !{i32 7, !"uwtable", i32 1} +!67 = !{i32 7, !"frame-pointer", i32 1} +!68 = !{!"Homebrew clang version 14.0.6"} +!69 = distinct !DISubprogram(name: "handler", scope: !28, file: !28, line: 10, type: !70, scopeLine: 11, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !72) +!70 = !DISubroutineType(types: !71) +!71 = !{!24, !24} +!72 = !{} +!73 = !DILocalVariable(name: "arg", arg: 1, scope: !69, file: !28, line: 10, type: !24) +!74 = !DILocation(line: 10, column: 21, scope: !69) +!75 = !DILocation(line: 12, column: 5, scope: !69) +!76 = !DILocation(line: 13, column: 23, scope: !69) +!77 = !DILocation(line: 13, column: 36, scope: !69) +!78 = !DILocation(line: 13, column: 5, scope: !69) +!79 = !DILocation(line: 14, column: 5, scope: !69) +!80 = distinct !DISubprogram(name: "thread_1", scope: !28, file: !28, line: 17, type: !70, scopeLine: 18, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !72) +!81 = !DILocalVariable(name: "arg", arg: 1, scope: !80, file: !28, line: 17, type: !24) +!82 = !DILocation(line: 17, column: 22, scope: !80) +!83 = !DILocation(line: 19, column: 5, scope: !80) +!84 = !DILocation(line: 20, column: 5, scope: !80) +!85 = !DILocation(line: 22, column: 8, scope: !86) +!86 = distinct !DILexicalBlock(scope: !80, file: !28, line: 22, column: 8) +!87 = !DILocation(line: 22, column: 21, scope: !86) +!88 = !DILocation(line: 22, column: 8, scope: !80) +!89 = !DILocation(line: 23, column: 9, scope: !90) +!90 = distinct !DILexicalBlock(scope: !86, file: !28, line: 22, column: 27) +!91 = !DILocation(line: 24, column: 5, scope: !90) +!92 = !DILocation(line: 26, column: 18, scope: !80) +!93 = !DILocation(line: 26, column: 5, scope: !80) +!94 = !DILocation(line: 28, column: 5, scope: !80) +!95 = distinct !DISubprogram(name: "thread_2", scope: !28, file: !28, line: 31, type: !70, scopeLine: 32, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !72) +!96 = !DILocalVariable(name: "arg", arg: 1, scope: !95, file: !28, line: 31, type: !24) +!97 = !DILocation(line: 31, column: 22, scope: !95) +!98 = !DILocation(line: 33, column: 8, scope: !99) +!99 = distinct !DILexicalBlock(scope: !95, file: !28, line: 33, column: 8) +!100 = !DILocation(line: 33, column: 21, scope: !99) +!101 = !DILocation(line: 33, column: 8, scope: !95) +!102 = !DILocation(line: 34, column: 9, scope: !103) +!103 = distinct !DILexicalBlock(scope: !99, file: !28, line: 33, column: 27) +!104 = !DILocation(line: 35, column: 5, scope: !103) +!105 = !DILocation(line: 36, column: 5, scope: !95) +!106 = distinct !DISubprogram(name: "main", scope: !28, file: !28, line: 39, type: !107, scopeLine: 40, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !72) +!107 = !DISubroutineType(types: !108) +!108 = !{!29} +!109 = !DILocalVariable(name: "t1", scope: !106, file: !28, line: 41, type: !34) +!110 = !DILocation(line: 41, column: 15, scope: !106) +!111 = !DILocalVariable(name: "t2", scope: !106, file: !28, line: 41, type: !34) +!112 = !DILocation(line: 41, column: 19, scope: !106) +!113 = !DILocation(line: 43, column: 5, scope: !106) +!114 = !DILocation(line: 44, column: 5, scope: !106) +!115 = !DILocation(line: 46, column: 5, scope: !106) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_with_barrier.ll b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier.ll new file mode 100644 index 0000000000..9fa08bee60 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier.ll @@ -0,0 +1,296 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_with_barrier.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_with_barrier.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct.A = type { i32, i32 } +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@cnt = global i32 0, align 4, !dbg !0 +@as = global [10 x %struct.A] zeroinitializer, align 4, !dbg !31 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !43 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !79 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !83, metadata !DIExpression()), !dbg !84 + call void @llvm.dbg.declare(metadata i32* %3, metadata !85, metadata !DIExpression()), !dbg !86 + %5 = load i8*, i8** %2, align 8, !dbg !87 + %6 = ptrtoint i8* %5 to i64, !dbg !88 + %7 = trunc i64 %6 to i32, !dbg !89 + store i32 %7, i32* %3, align 4, !dbg !86 + call void @llvm.dbg.declare(metadata i32* %4, metadata !90, metadata !DIExpression()), !dbg !91 + %8 = load i32, i32* @cnt, align 4, !dbg !92 + %9 = add nsw i32 %8, 1, !dbg !92 + store i32 %9, i32* @cnt, align 4, !dbg !92 + store i32 %8, i32* %4, align 4, !dbg !91 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !93 + %10 = load i32, i32* %3, align 4, !dbg !94 + %11 = load i32, i32* %4, align 4, !dbg !95 + %12 = sext i32 %11 to i64, !dbg !96 + %13 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %12, !dbg !96 + %14 = getelementptr inbounds %struct.A, %struct.A* %13, i32 0, i32 0, !dbg !97 + store volatile i32 %10, i32* %14, align 4, !dbg !98 + %15 = load i32, i32* %3, align 4, !dbg !99 + %16 = load i32, i32* %4, align 4, !dbg !100 + %17 = sext i32 %16 to i64, !dbg !101 + %18 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %17, !dbg !101 + %19 = getelementptr inbounds %struct.A, %struct.A* %18, i32 0, i32 1, !dbg !102 + store volatile i32 %15, i32* %19, align 4, !dbg !103 + %20 = load i32, i32* %4, align 4, !dbg !104 + %21 = sext i32 %20 to i64, !dbg !105 + %22 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %21, !dbg !105 + %23 = getelementptr inbounds %struct.A, %struct.A* %22, i32 0, i32 0, !dbg !106 + %24 = load volatile i32, i32* %23, align 4, !dbg !106 + %25 = load i32, i32* %4, align 4, !dbg !107 + %26 = sext i32 %25 to i64, !dbg !108 + %27 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %26, !dbg !108 + %28 = getelementptr inbounds %struct.A, %struct.A* %27, i32 0, i32 1, !dbg !109 + %29 = load volatile i32, i32* %28, align 4, !dbg !109 + %30 = icmp eq i32 %24, %29, !dbg !110 + %31 = zext i1 %30 to i32, !dbg !110 + call void @__VERIFIER_assert(i32 noundef %31), !dbg !111 + ret i8* null, !dbg !112 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__LKMM_FENCE(i32 noundef) #2 + +declare void @__VERIFIER_assert(i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @run(i8* noundef %0) #0 !dbg !113 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !114, metadata !DIExpression()), !dbg !115 + call void @__VERIFIER_make_interrupt_handler(), !dbg !116 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !117 + call void @llvm.dbg.declare(metadata i32* %3, metadata !118, metadata !DIExpression()), !dbg !119 + %6 = load i8*, i8** %2, align 8, !dbg !120 + %7 = ptrtoint i8* %6 to i64, !dbg !121 + %8 = trunc i64 %7 to i32, !dbg !122 + store i32 %8, i32* %3, align 4, !dbg !119 + call void @llvm.dbg.declare(metadata i32* %4, metadata !123, metadata !DIExpression()), !dbg !124 + %9 = load i32, i32* @cnt, align 4, !dbg !125 + %10 = add nsw i32 %9, 1, !dbg !125 + store i32 %10, i32* @cnt, align 4, !dbg !125 + store i32 %9, i32* %4, align 4, !dbg !124 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !126 + %11 = load i32, i32* %3, align 4, !dbg !127 + %12 = load i32, i32* %4, align 4, !dbg !128 + %13 = sext i32 %12 to i64, !dbg !129 + %14 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %13, !dbg !129 + %15 = getelementptr inbounds %struct.A, %struct.A* %14, i32 0, i32 0, !dbg !130 + store volatile i32 %11, i32* %15, align 4, !dbg !131 + %16 = load i32, i32* %3, align 4, !dbg !132 + %17 = load i32, i32* %4, align 4, !dbg !133 + %18 = sext i32 %17 to i64, !dbg !134 + %19 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %18, !dbg !134 + %20 = getelementptr inbounds %struct.A, %struct.A* %19, i32 0, i32 1, !dbg !135 + store volatile i32 %16, i32* %20, align 4, !dbg !136 + %21 = load i32, i32* %4, align 4, !dbg !137 + %22 = sext i32 %21 to i64, !dbg !138 + %23 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %22, !dbg !138 + %24 = getelementptr inbounds %struct.A, %struct.A* %23, i32 0, i32 0, !dbg !139 + %25 = load volatile i32, i32* %24, align 4, !dbg !139 + %26 = load i32, i32* %4, align 4, !dbg !140 + %27 = sext i32 %26 to i64, !dbg !141 + %28 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %27, !dbg !141 + %29 = getelementptr inbounds %struct.A, %struct.A* %28, i32 0, i32 1, !dbg !142 + %30 = load volatile i32, i32* %29, align 4, !dbg !142 + %31 = icmp eq i32 %25, %30, !dbg !143 + %32 = zext i1 %31 to i32, !dbg !143 + call void @__VERIFIER_assert(i32 noundef %32), !dbg !144 + %33 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !145 + %34 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %33, i8** noundef null), !dbg !146 + ret i8* null, !dbg !147 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !148 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !151, metadata !DIExpression()), !dbg !152 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)), !dbg !153 + ret i32 0, !dbg !154 +} + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!68, !69, !70, !71, !72, !73, !74, !75, !76, !77} +!llvm.ident = !{!78} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !33, line: 13, type: !39, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !23, globals: !30, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_with_barrier.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 3, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "include/lkmm.h", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_once", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "mb", value: 4) +!14 = !DIEnumerator(name: "wmb", value: 5) +!15 = !DIEnumerator(name: "rmb", value: 6) +!16 = !DIEnumerator(name: "rcu_lock", value: 7) +!17 = !DIEnumerator(name: "rcu_unlock", value: 8) +!18 = !DIEnumerator(name: "rcu_sync", value: 9) +!19 = !DIEnumerator(name: "before_atomic", value: 10) +!20 = !DIEnumerator(name: "after_atomic", value: 11) +!21 = !DIEnumerator(name: "after_spinlock", value: 12) +!22 = !DIEnumerator(name: "barrier", value: 13) +!23 = !{!24, !29} +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !25, line: 32, baseType: !26) +!25 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_types/_intptr_t.h", directory: "") +!26 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_intptr_t", file: !27, line: 27, baseType: !28) +!27 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/arm/_types.h", directory: "") +!28 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!29 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!30 = !{!0, !31, !43} +!31 = !DIGlobalVariableExpression(var: !32, expr: !DIExpression()) +!32 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !33, line: 12, type: !34, isLocal: false, isDefinition: true) +!33 = !DIFile(filename: "benchmarks/interrupts/lkmm_with_barrier.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!34 = !DICompositeType(tag: DW_TAG_array_type, baseType: !35, size: 640, elements: !41) +!35 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !33, line: 11, size: 64, elements: !36) +!36 = !{!37, !40} +!37 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !35, file: !33, line: 11, baseType: !38, size: 32) +!38 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !39) +!39 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!40 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !35, file: !33, line: 11, baseType: !38, size: 32, offset: 32) +!41 = !{!42} +!42 = !DISubrange(count: 10) +!43 = !DIGlobalVariableExpression(var: !44, expr: !DIExpression()) +!44 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !33, line: 15, type: !45, isLocal: false, isDefinition: true) +!45 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !46, line: 31, baseType: !47) +!46 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!47 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !48, line: 118, baseType: !49) +!48 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!49 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !50, size: 64) +!50 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !48, line: 103, size: 65536, elements: !51) +!51 = !{!52, !53, !63} +!52 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !50, file: !48, line: 104, baseType: !28, size: 64) +!53 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !50, file: !48, line: 105, baseType: !54, size: 64, offset: 64) +!54 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !55, size: 64) +!55 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !48, line: 57, size: 192, elements: !56) +!56 = !{!57, !61, !62} +!57 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !55, file: !48, line: 58, baseType: !58, size: 64) +!58 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !59, size: 64) +!59 = !DISubroutineType(types: !60) +!60 = !{null, !29} +!61 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !55, file: !48, line: 59, baseType: !29, size: 64, offset: 64) +!62 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !55, file: !48, line: 60, baseType: !54, size: 64, offset: 128) +!63 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !50, file: !48, line: 106, baseType: !64, size: 65408, offset: 128) +!64 = !DICompositeType(tag: DW_TAG_array_type, baseType: !65, size: 65408, elements: !66) +!65 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!66 = !{!67} +!67 = !DISubrange(count: 8176) +!68 = !{i32 7, !"Dwarf Version", i32 4} +!69 = !{i32 2, !"Debug Info Version", i32 3} +!70 = !{i32 1, !"wchar_size", i32 4} +!71 = !{i32 1, !"branch-target-enforcement", i32 0} +!72 = !{i32 1, !"sign-return-address", i32 0} +!73 = !{i32 1, !"sign-return-address-all", i32 0} +!74 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!75 = !{i32 7, !"PIC Level", i32 2} +!76 = !{i32 7, !"uwtable", i32 1} +!77 = !{i32 7, !"frame-pointer", i32 1} +!78 = !{!"Homebrew clang version 14.0.6"} +!79 = distinct !DISubprogram(name: "handler", scope: !33, file: !33, line: 16, type: !80, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82) +!80 = !DISubroutineType(types: !81) +!81 = !{!29, !29} +!82 = !{} +!83 = !DILocalVariable(name: "arg", arg: 1, scope: !79, file: !33, line: 16, type: !29) +!84 = !DILocation(line: 16, column: 21, scope: !79) +!85 = !DILocalVariable(name: "tindex", scope: !79, file: !33, line: 18, type: !39) +!86 = !DILocation(line: 18, column: 9, scope: !79) +!87 = !DILocation(line: 18, column: 30, scope: !79) +!88 = !DILocation(line: 18, column: 19, scope: !79) +!89 = !DILocation(line: 18, column: 18, scope: !79) +!90 = !DILocalVariable(name: "i", scope: !79, file: !33, line: 19, type: !39) +!91 = !DILocation(line: 19, column: 9, scope: !79) +!92 = !DILocation(line: 19, column: 16, scope: !79) +!93 = !DILocation(line: 20, column: 5, scope: !79) +!94 = !DILocation(line: 21, column: 15, scope: !79) +!95 = !DILocation(line: 21, column: 8, scope: !79) +!96 = !DILocation(line: 21, column: 5, scope: !79) +!97 = !DILocation(line: 21, column: 11, scope: !79) +!98 = !DILocation(line: 21, column: 13, scope: !79) +!99 = !DILocation(line: 22, column: 15, scope: !79) +!100 = !DILocation(line: 22, column: 8, scope: !79) +!101 = !DILocation(line: 22, column: 5, scope: !79) +!102 = !DILocation(line: 22, column: 11, scope: !79) +!103 = !DILocation(line: 22, column: 13, scope: !79) +!104 = !DILocation(line: 23, column: 26, scope: !79) +!105 = !DILocation(line: 23, column: 23, scope: !79) +!106 = !DILocation(line: 23, column: 29, scope: !79) +!107 = !DILocation(line: 23, column: 37, scope: !79) +!108 = !DILocation(line: 23, column: 34, scope: !79) +!109 = !DILocation(line: 23, column: 40, scope: !79) +!110 = !DILocation(line: 23, column: 31, scope: !79) +!111 = !DILocation(line: 23, column: 5, scope: !79) +!112 = !DILocation(line: 25, column: 5, scope: !79) +!113 = distinct !DISubprogram(name: "run", scope: !33, file: !33, line: 28, type: !80, scopeLine: 29, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82) +!114 = !DILocalVariable(name: "arg", arg: 1, scope: !113, file: !33, line: 28, type: !29) +!115 = !DILocation(line: 28, column: 17, scope: !113) +!116 = !DILocation(line: 30, column: 5, scope: !113) +!117 = !DILocation(line: 31, column: 5, scope: !113) +!118 = !DILocalVariable(name: "tindex", scope: !113, file: !33, line: 33, type: !39) +!119 = !DILocation(line: 33, column: 9, scope: !113) +!120 = !DILocation(line: 33, column: 30, scope: !113) +!121 = !DILocation(line: 33, column: 19, scope: !113) +!122 = !DILocation(line: 33, column: 18, scope: !113) +!123 = !DILocalVariable(name: "i", scope: !113, file: !33, line: 34, type: !39) +!124 = !DILocation(line: 34, column: 9, scope: !113) +!125 = !DILocation(line: 34, column: 16, scope: !113) +!126 = !DILocation(line: 35, column: 5, scope: !113) +!127 = !DILocation(line: 36, column: 15, scope: !113) +!128 = !DILocation(line: 36, column: 8, scope: !113) +!129 = !DILocation(line: 36, column: 5, scope: !113) +!130 = !DILocation(line: 36, column: 11, scope: !113) +!131 = !DILocation(line: 36, column: 13, scope: !113) +!132 = !DILocation(line: 37, column: 15, scope: !113) +!133 = !DILocation(line: 37, column: 8, scope: !113) +!134 = !DILocation(line: 37, column: 5, scope: !113) +!135 = !DILocation(line: 37, column: 11, scope: !113) +!136 = !DILocation(line: 37, column: 13, scope: !113) +!137 = !DILocation(line: 38, column: 26, scope: !113) +!138 = !DILocation(line: 38, column: 23, scope: !113) +!139 = !DILocation(line: 38, column: 29, scope: !113) +!140 = !DILocation(line: 38, column: 37, scope: !113) +!141 = !DILocation(line: 38, column: 34, scope: !113) +!142 = !DILocation(line: 38, column: 40, scope: !113) +!143 = !DILocation(line: 38, column: 31, scope: !113) +!144 = !DILocation(line: 38, column: 5, scope: !113) +!145 = !DILocation(line: 40, column: 18, scope: !113) +!146 = !DILocation(line: 40, column: 5, scope: !113) +!147 = !DILocation(line: 42, column: 5, scope: !113) +!148 = distinct !DISubprogram(name: "main", scope: !33, file: !33, line: 45, type: !149, scopeLine: 46, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82) +!149 = !DISubroutineType(types: !150) +!150 = !{!39} +!151 = !DILocalVariable(name: "t", scope: !148, file: !33, line: 47, type: !45) +!152 = !DILocation(line: 47, column: 15, scope: !148) +!153 = !DILocation(line: 48, column: 5, scope: !148) +!154 = !DILocation(line: 50, column: 5, scope: !148) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec.ll b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec.ll new file mode 100644 index 0000000000..ab44400e33 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec.ll @@ -0,0 +1,304 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_with_barrier_dec.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_with_barrier_dec.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct.A = type { i32, i32 } +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@cnt = global i32 0, align 4, !dbg !0 +@as = global [10 x %struct.A] zeroinitializer, align 4, !dbg !31 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !43 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !79 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !83, metadata !DIExpression()), !dbg !84 + call void @llvm.dbg.declare(metadata i32* %3, metadata !85, metadata !DIExpression()), !dbg !86 + %5 = load i8*, i8** %2, align 8, !dbg !87 + %6 = ptrtoint i8* %5 to i64, !dbg !88 + %7 = trunc i64 %6 to i32, !dbg !89 + store i32 %7, i32* %3, align 4, !dbg !86 + call void @llvm.dbg.declare(metadata i32* %4, metadata !90, metadata !DIExpression()), !dbg !91 + %8 = load i32, i32* @cnt, align 4, !dbg !92 + %9 = add nsw i32 %8, 1, !dbg !92 + store i32 %9, i32* @cnt, align 4, !dbg !92 + store i32 %8, i32* %4, align 4, !dbg !91 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !93 + %10 = load i32, i32* %3, align 4, !dbg !94 + %11 = load i32, i32* %4, align 4, !dbg !95 + %12 = sext i32 %11 to i64, !dbg !96 + %13 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %12, !dbg !96 + %14 = getelementptr inbounds %struct.A, %struct.A* %13, i32 0, i32 0, !dbg !97 + store volatile i32 %10, i32* %14, align 4, !dbg !98 + %15 = load i32, i32* %3, align 4, !dbg !99 + %16 = load i32, i32* %4, align 4, !dbg !100 + %17 = sext i32 %16 to i64, !dbg !101 + %18 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %17, !dbg !101 + %19 = getelementptr inbounds %struct.A, %struct.A* %18, i32 0, i32 1, !dbg !102 + store volatile i32 %15, i32* %19, align 4, !dbg !103 + %20 = load i32, i32* %4, align 4, !dbg !104 + %21 = sext i32 %20 to i64, !dbg !105 + %22 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %21, !dbg !105 + %23 = getelementptr inbounds %struct.A, %struct.A* %22, i32 0, i32 0, !dbg !106 + %24 = load volatile i32, i32* %23, align 4, !dbg !106 + %25 = load i32, i32* %4, align 4, !dbg !107 + %26 = sext i32 %25 to i64, !dbg !108 + %27 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %26, !dbg !108 + %28 = getelementptr inbounds %struct.A, %struct.A* %27, i32 0, i32 1, !dbg !109 + %29 = load volatile i32, i32* %28, align 4, !dbg !109 + %30 = icmp eq i32 %24, %29, !dbg !110 + %31 = zext i1 %30 to i32, !dbg !110 + call void @__VERIFIER_assert(i32 noundef %31), !dbg !111 + %32 = load i32, i32* @cnt, align 4, !dbg !112 + %33 = add nsw i32 %32, -1, !dbg !112 + store i32 %33, i32* @cnt, align 4, !dbg !112 + ret i8* null, !dbg !113 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__LKMM_FENCE(i32 noundef) #2 + +declare void @__VERIFIER_assert(i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @run(i8* noundef %0) #0 !dbg !114 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !115, metadata !DIExpression()), !dbg !116 + call void @__VERIFIER_make_interrupt_handler(), !dbg !117 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !118 + call void @llvm.dbg.declare(metadata i32* %3, metadata !119, metadata !DIExpression()), !dbg !120 + %6 = load i8*, i8** %2, align 8, !dbg !121 + %7 = ptrtoint i8* %6 to i64, !dbg !122 + %8 = trunc i64 %7 to i32, !dbg !123 + store i32 %8, i32* %3, align 4, !dbg !120 + call void @llvm.dbg.declare(metadata i32* %4, metadata !124, metadata !DIExpression()), !dbg !125 + %9 = load i32, i32* @cnt, align 4, !dbg !126 + %10 = add nsw i32 %9, 1, !dbg !126 + store i32 %10, i32* @cnt, align 4, !dbg !126 + store i32 %9, i32* %4, align 4, !dbg !125 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !127 + %11 = load i32, i32* %3, align 4, !dbg !128 + %12 = load i32, i32* %4, align 4, !dbg !129 + %13 = sext i32 %12 to i64, !dbg !130 + %14 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %13, !dbg !130 + %15 = getelementptr inbounds %struct.A, %struct.A* %14, i32 0, i32 0, !dbg !131 + store volatile i32 %11, i32* %15, align 4, !dbg !132 + %16 = load i32, i32* %3, align 4, !dbg !133 + %17 = load i32, i32* %4, align 4, !dbg !134 + %18 = sext i32 %17 to i64, !dbg !135 + %19 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %18, !dbg !135 + %20 = getelementptr inbounds %struct.A, %struct.A* %19, i32 0, i32 1, !dbg !136 + store volatile i32 %16, i32* %20, align 4, !dbg !137 + %21 = load i32, i32* %4, align 4, !dbg !138 + %22 = sext i32 %21 to i64, !dbg !139 + %23 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %22, !dbg !139 + %24 = getelementptr inbounds %struct.A, %struct.A* %23, i32 0, i32 0, !dbg !140 + %25 = load volatile i32, i32* %24, align 4, !dbg !140 + %26 = load i32, i32* %4, align 4, !dbg !141 + %27 = sext i32 %26 to i64, !dbg !142 + %28 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %27, !dbg !142 + %29 = getelementptr inbounds %struct.A, %struct.A* %28, i32 0, i32 1, !dbg !143 + %30 = load volatile i32, i32* %29, align 4, !dbg !143 + %31 = icmp eq i32 %25, %30, !dbg !144 + %32 = zext i1 %31 to i32, !dbg !144 + call void @__VERIFIER_assert(i32 noundef %32), !dbg !145 + %33 = load i32, i32* @cnt, align 4, !dbg !146 + %34 = add nsw i32 %33, -1, !dbg !146 + store i32 %34, i32* @cnt, align 4, !dbg !146 + %35 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !147 + %36 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %35, i8** noundef null), !dbg !148 + ret i8* null, !dbg !149 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !150 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !153, metadata !DIExpression()), !dbg !154 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)), !dbg !155 + ret i32 0, !dbg !156 +} + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!68, !69, !70, !71, !72, !73, !74, !75, !76, !77} +!llvm.ident = !{!78} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !33, line: 13, type: !39, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !23, globals: !30, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_with_barrier_dec.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 3, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "include/lkmm.h", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_once", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "mb", value: 4) +!14 = !DIEnumerator(name: "wmb", value: 5) +!15 = !DIEnumerator(name: "rmb", value: 6) +!16 = !DIEnumerator(name: "rcu_lock", value: 7) +!17 = !DIEnumerator(name: "rcu_unlock", value: 8) +!18 = !DIEnumerator(name: "rcu_sync", value: 9) +!19 = !DIEnumerator(name: "before_atomic", value: 10) +!20 = !DIEnumerator(name: "after_atomic", value: 11) +!21 = !DIEnumerator(name: "after_spinlock", value: 12) +!22 = !DIEnumerator(name: "barrier", value: 13) +!23 = !{!24, !29} +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !25, line: 32, baseType: !26) +!25 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_types/_intptr_t.h", directory: "") +!26 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_intptr_t", file: !27, line: 27, baseType: !28) +!27 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/arm/_types.h", directory: "") +!28 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!29 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!30 = !{!0, !31, !43} +!31 = !DIGlobalVariableExpression(var: !32, expr: !DIExpression()) +!32 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !33, line: 12, type: !34, isLocal: false, isDefinition: true) +!33 = !DIFile(filename: "benchmarks/interrupts/lkmm_with_barrier_dec.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!34 = !DICompositeType(tag: DW_TAG_array_type, baseType: !35, size: 640, elements: !41) +!35 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !33, line: 11, size: 64, elements: !36) +!36 = !{!37, !40} +!37 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !35, file: !33, line: 11, baseType: !38, size: 32) +!38 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !39) +!39 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!40 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !35, file: !33, line: 11, baseType: !38, size: 32, offset: 32) +!41 = !{!42} +!42 = !DISubrange(count: 10) +!43 = !DIGlobalVariableExpression(var: !44, expr: !DIExpression()) +!44 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !33, line: 15, type: !45, isLocal: false, isDefinition: true) +!45 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !46, line: 31, baseType: !47) +!46 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!47 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !48, line: 118, baseType: !49) +!48 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!49 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !50, size: 64) +!50 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !48, line: 103, size: 65536, elements: !51) +!51 = !{!52, !53, !63} +!52 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !50, file: !48, line: 104, baseType: !28, size: 64) +!53 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !50, file: !48, line: 105, baseType: !54, size: 64, offset: 64) +!54 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !55, size: 64) +!55 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !48, line: 57, size: 192, elements: !56) +!56 = !{!57, !61, !62} +!57 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !55, file: !48, line: 58, baseType: !58, size: 64) +!58 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !59, size: 64) +!59 = !DISubroutineType(types: !60) +!60 = !{null, !29} +!61 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !55, file: !48, line: 59, baseType: !29, size: 64, offset: 64) +!62 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !55, file: !48, line: 60, baseType: !54, size: 64, offset: 128) +!63 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !50, file: !48, line: 106, baseType: !64, size: 65408, offset: 128) +!64 = !DICompositeType(tag: DW_TAG_array_type, baseType: !65, size: 65408, elements: !66) +!65 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!66 = !{!67} +!67 = !DISubrange(count: 8176) +!68 = !{i32 7, !"Dwarf Version", i32 4} +!69 = !{i32 2, !"Debug Info Version", i32 3} +!70 = !{i32 1, !"wchar_size", i32 4} +!71 = !{i32 1, !"branch-target-enforcement", i32 0} +!72 = !{i32 1, !"sign-return-address", i32 0} +!73 = !{i32 1, !"sign-return-address-all", i32 0} +!74 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!75 = !{i32 7, !"PIC Level", i32 2} +!76 = !{i32 7, !"uwtable", i32 1} +!77 = !{i32 7, !"frame-pointer", i32 1} +!78 = !{!"Homebrew clang version 14.0.6"} +!79 = distinct !DISubprogram(name: "handler", scope: !33, file: !33, line: 16, type: !80, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82) +!80 = !DISubroutineType(types: !81) +!81 = !{!29, !29} +!82 = !{} +!83 = !DILocalVariable(name: "arg", arg: 1, scope: !79, file: !33, line: 16, type: !29) +!84 = !DILocation(line: 16, column: 21, scope: !79) +!85 = !DILocalVariable(name: "tindex", scope: !79, file: !33, line: 18, type: !39) +!86 = !DILocation(line: 18, column: 9, scope: !79) +!87 = !DILocation(line: 18, column: 30, scope: !79) +!88 = !DILocation(line: 18, column: 19, scope: !79) +!89 = !DILocation(line: 18, column: 18, scope: !79) +!90 = !DILocalVariable(name: "i", scope: !79, file: !33, line: 19, type: !39) +!91 = !DILocation(line: 19, column: 9, scope: !79) +!92 = !DILocation(line: 19, column: 16, scope: !79) +!93 = !DILocation(line: 20, column: 5, scope: !79) +!94 = !DILocation(line: 21, column: 15, scope: !79) +!95 = !DILocation(line: 21, column: 8, scope: !79) +!96 = !DILocation(line: 21, column: 5, scope: !79) +!97 = !DILocation(line: 21, column: 11, scope: !79) +!98 = !DILocation(line: 21, column: 13, scope: !79) +!99 = !DILocation(line: 22, column: 15, scope: !79) +!100 = !DILocation(line: 22, column: 8, scope: !79) +!101 = !DILocation(line: 22, column: 5, scope: !79) +!102 = !DILocation(line: 22, column: 11, scope: !79) +!103 = !DILocation(line: 22, column: 13, scope: !79) +!104 = !DILocation(line: 23, column: 26, scope: !79) +!105 = !DILocation(line: 23, column: 23, scope: !79) +!106 = !DILocation(line: 23, column: 29, scope: !79) +!107 = !DILocation(line: 23, column: 37, scope: !79) +!108 = !DILocation(line: 23, column: 34, scope: !79) +!109 = !DILocation(line: 23, column: 40, scope: !79) +!110 = !DILocation(line: 23, column: 31, scope: !79) +!111 = !DILocation(line: 23, column: 5, scope: !79) +!112 = !DILocation(line: 25, column: 8, scope: !79) +!113 = !DILocation(line: 27, column: 5, scope: !79) +!114 = distinct !DISubprogram(name: "run", scope: !33, file: !33, line: 30, type: !80, scopeLine: 31, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82) +!115 = !DILocalVariable(name: "arg", arg: 1, scope: !114, file: !33, line: 30, type: !29) +!116 = !DILocation(line: 30, column: 17, scope: !114) +!117 = !DILocation(line: 32, column: 5, scope: !114) +!118 = !DILocation(line: 33, column: 5, scope: !114) +!119 = !DILocalVariable(name: "tindex", scope: !114, file: !33, line: 35, type: !39) +!120 = !DILocation(line: 35, column: 9, scope: !114) +!121 = !DILocation(line: 35, column: 30, scope: !114) +!122 = !DILocation(line: 35, column: 19, scope: !114) +!123 = !DILocation(line: 35, column: 18, scope: !114) +!124 = !DILocalVariable(name: "i", scope: !114, file: !33, line: 36, type: !39) +!125 = !DILocation(line: 36, column: 9, scope: !114) +!126 = !DILocation(line: 36, column: 16, scope: !114) +!127 = !DILocation(line: 37, column: 5, scope: !114) +!128 = !DILocation(line: 38, column: 15, scope: !114) +!129 = !DILocation(line: 38, column: 8, scope: !114) +!130 = !DILocation(line: 38, column: 5, scope: !114) +!131 = !DILocation(line: 38, column: 11, scope: !114) +!132 = !DILocation(line: 38, column: 13, scope: !114) +!133 = !DILocation(line: 39, column: 15, scope: !114) +!134 = !DILocation(line: 39, column: 8, scope: !114) +!135 = !DILocation(line: 39, column: 5, scope: !114) +!136 = !DILocation(line: 39, column: 11, scope: !114) +!137 = !DILocation(line: 39, column: 13, scope: !114) +!138 = !DILocation(line: 40, column: 26, scope: !114) +!139 = !DILocation(line: 40, column: 23, scope: !114) +!140 = !DILocation(line: 40, column: 29, scope: !114) +!141 = !DILocation(line: 40, column: 37, scope: !114) +!142 = !DILocation(line: 40, column: 34, scope: !114) +!143 = !DILocation(line: 40, column: 40, scope: !114) +!144 = !DILocation(line: 40, column: 31, scope: !114) +!145 = !DILocation(line: 40, column: 5, scope: !114) +!146 = !DILocation(line: 42, column: 8, scope: !114) +!147 = !DILocation(line: 44, column: 18, scope: !114) +!148 = !DILocation(line: 44, column: 5, scope: !114) +!149 = !DILocation(line: 46, column: 5, scope: !114) +!150 = distinct !DISubprogram(name: "main", scope: !33, file: !33, line: 49, type: !151, scopeLine: 50, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82) +!151 = !DISubroutineType(types: !152) +!152 = !{!39} +!153 = !DILocalVariable(name: "t", scope: !150, file: !33, line: 51, type: !45) +!154 = !DILocation(line: 51, column: 15, scope: !150) +!155 = !DILocation(line: 52, column: 5, scope: !150) +!156 = !DILocation(line: 54, column: 5, scope: !150) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec_barrier.ll b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec_barrier.ll new file mode 100644 index 0000000000..b6c8438dac --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec_barrier.ll @@ -0,0 +1,308 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_with_barrier_dec_barrier.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_with_barrier_dec_barrier.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct.A = type { i32, i32 } +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@cnt = global i32 0, align 4, !dbg !0 +@as = global [10 x %struct.A] zeroinitializer, align 4, !dbg !31 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !43 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !79 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !83, metadata !DIExpression()), !dbg !84 + call void @llvm.dbg.declare(metadata i32* %3, metadata !85, metadata !DIExpression()), !dbg !86 + %5 = load i8*, i8** %2, align 8, !dbg !87 + %6 = ptrtoint i8* %5 to i64, !dbg !88 + %7 = trunc i64 %6 to i32, !dbg !89 + store i32 %7, i32* %3, align 4, !dbg !86 + call void @llvm.dbg.declare(metadata i32* %4, metadata !90, metadata !DIExpression()), !dbg !91 + %8 = load i32, i32* @cnt, align 4, !dbg !92 + %9 = add nsw i32 %8, 1, !dbg !92 + store i32 %9, i32* @cnt, align 4, !dbg !92 + store i32 %8, i32* %4, align 4, !dbg !91 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !93 + %10 = load i32, i32* %3, align 4, !dbg !94 + %11 = load i32, i32* %4, align 4, !dbg !95 + %12 = sext i32 %11 to i64, !dbg !96 + %13 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %12, !dbg !96 + %14 = getelementptr inbounds %struct.A, %struct.A* %13, i32 0, i32 0, !dbg !97 + store volatile i32 %10, i32* %14, align 4, !dbg !98 + %15 = load i32, i32* %3, align 4, !dbg !99 + %16 = load i32, i32* %4, align 4, !dbg !100 + %17 = sext i32 %16 to i64, !dbg !101 + %18 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %17, !dbg !101 + %19 = getelementptr inbounds %struct.A, %struct.A* %18, i32 0, i32 1, !dbg !102 + store volatile i32 %15, i32* %19, align 4, !dbg !103 + %20 = load i32, i32* %4, align 4, !dbg !104 + %21 = sext i32 %20 to i64, !dbg !105 + %22 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %21, !dbg !105 + %23 = getelementptr inbounds %struct.A, %struct.A* %22, i32 0, i32 0, !dbg !106 + %24 = load volatile i32, i32* %23, align 4, !dbg !106 + %25 = load i32, i32* %4, align 4, !dbg !107 + %26 = sext i32 %25 to i64, !dbg !108 + %27 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %26, !dbg !108 + %28 = getelementptr inbounds %struct.A, %struct.A* %27, i32 0, i32 1, !dbg !109 + %29 = load volatile i32, i32* %28, align 4, !dbg !109 + %30 = icmp eq i32 %24, %29, !dbg !110 + %31 = zext i1 %30 to i32, !dbg !110 + call void @__VERIFIER_assert(i32 noundef %31), !dbg !111 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !112 + %32 = load i32, i32* @cnt, align 4, !dbg !113 + %33 = add nsw i32 %32, -1, !dbg !113 + store i32 %33, i32* @cnt, align 4, !dbg !113 + ret i8* null, !dbg !114 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__LKMM_FENCE(i32 noundef) #2 + +declare void @__VERIFIER_assert(i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @run(i8* noundef %0) #0 !dbg !115 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !116, metadata !DIExpression()), !dbg !117 + call void @__VERIFIER_make_interrupt_handler(), !dbg !118 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !119 + call void @llvm.dbg.declare(metadata i32* %3, metadata !120, metadata !DIExpression()), !dbg !121 + %6 = load i8*, i8** %2, align 8, !dbg !122 + %7 = ptrtoint i8* %6 to i64, !dbg !123 + %8 = trunc i64 %7 to i32, !dbg !124 + store i32 %8, i32* %3, align 4, !dbg !121 + call void @llvm.dbg.declare(metadata i32* %4, metadata !125, metadata !DIExpression()), !dbg !126 + %9 = load i32, i32* @cnt, align 4, !dbg !127 + %10 = add nsw i32 %9, 1, !dbg !127 + store i32 %10, i32* @cnt, align 4, !dbg !127 + store i32 %9, i32* %4, align 4, !dbg !126 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !128 + %11 = load i32, i32* %3, align 4, !dbg !129 + %12 = load i32, i32* %4, align 4, !dbg !130 + %13 = sext i32 %12 to i64, !dbg !131 + %14 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %13, !dbg !131 + %15 = getelementptr inbounds %struct.A, %struct.A* %14, i32 0, i32 0, !dbg !132 + store volatile i32 %11, i32* %15, align 4, !dbg !133 + %16 = load i32, i32* %3, align 4, !dbg !134 + %17 = load i32, i32* %4, align 4, !dbg !135 + %18 = sext i32 %17 to i64, !dbg !136 + %19 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %18, !dbg !136 + %20 = getelementptr inbounds %struct.A, %struct.A* %19, i32 0, i32 1, !dbg !137 + store volatile i32 %16, i32* %20, align 4, !dbg !138 + %21 = load i32, i32* %4, align 4, !dbg !139 + %22 = sext i32 %21 to i64, !dbg !140 + %23 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %22, !dbg !140 + %24 = getelementptr inbounds %struct.A, %struct.A* %23, i32 0, i32 0, !dbg !141 + %25 = load volatile i32, i32* %24, align 4, !dbg !141 + %26 = load i32, i32* %4, align 4, !dbg !142 + %27 = sext i32 %26 to i64, !dbg !143 + %28 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %27, !dbg !143 + %29 = getelementptr inbounds %struct.A, %struct.A* %28, i32 0, i32 1, !dbg !144 + %30 = load volatile i32, i32* %29, align 4, !dbg !144 + %31 = icmp eq i32 %25, %30, !dbg !145 + %32 = zext i1 %31 to i32, !dbg !145 + call void @__VERIFIER_assert(i32 noundef %32), !dbg !146 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !147 + %33 = load i32, i32* @cnt, align 4, !dbg !148 + %34 = add nsw i32 %33, -1, !dbg !148 + store i32 %34, i32* @cnt, align 4, !dbg !148 + %35 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !149 + %36 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %35, i8** noundef null), !dbg !150 + ret i8* null, !dbg !151 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !152 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !155, metadata !DIExpression()), !dbg !156 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)), !dbg !157 + ret i32 0, !dbg !158 +} + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!68, !69, !70, !71, !72, !73, !74, !75, !76, !77} +!llvm.ident = !{!78} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !33, line: 13, type: !39, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !23, globals: !30, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_with_barrier_dec_barrier.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 3, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "include/lkmm.h", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_once", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "mb", value: 4) +!14 = !DIEnumerator(name: "wmb", value: 5) +!15 = !DIEnumerator(name: "rmb", value: 6) +!16 = !DIEnumerator(name: "rcu_lock", value: 7) +!17 = !DIEnumerator(name: "rcu_unlock", value: 8) +!18 = !DIEnumerator(name: "rcu_sync", value: 9) +!19 = !DIEnumerator(name: "before_atomic", value: 10) +!20 = !DIEnumerator(name: "after_atomic", value: 11) +!21 = !DIEnumerator(name: "after_spinlock", value: 12) +!22 = !DIEnumerator(name: "barrier", value: 13) +!23 = !{!24, !29} +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !25, line: 32, baseType: !26) +!25 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_types/_intptr_t.h", directory: "") +!26 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_intptr_t", file: !27, line: 27, baseType: !28) +!27 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/arm/_types.h", directory: "") +!28 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!29 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!30 = !{!0, !31, !43} +!31 = !DIGlobalVariableExpression(var: !32, expr: !DIExpression()) +!32 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !33, line: 12, type: !34, isLocal: false, isDefinition: true) +!33 = !DIFile(filename: "benchmarks/interrupts/lkmm_with_barrier_dec_barrier.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!34 = !DICompositeType(tag: DW_TAG_array_type, baseType: !35, size: 640, elements: !41) +!35 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !33, line: 11, size: 64, elements: !36) +!36 = !{!37, !40} +!37 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !35, file: !33, line: 11, baseType: !38, size: 32) +!38 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !39) +!39 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!40 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !35, file: !33, line: 11, baseType: !38, size: 32, offset: 32) +!41 = !{!42} +!42 = !DISubrange(count: 10) +!43 = !DIGlobalVariableExpression(var: !44, expr: !DIExpression()) +!44 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !33, line: 15, type: !45, isLocal: false, isDefinition: true) +!45 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !46, line: 31, baseType: !47) +!46 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!47 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !48, line: 118, baseType: !49) +!48 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!49 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !50, size: 64) +!50 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !48, line: 103, size: 65536, elements: !51) +!51 = !{!52, !53, !63} +!52 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !50, file: !48, line: 104, baseType: !28, size: 64) +!53 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !50, file: !48, line: 105, baseType: !54, size: 64, offset: 64) +!54 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !55, size: 64) +!55 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !48, line: 57, size: 192, elements: !56) +!56 = !{!57, !61, !62} +!57 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !55, file: !48, line: 58, baseType: !58, size: 64) +!58 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !59, size: 64) +!59 = !DISubroutineType(types: !60) +!60 = !{null, !29} +!61 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !55, file: !48, line: 59, baseType: !29, size: 64, offset: 64) +!62 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !55, file: !48, line: 60, baseType: !54, size: 64, offset: 128) +!63 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !50, file: !48, line: 106, baseType: !64, size: 65408, offset: 128) +!64 = !DICompositeType(tag: DW_TAG_array_type, baseType: !65, size: 65408, elements: !66) +!65 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!66 = !{!67} +!67 = !DISubrange(count: 8176) +!68 = !{i32 7, !"Dwarf Version", i32 4} +!69 = !{i32 2, !"Debug Info Version", i32 3} +!70 = !{i32 1, !"wchar_size", i32 4} +!71 = !{i32 1, !"branch-target-enforcement", i32 0} +!72 = !{i32 1, !"sign-return-address", i32 0} +!73 = !{i32 1, !"sign-return-address-all", i32 0} +!74 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!75 = !{i32 7, !"PIC Level", i32 2} +!76 = !{i32 7, !"uwtable", i32 1} +!77 = !{i32 7, !"frame-pointer", i32 1} +!78 = !{!"Homebrew clang version 14.0.6"} +!79 = distinct !DISubprogram(name: "handler", scope: !33, file: !33, line: 16, type: !80, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82) +!80 = !DISubroutineType(types: !81) +!81 = !{!29, !29} +!82 = !{} +!83 = !DILocalVariable(name: "arg", arg: 1, scope: !79, file: !33, line: 16, type: !29) +!84 = !DILocation(line: 16, column: 21, scope: !79) +!85 = !DILocalVariable(name: "tindex", scope: !79, file: !33, line: 18, type: !39) +!86 = !DILocation(line: 18, column: 9, scope: !79) +!87 = !DILocation(line: 18, column: 30, scope: !79) +!88 = !DILocation(line: 18, column: 19, scope: !79) +!89 = !DILocation(line: 18, column: 18, scope: !79) +!90 = !DILocalVariable(name: "i", scope: !79, file: !33, line: 19, type: !39) +!91 = !DILocation(line: 19, column: 9, scope: !79) +!92 = !DILocation(line: 19, column: 16, scope: !79) +!93 = !DILocation(line: 20, column: 5, scope: !79) +!94 = !DILocation(line: 21, column: 15, scope: !79) +!95 = !DILocation(line: 21, column: 8, scope: !79) +!96 = !DILocation(line: 21, column: 5, scope: !79) +!97 = !DILocation(line: 21, column: 11, scope: !79) +!98 = !DILocation(line: 21, column: 13, scope: !79) +!99 = !DILocation(line: 22, column: 15, scope: !79) +!100 = !DILocation(line: 22, column: 8, scope: !79) +!101 = !DILocation(line: 22, column: 5, scope: !79) +!102 = !DILocation(line: 22, column: 11, scope: !79) +!103 = !DILocation(line: 22, column: 13, scope: !79) +!104 = !DILocation(line: 23, column: 26, scope: !79) +!105 = !DILocation(line: 23, column: 23, scope: !79) +!106 = !DILocation(line: 23, column: 29, scope: !79) +!107 = !DILocation(line: 23, column: 37, scope: !79) +!108 = !DILocation(line: 23, column: 34, scope: !79) +!109 = !DILocation(line: 23, column: 40, scope: !79) +!110 = !DILocation(line: 23, column: 31, scope: !79) +!111 = !DILocation(line: 23, column: 5, scope: !79) +!112 = !DILocation(line: 25, column: 5, scope: !79) +!113 = !DILocation(line: 26, column: 8, scope: !79) +!114 = !DILocation(line: 28, column: 5, scope: !79) +!115 = distinct !DISubprogram(name: "run", scope: !33, file: !33, line: 31, type: !80, scopeLine: 32, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82) +!116 = !DILocalVariable(name: "arg", arg: 1, scope: !115, file: !33, line: 31, type: !29) +!117 = !DILocation(line: 31, column: 17, scope: !115) +!118 = !DILocation(line: 33, column: 5, scope: !115) +!119 = !DILocation(line: 34, column: 5, scope: !115) +!120 = !DILocalVariable(name: "tindex", scope: !115, file: !33, line: 36, type: !39) +!121 = !DILocation(line: 36, column: 9, scope: !115) +!122 = !DILocation(line: 36, column: 30, scope: !115) +!123 = !DILocation(line: 36, column: 19, scope: !115) +!124 = !DILocation(line: 36, column: 18, scope: !115) +!125 = !DILocalVariable(name: "i", scope: !115, file: !33, line: 37, type: !39) +!126 = !DILocation(line: 37, column: 9, scope: !115) +!127 = !DILocation(line: 37, column: 16, scope: !115) +!128 = !DILocation(line: 38, column: 5, scope: !115) +!129 = !DILocation(line: 39, column: 15, scope: !115) +!130 = !DILocation(line: 39, column: 8, scope: !115) +!131 = !DILocation(line: 39, column: 5, scope: !115) +!132 = !DILocation(line: 39, column: 11, scope: !115) +!133 = !DILocation(line: 39, column: 13, scope: !115) +!134 = !DILocation(line: 40, column: 15, scope: !115) +!135 = !DILocation(line: 40, column: 8, scope: !115) +!136 = !DILocation(line: 40, column: 5, scope: !115) +!137 = !DILocation(line: 40, column: 11, scope: !115) +!138 = !DILocation(line: 40, column: 13, scope: !115) +!139 = !DILocation(line: 41, column: 26, scope: !115) +!140 = !DILocation(line: 41, column: 23, scope: !115) +!141 = !DILocation(line: 41, column: 29, scope: !115) +!142 = !DILocation(line: 41, column: 37, scope: !115) +!143 = !DILocation(line: 41, column: 34, scope: !115) +!144 = !DILocation(line: 41, column: 40, scope: !115) +!145 = !DILocation(line: 41, column: 31, scope: !115) +!146 = !DILocation(line: 41, column: 5, scope: !115) +!147 = !DILocation(line: 43, column: 5, scope: !115) +!148 = !DILocation(line: 44, column: 8, scope: !115) +!149 = !DILocation(line: 46, column: 18, scope: !115) +!150 = !DILocation(line: 46, column: 5, scope: !115) +!151 = !DILocation(line: 48, column: 5, scope: !115) +!152 = distinct !DISubprogram(name: "main", scope: !33, file: !33, line: 51, type: !153, scopeLine: 52, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82) +!153 = !DISubroutineType(types: !154) +!154 = !{!39} +!155 = !DILocalVariable(name: "t", scope: !152, file: !33, line: 53, type: !45) +!156 = !DILocation(line: 53, column: 15, scope: !152) +!157 = !DILocation(line: 54, column: 5, scope: !152) +!158 = !DILocation(line: 56, column: 5, scope: !152) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec_wmb.ll b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec_wmb.ll new file mode 100644 index 0000000000..6a0ca8d379 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_dec_wmb.ll @@ -0,0 +1,308 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_with_barrier_dec_wmb.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_with_barrier_dec_wmb.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct.A = type { i32, i32 } +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@cnt = global i32 0, align 4, !dbg !0 +@as = global [10 x %struct.A] zeroinitializer, align 4, !dbg !31 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !43 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !79 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !83, metadata !DIExpression()), !dbg !84 + call void @llvm.dbg.declare(metadata i32* %3, metadata !85, metadata !DIExpression()), !dbg !86 + %5 = load i8*, i8** %2, align 8, !dbg !87 + %6 = ptrtoint i8* %5 to i64, !dbg !88 + %7 = trunc i64 %6 to i32, !dbg !89 + store i32 %7, i32* %3, align 4, !dbg !86 + call void @llvm.dbg.declare(metadata i32* %4, metadata !90, metadata !DIExpression()), !dbg !91 + %8 = load i32, i32* @cnt, align 4, !dbg !92 + %9 = add nsw i32 %8, 1, !dbg !92 + store i32 %9, i32* @cnt, align 4, !dbg !92 + store i32 %8, i32* %4, align 4, !dbg !91 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !93 + %10 = load i32, i32* %3, align 4, !dbg !94 + %11 = load i32, i32* %4, align 4, !dbg !95 + %12 = sext i32 %11 to i64, !dbg !96 + %13 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %12, !dbg !96 + %14 = getelementptr inbounds %struct.A, %struct.A* %13, i32 0, i32 0, !dbg !97 + store volatile i32 %10, i32* %14, align 4, !dbg !98 + %15 = load i32, i32* %3, align 4, !dbg !99 + %16 = load i32, i32* %4, align 4, !dbg !100 + %17 = sext i32 %16 to i64, !dbg !101 + %18 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %17, !dbg !101 + %19 = getelementptr inbounds %struct.A, %struct.A* %18, i32 0, i32 1, !dbg !102 + store volatile i32 %15, i32* %19, align 4, !dbg !103 + %20 = load i32, i32* %4, align 4, !dbg !104 + %21 = sext i32 %20 to i64, !dbg !105 + %22 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %21, !dbg !105 + %23 = getelementptr inbounds %struct.A, %struct.A* %22, i32 0, i32 0, !dbg !106 + %24 = load volatile i32, i32* %23, align 4, !dbg !106 + %25 = load i32, i32* %4, align 4, !dbg !107 + %26 = sext i32 %25 to i64, !dbg !108 + %27 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %26, !dbg !108 + %28 = getelementptr inbounds %struct.A, %struct.A* %27, i32 0, i32 1, !dbg !109 + %29 = load volatile i32, i32* %28, align 4, !dbg !109 + %30 = icmp eq i32 %24, %29, !dbg !110 + %31 = zext i1 %30 to i32, !dbg !110 + call void @__VERIFIER_assert(i32 noundef %31), !dbg !111 + call void @__LKMM_FENCE(i32 noundef 5), !dbg !112 + %32 = load i32, i32* @cnt, align 4, !dbg !113 + %33 = add nsw i32 %32, -1, !dbg !113 + store i32 %33, i32* @cnt, align 4, !dbg !113 + ret i8* null, !dbg !114 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__LKMM_FENCE(i32 noundef) #2 + +declare void @__VERIFIER_assert(i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @run(i8* noundef %0) #0 !dbg !115 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !116, metadata !DIExpression()), !dbg !117 + call void @__VERIFIER_make_interrupt_handler(), !dbg !118 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !119 + call void @llvm.dbg.declare(metadata i32* %3, metadata !120, metadata !DIExpression()), !dbg !121 + %6 = load i8*, i8** %2, align 8, !dbg !122 + %7 = ptrtoint i8* %6 to i64, !dbg !123 + %8 = trunc i64 %7 to i32, !dbg !124 + store i32 %8, i32* %3, align 4, !dbg !121 + call void @llvm.dbg.declare(metadata i32* %4, metadata !125, metadata !DIExpression()), !dbg !126 + %9 = load i32, i32* @cnt, align 4, !dbg !127 + %10 = add nsw i32 %9, 1, !dbg !127 + store i32 %10, i32* @cnt, align 4, !dbg !127 + store i32 %9, i32* %4, align 4, !dbg !126 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !128 + %11 = load i32, i32* %3, align 4, !dbg !129 + %12 = load i32, i32* %4, align 4, !dbg !130 + %13 = sext i32 %12 to i64, !dbg !131 + %14 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %13, !dbg !131 + %15 = getelementptr inbounds %struct.A, %struct.A* %14, i32 0, i32 0, !dbg !132 + store volatile i32 %11, i32* %15, align 4, !dbg !133 + %16 = load i32, i32* %3, align 4, !dbg !134 + %17 = load i32, i32* %4, align 4, !dbg !135 + %18 = sext i32 %17 to i64, !dbg !136 + %19 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %18, !dbg !136 + %20 = getelementptr inbounds %struct.A, %struct.A* %19, i32 0, i32 1, !dbg !137 + store volatile i32 %16, i32* %20, align 4, !dbg !138 + %21 = load i32, i32* %4, align 4, !dbg !139 + %22 = sext i32 %21 to i64, !dbg !140 + %23 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %22, !dbg !140 + %24 = getelementptr inbounds %struct.A, %struct.A* %23, i32 0, i32 0, !dbg !141 + %25 = load volatile i32, i32* %24, align 4, !dbg !141 + %26 = load i32, i32* %4, align 4, !dbg !142 + %27 = sext i32 %26 to i64, !dbg !143 + %28 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %27, !dbg !143 + %29 = getelementptr inbounds %struct.A, %struct.A* %28, i32 0, i32 1, !dbg !144 + %30 = load volatile i32, i32* %29, align 4, !dbg !144 + %31 = icmp eq i32 %25, %30, !dbg !145 + %32 = zext i1 %31 to i32, !dbg !145 + call void @__VERIFIER_assert(i32 noundef %32), !dbg !146 + call void @__LKMM_FENCE(i32 noundef 5), !dbg !147 + %33 = load i32, i32* @cnt, align 4, !dbg !148 + %34 = add nsw i32 %33, -1, !dbg !148 + store i32 %34, i32* @cnt, align 4, !dbg !148 + %35 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !149 + %36 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %35, i8** noundef null), !dbg !150 + ret i8* null, !dbg !151 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !152 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !155, metadata !DIExpression()), !dbg !156 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)), !dbg !157 + ret i32 0, !dbg !158 +} + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!68, !69, !70, !71, !72, !73, !74, !75, !76, !77} +!llvm.ident = !{!78} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !33, line: 13, type: !39, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !23, globals: !30, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_with_barrier_dec_wmb.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 3, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "include/lkmm.h", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_once", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "mb", value: 4) +!14 = !DIEnumerator(name: "wmb", value: 5) +!15 = !DIEnumerator(name: "rmb", value: 6) +!16 = !DIEnumerator(name: "rcu_lock", value: 7) +!17 = !DIEnumerator(name: "rcu_unlock", value: 8) +!18 = !DIEnumerator(name: "rcu_sync", value: 9) +!19 = !DIEnumerator(name: "before_atomic", value: 10) +!20 = !DIEnumerator(name: "after_atomic", value: 11) +!21 = !DIEnumerator(name: "after_spinlock", value: 12) +!22 = !DIEnumerator(name: "barrier", value: 13) +!23 = !{!24, !29} +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !25, line: 32, baseType: !26) +!25 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_types/_intptr_t.h", directory: "") +!26 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_intptr_t", file: !27, line: 27, baseType: !28) +!27 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/arm/_types.h", directory: "") +!28 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!29 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!30 = !{!0, !31, !43} +!31 = !DIGlobalVariableExpression(var: !32, expr: !DIExpression()) +!32 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !33, line: 12, type: !34, isLocal: false, isDefinition: true) +!33 = !DIFile(filename: "benchmarks/interrupts/lkmm_with_barrier_dec_wmb.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!34 = !DICompositeType(tag: DW_TAG_array_type, baseType: !35, size: 640, elements: !41) +!35 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !33, line: 11, size: 64, elements: !36) +!36 = !{!37, !40} +!37 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !35, file: !33, line: 11, baseType: !38, size: 32) +!38 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !39) +!39 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!40 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !35, file: !33, line: 11, baseType: !38, size: 32, offset: 32) +!41 = !{!42} +!42 = !DISubrange(count: 10) +!43 = !DIGlobalVariableExpression(var: !44, expr: !DIExpression()) +!44 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !33, line: 15, type: !45, isLocal: false, isDefinition: true) +!45 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !46, line: 31, baseType: !47) +!46 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!47 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !48, line: 118, baseType: !49) +!48 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!49 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !50, size: 64) +!50 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !48, line: 103, size: 65536, elements: !51) +!51 = !{!52, !53, !63} +!52 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !50, file: !48, line: 104, baseType: !28, size: 64) +!53 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !50, file: !48, line: 105, baseType: !54, size: 64, offset: 64) +!54 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !55, size: 64) +!55 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !48, line: 57, size: 192, elements: !56) +!56 = !{!57, !61, !62} +!57 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !55, file: !48, line: 58, baseType: !58, size: 64) +!58 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !59, size: 64) +!59 = !DISubroutineType(types: !60) +!60 = !{null, !29} +!61 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !55, file: !48, line: 59, baseType: !29, size: 64, offset: 64) +!62 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !55, file: !48, line: 60, baseType: !54, size: 64, offset: 128) +!63 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !50, file: !48, line: 106, baseType: !64, size: 65408, offset: 128) +!64 = !DICompositeType(tag: DW_TAG_array_type, baseType: !65, size: 65408, elements: !66) +!65 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!66 = !{!67} +!67 = !DISubrange(count: 8176) +!68 = !{i32 7, !"Dwarf Version", i32 4} +!69 = !{i32 2, !"Debug Info Version", i32 3} +!70 = !{i32 1, !"wchar_size", i32 4} +!71 = !{i32 1, !"branch-target-enforcement", i32 0} +!72 = !{i32 1, !"sign-return-address", i32 0} +!73 = !{i32 1, !"sign-return-address-all", i32 0} +!74 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!75 = !{i32 7, !"PIC Level", i32 2} +!76 = !{i32 7, !"uwtable", i32 1} +!77 = !{i32 7, !"frame-pointer", i32 1} +!78 = !{!"Homebrew clang version 14.0.6"} +!79 = distinct !DISubprogram(name: "handler", scope: !33, file: !33, line: 16, type: !80, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82) +!80 = !DISubroutineType(types: !81) +!81 = !{!29, !29} +!82 = !{} +!83 = !DILocalVariable(name: "arg", arg: 1, scope: !79, file: !33, line: 16, type: !29) +!84 = !DILocation(line: 16, column: 21, scope: !79) +!85 = !DILocalVariable(name: "tindex", scope: !79, file: !33, line: 18, type: !39) +!86 = !DILocation(line: 18, column: 9, scope: !79) +!87 = !DILocation(line: 18, column: 30, scope: !79) +!88 = !DILocation(line: 18, column: 19, scope: !79) +!89 = !DILocation(line: 18, column: 18, scope: !79) +!90 = !DILocalVariable(name: "i", scope: !79, file: !33, line: 19, type: !39) +!91 = !DILocation(line: 19, column: 9, scope: !79) +!92 = !DILocation(line: 19, column: 16, scope: !79) +!93 = !DILocation(line: 20, column: 5, scope: !79) +!94 = !DILocation(line: 21, column: 15, scope: !79) +!95 = !DILocation(line: 21, column: 8, scope: !79) +!96 = !DILocation(line: 21, column: 5, scope: !79) +!97 = !DILocation(line: 21, column: 11, scope: !79) +!98 = !DILocation(line: 21, column: 13, scope: !79) +!99 = !DILocation(line: 22, column: 15, scope: !79) +!100 = !DILocation(line: 22, column: 8, scope: !79) +!101 = !DILocation(line: 22, column: 5, scope: !79) +!102 = !DILocation(line: 22, column: 11, scope: !79) +!103 = !DILocation(line: 22, column: 13, scope: !79) +!104 = !DILocation(line: 23, column: 26, scope: !79) +!105 = !DILocation(line: 23, column: 23, scope: !79) +!106 = !DILocation(line: 23, column: 29, scope: !79) +!107 = !DILocation(line: 23, column: 37, scope: !79) +!108 = !DILocation(line: 23, column: 34, scope: !79) +!109 = !DILocation(line: 23, column: 40, scope: !79) +!110 = !DILocation(line: 23, column: 31, scope: !79) +!111 = !DILocation(line: 23, column: 5, scope: !79) +!112 = !DILocation(line: 25, column: 5, scope: !79) +!113 = !DILocation(line: 26, column: 8, scope: !79) +!114 = !DILocation(line: 28, column: 5, scope: !79) +!115 = distinct !DISubprogram(name: "run", scope: !33, file: !33, line: 31, type: !80, scopeLine: 32, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82) +!116 = !DILocalVariable(name: "arg", arg: 1, scope: !115, file: !33, line: 31, type: !29) +!117 = !DILocation(line: 31, column: 17, scope: !115) +!118 = !DILocation(line: 33, column: 5, scope: !115) +!119 = !DILocation(line: 34, column: 5, scope: !115) +!120 = !DILocalVariable(name: "tindex", scope: !115, file: !33, line: 36, type: !39) +!121 = !DILocation(line: 36, column: 9, scope: !115) +!122 = !DILocation(line: 36, column: 30, scope: !115) +!123 = !DILocation(line: 36, column: 19, scope: !115) +!124 = !DILocation(line: 36, column: 18, scope: !115) +!125 = !DILocalVariable(name: "i", scope: !115, file: !33, line: 37, type: !39) +!126 = !DILocation(line: 37, column: 9, scope: !115) +!127 = !DILocation(line: 37, column: 16, scope: !115) +!128 = !DILocation(line: 38, column: 5, scope: !115) +!129 = !DILocation(line: 39, column: 15, scope: !115) +!130 = !DILocation(line: 39, column: 8, scope: !115) +!131 = !DILocation(line: 39, column: 5, scope: !115) +!132 = !DILocation(line: 39, column: 11, scope: !115) +!133 = !DILocation(line: 39, column: 13, scope: !115) +!134 = !DILocation(line: 40, column: 15, scope: !115) +!135 = !DILocation(line: 40, column: 8, scope: !115) +!136 = !DILocation(line: 40, column: 5, scope: !115) +!137 = !DILocation(line: 40, column: 11, scope: !115) +!138 = !DILocation(line: 40, column: 13, scope: !115) +!139 = !DILocation(line: 41, column: 26, scope: !115) +!140 = !DILocation(line: 41, column: 23, scope: !115) +!141 = !DILocation(line: 41, column: 29, scope: !115) +!142 = !DILocation(line: 41, column: 37, scope: !115) +!143 = !DILocation(line: 41, column: 34, scope: !115) +!144 = !DILocation(line: 41, column: 40, scope: !115) +!145 = !DILocation(line: 41, column: 31, scope: !115) +!146 = !DILocation(line: 41, column: 5, scope: !115) +!147 = !DILocation(line: 43, column: 5, scope: !115) +!148 = !DILocation(line: 44, column: 8, scope: !115) +!149 = !DILocation(line: 46, column: 18, scope: !115) +!150 = !DILocation(line: 46, column: 5, scope: !115) +!151 = !DILocation(line: 48, column: 5, scope: !115) +!152 = distinct !DISubprogram(name: "main", scope: !33, file: !33, line: 51, type: !153, scopeLine: 52, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82) +!153 = !DISubroutineType(types: !154) +!154 = !{!39} +!155 = !DILocalVariable(name: "t", scope: !152, file: !33, line: 53, type: !45) +!156 = !DILocation(line: 53, column: 15, scope: !152) +!157 = !DILocation(line: 54, column: 5, scope: !152) +!158 = !DILocation(line: 56, column: 5, scope: !152) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_inc_split.ll b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_inc_split.ll new file mode 100644 index 0000000000..6ba8150bcc --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_with_barrier_inc_split.ll @@ -0,0 +1,300 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_with_barrier_inc_split.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_with_barrier_inc_split.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct.A = type { i32, i32 } +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@cnt = global i32 0, align 4, !dbg !0 +@as = global [10 x %struct.A] zeroinitializer, align 4, !dbg !31 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !43 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !79 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !83, metadata !DIExpression()), !dbg !84 + call void @llvm.dbg.declare(metadata i32* %3, metadata !85, metadata !DIExpression()), !dbg !86 + %5 = load i8*, i8** %2, align 8, !dbg !87 + %6 = ptrtoint i8* %5 to i64, !dbg !88 + %7 = trunc i64 %6 to i32, !dbg !89 + store i32 %7, i32* %3, align 4, !dbg !86 + call void @llvm.dbg.declare(metadata i32* %4, metadata !90, metadata !DIExpression()), !dbg !91 + %8 = load i32, i32* @cnt, align 4, !dbg !92 + %9 = add nsw i32 %8, 1, !dbg !92 + store i32 %9, i32* @cnt, align 4, !dbg !92 + store i32 %8, i32* %4, align 4, !dbg !91 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !93 + %10 = load i32, i32* %3, align 4, !dbg !94 + %11 = load i32, i32* %4, align 4, !dbg !95 + %12 = sext i32 %11 to i64, !dbg !96 + %13 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %12, !dbg !96 + %14 = getelementptr inbounds %struct.A, %struct.A* %13, i32 0, i32 0, !dbg !97 + store volatile i32 %10, i32* %14, align 4, !dbg !98 + %15 = load i32, i32* %3, align 4, !dbg !99 + %16 = load i32, i32* %4, align 4, !dbg !100 + %17 = sext i32 %16 to i64, !dbg !101 + %18 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %17, !dbg !101 + %19 = getelementptr inbounds %struct.A, %struct.A* %18, i32 0, i32 1, !dbg !102 + store volatile i32 %15, i32* %19, align 4, !dbg !103 + %20 = load i32, i32* %4, align 4, !dbg !104 + %21 = sext i32 %20 to i64, !dbg !105 + %22 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %21, !dbg !105 + %23 = getelementptr inbounds %struct.A, %struct.A* %22, i32 0, i32 0, !dbg !106 + %24 = load volatile i32, i32* %23, align 4, !dbg !106 + %25 = load i32, i32* %4, align 4, !dbg !107 + %26 = sext i32 %25 to i64, !dbg !108 + %27 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %26, !dbg !108 + %28 = getelementptr inbounds %struct.A, %struct.A* %27, i32 0, i32 1, !dbg !109 + %29 = load volatile i32, i32* %28, align 4, !dbg !109 + %30 = icmp eq i32 %24, %29, !dbg !110 + %31 = zext i1 %30 to i32, !dbg !110 + call void @__VERIFIER_assert(i32 noundef %31), !dbg !111 + ret i8* null, !dbg !112 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__LKMM_FENCE(i32 noundef) #2 + +declare void @__VERIFIER_assert(i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @run(i8* noundef %0) #0 !dbg !113 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !114, metadata !DIExpression()), !dbg !115 + call void @__VERIFIER_make_interrupt_handler(), !dbg !116 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !117 + call void @llvm.dbg.declare(metadata i32* %3, metadata !118, metadata !DIExpression()), !dbg !119 + %6 = load i8*, i8** %2, align 8, !dbg !120 + %7 = ptrtoint i8* %6 to i64, !dbg !121 + %8 = trunc i64 %7 to i32, !dbg !122 + store i32 %8, i32* %3, align 4, !dbg !119 + call void @llvm.dbg.declare(metadata i32* %4, metadata !123, metadata !DIExpression()), !dbg !124 + %9 = load i32, i32* @cnt, align 4, !dbg !125 + store i32 %9, i32* %4, align 4, !dbg !124 + call void @__LKMM_FENCE(i32 noundef 13), !dbg !126 + %10 = load i32, i32* %4, align 4, !dbg !127 + %11 = add nsw i32 %10, 1, !dbg !128 + store i32 %11, i32* @cnt, align 4, !dbg !129 + %12 = load i32, i32* %3, align 4, !dbg !130 + %13 = load i32, i32* %4, align 4, !dbg !131 + %14 = sext i32 %13 to i64, !dbg !132 + %15 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %14, !dbg !132 + %16 = getelementptr inbounds %struct.A, %struct.A* %15, i32 0, i32 0, !dbg !133 + store volatile i32 %12, i32* %16, align 4, !dbg !134 + %17 = load i32, i32* %3, align 4, !dbg !135 + %18 = load i32, i32* %4, align 4, !dbg !136 + %19 = sext i32 %18 to i64, !dbg !137 + %20 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %19, !dbg !137 + %21 = getelementptr inbounds %struct.A, %struct.A* %20, i32 0, i32 1, !dbg !138 + store volatile i32 %17, i32* %21, align 4, !dbg !139 + %22 = load i32, i32* %4, align 4, !dbg !140 + %23 = sext i32 %22 to i64, !dbg !141 + %24 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %23, !dbg !141 + %25 = getelementptr inbounds %struct.A, %struct.A* %24, i32 0, i32 0, !dbg !142 + %26 = load volatile i32, i32* %25, align 4, !dbg !142 + %27 = load i32, i32* %4, align 4, !dbg !143 + %28 = sext i32 %27 to i64, !dbg !144 + %29 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %28, !dbg !144 + %30 = getelementptr inbounds %struct.A, %struct.A* %29, i32 0, i32 1, !dbg !145 + %31 = load volatile i32, i32* %30, align 4, !dbg !145 + %32 = icmp eq i32 %26, %31, !dbg !146 + %33 = zext i1 %32 to i32, !dbg !146 + call void @__VERIFIER_assert(i32 noundef %33), !dbg !147 + %34 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !148 + %35 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %34, i8** noundef null), !dbg !149 + ret i8* null, !dbg !150 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !151 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !154, metadata !DIExpression()), !dbg !155 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)), !dbg !156 + ret i32 0, !dbg !157 +} + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!68, !69, !70, !71, !72, !73, !74, !75, !76, !77} +!llvm.ident = !{!78} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !33, line: 13, type: !39, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !23, globals: !30, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_with_barrier_inc_split.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5} +!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "memory_order", file: !6, line: 3, baseType: !7, size: 32, elements: !8) +!6 = !DIFile(filename: "include/lkmm.h", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!7 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned) +!8 = !{!9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22} +!9 = !DIEnumerator(name: "memory_order_relaxed", value: 0) +!10 = !DIEnumerator(name: "memory_order_once", value: 1) +!11 = !DIEnumerator(name: "memory_order_acquire", value: 2) +!12 = !DIEnumerator(name: "memory_order_release", value: 3) +!13 = !DIEnumerator(name: "mb", value: 4) +!14 = !DIEnumerator(name: "wmb", value: 5) +!15 = !DIEnumerator(name: "rmb", value: 6) +!16 = !DIEnumerator(name: "rcu_lock", value: 7) +!17 = !DIEnumerator(name: "rcu_unlock", value: 8) +!18 = !DIEnumerator(name: "rcu_sync", value: 9) +!19 = !DIEnumerator(name: "before_atomic", value: 10) +!20 = !DIEnumerator(name: "after_atomic", value: 11) +!21 = !DIEnumerator(name: "after_spinlock", value: 12) +!22 = !DIEnumerator(name: "barrier", value: 13) +!23 = !{!24, !29} +!24 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !25, line: 32, baseType: !26) +!25 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_types/_intptr_t.h", directory: "") +!26 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_intptr_t", file: !27, line: 27, baseType: !28) +!27 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/arm/_types.h", directory: "") +!28 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!29 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!30 = !{!0, !31, !43} +!31 = !DIGlobalVariableExpression(var: !32, expr: !DIExpression()) +!32 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !33, line: 12, type: !34, isLocal: false, isDefinition: true) +!33 = !DIFile(filename: "benchmarks/interrupts/lkmm_with_barrier_inc_split.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!34 = !DICompositeType(tag: DW_TAG_array_type, baseType: !35, size: 640, elements: !41) +!35 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !33, line: 11, size: 64, elements: !36) +!36 = !{!37, !40} +!37 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !35, file: !33, line: 11, baseType: !38, size: 32) +!38 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !39) +!39 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!40 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !35, file: !33, line: 11, baseType: !38, size: 32, offset: 32) +!41 = !{!42} +!42 = !DISubrange(count: 10) +!43 = !DIGlobalVariableExpression(var: !44, expr: !DIExpression()) +!44 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !33, line: 15, type: !45, isLocal: false, isDefinition: true) +!45 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !46, line: 31, baseType: !47) +!46 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!47 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !48, line: 118, baseType: !49) +!48 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!49 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !50, size: 64) +!50 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !48, line: 103, size: 65536, elements: !51) +!51 = !{!52, !53, !63} +!52 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !50, file: !48, line: 104, baseType: !28, size: 64) +!53 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !50, file: !48, line: 105, baseType: !54, size: 64, offset: 64) +!54 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !55, size: 64) +!55 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !48, line: 57, size: 192, elements: !56) +!56 = !{!57, !61, !62} +!57 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !55, file: !48, line: 58, baseType: !58, size: 64) +!58 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !59, size: 64) +!59 = !DISubroutineType(types: !60) +!60 = !{null, !29} +!61 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !55, file: !48, line: 59, baseType: !29, size: 64, offset: 64) +!62 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !55, file: !48, line: 60, baseType: !54, size: 64, offset: 128) +!63 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !50, file: !48, line: 106, baseType: !64, size: 65408, offset: 128) +!64 = !DICompositeType(tag: DW_TAG_array_type, baseType: !65, size: 65408, elements: !66) +!65 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!66 = !{!67} +!67 = !DISubrange(count: 8176) +!68 = !{i32 7, !"Dwarf Version", i32 4} +!69 = !{i32 2, !"Debug Info Version", i32 3} +!70 = !{i32 1, !"wchar_size", i32 4} +!71 = !{i32 1, !"branch-target-enforcement", i32 0} +!72 = !{i32 1, !"sign-return-address", i32 0} +!73 = !{i32 1, !"sign-return-address-all", i32 0} +!74 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!75 = !{i32 7, !"PIC Level", i32 2} +!76 = !{i32 7, !"uwtable", i32 1} +!77 = !{i32 7, !"frame-pointer", i32 1} +!78 = !{!"Homebrew clang version 14.0.6"} +!79 = distinct !DISubprogram(name: "handler", scope: !33, file: !33, line: 16, type: !80, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82) +!80 = !DISubroutineType(types: !81) +!81 = !{!29, !29} +!82 = !{} +!83 = !DILocalVariable(name: "arg", arg: 1, scope: !79, file: !33, line: 16, type: !29) +!84 = !DILocation(line: 16, column: 21, scope: !79) +!85 = !DILocalVariable(name: "tindex", scope: !79, file: !33, line: 18, type: !39) +!86 = !DILocation(line: 18, column: 9, scope: !79) +!87 = !DILocation(line: 18, column: 30, scope: !79) +!88 = !DILocation(line: 18, column: 19, scope: !79) +!89 = !DILocation(line: 18, column: 18, scope: !79) +!90 = !DILocalVariable(name: "i", scope: !79, file: !33, line: 19, type: !39) +!91 = !DILocation(line: 19, column: 9, scope: !79) +!92 = !DILocation(line: 19, column: 16, scope: !79) +!93 = !DILocation(line: 20, column: 5, scope: !79) +!94 = !DILocation(line: 21, column: 15, scope: !79) +!95 = !DILocation(line: 21, column: 8, scope: !79) +!96 = !DILocation(line: 21, column: 5, scope: !79) +!97 = !DILocation(line: 21, column: 11, scope: !79) +!98 = !DILocation(line: 21, column: 13, scope: !79) +!99 = !DILocation(line: 22, column: 15, scope: !79) +!100 = !DILocation(line: 22, column: 8, scope: !79) +!101 = !DILocation(line: 22, column: 5, scope: !79) +!102 = !DILocation(line: 22, column: 11, scope: !79) +!103 = !DILocation(line: 22, column: 13, scope: !79) +!104 = !DILocation(line: 23, column: 26, scope: !79) +!105 = !DILocation(line: 23, column: 23, scope: !79) +!106 = !DILocation(line: 23, column: 29, scope: !79) +!107 = !DILocation(line: 23, column: 37, scope: !79) +!108 = !DILocation(line: 23, column: 34, scope: !79) +!109 = !DILocation(line: 23, column: 40, scope: !79) +!110 = !DILocation(line: 23, column: 31, scope: !79) +!111 = !DILocation(line: 23, column: 5, scope: !79) +!112 = !DILocation(line: 25, column: 5, scope: !79) +!113 = distinct !DISubprogram(name: "run", scope: !33, file: !33, line: 28, type: !80, scopeLine: 29, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82) +!114 = !DILocalVariable(name: "arg", arg: 1, scope: !113, file: !33, line: 28, type: !29) +!115 = !DILocation(line: 28, column: 17, scope: !113) +!116 = !DILocation(line: 30, column: 5, scope: !113) +!117 = !DILocation(line: 31, column: 5, scope: !113) +!118 = !DILocalVariable(name: "tindex", scope: !113, file: !33, line: 33, type: !39) +!119 = !DILocation(line: 33, column: 9, scope: !113) +!120 = !DILocation(line: 33, column: 30, scope: !113) +!121 = !DILocation(line: 33, column: 19, scope: !113) +!122 = !DILocation(line: 33, column: 18, scope: !113) +!123 = !DILocalVariable(name: "i", scope: !113, file: !33, line: 34, type: !39) +!124 = !DILocation(line: 34, column: 9, scope: !113) +!125 = !DILocation(line: 34, column: 13, scope: !113) +!126 = !DILocation(line: 35, column: 5, scope: !113) +!127 = !DILocation(line: 36, column: 11, scope: !113) +!128 = !DILocation(line: 36, column: 12, scope: !113) +!129 = !DILocation(line: 36, column: 9, scope: !113) +!130 = !DILocation(line: 37, column: 15, scope: !113) +!131 = !DILocation(line: 37, column: 8, scope: !113) +!132 = !DILocation(line: 37, column: 5, scope: !113) +!133 = !DILocation(line: 37, column: 11, scope: !113) +!134 = !DILocation(line: 37, column: 13, scope: !113) +!135 = !DILocation(line: 38, column: 15, scope: !113) +!136 = !DILocation(line: 38, column: 8, scope: !113) +!137 = !DILocation(line: 38, column: 5, scope: !113) +!138 = !DILocation(line: 38, column: 11, scope: !113) +!139 = !DILocation(line: 38, column: 13, scope: !113) +!140 = !DILocation(line: 39, column: 26, scope: !113) +!141 = !DILocation(line: 39, column: 23, scope: !113) +!142 = !DILocation(line: 39, column: 29, scope: !113) +!143 = !DILocation(line: 39, column: 37, scope: !113) +!144 = !DILocation(line: 39, column: 34, scope: !113) +!145 = !DILocation(line: 39, column: 40, scope: !113) +!146 = !DILocation(line: 39, column: 31, scope: !113) +!147 = !DILocation(line: 39, column: 5, scope: !113) +!148 = !DILocation(line: 41, column: 18, scope: !113) +!149 = !DILocation(line: 41, column: 5, scope: !113) +!150 = !DILocation(line: 43, column: 5, scope: !113) +!151 = distinct !DISubprogram(name: "main", scope: !33, file: !33, line: 46, type: !152, scopeLine: 47, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !82) +!152 = !DISubroutineType(types: !153) +!153 = !{!39} +!154 = !DILocalVariable(name: "t", scope: !151, file: !33, line: 48, type: !45) +!155 = !DILocation(line: 48, column: 15, scope: !151) +!156 = !DILocation(line: 49, column: 5, scope: !151) +!157 = !DILocation(line: 51, column: 5, scope: !151) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_with_disable_enable_as_barrier.ll b/dartagnan/src/test/resources/interrupts/lkmm_with_disable_enable_as_barrier.ll new file mode 100644 index 0000000000..a10fca6c64 --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_with_disable_enable_as_barrier.ll @@ -0,0 +1,283 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_with_disable_enable_as_barrier.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_with_disable_enable_as_barrier.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct.A = type { i32, i32 } +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@cnt = global i32 0, align 4, !dbg !0 +@as = global [10 x %struct.A] zeroinitializer, align 4, !dbg !12 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !24 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !60 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !64, metadata !DIExpression()), !dbg !65 + call void @llvm.dbg.declare(metadata i32* %3, metadata !66, metadata !DIExpression()), !dbg !67 + %5 = load i8*, i8** %2, align 8, !dbg !68 + %6 = ptrtoint i8* %5 to i64, !dbg !69 + %7 = trunc i64 %6 to i32, !dbg !70 + store i32 %7, i32* %3, align 4, !dbg !67 + call void @llvm.dbg.declare(metadata i32* %4, metadata !71, metadata !DIExpression()), !dbg !72 + %8 = load i32, i32* @cnt, align 4, !dbg !73 + %9 = add nsw i32 %8, 1, !dbg !73 + store i32 %9, i32* @cnt, align 4, !dbg !73 + store i32 %8, i32* %4, align 4, !dbg !72 + call void @__VERIFIER_disable_irq(), !dbg !74 + call void @__VERIFIER_enable_irq(), !dbg !75 + %10 = load i32, i32* %3, align 4, !dbg !76 + %11 = load i32, i32* %4, align 4, !dbg !77 + %12 = sext i32 %11 to i64, !dbg !78 + %13 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %12, !dbg !78 + %14 = getelementptr inbounds %struct.A, %struct.A* %13, i32 0, i32 0, !dbg !79 + store volatile i32 %10, i32* %14, align 4, !dbg !80 + %15 = load i32, i32* %3, align 4, !dbg !81 + %16 = load i32, i32* %4, align 4, !dbg !82 + %17 = sext i32 %16 to i64, !dbg !83 + %18 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %17, !dbg !83 + %19 = getelementptr inbounds %struct.A, %struct.A* %18, i32 0, i32 1, !dbg !84 + store volatile i32 %15, i32* %19, align 4, !dbg !85 + %20 = load i32, i32* %4, align 4, !dbg !86 + %21 = sext i32 %20 to i64, !dbg !87 + %22 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %21, !dbg !87 + %23 = getelementptr inbounds %struct.A, %struct.A* %22, i32 0, i32 0, !dbg !88 + %24 = load volatile i32, i32* %23, align 4, !dbg !88 + %25 = load i32, i32* %4, align 4, !dbg !89 + %26 = sext i32 %25 to i64, !dbg !90 + %27 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %26, !dbg !90 + %28 = getelementptr inbounds %struct.A, %struct.A* %27, i32 0, i32 1, !dbg !91 + %29 = load volatile i32, i32* %28, align 4, !dbg !91 + %30 = icmp eq i32 %24, %29, !dbg !92 + %31 = zext i1 %30 to i32, !dbg !92 + call void @__VERIFIER_assert(i32 noundef %31), !dbg !93 + ret i8* null, !dbg !94 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__VERIFIER_disable_irq() #2 + +declare void @__VERIFIER_enable_irq() #2 + +declare void @__VERIFIER_assert(i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @run(i8* noundef %0) #0 !dbg !95 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !96, metadata !DIExpression()), !dbg !97 + call void @__VERIFIER_make_interrupt_handler(), !dbg !98 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !99 + call void @llvm.dbg.declare(metadata i32* %3, metadata !100, metadata !DIExpression()), !dbg !101 + %6 = load i8*, i8** %2, align 8, !dbg !102 + %7 = ptrtoint i8* %6 to i64, !dbg !103 + %8 = trunc i64 %7 to i32, !dbg !104 + store i32 %8, i32* %3, align 4, !dbg !101 + call void @llvm.dbg.declare(metadata i32* %4, metadata !105, metadata !DIExpression()), !dbg !106 + %9 = load i32, i32* @cnt, align 4, !dbg !107 + %10 = add nsw i32 %9, 1, !dbg !107 + store i32 %10, i32* @cnt, align 4, !dbg !107 + store i32 %9, i32* %4, align 4, !dbg !106 + call void @__VERIFIER_disable_irq(), !dbg !108 + call void @__VERIFIER_enable_irq(), !dbg !109 + %11 = load i32, i32* %3, align 4, !dbg !110 + %12 = load i32, i32* %4, align 4, !dbg !111 + %13 = sext i32 %12 to i64, !dbg !112 + %14 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %13, !dbg !112 + %15 = getelementptr inbounds %struct.A, %struct.A* %14, i32 0, i32 0, !dbg !113 + store volatile i32 %11, i32* %15, align 4, !dbg !114 + %16 = load i32, i32* %3, align 4, !dbg !115 + %17 = load i32, i32* %4, align 4, !dbg !116 + %18 = sext i32 %17 to i64, !dbg !117 + %19 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %18, !dbg !117 + %20 = getelementptr inbounds %struct.A, %struct.A* %19, i32 0, i32 1, !dbg !118 + store volatile i32 %16, i32* %20, align 4, !dbg !119 + %21 = load i32, i32* %4, align 4, !dbg !120 + %22 = sext i32 %21 to i64, !dbg !121 + %23 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %22, !dbg !121 + %24 = getelementptr inbounds %struct.A, %struct.A* %23, i32 0, i32 0, !dbg !122 + %25 = load volatile i32, i32* %24, align 4, !dbg !122 + %26 = load i32, i32* %4, align 4, !dbg !123 + %27 = sext i32 %26 to i64, !dbg !124 + %28 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %27, !dbg !124 + %29 = getelementptr inbounds %struct.A, %struct.A* %28, i32 0, i32 1, !dbg !125 + %30 = load volatile i32, i32* %29, align 4, !dbg !125 + %31 = icmp eq i32 %25, %30, !dbg !126 + %32 = zext i1 %31 to i32, !dbg !126 + call void @__VERIFIER_assert(i32 noundef %32), !dbg !127 + %33 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !128 + %34 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %33, i8** noundef null), !dbg !129 + ret i8* null, !dbg !130 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !131 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !134, metadata !DIExpression()), !dbg !135 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)), !dbg !136 + ret i32 0, !dbg !137 +} + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!49, !50, !51, !52, !53, !54, !55, !56, !57, !58} +!llvm.ident = !{!59} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !14, line: 13, type: !20, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !11, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_with_disable_enable_as_barrier.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5, !10} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 32, baseType: !7) +!6 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_types/_intptr_t.h", directory: "") +!7 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_intptr_t", file: !8, line: 27, baseType: !9) +!8 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/arm/_types.h", directory: "") +!9 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!11 = !{!0, !12, !24} +!12 = !DIGlobalVariableExpression(var: !13, expr: !DIExpression()) +!13 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !14, line: 12, type: !15, isLocal: false, isDefinition: true) +!14 = !DIFile(filename: "benchmarks/interrupts/lkmm_with_disable_enable_as_barrier.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!15 = !DICompositeType(tag: DW_TAG_array_type, baseType: !16, size: 640, elements: !22) +!16 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !14, line: 11, size: 64, elements: !17) +!17 = !{!18, !21} +!18 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !16, file: !14, line: 11, baseType: !19, size: 32) +!19 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !20) +!20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!21 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !16, file: !14, line: 11, baseType: !19, size: 32, offset: 32) +!22 = !{!23} +!23 = !DISubrange(count: 10) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !14, line: 15, type: !26, isLocal: false, isDefinition: true) +!26 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !27, line: 31, baseType: !28) +!27 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!28 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !29, line: 118, baseType: !30) +!29 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!30 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !31, size: 64) +!31 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !29, line: 103, size: 65536, elements: !32) +!32 = !{!33, !34, !44} +!33 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !31, file: !29, line: 104, baseType: !9, size: 64) +!34 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !31, file: !29, line: 105, baseType: !35, size: 64, offset: 64) +!35 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !36, size: 64) +!36 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !29, line: 57, size: 192, elements: !37) +!37 = !{!38, !42, !43} +!38 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !36, file: !29, line: 58, baseType: !39, size: 64) +!39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !40, size: 64) +!40 = !DISubroutineType(types: !41) +!41 = !{null, !10} +!42 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !36, file: !29, line: 59, baseType: !10, size: 64, offset: 64) +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !36, file: !29, line: 60, baseType: !35, size: 64, offset: 128) +!44 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !31, file: !29, line: 106, baseType: !45, size: 65408, offset: 128) +!45 = !DICompositeType(tag: DW_TAG_array_type, baseType: !46, size: 65408, elements: !47) +!46 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!47 = !{!48} +!48 = !DISubrange(count: 8176) +!49 = !{i32 7, !"Dwarf Version", i32 4} +!50 = !{i32 2, !"Debug Info Version", i32 3} +!51 = !{i32 1, !"wchar_size", i32 4} +!52 = !{i32 1, !"branch-target-enforcement", i32 0} +!53 = !{i32 1, !"sign-return-address", i32 0} +!54 = !{i32 1, !"sign-return-address-all", i32 0} +!55 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!56 = !{i32 7, !"PIC Level", i32 2} +!57 = !{i32 7, !"uwtable", i32 1} +!58 = !{i32 7, !"frame-pointer", i32 1} +!59 = !{!"Homebrew clang version 14.0.6"} +!60 = distinct !DISubprogram(name: "handler", scope: !14, file: !14, line: 16, type: !61, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!61 = !DISubroutineType(types: !62) +!62 = !{!10, !10} +!63 = !{} +!64 = !DILocalVariable(name: "arg", arg: 1, scope: !60, file: !14, line: 16, type: !10) +!65 = !DILocation(line: 16, column: 21, scope: !60) +!66 = !DILocalVariable(name: "tindex", scope: !60, file: !14, line: 18, type: !20) +!67 = !DILocation(line: 18, column: 9, scope: !60) +!68 = !DILocation(line: 18, column: 30, scope: !60) +!69 = !DILocation(line: 18, column: 19, scope: !60) +!70 = !DILocation(line: 18, column: 18, scope: !60) +!71 = !DILocalVariable(name: "i", scope: !60, file: !14, line: 19, type: !20) +!72 = !DILocation(line: 19, column: 9, scope: !60) +!73 = !DILocation(line: 19, column: 16, scope: !60) +!74 = !DILocation(line: 20, column: 5, scope: !60) +!75 = !DILocation(line: 21, column: 5, scope: !60) +!76 = !DILocation(line: 22, column: 15, scope: !60) +!77 = !DILocation(line: 22, column: 8, scope: !60) +!78 = !DILocation(line: 22, column: 5, scope: !60) +!79 = !DILocation(line: 22, column: 11, scope: !60) +!80 = !DILocation(line: 22, column: 13, scope: !60) +!81 = !DILocation(line: 23, column: 15, scope: !60) +!82 = !DILocation(line: 23, column: 8, scope: !60) +!83 = !DILocation(line: 23, column: 5, scope: !60) +!84 = !DILocation(line: 23, column: 11, scope: !60) +!85 = !DILocation(line: 23, column: 13, scope: !60) +!86 = !DILocation(line: 24, column: 26, scope: !60) +!87 = !DILocation(line: 24, column: 23, scope: !60) +!88 = !DILocation(line: 24, column: 29, scope: !60) +!89 = !DILocation(line: 24, column: 37, scope: !60) +!90 = !DILocation(line: 24, column: 34, scope: !60) +!91 = !DILocation(line: 24, column: 40, scope: !60) +!92 = !DILocation(line: 24, column: 31, scope: !60) +!93 = !DILocation(line: 24, column: 5, scope: !60) +!94 = !DILocation(line: 26, column: 5, scope: !60) +!95 = distinct !DISubprogram(name: "run", scope: !14, file: !14, line: 29, type: !61, scopeLine: 30, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!96 = !DILocalVariable(name: "arg", arg: 1, scope: !95, file: !14, line: 29, type: !10) +!97 = !DILocation(line: 29, column: 17, scope: !95) +!98 = !DILocation(line: 31, column: 5, scope: !95) +!99 = !DILocation(line: 32, column: 5, scope: !95) +!100 = !DILocalVariable(name: "tindex", scope: !95, file: !14, line: 34, type: !20) +!101 = !DILocation(line: 34, column: 9, scope: !95) +!102 = !DILocation(line: 34, column: 30, scope: !95) +!103 = !DILocation(line: 34, column: 19, scope: !95) +!104 = !DILocation(line: 34, column: 18, scope: !95) +!105 = !DILocalVariable(name: "i", scope: !95, file: !14, line: 35, type: !20) +!106 = !DILocation(line: 35, column: 9, scope: !95) +!107 = !DILocation(line: 35, column: 16, scope: !95) +!108 = !DILocation(line: 36, column: 5, scope: !95) +!109 = !DILocation(line: 37, column: 5, scope: !95) +!110 = !DILocation(line: 38, column: 15, scope: !95) +!111 = !DILocation(line: 38, column: 8, scope: !95) +!112 = !DILocation(line: 38, column: 5, scope: !95) +!113 = !DILocation(line: 38, column: 11, scope: !95) +!114 = !DILocation(line: 38, column: 13, scope: !95) +!115 = !DILocation(line: 39, column: 15, scope: !95) +!116 = !DILocation(line: 39, column: 8, scope: !95) +!117 = !DILocation(line: 39, column: 5, scope: !95) +!118 = !DILocation(line: 39, column: 11, scope: !95) +!119 = !DILocation(line: 39, column: 13, scope: !95) +!120 = !DILocation(line: 40, column: 26, scope: !95) +!121 = !DILocation(line: 40, column: 23, scope: !95) +!122 = !DILocation(line: 40, column: 29, scope: !95) +!123 = !DILocation(line: 40, column: 37, scope: !95) +!124 = !DILocation(line: 40, column: 34, scope: !95) +!125 = !DILocation(line: 40, column: 40, scope: !95) +!126 = !DILocation(line: 40, column: 31, scope: !95) +!127 = !DILocation(line: 40, column: 5, scope: !95) +!128 = !DILocation(line: 42, column: 18, scope: !95) +!129 = !DILocation(line: 42, column: 5, scope: !95) +!130 = !DILocation(line: 44, column: 5, scope: !95) +!131 = distinct !DISubprogram(name: "main", scope: !14, file: !14, line: 47, type: !132, scopeLine: 48, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!132 = !DISubroutineType(types: !133) +!133 = !{!20} +!134 = !DILocalVariable(name: "t", scope: !131, file: !14, line: 49, type: !26) +!135 = !DILocation(line: 49, column: 15, scope: !131) +!136 = !DILocation(line: 50, column: 5, scope: !131) +!137 = !DILocation(line: 52, column: 5, scope: !131) diff --git a/dartagnan/src/test/resources/interrupts/lkmm_without_barrier.ll b/dartagnan/src/test/resources/interrupts/lkmm_without_barrier.ll new file mode 100644 index 0000000000..1d445fc3ea --- /dev/null +++ b/dartagnan/src/test/resources/interrupts/lkmm_without_barrier.ll @@ -0,0 +1,271 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_without_barrier.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_without_barrier.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct.A = type { i32, i32 } +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@cnt = global i32 0, align 4, !dbg !0 +@as = global [10 x %struct.A] zeroinitializer, align 4, !dbg !12 +@h = global %struct._opaque_pthread_t* null, align 8, !dbg !24 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @handler(i8* noundef %0) #0 !dbg !60 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !64, metadata !DIExpression()), !dbg !65 + call void @llvm.dbg.declare(metadata i32* %3, metadata !66, metadata !DIExpression()), !dbg !67 + %5 = load i8*, i8** %2, align 8, !dbg !68 + %6 = ptrtoint i8* %5 to i64, !dbg !69 + %7 = trunc i64 %6 to i32, !dbg !70 + store i32 %7, i32* %3, align 4, !dbg !67 + call void @llvm.dbg.declare(metadata i32* %4, metadata !71, metadata !DIExpression()), !dbg !72 + %8 = load i32, i32* @cnt, align 4, !dbg !73 + %9 = add nsw i32 %8, 1, !dbg !73 + store i32 %9, i32* @cnt, align 4, !dbg !73 + store i32 %8, i32* %4, align 4, !dbg !72 + %10 = load i32, i32* %3, align 4, !dbg !74 + %11 = load i32, i32* %4, align 4, !dbg !75 + %12 = sext i32 %11 to i64, !dbg !76 + %13 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %12, !dbg !76 + %14 = getelementptr inbounds %struct.A, %struct.A* %13, i32 0, i32 0, !dbg !77 + store volatile i32 %10, i32* %14, align 4, !dbg !78 + %15 = load i32, i32* %3, align 4, !dbg !79 + %16 = load i32, i32* %4, align 4, !dbg !80 + %17 = sext i32 %16 to i64, !dbg !81 + %18 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %17, !dbg !81 + %19 = getelementptr inbounds %struct.A, %struct.A* %18, i32 0, i32 1, !dbg !82 + store volatile i32 %15, i32* %19, align 4, !dbg !83 + %20 = load i32, i32* %4, align 4, !dbg !84 + %21 = sext i32 %20 to i64, !dbg !85 + %22 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %21, !dbg !85 + %23 = getelementptr inbounds %struct.A, %struct.A* %22, i32 0, i32 0, !dbg !86 + %24 = load volatile i32, i32* %23, align 4, !dbg !86 + %25 = load i32, i32* %4, align 4, !dbg !87 + %26 = sext i32 %25 to i64, !dbg !88 + %27 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %26, !dbg !88 + %28 = getelementptr inbounds %struct.A, %struct.A* %27, i32 0, i32 1, !dbg !89 + %29 = load volatile i32, i32* %28, align 4, !dbg !89 + %30 = icmp eq i32 %24, %29, !dbg !90 + %31 = zext i1 %30 to i32, !dbg !90 + call void @__VERIFIER_assert(i32 noundef %31), !dbg !91 + ret i8* null, !dbg !92 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare void @__VERIFIER_assert(i32 noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @run(i8* noundef %0) #0 !dbg !93 { + %2 = alloca i8*, align 8 + %3 = alloca i32, align 4 + %4 = alloca i32, align 4 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !94, metadata !DIExpression()), !dbg !95 + call void @__VERIFIER_make_interrupt_handler(), !dbg !96 + %5 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef @h, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @handler, i8* noundef null), !dbg !97 + call void @llvm.dbg.declare(metadata i32* %3, metadata !98, metadata !DIExpression()), !dbg !99 + %6 = load i8*, i8** %2, align 8, !dbg !100 + %7 = ptrtoint i8* %6 to i64, !dbg !101 + %8 = trunc i64 %7 to i32, !dbg !102 + store i32 %8, i32* %3, align 4, !dbg !99 + call void @llvm.dbg.declare(metadata i32* %4, metadata !103, metadata !DIExpression()), !dbg !104 + %9 = load i32, i32* @cnt, align 4, !dbg !105 + %10 = add nsw i32 %9, 1, !dbg !105 + store i32 %10, i32* @cnt, align 4, !dbg !105 + store i32 %9, i32* %4, align 4, !dbg !104 + %11 = load i32, i32* %3, align 4, !dbg !106 + %12 = load i32, i32* %4, align 4, !dbg !107 + %13 = sext i32 %12 to i64, !dbg !108 + %14 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %13, !dbg !108 + %15 = getelementptr inbounds %struct.A, %struct.A* %14, i32 0, i32 0, !dbg !109 + store volatile i32 %11, i32* %15, align 4, !dbg !110 + %16 = load i32, i32* %3, align 4, !dbg !111 + %17 = load i32, i32* %4, align 4, !dbg !112 + %18 = sext i32 %17 to i64, !dbg !113 + %19 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %18, !dbg !113 + %20 = getelementptr inbounds %struct.A, %struct.A* %19, i32 0, i32 1, !dbg !114 + store volatile i32 %16, i32* %20, align 4, !dbg !115 + %21 = load i32, i32* %4, align 4, !dbg !116 + %22 = sext i32 %21 to i64, !dbg !117 + %23 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %22, !dbg !117 + %24 = getelementptr inbounds %struct.A, %struct.A* %23, i32 0, i32 0, !dbg !118 + %25 = load volatile i32, i32* %24, align 4, !dbg !118 + %26 = load i32, i32* %4, align 4, !dbg !119 + %27 = sext i32 %26 to i64, !dbg !120 + %28 = getelementptr inbounds [10 x %struct.A], [10 x %struct.A]* @as, i64 0, i64 %27, !dbg !120 + %29 = getelementptr inbounds %struct.A, %struct.A* %28, i32 0, i32 1, !dbg !121 + %30 = load volatile i32, i32* %29, align 4, !dbg !121 + %31 = icmp eq i32 %25, %30, !dbg !122 + %32 = zext i1 %31 to i32, !dbg !122 + call void @__VERIFIER_assert(i32 noundef %32), !dbg !123 + %33 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** @h, align 8, !dbg !124 + %34 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %33, i8** noundef null), !dbg !125 + ret i8* null, !dbg !126 +} + +declare void @__VERIFIER_make_interrupt_handler() #2 + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !127 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !130, metadata !DIExpression()), !dbg !131 + %3 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @run, i8* noundef inttoptr (i64 1 to i8*)), !dbg !132 + ret i32 0, !dbg !133 +} + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!49, !50, !51, !52, !53, !54, !55, !56, !57, !58} +!llvm.ident = !{!59} + +!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) +!1 = distinct !DIGlobalVariable(name: "cnt", scope: !2, file: !14, line: 13, type: !20, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !11, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/interrupts/lkmm_without_barrier.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5, !10} +!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "intptr_t", file: !6, line: 32, baseType: !7) +!6 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_types/_intptr_t.h", directory: "") +!7 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_intptr_t", file: !8, line: 27, baseType: !9) +!8 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/arm/_types.h", directory: "") +!9 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!11 = !{!0, !12, !24} +!12 = !DIGlobalVariableExpression(var: !13, expr: !DIExpression()) +!13 = distinct !DIGlobalVariable(name: "as", scope: !2, file: !14, line: 12, type: !15, isLocal: false, isDefinition: true) +!14 = !DIFile(filename: "benchmarks/interrupts/lkmm_without_barrier.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!15 = !DICompositeType(tag: DW_TAG_array_type, baseType: !16, size: 640, elements: !22) +!16 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !14, line: 11, size: 64, elements: !17) +!17 = !{!18, !21} +!18 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !16, file: !14, line: 11, baseType: !19, size: 32) +!19 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !20) +!20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!21 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !16, file: !14, line: 11, baseType: !19, size: 32, offset: 32) +!22 = !{!23} +!23 = !DISubrange(count: 10) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !14, line: 15, type: !26, isLocal: false, isDefinition: true) +!26 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !27, line: 31, baseType: !28) +!27 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!28 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !29, line: 118, baseType: !30) +!29 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!30 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !31, size: 64) +!31 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !29, line: 103, size: 65536, elements: !32) +!32 = !{!33, !34, !44} +!33 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !31, file: !29, line: 104, baseType: !9, size: 64) +!34 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !31, file: !29, line: 105, baseType: !35, size: 64, offset: 64) +!35 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !36, size: 64) +!36 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !29, line: 57, size: 192, elements: !37) +!37 = !{!38, !42, !43} +!38 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !36, file: !29, line: 58, baseType: !39, size: 64) +!39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !40, size: 64) +!40 = !DISubroutineType(types: !41) +!41 = !{null, !10} +!42 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !36, file: !29, line: 59, baseType: !10, size: 64, offset: 64) +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !36, file: !29, line: 60, baseType: !35, size: 64, offset: 128) +!44 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !31, file: !29, line: 106, baseType: !45, size: 65408, offset: 128) +!45 = !DICompositeType(tag: DW_TAG_array_type, baseType: !46, size: 65408, elements: !47) +!46 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!47 = !{!48} +!48 = !DISubrange(count: 8176) +!49 = !{i32 7, !"Dwarf Version", i32 4} +!50 = !{i32 2, !"Debug Info Version", i32 3} +!51 = !{i32 1, !"wchar_size", i32 4} +!52 = !{i32 1, !"branch-target-enforcement", i32 0} +!53 = !{i32 1, !"sign-return-address", i32 0} +!54 = !{i32 1, !"sign-return-address-all", i32 0} +!55 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!56 = !{i32 7, !"PIC Level", i32 2} +!57 = !{i32 7, !"uwtable", i32 1} +!58 = !{i32 7, !"frame-pointer", i32 1} +!59 = !{!"Homebrew clang version 14.0.6"} +!60 = distinct !DISubprogram(name: "handler", scope: !14, file: !14, line: 16, type: !61, scopeLine: 17, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!61 = !DISubroutineType(types: !62) +!62 = !{!10, !10} +!63 = !{} +!64 = !DILocalVariable(name: "arg", arg: 1, scope: !60, file: !14, line: 16, type: !10) +!65 = !DILocation(line: 16, column: 21, scope: !60) +!66 = !DILocalVariable(name: "tindex", scope: !60, file: !14, line: 18, type: !20) +!67 = !DILocation(line: 18, column: 9, scope: !60) +!68 = !DILocation(line: 18, column: 30, scope: !60) +!69 = !DILocation(line: 18, column: 19, scope: !60) +!70 = !DILocation(line: 18, column: 18, scope: !60) +!71 = !DILocalVariable(name: "i", scope: !60, file: !14, line: 19, type: !20) +!72 = !DILocation(line: 19, column: 9, scope: !60) +!73 = !DILocation(line: 19, column: 16, scope: !60) +!74 = !DILocation(line: 20, column: 15, scope: !60) +!75 = !DILocation(line: 20, column: 8, scope: !60) +!76 = !DILocation(line: 20, column: 5, scope: !60) +!77 = !DILocation(line: 20, column: 11, scope: !60) +!78 = !DILocation(line: 20, column: 13, scope: !60) +!79 = !DILocation(line: 21, column: 15, scope: !60) +!80 = !DILocation(line: 21, column: 8, scope: !60) +!81 = !DILocation(line: 21, column: 5, scope: !60) +!82 = !DILocation(line: 21, column: 11, scope: !60) +!83 = !DILocation(line: 21, column: 13, scope: !60) +!84 = !DILocation(line: 22, column: 26, scope: !60) +!85 = !DILocation(line: 22, column: 23, scope: !60) +!86 = !DILocation(line: 22, column: 29, scope: !60) +!87 = !DILocation(line: 22, column: 37, scope: !60) +!88 = !DILocation(line: 22, column: 34, scope: !60) +!89 = !DILocation(line: 22, column: 40, scope: !60) +!90 = !DILocation(line: 22, column: 31, scope: !60) +!91 = !DILocation(line: 22, column: 5, scope: !60) +!92 = !DILocation(line: 24, column: 5, scope: !60) +!93 = distinct !DISubprogram(name: "run", scope: !14, file: !14, line: 27, type: !61, scopeLine: 28, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!94 = !DILocalVariable(name: "arg", arg: 1, scope: !93, file: !14, line: 27, type: !10) +!95 = !DILocation(line: 27, column: 17, scope: !93) +!96 = !DILocation(line: 29, column: 5, scope: !93) +!97 = !DILocation(line: 30, column: 5, scope: !93) +!98 = !DILocalVariable(name: "tindex", scope: !93, file: !14, line: 32, type: !20) +!99 = !DILocation(line: 32, column: 9, scope: !93) +!100 = !DILocation(line: 32, column: 30, scope: !93) +!101 = !DILocation(line: 32, column: 19, scope: !93) +!102 = !DILocation(line: 32, column: 18, scope: !93) +!103 = !DILocalVariable(name: "i", scope: !93, file: !14, line: 33, type: !20) +!104 = !DILocation(line: 33, column: 9, scope: !93) +!105 = !DILocation(line: 33, column: 16, scope: !93) +!106 = !DILocation(line: 34, column: 15, scope: !93) +!107 = !DILocation(line: 34, column: 8, scope: !93) +!108 = !DILocation(line: 34, column: 5, scope: !93) +!109 = !DILocation(line: 34, column: 11, scope: !93) +!110 = !DILocation(line: 34, column: 13, scope: !93) +!111 = !DILocation(line: 35, column: 15, scope: !93) +!112 = !DILocation(line: 35, column: 8, scope: !93) +!113 = !DILocation(line: 35, column: 5, scope: !93) +!114 = !DILocation(line: 35, column: 11, scope: !93) +!115 = !DILocation(line: 35, column: 13, scope: !93) +!116 = !DILocation(line: 36, column: 26, scope: !93) +!117 = !DILocation(line: 36, column: 23, scope: !93) +!118 = !DILocation(line: 36, column: 29, scope: !93) +!119 = !DILocation(line: 36, column: 37, scope: !93) +!120 = !DILocation(line: 36, column: 34, scope: !93) +!121 = !DILocation(line: 36, column: 40, scope: !93) +!122 = !DILocation(line: 36, column: 31, scope: !93) +!123 = !DILocation(line: 36, column: 5, scope: !93) +!124 = !DILocation(line: 38, column: 18, scope: !93) +!125 = !DILocation(line: 38, column: 5, scope: !93) +!126 = !DILocation(line: 40, column: 5, scope: !93) +!127 = distinct !DISubprogram(name: "main", scope: !14, file: !14, line: 43, type: !128, scopeLine: 44, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !63) +!128 = !DISubroutineType(types: !129) +!129 = !{!20} +!130 = !DILocalVariable(name: "t", scope: !127, file: !14, line: 45, type: !26) +!131 = !DILocation(line: 45, column: 15, scope: !127) +!132 = !DILocation(line: 46, column: 5, scope: !127) +!133 = !DILocation(line: 48, column: 5, scope: !127) From c63350ea2affb633c2eb6ec1913ef726ce740936 Mon Sep 17 00:00:00 2001 From: Thomas Haas Date: Wed, 26 Mar 2025 16:30:51 +0100 Subject: [PATCH 10/33] Added new interrupts cat models that use explicit interrupt points (WIP) --- cat/interrupts-axioms.cat | 12 ++ cat/interrupts-defs.cat | 30 +++++ cat/lkmm-interrupts-alt.cat | 245 ++++++++++++++++++++++++++++++++++++ cat/vmm-interrupts-alt.cat | 52 ++++++++ 4 files changed, 339 insertions(+) create mode 100644 cat/interrupts-axioms.cat create mode 100644 cat/interrupts-defs.cat create mode 100644 cat/lkmm-interrupts-alt.cat create mode 100644 cat/vmm-interrupts-alt.cat diff --git a/cat/interrupts-axioms.cat b/cat/interrupts-axioms.cat new file mode 100644 index 0000000000..ce4c6581c4 --- /dev/null +++ b/cat/interrupts-axioms.cat @@ -0,0 +1,12 @@ +(* + Prefix-closedness of beforeIP + - This assumes that "barrier" is defined by the including WMM +*) +empty ([domain(barrier;beforeIP)] \ beforeIP) + +(* + Global ordering + - This assumes that "hb" is defined by the including WMM +*) +// Unclear if needed +empty ((afterIP;hb+;rfe) & ih) diff --git a/cat/interrupts-defs.cat b/cat/interrupts-defs.cat new file mode 100644 index 0000000000..e19f14738a --- /dev/null +++ b/cat/interrupts-defs.cat @@ -0,0 +1,30 @@ +let po-until(set) = po \ (po;[set];po) + +(* Basic interrupt relations *) +let IHSpawn = [range([INTERRUPT_HANDLER];po-until(THREAD_CREATE))] +let ih = int;IHSpawn;rf;int + +(* Interrupt points *) +let beforeIP = (new() & id) +// If it contains DISABLE_INTERRUPT it must contain the whole region up to next ENABLE_INTERRUPT +let beforeIP = beforeIP | [range((beforeIP & [DISABLE_INTERRUPT]);po-until(ENABLE_INTERRUPT))] +let afterIP = id \ beforeIP + +(* Extend po/int/ext based on IP *) +let int = int | ih | ih^-1 | (IW * M) +let ext = ext \ int +let po = po | beforeIP;ih | ih^-1;afterIP +let ctrl = ctrl ; po* + +let po-loc = po & loc +let rfe = rf & ext +let coe = co & ext +let fre = fr & ext +let rfi = rf & int +let coi = co & int +let fri = fr & int + +// NOTE: beforeIP must be prefix-closed under the barrier ordering of the WMM +// Since this depends on the WMM, we do not define it here and instead rely on the WMM adding the axiom +// empty ([domain(barrier;beforeIP)] \ beforeIP) +// This can be achieved by include "interrupts-axioms.cat" inside the wmm \ No newline at end of file diff --git a/cat/lkmm-interrupts-alt.cat b/cat/lkmm-interrupts-alt.cat new file mode 100644 index 0000000000..cb74aa1122 --- /dev/null +++ b/cat/lkmm-interrupts-alt.cat @@ -0,0 +1,245 @@ +// SPDX-License-Identifier: GPL-2.0+ +(* + * Copyright (C) 2015 Jade Alglave , + * Copyright (C) 2016 Luc Maranget for Inria + * Copyright (C) 2017 Alan Stern , + * Andrea Parri + * + * An earlier version of this file appeared in the companion webpage for + * "Frightening small children and disconcerting grown-ups: Concurrency + * in the Linux kernel" by Alglave, Maranget, McKenney, Parri, and Stern, + * which appeared in ASPLOS 2018. + *) + +"Linux-kernel memory consistency model" + +(* + * File "lock.cat" handles locks and is experimental. + * It can be replaced by include "cos.cat" for tests that do not use locks. + *) + +include "lock.cat" + +(* Compute matching pairs of nested Srcu-lock and Srcu-unlock *) +let carry-srcu-data = (data ; [~ Srcu-unlock] ; rf)* +let pass-cookie = carry-srcu-data ; data +let srcu-rscs = ([Srcu-lock] ; pass-cookie ; [Srcu-unlock]) & loc + +(* Compute marked and plain memory accesses *) +let Marked = (~M) | IW | Once | Release | Acquire | (RMW & R) | (RMW & W) | + LKR | LKW | UL | LF | RL | RU | Srcu-lock | Srcu-unlock +let Plain = M \ Marked + +(* interrupt model *) +include "interrupts-defs.cat" + + +(* Redefine dependencies to include those carried through plain accesses *) +let carry-dep = (data ; [~ Srcu-unlock] ; rfi)* +let addr = carry-dep ; addr +let ctrl = carry-dep ; ctrl +let data = carry-dep ; data + +(*******************) +(* Basic relations *) +(*******************) + +(* Release Acquire *) +let acq-po = [Acquire] ; po ; [M] +let po-rel = [M] ; po ; [Release] +let po-unlock-lock-po = po ; [UL] ; (po|rf) ; [LKR] ; po + +(* Fences *) +let R4rmb = R \ Noreturn (* Reads for which rmb works *) +let rmb = [R4rmb] ; po ; [Rmb] ; po ; [R4rmb] +let wmb = [W] ; po ; [Wmb] ; po ; [W] +let mb = ([M] ; po ; [Mb] ; po ; [M]) | + ([M] ; po ; [Before-atomic] ; po ; [RMW] ; po? ; [M]) | + ([M] ; po? ; [RMW] ; po ; [After-atomic] ; po ; [M]) | + ([M] ; po? ; [LKW] ; po ; [After-spinlock] ; po ; [M]) | +(* + * Note: The po-unlock-lock-po relation only passes the lock to the direct + * successor, perhaps giving the impression that the ordering of the + * smp_mb__after_unlock_lock() fence only affects a single lock handover. + * However, in a longer sequence of lock handovers, the implicit + * A-cumulative release fences of lock-release ensure that any stores that + * propagate to one of the involved CPUs before it hands over the lock to + * the next CPU will also propagate to the final CPU handing over the lock + * to the CPU that executes the fence. Therefore, all those stores are + * also affected by the fence. + *) + ([M] ; po-unlock-lock-po ; + [After-unlock-lock] ; po ; [M]) | + ([M] ; po? ; [Srcu-unlock] ; po ; [After-srcu-read-unlock] ; po ; [M]) +let gp = po ; [Sync-rcu | Sync-srcu] ; po? +let strong-fence = mb | gp + +let nonrw-fence = strong-fence | po-rel | acq-po +let fence = nonrw-fence | wmb | rmb + +(**********************************) +(* Fundamental coherence ordering *) +(**********************************) + +(* Sequential Consistency Per Variable *) +let com = rf | co | fr +acyclic po-loc | com as coherence + +(* Atomic Read-Modify-Write *) +empty rmw & (fre ; coe) as atomic + +(**********************************) +(* Instruction execution ordering *) +(**********************************) + +(* Preserved Program Order *) +let dep = addr | data +let rwdep = (dep | ctrl) ; [W] +let overwrite = co | fr +let to-w = rwdep | (overwrite & int) | (addr ; [Plain] ; wmb) +let to-r = addr | (dep ; [Marked] ; rfi) +let ppo = to-r | to-w | fence | (po-unlock-lock-po & int) + +(* Propagation: Ordering from release operations and strong fences. *) +let rmw-sequence = (rf ; rmw)* +let cumul-fence = [Marked] ; ((rfe ; [Marked])? ; (strong-fence | po-rel) | wmb | + po-unlock-lock-po) ; [Marked] ; rmw-sequence +let prop = [Marked] ; (overwrite & ext)? ; cumul-fence* ; + [Marked] ; rfe? ; [Marked] + +(* + * Happens Before: Ordering from the passage of time. + * No fences needed here for prop because relation confined to one process. + *) +let hb = [Marked] ; (ppo | rfe | ((prop \ id) & int)) ; [Marked] +acyclic hb as happens-before + +(****************************************) +(* Write and fence propagation ordering *) +(****************************************) + +(* Propagation: Each non-rf link needs a strong fence. *) +let pb = prop ; strong-fence ; hb* ; [Marked] +acyclic pb as propagation + +(*******) +(* RCU *) +(*******) + +(* + * Effects of read-side critical sections proceed from the rcu_read_unlock() + * or srcu_read_unlock() backwards on the one hand, and from the + * rcu_read_lock() or srcu_read_lock() forwards on the other hand. + * + * In the definition of rcu-fence below, the po term at the left-hand side + * of each disjunct and the po? term at the right-hand end have been factored + * out. They have been moved into the definitions of rcu-link and rb. + * This was necessary in order to apply the "& loc" tests correctly. + *) +let rcu-gp = [Sync-rcu] (* Compare with gp *) +let srcu-gp = [Sync-srcu] +let rcu-rscsi = rcu-rscs^-1 +let srcu-rscsi = srcu-rscs^-1 + +(* + * The synchronize_rcu() strong fence is special in that it can order not + * one but two non-rf relations, but only in conjunction with an RCU + * read-side critical section. + *) +let rcu-link = po? ; hb* ; pb* ; prop ; po + +(* + * Any sequence containing at least as many grace periods as RCU read-side + * critical sections (joined by rcu-link) induces order like a generalized + * inter-CPU strong fence. + * Likewise for SRCU grace periods and read-side critical sections, provided + * the synchronize_srcu() and srcu_read_[un]lock() calls refer to the same + * struct srcu_struct location. + *) +let rec rcu-order = rcu-gp | srcu-gp | + (rcu-gp ; rcu-link ; rcu-rscsi) | + ((srcu-gp ; rcu-link ; srcu-rscsi) & loc) | + (rcu-rscsi ; rcu-link ; rcu-gp) | + ((srcu-rscsi ; rcu-link ; srcu-gp) & loc) | + (rcu-gp ; rcu-link ; rcu-order ; rcu-link ; rcu-rscsi) | + ((srcu-gp ; rcu-link ; rcu-order ; rcu-link ; srcu-rscsi) & loc) | + (rcu-rscsi ; rcu-link ; rcu-order ; rcu-link ; rcu-gp) | + ((srcu-rscsi ; rcu-link ; rcu-order ; rcu-link ; srcu-gp) & loc) | + (rcu-order ; rcu-link ; rcu-order) +let rcu-fence = po ; rcu-order ; po? +let fence = fence | rcu-fence +let strong-fence = strong-fence | rcu-fence + +(* rb orders instructions just as pb does *) +let rb = prop ; rcu-fence ; hb* ; pb* ; [Marked] + +irreflexive rb as rcu + +(* + * The happens-before, propagation, and rcu constraints are all + * expressions of temporal ordering. They could be replaced by + * a single constraint on an "executes-before" relation, xb: + * + * let xb = hb | pb | rb + * acyclic xb as executes-before + *) + +//let full-hb = hb | pb | rb +let CBs = Barrier | Rmb | Wmb | Mb | Sync-rcu | Sync-srcu | + Before-atomic | After-atomic | Acquire | Release | + Rcu-lock | Rcu-unlock | Srcu-lock | Srcu-unlock | + ENABLE_INTERRUPT | DISABLE_INTERRUPT +let barrier = po?;[CBs];po? | + (po ; [Release]) | ([Acquire] ; po) | (([Marked] ; po)? ; [Marked]) | [HARMLESS_RACY] + +let hbOld = hb +let hb = hb | pb | rb +include "interrupts-axioms.cat" +let hb = hbOld + + +(*********************************) +(* Plain accesses and data races *) +(*********************************) + +(* Warn about plain writes and marked accesses in the same region *) +let mixed-accesses = ([Plain & W] ; (po-loc \ barrier) ; [Marked]) | + ([Marked] ; (po-loc \ barrier) ; [Plain & W]) +flag ~empty mixed-accesses as mixed-accesses + +(* Executes-before and visibility *) +let xbstar = (hb | pb | rb)* +let vis = cumul-fence* ; rfe? ; [Marked] ; + ((strong-fence ; [Marked] ; xbstar) | (xbstar & int)) + +(* Boundaries for lifetimes of plain accesses *) +let w-pre-bounded = [Marked] ; (addr | fence)? +let r-pre-bounded = [Marked] ; (addr | nonrw-fence | + ([R4rmb] ; po ; [Rmb] ; po ; [~Noreturn]))? +let w-post-bounded = fence? ; [Marked] ; rmw-sequence +let r-post-bounded = (nonrw-fence | ([~Noreturn] ; po ; [Rmb] ; po ; [R4rmb]))? ; + [Marked] + +(* Visibility and executes-before for plain accesses *) +let ww-vis = fence | (strong-fence ; xbstar ; w-pre-bounded) | + (w-post-bounded ; vis ; w-pre-bounded) +let wr-vis = fence | (strong-fence ; xbstar ; r-pre-bounded) | + (w-post-bounded ; vis ; r-pre-bounded) +let rw-xbstar = fence | (r-post-bounded ; xbstar ; w-pre-bounded) + +(* Potential races *) +let pre-race = ext & ((Plain * M) | ((M \ IW) * Plain)) + +(* Coherence requirements for plain accesses *) +let wr-incoh = pre-race & rf & rw-xbstar^-1 +let rw-incoh = pre-race & fr & wr-vis^-1 +let ww-incoh = pre-race & co & ww-vis^-1 +empty (wr-incoh | rw-incoh | ww-incoh) as plain-coherence + +(* Actual races *) +let ww-nonrace = ww-vis & ((Marked * W) | rw-xbstar) & ((W * Marked) | wr-vis) +let ww-race = (pre-race & co) \ ww-nonrace +let wr-race = (pre-race & (co? ; rf)) \ wr-vis \ rw-xbstar^-1 +let rw-race = (pre-race & fr) \ rw-xbstar + +flag ~empty (ww-race | wr-race | rw-race) as data-race diff --git a/cat/vmm-interrupts-alt.cat b/cat/vmm-interrupts-alt.cat new file mode 100644 index 0000000000..1b6d5bdfca --- /dev/null +++ b/cat/vmm-interrupts-alt.cat @@ -0,0 +1,52 @@ +include "interrupts-defs.cat" + +let Marked = RLX | ACQ | REL | SC +let Plain = ~Marked +let Acq = ACQ | (SC & R) +let Rel = REL | (SC & W) + +(** Atomicity **) +empty rmw & (fre;coe) + +(** SC per location **) +acyclic co | rf | fr | po-loc + +(** Ordering **) +let dep = (data;rfi | addr | ctrl)*;(ctrl | addr | data) + +(* Plain writes can be elided and therefore are generally not ordered by things that order writes *) +let bob = [Acq];po | po;[Rel] | [SC];po;[SC] | po;[SC & F];po | [R];po;[Acq & F];po | po;[Rel & F];po;[W & Marked] +let ppo = bob | [Marked];(dep | coi | fri);[W & Marked] + +(* + If there is no w-race, plain writes are slightly better-behaved: if they are read-from, then either + 1) they exist and provide ordering, or + 2) an older store with the same value exists and that store is also a candidate for the read, in which case the ordering provided in this graph is ignored in the graph in which the older store is observed + + However, the plain writes may not exist in the form supposed by dependencies etc. + This is especially true for data dependencies, which may be speculatively elided. + Only ctrl and addr dependencies are not elided, because the compiler is not allowed to speculatively modify memory regions (which might be protected by a lock owned by another thread). +*) +let WRF-ppo = po;[Rel & F];po;[W & Plain] | [Marked];(ctrl | addr);[W & Plain] + +let hb = ppo | WRF-ppo | rfe | fre | coe +acyclic hb + +(** Interrupt Axioms **) +let barrier = po?; [cb | Marked | F | ENABLE_INTERRUPT | DISABLE_INTERRUPT]; po? | [HARMLESS_RACY] +include "interrupts-axioms.cat" + +(** Data Races **) + +let w-race-fix = ([Marked] | ppo);hb+;([Marked] | ppo) + +let w-race = coe \ w-race-fix +let w-racy = [domain(w-race)] | [range(w-race)] +flag ~empty w-racy as w-data-race + +let r-race-fix = w-race-fix | ([Marked] | ppo);hb+; WRF-ppo + +let r-race = (fre | rfe) \ r-race-fix +let r-racy = [domain(r-race)] | [range(r-race)] +let obs-dep = (data;rfi)*;(ctrl | addr | data;rfe) +flag ~empty [domain(obs-dep)] & r-racy as r-data-race From e90aeb5473d165e251e5d36eedd044be3167c0ab Mon Sep 17 00:00:00 2001 From: Thomas Haas Date: Mon, 31 Mar 2025 17:35:03 +0200 Subject: [PATCH 11/33] Added CallEvent interface --- .../dartagnan/program/event/CallEvent.java | 35 ++++++++ .../program/event/common/CallBase.java | 85 +++++++++++++++++++ .../program/event/functions/FunctionCall.java | 69 ++------------- .../processing/DynamicSpinLoopDetection.java | 7 +- .../processing/NaiveDevirtualisation.java | 30 +++---- 5 files changed, 143 insertions(+), 83 deletions(-) create mode 100644 dartagnan/src/main/java/com/dat3m/dartagnan/program/event/CallEvent.java create mode 100644 dartagnan/src/main/java/com/dat3m/dartagnan/program/event/common/CallBase.java diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/CallEvent.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/CallEvent.java new file mode 100644 index 0000000000..4b32797508 --- /dev/null +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/CallEvent.java @@ -0,0 +1,35 @@ +package com.dat3m.dartagnan.program.event; + +import com.dat3m.dartagnan.expression.Expression; +import com.dat3m.dartagnan.expression.type.FunctionType; +import com.dat3m.dartagnan.program.Function; +import com.google.common.base.Preconditions; + +import java.util.List; + +/* + A CallEvent is an event that abstractly calls a "callable" (i.e., function) with arguments. + Currently, + - The only callables are functions + - The only call events are function calls + TODO: + ThreadCreation shall be a callable. + */ +public interface CallEvent extends RegReader { + + FunctionType getCallType(); + Expression getCallTarget(); + List getArguments(); + + void setArgument(int index, Expression argument); + void setCallTarget(Expression callTarget); + + default boolean isDirectCall() { return getCallTarget() instanceof Function; } + default Function getDirectCallTarget() { + Preconditions.checkState(isDirectCall()); + return (Function) getCallTarget(); + } + + @Override + CallEvent getCopy(); +} diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/common/CallBase.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/common/CallBase.java new file mode 100644 index 0000000000..e07798019c --- /dev/null +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/common/CallBase.java @@ -0,0 +1,85 @@ +package com.dat3m.dartagnan.program.event.common; + +import com.dat3m.dartagnan.expression.Expression; +import com.dat3m.dartagnan.expression.ExpressionVisitor; +import com.dat3m.dartagnan.expression.Type; +import com.dat3m.dartagnan.expression.type.FunctionType; +import com.dat3m.dartagnan.program.Function; +import com.dat3m.dartagnan.program.Register; +import com.dat3m.dartagnan.program.Register.UsageType; +import com.dat3m.dartagnan.program.event.AbstractEvent; +import com.dat3m.dartagnan.program.event.CallEvent; +import com.google.common.base.Preconditions; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +public abstract class CallBase extends AbstractEvent implements CallEvent { + + protected FunctionType funcType; + protected Expression callTarget; + protected List arguments; + + protected CallBase(FunctionType funcType, Expression funcPtr, List arguments) { + final List paramTypes = funcType.getParameterTypes(); + Preconditions.checkArgument( + (!funcType.isVarArgs() && arguments.size() == paramTypes.size()) + || (funcType.isVarArgs() && arguments.size() >= paramTypes.size()) + ); + for (int i = 0; i < paramTypes.size(); i++) { + Preconditions.checkArgument(arguments.get(i).getType().equals(paramTypes.get(i))); + } + this.funcType = funcType; + this.callTarget = funcPtr; + this.arguments = new ArrayList<>(arguments); + } + + protected CallBase(CallBase other) { + super(other); + this.funcType = other.funcType; + this.callTarget = other.callTarget; + this.arguments = new ArrayList<>(other.arguments); + } + + public boolean isDirectCall() { return callTarget instanceof Function; } + public Function getCalledFunction() { return (Function) callTarget; } + public FunctionType getCallType() { return funcType; } + public Expression getCallTarget() { return callTarget; } + public List getArguments() { return arguments; } + + public void setArgument(int index, Expression argument) { + arguments.set(index, argument); + } + + public void setCallTarget(Expression callTarget) { + if (callTarget instanceof Function func) { + Preconditions.checkArgument(func.getFunctionType() == funcType, + "Call target %s has mismatching function type: expected %s", callTarget, funcType); + } + this.callTarget = callTarget; + } + + @Override + public abstract CallEvent getCopy(); + + @Override + public Set getRegisterReads() { + final Set regReads = new HashSet<>(); + Register.collectRegisterReads(callTarget, UsageType.ADDR, regReads); + Register.collectRegisterReads(arguments, UsageType.DATA, regReads); + return regReads; + } + + protected String argumentsToString() { + return arguments.stream().map(Expression::toString).collect(Collectors.joining(", ")); + } + + @Override + public void transformExpressions(ExpressionVisitor exprTransformer) { + callTarget = callTarget.accept(exprTransformer); + arguments.replaceAll(expression -> expression.accept(exprTransformer)); + } +} diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/functions/FunctionCall.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/functions/FunctionCall.java index 053765d23d..951035a584 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/functions/FunctionCall.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/functions/FunctionCall.java @@ -1,88 +1,29 @@ package com.dat3m.dartagnan.program.event.functions; import com.dat3m.dartagnan.expression.Expression; -import com.dat3m.dartagnan.expression.ExpressionVisitor; -import com.dat3m.dartagnan.expression.Type; import com.dat3m.dartagnan.expression.type.FunctionType; import com.dat3m.dartagnan.program.Function; -import com.dat3m.dartagnan.program.Register; -import com.dat3m.dartagnan.program.Register.UsageType; -import com.dat3m.dartagnan.program.event.AbstractEvent; +import com.dat3m.dartagnan.program.event.CallEvent; import com.dat3m.dartagnan.program.event.RegReader; -import com.google.common.base.Preconditions; +import com.dat3m.dartagnan.program.event.common.CallBase; -import java.util.ArrayList; -import java.util.HashSet; import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; -public abstract class FunctionCall extends AbstractEvent implements RegReader { - - protected FunctionType funcType; - protected Expression callTarget; - protected List arguments; +public abstract class FunctionCall extends CallBase implements RegReader, CallEvent { protected FunctionCall(FunctionType funcType, Expression funcPtr, List arguments) { - final List paramTypes = funcType.getParameterTypes(); - Preconditions.checkArgument( - (!funcType.isVarArgs() && arguments.size() == paramTypes.size()) - || (funcType.isVarArgs() && arguments.size() >= paramTypes.size()) - ); - for (int i = 0; i < paramTypes.size(); i++) { - Preconditions.checkArgument(arguments.get(i).getType().equals(paramTypes.get(i))); - } - this.funcType = funcType; - this.callTarget = funcPtr; - this.arguments = new ArrayList<>(arguments); + super(funcType, funcPtr, arguments); } protected FunctionCall(Function func, List arguments) { this(func.getFunctionType(), func, arguments); } - protected FunctionCall(FunctionCall other) { + protected FunctionCall(CallBase other) { super(other); - this.funcType = other.funcType; - this.callTarget = other.callTarget; - this.arguments = new ArrayList<>(other.arguments); - } - - public boolean isDirectCall() { return callTarget instanceof Function; } - public Function getCalledFunction() { return (Function) callTarget; } - public FunctionType getCallType() { return funcType; } - public Expression getCallTarget() { return callTarget; } - public List getArguments() { return arguments; } - - public void setArgument(int index, Expression argument) { - arguments.set(index, argument); - } - - public void setCallTarget(Expression callTarget) { - if (callTarget instanceof Function func) { - Preconditions.checkArgument(func.getFunctionType() == funcType, - "Call target %s has mismatching function type: expected %s", callTarget, funcType); - } - this.callTarget = callTarget; } @Override public abstract FunctionCall getCopy(); - @Override - public Set getRegisterReads() { - final Set regReads = new HashSet<>(); - arguments.forEach(arg -> Register.collectRegisterReads(arg, UsageType.DATA, regReads)); - return regReads; - } - - protected String argumentsToString() { - return arguments.stream().map(Expression::toString).collect(Collectors.joining(", ")); - } - - @Override - public void transformExpressions(ExpressionVisitor exprTransformer) { - callTarget = callTarget.accept(exprTransformer); - arguments.replaceAll(expression -> expression.accept(exprTransformer)); - } } diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/DynamicSpinLoopDetection.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/DynamicSpinLoopDetection.java index dc0395cff1..9cb2f678db 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/DynamicSpinLoopDetection.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/DynamicSpinLoopDetection.java @@ -10,7 +10,6 @@ import com.dat3m.dartagnan.program.analysis.LiveRegistersAnalysis; import com.dat3m.dartagnan.program.analysis.LoopAnalysis; import com.dat3m.dartagnan.program.event.*; -import com.dat3m.dartagnan.program.event.functions.FunctionCall; import com.google.common.base.Preconditions; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; @@ -96,10 +95,10 @@ private void collectSideEffects(LoopData loop, LiveRegistersAnalysis liveRegsAna if (cur instanceof RegWriter writer) { writtenRegisters.add(writer.getResultRegister()); } - if (cur.hasTag(Tag.WRITE) || (cur instanceof FunctionCall call && + if (cur.hasTag(Tag.WRITE) || (cur instanceof CallEvent call && (!call.isDirectCall() - || !call.getCalledFunction().isIntrinsic() - || call.getCalledFunction().getIntrinsicInfo().writesMemory()))) { + || !call.getDirectCallTarget().isIntrinsic() + || call.getDirectCallTarget().getIntrinsicInfo().writesMemory()))) { // We assume side effects for all writes, writing intrinsics, and non-intrinsic function calls. loop.globalSideEffects.add(cur); } diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/NaiveDevirtualisation.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/NaiveDevirtualisation.java index c49c585a26..76eb3fec7b 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/NaiveDevirtualisation.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/NaiveDevirtualisation.java @@ -12,12 +12,12 @@ import com.dat3m.dartagnan.program.Function; import com.dat3m.dartagnan.program.IRHelper; import com.dat3m.dartagnan.program.Program; +import com.dat3m.dartagnan.program.event.CallEvent; import com.dat3m.dartagnan.program.event.Event; import com.dat3m.dartagnan.program.event.EventFactory; import com.dat3m.dartagnan.program.event.RegReader; import com.dat3m.dartagnan.program.event.core.CondJump; import com.dat3m.dartagnan.program.event.core.Label; -import com.dat3m.dartagnan.program.event.functions.FunctionCall; import com.dat3m.dartagnan.program.memory.Memory; import com.dat3m.dartagnan.program.memory.MemoryObject; import com.google.common.base.Verify; @@ -116,8 +116,8 @@ private boolean assignAddressToFunction(Function func, Map } private void applyTransformerToEvent(Event e, ExpressionVisitor transformer) { - if (e instanceof FunctionCall call) { - if (call.isDirectCall() && call.getCalledFunction().getIntrinsicInfo() == Intrinsics.Info.P_THREAD_CREATE) { + if (e instanceof CallEvent call) { + if (call.isDirectCall() && call.getDirectCallTarget().getIntrinsicInfo() == Intrinsics.Info.P_THREAD_CREATE) { // We avoid transforming functions passed as call target to pthread_create // However, we still collect the last argument of the call, because it // is the argument passed to the created thread (which might be a pointer to a function). @@ -135,7 +135,7 @@ private void devirtualise(Function function, Map func2Addr final ExpressionFactory expressions = ExpressionFactory.getInstance(); int devirtCounter = 0; - for (FunctionCall call : function.getEvents(FunctionCall.class)) { + for (CallEvent call : function.getEvents(CallEvent.class)) { if (!needsDevirtualization(call)) { continue; } @@ -186,18 +186,18 @@ private void devirtualise(Function function, Map func2Addr } } - private boolean needsDevirtualization(FunctionCall call) { + private boolean needsDevirtualization(CallEvent call) { return !call.isDirectCall() || - (call.getCalledFunction().getIntrinsicInfo() == Intrinsics.Info.P_THREAD_CREATE + (call.getDirectCallTarget().getIntrinsicInfo() == Intrinsics.Info.P_THREAD_CREATE && !(call.getArguments().get(2) instanceof Function)); } - private List getPossibleTargets(FunctionCall call, Map func2AddressMap) { + private List getPossibleTargets(CallEvent call, Map func2AddressMap) { final List possibleTargets; if (!call.isDirectCall()) { possibleTargets = func2AddressMap.keySet().stream() .filter(f -> f.getFunctionType() == call.getCallType()).collect(Collectors.toList()); - } else if (call.getCalledFunction().getIntrinsicInfo() == Intrinsics.Info.P_THREAD_CREATE) { + } else if (call.getDirectCallTarget().getIntrinsicInfo() == Intrinsics.Info.P_THREAD_CREATE) { final TypeFactory types = TypeFactory.getInstance(); final Type ptrType = types.getPointerType(); final Type threadType = types.getFunctionType(ptrType, List.of(ptrType)); @@ -211,26 +211,26 @@ private List getPossibleTargets(FunctionCall call, Map Date: Tue, 1 Apr 2025 14:05:42 +0200 Subject: [PATCH 12/33] - Added DynamicThreadCreate (pthread_create compiles to this one) - Simplified NaiveDevirtualisation: no special-casing for pthread_create needed - Added ThreadJoin as proper blocking event (pthread_join compiles to this one) - Refactored & generalized ThreadCreation code. --- .../dartagnan/encoding/ProgramEncoder.java | 32 ++- .../dartagnan/program/event/EventFactory.java | 15 ++ .../event/core/threading/ThreadJoin.java | 57 ++++ .../event/lang/dat3m/DynamicThreadCreate.java | 49 ++++ .../processing/CoreCodeVerification.java | 3 +- .../program/processing/Intrinsics.java | 62 +++-- .../processing/NaiveDevirtualisation.java | 32 +-- .../program/processing/ProcessingManager.java | 29 +- .../program/processing/ThreadCreation.java | 254 ++++++++++-------- 9 files changed, 357 insertions(+), 176 deletions(-) create mode 100644 dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadJoin.java create mode 100644 dartagnan/src/main/java/com/dat3m/dartagnan/program/event/lang/dat3m/DynamicThreadCreate.java diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/ProgramEncoder.java b/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/ProgramEncoder.java index 0f9d063bf7..3d81b83109 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/ProgramEncoder.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/ProgramEncoder.java @@ -14,6 +14,7 @@ import com.dat3m.dartagnan.program.analysis.ReachingDefinitionsAnalysis; import com.dat3m.dartagnan.program.event.*; import com.dat3m.dartagnan.program.event.core.*; +import com.dat3m.dartagnan.program.event.core.threading.ThreadJoin; import com.dat3m.dartagnan.program.event.core.threading.ThreadStart; import com.dat3m.dartagnan.program.memory.Memory; import com.dat3m.dartagnan.program.memory.MemoryObject; @@ -86,12 +87,14 @@ public BooleanFormula encodeFullProgram() { return context.getBooleanFormulaManager().and( encodeControlBarriers(), encodeNamedControlBarriers(), + encodeThreadJoining(), encodeConstants(), encodeMemory(), encodeControlFlow(), encodeFinalRegisterValues(), encodeFilter(), - encodeDependencies()); + encodeDependencies() + ); } public BooleanFormula encodeConstants() { @@ -148,6 +151,15 @@ private BooleanFormula threadHasTerminated(Thread thread) { ); } + private BooleanFormula threadHasTerminatedNormally(Thread thread) { + final BooleanFormulaManager bmgr = context.getBooleanFormulaManager(); + final BooleanFormula exception = thread.getEvents(CondJump.class).stream() + .filter(jump -> jump.hasTag(Tag.EXCEPTIONAL_TERMINATION)) + .map(context::jumpTaken) + .reduce(bmgr.makeFalse(), bmgr::or); + return bmgr.and(threadHasTerminated(thread), bmgr.not(exception)); + } + // NOTE: Stuckness also considers bound events, i.e., insufficiently unrolled loops. private BooleanFormula threadIsStuckInLoop(Thread thread) { final BooleanFormulaManager bmgr = context.getBooleanFormulaManager(); @@ -235,6 +247,24 @@ private BooleanFormula encodeConsistentThreadCF(Thread thread) { return bmgr.and(enc); } + private BooleanFormula encodeThreadJoining() { + final Program program = context.getTask().getProgram(); + final BooleanFormulaManager bmgr = context.getBooleanFormulaManager(); + + List enc = new ArrayList<>(); + for (ThreadJoin join : program.getThreadEvents(ThreadJoin.class)) { + final BooleanFormula joinCf = context.controlFlow(join); + final BooleanFormula joinExec = context.execution(join); + final BooleanFormula terminated = threadHasTerminatedNormally(join.getJoinThread()); + + enc.add(bmgr.implication(joinExec, terminated)); + enc.add(bmgr.implication(bmgr.and(terminated, joinCf), joinExec)); + // TODO: Encode retVal. + } + + return bmgr.and(enc); + } + private BooleanFormula encodeControlBarriers() { BooleanFormulaManager bmgr = context.getBooleanFormulaManager(); BooleanFormula enc = bmgr.makeTrue(); diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/EventFactory.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/EventFactory.java index 3e7e10ffcd..50a5550561 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/EventFactory.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/EventFactory.java @@ -30,12 +30,15 @@ import com.dat3m.dartagnan.program.event.core.special.StateSnapshot; import com.dat3m.dartagnan.program.event.core.threading.ThreadArgument; import com.dat3m.dartagnan.program.event.core.threading.ThreadCreate; +import com.dat3m.dartagnan.program.event.core.threading.ThreadJoin; import com.dat3m.dartagnan.program.event.core.threading.ThreadStart; import com.dat3m.dartagnan.program.event.functions.AbortIf; import com.dat3m.dartagnan.program.event.functions.Return; import com.dat3m.dartagnan.program.event.functions.ValueFunctionCall; import com.dat3m.dartagnan.program.event.functions.VoidFunctionCall; import com.dat3m.dartagnan.program.event.lang.catomic.*; +import com.dat3m.dartagnan.program.event.lang.dat3m.DynamicThreadCreate; +import com.dat3m.dartagnan.program.event.lang.dat3m.DynamicThreadJoin; import com.dat3m.dartagnan.program.event.lang.linux.*; import com.dat3m.dartagnan.program.event.lang.llvm.*; import com.dat3m.dartagnan.program.event.lang.pthread.InitLock; @@ -315,10 +318,22 @@ public static ExecutionStatus newExecutionStatusWithDependencyTracking(Register // ------------------------------------------ Threading events ------------------------------------------ + public static DynamicThreadCreate newDynamicThreadCreate(Register tidRegister, FunctionType funcType, Expression functionPtr, List arguments) { + return new DynamicThreadCreate(tidRegister, funcType, functionPtr, arguments); + } + + public static DynamicThreadJoin newDynamicThreadJoin(Register resultRegister, Expression tidExpr) { + return new DynamicThreadJoin(resultRegister, tidExpr); + } + public static ThreadCreate newThreadCreate(List arguments) { return new ThreadCreate(arguments); } + public static ThreadJoin newThreadJoin(Register resultRegister, Thread thread) { + return new ThreadJoin(resultRegister, thread); + } + public static ThreadArgument newThreadArgument(Register resultReg, ThreadCreate creator, int argIndex) { return new ThreadArgument(resultReg, creator, argIndex); } diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadJoin.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadJoin.java new file mode 100644 index 0000000000..44637a6151 --- /dev/null +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadJoin.java @@ -0,0 +1,57 @@ +package com.dat3m.dartagnan.program.event.core.threading; + +import com.dat3m.dartagnan.program.Register; +import com.dat3m.dartagnan.program.Thread; +import com.dat3m.dartagnan.program.event.AbstractEvent; +import com.dat3m.dartagnan.program.event.BlockingEvent; +import com.dat3m.dartagnan.program.event.EventVisitor; +import com.dat3m.dartagnan.program.event.RegWriter; +import com.google.common.base.Preconditions; + +public class ThreadJoin extends AbstractEvent implements RegWriter, BlockingEvent { + + protected Register resultRegister; + protected Thread joinThread; + + public ThreadJoin(Register resultRegister, Thread joinThread) { + Preconditions.checkArgument(resultRegister.getType().equals(joinThread.getFunctionType().getReturnType())); + this.resultRegister = resultRegister; + this.joinThread = joinThread; + } + + protected ThreadJoin(ThreadJoin other) { + super(other); + this.resultRegister = other.resultRegister; + this.joinThread = null; + } + + @Override + public Register getResultRegister() { + return this.resultRegister; + } + + @Override + public void setResultRegister(Register reg) { + this.resultRegister = reg; + } + + public Thread getJoinThread() { return joinThread; } + public void setJoinThread(Thread joinThread) { this.joinThread = joinThread; } + + @Override + protected String defaultString() { + return String.format("%s <- ThreadJoin(%s)", resultRegister, joinThread); + } + + @Override + public ThreadJoin getCopy() { + return new ThreadJoin(this); + } + + @Override + public T accept(EventVisitor visitor) { + // TODO + return visitor.visitEvent(this); + } + +} diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/lang/dat3m/DynamicThreadCreate.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/lang/dat3m/DynamicThreadCreate.java new file mode 100644 index 0000000000..36b8cf7eae --- /dev/null +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/lang/dat3m/DynamicThreadCreate.java @@ -0,0 +1,49 @@ +package com.dat3m.dartagnan.program.event.lang.dat3m; + +import com.dat3m.dartagnan.expression.Expression; +import com.dat3m.dartagnan.expression.type.FunctionType; +import com.dat3m.dartagnan.expression.type.IntegerType; +import com.dat3m.dartagnan.program.Register; +import com.dat3m.dartagnan.program.event.RegWriter; +import com.dat3m.dartagnan.program.event.common.CallBase; +import com.google.common.base.Preconditions; + +import java.util.List; + +public class DynamicThreadCreate extends CallBase implements RegWriter { + + protected Register tidRegister; + + public DynamicThreadCreate(Register tidRegister, FunctionType funcType, Expression funcPtr, List arguments) { + super(funcType, funcPtr, arguments); + Preconditions.checkArgument(tidRegister.getType() instanceof IntegerType); + this.tidRegister = Preconditions.checkNotNull(tidRegister); + } + + protected DynamicThreadCreate(DynamicThreadCreate other) { + super(other); + this.tidRegister = other.tidRegister; + } + + @Override + public Register getResultRegister() { + return tidRegister; + } + + @Override + public void setResultRegister(Register reg) { + Preconditions.checkArgument(reg.getType() instanceof IntegerType); + this.tidRegister = Preconditions.checkNotNull(reg); + } + + @Override + protected String defaultString() { + final String func = isDirectCall() ? getDirectCallTarget().getName() : getCallTarget().toString(); + return String.format("%s <- DynamicThreadCreate(func=%s, args={ %s })", getResultRegister(), func, argumentsToString()); + } + + @Override + public DynamicThreadCreate getCopy() { + return new DynamicThreadCreate(this); + } +} diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/CoreCodeVerification.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/CoreCodeVerification.java index 198b8db972..2dee27a246 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/CoreCodeVerification.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/CoreCodeVerification.java @@ -8,6 +8,7 @@ import com.dat3m.dartagnan.program.event.core.special.StateSnapshot; import com.dat3m.dartagnan.program.event.core.threading.ThreadArgument; import com.dat3m.dartagnan.program.event.core.threading.ThreadCreate; +import com.dat3m.dartagnan.program.event.core.threading.ThreadJoin; import com.dat3m.dartagnan.program.event.core.threading.ThreadStart; import com.dat3m.dartagnan.program.event.lang.svcomp.BeginAtomic; import com.dat3m.dartagnan.program.event.lang.svcomp.EndAtomic; @@ -37,7 +38,7 @@ public static CoreCodeVerification fromConfig(Configuration config) { CondJump.class, IfAsJump.class, ExecutionStatus.class, Label.class, Local.class, Skip.class, RMWStore.class, RMWStoreExclusive.class, Alloc.class, Assume.class, Assert.class, - ThreadCreate.class, ThreadArgument.class, ThreadStart.class, + ThreadCreate.class, ThreadJoin.class, ThreadArgument.class, ThreadStart.class, ControlBarrier.class, NamedBarrier.class, BeginAtomic.class, EndAtomic.class, StateSnapshot.class diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java index 0f2e0eb209..0739d43293 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java @@ -6,6 +6,7 @@ import com.dat3m.dartagnan.expression.Type; import com.dat3m.dartagnan.expression.integers.IntBinaryOp; import com.dat3m.dartagnan.expression.integers.IntLiteral; +import com.dat3m.dartagnan.expression.type.FunctionType; import com.dat3m.dartagnan.expression.type.IntegerType; import com.dat3m.dartagnan.expression.type.TypeFactory; import com.dat3m.dartagnan.program.Function; @@ -21,6 +22,7 @@ import com.dat3m.dartagnan.program.event.core.Local; import com.dat3m.dartagnan.program.event.functions.FunctionCall; import com.dat3m.dartagnan.program.event.functions.ValueFunctionCall; +import com.dat3m.dartagnan.program.event.lang.dat3m.DynamicThreadCreate; import com.dat3m.dartagnan.program.event.lang.svcomp.BeginAtomic; import com.dat3m.dartagnan.program.memory.MemoryObject; import com.google.common.collect.ImmutableList; @@ -37,6 +39,7 @@ import java.util.stream.Collectors; import static com.dat3m.dartagnan.configuration.OptionNames.REMOVE_ASSERTION_OF_TYPE; +import static com.dat3m.dartagnan.program.event.EventFactory.*; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; @@ -65,6 +68,7 @@ private enum AssertionType { USER, OVERFLOW, INVALIDDEREF } //FIXME This might have concurrency issues if processing multiple programs at the same time. private BeginAtomic currentAtomicBegin; + private long uniqueId = 0; private Intrinsics() { } @@ -109,7 +113,7 @@ public ProgramProcessor lateInliningPass() { public enum Info { // --------------------------- pthread threading --------------------------- - P_THREAD_CREATE("pthread_create", true, false, true, false, null), + P_THREAD_CREATE("pthread_create", true, false, true, true, Intrinsics::inlinePthreadCreate), P_THREAD_EXIT("pthread_exit", false, false, false, false, null), P_THREAD_JOIN(List.of("pthread_join", "_pthread_join", "__pthread_join"), false, true, false, false, null), P_THREAD_BARRIER_WAIT("pthread_barrier_wait", false, false, true, true, Intrinsics::inlineAsZero), @@ -396,6 +400,32 @@ private List inlineAtomicEnd(FunctionCall ignored) { return List.of(EventFactory.Svcomp.newEndAtomic(checkNotNull(currentAtomicBegin))); } + private final static FunctionType PTHREAD_THREAD_TYPE = types.getFunctionType( + types.getPointerType(), List.of(types.getPointerType()) + ); + + private List inlinePthreadCreate(FunctionCall call) { + final List arguments = call.getArguments(); + assert arguments.size() == 4; + final Expression pidResultAddress = arguments.get(0); + //final Expression attributes = arguments.get(1); + final Expression targetFunction = arguments.get(2); + final Expression argument = arguments.get(3); + + final Register resultRegister = getResultRegister(call); + assert resultRegister.getType() instanceof IntegerType; + + final Register tidReg = call.getFunction().getOrNewRegister("__tid#" + (uniqueId++), types.getArchType()); + final DynamicThreadCreate createEvent = newDynamicThreadCreate(tidReg, PTHREAD_THREAD_TYPE, targetFunction, List.of(argument)); + + return eventSequence( + createEvent, + newStore(pidResultAddress, tidReg), + // TODO: Allow to return failure value (!= 0) + newLocal(resultRegister, expressions.makeZero((IntegerType) resultRegister.getType())) + ); + } + private List inlinePthreadEqual(FunctionCall call) { final Register resultRegister = getResultRegisterAndCheckArguments(2, call); final Expression leftId = call.getArguments().get(0); @@ -431,7 +461,7 @@ private List inlinePthreadAttr(FunctionCall call) { if (initial || suffix.equals("destroy")) { final Expression flag = expressions.makeValue(initial); return List.of( - EventFactory.newStore(attrAddress, flag), + newStore(attrAddress, flag), assignSuccess(errorRegister) ); } @@ -453,7 +483,7 @@ private List inlinePthreadCondInit(FunctionCall call) { //final Expression attributes = call.getArguments().get(1); final Expression initializedState = expressions.makeTrue(); return List.of( - EventFactory.newStore(condAddress, initializedState), + newStore(condAddress, initializedState), assignSuccess(errorRegister) ); } @@ -464,7 +494,7 @@ private List inlinePthreadCondDestroy(FunctionCall call) { final Expression condAddress = call.getArguments().get(0); final Expression finalizedState = expressions.makeFalse(); return List.of( - EventFactory.newStore(condAddress, finalizedState), + newStore(condAddress, finalizedState), assignSuccess(errorRegister) ); } @@ -527,7 +557,7 @@ private List inlinePthreadCondAttr(FunctionCall call) { final Expression attrAddress = call.getArguments().get(0); checkUnknownIntrinsic(init || destroy, call); return List.of( - EventFactory.newStore(attrAddress, expressions.makeValue(init)), + newStore(attrAddress, expressions.makeValue(init)), assignSuccess(errorRegister) ); } @@ -546,8 +576,8 @@ private List inlinePthreadKeyCreate(FunctionCall call) { //TODO call destructor at each thread's normal exit return List.of( EventFactory.newAlloc(storageAddressRegister, types.getArchType(), size, true, true), - EventFactory.newStore(keyAddress, storageAddressRegister), - EventFactory.newStore(expressions.makeAdd(storageAddressRegister, destructorOffset), destructor), + newStore(keyAddress, storageAddressRegister), + newStore(expressions.makeAdd(storageAddressRegister, destructorOffset), destructor), assignSuccess(errorRegister) ); } @@ -582,7 +612,7 @@ private List inlinePthreadSetSpecific(FunctionCall call) { final int threadID = call.getThread().getId(); final Expression offset = expressions.makeValue(threadID, (IntegerType) key.getType()); return List.of( - EventFactory.newStore(expressions.makeAdd(key, offset), value), + newStore(expressions.makeAdd(key, offset), value), assignSuccess(errorRegister) ); } @@ -669,7 +699,7 @@ private List inlinePthreadMutexUnlock(FunctionCall call) { final Expression lockAddress = call.getArguments().get(0); final Expression locked = expressions.makeOne(type); final Expression unlocked = expressions.makeZero(type); - return EventFactory.eventSequence( + return eventSequence( EventFactory.Llvm.newLoad(oldValueRegister, lockAddress, Tag.C11.MO_RELAXED), notToInline.contains(AssertionType.USER) ? null : EventFactory.newAssert(expressions.makeEQ(oldValueRegister, locked), "Unlocking an already unlocked mutex"), EventFactory.Llvm.newStore(lockAddress, unlocked, Tag.C11.MO_RELEASE), @@ -689,7 +719,7 @@ private List inlinePthreadMutexAttr(FunctionCall call) { final Expression attrAddress = call.getArguments().get(0); if (init || destroy) { return List.of( - EventFactory.newStore(attrAddress, expressions.makeValue(init)), + newStore(attrAddress, expressions.makeValue(init)), assignSuccess(errorRegister) ); } @@ -711,7 +741,7 @@ private List inlinePthreadRwlockInit(FunctionCall call) { final Expression lockAddress = call.getArguments().get(0); //final Expression attributes = call.getArguments().get(1); return List.of( - EventFactory.newStore(lockAddress, getRwlockUnlockedValue()), + newStore(lockAddress, getRwlockUnlockedValue()), assignSuccess(errorRegister) ); } @@ -868,7 +898,7 @@ private List inlinePthreadRwlockAttr(FunctionCall call) { final Expression attrAddress = call.getArguments().get(0); if (init || destroy) { return List.of( - EventFactory.newStore(attrAddress, expressions.makeValue(init)), + newStore(attrAddress, expressions.makeValue(init)), assignSuccess(errorRegister) ); } @@ -1375,7 +1405,7 @@ private List inlineMemCpy(FunctionCall call) { replacement.addAll(List.of( EventFactory.newLoad(reg, srcAddr), - EventFactory.newStore(destAddr, reg) + newStore(destAddr, reg) )); } if (call instanceof ValueFunctionCall valueCall) { @@ -1465,7 +1495,7 @@ private List inlineMemCpyS(FunctionCall call) { final Expression destAddr = expressions.makeAdd(dest, offset); final Expression zero = expressions.makeZero(types.getArchType()); replacement.add( - EventFactory.newStore(destAddr, zero) + newStore(destAddr, zero) ); } replacement.addAll(List.of( @@ -1485,7 +1515,7 @@ private List inlineMemCpyS(FunctionCall call) { replacement.addAll(List.of( EventFactory.newLoad(reg, srcAddr), - EventFactory.newStore(destAddr, reg) + newStore(destAddr, reg) )); } replacement.addAll(List.of( @@ -1567,7 +1597,7 @@ private List inlineMemSet(FunctionCall call) { final Expression offset = expressions.makeValue(i, types.getArchType()); final Expression destAddr = expressions.makeAdd(dest, offset); - replacement.add(EventFactory.newStore(destAddr, zero)); + replacement.add(newStore(destAddr, zero)); } if (call instanceof ValueFunctionCall valueCall) { // std.memset returns the destination address, llvm.memset has no return value diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/NaiveDevirtualisation.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/NaiveDevirtualisation.java index 76eb3fec7b..72f265ee51 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/NaiveDevirtualisation.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/NaiveDevirtualisation.java @@ -3,7 +3,6 @@ import com.dat3m.dartagnan.expression.Expression; import com.dat3m.dartagnan.expression.ExpressionFactory; import com.dat3m.dartagnan.expression.ExpressionVisitor; -import com.dat3m.dartagnan.expression.Type; import com.dat3m.dartagnan.expression.integers.IntLiteral; import com.dat3m.dartagnan.expression.processing.ExprTransformer; import com.dat3m.dartagnan.expression.processing.ExpressionInspector; @@ -29,18 +28,13 @@ import java.util.stream.Collectors; /* - This pass performs "devirtualisation" (replacing indirect/dynamic function calls by direct/static calls). + This pass performs "devirtualisation" (replacing indirect/dynamic calls by direct/static calls). It does so in the following way: - Every non-standard use (i.e., no direct call) of a function expression is registered. - All registered functions get an address value assigned. - All non-standard uses are replaced by their address values. - Every indirect call is replaced by a switch statement over all registered functions that have a matching type. Each case of the switch statement contains a direct call to the corresponding function. - - TODO: We also need to devirtualize intrinsic functions that expect function pointers. - For now, we only devirtualize pthread_create based on its third parameter. - More generally, we could extend IntrinsicInfo to tell for each intrinsic which parameters are function pointers and - need devirtualization. */ public class NaiveDevirtualisation implements ProgramProcessor { @@ -117,15 +111,7 @@ private boolean assignAddressToFunction(Function func, Map private void applyTransformerToEvent(Event e, ExpressionVisitor transformer) { if (e instanceof CallEvent call) { - if (call.isDirectCall() && call.getDirectCallTarget().getIntrinsicInfo() == Intrinsics.Info.P_THREAD_CREATE) { - // We avoid transforming functions passed as call target to pthread_create - // However, we still collect the last argument of the call, because it - // is the argument passed to the created thread (which might be a pointer to a function). - final Expression transformed = call.getArguments().get(call.getArguments().size() - 1).accept(transformer); - call.getArguments().set(call.getArguments().size() - 1, transformed); - } else { - call.getArguments().replaceAll(arg -> arg.accept(transformer)); - } + call.getArguments().replaceAll(arg -> arg.accept(transformer)); } else if (e instanceof RegReader reader) { reader.transformExpressions(transformer); } @@ -187,9 +173,7 @@ private void devirtualise(Function function, Map func2Addr } private boolean needsDevirtualization(CallEvent call) { - return !call.isDirectCall() || - (call.getDirectCallTarget().getIntrinsicInfo() == Intrinsics.Info.P_THREAD_CREATE - && !(call.getArguments().get(2) instanceof Function)); + return !call.isDirectCall(); } private List getPossibleTargets(CallEvent call, Map func2AddressMap) { @@ -197,12 +181,6 @@ private List getPossibleTargets(CallEvent call, Map f.getFunctionType() == call.getCallType()).collect(Collectors.toList()); - } else if (call.getDirectCallTarget().getIntrinsicInfo() == Intrinsics.Info.P_THREAD_CREATE) { - final TypeFactory types = TypeFactory.getInstance(); - final Type ptrType = types.getPointerType(); - final Type threadType = types.getFunctionType(ptrType, List.of(ptrType)); - possibleTargets = func2AddressMap.keySet().stream() - .filter(f -> f.getFunctionType() == threadType).collect(Collectors.toList()); } else { possibleTargets = List.of(); throwInternalError(call); @@ -220,8 +198,6 @@ private CallEvent devirtualiseCall(CallEvent virtCall, Function devirtCallTarget private Expression getFunctionPointer(CallEvent call) { if (!call.isDirectCall()) { return call.getCallTarget(); - } else if (call.getDirectCallTarget().getIntrinsicInfo() == Intrinsics.Info.P_THREAD_CREATE) { - return call.getArguments().get(2); } throwInternalError(call); return null; @@ -230,8 +206,6 @@ private Expression getFunctionPointer(CallEvent call) { private void setFunctionPointer(CallEvent call, Expression functionPtr) { if (!call.isDirectCall()) { call.setCallTarget(functionPtr); - } else if (call.getDirectCallTarget().getIntrinsicInfo() == Intrinsics.Info.P_THREAD_CREATE) { - call.setArgument(2, functionPtr); } else { throwInternalError(call); } diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ProcessingManager.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ProcessingManager.java index 674f80a8b4..eb3eff0317 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ProcessingManager.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ProcessingManager.java @@ -1,28 +1,19 @@ package com.dat3m.dartagnan.program.processing; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - +import com.dat3m.dartagnan.program.Program; +import com.dat3m.dartagnan.program.processing.compilation.Compilation; +import com.dat3m.dartagnan.utils.printer.Printer; import org.sosy_lab.common.configuration.Configuration; import org.sosy_lab.common.configuration.InvalidConfigurationException; import org.sosy_lab.common.configuration.Option; import org.sosy_lab.common.configuration.Options; -import static com.dat3m.dartagnan.configuration.OptionNames.ASSIGNMENT_INLINING; -import static com.dat3m.dartagnan.configuration.OptionNames.CONSTANT_PROPAGATION; -import static com.dat3m.dartagnan.configuration.OptionNames.DEAD_ASSIGNMENT_ELIMINATION; -import static com.dat3m.dartagnan.configuration.OptionNames.DYNAMIC_SPINLOOP_DETECTION; -import static com.dat3m.dartagnan.configuration.OptionNames.PRINT_PROGRAM_AFTER_COMPILATION; -import static com.dat3m.dartagnan.configuration.OptionNames.PRINT_PROGRAM_AFTER_PROCESSING; -import static com.dat3m.dartagnan.configuration.OptionNames.PRINT_PROGRAM_AFTER_SIMPLIFICATION; -import static com.dat3m.dartagnan.configuration.OptionNames.PRINT_PROGRAM_AFTER_UNROLLING; -import static com.dat3m.dartagnan.configuration.OptionNames.PRINT_PROGRAM_BEFORE_PROCESSING; -import static com.dat3m.dartagnan.configuration.OptionNames.REDUCE_SYMMETRY; -import com.dat3m.dartagnan.program.Program; -import com.dat3m.dartagnan.program.processing.compilation.Compilation; -import com.dat3m.dartagnan.utils.printer.Printer; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Objects; + +import static com.dat3m.dartagnan.configuration.OptionNames.*; @Options public class ProcessingManager implements ProgramProcessor { @@ -91,12 +82,12 @@ private ProcessingManager(Configuration config) throws InvalidConfigurationExcep programProcessors.addAll(Arrays.asList( printBeforeProcessing ? DebugPrint.withHeader("Before processing", Printer.Mode.ALL) : null, intrinsics.markIntrinsicsPass(), + ProgramProcessor.fromFunctionProcessor(intrinsics.earlyInliningPass(), Target.ALL, true), GEPToAddition.newInstance(), NaiveDevirtualisation.newInstance(), Inlining.fromConfig(config), ProgramProcessor.fromFunctionProcessor( FunctionProcessor.chain( - intrinsics.earlyInliningPass(), UnreachableCodeElimination.fromConfig(config), ComplexBlockSplitting.newInstance(), BranchReordering.fromConfig(config), diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java index 38e03d6a86..7279ab873e 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java @@ -2,8 +2,8 @@ import com.dat3m.dartagnan.configuration.Arch; import com.dat3m.dartagnan.exception.MalformedProgramException; -import com.dat3m.dartagnan.expression.Expression; -import com.dat3m.dartagnan.expression.ExpressionFactory; +import com.dat3m.dartagnan.expression.*; +import com.dat3m.dartagnan.expression.base.LeafExpressionBase; import com.dat3m.dartagnan.expression.integers.IntLiteral; import com.dat3m.dartagnan.expression.processing.ExprTransformer; import com.dat3m.dartagnan.expression.type.FunctionType; @@ -20,11 +20,13 @@ import com.dat3m.dartagnan.program.event.functions.FunctionCall; import com.dat3m.dartagnan.program.event.functions.Return; import com.dat3m.dartagnan.program.event.functions.ValueFunctionCall; +import com.dat3m.dartagnan.program.event.lang.dat3m.DynamicThreadCreate; import com.dat3m.dartagnan.program.memory.Memory; import com.dat3m.dartagnan.program.memory.MemoryObject; import com.dat3m.dartagnan.program.processing.compilation.Compilation; import com.dat3m.dartagnan.program.processing.transformers.MemoryTransformer; import com.google.common.base.Preconditions; +import com.google.common.base.Verify; import com.google.common.collect.Lists; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -37,7 +39,6 @@ import static com.dat3m.dartagnan.configuration.OptionNames.THREAD_CREATE_ALWAYS_SUCCEEDS; import static com.dat3m.dartagnan.program.event.EventFactory.*; -import static com.dat3m.dartagnan.program.processing.LoopUnrolling.*; /* * LLVM: @@ -98,93 +99,73 @@ public void run(Program program) { // ============================================================================================= // =========================================== LLVM ============================================ // ============================================================================================= + private void createLLVMThreads(Program program) { + final List threadData = createThreads(program); + resolvePthreadSelf(program); + resolvePthreadJoin(program, threadData); + IdReassignment.newInstance().run(program); + resolveTidExpressions(program); + + logger.info("Number of threads (including main): {}", program.getThreads().size()); + } + + private List createThreads(Program program) { final Optional main = program.getFunctionByName(program.getEntryPoint()); if (main.isEmpty()) { - throw new MalformedProgramException("Program contains no main function"); + throw new MalformedProgramException("Program contains no entry point function. Missing main method?"); } // NOTE: We start from id = 0 which overlaps with existing function ids. // However, we reassign ids after thread creation so that functions get higher ids. - // TODO: Do we even need ids for functions? int nextTid = 0; + // We collect metadata about each spawned thread. This is later used to resolve pthread_join + final List threadData = new ArrayList<>(); + final Thread entryPoint = createLLVMThreadFromFunction(main.get(), nextTid++, null, null); + threadData.add(new ThreadData(entryPoint, null)); + final Queue workingQueue = new ArrayDeque<>(); - workingQueue.add(createLLVMThreadFromFunction(main.get(), nextTid++, null, null)); + workingQueue.add(entryPoint); while (!workingQueue.isEmpty()) { final Thread thread = workingQueue.remove(); - program.addThread(thread); + for (DynamicThreadCreate create : thread.getEvents(DynamicThreadCreate.class)) { + Verify.verify(create.isDirectCall()); + final Register tidRegister = create.getResultRegister(); + final Function targetFunction = create.getDirectCallTarget(); + final List arguments = create.getArguments(); + + final ThreadCreate createEvent = newThreadCreate(arguments); + final MemoryObject comAddress = program.getMemory().allocate(1); + comAddress.setName("__com" + nextTid + "__" + targetFunction.getName()); + comAddress.setInitialValue(0, expressions.makeFalse()); + + final Thread spawnedThread = createLLVMThreadFromFunction(targetFunction, nextTid, createEvent, comAddress); + createEvent.setSpawnedThread(spawnedThread); + workingQueue.add(spawnedThread); + threadData.add(new ThreadData(spawnedThread, comAddress)); - // We collect the communication addresses we use for each thread id. - // These are used later to lower pthread_join. - final Map tid2ComAddrMap = new LinkedHashMap<>(); - for (FunctionCall call : thread.getEvents(FunctionCall.class)) { - if (!call.isDirectCall()) { - continue; - } - final List arguments = call.getArguments(); - switch (call.getCalledFunction().getIntrinsicInfo()) { - case P_THREAD_CREATE -> { - assert arguments.size() == 4; - final Expression pidResultAddress = arguments.get(0); - //final Expression attributes = arguments.get(1); - final Function targetFunction = (Function)arguments.get(2); - final Expression argument = arguments.get(3); - - final Register resultRegister = getResultRegister(call); - assert resultRegister.getType() instanceof IntegerType; - - final ThreadCreate createEvent = newThreadCreate(List.of(argument)); - final IntLiteral tidExpr = expressions.makeValue(nextTid, archType); - final MemoryObject comAddress = program.getMemory().allocate(1); - comAddress.setName("__com" + nextTid + "__" + targetFunction.getName()); - comAddress.setInitialValue(0, expressions.makeZero(archType)); - - final List replacement = eventSequence( - newReleaseStore(comAddress, expressions.makeTrue()), - createEvent, - newStore(pidResultAddress, tidExpr), - // TODO: Allow to return failure value (!= 0) - newLocal(resultRegister, expressions.makeZero((IntegerType) resultRegister.getType())) - ); - IRHelper.replaceWithMetadata(call, replacement); - - final Thread spawnedThread = createLLVMThreadFromFunction(targetFunction, nextTid, createEvent, comAddress); - createEvent.setSpawnedThread(spawnedThread); - workingQueue.add(spawnedThread); - tid2ComAddrMap.put(tidExpr, comAddress); - - nextTid++; - } - case P_THREAD_SELF -> { - final Register resultRegister = getResultRegister(call); - assert resultRegister.getType() instanceof IntegerType; - assert arguments.isEmpty(); - final Expression tidExpr = expressions.makeValue(thread.getId(), - (IntegerType) resultRegister.getType()); - final Local tidAssignment = newLocal(resultRegister, tidExpr); - IRHelper.replaceWithMetadata(call, tidAssignment); - } - } - } + final List replacement = eventSequence( + newReleaseStore(comAddress, expressions.makeTrue()), + createEvent, + newLocal(tidRegister, new TIdExpr(archType, spawnedThread)) + ); + IRHelper.replaceWithMetadata(create, replacement); - // FIXME: This only allows joining with child threads that were created by this thread. - handlePthreadJoins(thread, tid2ComAddrMap); + nextTid++; + } } - - IdReassignment.newInstance().run(program); - logger.info("Number of threads (including main): " + program.getThreads().size()); + return threadData; } /* - This method replaces in all pthread_join calls by a switch over all possible tids. - Each candidate thread gets a switch-case which tries to synchronize with that thread. + This method replaces in all pthread_join calls by a switch over all joinable threads. */ - private void handlePthreadJoins(Thread thread, Map tid2ComAddrMap) { + private void resolvePthreadJoin(Program program, List threadData) { int joinCounter = 0; - for (FunctionCall call : thread.getEvents(FunctionCall.class)) { + for (FunctionCall call : program.getThreadEvents(FunctionCall.class)) { if (!call.isDirectCall()) { continue; } @@ -192,61 +173,48 @@ private void handlePthreadJoins(Thread thread, Map tid2C continue; } + final Thread caller = call.getThread(); final List arguments = call.getArguments(); assert arguments.size() == 2; final Expression tidExpr = arguments.get(0); // TODO: support return values for threads // final Expression returnAddr = arguments.get(1); - final Register resultRegister = getResultRegister(call); - assert resultRegister.getType() instanceof IntegerType; + final Register successRegister = getResultRegister(call); + assert successRegister.getType() instanceof IntegerType; + final Expression successValue = expressions.makeZero((IntegerType) successRegister.getType()); + // TODO: This does not align with the true error values + final Expression errorValue = expressions.makeValue(1, (IntegerType) successRegister.getType()); - // This register will hold the value "false" IFF the join succeeds. - final Register joinDummyReg = thread.getOrNewRegister("__joinFail#" + joinCounter, types.getBooleanType()); - final Label joinEnd = EventFactory.newLabel("__joinEnd#" + joinCounter); + final Register retValRegister = caller.getOrNewRegister("__joinRetVal#" + joinCounter, types.getPointerType()); + final Register syncRegister = caller.getOrNewRegister("__joinSync#" + joinCounter, types.getBooleanType()); // ----- Construct a switch case for each possible tid ----- + final Label joinEnd = EventFactory.newLabel("__joinEnd#" + joinCounter); final Map> tid2joinCases = new LinkedHashMap<>(); - for (IntLiteral tidCandidate : tid2ComAddrMap.keySet()) { - final int tid = tidCandidate.getValueAsInt(); - final Expression comAddrOfThreadToJoinWith = tid2ComAddrMap.get(tidCandidate); + for (ThreadData data : threadData) { + if (!data.isJoinable()) { + continue; + } + Verify.verify(retValRegister.getType().equals(data.thread.getFunctionType().getReturnType())); + final int tid = data.thread().getId(); if (tidExpr instanceof IntLiteral iConst && iConst.getValueAsInt() != tid) { // Little optimization if we join with a constant address continue; } final Label joinCase = EventFactory.newLabel("__joinWithT" + tid + "#" + joinCounter); - - // Construct a spinloop waiting for the joining thread. - // FIXME: It serves as a temporary solution by constructing the spinloop as how it should be - // after the unrolling pass so that the processing pipeline does not have to be changed. - final Event loopBound = EventFactory.Svcomp.newLoopBound(expressions.makeValue(1, types.getArchType())); - final String loopLabelPrefix = "l_waitForT" + tid + "#" + joinCounter; - final Label waitingLoopBegin = EventFactory.newLabel(String.format("%s%s%s%s%s", loopLabelPrefix, - LOOP_LABEL_IDENTIFIER, LOOP_INFO_SEPARATOR, LOOP_INFO_ITERATION_SUFFIX, 1)); - waitingLoopBegin.addTags(Tag.NOOPT); - final Label joinFailedMarker = EventFactory.newLabel(loopLabelPrefix + ".failed"); - final Event terminator = EventFactory.newGoto((Label) thread.getExit()); - terminator.addTags(Tag.SPINLOOP, Tag.NONTERMINATION); - final Label endMarker = EventFactory.newLabel(String.format("%s%s%s%s", loopLabelPrefix, - LOOP_LABEL_IDENTIFIER, LOOP_INFO_SEPARATOR, LOOP_INFO_BOUND_SUFFIX)); - endMarker.addTags(Tag.NOOPT); - final Event boundEvent = newJump(expressions.makeTrue(), (Label) thread.getExit()); - boundEvent.addTags(Tag.BOUND, Tag.NONTERMINATION, Tag.NOOPT); - final List caseBody = eventSequence( joinCase, - loopBound, - waitingLoopBegin, - newAcquireLoad(joinDummyReg, comAddrOfThreadToJoinWith), - newJump(joinDummyReg, joinFailedMarker), - EventFactory.newGoto(joinEnd), - joinFailedMarker, - terminator, - endMarker, - boundEvent + newThreadJoin(retValRegister, data.thread()), + // TODO: store retVal at retAddr (if retAddr != null) + newAcquireLoad(syncRegister, data.comAddress), + newAssume(expressions.makeNot(syncRegister)), + newLocal(successRegister, successValue), + EventFactory.newGoto(joinEnd) ); + Expression tidCandidate = new TIdExpr((IntegerType) tidExpr.getType(), data.thread()); tid2joinCases.put(tidCandidate, caseBody); } @@ -257,10 +225,9 @@ private void handlePthreadJoins(Thread thread, Map tid2C expressions.makeEQ(tidExpr, tid), (Label)tid2joinCases.get(tid).get(0)) ); } - // Add default case for when no tid matches. We make the join just fail here as if it - // was waiting for a never-terminating thread. - // FIXME: This does not align with the correct pthread_join semantics. - switchJumpTable.add(EventFactory.newLocal(joinDummyReg, expressions.makeTrue())); + // In the case where no tid matches, we give an error. + switchJumpTable.add(EventFactory.newLocal(successRegister, errorValue)); + switchJumpTable.add(EventFactory.newAssert(expressions.makeFalse(), "pthread_join on invalid thread id.")); switchJumpTable.add(EventFactory.newGoto(joinEnd)); // ----- Generate actual replacement for the pthread_join call ----- @@ -269,9 +236,6 @@ private void handlePthreadJoins(Thread thread, Map tid2C switchJumpTable, tid2joinCases.values(), joinEnd, - newJump(joinDummyReg, (Label)thread.getExit()), - // Note: In our modelling, pthread_join always succeeds if it returns - newLocal(resultRegister, expressions.makeZero((IntegerType) resultRegister.getType())), EventFactory.newFunctionReturnMarker(call.getCalledFunction().getName()) ); IRHelper.replaceWithMetadata(call, replacement); @@ -279,6 +243,22 @@ private void handlePthreadJoins(Thread thread, Map tid2C } } + private void resolvePthreadSelf(Program program) { + for (FunctionCall call : program.getThreadEvents(FunctionCall.class)) { + if (!call.isDirectCall()) { + continue; + } + if (call.getCalledFunction().getIntrinsicInfo() == Intrinsics.Info.P_THREAD_SELF) { + final Register resultRegister = getResultRegister(call); + assert resultRegister.getType() instanceof IntegerType; + assert call.getArguments().isEmpty(); + final Expression tidExpr = new TIdExpr((IntegerType) resultRegister.getType(), call.getThread()); + final Local tidAssignment = newLocal(resultRegister, tidExpr); + IRHelper.replaceWithMetadata(call, tidAssignment); + } + } + } + private Thread createLLVMThreadFromFunction(Function function, int tid, ThreadCreate creator, Expression comAddr) { // ------------------- Create new thread ------------------- final ThreadStart start = EventFactory.newThreadStart(creator); @@ -286,6 +266,7 @@ private Thread createLLVMThreadFromFunction(Function function, int tid, ThreadCr final Thread thread = new Thread(function.getName(), function.getFunctionType(), Lists.transform(function.getParameterRegisters(), Register::getName), tid, start); thread.copyDummyCountFrom(function); + function.getProgram().addThread(thread); // ------------------- Copy function into thread ------------------- final Map registerReplacement = IRHelper.copyOverRegisters(function.getRegisters(), thread, @@ -367,6 +348,22 @@ public Expression visitMemoryObject(MemoryObject memObj) { // TODO: After creating all thread-local copies, we might want to delete the original variable? } + private void resolveTidExpressions(Program program) { + final ExprTransformer transformer = new ExprTransformer() { + final ExpressionFactory expressions = ExpressionFactory.getInstance(); + @Override + public Expression visitLeafExpression(LeafExpression expr) { + if (expr instanceof TIdExpr tid) { + return expressions.makeValue(tid.thread.getId(), tid.getType()); + } + return super.visitLeafExpression(expr); + } + }; + for (RegReader reader : program.getThreadEvents(RegReader.class)) { + reader.transformExpressions(transformer); + } + } + private Register getResultRegister(FunctionCall call) { assert call instanceof ValueFunctionCall; return ((ValueFunctionCall) call).getResultRegister(); @@ -459,4 +456,41 @@ private void copyThreadEvents(Function function, Thread thread, List { + private final Thread thread; + + public TIdExpr(IntegerType type, Thread thread) { + super(type); + this.thread = thread; + } + + @Override + public ExpressionKind getKind() { + return () -> "Tid"; + } + + @Override + public String toString() { + return String.format("tid(%s#%d)", thread.getName(), thread.getId()); + } + + @Override + public T accept(ExpressionVisitor visitor) { + return visitor.visitLeafExpression(this); + } + } + + } From 744fb332a102515d4cb8e874cee560f2080602af Mon Sep 17 00:00:00 2001 From: Thomas Haas Date: Tue, 1 Apr 2025 16:26:17 +0200 Subject: [PATCH 13/33] Added DynamicThreadJoin (pthread_join compiles to this). (WIP): Adding proper return values Updated AssignmentInlining to aggressively inline ConstructExpr --- .../event/lang/dat3m/DynamicThreadCreate.java | 5 ++ .../event/lang/dat3m/DynamicThreadJoin.java | 89 +++++++++++++++++++ .../processing/AssignmentInlining.java | 17 +++- .../program/processing/Intrinsics.java | 57 ++++++++++-- .../program/processing/ThreadCreation.java | 88 +++++++++--------- 5 files changed, 206 insertions(+), 50 deletions(-) create mode 100644 dartagnan/src/main/java/com/dat3m/dartagnan/program/event/lang/dat3m/DynamicThreadJoin.java diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/lang/dat3m/DynamicThreadCreate.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/lang/dat3m/DynamicThreadCreate.java index 36b8cf7eae..8fa1292b5f 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/lang/dat3m/DynamicThreadCreate.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/lang/dat3m/DynamicThreadCreate.java @@ -10,6 +10,11 @@ import java.util.List; +/* + This event dynamically spawns a single thread when executed. + - The spawned thread executes the given function with the given set of arguments + - Writes the spawned thread's id into the return register. + */ public class DynamicThreadCreate extends CallBase implements RegWriter { protected Register tidRegister; diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/lang/dat3m/DynamicThreadJoin.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/lang/dat3m/DynamicThreadJoin.java new file mode 100644 index 0000000000..815b77022c --- /dev/null +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/lang/dat3m/DynamicThreadJoin.java @@ -0,0 +1,89 @@ +package com.dat3m.dartagnan.program.event.lang.dat3m; + +import com.dat3m.dartagnan.expression.Expression; +import com.dat3m.dartagnan.expression.ExpressionVisitor; +import com.dat3m.dartagnan.expression.type.AggregateType; +import com.dat3m.dartagnan.expression.type.IntegerType; +import com.dat3m.dartagnan.expression.utils.IntegerHelper; +import com.dat3m.dartagnan.program.Register; +import com.dat3m.dartagnan.program.event.AbstractEvent; +import com.dat3m.dartagnan.program.event.BlockingEvent; +import com.dat3m.dartagnan.program.event.RegReader; +import com.dat3m.dartagnan.program.event.RegWriter; +import com.google.common.base.Preconditions; + +import java.math.BigInteger; +import java.util.HashSet; +import java.util.Set; + + +/* + This event joins with given thread, i.e., it blocks until the target thread terminates properly. + - The target thread is specified by a thread id, typically the one returned by DynamicThreadCreate. + - The type of the return register must be { bv? status, TRet retValue } where TRet may be void if no value is returned. + The status may indicate success (status == 0) or an error (status != 0). + The status register shall be large enough to accommodate all error values (1 byte should be sufficient). + - The return value retValue is only well-defined in the case of success (status == 0). + - It is possible to join with the same thread multiple times. + */ +public class DynamicThreadJoin extends AbstractEvent implements RegWriter, RegReader, BlockingEvent { + + public enum Status { + SUCCESS, // The join was successful + INVALID_TID, // The provided tid does not match with a joinable thread + INVALID_RETURN_TYPE // The provided tid is valid, but the return type of that thread does not match + // with the expected return type. + } + + protected Register resultRegister; + protected Expression tid; + + public DynamicThreadJoin(Register resultRegister, Expression tid) { + Preconditions.checkArgument(resultRegister.getType() instanceof AggregateType aggType + && aggType.getFields().size() == 2 + && aggType.getFields().get(0).type() instanceof IntegerType intType + && IntegerHelper.isRepresentable(BigInteger.valueOf(Status.values().length - 1), intType.getBitWidth()) + ); + this.resultRegister = resultRegister; + this.tid = tid; + } + + protected DynamicThreadJoin(DynamicThreadJoin other) { + super(other); + this.resultRegister = other.resultRegister; + this.tid = other.tid; + } + + @Override + public Register getResultRegister() { + return this.resultRegister; + } + + @Override + public void setResultRegister(Register reg) { + this.resultRegister = reg; + } + + public Expression getTid() { return tid; } + public void setTid(Expression tid) { this.tid = tid; } + + @Override + protected String defaultString() { + return String.format("%s <- DynamicThreadJoin(%s)", resultRegister, tid); + } + + @Override + public DynamicThreadJoin getCopy() { + return new DynamicThreadJoin(this); + } + + @Override + public Set getRegisterReads() { + return Register.collectRegisterReads(tid, Register.UsageType.OTHER, new HashSet<>()); + } + + @Override + public void transformExpressions(ExpressionVisitor exprTransformer) { + tid = tid.accept(exprTransformer); + } +} diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/AssignmentInlining.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/AssignmentInlining.java index 2e0c00ab2f..42b29eb3e1 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/AssignmentInlining.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/AssignmentInlining.java @@ -1,6 +1,7 @@ package com.dat3m.dartagnan.program.processing; import com.dat3m.dartagnan.expression.Expression; +import com.dat3m.dartagnan.expression.aggregates.ConstructExpr; import com.dat3m.dartagnan.expression.processing.ExprTransformer; import com.dat3m.dartagnan.program.Function; import com.dat3m.dartagnan.program.Register; @@ -19,8 +20,12 @@ RegReader(r); =====> RegReader(someExpr); // uses "someExpr" directly The inlined assignments are dead and can be eliminated by dead assignment eliminations. - To avoid duplication of "someExpr", the pass only inlines assignments if the assigned register is used only once. + To avoid duplication of "someExpr", the pass only inlines assignments if the assigned register is used only once + or it leads to simplifications(*). To achieve this, the pass scans the code twice: once to collect usage statistics and once to perform the inlining. + + (*) Currently, we aggressively inline ConstructExprs because they are likely to get combined with an ExtractExpr + and then removed by SCCP. */ public class AssignmentInlining implements FunctionProcessor { @@ -70,11 +75,13 @@ public Expression visitRegister(Register reg) { usageCounter.compute(lastAssignment, (k, v) -> v == null ? 1 : v + 1); return reg; } else if ( - // The default case is awkward, but it can happen for locals of the form "r = f(r)" + // A usage counter may be missing for assignments of the form "r = f(r)" // which do not allow for substituting r for f(r) in later usages. - usageCounter.getOrDefault(lastAssignment, 0) == 1 + usageCounter.containsKey(lastAssignment) && preDominatorTree.isDominatedBy(curEvent, lastAssignment) && !curEvent.hasTag(Tag.NOOPT) + // Inline if the expression is only used once or if it leads to simplifications. + && (usageCounter.get(lastAssignment) == 1 || allowsSimplification(curEvent, reg, lastAssignment.getExpr())) ) { assert mode == Mode.REPLACE; return lastAssignment.getExpr(); @@ -84,6 +91,10 @@ public Expression visitRegister(Register reg) { } }; + private boolean allowsSimplification(Event curEvent, Register replacedReg, Expression inlineValue) { + return inlineValue instanceof ConstructExpr; + } + private Processor(Function function) { preDominatorTree = DominatorAnalysis.computePreDominatorTree(function.getEntry(), function.getExit()); } diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java index 0739d43293..fd756f8ef8 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java @@ -16,10 +16,7 @@ import com.dat3m.dartagnan.program.event.Event; import com.dat3m.dartagnan.program.event.EventFactory; import com.dat3m.dartagnan.program.event.Tag; -import com.dat3m.dartagnan.program.event.core.CondJump; -import com.dat3m.dartagnan.program.event.core.ExecutionStatus; -import com.dat3m.dartagnan.program.event.core.Label; -import com.dat3m.dartagnan.program.event.core.Local; +import com.dat3m.dartagnan.program.event.core.*; import com.dat3m.dartagnan.program.event.functions.FunctionCall; import com.dat3m.dartagnan.program.event.functions.ValueFunctionCall; import com.dat3m.dartagnan.program.event.lang.dat3m.DynamicThreadCreate; @@ -40,6 +37,8 @@ import static com.dat3m.dartagnan.configuration.OptionNames.REMOVE_ASSERTION_OF_TYPE; import static com.dat3m.dartagnan.program.event.EventFactory.*; +import static com.dat3m.dartagnan.program.event.lang.dat3m.DynamicThreadJoin.Status.INVALID_TID; +import static com.dat3m.dartagnan.program.event.lang.dat3m.DynamicThreadJoin.Status.SUCCESS; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; @@ -115,7 +114,7 @@ public enum Info { // --------------------------- pthread threading --------------------------- P_THREAD_CREATE("pthread_create", true, false, true, true, Intrinsics::inlinePthreadCreate), P_THREAD_EXIT("pthread_exit", false, false, false, false, null), - P_THREAD_JOIN(List.of("pthread_join", "_pthread_join", "__pthread_join"), false, true, false, false, null), + P_THREAD_JOIN(List.of("pthread_join", "_pthread_join", "__pthread_join"), false, true, false, true, Intrinsics::inlinePthreadJoin), P_THREAD_BARRIER_WAIT("pthread_barrier_wait", false, false, true, true, Intrinsics::inlineAsZero), P_THREAD_SELF(List.of("pthread_self", "__VERIFIER_tid"), false, false, true, false, null), P_THREAD_EQUAL("pthread_equal", false, false, true, false, Intrinsics::inlinePthreadEqual), @@ -290,6 +289,7 @@ private boolean matches(String funcName) { } } + @FunctionalInterface private interface Replacer { List replace(Intrinsics self, FunctionCall call); @@ -426,6 +426,53 @@ private List inlinePthreadCreate(FunctionCall call) { ); } + private List inlinePthreadJoin(FunctionCall call) { + final List arguments = call.getArguments(); + assert arguments.size() == 2; + final Expression tidExpr = arguments.get(0); + final Expression returnAddr = arguments.get(1); + final boolean hasReturnAddr = !(returnAddr instanceof IntLiteral lit && lit.isZero()); + + final Register resultRegister = getResultRegister(call); + assert resultRegister.getType() instanceof IntegerType; + + final Type joinType = types.getAggregateType(List.of(types.getIntegerType(8), PTHREAD_THREAD_TYPE.getReturnType())); + final Register joinReg = call.getFunction().getOrNewRegister("__joinReg", joinType); + + final Expression status = expressions.makeExtract(joinReg, 0); + final Expression retVal = expressions.makeExtract(joinReg, 1); + + final Expression statusSuccess = expressions.makeValue(SUCCESS.ordinal(), (IntegerType) status.getType()); + final Expression statusInvalidTId = expressions.makeValue(INVALID_TID.ordinal(), (IntegerType) status.getType()); + + + final Label onFail; + final Store storeRetVal; + final CondJump jump; + if (hasReturnAddr) { + onFail = newLabel("__joinFail"); + storeRetVal = newStore(returnAddr, retVal); + jump = newJump(expressions.makeNEQ(status, statusSuccess), onFail); + } else { + onFail = null; + storeRetVal = null; + jump = null; + } + + return eventSequence( + newDynamicThreadJoin(joinReg, tidExpr), + // TODO: We use our internal error codes which do not match with pthread's error codes, + // except for the success case (error code == 0). + newLocal(resultRegister, expressions.makeCast(status, resultRegister.getType())), + jump, + storeRetVal, + onFail, + newAssert(expressions.makeNEQ(status, statusInvalidTId), "Invalid thread id in pthread_join.") + ); + + } + + private List inlinePthreadEqual(FunctionCall call) { final Register resultRegister = getResultRegisterAndCheckArguments(2, call); final Expression leftId = call.getArguments().get(0); diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java index 7279ab873e..35d8d482a3 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java @@ -6,6 +6,7 @@ import com.dat3m.dartagnan.expression.base.LeafExpressionBase; import com.dat3m.dartagnan.expression.integers.IntLiteral; import com.dat3m.dartagnan.expression.processing.ExprTransformer; +import com.dat3m.dartagnan.expression.type.AggregateType; import com.dat3m.dartagnan.expression.type.FunctionType; import com.dat3m.dartagnan.expression.type.IntegerType; import com.dat3m.dartagnan.expression.type.TypeFactory; @@ -21,6 +22,7 @@ import com.dat3m.dartagnan.program.event.functions.Return; import com.dat3m.dartagnan.program.event.functions.ValueFunctionCall; import com.dat3m.dartagnan.program.event.lang.dat3m.DynamicThreadCreate; +import com.dat3m.dartagnan.program.event.lang.dat3m.DynamicThreadJoin; import com.dat3m.dartagnan.program.memory.Memory; import com.dat3m.dartagnan.program.memory.MemoryObject; import com.dat3m.dartagnan.program.processing.compilation.Compilation; @@ -39,6 +41,7 @@ import static com.dat3m.dartagnan.configuration.OptionNames.THREAD_CREATE_ALWAYS_SUCCEEDS; import static com.dat3m.dartagnan.program.event.EventFactory.*; +import static com.dat3m.dartagnan.program.event.lang.dat3m.DynamicThreadJoin.Status.*; /* * LLVM: @@ -103,7 +106,7 @@ public void run(Program program) { private void createLLVMThreads(Program program) { final List threadData = createThreads(program); resolvePthreadSelf(program); - resolvePthreadJoin(program, threadData); + resolveDynamicThreadJoin(program, threadData); IdReassignment.newInstance().run(program); resolveTidExpressions(program); @@ -160,33 +163,26 @@ private List createThreads(Program program) { } /* - This method replaces in all pthread_join calls by a switch over all joinable threads. - */ - private void resolvePthreadJoin(Program program, List threadData) { + This method replaces in all pthread_join calls by a switch over all joinable threads. + */ + private void resolveDynamicThreadJoin(Program program, List threadData) { int joinCounter = 0; - for (FunctionCall call : program.getThreadEvents(FunctionCall.class)) { - if (!call.isDirectCall()) { - continue; - } - if (call.getCalledFunction().getIntrinsicInfo() != Intrinsics.Info.P_THREAD_JOIN) { - continue; - } - - final Thread caller = call.getThread(); - final List arguments = call.getArguments(); - assert arguments.size() == 2; - final Expression tidExpr = arguments.get(0); + for (DynamicThreadJoin join : program.getThreadEvents(DynamicThreadJoin.class)) { + final Thread caller = join.getThread(); + final Expression tidExpr = join.getTid(); // TODO: support return values for threads - // final Expression returnAddr = arguments.get(1); - final Register successRegister = getResultRegister(call); - assert successRegister.getType() instanceof IntegerType; - final Expression successValue = expressions.makeZero((IntegerType) successRegister.getType()); - // TODO: This does not align with the true error values - final Expression errorValue = expressions.makeValue(1, (IntegerType) successRegister.getType()); + final Register joinRegister = join.getResultRegister(); + final IntegerType statusType = (IntegerType) ((AggregateType)joinRegister.getType()).getFields().get(0).type(); + final Type retValType = ((AggregateType)joinRegister.getType()).getFields().get(1).type(); + + final Expression successValue = expressions.makeValue(SUCCESS.ordinal(), statusType); + final Expression invalidTidValue = expressions.makeValue(INVALID_TID.ordinal(), statusType); + final Expression invalidRetType = expressions.makeValue(INVALID_RETURN_TYPE.ordinal(), statusType); - final Register retValRegister = caller.getOrNewRegister("__joinRetVal#" + joinCounter, types.getPointerType()); + final Register statusRegister = caller.getOrNewRegister("__joinStatus#" + joinCounter, statusType); + final Register retValRegister = caller.getOrNewRegister("__joinRetVal#" + joinCounter, retValType); final Register syncRegister = caller.getOrNewRegister("__joinSync#" + joinCounter, types.getBooleanType()); // ----- Construct a switch case for each possible tid ----- @@ -205,17 +201,27 @@ private void resolvePthreadJoin(Program program, List threadData) { } final Label joinCase = EventFactory.newLabel("__joinWithT" + tid + "#" + joinCounter); - final List caseBody = eventSequence( - joinCase, - newThreadJoin(retValRegister, data.thread()), - // TODO: store retVal at retAddr (if retAddr != null) - newAcquireLoad(syncRegister, data.comAddress), - newAssume(expressions.makeNot(syncRegister)), - newLocal(successRegister, successValue), - EventFactory.newGoto(joinEnd) - ); - Expression tidCandidate = new TIdExpr((IntegerType) tidExpr.getType(), data.thread()); - tid2joinCases.put(tidCandidate, caseBody); + final List caseBody; + if (data.thread().getFunctionType().getReturnType().equals(retValType)) { + // Successful join + caseBody = eventSequence( + joinCase, + newThreadJoin(retValRegister, data.thread()), + // TODO: store retVal at retAddr (if retAddr != null) + newAcquireLoad(syncRegister, data.comAddress), + newAssume(expressions.makeNot(syncRegister)), + newLocal(statusRegister, successValue), + EventFactory.newGoto(joinEnd) + ); + } else { + // Wrong return type + caseBody = eventSequence( + joinCase, + newLocal(statusRegister, invalidRetType), + EventFactory.newGoto(joinEnd) + ); + } + tid2joinCases.put(new TIdExpr((IntegerType) tidExpr.getType(), data.thread()), caseBody); } // ----- Construct the actual switch (a simple jump table) ----- @@ -225,20 +231,18 @@ private void resolvePthreadJoin(Program program, List threadData) { expressions.makeEQ(tidExpr, tid), (Label)tid2joinCases.get(tid).get(0)) ); } - // In the case where no tid matches, we give an error. - switchJumpTable.add(EventFactory.newLocal(successRegister, errorValue)); - switchJumpTable.add(EventFactory.newAssert(expressions.makeFalse(), "pthread_join on invalid thread id.")); + // In the case where no tid matches, we return an error status. + switchJumpTable.add(EventFactory.newLocal(statusRegister, invalidTidValue)); switchJumpTable.add(EventFactory.newGoto(joinEnd)); - // ----- Generate actual replacement for the pthread_join call ----- + // ----- Generate actual replacement for the DynamicJoinEvent ----- final List replacement = eventSequence( - EventFactory.newFunctionCallMarker(call.getCalledFunction().getName()), switchJumpTable, tid2joinCases.values(), joinEnd, - EventFactory.newFunctionReturnMarker(call.getCalledFunction().getName()) + newLocal(joinRegister, expressions.makeConstruct(joinRegister.getType(), List.of(statusRegister, retValRegister))) ); - IRHelper.replaceWithMetadata(call, replacement); + IRHelper.replaceWithMetadata(join, replacement); joinCounter++; } } @@ -462,7 +466,7 @@ private void copyThreadEvents(Function function, Thread thread, List Date: Tue, 1 Apr 2025 16:52:16 +0200 Subject: [PATCH 14/33] Added UniqueIdGenerator to generalize Function.dummyCount. This allows us to generate better names for internal registers. --- .../com/dat3m/dartagnan/program/Function.java | 13 +++++--- .../program/processing/Intrinsics.java | 20 ++++++------- .../program/processing/ThreadCreation.java | 10 +++---- .../dartagnan/utils/UniqueIdGenerator.java | 30 +++++++++++++++++++ 4 files changed, 54 insertions(+), 19 deletions(-) create mode 100644 dartagnan/src/main/java/com/dat3m/dartagnan/utils/UniqueIdGenerator.java diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/Function.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/Function.java index df8b998df4..bf51489cf2 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/Function.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/Function.java @@ -12,6 +12,7 @@ import com.dat3m.dartagnan.program.event.core.Label; import com.dat3m.dartagnan.program.event.lang.llvm.LlvmCmpXchg; import com.dat3m.dartagnan.program.processing.Intrinsics; +import com.dat3m.dartagnan.utils.UniqueIdGenerator; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; @@ -33,7 +34,7 @@ public class Function implements LeafExpression { protected Program program; protected Map registers = new HashMap<>(); - protected int dummyCount = 0; + protected final UniqueIdGenerator uniqueId = UniqueIdGenerator.fresh(); public Function(String name, FunctionType type, List parameterNames, int id, Event entry) { Preconditions.checkArgument(type.getParameterTypes().size() == parameterNames.size()); @@ -120,7 +121,11 @@ public Register getRegister(String name){ } public Register newRegister(Type type) { - return newRegister("DUMMY_REG_" + dummyCount++, type); + return newUniqueRegister("DUMMY_REG", type); + } + + public Register newUniqueRegister(String baseName, Type type) { + return newRegister(uniqueId.getUniqueName(baseName), type); } public Register newRegister(String name, Type type) { @@ -240,7 +245,7 @@ public T accept(ExpressionVisitor visitor) { } // TODO: Ugly function, but we need it for now to create copies of functions. - public void copyDummyCountFrom(Function func) { - this.dummyCount = func.dummyCount; + public void copyUniqueIdsFrom(Function func) { + this.uniqueId.max(func.uniqueId); } } diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java index fd756f8ef8..1d71b0d674 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java @@ -67,7 +67,6 @@ private enum AssertionType { USER, OVERFLOW, INVALIDDEREF } //FIXME This might have concurrency issues if processing multiple programs at the same time. private BeginAtomic currentAtomicBegin; - private long uniqueId = 0; private Intrinsics() { } @@ -415,7 +414,7 @@ private List inlinePthreadCreate(FunctionCall call) { final Register resultRegister = getResultRegister(call); assert resultRegister.getType() instanceof IntegerType; - final Register tidReg = call.getFunction().getOrNewRegister("__tid#" + (uniqueId++), types.getArchType()); + final Register tidReg = call.getFunction().newUniqueRegister("__tid", types.getArchType()); final DynamicThreadCreate createEvent = newDynamicThreadCreate(tidReg, PTHREAD_THREAD_TYPE, targetFunction, List.of(argument)); return eventSequence( @@ -437,7 +436,7 @@ private List inlinePthreadJoin(FunctionCall call) { assert resultRegister.getType() instanceof IntegerType; final Type joinType = types.getAggregateType(List.of(types.getIntegerType(8), PTHREAD_THREAD_TYPE.getReturnType())); - final Register joinReg = call.getFunction().getOrNewRegister("__joinReg", joinType); + final Register joinReg = call.getFunction().newUniqueRegister("__joinReg", joinType); final Expression status = expressions.makeExtract(joinReg, 0); final Expression retVal = expressions.makeExtract(joinReg, 1); @@ -445,16 +444,15 @@ private List inlinePthreadJoin(FunctionCall call) { final Expression statusSuccess = expressions.makeValue(SUCCESS.ordinal(), (IntegerType) status.getType()); final Expression statusInvalidTId = expressions.makeValue(INVALID_TID.ordinal(), (IntegerType) status.getType()); - - final Label onFail; + final Label joinEnd; final Store storeRetVal; final CondJump jump; if (hasReturnAddr) { - onFail = newLabel("__joinFail"); + joinEnd = newLabel("__pthread_join_end"); storeRetVal = newStore(returnAddr, retVal); - jump = newJump(expressions.makeNEQ(status, statusSuccess), onFail); + jump = newJump(expressions.makeNEQ(status, statusSuccess), joinEnd); } else { - onFail = null; + joinEnd = null; storeRetVal = null; jump = null; } @@ -466,8 +464,10 @@ private List inlinePthreadJoin(FunctionCall call) { newLocal(resultRegister, expressions.makeCast(status, resultRegister.getType())), jump, storeRetVal, - onFail, - newAssert(expressions.makeNEQ(status, statusInvalidTId), "Invalid thread id in pthread_join.") + joinEnd, + newAssert(expressions.makeNEQ(status, statusInvalidTId), "Invalid thread id in pthread_join."), + // TODO: The following should not be able to happen, but we go save here just in case :) + newAssert(expressions.makeEQ(status, statusSuccess), "Unsuccessful pthread_join: reason unknown.") ); } diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java index 35d8d482a3..70d477fd00 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java @@ -181,9 +181,9 @@ private void resolveDynamicThreadJoin(Program program, List threadDa final Expression invalidTidValue = expressions.makeValue(INVALID_TID.ordinal(), statusType); final Expression invalidRetType = expressions.makeValue(INVALID_RETURN_TYPE.ordinal(), statusType); - final Register statusRegister = caller.getOrNewRegister("__joinStatus#" + joinCounter, statusType); - final Register retValRegister = caller.getOrNewRegister("__joinRetVal#" + joinCounter, retValType); - final Register syncRegister = caller.getOrNewRegister("__joinSync#" + joinCounter, types.getBooleanType()); + final Register statusRegister = caller.newRegister("__joinStatus#" + joinCounter, statusType); + final Register retValRegister = caller.newRegister("__joinRetVal#" + joinCounter, retValType); + final Register syncRegister = caller.newRegister("__joinSync#" + joinCounter, types.getBooleanType()); // ----- Construct a switch case for each possible tid ----- final Label joinEnd = EventFactory.newLabel("__joinEnd#" + joinCounter); @@ -269,7 +269,7 @@ private Thread createLLVMThreadFromFunction(Function function, int tid, ThreadCr start.setMayFailSpuriously(!forceStart); final Thread thread = new Thread(function.getName(), function.getFunctionType(), Lists.transform(function.getParameterRegisters(), Register::getName), tid, start); - thread.copyDummyCountFrom(function); + thread.copyUniqueIdsFrom(function); function.getProgram().addThread(thread); // ------------------- Copy function into thread ------------------- @@ -418,7 +418,7 @@ private Thread createSPVThreadFromFunction(Function function, int tid, ThreadGri ThreadStart start = EventFactory.newThreadStart(null); ScopeHierarchy scope = grid.getScoreHierarchy(tid); Thread thread = new Thread(name, type, args, tid, start, scope, Set.of()); - thread.copyDummyCountFrom(function); + thread.copyUniqueIdsFrom(function); Label returnLabel = EventFactory.newLabel("RETURN_OF_T" + thread.getId()); Label endLabel = EventFactory.newLabel("END_OF_T" + thread.getId()); copyThreadEvents(function, thread, transformers, endLabel); diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/utils/UniqueIdGenerator.java b/dartagnan/src/main/java/com/dat3m/dartagnan/utils/UniqueIdGenerator.java new file mode 100644 index 0000000000..dd7d4091df --- /dev/null +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/utils/UniqueIdGenerator.java @@ -0,0 +1,30 @@ +package com.dat3m.dartagnan.utils; + +import java.util.HashMap; +import java.util.Map; + +public class UniqueIdGenerator { + private final Map name2freeId; + + private UniqueIdGenerator(Map name2freeId) { + this.name2freeId = name2freeId; + } + + public static UniqueIdGenerator fresh() { + return new UniqueIdGenerator(new HashMap<>()); + } + + public static UniqueIdGenerator copy(UniqueIdGenerator other) { + return new UniqueIdGenerator(new HashMap<>(other.name2freeId)); + } + + public String getUniqueName(String name) { + final int counter = name2freeId.compute(name, (k, v) -> (v == null ? 0 : v) + 1); + return name + "#" + counter; + } + + public void max(UniqueIdGenerator other) { + other.name2freeId.forEach((k, v) -> name2freeId.merge(k, v, Math::max)); + } + +} From f4156a0a93c5a5d6fa5a3bc9f71ebe8659c4c448 Mon Sep 17 00:00:00 2001 From: Thomas Haas Date: Tue, 1 Apr 2025 18:03:40 +0200 Subject: [PATCH 15/33] Added ThreadReturn event (pthread_exit and top-level returns compiled to this). ThreadJoin now properly returns the value of ThreadReturn Added tests for improper joining and return values of threads. --- benchmarks/miscellaneous/pthread.c | 4 +- .../miscellaneous/thread_invalid_join.c | 26 + benchmarks/miscellaneous/thread_return_val.c | 48 + .../dartagnan/encoding/ProgramEncoder.java | 19 +- .../dartagnan/program/event/EventFactory.java | 9 +- .../event/core/threading/ThreadReturn.java | 58 + .../processing/CoreCodeVerification.java | 7 +- .../program/processing/Intrinsics.java | 14 +- .../program/processing/ThreadCreation.java | 50 +- .../verification/model/ExecutionModel.java | 3 +- .../dartagnan/llvm/MiscellaneousTest.java | 2 + .../test/resources/miscellaneous/pthread.ll | 3697 ++++++++--------- .../miscellaneous/thread_invalid_join.ll | 115 + .../miscellaneous/thread_return_val.ll | 234 ++ 14 files changed, 2389 insertions(+), 1897 deletions(-) create mode 100644 benchmarks/miscellaneous/thread_invalid_join.c create mode 100644 benchmarks/miscellaneous/thread_return_val.c create mode 100644 dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadReturn.java create mode 100644 dartagnan/src/test/resources/miscellaneous/thread_invalid_join.ll create mode 100644 dartagnan/src/test/resources/miscellaneous/thread_return_val.ll diff --git a/benchmarks/miscellaneous/pthread.c b/benchmarks/miscellaneous/pthread.c index c4b20b6b64..4ef68e95a3 100644 --- a/benchmarks/miscellaneous/pthread.c +++ b/benchmarks/miscellaneous/pthread.c @@ -249,7 +249,7 @@ void cond_test() } void* result = thread_join(worker); - //assert(result == message); //TODO add support for return values + assert(result == message); cond_destroy(&cond); mutex_destroy(&cond_mutex); @@ -404,7 +404,7 @@ void key_test() assert(status == 0); void* result = thread_join(worker); - //assert(result == message); //TODO add support for return values + assert(result == message); status = pthread_key_delete(local_data); assert(status == 0); diff --git a/benchmarks/miscellaneous/thread_invalid_join.c b/benchmarks/miscellaneous/thread_invalid_join.c new file mode 100644 index 0000000000..878edcd2c6 --- /dev/null +++ b/benchmarks/miscellaneous/thread_invalid_join.c @@ -0,0 +1,26 @@ +#include +#include +#include +#include + +/* + The test shows wrong pthread_join usage. + EXPECTED: FAIL +*/ + +void *thread1(void *arg) +{ + pthread_join(pthread_self(), NULL); // Invalid: cannot join with self + return 0; +} + +int main() +{ + pthread_t t1, t2; + + pthread_create(&t1, NULL, thread1, NULL); + + pthread_join(t1, NULL); + pthread_join(t2, NULL); // Invalid: t2 is not initialized + return 0; +} diff --git a/benchmarks/miscellaneous/thread_return_val.c b/benchmarks/miscellaneous/thread_return_val.c new file mode 100644 index 0000000000..6e0c397a86 --- /dev/null +++ b/benchmarks/miscellaneous/thread_return_val.c @@ -0,0 +1,48 @@ +#include +#include +#include +#include + +/* + This test shows that threads can return values. + Furthermore, it shows that "return X" and "pthread_exit(X)" are equivalent on the top level of the executing thread. + EXPECTED: PASS +*/ + +void *thread1(void *arg) +{ + return 42; +} + +void *thread2(void *arg) +{ + pthread_exit(42); + return 0; // Unreachable +} + +void returnValue(void *arg) { + pthread_exit(arg); // Here we cannot put "return arg" +} + +void *thread3(void *arg) +{ + returnValue(41); + return 0; // Unreachable +} + +int main() +{ + pthread_t t1, t2; + void *retVal1, *retVal2; + + pthread_create(&t1, NULL, thread1, NULL); + pthread_create(&t2, NULL, thread2, NULL); + + pthread_join(t1, &retVal1); + pthread_join(t2, &retVal2); + assert(retVal1 == retVal2 && retVal1 == 42); + + pthread_create(&t1, NULL, thread3, NULL); + pthread_join(t1, &retVal1); + assert(retVal1 == 41); +} diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/ProgramEncoder.java b/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/ProgramEncoder.java index 3d81b83109..adebbecd50 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/ProgramEncoder.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/ProgramEncoder.java @@ -15,11 +15,13 @@ import com.dat3m.dartagnan.program.event.*; import com.dat3m.dartagnan.program.event.core.*; import com.dat3m.dartagnan.program.event.core.threading.ThreadJoin; +import com.dat3m.dartagnan.program.event.core.threading.ThreadReturn; import com.dat3m.dartagnan.program.event.core.threading.ThreadStart; import com.dat3m.dartagnan.program.memory.Memory; import com.dat3m.dartagnan.program.memory.MemoryObject; import com.dat3m.dartagnan.program.misc.NonDetValue; import com.google.common.base.Preconditions; +import com.google.common.base.Verify; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import org.apache.logging.log4j.LogManager; @@ -259,7 +261,22 @@ private BooleanFormula encodeThreadJoining() { enc.add(bmgr.implication(joinExec, terminated)); enc.add(bmgr.implication(bmgr.and(terminated, joinCf), joinExec)); - // TODO: Encode retVal. + + final List returns = join.getJoinThread().getEvents(ThreadReturn.class); + Verify.verify(returns.size() == 1, "Unexpected number of ThreadReturn events."); + final ThreadReturn ret = returns.get(0); + // FIXME: here we assume that proper thread termination implies that ThreadReturn was executed. + // While this should be true, we currently do not make explicit checks for this, so the code + // is a little dangerous. + if (ret.hasValue()) { + enc.add(bmgr.implication( + joinExec, + context.equal( + context.result(join), + context.encodeExpressionAt(ret.getValue().get(), ret) + ) + )); + } } return bmgr.and(enc); diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/EventFactory.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/EventFactory.java index 50a5550561..f7523f2a0d 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/EventFactory.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/EventFactory.java @@ -28,10 +28,7 @@ import com.dat3m.dartagnan.program.event.core.annotations.FunReturnMarker; import com.dat3m.dartagnan.program.event.core.annotations.StringAnnotation; import com.dat3m.dartagnan.program.event.core.special.StateSnapshot; -import com.dat3m.dartagnan.program.event.core.threading.ThreadArgument; -import com.dat3m.dartagnan.program.event.core.threading.ThreadCreate; -import com.dat3m.dartagnan.program.event.core.threading.ThreadJoin; -import com.dat3m.dartagnan.program.event.core.threading.ThreadStart; +import com.dat3m.dartagnan.program.event.core.threading.*; import com.dat3m.dartagnan.program.event.functions.AbortIf; import com.dat3m.dartagnan.program.event.functions.Return; import com.dat3m.dartagnan.program.event.functions.ValueFunctionCall; @@ -342,6 +339,10 @@ public static ThreadStart newThreadStart(ThreadCreate creator) { return new ThreadStart(creator); } + public static ThreadReturn newThreadReturn(Expression value) { + return new ThreadReturn(value); + } + public static class Special { private Special() { } diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadReturn.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadReturn.java new file mode 100644 index 0000000000..0cedf9499e --- /dev/null +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadReturn.java @@ -0,0 +1,58 @@ +package com.dat3m.dartagnan.program.event.core.threading; + +import com.dat3m.dartagnan.expression.Expression; +import com.dat3m.dartagnan.expression.ExpressionVisitor; +import com.dat3m.dartagnan.program.Register; +import com.dat3m.dartagnan.program.event.AbstractEvent; +import com.dat3m.dartagnan.program.event.RegReader; + +import java.util.HashSet; +import java.util.Optional; +import java.util.Set; + +public class ThreadReturn extends AbstractEvent implements RegReader { + + protected Expression expression; // May be NULL + + public ThreadReturn(Expression expression) { + this.expression = expression; + } + + protected ThreadReturn(ThreadReturn other) { + super(other); + this.expression = other.expression; + } + + public boolean hasValue() { + return expression != null; + } + + public Optional getValue() { + return Optional.ofNullable(expression); + } + + @Override + protected String defaultString() { + return hasValue() ? String.format("ThreadReturn %s", expression) : "ThreadReturn"; + } + + @Override + public ThreadReturn getCopy() { + return new ThreadReturn(this); + } + + @Override + public Set getRegisterReads() { + if (!hasValue()) { + return new HashSet<>(); + } + return Register.collectRegisterReads(expression, Register.UsageType.DATA, new HashSet<>()); + } + + @Override + public void transformExpressions(ExpressionVisitor exprTransformer) { + if (expression != null) { + expression = expression.accept(exprTransformer); + } + } +} diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/CoreCodeVerification.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/CoreCodeVerification.java index 2dee27a246..ebb7f6348f 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/CoreCodeVerification.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/CoreCodeVerification.java @@ -6,10 +6,7 @@ import com.dat3m.dartagnan.program.event.core.*; import com.dat3m.dartagnan.program.event.core.annotations.CodeAnnotation; import com.dat3m.dartagnan.program.event.core.special.StateSnapshot; -import com.dat3m.dartagnan.program.event.core.threading.ThreadArgument; -import com.dat3m.dartagnan.program.event.core.threading.ThreadCreate; -import com.dat3m.dartagnan.program.event.core.threading.ThreadJoin; -import com.dat3m.dartagnan.program.event.core.threading.ThreadStart; +import com.dat3m.dartagnan.program.event.core.threading.*; import com.dat3m.dartagnan.program.event.lang.svcomp.BeginAtomic; import com.dat3m.dartagnan.program.event.lang.svcomp.EndAtomic; import org.sosy_lab.common.configuration.Configuration; @@ -38,7 +35,7 @@ public static CoreCodeVerification fromConfig(Configuration config) { CondJump.class, IfAsJump.class, ExecutionStatus.class, Label.class, Local.class, Skip.class, RMWStore.class, RMWStoreExclusive.class, Alloc.class, Assume.class, Assert.class, - ThreadCreate.class, ThreadJoin.class, ThreadArgument.class, ThreadStart.class, + ThreadCreate.class, ThreadJoin.class, ThreadArgument.class, ThreadStart.class, ThreadReturn.class, ControlBarrier.class, NamedBarrier.class, BeginAtomic.class, EndAtomic.class, StateSnapshot.class diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java index 1d71b0d674..37a50fa8fa 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/Intrinsics.java @@ -112,8 +112,8 @@ public ProgramProcessor lateInliningPass() { public enum Info { // --------------------------- pthread threading --------------------------- P_THREAD_CREATE("pthread_create", true, false, true, true, Intrinsics::inlinePthreadCreate), - P_THREAD_EXIT("pthread_exit", false, false, false, false, null), - P_THREAD_JOIN(List.of("pthread_join", "_pthread_join", "__pthread_join"), false, true, false, true, Intrinsics::inlinePthreadJoin), + P_THREAD_EXIT("pthread_exit", false, false, true, true, Intrinsics::inlinePthreadExit), + P_THREAD_JOIN(List.of("pthread_join", "_pthread_join", "__pthread_join"), true, true, false, true, Intrinsics::inlinePthreadJoin), P_THREAD_BARRIER_WAIT("pthread_barrier_wait", false, false, true, true, Intrinsics::inlineAsZero), P_THREAD_SELF(List.of("pthread_self", "__VERIFIER_tid"), false, false, true, false, null), P_THREAD_EQUAL("pthread_equal", false, false, true, false, Intrinsics::inlinePthreadEqual), @@ -465,11 +465,15 @@ private List inlinePthreadJoin(FunctionCall call) { jump, storeRetVal, joinEnd, - newAssert(expressions.makeNEQ(status, statusInvalidTId), "Invalid thread id in pthread_join."), - // TODO: The following should not be able to happen, but we go save here just in case :) - newAssert(expressions.makeEQ(status, statusSuccess), "Unsuccessful pthread_join: reason unknown.") + newAssert(expressions.makeNEQ(status, statusInvalidTId), "Invalid thread id in pthread_join.") ); + } + + private List inlinePthreadExit(FunctionCall call) { + final List arguments = call.getArguments(); + assert arguments.size() == 1 && arguments.get(0).getType().equals(PTHREAD_THREAD_TYPE.getReturnType()); + return List.of(newThreadReturn(arguments.get(0))); } diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java index 70d477fd00..6ac7f68c61 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/ThreadCreation.java @@ -16,6 +16,7 @@ import com.dat3m.dartagnan.program.event.core.Label; import com.dat3m.dartagnan.program.event.core.Local; import com.dat3m.dartagnan.program.event.core.threading.ThreadCreate; +import com.dat3m.dartagnan.program.event.core.threading.ThreadReturn; import com.dat3m.dartagnan.program.event.core.threading.ThreadStart; import com.dat3m.dartagnan.program.event.functions.AbortIf; import com.dat3m.dartagnan.program.event.functions.FunctionCall; @@ -123,7 +124,7 @@ private List createThreads(Program program) { // However, we reassign ids after thread creation so that functions get higher ids. int nextTid = 0; - // We collect metadata about each spawned thread. This is later used to resolve pthread_join + // We collect metadata about each spawned thread. This is later used to resolve thread joining. final List threadData = new ArrayList<>(); final Thread entryPoint = createLLVMThreadFromFunction(main.get(), nextTid++, null, null); threadData.add(new ThreadData(entryPoint, null)); @@ -163,8 +164,9 @@ private List createThreads(Program program) { } /* - This method replaces in all pthread_join calls by a switch over all joinable threads. - */ + This method replaces in all DynamicThreadJoin events by a switch over all joinable threads. + Each switch case contains a static ThreadJoin event. + */ private void resolveDynamicThreadJoin(Program program, List threadData) { int joinCounter = 0; @@ -189,7 +191,9 @@ private void resolveDynamicThreadJoin(Program program, List threadDa final Label joinEnd = EventFactory.newLabel("__joinEnd#" + joinCounter); final Map> tid2joinCases = new LinkedHashMap<>(); for (ThreadData data : threadData) { - if (!data.isJoinable()) { + if (!data.isJoinable() || data.thread() == caller) { + // NOTE: We treat self-joins as an invalid tid id error (~ in alignment with pthread_join semantics) + // We could alternatively make this a non-termination case continue; } Verify.verify(retValRegister.getType().equals(data.thread.getFunctionType().getReturnType())); @@ -202,22 +206,21 @@ private void resolveDynamicThreadJoin(Program program, List threadDa final Label joinCase = EventFactory.newLabel("__joinWithT" + tid + "#" + joinCounter); final List caseBody; - if (data.thread().getFunctionType().getReturnType().equals(retValType)) { - // Successful join + if (!data.thread().getFunctionType().getReturnType().equals(retValType)) { + // Wrong return type caseBody = eventSequence( joinCase, - newThreadJoin(retValRegister, data.thread()), - // TODO: store retVal at retAddr (if retAddr != null) - newAcquireLoad(syncRegister, data.comAddress), - newAssume(expressions.makeNot(syncRegister)), - newLocal(statusRegister, successValue), + newLocal(statusRegister, invalidRetType), EventFactory.newGoto(joinEnd) ); } else { - // Wrong return type + // Successful join caseBody = eventSequence( joinCase, - newLocal(statusRegister, invalidRetType), + newThreadJoin(retValRegister, data.thread()), + newAcquireLoad(syncRegister, data.comAddress), + newAssume(expressions.makeNot(syncRegister)), + newLocal(statusRegister, successValue), EventFactory.newGoto(joinEnd) ); } @@ -282,23 +285,21 @@ private Thread createLLVMThreadFromFunction(Function function, int tid, ThreadCr replaceGlobalsByThreadLocals(function.getProgram().getMemory(), thread); // ------------------- Add end & return label ------------------- + final Register returnRegister = function.hasReturnValue() ? + thread.newRegister("__retval", function.getFunctionType().getReturnType()) : null; final Label threadReturnLabel = EventFactory.newLabel("RETURN_OF_T" + tid); final Label threadEnd = EventFactory.newLabel("END_OF_T" + tid); - thread.append(threadReturnLabel); - thread.append(threadEnd); - // ------------------- Replace AbortIf, Return, and pthread_exit ------------------- - final Register returnRegister = function.hasReturnValue() ? - thread.newRegister("__retval", function.getFunctionType().getReturnType()) : null; + // ------------------- Replace AbortIf, (Thread)Return, and pthread_exit ------------------- for (Event e : thread.getEvents()) { if (e instanceof AbortIf abort) { final Event jumpToEnd = EventFactory.newJump(abort.getCondition(), threadEnd); jumpToEnd.addTags(abort.getTags()); IRHelper.replaceWithMetadata(abort, jumpToEnd); - } else if (e instanceof Return || (e instanceof FunctionCall call - && call.isDirectCall() && call.getCalledFunction().getName().equals("pthread_exit"))) { + } else if (e instanceof Return || e instanceof ThreadReturn) { + // NOTE: We also replace ThreadReturn but generate a single new one (normalization) afterward. final Expression retVal = (e instanceof Return ret) ? ret.getValue().orElse(null) - : ((FunctionCall)e).getArguments().get(0); + : ((ThreadReturn)e).getValue().orElse(null); final List replacement = eventSequence( returnRegister != null ? EventFactory.newLocal(returnRegister, retVal) : null, EventFactory.newGoto(threadReturnLabel) @@ -307,6 +308,13 @@ private Thread createLLVMThreadFromFunction(Function function, int tid, ThreadCr } } + final Event threadReturn = EventFactory.newThreadReturn(returnRegister); + thread.append(List.of( + threadReturnLabel, + threadReturn, + threadEnd + )); + // ------------------- Add Sync, End, and Argument events if this thread was spawned ------------------- if (creator != null) { // Arguments diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/verification/model/ExecutionModel.java b/dartagnan/src/main/java/com/dat3m/dartagnan/verification/model/ExecutionModel.java index 2f78b0a704..249346420d 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/verification/model/ExecutionModel.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/verification/model/ExecutionModel.java @@ -8,6 +8,7 @@ import com.dat3m.dartagnan.program.event.*; import com.dat3m.dartagnan.program.event.core.*; import com.dat3m.dartagnan.program.event.core.threading.ThreadArgument; +import com.dat3m.dartagnan.program.event.core.threading.ThreadJoin; import com.dat3m.dartagnan.program.event.lang.svcomp.BeginAtomic; import com.dat3m.dartagnan.program.event.lang.svcomp.EndAtomic; import com.dat3m.dartagnan.program.filter.Filter; @@ -474,7 +475,7 @@ private void trackDependencies(Event e) { } lastRegWrites.put(regWriter.getResultRegister(), dataDeps); } else { - assert e instanceof ThreadArgument; + assert e instanceof ThreadArgument || e instanceof ThreadJoin; // We have a RegWriter that doesn't read registers, so there are no dependencies. lastRegWrites.put(regWriter.getResultRegister(), new HashSet<>()); } diff --git a/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/MiscellaneousTest.java b/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/MiscellaneousTest.java index 71a6495202..a064caf53a 100644 --- a/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/MiscellaneousTest.java +++ b/dartagnan/src/test/java/com/dat3m/dartagnan/llvm/MiscellaneousTest.java @@ -83,6 +83,8 @@ public static Iterable data() throws IOException { {"thread_local", IMM, PASS, 1}, {"thread_loop", IMM, FAIL, 1}, {"thread_id", IMM, PASS, 1}, + {"thread_return_val", IMM, PASS, 1}, + {"thread_invalid_join", IMM, FAIL, 1}, {"funcPtrInStaticMemory", IMM, PASS, 1}, {"verifierAssert", ARM8, FAIL, 1}, {"uninitRead", IMM, FAIL, 1}, diff --git a/dartagnan/src/test/resources/miscellaneous/pthread.ll b/dartagnan/src/test/resources/miscellaneous/pthread.ll index 19a5ed1350..5305cb3095 100644 --- a/dartagnan/src/test/resources/miscellaneous/pthread.ll +++ b/dartagnan/src/test/resources/miscellaneous/pthread.ll @@ -1,142 +1,146 @@ -; ModuleID = 'benchmarks/c/miscellaneous/pthread.c' -source_filename = "benchmarks/c/miscellaneous/pthread.c" +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/miscellaneous/pthread.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/miscellaneous/pthread.c" target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" target triple = "arm64-apple-macosx14.0.0" %struct._opaque_pthread_mutex_t = type { i64, [56 x i8] } %struct._opaque_pthread_cond_t = type { i64, [40 x i8] } +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } %struct._opaque_pthread_attr_t = type { i64, [56 x i8] } %struct._opaque_pthread_mutexattr_t = type { i64, [8 x i8] } %struct._opaque_pthread_condattr_t = type { i64, [8 x i8] } %struct.timespec = type { i64, i64 } -%struct._opaque_pthread_rwlockattr_t = type { i64, [16 x i8] } %struct._opaque_pthread_rwlock_t = type { i64, [192 x i8] } +%struct._opaque_pthread_rwlockattr_t = type { i64, [16 x i8] } -@__func__.thread_create = private unnamed_addr constant [14 x i8] c"thread_create\00", align 1, !dbg !0 -@.str = private unnamed_addr constant [10 x i8] c"pthread.c\00", align 1, !dbg !8 -@.str.1 = private unnamed_addr constant [12 x i8] c"status == 0\00", align 1, !dbg !13 -@__func__.thread_join = private unnamed_addr constant [12 x i8] c"thread_join\00", align 1, !dbg !18 -@__func__.mutex_init = private unnamed_addr constant [11 x i8] c"mutex_init\00", align 1, !dbg !21 -@__func__.mutex_destroy = private unnamed_addr constant [14 x i8] c"mutex_destroy\00", align 1, !dbg !26 -@__func__.mutex_lock = private unnamed_addr constant [11 x i8] c"mutex_lock\00", align 1, !dbg !28 -@__func__.mutex_unlock = private unnamed_addr constant [13 x i8] c"mutex_unlock\00", align 1, !dbg !30 -@__func__.mutex_test = private unnamed_addr constant [11 x i8] c"mutex_test\00", align 1, !dbg !35 -@.str.2 = private unnamed_addr constant [9 x i8] c"!success\00", align 1, !dbg !37 -@.str.3 = private unnamed_addr constant [8 x i8] c"success\00", align 1, !dbg !42 -@__func__.cond_init = private unnamed_addr constant [10 x i8] c"cond_init\00", align 1, !dbg !47 -@__func__.cond_destroy = private unnamed_addr constant [13 x i8] c"cond_destroy\00", align 1, !dbg !50 -@__func__.cond_signal = private unnamed_addr constant [12 x i8] c"cond_signal\00", align 1, !dbg !52 -@__func__.cond_broadcast = private unnamed_addr constant [15 x i8] c"cond_broadcast\00", align 1, !dbg !54 -@phase = global i32 0, align 4, !dbg !59 -@cond_mutex = global %struct._opaque_pthread_mutex_t zeroinitializer, align 8, !dbg !88 -@cond = global %struct._opaque_pthread_cond_t zeroinitializer, align 8, !dbg !102 -@__func__.rwlock_init = private unnamed_addr constant [12 x i8] c"rwlock_init\00", align 1, !dbg !66 -@__func__.rwlock_destroy = private unnamed_addr constant [15 x i8] c"rwlock_destroy\00", align 1, !dbg !68 -@__func__.rwlock_wrlock = private unnamed_addr constant [14 x i8] c"rwlock_wrlock\00", align 1, !dbg !70 -@__func__.rwlock_rdlock = private unnamed_addr constant [14 x i8] c"rwlock_rdlock\00", align 1, !dbg !72 -@__func__.rwlock_unlock = private unnamed_addr constant [14 x i8] c"rwlock_unlock\00", align 1, !dbg !74 -@__func__.rwlock_test = private unnamed_addr constant [12 x i8] c"rwlock_test\00", align 1, !dbg !76 -@latest_thread = global ptr null, align 8, !dbg !114 -@local_data = global i64 0, align 8, !dbg !137 -@__func__.key_worker = private unnamed_addr constant [11 x i8] c"key_worker\00", align 1, !dbg !78 -@.str.4 = private unnamed_addr constant [28 x i8] c"my_local_data == &my_secret\00", align 1, !dbg !80 -@__func__.key_test = private unnamed_addr constant [9 x i8] c"key_test\00", align 1, !dbg !85 +@__func__.thread_create = private unnamed_addr constant [14 x i8] c"thread_create\00", align 1 +@.str = private unnamed_addr constant [10 x i8] c"pthread.c\00", align 1 +@.str.1 = private unnamed_addr constant [12 x i8] c"status == 0\00", align 1 +@__func__.thread_join = private unnamed_addr constant [12 x i8] c"thread_join\00", align 1 +@__func__.mutex_init = private unnamed_addr constant [11 x i8] c"mutex_init\00", align 1 +@__func__.mutex_destroy = private unnamed_addr constant [14 x i8] c"mutex_destroy\00", align 1 +@__func__.mutex_lock = private unnamed_addr constant [11 x i8] c"mutex_lock\00", align 1 +@__func__.mutex_unlock = private unnamed_addr constant [13 x i8] c"mutex_unlock\00", align 1 +@__func__.mutex_test = private unnamed_addr constant [11 x i8] c"mutex_test\00", align 1 +@.str.2 = private unnamed_addr constant [9 x i8] c"!success\00", align 1 +@.str.3 = private unnamed_addr constant [8 x i8] c"success\00", align 1 +@__func__.cond_init = private unnamed_addr constant [10 x i8] c"cond_init\00", align 1 +@__func__.cond_destroy = private unnamed_addr constant [13 x i8] c"cond_destroy\00", align 1 +@__func__.cond_signal = private unnamed_addr constant [12 x i8] c"cond_signal\00", align 1 +@__func__.cond_broadcast = private unnamed_addr constant [15 x i8] c"cond_broadcast\00", align 1 +@phase = global i32 0, align 4, !dbg !0 +@cond_mutex = global %struct._opaque_pthread_mutex_t zeroinitializer, align 8, !dbg !9 +@cond = global %struct._opaque_pthread_cond_t zeroinitializer, align 8, !dbg !24 +@__func__.cond_test = private unnamed_addr constant [10 x i8] c"cond_test\00", align 1 +@.str.4 = private unnamed_addr constant [18 x i8] c"result == message\00", align 1 +@__func__.rwlock_init = private unnamed_addr constant [12 x i8] c"rwlock_init\00", align 1 +@__func__.rwlock_destroy = private unnamed_addr constant [15 x i8] c"rwlock_destroy\00", align 1 +@__func__.rwlock_wrlock = private unnamed_addr constant [14 x i8] c"rwlock_wrlock\00", align 1 +@__func__.rwlock_rdlock = private unnamed_addr constant [14 x i8] c"rwlock_rdlock\00", align 1 +@__func__.rwlock_unlock = private unnamed_addr constant [14 x i8] c"rwlock_unlock\00", align 1 +@__func__.rwlock_test = private unnamed_addr constant [12 x i8] c"rwlock_test\00", align 1 +@latest_thread = global %struct._opaque_pthread_t* null, align 8, !dbg !36 +@local_data = global i64 0, align 8, !dbg !59 +@__func__.key_worker = private unnamed_addr constant [11 x i8] c"key_worker\00", align 1 +@.str.5 = private unnamed_addr constant [28 x i8] c"my_local_data == &my_secret\00", align 1 +@__func__.key_test = private unnamed_addr constant [9 x i8] c"key_test\00", align 1 ; Function Attrs: noinline nounwind ssp uwtable -define ptr @thread_create(ptr noundef %0, ptr noundef %1) #0 !dbg !151 { - %3 = alloca ptr, align 8 - %4 = alloca ptr, align 8 - %5 = alloca ptr, align 8 +define %struct._opaque_pthread_t* @thread_create(i8* (i8*)* noundef %0, i8* noundef %1) #0 !dbg !77 { + %3 = alloca i8* (i8*)*, align 8 + %4 = alloca i8*, align 8 + %5 = alloca %struct._opaque_pthread_t*, align 8 %6 = alloca %struct._opaque_pthread_attr_t, align 8 %7 = alloca i32, align 4 - store ptr %0, ptr %3, align 8 - call void @llvm.dbg.declare(metadata ptr %3, metadata !158, metadata !DIExpression()), !dbg !159 - store ptr %1, ptr %4, align 8 - call void @llvm.dbg.declare(metadata ptr %4, metadata !160, metadata !DIExpression()), !dbg !161 - call void @llvm.dbg.declare(metadata ptr %5, metadata !162, metadata !DIExpression()), !dbg !163 - call void @llvm.dbg.declare(metadata ptr %6, metadata !164, metadata !DIExpression()), !dbg !172 - %8 = call i32 @pthread_attr_init(ptr noundef %6), !dbg !173 - call void @llvm.dbg.declare(metadata ptr %7, metadata !174, metadata !DIExpression()), !dbg !175 - %9 = load ptr, ptr %3, align 8, !dbg !176 - %10 = load ptr, ptr %4, align 8, !dbg !177 - %11 = call i32 @pthread_create(ptr noundef %5, ptr noundef %6, ptr noundef %9, ptr noundef %10), !dbg !178 - store i32 %11, ptr %7, align 4, !dbg !175 - %12 = load i32, ptr %7, align 4, !dbg !179 - %13 = icmp eq i32 %12, 0, !dbg !179 - %14 = xor i1 %13, true, !dbg !179 - %15 = zext i1 %14 to i32, !dbg !179 - %16 = sext i32 %15 to i64, !dbg !179 - %17 = icmp ne i64 %16, 0, !dbg !179 - br i1 %17, label %18, label %20, !dbg !179 + store i8* (i8*)* %0, i8* (i8*)** %3, align 8 + call void @llvm.dbg.declare(metadata i8* (i8*)** %3, metadata !84, metadata !DIExpression()), !dbg !85 + store i8* %1, i8** %4, align 8 + call void @llvm.dbg.declare(metadata i8** %4, metadata !86, metadata !DIExpression()), !dbg !87 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %5, metadata !88, metadata !DIExpression()), !dbg !89 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_attr_t* %6, metadata !90, metadata !DIExpression()), !dbg !98 + %8 = call i32 @pthread_attr_init(%struct._opaque_pthread_attr_t* noundef %6), !dbg !99 + call void @llvm.dbg.declare(metadata i32* %7, metadata !100, metadata !DIExpression()), !dbg !101 + %9 = load i8* (i8*)*, i8* (i8*)** %3, align 8, !dbg !102 + %10 = load i8*, i8** %4, align 8, !dbg !103 + %11 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %5, %struct._opaque_pthread_attr_t* noundef %6, i8* (i8*)* noundef %9, i8* noundef %10), !dbg !104 + store i32 %11, i32* %7, align 4, !dbg !101 + %12 = load i32, i32* %7, align 4, !dbg !105 + %13 = icmp eq i32 %12, 0, !dbg !105 + %14 = xor i1 %13, true, !dbg !105 + %15 = zext i1 %14 to i32, !dbg !105 + %16 = sext i32 %15 to i64, !dbg !105 + %17 = icmp ne i64 %16, 0, !dbg !105 + br i1 %17, label %18, label %20, !dbg !105 18: ; preds = %2 - call void @__assert_rtn(ptr noundef @__func__.thread_create, ptr noundef @.str, i32 noundef 18, ptr noundef @.str.1) #4, !dbg !179 - unreachable, !dbg !179 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.thread_create, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 18, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !105 + unreachable, !dbg !105 19: ; No predecessors! - br label %21, !dbg !179 + br label %21, !dbg !105 20: ; preds = %2 - br label %21, !dbg !179 + br label %21, !dbg !105 21: ; preds = %20, %19 - %22 = call i32 @pthread_attr_destroy(ptr noundef %6), !dbg !180 - %23 = load ptr, ptr %5, align 8, !dbg !181 - ret ptr %23, !dbg !182 + %22 = call i32 @pthread_attr_destroy(%struct._opaque_pthread_attr_t* noundef %6), !dbg !106 + %23 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %5, align 8, !dbg !107 + ret %struct._opaque_pthread_t* %23, !dbg !108 } -; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 -declare i32 @pthread_attr_init(ptr noundef) #2 +declare i32 @pthread_attr_init(%struct._opaque_pthread_attr_t* noundef) #2 -declare i32 @pthread_create(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2 +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 ; Function Attrs: cold noreturn -declare void @__assert_rtn(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3 +declare void @__assert_rtn(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #3 -declare i32 @pthread_attr_destroy(ptr noundef) #2 +declare i32 @pthread_attr_destroy(%struct._opaque_pthread_attr_t* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define ptr @thread_join(ptr noundef %0) #0 !dbg !183 { - %2 = alloca ptr, align 8 - %3 = alloca ptr, align 8 +define i8* @thread_join(%struct._opaque_pthread_t* noundef %0) #0 !dbg !109 { + %2 = alloca %struct._opaque_pthread_t*, align 8 + %3 = alloca i8*, align 8 %4 = alloca i32, align 4 - store ptr %0, ptr %2, align 8 - call void @llvm.dbg.declare(metadata ptr %2, metadata !186, metadata !DIExpression()), !dbg !187 - call void @llvm.dbg.declare(metadata ptr %3, metadata !188, metadata !DIExpression()), !dbg !189 - call void @llvm.dbg.declare(metadata ptr %4, metadata !190, metadata !DIExpression()), !dbg !191 - %5 = load ptr, ptr %2, align 8, !dbg !192 - %6 = call i32 @"\01_pthread_join"(ptr noundef %5, ptr noundef %3), !dbg !193 - store i32 %6, ptr %4, align 4, !dbg !191 - %7 = load i32, ptr %4, align 4, !dbg !194 - %8 = icmp eq i32 %7, 0, !dbg !194 - %9 = xor i1 %8, true, !dbg !194 - %10 = zext i1 %9 to i32, !dbg !194 - %11 = sext i32 %10 to i64, !dbg !194 - %12 = icmp ne i64 %11, 0, !dbg !194 - br i1 %12, label %13, label %15, !dbg !194 + store %struct._opaque_pthread_t* %0, %struct._opaque_pthread_t** %2, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !112, metadata !DIExpression()), !dbg !113 + call void @llvm.dbg.declare(metadata i8** %3, metadata !114, metadata !DIExpression()), !dbg !115 + call void @llvm.dbg.declare(metadata i32* %4, metadata !116, metadata !DIExpression()), !dbg !117 + %5 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %2, align 8, !dbg !118 + %6 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %5, i8** noundef %3), !dbg !119 + store i32 %6, i32* %4, align 4, !dbg !117 + %7 = load i32, i32* %4, align 4, !dbg !120 + %8 = icmp eq i32 %7, 0, !dbg !120 + %9 = xor i1 %8, true, !dbg !120 + %10 = zext i1 %9 to i32, !dbg !120 + %11 = sext i32 %10 to i64, !dbg !120 + %12 = icmp ne i64 %11, 0, !dbg !120 + br i1 %12, label %13, label %15, !dbg !120 13: ; preds = %1 - call void @__assert_rtn(ptr noundef @__func__.thread_join, ptr noundef @.str, i32 noundef 27, ptr noundef @.str.1) #4, !dbg !194 - unreachable, !dbg !194 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.thread_join, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 27, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !120 + unreachable, !dbg !120 14: ; No predecessors! - br label %16, !dbg !194 + br label %16, !dbg !120 15: ; preds = %1 - br label %16, !dbg !194 + br label %16, !dbg !120 16: ; preds = %15, %14 - %17 = load ptr, ptr %3, align 8, !dbg !195 - ret ptr %17, !dbg !196 + %17 = load i8*, i8** %3, align 8, !dbg !121 + ret i8* %17, !dbg !122 } -declare i32 @"\01_pthread_join"(ptr noundef, ptr noundef) #2 +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define void @mutex_init(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #0 !dbg !197 { - %6 = alloca ptr, align 8 +define void @mutex_init(%struct._opaque_pthread_mutex_t* noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #0 !dbg !123 { + %6 = alloca %struct._opaque_pthread_mutex_t*, align 8 %7 = alloca i32, align 4 %8 = alloca i32, align 4 %9 = alloca i32, align 4 @@ -144,1126 +148,1146 @@ define void @mutex_init(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noun %11 = alloca i32, align 4 %12 = alloca i32, align 4 %13 = alloca %struct._opaque_pthread_mutexattr_t, align 8 - store ptr %0, ptr %6, align 8 - call void @llvm.dbg.declare(metadata ptr %6, metadata !201, metadata !DIExpression()), !dbg !202 - store i32 %1, ptr %7, align 4 - call void @llvm.dbg.declare(metadata ptr %7, metadata !203, metadata !DIExpression()), !dbg !204 - store i32 %2, ptr %8, align 4 - call void @llvm.dbg.declare(metadata ptr %8, metadata !205, metadata !DIExpression()), !dbg !206 - store i32 %3, ptr %9, align 4 - call void @llvm.dbg.declare(metadata ptr %9, metadata !207, metadata !DIExpression()), !dbg !208 - store i32 %4, ptr %10, align 4 - call void @llvm.dbg.declare(metadata ptr %10, metadata !209, metadata !DIExpression()), !dbg !210 - call void @llvm.dbg.declare(metadata ptr %11, metadata !211, metadata !DIExpression()), !dbg !212 - call void @llvm.dbg.declare(metadata ptr %12, metadata !213, metadata !DIExpression()), !dbg !214 - call void @llvm.dbg.declare(metadata ptr %13, metadata !215, metadata !DIExpression()), !dbg !223 - %14 = call i32 @pthread_mutexattr_init(ptr noundef %13), !dbg !224 - store i32 %14, ptr %11, align 4, !dbg !225 - %15 = load i32, ptr %11, align 4, !dbg !226 - %16 = icmp eq i32 %15, 0, !dbg !226 - %17 = xor i1 %16, true, !dbg !226 - %18 = zext i1 %17 to i32, !dbg !226 - %19 = sext i32 %18 to i64, !dbg !226 - %20 = icmp ne i64 %19, 0, !dbg !226 - br i1 %20, label %21, label %23, !dbg !226 + store %struct._opaque_pthread_mutex_t* %0, %struct._opaque_pthread_mutex_t** %6, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_mutex_t** %6, metadata !127, metadata !DIExpression()), !dbg !128 + store i32 %1, i32* %7, align 4 + call void @llvm.dbg.declare(metadata i32* %7, metadata !129, metadata !DIExpression()), !dbg !130 + store i32 %2, i32* %8, align 4 + call void @llvm.dbg.declare(metadata i32* %8, metadata !131, metadata !DIExpression()), !dbg !132 + store i32 %3, i32* %9, align 4 + call void @llvm.dbg.declare(metadata i32* %9, metadata !133, metadata !DIExpression()), !dbg !134 + store i32 %4, i32* %10, align 4 + call void @llvm.dbg.declare(metadata i32* %10, metadata !135, metadata !DIExpression()), !dbg !136 + call void @llvm.dbg.declare(metadata i32* %11, metadata !137, metadata !DIExpression()), !dbg !138 + call void @llvm.dbg.declare(metadata i32* %12, metadata !139, metadata !DIExpression()), !dbg !140 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_mutexattr_t* %13, metadata !141, metadata !DIExpression()), !dbg !152 + %14 = call i32 @pthread_mutexattr_init(%struct._opaque_pthread_mutexattr_t* noundef %13), !dbg !153 + store i32 %14, i32* %11, align 4, !dbg !154 + %15 = load i32, i32* %11, align 4, !dbg !155 + %16 = icmp eq i32 %15, 0, !dbg !155 + %17 = xor i1 %16, true, !dbg !155 + %18 = zext i1 %17 to i32, !dbg !155 + %19 = sext i32 %18 to i64, !dbg !155 + %20 = icmp ne i64 %19, 0, !dbg !155 + br i1 %20, label %21, label %23, !dbg !155 21: ; preds = %5 - call void @__assert_rtn(ptr noundef @__func__.mutex_init, ptr noundef @.str, i32 noundef 49, ptr noundef @.str.1) #4, !dbg !226 - unreachable, !dbg !226 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.mutex_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 49, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !155 + unreachable, !dbg !155 22: ; No predecessors! - br label %24, !dbg !226 + br label %24, !dbg !155 23: ; preds = %5 - br label %24, !dbg !226 + br label %24, !dbg !155 24: ; preds = %23, %22 - %25 = load i32, ptr %7, align 4, !dbg !227 - %26 = call i32 @pthread_mutexattr_settype(ptr noundef %13, i32 noundef %25), !dbg !228 - store i32 %26, ptr %11, align 4, !dbg !229 - %27 = load i32, ptr %11, align 4, !dbg !230 - %28 = icmp eq i32 %27, 0, !dbg !230 - %29 = xor i1 %28, true, !dbg !230 - %30 = zext i1 %29 to i32, !dbg !230 - %31 = sext i32 %30 to i64, !dbg !230 - %32 = icmp ne i64 %31, 0, !dbg !230 - br i1 %32, label %33, label %35, !dbg !230 + %25 = load i32, i32* %7, align 4, !dbg !156 + %26 = call i32 @pthread_mutexattr_settype(%struct._opaque_pthread_mutexattr_t* noundef %13, i32 noundef %25), !dbg !157 + store i32 %26, i32* %11, align 4, !dbg !158 + %27 = load i32, i32* %11, align 4, !dbg !159 + %28 = icmp eq i32 %27, 0, !dbg !159 + %29 = xor i1 %28, true, !dbg !159 + %30 = zext i1 %29 to i32, !dbg !159 + %31 = sext i32 %30 to i64, !dbg !159 + %32 = icmp ne i64 %31, 0, !dbg !159 + br i1 %32, label %33, label %35, !dbg !159 33: ; preds = %24 - call void @__assert_rtn(ptr noundef @__func__.mutex_init, ptr noundef @.str, i32 noundef 52, ptr noundef @.str.1) #4, !dbg !230 - unreachable, !dbg !230 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.mutex_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 52, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !159 + unreachable, !dbg !159 34: ; No predecessors! - br label %36, !dbg !230 + br label %36, !dbg !159 35: ; preds = %24 - br label %36, !dbg !230 + br label %36, !dbg !159 36: ; preds = %35, %34 - %37 = call i32 @pthread_mutexattr_gettype(ptr noundef %13, ptr noundef %12), !dbg !231 - store i32 %37, ptr %11, align 4, !dbg !232 - %38 = load i32, ptr %11, align 4, !dbg !233 - %39 = icmp eq i32 %38, 0, !dbg !233 - %40 = xor i1 %39, true, !dbg !233 - %41 = zext i1 %40 to i32, !dbg !233 - %42 = sext i32 %41 to i64, !dbg !233 - %43 = icmp ne i64 %42, 0, !dbg !233 - br i1 %43, label %44, label %46, !dbg !233 + %37 = call i32 @pthread_mutexattr_gettype(%struct._opaque_pthread_mutexattr_t* noundef %13, i32* noundef %12), !dbg !160 + store i32 %37, i32* %11, align 4, !dbg !161 + %38 = load i32, i32* %11, align 4, !dbg !162 + %39 = icmp eq i32 %38, 0, !dbg !162 + %40 = xor i1 %39, true, !dbg !162 + %41 = zext i1 %40 to i32, !dbg !162 + %42 = sext i32 %41 to i64, !dbg !162 + %43 = icmp ne i64 %42, 0, !dbg !162 + br i1 %43, label %44, label %46, !dbg !162 44: ; preds = %36 - call void @__assert_rtn(ptr noundef @__func__.mutex_init, ptr noundef @.str, i32 noundef 54, ptr noundef @.str.1) #4, !dbg !233 - unreachable, !dbg !233 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.mutex_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 54, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !162 + unreachable, !dbg !162 45: ; No predecessors! - br label %47, !dbg !233 + br label %47, !dbg !162 46: ; preds = %36 - br label %47, !dbg !233 + br label %47, !dbg !162 47: ; preds = %46, %45 - %48 = load i32, ptr %8, align 4, !dbg !234 - %49 = call i32 @pthread_mutexattr_setprotocol(ptr noundef %13, i32 noundef %48), !dbg !235 - store i32 %49, ptr %11, align 4, !dbg !236 - %50 = load i32, ptr %11, align 4, !dbg !237 - %51 = icmp eq i32 %50, 0, !dbg !237 - %52 = xor i1 %51, true, !dbg !237 - %53 = zext i1 %52 to i32, !dbg !237 - %54 = sext i32 %53 to i64, !dbg !237 - %55 = icmp ne i64 %54, 0, !dbg !237 - br i1 %55, label %56, label %58, !dbg !237 + %48 = load i32, i32* %8, align 4, !dbg !163 + %49 = call i32 @pthread_mutexattr_setprotocol(%struct._opaque_pthread_mutexattr_t* noundef %13, i32 noundef %48), !dbg !164 + store i32 %49, i32* %11, align 4, !dbg !165 + %50 = load i32, i32* %11, align 4, !dbg !166 + %51 = icmp eq i32 %50, 0, !dbg !166 + %52 = xor i1 %51, true, !dbg !166 + %53 = zext i1 %52 to i32, !dbg !166 + %54 = sext i32 %53 to i64, !dbg !166 + %55 = icmp ne i64 %54, 0, !dbg !166 + br i1 %55, label %56, label %58, !dbg !166 56: ; preds = %47 - call void @__assert_rtn(ptr noundef @__func__.mutex_init, ptr noundef @.str, i32 noundef 57, ptr noundef @.str.1) #4, !dbg !237 - unreachable, !dbg !237 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.mutex_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 57, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !166 + unreachable, !dbg !166 57: ; No predecessors! - br label %59, !dbg !237 + br label %59, !dbg !166 58: ; preds = %47 - br label %59, !dbg !237 + br label %59, !dbg !166 59: ; preds = %58, %57 - %60 = call i32 @pthread_mutexattr_getprotocol(ptr noundef %13, ptr noundef %12), !dbg !238 - store i32 %60, ptr %11, align 4, !dbg !239 - %61 = load i32, ptr %11, align 4, !dbg !240 - %62 = icmp eq i32 %61, 0, !dbg !240 - %63 = xor i1 %62, true, !dbg !240 - %64 = zext i1 %63 to i32, !dbg !240 - %65 = sext i32 %64 to i64, !dbg !240 - %66 = icmp ne i64 %65, 0, !dbg !240 - br i1 %66, label %67, label %69, !dbg !240 + %60 = call i32 @pthread_mutexattr_getprotocol(%struct._opaque_pthread_mutexattr_t* noundef %13, i32* noundef %12), !dbg !167 + store i32 %60, i32* %11, align 4, !dbg !168 + %61 = load i32, i32* %11, align 4, !dbg !169 + %62 = icmp eq i32 %61, 0, !dbg !169 + %63 = xor i1 %62, true, !dbg !169 + %64 = zext i1 %63 to i32, !dbg !169 + %65 = sext i32 %64 to i64, !dbg !169 + %66 = icmp ne i64 %65, 0, !dbg !169 + br i1 %66, label %67, label %69, !dbg !169 67: ; preds = %59 - call void @__assert_rtn(ptr noundef @__func__.mutex_init, ptr noundef @.str, i32 noundef 59, ptr noundef @.str.1) #4, !dbg !240 - unreachable, !dbg !240 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.mutex_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 59, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !169 + unreachable, !dbg !169 68: ; No predecessors! - br label %70, !dbg !240 + br label %70, !dbg !169 69: ; preds = %59 - br label %70, !dbg !240 + br label %70, !dbg !169 70: ; preds = %69, %68 - %71 = load i32, ptr %9, align 4, !dbg !241 - %72 = call i32 @pthread_mutexattr_setpolicy_np(ptr noundef %13, i32 noundef %71), !dbg !242 - store i32 %72, ptr %11, align 4, !dbg !243 - %73 = load i32, ptr %11, align 4, !dbg !244 - %74 = icmp eq i32 %73, 0, !dbg !244 - %75 = xor i1 %74, true, !dbg !244 - %76 = zext i1 %75 to i32, !dbg !244 - %77 = sext i32 %76 to i64, !dbg !244 - %78 = icmp ne i64 %77, 0, !dbg !244 - br i1 %78, label %79, label %81, !dbg !244 + %71 = load i32, i32* %9, align 4, !dbg !170 + %72 = call i32 @pthread_mutexattr_setpolicy_np(%struct._opaque_pthread_mutexattr_t* noundef %13, i32 noundef %71), !dbg !171 + store i32 %72, i32* %11, align 4, !dbg !172 + %73 = load i32, i32* %11, align 4, !dbg !173 + %74 = icmp eq i32 %73, 0, !dbg !173 + %75 = xor i1 %74, true, !dbg !173 + %76 = zext i1 %75 to i32, !dbg !173 + %77 = sext i32 %76 to i64, !dbg !173 + %78 = icmp ne i64 %77, 0, !dbg !173 + br i1 %78, label %79, label %81, !dbg !173 79: ; preds = %70 - call void @__assert_rtn(ptr noundef @__func__.mutex_init, ptr noundef @.str, i32 noundef 62, ptr noundef @.str.1) #4, !dbg !244 - unreachable, !dbg !244 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.mutex_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 62, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !173 + unreachable, !dbg !173 80: ; No predecessors! - br label %82, !dbg !244 + br label %82, !dbg !173 81: ; preds = %70 - br label %82, !dbg !244 + br label %82, !dbg !173 82: ; preds = %81, %80 - %83 = call i32 @pthread_mutexattr_getpolicy_np(ptr noundef %13, ptr noundef %12), !dbg !245 - store i32 %83, ptr %11, align 4, !dbg !246 - %84 = load i32, ptr %11, align 4, !dbg !247 - %85 = icmp eq i32 %84, 0, !dbg !247 - %86 = xor i1 %85, true, !dbg !247 - %87 = zext i1 %86 to i32, !dbg !247 - %88 = sext i32 %87 to i64, !dbg !247 - %89 = icmp ne i64 %88, 0, !dbg !247 - br i1 %89, label %90, label %92, !dbg !247 + %83 = call i32 @pthread_mutexattr_getpolicy_np(%struct._opaque_pthread_mutexattr_t* noundef %13, i32* noundef %12), !dbg !174 + store i32 %83, i32* %11, align 4, !dbg !175 + %84 = load i32, i32* %11, align 4, !dbg !176 + %85 = icmp eq i32 %84, 0, !dbg !176 + %86 = xor i1 %85, true, !dbg !176 + %87 = zext i1 %86 to i32, !dbg !176 + %88 = sext i32 %87 to i64, !dbg !176 + %89 = icmp ne i64 %88, 0, !dbg !176 + br i1 %89, label %90, label %92, !dbg !176 90: ; preds = %82 - call void @__assert_rtn(ptr noundef @__func__.mutex_init, ptr noundef @.str, i32 noundef 64, ptr noundef @.str.1) #4, !dbg !247 - unreachable, !dbg !247 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.mutex_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 64, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !176 + unreachable, !dbg !176 91: ; No predecessors! - br label %93, !dbg !247 + br label %93, !dbg !176 92: ; preds = %82 - br label %93, !dbg !247 + br label %93, !dbg !176 93: ; preds = %92, %91 - %94 = load i32, ptr %10, align 4, !dbg !248 - %95 = call i32 @pthread_mutexattr_setprioceiling(ptr noundef %13, i32 noundef %94), !dbg !249 - store i32 %95, ptr %11, align 4, !dbg !250 - %96 = load i32, ptr %11, align 4, !dbg !251 - %97 = icmp eq i32 %96, 0, !dbg !251 - %98 = xor i1 %97, true, !dbg !251 - %99 = zext i1 %98 to i32, !dbg !251 - %100 = sext i32 %99 to i64, !dbg !251 - %101 = icmp ne i64 %100, 0, !dbg !251 - br i1 %101, label %102, label %104, !dbg !251 + %94 = load i32, i32* %10, align 4, !dbg !177 + %95 = call i32 @pthread_mutexattr_setprioceiling(%struct._opaque_pthread_mutexattr_t* noundef %13, i32 noundef %94), !dbg !178 + store i32 %95, i32* %11, align 4, !dbg !179 + %96 = load i32, i32* %11, align 4, !dbg !180 + %97 = icmp eq i32 %96, 0, !dbg !180 + %98 = xor i1 %97, true, !dbg !180 + %99 = zext i1 %98 to i32, !dbg !180 + %100 = sext i32 %99 to i64, !dbg !180 + %101 = icmp ne i64 %100, 0, !dbg !180 + br i1 %101, label %102, label %104, !dbg !180 102: ; preds = %93 - call void @__assert_rtn(ptr noundef @__func__.mutex_init, ptr noundef @.str, i32 noundef 67, ptr noundef @.str.1) #4, !dbg !251 - unreachable, !dbg !251 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.mutex_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 67, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !180 + unreachable, !dbg !180 103: ; No predecessors! - br label %105, !dbg !251 + br label %105, !dbg !180 104: ; preds = %93 - br label %105, !dbg !251 + br label %105, !dbg !180 105: ; preds = %104, %103 - %106 = call i32 @pthread_mutexattr_getprioceiling(ptr noundef %13, ptr noundef %12), !dbg !252 - store i32 %106, ptr %11, align 4, !dbg !253 - %107 = load i32, ptr %11, align 4, !dbg !254 - %108 = icmp eq i32 %107, 0, !dbg !254 - %109 = xor i1 %108, true, !dbg !254 - %110 = zext i1 %109 to i32, !dbg !254 - %111 = sext i32 %110 to i64, !dbg !254 - %112 = icmp ne i64 %111, 0, !dbg !254 - br i1 %112, label %113, label %115, !dbg !254 + %106 = call i32 @pthread_mutexattr_getprioceiling(%struct._opaque_pthread_mutexattr_t* noundef %13, i32* noundef %12), !dbg !181 + store i32 %106, i32* %11, align 4, !dbg !182 + %107 = load i32, i32* %11, align 4, !dbg !183 + %108 = icmp eq i32 %107, 0, !dbg !183 + %109 = xor i1 %108, true, !dbg !183 + %110 = zext i1 %109 to i32, !dbg !183 + %111 = sext i32 %110 to i64, !dbg !183 + %112 = icmp ne i64 %111, 0, !dbg !183 + br i1 %112, label %113, label %115, !dbg !183 113: ; preds = %105 - call void @__assert_rtn(ptr noundef @__func__.mutex_init, ptr noundef @.str, i32 noundef 69, ptr noundef @.str.1) #4, !dbg !254 - unreachable, !dbg !254 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.mutex_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 69, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !183 + unreachable, !dbg !183 114: ; No predecessors! - br label %116, !dbg !254 + br label %116, !dbg !183 115: ; preds = %105 - br label %116, !dbg !254 + br label %116, !dbg !183 116: ; preds = %115, %114 - %117 = load ptr, ptr %6, align 8, !dbg !255 - %118 = call i32 @pthread_mutex_init(ptr noundef %117, ptr noundef %13), !dbg !256 - store i32 %118, ptr %11, align 4, !dbg !257 - %119 = load i32, ptr %11, align 4, !dbg !258 - %120 = icmp eq i32 %119, 0, !dbg !258 - %121 = xor i1 %120, true, !dbg !258 - %122 = zext i1 %121 to i32, !dbg !258 - %123 = sext i32 %122 to i64, !dbg !258 - %124 = icmp ne i64 %123, 0, !dbg !258 - br i1 %124, label %125, label %127, !dbg !258 + %117 = load %struct._opaque_pthread_mutex_t*, %struct._opaque_pthread_mutex_t** %6, align 8, !dbg !184 + %118 = call i32 @pthread_mutex_init(%struct._opaque_pthread_mutex_t* noundef %117, %struct._opaque_pthread_mutexattr_t* noundef %13), !dbg !185 + store i32 %118, i32* %11, align 4, !dbg !186 + %119 = load i32, i32* %11, align 4, !dbg !187 + %120 = icmp eq i32 %119, 0, !dbg !187 + %121 = xor i1 %120, true, !dbg !187 + %122 = zext i1 %121 to i32, !dbg !187 + %123 = sext i32 %122 to i64, !dbg !187 + %124 = icmp ne i64 %123, 0, !dbg !187 + br i1 %124, label %125, label %127, !dbg !187 125: ; preds = %116 - call void @__assert_rtn(ptr noundef @__func__.mutex_init, ptr noundef @.str, i32 noundef 72, ptr noundef @.str.1) #4, !dbg !258 - unreachable, !dbg !258 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.mutex_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 72, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !187 + unreachable, !dbg !187 126: ; No predecessors! - br label %128, !dbg !258 + br label %128, !dbg !187 127: ; preds = %116 - br label %128, !dbg !258 + br label %128, !dbg !187 128: ; preds = %127, %126 - %129 = call i32 @"\01_pthread_mutexattr_destroy"(ptr noundef %13), !dbg !259 - store i32 %129, ptr %11, align 4, !dbg !260 - %130 = load i32, ptr %11, align 4, !dbg !261 - %131 = icmp eq i32 %130, 0, !dbg !261 - %132 = xor i1 %131, true, !dbg !261 - %133 = zext i1 %132 to i32, !dbg !261 - %134 = sext i32 %133 to i64, !dbg !261 - %135 = icmp ne i64 %134, 0, !dbg !261 - br i1 %135, label %136, label %138, !dbg !261 + %129 = call i32 @"\01_pthread_mutexattr_destroy"(%struct._opaque_pthread_mutexattr_t* noundef %13), !dbg !188 + store i32 %129, i32* %11, align 4, !dbg !189 + %130 = load i32, i32* %11, align 4, !dbg !190 + %131 = icmp eq i32 %130, 0, !dbg !190 + %132 = xor i1 %131, true, !dbg !190 + %133 = zext i1 %132 to i32, !dbg !190 + %134 = sext i32 %133 to i64, !dbg !190 + %135 = icmp ne i64 %134, 0, !dbg !190 + br i1 %135, label %136, label %138, !dbg !190 136: ; preds = %128 - call void @__assert_rtn(ptr noundef @__func__.mutex_init, ptr noundef @.str, i32 noundef 74, ptr noundef @.str.1) #4, !dbg !261 - unreachable, !dbg !261 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.mutex_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 74, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !190 + unreachable, !dbg !190 137: ; No predecessors! - br label %139, !dbg !261 + br label %139, !dbg !190 138: ; preds = %128 - br label %139, !dbg !261 + br label %139, !dbg !190 139: ; preds = %138, %137 - ret void, !dbg !262 + ret void, !dbg !191 } -declare i32 @pthread_mutexattr_init(ptr noundef) #2 +declare i32 @pthread_mutexattr_init(%struct._opaque_pthread_mutexattr_t* noundef) #2 -declare i32 @pthread_mutexattr_settype(ptr noundef, i32 noundef) #2 +declare i32 @pthread_mutexattr_settype(%struct._opaque_pthread_mutexattr_t* noundef, i32 noundef) #2 -declare i32 @pthread_mutexattr_gettype(ptr noundef, ptr noundef) #2 +declare i32 @pthread_mutexattr_gettype(%struct._opaque_pthread_mutexattr_t* noundef, i32* noundef) #2 -declare i32 @pthread_mutexattr_setprotocol(ptr noundef, i32 noundef) #2 +declare i32 @pthread_mutexattr_setprotocol(%struct._opaque_pthread_mutexattr_t* noundef, i32 noundef) #2 -declare i32 @pthread_mutexattr_getprotocol(ptr noundef, ptr noundef) #2 +declare i32 @pthread_mutexattr_getprotocol(%struct._opaque_pthread_mutexattr_t* noundef, i32* noundef) #2 -declare i32 @pthread_mutexattr_setpolicy_np(ptr noundef, i32 noundef) #2 +declare i32 @pthread_mutexattr_setpolicy_np(%struct._opaque_pthread_mutexattr_t* noundef, i32 noundef) #2 -declare i32 @pthread_mutexattr_getpolicy_np(ptr noundef, ptr noundef) #2 +declare i32 @pthread_mutexattr_getpolicy_np(%struct._opaque_pthread_mutexattr_t* noundef, i32* noundef) #2 -declare i32 @pthread_mutexattr_setprioceiling(ptr noundef, i32 noundef) #2 +declare i32 @pthread_mutexattr_setprioceiling(%struct._opaque_pthread_mutexattr_t* noundef, i32 noundef) #2 -declare i32 @pthread_mutexattr_getprioceiling(ptr noundef, ptr noundef) #2 +declare i32 @pthread_mutexattr_getprioceiling(%struct._opaque_pthread_mutexattr_t* noundef, i32* noundef) #2 -declare i32 @pthread_mutex_init(ptr noundef, ptr noundef) #2 +declare i32 @pthread_mutex_init(%struct._opaque_pthread_mutex_t* noundef, %struct._opaque_pthread_mutexattr_t* noundef) #2 -declare i32 @"\01_pthread_mutexattr_destroy"(ptr noundef) #2 +declare i32 @"\01_pthread_mutexattr_destroy"(%struct._opaque_pthread_mutexattr_t* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define void @mutex_destroy(ptr noundef %0) #0 !dbg !263 { - %2 = alloca ptr, align 8 +define void @mutex_destroy(%struct._opaque_pthread_mutex_t* noundef %0) #0 !dbg !192 { + %2 = alloca %struct._opaque_pthread_mutex_t*, align 8 %3 = alloca i32, align 4 - store ptr %0, ptr %2, align 8 - call void @llvm.dbg.declare(metadata ptr %2, metadata !266, metadata !DIExpression()), !dbg !267 - call void @llvm.dbg.declare(metadata ptr %3, metadata !268, metadata !DIExpression()), !dbg !269 - %4 = load ptr, ptr %2, align 8, !dbg !270 - %5 = call i32 @pthread_mutex_destroy(ptr noundef %4), !dbg !271 - store i32 %5, ptr %3, align 4, !dbg !269 - %6 = load i32, ptr %3, align 4, !dbg !272 - %7 = icmp eq i32 %6, 0, !dbg !272 - %8 = xor i1 %7, true, !dbg !272 - %9 = zext i1 %8 to i32, !dbg !272 - %10 = sext i32 %9 to i64, !dbg !272 - %11 = icmp ne i64 %10, 0, !dbg !272 - br i1 %11, label %12, label %14, !dbg !272 + store %struct._opaque_pthread_mutex_t* %0, %struct._opaque_pthread_mutex_t** %2, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_mutex_t** %2, metadata !195, metadata !DIExpression()), !dbg !196 + call void @llvm.dbg.declare(metadata i32* %3, metadata !197, metadata !DIExpression()), !dbg !198 + %4 = load %struct._opaque_pthread_mutex_t*, %struct._opaque_pthread_mutex_t** %2, align 8, !dbg !199 + %5 = call i32 @pthread_mutex_destroy(%struct._opaque_pthread_mutex_t* noundef %4), !dbg !200 + store i32 %5, i32* %3, align 4, !dbg !198 + %6 = load i32, i32* %3, align 4, !dbg !201 + %7 = icmp eq i32 %6, 0, !dbg !201 + %8 = xor i1 %7, true, !dbg !201 + %9 = zext i1 %8 to i32, !dbg !201 + %10 = sext i32 %9 to i64, !dbg !201 + %11 = icmp ne i64 %10, 0, !dbg !201 + br i1 %11, label %12, label %14, !dbg !201 12: ; preds = %1 - call void @__assert_rtn(ptr noundef @__func__.mutex_destroy, ptr noundef @.str, i32 noundef 80, ptr noundef @.str.1) #4, !dbg !272 - unreachable, !dbg !272 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.mutex_destroy, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 80, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !201 + unreachable, !dbg !201 13: ; No predecessors! - br label %15, !dbg !272 + br label %15, !dbg !201 14: ; preds = %1 - br label %15, !dbg !272 + br label %15, !dbg !201 15: ; preds = %14, %13 - ret void, !dbg !273 + ret void, !dbg !202 } -declare i32 @pthread_mutex_destroy(ptr noundef) #2 +declare i32 @pthread_mutex_destroy(%struct._opaque_pthread_mutex_t* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define void @mutex_lock(ptr noundef %0) #0 !dbg !274 { - %2 = alloca ptr, align 8 +define void @mutex_lock(%struct._opaque_pthread_mutex_t* noundef %0) #0 !dbg !203 { + %2 = alloca %struct._opaque_pthread_mutex_t*, align 8 %3 = alloca i32, align 4 - store ptr %0, ptr %2, align 8 - call void @llvm.dbg.declare(metadata ptr %2, metadata !275, metadata !DIExpression()), !dbg !276 - call void @llvm.dbg.declare(metadata ptr %3, metadata !277, metadata !DIExpression()), !dbg !278 - %4 = load ptr, ptr %2, align 8, !dbg !279 - %5 = call i32 @pthread_mutex_lock(ptr noundef %4), !dbg !280 - store i32 %5, ptr %3, align 4, !dbg !278 - %6 = load i32, ptr %3, align 4, !dbg !281 - %7 = icmp eq i32 %6, 0, !dbg !281 - %8 = xor i1 %7, true, !dbg !281 - %9 = zext i1 %8 to i32, !dbg !281 - %10 = sext i32 %9 to i64, !dbg !281 - %11 = icmp ne i64 %10, 0, !dbg !281 - br i1 %11, label %12, label %14, !dbg !281 + store %struct._opaque_pthread_mutex_t* %0, %struct._opaque_pthread_mutex_t** %2, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_mutex_t** %2, metadata !204, metadata !DIExpression()), !dbg !205 + call void @llvm.dbg.declare(metadata i32* %3, metadata !206, metadata !DIExpression()), !dbg !207 + %4 = load %struct._opaque_pthread_mutex_t*, %struct._opaque_pthread_mutex_t** %2, align 8, !dbg !208 + %5 = call i32 @pthread_mutex_lock(%struct._opaque_pthread_mutex_t* noundef %4), !dbg !209 + store i32 %5, i32* %3, align 4, !dbg !207 + %6 = load i32, i32* %3, align 4, !dbg !210 + %7 = icmp eq i32 %6, 0, !dbg !210 + %8 = xor i1 %7, true, !dbg !210 + %9 = zext i1 %8 to i32, !dbg !210 + %10 = sext i32 %9 to i64, !dbg !210 + %11 = icmp ne i64 %10, 0, !dbg !210 + br i1 %11, label %12, label %14, !dbg !210 12: ; preds = %1 - call void @__assert_rtn(ptr noundef @__func__.mutex_lock, ptr noundef @.str, i32 noundef 86, ptr noundef @.str.1) #4, !dbg !281 - unreachable, !dbg !281 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.mutex_lock, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 86, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !210 + unreachable, !dbg !210 13: ; No predecessors! - br label %15, !dbg !281 + br label %15, !dbg !210 14: ; preds = %1 - br label %15, !dbg !281 + br label %15, !dbg !210 15: ; preds = %14, %13 - ret void, !dbg !282 + ret void, !dbg !211 } -declare i32 @pthread_mutex_lock(ptr noundef) #2 +declare i32 @pthread_mutex_lock(%struct._opaque_pthread_mutex_t* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define zeroext i1 @mutex_trylock(ptr noundef %0) #0 !dbg !283 { - %2 = alloca ptr, align 8 +define zeroext i1 @mutex_trylock(%struct._opaque_pthread_mutex_t* noundef %0) #0 !dbg !212 { + %2 = alloca %struct._opaque_pthread_mutex_t*, align 8 %3 = alloca i32, align 4 - store ptr %0, ptr %2, align 8 - call void @llvm.dbg.declare(metadata ptr %2, metadata !287, metadata !DIExpression()), !dbg !288 - call void @llvm.dbg.declare(metadata ptr %3, metadata !289, metadata !DIExpression()), !dbg !290 - %4 = load ptr, ptr %2, align 8, !dbg !291 - %5 = call i32 @pthread_mutex_trylock(ptr noundef %4), !dbg !292 - store i32 %5, ptr %3, align 4, !dbg !290 - %6 = load i32, ptr %3, align 4, !dbg !293 - %7 = icmp eq i32 %6, 0, !dbg !294 - ret i1 %7, !dbg !295 + store %struct._opaque_pthread_mutex_t* %0, %struct._opaque_pthread_mutex_t** %2, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_mutex_t** %2, metadata !216, metadata !DIExpression()), !dbg !217 + call void @llvm.dbg.declare(metadata i32* %3, metadata !218, metadata !DIExpression()), !dbg !219 + %4 = load %struct._opaque_pthread_mutex_t*, %struct._opaque_pthread_mutex_t** %2, align 8, !dbg !220 + %5 = call i32 @pthread_mutex_trylock(%struct._opaque_pthread_mutex_t* noundef %4), !dbg !221 + store i32 %5, i32* %3, align 4, !dbg !219 + %6 = load i32, i32* %3, align 4, !dbg !222 + %7 = icmp eq i32 %6, 0, !dbg !223 + ret i1 %7, !dbg !224 } -declare i32 @pthread_mutex_trylock(ptr noundef) #2 +declare i32 @pthread_mutex_trylock(%struct._opaque_pthread_mutex_t* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define void @mutex_unlock(ptr noundef %0) #0 !dbg !296 { - %2 = alloca ptr, align 8 +define void @mutex_unlock(%struct._opaque_pthread_mutex_t* noundef %0) #0 !dbg !225 { + %2 = alloca %struct._opaque_pthread_mutex_t*, align 8 %3 = alloca i32, align 4 - store ptr %0, ptr %2, align 8 - call void @llvm.dbg.declare(metadata ptr %2, metadata !297, metadata !DIExpression()), !dbg !298 - call void @llvm.dbg.declare(metadata ptr %3, metadata !299, metadata !DIExpression()), !dbg !300 - %4 = load ptr, ptr %2, align 8, !dbg !301 - %5 = call i32 @pthread_mutex_unlock(ptr noundef %4), !dbg !302 - store i32 %5, ptr %3, align 4, !dbg !300 - %6 = load i32, ptr %3, align 4, !dbg !303 - %7 = icmp eq i32 %6, 0, !dbg !303 - %8 = xor i1 %7, true, !dbg !303 - %9 = zext i1 %8 to i32, !dbg !303 - %10 = sext i32 %9 to i64, !dbg !303 - %11 = icmp ne i64 %10, 0, !dbg !303 - br i1 %11, label %12, label %14, !dbg !303 + store %struct._opaque_pthread_mutex_t* %0, %struct._opaque_pthread_mutex_t** %2, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_mutex_t** %2, metadata !226, metadata !DIExpression()), !dbg !227 + call void @llvm.dbg.declare(metadata i32* %3, metadata !228, metadata !DIExpression()), !dbg !229 + %4 = load %struct._opaque_pthread_mutex_t*, %struct._opaque_pthread_mutex_t** %2, align 8, !dbg !230 + %5 = call i32 @pthread_mutex_unlock(%struct._opaque_pthread_mutex_t* noundef %4), !dbg !231 + store i32 %5, i32* %3, align 4, !dbg !229 + %6 = load i32, i32* %3, align 4, !dbg !232 + %7 = icmp eq i32 %6, 0, !dbg !232 + %8 = xor i1 %7, true, !dbg !232 + %9 = zext i1 %8 to i32, !dbg !232 + %10 = sext i32 %9 to i64, !dbg !232 + %11 = icmp ne i64 %10, 0, !dbg !232 + br i1 %11, label %12, label %14, !dbg !232 12: ; preds = %1 - call void @__assert_rtn(ptr noundef @__func__.mutex_unlock, ptr noundef @.str, i32 noundef 99, ptr noundef @.str.1) #4, !dbg !303 - unreachable, !dbg !303 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.mutex_unlock, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 99, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !232 + unreachable, !dbg !232 13: ; No predecessors! - br label %15, !dbg !303 + br label %15, !dbg !232 14: ; preds = %1 - br label %15, !dbg !303 + br label %15, !dbg !232 15: ; preds = %14, %13 - ret void, !dbg !304 + ret void, !dbg !233 } -declare i32 @pthread_mutex_unlock(ptr noundef) #2 +declare i32 @pthread_mutex_unlock(%struct._opaque_pthread_mutex_t* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define void @mutex_test() #0 !dbg !305 { +define void @mutex_test() #0 !dbg !234 { %1 = alloca %struct._opaque_pthread_mutex_t, align 8 %2 = alloca %struct._opaque_pthread_mutex_t, align 8 %3 = alloca i8, align 1 %4 = alloca i8, align 1 %5 = alloca i8, align 1 - call void @llvm.dbg.declare(metadata ptr %1, metadata !308, metadata !DIExpression()), !dbg !309 - call void @llvm.dbg.declare(metadata ptr %2, metadata !310, metadata !DIExpression()), !dbg !311 - call void @mutex_init(ptr noundef %1, i32 noundef 1, i32 noundef 1, i32 noundef 1, i32 noundef 1), !dbg !312 - call void @mutex_init(ptr noundef %2, i32 noundef 2, i32 noundef 2, i32 noundef 3, i32 noundef 2), !dbg !313 - call void @mutex_lock(ptr noundef %1), !dbg !314 - call void @llvm.dbg.declare(metadata ptr %3, metadata !316, metadata !DIExpression()), !dbg !317 - %6 = call zeroext i1 @mutex_trylock(ptr noundef %1), !dbg !318 - %7 = zext i1 %6 to i8, !dbg !317 - store i8 %7, ptr %3, align 1, !dbg !317 - %8 = load i8, ptr %3, align 1, !dbg !319 - %9 = trunc i8 %8 to i1, !dbg !319 - %10 = xor i1 %9, true, !dbg !319 - %11 = xor i1 %10, true, !dbg !319 - %12 = zext i1 %11 to i32, !dbg !319 - %13 = sext i32 %12 to i64, !dbg !319 - %14 = icmp ne i64 %13, 0, !dbg !319 - br i1 %14, label %15, label %17, !dbg !319 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_mutex_t* %1, metadata !237, metadata !DIExpression()), !dbg !238 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_mutex_t* %2, metadata !239, metadata !DIExpression()), !dbg !240 + call void @mutex_init(%struct._opaque_pthread_mutex_t* noundef %1, i32 noundef 1, i32 noundef 1, i32 noundef 1, i32 noundef 1), !dbg !241 + call void @mutex_init(%struct._opaque_pthread_mutex_t* noundef %2, i32 noundef 2, i32 noundef 2, i32 noundef 3, i32 noundef 2), !dbg !242 + call void @mutex_lock(%struct._opaque_pthread_mutex_t* noundef %1), !dbg !243 + call void @llvm.dbg.declare(metadata i8* %3, metadata !245, metadata !DIExpression()), !dbg !246 + %6 = call zeroext i1 @mutex_trylock(%struct._opaque_pthread_mutex_t* noundef %1), !dbg !247 + %7 = zext i1 %6 to i8, !dbg !246 + store i8 %7, i8* %3, align 1, !dbg !246 + %8 = load i8, i8* %3, align 1, !dbg !248 + %9 = trunc i8 %8 to i1, !dbg !248 + %10 = xor i1 %9, true, !dbg !248 + %11 = xor i1 %10, true, !dbg !248 + %12 = zext i1 %11 to i32, !dbg !248 + %13 = sext i32 %12 to i64, !dbg !248 + %14 = icmp ne i64 %13, 0, !dbg !248 + br i1 %14, label %15, label %17, !dbg !248 15: ; preds = %0 - call void @__assert_rtn(ptr noundef @__func__.mutex_test, ptr noundef @.str, i32 noundef 113, ptr noundef @.str.2) #4, !dbg !319 - unreachable, !dbg !319 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.mutex_test, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 113, i8* noundef getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0)) #4, !dbg !248 + unreachable, !dbg !248 16: ; No predecessors! - br label %18, !dbg !319 + br label %18, !dbg !248 17: ; preds = %0 - br label %18, !dbg !319 + br label %18, !dbg !248 18: ; preds = %17, %16 - call void @mutex_unlock(ptr noundef %1), !dbg !320 - call void @mutex_lock(ptr noundef %2), !dbg !321 - call void @llvm.dbg.declare(metadata ptr %4, metadata !323, metadata !DIExpression()), !dbg !325 - %19 = call zeroext i1 @mutex_trylock(ptr noundef %1), !dbg !326 - %20 = zext i1 %19 to i8, !dbg !325 - store i8 %20, ptr %4, align 1, !dbg !325 - %21 = load i8, ptr %4, align 1, !dbg !327 - %22 = trunc i8 %21 to i1, !dbg !327 - %23 = xor i1 %22, true, !dbg !327 - %24 = zext i1 %23 to i32, !dbg !327 - %25 = sext i32 %24 to i64, !dbg !327 - %26 = icmp ne i64 %25, 0, !dbg !327 - br i1 %26, label %27, label %29, !dbg !327 + call void @mutex_unlock(%struct._opaque_pthread_mutex_t* noundef %1), !dbg !249 + call void @mutex_lock(%struct._opaque_pthread_mutex_t* noundef %2), !dbg !250 + call void @llvm.dbg.declare(metadata i8* %4, metadata !252, metadata !DIExpression()), !dbg !254 + %19 = call zeroext i1 @mutex_trylock(%struct._opaque_pthread_mutex_t* noundef %1), !dbg !255 + %20 = zext i1 %19 to i8, !dbg !254 + store i8 %20, i8* %4, align 1, !dbg !254 + %21 = load i8, i8* %4, align 1, !dbg !256 + %22 = trunc i8 %21 to i1, !dbg !256 + %23 = xor i1 %22, true, !dbg !256 + %24 = zext i1 %23 to i32, !dbg !256 + %25 = sext i32 %24 to i64, !dbg !256 + %26 = icmp ne i64 %25, 0, !dbg !256 + br i1 %26, label %27, label %29, !dbg !256 27: ; preds = %18 - call void @__assert_rtn(ptr noundef @__func__.mutex_test, ptr noundef @.str, i32 noundef 122, ptr noundef @.str.3) #4, !dbg !327 - unreachable, !dbg !327 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.mutex_test, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 122, i8* noundef getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0)) #4, !dbg !256 + unreachable, !dbg !256 28: ; No predecessors! - br label %30, !dbg !327 + br label %30, !dbg !256 29: ; preds = %18 - br label %30, !dbg !327 + br label %30, !dbg !256 30: ; preds = %29, %28 - call void @mutex_unlock(ptr noundef %1), !dbg !328 - call void @llvm.dbg.declare(metadata ptr %5, metadata !329, metadata !DIExpression()), !dbg !331 - %31 = call zeroext i1 @mutex_trylock(ptr noundef %1), !dbg !332 - %32 = zext i1 %31 to i8, !dbg !331 - store i8 %32, ptr %5, align 1, !dbg !331 - %33 = load i8, ptr %5, align 1, !dbg !333 - %34 = trunc i8 %33 to i1, !dbg !333 - %35 = xor i1 %34, true, !dbg !333 - %36 = zext i1 %35 to i32, !dbg !333 - %37 = sext i32 %36 to i64, !dbg !333 - %38 = icmp ne i64 %37, 0, !dbg !333 - br i1 %38, label %39, label %41, !dbg !333 + call void @mutex_unlock(%struct._opaque_pthread_mutex_t* noundef %1), !dbg !257 + call void @llvm.dbg.declare(metadata i8* %5, metadata !258, metadata !DIExpression()), !dbg !260 + %31 = call zeroext i1 @mutex_trylock(%struct._opaque_pthread_mutex_t* noundef %1), !dbg !261 + %32 = zext i1 %31 to i8, !dbg !260 + store i8 %32, i8* %5, align 1, !dbg !260 + %33 = load i8, i8* %5, align 1, !dbg !262 + %34 = trunc i8 %33 to i1, !dbg !262 + %35 = xor i1 %34, true, !dbg !262 + %36 = zext i1 %35 to i32, !dbg !262 + %37 = sext i32 %36 to i64, !dbg !262 + %38 = icmp ne i64 %37, 0, !dbg !262 + br i1 %38, label %39, label %41, !dbg !262 39: ; preds = %30 - call void @__assert_rtn(ptr noundef @__func__.mutex_test, ptr noundef @.str, i32 noundef 128, ptr noundef @.str.3) #4, !dbg !333 - unreachable, !dbg !333 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.mutex_test, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 128, i8* noundef getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0)) #4, !dbg !262 + unreachable, !dbg !262 40: ; No predecessors! - br label %42, !dbg !333 + br label %42, !dbg !262 41: ; preds = %30 - br label %42, !dbg !333 + br label %42, !dbg !262 42: ; preds = %41, %40 - call void @mutex_unlock(ptr noundef %1), !dbg !334 - call void @mutex_unlock(ptr noundef %2), !dbg !335 - call void @mutex_destroy(ptr noundef %2), !dbg !336 - call void @mutex_destroy(ptr noundef %1), !dbg !337 - ret void, !dbg !338 + call void @mutex_unlock(%struct._opaque_pthread_mutex_t* noundef %1), !dbg !263 + call void @mutex_unlock(%struct._opaque_pthread_mutex_t* noundef %2), !dbg !264 + call void @mutex_destroy(%struct._opaque_pthread_mutex_t* noundef %2), !dbg !265 + call void @mutex_destroy(%struct._opaque_pthread_mutex_t* noundef %1), !dbg !266 + ret void, !dbg !267 } ; Function Attrs: noinline nounwind ssp uwtable -define void @cond_init(ptr noundef %0) #0 !dbg !339 { - %2 = alloca ptr, align 8 +define void @cond_init(%struct._opaque_pthread_cond_t* noundef %0) #0 !dbg !268 { + %2 = alloca %struct._opaque_pthread_cond_t*, align 8 %3 = alloca i32, align 4 %4 = alloca %struct._opaque_pthread_condattr_t, align 8 - store ptr %0, ptr %2, align 8 - call void @llvm.dbg.declare(metadata ptr %2, metadata !343, metadata !DIExpression()), !dbg !344 - call void @llvm.dbg.declare(metadata ptr %3, metadata !345, metadata !DIExpression()), !dbg !346 - call void @llvm.dbg.declare(metadata ptr %4, metadata !347, metadata !DIExpression()), !dbg !355 - %5 = call i32 @pthread_condattr_init(ptr noundef %4), !dbg !356 - store i32 %5, ptr %3, align 4, !dbg !357 - %6 = load i32, ptr %3, align 4, !dbg !358 - %7 = icmp eq i32 %6, 0, !dbg !358 - %8 = xor i1 %7, true, !dbg !358 - %9 = zext i1 %8 to i32, !dbg !358 - %10 = sext i32 %9 to i64, !dbg !358 - %11 = icmp ne i64 %10, 0, !dbg !358 - br i1 %11, label %12, label %14, !dbg !358 + store %struct._opaque_pthread_cond_t* %0, %struct._opaque_pthread_cond_t** %2, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_cond_t** %2, metadata !272, metadata !DIExpression()), !dbg !273 + call void @llvm.dbg.declare(metadata i32* %3, metadata !274, metadata !DIExpression()), !dbg !275 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_condattr_t* %4, metadata !276, metadata !DIExpression()), !dbg !284 + %5 = call i32 @pthread_condattr_init(%struct._opaque_pthread_condattr_t* noundef %4), !dbg !285 + store i32 %5, i32* %3, align 4, !dbg !286 + %6 = load i32, i32* %3, align 4, !dbg !287 + %7 = icmp eq i32 %6, 0, !dbg !287 + %8 = xor i1 %7, true, !dbg !287 + %9 = zext i1 %8 to i32, !dbg !287 + %10 = sext i32 %9 to i64, !dbg !287 + %11 = icmp ne i64 %10, 0, !dbg !287 + br i1 %11, label %12, label %14, !dbg !287 12: ; preds = %1 - call void @__assert_rtn(ptr noundef @__func__.cond_init, ptr noundef @.str, i32 noundef 154, ptr noundef @.str.1) #4, !dbg !358 - unreachable, !dbg !358 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.cond_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 154, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !287 + unreachable, !dbg !287 13: ; No predecessors! - br label %15, !dbg !358 + br label %15, !dbg !287 14: ; preds = %1 - br label %15, !dbg !358 + br label %15, !dbg !287 15: ; preds = %14, %13 - %16 = load ptr, ptr %2, align 8, !dbg !359 - %17 = call i32 @"\01_pthread_cond_init"(ptr noundef %16, ptr noundef %4), !dbg !360 - store i32 %17, ptr %3, align 4, !dbg !361 - %18 = load i32, ptr %3, align 4, !dbg !362 - %19 = icmp eq i32 %18, 0, !dbg !362 - %20 = xor i1 %19, true, !dbg !362 - %21 = zext i1 %20 to i32, !dbg !362 - %22 = sext i32 %21 to i64, !dbg !362 - %23 = icmp ne i64 %22, 0, !dbg !362 - br i1 %23, label %24, label %26, !dbg !362 + %16 = load %struct._opaque_pthread_cond_t*, %struct._opaque_pthread_cond_t** %2, align 8, !dbg !288 + %17 = call i32 @"\01_pthread_cond_init"(%struct._opaque_pthread_cond_t* noundef %16, %struct._opaque_pthread_condattr_t* noundef %4), !dbg !289 + store i32 %17, i32* %3, align 4, !dbg !290 + %18 = load i32, i32* %3, align 4, !dbg !291 + %19 = icmp eq i32 %18, 0, !dbg !291 + %20 = xor i1 %19, true, !dbg !291 + %21 = zext i1 %20 to i32, !dbg !291 + %22 = sext i32 %21 to i64, !dbg !291 + %23 = icmp ne i64 %22, 0, !dbg !291 + br i1 %23, label %24, label %26, !dbg !291 24: ; preds = %15 - call void @__assert_rtn(ptr noundef @__func__.cond_init, ptr noundef @.str, i32 noundef 157, ptr noundef @.str.1) #4, !dbg !362 - unreachable, !dbg !362 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.cond_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 157, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !291 + unreachable, !dbg !291 25: ; No predecessors! - br label %27, !dbg !362 + br label %27, !dbg !291 26: ; preds = %15 - br label %27, !dbg !362 + br label %27, !dbg !291 27: ; preds = %26, %25 - %28 = call i32 @pthread_condattr_destroy(ptr noundef %4), !dbg !363 - store i32 %28, ptr %3, align 4, !dbg !364 - %29 = load i32, ptr %3, align 4, !dbg !365 - %30 = icmp eq i32 %29, 0, !dbg !365 - %31 = xor i1 %30, true, !dbg !365 - %32 = zext i1 %31 to i32, !dbg !365 - %33 = sext i32 %32 to i64, !dbg !365 - %34 = icmp ne i64 %33, 0, !dbg !365 - br i1 %34, label %35, label %37, !dbg !365 + %28 = call i32 @pthread_condattr_destroy(%struct._opaque_pthread_condattr_t* noundef %4), !dbg !292 + store i32 %28, i32* %3, align 4, !dbg !293 + %29 = load i32, i32* %3, align 4, !dbg !294 + %30 = icmp eq i32 %29, 0, !dbg !294 + %31 = xor i1 %30, true, !dbg !294 + %32 = zext i1 %31 to i32, !dbg !294 + %33 = sext i32 %32 to i64, !dbg !294 + %34 = icmp ne i64 %33, 0, !dbg !294 + br i1 %34, label %35, label %37, !dbg !294 35: ; preds = %27 - call void @__assert_rtn(ptr noundef @__func__.cond_init, ptr noundef @.str, i32 noundef 160, ptr noundef @.str.1) #4, !dbg !365 - unreachable, !dbg !365 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.cond_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 160, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !294 + unreachable, !dbg !294 36: ; No predecessors! - br label %38, !dbg !365 + br label %38, !dbg !294 37: ; preds = %27 - br label %38, !dbg !365 + br label %38, !dbg !294 38: ; preds = %37, %36 - ret void, !dbg !366 + ret void, !dbg !295 } -declare i32 @pthread_condattr_init(ptr noundef) #2 +declare i32 @pthread_condattr_init(%struct._opaque_pthread_condattr_t* noundef) #2 -declare i32 @"\01_pthread_cond_init"(ptr noundef, ptr noundef) #2 +declare i32 @"\01_pthread_cond_init"(%struct._opaque_pthread_cond_t* noundef, %struct._opaque_pthread_condattr_t* noundef) #2 -declare i32 @pthread_condattr_destroy(ptr noundef) #2 +declare i32 @pthread_condattr_destroy(%struct._opaque_pthread_condattr_t* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define void @cond_destroy(ptr noundef %0) #0 !dbg !367 { - %2 = alloca ptr, align 8 +define void @cond_destroy(%struct._opaque_pthread_cond_t* noundef %0) #0 !dbg !296 { + %2 = alloca %struct._opaque_pthread_cond_t*, align 8 %3 = alloca i32, align 4 - store ptr %0, ptr %2, align 8 - call void @llvm.dbg.declare(metadata ptr %2, metadata !368, metadata !DIExpression()), !dbg !369 - call void @llvm.dbg.declare(metadata ptr %3, metadata !370, metadata !DIExpression()), !dbg !371 - %4 = load ptr, ptr %2, align 8, !dbg !372 - %5 = call i32 @pthread_cond_destroy(ptr noundef %4), !dbg !373 - store i32 %5, ptr %3, align 4, !dbg !371 - %6 = load i32, ptr %3, align 4, !dbg !374 - %7 = icmp eq i32 %6, 0, !dbg !374 - %8 = xor i1 %7, true, !dbg !374 - %9 = zext i1 %8 to i32, !dbg !374 - %10 = sext i32 %9 to i64, !dbg !374 - %11 = icmp ne i64 %10, 0, !dbg !374 - br i1 %11, label %12, label %14, !dbg !374 + store %struct._opaque_pthread_cond_t* %0, %struct._opaque_pthread_cond_t** %2, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_cond_t** %2, metadata !297, metadata !DIExpression()), !dbg !298 + call void @llvm.dbg.declare(metadata i32* %3, metadata !299, metadata !DIExpression()), !dbg !300 + %4 = load %struct._opaque_pthread_cond_t*, %struct._opaque_pthread_cond_t** %2, align 8, !dbg !301 + %5 = call i32 @pthread_cond_destroy(%struct._opaque_pthread_cond_t* noundef %4), !dbg !302 + store i32 %5, i32* %3, align 4, !dbg !300 + %6 = load i32, i32* %3, align 4, !dbg !303 + %7 = icmp eq i32 %6, 0, !dbg !303 + %8 = xor i1 %7, true, !dbg !303 + %9 = zext i1 %8 to i32, !dbg !303 + %10 = sext i32 %9 to i64, !dbg !303 + %11 = icmp ne i64 %10, 0, !dbg !303 + br i1 %11, label %12, label %14, !dbg !303 12: ; preds = %1 - call void @__assert_rtn(ptr noundef @__func__.cond_destroy, ptr noundef @.str, i32 noundef 166, ptr noundef @.str.1) #4, !dbg !374 - unreachable, !dbg !374 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.cond_destroy, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 166, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !303 + unreachable, !dbg !303 13: ; No predecessors! - br label %15, !dbg !374 + br label %15, !dbg !303 14: ; preds = %1 - br label %15, !dbg !374 + br label %15, !dbg !303 15: ; preds = %14, %13 - ret void, !dbg !375 + ret void, !dbg !304 } -declare i32 @pthread_cond_destroy(ptr noundef) #2 +declare i32 @pthread_cond_destroy(%struct._opaque_pthread_cond_t* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define void @cond_signal(ptr noundef %0) #0 !dbg !376 { - %2 = alloca ptr, align 8 +define void @cond_signal(%struct._opaque_pthread_cond_t* noundef %0) #0 !dbg !305 { + %2 = alloca %struct._opaque_pthread_cond_t*, align 8 %3 = alloca i32, align 4 - store ptr %0, ptr %2, align 8 - call void @llvm.dbg.declare(metadata ptr %2, metadata !377, metadata !DIExpression()), !dbg !378 - call void @llvm.dbg.declare(metadata ptr %3, metadata !379, metadata !DIExpression()), !dbg !380 - %4 = load ptr, ptr %2, align 8, !dbg !381 - %5 = call i32 @pthread_cond_signal(ptr noundef %4), !dbg !382 - store i32 %5, ptr %3, align 4, !dbg !380 - %6 = load i32, ptr %3, align 4, !dbg !383 - %7 = icmp eq i32 %6, 0, !dbg !383 - %8 = xor i1 %7, true, !dbg !383 - %9 = zext i1 %8 to i32, !dbg !383 - %10 = sext i32 %9 to i64, !dbg !383 - %11 = icmp ne i64 %10, 0, !dbg !383 - br i1 %11, label %12, label %14, !dbg !383 + store %struct._opaque_pthread_cond_t* %0, %struct._opaque_pthread_cond_t** %2, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_cond_t** %2, metadata !306, metadata !DIExpression()), !dbg !307 + call void @llvm.dbg.declare(metadata i32* %3, metadata !308, metadata !DIExpression()), !dbg !309 + %4 = load %struct._opaque_pthread_cond_t*, %struct._opaque_pthread_cond_t** %2, align 8, !dbg !310 + %5 = call i32 @pthread_cond_signal(%struct._opaque_pthread_cond_t* noundef %4), !dbg !311 + store i32 %5, i32* %3, align 4, !dbg !309 + %6 = load i32, i32* %3, align 4, !dbg !312 + %7 = icmp eq i32 %6, 0, !dbg !312 + %8 = xor i1 %7, true, !dbg !312 + %9 = zext i1 %8 to i32, !dbg !312 + %10 = sext i32 %9 to i64, !dbg !312 + %11 = icmp ne i64 %10, 0, !dbg !312 + br i1 %11, label %12, label %14, !dbg !312 12: ; preds = %1 - call void @__assert_rtn(ptr noundef @__func__.cond_signal, ptr noundef @.str, i32 noundef 172, ptr noundef @.str.1) #4, !dbg !383 - unreachable, !dbg !383 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.cond_signal, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 172, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !312 + unreachable, !dbg !312 13: ; No predecessors! - br label %15, !dbg !383 + br label %15, !dbg !312 14: ; preds = %1 - br label %15, !dbg !383 + br label %15, !dbg !312 15: ; preds = %14, %13 - ret void, !dbg !384 + ret void, !dbg !313 } -declare i32 @pthread_cond_signal(ptr noundef) #2 +declare i32 @pthread_cond_signal(%struct._opaque_pthread_cond_t* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define void @cond_broadcast(ptr noundef %0) #0 !dbg !385 { - %2 = alloca ptr, align 8 +define void @cond_broadcast(%struct._opaque_pthread_cond_t* noundef %0) #0 !dbg !314 { + %2 = alloca %struct._opaque_pthread_cond_t*, align 8 %3 = alloca i32, align 4 - store ptr %0, ptr %2, align 8 - call void @llvm.dbg.declare(metadata ptr %2, metadata !386, metadata !DIExpression()), !dbg !387 - call void @llvm.dbg.declare(metadata ptr %3, metadata !388, metadata !DIExpression()), !dbg !389 - %4 = load ptr, ptr %2, align 8, !dbg !390 - %5 = call i32 @pthread_cond_broadcast(ptr noundef %4), !dbg !391 - store i32 %5, ptr %3, align 4, !dbg !389 - %6 = load i32, ptr %3, align 4, !dbg !392 - %7 = icmp eq i32 %6, 0, !dbg !392 - %8 = xor i1 %7, true, !dbg !392 - %9 = zext i1 %8 to i32, !dbg !392 - %10 = sext i32 %9 to i64, !dbg !392 - %11 = icmp ne i64 %10, 0, !dbg !392 - br i1 %11, label %12, label %14, !dbg !392 + store %struct._opaque_pthread_cond_t* %0, %struct._opaque_pthread_cond_t** %2, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_cond_t** %2, metadata !315, metadata !DIExpression()), !dbg !316 + call void @llvm.dbg.declare(metadata i32* %3, metadata !317, metadata !DIExpression()), !dbg !318 + %4 = load %struct._opaque_pthread_cond_t*, %struct._opaque_pthread_cond_t** %2, align 8, !dbg !319 + %5 = call i32 @pthread_cond_broadcast(%struct._opaque_pthread_cond_t* noundef %4), !dbg !320 + store i32 %5, i32* %3, align 4, !dbg !318 + %6 = load i32, i32* %3, align 4, !dbg !321 + %7 = icmp eq i32 %6, 0, !dbg !321 + %8 = xor i1 %7, true, !dbg !321 + %9 = zext i1 %8 to i32, !dbg !321 + %10 = sext i32 %9 to i64, !dbg !321 + %11 = icmp ne i64 %10, 0, !dbg !321 + br i1 %11, label %12, label %14, !dbg !321 12: ; preds = %1 - call void @__assert_rtn(ptr noundef @__func__.cond_broadcast, ptr noundef @.str, i32 noundef 178, ptr noundef @.str.1) #4, !dbg !392 - unreachable, !dbg !392 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.cond_broadcast, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 178, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !321 + unreachable, !dbg !321 13: ; No predecessors! - br label %15, !dbg !392 + br label %15, !dbg !321 14: ; preds = %1 - br label %15, !dbg !392 + br label %15, !dbg !321 15: ; preds = %14, %13 - ret void, !dbg !393 + ret void, !dbg !322 } -declare i32 @pthread_cond_broadcast(ptr noundef) #2 +declare i32 @pthread_cond_broadcast(%struct._opaque_pthread_cond_t* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define void @cond_wait(ptr noundef %0, ptr noundef %1) #0 !dbg !394 { - %3 = alloca ptr, align 8 - %4 = alloca ptr, align 8 +define void @cond_wait(%struct._opaque_pthread_cond_t* noundef %0, %struct._opaque_pthread_mutex_t* noundef %1) #0 !dbg !323 { + %3 = alloca %struct._opaque_pthread_cond_t*, align 8 + %4 = alloca %struct._opaque_pthread_mutex_t*, align 8 %5 = alloca i32, align 4 - store ptr %0, ptr %3, align 8 - call void @llvm.dbg.declare(metadata ptr %3, metadata !397, metadata !DIExpression()), !dbg !398 - store ptr %1, ptr %4, align 8 - call void @llvm.dbg.declare(metadata ptr %4, metadata !399, metadata !DIExpression()), !dbg !400 - call void @llvm.dbg.declare(metadata ptr %5, metadata !401, metadata !DIExpression()), !dbg !402 - %6 = load ptr, ptr %3, align 8, !dbg !403 - %7 = load ptr, ptr %4, align 8, !dbg !404 - %8 = call i32 @"\01_pthread_cond_wait"(ptr noundef %6, ptr noundef %7), !dbg !405 - store i32 %8, ptr %5, align 4, !dbg !402 - ret void, !dbg !406 + store %struct._opaque_pthread_cond_t* %0, %struct._opaque_pthread_cond_t** %3, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_cond_t** %3, metadata !326, metadata !DIExpression()), !dbg !327 + store %struct._opaque_pthread_mutex_t* %1, %struct._opaque_pthread_mutex_t** %4, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_mutex_t** %4, metadata !328, metadata !DIExpression()), !dbg !329 + call void @llvm.dbg.declare(metadata i32* %5, metadata !330, metadata !DIExpression()), !dbg !331 + %6 = load %struct._opaque_pthread_cond_t*, %struct._opaque_pthread_cond_t** %3, align 8, !dbg !332 + %7 = load %struct._opaque_pthread_mutex_t*, %struct._opaque_pthread_mutex_t** %4, align 8, !dbg !333 + %8 = call i32 @"\01_pthread_cond_wait"(%struct._opaque_pthread_cond_t* noundef %6, %struct._opaque_pthread_mutex_t* noundef %7), !dbg !334 + store i32 %8, i32* %5, align 4, !dbg !331 + ret void, !dbg !335 } -declare i32 @"\01_pthread_cond_wait"(ptr noundef, ptr noundef) #2 +declare i32 @"\01_pthread_cond_wait"(%struct._opaque_pthread_cond_t* noundef, %struct._opaque_pthread_mutex_t* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define void @cond_timedwait(ptr noundef %0, ptr noundef %1, i64 noundef %2) #0 !dbg !407 { - %4 = alloca ptr, align 8 - %5 = alloca ptr, align 8 +define void @cond_timedwait(%struct._opaque_pthread_cond_t* noundef %0, %struct._opaque_pthread_mutex_t* noundef %1, i64 noundef %2) #0 !dbg !336 { + %4 = alloca %struct._opaque_pthread_cond_t*, align 8 + %5 = alloca %struct._opaque_pthread_mutex_t*, align 8 %6 = alloca i64, align 8 %7 = alloca %struct.timespec, align 8 %8 = alloca i32, align 4 - store ptr %0, ptr %4, align 8 - call void @llvm.dbg.declare(metadata ptr %4, metadata !411, metadata !DIExpression()), !dbg !412 - store ptr %1, ptr %5, align 8 - call void @llvm.dbg.declare(metadata ptr %5, metadata !413, metadata !DIExpression()), !dbg !414 - store i64 %2, ptr %6, align 8 - call void @llvm.dbg.declare(metadata ptr %6, metadata !415, metadata !DIExpression()), !dbg !416 - call void @llvm.dbg.declare(metadata ptr %7, metadata !417, metadata !DIExpression()), !dbg !425 - %9 = load i64, ptr %6, align 8, !dbg !426 - call void @llvm.dbg.declare(metadata ptr %8, metadata !427, metadata !DIExpression()), !dbg !428 - %10 = load ptr, ptr %4, align 8, !dbg !429 - %11 = load ptr, ptr %5, align 8, !dbg !430 - %12 = call i32 @"\01_pthread_cond_timedwait"(ptr noundef %10, ptr noundef %11, ptr noundef %7), !dbg !431 - store i32 %12, ptr %8, align 4, !dbg !428 - ret void, !dbg !432 + store %struct._opaque_pthread_cond_t* %0, %struct._opaque_pthread_cond_t** %4, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_cond_t** %4, metadata !340, metadata !DIExpression()), !dbg !341 + store %struct._opaque_pthread_mutex_t* %1, %struct._opaque_pthread_mutex_t** %5, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_mutex_t** %5, metadata !342, metadata !DIExpression()), !dbg !343 + store i64 %2, i64* %6, align 8 + call void @llvm.dbg.declare(metadata i64* %6, metadata !344, metadata !DIExpression()), !dbg !345 + call void @llvm.dbg.declare(metadata %struct.timespec* %7, metadata !346, metadata !DIExpression()), !dbg !354 + %9 = load i64, i64* %6, align 8, !dbg !355 + call void @llvm.dbg.declare(metadata i32* %8, metadata !356, metadata !DIExpression()), !dbg !357 + %10 = load %struct._opaque_pthread_cond_t*, %struct._opaque_pthread_cond_t** %4, align 8, !dbg !358 + %11 = load %struct._opaque_pthread_mutex_t*, %struct._opaque_pthread_mutex_t** %5, align 8, !dbg !359 + %12 = call i32 @"\01_pthread_cond_timedwait"(%struct._opaque_pthread_cond_t* noundef %10, %struct._opaque_pthread_mutex_t* noundef %11, %struct.timespec* noundef %7), !dbg !360 + store i32 %12, i32* %8, align 4, !dbg !357 + ret void, !dbg !361 } -declare i32 @"\01_pthread_cond_timedwait"(ptr noundef, ptr noundef, ptr noundef) #2 +declare i32 @"\01_pthread_cond_timedwait"(%struct._opaque_pthread_cond_t* noundef, %struct._opaque_pthread_mutex_t* noundef, %struct.timespec* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define ptr @cond_worker(ptr noundef %0) #0 !dbg !433 { - %2 = alloca ptr, align 8 - %3 = alloca ptr, align 8 +define i8* @cond_worker(i8* noundef %0) #0 !dbg !362 { + %2 = alloca i8*, align 8 + %3 = alloca i8*, align 8 %4 = alloca i8, align 1 - store ptr %0, ptr %3, align 8 - call void @llvm.dbg.declare(metadata ptr %3, metadata !434, metadata !DIExpression()), !dbg !435 - call void @llvm.dbg.declare(metadata ptr %4, metadata !436, metadata !DIExpression()), !dbg !437 - store i8 1, ptr %4, align 1, !dbg !437 - call void @mutex_lock(ptr noundef @cond_mutex), !dbg !438 - %5 = load i32, ptr @phase, align 4, !dbg !440 - %6 = add nsw i32 %5, 1, !dbg !440 - store i32 %6, ptr @phase, align 4, !dbg !440 - call void @cond_wait(ptr noundef @cond, ptr noundef @cond_mutex), !dbg !441 - %7 = load i32, ptr @phase, align 4, !dbg !442 - %8 = add nsw i32 %7, 1, !dbg !442 - store i32 %8, ptr @phase, align 4, !dbg !442 - %9 = load i32, ptr @phase, align 4, !dbg !443 - %10 = icmp slt i32 %9, 2, !dbg !444 - %11 = zext i1 %10 to i8, !dbg !445 - store i8 %11, ptr %4, align 1, !dbg !445 - call void @mutex_unlock(ptr noundef @cond_mutex), !dbg !446 - %12 = load i8, ptr %4, align 1, !dbg !447 - %13 = trunc i8 %12 to i1, !dbg !447 - br i1 %13, label %14, label %17, !dbg !449 + store i8* %0, i8** %3, align 8 + call void @llvm.dbg.declare(metadata i8** %3, metadata !363, metadata !DIExpression()), !dbg !364 + call void @llvm.dbg.declare(metadata i8* %4, metadata !365, metadata !DIExpression()), !dbg !366 + store i8 1, i8* %4, align 1, !dbg !366 + call void @mutex_lock(%struct._opaque_pthread_mutex_t* noundef @cond_mutex), !dbg !367 + %5 = load i32, i32* @phase, align 4, !dbg !369 + %6 = add nsw i32 %5, 1, !dbg !369 + store i32 %6, i32* @phase, align 4, !dbg !369 + call void @cond_wait(%struct._opaque_pthread_cond_t* noundef @cond, %struct._opaque_pthread_mutex_t* noundef @cond_mutex), !dbg !370 + %7 = load i32, i32* @phase, align 4, !dbg !371 + %8 = add nsw i32 %7, 1, !dbg !371 + store i32 %8, i32* @phase, align 4, !dbg !371 + %9 = load i32, i32* @phase, align 4, !dbg !372 + %10 = icmp slt i32 %9, 2, !dbg !373 + %11 = zext i1 %10 to i8, !dbg !374 + store i8 %11, i8* %4, align 1, !dbg !374 + call void @mutex_unlock(%struct._opaque_pthread_mutex_t* noundef @cond_mutex), !dbg !375 + %12 = load i8, i8* %4, align 1, !dbg !376 + %13 = trunc i8 %12 to i1, !dbg !376 + br i1 %13, label %14, label %17, !dbg !378 14: ; preds = %1 - %15 = load ptr, ptr %3, align 8, !dbg !450 - %16 = getelementptr inbounds i8, ptr %15, i64 1, !dbg !451 - store ptr %16, ptr %2, align 8, !dbg !452 - br label %32, !dbg !452 + %15 = load i8*, i8** %3, align 8, !dbg !379 + %16 = getelementptr inbounds i8, i8* %15, i64 1, !dbg !380 + store i8* %16, i8** %2, align 8, !dbg !381 + br label %32, !dbg !381 17: ; preds = %1 - store i8 1, ptr %4, align 1, !dbg !453 - call void @mutex_lock(ptr noundef @cond_mutex), !dbg !454 - %18 = load i32, ptr @phase, align 4, !dbg !456 - %19 = add nsw i32 %18, 1, !dbg !456 - store i32 %19, ptr @phase, align 4, !dbg !456 - call void @cond_timedwait(ptr noundef @cond, ptr noundef @cond_mutex, i64 noundef 10), !dbg !457 - %20 = load i32, ptr @phase, align 4, !dbg !458 - %21 = add nsw i32 %20, 1, !dbg !458 - store i32 %21, ptr @phase, align 4, !dbg !458 - %22 = load i32, ptr @phase, align 4, !dbg !459 - %23 = icmp sgt i32 %22, 6, !dbg !460 - %24 = zext i1 %23 to i8, !dbg !461 - store i8 %24, ptr %4, align 1, !dbg !461 - call void @mutex_unlock(ptr noundef @cond_mutex), !dbg !462 - %25 = load i8, ptr %4, align 1, !dbg !463 - %26 = trunc i8 %25 to i1, !dbg !463 - br i1 %26, label %27, label %30, !dbg !465 + store i8 1, i8* %4, align 1, !dbg !382 + call void @mutex_lock(%struct._opaque_pthread_mutex_t* noundef @cond_mutex), !dbg !383 + %18 = load i32, i32* @phase, align 4, !dbg !385 + %19 = add nsw i32 %18, 1, !dbg !385 + store i32 %19, i32* @phase, align 4, !dbg !385 + call void @cond_timedwait(%struct._opaque_pthread_cond_t* noundef @cond, %struct._opaque_pthread_mutex_t* noundef @cond_mutex, i64 noundef 10), !dbg !386 + %20 = load i32, i32* @phase, align 4, !dbg !387 + %21 = add nsw i32 %20, 1, !dbg !387 + store i32 %21, i32* @phase, align 4, !dbg !387 + %22 = load i32, i32* @phase, align 4, !dbg !388 + %23 = icmp sgt i32 %22, 6, !dbg !389 + %24 = zext i1 %23 to i8, !dbg !390 + store i8 %24, i8* %4, align 1, !dbg !390 + call void @mutex_unlock(%struct._opaque_pthread_mutex_t* noundef @cond_mutex), !dbg !391 + %25 = load i8, i8* %4, align 1, !dbg !392 + %26 = trunc i8 %25 to i1, !dbg !392 + br i1 %26, label %27, label %30, !dbg !394 27: ; preds = %17 - %28 = load ptr, ptr %3, align 8, !dbg !466 - %29 = getelementptr inbounds i8, ptr %28, i64 2, !dbg !467 - store ptr %29, ptr %2, align 8, !dbg !468 - br label %32, !dbg !468 + %28 = load i8*, i8** %3, align 8, !dbg !395 + %29 = getelementptr inbounds i8, i8* %28, i64 2, !dbg !396 + store i8* %29, i8** %2, align 8, !dbg !397 + br label %32, !dbg !397 30: ; preds = %17 - %31 = load ptr, ptr %3, align 8, !dbg !469 - store ptr %31, ptr %2, align 8, !dbg !470 - br label %32, !dbg !470 + %31 = load i8*, i8** %3, align 8, !dbg !398 + store i8* %31, i8** %2, align 8, !dbg !399 + br label %32, !dbg !399 32: ; preds = %30, %27, %14 - %33 = load ptr, ptr %2, align 8, !dbg !471 - ret ptr %33, !dbg !471 + %33 = load i8*, i8** %2, align 8, !dbg !400 + ret i8* %33, !dbg !400 } ; Function Attrs: noinline nounwind ssp uwtable -define void @cond_test() #0 !dbg !472 { - %1 = alloca ptr, align 8 - %2 = alloca ptr, align 8 - %3 = alloca ptr, align 8 - call void @llvm.dbg.declare(metadata ptr %1, metadata !473, metadata !DIExpression()), !dbg !474 - store ptr inttoptr (i64 42 to ptr), ptr %1, align 8, !dbg !474 - call void @mutex_init(ptr noundef @cond_mutex, i32 noundef 0, i32 noundef 0, i32 noundef 3, i32 noundef 0), !dbg !475 - call void @cond_init(ptr noundef @cond), !dbg !476 - call void @llvm.dbg.declare(metadata ptr %2, metadata !477, metadata !DIExpression()), !dbg !478 - %4 = load ptr, ptr %1, align 8, !dbg !479 - %5 = call ptr @thread_create(ptr noundef @cond_worker, ptr noundef %4), !dbg !480 - store ptr %5, ptr %2, align 8, !dbg !478 - call void @mutex_lock(ptr noundef @cond_mutex), !dbg !481 - %6 = load i32, ptr @phase, align 4, !dbg !483 - %7 = add nsw i32 %6, 1, !dbg !483 - store i32 %7, ptr @phase, align 4, !dbg !483 - call void @cond_signal(ptr noundef @cond), !dbg !484 - call void @mutex_unlock(ptr noundef @cond_mutex), !dbg !485 - call void @mutex_lock(ptr noundef @cond_mutex), !dbg !486 - %8 = load i32, ptr @phase, align 4, !dbg !488 - %9 = add nsw i32 %8, 1, !dbg !488 - store i32 %9, ptr @phase, align 4, !dbg !488 - call void @cond_broadcast(ptr noundef @cond), !dbg !489 - call void @mutex_unlock(ptr noundef @cond_mutex), !dbg !490 - call void @llvm.dbg.declare(metadata ptr %3, metadata !491, metadata !DIExpression()), !dbg !492 - %10 = load ptr, ptr %2, align 8, !dbg !493 - %11 = call ptr @thread_join(ptr noundef %10), !dbg !494 - store ptr %11, ptr %3, align 8, !dbg !492 - call void @cond_destroy(ptr noundef @cond), !dbg !495 - call void @mutex_destroy(ptr noundef @cond_mutex), !dbg !496 - ret void, !dbg !497 +define void @cond_test() #0 !dbg !401 { + %1 = alloca i8*, align 8 + %2 = alloca %struct._opaque_pthread_t*, align 8 + %3 = alloca i8*, align 8 + call void @llvm.dbg.declare(metadata i8** %1, metadata !402, metadata !DIExpression()), !dbg !403 + store i8* inttoptr (i64 42 to i8*), i8** %1, align 8, !dbg !403 + call void @mutex_init(%struct._opaque_pthread_mutex_t* noundef @cond_mutex, i32 noundef 0, i32 noundef 0, i32 noundef 3, i32 noundef 0), !dbg !404 + call void @cond_init(%struct._opaque_pthread_cond_t* noundef @cond), !dbg !405 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !406, metadata !DIExpression()), !dbg !407 + %4 = load i8*, i8** %1, align 8, !dbg !408 + %5 = call %struct._opaque_pthread_t* @thread_create(i8* (i8*)* noundef @cond_worker, i8* noundef %4), !dbg !409 + store %struct._opaque_pthread_t* %5, %struct._opaque_pthread_t** %2, align 8, !dbg !407 + call void @mutex_lock(%struct._opaque_pthread_mutex_t* noundef @cond_mutex), !dbg !410 + %6 = load i32, i32* @phase, align 4, !dbg !412 + %7 = add nsw i32 %6, 1, !dbg !412 + store i32 %7, i32* @phase, align 4, !dbg !412 + call void @cond_signal(%struct._opaque_pthread_cond_t* noundef @cond), !dbg !413 + call void @mutex_unlock(%struct._opaque_pthread_mutex_t* noundef @cond_mutex), !dbg !414 + call void @mutex_lock(%struct._opaque_pthread_mutex_t* noundef @cond_mutex), !dbg !415 + %8 = load i32, i32* @phase, align 4, !dbg !417 + %9 = add nsw i32 %8, 1, !dbg !417 + store i32 %9, i32* @phase, align 4, !dbg !417 + call void @cond_broadcast(%struct._opaque_pthread_cond_t* noundef @cond), !dbg !418 + call void @mutex_unlock(%struct._opaque_pthread_mutex_t* noundef @cond_mutex), !dbg !419 + call void @llvm.dbg.declare(metadata i8** %3, metadata !420, metadata !DIExpression()), !dbg !421 + %10 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %2, align 8, !dbg !422 + %11 = call i8* @thread_join(%struct._opaque_pthread_t* noundef %10), !dbg !423 + store i8* %11, i8** %3, align 8, !dbg !421 + %12 = load i8*, i8** %3, align 8, !dbg !424 + %13 = load i8*, i8** %1, align 8, !dbg !424 + %14 = icmp eq i8* %12, %13, !dbg !424 + %15 = xor i1 %14, true, !dbg !424 + %16 = zext i1 %15 to i32, !dbg !424 + %17 = sext i32 %16 to i64, !dbg !424 + %18 = icmp ne i64 %17, 0, !dbg !424 + br i1 %18, label %19, label %21, !dbg !424 + +19: ; preds = %0 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.cond_test, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 252, i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0)) #4, !dbg !424 + unreachable, !dbg !424 + +20: ; No predecessors! + br label %22, !dbg !424 + +21: ; preds = %0 + br label %22, !dbg !424 + +22: ; preds = %21, %20 + call void @cond_destroy(%struct._opaque_pthread_cond_t* noundef @cond), !dbg !425 + call void @mutex_destroy(%struct._opaque_pthread_mutex_t* noundef @cond_mutex), !dbg !426 + ret void, !dbg !427 } ; Function Attrs: noinline nounwind ssp uwtable -define void @rwlock_init(ptr noundef %0, i32 noundef %1) #0 !dbg !498 { - %3 = alloca ptr, align 8 +define void @rwlock_init(%struct._opaque_pthread_rwlock_t* noundef %0, i32 noundef %1) #0 !dbg !428 { + %3 = alloca %struct._opaque_pthread_rwlock_t*, align 8 %4 = alloca i32, align 4 %5 = alloca i32, align 4 %6 = alloca i32, align 4 %7 = alloca %struct._opaque_pthread_rwlockattr_t, align 8 - store ptr %0, ptr %3, align 8 - call void @llvm.dbg.declare(metadata ptr %3, metadata !512, metadata !DIExpression()), !dbg !513 - store i32 %1, ptr %4, align 4 - call void @llvm.dbg.declare(metadata ptr %4, metadata !514, metadata !DIExpression()), !dbg !515 - call void @llvm.dbg.declare(metadata ptr %5, metadata !516, metadata !DIExpression()), !dbg !517 - call void @llvm.dbg.declare(metadata ptr %6, metadata !518, metadata !DIExpression()), !dbg !519 - call void @llvm.dbg.declare(metadata ptr %7, metadata !520, metadata !DIExpression()), !dbg !531 - %8 = call i32 @pthread_rwlockattr_init(ptr noundef %7), !dbg !532 - store i32 %8, ptr %5, align 4, !dbg !533 - %9 = load i32, ptr %5, align 4, !dbg !534 - %10 = icmp eq i32 %9, 0, !dbg !534 - %11 = xor i1 %10, true, !dbg !534 - %12 = zext i1 %11 to i32, !dbg !534 - %13 = sext i32 %12 to i64, !dbg !534 - %14 = icmp ne i64 %13, 0, !dbg !534 - br i1 %14, label %15, label %17, !dbg !534 + store %struct._opaque_pthread_rwlock_t* %0, %struct._opaque_pthread_rwlock_t** %3, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_rwlock_t** %3, metadata !442, metadata !DIExpression()), !dbg !443 + store i32 %1, i32* %4, align 4 + call void @llvm.dbg.declare(metadata i32* %4, metadata !444, metadata !DIExpression()), !dbg !445 + call void @llvm.dbg.declare(metadata i32* %5, metadata !446, metadata !DIExpression()), !dbg !447 + call void @llvm.dbg.declare(metadata i32* %6, metadata !448, metadata !DIExpression()), !dbg !449 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_rwlockattr_t* %7, metadata !450, metadata !DIExpression()), !dbg !461 + %8 = call i32 @pthread_rwlockattr_init(%struct._opaque_pthread_rwlockattr_t* noundef %7), !dbg !462 + store i32 %8, i32* %5, align 4, !dbg !463 + %9 = load i32, i32* %5, align 4, !dbg !464 + %10 = icmp eq i32 %9, 0, !dbg !464 + %11 = xor i1 %10, true, !dbg !464 + %12 = zext i1 %11 to i32, !dbg !464 + %13 = sext i32 %12 to i64, !dbg !464 + %14 = icmp ne i64 %13, 0, !dbg !464 + br i1 %14, label %15, label %17, !dbg !464 15: ; preds = %2 - call void @__assert_rtn(ptr noundef @__func__.rwlock_init, ptr noundef @.str, i32 noundef 269, ptr noundef @.str.1) #4, !dbg !534 - unreachable, !dbg !534 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.rwlock_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 269, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !464 + unreachable, !dbg !464 16: ; No predecessors! - br label %18, !dbg !534 + br label %18, !dbg !464 17: ; preds = %2 - br label %18, !dbg !534 + br label %18, !dbg !464 18: ; preds = %17, %16 - %19 = load i32, ptr %4, align 4, !dbg !535 - %20 = call i32 @pthread_rwlockattr_setpshared(ptr noundef %7, i32 noundef %19), !dbg !536 - store i32 %20, ptr %5, align 4, !dbg !537 - %21 = load i32, ptr %5, align 4, !dbg !538 - %22 = icmp eq i32 %21, 0, !dbg !538 - %23 = xor i1 %22, true, !dbg !538 - %24 = zext i1 %23 to i32, !dbg !538 - %25 = sext i32 %24 to i64, !dbg !538 - %26 = icmp ne i64 %25, 0, !dbg !538 - br i1 %26, label %27, label %29, !dbg !538 + %19 = load i32, i32* %4, align 4, !dbg !465 + %20 = call i32 @pthread_rwlockattr_setpshared(%struct._opaque_pthread_rwlockattr_t* noundef %7, i32 noundef %19), !dbg !466 + store i32 %20, i32* %5, align 4, !dbg !467 + %21 = load i32, i32* %5, align 4, !dbg !468 + %22 = icmp eq i32 %21, 0, !dbg !468 + %23 = xor i1 %22, true, !dbg !468 + %24 = zext i1 %23 to i32, !dbg !468 + %25 = sext i32 %24 to i64, !dbg !468 + %26 = icmp ne i64 %25, 0, !dbg !468 + br i1 %26, label %27, label %29, !dbg !468 27: ; preds = %18 - call void @__assert_rtn(ptr noundef @__func__.rwlock_init, ptr noundef @.str, i32 noundef 272, ptr noundef @.str.1) #4, !dbg !538 - unreachable, !dbg !538 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.rwlock_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 272, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !468 + unreachable, !dbg !468 28: ; No predecessors! - br label %30, !dbg !538 + br label %30, !dbg !468 29: ; preds = %18 - br label %30, !dbg !538 + br label %30, !dbg !468 30: ; preds = %29, %28 - %31 = call i32 @pthread_rwlockattr_getpshared(ptr noundef %7, ptr noundef %6), !dbg !539 - store i32 %31, ptr %5, align 4, !dbg !540 - %32 = load i32, ptr %5, align 4, !dbg !541 - %33 = icmp eq i32 %32, 0, !dbg !541 - %34 = xor i1 %33, true, !dbg !541 - %35 = zext i1 %34 to i32, !dbg !541 - %36 = sext i32 %35 to i64, !dbg !541 - %37 = icmp ne i64 %36, 0, !dbg !541 - br i1 %37, label %38, label %40, !dbg !541 + %31 = call i32 @pthread_rwlockattr_getpshared(%struct._opaque_pthread_rwlockattr_t* noundef %7, i32* noundef %6), !dbg !469 + store i32 %31, i32* %5, align 4, !dbg !470 + %32 = load i32, i32* %5, align 4, !dbg !471 + %33 = icmp eq i32 %32, 0, !dbg !471 + %34 = xor i1 %33, true, !dbg !471 + %35 = zext i1 %34 to i32, !dbg !471 + %36 = sext i32 %35 to i64, !dbg !471 + %37 = icmp ne i64 %36, 0, !dbg !471 + br i1 %37, label %38, label %40, !dbg !471 38: ; preds = %30 - call void @__assert_rtn(ptr noundef @__func__.rwlock_init, ptr noundef @.str, i32 noundef 274, ptr noundef @.str.1) #4, !dbg !541 - unreachable, !dbg !541 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.rwlock_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 274, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !471 + unreachable, !dbg !471 39: ; No predecessors! - br label %41, !dbg !541 + br label %41, !dbg !471 40: ; preds = %30 - br label %41, !dbg !541 + br label %41, !dbg !471 41: ; preds = %40, %39 - %42 = load ptr, ptr %3, align 8, !dbg !542 - %43 = call i32 @"\01_pthread_rwlock_init"(ptr noundef %42, ptr noundef %7), !dbg !543 - store i32 %43, ptr %5, align 4, !dbg !544 - %44 = load i32, ptr %5, align 4, !dbg !545 - %45 = icmp eq i32 %44, 0, !dbg !545 - %46 = xor i1 %45, true, !dbg !545 - %47 = zext i1 %46 to i32, !dbg !545 - %48 = sext i32 %47 to i64, !dbg !545 - %49 = icmp ne i64 %48, 0, !dbg !545 - br i1 %49, label %50, label %52, !dbg !545 + %42 = load %struct._opaque_pthread_rwlock_t*, %struct._opaque_pthread_rwlock_t** %3, align 8, !dbg !472 + %43 = call i32 @"\01_pthread_rwlock_init"(%struct._opaque_pthread_rwlock_t* noundef %42, %struct._opaque_pthread_rwlockattr_t* noundef %7), !dbg !473 + store i32 %43, i32* %5, align 4, !dbg !474 + %44 = load i32, i32* %5, align 4, !dbg !475 + %45 = icmp eq i32 %44, 0, !dbg !475 + %46 = xor i1 %45, true, !dbg !475 + %47 = zext i1 %46 to i32, !dbg !475 + %48 = sext i32 %47 to i64, !dbg !475 + %49 = icmp ne i64 %48, 0, !dbg !475 + br i1 %49, label %50, label %52, !dbg !475 50: ; preds = %41 - call void @__assert_rtn(ptr noundef @__func__.rwlock_init, ptr noundef @.str, i32 noundef 277, ptr noundef @.str.1) #4, !dbg !545 - unreachable, !dbg !545 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.rwlock_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 277, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !475 + unreachable, !dbg !475 51: ; No predecessors! - br label %53, !dbg !545 + br label %53, !dbg !475 52: ; preds = %41 - br label %53, !dbg !545 + br label %53, !dbg !475 53: ; preds = %52, %51 - %54 = call i32 @pthread_rwlockattr_destroy(ptr noundef %7), !dbg !546 - store i32 %54, ptr %5, align 4, !dbg !547 - %55 = load i32, ptr %5, align 4, !dbg !548 - %56 = icmp eq i32 %55, 0, !dbg !548 - %57 = xor i1 %56, true, !dbg !548 - %58 = zext i1 %57 to i32, !dbg !548 - %59 = sext i32 %58 to i64, !dbg !548 - %60 = icmp ne i64 %59, 0, !dbg !548 - br i1 %60, label %61, label %63, !dbg !548 + %54 = call i32 @pthread_rwlockattr_destroy(%struct._opaque_pthread_rwlockattr_t* noundef %7), !dbg !476 + store i32 %54, i32* %5, align 4, !dbg !477 + %55 = load i32, i32* %5, align 4, !dbg !478 + %56 = icmp eq i32 %55, 0, !dbg !478 + %57 = xor i1 %56, true, !dbg !478 + %58 = zext i1 %57 to i32, !dbg !478 + %59 = sext i32 %58 to i64, !dbg !478 + %60 = icmp ne i64 %59, 0, !dbg !478 + br i1 %60, label %61, label %63, !dbg !478 61: ; preds = %53 - call void @__assert_rtn(ptr noundef @__func__.rwlock_init, ptr noundef @.str, i32 noundef 279, ptr noundef @.str.1) #4, !dbg !548 - unreachable, !dbg !548 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.rwlock_init, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 279, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !478 + unreachable, !dbg !478 62: ; No predecessors! - br label %64, !dbg !548 + br label %64, !dbg !478 63: ; preds = %53 - br label %64, !dbg !548 + br label %64, !dbg !478 64: ; preds = %63, %62 - ret void, !dbg !549 + ret void, !dbg !479 } -declare i32 @pthread_rwlockattr_init(ptr noundef) #2 +declare i32 @pthread_rwlockattr_init(%struct._opaque_pthread_rwlockattr_t* noundef) #2 -declare i32 @pthread_rwlockattr_setpshared(ptr noundef, i32 noundef) #2 +declare i32 @pthread_rwlockattr_setpshared(%struct._opaque_pthread_rwlockattr_t* noundef, i32 noundef) #2 -declare i32 @pthread_rwlockattr_getpshared(ptr noundef, ptr noundef) #2 +declare i32 @pthread_rwlockattr_getpshared(%struct._opaque_pthread_rwlockattr_t* noundef, i32* noundef) #2 -declare i32 @"\01_pthread_rwlock_init"(ptr noundef, ptr noundef) #2 +declare i32 @"\01_pthread_rwlock_init"(%struct._opaque_pthread_rwlock_t* noundef, %struct._opaque_pthread_rwlockattr_t* noundef) #2 -declare i32 @pthread_rwlockattr_destroy(ptr noundef) #2 +declare i32 @pthread_rwlockattr_destroy(%struct._opaque_pthread_rwlockattr_t* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define void @rwlock_destroy(ptr noundef %0) #0 !dbg !550 { - %2 = alloca ptr, align 8 +define void @rwlock_destroy(%struct._opaque_pthread_rwlock_t* noundef %0) #0 !dbg !480 { + %2 = alloca %struct._opaque_pthread_rwlock_t*, align 8 %3 = alloca i32, align 4 - store ptr %0, ptr %2, align 8 - call void @llvm.dbg.declare(metadata ptr %2, metadata !553, metadata !DIExpression()), !dbg !554 - call void @llvm.dbg.declare(metadata ptr %3, metadata !555, metadata !DIExpression()), !dbg !556 - %4 = load ptr, ptr %2, align 8, !dbg !557 - %5 = call i32 @"\01_pthread_rwlock_destroy"(ptr noundef %4), !dbg !558 - store i32 %5, ptr %3, align 4, !dbg !556 - %6 = load i32, ptr %3, align 4, !dbg !559 - %7 = icmp eq i32 %6, 0, !dbg !559 - %8 = xor i1 %7, true, !dbg !559 - %9 = zext i1 %8 to i32, !dbg !559 - %10 = sext i32 %9 to i64, !dbg !559 - %11 = icmp ne i64 %10, 0, !dbg !559 - br i1 %11, label %12, label %14, !dbg !559 + store %struct._opaque_pthread_rwlock_t* %0, %struct._opaque_pthread_rwlock_t** %2, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_rwlock_t** %2, metadata !483, metadata !DIExpression()), !dbg !484 + call void @llvm.dbg.declare(metadata i32* %3, metadata !485, metadata !DIExpression()), !dbg !486 + %4 = load %struct._opaque_pthread_rwlock_t*, %struct._opaque_pthread_rwlock_t** %2, align 8, !dbg !487 + %5 = call i32 @"\01_pthread_rwlock_destroy"(%struct._opaque_pthread_rwlock_t* noundef %4), !dbg !488 + store i32 %5, i32* %3, align 4, !dbg !486 + %6 = load i32, i32* %3, align 4, !dbg !489 + %7 = icmp eq i32 %6, 0, !dbg !489 + %8 = xor i1 %7, true, !dbg !489 + %9 = zext i1 %8 to i32, !dbg !489 + %10 = sext i32 %9 to i64, !dbg !489 + %11 = icmp ne i64 %10, 0, !dbg !489 + br i1 %11, label %12, label %14, !dbg !489 12: ; preds = %1 - call void @__assert_rtn(ptr noundef @__func__.rwlock_destroy, ptr noundef @.str, i32 noundef 285, ptr noundef @.str.1) #4, !dbg !559 - unreachable, !dbg !559 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.rwlock_destroy, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 285, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !489 + unreachable, !dbg !489 13: ; No predecessors! - br label %15, !dbg !559 + br label %15, !dbg !489 14: ; preds = %1 - br label %15, !dbg !559 + br label %15, !dbg !489 15: ; preds = %14, %13 - ret void, !dbg !560 + ret void, !dbg !490 } -declare i32 @"\01_pthread_rwlock_destroy"(ptr noundef) #2 +declare i32 @"\01_pthread_rwlock_destroy"(%struct._opaque_pthread_rwlock_t* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define void @rwlock_wrlock(ptr noundef %0) #0 !dbg !561 { - %2 = alloca ptr, align 8 +define void @rwlock_wrlock(%struct._opaque_pthread_rwlock_t* noundef %0) #0 !dbg !491 { + %2 = alloca %struct._opaque_pthread_rwlock_t*, align 8 %3 = alloca i32, align 4 - store ptr %0, ptr %2, align 8 - call void @llvm.dbg.declare(metadata ptr %2, metadata !562, metadata !DIExpression()), !dbg !563 - call void @llvm.dbg.declare(metadata ptr %3, metadata !564, metadata !DIExpression()), !dbg !565 - %4 = load ptr, ptr %2, align 8, !dbg !566 - %5 = call i32 @"\01_pthread_rwlock_wrlock"(ptr noundef %4), !dbg !567 - store i32 %5, ptr %3, align 4, !dbg !565 - %6 = load i32, ptr %3, align 4, !dbg !568 - %7 = icmp eq i32 %6, 0, !dbg !568 - %8 = xor i1 %7, true, !dbg !568 - %9 = zext i1 %8 to i32, !dbg !568 - %10 = sext i32 %9 to i64, !dbg !568 - %11 = icmp ne i64 %10, 0, !dbg !568 - br i1 %11, label %12, label %14, !dbg !568 + store %struct._opaque_pthread_rwlock_t* %0, %struct._opaque_pthread_rwlock_t** %2, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_rwlock_t** %2, metadata !492, metadata !DIExpression()), !dbg !493 + call void @llvm.dbg.declare(metadata i32* %3, metadata !494, metadata !DIExpression()), !dbg !495 + %4 = load %struct._opaque_pthread_rwlock_t*, %struct._opaque_pthread_rwlock_t** %2, align 8, !dbg !496 + %5 = call i32 @"\01_pthread_rwlock_wrlock"(%struct._opaque_pthread_rwlock_t* noundef %4), !dbg !497 + store i32 %5, i32* %3, align 4, !dbg !495 + %6 = load i32, i32* %3, align 4, !dbg !498 + %7 = icmp eq i32 %6, 0, !dbg !498 + %8 = xor i1 %7, true, !dbg !498 + %9 = zext i1 %8 to i32, !dbg !498 + %10 = sext i32 %9 to i64, !dbg !498 + %11 = icmp ne i64 %10, 0, !dbg !498 + br i1 %11, label %12, label %14, !dbg !498 12: ; preds = %1 - call void @__assert_rtn(ptr noundef @__func__.rwlock_wrlock, ptr noundef @.str, i32 noundef 291, ptr noundef @.str.1) #4, !dbg !568 - unreachable, !dbg !568 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.rwlock_wrlock, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 291, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !498 + unreachable, !dbg !498 13: ; No predecessors! - br label %15, !dbg !568 + br label %15, !dbg !498 14: ; preds = %1 - br label %15, !dbg !568 + br label %15, !dbg !498 15: ; preds = %14, %13 - ret void, !dbg !569 + ret void, !dbg !499 } -declare i32 @"\01_pthread_rwlock_wrlock"(ptr noundef) #2 +declare i32 @"\01_pthread_rwlock_wrlock"(%struct._opaque_pthread_rwlock_t* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define zeroext i1 @rwlock_trywrlock(ptr noundef %0) #0 !dbg !570 { - %2 = alloca ptr, align 8 +define zeroext i1 @rwlock_trywrlock(%struct._opaque_pthread_rwlock_t* noundef %0) #0 !dbg !500 { + %2 = alloca %struct._opaque_pthread_rwlock_t*, align 8 %3 = alloca i32, align 4 - store ptr %0, ptr %2, align 8 - call void @llvm.dbg.declare(metadata ptr %2, metadata !573, metadata !DIExpression()), !dbg !574 - call void @llvm.dbg.declare(metadata ptr %3, metadata !575, metadata !DIExpression()), !dbg !576 - %4 = load ptr, ptr %2, align 8, !dbg !577 - %5 = call i32 @"\01_pthread_rwlock_trywrlock"(ptr noundef %4), !dbg !578 - store i32 %5, ptr %3, align 4, !dbg !576 - %6 = load i32, ptr %3, align 4, !dbg !579 - %7 = icmp eq i32 %6, 0, !dbg !580 - ret i1 %7, !dbg !581 + store %struct._opaque_pthread_rwlock_t* %0, %struct._opaque_pthread_rwlock_t** %2, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_rwlock_t** %2, metadata !503, metadata !DIExpression()), !dbg !504 + call void @llvm.dbg.declare(metadata i32* %3, metadata !505, metadata !DIExpression()), !dbg !506 + %4 = load %struct._opaque_pthread_rwlock_t*, %struct._opaque_pthread_rwlock_t** %2, align 8, !dbg !507 + %5 = call i32 @"\01_pthread_rwlock_trywrlock"(%struct._opaque_pthread_rwlock_t* noundef %4), !dbg !508 + store i32 %5, i32* %3, align 4, !dbg !506 + %6 = load i32, i32* %3, align 4, !dbg !509 + %7 = icmp eq i32 %6, 0, !dbg !510 + ret i1 %7, !dbg !511 } -declare i32 @"\01_pthread_rwlock_trywrlock"(ptr noundef) #2 +declare i32 @"\01_pthread_rwlock_trywrlock"(%struct._opaque_pthread_rwlock_t* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define void @rwlock_rdlock(ptr noundef %0) #0 !dbg !582 { - %2 = alloca ptr, align 8 +define void @rwlock_rdlock(%struct._opaque_pthread_rwlock_t* noundef %0) #0 !dbg !512 { + %2 = alloca %struct._opaque_pthread_rwlock_t*, align 8 %3 = alloca i32, align 4 - store ptr %0, ptr %2, align 8 - call void @llvm.dbg.declare(metadata ptr %2, metadata !583, metadata !DIExpression()), !dbg !584 - call void @llvm.dbg.declare(metadata ptr %3, metadata !585, metadata !DIExpression()), !dbg !586 - %4 = load ptr, ptr %2, align 8, !dbg !587 - %5 = call i32 @"\01_pthread_rwlock_rdlock"(ptr noundef %4), !dbg !588 - store i32 %5, ptr %3, align 4, !dbg !586 - %6 = load i32, ptr %3, align 4, !dbg !589 - %7 = icmp eq i32 %6, 0, !dbg !589 - %8 = xor i1 %7, true, !dbg !589 - %9 = zext i1 %8 to i32, !dbg !589 - %10 = sext i32 %9 to i64, !dbg !589 - %11 = icmp ne i64 %10, 0, !dbg !589 - br i1 %11, label %12, label %14, !dbg !589 + store %struct._opaque_pthread_rwlock_t* %0, %struct._opaque_pthread_rwlock_t** %2, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_rwlock_t** %2, metadata !513, metadata !DIExpression()), !dbg !514 + call void @llvm.dbg.declare(metadata i32* %3, metadata !515, metadata !DIExpression()), !dbg !516 + %4 = load %struct._opaque_pthread_rwlock_t*, %struct._opaque_pthread_rwlock_t** %2, align 8, !dbg !517 + %5 = call i32 @"\01_pthread_rwlock_rdlock"(%struct._opaque_pthread_rwlock_t* noundef %4), !dbg !518 + store i32 %5, i32* %3, align 4, !dbg !516 + %6 = load i32, i32* %3, align 4, !dbg !519 + %7 = icmp eq i32 %6, 0, !dbg !519 + %8 = xor i1 %7, true, !dbg !519 + %9 = zext i1 %8 to i32, !dbg !519 + %10 = sext i32 %9 to i64, !dbg !519 + %11 = icmp ne i64 %10, 0, !dbg !519 + br i1 %11, label %12, label %14, !dbg !519 12: ; preds = %1 - call void @__assert_rtn(ptr noundef @__func__.rwlock_rdlock, ptr noundef @.str, i32 noundef 304, ptr noundef @.str.1) #4, !dbg !589 - unreachable, !dbg !589 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.rwlock_rdlock, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 304, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !519 + unreachable, !dbg !519 13: ; No predecessors! - br label %15, !dbg !589 + br label %15, !dbg !519 14: ; preds = %1 - br label %15, !dbg !589 + br label %15, !dbg !519 15: ; preds = %14, %13 - ret void, !dbg !590 + ret void, !dbg !520 } -declare i32 @"\01_pthread_rwlock_rdlock"(ptr noundef) #2 +declare i32 @"\01_pthread_rwlock_rdlock"(%struct._opaque_pthread_rwlock_t* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define zeroext i1 @rwlock_tryrdlock(ptr noundef %0) #0 !dbg !591 { - %2 = alloca ptr, align 8 +define zeroext i1 @rwlock_tryrdlock(%struct._opaque_pthread_rwlock_t* noundef %0) #0 !dbg !521 { + %2 = alloca %struct._opaque_pthread_rwlock_t*, align 8 %3 = alloca i32, align 4 - store ptr %0, ptr %2, align 8 - call void @llvm.dbg.declare(metadata ptr %2, metadata !592, metadata !DIExpression()), !dbg !593 - call void @llvm.dbg.declare(metadata ptr %3, metadata !594, metadata !DIExpression()), !dbg !595 - %4 = load ptr, ptr %2, align 8, !dbg !596 - %5 = call i32 @"\01_pthread_rwlock_tryrdlock"(ptr noundef %4), !dbg !597 - store i32 %5, ptr %3, align 4, !dbg !595 - %6 = load i32, ptr %3, align 4, !dbg !598 - %7 = icmp eq i32 %6, 0, !dbg !599 - ret i1 %7, !dbg !600 + store %struct._opaque_pthread_rwlock_t* %0, %struct._opaque_pthread_rwlock_t** %2, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_rwlock_t** %2, metadata !522, metadata !DIExpression()), !dbg !523 + call void @llvm.dbg.declare(metadata i32* %3, metadata !524, metadata !DIExpression()), !dbg !525 + %4 = load %struct._opaque_pthread_rwlock_t*, %struct._opaque_pthread_rwlock_t** %2, align 8, !dbg !526 + %5 = call i32 @"\01_pthread_rwlock_tryrdlock"(%struct._opaque_pthread_rwlock_t* noundef %4), !dbg !527 + store i32 %5, i32* %3, align 4, !dbg !525 + %6 = load i32, i32* %3, align 4, !dbg !528 + %7 = icmp eq i32 %6, 0, !dbg !529 + ret i1 %7, !dbg !530 } -declare i32 @"\01_pthread_rwlock_tryrdlock"(ptr noundef) #2 +declare i32 @"\01_pthread_rwlock_tryrdlock"(%struct._opaque_pthread_rwlock_t* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define void @rwlock_unlock(ptr noundef %0) #0 !dbg !601 { - %2 = alloca ptr, align 8 +define void @rwlock_unlock(%struct._opaque_pthread_rwlock_t* noundef %0) #0 !dbg !531 { + %2 = alloca %struct._opaque_pthread_rwlock_t*, align 8 %3 = alloca i32, align 4 - store ptr %0, ptr %2, align 8 - call void @llvm.dbg.declare(metadata ptr %2, metadata !602, metadata !DIExpression()), !dbg !603 - call void @llvm.dbg.declare(metadata ptr %3, metadata !604, metadata !DIExpression()), !dbg !605 - %4 = load ptr, ptr %2, align 8, !dbg !606 - %5 = call i32 @"\01_pthread_rwlock_unlock"(ptr noundef %4), !dbg !607 - store i32 %5, ptr %3, align 4, !dbg !605 - %6 = load i32, ptr %3, align 4, !dbg !608 - %7 = icmp eq i32 %6, 0, !dbg !608 - %8 = xor i1 %7, true, !dbg !608 - %9 = zext i1 %8 to i32, !dbg !608 - %10 = sext i32 %9 to i64, !dbg !608 - %11 = icmp ne i64 %10, 0, !dbg !608 - br i1 %11, label %12, label %14, !dbg !608 + store %struct._opaque_pthread_rwlock_t* %0, %struct._opaque_pthread_rwlock_t** %2, align 8 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_rwlock_t** %2, metadata !532, metadata !DIExpression()), !dbg !533 + call void @llvm.dbg.declare(metadata i32* %3, metadata !534, metadata !DIExpression()), !dbg !535 + %4 = load %struct._opaque_pthread_rwlock_t*, %struct._opaque_pthread_rwlock_t** %2, align 8, !dbg !536 + %5 = call i32 @"\01_pthread_rwlock_unlock"(%struct._opaque_pthread_rwlock_t* noundef %4), !dbg !537 + store i32 %5, i32* %3, align 4, !dbg !535 + %6 = load i32, i32* %3, align 4, !dbg !538 + %7 = icmp eq i32 %6, 0, !dbg !538 + %8 = xor i1 %7, true, !dbg !538 + %9 = zext i1 %8 to i32, !dbg !538 + %10 = sext i32 %9 to i64, !dbg !538 + %11 = icmp ne i64 %10, 0, !dbg !538 + br i1 %11, label %12, label %14, !dbg !538 12: ; preds = %1 - call void @__assert_rtn(ptr noundef @__func__.rwlock_unlock, ptr noundef @.str, i32 noundef 317, ptr noundef @.str.1) #4, !dbg !608 - unreachable, !dbg !608 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.rwlock_unlock, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 317, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !538 + unreachable, !dbg !538 13: ; No predecessors! - br label %15, !dbg !608 + br label %15, !dbg !538 14: ; preds = %1 - br label %15, !dbg !608 + br label %15, !dbg !538 15: ; preds = %14, %13 - ret void, !dbg !609 + ret void, !dbg !539 } -declare i32 @"\01_pthread_rwlock_unlock"(ptr noundef) #2 +declare i32 @"\01_pthread_rwlock_unlock"(%struct._opaque_pthread_rwlock_t* noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define void @rwlock_test() #0 !dbg !610 { +define void @rwlock_test() #0 !dbg !540 { %1 = alloca %struct._opaque_pthread_rwlock_t, align 8 %2 = alloca i32, align 4 %3 = alloca i8, align 1 @@ -1272,1132 +1296,1089 @@ define void @rwlock_test() #0 !dbg !610 { %6 = alloca i8, align 1 %7 = alloca i32, align 4 %8 = alloca i8, align 1 - call void @llvm.dbg.declare(metadata ptr %1, metadata !611, metadata !DIExpression()), !dbg !612 - call void @rwlock_init(ptr noundef %1, i32 noundef 2), !dbg !613 - call void @llvm.dbg.declare(metadata ptr %2, metadata !614, metadata !DIExpression()), !dbg !616 - store i32 4, ptr %2, align 4, !dbg !616 - call void @rwlock_wrlock(ptr noundef %1), !dbg !617 - call void @llvm.dbg.declare(metadata ptr %3, metadata !619, metadata !DIExpression()), !dbg !620 - %9 = call zeroext i1 @rwlock_trywrlock(ptr noundef %1), !dbg !621 - %10 = zext i1 %9 to i8, !dbg !620 - store i8 %10, ptr %3, align 1, !dbg !620 - %11 = load i8, ptr %3, align 1, !dbg !622 - %12 = trunc i8 %11 to i1, !dbg !622 - %13 = xor i1 %12, true, !dbg !622 - %14 = xor i1 %13, true, !dbg !622 - %15 = zext i1 %14 to i32, !dbg !622 - %16 = sext i32 %15 to i64, !dbg !622 - %17 = icmp ne i64 %16, 0, !dbg !622 - br i1 %17, label %18, label %20, !dbg !622 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_rwlock_t* %1, metadata !541, metadata !DIExpression()), !dbg !542 + call void @rwlock_init(%struct._opaque_pthread_rwlock_t* noundef %1, i32 noundef 2), !dbg !543 + call void @llvm.dbg.declare(metadata i32* %2, metadata !544, metadata !DIExpression()), !dbg !546 + store i32 4, i32* %2, align 4, !dbg !546 + call void @rwlock_wrlock(%struct._opaque_pthread_rwlock_t* noundef %1), !dbg !547 + call void @llvm.dbg.declare(metadata i8* %3, metadata !549, metadata !DIExpression()), !dbg !550 + %9 = call zeroext i1 @rwlock_trywrlock(%struct._opaque_pthread_rwlock_t* noundef %1), !dbg !551 + %10 = zext i1 %9 to i8, !dbg !550 + store i8 %10, i8* %3, align 1, !dbg !550 + %11 = load i8, i8* %3, align 1, !dbg !552 + %12 = trunc i8 %11 to i1, !dbg !552 + %13 = xor i1 %12, true, !dbg !552 + %14 = xor i1 %13, true, !dbg !552 + %15 = zext i1 %14 to i32, !dbg !552 + %16 = sext i32 %15 to i64, !dbg !552 + %17 = icmp ne i64 %16, 0, !dbg !552 + br i1 %17, label %18, label %20, !dbg !552 18: ; preds = %0 - call void @__assert_rtn(ptr noundef @__func__.rwlock_test, ptr noundef @.str, i32 noundef 329, ptr noundef @.str.2) #4, !dbg !622 - unreachable, !dbg !622 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.rwlock_test, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 329, i8* noundef getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0)) #4, !dbg !552 + unreachable, !dbg !552 19: ; No predecessors! - br label %21, !dbg !622 + br label %21, !dbg !552 20: ; preds = %0 - br label %21, !dbg !622 + br label %21, !dbg !552 21: ; preds = %20, %19 - %22 = call zeroext i1 @rwlock_tryrdlock(ptr noundef %1), !dbg !623 - %23 = zext i1 %22 to i8, !dbg !624 - store i8 %23, ptr %3, align 1, !dbg !624 - %24 = load i8, ptr %3, align 1, !dbg !625 - %25 = trunc i8 %24 to i1, !dbg !625 - %26 = xor i1 %25, true, !dbg !625 - %27 = xor i1 %26, true, !dbg !625 - %28 = zext i1 %27 to i32, !dbg !625 - %29 = sext i32 %28 to i64, !dbg !625 - %30 = icmp ne i64 %29, 0, !dbg !625 - br i1 %30, label %31, label %33, !dbg !625 + %22 = call zeroext i1 @rwlock_tryrdlock(%struct._opaque_pthread_rwlock_t* noundef %1), !dbg !553 + %23 = zext i1 %22 to i8, !dbg !554 + store i8 %23, i8* %3, align 1, !dbg !554 + %24 = load i8, i8* %3, align 1, !dbg !555 + %25 = trunc i8 %24 to i1, !dbg !555 + %26 = xor i1 %25, true, !dbg !555 + %27 = xor i1 %26, true, !dbg !555 + %28 = zext i1 %27 to i32, !dbg !555 + %29 = sext i32 %28 to i64, !dbg !555 + %30 = icmp ne i64 %29, 0, !dbg !555 + br i1 %30, label %31, label %33, !dbg !555 31: ; preds = %21 - call void @__assert_rtn(ptr noundef @__func__.rwlock_test, ptr noundef @.str, i32 noundef 331, ptr noundef @.str.2) #4, !dbg !625 - unreachable, !dbg !625 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.rwlock_test, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 331, i8* noundef getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0)) #4, !dbg !555 + unreachable, !dbg !555 32: ; No predecessors! - br label %34, !dbg !625 + br label %34, !dbg !555 33: ; preds = %21 - br label %34, !dbg !625 + br label %34, !dbg !555 34: ; preds = %33, %32 - call void @rwlock_unlock(ptr noundef %1), !dbg !626 - call void @__VERIFIER_loop_bound(i32 noundef 5), !dbg !627 - call void @llvm.dbg.declare(metadata ptr %4, metadata !629, metadata !DIExpression()), !dbg !631 - store i32 0, ptr %4, align 4, !dbg !631 - br label %35, !dbg !632 + call void @rwlock_unlock(%struct._opaque_pthread_rwlock_t* noundef %1), !dbg !556 + call void @__VERIFIER_loop_bound(i32 noundef 5), !dbg !557 + call void @llvm.dbg.declare(metadata i32* %4, metadata !559, metadata !DIExpression()), !dbg !561 + store i32 0, i32* %4, align 4, !dbg !561 + br label %35, !dbg !562 35: ; preds = %51, %34 - %36 = load i32, ptr %4, align 4, !dbg !633 - %37 = icmp slt i32 %36, 4, !dbg !635 - br i1 %37, label %38, label %54, !dbg !636 + %36 = load i32, i32* %4, align 4, !dbg !563 + %37 = icmp slt i32 %36, 4, !dbg !565 + br i1 %37, label %38, label %54, !dbg !566 38: ; preds = %35 - call void @llvm.dbg.declare(metadata ptr %5, metadata !637, metadata !DIExpression()), !dbg !639 - %39 = call zeroext i1 @rwlock_tryrdlock(ptr noundef %1), !dbg !640 - %40 = zext i1 %39 to i8, !dbg !639 - store i8 %40, ptr %5, align 1, !dbg !639 - %41 = load i8, ptr %5, align 1, !dbg !641 - %42 = trunc i8 %41 to i1, !dbg !641 - %43 = xor i1 %42, true, !dbg !641 - %44 = zext i1 %43 to i32, !dbg !641 - %45 = sext i32 %44 to i64, !dbg !641 - %46 = icmp ne i64 %45, 0, !dbg !641 - br i1 %46, label %47, label %49, !dbg !641 + call void @llvm.dbg.declare(metadata i8* %5, metadata !567, metadata !DIExpression()), !dbg !569 + %39 = call zeroext i1 @rwlock_tryrdlock(%struct._opaque_pthread_rwlock_t* noundef %1), !dbg !570 + %40 = zext i1 %39 to i8, !dbg !569 + store i8 %40, i8* %5, align 1, !dbg !569 + %41 = load i8, i8* %5, align 1, !dbg !571 + %42 = trunc i8 %41 to i1, !dbg !571 + %43 = xor i1 %42, true, !dbg !571 + %44 = zext i1 %43 to i32, !dbg !571 + %45 = sext i32 %44 to i64, !dbg !571 + %46 = icmp ne i64 %45, 0, !dbg !571 + br i1 %46, label %47, label %49, !dbg !571 47: ; preds = %38 - call void @__assert_rtn(ptr noundef @__func__.rwlock_test, ptr noundef @.str, i32 noundef 340, ptr noundef @.str.3) #4, !dbg !641 - unreachable, !dbg !641 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.rwlock_test, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 340, i8* noundef getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0)) #4, !dbg !571 + unreachable, !dbg !571 48: ; No predecessors! - br label %50, !dbg !641 + br label %50, !dbg !571 49: ; preds = %38 - br label %50, !dbg !641 + br label %50, !dbg !571 50: ; preds = %49, %48 - br label %51, !dbg !642 + br label %51, !dbg !572 51: ; preds = %50 - %52 = load i32, ptr %4, align 4, !dbg !643 - %53 = add nsw i32 %52, 1, !dbg !643 - store i32 %53, ptr %4, align 4, !dbg !643 - br label %35, !dbg !644, !llvm.loop !645 + %52 = load i32, i32* %4, align 4, !dbg !573 + %53 = add nsw i32 %52, 1, !dbg !573 + store i32 %53, i32* %4, align 4, !dbg !573 + br label %35, !dbg !574, !llvm.loop !575 54: ; preds = %35 - call void @llvm.dbg.declare(metadata ptr %6, metadata !648, metadata !DIExpression()), !dbg !650 - %55 = call zeroext i1 @rwlock_trywrlock(ptr noundef %1), !dbg !651 - %56 = zext i1 %55 to i8, !dbg !650 - store i8 %56, ptr %6, align 1, !dbg !650 - %57 = load i8, ptr %6, align 1, !dbg !652 - %58 = trunc i8 %57 to i1, !dbg !652 - %59 = xor i1 %58, true, !dbg !652 - %60 = xor i1 %59, true, !dbg !652 - %61 = zext i1 %60 to i32, !dbg !652 - %62 = sext i32 %61 to i64, !dbg !652 - %63 = icmp ne i64 %62, 0, !dbg !652 - br i1 %63, label %64, label %66, !dbg !652 + call void @llvm.dbg.declare(metadata i8* %6, metadata !578, metadata !DIExpression()), !dbg !580 + %55 = call zeroext i1 @rwlock_trywrlock(%struct._opaque_pthread_rwlock_t* noundef %1), !dbg !581 + %56 = zext i1 %55 to i8, !dbg !580 + store i8 %56, i8* %6, align 1, !dbg !580 + %57 = load i8, i8* %6, align 1, !dbg !582 + %58 = trunc i8 %57 to i1, !dbg !582 + %59 = xor i1 %58, true, !dbg !582 + %60 = xor i1 %59, true, !dbg !582 + %61 = zext i1 %60 to i32, !dbg !582 + %62 = sext i32 %61 to i64, !dbg !582 + %63 = icmp ne i64 %62, 0, !dbg !582 + br i1 %63, label %64, label %66, !dbg !582 64: ; preds = %54 - call void @__assert_rtn(ptr noundef @__func__.rwlock_test, ptr noundef @.str, i32 noundef 345, ptr noundef @.str.2) #4, !dbg !652 - unreachable, !dbg !652 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.rwlock_test, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 345, i8* noundef getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0)) #4, !dbg !582 + unreachable, !dbg !582 65: ; No predecessors! - br label %67, !dbg !652 + br label %67, !dbg !582 66: ; preds = %54 - br label %67, !dbg !652 + br label %67, !dbg !582 67: ; preds = %66, %65 - call void @__VERIFIER_loop_bound(i32 noundef 5), !dbg !653 - call void @llvm.dbg.declare(metadata ptr %7, metadata !654, metadata !DIExpression()), !dbg !656 - store i32 0, ptr %7, align 4, !dbg !656 - br label %68, !dbg !657 + call void @__VERIFIER_loop_bound(i32 noundef 5), !dbg !583 + call void @llvm.dbg.declare(metadata i32* %7, metadata !584, metadata !DIExpression()), !dbg !586 + store i32 0, i32* %7, align 4, !dbg !586 + br label %68, !dbg !587 68: ; preds = %72, %67 - %69 = load i32, ptr %7, align 4, !dbg !658 - %70 = icmp slt i32 %69, 4, !dbg !660 - br i1 %70, label %71, label %75, !dbg !661 + %69 = load i32, i32* %7, align 4, !dbg !588 + %70 = icmp slt i32 %69, 4, !dbg !590 + br i1 %70, label %71, label %75, !dbg !591 71: ; preds = %68 - call void @rwlock_unlock(ptr noundef %1), !dbg !662 - br label %72, !dbg !664 + call void @rwlock_unlock(%struct._opaque_pthread_rwlock_t* noundef %1), !dbg !592 + br label %72, !dbg !594 72: ; preds = %71 - %73 = load i32, ptr %7, align 4, !dbg !665 - %74 = add nsw i32 %73, 1, !dbg !665 - store i32 %74, ptr %7, align 4, !dbg !665 - br label %68, !dbg !666, !llvm.loop !667 + %73 = load i32, i32* %7, align 4, !dbg !595 + %74 = add nsw i32 %73, 1, !dbg !595 + store i32 %74, i32* %7, align 4, !dbg !595 + br label %68, !dbg !596, !llvm.loop !597 75: ; preds = %68 - call void @rwlock_wrlock(ptr noundef %1), !dbg !669 - call void @llvm.dbg.declare(metadata ptr %8, metadata !671, metadata !DIExpression()), !dbg !672 - %76 = call zeroext i1 @rwlock_trywrlock(ptr noundef %1), !dbg !673 - %77 = zext i1 %76 to i8, !dbg !672 - store i8 %77, ptr %8, align 1, !dbg !672 - %78 = load i8, ptr %8, align 1, !dbg !674 - %79 = trunc i8 %78 to i1, !dbg !674 - %80 = xor i1 %79, true, !dbg !674 - %81 = xor i1 %80, true, !dbg !674 - %82 = zext i1 %81 to i32, !dbg !674 - %83 = sext i32 %82 to i64, !dbg !674 - %84 = icmp ne i64 %83, 0, !dbg !674 - br i1 %84, label %85, label %87, !dbg !674 + call void @rwlock_wrlock(%struct._opaque_pthread_rwlock_t* noundef %1), !dbg !599 + call void @llvm.dbg.declare(metadata i8* %8, metadata !601, metadata !DIExpression()), !dbg !602 + %76 = call zeroext i1 @rwlock_trywrlock(%struct._opaque_pthread_rwlock_t* noundef %1), !dbg !603 + %77 = zext i1 %76 to i8, !dbg !602 + store i8 %77, i8* %8, align 1, !dbg !602 + %78 = load i8, i8* %8, align 1, !dbg !604 + %79 = trunc i8 %78 to i1, !dbg !604 + %80 = xor i1 %79, true, !dbg !604 + %81 = xor i1 %80, true, !dbg !604 + %82 = zext i1 %81 to i32, !dbg !604 + %83 = sext i32 %82 to i64, !dbg !604 + %84 = icmp ne i64 %83, 0, !dbg !604 + br i1 %84, label %85, label %87, !dbg !604 85: ; preds = %75 - call void @__assert_rtn(ptr noundef @__func__.rwlock_test, ptr noundef @.str, i32 noundef 357, ptr noundef @.str.2) #4, !dbg !674 - unreachable, !dbg !674 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.rwlock_test, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 357, i8* noundef getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0)) #4, !dbg !604 + unreachable, !dbg !604 86: ; No predecessors! - br label %88, !dbg !674 + br label %88, !dbg !604 87: ; preds = %75 - br label %88, !dbg !674 + br label %88, !dbg !604 88: ; preds = %87, %86 - call void @rwlock_unlock(ptr noundef %1), !dbg !675 - call void @rwlock_destroy(ptr noundef %1), !dbg !676 - ret void, !dbg !677 + call void @rwlock_unlock(%struct._opaque_pthread_rwlock_t* noundef %1), !dbg !605 + call void @rwlock_destroy(%struct._opaque_pthread_rwlock_t* noundef %1), !dbg !606 + ret void, !dbg !607 } declare void @__VERIFIER_loop_bound(i32 noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define void @key_destroy(ptr noundef %0) #0 !dbg !678 { - %2 = alloca ptr, align 8 - store ptr %0, ptr %2, align 8 - call void @llvm.dbg.declare(metadata ptr %2, metadata !679, metadata !DIExpression()), !dbg !680 - %3 = call ptr @pthread_self(), !dbg !681 - store ptr %3, ptr @latest_thread, align 8, !dbg !682 - ret void, !dbg !683 +define void @key_destroy(i8* noundef %0) #0 !dbg !608 { + %2 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !609, metadata !DIExpression()), !dbg !610 + %3 = call %struct._opaque_pthread_t* @pthread_self(), !dbg !611 + store %struct._opaque_pthread_t* %3, %struct._opaque_pthread_t** @latest_thread, align 8, !dbg !612 + ret void, !dbg !613 } -declare ptr @pthread_self() #2 +declare %struct._opaque_pthread_t* @pthread_self() #2 ; Function Attrs: noinline nounwind ssp uwtable -define ptr @key_worker(ptr noundef %0) #0 !dbg !684 { - %2 = alloca ptr, align 8 +define i8* @key_worker(i8* noundef %0) #0 !dbg !614 { + %2 = alloca i8*, align 8 %3 = alloca i32, align 4 %4 = alloca i32, align 4 - %5 = alloca ptr, align 8 - store ptr %0, ptr %2, align 8 - call void @llvm.dbg.declare(metadata ptr %2, metadata !685, metadata !DIExpression()), !dbg !686 - call void @llvm.dbg.declare(metadata ptr %3, metadata !687, metadata !DIExpression()), !dbg !688 - store i32 1, ptr %3, align 4, !dbg !688 - call void @llvm.dbg.declare(metadata ptr %4, metadata !689, metadata !DIExpression()), !dbg !690 - %6 = load i64, ptr @local_data, align 8, !dbg !691 - %7 = call i32 @pthread_setspecific(i64 noundef %6, ptr noundef %3), !dbg !692 - store i32 %7, ptr %4, align 4, !dbg !690 - %8 = load i32, ptr %4, align 4, !dbg !693 - %9 = icmp eq i32 %8, 0, !dbg !693 - %10 = xor i1 %9, true, !dbg !693 - %11 = zext i1 %10 to i32, !dbg !693 - %12 = sext i32 %11 to i64, !dbg !693 - %13 = icmp ne i64 %12, 0, !dbg !693 - br i1 %13, label %14, label %16, !dbg !693 + %5 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !615, metadata !DIExpression()), !dbg !616 + call void @llvm.dbg.declare(metadata i32* %3, metadata !617, metadata !DIExpression()), !dbg !618 + store i32 1, i32* %3, align 4, !dbg !618 + call void @llvm.dbg.declare(metadata i32* %4, metadata !619, metadata !DIExpression()), !dbg !620 + %6 = load i64, i64* @local_data, align 8, !dbg !621 + %7 = bitcast i32* %3 to i8*, !dbg !622 + %8 = call i32 @pthread_setspecific(i64 noundef %6, i8* noundef %7), !dbg !623 + store i32 %8, i32* %4, align 4, !dbg !620 + %9 = load i32, i32* %4, align 4, !dbg !624 + %10 = icmp eq i32 %9, 0, !dbg !624 + %11 = xor i1 %10, true, !dbg !624 + %12 = zext i1 %11 to i32, !dbg !624 + %13 = sext i32 %12 to i64, !dbg !624 + %14 = icmp ne i64 %13, 0, !dbg !624 + br i1 %14, label %15, label %17, !dbg !624 -14: ; preds = %1 - call void @__assert_rtn(ptr noundef @__func__.key_worker, ptr noundef @.str, i32 noundef 379, ptr noundef @.str.1) #4, !dbg !693 - unreachable, !dbg !693 - -15: ; No predecessors! - br label %17, !dbg !693 - -16: ; preds = %1 - br label %17, !dbg !693 - -17: ; preds = %16, %15 - call void @llvm.dbg.declare(metadata ptr %5, metadata !694, metadata !DIExpression()), !dbg !695 - %18 = load i64, ptr @local_data, align 8, !dbg !696 - %19 = call ptr @pthread_getspecific(i64 noundef %18), !dbg !697 - store ptr %19, ptr %5, align 8, !dbg !695 - %20 = load ptr, ptr %5, align 8, !dbg !698 - %21 = icmp eq ptr %20, %3, !dbg !698 - %22 = xor i1 %21, true, !dbg !698 - %23 = zext i1 %22 to i32, !dbg !698 - %24 = sext i32 %23 to i64, !dbg !698 - %25 = icmp ne i64 %24, 0, !dbg !698 - br i1 %25, label %26, label %28, !dbg !698 - -26: ; preds = %17 - call void @__assert_rtn(ptr noundef @__func__.key_worker, ptr noundef @.str, i32 noundef 382, ptr noundef @.str.4) #4, !dbg !698 - unreachable, !dbg !698 - -27: ; No predecessors! - br label %29, !dbg !698 - -28: ; preds = %17 - br label %29, !dbg !698 - -29: ; preds = %28, %27 - %30 = load ptr, ptr %2, align 8, !dbg !699 - ret ptr %30, !dbg !700 +15: ; preds = %1 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.key_worker, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 379, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !624 + unreachable, !dbg !624 + +16: ; No predecessors! + br label %18, !dbg !624 + +17: ; preds = %1 + br label %18, !dbg !624 + +18: ; preds = %17, %16 + call void @llvm.dbg.declare(metadata i8** %5, metadata !625, metadata !DIExpression()), !dbg !626 + %19 = load i64, i64* @local_data, align 8, !dbg !627 + %20 = call i8* @pthread_getspecific(i64 noundef %19), !dbg !628 + store i8* %20, i8** %5, align 8, !dbg !626 + %21 = load i8*, i8** %5, align 8, !dbg !629 + %22 = bitcast i32* %3 to i8*, !dbg !629 + %23 = icmp eq i8* %21, %22, !dbg !629 + %24 = xor i1 %23, true, !dbg !629 + %25 = zext i1 %24 to i32, !dbg !629 + %26 = sext i32 %25 to i64, !dbg !629 + %27 = icmp ne i64 %26, 0, !dbg !629 + br i1 %27, label %28, label %30, !dbg !629 + +28: ; preds = %18 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.key_worker, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 382, i8* noundef getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0)) #4, !dbg !629 + unreachable, !dbg !629 + +29: ; No predecessors! + br label %31, !dbg !629 + +30: ; preds = %18 + br label %31, !dbg !629 + +31: ; preds = %30, %29 + %32 = load i8*, i8** %2, align 8, !dbg !630 + ret i8* %32, !dbg !631 } -declare i32 @pthread_setspecific(i64 noundef, ptr noundef) #2 +declare i32 @pthread_setspecific(i64 noundef, i8* noundef) #2 -declare ptr @pthread_getspecific(i64 noundef) #2 +declare i8* @pthread_getspecific(i64 noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define void @key_test() #0 !dbg !701 { +define void @key_test() #0 !dbg !632 { %1 = alloca i32, align 4 - %2 = alloca ptr, align 8 + %2 = alloca i8*, align 8 %3 = alloca i32, align 4 - %4 = alloca ptr, align 8 - %5 = alloca ptr, align 8 - %6 = alloca ptr, align 8 - call void @llvm.dbg.declare(metadata ptr %1, metadata !702, metadata !DIExpression()), !dbg !703 - store i32 2, ptr %1, align 4, !dbg !703 - call void @llvm.dbg.declare(metadata ptr %2, metadata !704, metadata !DIExpression()), !dbg !705 - store ptr inttoptr (i64 41 to ptr), ptr %2, align 8, !dbg !705 - call void @llvm.dbg.declare(metadata ptr %3, metadata !706, metadata !DIExpression()), !dbg !707 - %7 = call i32 @pthread_key_create(ptr noundef @local_data, ptr noundef @key_destroy), !dbg !708 - call void @llvm.dbg.declare(metadata ptr %4, metadata !709, metadata !DIExpression()), !dbg !710 - %8 = load ptr, ptr %2, align 8, !dbg !711 - %9 = call ptr @thread_create(ptr noundef @key_worker, ptr noundef %8), !dbg !712 - store ptr %9, ptr %4, align 8, !dbg !710 - %10 = load i64, ptr @local_data, align 8, !dbg !713 - %11 = call i32 @pthread_setspecific(i64 noundef %10, ptr noundef %1), !dbg !714 - store i32 %11, ptr %3, align 4, !dbg !715 - %12 = load i32, ptr %3, align 4, !dbg !716 - %13 = icmp eq i32 %12, 0, !dbg !716 - %14 = xor i1 %13, true, !dbg !716 - %15 = zext i1 %14 to i32, !dbg !716 - %16 = sext i32 %15 to i64, !dbg !716 - %17 = icmp ne i64 %16, 0, !dbg !716 - br i1 %17, label %18, label %20, !dbg !716 - -18: ; preds = %0 - call void @__assert_rtn(ptr noundef @__func__.key_test, ptr noundef @.str, i32 noundef 398, ptr noundef @.str.1) #4, !dbg !716 - unreachable, !dbg !716 - -19: ; No predecessors! - br label %21, !dbg !716 + %4 = alloca %struct._opaque_pthread_t*, align 8 + %5 = alloca i8*, align 8 + %6 = alloca i8*, align 8 + call void @llvm.dbg.declare(metadata i32* %1, metadata !633, metadata !DIExpression()), !dbg !634 + store i32 2, i32* %1, align 4, !dbg !634 + call void @llvm.dbg.declare(metadata i8** %2, metadata !635, metadata !DIExpression()), !dbg !636 + store i8* inttoptr (i64 41 to i8*), i8** %2, align 8, !dbg !636 + call void @llvm.dbg.declare(metadata i32* %3, metadata !637, metadata !DIExpression()), !dbg !638 + %7 = call i32 @pthread_key_create(i64* noundef @local_data, void (i8*)* noundef @key_destroy), !dbg !639 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %4, metadata !640, metadata !DIExpression()), !dbg !641 + %8 = load i8*, i8** %2, align 8, !dbg !642 + %9 = call %struct._opaque_pthread_t* @thread_create(i8* (i8*)* noundef @key_worker, i8* noundef %8), !dbg !643 + store %struct._opaque_pthread_t* %9, %struct._opaque_pthread_t** %4, align 8, !dbg !641 + %10 = load i64, i64* @local_data, align 8, !dbg !644 + %11 = bitcast i32* %1 to i8*, !dbg !645 + %12 = call i32 @pthread_setspecific(i64 noundef %10, i8* noundef %11), !dbg !646 + store i32 %12, i32* %3, align 4, !dbg !647 + %13 = load i32, i32* %3, align 4, !dbg !648 + %14 = icmp eq i32 %13, 0, !dbg !648 + %15 = xor i1 %14, true, !dbg !648 + %16 = zext i1 %15 to i32, !dbg !648 + %17 = sext i32 %16 to i64, !dbg !648 + %18 = icmp ne i64 %17, 0, !dbg !648 + br i1 %18, label %19, label %21, !dbg !648 + +19: ; preds = %0 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.key_test, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 398, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !648 + unreachable, !dbg !648 + +20: ; No predecessors! + br label %22, !dbg !648 + +21: ; preds = %0 + br label %22, !dbg !648 + +22: ; preds = %21, %20 + call void @llvm.dbg.declare(metadata i8** %5, metadata !649, metadata !DIExpression()), !dbg !650 + %23 = load i64, i64* @local_data, align 8, !dbg !651 + %24 = call i8* @pthread_getspecific(i64 noundef %23), !dbg !652 + store i8* %24, i8** %5, align 8, !dbg !650 + %25 = load i8*, i8** %5, align 8, !dbg !653 + %26 = bitcast i32* %1 to i8*, !dbg !653 + %27 = icmp eq i8* %25, %26, !dbg !653 + %28 = xor i1 %27, true, !dbg !653 + %29 = zext i1 %28 to i32, !dbg !653 + %30 = sext i32 %29 to i64, !dbg !653 + %31 = icmp ne i64 %30, 0, !dbg !653 + br i1 %31, label %32, label %34, !dbg !653 + +32: ; preds = %22 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.key_test, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 401, i8* noundef getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0)) #4, !dbg !653 + unreachable, !dbg !653 + +33: ; No predecessors! + br label %35, !dbg !653 + +34: ; preds = %22 + br label %35, !dbg !653 + +35: ; preds = %34, %33 + %36 = load i64, i64* @local_data, align 8, !dbg !654 + %37 = call i32 @pthread_setspecific(i64 noundef %36, i8* noundef null), !dbg !655 + store i32 %37, i32* %3, align 4, !dbg !656 + %38 = load i32, i32* %3, align 4, !dbg !657 + %39 = icmp eq i32 %38, 0, !dbg !657 + %40 = xor i1 %39, true, !dbg !657 + %41 = zext i1 %40 to i32, !dbg !657 + %42 = sext i32 %41 to i64, !dbg !657 + %43 = icmp ne i64 %42, 0, !dbg !657 + br i1 %43, label %44, label %46, !dbg !657 + +44: ; preds = %35 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.key_test, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 404, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !657 + unreachable, !dbg !657 -20: ; preds = %0 - br label %21, !dbg !716 - -21: ; preds = %20, %19 - call void @llvm.dbg.declare(metadata ptr %5, metadata !717, metadata !DIExpression()), !dbg !718 - %22 = load i64, ptr @local_data, align 8, !dbg !719 - %23 = call ptr @pthread_getspecific(i64 noundef %22), !dbg !720 - store ptr %23, ptr %5, align 8, !dbg !718 - %24 = load ptr, ptr %5, align 8, !dbg !721 - %25 = icmp eq ptr %24, %1, !dbg !721 - %26 = xor i1 %25, true, !dbg !721 - %27 = zext i1 %26 to i32, !dbg !721 - %28 = sext i32 %27 to i64, !dbg !721 - %29 = icmp ne i64 %28, 0, !dbg !721 - br i1 %29, label %30, label %32, !dbg !721 - -30: ; preds = %21 - call void @__assert_rtn(ptr noundef @__func__.key_test, ptr noundef @.str, i32 noundef 401, ptr noundef @.str.4) #4, !dbg !721 - unreachable, !dbg !721 - -31: ; No predecessors! - br label %33, !dbg !721 - -32: ; preds = %21 - br label %33, !dbg !721 - -33: ; preds = %32, %31 - %34 = load i64, ptr @local_data, align 8, !dbg !722 - %35 = call i32 @pthread_setspecific(i64 noundef %34, ptr noundef null), !dbg !723 - store i32 %35, ptr %3, align 4, !dbg !724 - %36 = load i32, ptr %3, align 4, !dbg !725 - %37 = icmp eq i32 %36, 0, !dbg !725 - %38 = xor i1 %37, true, !dbg !725 - %39 = zext i1 %38 to i32, !dbg !725 - %40 = sext i32 %39 to i64, !dbg !725 - %41 = icmp ne i64 %40, 0, !dbg !725 - br i1 %41, label %42, label %44, !dbg !725 - -42: ; preds = %33 - call void @__assert_rtn(ptr noundef @__func__.key_test, ptr noundef @.str, i32 noundef 404, ptr noundef @.str.1) #4, !dbg !725 - unreachable, !dbg !725 - -43: ; No predecessors! - br label %45, !dbg !725 - -44: ; preds = %33 - br label %45, !dbg !725 - -45: ; preds = %44, %43 - call void @llvm.dbg.declare(metadata ptr %6, metadata !726, metadata !DIExpression()), !dbg !727 - %46 = load ptr, ptr %4, align 8, !dbg !728 - %47 = call ptr @thread_join(ptr noundef %46), !dbg !729 - store ptr %47, ptr %6, align 8, !dbg !727 - %48 = load i64, ptr @local_data, align 8, !dbg !730 - %49 = call i32 @pthread_key_delete(i64 noundef %48), !dbg !731 - store i32 %49, ptr %3, align 4, !dbg !732 - %50 = load i32, ptr %3, align 4, !dbg !733 - %51 = icmp eq i32 %50, 0, !dbg !733 - %52 = xor i1 %51, true, !dbg !733 - %53 = zext i1 %52 to i32, !dbg !733 - %54 = sext i32 %53 to i64, !dbg !733 - %55 = icmp ne i64 %54, 0, !dbg !733 - br i1 %55, label %56, label %58, !dbg !733 - -56: ; preds = %45 - call void @__assert_rtn(ptr noundef @__func__.key_test, ptr noundef @.str, i32 noundef 410, ptr noundef @.str.1) #4, !dbg !733 - unreachable, !dbg !733 - -57: ; No predecessors! - br label %59, !dbg !733 +45: ; No predecessors! + br label %47, !dbg !657 -58: ; preds = %45 - br label %59, !dbg !733 +46: ; preds = %35 + br label %47, !dbg !657 -59: ; preds = %58, %57 - ret void, !dbg !734 +47: ; preds = %46, %45 + call void @llvm.dbg.declare(metadata i8** %6, metadata !658, metadata !DIExpression()), !dbg !659 + %48 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %4, align 8, !dbg !660 + %49 = call i8* @thread_join(%struct._opaque_pthread_t* noundef %48), !dbg !661 + store i8* %49, i8** %6, align 8, !dbg !659 + %50 = load i8*, i8** %6, align 8, !dbg !662 + %51 = load i8*, i8** %2, align 8, !dbg !662 + %52 = icmp eq i8* %50, %51, !dbg !662 + %53 = xor i1 %52, true, !dbg !662 + %54 = zext i1 %53 to i32, !dbg !662 + %55 = sext i32 %54 to i64, !dbg !662 + %56 = icmp ne i64 %55, 0, !dbg !662 + br i1 %56, label %57, label %59, !dbg !662 + +57: ; preds = %47 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.key_test, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 407, i8* noundef getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0)) #4, !dbg !662 + unreachable, !dbg !662 + +58: ; No predecessors! + br label %60, !dbg !662 + +59: ; preds = %47 + br label %60, !dbg !662 + +60: ; preds = %59, %58 + %61 = load i64, i64* @local_data, align 8, !dbg !663 + %62 = call i32 @pthread_key_delete(i64 noundef %61), !dbg !664 + store i32 %62, i32* %3, align 4, !dbg !665 + %63 = load i32, i32* %3, align 4, !dbg !666 + %64 = icmp eq i32 %63, 0, !dbg !666 + %65 = xor i1 %64, true, !dbg !666 + %66 = zext i1 %65 to i32, !dbg !666 + %67 = sext i32 %66 to i64, !dbg !666 + %68 = icmp ne i64 %67, 0, !dbg !666 + br i1 %68, label %69, label %71, !dbg !666 + +69: ; preds = %60 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.key_test, i64 0, i64 0), i8* noundef getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 noundef 410, i8* noundef getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)) #4, !dbg !666 + unreachable, !dbg !666 + +70: ; No predecessors! + br label %72, !dbg !666 + +71: ; preds = %60 + br label %72, !dbg !666 + +72: ; preds = %71, %70 + ret void, !dbg !667 } -declare i32 @pthread_key_create(ptr noundef, ptr noundef) #2 +declare i32 @pthread_key_create(i64* noundef, void (i8*)* noundef) #2 declare i32 @pthread_key_delete(i64 noundef) #2 ; Function Attrs: noinline nounwind ssp uwtable -define i32 @main() #0 !dbg !735 { - call void @mutex_test(), !dbg !738 - call void @cond_test(), !dbg !739 - call void @rwlock_test(), !dbg !740 - call void @key_test(), !dbg !741 - ret i32 0, !dbg !742 +define i32 @main() #0 !dbg !668 { + call void @mutex_test(), !dbg !671 + call void @cond_test(), !dbg !672 + call void @rwlock_test(), !dbg !673 + call void @key_test(), !dbg !674 + ret i32 0, !dbg !675 } -attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+sha3,+sm4,+v8.5a,+zcm,+zcz" } -attributes #1 = { nocallback nofree nosync nounwind readnone speculatable willreturn } -attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+sha3,+sm4,+v8.5a,+zcm,+zcz" } -attributes #3 = { cold noreturn "disable-tail-calls"="true" "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+sha3,+sm4,+v8.5a,+zcm,+zcz" } +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #3 = { cold noreturn "disable-tail-calls"="true" "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } attributes #4 = { cold noreturn } -!llvm.dbg.cu = !{!61} -!llvm.module.flags = !{!144, !145, !146, !147, !148, !149} -!llvm.ident = !{!150} +!llvm.dbg.cu = !{!2} +!llvm.module.flags = !{!66, !67, !68, !69, !70, !71, !72, !73, !74, !75} +!llvm.ident = !{!76} !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) -!1 = distinct !DIGlobalVariable(scope: null, file: !2, line: 18, type: !3, isLocal: true, isDefinition: true) -!2 = !DIFile(filename: "benchmarks/c/miscellaneous/pthread.c", directory: "/Users/r/Documents/Dat3M") -!3 = !DICompositeType(tag: DW_TAG_array_type, baseType: !4, size: 112, elements: !6) -!4 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !5) -!5 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) -!6 = !{!7} -!7 = !DISubrange(count: 14) -!8 = !DIGlobalVariableExpression(var: !9, expr: !DIExpression()) -!9 = distinct !DIGlobalVariable(scope: null, file: !2, line: 18, type: !10, isLocal: true, isDefinition: true) -!10 = !DICompositeType(tag: DW_TAG_array_type, baseType: !5, size: 80, elements: !11) -!11 = !{!12} -!12 = !DISubrange(count: 10) -!13 = !DIGlobalVariableExpression(var: !14, expr: !DIExpression()) -!14 = distinct !DIGlobalVariable(scope: null, file: !2, line: 18, type: !15, isLocal: true, isDefinition: true) -!15 = !DICompositeType(tag: DW_TAG_array_type, baseType: !5, size: 96, elements: !16) -!16 = !{!17} -!17 = !DISubrange(count: 12) -!18 = !DIGlobalVariableExpression(var: !19, expr: !DIExpression()) -!19 = distinct !DIGlobalVariable(scope: null, file: !2, line: 27, type: !20, isLocal: true, isDefinition: true) -!20 = !DICompositeType(tag: DW_TAG_array_type, baseType: !4, size: 96, elements: !16) -!21 = !DIGlobalVariableExpression(var: !22, expr: !DIExpression()) -!22 = distinct !DIGlobalVariable(scope: null, file: !2, line: 49, type: !23, isLocal: true, isDefinition: true) -!23 = !DICompositeType(tag: DW_TAG_array_type, baseType: !4, size: 88, elements: !24) -!24 = !{!25} -!25 = !DISubrange(count: 11) -!26 = !DIGlobalVariableExpression(var: !27, expr: !DIExpression()) -!27 = distinct !DIGlobalVariable(scope: null, file: !2, line: 80, type: !3, isLocal: true, isDefinition: true) -!28 = !DIGlobalVariableExpression(var: !29, expr: !DIExpression()) -!29 = distinct !DIGlobalVariable(scope: null, file: !2, line: 86, type: !23, isLocal: true, isDefinition: true) -!30 = !DIGlobalVariableExpression(var: !31, expr: !DIExpression()) -!31 = distinct !DIGlobalVariable(scope: null, file: !2, line: 99, type: !32, isLocal: true, isDefinition: true) -!32 = !DICompositeType(tag: DW_TAG_array_type, baseType: !4, size: 104, elements: !33) -!33 = !{!34} -!34 = !DISubrange(count: 13) -!35 = !DIGlobalVariableExpression(var: !36, expr: !DIExpression()) -!36 = distinct !DIGlobalVariable(scope: null, file: !2, line: 113, type: !23, isLocal: true, isDefinition: true) -!37 = !DIGlobalVariableExpression(var: !38, expr: !DIExpression()) -!38 = distinct !DIGlobalVariable(scope: null, file: !2, line: 113, type: !39, isLocal: true, isDefinition: true) -!39 = !DICompositeType(tag: DW_TAG_array_type, baseType: !5, size: 72, elements: !40) -!40 = !{!41} -!41 = !DISubrange(count: 9) -!42 = !DIGlobalVariableExpression(var: !43, expr: !DIExpression()) -!43 = distinct !DIGlobalVariable(scope: null, file: !2, line: 122, type: !44, isLocal: true, isDefinition: true) -!44 = !DICompositeType(tag: DW_TAG_array_type, baseType: !5, size: 64, elements: !45) -!45 = !{!46} -!46 = !DISubrange(count: 8) -!47 = !DIGlobalVariableExpression(var: !48, expr: !DIExpression()) -!48 = distinct !DIGlobalVariable(scope: null, file: !2, line: 154, type: !49, isLocal: true, isDefinition: true) -!49 = !DICompositeType(tag: DW_TAG_array_type, baseType: !4, size: 80, elements: !11) -!50 = !DIGlobalVariableExpression(var: !51, expr: !DIExpression()) -!51 = distinct !DIGlobalVariable(scope: null, file: !2, line: 166, type: !32, isLocal: true, isDefinition: true) -!52 = !DIGlobalVariableExpression(var: !53, expr: !DIExpression()) -!53 = distinct !DIGlobalVariable(scope: null, file: !2, line: 172, type: !20, isLocal: true, isDefinition: true) -!54 = !DIGlobalVariableExpression(var: !55, expr: !DIExpression()) -!55 = distinct !DIGlobalVariable(scope: null, file: !2, line: 178, type: !56, isLocal: true, isDefinition: true) -!56 = !DICompositeType(tag: DW_TAG_array_type, baseType: !4, size: 120, elements: !57) +!1 = distinct !DIGlobalVariable(name: "phase", scope: !2, file: !11, line: 200, type: !65, isLocal: false, isDefinition: true) +!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !4, globals: !8, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!3 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/miscellaneous/pthread.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!4 = !{!5, !7} +!5 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 64) +!6 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!8 = !{!0, !9, !24, !36, !59} +!9 = !DIGlobalVariableExpression(var: !10, expr: !DIExpression()) +!10 = distinct !DIGlobalVariable(name: "cond_mutex", scope: !2, file: !11, line: 198, type: !12, isLocal: false, isDefinition: true) +!11 = !DIFile(filename: "benchmarks/miscellaneous/pthread.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!12 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_mutex_t", file: !13, line: 31, baseType: !14) +!13 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_mutex_t.h", directory: "") +!14 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_mutex_t", file: !15, line: 113, baseType: !16) +!15 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!16 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_mutex_t", file: !15, line: 78, size: 512, elements: !17) +!17 = !{!18, !20} +!18 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !16, file: !15, line: 79, baseType: !19, size: 64) +!19 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!20 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !16, file: !15, line: 80, baseType: !21, size: 448, offset: 64) +!21 = !DICompositeType(tag: DW_TAG_array_type, baseType: !6, size: 448, elements: !22) +!22 = !{!23} +!23 = !DISubrange(count: 56) +!24 = !DIGlobalVariableExpression(var: !25, expr: !DIExpression()) +!25 = distinct !DIGlobalVariable(name: "cond", scope: !2, file: !11, line: 199, type: !26, isLocal: false, isDefinition: true) +!26 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_cond_t", file: !27, line: 31, baseType: !28) +!27 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_cond_t.h", directory: "") +!28 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_cond_t", file: !15, line: 110, baseType: !29) +!29 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_cond_t", file: !15, line: 68, size: 384, elements: !30) +!30 = !{!31, !32} +!31 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !29, file: !15, line: 69, baseType: !19, size: 64) +!32 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !29, file: !15, line: 70, baseType: !33, size: 320, offset: 64) +!33 = !DICompositeType(tag: DW_TAG_array_type, baseType: !6, size: 320, elements: !34) +!34 = !{!35} +!35 = !DISubrange(count: 40) +!36 = !DIGlobalVariableExpression(var: !37, expr: !DIExpression()) +!37 = distinct !DIGlobalVariable(name: "latest_thread", scope: !2, file: !11, line: 366, type: !38, isLocal: false, isDefinition: true) +!38 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !39, line: 31, baseType: !40) +!39 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!40 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !15, line: 118, baseType: !41) +!41 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !42, size: 64) +!42 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !15, line: 103, size: 65536, elements: !43) +!43 = !{!44, !45, !55} +!44 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !42, file: !15, line: 104, baseType: !19, size: 64) +!45 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !42, file: !15, line: 105, baseType: !46, size: 64, offset: 64) +!46 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !47, size: 64) +!47 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !15, line: 57, size: 192, elements: !48) +!48 = !{!49, !53, !54} +!49 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !47, file: !15, line: 58, baseType: !50, size: 64) +!50 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !51, size: 64) +!51 = !DISubroutineType(types: !52) +!52 = !{null, !7} +!53 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !47, file: !15, line: 59, baseType: !7, size: 64, offset: 64) +!54 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !47, file: !15, line: 60, baseType: !46, size: 64, offset: 128) +!55 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !42, file: !15, line: 106, baseType: !56, size: 65408, offset: 128) +!56 = !DICompositeType(tag: DW_TAG_array_type, baseType: !6, size: 65408, elements: !57) !57 = !{!58} -!58 = !DISubrange(count: 15) +!58 = !DISubrange(count: 8176) !59 = !DIGlobalVariableExpression(var: !60, expr: !DIExpression()) -!60 = distinct !DIGlobalVariable(name: "phase", scope: !61, file: !2, line: 200, type: !143, isLocal: false, isDefinition: true) -!61 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "Homebrew clang version 15.0.7", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !62, globals: !65, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") -!62 = !{!63, !64} -!63 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !5, size: 64) -!64 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) -!65 = !{!0, !8, !13, !18, !21, !26, !28, !30, !35, !37, !42, !47, !50, !52, !54, !59, !66, !68, !70, !72, !74, !76, !78, !80, !85, !88, !102, !114, !137} -!66 = !DIGlobalVariableExpression(var: !67, expr: !DIExpression()) -!67 = distinct !DIGlobalVariable(scope: null, file: !2, line: 269, type: !20, isLocal: true, isDefinition: true) -!68 = !DIGlobalVariableExpression(var: !69, expr: !DIExpression()) -!69 = distinct !DIGlobalVariable(scope: null, file: !2, line: 285, type: !56, isLocal: true, isDefinition: true) -!70 = !DIGlobalVariableExpression(var: !71, expr: !DIExpression()) -!71 = distinct !DIGlobalVariable(scope: null, file: !2, line: 291, type: !3, isLocal: true, isDefinition: true) -!72 = !DIGlobalVariableExpression(var: !73, expr: !DIExpression()) -!73 = distinct !DIGlobalVariable(scope: null, file: !2, line: 304, type: !3, isLocal: true, isDefinition: true) -!74 = !DIGlobalVariableExpression(var: !75, expr: !DIExpression()) -!75 = distinct !DIGlobalVariable(scope: null, file: !2, line: 317, type: !3, isLocal: true, isDefinition: true) -!76 = !DIGlobalVariableExpression(var: !77, expr: !DIExpression()) -!77 = distinct !DIGlobalVariable(scope: null, file: !2, line: 329, type: !20, isLocal: true, isDefinition: true) -!78 = !DIGlobalVariableExpression(var: !79, expr: !DIExpression()) -!79 = distinct !DIGlobalVariable(scope: null, file: !2, line: 379, type: !23, isLocal: true, isDefinition: true) -!80 = !DIGlobalVariableExpression(var: !81, expr: !DIExpression()) -!81 = distinct !DIGlobalVariable(scope: null, file: !2, line: 382, type: !82, isLocal: true, isDefinition: true) -!82 = !DICompositeType(tag: DW_TAG_array_type, baseType: !5, size: 224, elements: !83) -!83 = !{!84} -!84 = !DISubrange(count: 28) -!85 = !DIGlobalVariableExpression(var: !86, expr: !DIExpression()) -!86 = distinct !DIGlobalVariable(scope: null, file: !2, line: 398, type: !87, isLocal: true, isDefinition: true) -!87 = !DICompositeType(tag: DW_TAG_array_type, baseType: !4, size: 72, elements: !40) -!88 = !DIGlobalVariableExpression(var: !89, expr: !DIExpression()) -!89 = distinct !DIGlobalVariable(name: "cond_mutex", scope: !61, file: !2, line: 198, type: !90, isLocal: false, isDefinition: true) -!90 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_mutex_t", file: !91, line: 31, baseType: !92) -!91 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_mutex_t.h", directory: "") -!92 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_mutex_t", file: !93, line: 113, baseType: !94) -!93 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") -!94 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_mutex_t", file: !93, line: 78, size: 512, elements: !95) -!95 = !{!96, !98} -!96 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !94, file: !93, line: 79, baseType: !97, size: 64) -!97 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) -!98 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !94, file: !93, line: 80, baseType: !99, size: 448, offset: 64) -!99 = !DICompositeType(tag: DW_TAG_array_type, baseType: !5, size: 448, elements: !100) -!100 = !{!101} -!101 = !DISubrange(count: 56) -!102 = !DIGlobalVariableExpression(var: !103, expr: !DIExpression()) -!103 = distinct !DIGlobalVariable(name: "cond", scope: !61, file: !2, line: 199, type: !104, isLocal: false, isDefinition: true) -!104 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_cond_t", file: !105, line: 31, baseType: !106) -!105 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_cond_t.h", directory: "") -!106 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_cond_t", file: !93, line: 110, baseType: !107) -!107 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_cond_t", file: !93, line: 68, size: 384, elements: !108) -!108 = !{!109, !110} -!109 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !107, file: !93, line: 69, baseType: !97, size: 64) -!110 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !107, file: !93, line: 70, baseType: !111, size: 320, offset: 64) -!111 = !DICompositeType(tag: DW_TAG_array_type, baseType: !5, size: 320, elements: !112) -!112 = !{!113} -!113 = !DISubrange(count: 40) -!114 = !DIGlobalVariableExpression(var: !115, expr: !DIExpression()) -!115 = distinct !DIGlobalVariable(name: "latest_thread", scope: !61, file: !2, line: 366, type: !116, isLocal: false, isDefinition: true) -!116 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !117, line: 31, baseType: !118) -!117 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") -!118 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !93, line: 118, baseType: !119) -!119 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !120, size: 64) -!120 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !93, line: 103, size: 65536, elements: !121) -!121 = !{!122, !123, !133} -!122 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !120, file: !93, line: 104, baseType: !97, size: 64) -!123 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !120, file: !93, line: 105, baseType: !124, size: 64, offset: 64) -!124 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !125, size: 64) -!125 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !93, line: 57, size: 192, elements: !126) -!126 = !{!127, !131, !132} -!127 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !125, file: !93, line: 58, baseType: !128, size: 64) -!128 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !129, size: 64) -!129 = !DISubroutineType(types: !130) -!130 = !{null, !64} -!131 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !125, file: !93, line: 59, baseType: !64, size: 64, offset: 64) -!132 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !125, file: !93, line: 60, baseType: !124, size: 64, offset: 128) -!133 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !120, file: !93, line: 106, baseType: !134, size: 65408, offset: 128) -!134 = !DICompositeType(tag: DW_TAG_array_type, baseType: !5, size: 65408, elements: !135) -!135 = !{!136} -!136 = !DISubrange(count: 8176) -!137 = !DIGlobalVariableExpression(var: !138, expr: !DIExpression()) -!138 = distinct !DIGlobalVariable(name: "local_data", scope: !61, file: !2, line: 367, type: !139, isLocal: false, isDefinition: true) -!139 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_key_t", file: !140, line: 31, baseType: !141) -!140 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_key_t.h", directory: "") -!141 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_key_t", file: !93, line: 112, baseType: !142) -!142 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) -!143 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -!144 = !{i32 7, !"Dwarf Version", i32 4} -!145 = !{i32 2, !"Debug Info Version", i32 3} -!146 = !{i32 1, !"wchar_size", i32 4} -!147 = !{i32 7, !"PIC Level", i32 2} -!148 = !{i32 7, !"uwtable", i32 2} -!149 = !{i32 7, !"frame-pointer", i32 1} -!150 = !{!"Homebrew clang version 15.0.7"} -!151 = distinct !DISubprogram(name: "thread_create", scope: !2, file: !2, line: 12, type: !152, scopeLine: 13, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!152 = !DISubroutineType(types: !153) -!153 = !{!116, !154, !64} -!154 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !155, size: 64) -!155 = !DISubroutineType(types: !156) -!156 = !{!64, !64} -!157 = !{} -!158 = !DILocalVariable(name: "runner", arg: 1, scope: !151, file: !2, line: 12, type: !154) -!159 = !DILocation(line: 12, column: 32, scope: !151) -!160 = !DILocalVariable(name: "data", arg: 2, scope: !151, file: !2, line: 12, type: !64) -!161 = !DILocation(line: 12, column: 54, scope: !151) -!162 = !DILocalVariable(name: "id", scope: !151, file: !2, line: 14, type: !116) -!163 = !DILocation(line: 14, column: 15, scope: !151) -!164 = !DILocalVariable(name: "attr", scope: !151, file: !2, line: 15, type: !165) -!165 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_attr_t", file: !166, line: 31, baseType: !167) -!166 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_attr_t.h", directory: "") -!167 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_attr_t", file: !93, line: 109, baseType: !168) -!168 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_attr_t", file: !93, line: 63, size: 512, elements: !169) -!169 = !{!170, !171} -!170 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !168, file: !93, line: 64, baseType: !97, size: 64) -!171 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !168, file: !93, line: 65, baseType: !99, size: 448, offset: 64) -!172 = !DILocation(line: 15, column: 20, scope: !151) -!173 = !DILocation(line: 16, column: 5, scope: !151) -!174 = !DILocalVariable(name: "status", scope: !151, file: !2, line: 17, type: !143) -!175 = !DILocation(line: 17, column: 9, scope: !151) -!176 = !DILocation(line: 17, column: 45, scope: !151) -!177 = !DILocation(line: 17, column: 53, scope: !151) -!178 = !DILocation(line: 17, column: 18, scope: !151) -!179 = !DILocation(line: 18, column: 5, scope: !151) -!180 = !DILocation(line: 19, column: 5, scope: !151) -!181 = !DILocation(line: 20, column: 12, scope: !151) -!182 = !DILocation(line: 20, column: 5, scope: !151) -!183 = distinct !DISubprogram(name: "thread_join", scope: !2, file: !2, line: 23, type: !184, scopeLine: 24, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!184 = !DISubroutineType(types: !185) -!185 = !{!64, !116} -!186 = !DILocalVariable(name: "id", arg: 1, scope: !183, file: !2, line: 23, type: !116) -!187 = !DILocation(line: 23, column: 29, scope: !183) -!188 = !DILocalVariable(name: "result", scope: !183, file: !2, line: 25, type: !64) -!189 = !DILocation(line: 25, column: 11, scope: !183) -!190 = !DILocalVariable(name: "status", scope: !183, file: !2, line: 26, type: !143) -!191 = !DILocation(line: 26, column: 9, scope: !183) -!192 = !DILocation(line: 26, column: 31, scope: !183) -!193 = !DILocation(line: 26, column: 18, scope: !183) -!194 = !DILocation(line: 27, column: 5, scope: !183) -!195 = !DILocation(line: 28, column: 12, scope: !183) -!196 = !DILocation(line: 28, column: 5, scope: !183) -!197 = distinct !DISubprogram(name: "mutex_init", scope: !2, file: !2, line: 43, type: !198, scopeLine: 44, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!198 = !DISubroutineType(types: !199) -!199 = !{null, !200, !143, !143, !143, !143} -!200 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !90, size: 64) -!201 = !DILocalVariable(name: "lock", arg: 1, scope: !197, file: !2, line: 43, type: !200) -!202 = !DILocation(line: 43, column: 34, scope: !197) -!203 = !DILocalVariable(name: "type", arg: 2, scope: !197, file: !2, line: 43, type: !143) -!204 = !DILocation(line: 43, column: 44, scope: !197) -!205 = !DILocalVariable(name: "protocol", arg: 3, scope: !197, file: !2, line: 43, type: !143) -!206 = !DILocation(line: 43, column: 54, scope: !197) -!207 = !DILocalVariable(name: "policy", arg: 4, scope: !197, file: !2, line: 43, type: !143) -!208 = !DILocation(line: 43, column: 68, scope: !197) -!209 = !DILocalVariable(name: "prioceiling", arg: 5, scope: !197, file: !2, line: 43, type: !143) -!210 = !DILocation(line: 43, column: 80, scope: !197) -!211 = !DILocalVariable(name: "status", scope: !197, file: !2, line: 45, type: !143) -!212 = !DILocation(line: 45, column: 9, scope: !197) -!213 = !DILocalVariable(name: "value", scope: !197, file: !2, line: 46, type: !143) -!214 = !DILocation(line: 46, column: 9, scope: !197) -!215 = !DILocalVariable(name: "attributes", scope: !197, file: !2, line: 47, type: !216) -!216 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_mutexattr_t", file: !217, line: 31, baseType: !218) -!217 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h", directory: "") -!218 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_mutexattr_t", file: !93, line: 114, baseType: !219) -!219 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_mutexattr_t", file: !93, line: 83, size: 128, elements: !220) -!220 = !{!221, !222} -!221 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !219, file: !93, line: 84, baseType: !97, size: 64) -!222 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !219, file: !93, line: 85, baseType: !44, size: 64, offset: 64) -!223 = !DILocation(line: 47, column: 25, scope: !197) -!224 = !DILocation(line: 48, column: 14, scope: !197) -!225 = !DILocation(line: 48, column: 12, scope: !197) -!226 = !DILocation(line: 49, column: 5, scope: !197) -!227 = !DILocation(line: 51, column: 53, scope: !197) -!228 = !DILocation(line: 51, column: 14, scope: !197) -!229 = !DILocation(line: 51, column: 12, scope: !197) -!230 = !DILocation(line: 52, column: 5, scope: !197) -!231 = !DILocation(line: 53, column: 14, scope: !197) -!232 = !DILocation(line: 53, column: 12, scope: !197) -!233 = !DILocation(line: 54, column: 5, scope: !197) -!234 = !DILocation(line: 56, column: 57, scope: !197) -!235 = !DILocation(line: 56, column: 14, scope: !197) -!236 = !DILocation(line: 56, column: 12, scope: !197) -!237 = !DILocation(line: 57, column: 5, scope: !197) -!238 = !DILocation(line: 58, column: 14, scope: !197) -!239 = !DILocation(line: 58, column: 12, scope: !197) -!240 = !DILocation(line: 59, column: 5, scope: !197) -!241 = !DILocation(line: 61, column: 58, scope: !197) -!242 = !DILocation(line: 61, column: 14, scope: !197) -!243 = !DILocation(line: 61, column: 12, scope: !197) -!244 = !DILocation(line: 62, column: 5, scope: !197) -!245 = !DILocation(line: 63, column: 14, scope: !197) -!246 = !DILocation(line: 63, column: 12, scope: !197) -!247 = !DILocation(line: 64, column: 5, scope: !197) -!248 = !DILocation(line: 66, column: 60, scope: !197) -!249 = !DILocation(line: 66, column: 14, scope: !197) -!250 = !DILocation(line: 66, column: 12, scope: !197) -!251 = !DILocation(line: 67, column: 5, scope: !197) -!252 = !DILocation(line: 68, column: 14, scope: !197) -!253 = !DILocation(line: 68, column: 12, scope: !197) -!254 = !DILocation(line: 69, column: 5, scope: !197) -!255 = !DILocation(line: 71, column: 33, scope: !197) -!256 = !DILocation(line: 71, column: 14, scope: !197) -!257 = !DILocation(line: 71, column: 12, scope: !197) -!258 = !DILocation(line: 72, column: 5, scope: !197) -!259 = !DILocation(line: 73, column: 14, scope: !197) -!260 = !DILocation(line: 73, column: 12, scope: !197) -!261 = !DILocation(line: 74, column: 5, scope: !197) -!262 = !DILocation(line: 75, column: 1, scope: !197) -!263 = distinct !DISubprogram(name: "mutex_destroy", scope: !2, file: !2, line: 77, type: !264, scopeLine: 78, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!264 = !DISubroutineType(types: !265) -!265 = !{null, !200} -!266 = !DILocalVariable(name: "lock", arg: 1, scope: !263, file: !2, line: 77, type: !200) -!267 = !DILocation(line: 77, column: 37, scope: !263) -!268 = !DILocalVariable(name: "status", scope: !263, file: !2, line: 79, type: !143) -!269 = !DILocation(line: 79, column: 9, scope: !263) -!270 = !DILocation(line: 79, column: 40, scope: !263) -!271 = !DILocation(line: 79, column: 18, scope: !263) -!272 = !DILocation(line: 80, column: 5, scope: !263) -!273 = !DILocation(line: 81, column: 1, scope: !263) -!274 = distinct !DISubprogram(name: "mutex_lock", scope: !2, file: !2, line: 83, type: !264, scopeLine: 84, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!275 = !DILocalVariable(name: "lock", arg: 1, scope: !274, file: !2, line: 83, type: !200) -!276 = !DILocation(line: 83, column: 34, scope: !274) -!277 = !DILocalVariable(name: "status", scope: !274, file: !2, line: 85, type: !143) -!278 = !DILocation(line: 85, column: 9, scope: !274) -!279 = !DILocation(line: 85, column: 37, scope: !274) -!280 = !DILocation(line: 85, column: 18, scope: !274) -!281 = !DILocation(line: 86, column: 5, scope: !274) -!282 = !DILocation(line: 87, column: 1, scope: !274) -!283 = distinct !DISubprogram(name: "mutex_trylock", scope: !2, file: !2, line: 89, type: !284, scopeLine: 90, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!284 = !DISubroutineType(types: !285) -!285 = !{!286, !200} -!286 = !DIBasicType(name: "_Bool", size: 8, encoding: DW_ATE_boolean) -!287 = !DILocalVariable(name: "lock", arg: 1, scope: !283, file: !2, line: 89, type: !200) -!288 = !DILocation(line: 89, column: 37, scope: !283) -!289 = !DILocalVariable(name: "status", scope: !283, file: !2, line: 91, type: !143) -!290 = !DILocation(line: 91, column: 9, scope: !283) -!291 = !DILocation(line: 91, column: 40, scope: !283) -!292 = !DILocation(line: 91, column: 18, scope: !283) -!293 = !DILocation(line: 93, column: 12, scope: !283) -!294 = !DILocation(line: 93, column: 19, scope: !283) -!295 = !DILocation(line: 93, column: 5, scope: !283) -!296 = distinct !DISubprogram(name: "mutex_unlock", scope: !2, file: !2, line: 96, type: !264, scopeLine: 97, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!297 = !DILocalVariable(name: "lock", arg: 1, scope: !296, file: !2, line: 96, type: !200) -!298 = !DILocation(line: 96, column: 36, scope: !296) -!299 = !DILocalVariable(name: "status", scope: !296, file: !2, line: 98, type: !143) -!300 = !DILocation(line: 98, column: 9, scope: !296) -!301 = !DILocation(line: 98, column: 39, scope: !296) -!302 = !DILocation(line: 98, column: 18, scope: !296) -!303 = !DILocation(line: 99, column: 5, scope: !296) -!304 = !DILocation(line: 100, column: 1, scope: !296) -!305 = distinct !DISubprogram(name: "mutex_test", scope: !2, file: !2, line: 102, type: !306, scopeLine: 103, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!306 = !DISubroutineType(types: !307) -!307 = !{null} -!308 = !DILocalVariable(name: "mutex0", scope: !305, file: !2, line: 104, type: !90) -!309 = !DILocation(line: 104, column: 21, scope: !305) -!310 = !DILocalVariable(name: "mutex1", scope: !305, file: !2, line: 105, type: !90) -!311 = !DILocation(line: 105, column: 21, scope: !305) -!312 = !DILocation(line: 107, column: 5, scope: !305) -!313 = !DILocation(line: 108, column: 5, scope: !305) -!314 = !DILocation(line: 111, column: 9, scope: !315) -!315 = distinct !DILexicalBlock(scope: !305, file: !2, line: 110, column: 5) -!316 = !DILocalVariable(name: "success", scope: !315, file: !2, line: 112, type: !286) -!317 = !DILocation(line: 112, column: 14, scope: !315) -!318 = !DILocation(line: 112, column: 24, scope: !315) -!319 = !DILocation(line: 113, column: 9, scope: !315) -!320 = !DILocation(line: 114, column: 9, scope: !315) -!321 = !DILocation(line: 118, column: 9, scope: !322) -!322 = distinct !DILexicalBlock(scope: !305, file: !2, line: 117, column: 5) -!323 = !DILocalVariable(name: "success", scope: !324, file: !2, line: 121, type: !286) -!324 = distinct !DILexicalBlock(scope: !322, file: !2, line: 120, column: 9) -!325 = !DILocation(line: 121, column: 18, scope: !324) -!326 = !DILocation(line: 121, column: 28, scope: !324) -!327 = !DILocation(line: 122, column: 13, scope: !324) -!328 = !DILocation(line: 123, column: 13, scope: !324) -!329 = !DILocalVariable(name: "success", scope: !330, file: !2, line: 127, type: !286) -!330 = distinct !DILexicalBlock(scope: !322, file: !2, line: 126, column: 9) -!331 = !DILocation(line: 127, column: 18, scope: !330) -!332 = !DILocation(line: 127, column: 28, scope: !330) -!333 = !DILocation(line: 128, column: 13, scope: !330) -!334 = !DILocation(line: 129, column: 13, scope: !330) -!335 = !DILocation(line: 139, column: 9, scope: !322) -!336 = !DILocation(line: 142, column: 5, scope: !305) -!337 = !DILocation(line: 143, column: 5, scope: !305) -!338 = !DILocation(line: 144, column: 1, scope: !305) -!339 = distinct !DISubprogram(name: "cond_init", scope: !2, file: !2, line: 148, type: !340, scopeLine: 149, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!340 = !DISubroutineType(types: !341) -!341 = !{null, !342} -!342 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !104, size: 64) -!343 = !DILocalVariable(name: "cond", arg: 1, scope: !339, file: !2, line: 148, type: !342) -!344 = !DILocation(line: 148, column: 32, scope: !339) -!345 = !DILocalVariable(name: "status", scope: !339, file: !2, line: 150, type: !143) -!346 = !DILocation(line: 150, column: 9, scope: !339) -!347 = !DILocalVariable(name: "attr", scope: !339, file: !2, line: 151, type: !348) -!348 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_condattr_t", file: !349, line: 31, baseType: !350) -!349 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_condattr_t.h", directory: "") -!350 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_condattr_t", file: !93, line: 111, baseType: !351) -!351 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_condattr_t", file: !93, line: 73, size: 128, elements: !352) -!352 = !{!353, !354} -!353 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !351, file: !93, line: 74, baseType: !97, size: 64) -!354 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !351, file: !93, line: 75, baseType: !44, size: 64, offset: 64) -!355 = !DILocation(line: 151, column: 24, scope: !339) -!356 = !DILocation(line: 153, column: 14, scope: !339) -!357 = !DILocation(line: 153, column: 12, scope: !339) -!358 = !DILocation(line: 154, column: 5, scope: !339) -!359 = !DILocation(line: 156, column: 32, scope: !339) -!360 = !DILocation(line: 156, column: 14, scope: !339) -!361 = !DILocation(line: 156, column: 12, scope: !339) -!362 = !DILocation(line: 157, column: 5, scope: !339) -!363 = !DILocation(line: 159, column: 14, scope: !339) -!364 = !DILocation(line: 159, column: 12, scope: !339) -!365 = !DILocation(line: 160, column: 5, scope: !339) -!366 = !DILocation(line: 161, column: 1, scope: !339) -!367 = distinct !DISubprogram(name: "cond_destroy", scope: !2, file: !2, line: 163, type: !340, scopeLine: 164, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!368 = !DILocalVariable(name: "cond", arg: 1, scope: !367, file: !2, line: 163, type: !342) -!369 = !DILocation(line: 163, column: 35, scope: !367) -!370 = !DILocalVariable(name: "status", scope: !367, file: !2, line: 165, type: !143) -!371 = !DILocation(line: 165, column: 9, scope: !367) -!372 = !DILocation(line: 165, column: 39, scope: !367) -!373 = !DILocation(line: 165, column: 18, scope: !367) -!374 = !DILocation(line: 166, column: 5, scope: !367) -!375 = !DILocation(line: 167, column: 1, scope: !367) -!376 = distinct !DISubprogram(name: "cond_signal", scope: !2, file: !2, line: 169, type: !340, scopeLine: 170, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!377 = !DILocalVariable(name: "cond", arg: 1, scope: !376, file: !2, line: 169, type: !342) -!378 = !DILocation(line: 169, column: 34, scope: !376) -!379 = !DILocalVariable(name: "status", scope: !376, file: !2, line: 171, type: !143) -!380 = !DILocation(line: 171, column: 9, scope: !376) -!381 = !DILocation(line: 171, column: 38, scope: !376) -!382 = !DILocation(line: 171, column: 18, scope: !376) -!383 = !DILocation(line: 172, column: 5, scope: !376) -!384 = !DILocation(line: 173, column: 1, scope: !376) -!385 = distinct !DISubprogram(name: "cond_broadcast", scope: !2, file: !2, line: 175, type: !340, scopeLine: 176, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!386 = !DILocalVariable(name: "cond", arg: 1, scope: !385, file: !2, line: 175, type: !342) -!387 = !DILocation(line: 175, column: 37, scope: !385) -!388 = !DILocalVariable(name: "status", scope: !385, file: !2, line: 177, type: !143) -!389 = !DILocation(line: 177, column: 9, scope: !385) -!390 = !DILocation(line: 177, column: 41, scope: !385) -!391 = !DILocation(line: 177, column: 18, scope: !385) -!392 = !DILocation(line: 178, column: 5, scope: !385) -!393 = !DILocation(line: 179, column: 1, scope: !385) -!394 = distinct !DISubprogram(name: "cond_wait", scope: !2, file: !2, line: 181, type: !395, scopeLine: 182, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!395 = !DISubroutineType(types: !396) -!396 = !{null, !342, !200} -!397 = !DILocalVariable(name: "cond", arg: 1, scope: !394, file: !2, line: 181, type: !342) -!398 = !DILocation(line: 181, column: 32, scope: !394) -!399 = !DILocalVariable(name: "lock", arg: 2, scope: !394, file: !2, line: 181, type: !200) -!400 = !DILocation(line: 181, column: 55, scope: !394) -!401 = !DILocalVariable(name: "status", scope: !394, file: !2, line: 183, type: !143) -!402 = !DILocation(line: 183, column: 9, scope: !394) -!403 = !DILocation(line: 183, column: 36, scope: !394) -!404 = !DILocation(line: 183, column: 42, scope: !394) -!405 = !DILocation(line: 183, column: 18, scope: !394) -!406 = !DILocation(line: 185, column: 1, scope: !394) -!407 = distinct !DISubprogram(name: "cond_timedwait", scope: !2, file: !2, line: 187, type: !408, scopeLine: 188, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!408 = !DISubroutineType(types: !409) -!409 = !{null, !342, !200, !410} -!410 = !DIBasicType(name: "long long", size: 64, encoding: DW_ATE_signed) -!411 = !DILocalVariable(name: "cond", arg: 1, scope: !407, file: !2, line: 187, type: !342) -!412 = !DILocation(line: 187, column: 37, scope: !407) -!413 = !DILocalVariable(name: "lock", arg: 2, scope: !407, file: !2, line: 187, type: !200) -!414 = !DILocation(line: 187, column: 60, scope: !407) -!415 = !DILocalVariable(name: "millis", arg: 3, scope: !407, file: !2, line: 187, type: !410) -!416 = !DILocation(line: 187, column: 76, scope: !407) -!417 = !DILocalVariable(name: "ts", scope: !407, file: !2, line: 190, type: !418) -!418 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "timespec", file: !419, line: 33, size: 128, elements: !420) -!419 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_types/_timespec.h", directory: "") -!420 = !{!421, !424} -!421 = !DIDerivedType(tag: DW_TAG_member, name: "tv_sec", scope: !418, file: !419, line: 35, baseType: !422, size: 64) -!422 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_time_t", file: !423, line: 98, baseType: !97) -!423 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/arm/_types.h", directory: "") -!424 = !DIDerivedType(tag: DW_TAG_member, name: "tv_nsec", scope: !418, file: !419, line: 36, baseType: !97, size: 64, offset: 64) -!425 = !DILocation(line: 190, column: 21, scope: !407) -!426 = !DILocation(line: 194, column: 11, scope: !407) -!427 = !DILocalVariable(name: "status", scope: !407, file: !2, line: 195, type: !143) -!428 = !DILocation(line: 195, column: 9, scope: !407) -!429 = !DILocation(line: 195, column: 41, scope: !407) -!430 = !DILocation(line: 195, column: 47, scope: !407) -!431 = !DILocation(line: 195, column: 18, scope: !407) -!432 = !DILocation(line: 196, column: 1, scope: !407) -!433 = distinct !DISubprogram(name: "cond_worker", scope: !2, file: !2, line: 202, type: !155, scopeLine: 203, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!434 = !DILocalVariable(name: "message", arg: 1, scope: !433, file: !2, line: 202, type: !64) -!435 = !DILocation(line: 202, column: 25, scope: !433) -!436 = !DILocalVariable(name: "idle", scope: !433, file: !2, line: 204, type: !286) -!437 = !DILocation(line: 204, column: 10, scope: !433) -!438 = !DILocation(line: 206, column: 9, scope: !439) -!439 = distinct !DILexicalBlock(scope: !433, file: !2, line: 205, column: 5) -!440 = !DILocation(line: 207, column: 9, scope: !439) -!441 = !DILocation(line: 208, column: 9, scope: !439) -!442 = !DILocation(line: 209, column: 9, scope: !439) -!443 = !DILocation(line: 210, column: 16, scope: !439) -!444 = !DILocation(line: 210, column: 22, scope: !439) -!445 = !DILocation(line: 210, column: 14, scope: !439) -!446 = !DILocation(line: 211, column: 9, scope: !439) -!447 = !DILocation(line: 213, column: 9, scope: !448) -!448 = distinct !DILexicalBlock(scope: !433, file: !2, line: 213, column: 9) -!449 = !DILocation(line: 213, column: 9, scope: !433) -!450 = !DILocation(line: 214, column: 25, scope: !448) -!451 = !DILocation(line: 214, column: 34, scope: !448) -!452 = !DILocation(line: 214, column: 9, scope: !448) -!453 = !DILocation(line: 215, column: 10, scope: !433) -!454 = !DILocation(line: 217, column: 9, scope: !455) -!455 = distinct !DILexicalBlock(scope: !433, file: !2, line: 216, column: 5) -!456 = !DILocation(line: 218, column: 9, scope: !455) -!457 = !DILocation(line: 219, column: 9, scope: !455) -!458 = !DILocation(line: 220, column: 9, scope: !455) -!459 = !DILocation(line: 221, column: 16, scope: !455) -!460 = !DILocation(line: 221, column: 22, scope: !455) -!461 = !DILocation(line: 221, column: 14, scope: !455) -!462 = !DILocation(line: 222, column: 9, scope: !455) -!463 = !DILocation(line: 224, column: 9, scope: !464) -!464 = distinct !DILexicalBlock(scope: !433, file: !2, line: 224, column: 9) -!465 = !DILocation(line: 224, column: 9, scope: !433) -!466 = !DILocation(line: 225, column: 25, scope: !464) -!467 = !DILocation(line: 225, column: 34, scope: !464) -!468 = !DILocation(line: 225, column: 9, scope: !464) -!469 = !DILocation(line: 226, column: 12, scope: !433) -!470 = !DILocation(line: 226, column: 5, scope: !433) -!471 = !DILocation(line: 227, column: 1, scope: !433) -!472 = distinct !DISubprogram(name: "cond_test", scope: !2, file: !2, line: 229, type: !306, scopeLine: 230, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!473 = !DILocalVariable(name: "message", scope: !472, file: !2, line: 231, type: !64) -!474 = !DILocation(line: 231, column: 11, scope: !472) -!475 = !DILocation(line: 232, column: 5, scope: !472) -!476 = !DILocation(line: 233, column: 5, scope: !472) -!477 = !DILocalVariable(name: "worker", scope: !472, file: !2, line: 235, type: !116) -!478 = !DILocation(line: 235, column: 15, scope: !472) -!479 = !DILocation(line: 235, column: 51, scope: !472) -!480 = !DILocation(line: 235, column: 24, scope: !472) -!481 = !DILocation(line: 238, column: 9, scope: !482) -!482 = distinct !DILexicalBlock(scope: !472, file: !2, line: 237, column: 5) -!483 = !DILocation(line: 239, column: 9, scope: !482) -!484 = !DILocation(line: 240, column: 9, scope: !482) -!485 = !DILocation(line: 241, column: 9, scope: !482) -!486 = !DILocation(line: 245, column: 9, scope: !487) -!487 = distinct !DILexicalBlock(scope: !472, file: !2, line: 244, column: 5) -!488 = !DILocation(line: 246, column: 9, scope: !487) -!489 = !DILocation(line: 247, column: 9, scope: !487) -!490 = !DILocation(line: 248, column: 9, scope: !487) -!491 = !DILocalVariable(name: "result", scope: !472, file: !2, line: 251, type: !64) -!492 = !DILocation(line: 251, column: 11, scope: !472) -!493 = !DILocation(line: 251, column: 32, scope: !472) -!494 = !DILocation(line: 251, column: 20, scope: !472) -!495 = !DILocation(line: 254, column: 5, scope: !472) -!496 = !DILocation(line: 255, column: 5, scope: !472) -!497 = !DILocation(line: 256, column: 1, scope: !472) -!498 = distinct !DISubprogram(name: "rwlock_init", scope: !2, file: !2, line: 263, type: !499, scopeLine: 264, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!499 = !DISubroutineType(types: !500) -!500 = !{null, !501, !143} -!501 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !502, size: 64) -!502 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_rwlock_t", file: !503, line: 31, baseType: !504) -!503 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h", directory: "") -!504 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_rwlock_t", file: !93, line: 116, baseType: !505) -!505 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_rwlock_t", file: !93, line: 93, size: 1600, elements: !506) -!506 = !{!507, !508} -!507 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !505, file: !93, line: 94, baseType: !97, size: 64) -!508 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !505, file: !93, line: 95, baseType: !509, size: 1536, offset: 64) -!509 = !DICompositeType(tag: DW_TAG_array_type, baseType: !5, size: 1536, elements: !510) -!510 = !{!511} -!511 = !DISubrange(count: 192) -!512 = !DILocalVariable(name: "lock", arg: 1, scope: !498, file: !2, line: 263, type: !501) -!513 = !DILocation(line: 263, column: 36, scope: !498) -!514 = !DILocalVariable(name: "shared", arg: 2, scope: !498, file: !2, line: 263, type: !143) -!515 = !DILocation(line: 263, column: 46, scope: !498) -!516 = !DILocalVariable(name: "status", scope: !498, file: !2, line: 265, type: !143) -!517 = !DILocation(line: 265, column: 9, scope: !498) -!518 = !DILocalVariable(name: "value", scope: !498, file: !2, line: 266, type: !143) -!519 = !DILocation(line: 266, column: 9, scope: !498) -!520 = !DILocalVariable(name: "attributes", scope: !498, file: !2, line: 267, type: !521) -!521 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_rwlockattr_t", file: !522, line: 31, baseType: !523) -!522 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_rwlockattr_t.h", directory: "") -!523 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_rwlockattr_t", file: !93, line: 117, baseType: !524) -!524 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_rwlockattr_t", file: !93, line: 98, size: 192, elements: !525) -!525 = !{!526, !527} -!526 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !524, file: !93, line: 99, baseType: !97, size: 64) -!527 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !524, file: !93, line: 100, baseType: !528, size: 128, offset: 64) -!528 = !DICompositeType(tag: DW_TAG_array_type, baseType: !5, size: 128, elements: !529) -!529 = !{!530} -!530 = !DISubrange(count: 16) -!531 = !DILocation(line: 267, column: 26, scope: !498) -!532 = !DILocation(line: 268, column: 14, scope: !498) -!533 = !DILocation(line: 268, column: 12, scope: !498) -!534 = !DILocation(line: 269, column: 5, scope: !498) -!535 = !DILocation(line: 271, column: 57, scope: !498) -!536 = !DILocation(line: 271, column: 14, scope: !498) -!537 = !DILocation(line: 271, column: 12, scope: !498) -!538 = !DILocation(line: 272, column: 5, scope: !498) -!539 = !DILocation(line: 273, column: 14, scope: !498) -!540 = !DILocation(line: 273, column: 12, scope: !498) -!541 = !DILocation(line: 274, column: 5, scope: !498) -!542 = !DILocation(line: 276, column: 34, scope: !498) -!543 = !DILocation(line: 276, column: 14, scope: !498) -!544 = !DILocation(line: 276, column: 12, scope: !498) -!545 = !DILocation(line: 277, column: 5, scope: !498) -!546 = !DILocation(line: 278, column: 14, scope: !498) -!547 = !DILocation(line: 278, column: 12, scope: !498) -!548 = !DILocation(line: 279, column: 5, scope: !498) -!549 = !DILocation(line: 280, column: 1, scope: !498) -!550 = distinct !DISubprogram(name: "rwlock_destroy", scope: !2, file: !2, line: 282, type: !551, scopeLine: 283, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!551 = !DISubroutineType(types: !552) -!552 = !{null, !501} -!553 = !DILocalVariable(name: "lock", arg: 1, scope: !550, file: !2, line: 282, type: !501) -!554 = !DILocation(line: 282, column: 39, scope: !550) -!555 = !DILocalVariable(name: "status", scope: !550, file: !2, line: 284, type: !143) -!556 = !DILocation(line: 284, column: 9, scope: !550) -!557 = !DILocation(line: 284, column: 41, scope: !550) -!558 = !DILocation(line: 284, column: 18, scope: !550) -!559 = !DILocation(line: 285, column: 5, scope: !550) -!560 = !DILocation(line: 286, column: 1, scope: !550) -!561 = distinct !DISubprogram(name: "rwlock_wrlock", scope: !2, file: !2, line: 288, type: !551, scopeLine: 289, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!562 = !DILocalVariable(name: "lock", arg: 1, scope: !561, file: !2, line: 288, type: !501) -!563 = !DILocation(line: 288, column: 38, scope: !561) -!564 = !DILocalVariable(name: "status", scope: !561, file: !2, line: 290, type: !143) -!565 = !DILocation(line: 290, column: 9, scope: !561) -!566 = !DILocation(line: 290, column: 40, scope: !561) -!567 = !DILocation(line: 290, column: 18, scope: !561) -!568 = !DILocation(line: 291, column: 5, scope: !561) -!569 = !DILocation(line: 292, column: 1, scope: !561) -!570 = distinct !DISubprogram(name: "rwlock_trywrlock", scope: !2, file: !2, line: 294, type: !571, scopeLine: 295, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!571 = !DISubroutineType(types: !572) -!572 = !{!286, !501} -!573 = !DILocalVariable(name: "lock", arg: 1, scope: !570, file: !2, line: 294, type: !501) -!574 = !DILocation(line: 294, column: 41, scope: !570) -!575 = !DILocalVariable(name: "status", scope: !570, file: !2, line: 296, type: !143) -!576 = !DILocation(line: 296, column: 9, scope: !570) -!577 = !DILocation(line: 296, column: 43, scope: !570) -!578 = !DILocation(line: 296, column: 18, scope: !570) -!579 = !DILocation(line: 298, column: 12, scope: !570) -!580 = !DILocation(line: 298, column: 19, scope: !570) -!581 = !DILocation(line: 298, column: 5, scope: !570) -!582 = distinct !DISubprogram(name: "rwlock_rdlock", scope: !2, file: !2, line: 301, type: !551, scopeLine: 302, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!583 = !DILocalVariable(name: "lock", arg: 1, scope: !582, file: !2, line: 301, type: !501) -!584 = !DILocation(line: 301, column: 38, scope: !582) -!585 = !DILocalVariable(name: "status", scope: !582, file: !2, line: 303, type: !143) -!586 = !DILocation(line: 303, column: 9, scope: !582) -!587 = !DILocation(line: 303, column: 40, scope: !582) -!588 = !DILocation(line: 303, column: 18, scope: !582) -!589 = !DILocation(line: 304, column: 5, scope: !582) -!590 = !DILocation(line: 305, column: 1, scope: !582) -!591 = distinct !DISubprogram(name: "rwlock_tryrdlock", scope: !2, file: !2, line: 307, type: !571, scopeLine: 308, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!592 = !DILocalVariable(name: "lock", arg: 1, scope: !591, file: !2, line: 307, type: !501) -!593 = !DILocation(line: 307, column: 41, scope: !591) -!594 = !DILocalVariable(name: "status", scope: !591, file: !2, line: 309, type: !143) -!595 = !DILocation(line: 309, column: 9, scope: !591) -!596 = !DILocation(line: 309, column: 43, scope: !591) -!597 = !DILocation(line: 309, column: 18, scope: !591) -!598 = !DILocation(line: 311, column: 12, scope: !591) -!599 = !DILocation(line: 311, column: 19, scope: !591) -!600 = !DILocation(line: 311, column: 5, scope: !591) -!601 = distinct !DISubprogram(name: "rwlock_unlock", scope: !2, file: !2, line: 314, type: !551, scopeLine: 315, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!602 = !DILocalVariable(name: "lock", arg: 1, scope: !601, file: !2, line: 314, type: !501) -!603 = !DILocation(line: 314, column: 38, scope: !601) -!604 = !DILocalVariable(name: "status", scope: !601, file: !2, line: 316, type: !143) -!605 = !DILocation(line: 316, column: 9, scope: !601) -!606 = !DILocation(line: 316, column: 40, scope: !601) -!607 = !DILocation(line: 316, column: 18, scope: !601) -!608 = !DILocation(line: 317, column: 5, scope: !601) -!609 = !DILocation(line: 318, column: 1, scope: !601) -!610 = distinct !DISubprogram(name: "rwlock_test", scope: !2, file: !2, line: 320, type: !306, scopeLine: 321, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!611 = !DILocalVariable(name: "lock", scope: !610, file: !2, line: 322, type: !502) -!612 = !DILocation(line: 322, column: 22, scope: !610) -!613 = !DILocation(line: 323, column: 5, scope: !610) -!614 = !DILocalVariable(name: "test_depth", scope: !610, file: !2, line: 324, type: !615) -!615 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !143) -!616 = !DILocation(line: 324, column: 15, scope: !610) -!617 = !DILocation(line: 327, column: 9, scope: !618) -!618 = distinct !DILexicalBlock(scope: !610, file: !2, line: 326, column: 5) -!619 = !DILocalVariable(name: "success", scope: !618, file: !2, line: 328, type: !286) -!620 = !DILocation(line: 328, column: 14, scope: !618) -!621 = !DILocation(line: 328, column: 24, scope: !618) -!622 = !DILocation(line: 329, column: 9, scope: !618) -!623 = !DILocation(line: 330, column: 19, scope: !618) -!624 = !DILocation(line: 330, column: 17, scope: !618) -!625 = !DILocation(line: 331, column: 9, scope: !618) -!626 = !DILocation(line: 332, column: 9, scope: !618) -!627 = !DILocation(line: 336, column: 9, scope: !628) -!628 = distinct !DILexicalBlock(scope: !610, file: !2, line: 335, column: 5) -!629 = !DILocalVariable(name: "i", scope: !630, file: !2, line: 337, type: !143) -!630 = distinct !DILexicalBlock(scope: !628, file: !2, line: 337, column: 9) -!631 = !DILocation(line: 337, column: 18, scope: !630) -!632 = !DILocation(line: 337, column: 14, scope: !630) -!633 = !DILocation(line: 337, column: 25, scope: !634) -!634 = distinct !DILexicalBlock(scope: !630, file: !2, line: 337, column: 9) -!635 = !DILocation(line: 337, column: 27, scope: !634) -!636 = !DILocation(line: 337, column: 9, scope: !630) -!637 = !DILocalVariable(name: "success", scope: !638, file: !2, line: 339, type: !286) -!638 = distinct !DILexicalBlock(scope: !634, file: !2, line: 338, column: 9) -!639 = !DILocation(line: 339, column: 18, scope: !638) -!640 = !DILocation(line: 339, column: 28, scope: !638) -!641 = !DILocation(line: 340, column: 13, scope: !638) -!642 = !DILocation(line: 341, column: 9, scope: !638) -!643 = !DILocation(line: 337, column: 42, scope: !634) -!644 = !DILocation(line: 337, column: 9, scope: !634) -!645 = distinct !{!645, !636, !646, !647} -!646 = !DILocation(line: 341, column: 9, scope: !630) -!647 = !{!"llvm.loop.mustprogress"} -!648 = !DILocalVariable(name: "success", scope: !649, file: !2, line: 344, type: !286) -!649 = distinct !DILexicalBlock(scope: !628, file: !2, line: 343, column: 9) -!650 = !DILocation(line: 344, column: 18, scope: !649) -!651 = !DILocation(line: 344, column: 28, scope: !649) -!652 = !DILocation(line: 345, column: 13, scope: !649) -!653 = !DILocation(line: 348, column: 9, scope: !628) -!654 = !DILocalVariable(name: "i", scope: !655, file: !2, line: 349, type: !143) -!655 = distinct !DILexicalBlock(scope: !628, file: !2, line: 349, column: 9) -!656 = !DILocation(line: 349, column: 18, scope: !655) -!657 = !DILocation(line: 349, column: 14, scope: !655) -!658 = !DILocation(line: 349, column: 25, scope: !659) -!659 = distinct !DILexicalBlock(scope: !655, file: !2, line: 349, column: 9) -!660 = !DILocation(line: 349, column: 27, scope: !659) -!661 = !DILocation(line: 349, column: 9, scope: !655) -!662 = !DILocation(line: 350, column: 13, scope: !663) -!663 = distinct !DILexicalBlock(scope: !659, file: !2, line: 349, column: 46) -!664 = !DILocation(line: 351, column: 9, scope: !663) -!665 = !DILocation(line: 349, column: 42, scope: !659) -!666 = !DILocation(line: 349, column: 9, scope: !659) -!667 = distinct !{!667, !661, !668, !647} -!668 = !DILocation(line: 351, column: 9, scope: !655) -!669 = !DILocation(line: 355, column: 9, scope: !670) -!670 = distinct !DILexicalBlock(scope: !610, file: !2, line: 354, column: 5) -!671 = !DILocalVariable(name: "success", scope: !670, file: !2, line: 356, type: !286) -!672 = !DILocation(line: 356, column: 14, scope: !670) -!673 = !DILocation(line: 356, column: 24, scope: !670) -!674 = !DILocation(line: 357, column: 9, scope: !670) -!675 = !DILocation(line: 358, column: 9, scope: !670) -!676 = !DILocation(line: 361, column: 5, scope: !610) -!677 = !DILocation(line: 362, column: 1, scope: !610) -!678 = distinct !DISubprogram(name: "key_destroy", scope: !2, file: !2, line: 369, type: !129, scopeLine: 370, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!679 = !DILocalVariable(name: "unused_value", arg: 1, scope: !678, file: !2, line: 369, type: !64) -!680 = !DILocation(line: 369, column: 24, scope: !678) -!681 = !DILocation(line: 371, column: 21, scope: !678) -!682 = !DILocation(line: 371, column: 19, scope: !678) -!683 = !DILocation(line: 372, column: 1, scope: !678) -!684 = distinct !DISubprogram(name: "key_worker", scope: !2, file: !2, line: 374, type: !155, scopeLine: 375, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!685 = !DILocalVariable(name: "message", arg: 1, scope: !684, file: !2, line: 374, type: !64) -!686 = !DILocation(line: 374, column: 24, scope: !684) -!687 = !DILocalVariable(name: "my_secret", scope: !684, file: !2, line: 376, type: !143) -!688 = !DILocation(line: 376, column: 9, scope: !684) -!689 = !DILocalVariable(name: "status", scope: !684, file: !2, line: 378, type: !143) -!690 = !DILocation(line: 378, column: 9, scope: !684) -!691 = !DILocation(line: 378, column: 38, scope: !684) -!692 = !DILocation(line: 378, column: 18, scope: !684) -!693 = !DILocation(line: 379, column: 5, scope: !684) -!694 = !DILocalVariable(name: "my_local_data", scope: !684, file: !2, line: 381, type: !64) -!695 = !DILocation(line: 381, column: 11, scope: !684) -!696 = !DILocation(line: 381, column: 47, scope: !684) -!697 = !DILocation(line: 381, column: 27, scope: !684) -!698 = !DILocation(line: 382, column: 5, scope: !684) -!699 = !DILocation(line: 384, column: 12, scope: !684) -!700 = !DILocation(line: 384, column: 5, scope: !684) -!701 = distinct !DISubprogram(name: "key_test", scope: !2, file: !2, line: 387, type: !306, scopeLine: 388, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!702 = !DILocalVariable(name: "my_secret", scope: !701, file: !2, line: 389, type: !143) -!703 = !DILocation(line: 389, column: 9, scope: !701) -!704 = !DILocalVariable(name: "message", scope: !701, file: !2, line: 390, type: !64) -!705 = !DILocation(line: 390, column: 11, scope: !701) -!706 = !DILocalVariable(name: "status", scope: !701, file: !2, line: 391, type: !143) -!707 = !DILocation(line: 391, column: 9, scope: !701) -!708 = !DILocation(line: 393, column: 5, scope: !701) -!709 = !DILocalVariable(name: "worker", scope: !701, file: !2, line: 395, type: !116) -!710 = !DILocation(line: 395, column: 15, scope: !701) -!711 = !DILocation(line: 395, column: 50, scope: !701) -!712 = !DILocation(line: 395, column: 24, scope: !701) -!713 = !DILocation(line: 397, column: 34, scope: !701) -!714 = !DILocation(line: 397, column: 14, scope: !701) -!715 = !DILocation(line: 397, column: 12, scope: !701) -!716 = !DILocation(line: 398, column: 5, scope: !701) -!717 = !DILocalVariable(name: "my_local_data", scope: !701, file: !2, line: 400, type: !64) -!718 = !DILocation(line: 400, column: 11, scope: !701) -!719 = !DILocation(line: 400, column: 47, scope: !701) -!720 = !DILocation(line: 400, column: 27, scope: !701) -!721 = !DILocation(line: 401, column: 5, scope: !701) -!722 = !DILocation(line: 403, column: 34, scope: !701) -!723 = !DILocation(line: 403, column: 14, scope: !701) -!724 = !DILocation(line: 403, column: 12, scope: !701) -!725 = !DILocation(line: 404, column: 5, scope: !701) -!726 = !DILocalVariable(name: "result", scope: !701, file: !2, line: 406, type: !64) -!727 = !DILocation(line: 406, column: 11, scope: !701) -!728 = !DILocation(line: 406, column: 32, scope: !701) -!729 = !DILocation(line: 406, column: 20, scope: !701) -!730 = !DILocation(line: 409, column: 33, scope: !701) -!731 = !DILocation(line: 409, column: 14, scope: !701) -!732 = !DILocation(line: 409, column: 12, scope: !701) -!733 = !DILocation(line: 410, column: 5, scope: !701) -!734 = !DILocation(line: 413, column: 1, scope: !701) -!735 = distinct !DISubprogram(name: "main", scope: !2, file: !2, line: 415, type: !736, scopeLine: 416, spFlags: DISPFlagDefinition, unit: !61, retainedNodes: !157) -!736 = !DISubroutineType(types: !737) -!737 = !{!143} -!738 = !DILocation(line: 417, column: 5, scope: !735) -!739 = !DILocation(line: 418, column: 5, scope: !735) -!740 = !DILocation(line: 419, column: 5, scope: !735) -!741 = !DILocation(line: 420, column: 5, scope: !735) -!742 = !DILocation(line: 421, column: 1, scope: !735) +!60 = distinct !DIGlobalVariable(name: "local_data", scope: !2, file: !11, line: 367, type: !61, isLocal: false, isDefinition: true) +!61 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_key_t", file: !62, line: 31, baseType: !63) +!62 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_key_t.h", directory: "") +!63 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_key_t", file: !15, line: 112, baseType: !64) +!64 = !DIBasicType(name: "unsigned long", size: 64, encoding: DW_ATE_unsigned) +!65 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!66 = !{i32 7, !"Dwarf Version", i32 4} +!67 = !{i32 2, !"Debug Info Version", i32 3} +!68 = !{i32 1, !"wchar_size", i32 4} +!69 = !{i32 1, !"branch-target-enforcement", i32 0} +!70 = !{i32 1, !"sign-return-address", i32 0} +!71 = !{i32 1, !"sign-return-address-all", i32 0} +!72 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!73 = !{i32 7, !"PIC Level", i32 2} +!74 = !{i32 7, !"uwtable", i32 1} +!75 = !{i32 7, !"frame-pointer", i32 1} +!76 = !{!"Homebrew clang version 14.0.6"} +!77 = distinct !DISubprogram(name: "thread_create", scope: !11, file: !11, line: 12, type: !78, scopeLine: 13, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!78 = !DISubroutineType(types: !79) +!79 = !{!38, !80, !7} +!80 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !81, size: 64) +!81 = !DISubroutineType(types: !82) +!82 = !{!7, !7} +!83 = !{} +!84 = !DILocalVariable(name: "runner", arg: 1, scope: !77, file: !11, line: 12, type: !80) +!85 = !DILocation(line: 12, column: 32, scope: !77) +!86 = !DILocalVariable(name: "data", arg: 2, scope: !77, file: !11, line: 12, type: !7) +!87 = !DILocation(line: 12, column: 54, scope: !77) +!88 = !DILocalVariable(name: "id", scope: !77, file: !11, line: 14, type: !38) +!89 = !DILocation(line: 14, column: 15, scope: !77) +!90 = !DILocalVariable(name: "attr", scope: !77, file: !11, line: 15, type: !91) +!91 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_attr_t", file: !92, line: 31, baseType: !93) +!92 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_attr_t.h", directory: "") +!93 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_attr_t", file: !15, line: 109, baseType: !94) +!94 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_attr_t", file: !15, line: 63, size: 512, elements: !95) +!95 = !{!96, !97} +!96 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !94, file: !15, line: 64, baseType: !19, size: 64) +!97 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !94, file: !15, line: 65, baseType: !21, size: 448, offset: 64) +!98 = !DILocation(line: 15, column: 20, scope: !77) +!99 = !DILocation(line: 16, column: 5, scope: !77) +!100 = !DILocalVariable(name: "status", scope: !77, file: !11, line: 17, type: !65) +!101 = !DILocation(line: 17, column: 9, scope: !77) +!102 = !DILocation(line: 17, column: 45, scope: !77) +!103 = !DILocation(line: 17, column: 53, scope: !77) +!104 = !DILocation(line: 17, column: 18, scope: !77) +!105 = !DILocation(line: 18, column: 5, scope: !77) +!106 = !DILocation(line: 19, column: 5, scope: !77) +!107 = !DILocation(line: 20, column: 12, scope: !77) +!108 = !DILocation(line: 20, column: 5, scope: !77) +!109 = distinct !DISubprogram(name: "thread_join", scope: !11, file: !11, line: 23, type: !110, scopeLine: 24, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!110 = !DISubroutineType(types: !111) +!111 = !{!7, !38} +!112 = !DILocalVariable(name: "id", arg: 1, scope: !109, file: !11, line: 23, type: !38) +!113 = !DILocation(line: 23, column: 29, scope: !109) +!114 = !DILocalVariable(name: "result", scope: !109, file: !11, line: 25, type: !7) +!115 = !DILocation(line: 25, column: 11, scope: !109) +!116 = !DILocalVariable(name: "status", scope: !109, file: !11, line: 26, type: !65) +!117 = !DILocation(line: 26, column: 9, scope: !109) +!118 = !DILocation(line: 26, column: 31, scope: !109) +!119 = !DILocation(line: 26, column: 18, scope: !109) +!120 = !DILocation(line: 27, column: 5, scope: !109) +!121 = !DILocation(line: 28, column: 12, scope: !109) +!122 = !DILocation(line: 28, column: 5, scope: !109) +!123 = distinct !DISubprogram(name: "mutex_init", scope: !11, file: !11, line: 43, type: !124, scopeLine: 44, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!124 = !DISubroutineType(types: !125) +!125 = !{null, !126, !65, !65, !65, !65} +!126 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 64) +!127 = !DILocalVariable(name: "lock", arg: 1, scope: !123, file: !11, line: 43, type: !126) +!128 = !DILocation(line: 43, column: 34, scope: !123) +!129 = !DILocalVariable(name: "type", arg: 2, scope: !123, file: !11, line: 43, type: !65) +!130 = !DILocation(line: 43, column: 44, scope: !123) +!131 = !DILocalVariable(name: "protocol", arg: 3, scope: !123, file: !11, line: 43, type: !65) +!132 = !DILocation(line: 43, column: 54, scope: !123) +!133 = !DILocalVariable(name: "policy", arg: 4, scope: !123, file: !11, line: 43, type: !65) +!134 = !DILocation(line: 43, column: 68, scope: !123) +!135 = !DILocalVariable(name: "prioceiling", arg: 5, scope: !123, file: !11, line: 43, type: !65) +!136 = !DILocation(line: 43, column: 80, scope: !123) +!137 = !DILocalVariable(name: "status", scope: !123, file: !11, line: 45, type: !65) +!138 = !DILocation(line: 45, column: 9, scope: !123) +!139 = !DILocalVariable(name: "value", scope: !123, file: !11, line: 46, type: !65) +!140 = !DILocation(line: 46, column: 9, scope: !123) +!141 = !DILocalVariable(name: "attributes", scope: !123, file: !11, line: 47, type: !142) +!142 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_mutexattr_t", file: !143, line: 31, baseType: !144) +!143 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_mutexattr_t.h", directory: "") +!144 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_mutexattr_t", file: !15, line: 114, baseType: !145) +!145 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_mutexattr_t", file: !15, line: 83, size: 128, elements: !146) +!146 = !{!147, !148} +!147 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !145, file: !15, line: 84, baseType: !19, size: 64) +!148 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !145, file: !15, line: 85, baseType: !149, size: 64, offset: 64) +!149 = !DICompositeType(tag: DW_TAG_array_type, baseType: !6, size: 64, elements: !150) +!150 = !{!151} +!151 = !DISubrange(count: 8) +!152 = !DILocation(line: 47, column: 25, scope: !123) +!153 = !DILocation(line: 48, column: 14, scope: !123) +!154 = !DILocation(line: 48, column: 12, scope: !123) +!155 = !DILocation(line: 49, column: 5, scope: !123) +!156 = !DILocation(line: 51, column: 53, scope: !123) +!157 = !DILocation(line: 51, column: 14, scope: !123) +!158 = !DILocation(line: 51, column: 12, scope: !123) +!159 = !DILocation(line: 52, column: 5, scope: !123) +!160 = !DILocation(line: 53, column: 14, scope: !123) +!161 = !DILocation(line: 53, column: 12, scope: !123) +!162 = !DILocation(line: 54, column: 5, scope: !123) +!163 = !DILocation(line: 56, column: 57, scope: !123) +!164 = !DILocation(line: 56, column: 14, scope: !123) +!165 = !DILocation(line: 56, column: 12, scope: !123) +!166 = !DILocation(line: 57, column: 5, scope: !123) +!167 = !DILocation(line: 58, column: 14, scope: !123) +!168 = !DILocation(line: 58, column: 12, scope: !123) +!169 = !DILocation(line: 59, column: 5, scope: !123) +!170 = !DILocation(line: 61, column: 58, scope: !123) +!171 = !DILocation(line: 61, column: 14, scope: !123) +!172 = !DILocation(line: 61, column: 12, scope: !123) +!173 = !DILocation(line: 62, column: 5, scope: !123) +!174 = !DILocation(line: 63, column: 14, scope: !123) +!175 = !DILocation(line: 63, column: 12, scope: !123) +!176 = !DILocation(line: 64, column: 5, scope: !123) +!177 = !DILocation(line: 66, column: 60, scope: !123) +!178 = !DILocation(line: 66, column: 14, scope: !123) +!179 = !DILocation(line: 66, column: 12, scope: !123) +!180 = !DILocation(line: 67, column: 5, scope: !123) +!181 = !DILocation(line: 68, column: 14, scope: !123) +!182 = !DILocation(line: 68, column: 12, scope: !123) +!183 = !DILocation(line: 69, column: 5, scope: !123) +!184 = !DILocation(line: 71, column: 33, scope: !123) +!185 = !DILocation(line: 71, column: 14, scope: !123) +!186 = !DILocation(line: 71, column: 12, scope: !123) +!187 = !DILocation(line: 72, column: 5, scope: !123) +!188 = !DILocation(line: 73, column: 14, scope: !123) +!189 = !DILocation(line: 73, column: 12, scope: !123) +!190 = !DILocation(line: 74, column: 5, scope: !123) +!191 = !DILocation(line: 75, column: 1, scope: !123) +!192 = distinct !DISubprogram(name: "mutex_destroy", scope: !11, file: !11, line: 77, type: !193, scopeLine: 78, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!193 = !DISubroutineType(types: !194) +!194 = !{null, !126} +!195 = !DILocalVariable(name: "lock", arg: 1, scope: !192, file: !11, line: 77, type: !126) +!196 = !DILocation(line: 77, column: 37, scope: !192) +!197 = !DILocalVariable(name: "status", scope: !192, file: !11, line: 79, type: !65) +!198 = !DILocation(line: 79, column: 9, scope: !192) +!199 = !DILocation(line: 79, column: 40, scope: !192) +!200 = !DILocation(line: 79, column: 18, scope: !192) +!201 = !DILocation(line: 80, column: 5, scope: !192) +!202 = !DILocation(line: 81, column: 1, scope: !192) +!203 = distinct !DISubprogram(name: "mutex_lock", scope: !11, file: !11, line: 83, type: !193, scopeLine: 84, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!204 = !DILocalVariable(name: "lock", arg: 1, scope: !203, file: !11, line: 83, type: !126) +!205 = !DILocation(line: 83, column: 34, scope: !203) +!206 = !DILocalVariable(name: "status", scope: !203, file: !11, line: 85, type: !65) +!207 = !DILocation(line: 85, column: 9, scope: !203) +!208 = !DILocation(line: 85, column: 37, scope: !203) +!209 = !DILocation(line: 85, column: 18, scope: !203) +!210 = !DILocation(line: 86, column: 5, scope: !203) +!211 = !DILocation(line: 87, column: 1, scope: !203) +!212 = distinct !DISubprogram(name: "mutex_trylock", scope: !11, file: !11, line: 89, type: !213, scopeLine: 90, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!213 = !DISubroutineType(types: !214) +!214 = !{!215, !126} +!215 = !DIBasicType(name: "_Bool", size: 8, encoding: DW_ATE_boolean) +!216 = !DILocalVariable(name: "lock", arg: 1, scope: !212, file: !11, line: 89, type: !126) +!217 = !DILocation(line: 89, column: 37, scope: !212) +!218 = !DILocalVariable(name: "status", scope: !212, file: !11, line: 91, type: !65) +!219 = !DILocation(line: 91, column: 9, scope: !212) +!220 = !DILocation(line: 91, column: 40, scope: !212) +!221 = !DILocation(line: 91, column: 18, scope: !212) +!222 = !DILocation(line: 93, column: 12, scope: !212) +!223 = !DILocation(line: 93, column: 19, scope: !212) +!224 = !DILocation(line: 93, column: 5, scope: !212) +!225 = distinct !DISubprogram(name: "mutex_unlock", scope: !11, file: !11, line: 96, type: !193, scopeLine: 97, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!226 = !DILocalVariable(name: "lock", arg: 1, scope: !225, file: !11, line: 96, type: !126) +!227 = !DILocation(line: 96, column: 36, scope: !225) +!228 = !DILocalVariable(name: "status", scope: !225, file: !11, line: 98, type: !65) +!229 = !DILocation(line: 98, column: 9, scope: !225) +!230 = !DILocation(line: 98, column: 39, scope: !225) +!231 = !DILocation(line: 98, column: 18, scope: !225) +!232 = !DILocation(line: 99, column: 5, scope: !225) +!233 = !DILocation(line: 100, column: 1, scope: !225) +!234 = distinct !DISubprogram(name: "mutex_test", scope: !11, file: !11, line: 102, type: !235, scopeLine: 103, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!235 = !DISubroutineType(types: !236) +!236 = !{null} +!237 = !DILocalVariable(name: "mutex0", scope: !234, file: !11, line: 104, type: !12) +!238 = !DILocation(line: 104, column: 21, scope: !234) +!239 = !DILocalVariable(name: "mutex1", scope: !234, file: !11, line: 105, type: !12) +!240 = !DILocation(line: 105, column: 21, scope: !234) +!241 = !DILocation(line: 107, column: 5, scope: !234) +!242 = !DILocation(line: 108, column: 5, scope: !234) +!243 = !DILocation(line: 111, column: 9, scope: !244) +!244 = distinct !DILexicalBlock(scope: !234, file: !11, line: 110, column: 5) +!245 = !DILocalVariable(name: "success", scope: !244, file: !11, line: 112, type: !215) +!246 = !DILocation(line: 112, column: 14, scope: !244) +!247 = !DILocation(line: 112, column: 24, scope: !244) +!248 = !DILocation(line: 113, column: 9, scope: !244) +!249 = !DILocation(line: 114, column: 9, scope: !244) +!250 = !DILocation(line: 118, column: 9, scope: !251) +!251 = distinct !DILexicalBlock(scope: !234, file: !11, line: 117, column: 5) +!252 = !DILocalVariable(name: "success", scope: !253, file: !11, line: 121, type: !215) +!253 = distinct !DILexicalBlock(scope: !251, file: !11, line: 120, column: 9) +!254 = !DILocation(line: 121, column: 18, scope: !253) +!255 = !DILocation(line: 121, column: 28, scope: !253) +!256 = !DILocation(line: 122, column: 13, scope: !253) +!257 = !DILocation(line: 123, column: 13, scope: !253) +!258 = !DILocalVariable(name: "success", scope: !259, file: !11, line: 127, type: !215) +!259 = distinct !DILexicalBlock(scope: !251, file: !11, line: 126, column: 9) +!260 = !DILocation(line: 127, column: 18, scope: !259) +!261 = !DILocation(line: 127, column: 28, scope: !259) +!262 = !DILocation(line: 128, column: 13, scope: !259) +!263 = !DILocation(line: 129, column: 13, scope: !259) +!264 = !DILocation(line: 139, column: 9, scope: !251) +!265 = !DILocation(line: 142, column: 5, scope: !234) +!266 = !DILocation(line: 143, column: 5, scope: !234) +!267 = !DILocation(line: 144, column: 1, scope: !234) +!268 = distinct !DISubprogram(name: "cond_init", scope: !11, file: !11, line: 148, type: !269, scopeLine: 149, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!269 = !DISubroutineType(types: !270) +!270 = !{null, !271} +!271 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !26, size: 64) +!272 = !DILocalVariable(name: "cond", arg: 1, scope: !268, file: !11, line: 148, type: !271) +!273 = !DILocation(line: 148, column: 32, scope: !268) +!274 = !DILocalVariable(name: "status", scope: !268, file: !11, line: 150, type: !65) +!275 = !DILocation(line: 150, column: 9, scope: !268) +!276 = !DILocalVariable(name: "attr", scope: !268, file: !11, line: 151, type: !277) +!277 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_condattr_t", file: !278, line: 31, baseType: !279) +!278 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_condattr_t.h", directory: "") +!279 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_condattr_t", file: !15, line: 111, baseType: !280) +!280 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_condattr_t", file: !15, line: 73, size: 128, elements: !281) +!281 = !{!282, !283} +!282 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !280, file: !15, line: 74, baseType: !19, size: 64) +!283 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !280, file: !15, line: 75, baseType: !149, size: 64, offset: 64) +!284 = !DILocation(line: 151, column: 24, scope: !268) +!285 = !DILocation(line: 153, column: 14, scope: !268) +!286 = !DILocation(line: 153, column: 12, scope: !268) +!287 = !DILocation(line: 154, column: 5, scope: !268) +!288 = !DILocation(line: 156, column: 32, scope: !268) +!289 = !DILocation(line: 156, column: 14, scope: !268) +!290 = !DILocation(line: 156, column: 12, scope: !268) +!291 = !DILocation(line: 157, column: 5, scope: !268) +!292 = !DILocation(line: 159, column: 14, scope: !268) +!293 = !DILocation(line: 159, column: 12, scope: !268) +!294 = !DILocation(line: 160, column: 5, scope: !268) +!295 = !DILocation(line: 161, column: 1, scope: !268) +!296 = distinct !DISubprogram(name: "cond_destroy", scope: !11, file: !11, line: 163, type: !269, scopeLine: 164, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!297 = !DILocalVariable(name: "cond", arg: 1, scope: !296, file: !11, line: 163, type: !271) +!298 = !DILocation(line: 163, column: 35, scope: !296) +!299 = !DILocalVariable(name: "status", scope: !296, file: !11, line: 165, type: !65) +!300 = !DILocation(line: 165, column: 9, scope: !296) +!301 = !DILocation(line: 165, column: 39, scope: !296) +!302 = !DILocation(line: 165, column: 18, scope: !296) +!303 = !DILocation(line: 166, column: 5, scope: !296) +!304 = !DILocation(line: 167, column: 1, scope: !296) +!305 = distinct !DISubprogram(name: "cond_signal", scope: !11, file: !11, line: 169, type: !269, scopeLine: 170, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!306 = !DILocalVariable(name: "cond", arg: 1, scope: !305, file: !11, line: 169, type: !271) +!307 = !DILocation(line: 169, column: 34, scope: !305) +!308 = !DILocalVariable(name: "status", scope: !305, file: !11, line: 171, type: !65) +!309 = !DILocation(line: 171, column: 9, scope: !305) +!310 = !DILocation(line: 171, column: 38, scope: !305) +!311 = !DILocation(line: 171, column: 18, scope: !305) +!312 = !DILocation(line: 172, column: 5, scope: !305) +!313 = !DILocation(line: 173, column: 1, scope: !305) +!314 = distinct !DISubprogram(name: "cond_broadcast", scope: !11, file: !11, line: 175, type: !269, scopeLine: 176, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!315 = !DILocalVariable(name: "cond", arg: 1, scope: !314, file: !11, line: 175, type: !271) +!316 = !DILocation(line: 175, column: 37, scope: !314) +!317 = !DILocalVariable(name: "status", scope: !314, file: !11, line: 177, type: !65) +!318 = !DILocation(line: 177, column: 9, scope: !314) +!319 = !DILocation(line: 177, column: 41, scope: !314) +!320 = !DILocation(line: 177, column: 18, scope: !314) +!321 = !DILocation(line: 178, column: 5, scope: !314) +!322 = !DILocation(line: 179, column: 1, scope: !314) +!323 = distinct !DISubprogram(name: "cond_wait", scope: !11, file: !11, line: 181, type: !324, scopeLine: 182, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!324 = !DISubroutineType(types: !325) +!325 = !{null, !271, !126} +!326 = !DILocalVariable(name: "cond", arg: 1, scope: !323, file: !11, line: 181, type: !271) +!327 = !DILocation(line: 181, column: 32, scope: !323) +!328 = !DILocalVariable(name: "lock", arg: 2, scope: !323, file: !11, line: 181, type: !126) +!329 = !DILocation(line: 181, column: 55, scope: !323) +!330 = !DILocalVariable(name: "status", scope: !323, file: !11, line: 183, type: !65) +!331 = !DILocation(line: 183, column: 9, scope: !323) +!332 = !DILocation(line: 183, column: 36, scope: !323) +!333 = !DILocation(line: 183, column: 42, scope: !323) +!334 = !DILocation(line: 183, column: 18, scope: !323) +!335 = !DILocation(line: 185, column: 1, scope: !323) +!336 = distinct !DISubprogram(name: "cond_timedwait", scope: !11, file: !11, line: 187, type: !337, scopeLine: 188, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!337 = !DISubroutineType(types: !338) +!338 = !{null, !271, !126, !339} +!339 = !DIBasicType(name: "long long", size: 64, encoding: DW_ATE_signed) +!340 = !DILocalVariable(name: "cond", arg: 1, scope: !336, file: !11, line: 187, type: !271) +!341 = !DILocation(line: 187, column: 37, scope: !336) +!342 = !DILocalVariable(name: "lock", arg: 2, scope: !336, file: !11, line: 187, type: !126) +!343 = !DILocation(line: 187, column: 60, scope: !336) +!344 = !DILocalVariable(name: "millis", arg: 3, scope: !336, file: !11, line: 187, type: !339) +!345 = !DILocation(line: 187, column: 76, scope: !336) +!346 = !DILocalVariable(name: "ts", scope: !336, file: !11, line: 190, type: !347) +!347 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "timespec", file: !348, line: 33, size: 128, elements: !349) +!348 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_types/_timespec.h", directory: "") +!349 = !{!350, !353} +!350 = !DIDerivedType(tag: DW_TAG_member, name: "tv_sec", scope: !347, file: !348, line: 35, baseType: !351, size: 64) +!351 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_time_t", file: !352, line: 98, baseType: !19) +!352 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/arm/_types.h", directory: "") +!353 = !DIDerivedType(tag: DW_TAG_member, name: "tv_nsec", scope: !347, file: !348, line: 36, baseType: !19, size: 64, offset: 64) +!354 = !DILocation(line: 190, column: 21, scope: !336) +!355 = !DILocation(line: 194, column: 11, scope: !336) +!356 = !DILocalVariable(name: "status", scope: !336, file: !11, line: 195, type: !65) +!357 = !DILocation(line: 195, column: 9, scope: !336) +!358 = !DILocation(line: 195, column: 41, scope: !336) +!359 = !DILocation(line: 195, column: 47, scope: !336) +!360 = !DILocation(line: 195, column: 18, scope: !336) +!361 = !DILocation(line: 196, column: 1, scope: !336) +!362 = distinct !DISubprogram(name: "cond_worker", scope: !11, file: !11, line: 202, type: !81, scopeLine: 203, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!363 = !DILocalVariable(name: "message", arg: 1, scope: !362, file: !11, line: 202, type: !7) +!364 = !DILocation(line: 202, column: 25, scope: !362) +!365 = !DILocalVariable(name: "idle", scope: !362, file: !11, line: 204, type: !215) +!366 = !DILocation(line: 204, column: 10, scope: !362) +!367 = !DILocation(line: 206, column: 9, scope: !368) +!368 = distinct !DILexicalBlock(scope: !362, file: !11, line: 205, column: 5) +!369 = !DILocation(line: 207, column: 9, scope: !368) +!370 = !DILocation(line: 208, column: 9, scope: !368) +!371 = !DILocation(line: 209, column: 9, scope: !368) +!372 = !DILocation(line: 210, column: 16, scope: !368) +!373 = !DILocation(line: 210, column: 22, scope: !368) +!374 = !DILocation(line: 210, column: 14, scope: !368) +!375 = !DILocation(line: 211, column: 9, scope: !368) +!376 = !DILocation(line: 213, column: 9, scope: !377) +!377 = distinct !DILexicalBlock(scope: !362, file: !11, line: 213, column: 9) +!378 = !DILocation(line: 213, column: 9, scope: !362) +!379 = !DILocation(line: 214, column: 25, scope: !377) +!380 = !DILocation(line: 214, column: 34, scope: !377) +!381 = !DILocation(line: 214, column: 9, scope: !377) +!382 = !DILocation(line: 215, column: 10, scope: !362) +!383 = !DILocation(line: 217, column: 9, scope: !384) +!384 = distinct !DILexicalBlock(scope: !362, file: !11, line: 216, column: 5) +!385 = !DILocation(line: 218, column: 9, scope: !384) +!386 = !DILocation(line: 219, column: 9, scope: !384) +!387 = !DILocation(line: 220, column: 9, scope: !384) +!388 = !DILocation(line: 221, column: 16, scope: !384) +!389 = !DILocation(line: 221, column: 22, scope: !384) +!390 = !DILocation(line: 221, column: 14, scope: !384) +!391 = !DILocation(line: 222, column: 9, scope: !384) +!392 = !DILocation(line: 224, column: 9, scope: !393) +!393 = distinct !DILexicalBlock(scope: !362, file: !11, line: 224, column: 9) +!394 = !DILocation(line: 224, column: 9, scope: !362) +!395 = !DILocation(line: 225, column: 25, scope: !393) +!396 = !DILocation(line: 225, column: 34, scope: !393) +!397 = !DILocation(line: 225, column: 9, scope: !393) +!398 = !DILocation(line: 226, column: 12, scope: !362) +!399 = !DILocation(line: 226, column: 5, scope: !362) +!400 = !DILocation(line: 227, column: 1, scope: !362) +!401 = distinct !DISubprogram(name: "cond_test", scope: !11, file: !11, line: 229, type: !235, scopeLine: 230, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!402 = !DILocalVariable(name: "message", scope: !401, file: !11, line: 231, type: !7) +!403 = !DILocation(line: 231, column: 11, scope: !401) +!404 = !DILocation(line: 232, column: 5, scope: !401) +!405 = !DILocation(line: 233, column: 5, scope: !401) +!406 = !DILocalVariable(name: "worker", scope: !401, file: !11, line: 235, type: !38) +!407 = !DILocation(line: 235, column: 15, scope: !401) +!408 = !DILocation(line: 235, column: 51, scope: !401) +!409 = !DILocation(line: 235, column: 24, scope: !401) +!410 = !DILocation(line: 238, column: 9, scope: !411) +!411 = distinct !DILexicalBlock(scope: !401, file: !11, line: 237, column: 5) +!412 = !DILocation(line: 239, column: 9, scope: !411) +!413 = !DILocation(line: 240, column: 9, scope: !411) +!414 = !DILocation(line: 241, column: 9, scope: !411) +!415 = !DILocation(line: 245, column: 9, scope: !416) +!416 = distinct !DILexicalBlock(scope: !401, file: !11, line: 244, column: 5) +!417 = !DILocation(line: 246, column: 9, scope: !416) +!418 = !DILocation(line: 247, column: 9, scope: !416) +!419 = !DILocation(line: 248, column: 9, scope: !416) +!420 = !DILocalVariable(name: "result", scope: !401, file: !11, line: 251, type: !7) +!421 = !DILocation(line: 251, column: 11, scope: !401) +!422 = !DILocation(line: 251, column: 32, scope: !401) +!423 = !DILocation(line: 251, column: 20, scope: !401) +!424 = !DILocation(line: 252, column: 5, scope: !401) +!425 = !DILocation(line: 254, column: 5, scope: !401) +!426 = !DILocation(line: 255, column: 5, scope: !401) +!427 = !DILocation(line: 256, column: 1, scope: !401) +!428 = distinct !DISubprogram(name: "rwlock_init", scope: !11, file: !11, line: 263, type: !429, scopeLine: 264, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!429 = !DISubroutineType(types: !430) +!430 = !{null, !431, !65} +!431 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !432, size: 64) +!432 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_rwlock_t", file: !433, line: 31, baseType: !434) +!433 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_rwlock_t.h", directory: "") +!434 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_rwlock_t", file: !15, line: 116, baseType: !435) +!435 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_rwlock_t", file: !15, line: 93, size: 1600, elements: !436) +!436 = !{!437, !438} +!437 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !435, file: !15, line: 94, baseType: !19, size: 64) +!438 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !435, file: !15, line: 95, baseType: !439, size: 1536, offset: 64) +!439 = !DICompositeType(tag: DW_TAG_array_type, baseType: !6, size: 1536, elements: !440) +!440 = !{!441} +!441 = !DISubrange(count: 192) +!442 = !DILocalVariable(name: "lock", arg: 1, scope: !428, file: !11, line: 263, type: !431) +!443 = !DILocation(line: 263, column: 36, scope: !428) +!444 = !DILocalVariable(name: "shared", arg: 2, scope: !428, file: !11, line: 263, type: !65) +!445 = !DILocation(line: 263, column: 46, scope: !428) +!446 = !DILocalVariable(name: "status", scope: !428, file: !11, line: 265, type: !65) +!447 = !DILocation(line: 265, column: 9, scope: !428) +!448 = !DILocalVariable(name: "value", scope: !428, file: !11, line: 266, type: !65) +!449 = !DILocation(line: 266, column: 9, scope: !428) +!450 = !DILocalVariable(name: "attributes", scope: !428, file: !11, line: 267, type: !451) +!451 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_rwlockattr_t", file: !452, line: 31, baseType: !453) +!452 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_rwlockattr_t.h", directory: "") +!453 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_rwlockattr_t", file: !15, line: 117, baseType: !454) +!454 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_rwlockattr_t", file: !15, line: 98, size: 192, elements: !455) +!455 = !{!456, !457} +!456 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !454, file: !15, line: 99, baseType: !19, size: 64) +!457 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !454, file: !15, line: 100, baseType: !458, size: 128, offset: 64) +!458 = !DICompositeType(tag: DW_TAG_array_type, baseType: !6, size: 128, elements: !459) +!459 = !{!460} +!460 = !DISubrange(count: 16) +!461 = !DILocation(line: 267, column: 26, scope: !428) +!462 = !DILocation(line: 268, column: 14, scope: !428) +!463 = !DILocation(line: 268, column: 12, scope: !428) +!464 = !DILocation(line: 269, column: 5, scope: !428) +!465 = !DILocation(line: 271, column: 57, scope: !428) +!466 = !DILocation(line: 271, column: 14, scope: !428) +!467 = !DILocation(line: 271, column: 12, scope: !428) +!468 = !DILocation(line: 272, column: 5, scope: !428) +!469 = !DILocation(line: 273, column: 14, scope: !428) +!470 = !DILocation(line: 273, column: 12, scope: !428) +!471 = !DILocation(line: 274, column: 5, scope: !428) +!472 = !DILocation(line: 276, column: 34, scope: !428) +!473 = !DILocation(line: 276, column: 14, scope: !428) +!474 = !DILocation(line: 276, column: 12, scope: !428) +!475 = !DILocation(line: 277, column: 5, scope: !428) +!476 = !DILocation(line: 278, column: 14, scope: !428) +!477 = !DILocation(line: 278, column: 12, scope: !428) +!478 = !DILocation(line: 279, column: 5, scope: !428) +!479 = !DILocation(line: 280, column: 1, scope: !428) +!480 = distinct !DISubprogram(name: "rwlock_destroy", scope: !11, file: !11, line: 282, type: !481, scopeLine: 283, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!481 = !DISubroutineType(types: !482) +!482 = !{null, !431} +!483 = !DILocalVariable(name: "lock", arg: 1, scope: !480, file: !11, line: 282, type: !431) +!484 = !DILocation(line: 282, column: 39, scope: !480) +!485 = !DILocalVariable(name: "status", scope: !480, file: !11, line: 284, type: !65) +!486 = !DILocation(line: 284, column: 9, scope: !480) +!487 = !DILocation(line: 284, column: 41, scope: !480) +!488 = !DILocation(line: 284, column: 18, scope: !480) +!489 = !DILocation(line: 285, column: 5, scope: !480) +!490 = !DILocation(line: 286, column: 1, scope: !480) +!491 = distinct !DISubprogram(name: "rwlock_wrlock", scope: !11, file: !11, line: 288, type: !481, scopeLine: 289, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!492 = !DILocalVariable(name: "lock", arg: 1, scope: !491, file: !11, line: 288, type: !431) +!493 = !DILocation(line: 288, column: 38, scope: !491) +!494 = !DILocalVariable(name: "status", scope: !491, file: !11, line: 290, type: !65) +!495 = !DILocation(line: 290, column: 9, scope: !491) +!496 = !DILocation(line: 290, column: 40, scope: !491) +!497 = !DILocation(line: 290, column: 18, scope: !491) +!498 = !DILocation(line: 291, column: 5, scope: !491) +!499 = !DILocation(line: 292, column: 1, scope: !491) +!500 = distinct !DISubprogram(name: "rwlock_trywrlock", scope: !11, file: !11, line: 294, type: !501, scopeLine: 295, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!501 = !DISubroutineType(types: !502) +!502 = !{!215, !431} +!503 = !DILocalVariable(name: "lock", arg: 1, scope: !500, file: !11, line: 294, type: !431) +!504 = !DILocation(line: 294, column: 41, scope: !500) +!505 = !DILocalVariable(name: "status", scope: !500, file: !11, line: 296, type: !65) +!506 = !DILocation(line: 296, column: 9, scope: !500) +!507 = !DILocation(line: 296, column: 43, scope: !500) +!508 = !DILocation(line: 296, column: 18, scope: !500) +!509 = !DILocation(line: 298, column: 12, scope: !500) +!510 = !DILocation(line: 298, column: 19, scope: !500) +!511 = !DILocation(line: 298, column: 5, scope: !500) +!512 = distinct !DISubprogram(name: "rwlock_rdlock", scope: !11, file: !11, line: 301, type: !481, scopeLine: 302, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!513 = !DILocalVariable(name: "lock", arg: 1, scope: !512, file: !11, line: 301, type: !431) +!514 = !DILocation(line: 301, column: 38, scope: !512) +!515 = !DILocalVariable(name: "status", scope: !512, file: !11, line: 303, type: !65) +!516 = !DILocation(line: 303, column: 9, scope: !512) +!517 = !DILocation(line: 303, column: 40, scope: !512) +!518 = !DILocation(line: 303, column: 18, scope: !512) +!519 = !DILocation(line: 304, column: 5, scope: !512) +!520 = !DILocation(line: 305, column: 1, scope: !512) +!521 = distinct !DISubprogram(name: "rwlock_tryrdlock", scope: !11, file: !11, line: 307, type: !501, scopeLine: 308, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!522 = !DILocalVariable(name: "lock", arg: 1, scope: !521, file: !11, line: 307, type: !431) +!523 = !DILocation(line: 307, column: 41, scope: !521) +!524 = !DILocalVariable(name: "status", scope: !521, file: !11, line: 309, type: !65) +!525 = !DILocation(line: 309, column: 9, scope: !521) +!526 = !DILocation(line: 309, column: 43, scope: !521) +!527 = !DILocation(line: 309, column: 18, scope: !521) +!528 = !DILocation(line: 311, column: 12, scope: !521) +!529 = !DILocation(line: 311, column: 19, scope: !521) +!530 = !DILocation(line: 311, column: 5, scope: !521) +!531 = distinct !DISubprogram(name: "rwlock_unlock", scope: !11, file: !11, line: 314, type: !481, scopeLine: 315, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!532 = !DILocalVariable(name: "lock", arg: 1, scope: !531, file: !11, line: 314, type: !431) +!533 = !DILocation(line: 314, column: 38, scope: !531) +!534 = !DILocalVariable(name: "status", scope: !531, file: !11, line: 316, type: !65) +!535 = !DILocation(line: 316, column: 9, scope: !531) +!536 = !DILocation(line: 316, column: 40, scope: !531) +!537 = !DILocation(line: 316, column: 18, scope: !531) +!538 = !DILocation(line: 317, column: 5, scope: !531) +!539 = !DILocation(line: 318, column: 1, scope: !531) +!540 = distinct !DISubprogram(name: "rwlock_test", scope: !11, file: !11, line: 320, type: !235, scopeLine: 321, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!541 = !DILocalVariable(name: "lock", scope: !540, file: !11, line: 322, type: !432) +!542 = !DILocation(line: 322, column: 22, scope: !540) +!543 = !DILocation(line: 323, column: 5, scope: !540) +!544 = !DILocalVariable(name: "test_depth", scope: !540, file: !11, line: 324, type: !545) +!545 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !65) +!546 = !DILocation(line: 324, column: 15, scope: !540) +!547 = !DILocation(line: 327, column: 9, scope: !548) +!548 = distinct !DILexicalBlock(scope: !540, file: !11, line: 326, column: 5) +!549 = !DILocalVariable(name: "success", scope: !548, file: !11, line: 328, type: !215) +!550 = !DILocation(line: 328, column: 14, scope: !548) +!551 = !DILocation(line: 328, column: 24, scope: !548) +!552 = !DILocation(line: 329, column: 9, scope: !548) +!553 = !DILocation(line: 330, column: 19, scope: !548) +!554 = !DILocation(line: 330, column: 17, scope: !548) +!555 = !DILocation(line: 331, column: 9, scope: !548) +!556 = !DILocation(line: 332, column: 9, scope: !548) +!557 = !DILocation(line: 336, column: 9, scope: !558) +!558 = distinct !DILexicalBlock(scope: !540, file: !11, line: 335, column: 5) +!559 = !DILocalVariable(name: "i", scope: !560, file: !11, line: 337, type: !65) +!560 = distinct !DILexicalBlock(scope: !558, file: !11, line: 337, column: 9) +!561 = !DILocation(line: 337, column: 18, scope: !560) +!562 = !DILocation(line: 337, column: 14, scope: !560) +!563 = !DILocation(line: 337, column: 25, scope: !564) +!564 = distinct !DILexicalBlock(scope: !560, file: !11, line: 337, column: 9) +!565 = !DILocation(line: 337, column: 27, scope: !564) +!566 = !DILocation(line: 337, column: 9, scope: !560) +!567 = !DILocalVariable(name: "success", scope: !568, file: !11, line: 339, type: !215) +!568 = distinct !DILexicalBlock(scope: !564, file: !11, line: 338, column: 9) +!569 = !DILocation(line: 339, column: 18, scope: !568) +!570 = !DILocation(line: 339, column: 28, scope: !568) +!571 = !DILocation(line: 340, column: 13, scope: !568) +!572 = !DILocation(line: 341, column: 9, scope: !568) +!573 = !DILocation(line: 337, column: 42, scope: !564) +!574 = !DILocation(line: 337, column: 9, scope: !564) +!575 = distinct !{!575, !566, !576, !577} +!576 = !DILocation(line: 341, column: 9, scope: !560) +!577 = !{!"llvm.loop.mustprogress"} +!578 = !DILocalVariable(name: "success", scope: !579, file: !11, line: 344, type: !215) +!579 = distinct !DILexicalBlock(scope: !558, file: !11, line: 343, column: 9) +!580 = !DILocation(line: 344, column: 18, scope: !579) +!581 = !DILocation(line: 344, column: 28, scope: !579) +!582 = !DILocation(line: 345, column: 13, scope: !579) +!583 = !DILocation(line: 348, column: 9, scope: !558) +!584 = !DILocalVariable(name: "i", scope: !585, file: !11, line: 349, type: !65) +!585 = distinct !DILexicalBlock(scope: !558, file: !11, line: 349, column: 9) +!586 = !DILocation(line: 349, column: 18, scope: !585) +!587 = !DILocation(line: 349, column: 14, scope: !585) +!588 = !DILocation(line: 349, column: 25, scope: !589) +!589 = distinct !DILexicalBlock(scope: !585, file: !11, line: 349, column: 9) +!590 = !DILocation(line: 349, column: 27, scope: !589) +!591 = !DILocation(line: 349, column: 9, scope: !585) +!592 = !DILocation(line: 350, column: 13, scope: !593) +!593 = distinct !DILexicalBlock(scope: !589, file: !11, line: 349, column: 46) +!594 = !DILocation(line: 351, column: 9, scope: !593) +!595 = !DILocation(line: 349, column: 42, scope: !589) +!596 = !DILocation(line: 349, column: 9, scope: !589) +!597 = distinct !{!597, !591, !598, !577} +!598 = !DILocation(line: 351, column: 9, scope: !585) +!599 = !DILocation(line: 355, column: 9, scope: !600) +!600 = distinct !DILexicalBlock(scope: !540, file: !11, line: 354, column: 5) +!601 = !DILocalVariable(name: "success", scope: !600, file: !11, line: 356, type: !215) +!602 = !DILocation(line: 356, column: 14, scope: !600) +!603 = !DILocation(line: 356, column: 24, scope: !600) +!604 = !DILocation(line: 357, column: 9, scope: !600) +!605 = !DILocation(line: 358, column: 9, scope: !600) +!606 = !DILocation(line: 361, column: 5, scope: !540) +!607 = !DILocation(line: 362, column: 1, scope: !540) +!608 = distinct !DISubprogram(name: "key_destroy", scope: !11, file: !11, line: 369, type: !51, scopeLine: 370, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!609 = !DILocalVariable(name: "unused_value", arg: 1, scope: !608, file: !11, line: 369, type: !7) +!610 = !DILocation(line: 369, column: 24, scope: !608) +!611 = !DILocation(line: 371, column: 21, scope: !608) +!612 = !DILocation(line: 371, column: 19, scope: !608) +!613 = !DILocation(line: 372, column: 1, scope: !608) +!614 = distinct !DISubprogram(name: "key_worker", scope: !11, file: !11, line: 374, type: !81, scopeLine: 375, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!615 = !DILocalVariable(name: "message", arg: 1, scope: !614, file: !11, line: 374, type: !7) +!616 = !DILocation(line: 374, column: 24, scope: !614) +!617 = !DILocalVariable(name: "my_secret", scope: !614, file: !11, line: 376, type: !65) +!618 = !DILocation(line: 376, column: 9, scope: !614) +!619 = !DILocalVariable(name: "status", scope: !614, file: !11, line: 378, type: !65) +!620 = !DILocation(line: 378, column: 9, scope: !614) +!621 = !DILocation(line: 378, column: 38, scope: !614) +!622 = !DILocation(line: 378, column: 50, scope: !614) +!623 = !DILocation(line: 378, column: 18, scope: !614) +!624 = !DILocation(line: 379, column: 5, scope: !614) +!625 = !DILocalVariable(name: "my_local_data", scope: !614, file: !11, line: 381, type: !7) +!626 = !DILocation(line: 381, column: 11, scope: !614) +!627 = !DILocation(line: 381, column: 47, scope: !614) +!628 = !DILocation(line: 381, column: 27, scope: !614) +!629 = !DILocation(line: 382, column: 5, scope: !614) +!630 = !DILocation(line: 384, column: 12, scope: !614) +!631 = !DILocation(line: 384, column: 5, scope: !614) +!632 = distinct !DISubprogram(name: "key_test", scope: !11, file: !11, line: 387, type: !235, scopeLine: 388, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!633 = !DILocalVariable(name: "my_secret", scope: !632, file: !11, line: 389, type: !65) +!634 = !DILocation(line: 389, column: 9, scope: !632) +!635 = !DILocalVariable(name: "message", scope: !632, file: !11, line: 390, type: !7) +!636 = !DILocation(line: 390, column: 11, scope: !632) +!637 = !DILocalVariable(name: "status", scope: !632, file: !11, line: 391, type: !65) +!638 = !DILocation(line: 391, column: 9, scope: !632) +!639 = !DILocation(line: 393, column: 5, scope: !632) +!640 = !DILocalVariable(name: "worker", scope: !632, file: !11, line: 395, type: !38) +!641 = !DILocation(line: 395, column: 15, scope: !632) +!642 = !DILocation(line: 395, column: 50, scope: !632) +!643 = !DILocation(line: 395, column: 24, scope: !632) +!644 = !DILocation(line: 397, column: 34, scope: !632) +!645 = !DILocation(line: 397, column: 46, scope: !632) +!646 = !DILocation(line: 397, column: 14, scope: !632) +!647 = !DILocation(line: 397, column: 12, scope: !632) +!648 = !DILocation(line: 398, column: 5, scope: !632) +!649 = !DILocalVariable(name: "my_local_data", scope: !632, file: !11, line: 400, type: !7) +!650 = !DILocation(line: 400, column: 11, scope: !632) +!651 = !DILocation(line: 400, column: 47, scope: !632) +!652 = !DILocation(line: 400, column: 27, scope: !632) +!653 = !DILocation(line: 401, column: 5, scope: !632) +!654 = !DILocation(line: 403, column: 34, scope: !632) +!655 = !DILocation(line: 403, column: 14, scope: !632) +!656 = !DILocation(line: 403, column: 12, scope: !632) +!657 = !DILocation(line: 404, column: 5, scope: !632) +!658 = !DILocalVariable(name: "result", scope: !632, file: !11, line: 406, type: !7) +!659 = !DILocation(line: 406, column: 11, scope: !632) +!660 = !DILocation(line: 406, column: 32, scope: !632) +!661 = !DILocation(line: 406, column: 20, scope: !632) +!662 = !DILocation(line: 407, column: 5, scope: !632) +!663 = !DILocation(line: 409, column: 33, scope: !632) +!664 = !DILocation(line: 409, column: 14, scope: !632) +!665 = !DILocation(line: 409, column: 12, scope: !632) +!666 = !DILocation(line: 410, column: 5, scope: !632) +!667 = !DILocation(line: 413, column: 1, scope: !632) +!668 = distinct !DISubprogram(name: "main", scope: !11, file: !11, line: 415, type: !669, scopeLine: 416, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !83) +!669 = !DISubroutineType(types: !670) +!670 = !{!65} +!671 = !DILocation(line: 417, column: 5, scope: !668) +!672 = !DILocation(line: 418, column: 5, scope: !668) +!673 = !DILocation(line: 419, column: 5, scope: !668) +!674 = !DILocation(line: 420, column: 5, scope: !668) +!675 = !DILocation(line: 421, column: 1, scope: !668) diff --git a/dartagnan/src/test/resources/miscellaneous/thread_invalid_join.ll b/dartagnan/src/test/resources/miscellaneous/thread_invalid_join.ll new file mode 100644 index 0000000000..2702f9cb5e --- /dev/null +++ b/dartagnan/src/test/resources/miscellaneous/thread_invalid_join.ll @@ -0,0 +1,115 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/miscellaneous/thread_invalid_join.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/miscellaneous/thread_invalid_join.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread1(i8* noundef %0) #0 !dbg !15 { + %2 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !20, metadata !DIExpression()), !dbg !21 + %3 = call %struct._opaque_pthread_t* @pthread_self(), !dbg !22 + %4 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %3, i8** noundef null), !dbg !23 + ret i8* null, !dbg !24 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #2 + +declare %struct._opaque_pthread_t* @pthread_self() #2 + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !25 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + %3 = alloca %struct._opaque_pthread_t*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !29, metadata !DIExpression()), !dbg !54 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %3, metadata !55, metadata !DIExpression()), !dbg !56 + %4 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread1, i8* noundef null), !dbg !57 + %5 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %2, align 8, !dbg !58 + %6 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %5, i8** noundef null), !dbg !59 + %7 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %3, align 8, !dbg !60 + %8 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %7, i8** noundef null), !dbg !61 + ret i32 0, !dbg !62 +} + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #2 + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!4, !5, !6, !7, !8, !9, !10, !11, !12, !13} +!llvm.ident = !{!14} + +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !2, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!1 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/miscellaneous/thread_invalid_join.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!2 = !{!3} +!3 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!4 = !{i32 7, !"Dwarf Version", i32 4} +!5 = !{i32 2, !"Debug Info Version", i32 3} +!6 = !{i32 1, !"wchar_size", i32 4} +!7 = !{i32 1, !"branch-target-enforcement", i32 0} +!8 = !{i32 1, !"sign-return-address", i32 0} +!9 = !{i32 1, !"sign-return-address-all", i32 0} +!10 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!11 = !{i32 7, !"PIC Level", i32 2} +!12 = !{i32 7, !"uwtable", i32 1} +!13 = !{i32 7, !"frame-pointer", i32 1} +!14 = !{!"Homebrew clang version 14.0.6"} +!15 = distinct !DISubprogram(name: "thread1", scope: !16, file: !16, line: 11, type: !17, scopeLine: 12, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) +!16 = !DIFile(filename: "benchmarks/miscellaneous/thread_invalid_join.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!17 = !DISubroutineType(types: !18) +!18 = !{!3, !3} +!19 = !{} +!20 = !DILocalVariable(name: "arg", arg: 1, scope: !15, file: !16, line: 11, type: !3) +!21 = !DILocation(line: 11, column: 21, scope: !15) +!22 = !DILocation(line: 13, column: 18, scope: !15) +!23 = !DILocation(line: 13, column: 5, scope: !15) +!24 = !DILocation(line: 14, column: 5, scope: !15) +!25 = distinct !DISubprogram(name: "main", scope: !16, file: !16, line: 17, type: !26, scopeLine: 18, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) +!26 = !DISubroutineType(types: !27) +!27 = !{!28} +!28 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!29 = !DILocalVariable(name: "t1", scope: !25, file: !16, line: 19, type: !30) +!30 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !31, line: 31, baseType: !32) +!31 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!32 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !33, line: 118, baseType: !34) +!33 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !35, size: 64) +!35 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !33, line: 103, size: 65536, elements: !36) +!36 = !{!37, !39, !49} +!37 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !35, file: !33, line: 104, baseType: !38, size: 64) +!38 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!39 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !35, file: !33, line: 105, baseType: !40, size: 64, offset: 64) +!40 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !41, size: 64) +!41 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !33, line: 57, size: 192, elements: !42) +!42 = !{!43, !47, !48} +!43 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !41, file: !33, line: 58, baseType: !44, size: 64) +!44 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !45, size: 64) +!45 = !DISubroutineType(types: !46) +!46 = !{null, !3} +!47 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !41, file: !33, line: 59, baseType: !3, size: 64, offset: 64) +!48 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !41, file: !33, line: 60, baseType: !40, size: 64, offset: 128) +!49 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !35, file: !33, line: 106, baseType: !50, size: 65408, offset: 128) +!50 = !DICompositeType(tag: DW_TAG_array_type, baseType: !51, size: 65408, elements: !52) +!51 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!52 = !{!53} +!53 = !DISubrange(count: 8176) +!54 = !DILocation(line: 19, column: 15, scope: !25) +!55 = !DILocalVariable(name: "t2", scope: !25, file: !16, line: 19, type: !30) +!56 = !DILocation(line: 19, column: 19, scope: !25) +!57 = !DILocation(line: 21, column: 5, scope: !25) +!58 = !DILocation(line: 23, column: 18, scope: !25) +!59 = !DILocation(line: 23, column: 5, scope: !25) +!60 = !DILocation(line: 24, column: 18, scope: !25) +!61 = !DILocation(line: 24, column: 5, scope: !25) +!62 = !DILocation(line: 25, column: 5, scope: !25) diff --git a/dartagnan/src/test/resources/miscellaneous/thread_return_val.ll b/dartagnan/src/test/resources/miscellaneous/thread_return_val.ll new file mode 100644 index 0000000000..d24924bd32 --- /dev/null +++ b/dartagnan/src/test/resources/miscellaneous/thread_return_val.ll @@ -0,0 +1,234 @@ +; ModuleID = '/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/miscellaneous/thread_return_val.c' +source_filename = "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/miscellaneous/thread_return_val.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx14.0.0" + +%struct._opaque_pthread_t = type { i64, %struct.__darwin_pthread_handler_rec*, [8176 x i8] } +%struct.__darwin_pthread_handler_rec = type { void (i8*)*, i8*, %struct.__darwin_pthread_handler_rec* } +%struct._opaque_pthread_attr_t = type { i64, [56 x i8] } + +@__func__.main = private unnamed_addr constant [5 x i8] c"main\00", align 1 +@.str = private unnamed_addr constant [20 x i8] c"thread_return_val.c\00", align 1 +@.str.1 = private unnamed_addr constant [36 x i8] c"retVal1 == retVal2 && retVal1 == 42\00", align 1 +@.str.2 = private unnamed_addr constant [14 x i8] c"retVal1 == 41\00", align 1 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread1(i8* noundef %0) #0 !dbg !15 { + %2 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !20, metadata !DIExpression()), !dbg !21 + ret i8* inttoptr (i64 42 to i8*), !dbg !22 +} + +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread2(i8* noundef %0) #0 !dbg !23 { + %2 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !24, metadata !DIExpression()), !dbg !25 + call void @pthread_exit(i8* noundef inttoptr (i64 42 to i8*)) #5, !dbg !26 + unreachable, !dbg !26 +} + +; Function Attrs: noreturn +declare void @pthread_exit(i8* noundef) #2 + +; Function Attrs: noinline nounwind ssp uwtable +define void @returnValue(i8* noundef %0) #0 !dbg !27 { + %2 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !30, metadata !DIExpression()), !dbg !31 + %3 = load i8*, i8** %2, align 8, !dbg !32 + call void @pthread_exit(i8* noundef %3) #5, !dbg !33 + unreachable, !dbg !33 +} + +; Function Attrs: noinline nounwind ssp uwtable +define i8* @thread3(i8* noundef %0) #0 !dbg !34 { + %2 = alloca i8*, align 8 + store i8* %0, i8** %2, align 8 + call void @llvm.dbg.declare(metadata i8** %2, metadata !35, metadata !DIExpression()), !dbg !36 + call void @returnValue(i8* noundef inttoptr (i64 41 to i8*)), !dbg !37 + ret i8* null, !dbg !38 +} + +; Function Attrs: noinline nounwind ssp uwtable +define i32 @main() #0 !dbg !39 { + %1 = alloca i32, align 4 + %2 = alloca %struct._opaque_pthread_t*, align 8 + %3 = alloca %struct._opaque_pthread_t*, align 8 + %4 = alloca i8*, align 8 + %5 = alloca i8*, align 8 + store i32 0, i32* %1, align 4 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %2, metadata !43, metadata !DIExpression()), !dbg !66 + call void @llvm.dbg.declare(metadata %struct._opaque_pthread_t** %3, metadata !67, metadata !DIExpression()), !dbg !68 + call void @llvm.dbg.declare(metadata i8** %4, metadata !69, metadata !DIExpression()), !dbg !70 + call void @llvm.dbg.declare(metadata i8** %5, metadata !71, metadata !DIExpression()), !dbg !72 + %6 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread1, i8* noundef null), !dbg !73 + %7 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %3, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread2, i8* noundef null), !dbg !74 + %8 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %2, align 8, !dbg !75 + %9 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %8, i8** noundef %4), !dbg !76 + %10 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %3, align 8, !dbg !77 + %11 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %10, i8** noundef %5), !dbg !78 + %12 = load i8*, i8** %4, align 8, !dbg !79 + %13 = load i8*, i8** %5, align 8, !dbg !79 + %14 = icmp eq i8* %12, %13, !dbg !79 + br i1 %14, label %15, label %18, !dbg !79 + +15: ; preds = %0 + %16 = load i8*, i8** %4, align 8, !dbg !79 + %17 = icmp eq i8* %16, inttoptr (i64 42 to i8*), !dbg !79 + br label %18 + +18: ; preds = %15, %0 + %19 = phi i1 [ false, %0 ], [ %17, %15 ], !dbg !80 + %20 = xor i1 %19, true, !dbg !79 + %21 = zext i1 %20 to i32, !dbg !79 + %22 = sext i32 %21 to i64, !dbg !79 + %23 = icmp ne i64 %22, 0, !dbg !79 + br i1 %23, label %24, label %26, !dbg !79 + +24: ; preds = %18 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0), i8* noundef getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 noundef 43, i8* noundef getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0)) #6, !dbg !79 + unreachable, !dbg !79 + +25: ; No predecessors! + br label %27, !dbg !79 + +26: ; preds = %18 + br label %27, !dbg !79 + +27: ; preds = %26, %25 + %28 = call i32 @pthread_create(%struct._opaque_pthread_t** noundef %2, %struct._opaque_pthread_attr_t* noundef null, i8* (i8*)* noundef @thread3, i8* noundef null), !dbg !81 + %29 = load %struct._opaque_pthread_t*, %struct._opaque_pthread_t** %2, align 8, !dbg !82 + %30 = call i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef %29, i8** noundef %4), !dbg !83 + %31 = load i8*, i8** %4, align 8, !dbg !84 + %32 = icmp eq i8* %31, inttoptr (i64 41 to i8*), !dbg !84 + %33 = xor i1 %32, true, !dbg !84 + %34 = zext i1 %33 to i32, !dbg !84 + %35 = sext i32 %34 to i64, !dbg !84 + %36 = icmp ne i64 %35, 0, !dbg !84 + br i1 %36, label %37, label %39, !dbg !84 + +37: ; preds = %27 + call void @__assert_rtn(i8* noundef getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.main, i64 0, i64 0), i8* noundef getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 noundef 47, i8* noundef getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0)) #6, !dbg !84 + unreachable, !dbg !84 + +38: ; No predecessors! + br label %40, !dbg !84 + +39: ; preds = %27 + br label %40, !dbg !84 + +40: ; preds = %39, %38 + %41 = load i32, i32* %1, align 4, !dbg !85 + ret i32 %41, !dbg !85 +} + +declare i32 @pthread_create(%struct._opaque_pthread_t** noundef, %struct._opaque_pthread_attr_t* noundef, i8* (i8*)* noundef, i8* noundef) #3 + +declare i32 @"\01_pthread_join"(%struct._opaque_pthread_t* noundef, i8** noundef) #3 + +; Function Attrs: cold noreturn +declare void @__assert_rtn(i8* noundef, i8* noundef, i32 noundef, i8* noundef) #4 + +attributes #0 = { noinline nounwind ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } +attributes #2 = { noreturn "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #3 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #4 = { cold noreturn "disable-tail-calls"="true" "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+v8.5a,+zcm,+zcz" } +attributes #5 = { noreturn } +attributes #6 = { cold noreturn } + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!4, !5, !6, !7, !8, !9, !10, !11, !12, !13} +!llvm.ident = !{!14} + +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "Homebrew clang version 14.0.6", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, retainedTypes: !2, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk", sdk: "MacOSX13.sdk") +!1 = !DIFile(filename: "/Users/thomashaas/IdeaProjects/Dat3M/benchmarks/miscellaneous/thread_return_val.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!2 = !{!3} +!3 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64) +!4 = !{i32 7, !"Dwarf Version", i32 4} +!5 = !{i32 2, !"Debug Info Version", i32 3} +!6 = !{i32 1, !"wchar_size", i32 4} +!7 = !{i32 1, !"branch-target-enforcement", i32 0} +!8 = !{i32 1, !"sign-return-address", i32 0} +!9 = !{i32 1, !"sign-return-address-all", i32 0} +!10 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!11 = !{i32 7, !"PIC Level", i32 2} +!12 = !{i32 7, !"uwtable", i32 1} +!13 = !{i32 7, !"frame-pointer", i32 1} +!14 = !{!"Homebrew clang version 14.0.6"} +!15 = distinct !DISubprogram(name: "thread1", scope: !16, file: !16, line: 12, type: !17, scopeLine: 13, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) +!16 = !DIFile(filename: "benchmarks/miscellaneous/thread_return_val.c", directory: "/Users/thomashaas/IdeaProjects/Dat3M") +!17 = !DISubroutineType(types: !18) +!18 = !{!3, !3} +!19 = !{} +!20 = !DILocalVariable(name: "arg", arg: 1, scope: !15, file: !16, line: 12, type: !3) +!21 = !DILocation(line: 12, column: 21, scope: !15) +!22 = !DILocation(line: 14, column: 5, scope: !15) +!23 = distinct !DISubprogram(name: "thread2", scope: !16, file: !16, line: 17, type: !17, scopeLine: 18, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) +!24 = !DILocalVariable(name: "arg", arg: 1, scope: !23, file: !16, line: 17, type: !3) +!25 = !DILocation(line: 17, column: 21, scope: !23) +!26 = !DILocation(line: 19, column: 5, scope: !23) +!27 = distinct !DISubprogram(name: "returnValue", scope: !16, file: !16, line: 23, type: !28, scopeLine: 23, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) +!28 = !DISubroutineType(types: !29) +!29 = !{null, !3} +!30 = !DILocalVariable(name: "arg", arg: 1, scope: !27, file: !16, line: 23, type: !3) +!31 = !DILocation(line: 23, column: 24, scope: !27) +!32 = !DILocation(line: 24, column: 18, scope: !27) +!33 = !DILocation(line: 24, column: 5, scope: !27) +!34 = distinct !DISubprogram(name: "thread3", scope: !16, file: !16, line: 27, type: !17, scopeLine: 28, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) +!35 = !DILocalVariable(name: "arg", arg: 1, scope: !34, file: !16, line: 27, type: !3) +!36 = !DILocation(line: 27, column: 21, scope: !34) +!37 = !DILocation(line: 29, column: 5, scope: !34) +!38 = !DILocation(line: 30, column: 5, scope: !34) +!39 = distinct !DISubprogram(name: "main", scope: !16, file: !16, line: 33, type: !40, scopeLine: 34, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19) +!40 = !DISubroutineType(types: !41) +!41 = !{!42} +!42 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!43 = !DILocalVariable(name: "t1", scope: !39, file: !16, line: 35, type: !44) +!44 = !DIDerivedType(tag: DW_TAG_typedef, name: "pthread_t", file: !45, line: 31, baseType: !46) +!45 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_t.h", directory: "") +!46 = !DIDerivedType(tag: DW_TAG_typedef, name: "__darwin_pthread_t", file: !47, line: 118, baseType: !48) +!47 = !DIFile(filename: "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/_pthread/_pthread_types.h", directory: "") +!48 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !49, size: 64) +!49 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "_opaque_pthread_t", file: !47, line: 103, size: 65536, elements: !50) +!50 = !{!51, !53, !61} +!51 = !DIDerivedType(tag: DW_TAG_member, name: "__sig", scope: !49, file: !47, line: 104, baseType: !52, size: 64) +!52 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!53 = !DIDerivedType(tag: DW_TAG_member, name: "__cleanup_stack", scope: !49, file: !47, line: 105, baseType: !54, size: 64, offset: 64) +!54 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !55, size: 64) +!55 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "__darwin_pthread_handler_rec", file: !47, line: 57, size: 192, elements: !56) +!56 = !{!57, !59, !60} +!57 = !DIDerivedType(tag: DW_TAG_member, name: "__routine", scope: !55, file: !47, line: 58, baseType: !58, size: 64) +!58 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !28, size: 64) +!59 = !DIDerivedType(tag: DW_TAG_member, name: "__arg", scope: !55, file: !47, line: 59, baseType: !3, size: 64, offset: 64) +!60 = !DIDerivedType(tag: DW_TAG_member, name: "__next", scope: !55, file: !47, line: 60, baseType: !54, size: 64, offset: 128) +!61 = !DIDerivedType(tag: DW_TAG_member, name: "__opaque", scope: !49, file: !47, line: 106, baseType: !62, size: 65408, offset: 128) +!62 = !DICompositeType(tag: DW_TAG_array_type, baseType: !63, size: 65408, elements: !64) +!63 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char) +!64 = !{!65} +!65 = !DISubrange(count: 8176) +!66 = !DILocation(line: 35, column: 15, scope: !39) +!67 = !DILocalVariable(name: "t2", scope: !39, file: !16, line: 35, type: !44) +!68 = !DILocation(line: 35, column: 19, scope: !39) +!69 = !DILocalVariable(name: "retVal1", scope: !39, file: !16, line: 36, type: !3) +!70 = !DILocation(line: 36, column: 11, scope: !39) +!71 = !DILocalVariable(name: "retVal2", scope: !39, file: !16, line: 36, type: !3) +!72 = !DILocation(line: 36, column: 21, scope: !39) +!73 = !DILocation(line: 38, column: 5, scope: !39) +!74 = !DILocation(line: 39, column: 5, scope: !39) +!75 = !DILocation(line: 41, column: 18, scope: !39) +!76 = !DILocation(line: 41, column: 5, scope: !39) +!77 = !DILocation(line: 42, column: 18, scope: !39) +!78 = !DILocation(line: 42, column: 5, scope: !39) +!79 = !DILocation(line: 43, column: 5, scope: !39) +!80 = !DILocation(line: 0, scope: !39) +!81 = !DILocation(line: 45, column: 5, scope: !39) +!82 = !DILocation(line: 46, column: 18, scope: !39) +!83 = !DILocation(line: 46, column: 5, scope: !39) +!84 = !DILocation(line: 47, column: 5, scope: !39) +!85 = !DILocation(line: 48, column: 1, scope: !39) From 85830413080744ca39f2c4fff71126b946570d0e Mon Sep 17 00:00:00 2001 From: Thomas Haas Date: Tue, 1 Apr 2025 19:56:51 +0200 Subject: [PATCH 16/33] - Fixed encoding of AggregateType and ArrayType variables - Allow encoding of Threads without ThreadReturn event (may occur if ThreadReturn is unreachable and gets deleted) --- .../dartagnan/encoding/EncodingContext.java | 76 ++++++++----------- .../dartagnan/encoding/ProgramEncoder.java | 31 ++++---- 2 files changed, 51 insertions(+), 56 deletions(-) diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/EncodingContext.java b/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/EncodingContext.java index 0f3a79ebbc..6db9171776 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/EncodingContext.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/EncodingContext.java @@ -1,39 +1,12 @@ package com.dat3m.dartagnan.encoding; -import java.math.BigInteger; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.sosy_lab.common.configuration.InvalidConfigurationException; -import org.sosy_lab.common.configuration.Option; -import org.sosy_lab.common.configuration.Options; -import org.sosy_lab.java_smt.api.BitvectorFormula; -import org.sosy_lab.java_smt.api.BitvectorFormulaManager; -import org.sosy_lab.java_smt.api.BooleanFormula; -import org.sosy_lab.java_smt.api.BooleanFormulaManager; -import org.sosy_lab.java_smt.api.Formula; -import org.sosy_lab.java_smt.api.FormulaManager; -import org.sosy_lab.java_smt.api.IntegerFormulaManager; -import org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula; - -import static com.dat3m.dartagnan.configuration.OptionNames.IDL_TO_SAT; -import static com.dat3m.dartagnan.configuration.OptionNames.MERGE_CF_VARS; -import static com.dat3m.dartagnan.configuration.OptionNames.USE_INTEGERS; import com.dat3m.dartagnan.configuration.ProgressModel; import com.dat3m.dartagnan.encoding.formulas.TupleFormula; import com.dat3m.dartagnan.encoding.formulas.TupleFormulaManager; import com.dat3m.dartagnan.expression.Expression; import com.dat3m.dartagnan.expression.Type; import com.dat3m.dartagnan.expression.integers.IntCmpOp; -import com.dat3m.dartagnan.expression.type.AggregateType; -import com.dat3m.dartagnan.expression.type.ArrayType; -import com.dat3m.dartagnan.expression.type.BooleanType; -import com.dat3m.dartagnan.expression.type.IntegerType; -import com.dat3m.dartagnan.expression.type.TypeFactory; +import com.dat3m.dartagnan.expression.type.*; import com.dat3m.dartagnan.program.Register; import com.dat3m.dartagnan.program.analysis.BranchEquivalence; import com.dat3m.dartagnan.program.analysis.ExecutionAnalysis; @@ -42,13 +15,7 @@ import com.dat3m.dartagnan.program.event.Event; import com.dat3m.dartagnan.program.event.MemoryEvent; import com.dat3m.dartagnan.program.event.RegWriter; -import static com.dat3m.dartagnan.program.event.Tag.INIT; -import static com.dat3m.dartagnan.program.event.Tag.WRITE; -import com.dat3m.dartagnan.program.event.core.CondJump; -import com.dat3m.dartagnan.program.event.core.Load; -import com.dat3m.dartagnan.program.event.core.MemoryCoreEvent; -import com.dat3m.dartagnan.program.event.core.NamedBarrier; -import com.dat3m.dartagnan.program.event.core.Store; +import com.dat3m.dartagnan.program.event.core.*; import com.dat3m.dartagnan.program.memory.MemoryObject; import com.dat3m.dartagnan.verification.Context; import com.dat3m.dartagnan.verification.VerificationTask; @@ -56,6 +23,24 @@ import com.dat3m.dartagnan.wmm.analysis.RelationAnalysis; import com.dat3m.dartagnan.wmm.axiom.Acyclicity; import com.dat3m.dartagnan.wmm.utils.graph.EventGraph; +import com.google.common.base.Preconditions; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.sosy_lab.common.configuration.InvalidConfigurationException; +import org.sosy_lab.common.configuration.Option; +import org.sosy_lab.common.configuration.Options; +import org.sosy_lab.java_smt.api.*; +import org.sosy_lab.java_smt.api.NumeralFormula.IntegerFormula; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static com.dat3m.dartagnan.configuration.OptionNames.*; +import static com.dat3m.dartagnan.program.event.Tag.INIT; +import static com.dat3m.dartagnan.program.event.Tag.WRITE; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; @@ -503,15 +488,20 @@ Formula makeVariable(String name, Type type) { return formulaManager.getBitvectorFormulaManager().makeVariable(integerType.getBitWidth(), name); } } - if (type instanceof AggregateType || type instanceof ArrayType) { - final Map primitives = TypeFactory.getInstance().decomposeIntoPrimitives(type); - if (primitives != null) { - final List elements = new ArrayList<>(); - for (Map.Entry entry : primitives.entrySet()) { - elements.add(makeVariable(name + "@" + entry.getKey(), entry.getValue())); - } - return tupleFormulaManager.makeTuple(elements); + if (type instanceof AggregateType aggType) { + final List fields = new ArrayList<>(aggType.getFields().size()); + for (TypeOffset field : aggType.getFields()) { + fields.add(makeVariable(name + "@" + field.offset(), field.type())); + } + return tupleFormulaManager.makeTuple(fields); + } + if (type instanceof ArrayType arrType) { + Preconditions.checkArgument(arrType.hasKnownNumElements(), "Cannot encode array of unknown size."); + final List elements = new ArrayList<>(arrType.getNumElements()); + for (int i = 0; i < arrType.getNumElements(); i++) { + elements.add(makeVariable(name + "[" + i + "]", arrType.getElementType())); } + return tupleFormulaManager.makeTuple(elements); } throw new UnsupportedOperationException(String.format("Cannot encode variable of type %s.", type)); } diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/ProgramEncoder.java b/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/ProgramEncoder.java index adebbecd50..fe188c829d 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/ProgramEncoder.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/ProgramEncoder.java @@ -263,19 +263,24 @@ private BooleanFormula encodeThreadJoining() { enc.add(bmgr.implication(bmgr.and(terminated, joinCf), joinExec)); final List returns = join.getJoinThread().getEvents(ThreadReturn.class); - Verify.verify(returns.size() == 1, "Unexpected number of ThreadReturn events."); - final ThreadReturn ret = returns.get(0); - // FIXME: here we assume that proper thread termination implies that ThreadReturn was executed. - // While this should be true, we currently do not make explicit checks for this, so the code - // is a little dangerous. - if (ret.hasValue()) { - enc.add(bmgr.implication( - joinExec, - context.equal( - context.result(join), - context.encodeExpressionAt(ret.getValue().get(), ret) - ) - )); + Verify.verify(returns.size() <= 1, "Unexpected number of ThreadReturn events."); + // NOTE: No ThreadReturn is currently allowed, if the ThreadReturn event is unreachable and thus is deletable. + // In this case, the thread never terminates properly, so we do not encode anything. + // TODO: We might want to make ThreadReturn non-deletable, at least the one we generate in ThreadCreation? + if (returns.size() == 1) { + final ThreadReturn ret = returns.get(0); + // FIXME: here we assume that proper thread termination implies that ThreadReturn was executed. + // While this should be true, we currently do not make explicit checks for this, so the code + // is a little dangerous. + if (ret.hasValue()) { + enc.add(bmgr.implication( + joinExec, + context.equal( + context.result(join), + context.encodeExpressionAt(ret.getValue().get(), ret) + ) + )); + } } } From abd149bcd78f65325959658effee2d32c85bcf57 Mon Sep 17 00:00:00 2001 From: Thomas Haas Date: Wed, 2 Apr 2025 16:39:03 +0200 Subject: [PATCH 17/33] Cleanup --- .../dartagnan/encoding/ProgramEncoder.java | 4 +- .../dartagnan/program/event/CallEvent.java | 4 +- .../program/event/common/CallBase.java | 2 +- .../event/core/threading/ThreadArgument.java | 11 ++-- .../event/core/threading/ThreadCreate.java | 7 --- .../event/core/threading/ThreadJoin.java | 7 --- .../event/core/threading/ThreadStart.java | 7 --- .../processing/NaiveDevirtualisation.java | 51 +++++-------------- .../program/processing/ThreadCreation.java | 36 ++++++------- 9 files changed, 40 insertions(+), 89 deletions(-) diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/ProgramEncoder.java b/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/ProgramEncoder.java index fe188c829d..ba53d278bd 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/ProgramEncoder.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/encoding/ProgramEncoder.java @@ -270,8 +270,10 @@ private BooleanFormula encodeThreadJoining() { if (returns.size() == 1) { final ThreadReturn ret = returns.get(0); // FIXME: here we assume that proper thread termination implies that ThreadReturn was executed. - // While this should be true, we currently do not make explicit checks for this, so the code + // While this should be true, we currently do not explicitly checks for this, so the code // is a little dangerous. + // It would probably good to give each thread a single ThreadReturn event that is executed + // IFF the thread terminates properly. if (ret.hasValue()) { enc.add(bmgr.implication( joinExec, diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/CallEvent.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/CallEvent.java index 4b32797508..46729f7c7c 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/CallEvent.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/CallEvent.java @@ -11,9 +11,7 @@ A CallEvent is an event that abstractly calls a "callable" (i.e., function) with arguments. Currently, - The only callables are functions - - The only call events are function calls - TODO: - ThreadCreation shall be a callable. + - The only call events are function calls and (dynamic) thread creation. */ public interface CallEvent extends RegReader { diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/common/CallBase.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/common/CallBase.java index e07798019c..9fe5cd74ce 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/common/CallBase.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/common/CallBase.java @@ -68,7 +68,7 @@ public void setCallTarget(Expression callTarget) { @Override public Set getRegisterReads() { final Set regReads = new HashSet<>(); - Register.collectRegisterReads(callTarget, UsageType.ADDR, regReads); + Register.collectRegisterReads(callTarget, UsageType.CTRL, regReads); Register.collectRegisterReads(arguments, UsageType.DATA, regReads); return regReads; } diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadArgument.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadArgument.java index 0fbf80e526..8308fe1e21 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadArgument.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadArgument.java @@ -2,7 +2,10 @@ import com.dat3m.dartagnan.encoding.EncodingContext; import com.dat3m.dartagnan.program.Register; -import com.dat3m.dartagnan.program.event.*; +import com.dat3m.dartagnan.program.event.AbstractEvent; +import com.dat3m.dartagnan.program.event.Event; +import com.dat3m.dartagnan.program.event.EventUser; +import com.dat3m.dartagnan.program.event.RegWriter; import com.google.common.base.Preconditions; import org.sosy_lab.java_smt.api.BooleanFormula; @@ -65,12 +68,6 @@ public ThreadArgument getCopy() { return new ThreadArgument(this); } - @Override - public T accept(EventVisitor visitor) { - // TODO - return visitor.visitEvent(this); - } - @Override public Set getReferencedEvents() { return Set.of(creator); diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadCreate.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadCreate.java index e87306e37e..c83e875ae2 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadCreate.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadCreate.java @@ -5,7 +5,6 @@ import com.dat3m.dartagnan.program.Register; import com.dat3m.dartagnan.program.Thread; import com.dat3m.dartagnan.program.event.AbstractEvent; -import com.dat3m.dartagnan.program.event.EventVisitor; import com.dat3m.dartagnan.program.event.RegReader; import java.util.ArrayList; @@ -44,12 +43,6 @@ public ThreadCreate getCopy() { return new ThreadCreate(this); } - @Override - public T accept(EventVisitor visitor) { - // TODO - return visitor.visitEvent(this); - } - @Override public Set getRegisterReads() { final Set regReads = new HashSet<>(); diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadJoin.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadJoin.java index 44637a6151..648c23a715 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadJoin.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadJoin.java @@ -4,7 +4,6 @@ import com.dat3m.dartagnan.program.Thread; import com.dat3m.dartagnan.program.event.AbstractEvent; import com.dat3m.dartagnan.program.event.BlockingEvent; -import com.dat3m.dartagnan.program.event.EventVisitor; import com.dat3m.dartagnan.program.event.RegWriter; import com.google.common.base.Preconditions; @@ -48,10 +47,4 @@ public ThreadJoin getCopy() { return new ThreadJoin(this); } - @Override - public T accept(EventVisitor visitor) { - // TODO - return visitor.visitEvent(this); - } - } diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadStart.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadStart.java index 18d867e738..c7e052e51e 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadStart.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/event/core/threading/ThreadStart.java @@ -3,7 +3,6 @@ import com.dat3m.dartagnan.program.event.AbstractEvent; import com.dat3m.dartagnan.program.event.Event; import com.dat3m.dartagnan.program.event.EventUser; -import com.dat3m.dartagnan.program.event.EventVisitor; import java.util.Map; import java.util.Set; @@ -53,12 +52,6 @@ public ThreadStart getCopy() { return new ThreadStart(this); } - @Override - public T accept(EventVisitor visitor) { - // TODO - return visitor.visitEvent(this); - } - @Override public Set getReferencedEvents() { return Set.of(creator); diff --git a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/NaiveDevirtualisation.java b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/NaiveDevirtualisation.java index 72f265ee51..e2d6d6044d 100644 --- a/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/NaiveDevirtualisation.java +++ b/dartagnan/src/main/java/com/dat3m/dartagnan/program/processing/NaiveDevirtualisation.java @@ -19,13 +19,12 @@ import com.dat3m.dartagnan.program.event.core.Label; import com.dat3m.dartagnan.program.memory.Memory; import com.dat3m.dartagnan.program.memory.MemoryObject; -import com.google.common.base.Verify; +import com.google.common.base.Preconditions; import com.google.common.collect.Iterables; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import java.util.*; -import java.util.stream.Collectors; /* This pass performs "devirtualisation" (replacing indirect/dynamic calls by direct/static calls). @@ -110,9 +109,7 @@ private boolean assignAddressToFunction(Function func, Map } private void applyTransformerToEvent(Event e, ExpressionVisitor transformer) { - if (e instanceof CallEvent call) { - call.getArguments().replaceAll(arg -> arg.accept(transformer)); - } else if (e instanceof RegReader reader) { + if (e instanceof RegReader reader) { reader.transformExpressions(transformer); } } @@ -138,11 +135,11 @@ private void devirtualise(Function function, Map func2Addr logger.warn("Cannot resolve dynamic call \"{}\", no matching functions found.", call); } - logger.trace("Devirtualizing call \"{}\" with possible targets: {}", call, possibleTargets); + logger.trace("Devirtualising call \"{}\" with possible targets: {}", call, possibleTargets); final List