double c;
};
+struct char_char_double {
+ uint8_t a;
+ uint8_t b;
+ double c;
+};
+
+struct char_char_float {
+ uint8_t a;
+ uint8_t b;
+ float c;
+};
+
struct quad
rust_dbg_abi_1(struct quad q) {
struct quad qq = { q.c + 1,
return ff;
}
+struct char_char_double
+rust_dbg_abi_3(struct char_char_double a) {
+ struct char_char_double ccd = { a.a + 1,
+ a.b - 1,
+ a.c + 1.0 };
+ return ccd;
+}
+
+struct char_char_float
+rust_dbg_abi_4(struct char_char_float a) {
+ struct char_char_float ccd = { a.a + 1,
+ a.b - 1,
+ a.c + 1.0 };
+ return ccd;
+}
+
+
int
rust_dbg_static_mut = 3;
}
#endif
+
+#define OPTION_TAG_NONE (0)
+#define OPTION_TAG_SOME (1)
+
+struct U8TaggedEnumOptionU64 {
+ uint8_t tag;
+ union {
+ uint64_t some;
+ };
+};
+
+struct U8TaggedEnumOptionU64
+rust_dbg_new_some_u64(uint64_t some) {
+ struct U8TaggedEnumOptionU64 r = {
+ .tag = OPTION_TAG_SOME,
+ .some = some,
+ };
+ return r;
+}
+
+struct U8TaggedEnumOptionU64
+rust_dbg_new_none_u64(void) {
+ struct U8TaggedEnumOptionU64 r = {
+ .tag = OPTION_TAG_NONE,
+ };
+ return r;
+}
+
+int32_t
+rust_dbg_unpack_option_u64(struct U8TaggedEnumOptionU64 o, uint64_t *into) {
+ assert(into);
+ switch (o.tag) {
+ case OPTION_TAG_SOME:
+ *into = o.some;
+ return 1;
+ case OPTION_TAG_NONE:
+ return 0;
+ default:
+ assert(0 && "unexpected tag");
+ return 0;
+ }
+}
+
+struct U8TaggedEnumOptionU64U64 {
+ uint8_t tag;
+ union {
+ struct {
+ uint64_t a;
+ uint64_t b;
+ } some;
+ };
+};
+
+struct U8TaggedEnumOptionU64U64
+rust_dbg_new_some_u64u64(uint64_t a, uint64_t b) {
+ struct U8TaggedEnumOptionU64U64 r = {
+ .tag = OPTION_TAG_SOME,
+ .some = { .a = a, .b = b },
+ };
+ return r;
+}
+
+struct U8TaggedEnumOptionU64U64
+rust_dbg_new_none_u64u64(void) {
+ struct U8TaggedEnumOptionU64U64 r = {
+ .tag = OPTION_TAG_NONE,
+ };
+ return r;
+}
+
+int32_t
+rust_dbg_unpack_option_u64u64(struct U8TaggedEnumOptionU64U64 o, uint64_t *a, uint64_t *b) {
+ assert(a);
+ assert(b);
+ switch (o.tag) {
+ case OPTION_TAG_SOME:
+ *a = o.some.a;
+ *b = o.some.b;
+ return 1;
+ case OPTION_TAG_NONE:
+ return 0;
+ default:
+ assert(0 && "unexpected tag");
+ return 0;
+ }
+}