// MIR for `generic_in_place` after PreCodegen

fn generic_in_place(_1: *mut Box<[T]>) -> () {
    debug ptr => _1;
    let mut _0: ();
    scope 1 (inlined drop_in_place::<Box<[T]>> - shim(Some(Box<[T]>))) {
        scope 2 (inlined <Box<[T]> as Drop>::drop) {
            let _2: std::ptr::NonNull<[T]>;
            let mut _3: *mut [T];
            let mut _4: *const [T];
            let _9: ();
            scope 3 {
                scope 4 {
                    scope 17 (inlined Layout::size) {
                    }
                    scope 18 (inlined std::ptr::Unique::<[T]>::cast::<u8>) {
                        let mut _8: std::ptr::NonNull<u8>;
                        scope 19 (inlined NonNull::<[T]>::cast::<u8>) {
                            let mut _7: *mut u8;
                            scope 20 (inlined NonNull::<[T]>::as_ptr) {
                            }
                        }
                    }
                    scope 21 (inlined <NonNull<u8> as From<std::ptr::Unique<u8>>>::from) {
                        scope 22 (inlined std::ptr::Unique::<u8>::as_non_null_ptr) {
                        }
                    }
                    scope 23 (inlined <std::alloc::Global as Allocator>::deallocate) {
                        scope 24 (inlined std::alloc::Global::deallocate_impl) {
                            scope 25 (inlined std::alloc::Global::deallocate_impl_runtime) {
                                scope 26 (inlined Layout::size) {
                                }
                                scope 27 (inlined alloc::alloc::dealloc_nonnull) {
                                    scope 28 (inlined Layout::size) {
                                    }
                                    scope 29 (inlined Layout::alignment) {
                                    }
                                }
                            }
                        }
                    }
                }
                scope 5 (inlined std::ptr::Unique::<[T]>::as_ptr) {
                    scope 6 (inlined NonNull::<[T]>::as_ptr) {
                    }
                }
                scope 7 (inlined Layout::for_value_raw::<[T]>) {
                    let mut _5: usize;
                    let mut _6: std::mem::Alignment;
                    scope 8 {
                        scope 16 (inlined #[track_caller] Layout::from_size_alignment_unchecked) {
                        }
                    }
                    scope 9 (inlined size_of_val_raw::<[T]>) {
                    }
                    scope 10 (inlined std::mem::Alignment::of_val_raw::<[T]>) {
                        scope 11 {
                            scope 13 (inlined #[track_caller] std::mem::Alignment::new_unchecked) {
                                scope 14 (inlined core::ub_checks::check_language_ub) {
                                    scope 15 (inlined core::ub_checks::check_language_ub::runtime) {
                                    }
                                }
                            }
                        }
                        scope 12 (inlined align_of_val_raw::<[T]>) {
                        }
                    }
                }
            }
        }
    }

    bb0: {
        StorageLive(_3);
        StorageLive(_8);
        StorageLive(_2);
        _2 = copy (((*_1).0: std::ptr::Unique<[T]>).0: std::ptr::NonNull<[T]>);
        StorageLive(_4);
        _3 = copy _2 as *mut [T] (Transmute);
        _4 = copy _2 as *const [T] (Transmute);
        _5 = std::intrinsics::size_of_val::<[T]>(move _4) -> [return: bb1, unwind unreachable];
    }

    bb1: {
        _6 = const <T as std::mem::SizedTypeProperties>::ALIGN as std::mem::Alignment (Transmute);
        StorageDead(_4);
        switchInt(copy _5) -> [0: bb3, otherwise: bb2];
    }

    bb2: {
        StorageLive(_7);
        _7 = copy _3 as *mut u8 (PtrToPtr);
        _8 = copy _7 as std::ptr::NonNull<u8> (Transmute);
        StorageDead(_7);
        _9 = alloc::alloc::__rust_dealloc(move _8, move _5, move _6) -> [return: bb3, unwind unreachable];
    }

    bb3: {
        StorageDead(_2);
        StorageDead(_8);
        StorageDead(_3);
        return;
    }
}
