using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Explicit)]
struct BrokenBeyondRepair
{
[FieldOffset(0)] public int i32_0;
[FieldOffset(0)] public float f32_0;
[FieldOffset(4)] public int i32_1;
[FieldOffset(4)] public float f32_1;
[FieldOffset(0)] public double f64;
[FieldOffset(0)] public long i64;
}
public class Test
{
public static void Main()
{
var obj = new BrokenBeyondRepair();
obj.f64 = Math.PI;
Console.WriteLine("i32[0] = {0}", obj.i32_0);
Console.WriteLine("i32[1] = {0}", obj.i32_1);
Console.WriteLine("f32[0] = {0}", obj.f32_0);
Console.WriteLine("f32[1] = {0}", obj.f32_1);
Console.WriteLine("i64[0] = {0}", obj.i64);
Console.WriteLine("f64[0] = {0}", obj.f64);
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uUnVudGltZS5JbnRlcm9wU2VydmljZXM7CgpbU3RydWN0TGF5b3V0KExheW91dEtpbmQuRXhwbGljaXQpXQpzdHJ1Y3QgQnJva2VuQmV5b25kUmVwYWlyCnsKCVtGaWVsZE9mZnNldCgwKV0gcHVibGljIGludCBpMzJfMDsKCVtGaWVsZE9mZnNldCgwKV0gcHVibGljIGZsb2F0IGYzMl8wOwoJW0ZpZWxkT2Zmc2V0KDQpXSBwdWJsaWMgaW50IGkzMl8xOwoJW0ZpZWxkT2Zmc2V0KDQpXSBwdWJsaWMgZmxvYXQgZjMyXzE7CglbRmllbGRPZmZzZXQoMCldIHB1YmxpYyBkb3VibGUgZjY0OwoJW0ZpZWxkT2Zmc2V0KDApXSBwdWJsaWMgbG9uZyBpNjQ7Cn0KCnB1YmxpYyBjbGFzcyBUZXN0CnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKCkKCXsKCQl2YXIgb2JqID0gbmV3IEJyb2tlbkJleW9uZFJlcGFpcigpOwoJCW9iai5mNjQgPSBNYXRoLlBJOwoJCUNvbnNvbGUuV3JpdGVMaW5lKCJpMzJbMF0gPSB7MH0iLCBvYmouaTMyXzApOw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