// WARNING: This output format is intended for human consumers only // and is subject to change without notice. Knock yourself out. fn main() -> () { let mut _0: (); let _1: winit::event_loop::EventLoop<()>; let mut _2: std::result::Result, winit::error::EventLoopError>; let mut _4: std::result::Result; let mut _5: winit::window::WindowBuilder; let _6: &winit::event_loop::EventLoopWindowTarget<()>; let _7: &winit::event_loop::EventLoop<()>; let _8: (); let _9: &winit::event_loop::EventLoopWindowTarget<()>; let mut _10: &winit::event_loop::EventLoop<()>; let mut _11: winit::event_loop::ControlFlow; let _12: (); let _13: &winit::event_loop::EventLoopWindowTarget<()>; let mut _14: &winit::event_loop::EventLoop<()>; let mut _15: winit::event_loop::ControlFlow; let mut _17: std::result::Result>, softbuffer::SoftBufferError>; let mut _18: winit::raw_window_handle::DisplayHandle<'_>; let mut _19: std::result::Result, winit::raw_window_handle::HandleError>; let mut _20: &winit::window::Window; let mut _22: std::result::Result, winit::raw_window_handle::WindowHandle<'_>>, softbuffer::SoftBufferError>; let _23: &softbuffer::Context>; let mut _24: winit::raw_window_handle::WindowHandle<'_>; let mut _25: std::result::Result, winit::raw_window_handle::HandleError>; let mut _26: &winit::window::Window; let _28: (); let mut _29: std::result::Result<(), winit::error::EventLoopError>; let mut _30: winit::event_loop::EventLoop<()>; let mut _31: {closure@src/main.rs:34:14: 34:27}; let mut _32: &winit::window::Window; let mut _33: &mut softbuffer::Surface, winit::raw_window_handle::WindowHandle<'_>>; let mut _34: &mut game::GameState; let mut _35: bool; let mut _36: bool; scope 1 { debug event_loop => _1; let _3: winit::window::Window; scope 2 { debug window => _3; let _16: softbuffer::Context>; scope 3 { debug context => _16; let mut _21: softbuffer::Surface, winit::raw_window_handle::WindowHandle<'_>>; scope 4 { debug surface => _21; let mut _27: game::GameState; scope 5 { debug game => _27; } } } } } bb0: { _36 = const false; _35 = const false; _2 = EventLoop::<()>::new() -> [return: bb1, unwind continue]; } bb1: { _1 = Result::, EventLoopError>::unwrap(move _2) -> [return: bb2, unwind continue]; } bb2: { _36 = const true; _5 = WindowBuilder::new() -> [return: bb3, unwind: bb32]; } bb3: { _35 = const true; _7 = &_1; _6 = as Deref>::deref(_7) -> [return: bb4, unwind: bb30]; } bb4: { _35 = const false; _4 = WindowBuilder::build::<()>(move _5, _6) -> [return: bb5, unwind: bb30]; } bb5: { _35 = const false; _3 = Result::::unwrap(move _4) -> [return: bb6, unwind: bb32]; } bb6: { _10 = &_1; _9 = as Deref>::deref(move _10) -> [return: bb7, unwind: bb27]; } bb7: { _11 = winit::event_loop::ControlFlow::Poll; _8 = EventLoopWindowTarget::<()>::set_control_flow(_9, move _11) -> [return: bb8, unwind: bb27]; } bb8: { _14 = &_1; _13 = as Deref>::deref(move _14) -> [return: bb9, unwind: bb27]; } bb9: { _15 = winit::event_loop::ControlFlow::Wait; _12 = EventLoopWindowTarget::<()>::set_control_flow(_13, move _15) -> [return: bb10, unwind: bb27]; } bb10: { _20 = &_3; _19 = ::display_handle(move _20) -> [return: bb11, unwind: bb27]; } bb11: { _18 = Result::, HandleError>::unwrap(move _19) -> [return: bb12, unwind: bb27]; } bb12: { _17 = softbuffer::Context::>::new(move _18) -> [return: bb13, unwind: bb27]; } bb13: { _16 = Result::>, SoftBufferError>::unwrap(move _17) -> [return: bb14, unwind: bb27]; } bb14: { _23 = &_16; _26 = &_3; _25 = ::window_handle(move _26) -> [return: bb15, unwind: bb26]; } bb15: { _24 = Result::, HandleError>::unwrap(move _25) -> [return: bb16, unwind: bb26]; } bb16: { _22 = Surface::, WindowHandle<'_>>::new(_23, move _24) -> [return: bb17, unwind: bb26]; } bb17: { _21 = Result::, WindowHandle<'_>>, SoftBufferError>::unwrap(move _22) -> [return: bb18, unwind: bb26]; } bb18: { _27 = GameState::init() -> [return: bb19, unwind: bb25]; } bb19: { _36 = const false; _30 = move _1; _32 = &_3; _33 = &mut _21; _34 = &mut _27; _31 = {closure@src/main.rs:34:14: 34:27} { window: move _32, surface: move _33, game: move _34 }; _29 = EventLoop::<()>::run::<{closure@src/main.rs:34:14: 34:27}>(move _30, move _31) -> [return: bb20, unwind: bb25]; } bb20: { _28 = Result::<(), EventLoopError>::unwrap(move _29) -> [return: bb21, unwind: bb25]; } bb21: { drop(_21) -> [return: bb22, unwind: bb26]; } bb22: { drop(_16) -> [return: bb23, unwind: bb27]; } bb23: { drop(_3) -> [return: bb24, unwind: bb32]; } bb24: { _36 = const false; return; } bb25 (cleanup): { drop(_21) -> [return: bb26, unwind terminate(cleanup)]; } bb26 (cleanup): { drop(_16) -> [return: bb27, unwind terminate(cleanup)]; } bb27 (cleanup): { drop(_3) -> [return: bb32, unwind terminate(cleanup)]; } bb28 (cleanup): { resume; } bb29 (cleanup): { drop(_5) -> [return: bb32, unwind terminate(cleanup)]; } bb30 (cleanup): { switchInt(_35) -> [0: bb32, otherwise: bb29]; } bb31 (cleanup): { drop(_1) -> [return: bb28, unwind terminate(cleanup)]; } bb32 (cleanup): { switchInt(_36) -> [0: bb28, otherwise: bb31]; } } fn main::{closure#0}(_1: &mut {closure@src/main.rs:34:14: 34:27}, _2: Event<()>, _3: &EventLoopWindowTarget<()>) -> () { debug event => _2; debug elwt => _3; debug window => (*((*_1).0: &winit::window::Window)); debug surface => (*((*_1).1: &mut softbuffer::Surface, winit::raw_window_handle::WindowHandle<'_>>)); debug game => (*((*_1).2: &mut game::GameState)); let mut _0: (); let mut _4: isize; let mut _5: isize; let mut _6: isize; let mut _7: isize; let _8: winit::window::WindowId; let _9: &winit::window::WindowId; let mut _10: bool; let mut _11: &winit::window::WindowId; let _12: winit::window::WindowId; let mut _13: (std::option::Option>, std::option::Option>); let mut _15: std::option::Option>; let mut _16: u32; let mut _17: std::option::Option>; let mut _18: u32; let mut _19: isize; let mut _20: isize; let _23: (); let mut _24: std::result::Result<(), softbuffer::SoftBufferError>; let mut _26: std::result::Result, winit::raw_window_handle::WindowHandle<'_>>, softbuffer::SoftBufferError>; let _27: (); let mut _28: &mut [u32]; let mut _29: &mut softbuffer::Buffer<'_, winit::raw_window_handle::DisplayHandle<'_>, winit::raw_window_handle::WindowHandle<'_>>; let _30: (); let _31: (); let mut _32: &game::GameState; let mut _33: &mut softbuffer::Buffer<'_, winit::raw_window_handle::DisplayHandle<'_>, winit::raw_window_handle::WindowHandle<'_>>; let mut _34: (std::num::NonZero, std::num::NonZero); let _35: (); let mut _36: std::result::Result<(), softbuffer::SoftBufferError>; let mut _37: softbuffer::Buffer<'_, winit::raw_window_handle::DisplayHandle<'_>, winit::raw_window_handle::WindowHandle<'_>>; let _38: winit::window::WindowId; let _39: &winit::window::WindowId; let mut _40: bool; let mut _41: &winit::window::WindowId; let mut _42: &winit::window::WindowId; let _43: winit::window::WindowId; let mut _44: bool; let mut _45: &winit::window::WindowId; let mut _46: &winit::window::WindowId; let _47: winit::window::WindowId; let _48: (); let mut _49: &winit::window::Window; let mut _50: &winit::window::Window; let mut _51: &mut softbuffer::Surface, winit::raw_window_handle::WindowHandle<'_>>; let mut _52: &mut softbuffer::Surface, winit::raw_window_handle::WindowHandle<'_>>; let mut _53: &mut game::GameState; let mut _54: &mut game::GameState; let mut _55: &winit::window::Window; let mut _56: &winit::window::Window; let mut _57: bool; scope 1 { debug window_id => _8; debug window_id => _9; scope 2 { debug width => _21; debug height => _22; let _14: winit::dpi::PhysicalSize; let _21: std::num::NonZero; let _22: std::num::NonZero; let mut _25: softbuffer::Buffer<'_, winit::raw_window_handle::DisplayHandle<'_>, winit::raw_window_handle::WindowHandle<'_>>; scope 3 { debug size => _14; } scope 4 { debug buffer => _25; } } } scope 5 { debug window_id => _38; debug window_id => _39; } bb0: { _57 = const false; _7 = discriminant(_2); switchInt(move _7) -> [1: bb3, otherwise: bb32]; } bb1: { _5 = discriminant((((((_2 as WindowEvent).1: winit::event::WindowEvent) as KeyboardInput).1: winit::event::KeyEvent).1: winit::keyboard::Key)); switchInt(move _5) -> [0: bb2, otherwise: bb32]; } bb2: { _4 = discriminant((((((((_2 as WindowEvent).1: winit::event::WindowEvent) as KeyboardInput).1: winit::event::KeyEvent).1: winit::keyboard::Key) as Named).0: winit::keyboard::NamedKey)); switchInt(move _4) -> [42: bb28, otherwise: bb32]; } bb3: { _9 = &((_2 as WindowEvent).0: winit::window::WindowId); _49 = deref_copy ((*_1).0: &winit::window::Window); _12 = Window::id(_49) -> [return: bb4, unwind: bb34]; } bb4: { _11 = &_12; _10 = ::eq(_9, move _11) -> [return: bb5, unwind: bb34]; } bb5: { switchInt(move _10) -> [0: bb7, otherwise: bb6]; } bb6: { _8 = ((_2 as WindowEvent).0: winit::window::WindowId); _50 = deref_copy ((*_1).0: &winit::window::Window); _14 = Window::inner_size(_50) -> [return: bb8, unwind: bb34]; } bb7: { _6 = discriminant(((_2 as WindowEvent).1: winit::event::WindowEvent)); switchInt(move _6) -> [3: bb24, 9: bb1, otherwise: bb32]; } bb8: { _16 = (_14.0: u32); _15 = NonZero::::new(move _16) -> [return: bb9, unwind: bb34]; } bb9: { _18 = (_14.1: u32); _17 = NonZero::::new(move _18) -> [return: bb10, unwind: bb34]; } bb10: { _13 = (move _15, move _17); _20 = discriminant((_13.0: std::option::Option>)); switchInt(move _20) -> [1: bb11, otherwise: bb32]; } bb11: { _19 = discriminant((_13.1: std::option::Option>)); switchInt(move _19) -> [1: bb12, otherwise: bb32]; } bb12: { _21 = (((_13.0: std::option::Option>) as Some).0: std::num::NonZero); _22 = (((_13.1: std::option::Option>) as Some).0: std::num::NonZero); _51 = deref_copy ((*_1).1: &mut softbuffer::Surface, winit::raw_window_handle::WindowHandle<'_>>); _24 = Surface::, WindowHandle<'_>>::resize(_51, _21, _22) -> [return: bb13, unwind: bb34]; } bb13: { _23 = Result::<(), SoftBufferError>::unwrap(move _24) -> [return: bb14, unwind: bb34]; } bb14: { _52 = deref_copy ((*_1).1: &mut softbuffer::Surface, winit::raw_window_handle::WindowHandle<'_>>); _26 = Surface::, WindowHandle<'_>>::buffer_mut(_52) -> [return: bb15, unwind: bb34]; } bb15: { _25 = Result::, WindowHandle<'_>>, SoftBufferError>::unwrap(move _26) -> [return: bb16, unwind: bb34]; } bb16: { _57 = const true; _29 = &mut _25; _28 = , WindowHandle<'_>> as DerefMut>::deref_mut(move _29) -> [return: bb17, unwind: bb37]; } bb17: { _27 = core::slice::::fill(_28, const 0_u32) -> [return: bb18, unwind: bb37]; } bb18: { _53 = deref_copy ((*_1).2: &mut game::GameState); _30 = GameState::update(_53) -> [return: bb19, unwind: bb37]; } bb19: { _54 = deref_copy ((*_1).2: &mut game::GameState); _32 = &(*_54); _33 = &mut _25; _34 = (_21, _22); _31 = GameState::render(move _32, _33, move _34) -> [return: bb20, unwind: bb37]; } bb20: { _57 = const false; _37 = move _25; _36 = Buffer::<'_, DisplayHandle<'_>, WindowHandle<'_>>::present(move _37) -> [return: bb21, unwind: bb37]; } bb21: { _35 = Result::<(), SoftBufferError>::unwrap(move _36) -> [return: bb22, unwind: bb37]; } bb22: { _57 = const false; goto -> bb32; } bb23: { _48 = EventLoopWindowTarget::<()>::exit(_3) -> [return: bb38, unwind: bb34]; } bb24: { _39 = &((_2 as WindowEvent).0: winit::window::WindowId); _41 = _39; _55 = deref_copy ((*_1).0: &winit::window::Window); _43 = Window::id(_55) -> [return: bb25, unwind: bb34]; } bb25: { _42 = &_43; _40 = ::eq(move _41, move _42) -> [return: bb26, unwind: bb34]; } bb26: { switchInt(move _40) -> [0: bb32, otherwise: bb27]; } bb27: { _38 = ((_2 as WindowEvent).0: winit::window::WindowId); goto -> bb23; } bb28: { _39 = &((_2 as WindowEvent).0: winit::window::WindowId); _45 = _39; _56 = deref_copy ((*_1).0: &winit::window::Window); _47 = Window::id(_56) -> [return: bb29, unwind: bb34]; } bb29: { _46 = &_47; _44 = ::eq(move _45, move _46) -> [return: bb30, unwind: bb34]; } bb30: { switchInt(move _44) -> [0: bb32, otherwise: bb31]; } bb31: { _38 = ((_2 as WindowEvent).0: winit::window::WindowId); goto -> bb23; } bb32: { drop(_2) -> [return: bb33, unwind continue]; } bb33: { return; } bb34 (cleanup): { drop(_2) -> [return: bb35, unwind terminate(cleanup)]; } bb35 (cleanup): { resume; } bb36 (cleanup): { drop(_25) -> [return: bb34, unwind terminate(cleanup)]; } bb37 (cleanup): { switchInt(_57) -> [0: bb34, otherwise: bb36]; } bb38: { goto -> bb32; } } const PADDLE_SIZE: (u32, u32) = { let mut _0: (u32, u32); bb0: { _0 = (const 5_u32, const 50_u32); return; } } const BALL_RADIUS: u32 = { let mut _0: u32; bb0: { _0 = const 10_u32; return; } } const BALL_VEC_RIGHT_UP: (i16, i16) = { let mut _0: (i16, i16); bb0: { _0 = (const 8_i16, const 12_i16); return; } } const FIELD_SIZE: (u32, u32) = { let mut _0: (u32, u32); bb0: { _0 = (const 1200_u32, const 700_u32); return; } } const FIELD_BORDER_WIDTH: u32 = { let mut _0: u32; bb0: { _0 = const 5_u32; return; } } const TICK_LEN: f32 = { let mut _0: f32; bb0: { _0 = Div(const 1000f32, const 60f32); return; } } fn game::::fmt(_1: &BallDirection, _2: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { debug self => _1; debug f => _2; let mut _0: std::result::Result<(), std::fmt::Error>; let mut _3: &str; let mut _4: isize; let _5: &str; let _6: &str; let _7: &str; let _8: &str; bb0: { _4 = discriminant((*_1)); switchInt(move _4) -> [0: bb2, 1: bb3, 2: bb4, 3: bb1, otherwise: bb7]; } bb1: { _8 = const "LeftDown"; _3 = _8; goto -> bb5; } bb2: { _5 = const "RightUp"; _3 = _5; goto -> bb5; } bb3: { _6 = const "RightDown"; _3 = _6; goto -> bb5; } bb4: { _7 = const "LeftUp"; _3 = _7; goto -> bb5; } bb5: { _0 = Formatter::<'_>::write_str(_2, move _3) -> [return: bb6, unwind continue]; } bb6: { return; } bb7: { unreachable; } } fn game::::clone(_1: &BallDirection) -> BallDirection { debug self => _1; let mut _0: game::BallDirection; bb0: { _0 = (*_1); return; } } fn game::::eq(_1: &BallDirection, _2: &BallDirection) -> bool { debug self => _1; debug other => _2; let mut _0: bool; let _3: isize; scope 1 { debug __self_tag => _3; let _4: isize; scope 2 { debug __arg1_tag => _4; } } bb0: { _3 = discriminant((*_1)); _4 = discriminant((*_2)); _0 = Eq(_3, _4); return; } } fn game::::assert_receiver_is_total_eq(_1: &BallDirection) -> () { debug self => _1; let mut _0: (); bb0: { return; } } fn game::::fmt(_1: &HorizontalCollisionCheck, _2: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { debug self => _1; debug f => _2; let mut _0: std::result::Result<(), std::fmt::Error>; let mut _3: &str; let mut _4: isize; let _5: &str; let _6: &str; let _7: &str; bb0: { _4 = discriminant((*_1)); switchInt(move _4) -> [0: bb2, 1: bb3, 2: bb1, otherwise: bb6]; } bb1: { _7 = const "Right"; _3 = _7; goto -> bb4; } bb2: { _5 = const "None"; _3 = _5; goto -> bb4; } bb3: { _6 = const "Left"; _3 = _6; goto -> bb4; } bb4: { _0 = Formatter::<'_>::write_str(_2, move _3) -> [return: bb5, unwind continue]; } bb5: { return; } bb6: { unreachable; } } fn game::::clone(_1: &HorizontalCollisionCheck) -> HorizontalCollisionCheck { debug self => _1; let mut _0: game::HorizontalCollisionCheck; bb0: { _0 = (*_1); return; } } fn game::::eq(_1: &HorizontalCollisionCheck, _2: &HorizontalCollisionCheck) -> bool { debug self => _1; debug other => _2; let mut _0: bool; let _3: isize; scope 1 { debug __self_tag => _3; let _4: isize; scope 2 { debug __arg1_tag => _4; } } bb0: { _3 = discriminant((*_1)); _4 = discriminant((*_2)); _0 = Eq(_3, _4); return; } } fn game::::assert_receiver_is_total_eq(_1: &HorizontalCollisionCheck) -> () { debug self => _1; let mut _0: (); bb0: { return; } } fn game::::fmt(_1: &VerticalCollisionCheck, _2: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { debug self => _1; debug f => _2; let mut _0: std::result::Result<(), std::fmt::Error>; let mut _3: &str; let mut _4: isize; let _5: &str; let _6: &str; let _7: &str; bb0: { _4 = discriminant((*_1)); switchInt(move _4) -> [0: bb2, 1: bb3, 2: bb1, otherwise: bb6]; } bb1: { _7 = const "Bottom"; _3 = _7; goto -> bb4; } bb2: { _5 = const "None"; _3 = _5; goto -> bb4; } bb3: { _6 = const "Top"; _3 = _6; goto -> bb4; } bb4: { _0 = Formatter::<'_>::write_str(_2, move _3) -> [return: bb5, unwind continue]; } bb5: { return; } bb6: { unreachable; } } fn game::::clone(_1: &VerticalCollisionCheck) -> VerticalCollisionCheck { debug self => _1; let mut _0: game::VerticalCollisionCheck; bb0: { _0 = (*_1); return; } } fn game::::eq(_1: &VerticalCollisionCheck, _2: &VerticalCollisionCheck) -> bool { debug self => _1; debug other => _2; let mut _0: bool; let _3: isize; scope 1 { debug __self_tag => _3; let _4: isize; scope 2 { debug __arg1_tag => _4; } } bb0: { _3 = discriminant((*_1)); _4 = discriminant((*_2)); _0 = Eq(_3, _4); return; } } fn game::::assert_receiver_is_total_eq(_1: &VerticalCollisionCheck) -> () { debug self => _1; let mut _0: (); bb0: { return; } } fn game::::fmt(_1: &CollisionCheck, _2: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { debug self => _1; debug f => _2; let mut _0: std::result::Result<(), std::fmt::Error>; let _3: &str; let mut _4: &dyn std::fmt::Debug; let _5: &game::HorizontalCollisionCheck; let mut _6: &dyn std::fmt::Debug; let _7: &&game::VerticalCollisionCheck; let _8: &game::VerticalCollisionCheck; bb0: { _3 = const "CollisionCheck"; _5 = &((*_1).0: game::HorizontalCollisionCheck); _4 = _5 as &dyn std::fmt::Debug (PointerCoercion(Unsize)); _8 = &((*_1).1: game::VerticalCollisionCheck); _7 = &_8; _6 = _7 as &dyn std::fmt::Debug (PointerCoercion(Unsize)); _0 = Formatter::<'_>::debug_tuple_field2_finish(_2, _3, move _4, move _6) -> [return: bb1, unwind continue]; } bb1: { return; } } fn game::::clone(_1: &CollisionCheck) -> CollisionCheck { debug self => _1; let mut _0: game::CollisionCheck; scope 1 { scope 2 { } } bb0: { _0 = (*_1); return; } } fn game::::eq(_1: &CollisionCheck, _2: &CollisionCheck) -> bool { debug self => _1; debug other => _2; let mut _0: bool; let mut _3: bool; let mut _4: &game::HorizontalCollisionCheck; let mut _5: &game::HorizontalCollisionCheck; let mut _6: &game::VerticalCollisionCheck; let mut _7: &game::VerticalCollisionCheck; bb0: { _4 = &((*_1).0: game::HorizontalCollisionCheck); _5 = &((*_2).0: game::HorizontalCollisionCheck); _3 = ::eq(move _4, move _5) -> [return: bb1, unwind continue]; } bb1: { switchInt(move _3) -> [0: bb3, otherwise: bb2]; } bb2: { _6 = &((*_1).1: game::VerticalCollisionCheck); _7 = &((*_2).1: game::VerticalCollisionCheck); _0 = ::eq(move _6, move _7) -> [return: bb4, unwind continue]; } bb3: { _0 = const false; goto -> bb4; } bb4: { return; } } fn game::::assert_receiver_is_total_eq(_1: &CollisionCheck) -> () { debug self => _1; let mut _0: (); scope 1 { scope 2 { } } bb0: { return; } } fn game::::check_field(_1: (u32, u32), _2: (u32, u32)) -> CollisionCheck { debug obj_pos => _1; debug obj_size => _2; let mut _0: game::CollisionCheck; let _3: game::HorizontalCollisionCheck; let mut _4: u32; let mut _5: bool; let mut _6: u32; let mut _7: u32; let mut _8: u32; let mut _9: (u32, bool); let mut _10: u32; let mut _11: (u32, u32); let mut _13: u32; let mut _14: bool; let mut _15: u32; let mut _16: u32; let mut _17: u32; let mut _18: (u32, bool); let mut _19: u32; let mut _20: (u32, u32); let mut _21: game::HorizontalCollisionCheck; let mut _22: game::VerticalCollisionCheck; scope 1 { debug horizontal => _3; let _12: game::VerticalCollisionCheck; scope 2 { debug vertical => _12; } } bb0: { _4 = (_1.0: u32); switchInt(move _4) -> [0: bb1, otherwise: bb2]; } bb1: { _3 = HorizontalCollisionCheck::Left; goto -> bb6; } bb2: { _7 = (_1.0: u32); _8 = (_2.0: u32); _9 = CheckedAdd(_7, _8); assert(!move (_9.1: bool), "attempt to compute `{} + {}`, which would overflow", move _7, move _8) -> [success: bb3, unwind continue]; } bb3: { _6 = move (_9.0: u32); _11 = const _; _10 = (_11.0: u32); _5 = Ge(move _6, move _10); switchInt(move _5) -> [0: bb5, otherwise: bb4]; } bb4: { _3 = HorizontalCollisionCheck::Right; goto -> bb6; } bb5: { _3 = HorizontalCollisionCheck::None; goto -> bb6; } bb6: { _13 = (_1.1: u32); switchInt(move _13) -> [0: bb7, otherwise: bb8]; } bb7: { _12 = VerticalCollisionCheck::Top; goto -> bb12; } bb8: { _16 = (_1.1: u32); _17 = (_2.1: u32); _18 = CheckedAdd(_16, _17); assert(!move (_18.1: bool), "attempt to compute `{} + {}`, which would overflow", move _16, move _17) -> [success: bb9, unwind continue]; } bb9: { _15 = move (_18.0: u32); _20 = const _; _19 = (_20.1: u32); _14 = Ge(move _15, move _19); switchInt(move _14) -> [0: bb11, otherwise: bb10]; } bb10: { _12 = VerticalCollisionCheck::Bottom; goto -> bb12; } bb11: { _12 = VerticalCollisionCheck::None; goto -> bb12; } bb12: { _21 = _3; _22 = _12; _0 = CollisionCheck(move _21, move _22); return; } } fn game::::no_collisions(_1: &CollisionCheck) -> bool { debug self => _1; let mut _0: bool; let mut _2: isize; let mut _3: isize; bb0: { _3 = discriminant(((*_1).0: game::HorizontalCollisionCheck)); switchInt(move _3) -> [0: bb1, otherwise: bb2]; } bb1: { _2 = discriminant(((*_1).1: game::VerticalCollisionCheck)); _0 = Eq(_2, const 0_isize); goto -> bb3; } bb2: { _0 = const false; goto -> bb3; } bb3: { return; } } fn game::::get_vec(_1: &BallDirection) -> (i16, i16) { debug self => _1; let mut _0: (i16, i16); let mut _2: isize; let mut _3: i16; let mut _4: (i16, i16); let mut _5: i16; let mut _6: i16; let mut _7: (i16, i16); let mut _8: bool; let mut _9: i16; let mut _10: i16; let mut _11: (i16, i16); let mut _12: bool; let mut _13: i16; let mut _14: (i16, i16); let mut _15: i16; let mut _16: i16; let mut _17: (i16, i16); let mut _18: bool; let mut _19: i16; let mut _20: i16; let mut _21: (i16, i16); let mut _22: bool; bb0: { _2 = discriminant((*_1)); switchInt(move _2) -> [0: bb2, 1: bb3, 2: bb5, 3: bb1, otherwise: bb10]; } bb1: { _17 = const _; _16 = (_17.0: i16); _18 = Eq(_16, const i16::MIN); assert(!move _18, "attempt to negate `{}`, which would overflow", _16) -> [success: bb7, unwind continue]; } bb2: { _0 = const _; goto -> bb9; } bb3: { _4 = const _; _3 = (_4.0: i16); _7 = const _; _6 = (_7.1: i16); _8 = Eq(_6, const i16::MIN); assert(!move _8, "attempt to negate `{}`, which would overflow", _6) -> [success: bb4, unwind continue]; } bb4: { _5 = Neg(move _6); _0 = (move _3, move _5); goto -> bb9; } bb5: { _11 = const _; _10 = (_11.0: i16); _12 = Eq(_10, const i16::MIN); assert(!move _12, "attempt to negate `{}`, which would overflow", _10) -> [success: bb6, unwind continue]; } bb6: { _9 = Neg(move _10); _14 = const _; _13 = (_14.1: i16); _0 = (move _9, move _13); goto -> bb9; } bb7: { _15 = Neg(move _16); _21 = const _; _20 = (_21.1: i16); _22 = Eq(_20, const i16::MIN); assert(!move _22, "attempt to negate `{}`, which would overflow", _20) -> [success: bb8, unwind continue]; } bb8: { _19 = Neg(move _20); _0 = (move _15, move _19); goto -> bb9; } bb9: { return; } bb10: { unreachable; } } fn game::::init() -> GameState { let mut _0: game::GameState; let mut _1: (u32, u32); let mut _2: u32; let mut _3: u32; let mut _4: (u32, u32); let mut _5: bool; let mut _6: u32; let mut _7: u32; let mut _8: (u32, u32); let mut _9: bool; let mut _10: u32; let mut _11: u32; let mut _12: (u32, u32); let mut _13: bool; let mut _14: u32; let mut _15: u32; let mut _16: (u32, u32); let mut _17: bool; let mut _18: game::BallDirection; let mut _19: (u32, u32); let mut _20: std::time::Instant; bb0: { _4 = const _; _3 = (_4.0: u32); _5 = Eq(const 2_u32, const 0_u32); assert(!move _5, "attempt to divide `{}` by zero", _3) -> [success: bb1, unwind continue]; } bb1: { _2 = Div(move _3, const 2_u32); _8 = const _; _7 = (_8.1: u32); _9 = Eq(const 2_u32, const 0_u32); assert(!move _9, "attempt to divide `{}` by zero", _7) -> [success: bb2, unwind continue]; } bb2: { _6 = Div(move _7, const 2_u32); _1 = (move _2, move _6); _12 = const _; _11 = (_12.0: u32); _13 = Eq(const 2_u32, const 0_u32); assert(!move _13, "attempt to divide `{}` by zero", _11) -> [success: bb3, unwind continue]; } bb3: { _10 = Div(move _11, const 2_u32); _16 = const _; _15 = (_16.0: u32); _17 = Eq(const 2_u32, const 0_u32); assert(!move _17, "attempt to divide `{}` by zero", _15) -> [success: bb4, unwind continue]; } bb4: { _14 = Div(move _15, const 2_u32); _18 = BallDirection::RightUp; _19 = (const 0_u32, const 0_u32); _20 = Instant::now() -> [return: bb5, unwind continue]; } bb5: { _0 = GameState { ball_pos: move _1, ball_direction: move _18, paddle_r_pos: move _10, paddle_y_pos: move _14, scores: move _19, last_frame_time: move _20 }; return; } } fn game::::render(_1: &GameState, _2: &mut Buffer<'_, DisplayHandle<'_>, WindowHandle<'_>>, _3: (NonZero, NonZero)) -> () { debug self => _1; debug buf => _2; debug win_size => _3; let mut _0: (); let _4: (u32, u32); let mut _5: u32; let mut _6: std::num::NonZero; let mut _7: u32; let mut _8: std::num::NonZero; let _9: (); let _10: (); scope 1 { debug win_size => _4; } bb0: { _6 = (_3.0: std::num::NonZero); _5 = NonZero::::get(move _6) -> [return: bb1, unwind continue]; } bb1: { _8 = (_3.1: std::num::NonZero); _7 = NonZero::::get(move _8) -> [return: bb2, unwind continue]; } bb2: { _4 = (move _5, move _7); _9 = GameState::render_field(_1, _2, _4) -> [return: bb3, unwind continue]; } bb3: { _10 = GameState::render_ball(_1, _2, _4) -> [return: bb4, unwind continue]; } bb4: { return; } } fn game::::update(_1: &mut GameState) -> () { debug self => _1; let mut _0: (); let _2: f32; let mut _3: &game::GameState; let mut _4: std::time::Instant; let _5: (); scope 1 { debug delta_t => _2; } bb0: { _3 = &(*_1); _2 = GameState::delta_time(move _3) -> [return: bb1, unwind continue]; } bb1: { _4 = Instant::now() -> [return: bb2, unwind continue]; } bb2: { ((*_1).5: std::time::Instant) = move _4; _5 = GameState::move_ball(_1) -> [return: bb3, unwind continue]; } bb3: { return; } } fn game::::move_ball(_1: &mut GameState) -> () { debug self => _1; let mut _0: (); let _2: (i16, i16); let mut _3: &game::BallDirection; let mut _5: &game::GameState; let mut _7: u32; let mut _8: u32; let mut _9: u32; let mut _10: i32; let mut _11: f32; let mut _12: f32; let mut _13: i16; let mut _14: u32; let mut _15: u32; let mut _16: (u32, u32); let mut _17: (u32, bool); let mut _18: u32; let mut _19: u32; let mut _20: u32; let mut _21: i32; let mut _22: f32; let mut _23: f32; let mut _24: i16; let mut _25: u32; let mut _26: u32; let mut _27: (u32, u32); let mut _28: (u32, bool); let _29: (); let mut _30: std::fmt::Arguments<'_>; let mut _31: &[&str]; let mut _32: &[core::fmt::rt::Argument<'_>]; let _33: &[core::fmt::rt::Argument<'_>; 2]; let _34: [core::fmt::rt::Argument<'_>; 2]; let mut _35: core::fmt::rt::Argument<'_>; let _36: &(u32, u32); let mut _37: core::fmt::rt::Argument<'_>; let _38: &(u32, u32); let mut _39: (u32, u32); let mut _41: (u32, u32); let mut _42: u32; let mut _43: u32; let mut _44: u32; let mut _45: u32; let mut _46: (u32, u32); let mut _47: u32; let mut _48: (u32, bool); let mut _49: u32; let mut _50: (u32, bool); let mut _53: game::BallDirection; let mut _54: (game::BallDirection, (game::HorizontalCollisionCheck, game::VerticalCollisionCheck)); let mut _55: game::BallDirection; let mut _56: (game::HorizontalCollisionCheck, game::VerticalCollisionCheck); let mut _57: isize; let mut _58: isize; let mut _59: isize; let mut _60: isize; let mut _61: isize; let mut _62: isize; let mut _63: isize; let mut _64: isize; let mut _65: isize; let mut _66: isize; let mut _67: isize; let mut _68: isize; let mut _69: isize; let _71: !; let mut _72: std::fmt::Arguments<'_>; let mut _73: &[&str]; let mut _74: &[core::fmt::rt::Argument<'_>]; let _75: &[core::fmt::rt::Argument<'_>; 1]; let _76: [core::fmt::rt::Argument<'_>; 1]; let mut _77: core::fmt::rt::Argument<'_>; let _78: &(game::BallDirection, (game::HorizontalCollisionCheck, game::VerticalCollisionCheck)); let mut _79: &[core::fmt::rt::Placeholder]; let _80: &[core::fmt::rt::Placeholder; 1]; let _81: [core::fmt::rt::Placeholder; 1]; let mut _82: core::fmt::rt::Placeholder; let mut _83: core::fmt::rt::Alignment; let mut _84: core::fmt::rt::Count; let mut _85: core::fmt::rt::Count; let mut _86: core::fmt::rt::UnsafeArg; scope 1 { debug vec => _2; let _4: f32; scope 2 { debug delta_t => _4; let _6: (u32, u32); scope 3 { debug new_pos => _6; let _40: game::CollisionCheck; let mut _88: &[&str; 3]; scope 4 { debug check_res => _40; let _51: game::HorizontalCollisionCheck; let _52: game::VerticalCollisionCheck; scope 5 { debug horizontal => _51; debug vertical => _52; let _70: (game::BallDirection, (game::HorizontalCollisionCheck, game::VerticalCollisionCheck)); scope 6 { debug other => _70; let mut _87: &[&str; 1]; scope 7 { } } } } } } } bb0: { _3 = &((*_1).1: game::BallDirection); _2 = BallDirection::get_vec(move _3) -> [return: bb1, unwind continue]; } bb1: { _5 = &(*_1); _4 = GameState::delta_time(move _5) -> [return: bb2, unwind continue]; } bb2: { _9 = (((*_1).0: (u32, u32)).0: u32); _13 = (_2.0: i16); _12 = move _13 as f32 (IntToFloat); _11 = Mul(move _12, _4); _10 = move _11 as i32 (FloatToInt); _8 = core::num::::saturating_add_signed(move _9, move _10) -> [return: bb3, unwind continue]; } bb3: { _16 = const _; _15 = (_16.0: u32); _17 = CheckedSub(_15, const _); assert(!move (_17.1: bool), "attempt to compute `{} - {}`, which would overflow", move _15, const _) -> [success: bb4, unwind continue]; } bb4: { _14 = move (_17.0: u32); _7 = ::clamp(move _8, const 0_u32, move _14) -> [return: bb5, unwind continue]; } bb5: { _20 = (((*_1).0: (u32, u32)).1: u32); _24 = (_2.1: i16); _23 = move _24 as f32 (IntToFloat); _22 = Mul(move _23, _4); _21 = move _22 as i32 (FloatToInt); _19 = core::num::::saturating_add_signed(move _20, move _21) -> [return: bb6, unwind continue]; } bb6: { _27 = const _; _26 = (_27.1: u32); _28 = CheckedSub(_26, const _); assert(!move (_28.1: bool), "attempt to compute `{} - {}`, which would overflow", move _26, const _) -> [success: bb7, unwind continue]; } bb7: { _25 = move (_28.0: u32); _18 = ::clamp(move _19, const 0_u32, move _25) -> [return: bb8, unwind continue]; } bb8: { _6 = (move _7, move _18); _88 = const _; _31 = _88 as &[&str] (PointerCoercion(Unsize)); _36 = &((*_1).0: (u32, u32)); _35 = core::fmt::rt::Argument::<'_>::new_debug::<(u32, u32)>(_36) -> [return: bb9, unwind continue]; } bb9: { _38 = &_6; _37 = core::fmt::rt::Argument::<'_>::new_debug::<(u32, u32)>(_38) -> [return: bb10, unwind continue]; } bb10: { _34 = [move _35, move _37]; _33 = &_34; _32 = _33 as &[core::fmt::rt::Argument<'_>] (PointerCoercion(Unsize)); _30 = Arguments::<'_>::new_v1(move _31, move _32) -> [return: bb11, unwind continue]; } bb11: { _29 = _print(move _30) -> [return: bb12, unwind continue]; } bb12: { _39 = _6; ((*_1).0: (u32, u32)) = move _39; _43 = (_6.0: u32); _42 = core::num::::saturating_sub(move _43, const _) -> [return: bb13, unwind continue]; } bb13: { _45 = (_6.1: u32); _44 = core::num::::saturating_sub(move _45, const _) -> [return: bb14, unwind continue]; } bb14: { _41 = (move _42, move _44); _48 = CheckedMul(const _, const 2_u32); assert(!move (_48.1: bool), "attempt to compute `{} * {}`, which would overflow", const _, const 2_u32) -> [success: bb15, unwind continue]; } bb15: { _47 = move (_48.0: u32); _50 = CheckedMul(const _, const 2_u32); assert(!move (_50.1: bool), "attempt to compute `{} * {}`, which would overflow", const _, const 2_u32) -> [success: bb16, unwind continue]; } bb16: { _49 = move (_50.0: u32); _46 = (move _47, move _49); _40 = CollisionCheck::check_field(move _41, move _46) -> [return: bb17, unwind continue]; } bb17: { _51 = (_40.0: game::HorizontalCollisionCheck); _52 = (_40.1: game::VerticalCollisionCheck); _55 = ((*_1).1: game::BallDirection); _56 = (_51, _52); _54 = (move _55, move _56); _69 = discriminant((_54.0: game::BallDirection)); switchInt(move _69) -> [0: bb18, 1: bb22, 2: bb25, 3: bb28, otherwise: bb40]; } bb18: { _59 = discriminant(((_54.1: (game::HorizontalCollisionCheck, game::VerticalCollisionCheck)).0: game::HorizontalCollisionCheck)); switchInt(move _59) -> [0: bb19, 2: bb21, otherwise: bb20]; } bb19: { _57 = discriminant(((_54.1: (game::HorizontalCollisionCheck, game::VerticalCollisionCheck)).1: game::VerticalCollisionCheck)); switchInt(move _57) -> [0: bb31, 1: bb32, otherwise: bb20]; } bb20: { _70 = _54; _87 = const _; _73 = _87 as &[&str] (PointerCoercion(Unsize)); _78 = &_70; _77 = core::fmt::rt::Argument::<'_>::new_debug::<(BallDirection, (HorizontalCollisionCheck, VerticalCollisionCheck))>(_78) -> [return: bb35, unwind continue]; } bb21: { _58 = discriminant(((_54.1: (game::HorizontalCollisionCheck, game::VerticalCollisionCheck)).1: game::VerticalCollisionCheck)); switchInt(move _58) -> [0: bb33, 1: bb34, otherwise: bb20]; } bb22: { _62 = discriminant(((_54.1: (game::HorizontalCollisionCheck, game::VerticalCollisionCheck)).0: game::HorizontalCollisionCheck)); switchInt(move _62) -> [0: bb23, 2: bb24, otherwise: bb20]; } bb23: { _60 = discriminant(((_54.1: (game::HorizontalCollisionCheck, game::VerticalCollisionCheck)).1: game::VerticalCollisionCheck)); switchInt(move _60) -> [0: bb32, 2: bb31, otherwise: bb20]; } bb24: { _61 = discriminant(((_54.1: (game::HorizontalCollisionCheck, game::VerticalCollisionCheck)).1: game::VerticalCollisionCheck)); switchInt(move _61) -> [0: bb34, 2: bb33, otherwise: bb20]; } bb25: { _65 = discriminant(((_54.1: (game::HorizontalCollisionCheck, game::VerticalCollisionCheck)).0: game::HorizontalCollisionCheck)); switchInt(move _65) -> [0: bb26, 1: bb27, otherwise: bb20]; } bb26: { _63 = discriminant(((_54.1: (game::HorizontalCollisionCheck, game::VerticalCollisionCheck)).1: game::VerticalCollisionCheck)); switchInt(move _63) -> [0: bb33, 1: bb34, otherwise: bb20]; } bb27: { _64 = discriminant(((_54.1: (game::HorizontalCollisionCheck, game::VerticalCollisionCheck)).1: game::VerticalCollisionCheck)); switchInt(move _64) -> [0: bb31, 1: bb32, otherwise: bb20]; } bb28: { _68 = discriminant(((_54.1: (game::HorizontalCollisionCheck, game::VerticalCollisionCheck)).0: game::HorizontalCollisionCheck)); switchInt(move _68) -> [0: bb29, 1: bb30, otherwise: bb20]; } bb29: { _66 = discriminant(((_54.1: (game::HorizontalCollisionCheck, game::VerticalCollisionCheck)).1: game::VerticalCollisionCheck)); switchInt(move _66) -> [0: bb34, 2: bb33, otherwise: bb20]; } bb30: { _67 = discriminant(((_54.1: (game::HorizontalCollisionCheck, game::VerticalCollisionCheck)).1: game::VerticalCollisionCheck)); switchInt(move _67) -> [0: bb32, 1: bb31, otherwise: bb20]; } bb31: { _53 = BallDirection::RightUp; goto -> bb39; } bb32: { _53 = BallDirection::RightDown; goto -> bb39; } bb33: { _53 = BallDirection::LeftUp; goto -> bb39; } bb34: { _53 = BallDirection::LeftDown; goto -> bb39; } bb35: { _76 = [move _77]; _75 = &_76; _74 = _75 as &[core::fmt::rt::Argument<'_>] (PointerCoercion(Unsize)); _83 = core::fmt::rt::Alignment::Unknown; _84 = core::fmt::rt::Count::Implied; _85 = core::fmt::rt::Count::Implied; _82 = core::fmt::rt::Placeholder::new(const 0_usize, const ' ', move _83, const 4_u32, move _84, move _85) -> [return: bb36, unwind continue]; } bb36: { _81 = [move _82]; _80 = &_81; _79 = _80 as &[core::fmt::rt::Placeholder] (PointerCoercion(Unsize)); _86 = core::fmt::rt::UnsafeArg::new() -> [return: bb37, unwind continue]; } bb37: { _72 = Arguments::<'_>::new_v1_formatted(move _73, move _74, move _79, const core::fmt::rt::UnsafeArg {{ _private: () }}) -> [return: bb38, unwind continue]; } bb38: { _71 = panic_fmt(move _72) -> unwind continue; } bb39: { ((*_1).1: game::BallDirection) = move _53; return; } bb40: { unreachable; } } promoted[0] in game::::move_ball: &[&str; 1] = { let mut _0: &[&str; 1]; let mut _1: [&str; 1]; bb0: { _1 = [const "Invalid collision: "]; _0 = &_1; return; } } promoted[1] in game::::move_ball: &[&str; 3] = { let mut _0: &[&str; 3]; let mut _1: [&str; 3]; bb0: { _1 = [const "", const " -> ", const "\n"]; _0 = &_1; return; } } fn game::::delta_time(_1: &GameState) -> f32 { debug self => _1; let mut _0: f32; let mut _2: f32; let mut _3: u128; let mut _4: &std::time::Duration; let _5: std::time::Duration; let mut _6: &std::time::Instant; let _7: std::time::Instant; let mut _8: std::time::Instant; bb0: { _7 = Instant::now() -> [return: bb1, unwind continue]; } bb1: { _6 = &_7; _8 = ((*_1).5: std::time::Instant); _5 = Instant::duration_since(move _6, move _8) -> [return: bb2, unwind continue]; } bb2: { _4 = &_5; _3 = Duration::as_millis(move _4) -> [return: bb3, unwind continue]; } bb3: { _2 = move _3 as f32 (IntToFloat); _0 = Div(move _2, const _); return; } } fn game::::render_field(_1: &GameState, _2: &mut Buffer<'_, DisplayHandle<'_>, WindowHandle<'_>>, _3: (u32, u32)) -> () { debug self => _1; debug buf => _2; debug win_size => _3; let mut _0: (); let _4: (u32, u32); let mut _5: u32; let mut _6: u32; let mut _7: u32; let mut _8: bool; let mut _9: u32; let mut _10: u32; let mut _11: (u32, u32); let mut _12: bool; let mut _13: u32; let mut _14: u32; let mut _15: u32; let mut _16: bool; let mut _17: u32; let mut _18: u32; let mut _19: (u32, u32); let mut _20: bool; let _21: (); let mut _22: (u32, u32); let mut _23: u32; let mut _24: u32; let mut _25: u32; let mut _26: u32; let mut _27: (u32, u32); let mut _28: u32; let mut _29: u32; let mut _30: (u32, u32); let mut _31: u32; let mut _32: (u32, bool); let _33: (); let mut _34: (u32, u32); let mut _35: u32; let mut _36: u32; let mut _37: u32; let mut _38: (u32, u32); let mut _39: u32; let mut _40: (u32, u32); let mut _41: u32; let mut _42: (u32, u32); let _43: (); let mut _44: (u32, u32); let mut _45: u32; let mut _46: u32; let mut _47: u32; let mut _48: u32; let mut _49: u32; let mut _50: (u32, u32); let mut _51: (u32, u32); let mut _52: u32; let mut _53: u32; let mut _54: (u32, u32); let mut _55: u32; let mut _56: (u32, bool); let _57: (); let mut _58: (u32, u32); let mut _59: u32; let mut _60: u32; let mut _61: u32; let mut _62: (u32, u32); let mut _63: u32; let mut _64: (u32, u32); let mut _65: (u32, u32); let mut _66: u32; let mut _67: u32; let mut _68: u32; let mut _69: bool; let mut _70: u32; let mut _71: bool; let mut _72: (u32, bool); let mut _73: u32; let mut _74: (u32, u32); let mut _75: u32; let mut _76: (u32, u32); scope 1 { debug field_pos => _4; } bb0: { _7 = (_3.0: u32); _8 = Eq(const 2_u32, const 0_u32); assert(!move _8, "attempt to divide `{}` by zero", _7) -> [success: bb1, unwind continue]; } bb1: { _6 = Div(move _7, const 2_u32); _11 = const _; _10 = (_11.0: u32); _12 = Eq(const 2_u32, const 0_u32); assert(!move _12, "attempt to divide `{}` by zero", _10) -> [success: bb2, unwind continue]; } bb2: { _9 = Div(move _10, const 2_u32); _5 = core::num::::saturating_sub(move _6, move _9) -> [return: bb3, unwind continue]; } bb3: { _15 = (_3.1: u32); _16 = Eq(const 2_u32, const 0_u32); assert(!move _16, "attempt to divide `{}` by zero", _15) -> [success: bb4, unwind continue]; } bb4: { _14 = Div(move _15, const 2_u32); _19 = const _; _18 = (_19.1: u32); _20 = Eq(const 2_u32, const 0_u32); assert(!move _20, "attempt to divide `{}` by zero", _18) -> [success: bb5, unwind continue]; } bb5: { _17 = Div(move _18, const 2_u32); _13 = core::num::::saturating_sub(move _14, move _17) -> [return: bb6, unwind continue]; } bb6: { _4 = (move _5, move _13); _24 = (_4.0: u32); _23 = core::num::::saturating_sub(move _24, const _) -> [return: bb7, unwind continue]; } bb7: { _26 = (_4.1: u32); _25 = core::num::::saturating_sub(move _26, const _) -> [return: bb8, unwind continue]; } bb8: { _22 = (move _23, move _25); _30 = const _; _29 = (_30.0: u32); _32 = CheckedMul(const _, const 2_u32); assert(!move (_32.1: bool), "attempt to compute `{} * {}`, which would overflow", const _, const 2_u32) -> [success: bb9, unwind continue]; } bb9: { _31 = move (_32.0: u32); _28 = core::num::::saturating_add(move _29, move _31) -> [return: bb10, unwind continue]; } bb10: { _27 = (move _28, const _); _21 = draw_rect(_2, _3, move _22, move _27, const 16711680_u32) -> [return: bb11, unwind continue]; } bb11: { _36 = (_4.0: u32); _38 = const _; _37 = (_38.0: u32); _35 = core::num::::saturating_add(move _36, move _37) -> [return: bb12, unwind continue]; } bb12: { _39 = (_4.1: u32); _34 = (move _35, move _39); _42 = const _; _41 = (_42.1: u32); _40 = (const _, move _41); _33 = draw_rect(_2, _3, move _34, move _40, const 65280_u32) -> [return: bb13, unwind continue]; } bb13: { _46 = (_4.0: u32); _45 = core::num::::saturating_sub(move _46, const _) -> [return: bb14, unwind continue]; } bb14: { _48 = (_4.1: u32); _50 = const _; _49 = (_50.1: u32); _47 = core::num::::saturating_add(move _48, move _49) -> [return: bb15, unwind continue]; } bb15: { _44 = (move _45, move _47); _54 = const _; _53 = (_54.0: u32); _56 = CheckedMul(const _, const 2_u32); assert(!move (_56.1: bool), "attempt to compute `{} * {}`, which would overflow", const _, const 2_u32) -> [success: bb16, unwind continue]; } bb16: { _55 = move (_56.0: u32); _52 = core::num::::saturating_add(move _53, move _55) -> [return: bb17, unwind continue]; } bb17: { _51 = (move _52, const _); _43 = draw_rect(_2, _3, move _44, move _51, const 16711935_u32) -> [return: bb18, unwind continue]; } bb18: { _60 = (_4.0: u32); _59 = core::num::::saturating_sub(move _60, const _) -> [return: bb19, unwind continue]; } bb19: { _61 = (_4.1: u32); _58 = (move _59, move _61); _64 = const _; _63 = (_64.1: u32); _62 = (const _, move _63); _57 = draw_rect(_2, _3, move _58, move _62, const 65535_u32) -> [return: bb20, unwind continue]; } bb20: { _68 = (_3.0: u32); _69 = Eq(const 2_u32, const 0_u32); assert(!move _69, "attempt to divide `{}` by zero", _68) -> [success: bb21, unwind continue]; } bb21: { _67 = Div(move _68, const 2_u32); _71 = Eq(const 2_u32, const 0_u32); assert(!move _71, "attempt to divide `{}` by zero", const _) -> [success: bb22, unwind continue]; } bb22: { _70 = Div(const _, const 2_u32); _72 = CheckedSub(_67, _70); assert(!move (_72.1: bool), "attempt to compute `{} - {}`, which would overflow", move _67, move _70) -> [success: bb23, unwind continue]; } bb23: { _66 = move (_72.0: u32); _73 = (_4.1: u32); _65 = (move _66, move _73); _76 = const _; _75 = (_76.1: u32); _74 = (const _, move _75); _0 = draw_rect(_2, _3, move _65, move _74, const 8355711_u32) -> [return: bb24, unwind continue]; } bb24: { return; } } fn game::::render_ball(_1: &GameState, _2: &mut Buffer<'_, DisplayHandle<'_>, WindowHandle<'_>>, _3: (u32, u32)) -> () { debug self => _1; debug buf => _2; debug win_size => _3; let mut _0: (); let _4: (u32, u32); let mut _5: u32; let mut _6: u32; let mut _7: u32; let mut _8: bool; let mut _9: u32; let mut _10: u32; let mut _11: (u32, u32); let mut _12: bool; let mut _13: u32; let mut _14: u32; let mut _15: u32; let mut _16: bool; let mut _17: u32; let mut _18: u32; let mut _19: (u32, u32); let mut _20: bool; let mut _22: u32; let mut _23: u32; let mut _24: u32; let mut _25: u32; let mut _26: (u32, bool); let mut _27: u32; let mut _28: u32; let mut _29: u32; let mut _30: u32; let mut _31: (u32, bool); let _32: (); let mut _33: (u32, u32); let mut _34: u32; let mut _35: (u32, bool); let mut _36: u32; let mut _37: (u32, bool); scope 1 { debug field_pos => _4; let _21: (u32, u32); scope 2 { debug ball_render_pos => _21; } } bb0: { _7 = (_3.0: u32); _8 = Eq(const 2_u32, const 0_u32); assert(!move _8, "attempt to divide `{}` by zero", _7) -> [success: bb1, unwind continue]; } bb1: { _6 = Div(move _7, const 2_u32); _11 = const _; _10 = (_11.0: u32); _12 = Eq(const 2_u32, const 0_u32); assert(!move _12, "attempt to divide `{}` by zero", _10) -> [success: bb2, unwind continue]; } bb2: { _9 = Div(move _10, const 2_u32); _5 = core::num::::saturating_sub(move _6, move _9) -> [return: bb3, unwind continue]; } bb3: { _15 = (_3.1: u32); _16 = Eq(const 2_u32, const 0_u32); assert(!move _16, "attempt to divide `{}` by zero", _15) -> [success: bb4, unwind continue]; } bb4: { _14 = Div(move _15, const 2_u32); _19 = const _; _18 = (_19.1: u32); _20 = Eq(const 2_u32, const 0_u32); assert(!move _20, "attempt to divide `{}` by zero", _18) -> [success: bb5, unwind continue]; } bb5: { _17 = Div(move _18, const 2_u32); _13 = core::num::::saturating_sub(move _14, move _17) -> [return: bb6, unwind continue]; } bb6: { _4 = (move _5, move _13); _24 = (((*_1).0: (u32, u32)).0: u32); _25 = (_4.0: u32); _26 = CheckedAdd(_24, _25); assert(!move (_26.1: bool), "attempt to compute `{} + {}`, which would overflow", move _24, move _25) -> [success: bb7, unwind continue]; } bb7: { _23 = move (_26.0: u32); _22 = core::num::::saturating_sub(move _23, const _) -> [return: bb8, unwind continue]; } bb8: { _29 = (((*_1).0: (u32, u32)).1: u32); _30 = (_4.1: u32); _31 = CheckedAdd(_29, _30); assert(!move (_31.1: bool), "attempt to compute `{} + {}`, which would overflow", move _29, move _30) -> [success: bb9, unwind continue]; } bb9: { _28 = move (_31.0: u32); _27 = core::num::::saturating_sub(move _28, const _) -> [return: bb10, unwind continue]; } bb10: { _21 = (move _22, move _27); _35 = CheckedMul(const _, const 2_u32); assert(!move (_35.1: bool), "attempt to compute `{} * {}`, which would overflow", const _, const 2_u32) -> [success: bb11, unwind continue]; } bb11: { _34 = move (_35.0: u32); _37 = CheckedMul(const _, const 2_u32); assert(!move (_37.1: bool), "attempt to compute `{} * {}`, which would overflow", const _, const 2_u32) -> [success: bb12, unwind continue]; } bb12: { _36 = move (_37.0: u32); _33 = (move _34, move _36); _32 = draw_rect(_2, _3, _21, move _33, const 16777215_u32) -> [return: bb13, unwind continue]; } bb13: { return; } } fn game::::render_paddles(_1: &GameState, _2: &mut Buffer<'_, DisplayHandle<'_>, WindowHandle<'_>>, _3: (u32, u32)) -> () { debug self => _1; debug buf => _2; debug win_size => _3; let mut _0: (); let mut _4: !; bb0: { _4 = core::panicking::panic(const "not yet implemented") -> unwind continue; } } fn game::::render_paddle(_1: &GameState, _2: &mut Buffer<'_, DisplayHandle<'_>, WindowHandle<'_>>, _3: (u32, u32)) -> () { debug self => _1; debug buf => _2; debug win_size => _3; let mut _0: (); let mut _4: !; bb0: { _4 = core::panicking::panic(const "not yet implemented") -> unwind continue; } } fn game::::render_scores(_1: &GameState, _2: &mut Buffer<'_, DisplayHandle<'_>, WindowHandle<'_>>, _3: (u32, u32)) -> () { debug self => _1; debug buf => _2; debug win_size => _3; let mut _0: (); let mut _4: !; bb0: { _4 = core::panicking::panic(const "not yet implemented") -> unwind continue; } } fn draw_rect(_1: &mut Buffer<'_, DisplayHandle<'_>, WindowHandle<'_>>, _2: (u32, u32), _3: (u32, u32), _4: (u32, u32), _5: u32) -> () { debug buf => _1; debug buf_size => _2; debug pos => _3; debug size => _4; debug color => _5; let mut _0: (); let mut _6: std::ops::Range; let mut _7: std::ops::Range; let mut _8: u32; let mut _9: u32; let mut _10: u32; let mut _11: u32; let mut _12: (u32, bool); let mut _13: std::ops::Range; let mut _14: std::option::Option; let mut _15: &mut std::ops::Range; let mut _16: isize; let mut _18: std::ops::Range; let mut _19: std::ops::Range; let mut _20: u32; let mut _21: u32; let mut _22: u32; let mut _23: u32; let mut _24: (u32, bool); let mut _26: std::option::Option; let mut _27: &mut std::ops::Range; let mut _28: isize; let mut _31: usize; let mut _32: usize; let mut _33: usize; let mut _34: u32; let mut _35: (usize, bool); let mut _36: usize; let mut _37: (usize, bool); let mut _38: &mut [u32]; let mut _39: usize; let mut _40: bool; scope 1 { debug iter => _13; let _17: u32; scope 2 { debug y => _17; let mut _25: std::ops::Range; scope 3 { debug iter => _25; let _29: u32; scope 4 { debug x => _29; let _30: usize; scope 5 { debug index => _30; } } } } } bb0: { _8 = (_3.1: u32); _10 = (_3.1: u32); _11 = (_4.1: u32); _12 = CheckedAdd(_10, _11); assert(!move (_12.1: bool), "attempt to compute `{} + {}`, which would overflow", move _10, move _11) -> [success: bb1, unwind continue]; } bb1: { _9 = move (_12.0: u32); _7 = std::ops::Range:: { start: move _8, end: move _9 }; _6 = as IntoIterator>::into_iter(move _7) -> [return: bb2, unwind continue]; } bb2: { _13 = move _6; goto -> bb3; } bb3: { _15 = &mut _13; _14 = as Iterator>::next(_15) -> [return: bb4, unwind continue]; } bb4: { _16 = discriminant(_14); switchInt(move _16) -> [0: bb6, 1: bb5, otherwise: bb16]; } bb5: { _17 = ((_14 as Some).0: u32); _20 = (_3.0: u32); _22 = (_3.0: u32); _23 = (_4.0: u32); _24 = CheckedAdd(_22, _23); assert(!move (_24.1: bool), "attempt to compute `{} + {}`, which would overflow", move _22, move _23) -> [success: bb7, unwind continue]; } bb6: { return; } bb7: { _21 = move (_24.0: u32); _19 = std::ops::Range:: { start: move _20, end: move _21 }; _18 = as IntoIterator>::into_iter(move _19) -> [return: bb8, unwind continue]; } bb8: { _25 = move _18; goto -> bb9; } bb9: { _27 = &mut _25; _26 = as Iterator>::next(_27) -> [return: bb10, unwind continue]; } bb10: { _28 = discriminant(_26); switchInt(move _28) -> [0: bb3, 1: bb11, otherwise: bb16]; } bb11: { _29 = ((_26 as Some).0: u32); _32 = _17 as usize (IntToInt); _34 = (_2.0: u32); _33 = move _34 as usize (IntToInt); _35 = CheckedMul(_32, _33); assert(!move (_35.1: bool), "attempt to compute `{} * {}`, which would overflow", move _32, move _33) -> [success: bb12, unwind continue]; } bb12: { _31 = move (_35.0: usize); _36 = _29 as usize (IntToInt); _37 = CheckedAdd(_31, _36); assert(!move (_37.1: bool), "attempt to compute `{} + {}`, which would overflow", move _31, move _36) -> [success: bb13, unwind continue]; } bb13: { _30 = move (_37.0: usize); _38 = , WindowHandle<'_>> as DerefMut>::deref_mut(_1) -> [return: bb14, unwind continue]; } bb14: { _39 = Len((*_38)); _40 = Lt(_30, _39); assert(move _40, "index out of bounds: the length is {} but the index is {}", move _39, _30) -> [success: bb15, unwind continue]; } bb15: { (*_38)[_30] = _5; goto -> bb9; } bb16: { unreachable; } } fn CollisionCheck(_1: HorizontalCollisionCheck, _2: VerticalCollisionCheck) -> CollisionCheck { let mut _0: game::CollisionCheck; bb0: { _0 = CollisionCheck(move _1, move _2); return; } } // MIR FOR CTFE fn CollisionCheck(_1: HorizontalCollisionCheck, _2: VerticalCollisionCheck) -> CollisionCheck { let mut _0: game::CollisionCheck; bb0: { _0 = CollisionCheck(move _1, move _2); return; } }