Auto-generate files after cl/595002227
diff --git a/ruby/ext/google/protobuf_c/ruby-upb.c b/ruby/ext/google/protobuf_c/ruby-upb.c
index 87f95d0..0b5f52e 100644
--- a/ruby/ext/google/protobuf_c/ruby-upb.c
+++ b/ruby/ext/google/protobuf_c/ruby-upb.c
@@ -6880,7 +6880,7 @@
 }
 
 static void _upb_Decoder_MungeInt32(wireval* val) {
-  if (!UPB_PRIVATE(_upb_IsLittleEndian)()) {
+  if (!upb_IsLittleEndian()) {
     /* The next stage will memcpy(dst, &val, 4) */
     val->uint32_val = val->uint64_val;
   }
@@ -7102,7 +7102,7 @@
   arr->UPB_PRIVATE(size) += count;
   // Note: if/when the decoder supports multi-buffer input, we will need to
   // handle buffer seams here.
-  if (UPB_PRIVATE(_upb_IsLittleEndian)()) {
+  if (upb_IsLittleEndian()) {
     ptr = upb_EpsCopyInputStream_Copy(&d->input, ptr, mem, val->size);
   } else {
     int delta = upb_EpsCopyInputStream_PushLimit(&d->input, ptr, val->size);
@@ -7426,7 +7426,7 @@
   }
   uint64_t msg_head;
   memcpy(&msg_head, msg, 8);
-  msg_head = UPB_PRIVATE(_upb_BigEndian64)(msg_head);
+  msg_head = upb_BigEndian64(msg_head);
   if (UPB_PRIVATE(_upb_MiniTable_RequiredMask)(m) & ~msg_head) {
     d->missing_required = true;
   }
@@ -8153,12 +8153,12 @@
 }
 
 static void encode_fixed64(upb_encstate* e, uint64_t val) {
-  val = UPB_PRIVATE(_upb_BigEndian64)(val);
+  val = upb_BigEndian64(val);
   encode_bytes(e, &val, sizeof(uint64_t));
 }
 
 static void encode_fixed32(upb_encstate* e, uint32_t val) {
-  val = UPB_PRIVATE(_upb_BigEndian32)(val);
+  val = upb_BigEndian32(val);
   encode_bytes(e, &val, sizeof(uint32_t));
 }
 
@@ -8209,18 +8209,18 @@
   const char* data = _upb_array_constptr(arr);
   const char* ptr = data + bytes - elem_size;
 
-  if (tag || !UPB_PRIVATE(_upb_IsLittleEndian)()) {
+  if (tag || !upb_IsLittleEndian()) {
     while (true) {
       if (elem_size == 4) {
         uint32_t val;
         memcpy(&val, ptr, sizeof(val));
-        val = UPB_PRIVATE(_upb_BigEndian32)(val);
+        val = upb_BigEndian32(val);
         encode_bytes(e, &val, elem_size);
       } else {
         UPB_ASSERT(elem_size == 8);
         uint64_t val;
         memcpy(&val, ptr, sizeof(val));
-        val = UPB_PRIVATE(_upb_BigEndian64)(val);
+        val = upb_BigEndian64(val);
         encode_bytes(e, &val, elem_size);
       }
 
@@ -8575,7 +8575,7 @@
       m->UPB_PRIVATE(required_count)) {
     uint64_t msg_head;
     memcpy(&msg_head, msg, 8);
-    msg_head = UPB_PRIVATE(_upb_BigEndian64)(msg_head);
+    msg_head = upb_BigEndian64(msg_head);
     if (UPB_PRIVATE(_upb_MiniTable_RequiredMask)(m) & ~msg_head) {
       encode_err(e, kUpb_EncodeStatus_MissingRequired);
     }
diff --git a/ruby/ext/google/protobuf_c/ruby-upb.h b/ruby/ext/google/protobuf_c/ruby-upb.h
index dfa9ffe..302e9c2 100755
--- a/ruby/ext/google/protobuf_c/ruby-upb.h
+++ b/ruby/ext/google/protobuf_c/ruby-upb.h
@@ -4106,8 +4106,8 @@
 //   - '1' for one-byte tags (field numbers 1-15)
 //   - '2' for two-byte tags (field numbers 16-2048)
 
-#ifndef UPB_WIRE_DECODE_INTERNAL_FAST_H_
-#define UPB_WIRE_DECODE_INTERNAL_FAST_H_
+#ifndef UPB_WIRE_INTERNAL_DECODE_FAST_H_
+#define UPB_WIRE_INTERNAL_DECODE_FAST_H_
 
 
 // Must be last.
@@ -4175,6 +4175,7 @@
 TAGBYTES(r)
 
 #undef F
+#undef UTF8
 #undef TAGBYTES
 
 /* sub-message fields *********************************************************/
@@ -4197,9 +4198,9 @@
 TAGBYTES(o)
 TAGBYTES(r)
 
-#undef TAGBYTES
-#undef SIZES
 #undef F
+#undef SIZES
+#undef TAGBYTES
 
 #undef UPB_PARSE_PARAMS
 
@@ -4208,7 +4209,7 @@
 #endif
 
 
-#endif /* UPB_WIRE_DECODE_INTERNAL_FAST_H_ */
+#endif /* UPB_WIRE_INTERNAL_DECODE_FAST_H_ */
 // IWYU pragma: end_exports
 
 #endif  // UPB_GENERATED_CODE_SUPPORT_H_
@@ -12714,6 +12715,44 @@
 
 #endif /* UPB_HASH_INT_TABLE_H_ */
 
+#ifndef UPB_BASE_INTERNAL_ENDIAN_H_
+#define UPB_BASE_INTERNAL_ENDIAN_H_
+
+#include <stdint.h>
+
+// Must be last.
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+UPB_INLINE bool upb_IsLittleEndian(void) {
+  const int x = 1;
+  return *(char*)&x == 1;
+}
+
+UPB_INLINE uint32_t upb_BigEndian32(uint32_t val) {
+  if (upb_IsLittleEndian()) return val;
+
+  return ((val & 0xff) << 24) | ((val & 0xff00) << 8) |
+         ((val & 0xff0000) >> 8) | ((val & 0xff000000) >> 24);
+}
+
+UPB_INLINE uint64_t upb_BigEndian64(uint64_t val) {
+  if (upb_IsLittleEndian()) return val;
+
+  const uint64_t hi = ((uint64_t)upb_BigEndian32((uint32_t)val)) << 32;
+  const uint64_t lo = upb_BigEndian32((uint32_t)(val >> 32));
+  return hi | lo;
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+
+#endif /* UPB_BASE_INTERNAL_ENDIAN_H_ */
+
 #ifndef UPB_WIRE_INTERNAL_CONSTANTS_H_
 #define UPB_WIRE_INTERNAL_CONSTANTS_H_
 
@@ -12850,43 +12889,6 @@
 
 #endif /* UPB_WIRE_INTERNAL_DECODER_H_ */
 
-#ifndef UPB_WIRE_INTERNAL_ENDIAN_H_
-#define UPB_WIRE_INTERNAL_ENDIAN_H_
-
-#include <stdint.h>
-
-// Must be last.
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-UPB_INLINE bool UPB_PRIVATE(_upb_IsLittleEndian)(void) {
-  const int x = 1;
-  return *(char*)&x == 1;
-}
-
-UPB_INLINE uint32_t UPB_PRIVATE(_upb_BigEndian32)(uint32_t val) {
-  if (UPB_PRIVATE(_upb_IsLittleEndian)()) return val;
-
-  return ((val & 0xff) << 24) | ((val & 0xff00) << 8) |
-         ((val & 0xff0000) >> 8) | ((val & 0xff000000) >> 24);
-}
-
-UPB_INLINE uint64_t UPB_PRIVATE(_upb_BigEndian64)(uint64_t val) {
-  if (UPB_PRIVATE(_upb_IsLittleEndian)()) return val;
-
-  return ((uint64_t)UPB_PRIVATE(_upb_BigEndian32)((uint32_t)val) << 32) |
-         UPB_PRIVATE(_upb_BigEndian32)((uint32_t)(val >> 32));
-}
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-
-#endif /* UPB_WIRE_INTERNAL_ENDIAN_H_ */
-
 #ifndef UPB_WIRE_READER_H_
 #define UPB_WIRE_READER_H_
 
@@ -13034,7 +13036,7 @@
 UPB_INLINE const char* upb_WireReader_ReadFixed32(const char* ptr, void* val) {
   uint32_t uval;
   memcpy(&uval, ptr, 4);
-  uval = UPB_PRIVATE(_upb_BigEndian32)(uval);
+  uval = upb_BigEndian32(uval);
   memcpy(val, &uval, 4);
   return ptr + 4;
 }
@@ -13047,7 +13049,7 @@
 UPB_INLINE const char* upb_WireReader_ReadFixed64(const char* ptr, void* val) {
   uint64_t uval;
   memcpy(&uval, ptr, 8);
-  uval = UPB_PRIVATE(_upb_BigEndian64)(uval);
+  uval = upb_BigEndian64(uval);
   memcpy(val, &uval, 8);
   return ptr + 8;
 }