diff --git a/agb/out.s b/agb/out.s deleted file mode 100644 index 785ff135..00000000 --- a/agb/out.s +++ /dev/null @@ -1,22593 +0,0 @@ - -target/thumbv4t-none-eabi/debug/examples/chicken: file format elf32-littlearm - - -Disassembly of section .text: - -08000000 <__start>: - 8000000: ea00003c b 80000f8 <.Initialise> - ... - 80000c0: ea000007 b 80000e4 <.Initialise_mb> - ... - -080000e4 <.Initialise_mb>: - 80000e4: ef250000 svc 0x00250000 - 80000e8: e59f0060 ldr r0, [pc, #96] ; 8000150 <.CommonInit+0x3c> - 80000ec: e59f1060 ldr r1, [pc, #96] ; 8000154 <.CommonInit+0x40> - 80000f0: e5810000 str r0, [r1] - 80000f4: ea000006 b 8000114 <.CommonInit> - -080000f8 <.Initialise>: - 80000f8: e59f0050 ldr r0, [pc, #80] ; 8000150 <.CommonInit+0x3c> - 80000fc: e59f1050 ldr r1, [pc, #80] ; 8000154 <.CommonInit+0x40> - 8000100: e5810000 str r0, [r1] - 8000104: e59f004c ldr r0, [pc, #76] ; 8000158 <.CommonInit+0x44> - 8000108: e59f104c ldr r1, [pc, #76] ; 800015c <.CommonInit+0x48> - 800010c: e59f204c ldr r2, [pc, #76] ; 8000160 <.CommonInit+0x4c> - 8000110: ef0b0000 svc 0x000b0000 - -08000114 <.CommonInit>: - 8000114: e59f0048 ldr r0, [pc, #72] ; 8000164 <.CommonInit+0x50> - 8000118: e59f1048 ldr r1, [pc, #72] ; 8000168 <.CommonInit+0x54> - 800011c: e1c010b0 strh r1, [r0] - 8000120: e59f0044 ldr r0, [pc, #68] ; 800016c <.CommonInit+0x58> - 8000124: e59f1044 ldr r1, [pc, #68] ; 8000170 <.CommonInit+0x5c> - 8000128: e59f2044 ldr r2, [pc, #68] ; 8000174 <.CommonInit+0x60> - 800012c: ef0b0000 svc 0x000b0000 - 8000130: e59f0040 ldr r0, [pc, #64] ; 8000178 <.CommonInit+0x64> - 8000134: e3a01001 mov r1, #1 - 8000138: e5801000 str r1, [r0] - 800013c: e3a00000 mov r0, #0 - 8000140: e1a01000 mov r1, r0 - 8000144: e59f2030 ldr r2, [pc, #48] ; 800017c <.CommonInit+0x68> - 8000148: e12fff12 bx r2 - 800014c: eafffffe b 800014c <.CommonInit+0x38> - 8000150: 03000000 .word 0x03000000 - 8000154: 03007ffc .word 0x03007ffc - 8000158: 0800e8d8 .word 0x0800e8d8 - 800015c: 02000000 .word 0x02000000 - 8000160: 00000084 .word 0x00000084 - 8000164: 04000204 .word 0x04000204 - 8000168: 00004317 .word 0x00004317 - 800016c: 0800e854 .word 0x0800e854 - 8000170: 03000000 .word 0x03000000 - 8000174: 00000042 .word 0x00000042 - 8000178: 04000208 .word 0x04000208 - 800017c: 08000185 .word 0x08000185 - -08000180 >: -/// assert!(weak.upgrade().is_none()); -/// ``` -#[stable(feature = "drop_in_place", since = "1.8.0")] -#[lang = "drop_in_place"] -#[allow(unconditional_recursion)] -pub unsafe fn drop_in_place(to_drop: *mut T) { - 8000180: 4770 bx lr - ... - -08000184
: - -fn frame_ranger(count: u32, start: u32, end: u32, delay: u32) -> usize { - (((count / delay) % (end + 1 - start)) + start) as usize -} - -#[agb::entry] - 8000184: b580 push {r7, lr} - 8000186: af00 add r7, sp, #0 - 8000188: b0ba sub sp, #232 ; 0xe8 - 800018a: f003 fa75 bl 8003678 - 800018e: ac1d add r4, sp, #116 ; 0x74 - 8000190: a938 add r1, sp, #224 ; 0xe0 - (&MAP_MAP as *const [u16; 1024] as *const [[u16; 32]; 32]) - .as_ref() - .unwrap() - }; - - let (gfx, mut vram) = gba.display.video.tiled0(); - 8000192: 0020 movs r0, r4 - 8000194: f003 fa88 bl 80036a8 - 8000198: 9820 ldr r0, [sp, #128] ; 0x80 - 800019a: 9010 str r0, [sp, #64] ; 0x40 - 800019c: 981f ldr r0, [sp, #124] ; 0x7c - 800019e: 900f str r0, [sp, #60] ; 0x3c - 80001a0: 981e ldr r0, [sp, #120] ; 0x78 - 80001a2: 900e str r0, [sp, #56] ; 0x38 - 80001a4: 981d ldr r0, [sp, #116] ; 0x74 - 80001a6: 900d str r0, [sp, #52] ; 0x34 - 80001a8: 3410 adds r4, #16 - 80001aa: ad11 add r5, sp, #68 ; 0x44 - 80001ac: 0028 movs r0, r5 - 80001ae: cc4e ldmia r4!, {r1, r2, r3, r6} - 80001b0: c04e stmia r0!, {r1, r2, r3, r6} - 80001b2: cc4e ldmia r4!, {r1, r2, r3, r6} - 80001b4: c04e stmia r0!, {r1, r2, r3, r6} - 80001b6: cc4e ldmia r4!, {r1, r2, r3, r6} - 80001b8: c04e stmia r0!, {r1, r2, r3, r6} - let vblank = agb::interrupt::VBlank::get(); - 80001ba: f002 fe87 bl 8002ecc - let mut input = agb::input::ButtonController::new(); - 80001be: f003 fa91 bl 80036e4 - 80001c2: aa2d add r2, sp, #180 ; 0xb4 - 80001c4: 8051 strh r1, [r2, #2] - 80001c6: 8010 strh r0, [r2, #0] - - vram.set_background_palette_raw(&MAP_PALETTE); - 80001c8: 49da ldr r1, [pc, #872] ; (8000534 ) - 80001ca: 2202 movs r2, #2 - 80001cc: 0028 movs r0, r5 - 80001ce: 9203 str r2, [sp, #12] - 80001d0: f000 ff68 bl 80010a4 - 80001d4: 2011 movs r0, #17 - 80001d6: 0141 lsls r1, r0, #5 - let tileset = TileSet::new(&MAP_TILES, TileFormat::FourBpp); - 80001d8: 48d7 ldr r0, [pc, #860] ; (8000538 ) - 80001da: f000 fce6 bl 8000baa - 80001de: 912f str r1, [sp, #188] ; 0xbc - 80001e0: 902e str r0, [sp, #184] ; 0xb8 - 80001e2: a81d add r0, sp, #116 ; 0x74 - 80001e4: a90d add r1, sp, #52 ; 0x34 - 80001e6: 2400 movs r4, #0 - - let mut background = gfx.background( - 80001e8: 0022 movs r2, r4 - 80001ea: 0023 movs r3, r4 - 80001ec: f002 fbe2 bl 80029b4 - 80001f0: 2001 movs r0, #1 - 80001f2: 900b str r0, [sp, #44] ; 0x2c - 80001f4: 02c6 lsls r6, r0, #11 - 80001f6: 4dd1 ldr r5, [pc, #836] ; (800053c ) - 80001f8: 201f movs r0, #31 - 80001fa: 900c str r0, [sp, #48] ; 0x30 - let i = i as u16; - background.set_tile( - &mut vram, - (i % 32, i / 32).into(), - &tileset, - TileSetting::from_raw(tile), - 80001fc: 8828 ldrh r0, [r5, #0] - 80001fe: f005 f8f5 bl 80053ec - background.set_tile( - 8000202: 9001 str r0, [sp, #4] - 8000204: a82e add r0, sp, #184 ; 0xb8 - 8000206: 9000 str r0, [sp, #0] - 8000208: 0022 movs r2, r4 - 800020a: 980c ldr r0, [sp, #48] ; 0x30 - 800020c: 4002 ands r2, r0 - let i = i as u16; - 800020e: 0020 movs r0, r4 - 8000210: 49cb ldr r1, [pc, #812] ; (8000540 ) - 8000212: 4008 ands r0, r1 - (i % 32, i / 32).into(), - 8000214: 0943 lsrs r3, r0, #5 - 8000216: a81d add r0, sp, #116 ; 0x74 - 8000218: a911 add r1, sp, #68 ; 0x44 - background.set_tile( - 800021a: f000 fbdb bl 80009d4 - unsafe { - assume(!self.ptr.as_ptr().is_null()); - if mem::size_of::() != 0 { - assume(!self.end.is_null()); - } - if is_empty!(self) { - 800021e: 1eb6 subs r6, r6, #2 - T: Sized, - { - // SAFETY: the caller must uphold the safety contract for `offset`. - // The obtained pointer is valid for writes since the caller must - // guarantee that it points to the same allocated object as `self`. - unsafe { intrinsics::offset(self, count) as *mut T } - 8000220: 1cad adds r5, r5, #2 - 8000222: 1c64 adds r4, r4, #1 - 8000224: 2e00 cmp r6, #0 - 8000226: d1e9 bne.n 80001fc - 8000228: ac1d add r4, sp, #116 ; 0x74 - ); - } - - background.show(); - 800022a: 0020 movs r0, r4 - 800022c: f000 fc42 bl 8000ab4 - 8000230: a911 add r1, sp, #68 ; 0x44 - background.commit(&mut vram); - 8000232: 0020 movs r0, r4 - 8000234: f000 fc66 bl 8000b04 - 8000238: ac38 add r4, sp, #224 ; 0xe0 - - let object = gba.display.object.get(); - 800023a: 0020 movs r0, r4 - 800023c: f003 f9e0 bl 8003600 - 8000240: a830 add r0, sp, #192 ; 0xc0 - - let sprite = object.sprite(&CHICKEN_SPRITES[0]); - 8000242: 4afe ldr r2, [pc, #1016] ; (800063c ) - 8000244: 0021 movs r1, r4 - 8000246: f003 ff65 bl 8004114 - let mut chicken = Character { - object: object.object(sprite), - 800024a: 9831 ldr r0, [sp, #196] ; 0xc4 - 800024c: 9039 str r0, [sp, #228] ; 0xe4 - 800024e: 9830 ldr r0, [sp, #192] ; 0xc0 - 8000250: 9038 str r0, [sp, #224] ; 0xe0 - 8000252: a938 add r1, sp, #224 ; 0xe0 - 8000254: 0020 movs r0, r4 - 8000256: f003 fd57 bl 8003d08 - 800025a: ad33 add r5, sp, #204 ; 0xcc - let mut chicken = Character { - 800025c: 7428 strb r0, [r5, #16] - 800025e: 2400 movs r4, #0 - 8000260: 9436 str r4, [sp, #216] ; 0xd8 - 8000262: 9435 str r4, [sp, #212] ; 0xd4 - 8000264: 200d movs r0, #13 - 8000266: 0280 lsls r0, r0, #10 - 8000268: 9034 str r0, [sp, #208] ; 0xd0 - 800026a: 2603 movs r6, #3 - 800026c: 0330 lsls r0, r6, #12 - 800026e: 9033 str r0, [sp, #204] ; 0xcc - 8000270: 3510 adds r5, #16 - 8000272: 2130 movs r1, #48 ; 0x30 - y: ((7 * 8) - 4) << 8, - }, - velocity: Vector2D { x: 0, y: 0 }, - }; - - chicken - 8000274: 0028 movs r0, r5 - 8000276: f004 fb49 bl 800490c - .object - .set_x((chicken.position.x >> 8).try_into().unwrap()); - chicken - .object - .set_y((chicken.position.y >> 8).try_into().unwrap()); - 800027a: 9834 ldr r0, [sp, #208] ; 0xd0 - #[stable(feature = "rust1", since = "1.0.0")] - pub fn unwrap(self) -> T - where - E: fmt::Debug, - { - match self { - 800027c: 0e01 lsrs r1, r0, #24 - 800027e: d008 beq.n 8000292 - Ok(t) => t, - Err(e) => unwrap_failed("called `Result::unwrap()` on an `Err` value", &e), - 8000280: 48ef ldr r0, [pc, #956] ; (8000640 ) - 8000282: 9000 str r0, [sp, #0] - 8000284: 48ef ldr r0, [pc, #956] ; (8000644 ) - 8000286: 212b movs r1, #43 ; 0x2b - 8000288: aa38 add r2, sp, #224 ; 0xe0 - 800028a: 4bef ldr r3, [pc, #956] ; (8000648 ) - 800028c: f007 ff06 bl 800809c - 8000290: defe udf #254 ; 0xfe - 8000292: 9409 str r4, [sp, #36] ; 0x24 - 8000294: 0a01 lsrs r1, r0, #8 - chicken - 8000296: 0028 movs r0, r5 - 8000298: f004 fc22 bl 8004ae0 - chicken.object.show(); - 800029c: 0028 movs r0, r5 - 800029e: f004 f9f1 bl 8004684 - 80002a2: ac38 add r4, sp, #224 ; 0xe0 - - object.commit(); - 80002a4: 0020 movs r0, r4 - 80002a6: f003 fa5b bl 8003760 - let mut frames_off_ground = 0; - - let terminal_velocity = (1 << 8) / 2; - - loop { - vblank.wait_for_vblank(); - 80002aa: 0020 movs r0, r4 - 80002ac: f002 fe48 bl 8002f40 - 80002b0: 0030 movs r0, r6 - 80002b2: 9e0b ldr r6, [sp, #44] ; 0x2c - 80002b4: 02b1 lsls r1, r6, #10 - 80002b6: 9107 str r1, [sp, #28] - 80002b8: 9006 str r0, [sp, #24] - 80002ba: 0280 lsls r0, r0, #10 - 80002bc: 9002 str r0, [sp, #8] - 80002be: 2027 movs r0, #39 ; 0x27 - 80002c0: 0280 lsls r0, r0, #10 - 80002c2: 9005 str r0, [sp, #20] - 80002c4: 203b movs r0, #59 ; 0x3b - 80002c6: 0280 lsls r0, r0, #10 - 80002c8: 9004 str r0, [sp, #16] - frame_count += 1; - 80002ca: 950a str r5, [sp, #40] ; 0x28 - 80002cc: ac2d add r4, sp, #180 ; 0xb4 - - input.update(); - 80002ce: 0020 movs r0, r4 - 80002d0: f003 fa10 bl 80036f4 - - // Horizontal movement - chicken.velocity.x += (input.x_tri() as i32) * acceleration; - 80002d4: 0020 movs r0, r4 - 80002d6: f003 fa17 bl 8003708 - 80002da: 0600 lsls r0, r0, #24 - 80002dc: 1600 asrs r0, r0, #24 - 80002de: 0100 lsls r0, r0, #4 - 80002e0: 9935 ldr r1, [sp, #212] ; 0xd4 - 80002e2: 1808 adds r0, r1, r0 - 80002e4: d700 bvc.n 80002e8 - 80002e6: e178 b.n 80005da - 80002e8: 9035 str r0, [sp, #212] ; 0xd4 - chicken.velocity.x = 61 * chicken.velocity.x / 64; - 80002ea: 17c1 asrs r1, r0, #31 - 80002ec: 223d movs r2, #61 ; 0x3d - 80002ee: 2300 movs r3, #0 - 80002f0: 9308 str r3, [sp, #32] - 80002f2: f008 ff99 bl 8009228 <__aeabi_lmul> - 80002f6: 0002 movs r2, r0 - 80002f8: 17c0 asrs r0, r0, #31 - 80002fa: 1a09 subs r1, r1, r0 - 80002fc: 1e4b subs r3, r1, #1 - 80002fe: 4199 sbcs r1, r3 - 8000300: d000 beq.n 8000304 - 8000302: e170 b.n 80005e6 - 8000304: 0e80 lsrs r0, r0, #26 - 8000306: 1810 adds r0, r2, r0 - 8000308: 1180 asrs r0, r0, #6 - 800030a: 9035 str r0, [sp, #212] ; 0xd4 - map_as_grid: &[[u16; 32]; 32], - gravity: i32, - flapping_gravity: i32, - terminal_velocity: i32, -) -> State { - let mut new_chicken_x = chicken.position.x + chicken.velocity.x; - 800030c: 9933 ldr r1, [sp, #204] ; 0xcc - 800030e: 180b adds r3, r1, r0 - 8000310: d700 bvc.n 8000314 - 8000312: e16e b.n 80005f2 - let mut new_chicken_y = chicken.position.y + chicken.velocity.y; - 8000314: 9c36 ldr r4, [sp, #216] ; 0xd8 - 8000316: 9834 ldr r0, [sp, #208] ; 0xd0 - 8000318: 1900 adds r0, r0, r4 - 800031a: d700 bvc.n 800031e - 800031c: e16f b.n 80005fe - 800031e: 960b str r6, [sp, #44] ; 0x2c - 8000320: 900c str r0, [sp, #48] ; 0x30 - - let tile_x = ((new_chicken_x >> 8) / 8) as usize; - let tile_y = ((new_chicken_y >> 8) / 8) as usize; - 8000322: 1201 asrs r1, r0, #8 - 8000324: 0f48 lsrs r0, r1, #29 - 8000326: 1808 adds r0, r1, r0 - 8000328: 10c0 asrs r0, r0, #3 - 800032a: 001d movs r5, r3 - let tile_x = ((new_chicken_x >> 8) / 8) as usize; - 800032c: 121e asrs r6, r3, #8 - 800032e: 233e movs r3, #62 ; 0x3e - 8000330: 43db mvns r3, r3 - let left = (((new_chicken_x >> 8) - 4) / 8) as usize; - let right = (((new_chicken_x >> 8) + 4) / 8) as usize; - let top = (((new_chicken_y >> 8) - 4) / 8) as usize; - let bottom = (((new_chicken_y >> 8) + 4) / 8) as usize; - - if chicken.velocity.x < 0 && tile_is_collidable(map_as_grid[tile_y][left]) { - 8000332: 429a cmp r2, r3 - 8000334: da15 bge.n 8000362 - 8000336: 281f cmp r0, #31 - 8000338: d900 bls.n 800033c - 800033a: e18c b.n 8000656 - 800033c: 1f32 subs r2, r6, #4 - 800033e: 0f53 lsrs r3, r2, #29 - 8000340: 18d2 adds r2, r2, r3 - 8000342: 10d3 asrs r3, r2, #3 - 8000344: 2b20 cmp r3, #32 - 8000346: d300 bcc.n 800034a - 8000348: e18a b.n 8000660 - 800034a: 0180 lsls r0, r0, #6 - 800034c: 4ae3 ldr r2, [pc, #908] ; (80006dc ) - 800034e: 1810 adds r0, r2, r0 - 8000350: 005a lsls r2, r3, #1 - 8000352: 5a80 ldrh r0, [r0, r2] - 8000354: 4ae5 ldr r2, [pc, #916] ; (80006ec ) - 8000356: 4210 tst r0, r2 - 8000358: d122 bne.n 80003a0 - new_chicken_x = (((left + 1) * 8 + 4) << 8) as i32; - 800035a: 02d8 lsls r0, r3, #11 - 800035c: 9a02 ldr r2, [sp, #8] - 800035e: 1885 adds r5, r0, r2 - 8000360: e01c b.n 800039c - chicken.velocity.x = 0; - } else if chicken.velocity.x > 0 && tile_is_collidable(map_as_grid[tile_y][right]) { - 8000362: 323f adds r2, #63 ; 0x3f - 8000364: 2a7f cmp r2, #127 ; 0x7f - 8000366: d31b bcc.n 80003a0 - 8000368: 281f cmp r0, #31 - 800036a: d900 bls.n 800036e - 800036c: e194 b.n 8000698 - 800036e: 1d32 adds r2, r6, #4 - 8000370: 0f53 lsrs r3, r2, #29 - 8000372: 18d2 adds r2, r2, r3 - 8000374: 10d3 asrs r3, r2, #3 - 8000376: 2b20 cmp r3, #32 - 8000378: d300 bcc.n 800037c - 800037a: e192 b.n 80006a2 - 800037c: 0180 lsls r0, r0, #6 - 800037e: 4ad7 ldr r2, [pc, #860] ; (80006dc ) - 8000380: 1810 adds r0, r2, r0 - 8000382: 005a lsls r2, r3, #1 - 8000384: 5a80 ldrh r0, [r0, r2] - 8000386: 4ad9 ldr r2, [pc, #868] ; (80006ec ) - 8000388: 4210 tst r0, r2 - 800038a: d109 bne.n 80003a0 - new_chicken_x = ((right * 8 - 4) << 8) as i32; - 800038c: 00da lsls r2, r3, #3 - 800038e: 1f10 subs r0, r2, #4 - 8000390: 9b08 ldr r3, [sp, #32] - 8000392: 415b adcs r3, r3 - 8000394: 2a04 cmp r2, #4 - 8000396: d200 bcs.n 800039a - 8000398: e195 b.n 80006c6 - 800039a: 0205 lsls r5, r0, #8 - 800039c: 2000 movs r0, #0 - 800039e: 9035 str r0, [sp, #212] ; 0xd4 - 80003a0: 0f70 lsrs r0, r6, #29 - 80003a2: 1830 adds r0, r6, r0 - 80003a4: 10c0 asrs r0, r0, #3 - 80003a6: 1d0a adds r2, r1, #4 - 80003a8: 0f53 lsrs r3, r2, #29 - 80003aa: 18d2 adds r2, r2, r3 - 80003ac: 10d6 asrs r6, r2, #3 - chicken.velocity.x = 0; - } - - if chicken.velocity.y < 0 && tile_is_collidable(map_as_grid[top][tile_x]) { - 80003ae: 2c00 cmp r4, #0 - 80003b0: d41c bmi.n 80003ec - 80003b2: d035 beq.n 8000420 - new_chicken_y = ((((top + 1) * 8 + 4) << 8) + 4) as i32; - chicken.velocity.y = 0; - } else if chicken.velocity.y > 0 && tile_is_collidable(map_as_grid[bottom][tile_x]) { - 80003b4: 2e1f cmp r6, #31 - 80003b6: d900 bls.n 80003ba - 80003b8: e15b b.n 8000672 - 80003ba: 2820 cmp r0, #32 - 80003bc: d300 bcc.n 80003c0 - 80003be: e15e b.n 800067e - 80003c0: 01b1 lsls r1, r6, #6 - 80003c2: 4ac6 ldr r2, [pc, #792] ; (80006dc ) - 80003c4: 1851 adds r1, r2, r1 - 80003c6: 0040 lsls r0, r0, #1 - 80003c8: 5a08 ldrh r0, [r1, r0] - 80003ca: 49c8 ldr r1, [pc, #800] ; (80006ec ) - 80003cc: 4208 tst r0, r1 - 80003ce: b420 push {r5} - 80003d0: bc01 pop {r0} - 80003d2: d139 bne.n 8000448 - new_chicken_y = ((bottom * 8 - 4) << 8) as i32; - 80003d4: 00f2 lsls r2, r6, #3 - 80003d6: 2100 movs r1, #0 - 80003d8: 1f10 subs r0, r2, #4 - 80003da: b402 push {r1} - 80003dc: bc08 pop {r3} - 80003de: 414b adcs r3, r1 - 80003e0: 2a04 cmp r2, #4 - 80003e2: d200 bcs.n 80003e6 - 80003e4: e163 b.n 80006ae - 80003e6: 9136 str r1, [sp, #216] ; 0xd8 - 80003e8: 0200 lsls r0, r0, #8 - 80003ea: e036 b.n 800045a - 80003ec: 1f09 subs r1, r1, #4 - 80003ee: 0f4a lsrs r2, r1, #29 - 80003f0: 1889 adds r1, r1, r2 - 80003f2: 10cb asrs r3, r1, #3 - if chicken.velocity.y < 0 && tile_is_collidable(map_as_grid[top][tile_x]) { - 80003f4: 2b1f cmp r3, #31 - 80003f6: d900 bls.n 80003fa - 80003f8: e146 b.n 8000688 - 80003fa: 2820 cmp r0, #32 - 80003fc: d300 bcc.n 8000400 - 80003fe: e146 b.n 800068e - 8000400: 0199 lsls r1, r3, #6 - 8000402: 4ab6 ldr r2, [pc, #728] ; (80006dc ) - 8000404: 1851 adds r1, r2, r1 - 8000406: 0042 lsls r2, r0, #1 - 8000408: 5a89 ldrh r1, [r1, r2] - 800040a: 4ab8 ldr r2, [pc, #736] ; (80006ec ) - 800040c: 4211 tst r1, r2 - 800040e: d108 bne.n 8000422 - 8000410: 2400 movs r4, #0 - chicken.velocity.y = 0; - 8000412: 9436 str r4, [sp, #216] ; 0xd8 - new_chicken_y = ((((top + 1) * 8 + 4) << 8) + 4) as i32; - 8000414: 02d9 lsls r1, r3, #11 - 8000416: 9a02 ldr r2, [sp, #8] - 8000418: 1851 adds r1, r2, r1 - 800041a: 1d09 adds r1, r1, #4 - 800041c: 910c str r1, [sp, #48] ; 0x30 - 800041e: e000 b.n 8000422 - 8000420: 9c08 ldr r4, [sp, #32] - chicken.velocity.y = 0; - } - - let mut air_animation = State::Ground; - - if !tile_is_collidable(map_as_grid[bottom][tile_x]) { - 8000422: 2e20 cmp r6, #32 - 8000424: d300 bcc.n 8000428 - 8000426: e102 b.n 800062e - 8000428: 2820 cmp r0, #32 - 800042a: d300 bcc.n 800042e - 800042c: e10e b.n 800064c - 800042e: 01b1 lsls r1, r6, #6 - 8000430: 4aaa ldr r2, [pc, #680] ; (80006dc ) - 8000432: 1851 adds r1, r2, r1 - 8000434: 0040 lsls r0, r0, #1 - 8000436: 5a08 ldrh r0, [r1, r0] - 8000438: 49ac ldr r1, [pc, #688] ; (80006ec ) - 800043a: 4208 tst r0, r1 - 800043c: d00c beq.n 8000458 - if chicken.velocity.y < 0 { - 800043e: 2c00 cmp r4, #0 - 8000440: b420 push {r5} - 8000442: bc01 pop {r0} - 8000444: d40e bmi.n 8000464 - 8000446: 2400 movs r4, #0 - air_animation = State::Upwards; - chicken.velocity.y += gravity; - } else { - air_animation = State::Flapping; - chicken.velocity.y += flapping_gravity; - 8000448: 1d64 adds r4, r4, #5 - 800044a: d700 bvc.n 800044e - 800044c: e10b b.n 8000666 - if chicken.velocity.y > terminal_velocity { - 800044e: 2c80 cmp r4, #128 ; 0x80 - 8000450: db00 blt.n 8000454 - 8000452: 2480 movs r4, #128 ; 0x80 - 8000454: 9e03 ldr r6, [sp, #12] - 8000456: e007 b.n 8000468 - 8000458: 980c ldr r0, [sp, #48] ; 0x30 - } - } - } - - chicken.position.x = new_chicken_x; - chicken.position.y = new_chicken_y; - 800045a: 9034 str r0, [sp, #208] ; 0xd0 - chicken.position.x = new_chicken_x; - 800045c: 9533 str r5, [sp, #204] ; 0xcc - 800045e: 2600 movs r6, #0 - 8000460: 960c str r6, [sp, #48] ; 0x30 - 8000462: e00d b.n 8000480 - chicken.velocity.y += gravity; - 8000464: 3410 adds r4, #16 - 8000466: 2601 movs r6, #1 - chicken.position.y = new_chicken_y; - 8000468: 990c ldr r1, [sp, #48] ; 0x30 - 800046a: 9134 str r1, [sp, #208] ; 0xd0 - chicken.position.x = new_chicken_x; - 800046c: 9033 str r0, [sp, #204] ; 0xcc - 800046e: 9436 str r4, [sp, #216] ; 0xd8 - 8000470: 9809 ldr r0, [sp, #36] ; 0x24 - frames_off_ground += 1; - 8000472: 1c41 adds r1, r0, #1 - 8000474: 4281 cmp r1, r0 - 8000476: d700 bvc.n 800047a - 8000478: e0d3 b.n 8000622 - 800047a: 910c str r1, [sp, #48] ; 0x30 - if frames_off_ground < 10 && input.is_just_pressed(Button::A) { - 800047c: 290a cmp r1, #10 - 800047e: da09 bge.n 8000494 - 8000480: a82d add r0, sp, #180 ; 0xb4 - 8000482: 2101 movs r1, #1 - 8000484: f003 f947 bl 8003716 - 8000488: 2800 cmp r0, #0 - 800048a: d003 beq.n 8000494 - chicken.velocity.y = -jump_velocity; - 800048c: 48a3 ldr r0, [pc, #652] ; (800071c ) - 800048e: 9036 str r0, [sp, #216] ; 0xd8 - 8000490: 20c8 movs r0, #200 ; 0xc8 - if frames_off_ground < 10 && input.is_just_pressed(Button::A) { - 8000492: 900c str r0, [sp, #48] ; 0x30 - if chicken.position.x > (WIDTH - 8 + 4) << 8 { - 8000494: 9933 ldr r1, [sp, #204] ; 0xcc - 8000496: 9804 ldr r0, [sp, #16] - 8000498: 4281 cmp r1, r0 - 800049a: dc02 bgt.n 80004a2 - 800049c: 9807 ldr r0, [sp, #28] - } else if chicken.position.x < 4 << 8 { - 800049e: 4281 cmp r1, r0 - 80004a0: da02 bge.n 80004a8 - 80004a2: 9033 str r0, [sp, #204] ; 0xcc - 80004a4: 2000 movs r0, #0 - 80004a6: 9035 str r0, [sp, #212] ; 0xd4 - if chicken.position.y > (HEIGHT - 8 + 4) << 8 { - 80004a8: 9934 ldr r1, [sp, #208] ; 0xd0 - 80004aa: 9805 ldr r0, [sp, #20] - 80004ac: 4281 cmp r1, r0 - 80004ae: dc02 bgt.n 80004b6 - 80004b0: 9807 ldr r0, [sp, #28] - } else if chicken.position.y < 4 << 8 { - 80004b2: 4281 cmp r1, r0 - 80004b4: da02 bge.n 80004bc - 80004b6: 9034 str r0, [sp, #208] ; 0xd0 - 80004b8: 2000 movs r0, #0 - 80004ba: 9036 str r0, [sp, #216] ; 0xd8 - 80004bc: 9806 ldr r0, [sp, #24] - 80004be: 43c1 mvns r1, r0 - if chicken.velocity.x > 1 { - 80004c0: 9835 ldr r0, [sp, #212] ; 0xd4 - 80004c2: 1e82 subs r2, r0, #2 - 80004c4: 428a cmp r2, r1 - 80004c6: d807 bhi.n 80004d8 - 80004c8: 2802 cmp r0, #2 - 80004ca: db01 blt.n 80004d0 - 80004cc: 2100 movs r1, #0 - 80004ce: e000 b.n 80004d2 - 80004d0: 2101 movs r1, #1 - 80004d2: 980a ldr r0, [sp, #40] ; 0x28 - 80004d4: f004 f976 bl 80047c4 - match state { - 80004d8: 2e00 cmp r6, #0 - 80004da: d016 beq.n 800050a - 80004dc: 2e01 cmp r6, #1 - 80004de: 4e80 ldr r6, [pc, #512] ; (80006e0 ) - 80004e0: 4d81 ldr r5, [pc, #516] ; (80006e8 ) - 80004e2: d043 beq.n 800056c - 80004e4: 2105 movs r1, #5 - (((count / delay) % (end + 1 - start)) + start) as usize - 80004e6: 980b ldr r0, [sp, #44] ; 0x2c - 80004e8: f008 fec8 bl 800927c <__aeabi_uidiv> - 80004ec: 07c0 lsls r0, r0, #31 - 80004ee: 0ec0 lsrs r0, r0, #27 - .set_sprite(object.sprite(&CHICKEN_SPRITES[frame_ranger(frame_count, 4, 5, 5)])); - 80004f0: 497c ldr r1, [pc, #496] ; (80006e4 ) - 80004f2: 180a adds r2, r1, r0 - 80004f4: 3240 adds r2, #64 ; 0x40 - 80004f6: ac38 add r4, sp, #224 ; 0xe0 - 80004f8: a938 add r1, sp, #224 ; 0xe0 - 80004fa: 0020 movs r0, r4 - 80004fc: f003 fe0a bl 8004114 - chicken - 8000500: 980a ldr r0, [sp, #40] ; 0x28 - 8000502: 0021 movs r1, r4 - 8000504: f003 ff58 bl 80043b8 - 8000508: e030 b.n 800056c - if chicken.velocity.x.abs() > 1 << 4 { - 800050a: 9835 ldr r0, [sp, #212] ; 0xd4 - #[rustc_inherit_overflow_checks] - pub const fn abs(self) -> Self { - // Note that the #[rustc_inherit_overflow_checks] and #[inline] - // above mean that the overflow semantics of the subtraction - // depend on the crate we're being called from. - if self.is_negative() { - 800050c: 2800 cmp r0, #0 - 800050e: d419 bmi.n 8000544 - 8000510: 2810 cmp r0, #16 - 8000512: 4e73 ldr r6, [pc, #460] ; (80006e0 ) - 8000514: d91f bls.n 8000556 - 8000516: 210a movs r1, #10 - (((count / delay) % (end + 1 - start)) + start) as usize - 8000518: 980b ldr r0, [sp, #44] ; 0x2c - 800051a: f008 feaf bl 800927c <__aeabi_uidiv> - 800051e: 2103 movs r1, #3 - 8000520: f008 ff04 bl 800932c <__aeabi_uidivmod> - 8000524: 0108 lsls r0, r1, #4 - object.sprite(&CHICKEN_SPRITES[frame_ranger(frame_count, 1, 3, 10)]), - 8000526: 496f ldr r1, [pc, #444] ; (80006e4 ) - 8000528: 1842 adds r2, r0, r1 - 800052a: 3210 adds r2, #16 - 800052c: ac38 add r4, sp, #224 ; 0xe0 - 800052e: a938 add r1, sp, #224 ; 0xe0 - 8000530: 0020 movs r0, r4 - 8000532: e014 b.n 800055e - 8000534: 0800a624 .word 0x0800a624 - 8000538: 08009c04 .word 0x08009c04 - 800053c: 08009e24 .word 0x08009e24 - 8000540: 0000ffff .word 0x0000ffff - 8000544: 2101 movs r1, #1 - 8000546: 07c9 lsls r1, r1, #31 - -self - 8000548: 4288 cmp r0, r1 - 800054a: d100 bne.n 800054e - 800054c: e0b5 b.n 80006ba - 800054e: 4240 negs r0, r0 - if chicken.velocity.x.abs() > 1 << 4 { - 8000550: 2810 cmp r0, #16 - 8000552: 4e63 ldr r6, [pc, #396] ; (80006e0 ) - 8000554: d8df bhi.n 8000516 - 8000556: ac38 add r4, sp, #224 ; 0xe0 - 8000558: a938 add r1, sp, #224 ; 0xe0 - .set_sprite(object.sprite(&CHICKEN_SPRITES[0])); - 800055a: 0020 movs r0, r4 - 800055c: 4a61 ldr r2, [pc, #388] ; (80006e4 ) - 800055e: f003 fdd9 bl 8004114 - 8000562: 980a ldr r0, [sp, #40] ; 0x28 - 8000564: 0021 movs r1, r4 - 8000566: f003 ff27 bl 80043b8 - 800056a: 4d5f ldr r5, [pc, #380] ; (80006e8 ) - let x: u16 = (chicken.position.x >> 8).try_into().unwrap(); - 800056c: 9933 ldr r1, [sp, #204] ; 0xcc - match self { - 800056e: 42a9 cmp r1, r5 - 8000570: d900 bls.n 8000574 - 8000572: e0ae b.n 80006d2 - let y: u16 = (chicken.position.y >> 8).try_into().unwrap(); - 8000574: 9834 ldr r0, [sp, #208] ; 0xd0 - 8000576: 42a8 cmp r0, r5 - 8000578: d900 bls.n 800057c - 800057a: e0ac b.n 80006d6 - 800057c: 0a09 lsrs r1, r1, #8 - chicken.object.set_x(x - 4); - 800057e: 4031 ands r1, r6 - 8000580: 1f09 subs r1, r1, #4 - 8000582: 000a movs r2, r1 - 8000584: 4032 ands r2, r6 - 8000586: 1a53 subs r3, r2, r1 - 8000588: 1e5c subs r4, r3, #1 - 800058a: 41a3 sbcs r3, r4 - 800058c: 428a cmp r2, r1 - 800058e: d13c bne.n 800060a - 8000590: 0a04 lsrs r4, r0, #8 - 8000592: 9d0a ldr r5, [sp, #40] ; 0x28 - 8000594: 0028 movs r0, r5 - 8000596: f004 f9b9 bl 800490c - chicken.object.set_y(y - 4); - 800059a: 4034 ands r4, r6 - 800059c: 1f21 subs r1, r4, #4 - 800059e: 0008 movs r0, r1 - 80005a0: 4030 ands r0, r6 - 80005a2: 1a42 subs r2, r0, r1 - 80005a4: 1e53 subs r3, r2, #1 - 80005a6: 419a sbcs r2, r3 - 80005a8: 4288 cmp r0, r1 - 80005aa: d134 bne.n 8000616 - 80005ac: 0028 movs r0, r5 - 80005ae: f004 fa97 bl 8004ae0 - 80005b2: ac38 add r4, sp, #224 ; 0xe0 - object.commit(); - 80005b4: 0020 movs r0, r4 - 80005b6: f003 f8d3 bl 8003760 - vblank.wait_for_vblank(); - 80005ba: 0020 movs r0, r4 - 80005bc: f002 fcc0 bl 8002f40 - 80005c0: 990b ldr r1, [sp, #44] ; 0x2c - frame_count += 1; - 80005c2: 1c4e adds r6, r1, #1 - 80005c4: 1c49 adds r1, r1, #1 - 80005c6: 980c ldr r0, [sp, #48] ; 0x30 - 80005c8: 9009 str r0, [sp, #36] ; 0x24 - 80005ca: d200 bcs.n 80005ce - 80005cc: e67e b.n 80002cc - 80005ce: 4850 ldr r0, [pc, #320] ; (8000710 ) - 80005d0: 211c movs r1, #28 - 80005d2: 4a53 ldr r2, [pc, #332] ; (8000720 ) - 80005d4: f008 fd84 bl 80090e0 - 80005d8: defe udf #254 ; 0xfe - chicken.velocity.x += (input.x_tri() as i32) * acceleration; - 80005da: 484d ldr r0, [pc, #308] ; (8000710 ) - 80005dc: 211c movs r1, #28 - 80005de: 4a5b ldr r2, [pc, #364] ; (800074c ) - 80005e0: f008 fd7e bl 80090e0 - 80005e4: defe udf #254 ; 0xfe - chicken.velocity.x = 61 * chicken.velocity.x / 64; - 80005e6: 4857 ldr r0, [pc, #348] ; (8000744 ) - 80005e8: 2121 movs r1, #33 ; 0x21 - 80005ea: 4a57 ldr r2, [pc, #348] ; (8000748 ) - 80005ec: f008 fd78 bl 80090e0 - 80005f0: defe udf #254 ; 0xfe - let mut new_chicken_x = chicken.position.x + chicken.velocity.x; - 80005f2: 4847 ldr r0, [pc, #284] ; (8000710 ) - 80005f4: 211c movs r1, #28 - 80005f6: 4a52 ldr r2, [pc, #328] ; (8000740 ) - 80005f8: f008 fd72 bl 80090e0 - 80005fc: defe udf #254 ; 0xfe - let mut new_chicken_y = chicken.position.y + chicken.velocity.y; - 80005fe: 4844 ldr r0, [pc, #272] ; (8000710 ) - 8000600: 211c movs r1, #28 - 8000602: 4a4e ldr r2, [pc, #312] ; (800073c ) - 8000604: f008 fd6c bl 80090e0 - 8000608: defe udf #254 ; 0xfe - chicken.object.set_x(x - 4); - 800060a: 483a ldr r0, [pc, #232] ; (80006f4 ) - 800060c: 2121 movs r1, #33 ; 0x21 - 800060e: 4a46 ldr r2, [pc, #280] ; (8000728 ) - 8000610: f008 fd66 bl 80090e0 - 8000614: defe udf #254 ; 0xfe - chicken.object.set_y(y - 4); - 8000616: 4837 ldr r0, [pc, #220] ; (80006f4 ) - 8000618: 2121 movs r1, #33 ; 0x21 - 800061a: 4a42 ldr r2, [pc, #264] ; (8000724 ) - 800061c: f008 fd60 bl 80090e0 - 8000620: defe udf #254 ; 0xfe - frames_off_ground += 1; - 8000622: 483b ldr r0, [pc, #236] ; (8000710 ) - 8000624: 211c movs r1, #28 - 8000626: 4a3c ldr r2, [pc, #240] ; (8000718 ) - 8000628: f008 fd5a bl 80090e0 - 800062c: defe udf #254 ; 0xfe - 800062e: 2120 movs r1, #32 - if !tile_is_collidable(map_as_grid[bottom][tile_x]) { - 8000630: 4a36 ldr r2, [pc, #216] ; (800070c ) - 8000632: 0030 movs r0, r6 - 8000634: f008 fd6a bl 800910c - 8000638: defe udf #254 ; 0xfe - 800063a: 46c0 nop ; (mov r8, r8) - 800063c: 08009ba4 .word 0x08009ba4 - 8000640: 0800a628 .word 0x0800a628 - 8000644: 0800993f .word 0x0800993f - 8000648: 0800996c .word 0x0800996c - 800064c: 2120 movs r1, #32 - 800064e: 4a2f ldr r2, [pc, #188] ; (800070c ) - 8000650: f008 fd5c bl 800910c - 8000654: defe udf #254 ; 0xfe - 8000656: 2120 movs r1, #32 - if chicken.velocity.x < 0 && tile_is_collidable(map_as_grid[tile_y][left]) { - 8000658: 4a28 ldr r2, [pc, #160] ; (80006fc ) - 800065a: f008 fd57 bl 800910c - 800065e: defe udf #254 ; 0xfe - 8000660: 2120 movs r1, #32 - 8000662: 4a26 ldr r2, [pc, #152] ; (80006fc ) - 8000664: e01f b.n 80006a6 - chicken.velocity.y += flapping_gravity; - 8000666: 482a ldr r0, [pc, #168] ; (8000710 ) - 8000668: 211c movs r1, #28 - 800066a: 4a2a ldr r2, [pc, #168] ; (8000714 ) - 800066c: f008 fd38 bl 80090e0 - 8000670: defe udf #254 ; 0xfe - 8000672: 2120 movs r1, #32 - } else if chicken.velocity.y > 0 && tile_is_collidable(map_as_grid[bottom][tile_x]) { - 8000674: 4a22 ldr r2, [pc, #136] ; (8000700 ) - 8000676: 0030 movs r0, r6 - 8000678: f008 fd48 bl 800910c - 800067c: defe udf #254 ; 0xfe - 800067e: 2120 movs r1, #32 - 8000680: 4a1f ldr r2, [pc, #124] ; (8000700 ) - 8000682: f008 fd43 bl 800910c - 8000686: defe udf #254 ; 0xfe - 8000688: 2120 movs r1, #32 - if chicken.velocity.y < 0 && tile_is_collidable(map_as_grid[top][tile_x]) { - 800068a: 4a1f ldr r2, [pc, #124] ; (8000708 ) - 800068c: e00b b.n 80006a6 - 800068e: 2120 movs r1, #32 - 8000690: 4a1d ldr r2, [pc, #116] ; (8000708 ) - 8000692: f008 fd3b bl 800910c - 8000696: defe udf #254 ; 0xfe - 8000698: 2120 movs r1, #32 - } else if chicken.velocity.x > 0 && tile_is_collidable(map_as_grid[tile_y][right]) { - 800069a: 4a15 ldr r2, [pc, #84] ; (80006f0 ) - 800069c: f008 fd36 bl 800910c - 80006a0: defe udf #254 ; 0xfe - 80006a2: 2120 movs r1, #32 - 80006a4: 4a12 ldr r2, [pc, #72] ; (80006f0 ) - 80006a6: 0018 movs r0, r3 - 80006a8: f008 fd30 bl 800910c - 80006ac: defe udf #254 ; 0xfe - new_chicken_y = ((bottom * 8 - 4) << 8) as i32; - 80006ae: 4811 ldr r0, [pc, #68] ; (80006f4 ) - 80006b0: 2121 movs r1, #33 ; 0x21 - 80006b2: 4a14 ldr r2, [pc, #80] ; (8000704 ) - 80006b4: f008 fd14 bl 80090e0 - 80006b8: defe udf #254 ; 0xfe - 80006ba: 481e ldr r0, [pc, #120] ; (8000734 ) - 80006bc: 211f movs r1, #31 - 80006be: 4a1e ldr r2, [pc, #120] ; (8000738 ) - 80006c0: f008 fd0e bl 80090e0 - 80006c4: defe udf #254 ; 0xfe - new_chicken_x = ((right * 8 - 4) << 8) as i32; - 80006c6: 480b ldr r0, [pc, #44] ; (80006f4 ) - 80006c8: 2121 movs r1, #33 ; 0x21 - 80006ca: 4a0b ldr r2, [pc, #44] ; (80006f8 ) - 80006cc: f008 fd08 bl 80090e0 - 80006d0: defe udf #254 ; 0xfe - Err(e) => unwrap_failed("called `Result::unwrap()` on an `Err` value", &e), - 80006d2: 4817 ldr r0, [pc, #92] ; (8000730 ) - 80006d4: e5d5 b.n 8000282 - 80006d6: 4815 ldr r0, [pc, #84] ; (800072c ) - 80006d8: e5d3 b.n 8000282 - 80006da: 46c0 nop ; (mov r8, r8) - 80006dc: 08009e24 .word 0x08009e24 - 80006e0: 0000ffff .word 0x0000ffff - 80006e4: 08009ba4 .word 0x08009ba4 - 80006e8: 00ffffff .word 0x00ffffff - 80006ec: 000003fb .word 0x000003fb - 80006f0: 08009a54 .word 0x08009a54 - 80006f4: 08009990 .word 0x08009990 - 80006f8: 08009a64 .word 0x08009a64 - 80006fc: 08009a14 .word 0x08009a14 - 8000700: 08009a84 .word 0x08009a84 - 8000704: 08009a94 .word 0x08009a94 - 8000708: 08009a74 .word 0x08009a74 - 800070c: 08009aa4 .word 0x08009aa4 - 8000710: 08009880 .word 0x08009880 - 8000714: 08009ab4 .word 0x08009ab4 - 8000718: 0800a668 .word 0x0800a668 - 800071c: fffffe00 .word 0xfffffe00 - 8000720: 0800a638 .word 0x0800a638 - 8000724: 080099e4 .word 0x080099e4 - 8000728: 080099d4 .word 0x080099d4 - 800072c: 080099c4 .word 0x080099c4 - 8000730: 080099b4 .word 0x080099b4 - 8000734: 08009920 .word 0x08009920 - 8000738: 08009910 .word 0x08009910 - 800073c: 08009a04 .word 0x08009a04 - 8000740: 080099f4 .word 0x080099f4 - 8000744: 08009a30 .word 0x08009a30 - 8000748: 0800a658 .word 0x0800a658 - 800074c: 0800a648 .word 0x0800a648 - -08000750 <__rust_alloc>: - 8000750: b580 push {r7, lr} - 8000752: f000 f84d bl 80007f0 <__rg_alloc> - 8000756: bc80 pop {r7} - 8000758: bc02 pop {r1} - 800075a: 468e mov lr, r1 - 800075c: 4770 bx lr - -0800075e <__rust_dealloc>: - 800075e: b580 push {r7, lr} - 8000760: f000 f876 bl 8000850 <__rg_dealloc> - 8000764: bc80 pop {r7} - 8000766: bc01 pop {r0} - 8000768: 4686 mov lr, r0 - 800076a: 4770 bx lr - -0800076c <__rust_realloc>: - 800076c: b580 push {r7, lr} - 800076e: f000 f8a1 bl 80008b4 <__rg_realloc> - 8000772: bc80 pop {r7} - 8000774: bc02 pop {r1} - 8000776: 468e mov lr, r1 - 8000778: 4770 bx lr - -0800077a <__rust_alloc_zeroed>: - 800077a: b580 push {r7, lr} - 800077c: f000 f8f0 bl 8000960 <__rg_alloc_zeroed> - 8000780: bc80 pop {r7} - 8000782: bc02 pop {r1} - 8000784: 468e mov lr, r1 - 8000786: 4770 bx lr - -08000788 <__rust_alloc_error_handler>: - 8000788: b580 push {r7, lr} - 800078a: f006 f997 bl 8006abc <__rg_oom> - 800078e: bc80 pop {r7} - 8000790: bc01 pop {r0} - 8000792: 4686 mov lr, r0 - 8000794: 4770 bx lr - -08000796 : - #[stable(feature = "fn_once_output", since = "1.12.0")] - type Output; - - /// Performs the call operation. - #[unstable(feature = "fn_traits", issue = "29625")] - extern "rust-call" fn call_once(self, args: Args) -> Self::Output; - 8000796: 2081 movs r0, #129 ; 0x81 - 8000798: 0480 lsls r0, r0, #18 - 800079a: 4770 bx lr - -0800079c : -pub unsafe fn number_of_blocks() -> u32 { - GLOBAL_ALLOC.number_of_blocks() -} - -#[alloc_error_handler] -fn alloc_error(layout: Layout) -> ! { - 800079c: b580 push {r7, lr} - 800079e: af00 add r7, sp, #0 - 80007a0: b08c sub sp, #48 ; 0x30 - panic!( - "Failed to allocate size {} with alignment {}", - layout.size(), - 80007a2: 900a str r0, [sp, #40] ; 0x28 -macro_rules! assert_unsafe_precondition { - ($e:expr) => { - if cfg!(debug_assertions) { - // Use a closure so that we can capture arbitrary expressions from the invocation - let runtime = || { - if !$e { - 80007a4: 2900 cmp r1, #0 - 80007a6: d101 bne.n 80007ac - // abort instead of panicking to reduce impact on code size - ::core::intrinsics::abort(); - 80007a8: defe udf #254 ; 0xfe - 80007aa: defe udf #254 ; 0xfe - panic!( - 80007ac: 480b ldr r0, [pc, #44] ; (80007dc ) - 80007ae: 9009 str r0, [sp, #36] ; 0x24 - 80007b0: aa0b add r2, sp, #44 ; 0x2c - 80007b2: 9208 str r2, [sp, #32] - 80007b4: 9007 str r0, [sp, #28] - 80007b6: a80a add r0, sp, #40 ; 0x28 - 80007b8: 9006 str r0, [sp, #24] - layout.align() - 80007ba: 910b str r1, [sp, #44] ; 0x2c - 80007bc: 2002 movs r0, #2 - #[rustc_const_unstable(feature = "const_fmt_arguments_new", issue = "none")] - pub const fn new_v1(pieces: &'a [&'static str], args: &'a [ArgumentV1<'a>]) -> Arguments<'a> { - if pieces.len() < args.len() || pieces.len() > args.len() + 1 { - panic!("invalid args"); - } - Arguments { pieces, fmt: None, args } - 80007be: 9005 str r0, [sp, #20] - 80007c0: a906 add r1, sp, #24 - 80007c2: 9104 str r1, [sp, #16] - 80007c4: 2100 movs r1, #0 - 80007c6: 9103 str r1, [sp, #12] - 80007c8: 9102 str r1, [sp, #8] - 80007ca: 9001 str r0, [sp, #4] - 80007cc: 4804 ldr r0, [pc, #16] ; (80007e0 ) - 80007ce: 9000 str r0, [sp, #0] - 80007d0: 4668 mov r0, sp - panic!( - 80007d2: 4904 ldr r1, [pc, #16] ; (80007e4 ) - 80007d4: f008 fcba bl 800914c - 80007d8: defe udf #254 ; 0xfe - 80007da: 46c0 nop ; (mov r8, r8) - 80007dc: 08007f49 .word 0x08007f49 - 80007e0: 0800a754 .word 0x0800a754 - 80007e4: 0800a778 .word 0x0800a778 - -080007e8 : - } - - // TODO: This seems completely wrong, but without the &, rust generates - // a double dereference :/. Maybe a bug in nightly? - (unsafe { &__ewram_data_end }) as *const _ as usize -} - 80007e8: 4800 ldr r0, [pc, #0] ; (80007ec ) - 80007ea: 4770 bx lr - 80007ec: 02000108 .word 0x02000108 - -080007f0 <__rg_alloc>: -static GLOBAL_ALLOC: BlockAllocator = unsafe { - 80007f0: b5d0 push {r4, r6, r7, lr} - 80007f2: af02 add r7, sp, #8 - 80007f4: 000a movs r2, r1 - 80007f6: 0001 movs r1, r0 - #[doc(alias = "popcnt")] - #[must_use = "this returns the result of the operation, \ - without modifying the original"] - #[inline(always)] - pub const fn count_ones(self) -> u32 { - intrinsics::ctpop(self as $ActualT) as u32 - 80007f8: 0850 lsrs r0, r2, #1 - 80007fa: 4b0e ldr r3, [pc, #56] ; (8000834 <__rg_alloc+0x44>) - 80007fc: 4003 ands r3, r0 - 80007fe: 1ad0 subs r0, r2, r3 - 8000800: 4b0d ldr r3, [pc, #52] ; (8000838 <__rg_alloc+0x48>) - 8000802: 0884 lsrs r4, r0, #2 - 8000804: 4018 ands r0, r3 - 8000806: 401c ands r4, r3 - 8000808: 1900 adds r0, r0, r4 - 800080a: 0903 lsrs r3, r0, #4 - 800080c: 18c0 adds r0, r0, r3 - 800080e: 4b0b ldr r3, [pc, #44] ; (800083c <__rg_alloc+0x4c>) - 8000810: 4003 ands r3, r0 - 8000812: 480b ldr r0, [pc, #44] ; (8000840 <__rg_alloc+0x50>) - 8000814: 4358 muls r0, r3 - 8000816: 0e00 lsrs r0, r0, #24 - /// - /// Equivalently, it must be `1 << exp` for some `exp` in `0..usize::BITS`. - /// It must *not* be zero. - #[inline] - pub(crate) const unsafe fn new_unchecked(align: usize) -> Self { - debug_assert!(align.is_power_of_two()); - 8000818: 2801 cmp r0, #1 - 800081a: d105 bne.n 8000828 <__rg_alloc+0x38> - } -} - -unsafe impl GlobalAlloc for BlockAllocator { - unsafe fn alloc(&self, layout: Layout) -> *mut u8 { - match self.alloc(layout) { - 800081c: 480b ldr r0, [pc, #44] ; (800084c <__rg_alloc+0x5c>) - 800081e: f004 fceb bl 80051f8 -}; - 8000822: bcd0 pop {r4, r6, r7} - 8000824: bc02 pop {r1} - 8000826: 4708 bx r1 - 8000828: 4806 ldr r0, [pc, #24] ; (8000844 <__rg_alloc+0x54>) - 800082a: 2129 movs r1, #41 ; 0x29 - 800082c: 4a06 ldr r2, [pc, #24] ; (8000848 <__rg_alloc+0x58>) - 800082e: f008 fc57 bl 80090e0 - 8000832: defe udf #254 ; 0xfe - 8000834: 55555555 .word 0x55555555 - 8000838: 33333333 .word 0x33333333 - 800083c: 0f0f0f0f .word 0x0f0f0f0f - 8000840: 01010101 .word 0x01010101 - 8000844: 0800a678 .word 0x0800a678 - 8000848: 0800a71c .word 0x0800a71c - 800084c: 02000000 .word 0x02000000 - -08000850 <__rg_dealloc>: -static GLOBAL_ALLOC: BlockAllocator = unsafe { - 8000850: b5b0 push {r4, r5, r7, lr} - 8000852: af02 add r7, sp, #8 - 8000854: 0013 movs r3, r2 - 8000856: 000a movs r2, r1 - 8000858: 0001 movs r1, r0 - 800085a: 0858 lsrs r0, r3, #1 - 800085c: 4c0e ldr r4, [pc, #56] ; (8000898 <__rg_dealloc+0x48>) - 800085e: 4004 ands r4, r0 - 8000860: 1b18 subs r0, r3, r4 - 8000862: 4c0e ldr r4, [pc, #56] ; (800089c <__rg_dealloc+0x4c>) - 8000864: 0885 lsrs r5, r0, #2 - 8000866: 4020 ands r0, r4 - 8000868: 4025 ands r5, r4 - 800086a: 1940 adds r0, r0, r5 - 800086c: 0904 lsrs r4, r0, #4 - 800086e: 1900 adds r0, r0, r4 - 8000870: 4c0b ldr r4, [pc, #44] ; (80008a0 <__rg_dealloc+0x50>) - 8000872: 4004 ands r4, r0 - 8000874: 480b ldr r0, [pc, #44] ; (80008a4 <__rg_dealloc+0x54>) - 8000876: 4360 muls r0, r4 - 8000878: 0e00 lsrs r0, r0, #24 - 800087a: 2801 cmp r0, #1 - 800087c: d105 bne.n 800088a <__rg_dealloc+0x3a> - 800087e: 480c ldr r0, [pc, #48] ; (80008b0 <__rg_dealloc+0x60>) - 8000880: f004 fda6 bl 80053d0 <::dealloc> -}; - 8000884: bcb0 pop {r4, r5, r7} - 8000886: bc01 pop {r0} - 8000888: 4700 bx r0 - 800088a: 4807 ldr r0, [pc, #28] ; (80008a8 <__rg_dealloc+0x58>) - 800088c: 2129 movs r1, #41 ; 0x29 - 800088e: 4a07 ldr r2, [pc, #28] ; (80008ac <__rg_dealloc+0x5c>) - 8000890: f008 fc26 bl 80090e0 - 8000894: defe udf #254 ; 0xfe - 8000896: 46c0 nop ; (mov r8, r8) - 8000898: 55555555 .word 0x55555555 - 800089c: 33333333 .word 0x33333333 - 80008a0: 0f0f0f0f .word 0x0f0f0f0f - 80008a4: 01010101 .word 0x01010101 - 80008a8: 0800a678 .word 0x0800a678 - 80008ac: 0800a71c .word 0x0800a71c - 80008b0: 02000000 .word 0x02000000 - -080008b4 <__rg_realloc>: -static GLOBAL_ALLOC: BlockAllocator = unsafe { - 80008b4: b5f0 push {r4, r5, r6, r7, lr} - 80008b6: af03 add r7, sp, #12 - 80008b8: b083 sub sp, #12 - 80008ba: 001d movs r5, r3 - 80008bc: 0014 movs r4, r2 - 80008be: 9102 str r1, [sp, #8] - 80008c0: 0852 lsrs r2, r2, #1 - 80008c2: 4920 ldr r1, [pc, #128] ; (8000944 <__rg_realloc+0x90>) - 80008c4: 4011 ands r1, r2 - 80008c6: 1a63 subs r3, r4, r1 - 80008c8: 491f ldr r1, [pc, #124] ; (8000948 <__rg_realloc+0x94>) - 80008ca: 089a lsrs r2, r3, #2 - 80008cc: 400b ands r3, r1 - 80008ce: 400a ands r2, r1 - 80008d0: 189a adds r2, r3, r2 - 80008d2: 0911 lsrs r1, r2, #4 - 80008d4: 1852 adds r2, r2, r1 - 80008d6: 491d ldr r1, [pc, #116] ; (800094c <__rg_realloc+0x98>) - 80008d8: 4011 ands r1, r2 - 80008da: 4a1d ldr r2, [pc, #116] ; (8000950 <__rg_realloc+0x9c>) - 80008dc: 434a muls r2, r1 - 80008de: 0e11 lsrs r1, r2, #24 - 80008e0: 2901 cmp r1, #1 - 80008e2: d128 bne.n 8000936 <__rg_realloc+0x82> - 80008e4: 9001 str r0, [sp, #4] - if !$e { - 80008e6: 2c00 cmp r4, #0 - 80008e8: d023 beq.n 8000932 <__rg_realloc+0x7e> - 80008ea: 481c ldr r0, [pc, #112] ; (800095c <__rg_realloc+0xa8>) - 80008ec: 0029 movs r1, r5 - 80008ee: 0022 movs r2, r4 - 80008f0: f004 fc82 bl 80051f8 - 80008f4: 0006 movs r6, r0 - // SAFETY: the caller must ensure that the `new_size` does not overflow. - // `layout.align()` comes from a `Layout` and is thus guaranteed to be valid. - let new_layout = unsafe { Layout::from_size_align_unchecked(new_size, layout.align()) }; - // SAFETY: the caller must ensure that `new_layout` is greater than zero. - let new_ptr = unsafe { self.alloc(new_layout) }; - if !new_ptr.is_null() { - 80008f6: 2800 cmp r0, #0 - 80008f8: d016 beq.n 8000928 <__rg_realloc+0x74> - 80008fa: 9802 ldr r0, [sp, #8] - 80008fc: 42a8 cmp r0, r5 - 80008fe: d800 bhi.n 8000902 <__rg_realloc+0x4e> - 8000900: 9d02 ldr r5, [sp, #8] - 8000902: 9901 ldr r1, [sp, #4] - - // SAFETY: the safety contract for `copy_nonoverlapping` must be - // upheld by the caller. - unsafe { - assert_unsafe_precondition!( - is_aligned_and_not_null(src) - 8000904: 2900 cmp r1, #0 - 8000906: d014 beq.n 8000932 <__rg_realloc+0x7e> - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 8000908: 1a70 subs r0, r6, r1 - 800090a: d200 bcs.n 800090e <__rg_realloc+0x5a> - 800090c: 1b88 subs r0, r1, r6 - if !$e { - 800090e: 42a8 cmp r0, r5 - 8000910: d30f bcc.n 8000932 <__rg_realloc+0x7e> - && is_aligned_and_not_null(dst) - && is_nonoverlapping(src, dst, count) - ); - copy_nonoverlapping(src, dst, count) - 8000912: 0030 movs r0, r6 - 8000914: 002a movs r2, r5 - 8000916: 000d movs r5, r1 - 8000918: f008 fcc2 bl 80092a0 <__aeabi_memcpy> - // SAFETY: the previously allocated block cannot overlap the newly allocated block. - // The safety contract for `dealloc` must be upheld by the caller. - unsafe { - ptr::copy_nonoverlapping(ptr, new_ptr, cmp::min(layout.size(), new_size)); - self.dealloc(ptr, layout); - 800091c: 480f ldr r0, [pc, #60] ; (800095c <__rg_realloc+0xa8>) - 800091e: 0029 movs r1, r5 - 8000920: 9a02 ldr r2, [sp, #8] - 8000922: 0023 movs r3, r4 - 8000924: f004 fd54 bl 80053d0 <::dealloc> -}; - 8000928: 0030 movs r0, r6 - 800092a: b003 add sp, #12 - 800092c: bcf0 pop {r4, r5, r6, r7} - 800092e: bc02 pop {r1} - 8000930: 4708 bx r1 - 8000932: defe udf #254 ; 0xfe - 8000934: defe udf #254 ; 0xfe - 8000936: 4807 ldr r0, [pc, #28] ; (8000954 <__rg_realloc+0xa0>) - 8000938: 2129 movs r1, #41 ; 0x29 - 800093a: 4a07 ldr r2, [pc, #28] ; (8000958 <__rg_realloc+0xa4>) - 800093c: f008 fbd0 bl 80090e0 - 8000940: defe udf #254 ; 0xfe - 8000942: 46c0 nop ; (mov r8, r8) - 8000944: 55555555 .word 0x55555555 - 8000948: 33333333 .word 0x33333333 - 800094c: 0f0f0f0f .word 0x0f0f0f0f - 8000950: 01010101 .word 0x01010101 - 8000954: 0800a678 .word 0x0800a678 - 8000958: 0800a71c .word 0x0800a71c - 800095c: 02000000 .word 0x02000000 - -08000960 <__rg_alloc_zeroed>: -static GLOBAL_ALLOC: BlockAllocator = unsafe { - 8000960: b5b0 push {r4, r5, r7, lr} - 8000962: af02 add r7, sp, #8 - 8000964: 000a movs r2, r1 - 8000966: 0004 movs r4, r0 - 8000968: 0848 lsrs r0, r1, #1 - 800096a: 4913 ldr r1, [pc, #76] ; (80009b8 <__rg_alloc_zeroed+0x58>) - 800096c: 4001 ands r1, r0 - 800096e: 1a50 subs r0, r2, r1 - 8000970: 4912 ldr r1, [pc, #72] ; (80009bc <__rg_alloc_zeroed+0x5c>) - 8000972: 0883 lsrs r3, r0, #2 - 8000974: 4008 ands r0, r1 - 8000976: 400b ands r3, r1 - 8000978: 18c0 adds r0, r0, r3 - 800097a: 0901 lsrs r1, r0, #4 - 800097c: 1840 adds r0, r0, r1 - 800097e: 4910 ldr r1, [pc, #64] ; (80009c0 <__rg_alloc_zeroed+0x60>) - 8000980: 4001 ands r1, r0 - 8000982: 4810 ldr r0, [pc, #64] ; (80009c4 <__rg_alloc_zeroed+0x64>) - 8000984: 4348 muls r0, r1 - 8000986: 0e00 lsrs r0, r0, #24 - 8000988: 2801 cmp r0, #1 - 800098a: d10e bne.n 80009aa <__rg_alloc_zeroed+0x4a> - 800098c: 4810 ldr r0, [pc, #64] ; (80009d0 <__rg_alloc_zeroed+0x70>) - 800098e: 0021 movs r1, r4 - 8000990: f004 fc32 bl 80051f8 - 8000994: 0005 movs r5, r0 - if !ptr.is_null() { - 8000996: 2800 cmp r0, #0 - 8000998: d003 beq.n 80009a2 <__rg_alloc_zeroed+0x42> - } - - // SAFETY: the safety contract for `write_bytes` must be upheld by the caller. - unsafe { - assert_unsafe_precondition!(is_aligned_and_not_null(dst)); - write_bytes(dst, val, count) - 800099a: 0028 movs r0, r5 - 800099c: 0021 movs r1, r4 - 800099e: f008 fcf5 bl 800938c <__aeabi_memclr> -}; - 80009a2: 0028 movs r0, r5 - 80009a4: bcb0 pop {r4, r5, r7} - 80009a6: bc02 pop {r1} - 80009a8: 4708 bx r1 - 80009aa: 4807 ldr r0, [pc, #28] ; (80009c8 <__rg_alloc_zeroed+0x68>) - 80009ac: 2129 movs r1, #41 ; 0x29 - 80009ae: 4a07 ldr r2, [pc, #28] ; (80009cc <__rg_alloc_zeroed+0x6c>) - 80009b0: f008 fb96 bl 80090e0 - 80009b4: defe udf #254 ; 0xfe - 80009b6: 46c0 nop ; (mov r8, r8) - 80009b8: 55555555 .word 0x55555555 - 80009bc: 33333333 .word 0x33333333 - 80009c0: 0f0f0f0f .word 0x0f0f0f0f - 80009c4: 01010101 .word 0x01010101 - 80009c8: 0800a678 .word 0x0800a678 - 80009cc: 0800a71c .word 0x0800a71c - 80009d0: 02000000 .word 0x02000000 - -080009d4 : - - size, - } - } - - pub fn set_tile( - 80009d4: b5f0 push {r4, r5, r6, r7, lr} - 80009d6: af03 add r7, sp, #12 - 80009d8: b085 sub sp, #20 - 80009da: 9103 str r1, [sp, #12] - tileset: &TileSet<'_>, - tile_setting: TileSetting, - ) { - let pos = self.size.gba_offset(pos); - - let old_tile = self.tiles[pos]; - 80009dc: 6805 ldr r5, [r0, #0] -#[must_use] -pub const unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T] { - // SAFETY: the caller must uphold the safety contract for `from_raw_parts`. - unsafe { - assert_unsafe_precondition!( - is_aligned_and_not_null(data) - 80009de: 2d00 cmp r5, #0 - 80009e0: d058 beq.n 8000a94 - 80009e2: 2401 movs r4, #1 - 80009e4: 0029 movs r1, r5 - 80009e6: 9402 str r4, [sp, #8] - 80009e8: 4021 ands r1, r4 - 80009ea: d153 bne.n 8000a94 - 80009ec: 6881 ldr r1, [r0, #8] - #[rustc_const_stable(feature = "const_wrapping_math", since = "1.32.0")] - #[must_use = "this returns the result of the operation, \ - without modifying the original"] - #[inline(always)] - pub const fn overflowing_mul(self, rhs: Self) -> (Self, bool) { - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 80009ee: 184c adds r4, r1, r1 - if !$e { - 80009f0: d250 bcs.n 8000a94 - 80009f2: 2c00 cmp r4, #0 - 80009f4: d44e bmi.n 8000a94 - 80009f6: 9504 str r5, [sp, #16] - 80009f8: 241f movs r4, #31 - 80009fa: 4014 ands r4, r2 - 80009fc: 9001 str r0, [sp, #4] - 80009fe: 7d00 ldrb r0, [r0, #20] - 8000a00: 0040 lsls r0, r0, #1 - 8000a02: 4d25 ldr r5, [pc, #148] ; (8000a98 ) - 8000a04: 5a2d ldrh r5, [r5, r0] - 8000a06: 401d ands r5, r3 - 8000a08: 016b lsls r3, r5, #5 - 8000a0a: 4e24 ldr r6, [pc, #144] ; (8000a9c ) - 8000a0c: 3e1f subs r6, #31 - 8000a0e: 401e ands r6, r3 - 8000a10: 1933 adds r3, r6, r4 - 8000a12: 4c23 ldr r4, [pc, #140] ; (8000aa0 ) - 8000a14: 5a24 ldrh r4, [r4, r0] - 8000a16: 2620 movs r6, #32 - 8000a18: 402e ands r6, r5 - 8000a1a: 4366 muls r6, r4 - 8000a1c: 4c21 ldr r4, [pc, #132] ; (8000aa4 ) - 8000a1e: 5a20 ldrh r0, [r4, r0] - 8000a20: 4010 ands r0, r2 - 8000a22: 1830 adds r0, r6, r0 - 8000a24: 0140 lsls r0, r0, #5 - 8000a26: 2207 movs r2, #7 - 8000a28: 0292 lsls r2, r2, #10 - 8000a2a: 4002 ands r2, r0 - 8000a2c: 1898 adds r0, r3, r2 - } - - #[inline] - fn index(self, slice: &[T]) -> &T { - // N.B., use intrinsic indexing - &(*slice)[self] - 8000a2e: 4281 cmp r1, r0 - 8000a30: d92c bls.n 8000a8c - 8000a32: 68fd ldr r5, [r7, #12] - 8000a34: 0041 lsls r1, r0, #1 - 8000a36: 9804 ldr r0, [sp, #16] - 8000a38: 9100 str r1, [sp, #0] - 8000a3a: 5a46 ldrh r6, [r0, r1] - if old_tile != Tile::default() { - 8000a3c: 2e00 cmp r6, #0 - 8000a3e: 4c17 ldr r4, [pc, #92] ; (8000a9c ) - 8000a40: d004 beq.n 8000a4c - fn new(idx: TileIndex, setting: TileSetting) -> Self { - Self(idx.index() | setting.setting()) - } - - fn tile_index(self) -> TileIndex { - TileIndex::new(self.0 as usize & ((1 << 10) - 1)) - 8000a42: 0031 movs r1, r6 - 8000a44: 4021 ands r1, r4 - vram.remove_tile(old_tile.tile_index()); - 8000a46: 9803 ldr r0, [sp, #12] - 8000a48: f000 f9d6 bl 8000df8 - pub const fn from_raw(raw: u16) -> Self { - Self(raw) - } - - fn index(self) -> u16 { - self.0 & ((1 << 10) - 1) - 8000a4c: 002a movs r2, r5 - 8000a4e: 4022 ands r2, r4 - } - - let tile_index = tile_setting.index(); - - let new_tile = if tile_index != TRANSPARENT_TILE_INDEX { - 8000a50: 42a2 cmp r2, r4 - 8000a52: d105 bne.n 8000a60 - 8000a54: 2500 movs r5, #0 - 8000a56: 4816 ldr r0, [pc, #88] ; (8000ab0 ) -struct Tile(u16); - 8000a58: 4028 ands r0, r5 - Tile::new(new_tile_idx, tile_setting) - } else { - Tile::default() - }; - - if old_tile == new_tile { - 8000a5a: 4286 cmp r6, r0 - 8000a5c: d10b bne.n 8000a76 - 8000a5e: e011 b.n 8000a84 - 8000a60: 68b9 ldr r1, [r7, #8] - let new_tile_idx = vram.add_tile(tileset, tile_index); - 8000a62: 9803 ldr r0, [sp, #12] - 8000a64: f000 f8a2 bl 8000bac - 8000a68: 4910 ldr r1, [pc, #64] ; (8000aac ) - } - - fn setting(self) -> u16 { - self.0 & !((1 << 10) - 1) - 8000a6a: 400d ands r5, r1 - Self(idx.index() | setting.setting()) - 8000a6c: 4305 orrs r5, r0 - 8000a6e: 4810 ldr r0, [pc, #64] ; (8000ab0 ) -struct Tile(u16); - 8000a70: 4028 ands r0, r5 - if old_tile == new_tile { - 8000a72: 4286 cmp r6, r0 - 8000a74: d006 beq.n 8000a84 - 8000a76: 9804 ldr r0, [sp, #16] - 8000a78: 9900 ldr r1, [sp, #0] - 8000a7a: 1840 adds r0, r0, r1 - // no need to mark as dirty if nothing changes - return; - } - - self.tiles[pos] = new_tile; - self.tiles_dirty = true; - 8000a7c: 9901 ldr r1, [sp, #4] - 8000a7e: 9a02 ldr r2, [sp, #8] - 8000a80: 74ca strb r2, [r1, #19] - self.tiles[pos] = new_tile; - 8000a82: 8005 strh r5, [r0, #0] - } - 8000a84: b005 add sp, #20 - 8000a86: bcf0 pop {r4, r5, r6, r7} - 8000a88: bc01 pop {r0} - 8000a8a: 4700 bx r0 - 8000a8c: 4a06 ldr r2, [pc, #24] ; (8000aa8 ) - 8000a8e: f008 fb3d bl 800910c - 8000a92: defe udf #254 ; 0xfe - ::core::intrinsics::abort(); - 8000a94: defe udf #254 ; 0xfe - 8000a96: defe udf #254 ; 0xfe - 8000a98: 0800a814 .word 0x0800a814 - 8000a9c: 000003ff .word 0x000003ff - 8000aa0: 0800a824 .word 0x0800a824 - 8000aa4: 0800a81c .word 0x0800a81c - 8000aa8: 0800a7a0 .word 0x0800a7a0 - 8000aac: fffffc00 .word 0xfffffc00 - 8000ab0: 0000ffff .word 0x0000ffff - -08000ab4 : - - *tile = Tile::default(); - } - } - - pub fn show(&mut self) { - 8000ab4: b5d0 push {r4, r6, r7, lr} - 8000ab6: af02 add r7, sp, #8 - let mode = DISPLAY_CONTROL.get(); - let new_mode = mode | (1 << (self.background_id + 0x08)); - 8000ab8: 7c04 ldrb r4, [r0, #16] - 8000aba: 3408 adds r4, #8 - 8000abc: 20ff movs r0, #255 ; 0xff - 8000abe: 4020 ands r0, r4 - 8000ac0: 2101 movs r1, #1 - 8000ac2: 068a lsls r2, r1, #26 -#[stable(feature = "volatile", since = "1.9.0")] -pub unsafe fn read_volatile(src: *const T) -> T { - // SAFETY: the caller must uphold the safety contract for `volatile_load`. - unsafe { - assert_unsafe_precondition!(is_aligned_and_not_null(src)); - intrinsics::volatile_load(src) - 8000ac4: 8813 ldrh r3, [r2, #0] - 8000ac6: 42a0 cmp r0, r4 - 8000ac8: d107 bne.n 8000ada - 8000aca: 2810 cmp r0, #16 - 8000acc: d20b bcs.n 8000ae6 - 8000ace: 4081 lsls r1, r0 - 8000ad0: 4319 orrs r1, r3 -#[stable(feature = "volatile", since = "1.9.0")] -pub unsafe fn write_volatile(dst: *mut T, src: T) { - // SAFETY: the caller must uphold the safety contract for `volatile_store`. - unsafe { - assert_unsafe_precondition!(is_aligned_and_not_null(dst)); - intrinsics::volatile_store(dst, src); - 8000ad2: 8011 strh r1, [r2, #0] - DISPLAY_CONTROL.set(new_mode); - } - 8000ad4: bcd0 pop {r4, r6, r7} - 8000ad6: bc01 pop {r0} - 8000ad8: 4700 bx r0 - let new_mode = mode | (1 << (self.background_id + 0x08)); - 8000ada: 4808 ldr r0, [pc, #32] ; (8000afc ) - 8000adc: 211c movs r1, #28 - 8000ade: 4a08 ldr r2, [pc, #32] ; (8000b00 ) - 8000ae0: f008 fafe bl 80090e0 - 8000ae4: defe udf #254 ; 0xfe - 8000ae6: 4803 ldr r0, [pc, #12] ; (8000af4 ) - 8000ae8: 2123 movs r1, #35 ; 0x23 - 8000aea: 4a03 ldr r2, [pc, #12] ; (8000af8 ) - 8000aec: f008 faf8 bl 80090e0 - 8000af0: defe udf #254 ; 0xfe - 8000af2: 46c0 nop ; (mov r8, r8) - 8000af4: 0800a7f0 .word 0x0800a7f0 - 8000af8: 0800a7dc .word 0x0800a7dc - 8000afc: 0800a7c0 .word 0x0800a7c0 - 8000b00: 0800a7b0 .word 0x0800a7b0 - -08000b04 : - let mode = DISPLAY_CONTROL.get(); - let new_mode = mode & !(1 << (self.background_id + 0x08)); - DISPLAY_CONTROL.set(new_mode); - } - - pub fn commit(&mut self, vram: &mut VRamManager) { - 8000b04: b5f0 push {r4, r5, r6, r7, lr} - 8000b06: af03 add r7, sp, #12 - 8000b08: b081 sub sp, #4 - 8000b0a: 9100 str r1, [sp, #0] - 8000b0c: 0004 movs r4, r0 - let new_bg_control_value = (self.priority as u16) - 8000b0e: 7c80 ldrb r0, [r0, #18] - | ((self.screenblock as u16) << 8) - 8000b10: 7c66 ldrb r6, [r4, #17] - 8000b12: 0232 lsls r2, r6, #8 - let new_bg_control_value = (self.priority as u16) - 8000b14: 1810 adds r0, r2, r0 - match self { - 8000b16: 7d25 ldrb r5, [r4, #20] - 8000b18: 03aa lsls r2, r5, #14 - 8000b1a: 4302 orrs r2, r0 - | (self.size.size_flag() << 14); - - self.bg_control_register().set(new_bg_control_value); - 8000b1c: 7c20 ldrb r0, [r4, #16] - pub(crate) fn size(&self) -> RegularBackgroundSize { - self.size - } - - const fn bg_control_register(&self) -> MemoryMapped { - unsafe { MemoryMapped::new(0x0400_0008 + 2 * self.background_id as usize) } - 8000b1e: 0043 lsls r3, r0, #1 - 8000b20: 491c ldr r1, [pc, #112] ; (8000b94 ) - 8000b22: 525a strh r2, [r3, r1] - } - - const fn bg_h_offset(&self) -> MemoryMapped { - unsafe { MemoryMapped::new(0x0400_0010 + 4 * self.background_id as usize) } - 8000b24: 0080 lsls r0, r0, #2 - 8000b26: 1840 adds r0, r0, r1 - self.bg_h_offset().set(self.x_scroll); - 8000b28: 89a1 ldrh r1, [r4, #12] - 8000b2a: 8101 strh r1, [r0, #8] - self.bg_v_offset().set(self.y_scroll); - 8000b2c: 89e1 ldrh r1, [r4, #14] - 8000b2e: 8141 strh r1, [r0, #10] - vram.gc(); - 8000b30: 9800 ldr r0, [sp, #0] - 8000b32: f000 f9b9 bl 8000ea8 - if !self.tiles_dirty { - 8000b36: 7ce0 ldrb r0, [r4, #19] - 8000b38: 2800 cmp r0, #0 - 8000b3a: d027 beq.n 8000b8c - 8000b3c: 2003 movs r0, #3 - 8000b3e: 0640 lsls r0, r0, #25 - const fn bg_v_offset(&self) -> MemoryMapped { - unsafe { MemoryMapped::new(0x0400_0012 + 4 * self.background_id as usize) } - } - - const fn screenblock_memory(&self) -> *mut u16 { - (0x0600_0000 + 0x1000 * self.screenblock as usize / 2) as *mut u16 - 8000b40: 02f1 lsls r1, r6, #11 - 8000b42: 1808 adds r0, r1, r0 - #[stable(feature = "vec_as_ptr", since = "1.37.0")] - #[inline] - pub fn as_ptr(&self) -> *const T { - // We shadow the slice method of the same name to avoid going through - // `deref`, which creates an intermediate reference. - let ptr = self.buf.ptr(); - 8000b44: 9000 str r0, [sp, #0] - 8000b46: 6822 ldr r2, [r4, #0] - 8000b48: 2320 movs r3, #32 - 8000b4a: 2040 movs r0, #64 ; 0x40 - 8000b4c: 00ae lsls r6, r5, #2 - 8000b4e: a101 add r1, pc, #4 ; (adr r1, 8000b54 ) - 8000b50: 5989 ldr r1, [r1, r6] - 8000b52: 468f mov pc, r1 - 8000b54: 08000b65 .word 0x08000b65 - 8000b58: 08000b77 .word 0x08000b77 - 8000b5c: 08000b65 .word 0x08000b65 - 8000b60: 08000b73 .word 0x08000b73 - 8000b64: 2020 movs r0, #32 - match self { - 8000b66: 2d02 cmp r5, #2 - 8000b68: b401 push {r0} - 8000b6a: bc08 pop {r3} - 8000b6c: d303 bcc.n 8000b76 - 8000b6e: 2340 movs r3, #64 ; 0x40 - 8000b70: e001 b.n 8000b76 - 8000b72: 2040 movs r0, #64 ; 0x40 - 8000b74: 0003 movs r3, r0 - 8000b76: 4908 ldr r1, [pc, #32] ; (8000b98 ) - 8000b78: 600a str r2, [r1, #0] - 8000b7a: 9a00 ldr r2, [sp, #0] - 8000b7c: 604a str r2, [r1, #4] - 8000b7e: 2200 movs r2, #0 - self.tiles_dirty = false; - 8000b80: 74e2 strb r2, [r4, #19] - (self.width() * self.height()) as usize - 8000b82: 4358 muls r0, r3 - 8000b84: 2201 movs r2, #1 - 8000b86: 07d2 lsls r2, r2, #31 - assert!(count < u16::MAX as usize); - - DMA3_SOURCE_ADDR.set(src as u32); - DMA3_DEST_ADDR.set(dest as u32); - - DMA3_CONTROL.set(count as u32 | (1 << 31)); - 8000b88: 1880 adds r0, r0, r2 - 8000b8a: 6088 str r0, [r1, #8] - } - 8000b8c: b001 add sp, #4 - 8000b8e: bcf0 pop {r4, r5, r6, r7} - 8000b90: bc01 pop {r0} - 8000b92: 4700 bx r0 - 8000b94: 04000008 .word 0x04000008 - 8000b98: 040000d4 .word 0x040000d4 - -08000b9c : - 8000b9c: 4800 ldr r0, [pc, #0] ; (8000ba0 ) - 8000b9e: 4770 bx lr - 8000ba0: 06008000 .word 0x06008000 - -08000ba4 : - 8000ba4: 2003 movs r0, #3 - 8000ba6: 0640 lsls r0, r0, #25 - 8000ba8: 4770 bx lr - -08000baa : -} - -impl<'a> TileSet<'a> { - pub fn new(tiles: &'a [u8], format: TileFormat) -> Self { - Self { tiles, format } - } - 8000baa: 4770 bx lr - -08000bac : - - let tile_index = Self::index_from_reference(tile_reference); - self.remove_tile(TileIndex::new(tile_index)); - } - - pub(crate) fn add_tile(&mut self, tile_set: &TileSet<'_>, tile: u16) -> TileIndex { - 8000bac: b5f0 push {r4, r5, r6, r7, lr} - 8000bae: af03 add r7, sp, #12 - 8000bb0: b08b sub sp, #44 ; 0x2c - 8000bb2: 0016 movs r6, r2 - 8000bb4: 000a movs r2, r1 - 8000bb6: a907 add r1, sp, #28 - Self { - 8000bb8: 810e strh r6, [r1, #8] - self.tiles.into() - 8000bba: ca18 ldmia r2!, {r3, r4} - Self { - 8000bbc: 9408 str r4, [sp, #32] - 8000bbe: 9307 str r3, [sp, #28] - 8000bc0: 4a7b ldr r2, [pc, #492] ; (8000db0 ) - 8000bc2: 9603 str r6, [sp, #12] - self.add_to_hash(i as usize); - } - - #[inline] - fn write_u16(&mut self, i: u16) { - self.add_to_hash(i as usize); - 8000bc4: 4016 ands r6, r2 - 8000bc6: 4d7b ldr r5, [pc, #492] ; (8000db4 ) - intrinsics::wrapping_mul(self, rhs) - 8000bc8: 002a movs r2, r5 - 8000bca: 9304 str r3, [sp, #16] - 8000bcc: 435a muls r2, r3 - 8000bce: 231b movs r3, #27 - intrinsics::rotate_left(self, n as $SelfT) - 8000bd0: 41da rors r2, r3 - 8000bd2: 9405 str r4, [sp, #20] - #[rustc_const_unstable(feature = "const_ops", issue = "90080")] - impl const BitXor for $t { - type Output = $t; - - #[inline] - fn bitxor(self, other: $t) -> $t { self ^ other } - 8000bd4: 4062 eors r2, r4 - intrinsics::wrapping_mul(self, rhs) - 8000bd6: 436a muls r2, r5 - intrinsics::rotate_left(self, n as $SelfT) - 8000bd8: 41da rors r2, r3 - 8000bda: 4072 eors r2, r6 - intrinsics::wrapping_mul(self, rhs) - 8000bdc: 436a muls r2, r5 - 8000bde: 9006 str r0, [sp, #24] - - /// Returns the key-value pair corresponding to the supplied key - pub fn get_key_value(&self, key: &K) -> Option<(&K, &V)> { - let hash = self.hash(key); - - self.nodes - 8000be0: f001 fe26 bl 8002830 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715> - pub const fn and_then(self, f: F) -> Option - where - F: ~const FnOnce(T) -> Option, - F: ~const Destruct, - { - match self { - 8000be4: 2800 cmp r0, #0 - 8000be6: d04e beq.n 8000c86 - 8000be8: 9102 str r1, [sp, #8] - 8000bea: 9806 ldr r0, [sp, #24] - 8000bec: 6800 ldr r0, [r0, #0] - 8000bee: 9000 str r0, [sp, #0] - 8000bf0: 0780 lsls r0, r0, #30 - 8000bf2: d000 beq.n 8000bf6 - 8000bf4: e0c9 b.n 8000d8a - 8000bf6: 9806 ldr r0, [sp, #24] - 8000bf8: 6880 ldr r0, [r0, #8] - 8000bfa: 2418 movs r4, #24 - 8000bfc: 2500 movs r5, #0 - 8000bfe: 9001 str r0, [sp, #4] - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 8000c00: 0029 movs r1, r5 - 8000c02: 0022 movs r2, r4 - 8000c04: 002b movs r3, r5 - 8000c06: f008 fb0f bl 8009228 <__aeabi_lmul> - 8000c0a: 1e4a subs r2, r1, #1 - 8000c0c: 4191 sbcs r1, r2 - 8000c0e: d000 beq.n 8000c12 - 8000c10: e0bb b.n 8000d8a - if !$e { - 8000c12: 2800 cmp r0, #0 - 8000c14: d500 bpl.n 8000c18 - 8000c16: e0b8 b.n 8000d8a - 8000c18: 9802 ldr r0, [sp, #8] - 8000c1a: 9901 ldr r1, [sp, #4] - 8000c1c: 4281 cmp r1, r0 - 8000c1e: d800 bhi.n 8000c22 - 8000c20: e09c b.n 8000d5c - None - } - } - - fn has_value(&self) -> bool { - self.distance_to_initial_bucket >= 0 - 8000c22: 4344 muls r4, r0 - 8000c24: 9800 ldr r0, [sp, #0] - 8000c26: 1900 adds r0, r0, r4 - 8000c28: 6841 ldr r1, [r0, #4] - 8000c2a: 2900 cmp r1, #0 - 8000c2c: d42b bmi.n 8000c86 - let reference = self - .tile_set_to_vram - .get(&TileInTileSetReference::new(tile_set, tile)); - - if let Some(reference) = reference { - let index = Self::index_from_reference(*reference); - 8000c2e: 6941 ldr r1, [r0, #20] - 8000c30: 2003 movs r0, #3 - 8000c32: 0642 lsls r2, r0, #25 - let difference = reference.0.as_ptr() as usize - TILE_RAM_START; - 8000c34: 1a88 subs r0, r1, r2 - 8000c36: 416d adcs r5, r5 - 8000c38: 4291 cmp r1, r2 - 8000c3a: d200 bcs.n 8000c3e - 8000c3c: e088 b.n 8000d50 - 8000c3e: 9b06 ldr r3, [sp, #24] - #[stable(feature = "vec_as_ptr", since = "1.37.0")] - #[inline] - pub fn as_mut_ptr(&mut self) -> *mut T { - // We shadow the slice method of the same name to avoid going through - // `deref_mut`, which creates an intermediate reference. - let ptr = self.buf.ptr(); - 8000c40: 699a ldr r2, [r3, #24] -#[must_use] -pub const unsafe fn from_raw_parts_mut<'a, T>(data: *mut T, len: usize) -> &'a mut [T] { - // SAFETY: the caller must uphold the safety contract for `from_raw_parts_mut`. - unsafe { - assert_unsafe_precondition!( - is_aligned_and_not_null(data) - 8000c42: 0791 lsls r1, r2, #30 - 8000c44: d000 beq.n 8000c48 - 8000c46: e0a0 b.n 8000d8a - 8000c48: 6a19 ldr r1, [r3, #32] - 8000c4a: 230f movs r3, #15 - 8000c4c: 071b lsls r3, r3, #28 - 8000c4e: 000c movs r4, r1 - 8000c50: 439c bics r4, r3 - 8000c52: 1b0b subs r3, r1, r4 - 8000c54: 1e5c subs r4, r3, #1 - 8000c56: 41a3 sbcs r3, r4 - 8000c58: d000 beq.n 8000c5c - 8000c5a: e096 b.n 8000d8a - 8000c5c: 010b lsls r3, r1, #4 - 8000c5e: d500 bpl.n 8000c62 - 8000c60: e093 b.n 8000d8a - 8000c62: 0944 lsrs r4, r0, #5 - } - - #[inline] - fn index_mut(self, slice: &mut [T]) -> &mut T { - // N.B., use intrinsic indexing - &mut (*slice)[self] - 8000c64: 42a1 cmp r1, r4 - 8000c66: d800 bhi.n 8000c6a - 8000c68: e084 b.n 8000d74 - self.reference_count += 1; - 8000c6a: 0120 lsls r0, r4, #4 - 8000c6c: 1810 adds r0, r2, r0 - 8000c6e: 8981 ldrh r1, [r0, #12] - 8000c70: 1c49 adds r1, r1, #1 - 8000c72: 4d4f ldr r5, [pc, #316] ; (8000db0 ) - 8000c74: 400d ands r5, r1 - 8000c76: 1a6a subs r2, r5, r1 - 8000c78: 1e53 subs r3, r2, #1 - 8000c7a: 419a sbcs r2, r3 - 8000c7c: 428d cmp r5, r1 - 8000c7e: d17e bne.n 8000d7e - 8000c80: 300c adds r0, #12 - 8000c82: 8001 strh r1, [r0, #0] - 8000c84: e05f b.n 8000d46 - self.reference_counts[index].increment_reference_count(); - return TileIndex::new(index); - } - - let new_reference: NonNull = - unsafe { TILE_ALLOCATOR.alloc(TILE_LAYOUT) }.unwrap().cast(); - 8000c86: 4852 ldr r0, [pc, #328] ; (8000dd0 ) - 8000c88: 2120 movs r1, #32 - 8000c8a: 000a movs r2, r1 - 8000c8c: f004 fab4 bl 80051f8 - match self { - 8000c90: 2800 cmp r0, #0 - 8000c92: d07c beq.n 8000d8e - 8000c94: 0002 movs r2, r0 - tile_set: &TileSet<'_>, - tile_id: u16, - tile_reference: TileReference, - ) { - let tile_size = tile_set.format.tile_size(); - let tile_offset = (tile_id as usize) * tile_size; - 8000c96: 0171 lsls r1, r6, #5 - let tile_slice = &tile_set.tiles[tile_offset..(tile_offset + tile_size)]; - 8000c98: 0008 movs r0, r1 - 8000c9a: 3020 adds r0, #32 - - #[inline] - fn index(self, slice: &[T]) -> &[T] { - if self.start > self.end { - slice_index_order_fail(self.start, self.end); - } else if self.end > slice.len() { - 8000c9c: 9b05 ldr r3, [sp, #20] - 8000c9e: 4298 cmp r0, r3 - 8000ca0: d87b bhi.n 8000d9a - 8000ca2: 2400 movs r4, #0 - ptr::slice_from_raw_parts(slice.as_ptr().add(self.start), self.end - self.start) - 8000ca4: 1a43 subs r3, r0, r1 - 8000ca6: b410 push {r4} - 8000ca8: bc20 pop {r5} - 8000caa: 4165 adcs r5, r4 - 8000cac: 4288 cmp r0, r1 - 8000cae: 9e04 ldr r6, [sp, #16] - 8000cb0: d358 bcc.n 8000d64 - 8000cb2: 4848 ldr r0, [pc, #288] ; (8000dd4 ) - assert!(count < u16::MAX as usize); - 8000cb4: 4283 cmp r3, r0 - 8000cb6: d275 bcs.n 8000da4 - pub const unsafe fn offset(self, count: isize) -> *const T - where - T: Sized, - { - // SAFETY: the caller must uphold the safety contract for `offset`. - unsafe { intrinsics::offset(self, count) } - 8000cb8: 1870 adds r0, r6, r1 - 8000cba: 4947 ldr r1, [pc, #284] ; (8000dd8 ) - 8000cbc: 6008 str r0, [r1, #0] - 8000cbe: 604a str r2, [r1, #4] - 8000cc0: 2501 movs r5, #1 - 8000cc2: 07e8 lsls r0, r5, #31 - - let tile_size_in_half_words = tile_slice.len() / 2; - 8000cc4: 085b lsrs r3, r3, #1 - DMA3_CONTROL.set(count as u32 | (1 << 31)); - 8000cc6: 1818 adds r0, r3, r0 - 8000cc8: 6088 str r0, [r1, #8] - 8000cca: 2003 movs r0, #3 - 8000ccc: 0640 lsls r0, r0, #25 - 8000cce: 0033 movs r3, r6 - let difference = reference.0.as_ptr() as usize - TILE_RAM_START; - 8000cd0: 1a16 subs r6, r2, r0 - 8000cd2: b410 push {r4} - 8000cd4: bc02 pop {r1} - 8000cd6: 4161 adcs r1, r4 - 8000cd8: 4282 cmp r2, r0 - 8000cda: d339 bcc.n 8000d50 - 8000cdc: 9502 str r5, [sp, #8] - 8000cde: a907 add r1, sp, #28 - Self { - 8000ce0: 9803 ldr r0, [sp, #12] - 8000ce2: 8108 strh r0, [r1, #8] - 8000ce4: 9805 ldr r0, [sp, #20] - 8000ce6: 9008 str r0, [sp, #32] - 8000ce8: 9307 str r3, [sp, #28] - 8000cea: 9d06 ldr r5, [sp, #24] - self.tile_set_to_vram - 8000cec: 0028 movs r0, r5 - 8000cee: f000 fb0d bl 800130c ::insert> - self.reference_counts.len().max(index + 1), - 8000cf2: 6a29 ldr r1, [r5, #32] - 8000cf4: aa07 add r2, sp, #28 -#[derive(Clone, Default)] - 8000cf6: 8194 strh r4, [r2, #12] - 8000cf8: 9409 str r4, [sp, #36] ; 0x24 - 8000cfa: 9408 str r4, [sp, #32] - 8000cfc: 9407 str r4, [sp, #28] - difference / (8 * 8 / 2) - 8000cfe: 0974 lsrs r4, r6, #5 - self.reference_counts.len().max(index + 1), - 8000d00: 1c60 adds r0, r4, #1 - 8000d02: 4281 cmp r1, r0 - 8000d04: d800 bhi.n 8000d08 - 8000d06: 0001 movs r1, r0 - 8000d08: 9e06 ldr r6, [sp, #24] - self.reference_counts.resize( - 8000d0a: 0030 movs r0, r6 - 8000d0c: 3018 adds r0, #24 - 8000d0e: f002 fbbb bl 8003488 ::resize> - 8000d12: 69b0 ldr r0, [r6, #24] - 8000d14: 0781 lsls r1, r0, #30 - 8000d16: d138 bne.n 8000d8a - 8000d18: 6a31 ldr r1, [r6, #32] - 8000d1a: 220f movs r2, #15 - 8000d1c: 0712 lsls r2, r2, #28 - 8000d1e: 000b movs r3, r1 - 8000d20: 4393 bics r3, r2 - 8000d22: 1aca subs r2, r1, r3 - 8000d24: 1e53 subs r3, r2, #1 - 8000d26: 419a sbcs r2, r3 - 8000d28: d12f bne.n 8000d8a - 8000d2a: 010a lsls r2, r1, #4 - 8000d2c: d42d bmi.n 8000d8a - &mut (*slice)[self] - 8000d2e: 42a1 cmp r1, r4 - 8000d30: 9a04 ldr r2, [sp, #16] - 8000d32: 9b02 ldr r3, [sp, #8] - 8000d34: d91c bls.n 8000d70 - 8000d36: 0121 lsls r1, r4, #4 - self.reference_counts[index] = - 8000d38: 5042 str r2, [r0, r1] - 8000d3a: 1840 adds r0, r0, r1 - 8000d3c: 8183 strh r3, [r0, #12] - 8000d3e: 9903 ldr r1, [sp, #12] - 8000d40: 8101 strh r1, [r0, #8] - 8000d42: 9905 ldr r1, [sp, #20] - 8000d44: 6041 str r1, [r0, #4] - } - 8000d46: 0020 movs r0, r4 - 8000d48: b00b add sp, #44 ; 0x2c - 8000d4a: bcf0 pop {r4, r5, r6, r7} - 8000d4c: bc02 pop {r1} - 8000d4e: 4708 bx r1 - 8000d50: 481d ldr r0, [pc, #116] ; (8000dc8 ) - 8000d52: 2121 movs r1, #33 ; 0x21 - 8000d54: 4a1d ldr r2, [pc, #116] ; (8000dcc ) - 8000d56: f008 f9c3 bl 80090e0 - 8000d5a: defe udf #254 ; 0xfe - &(*slice)[self] - 8000d5c: 4a16 ldr r2, [pc, #88] ; (8000db8 ) - 8000d5e: f008 f9d5 bl 800910c - 8000d62: defe udf #254 ; 0xfe - ptr::slice_from_raw_parts(slice.as_ptr().add(self.start), self.end - self.start) - 8000d64: 4818 ldr r0, [pc, #96] ; (8000dc8 ) - 8000d66: 2121 movs r1, #33 ; 0x21 - 8000d68: 4a1f ldr r2, [pc, #124] ; (8000de8 ) - 8000d6a: f008 f9b9 bl 80090e0 - 8000d6e: defe udf #254 ; 0xfe - &mut (*slice)[self] - 8000d70: 4a1a ldr r2, [pc, #104] ; (8000ddc ) - 8000d72: e000 b.n 8000d76 - 8000d74: 4a11 ldr r2, [pc, #68] ; (8000dbc ) - 8000d76: 0020 movs r0, r4 - 8000d78: f008 f9c8 bl 800910c - 8000d7c: defe udf #254 ; 0xfe - self.reference_count += 1; - 8000d7e: 4810 ldr r0, [pc, #64] ; (8000dc0 ) - 8000d80: 211c movs r1, #28 - 8000d82: 4a10 ldr r2, [pc, #64] ; (8000dc4 ) - 8000d84: f008 f9ac bl 80090e0 - 8000d88: defe udf #254 ; 0xfe - 8000d8a: defe udf #254 ; 0xfe - 8000d8c: defe udf #254 ; 0xfe - None => panic("called `Option::unwrap()` on a `None` value"), - 8000d8e: 4818 ldr r0, [pc, #96] ; (8000df0 ) - 8000d90: 212b movs r1, #43 ; 0x2b - 8000d92: 4a18 ldr r2, [pc, #96] ; (8000df4 ) - 8000d94: f008 f9a4 bl 80090e0 - 8000d98: defe udf #254 ; 0xfe - slice_end_index_len_fail(self.end, slice.len()); - 8000d9a: 4a14 ldr r2, [pc, #80] ; (8000dec ) - 8000d9c: 9905 ldr r1, [sp, #20] - 8000d9e: f007 fe0b bl 80089b8 - 8000da2: defe udf #254 ; 0xfe - assert!(count < u16::MAX as usize); - 8000da4: 480e ldr r0, [pc, #56] ; (8000de0 ) - 8000da6: 212b movs r1, #43 ; 0x2b - 8000da8: 4a0e ldr r2, [pc, #56] ; (8000de4 ) - 8000daa: f008 f999 bl 80090e0 - 8000dae: defe udf #254 ; 0xfe - 8000db0: 0000ffff .word 0x0000ffff - 8000db4: 9e3779b9 .word 0x9e3779b9 - 8000db8: 0800abfc .word 0x0800abfc - 8000dbc: 0800aa94 .word 0x0800aa94 - 8000dc0: 0800a8f0 .word 0x0800a8f0 - 8000dc4: 0800a9e0 .word 0x0800a9e0 - 8000dc8: 0800a8c0 .word 0x0800a8c0 - 8000dcc: 0800aa54 .word 0x0800aa54 - 8000dd0: 02000018 .word 0x02000018 - 8000dd4: 0001fffd .word 0x0001fffd - 8000dd8: 040000d4 .word 0x040000d4 - 8000ddc: 0800aa84 .word 0x0800aa84 - 8000de0: 0800c0bc .word 0x0800c0bc - 8000de4: 0800c0f4 .word 0x0800c0f4 - 8000de8: 0800a8a4 .word 0x0800a8a4 - 8000dec: 0800aaf4 .word 0x0800aaf4 - 8000df0: 0800a90c .word 0x0800a90c - 8000df4: 0800aa74 .word 0x0800aa74 - -08000df8 : - pub(crate) fn remove_tile(&mut self, tile_index: TileIndex) { - 8000df8: b5b0 push {r4, r5, r7, lr} - 8000dfa: af02 add r7, sp, #8 - 8000dfc: 0004 movs r4, r0 - 8000dfe: 6982 ldr r2, [r0, #24] - 8000e00: 0790 lsls r0, r2, #30 - 8000e02: d13c bne.n 8000e7e - 8000e04: 000d movs r5, r1 - 8000e06: 6a21 ldr r1, [r4, #32] - 8000e08: 200f movs r0, #15 - 8000e0a: 0700 lsls r0, r0, #28 - 8000e0c: 000b movs r3, r1 - 8000e0e: 4383 bics r3, r0 - 8000e10: 1ac8 subs r0, r1, r3 - 8000e12: 1e43 subs r3, r0, #1 - 8000e14: 4198 sbcs r0, r3 - 8000e16: d132 bne.n 8000e7e - 8000e18: 0108 lsls r0, r1, #4 - 8000e1a: d430 bmi.n 8000e7e - 8000e1c: 481c ldr r0, [pc, #112] ; (8000e90 ) - 8000e1e: 4028 ands r0, r5 - &mut (*slice)[self] - 8000e20: 4281 cmp r1, r0 - 8000e22: d922 bls.n 8000e6a - self.reference_count > 0, - 8000e24: 0100 lsls r0, r0, #4 - 8000e26: 1810 adds r0, r2, r0 - 8000e28: 8981 ldrh r1, [r0, #12] - assert!( - 8000e2a: 2900 cmp r1, #0 - 8000e2c: d029 beq.n 8000e82 - 8000e2e: 300c adds r0, #12 - self.reference_count -= 1; - 8000e30: 1e49 subs r1, r1, #1 - 8000e32: 8001 strh r1, [r0, #0] - if new_reference_count != 0 { - 8000e34: 0408 lsls r0, r1, #16 - 8000e36: d002 beq.n 8000e3e - } - 8000e38: bcb0 pop {r4, r5, r7} - 8000e3a: bc01 pop {r0} - 8000e3c: 4700 bx r0 - #[inline] - #[stable(feature = "rust1", since = "1.0.0")] - pub fn push(&mut self, value: T) { - // This will panic or abort if we would allocate > isize::MAX bytes - // or if the length increment would overflow for zero-sized types. - if self.len == self.buf.capacity() { - 8000e3e: 6aa0 ldr r0, [r4, #40] ; 0x28 - 8000e40: 6ae1 ldr r1, [r4, #44] ; 0x2c - 8000e42: 4281 cmp r1, r0 - 8000e44: d104 bne.n 8000e50 - 8000e46: 0020 movs r0, r4 - 8000e48: 3024 adds r0, #36 ; 0x24 - self.buf.reserve_for_push(self.len); - 8000e4a: f002 f957 bl 80030fc ::reserve_for_push> - } - unsafe { - let end = self.as_mut_ptr().add(self.len); - 8000e4e: 6ae1 ldr r1, [r4, #44] ; 0x2c - let ptr = self.buf.ptr(); - 8000e50: 6a60 ldr r0, [r4, #36] ; 0x24 - 8000e52: 0049 lsls r1, r1, #1 - copy_nonoverlapping(&src as *const T, dst, 1); - 8000e54: 5245 strh r5, [r0, r1] - ptr::write(end, value); - self.len += 1; - 8000e56: 6ae1 ldr r1, [r4, #44] ; 0x2c - 8000e58: 2200 movs r2, #0 - 8000e5a: 1c48 adds r0, r1, #1 - 8000e5c: 4152 adcs r2, r2 - 8000e5e: 4288 cmp r0, r1 - 8000e60: d307 bcc.n 8000e72 - 8000e62: 62e0 str r0, [r4, #44] ; 0x2c - 8000e64: bcb0 pop {r4, r5, r7} - 8000e66: bc01 pop {r0} - 8000e68: 4700 bx r0 - 8000e6a: 4a0a ldr r2, [pc, #40] ; (8000e94 ) - 8000e6c: f008 f94e bl 800910c - 8000e70: defe udf #254 ; 0xfe - 8000e72: 4809 ldr r0, [pc, #36] ; (8000e98 ) - 8000e74: 211c movs r1, #28 - 8000e76: 4a09 ldr r2, [pc, #36] ; (8000e9c ) - 8000e78: f008 f932 bl 80090e0 - 8000e7c: defe udf #254 ; 0xfe - ::core::intrinsics::abort(); - 8000e7e: defe udf #254 ; 0xfe - 8000e80: defe udf #254 ; 0xfe - assert!( - 8000e82: 4807 ldr r0, [pc, #28] ; (8000ea0 ) - 8000e84: 212e movs r1, #46 ; 0x2e - 8000e86: 4a07 ldr r2, [pc, #28] ; (8000ea4 ) - 8000e88: f008 f92a bl 80090e0 - 8000e8c: defe udf #254 ; 0xfe - 8000e8e: 46c0 nop ; (mov r8, r8) - 8000e90: 0000ffff .word 0x0000ffff - 8000e94: 0800aaa4 .word 0x0800aaa4 - 8000e98: 0800a8f0 .word 0x0800a8f0 - 8000e9c: 0800a9ac .word 0x0800a9ac - 8000ea0: 0800a9f0 .word 0x0800a9f0 - 8000ea4: 0800aa20 .word 0x0800aa20 - -08000ea8 : - pub(crate) fn gc(&mut self) { - 8000ea8: b5f0 push {r4, r5, r6, r7, lr} - 8000eaa: af03 add r7, sp, #12 - 8000eac: b08f sub sp, #60 ; 0x3c - // - // Drain will ptr::read out the values to remove. - // When finished, remaining tail of the vec is copied back to cover - // the hole, and the vector length is restored to the new length. - // - let len = self.len(); - 8000eae: 6ac1 ldr r1, [r0, #44] ; 0x2c - 8000eb0: 2200 movs r2, #0 - 8000eb2: 9200 str r2, [sp, #0] - self.len = new_len; - 8000eb4: 62c2 str r2, [r0, #44] ; 0x2c - 8000eb6: 9002 str r0, [sp, #8] - let ptr = self.buf.ptr(); - 8000eb8: 6a40 ldr r0, [r0, #36] ; 0x24 - 8000eba: 07c2 lsls r2, r0, #31 - 8000ebc: d000 beq.n 8000ec0 - 8000ebe: e0c1 b.n 8001044 - 8000ec0: 184a adds r2, r1, r1 - 8000ec2: d300 bcc.n 8000ec6 - 8000ec4: e0be b.n 8001044 - if !$e { - 8000ec6: 2a00 cmp r2, #0 - 8000ec8: d500 bpl.n 8000ecc - 8000eca: e0bb b.n 8001044 - 8000ecc: 9a02 ldr r2, [sp, #8] - 8000ece: 3224 adds r2, #36 ; 0x24 - for tile_index in self.indices_to_gc.drain(..) { - 8000ed0: 9207 str r2, [sp, #28] - 8000ed2: 9a00 ldr r2, [sp, #0] - 8000ed4: 9204 str r2, [sp, #16] - 8000ed6: 9103 str r1, [sp, #12] - 8000ed8: 9005 str r0, [sp, #20] - 8000eda: 004a lsls r2, r1, #1 - 8000edc: 1882 adds r2, r0, r2 - 8000ede: 9201 str r2, [sp, #4] - 8000ee0: 9206 str r2, [sp, #24] - 8000ee2: 2900 cmp r1, #0 - 8000ee4: d113 bne.n 8000f0e - 8000ee6: a803 add r0, sp, #12 - 8000ee8: f005 fbc4 bl 8006674 >> - } - 8000eec: b00f add sp, #60 ; 0x3c - 8000eee: bcf0 pop {r4, r5, r6, r7} - 8000ef0: bc01 pop {r0} - 8000ef2: 4700 bx r0 - 8000ef4: 9900 ldr r1, [sp, #0] - 8000ef6: 9a01 ldr r2, [sp, #4] - self.tile_in_tile_set = None; - 8000ef8: 5081 str r1, [r0, r2] - self.reference_count = 0; - 8000efa: 1880 adds r0, r0, r2 - self.tile_in_tile_set = None; - 8000efc: 6041 str r1, [r0, #4] - 8000efe: 6081 str r1, [r0, #8] - self.reference_count = 0; - 8000f00: 8181 strh r1, [r0, #12] - 8000f02: 9805 ldr r0, [sp, #20] - assume(!self.end.is_null()); - 8000f04: 9906 ldr r1, [sp, #24] - 8000f06: 9101 str r1, [sp, #4] - if is_empty!(self) { - 8000f08: 9901 ldr r1, [sp, #4] - 8000f0a: 4288 cmp r0, r1 - 8000f0c: d0eb beq.n 8000ee6 - 8000f0e: 1c83 adds r3, r0, #2 - self.ptr = unsafe { NonNull::new_unchecked(self.ptr.as_ptr().offset(offset)) }; - 8000f10: 9305 str r3, [sp, #20] - let ptr = self.buf.ptr(); - 8000f12: 9902 ldr r1, [sp, #8] - 8000f14: 698a ldr r2, [r1, #24] - is_aligned_and_not_null(data) - 8000f16: 0791 lsls r1, r2, #30 - 8000f18: d000 beq.n 8000f1c - 8000f1a: e093 b.n 8001044 - 8000f1c: 9902 ldr r1, [sp, #8] - 8000f1e: 6a09 ldr r1, [r1, #32] - 8000f20: 240f movs r4, #15 - 8000f22: 0726 lsls r6, r4, #28 - 8000f24: 000c movs r4, r1 - 8000f26: 43b4 bics r4, r6 - 8000f28: 1b0c subs r4, r1, r4 - 8000f2a: 1e65 subs r5, r4, #1 - 8000f2c: 41ac sbcs r4, r5 - 8000f2e: d000 beq.n 8000f32 - 8000f30: e088 b.n 8001044 - 8000f32: 010c lsls r4, r1, #4 - 8000f34: d500 bpl.n 8000f38 - 8000f36: e085 b.n 8001044 - 8000f38: 8805 ldrh r5, [r0, #0] - &(*slice)[self] - 8000f3a: 42a9 cmp r1, r5 - 8000f3c: d96f bls.n 800101e - if self.reference_counts[index].current_count() > 0 { - 8000f3e: 012c lsls r4, r5, #4 - 8000f40: 1910 adds r0, r2, r4 - 8000f42: 8980 ldrh r0, [r0, #12] - 8000f44: 2800 cmp r0, #0 - 8000f46: b408 push {r3} - 8000f48: bc01 pop {r0} - 8000f4a: d1dd bne.n 8000f08 - let ptr = (index.index() * (8 * 8 / 2)) as usize + TILE_RAM_START; - 8000f4c: 0168 lsls r0, r5, #5 - 8000f4e: 0c01 lsrs r1, r0, #16 - 8000f50: 1e4a subs r2, r1, #1 - 8000f52: b402 push {r1} - 8000f54: bc08 pop {r3} - 8000f56: 4193 sbcs r3, r2 - 8000f58: 2900 cmp r1, #0 - 8000f5a: d162 bne.n 8001022 - 8000f5c: 4941 ldr r1, [pc, #260] ; (8001064 ) - 8000f5e: 9108 str r1, [sp, #32] - 8000f60: 4941 ldr r1, [pc, #260] ; (8001068 ) - 8000f62: 4008 ands r0, r1 - 8000f64: 2103 movs r1, #3 - 8000f66: 0649 lsls r1, r1, #25 - 8000f68: 1840 adds r0, r0, r1 - 8000f6a: 9009 str r0, [sp, #36] ; 0x24 - 8000f6c: 2020 movs r0, #32 - let new_layout = Block::either_layout(layout).pad_to_align(); - 8000f6e: 0001 movs r1, r0 - 8000f70: f004 f8d0 bl 8005114 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179> - 8000f74: 2900 cmp r1, #0 - 8000f76: d065 beq.n 8001044 - intrinsics::wrapping_add(self, rhs) - 8000f78: 1842 adds r2, r0, r1 - intrinsics::wrapping_sub(self, rhs) - 8000f7a: 1e52 subs r2, r2, #1 - // - // (Of course, attempts to allocate blocks of memory whose - // size and padding overflow in the above manner should cause - // the allocator to yield an error anyway.) - - let len_rounded_up = len.wrapping_add(align).wrapping_sub(1) & !align.wrapping_sub(1); - 8000f7c: 424b negs r3, r1 - 8000f7e: 4013 ands r3, r2 - 8000f80: 1a1a subs r2, r3, r0 - let pad = self.padding_needed_for(self.align()); - // This cannot overflow. Quoting from the invariant of Layout: - // > `size`, when rounded up to the nearest multiple of `align`, - // > must not overflow (i.e., the rounded value must be less than - // > `usize::MAX`) - let new_size = self.size() + pad; - 8000f82: 1882 adds r2, r0, r2 - 8000f84: 9b00 ldr r3, [sp, #0] - 8000f86: 415b adcs r3, r3 - 8000f88: 4282 cmp r2, r0 - 8000f8a: d350 bcc.n 800102e - 8000f8c: 9401 str r4, [sp, #4] - intrinsics::ctpop(self as $ActualT) as u32 - 8000f8e: 0848 lsrs r0, r1, #1 - 8000f90: 4b36 ldr r3, [pc, #216] ; (800106c ) - 8000f92: 4018 ands r0, r3 - 8000f94: 1a08 subs r0, r1, r0 - 8000f96: 0883 lsrs r3, r0, #2 - 8000f98: 4c35 ldr r4, [pc, #212] ; (8001070 ) - 8000f9a: 4020 ands r0, r4 - 8000f9c: 4023 ands r3, r4 - 8000f9e: 18c0 adds r0, r0, r3 - 8000fa0: 0903 lsrs r3, r0, #4 - 8000fa2: 18c0 adds r0, r0, r3 - 8000fa4: 4b33 ldr r3, [pc, #204] ; (8001074 ) - 8000fa6: 4018 ands r0, r3 - 8000fa8: 4b33 ldr r3, [pc, #204] ; (8001078 ) - 8000faa: 4358 muls r0, r3 - 8000fac: 0e00 lsrs r0, r0, #24 - 8000fae: 2801 cmp r0, #1 - 8000fb0: d14a bne.n 8001048 - 8000fb2: 910b str r1, [sp, #44] ; 0x2c - 8000fb4: 920a str r2, [sp, #40] ; 0x28 - 8000fb6: a80a add r0, sp, #40 ; 0x28 - free(|key| { - 8000fb8: 900e str r0, [sp, #56] ; 0x38 - 8000fba: a809 add r0, sp, #36 ; 0x24 - 8000fbc: 900d str r0, [sp, #52] ; 0x34 - 8000fbe: a808 add r0, sp, #32 - 8000fc0: 900c str r0, [sp, #48] ; 0x30 - 8000fc2: a80c add r0, sp, #48 ; 0x30 - 8000fc4: f004 f84e bl 8005064 - 8000fc8: 9802 ldr r0, [sp, #8] - 8000fca: 6980 ldr r0, [r0, #24] - 8000fcc: 0781 lsls r1, r0, #30 - 8000fce: 9c01 ldr r4, [sp, #4] - 8000fd0: d138 bne.n 8001044 - 8000fd2: 9902 ldr r1, [sp, #8] - 8000fd4: 6a09 ldr r1, [r1, #32] - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 8000fd6: 000a movs r2, r1 - 8000fd8: 43b2 bics r2, r6 - 8000fda: 1a8a subs r2, r1, r2 - 8000fdc: 1e53 subs r3, r2, #1 - 8000fde: 419a sbcs r2, r3 - 8000fe0: d130 bne.n 8001044 - 8000fe2: 010a lsls r2, r1, #4 - 8000fe4: d42e bmi.n 8001044 - 8000fe6: 42a9 cmp r1, r5 - 8000fe8: d927 bls.n 800103a - match *self { - 8000fea: 5901 ldr r1, [r0, r4] - match self { - 8000fec: 2900 cmp r1, #0 - 8000fee: d031 beq.n 8001054 - 8000ff0: 1901 adds r1, r0, r4 - 8000ff2: 9c02 ldr r4, [sp, #8] - self.tile_set_to_vram.remove(tile_ref); - 8000ff4: 0020 movs r0, r4 - 8000ff6: f001 f835 bl 8002064 ::remove> - let ptr = self.buf.ptr(); - 8000ffa: 69a0 ldr r0, [r4, #24] - is_aligned_and_not_null(data) - 8000ffc: 0781 lsls r1, r0, #30 - 8000ffe: d121 bne.n 8001044 - 8001000: 9902 ldr r1, [sp, #8] - 8001002: 6a09 ldr r1, [r1, #32] - 8001004: 000a movs r2, r1 - 8001006: 43b2 bics r2, r6 - 8001008: 1a8a subs r2, r1, r2 - 800100a: 1e53 subs r3, r2, #1 - 800100c: 419a sbcs r2, r3 - 800100e: d119 bne.n 8001044 - 8001010: 010a lsls r2, r1, #4 - 8001012: d417 bmi.n 8001044 - &mut (*slice)[self] - 8001014: 42a9 cmp r1, r5 - 8001016: d900 bls.n 800101a - 8001018: e76c b.n 8000ef4 - 800101a: 4a1b ldr r2, [pc, #108] ; (8001088 ) - 800101c: e00e b.n 800103c - &(*slice)[self] - 800101e: 4a10 ldr r2, [pc, #64] ; (8001060 ) - 8001020: e00c b.n 800103c - let ptr = (index.index() * (8 * 8 / 2)) as usize + TILE_RAM_START; - 8001022: 481e ldr r0, [pc, #120] ; (800109c ) - 8001024: 2121 movs r1, #33 ; 0x21 - 8001026: 4a1e ldr r2, [pc, #120] ; (80010a0 ) - 8001028: f008 f85a bl 80090e0 - 800102c: defe udf #254 ; 0xfe - 800102e: 4819 ldr r0, [pc, #100] ; (8001094 ) - 8001030: 211c movs r1, #28 - 8001032: 4a19 ldr r2, [pc, #100] ; (8001098 ) - 8001034: f008 f854 bl 80090e0 - 8001038: defe udf #254 ; 0xfe - 800103a: 4a12 ldr r2, [pc, #72] ; (8001084 ) - 800103c: 0028 movs r0, r5 - 800103e: f008 f865 bl 800910c - 8001042: defe udf #254 ; 0xfe - 8001044: defe udf #254 ; 0xfe - 8001046: defe udf #254 ; 0xfe - 8001048: 480c ldr r0, [pc, #48] ; (800107c ) - 800104a: 2129 movs r1, #41 ; 0x29 - 800104c: 4a0c ldr r2, [pc, #48] ; (8001080 ) - 800104e: f008 f847 bl 80090e0 - 8001052: defe udf #254 ; 0xfe - None => panic("called `Option::unwrap()` on a `None` value"), - 8001054: 480d ldr r0, [pc, #52] ; (800108c ) - 8001056: 212b movs r1, #43 ; 0x2b - 8001058: 4a0d ldr r2, [pc, #52] ; (8001090 ) - 800105a: f008 f841 bl 80090e0 - 800105e: defe udf #254 ; 0xfe - 8001060: 0800aab4 .word 0x0800aab4 - 8001064: 02000018 .word 0x02000018 - 8001068: 0000ffff .word 0x0000ffff - 800106c: 55555555 .word 0x55555555 - 8001070: 33333333 .word 0x33333333 - 8001074: 0f0f0f0f .word 0x0f0f0f0f - 8001078: 01010101 .word 0x01010101 - 800107c: 0800ba5c .word 0x0800ba5c - 8001080: 0800bb00 .word 0x0800bb00 - 8001084: 0800aac4 .word 0x0800aac4 - 8001088: 0800aae4 .word 0x0800aae4 - 800108c: 0800a90c .word 0x0800a90c - 8001090: 0800aad4 .word 0x0800aad4 - 8001094: 0800bba0 .word 0x0800bba0 - 8001098: 0800bb88 .word 0x0800bb88 - 800109c: 0800aa30 .word 0x0800aa30 - 80010a0: 0800aa64 .word 0x0800aa64 - -080010a4 : - ) - }; - } - - /// Copies raw palettes to the background palette without any checks. - pub fn set_background_palette_raw(&mut self, palette: &[u16]) { - 80010a4: b580 push {r7, lr} - 80010a6: af00 add r7, sp, #0 - 80010a8: 480a ldr r0, [pc, #40] ; (80010d4 ) - 80010aa: 4282 cmp r2, r0 - 80010ac: d20b bcs.n 80010c6 - 80010ae: 480a ldr r0, [pc, #40] ; (80010d8 ) - intrinsics::volatile_store(dst, src); - 80010b0: 6001 str r1, [r0, #0] - 80010b2: 2105 movs r1, #5 - 80010b4: 0609 lsls r1, r1, #24 - 80010b6: 6041 str r1, [r0, #4] - 80010b8: 2101 movs r1, #1 - 80010ba: 07c9 lsls r1, r1, #31 - DMA3_CONTROL.set(count as u32 | (1 << 31)); - 80010bc: 430a orrs r2, r1 - 80010be: 6082 str r2, [r0, #8] - unsafe { - dma_copy16(palette.as_ptr(), PALETTE_BACKGROUND.as_ptr(), palette.len()); - } - } - 80010c0: bc80 pop {r7} - 80010c2: bc01 pop {r0} - 80010c4: 4700 bx r0 - assert!(count < u16::MAX as usize); - 80010c6: 4805 ldr r0, [pc, #20] ; (80010dc ) - 80010c8: 212b movs r1, #43 ; 0x2b - 80010ca: 4a05 ldr r2, [pc, #20] ; (80010e0 ) - 80010cc: f008 f808 bl 80090e0 - 80010d0: defe udf #254 ; 0xfe - 80010d2: 46c0 nop ; (mov r8, r8) - 80010d4: 0000ffff .word 0x0000ffff - 80010d8: 040000d4 .word 0x040000d4 - 80010dc: 0800c0bc .word 0x0800c0bc - 80010e0: 0800c0f4 .word 0x0800c0f4 - -080010e4 ::with_capacity>: - pub fn with_capacity(capacity: usize) -> Self { - 80010e4: b5f0 push {r4, r5, r6, r7, lr} - 80010e6: af03 add r7, sp, #12 - 80010e8: b085 sub sp, #20 - 80010ea: 9001 str r0, [sp, #4] - if number_before_resize(attempted_size) > capacity { - 80010ec: 2900 cmp r1, #0 - 80010ee: d003 beq.n 80010f8 ::with_capacity+0x14> - 80010f0: 2903 cmp r1, #3 - 80010f2: d203 bcs.n 80010fc ::with_capacity+0x18> - 80010f4: 2304 movs r3, #4 - 80010f6: e06d b.n 80011d4 ::with_capacity+0xf0> - 80010f8: 2302 movs r3, #2 - 80010fa: e06b b.n 80011d4 ::with_capacity+0xf0> - 80010fc: 2906 cmp r1, #6 - 80010fe: d201 bcs.n 8001104 ::with_capacity+0x20> - 8001100: 2308 movs r3, #8 - 8001102: e067 b.n 80011d4 ::with_capacity+0xf0> - 8001104: 290d cmp r1, #13 - 8001106: d201 bcs.n 800110c ::with_capacity+0x28> - 8001108: 2310 movs r3, #16 - 800110a: e063 b.n 80011d4 ::with_capacity+0xf0> - 800110c: 291b cmp r1, #27 - 800110e: d201 bcs.n 8001114 ::with_capacity+0x30> - 8001110: 2320 movs r3, #32 - 8001112: e05f b.n 80011d4 ::with_capacity+0xf0> - 8001114: 2936 cmp r1, #54 ; 0x36 - 8001116: d201 bcs.n 800111c ::with_capacity+0x38> - 8001118: 2340 movs r3, #64 ; 0x40 - 800111a: e05b b.n 80011d4 ::with_capacity+0xf0> - 800111c: 296c cmp r1, #108 ; 0x6c - 800111e: d201 bcs.n 8001124 ::with_capacity+0x40> - 8001120: 2380 movs r3, #128 ; 0x80 - 8001122: e057 b.n 80011d4 ::with_capacity+0xf0> - 8001124: 2001 movs r0, #1 - 8001126: 0203 lsls r3, r0, #8 - 8001128: 29d9 cmp r1, #217 ; 0xd9 - 800112a: d353 bcc.n 80011d4 ::with_capacity+0xf0> - 800112c: 33b3 adds r3, #179 ; 0xb3 - 800112e: 4299 cmp r1, r3 - 8001130: d201 bcs.n 8001136 ::with_capacity+0x52> - 8001132: 0243 lsls r3, r0, #9 - 8001134: e04e b.n 80011d4 ::with_capacity+0xf0> - 8001136: 4b5b ldr r3, [pc, #364] ; (80012a4 ::with_capacity+0x1c0>) - 8001138: 4299 cmp r1, r3 - 800113a: d201 bcs.n 8001140 ::with_capacity+0x5c> - 800113c: 339a adds r3, #154 ; 0x9a - 800113e: e049 b.n 80011d4 ::with_capacity+0xf0> - 8001140: 4a59 ldr r2, [pc, #356] ; (80012a8 ::with_capacity+0x1c4>) - 8001142: 4291 cmp r1, r2 - 8001144: d201 bcs.n 800114a ::with_capacity+0x66> - 8001146: 02c3 lsls r3, r0, #11 - 8001148: e044 b.n 80011d4 ::with_capacity+0xf0> - 800114a: 4a58 ldr r2, [pc, #352] ; (80012ac ::with_capacity+0x1c8>) - 800114c: 4291 cmp r1, r2 - 800114e: d201 bcs.n 8001154 ::with_capacity+0x70> - 8001150: 0303 lsls r3, r0, #12 - 8001152: e03f b.n 80011d4 ::with_capacity+0xf0> - 8001154: 4a56 ldr r2, [pc, #344] ; (80012b0 ::with_capacity+0x1cc>) - 8001156: 4291 cmp r1, r2 - 8001158: d201 bcs.n 800115e ::with_capacity+0x7a> - 800115a: 0343 lsls r3, r0, #13 - 800115c: e03a b.n 80011d4 ::with_capacity+0xf0> - 800115e: 4a55 ldr r2, [pc, #340] ; (80012b4 ::with_capacity+0x1d0>) - 8001160: 4291 cmp r1, r2 - 8001162: d201 bcs.n 8001168 ::with_capacity+0x84> - 8001164: 0383 lsls r3, r0, #14 - 8001166: e035 b.n 80011d4 ::with_capacity+0xf0> - 8001168: 4a53 ldr r2, [pc, #332] ; (80012b8 ::with_capacity+0x1d4>) - 800116a: 4291 cmp r1, r2 - 800116c: d201 bcs.n 8001172 ::with_capacity+0x8e> - 800116e: 03c3 lsls r3, r0, #15 - 8001170: e030 b.n 80011d4 ::with_capacity+0xf0> - 8001172: 4a52 ldr r2, [pc, #328] ; (80012bc ::with_capacity+0x1d8>) - 8001174: 4291 cmp r1, r2 - 8001176: d201 bcs.n 800117c ::with_capacity+0x98> - 8001178: 0403 lsls r3, r0, #16 - 800117a: e02b b.n 80011d4 ::with_capacity+0xf0> - 800117c: 4a50 ldr r2, [pc, #320] ; (80012c0 ::with_capacity+0x1dc>) - 800117e: 4291 cmp r1, r2 - 8001180: d201 bcs.n 8001186 ::with_capacity+0xa2> - 8001182: 0443 lsls r3, r0, #17 - 8001184: e026 b.n 80011d4 ::with_capacity+0xf0> - 8001186: 4a4f ldr r2, [pc, #316] ; (80012c4 ::with_capacity+0x1e0>) - 8001188: 4291 cmp r1, r2 - 800118a: d201 bcs.n 8001190 ::with_capacity+0xac> - 800118c: 0483 lsls r3, r0, #18 - 800118e: e021 b.n 80011d4 ::with_capacity+0xf0> - 8001190: 4a4d ldr r2, [pc, #308] ; (80012c8 ::with_capacity+0x1e4>) - 8001192: 4291 cmp r1, r2 - 8001194: d201 bcs.n 800119a ::with_capacity+0xb6> - 8001196: 04c3 lsls r3, r0, #19 - 8001198: e01c b.n 80011d4 ::with_capacity+0xf0> - 800119a: 4a4c ldr r2, [pc, #304] ; (80012cc ::with_capacity+0x1e8>) - 800119c: 4291 cmp r1, r2 - 800119e: d201 bcs.n 80011a4 ::with_capacity+0xc0> - 80011a0: 0503 lsls r3, r0, #20 - 80011a2: e017 b.n 80011d4 ::with_capacity+0xf0> - 80011a4: 4a4a ldr r2, [pc, #296] ; (80012d0 ::with_capacity+0x1ec>) - 80011a6: 4291 cmp r1, r2 - 80011a8: d201 bcs.n 80011ae ::with_capacity+0xca> - 80011aa: 0543 lsls r3, r0, #21 - 80011ac: e012 b.n 80011d4 ::with_capacity+0xf0> - 80011ae: 4a49 ldr r2, [pc, #292] ; (80012d4 ::with_capacity+0x1f0>) - 80011b0: 4291 cmp r1, r2 - 80011b2: d201 bcs.n 80011b8 ::with_capacity+0xd4> - 80011b4: 0583 lsls r3, r0, #22 - 80011b6: e00d b.n 80011d4 ::with_capacity+0xf0> - 80011b8: 4a47 ldr r2, [pc, #284] ; (80012d8 ::with_capacity+0x1f4>) - 80011ba: 4291 cmp r1, r2 - 80011bc: d201 bcs.n 80011c2 ::with_capacity+0xde> - 80011be: 05c3 lsls r3, r0, #23 - 80011c0: e008 b.n 80011d4 ::with_capacity+0xf0> - 80011c2: 4a46 ldr r2, [pc, #280] ; (80012dc ::with_capacity+0x1f8>) - 80011c4: 4291 cmp r1, r2 - 80011c6: d201 bcs.n 80011cc ::with_capacity+0xe8> - 80011c8: 0603 lsls r3, r0, #24 - 80011ca: e003 b.n 80011d4 ::with_capacity+0xf0> - 80011cc: 4a44 ldr r2, [pc, #272] ; (80012e0 ::with_capacity+0x1fc>) - 80011ce: 4291 cmp r1, r2 - 80011d0: d256 bcs.n 8001280 ::with_capacity+0x19c> - 80011d2: 0643 lsls r3, r0, #25 - intrinsics::ctpop(self as $ActualT) as u32 - 80011d4: 0858 lsrs r0, r3, #1 - 80011d6: 4945 ldr r1, [pc, #276] ; (80012ec ::with_capacity+0x208>) - 80011d8: 4001 ands r1, r0 - 80011da: 1a58 subs r0, r3, r1 - 80011dc: 4944 ldr r1, [pc, #272] ; (80012f0 ::with_capacity+0x20c>) - 80011de: 0882 lsrs r2, r0, #2 - 80011e0: 4008 ands r0, r1 - 80011e2: 400a ands r2, r1 - 80011e4: 1880 adds r0, r0, r2 - 80011e6: 0901 lsrs r1, r0, #4 - 80011e8: 1840 adds r0, r0, r1 - 80011ea: 4942 ldr r1, [pc, #264] ; (80012f4 ::with_capacity+0x210>) - 80011ec: 4001 ands r1, r0 - 80011ee: 4842 ldr r0, [pc, #264] ; (80012f8 ::with_capacity+0x214>) - 80011f0: 4348 muls r0, r1 - 80011f2: 0e00 lsrs r0, r0, #24 - assert!(capacity.is_power_of_two(), "Capacity must be a power of 2"); - 80011f4: 2801 cmp r0, #1 - 80011f6: d149 bne.n 800128c ::with_capacity+0x1a8> - 80011f8: 2018 movs r0, #24 - 80011fa: 9302 str r3, [sp, #8] - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 80011fc: 4358 muls r0, r3 - 80011fe: 2104 movs r1, #4 - 8001200: 9004 str r0, [sp, #16] -/// ``` -#[stable(feature = "global_alloc", since = "1.28.0")] -#[must_use = "losing the pointer will leak memory"] -#[inline] -pub unsafe fn alloc(layout: Layout) -> *mut u8 { - unsafe { __rust_alloc(layout.size(), layout.align()) } - 8001202: f7ff faa5 bl 8000750 <__rust_alloc> - match layout.size() { - 0 => Ok(NonNull::slice_from_raw_parts(layout.dangling(), 0)), - // SAFETY: `layout` is non-zero in size, - size => unsafe { - let raw_ptr = if zeroed { alloc_zeroed(layout) } else { alloc(layout) }; - let ptr = NonNull::new(raw_ptr).ok_or(AllocError)?; - 8001206: 2800 cmp r0, #0 - 8001208: d046 beq.n 8001298 ::with_capacity+0x1b4> - 800120a: 2400 movs r4, #0 - 800120c: 43e1 mvns r1, r4 - copy_nonoverlapping(&src as *const T, dst, 1); - 800120e: 6004 str r4, [r0, #0] - 8001210: 9003 str r0, [sp, #12] - 8001212: 6041 str r1, [r0, #4] - 8001214: 2601 movs r6, #1 - 8001216: 0023 movs r3, r4 - mut fold: impl FnMut(Acc, T) -> R + 'a, - ) -> impl FnMut(Acc, T) -> ControlFlow + 'a { - move |acc, x| { - *n -= 1; - let r = fold(acc, x); - if *n == 0 { ControlFlow::Break(r) } else { ControlFlow::from_try(r) } - 8001218: 0022 movs r2, r4 - 800121a: 3218 adds r2, #24 - F: FnMut(B, Self::Item) -> R, - R: Try, - { - let mut accum = init; - while let Some(x) = self.next() { - accum = f(accum, x)?; - 800121c: 9804 ldr r0, [sp, #16] - 800121e: 4290 cmp r0, r2 - 8001220: d013 beq.n 800124a ::with_capacity+0x166> - 8001222: 9803 ldr r0, [sp, #12] - 8001224: 18c3 adds r3, r0, r3 - 8001226: 619c str r4, [r3, #24] - 8001228: 61d9 str r1, [r3, #28] - SetLenOnDrop { local_len: *len, len } - } - - #[inline] - pub(super) fn increment_len(&mut self, increment: usize) { - self.local_len += increment; - 800122a: 1c75 adds r5, r6, #1 - 800122c: b410 push {r4} - 800122e: bc08 pop {r3} - 8001230: 4163 adcs r3, r4 - 8001232: 42b5 cmp r5, r6 - 8001234: b404 push {r2} - 8001236: bc08 pop {r3} - 8001238: b420 push {r5} - 800123a: bc40 pop {r6} - 800123c: d2ed bcs.n 800121a ::with_capacity+0x136> - 800123e: 4831 ldr r0, [pc, #196] ; (8001304 ::with_capacity+0x220>) - 8001240: 211c movs r1, #28 - 8001242: 4a31 ldr r2, [pc, #196] ; (8001308 ::with_capacity+0x224>) - 8001244: f007 ff4c bl 80090e0 - 8001248: defe udf #254 ; 0xfe - 800124a: 2255 movs r2, #85 ; 0x55 - 800124c: 2400 movs r4, #0 - 800124e: 9d02 ldr r5, [sp, #8] - capacity * 85 / 100 - 8001250: 0028 movs r0, r5 - 8001252: 0021 movs r1, r4 - 8001254: 0023 movs r3, r4 - 8001256: f007 ffe7 bl 8009228 <__aeabi_lmul> - 800125a: 1e4a subs r2, r1, #1 - 800125c: 4191 sbcs r1, r2 - 800125e: 2901 cmp r1, #1 - 8001260: d00e beq.n 8001280 ::with_capacity+0x19c> - 8001262: 002a movs r2, r5 - 8001264: 9d01 ldr r5, [sp, #4] - Self { - 8001266: 9903 ldr r1, [sp, #12] - 8001268: c546 stmia r5!, {r1, r2, r6} - 800126a: 602c str r4, [r5, #0] - 800126c: 606c str r4, [r5, #4] - 800126e: 2164 movs r1, #100 ; 0x64 - 8001270: 3d0c subs r5, #12 - capacity * 85 / 100 - 8001272: f008 f803 bl 800927c <__aeabi_uidiv> - Self { - 8001276: 6168 str r0, [r5, #20] - } - 8001278: b005 add sp, #20 - 800127a: bcf0 pop {r4, r5, r6, r7} - 800127c: bc01 pop {r0} - 800127e: 4700 bx r0 - 8001280: 4818 ldr r0, [pc, #96] ; (80012e4 ::with_capacity+0x200>) - 8001282: 2121 movs r1, #33 ; 0x21 - 8001284: 4a18 ldr r2, [pc, #96] ; (80012e8 ::with_capacity+0x204>) - 8001286: f007 ff2b bl 80090e0 - 800128a: defe udf #254 ; 0xfe - assert!(capacity.is_power_of_two(), "Capacity must be a power of 2"); - 800128c: 481b ldr r0, [pc, #108] ; (80012fc ::with_capacity+0x218>) - 800128e: 211d movs r1, #29 - 8001290: 4a1b ldr r2, [pc, #108] ; (8001300 ::with_capacity+0x21c>) - 8001292: f007 ff25 bl 80090e0 - 8001296: defe udf #254 ; 0xfe - 8001298: 2104 movs r1, #4 - AllocInit::Uninitialized => alloc.allocate(layout), - AllocInit::Zeroed => alloc.allocate_zeroed(layout), - }; - let ptr = match result { - Ok(ptr) => ptr, - Err(_) => handle_alloc_error(layout), - 800129a: 9804 ldr r0, [sp, #16] - 800129c: f005 fc00 bl 8006aa0 - 80012a0: defe udf #254 ; 0xfe - 80012a2: 46c0 nop ; (mov r8, r8) - 80012a4: 00000366 .word 0x00000366 - 80012a8: 000006cc .word 0x000006cc - 80012ac: 00000d99 .word 0x00000d99 - 80012b0: 00001b33 .word 0x00001b33 - 80012b4: 00003666 .word 0x00003666 - 80012b8: 00006ccc .word 0x00006ccc - 80012bc: 0000d999 .word 0x0000d999 - 80012c0: 0001b333 .word 0x0001b333 - 80012c4: 00036666 .word 0x00036666 - 80012c8: 0006cccc .word 0x0006cccc - 80012cc: 000d9999 .word 0x000d9999 - 80012d0: 001b3333 .word 0x001b3333 - 80012d4: 00366666 .word 0x00366666 - 80012d8: 006ccccc .word 0x006ccccc - 80012dc: 00d99999 .word 0x00d99999 - 80012e0: 01b33333 .word 0x01b33333 - 80012e4: 0800b410 .word 0x0800b410 - 80012e8: 0800b3f4 .word 0x0800b3f4 - 80012ec: 01555555 .word 0x01555555 - 80012f0: 33333333 .word 0x33333333 - 80012f4: 0f0f0f0f .word 0x0f0f0f0f - 80012f8: 01010101 .word 0x01010101 - 80012fc: 0800ac3c .word 0x0800ac3c - 8001300: 0800ac5c .word 0x0800ac5c - 8001304: 0800b220 .word 0x0800b220 - 8001308: 0800b2bc .word 0x0800b2bc - -0800130c ::insert>: - pub fn insert(&mut self, key: K, value: V) -> Option { - 800130c: b5f0 push {r4, r5, r6, r7, lr} - 800130e: af03 add r7, sp, #12 - 8001310: b095 sub sp, #84 ; 0x54 - 8001312: 0014 movs r4, r2 - 8001314: 000e movs r6, r1 - 8001316: 0005 movs r5, r0 - tileset: NonNull<[u8]>, - 8001318: 6809 ldr r1, [r1, #0] - 800131a: 6872 ldr r2, [r6, #4] - 800131c: 48a9 ldr r0, [pc, #676] ; (80015c4 ::insert+0x2b8>) - intrinsics::wrapping_mul(self, rhs) - 800131e: 4341 muls r1, r0 - 8001320: 231b movs r3, #27 - intrinsics::rotate_left(self, n as $SelfT) - 8001322: 41d9 rors r1, r3 - 8001324: 4051 eors r1, r2 - intrinsics::wrapping_mul(self, rhs) - 8001326: 4341 muls r1, r0 - intrinsics::rotate_left(self, n as $SelfT) - 8001328: 41d9 rors r1, r3 - tile: u16, - 800132a: 8932 ldrh r2, [r6, #8] - 800132c: 404a eors r2, r1 - intrinsics::wrapping_mul(self, rhs) - 800132e: 4342 muls r2, r0 - if let Some(location) = self.nodes.location(&key, hash) { - 8001330: 0028 movs r0, r5 - 8001332: 0031 movs r1, r6 - 8001334: 9204 str r2, [sp, #16] - 8001336: f001 fa7b bl 8002830 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715> - 800133a: 2801 cmp r0, #1 - 800133c: 9405 str r4, [sp, #20] - 800133e: d12a bne.n 8001396 ::insert+0x8a> - 8001340: 9106 str r1, [sp, #24] - 8001342: 9602 str r6, [sp, #8] - 8001344: 682c ldr r4, [r5, #0] - 8001346: 07a0 lsls r0, r4, #30 - 8001348: d000 beq.n 800134c ::insert+0x40> - 800134a: e119 b.n 8001580 ::insert+0x274> - 800134c: 68ae ldr r6, [r5, #8] - 800134e: 2518 movs r5, #24 - 8001350: 2100 movs r1, #0 - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 8001352: 0030 movs r0, r6 - 8001354: 002a movs r2, r5 - 8001356: 000b movs r3, r1 - 8001358: f007 ff66 bl 8009228 <__aeabi_lmul> - 800135c: 1e4a subs r2, r1, #1 - 800135e: 4191 sbcs r1, r2 - 8001360: d000 beq.n 8001364 ::insert+0x58> - 8001362: e10d b.n 8001580 ::insert+0x274> - 8001364: 2800 cmp r0, #0 - 8001366: d500 bpl.n 800136a ::insert+0x5e> - 8001368: e10a b.n 8001580 ::insert+0x274> - 800136a: 9806 ldr r0, [sp, #24] - &mut (*slice)[self] - 800136c: 4286 cmp r6, r0 - 800136e: d800 bhi.n 8001372 ::insert+0x66> - 8001370: e0f5 b.n 800155e ::insert+0x252> - self.distance_to_initial_bucket >= 0 - 8001372: 4345 muls r5, r0 - 8001374: 1961 adds r1, r4, r5 - 8001376: 6848 ldr r0, [r1, #4] - panic!("Cannot replace an unininitalised node"); - } - } - - fn replace(&mut self, key: K, value: V) -> (K, V) { - if self.has_value() { - 8001378: 2800 cmp r0, #0 - 800137a: d500 bpl.n 800137e ::insert+0x72> - 800137c: e102 b.n 8001584 ::insert+0x278> - 800137e: 9b02 ldr r3, [sp, #8] - // SAFETY: We read from `dest` but directly write `src` into it afterwards, - // such that the old value is not duplicated. Nothing is dropped and - // nothing here can panic. - unsafe { - let result = ptr::read(dest); - ptr::write(dest, src); - 8001380: cb0d ldmia r3, {r0, r2, r3} - 8001382: 000c movs r4, r1 - 8001384: 3408 adds r4, #8 - 8001386: c40d stmia r4!, {r0, r2, r3} - copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); - 8001388: 6948 ldr r0, [r1, #20] - copy_nonoverlapping(&src as *const T, dst, 1); - 800138a: 9a05 ldr r2, [sp, #20] - 800138c: 614a str r2, [r1, #20] - } - 800138e: b015 add sp, #84 ; 0x54 - 8001390: bcf0 pop {r4, r5, r6, r7} - 8001392: bc02 pop {r1} - 8001394: 4708 bx r1 - self.nodes.len() - 8001396: 6928 ldr r0, [r5, #16] - if self.nodes.capacity() <= self.len() { - 8001398: 6969 ldr r1, [r5, #20] - 800139a: 4281 cmp r1, r0 - 800139c: d900 bls.n 80013a0 ::insert+0x94> - 800139e: e0d0 b.n 8001542 ::insert+0x236> - self.nodes.len() - 80013a0: 68aa ldr r2, [r5, #8] - 80013a2: 2400 movs r4, #0 - self.resize(self.nodes.backing_vec_size() * 2); - 80013a4: 1890 adds r0, r2, r2 - 80013a6: b410 push {r4} - 80013a8: bc02 pop {r1} - 80013aa: 4161 adcs r1, r4 - 80013ac: 4290 cmp r0, r2 - 80013ae: d200 bcs.n 80013b2 ::insert+0xa6> - 80013b0: e0da b.n 8001568 ::insert+0x25c> - assert!( - 80013b2: 4282 cmp r2, r0 - 80013b4: d900 bls.n 80013b8 ::insert+0xac> - 80013b6: e0eb b.n 8001590 ::insert+0x284> - 80013b8: d100 bne.n 80013bc ::insert+0xb0> - 80013ba: e0c2 b.n 8001542 ::insert+0x236> - 80013bc: 9200 str r2, [sp, #0] - 80013be: 9501 str r5, [sp, #4] - intrinsics::ctpop(self as $ActualT) as u32 - 80013c0: 0841 lsrs r1, r0, #1 - 80013c2: 4a81 ldr r2, [pc, #516] ; (80015c8 ::insert+0x2bc>) - 80013c4: 400a ands r2, r1 - 80013c6: 1a81 subs r1, r0, r2 - 80013c8: 4a80 ldr r2, [pc, #512] ; (80015cc ::insert+0x2c0>) - 80013ca: 088b lsrs r3, r1, #2 - 80013cc: 4011 ands r1, r2 - 80013ce: 4013 ands r3, r2 - 80013d0: 18c9 adds r1, r1, r3 - 80013d2: 090a lsrs r2, r1, #4 - 80013d4: 1889 adds r1, r1, r2 - 80013d6: 4a7e ldr r2, [pc, #504] ; (80015d0 ::insert+0x2c4>) - 80013d8: 400a ands r2, r1 - 80013da: 497e ldr r1, [pc, #504] ; (80015d4 ::insert+0x2c8>) - 80013dc: 4351 muls r1, r2 - 80013de: 0e09 lsrs r1, r1, #24 - assert!(capacity.is_power_of_two(), "Capacity must be a power of 2"); - 80013e0: 2901 cmp r1, #1 - 80013e2: d000 beq.n 80013e6 ::insert+0xda> - 80013e4: e0dd b.n 80015a2 ::insert+0x296> - 80013e6: 9602 str r6, [sp, #8] - if mem::size_of::() == 0 || capacity == 0 { - 80013e8: 2800 cmp r0, #0 - 80013ea: d03a beq.n 8001462 ::insert+0x156> - 80013ec: 2218 movs r2, #24 - 80013ee: 2600 movs r6, #0 - 80013f0: 9006 str r0, [sp, #24] - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 80013f2: 0031 movs r1, r6 - 80013f4: 0033 movs r3, r6 - 80013f6: f007 ff17 bl 8009228 <__aeabi_lmul> - 80013fa: 0004 movs r4, r0 - 80013fc: 1e48 subs r0, r1, #1 - 80013fe: 4181 sbcs r1, r0 - 8001400: d000 beq.n 8001404 ::insert+0xf8> - 8001402: e0cb b.n 800159c ::insert+0x290> -// an extra guard for this in case we're running on a platform which can use -// all 4GB in user-space, e.g., PAE or x32. - -#[inline] -fn alloc_guard(alloc_size: usize) -> Result<(), TryReserveError> { - if usize::BITS < 64 && alloc_size > isize::MAX as usize { - 8001404: 2c00 cmp r4, #0 - 8001406: d500 bpl.n 800140a ::insert+0xfe> - 8001408: e0c8 b.n 800159c ::insert+0x290> - 800140a: 2104 movs r1, #4 - unsafe { __rust_alloc(layout.size(), layout.align()) } - 800140c: 0020 movs r0, r4 - 800140e: f7ff f99f bl 8000750 <__rust_alloc> - let ptr = NonNull::new(raw_ptr).ok_or(AllocError)?; - 8001412: 2800 cmp r0, #0 - 8001414: d100 bne.n 8001418 ::insert+0x10c> - 8001416: e0ca b.n 80015ae ::insert+0x2a2> - 8001418: 43f1 mvns r1, r6 - 800141a: 6006 str r6, [r0, #0] - 800141c: 6041 str r1, [r0, #4] - Vec { buf: RawVec::with_capacity_in(capacity, alloc), len: 0 } - 800141e: 9a06 ldr r2, [sp, #24] - 8001420: 9208 str r2, [sp, #32] - 8001422: 9007 str r0, [sp, #28] - 8001424: 1e4a subs r2, r1, #1 - 8001426: 9b00 ldr r3, [sp, #0] - 8001428: 435a muls r2, r3 - 800142a: 301c adds r0, #28 - 800142c: 2301 movs r3, #1 - 800142e: 1c52 adds r2, r2, #1 - 8001430: d214 bcs.n 800145c ::insert+0x150> - 8001432: 0004 movs r4, r0 - 8001434: 3418 adds r4, #24 - 8001436: 6001 str r1, [r0, #0] - 8001438: 1f00 subs r0, r0, #4 - 800143a: 6006 str r6, [r0, #0] - 800143c: 1c5d adds r5, r3, #1 - 800143e: b440 push {r6} - 8001440: bc01 pop {r0} - 8001442: 4170 adcs r0, r6 - 8001444: 429d cmp r5, r3 - 8001446: b410 push {r4} - 8001448: bc01 pop {r0} - 800144a: b420 push {r5} - 800144c: bc08 pop {r3} - 800144e: d2ee bcs.n 800142e ::insert+0x122> - 8001450: 4863 ldr r0, [pc, #396] ; (80015e0 ::insert+0x2d4>) - 8001452: 211c movs r1, #28 - 8001454: 4a63 ldr r2, [pc, #396] ; (80015e4 ::insert+0x2d8>) - 8001456: f007 fe43 bl 80090e0 - 800145a: defe udf #254 ; 0xfe -} - -impl Drop for SetLenOnDrop<'_> { - #[inline] - fn drop(&mut self) { - *self.len = self.local_len; - 800145c: 9309 str r3, [sp, #36] ; 0x24 - 800145e: 9806 ldr r0, [sp, #24] - 8001460: e003 b.n 800146a ::insert+0x15e> - 8001462: 9409 str r4, [sp, #36] ; 0x24 - 8001464: 9408 str r4, [sp, #32] - 8001466: 2104 movs r1, #4 - 8001468: 9107 str r1, [sp, #28] - 800146a: 2255 movs r2, #85 ; 0x55 - 800146c: 2400 movs r4, #0 - capacity * 85 / 100 - 800146e: 0021 movs r1, r4 - 8001470: 0023 movs r3, r4 - 8001472: f007 fed9 bl 8009228 <__aeabi_lmul> - 8001476: 1e4a subs r2, r1, #1 - 8001478: 4191 sbcs r1, r2 - 800147a: 2901 cmp r1, #1 - 800147c: d07a beq.n 8001574 ::insert+0x268> - 800147e: 9d01 ldr r5, [sp, #4] - self.len = new_len; - 8001480: 60ac str r4, [r5, #8] - Self { - 8001482: 940b str r4, [sp, #44] ; 0x2c - 8001484: 940a str r4, [sp, #40] ; 0x28 - 8001486: 2164 movs r1, #100 ; 0x64 - capacity * 85 / 100 - 8001488: f007 fef8 bl 800927c <__aeabi_uidiv> - Self { - 800148c: 900c str r0, [sp, #48] ; 0x30 - let ptr = self.buf.ptr(); - 800148e: 6828 ldr r0, [r5, #0] - 8001490: 9006 str r0, [sp, #24] - 8001492: 0780 lsls r0, r0, #30 - 8001494: d174 bne.n 8001580 ::insert+0x274> - 8001496: 2418 movs r4, #24 - 8001498: 2600 movs r6, #0 - 800149a: 9800 ldr r0, [sp, #0] - 800149c: 0031 movs r1, r6 - 800149e: 0022 movs r2, r4 - 80014a0: 0033 movs r3, r6 - 80014a2: f007 fec1 bl 8009228 <__aeabi_lmul> - 80014a6: 0003 movs r3, r0 - 80014a8: 1e48 subs r0, r1, #1 - 80014aa: 4181 sbcs r1, r0 - 80014ac: d168 bne.n 8001580 ::insert+0x274> - 80014ae: 2b00 cmp r3, #0 - 80014b0: d466 bmi.n 8001580 ::insert+0x274> - for mut node in self.nodes.drain(..) { - 80014b2: 9801 ldr r0, [sp, #4] - 80014b4: 9011 str r0, [sp, #68] ; 0x44 - 80014b6: 960e str r6, [sp, #56] ; 0x38 - 80014b8: 9800 ldr r0, [sp, #0] - 80014ba: 900d str r0, [sp, #52] ; 0x34 - (ptr as *const u8).wrapping_add(slice.len()) as *const T - } else { - ptr.add(slice.len()) - }; - - Self { ptr: NonNull::new_unchecked(ptr as *mut T), end, _marker: PhantomData } - 80014bc: 4344 muls r4, r0 - 80014be: 9a06 ldr r2, [sp, #24] - 80014c0: 920f str r2, [sp, #60] ; 0x3c - 80014c2: 1910 adds r0, r2, r4 - 80014c4: 9010 str r0, [sp, #64] ; 0x40 - if is_empty!(self) { - 80014c6: 2c00 cmp r4, #0 - 80014c8: d01c beq.n 8001504 ::insert+0x1f8> - 80014ca: 9303 str r3, [sp, #12] - 80014cc: e002 b.n 80014d4 ::insert+0x1c8> - 80014ce: 3618 adds r6, #24 - 80014d0: 42b3 cmp r3, r6 - 80014d2: d017 beq.n 8001504 ::insert+0x1f8> - self.ptr = unsafe { NonNull::new_unchecked(self.ptr.as_ptr().offset(offset)) }; - 80014d4: 1990 adds r0, r2, r6 - 80014d6: 0001 movs r1, r0 - 80014d8: 3118 adds r1, #24 - 80014da: 910f str r1, [sp, #60] ; 0x3c - tmp.assume_init() - 80014dc: 6841 ldr r1, [r0, #4] - if self.has_value() { - 80014de: 2900 cmp r1, #0 - 80014e0: d4f5 bmi.n 80014ce ::insert+0x1c2> - 80014e2: 6881 ldr r1, [r0, #8] - 80014e4: 2900 cmp r1, #0 - 80014e6: d0f2 beq.n 80014ce ::insert+0x1c2> - 80014e8: 68c4 ldr r4, [r0, #12] - 80014ea: 6905 ldr r5, [r0, #16] - 80014ec: 6942 ldr r2, [r0, #20] - 80014ee: 9806 ldr r0, [sp, #24] - 80014f0: 5983 ldr r3, [r0, r6] - new_node_storage.insert_new(key, value, hash); - 80014f2: a812 add r0, sp, #72 ; 0x48 - 80014f4: c032 stmia r0!, {r1, r4, r5} - 80014f6: a807 add r0, sp, #28 - 80014f8: a912 add r1, sp, #72 ; 0x48 - 80014fa: f000 ffe1 bl 80024c0 ::insert_new> - 80014fe: 9b03 ldr r3, [sp, #12] - 8001500: 9a06 ldr r2, [sp, #24] - 8001502: e7e4 b.n 80014ce ::insert+0x1c2> - 8001504: a80d add r0, sp, #52 ; 0x34 - for mut node in self.nodes.drain(..) { - 8001506: f004 ff0d bl 8006324 >>> - 800150a: 9901 ldr r1, [sp, #4] - if mem::size_of::() == 0 || self.cap == 0 { - 800150c: 6848 ldr r0, [r1, #4] - 800150e: 2800 cmp r0, #0 - 8001510: 9e02 ldr r6, [sp, #8] - 8001512: d010 beq.n 8001536 ::insert+0x22a> - 8001514: 2218 movs r2, #24 - 8001516: 2100 movs r1, #0 - 8001518: 000b movs r3, r1 - 800151a: f007 fe85 bl 8009228 <__aeabi_lmul> - 800151e: 0003 movs r3, r0 - 8001520: 1e48 subs r0, r1, #1 - 8001522: 4181 sbcs r1, r0 - /// - /// On arithmetic overflow, returns `LayoutError`. - #[stable(feature = "alloc_layout_manipulation", since = "1.44.0")] - #[inline] - pub fn array(n: usize) -> Result { - let array_size = mem::size_of::().checked_mul(n).ok_or(LayoutError)?; - 8001524: 2901 cmp r1, #1 - 8001526: d047 beq.n 80015b8 ::insert+0x2ac> - 8001528: 9c01 ldr r4, [sp, #4] - Some((self.ptr.cast().into(), layout)) - 800152a: 6820 ldr r0, [r4, #0] - 800152c: 2204 movs r2, #4 - unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } - 800152e: 0019 movs r1, r3 - 8001530: f7ff f915 bl 800075e <__rust_dealloc> - 8001534: 0021 movs r1, r4 - 8001536: a807 add r0, sp, #28 - self.nodes = self.nodes.resized_to(new_size); - 8001538: c81c ldmia r0!, {r2, r3, r4} - 800153a: c11c stmia r1!, {r2, r3, r4} - 800153c: c81c ldmia r0!, {r2, r3, r4} - 800153e: c11c stmia r1!, {r2, r3, r4} - 8001540: 9d01 ldr r5, [sp, #4] - self.nodes.insert_new(key, value, hash); - 8001542: ce07 ldmia r6!, {r0, r1, r2} - 8001544: ab07 add r3, sp, #28 - 8001546: c307 stmia r3!, {r0, r1, r2} - 8001548: a907 add r1, sp, #28 - 800154a: 0028 movs r0, r5 - 800154c: 9a05 ldr r2, [sp, #20] - 800154e: 9b04 ldr r3, [sp, #16] - 8001550: f000 ffb6 bl 80024c0 ::insert_new> - 8001554: 2000 movs r0, #0 - } - 8001556: b015 add sp, #84 ; 0x54 - 8001558: bcf0 pop {r4, r5, r6, r7} - 800155a: bc02 pop {r1} - 800155c: 4708 bx r1 - 800155e: 4a2a ldr r2, [pc, #168] ; (8001608 ::insert+0x2fc>) - 8001560: 0031 movs r1, r6 - 8001562: f007 fdd3 bl 800910c - 8001566: defe udf #254 ; 0xfe - self.resize(self.nodes.backing_vec_size() * 2); - 8001568: 4825 ldr r0, [pc, #148] ; (8001600 ::insert+0x2f4>) - 800156a: 2121 movs r1, #33 ; 0x21 - 800156c: 4a25 ldr r2, [pc, #148] ; (8001604 ::insert+0x2f8>) - 800156e: f007 fdb7 bl 80090e0 - 8001572: defe udf #254 ; 0xfe - capacity * 85 / 100 - 8001574: 481e ldr r0, [pc, #120] ; (80015f0 ::insert+0x2e4>) - 8001576: 2121 movs r1, #33 ; 0x21 - 8001578: 4a1e ldr r2, [pc, #120] ; (80015f4 ::insert+0x2e8>) - 800157a: f007 fdb1 bl 80090e0 - 800157e: defe udf #254 ; 0xfe - 8001580: defe udf #254 ; 0xfe - 8001582: defe udf #254 ; 0xfe - let old_key = mem::replace(&mut self.key, MaybeUninit::new(key)); - let old_value = mem::replace(&mut self.value, MaybeUninit::new(value)); - - unsafe { (old_key.assume_init(), old_value.assume_init()) } - } else { - panic!("Cannot replace an uninitialised node"); - 8001584: 4821 ldr r0, [pc, #132] ; (800160c ::insert+0x300>) - 8001586: 2124 movs r1, #36 ; 0x24 - 8001588: 4a21 ldr r2, [pc, #132] ; (8001610 ::insert+0x304>) - 800158a: f007 fda9 bl 80090e0 - 800158e: defe udf #254 ; 0xfe - assert!( - 8001590: 4819 ldr r0, [pc, #100] ; (80015f8 ::insert+0x2ec>) - 8001592: 2128 movs r1, #40 ; 0x28 - 8001594: 4a19 ldr r2, [pc, #100] ; (80015fc ::insert+0x2f0>) - 8001596: f007 fda3 bl 80090e0 - 800159a: defe udf #254 ; 0xfe - 800159c: f005 fa3e bl 8006a1c - 80015a0: defe udf #254 ; 0xfe - assert!(capacity.is_power_of_two(), "Capacity must be a power of 2"); - 80015a2: 480d ldr r0, [pc, #52] ; (80015d8 ::insert+0x2cc>) - 80015a4: 211d movs r1, #29 - 80015a6: 4a0d ldr r2, [pc, #52] ; (80015dc ::insert+0x2d0>) - 80015a8: f007 fd9a bl 80090e0 - 80015ac: defe udf #254 ; 0xfe - 80015ae: 2104 movs r1, #4 - Err(_) => handle_alloc_error(layout), - 80015b0: 0020 movs r0, r4 - 80015b2: f005 fa75 bl 8006aa0 - 80015b6: defe udf #254 ; 0xfe - /// ``` - #[inline] - #[track_caller] - #[stable(feature = "option_result_unwrap_unchecked", since = "1.58.0")] - pub unsafe fn unwrap_unchecked(self) -> T { - debug_assert!(self.is_ok()); - 80015b8: 480b ldr r0, [pc, #44] ; (80015e8 ::insert+0x2dc>) - 80015ba: 211e movs r1, #30 - 80015bc: 4a0b ldr r2, [pc, #44] ; (80015ec ::insert+0x2e0>) - 80015be: f007 fd8f bl 80090e0 - 80015c2: defe udf #254 ; 0xfe - 80015c4: 9e3779b9 .word 0x9e3779b9 - 80015c8: 55555555 .word 0x55555555 - 80015cc: 33333333 .word 0x33333333 - 80015d0: 0f0f0f0f .word 0x0f0f0f0f - 80015d4: 01010101 .word 0x01010101 - 80015d8: 0800ac3c .word 0x0800ac3c - 80015dc: 0800ac5c .word 0x0800ac5c - 80015e0: 0800b220 .word 0x0800b220 - 80015e4: 0800b2bc .word 0x0800b2bc - 80015e8: 0800affc .word 0x0800affc - 80015ec: 0800b170 .word 0x0800b170 - 80015f0: 0800b410 .word 0x0800b410 - 80015f4: 0800b3f4 .word 0x0800b3f4 - 80015f8: 0800abb3 .word 0x0800abb3 - 80015fc: 0800abdc .word 0x0800abdc - 8001600: 0800ab30 .word 0x0800ab30 - 8001604: 0800abec .word 0x0800abec - 8001608: 0800ada4 .word 0x0800ada4 - 800160c: 0800adb4 .word 0x0800adb4 - 8001610: 0800add8 .word 0x0800add8 - -08001614 ::insert>: - pub fn insert(&mut self, key: K, value: V) -> Option { - 8001614: b5f0 push {r4, r5, r6, r7, lr} - 8001616: af03 add r7, sp, #12 - 8001618: b097 sub sp, #92 ; 0x5c - 800161a: 001c movs r4, r3 - 800161c: 000e movs r6, r1 - 800161e: 0005 movs r5, r0 - 8001620: 920b str r2, [sp, #44] ; 0x2c - 8001622: 4b9e ldr r3, [pc, #632] ; (800189c ::insert+0x288>) - 8001624: 9208 str r2, [sp, #32] - intrinsics::wrapping_mul(self, rhs) - 8001626: 4353 muls r3, r2 - 8001628: a90b add r1, sp, #44 ; 0x2c - if let Some(location) = self.nodes.location(&key, hash) { - 800162a: 0030 movs r0, r6 - 800162c: 9307 str r3, [sp, #28] - 800162e: 001a movs r2, r3 - 8001630: f001 f850 bl 80026d4 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715> - 8001634: 68bb ldr r3, [r7, #8] - 8001636: 2801 cmp r0, #1 - 8001638: 9409 str r4, [sp, #36] ; 0x24 - 800163a: d126 bne.n 800168a ::insert+0x76> - 800163c: 9306 str r3, [sp, #24] - 800163e: 6830 ldr r0, [r6, #0] - 8001640: 0782 lsls r2, r0, #30 - 8001642: d000 beq.n 8001646 ::insert+0x32> - 8001644: e107 b.n 8001856 ::insert+0x242> - 8001646: 68b3 ldr r3, [r6, #8] - 8001648: 220f movs r2, #15 - 800164a: 0712 lsls r2, r2, #28 - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 800164c: 001c movs r4, r3 - 800164e: 4394 bics r4, r2 - 8001650: 1b1a subs r2, r3, r4 - 8001652: 1e54 subs r4, r2, #1 - 8001654: 41a2 sbcs r2, r4 - 8001656: d000 beq.n 800165a ::insert+0x46> - 8001658: e0fd b.n 8001856 ::insert+0x242> - 800165a: 011a lsls r2, r3, #4 - 800165c: d500 bpl.n 8001660 ::insert+0x4c> - 800165e: e0fa b.n 8001856 ::insert+0x242> - 8001660: 428b cmp r3, r1 - 8001662: 9c09 ldr r4, [sp, #36] ; 0x24 - 8001664: d800 bhi.n 8001668 ::insert+0x54> - 8001666: e0e4 b.n 8001832 ::insert+0x21e> - self.distance_to_initial_bucket >= 0 - 8001668: 0109 lsls r1, r1, #4 - 800166a: 1840 adds r0, r0, r1 - 800166c: 6841 ldr r1, [r0, #4] - if self.has_value() { - 800166e: 2900 cmp r1, #0 - 8001670: d500 bpl.n 8001674 ::insert+0x60> - 8001672: e0f2 b.n 800185a ::insert+0x246> - copy_nonoverlapping(&src as *const T, dst, 1); - 8001674: 9908 ldr r1, [sp, #32] - 8001676: 6081 str r1, [r0, #8] - copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); - 8001678: 68c1 ldr r1, [r0, #12] - copy_nonoverlapping(&src as *const T, dst, 1); - 800167a: 9a06 ldr r2, [sp, #24] - 800167c: 81c2 strh r2, [r0, #14] - 800167e: 8184 strh r4, [r0, #12] - Some(self.nodes.replace_at_location(location, key, value)) - 8001680: 8069 strh r1, [r5, #2] - copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); - 8001682: 0c08 lsrs r0, r1, #16 - 8001684: 80a8 strh r0, [r5, #4] - 8001686: 2001 movs r0, #1 - 8001688: e0ce b.n 8001828 ::insert+0x214> - 800168a: 9505 str r5, [sp, #20] - self.nodes.len() - 800168c: 6930 ldr r0, [r6, #16] - if self.nodes.capacity() <= self.len() { - 800168e: 6971 ldr r1, [r6, #20] - 8001690: 4281 cmp r1, r0 - 8001692: d900 bls.n 8001696 ::insert+0x82> - 8001694: e0bf b.n 8001816 ::insert+0x202> - 8001696: 9604 str r6, [sp, #16] - self.nodes.len() - 8001698: 68b1 ldr r1, [r6, #8] - 800169a: 2000 movs r0, #0 - self.resize(self.nodes.backing_vec_size() * 2); - 800169c: 184c adds r4, r1, r1 - 800169e: 900a str r0, [sp, #40] ; 0x28 - 80016a0: 4140 adcs r0, r0 - 80016a2: 428c cmp r4, r1 - 80016a4: d200 bcs.n 80016a8 ::insert+0x94> - 80016a6: e0ca b.n 800183e ::insert+0x22a> - assert!( - 80016a8: 42a1 cmp r1, r4 - 80016aa: d900 bls.n 80016ae ::insert+0x9a> - 80016ac: e0db b.n 8001866 ::insert+0x252> - 80016ae: 9e04 ldr r6, [sp, #16] - 80016b0: d100 bne.n 80016b4 ::insert+0xa0> - 80016b2: e0b0 b.n 8001816 ::insert+0x202> - 80016b4: 9103 str r1, [sp, #12] - intrinsics::ctpop(self as $ActualT) as u32 - 80016b6: 0860 lsrs r0, r4, #1 - 80016b8: 4979 ldr r1, [pc, #484] ; (80018a0 ::insert+0x28c>) - 80016ba: 4001 ands r1, r0 - 80016bc: 1a60 subs r0, r4, r1 - 80016be: 4979 ldr r1, [pc, #484] ; (80018a4 ::insert+0x290>) - 80016c0: 0882 lsrs r2, r0, #2 - 80016c2: 4008 ands r0, r1 - 80016c4: 400a ands r2, r1 - 80016c6: 1880 adds r0, r0, r2 - 80016c8: 0901 lsrs r1, r0, #4 - 80016ca: 1840 adds r0, r0, r1 - 80016cc: 4976 ldr r1, [pc, #472] ; (80018a8 ::insert+0x294>) - 80016ce: 4001 ands r1, r0 - 80016d0: 4876 ldr r0, [pc, #472] ; (80018ac ::insert+0x298>) - 80016d2: 4348 muls r0, r1 - 80016d4: 0e00 lsrs r0, r0, #24 - assert!(capacity.is_power_of_two(), "Capacity must be a power of 2"); - 80016d6: 2801 cmp r0, #1 - 80016d8: d000 beq.n 80016dc ::insert+0xc8> - 80016da: e0cd b.n 8001878 ::insert+0x264> - if mem::size_of::() == 0 || capacity == 0 { - 80016dc: 2c00 cmp r4, #0 - 80016de: 9306 str r3, [sp, #24] - 80016e0: 9402 str r4, [sp, #8] - 80016e2: d036 beq.n 8001752 ::insert+0x13e> - 80016e4: 200f movs r0, #15 - 80016e6: 0700 lsls r0, r0, #28 - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 80016e8: 0021 movs r1, r4 - 80016ea: 4381 bics r1, r0 - 80016ec: 1a60 subs r0, r4, r1 - 80016ee: 1e41 subs r1, r0, #1 - 80016f0: 4188 sbcs r0, r1 - 80016f2: d000 beq.n 80016f6 ::insert+0xe2> - 80016f4: e0bd b.n 8001872 ::insert+0x25e> - 80016f6: 0124 lsls r4, r4, #4 - 80016f8: d500 bpl.n 80016fc ::insert+0xe8> - 80016fa: e0ba b.n 8001872 ::insert+0x25e> - 80016fc: 2104 movs r1, #4 - unsafe { __rust_alloc(layout.size(), layout.align()) } - 80016fe: 0020 movs r0, r4 - 8001700: f7ff f826 bl 8000750 <__rust_alloc> - let ptr = NonNull::new(raw_ptr).ok_or(AllocError)?; - 8001704: 2800 cmp r0, #0 - 8001706: d100 bne.n 800170a ::insert+0xf6> - 8001708: e0bc b.n 8001884 ::insert+0x270> - 800170a: 9a0a ldr r2, [sp, #40] ; 0x28 - 800170c: 43d1 mvns r1, r2 - copy_nonoverlapping(&src as *const T, dst, 1); - 800170e: 6002 str r2, [r0, #0] - 8001710: 6041 str r1, [r0, #4] - Vec { buf: RawVec::with_capacity_in(capacity, alloc), len: 0 } - 8001712: 9a02 ldr r2, [sp, #8] - 8001714: 920d str r2, [sp, #52] ; 0x34 - 8001716: 900c str r0, [sp, #48] ; 0x30 - 8001718: 1e4a subs r2, r1, #1 - 800171a: 9b03 ldr r3, [sp, #12] - 800171c: 435a muls r2, r3 - 800171e: 3014 adds r0, #20 - 8001720: 2301 movs r3, #1 - 8001722: 1c52 adds r2, r2, #1 - 8001724: d213 bcs.n 800174e ::insert+0x13a> - 8001726: 0004 movs r4, r0 - 8001728: 3410 adds r4, #16 - 800172a: 6001 str r1, [r0, #0] - 800172c: 1f00 subs r0, r0, #4 - 800172e: 9e0a ldr r6, [sp, #40] ; 0x28 - 8001730: 6006 str r6, [r0, #0] - self.local_len += increment; - 8001732: 1c5d adds r5, r3, #1 - 8001734: 4176 adcs r6, r6 - 8001736: 429d cmp r5, r3 - 8001738: b410 push {r4} - 800173a: bc01 pop {r0} - 800173c: b420 push {r5} - 800173e: bc08 pop {r3} - 8001740: d2ef bcs.n 8001722 ::insert+0x10e> - 8001742: 485d ldr r0, [pc, #372] ; (80018b8 ::insert+0x2a4>) - 8001744: 211c movs r1, #28 - 8001746: 4a5d ldr r2, [pc, #372] ; (80018bc ::insert+0x2a8>) - 8001748: f007 fcca bl 80090e0 - 800174c: defe udf #254 ; 0xfe - *self.len = self.local_len; - 800174e: 930e str r3, [sp, #56] ; 0x38 - 8001750: e004 b.n 800175c ::insert+0x148> - 8001752: 980a ldr r0, [sp, #40] ; 0x28 - 8001754: 900e str r0, [sp, #56] ; 0x38 - 8001756: 900d str r0, [sp, #52] ; 0x34 - 8001758: 2004 movs r0, #4 - 800175a: 900c str r0, [sp, #48] ; 0x30 - 800175c: 2255 movs r2, #85 ; 0x55 - 800175e: 2500 movs r5, #0 - capacity * 85 / 100 - 8001760: 9802 ldr r0, [sp, #8] - 8001762: 0029 movs r1, r5 - 8001764: 002b movs r3, r5 - 8001766: f007 fd5f bl 8009228 <__aeabi_lmul> - 800176a: 1e4a subs r2, r1, #1 - 800176c: 4191 sbcs r1, r2 - 800176e: 2901 cmp r1, #1 - 8001770: d06b beq.n 800184a ::insert+0x236> - 8001772: 9c04 ldr r4, [sp, #16] - self.len = new_len; - 8001774: 60a5 str r5, [r4, #8] - Self { - 8001776: 9510 str r5, [sp, #64] ; 0x40 - 8001778: 950a str r5, [sp, #40] ; 0x28 - 800177a: 950f str r5, [sp, #60] ; 0x3c - 800177c: 2164 movs r1, #100 ; 0x64 - capacity * 85 / 100 - 800177e: f007 fd7d bl 800927c <__aeabi_uidiv> - Self { - 8001782: 9011 str r0, [sp, #68] ; 0x44 - let ptr = self.buf.ptr(); - 8001784: 6820 ldr r0, [r4, #0] - 8001786: 0781 lsls r1, r0, #30 - 8001788: 9a03 ldr r2, [sp, #12] - 800178a: d164 bne.n 8001856 ::insert+0x242> - 800178c: 210f movs r1, #15 - 800178e: 070d lsls r5, r1, #28 - 8001790: 0011 movs r1, r2 - 8001792: 43a9 bics r1, r5 - 8001794: 1a51 subs r1, r2, r1 - 8001796: 1e4a subs r2, r1, #1 - 8001798: 4191 sbcs r1, r2 - 800179a: 9903 ldr r1, [sp, #12] - 800179c: d15b bne.n 8001856 ::insert+0x242> - 800179e: 010e lsls r6, r1, #4 - 80017a0: d459 bmi.n 8001856 ::insert+0x242> - 80017a2: 0023 movs r3, r4 - for mut node in self.nodes.drain(..) { - 80017a4: 9416 str r4, [sp, #88] ; 0x58 - 80017a6: 9a0a ldr r2, [sp, #40] ; 0x28 - 80017a8: 9213 str r2, [sp, #76] ; 0x4c - 80017aa: 9014 str r0, [sp, #80] ; 0x50 - 80017ac: 9112 str r1, [sp, #72] ; 0x48 - 80017ae: 0109 lsls r1, r1, #4 - 80017b0: 1842 adds r2, r0, r1 - 80017b2: 9215 str r2, [sp, #84] ; 0x54 - if is_empty!(self) { - 80017b4: 2900 cmp r1, #0 - 80017b6: d013 beq.n 80017e0 ::insert+0x1cc> - #[stable(feature = "nonnull", since = "1.25.0")] - #[rustc_const_stable(feature = "const_nonnull_new_unchecked", since = "1.25.0")] - #[inline] - pub const unsafe fn new_unchecked(ptr: *mut T) -> Self { - // SAFETY: the caller must guarantee that `ptr` is non-null. - unsafe { NonNull { pointer: ptr as _ } } - 80017b8: 0004 movs r4, r0 - 80017ba: e003 b.n 80017c4 ::insert+0x1b0> - 80017bc: 3e10 subs r6, #16 - 80017be: b410 push {r4} - 80017c0: bc01 pop {r0} - 80017c2: d00d beq.n 80017e0 ::insert+0x1cc> - 80017c4: 3410 adds r4, #16 - self.ptr = unsafe { NonNull::new_unchecked(self.ptr.as_ptr().offset(offset)) }; - 80017c6: 9414 str r4, [sp, #80] ; 0x50 - tmp.assume_init() - 80017c8: 6841 ldr r1, [r0, #4] - if self.has_value() { - 80017ca: 2900 cmp r1, #0 - 80017cc: d4f6 bmi.n 80017bc ::insert+0x1a8> - 80017ce: 6881 ldr r1, [r0, #8] - 80017d0: 68c2 ldr r2, [r0, #12] - 80017d2: 6800 ldr r0, [r0, #0] - new_node_storage.insert_new(key, value, hash); - 80017d4: 9000 str r0, [sp, #0] - copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); - 80017d6: 0c13 lsrs r3, r2, #16 - 80017d8: a80c add r0, sp, #48 ; 0x30 - 80017da: f000 fd77 bl 80022cc ::insert_new> - 80017de: e7ed b.n 80017bc ::insert+0x1a8> - 80017e0: a812 add r0, sp, #72 ; 0x48 - for mut node in self.nodes.drain(..) { - 80017e2: f004 fcc3 bl 800616c >>> - 80017e6: 9e04 ldr r6, [sp, #16] - if mem::size_of::() == 0 || self.cap == 0 { - 80017e8: 6870 ldr r0, [r6, #4] - 80017ea: 2800 cmp r0, #0 - 80017ec: d00c beq.n 8001808 ::insert+0x1f4> - 80017ee: 0001 movs r1, r0 - 80017f0: 43a9 bics r1, r5 - 80017f2: 1a41 subs r1, r0, r1 - 80017f4: 1e4a subs r2, r1, #1 - 80017f6: 4191 sbcs r1, r2 - 80017f8: 2901 cmp r1, #1 - 80017fa: d048 beq.n 800188e ::insert+0x27a> - 80017fc: 0101 lsls r1, r0, #4 - Some((self.ptr.cast().into(), layout)) - 80017fe: 6830 ldr r0, [r6, #0] - 8001800: 2204 movs r2, #4 - unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } - 8001802: f7fe ffac bl 800075e <__rust_dealloc> - 8001806: 9e04 ldr r6, [sp, #16] - 8001808: a80c add r0, sp, #48 ; 0x30 - self.nodes = self.nodes.resized_to(new_size); - 800180a: 0031 movs r1, r6 - 800180c: c81c ldmia r0!, {r2, r3, r4} - 800180e: c11c stmia r1!, {r2, r3, r4} - 8001810: c81c ldmia r0!, {r2, r3, r4} - 8001812: c11c stmia r1!, {r2, r3, r4} - 8001814: 9b06 ldr r3, [sp, #24] - self.nodes.insert_new(key, value, hash); - 8001816: 9807 ldr r0, [sp, #28] - 8001818: 9000 str r0, [sp, #0] - 800181a: 0030 movs r0, r6 - 800181c: 9908 ldr r1, [sp, #32] - 800181e: 9a09 ldr r2, [sp, #36] ; 0x24 - 8001820: f000 fd54 bl 80022cc ::insert_new> - 8001824: 2000 movs r0, #0 - 8001826: 9d05 ldr r5, [sp, #20] - 8001828: 8028 strh r0, [r5, #0] - } - 800182a: b017 add sp, #92 ; 0x5c - 800182c: bcf0 pop {r4, r5, r6, r7} - 800182e: bc01 pop {r0} - 8001830: 4700 bx r0 - 8001832: 4a2b ldr r2, [pc, #172] ; (80018e0 ::insert+0x2cc>) - 8001834: 0008 movs r0, r1 - 8001836: 0019 movs r1, r3 - 8001838: f007 fc68 bl 800910c - 800183c: defe udf #254 ; 0xfe - self.resize(self.nodes.backing_vec_size() * 2); - 800183e: 4826 ldr r0, [pc, #152] ; (80018d8 ::insert+0x2c4>) - 8001840: 2121 movs r1, #33 ; 0x21 - 8001842: 4a26 ldr r2, [pc, #152] ; (80018dc ::insert+0x2c8>) - 8001844: f007 fc4c bl 80090e0 - 8001848: defe udf #254 ; 0xfe - capacity * 85 / 100 - 800184a: 481f ldr r0, [pc, #124] ; (80018c8 ::insert+0x2b4>) - 800184c: 2121 movs r1, #33 ; 0x21 - 800184e: 4a1f ldr r2, [pc, #124] ; (80018cc ::insert+0x2b8>) - 8001850: f007 fc46 bl 80090e0 - 8001854: defe udf #254 ; 0xfe - 8001856: defe udf #254 ; 0xfe - 8001858: defe udf #254 ; 0xfe - panic!("Cannot replace an uninitialised node"); - 800185a: 4822 ldr r0, [pc, #136] ; (80018e4 ::insert+0x2d0>) - 800185c: 2124 movs r1, #36 ; 0x24 - 800185e: 4a22 ldr r2, [pc, #136] ; (80018e8 ::insert+0x2d4>) - 8001860: f007 fc3e bl 80090e0 - 8001864: defe udf #254 ; 0xfe - assert!( - 8001866: 481a ldr r0, [pc, #104] ; (80018d0 ::insert+0x2bc>) - 8001868: 2128 movs r1, #40 ; 0x28 - 800186a: 4a1a ldr r2, [pc, #104] ; (80018d4 ::insert+0x2c0>) - 800186c: f007 fc38 bl 80090e0 - 8001870: defe udf #254 ; 0xfe - 8001872: f005 f8d3 bl 8006a1c - 8001876: defe udf #254 ; 0xfe - assert!(capacity.is_power_of_two(), "Capacity must be a power of 2"); - 8001878: 480d ldr r0, [pc, #52] ; (80018b0 ::insert+0x29c>) - 800187a: 211d movs r1, #29 - 800187c: 4a0d ldr r2, [pc, #52] ; (80018b4 ::insert+0x2a0>) - 800187e: f007 fc2f bl 80090e0 - 8001882: defe udf #254 ; 0xfe - 8001884: 2104 movs r1, #4 - Err(_) => handle_alloc_error(layout), - 8001886: 0020 movs r0, r4 - 8001888: f005 f90a bl 8006aa0 - 800188c: defe udf #254 ; 0xfe - 800188e: 480c ldr r0, [pc, #48] ; (80018c0 ::insert+0x2ac>) - 8001890: 211e movs r1, #30 - 8001892: 4a0c ldr r2, [pc, #48] ; (80018c4 ::insert+0x2b0>) - 8001894: f007 fc24 bl 80090e0 - 8001898: defe udf #254 ; 0xfe - 800189a: 46c0 nop ; (mov r8, r8) - 800189c: 9e3779b9 .word 0x9e3779b9 - 80018a0: 55555555 .word 0x55555555 - 80018a4: 33333333 .word 0x33333333 - 80018a8: 0f0f0f0f .word 0x0f0f0f0f - 80018ac: 01010101 .word 0x01010101 - 80018b0: 0800ac3c .word 0x0800ac3c - 80018b4: 0800ac5c .word 0x0800ac5c - 80018b8: 0800b220 .word 0x0800b220 - 80018bc: 0800b2bc .word 0x0800b2bc - 80018c0: 0800affc .word 0x0800affc - 80018c4: 0800b170 .word 0x0800b170 - 80018c8: 0800b410 .word 0x0800b410 - 80018cc: 0800b3f4 .word 0x0800b3f4 - 80018d0: 0800abb3 .word 0x0800abb3 - 80018d4: 0800abdc .word 0x0800abdc - 80018d8: 0800ab30 .word 0x0800ab30 - 80018dc: 0800abec .word 0x0800abec - 80018e0: 0800ada4 .word 0x0800ada4 - 80018e4: 0800adb4 .word 0x0800adb4 - 80018e8: 0800add8 .word 0x0800add8 - -080018ec ::insert>: - pub fn insert(&mut self, key: K, value: V) -> Option { - 80018ec: b5f0 push {r4, r5, r6, r7, lr} - 80018ee: af03 add r7, sp, #12 - 80018f0: b097 sub sp, #92 ; 0x5c - 80018f2: 001c movs r4, r3 - 80018f4: 000e movs r6, r1 - 80018f6: 0005 movs r5, r0 - 80018f8: 920b str r2, [sp, #44] ; 0x2c - 80018fa: 4b9e ldr r3, [pc, #632] ; (8001b74 ::insert+0x288>) - 80018fc: 9208 str r2, [sp, #32] - intrinsics::wrapping_mul(self, rhs) - 80018fe: 4353 muls r3, r2 - 8001900: a90b add r1, sp, #44 ; 0x2c - if let Some(location) = self.nodes.location(&key, hash) { - 8001902: 0030 movs r0, r6 - 8001904: 9307 str r3, [sp, #28] - 8001906: 001a movs r2, r3 - 8001908: f000 fee4 bl 80026d4 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715> - 800190c: 68bb ldr r3, [r7, #8] - 800190e: 2801 cmp r0, #1 - 8001910: 9409 str r4, [sp, #36] ; 0x24 - 8001912: d126 bne.n 8001962 ::insert+0x76> - 8001914: 9306 str r3, [sp, #24] - 8001916: 6830 ldr r0, [r6, #0] - 8001918: 0782 lsls r2, r0, #30 - 800191a: d000 beq.n 800191e ::insert+0x32> - 800191c: e107 b.n 8001b2e ::insert+0x242> - 800191e: 68b3 ldr r3, [r6, #8] - 8001920: 220f movs r2, #15 - 8001922: 0712 lsls r2, r2, #28 - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 8001924: 001c movs r4, r3 - 8001926: 4394 bics r4, r2 - 8001928: 1b1a subs r2, r3, r4 - 800192a: 1e54 subs r4, r2, #1 - 800192c: 41a2 sbcs r2, r4 - 800192e: d000 beq.n 8001932 ::insert+0x46> - 8001930: e0fd b.n 8001b2e ::insert+0x242> - 8001932: 011a lsls r2, r3, #4 - 8001934: d500 bpl.n 8001938 ::insert+0x4c> - 8001936: e0fa b.n 8001b2e ::insert+0x242> - 8001938: 428b cmp r3, r1 - 800193a: 9c09 ldr r4, [sp, #36] ; 0x24 - 800193c: d800 bhi.n 8001940 ::insert+0x54> - 800193e: e0e4 b.n 8001b0a ::insert+0x21e> - self.distance_to_initial_bucket >= 0 - 8001940: 0109 lsls r1, r1, #4 - 8001942: 1840 adds r0, r0, r1 - 8001944: 6841 ldr r1, [r0, #4] - if self.has_value() { - 8001946: 2900 cmp r1, #0 - 8001948: d500 bpl.n 800194c ::insert+0x60> - 800194a: e0f2 b.n 8001b32 ::insert+0x246> - copy_nonoverlapping(&src as *const T, dst, 1); - 800194c: 9908 ldr r1, [sp, #32] - 800194e: 6081 str r1, [r0, #8] - copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); - 8001950: 68c1 ldr r1, [r0, #12] - copy_nonoverlapping(&src as *const T, dst, 1); - 8001952: 9a06 ldr r2, [sp, #24] - 8001954: 81c2 strh r2, [r0, #14] - 8001956: 8184 strh r4, [r0, #12] - Some(self.nodes.replace_at_location(location, key, value)) - 8001958: 8069 strh r1, [r5, #2] - copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); - 800195a: 0c08 lsrs r0, r1, #16 - 800195c: 80a8 strh r0, [r5, #4] - 800195e: 2001 movs r0, #1 - 8001960: e0ce b.n 8001b00 ::insert+0x214> - 8001962: 9505 str r5, [sp, #20] - self.nodes.len() - 8001964: 6930 ldr r0, [r6, #16] - if self.nodes.capacity() <= self.len() { - 8001966: 6971 ldr r1, [r6, #20] - 8001968: 4281 cmp r1, r0 - 800196a: d900 bls.n 800196e ::insert+0x82> - 800196c: e0bf b.n 8001aee ::insert+0x202> - 800196e: 9604 str r6, [sp, #16] - self.nodes.len() - 8001970: 68b1 ldr r1, [r6, #8] - 8001972: 2000 movs r0, #0 - self.resize(self.nodes.backing_vec_size() * 2); - 8001974: 184c adds r4, r1, r1 - 8001976: 900a str r0, [sp, #40] ; 0x28 - 8001978: 4140 adcs r0, r0 - 800197a: 428c cmp r4, r1 - 800197c: d200 bcs.n 8001980 ::insert+0x94> - 800197e: e0ca b.n 8001b16 ::insert+0x22a> - assert!( - 8001980: 42a1 cmp r1, r4 - 8001982: d900 bls.n 8001986 ::insert+0x9a> - 8001984: e0db b.n 8001b3e ::insert+0x252> - 8001986: 9e04 ldr r6, [sp, #16] - 8001988: d100 bne.n 800198c ::insert+0xa0> - 800198a: e0b0 b.n 8001aee ::insert+0x202> - 800198c: 9103 str r1, [sp, #12] - intrinsics::ctpop(self as $ActualT) as u32 - 800198e: 0860 lsrs r0, r4, #1 - 8001990: 4979 ldr r1, [pc, #484] ; (8001b78 ::insert+0x28c>) - 8001992: 4001 ands r1, r0 - 8001994: 1a60 subs r0, r4, r1 - 8001996: 4979 ldr r1, [pc, #484] ; (8001b7c ::insert+0x290>) - 8001998: 0882 lsrs r2, r0, #2 - 800199a: 4008 ands r0, r1 - 800199c: 400a ands r2, r1 - 800199e: 1880 adds r0, r0, r2 - 80019a0: 0901 lsrs r1, r0, #4 - 80019a2: 1840 adds r0, r0, r1 - 80019a4: 4976 ldr r1, [pc, #472] ; (8001b80 ::insert+0x294>) - 80019a6: 4001 ands r1, r0 - 80019a8: 4876 ldr r0, [pc, #472] ; (8001b84 ::insert+0x298>) - 80019aa: 4348 muls r0, r1 - 80019ac: 0e00 lsrs r0, r0, #24 - assert!(capacity.is_power_of_two(), "Capacity must be a power of 2"); - 80019ae: 2801 cmp r0, #1 - 80019b0: d000 beq.n 80019b4 ::insert+0xc8> - 80019b2: e0cd b.n 8001b50 ::insert+0x264> - if mem::size_of::() == 0 || capacity == 0 { - 80019b4: 2c00 cmp r4, #0 - 80019b6: 9306 str r3, [sp, #24] - 80019b8: 9402 str r4, [sp, #8] - 80019ba: d036 beq.n 8001a2a ::insert+0x13e> - 80019bc: 200f movs r0, #15 - 80019be: 0700 lsls r0, r0, #28 - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 80019c0: 0021 movs r1, r4 - 80019c2: 4381 bics r1, r0 - 80019c4: 1a60 subs r0, r4, r1 - 80019c6: 1e41 subs r1, r0, #1 - 80019c8: 4188 sbcs r0, r1 - 80019ca: d000 beq.n 80019ce ::insert+0xe2> - 80019cc: e0bd b.n 8001b4a ::insert+0x25e> - 80019ce: 0124 lsls r4, r4, #4 - 80019d0: d500 bpl.n 80019d4 ::insert+0xe8> - 80019d2: e0ba b.n 8001b4a ::insert+0x25e> - 80019d4: 2104 movs r1, #4 - unsafe { __rust_alloc(layout.size(), layout.align()) } - 80019d6: 0020 movs r0, r4 - 80019d8: f7fe feba bl 8000750 <__rust_alloc> - let ptr = NonNull::new(raw_ptr).ok_or(AllocError)?; - 80019dc: 2800 cmp r0, #0 - 80019de: d100 bne.n 80019e2 ::insert+0xf6> - 80019e0: e0bc b.n 8001b5c ::insert+0x270> - 80019e2: 9a0a ldr r2, [sp, #40] ; 0x28 - 80019e4: 43d1 mvns r1, r2 - copy_nonoverlapping(&src as *const T, dst, 1); - 80019e6: 6002 str r2, [r0, #0] - 80019e8: 6041 str r1, [r0, #4] - Vec { buf: RawVec::with_capacity_in(capacity, alloc), len: 0 } - 80019ea: 9a02 ldr r2, [sp, #8] - 80019ec: 920d str r2, [sp, #52] ; 0x34 - 80019ee: 900c str r0, [sp, #48] ; 0x30 - 80019f0: 1e4a subs r2, r1, #1 - 80019f2: 9b03 ldr r3, [sp, #12] - 80019f4: 435a muls r2, r3 - 80019f6: 3014 adds r0, #20 - 80019f8: 2301 movs r3, #1 - 80019fa: 1c52 adds r2, r2, #1 - 80019fc: d213 bcs.n 8001a26 ::insert+0x13a> - 80019fe: 0004 movs r4, r0 - 8001a00: 3410 adds r4, #16 - 8001a02: 6001 str r1, [r0, #0] - 8001a04: 1f00 subs r0, r0, #4 - 8001a06: 9e0a ldr r6, [sp, #40] ; 0x28 - 8001a08: 6006 str r6, [r0, #0] - self.local_len += increment; - 8001a0a: 1c5d adds r5, r3, #1 - 8001a0c: 4176 adcs r6, r6 - 8001a0e: 429d cmp r5, r3 - 8001a10: b410 push {r4} - 8001a12: bc01 pop {r0} - 8001a14: b420 push {r5} - 8001a16: bc08 pop {r3} - 8001a18: d2ef bcs.n 80019fa ::insert+0x10e> - 8001a1a: 485d ldr r0, [pc, #372] ; (8001b90 ::insert+0x2a4>) - 8001a1c: 211c movs r1, #28 - 8001a1e: 4a5d ldr r2, [pc, #372] ; (8001b94 ::insert+0x2a8>) - 8001a20: f007 fb5e bl 80090e0 - 8001a24: defe udf #254 ; 0xfe - *self.len = self.local_len; - 8001a26: 930e str r3, [sp, #56] ; 0x38 - 8001a28: e004 b.n 8001a34 ::insert+0x148> - 8001a2a: 980a ldr r0, [sp, #40] ; 0x28 - 8001a2c: 900e str r0, [sp, #56] ; 0x38 - 8001a2e: 900d str r0, [sp, #52] ; 0x34 - 8001a30: 2004 movs r0, #4 - 8001a32: 900c str r0, [sp, #48] ; 0x30 - 8001a34: 2255 movs r2, #85 ; 0x55 - 8001a36: 2500 movs r5, #0 - capacity * 85 / 100 - 8001a38: 9802 ldr r0, [sp, #8] - 8001a3a: 0029 movs r1, r5 - 8001a3c: 002b movs r3, r5 - 8001a3e: f007 fbf3 bl 8009228 <__aeabi_lmul> - 8001a42: 1e4a subs r2, r1, #1 - 8001a44: 4191 sbcs r1, r2 - 8001a46: 2901 cmp r1, #1 - 8001a48: d06b beq.n 8001b22 ::insert+0x236> - 8001a4a: 9c04 ldr r4, [sp, #16] - self.len = new_len; - 8001a4c: 60a5 str r5, [r4, #8] - Self { - 8001a4e: 9510 str r5, [sp, #64] ; 0x40 - 8001a50: 950a str r5, [sp, #40] ; 0x28 - 8001a52: 950f str r5, [sp, #60] ; 0x3c - 8001a54: 2164 movs r1, #100 ; 0x64 - capacity * 85 / 100 - 8001a56: f007 fc11 bl 800927c <__aeabi_uidiv> - Self { - 8001a5a: 9011 str r0, [sp, #68] ; 0x44 - let ptr = self.buf.ptr(); - 8001a5c: 6820 ldr r0, [r4, #0] - 8001a5e: 0781 lsls r1, r0, #30 - 8001a60: 9a03 ldr r2, [sp, #12] - 8001a62: d164 bne.n 8001b2e ::insert+0x242> - 8001a64: 210f movs r1, #15 - 8001a66: 070d lsls r5, r1, #28 - 8001a68: 0011 movs r1, r2 - 8001a6a: 43a9 bics r1, r5 - 8001a6c: 1a51 subs r1, r2, r1 - 8001a6e: 1e4a subs r2, r1, #1 - 8001a70: 4191 sbcs r1, r2 - 8001a72: 9903 ldr r1, [sp, #12] - 8001a74: d15b bne.n 8001b2e ::insert+0x242> - 8001a76: 010e lsls r6, r1, #4 - 8001a78: d459 bmi.n 8001b2e ::insert+0x242> - 8001a7a: 0023 movs r3, r4 - for mut node in self.nodes.drain(..) { - 8001a7c: 9416 str r4, [sp, #88] ; 0x58 - 8001a7e: 9a0a ldr r2, [sp, #40] ; 0x28 - 8001a80: 9213 str r2, [sp, #76] ; 0x4c - 8001a82: 9014 str r0, [sp, #80] ; 0x50 - 8001a84: 9112 str r1, [sp, #72] ; 0x48 - 8001a86: 0109 lsls r1, r1, #4 - 8001a88: 1842 adds r2, r0, r1 - 8001a8a: 9215 str r2, [sp, #84] ; 0x54 - if is_empty!(self) { - 8001a8c: 2900 cmp r1, #0 - 8001a8e: d013 beq.n 8001ab8 ::insert+0x1cc> - 8001a90: 0004 movs r4, r0 - 8001a92: e003 b.n 8001a9c ::insert+0x1b0> - 8001a94: 3e10 subs r6, #16 - 8001a96: b410 push {r4} - 8001a98: bc01 pop {r0} - 8001a9a: d00d beq.n 8001ab8 ::insert+0x1cc> - 8001a9c: 3410 adds r4, #16 - self.ptr = unsafe { NonNull::new_unchecked(self.ptr.as_ptr().offset(offset)) }; - 8001a9e: 9414 str r4, [sp, #80] ; 0x50 - tmp.assume_init() - 8001aa0: 6841 ldr r1, [r0, #4] - if self.has_value() { - 8001aa2: 2900 cmp r1, #0 - 8001aa4: d4f6 bmi.n 8001a94 ::insert+0x1a8> - 8001aa6: 6881 ldr r1, [r0, #8] - 8001aa8: 68c2 ldr r2, [r0, #12] - 8001aaa: 6800 ldr r0, [r0, #0] - new_node_storage.insert_new(key, value, hash); - 8001aac: 9000 str r0, [sp, #0] - copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); - 8001aae: 0c13 lsrs r3, r2, #16 - 8001ab0: a80c add r0, sp, #48 ; 0x30 - 8001ab2: f000 fc0b bl 80022cc ::insert_new> - 8001ab6: e7ed b.n 8001a94 ::insert+0x1a8> - 8001ab8: a812 add r0, sp, #72 ; 0x48 - for mut node in self.nodes.drain(..) { - 8001aba: f004 fbc5 bl 8006248 >>> - 8001abe: 9e04 ldr r6, [sp, #16] - if mem::size_of::() == 0 || self.cap == 0 { - 8001ac0: 6870 ldr r0, [r6, #4] - 8001ac2: 2800 cmp r0, #0 - 8001ac4: d00c beq.n 8001ae0 ::insert+0x1f4> - 8001ac6: 0001 movs r1, r0 - 8001ac8: 43a9 bics r1, r5 - 8001aca: 1a41 subs r1, r0, r1 - 8001acc: 1e4a subs r2, r1, #1 - 8001ace: 4191 sbcs r1, r2 - 8001ad0: 2901 cmp r1, #1 - 8001ad2: d048 beq.n 8001b66 ::insert+0x27a> - 8001ad4: 0101 lsls r1, r0, #4 - Some((self.ptr.cast().into(), layout)) - 8001ad6: 6830 ldr r0, [r6, #0] - 8001ad8: 2204 movs r2, #4 - unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } - 8001ada: f7fe fe40 bl 800075e <__rust_dealloc> - 8001ade: 9e04 ldr r6, [sp, #16] - 8001ae0: a80c add r0, sp, #48 ; 0x30 - self.nodes = self.nodes.resized_to(new_size); - 8001ae2: 0031 movs r1, r6 - 8001ae4: c81c ldmia r0!, {r2, r3, r4} - 8001ae6: c11c stmia r1!, {r2, r3, r4} - 8001ae8: c81c ldmia r0!, {r2, r3, r4} - 8001aea: c11c stmia r1!, {r2, r3, r4} - 8001aec: 9b06 ldr r3, [sp, #24] - self.nodes.insert_new(key, value, hash); - 8001aee: 9807 ldr r0, [sp, #28] - 8001af0: 9000 str r0, [sp, #0] - 8001af2: 0030 movs r0, r6 - 8001af4: 9908 ldr r1, [sp, #32] - 8001af6: 9a09 ldr r2, [sp, #36] ; 0x24 - 8001af8: f000 fbe8 bl 80022cc ::insert_new> - 8001afc: 2000 movs r0, #0 - 8001afe: 9d05 ldr r5, [sp, #20] - 8001b00: 8028 strh r0, [r5, #0] - } - 8001b02: b017 add sp, #92 ; 0x5c - 8001b04: bcf0 pop {r4, r5, r6, r7} - 8001b06: bc01 pop {r0} - 8001b08: 4700 bx r0 - 8001b0a: 4a2b ldr r2, [pc, #172] ; (8001bb8 ::insert+0x2cc>) - 8001b0c: 0008 movs r0, r1 - 8001b0e: 0019 movs r1, r3 - 8001b10: f007 fafc bl 800910c - 8001b14: defe udf #254 ; 0xfe - self.resize(self.nodes.backing_vec_size() * 2); - 8001b16: 4826 ldr r0, [pc, #152] ; (8001bb0 ::insert+0x2c4>) - 8001b18: 2121 movs r1, #33 ; 0x21 - 8001b1a: 4a26 ldr r2, [pc, #152] ; (8001bb4 ::insert+0x2c8>) - 8001b1c: f007 fae0 bl 80090e0 - 8001b20: defe udf #254 ; 0xfe - capacity * 85 / 100 - 8001b22: 481f ldr r0, [pc, #124] ; (8001ba0 ::insert+0x2b4>) - 8001b24: 2121 movs r1, #33 ; 0x21 - 8001b26: 4a1f ldr r2, [pc, #124] ; (8001ba4 ::insert+0x2b8>) - 8001b28: f007 fada bl 80090e0 - 8001b2c: defe udf #254 ; 0xfe - 8001b2e: defe udf #254 ; 0xfe - 8001b30: defe udf #254 ; 0xfe - panic!("Cannot replace an uninitialised node"); - 8001b32: 4822 ldr r0, [pc, #136] ; (8001bbc ::insert+0x2d0>) - 8001b34: 2124 movs r1, #36 ; 0x24 - 8001b36: 4a22 ldr r2, [pc, #136] ; (8001bc0 ::insert+0x2d4>) - 8001b38: f007 fad2 bl 80090e0 - 8001b3c: defe udf #254 ; 0xfe - assert!( - 8001b3e: 481a ldr r0, [pc, #104] ; (8001ba8 ::insert+0x2bc>) - 8001b40: 2128 movs r1, #40 ; 0x28 - 8001b42: 4a1a ldr r2, [pc, #104] ; (8001bac ::insert+0x2c0>) - 8001b44: f007 facc bl 80090e0 - 8001b48: defe udf #254 ; 0xfe - 8001b4a: f004 ff67 bl 8006a1c - 8001b4e: defe udf #254 ; 0xfe - assert!(capacity.is_power_of_two(), "Capacity must be a power of 2"); - 8001b50: 480d ldr r0, [pc, #52] ; (8001b88 ::insert+0x29c>) - 8001b52: 211d movs r1, #29 - 8001b54: 4a0d ldr r2, [pc, #52] ; (8001b8c ::insert+0x2a0>) - 8001b56: f007 fac3 bl 80090e0 - 8001b5a: defe udf #254 ; 0xfe - 8001b5c: 2104 movs r1, #4 - Err(_) => handle_alloc_error(layout), - 8001b5e: 0020 movs r0, r4 - 8001b60: f004 ff9e bl 8006aa0 - 8001b64: defe udf #254 ; 0xfe - 8001b66: 480c ldr r0, [pc, #48] ; (8001b98 ::insert+0x2ac>) - 8001b68: 211e movs r1, #30 - 8001b6a: 4a0c ldr r2, [pc, #48] ; (8001b9c ::insert+0x2b0>) - 8001b6c: f007 fab8 bl 80090e0 - 8001b70: defe udf #254 ; 0xfe - 8001b72: 46c0 nop ; (mov r8, r8) - 8001b74: 9e3779b9 .word 0x9e3779b9 - 8001b78: 55555555 .word 0x55555555 - 8001b7c: 33333333 .word 0x33333333 - 8001b80: 0f0f0f0f .word 0x0f0f0f0f - 8001b84: 01010101 .word 0x01010101 - 8001b88: 0800ac3c .word 0x0800ac3c - 8001b8c: 0800ac5c .word 0x0800ac5c - 8001b90: 0800b220 .word 0x0800b220 - 8001b94: 0800b2bc .word 0x0800b2bc - 8001b98: 0800affc .word 0x0800affc - 8001b9c: 0800b170 .word 0x0800b170 - 8001ba0: 0800b410 .word 0x0800b410 - 8001ba4: 0800b3f4 .word 0x0800b3f4 - 8001ba8: 0800abb3 .word 0x0800abb3 - 8001bac: 0800abdc .word 0x0800abdc - 8001bb0: 0800ab30 .word 0x0800ab30 - 8001bb4: 0800abec .word 0x0800abec - 8001bb8: 0800ada4 .word 0x0800ada4 - 8001bbc: 0800adb4 .word 0x0800adb4 - 8001bc0: 0800add8 .word 0x0800add8 - -08001bc4 ::remove>: - pub fn remove(&mut self, key: &K) -> Option { - 8001bc4: b5f0 push {r4, r5, r6, r7, lr} - 8001bc6: af03 add r7, sp, #12 - 8001bc8: b08d sub sp, #52 ; 0x34 - 8001bca: 0013 movs r3, r2 - 8001bcc: 000d movs r5, r1 - 8001bce: 0004 movs r4, r0 -} - -/// The palette id is a thin wrapper around the pointer to the palette in rom -/// and is therefore a unique reference to a palette -#[derive(Copy, Clone, PartialEq, Eq, Hash)] -struct PaletteId(usize); - 8001bd0: 6810 ldr r0, [r2, #0] - 8001bd2: 4a7b ldr r2, [pc, #492] ; (8001dc0 ::remove+0x1fc>) - intrinsics::wrapping_mul(self, rhs) - 8001bd4: 4342 muls r2, r0 - self.nodes - 8001bd6: 0008 movs r0, r1 - 8001bd8: 0019 movs r1, r3 - 8001bda: f000 fd7b bl 80026d4 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715> - match self { - 8001bde: 2800 cmp r0, #0 - 8001be0: d100 bne.n 8001be4 ::remove+0x20> - 8001be2: e0ad b.n 8001d40 ::remove+0x17c> - 8001be4: 000b movs r3, r1 - 8001be6: 9401 str r4, [sp, #4] - self.number_of_items -= 1; - 8001be8: 692a ldr r2, [r5, #16] - 8001bea: 2600 movs r6, #0 - 8001bec: 1e51 subs r1, r2, #1 - 8001bee: b440 push {r6} - 8001bf0: bc10 pop {r4} - 8001bf2: 4174 adcs r4, r6 - 8001bf4: 2a01 cmp r2, #1 - 8001bf6: d200 bcs.n 8001bfa ::remove+0x36> - 8001bf8: e0b7 b.n 8001d6a ::remove+0x1a6> - 8001bfa: 6129 str r1, [r5, #16] - 8001bfc: 682a ldr r2, [r5, #0] - 8001bfe: 2103 movs r1, #3 - 8001c00: 4011 ands r1, r2 - 8001c02: 4248 negs r0, r1 - 8001c04: 4148 adcs r0, r1 - 8001c06: 9004 str r0, [sp, #16] - 8001c08: 1e51 subs r1, r2, #1 - 8001c0a: b404 push {r2} - 8001c0c: bc01 pop {r0} - 8001c0e: 4188 sbcs r0, r1 - 8001c10: 9003 str r0, [sp, #12] - 8001c12: 210f movs r1, #15 - 8001c14: 070c lsls r4, r1, #28 - 8001c16: 68a9 ldr r1, [r5, #8] - 8001c18: 000d movs r5, r1 - 8001c1a: 43a5 bics r5, r4 - 8001c1c: 1b4c subs r4, r1, r5 - 8001c1e: 1e65 subs r5, r4, #1 - 8001c20: 41ac sbcs r4, r5 - 8001c22: 2001 movs r0, #1 - 8001c24: 010d lsls r5, r1, #4 - 8001c26: 9007 str r0, [sp, #28] - 8001c28: d400 bmi.n 8001c2c ::remove+0x68> - 8001c2a: 0030 movs r0, r6 - 8001c2c: 9002 str r0, [sp, #8] - 8001c2e: 084d lsrs r5, r1, #1 - 8001c30: 4864 ldr r0, [pc, #400] ; (8001dc4 ::remove+0x200>) - 8001c32: 4028 ands r0, r5 - 8001c34: 1a08 subs r0, r1, r0 - 8001c36: 9608 str r6, [sp, #32] - 8001c38: 0886 lsrs r6, r0, #2 - 8001c3a: 4d63 ldr r5, [pc, #396] ; (8001dc8 ::remove+0x204>) - 8001c3c: 4028 ands r0, r5 - 8001c3e: 4d62 ldr r5, [pc, #392] ; (8001dc8 ::remove+0x204>) - 8001c40: 402e ands r6, r5 - 8001c42: 1980 adds r0, r0, r6 - 8001c44: 9e08 ldr r6, [sp, #32] - 8001c46: 0905 lsrs r5, r0, #4 - 8001c48: 1940 adds r0, r0, r5 - 8001c4a: 4d60 ldr r5, [pc, #384] ; (8001dcc ::remove+0x208>) - 8001c4c: 4005 ands r5, r0 - 8001c4e: 4860 ldr r0, [pc, #384] ; (8001dd0 ::remove+0x20c>) - 8001c50: 4368 muls r0, r5 - 8001c52: 0e00 lsrs r0, r0, #24 - 8001c54: 1e4d subs r5, r1, #1 - 8001c56: 9506 str r5, [sp, #24] - 8001c58: 4176 adcs r6, r6 - debug_assert!(len.is_power_of_two(), "Length must be a power of 2"); - 8001c5a: 2801 cmp r0, #1 - 8001c5c: d000 beq.n 8001c60 ::remove+0x9c> - 8001c5e: e09b b.n 8001d98 ::remove+0x1d4> - 8001c60: 9807 ldr r0, [sp, #28] - 8001c62: 1b80 subs r0, r0, r6 - 8001c64: d000 beq.n 8001c68 ::remove+0xa4> - 8001c66: e086 b.n 8001d76 ::remove+0x1b2> - 8001c68: 9804 ldr r0, [sp, #16] - 8001c6a: 9d03 ldr r5, [sp, #12] - 8001c6c: 4005 ands r5, r0 - 8001c6e: d100 bne.n 8001c72 ::remove+0xae> - 8001c70: e08e b.n 8001d90 ::remove+0x1cc> - 8001c72: 9802 ldr r0, [sp, #8] - 8001c74: 4304 orrs r4, r0 - 8001c76: d000 beq.n 8001c7a ::remove+0xb6> - 8001c78: e08a b.n 8001d90 ::remove+0x1cc> - 8001c7a: 2000 movs r0, #0 - 8001c7c: 9007 str r0, [sp, #28] - 8001c7e: 9105 str r1, [sp, #20] - fast_mod(self.backing_vec_size(), (current_location + 1) as HashType); - 8001c80: 1c58 adds r0, r3, #1 - 8001c82: 9c07 ldr r4, [sp, #28] - 8001c84: 4164 adcs r4, r4 - 8001c86: 4298 cmp r0, r3 - 8001c88: d200 bcs.n 8001c8c ::remove+0xc8> - 8001c8a: e08d b.n 8001da8 ::remove+0x1e4> - (hash as usize) & (len - 1) - 8001c8c: 9c06 ldr r4, [sp, #24] - 8001c8e: 4020 ands r0, r4 - &(*slice)[self] - 8001c90: 4281 cmp r1, r0 - 8001c92: d95b bls.n 8001d4c ::remove+0x188> - self.distance_to_initial_bucket >= 0 - 8001c94: 0104 lsls r4, r0, #4 - 8001c96: 1914 adds r4, r2, r4 - 8001c98: 6865 ldr r5, [r4, #4] - if !self.nodes[next_location].has_value() || self.nodes[next_location].distance() == 0 { - 8001c9a: 2d01 cmp r5, #1 - 8001c9c: db3e blt.n 8001d1c ::remove+0x158> - #[inline] - #[track_caller] - pub const fn swap(&mut self, a: usize, b: usize) { - // FIXME: use swap_unchecked here (https://github.com/rust-lang/rust/pull/88540#issuecomment-944344343) - // Can't take two mutable loans from one vector, so instead use raw pointers. - let pa = ptr::addr_of_mut!(self[a]); - 8001c9e: 428b cmp r3, r1 - 8001ca0: d258 bcs.n 8001d54 ::remove+0x190> - 8001ca2: 011b lsls r3, r3, #4 - 8001ca4: 18d3 adds r3, r2, r3 - is_aligned_and_not_null(src) - 8001ca6: 079d lsls r5, r3, #30 - 8001ca8: d174 bne.n 8001d94 ::remove+0x1d0> - 8001caa: ae09 add r6, sp, #36 ; 0x24 - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 8001cac: 1af5 subs r5, r6, r3 - 8001cae: d200 bcs.n 8001cb2 ::remove+0xee> - 8001cb0: 1b9d subs r5, r3, r6 - if !$e { - 8001cb2: 2d10 cmp r5, #16 - 8001cb4: d36e bcc.n 8001d94 ::remove+0x1d0> - copy_nonoverlapping(src, dst, count) - 8001cb6: 68dd ldr r5, [r3, #12] - 8001cb8: 950c str r5, [sp, #48] ; 0x30 - 8001cba: 689d ldr r5, [r3, #8] - 8001cbc: 950b str r5, [sp, #44] ; 0x2c - 8001cbe: 685d ldr r5, [r3, #4] - 8001cc0: 950a str r5, [sp, #40] ; 0x28 - 8001cc2: 681d ldr r5, [r3, #0] - 8001cc4: 9509 str r5, [sp, #36] ; 0x24 - assert_unsafe_precondition!(is_aligned_and_not_null(src) && is_aligned_and_not_null(dst)); - 8001cc6: 07a5 lsls r5, r4, #30 - 8001cc8: d164 bne.n 8001d94 ::remove+0x1d0> - copy(src, dst, count) - 8001cca: cc60 ldmia r4!, {r5, r6} - 8001ccc: 6821 ldr r1, [r4, #0] - 8001cce: 9108 str r1, [sp, #32] - 8001cd0: 6861 ldr r1, [r4, #4] - 8001cd2: c360 stmia r3!, {r5, r6} - 8001cd4: 9d08 ldr r5, [sp, #32] - 8001cd6: 601d str r5, [r3, #0] - 8001cd8: 6059 str r1, [r3, #4] - 8001cda: ae09 add r6, sp, #36 ; 0x24 - 8001cdc: 3c08 subs r4, #8 - 8001cde: 3b08 subs r3, #8 - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 8001ce0: 1ba5 subs r5, r4, r6 - 8001ce2: d200 bcs.n 8001ce6 ::remove+0x122> - 8001ce4: 1b35 subs r5, r6, r4 - if !$e { - 8001ce6: 2d10 cmp r5, #16 - 8001ce8: d354 bcc.n 8001d94 ::remove+0x1d0> - copy_nonoverlapping(src, dst, count) - 8001cea: 990c ldr r1, [sp, #48] ; 0x30 - 8001cec: 60e1 str r1, [r4, #12] - 8001cee: 990b ldr r1, [sp, #44] ; 0x2c - 8001cf0: 60a1 str r1, [r4, #8] - 8001cf2: 990a ldr r1, [sp, #40] ; 0x28 - 8001cf4: 6061 str r1, [r4, #4] - 8001cf6: 9909 ldr r1, [sp, #36] ; 0x24 - 8001cf8: 6021 str r1, [r4, #0] - fn increment_distance(&mut self) { - self.distance_to_initial_bucket += 1; - } - - fn decrement_distance(&mut self) { - self.distance_to_initial_bucket -= 1; - 8001cfa: 6859 ldr r1, [r3, #4] - 8001cfc: 1e4c subs r4, r1, #1 - 8001cfe: 428c cmp r4, r1 - 8001d00: d62d bvs.n 8001d5e ::remove+0x19a> - 8001d02: 1d19 adds r1, r3, #4 - 8001d04: 600c str r4, [r1, #0] - if self.distance_to_initial_bucket < 0 { - 8001d06: 2c00 cmp r4, #0 - 8001d08: b401 push {r0} - 8001d0a: bc08 pop {r3} - 8001d0c: 9905 ldr r1, [sp, #20] - 8001d0e: d5b7 bpl.n 8001c80 ::remove+0xbc> - panic!("Cannot decrement distance to below 0"); - 8001d10: 4834 ldr r0, [pc, #208] ; (8001de4 ::remove+0x220>) - 8001d12: 2124 movs r1, #36 ; 0x24 - 8001d14: 4a34 ldr r2, [pc, #208] ; (8001de8 ::remove+0x224>) - 8001d16: f007 f9e3 bl 80090e0 - 8001d1a: defe udf #254 ; 0xfe - &mut (*slice)[self] - 8001d1c: 4299 cmp r1, r3 - 8001d1e: d932 bls.n 8001d86 ::remove+0x1c2> - self.distance_to_initial_bucket >= 0 - 8001d20: 0118 lsls r0, r3, #4 - 8001d22: 1810 adds r0, r2, r0 - 8001d24: 6841 ldr r1, [r0, #4] - if self.has_value() { - 8001d26: 2900 cmp r1, #0 - 8001d28: d444 bmi.n 8001db4 ::remove+0x1f0> - 8001d2a: 1d01 adds r1, r0, #4 - 8001d2c: 9a07 ldr r2, [sp, #28] - 8001d2e: 43d2 mvns r2, r2 - self.distance_to_initial_bucket = -1; - 8001d30: 600a str r2, [r1, #0] - 8001d32: 68c0 ldr r0, [r0, #12] - 8001d34: 9c01 ldr r4, [sp, #4] - Some(x) => Some(f(x)), - 8001d36: 8060 strh r0, [r4, #2] - 8001d38: 0c00 lsrs r0, r0, #16 - 8001d3a: 80a0 strh r0, [r4, #4] - 8001d3c: 2001 movs r0, #1 - 8001d3e: e000 b.n 8001d42 ::remove+0x17e> - 8001d40: 2000 movs r0, #0 - 8001d42: 8020 strh r0, [r4, #0] - } - 8001d44: b00d add sp, #52 ; 0x34 - 8001d46: bcf0 pop {r4, r5, r6, r7} - 8001d48: bc01 pop {r0} - 8001d4a: 4700 bx r0 - &(*slice)[self] - 8001d4c: 4a23 ldr r2, [pc, #140] ; (8001ddc ::remove+0x218>) - 8001d4e: f007 f9dd bl 800910c - 8001d52: defe udf #254 ; 0xfe - 8001d54: 4a22 ldr r2, [pc, #136] ; (8001de0 ::remove+0x21c>) - 8001d56: 0018 movs r0, r3 - 8001d58: f007 f9d8 bl 800910c - 8001d5c: defe udf #254 ; 0xfe - self.distance_to_initial_bucket -= 1; - 8001d5e: 4823 ldr r0, [pc, #140] ; (8001dec ::remove+0x228>) - 8001d60: 2121 movs r1, #33 ; 0x21 - 8001d62: 4a23 ldr r2, [pc, #140] ; (8001df0 ::remove+0x22c>) - 8001d64: f007 f9bc bl 80090e0 - 8001d68: defe udf #254 ; 0xfe - self.number_of_items -= 1; - 8001d6a: 4820 ldr r0, [pc, #128] ; (8001dec ::remove+0x228>) - 8001d6c: 2121 movs r1, #33 ; 0x21 - 8001d6e: 4a28 ldr r2, [pc, #160] ; (8001e10 ::remove+0x24c>) - 8001d70: f007 f9b6 bl 80090e0 - 8001d74: defe udf #254 ; 0xfe - fast_mod(self.backing_vec_size(), (current_location + 1) as HashType); - 8001d76: 1c58 adds r0, r3, #1 - 8001d78: d016 beq.n 8001da8 ::remove+0x1e4> - (hash as usize) & (len - 1) - 8001d7a: 4821 ldr r0, [pc, #132] ; (8001e00 ::remove+0x23c>) - 8001d7c: 2121 movs r1, #33 ; 0x21 - 8001d7e: 4a21 ldr r2, [pc, #132] ; (8001e04 ::remove+0x240>) - 8001d80: f007 f9ae bl 80090e0 - 8001d84: defe udf #254 ; 0xfe - &mut (*slice)[self] - 8001d86: 4a1b ldr r2, [pc, #108] ; (8001df4 ::remove+0x230>) - 8001d88: 0018 movs r0, r3 - 8001d8a: f007 f9bf bl 800910c - 8001d8e: defe udf #254 ; 0xfe - fast_mod(self.backing_vec_size(), (current_location + 1) as HashType); - 8001d90: 1c58 adds r0, r3, #1 - 8001d92: d009 beq.n 8001da8 ::remove+0x1e4> - 8001d94: defe udf #254 ; 0xfe - 8001d96: defe udf #254 ; 0xfe - 8001d98: 1c58 adds r0, r3, #1 - 8001d9a: d005 beq.n 8001da8 ::remove+0x1e4> - debug_assert!(len.is_power_of_two(), "Length must be a power of 2"); - 8001d9c: 480d ldr r0, [pc, #52] ; (8001dd4 ::remove+0x210>) - 8001d9e: 211b movs r1, #27 - 8001da0: 4a0d ldr r2, [pc, #52] ; (8001dd8 ::remove+0x214>) - 8001da2: f007 f99d bl 80090e0 - 8001da6: defe udf #254 ; 0xfe - fast_mod(self.backing_vec_size(), (current_location + 1) as HashType); - 8001da8: 4817 ldr r0, [pc, #92] ; (8001e08 ::remove+0x244>) - 8001daa: 211c movs r1, #28 - 8001dac: 4a17 ldr r2, [pc, #92] ; (8001e0c ::remove+0x248>) - 8001dae: f007 f997 bl 80090e0 - 8001db2: defe udf #254 ; 0xfe - None => panic("called `Option::unwrap()` on a `None` value"), - 8001db4: 4810 ldr r0, [pc, #64] ; (8001df8 ::remove+0x234>) - 8001db6: 212b movs r1, #43 ; 0x2b - 8001db8: 4a10 ldr r2, [pc, #64] ; (8001dfc ::remove+0x238>) - 8001dba: f007 f991 bl 80090e0 - 8001dbe: defe udf #254 ; 0xfe - 8001dc0: 9e3779b9 .word 0x9e3779b9 - 8001dc4: 55555555 .word 0x55555555 - 8001dc8: 33333333 .word 0x33333333 - 8001dcc: 0f0f0f0f .word 0x0f0f0f0f - 8001dd0: 01010101 .word 0x01010101 - 8001dd4: 0800b37c .word 0x0800b37c - 8001dd8: 0800b3a8 .word 0x0800b3a8 - 8001ddc: 0800ad34 .word 0x0800ad34 - 8001de0: 0800ad64 .word 0x0800ad64 - 8001de4: 0800ae08 .word 0x0800ae08 - 8001de8: 0800ae2c .word 0x0800ae2c - 8001dec: 0800ad00 .word 0x0800ad00 - 8001df0: 0800adf8 .word 0x0800adf8 - 8001df4: 0800ad44 .word 0x0800ad44 - 8001df8: 0800ab51 .word 0x0800ab51 - 8001dfc: 0800ad54 .word 0x0800ad54 - 8001e00: 0800b3d0 .word 0x0800b3d0 - 8001e04: 0800b3b8 .word 0x0800b3b8 - 8001e08: 0800ab10 .word 0x0800ab10 - 8001e0c: 0800ad24 .word 0x0800ad24 - 8001e10: 0800ace8 .word 0x0800ace8 - -08001e14 ::remove>: - pub fn remove(&mut self, key: &K) -> Option { - 8001e14: b5f0 push {r4, r5, r6, r7, lr} - 8001e16: af03 add r7, sp, #12 - 8001e18: b08d sub sp, #52 ; 0x34 - 8001e1a: 0013 movs r3, r2 - 8001e1c: 000d movs r5, r1 - 8001e1e: 0004 movs r4, r0 -struct SpriteId(usize); - 8001e20: 6810 ldr r0, [r2, #0] - 8001e22: 4a7b ldr r2, [pc, #492] ; (8002010 ::remove+0x1fc>) - 8001e24: 4342 muls r2, r0 - self.nodes - 8001e26: 0008 movs r0, r1 - 8001e28: 0019 movs r1, r3 - 8001e2a: f000 fc53 bl 80026d4 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715> - match self { - 8001e2e: 2800 cmp r0, #0 - 8001e30: d100 bne.n 8001e34 ::remove+0x20> - 8001e32: e0ad b.n 8001f90 ::remove+0x17c> - 8001e34: 000b movs r3, r1 - 8001e36: 9401 str r4, [sp, #4] - self.number_of_items -= 1; - 8001e38: 692a ldr r2, [r5, #16] - 8001e3a: 2600 movs r6, #0 - 8001e3c: 1e51 subs r1, r2, #1 - 8001e3e: b440 push {r6} - 8001e40: bc10 pop {r4} - 8001e42: 4174 adcs r4, r6 - 8001e44: 2a01 cmp r2, #1 - 8001e46: d200 bcs.n 8001e4a ::remove+0x36> - 8001e48: e0b7 b.n 8001fba ::remove+0x1a6> - 8001e4a: 6129 str r1, [r5, #16] - 8001e4c: 682a ldr r2, [r5, #0] - 8001e4e: 2103 movs r1, #3 - 8001e50: 4011 ands r1, r2 - 8001e52: 4248 negs r0, r1 - 8001e54: 4148 adcs r0, r1 - 8001e56: 9004 str r0, [sp, #16] - 8001e58: 1e51 subs r1, r2, #1 - 8001e5a: b404 push {r2} - 8001e5c: bc01 pop {r0} - 8001e5e: 4188 sbcs r0, r1 - 8001e60: 9003 str r0, [sp, #12] - 8001e62: 210f movs r1, #15 - 8001e64: 070c lsls r4, r1, #28 - 8001e66: 68a9 ldr r1, [r5, #8] - 8001e68: 000d movs r5, r1 - 8001e6a: 43a5 bics r5, r4 - 8001e6c: 1b4c subs r4, r1, r5 - 8001e6e: 1e65 subs r5, r4, #1 - 8001e70: 41ac sbcs r4, r5 - 8001e72: 2001 movs r0, #1 - 8001e74: 010d lsls r5, r1, #4 - 8001e76: 9007 str r0, [sp, #28] - 8001e78: d400 bmi.n 8001e7c ::remove+0x68> - 8001e7a: 0030 movs r0, r6 - 8001e7c: 9002 str r0, [sp, #8] - 8001e7e: 084d lsrs r5, r1, #1 - 8001e80: 4864 ldr r0, [pc, #400] ; (8002014 ::remove+0x200>) - 8001e82: 4028 ands r0, r5 - 8001e84: 1a08 subs r0, r1, r0 - 8001e86: 9608 str r6, [sp, #32] - 8001e88: 0886 lsrs r6, r0, #2 - 8001e8a: 4d63 ldr r5, [pc, #396] ; (8002018 ::remove+0x204>) - 8001e8c: 4028 ands r0, r5 - 8001e8e: 4d62 ldr r5, [pc, #392] ; (8002018 ::remove+0x204>) - 8001e90: 402e ands r6, r5 - 8001e92: 1980 adds r0, r0, r6 - 8001e94: 9e08 ldr r6, [sp, #32] - 8001e96: 0905 lsrs r5, r0, #4 - 8001e98: 1940 adds r0, r0, r5 - 8001e9a: 4d60 ldr r5, [pc, #384] ; (800201c ::remove+0x208>) - 8001e9c: 4005 ands r5, r0 - 8001e9e: 4860 ldr r0, [pc, #384] ; (8002020 ::remove+0x20c>) - 8001ea0: 4368 muls r0, r5 - 8001ea2: 0e00 lsrs r0, r0, #24 - 8001ea4: 1e4d subs r5, r1, #1 - 8001ea6: 9506 str r5, [sp, #24] - 8001ea8: 4176 adcs r6, r6 - debug_assert!(len.is_power_of_two(), "Length must be a power of 2"); - 8001eaa: 2801 cmp r0, #1 - 8001eac: d000 beq.n 8001eb0 ::remove+0x9c> - 8001eae: e09b b.n 8001fe8 ::remove+0x1d4> - 8001eb0: 9807 ldr r0, [sp, #28] - 8001eb2: 1b80 subs r0, r0, r6 - 8001eb4: d000 beq.n 8001eb8 ::remove+0xa4> - 8001eb6: e086 b.n 8001fc6 ::remove+0x1b2> - 8001eb8: 9804 ldr r0, [sp, #16] - 8001eba: 9d03 ldr r5, [sp, #12] - 8001ebc: 4005 ands r5, r0 - 8001ebe: d100 bne.n 8001ec2 ::remove+0xae> - 8001ec0: e08e b.n 8001fe0 ::remove+0x1cc> - 8001ec2: 9802 ldr r0, [sp, #8] - 8001ec4: 4304 orrs r4, r0 - 8001ec6: d000 beq.n 8001eca ::remove+0xb6> - 8001ec8: e08a b.n 8001fe0 ::remove+0x1cc> - 8001eca: 2000 movs r0, #0 - 8001ecc: 9007 str r0, [sp, #28] - 8001ece: 9105 str r1, [sp, #20] - fast_mod(self.backing_vec_size(), (current_location + 1) as HashType); - 8001ed0: 1c58 adds r0, r3, #1 - 8001ed2: 9c07 ldr r4, [sp, #28] - 8001ed4: 4164 adcs r4, r4 - 8001ed6: 4298 cmp r0, r3 - 8001ed8: d200 bcs.n 8001edc ::remove+0xc8> - 8001eda: e08d b.n 8001ff8 ::remove+0x1e4> - (hash as usize) & (len - 1) - 8001edc: 9c06 ldr r4, [sp, #24] - 8001ede: 4020 ands r0, r4 - &(*slice)[self] - 8001ee0: 4281 cmp r1, r0 - 8001ee2: d95b bls.n 8001f9c ::remove+0x188> - self.distance_to_initial_bucket >= 0 - 8001ee4: 0104 lsls r4, r0, #4 - 8001ee6: 1914 adds r4, r2, r4 - 8001ee8: 6865 ldr r5, [r4, #4] - if !self.nodes[next_location].has_value() || self.nodes[next_location].distance() == 0 { - 8001eea: 2d01 cmp r5, #1 - 8001eec: db3e blt.n 8001f6c ::remove+0x158> - 8001eee: 428b cmp r3, r1 - 8001ef0: d258 bcs.n 8001fa4 ::remove+0x190> - 8001ef2: 011b lsls r3, r3, #4 - 8001ef4: 18d3 adds r3, r2, r3 - is_aligned_and_not_null(src) - 8001ef6: 079d lsls r5, r3, #30 - 8001ef8: d174 bne.n 8001fe4 ::remove+0x1d0> - 8001efa: ae09 add r6, sp, #36 ; 0x24 - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 8001efc: 1af5 subs r5, r6, r3 - 8001efe: d200 bcs.n 8001f02 ::remove+0xee> - 8001f00: 1b9d subs r5, r3, r6 - if !$e { - 8001f02: 2d10 cmp r5, #16 - 8001f04: d36e bcc.n 8001fe4 ::remove+0x1d0> - copy_nonoverlapping(src, dst, count) - 8001f06: 68dd ldr r5, [r3, #12] - 8001f08: 950c str r5, [sp, #48] ; 0x30 - 8001f0a: 689d ldr r5, [r3, #8] - 8001f0c: 950b str r5, [sp, #44] ; 0x2c - 8001f0e: 685d ldr r5, [r3, #4] - 8001f10: 950a str r5, [sp, #40] ; 0x28 - 8001f12: 681d ldr r5, [r3, #0] - 8001f14: 9509 str r5, [sp, #36] ; 0x24 - assert_unsafe_precondition!(is_aligned_and_not_null(src) && is_aligned_and_not_null(dst)); - 8001f16: 07a5 lsls r5, r4, #30 - 8001f18: d164 bne.n 8001fe4 ::remove+0x1d0> - copy(src, dst, count) - 8001f1a: cc60 ldmia r4!, {r5, r6} - 8001f1c: 6821 ldr r1, [r4, #0] - 8001f1e: 9108 str r1, [sp, #32] - 8001f20: 6861 ldr r1, [r4, #4] - 8001f22: c360 stmia r3!, {r5, r6} - 8001f24: 9d08 ldr r5, [sp, #32] - 8001f26: 601d str r5, [r3, #0] - 8001f28: 6059 str r1, [r3, #4] - 8001f2a: ae09 add r6, sp, #36 ; 0x24 - 8001f2c: 3c08 subs r4, #8 - 8001f2e: 3b08 subs r3, #8 - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 8001f30: 1ba5 subs r5, r4, r6 - 8001f32: d200 bcs.n 8001f36 ::remove+0x122> - 8001f34: 1b35 subs r5, r6, r4 - if !$e { - 8001f36: 2d10 cmp r5, #16 - 8001f38: d354 bcc.n 8001fe4 ::remove+0x1d0> - copy_nonoverlapping(src, dst, count) - 8001f3a: 990c ldr r1, [sp, #48] ; 0x30 - 8001f3c: 60e1 str r1, [r4, #12] - 8001f3e: 990b ldr r1, [sp, #44] ; 0x2c - 8001f40: 60a1 str r1, [r4, #8] - 8001f42: 990a ldr r1, [sp, #40] ; 0x28 - 8001f44: 6061 str r1, [r4, #4] - 8001f46: 9909 ldr r1, [sp, #36] ; 0x24 - 8001f48: 6021 str r1, [r4, #0] - self.distance_to_initial_bucket -= 1; - 8001f4a: 6859 ldr r1, [r3, #4] - 8001f4c: 1e4c subs r4, r1, #1 - 8001f4e: 428c cmp r4, r1 - 8001f50: d62d bvs.n 8001fae ::remove+0x19a> - 8001f52: 1d19 adds r1, r3, #4 - 8001f54: 600c str r4, [r1, #0] - if self.distance_to_initial_bucket < 0 { - 8001f56: 2c00 cmp r4, #0 - 8001f58: b401 push {r0} - 8001f5a: bc08 pop {r3} - 8001f5c: 9905 ldr r1, [sp, #20] - 8001f5e: d5b7 bpl.n 8001ed0 ::remove+0xbc> - panic!("Cannot decrement distance to below 0"); - 8001f60: 4834 ldr r0, [pc, #208] ; (8002034 ::remove+0x220>) - 8001f62: 2124 movs r1, #36 ; 0x24 - 8001f64: 4a34 ldr r2, [pc, #208] ; (8002038 ::remove+0x224>) - 8001f66: f007 f8bb bl 80090e0 - 8001f6a: defe udf #254 ; 0xfe - &mut (*slice)[self] - 8001f6c: 4299 cmp r1, r3 - 8001f6e: d932 bls.n 8001fd6 ::remove+0x1c2> - self.distance_to_initial_bucket >= 0 - 8001f70: 0118 lsls r0, r3, #4 - 8001f72: 1810 adds r0, r2, r0 - 8001f74: 6841 ldr r1, [r0, #4] - if self.has_value() { - 8001f76: 2900 cmp r1, #0 - 8001f78: d444 bmi.n 8002004 ::remove+0x1f0> - 8001f7a: 1d01 adds r1, r0, #4 - 8001f7c: 9a07 ldr r2, [sp, #28] - 8001f7e: 43d2 mvns r2, r2 - self.distance_to_initial_bucket = -1; - 8001f80: 600a str r2, [r1, #0] - 8001f82: 68c0 ldr r0, [r0, #12] - 8001f84: 9c01 ldr r4, [sp, #4] - Some(x) => Some(f(x)), - 8001f86: 8060 strh r0, [r4, #2] - 8001f88: 0c00 lsrs r0, r0, #16 - 8001f8a: 80a0 strh r0, [r4, #4] - 8001f8c: 2001 movs r0, #1 - 8001f8e: e000 b.n 8001f92 ::remove+0x17e> - 8001f90: 2000 movs r0, #0 - 8001f92: 8020 strh r0, [r4, #0] - } - 8001f94: b00d add sp, #52 ; 0x34 - 8001f96: bcf0 pop {r4, r5, r6, r7} - 8001f98: bc01 pop {r0} - 8001f9a: 4700 bx r0 - &(*slice)[self] - 8001f9c: 4a23 ldr r2, [pc, #140] ; (800202c ::remove+0x218>) - 8001f9e: f007 f8b5 bl 800910c - 8001fa2: defe udf #254 ; 0xfe - 8001fa4: 4a22 ldr r2, [pc, #136] ; (8002030 ::remove+0x21c>) - 8001fa6: 0018 movs r0, r3 - 8001fa8: f007 f8b0 bl 800910c - 8001fac: defe udf #254 ; 0xfe - self.distance_to_initial_bucket -= 1; - 8001fae: 4823 ldr r0, [pc, #140] ; (800203c ::remove+0x228>) - 8001fb0: 2121 movs r1, #33 ; 0x21 - 8001fb2: 4a23 ldr r2, [pc, #140] ; (8002040 ::remove+0x22c>) - 8001fb4: f007 f894 bl 80090e0 - 8001fb8: defe udf #254 ; 0xfe - self.number_of_items -= 1; - 8001fba: 4820 ldr r0, [pc, #128] ; (800203c ::remove+0x228>) - 8001fbc: 2121 movs r1, #33 ; 0x21 - 8001fbe: 4a28 ldr r2, [pc, #160] ; (8002060 ::remove+0x24c>) - 8001fc0: f007 f88e bl 80090e0 - 8001fc4: defe udf #254 ; 0xfe - fast_mod(self.backing_vec_size(), (current_location + 1) as HashType); - 8001fc6: 1c58 adds r0, r3, #1 - 8001fc8: d016 beq.n 8001ff8 ::remove+0x1e4> - (hash as usize) & (len - 1) - 8001fca: 4821 ldr r0, [pc, #132] ; (8002050 ::remove+0x23c>) - 8001fcc: 2121 movs r1, #33 ; 0x21 - 8001fce: 4a21 ldr r2, [pc, #132] ; (8002054 ::remove+0x240>) - 8001fd0: f007 f886 bl 80090e0 - 8001fd4: defe udf #254 ; 0xfe - &mut (*slice)[self] - 8001fd6: 4a1b ldr r2, [pc, #108] ; (8002044 ::remove+0x230>) - 8001fd8: 0018 movs r0, r3 - 8001fda: f007 f897 bl 800910c - 8001fde: defe udf #254 ; 0xfe - fast_mod(self.backing_vec_size(), (current_location + 1) as HashType); - 8001fe0: 1c58 adds r0, r3, #1 - 8001fe2: d009 beq.n 8001ff8 ::remove+0x1e4> - 8001fe4: defe udf #254 ; 0xfe - 8001fe6: defe udf #254 ; 0xfe - 8001fe8: 1c58 adds r0, r3, #1 - 8001fea: d005 beq.n 8001ff8 ::remove+0x1e4> - debug_assert!(len.is_power_of_two(), "Length must be a power of 2"); - 8001fec: 480d ldr r0, [pc, #52] ; (8002024 ::remove+0x210>) - 8001fee: 211b movs r1, #27 - 8001ff0: 4a0d ldr r2, [pc, #52] ; (8002028 ::remove+0x214>) - 8001ff2: f007 f875 bl 80090e0 - 8001ff6: defe udf #254 ; 0xfe - fast_mod(self.backing_vec_size(), (current_location + 1) as HashType); - 8001ff8: 4817 ldr r0, [pc, #92] ; (8002058 ::remove+0x244>) - 8001ffa: 211c movs r1, #28 - 8001ffc: 4a17 ldr r2, [pc, #92] ; (800205c ::remove+0x248>) - 8001ffe: f007 f86f bl 80090e0 - 8002002: defe udf #254 ; 0xfe - None => panic("called `Option::unwrap()` on a `None` value"), - 8002004: 4810 ldr r0, [pc, #64] ; (8002048 ::remove+0x234>) - 8002006: 212b movs r1, #43 ; 0x2b - 8002008: 4a10 ldr r2, [pc, #64] ; (800204c ::remove+0x238>) - 800200a: f007 f869 bl 80090e0 - 800200e: defe udf #254 ; 0xfe - 8002010: 9e3779b9 .word 0x9e3779b9 - 8002014: 55555555 .word 0x55555555 - 8002018: 33333333 .word 0x33333333 - 800201c: 0f0f0f0f .word 0x0f0f0f0f - 8002020: 01010101 .word 0x01010101 - 8002024: 0800b37c .word 0x0800b37c - 8002028: 0800b3a8 .word 0x0800b3a8 - 800202c: 0800ad34 .word 0x0800ad34 - 8002030: 0800ad64 .word 0x0800ad64 - 8002034: 0800ae08 .word 0x0800ae08 - 8002038: 0800ae2c .word 0x0800ae2c - 800203c: 0800ad00 .word 0x0800ad00 - 8002040: 0800adf8 .word 0x0800adf8 - 8002044: 0800ad44 .word 0x0800ad44 - 8002048: 0800ab51 .word 0x0800ab51 - 800204c: 0800ad54 .word 0x0800ad54 - 8002050: 0800b3d0 .word 0x0800b3d0 - 8002054: 0800b3b8 .word 0x0800b3b8 - 8002058: 0800ab10 .word 0x0800ab10 - 800205c: 0800ad24 .word 0x0800ad24 - 8002060: 0800ace8 .word 0x0800ace8 - -08002064 ::remove>: - pub fn remove(&mut self, key: &K) -> Option { - 8002064: b5f0 push {r4, r5, r6, r7, lr} - 8002066: af03 add r7, sp, #12 - 8002068: b08f sub sp, #60 ; 0x3c - 800206a: 0006 movs r6, r0 - tileset: NonNull<[u8]>, - 800206c: 680b ldr r3, [r1, #0] - 800206e: 684a ldr r2, [r1, #4] - 8002070: 4881 ldr r0, [pc, #516] ; (8002278 ::remove+0x214>) - 8002072: 4343 muls r3, r0 - 8002074: 241b movs r4, #27 - intrinsics::rotate_left(self, n as $SelfT) - 8002076: 41e3 rors r3, r4 - 8002078: 4053 eors r3, r2 - intrinsics::wrapping_mul(self, rhs) - 800207a: 4343 muls r3, r0 - intrinsics::rotate_left(self, n as $SelfT) - 800207c: 41e3 rors r3, r4 - tile: u16, - 800207e: 890a ldrh r2, [r1, #8] - 8002080: 405a eors r2, r3 - intrinsics::wrapping_mul(self, rhs) - 8002082: 4342 muls r2, r0 - self.nodes - 8002084: 0030 movs r0, r6 - 8002086: f000 fbd3 bl 8002830 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715> - match self { - 800208a: 2800 cmp r0, #0 - 800208c: d100 bne.n 8002090 ::remove+0x2c> - 800208e: e0af b.n 80021f0 ::remove+0x18c> - self.number_of_items -= 1; - 8002090: 6933 ldr r3, [r6, #16] - 8002092: 2400 movs r4, #0 - 8002094: 1e58 subs r0, r3, #1 - 8002096: b410 push {r4} - 8002098: bc04 pop {r2} - 800209a: 4162 adcs r2, r4 - 800209c: 2b01 cmp r3, #1 - 800209e: d200 bcs.n 80020a2 ::remove+0x3e> - 80020a0: e0bb b.n 800221a ::remove+0x1b6> - 80020a2: 9108 str r1, [sp, #32] - 80020a4: 6130 str r0, [r6, #16] - 80020a6: 68b0 ldr r0, [r6, #8] - 80020a8: 2218 movs r2, #24 - 80020aa: 9006 str r0, [sp, #24] - 80020ac: 0021 movs r1, r4 - 80020ae: 9203 str r2, [sp, #12] - 80020b0: 0023 movs r3, r4 - 80020b2: f007 f8b9 bl 8009228 <__aeabi_lmul> - 80020b6: 1e4a subs r2, r1, #1 - 80020b8: 4191 sbcs r1, r2 - 80020ba: 2201 movs r2, #1 - 80020bc: 2800 cmp r0, #0 - 80020be: 9207 str r2, [sp, #28] - 80020c0: b404 push {r2} - 80020c2: bc01 pop {r0} - 80020c4: d400 bmi.n 80020c8 ::remove+0x64> - 80020c6: 0020 movs r0, r4 - 80020c8: 9001 str r0, [sp, #4] - 80020ca: 6830 ldr r0, [r6, #0] - 80020cc: 2503 movs r5, #3 - 80020ce: 4005 ands r5, r0 - 80020d0: 426a negs r2, r5 - 80020d2: 416a adcs r2, r5 - 80020d4: 9205 str r2, [sp, #20] - 80020d6: 1e46 subs r6, r0, #1 - 80020d8: 9004 str r0, [sp, #16] - 80020da: b401 push {r0} - 80020dc: bc20 pop {r5} - 80020de: 41b5 sbcs r5, r6 - 80020e0: 9b06 ldr r3, [sp, #24] - 80020e2: 085e lsrs r6, r3, #1 - 80020e4: 4865 ldr r0, [pc, #404] ; (800227c ::remove+0x218>) - 80020e6: 4030 ands r0, r6 - 80020e8: 1a18 subs r0, r3, r0 - 80020ea: 4e65 ldr r6, [pc, #404] ; (8002280 ::remove+0x21c>) - 80020ec: 0882 lsrs r2, r0, #2 - 80020ee: 4030 ands r0, r6 - 80020f0: 4032 ands r2, r6 - 80020f2: 1880 adds r0, r0, r2 - 80020f4: 0902 lsrs r2, r0, #4 - 80020f6: 1880 adds r0, r0, r2 - 80020f8: 4a62 ldr r2, [pc, #392] ; (8002284 ::remove+0x220>) - 80020fa: 4002 ands r2, r0 - 80020fc: 4862 ldr r0, [pc, #392] ; (8002288 ::remove+0x224>) - 80020fe: 4350 muls r0, r2 - 8002100: 0e00 lsrs r0, r0, #24 - 8002102: 1e5a subs r2, r3, #1 - 8002104: 9202 str r2, [sp, #8] - 8002106: 4164 adcs r4, r4 - debug_assert!(len.is_power_of_two(), "Length must be a power of 2"); - 8002108: 2801 cmp r0, #1 - 800210a: d000 beq.n 800210e ::remove+0xaa> - 800210c: e0a4 b.n 8002258 ::remove+0x1f4> - 800210e: 9807 ldr r0, [sp, #28] - 8002110: 1b00 subs r0, r0, r4 - 8002112: d000 beq.n 8002116 ::remove+0xb2> - 8002114: e087 b.n 8002226 ::remove+0x1c2> - 8002116: 9805 ldr r0, [sp, #20] - 8002118: 4005 ands r5, r0 - 800211a: d100 bne.n 800211e ::remove+0xba> - 800211c: e091 b.n 8002242 ::remove+0x1de> - 800211e: 9801 ldr r0, [sp, #4] - 8002120: 4301 orrs r1, r0 - 8002122: 9906 ldr r1, [sp, #24] - 8002124: 9a03 ldr r2, [sp, #12] - 8002126: 9c04 ldr r4, [sp, #16] - 8002128: d000 beq.n 800212c ::remove+0xc8> - 800212a: e08a b.n 8002242 ::remove+0x1de> - 800212c: 2000 movs r0, #0 - 800212e: 9005 str r0, [sp, #20] - 8002130: 9b08 ldr r3, [sp, #32] - fast_mod(self.backing_vec_size(), (current_location + 1) as HashType); - 8002132: 1c5d adds r5, r3, #1 - 8002134: 9805 ldr r0, [sp, #20] - 8002136: 4140 adcs r0, r0 - 8002138: 429d cmp r5, r3 - 800213a: d200 bcs.n 800213e ::remove+0xda> - 800213c: e095 b.n 800226a ::remove+0x206> - (hash as usize) & (len - 1) - 800213e: 9802 ldr r0, [sp, #8] - 8002140: 4005 ands r5, r0 - &(*slice)[self] - 8002142: 42a9 cmp r1, r5 - 8002144: d959 bls.n 80021fa ::remove+0x196> - self.distance_to_initial_bucket >= 0 - 8002146: 0010 movs r0, r2 - 8002148: 4368 muls r0, r5 - 800214a: 1826 adds r6, r4, r0 - 800214c: 6870 ldr r0, [r6, #4] - if !self.nodes[next_location].has_value() || self.nodes[next_location].distance() == 0 { - 800214e: 2801 cmp r0, #1 - 8002150: db3b blt.n 80021ca ::remove+0x166> - 8002152: 428b cmp r3, r1 - 8002154: d256 bcs.n 8002204 ::remove+0x1a0> - 8002156: 0010 movs r0, r2 - 8002158: 4358 muls r0, r3 - 800215a: 1820 adds r0, r4, r0 - is_aligned_and_not_null(src) - 800215c: 0781 lsls r1, r0, #30 - 800215e: d173 bne.n 8002248 ::remove+0x1e4> - 8002160: aa09 add r2, sp, #36 ; 0x24 - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 8002162: 1a11 subs r1, r2, r0 - 8002164: d200 bcs.n 8002168 ::remove+0x104> - 8002166: 1a81 subs r1, r0, r2 - if !$e { - 8002168: 2918 cmp r1, #24 - 800216a: d36d bcc.n 8002248 ::remove+0x1e4> - 800216c: 9507 str r5, [sp, #28] - 800216e: 9308 str r3, [sp, #32] - 8002170: a909 add r1, sp, #36 ; 0x24 - copy_nonoverlapping(src, dst, count) - 8002172: 0002 movs r2, r0 - 8002174: ca38 ldmia r2!, {r3, r4, r5} - 8002176: c138 stmia r1!, {r3, r4, r5} - 8002178: ca38 ldmia r2!, {r3, r4, r5} - 800217a: c138 stmia r1!, {r3, r4, r5} - assert_unsafe_precondition!(is_aligned_and_not_null(src) && is_aligned_and_not_null(dst)); - 800217c: 07b1 lsls r1, r6, #30 - 800217e: d163 bne.n 8002248 ::remove+0x1e4> - 8002180: 2518 movs r5, #24 - copy(src, dst, count) - 8002182: 0031 movs r1, r6 - 8002184: 002a movs r2, r5 - 8002186: f007 f899 bl 80092bc <__aeabi_memmove4> - 800218a: a909 add r1, sp, #36 ; 0x24 - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 800218c: 1a70 subs r0, r6, r1 - 800218e: d200 bcs.n 8002192 ::remove+0x12e> - 8002190: 1b88 subs r0, r1, r6 - if !$e { - 8002192: 2818 cmp r0, #24 - 8002194: d358 bcc.n 8002248 ::remove+0x1e4> - 8002196: a809 add r0, sp, #36 ; 0x24 - copy_nonoverlapping(src, dst, count) - 8002198: c80e ldmia r0!, {r1, r2, r3} - 800219a: c60e stmia r6!, {r1, r2, r3} - 800219c: c80e ldmia r0!, {r1, r2, r3} - 800219e: c60e stmia r6!, {r1, r2, r3} - self.distance_to_initial_bucket -= 1; - 80021a0: 9808 ldr r0, [sp, #32] - 80021a2: 4345 muls r5, r0 - 80021a4: 9c04 ldr r4, [sp, #16] - 80021a6: 1961 adds r1, r4, r5 - 80021a8: 684a ldr r2, [r1, #4] - 80021aa: 1e50 subs r0, r2, #1 - 80021ac: 4290 cmp r0, r2 - 80021ae: d62e bvs.n 800220e ::remove+0x1aa> - 80021b0: 1d09 adds r1, r1, #4 - 80021b2: 6008 str r0, [r1, #0] - if self.distance_to_initial_bucket < 0 { - 80021b4: 2800 cmp r0, #0 - 80021b6: 9b07 ldr r3, [sp, #28] - 80021b8: 9906 ldr r1, [sp, #24] - 80021ba: 9a03 ldr r2, [sp, #12] - 80021bc: d5b9 bpl.n 8002132 ::remove+0xce> - panic!("Cannot decrement distance to below 0"); - 80021be: 4837 ldr r0, [pc, #220] ; (800229c ::remove+0x238>) - 80021c0: 2124 movs r1, #36 ; 0x24 - 80021c2: 4a37 ldr r2, [pc, #220] ; (80022a0 ::remove+0x23c>) - 80021c4: f006 ff8c bl 80090e0 - 80021c8: defe udf #254 ; 0xfe - &mut (*slice)[self] - 80021ca: 4299 cmp r1, r3 - 80021cc: d934 bls.n 8002238 ::remove+0x1d4> - self.distance_to_initial_bucket >= 0 - 80021ce: 435a muls r2, r3 - 80021d0: 18a0 adds r0, r4, r2 - 80021d2: 6841 ldr r1, [r0, #4] - if self.has_value() { - 80021d4: 2900 cmp r1, #0 - 80021d6: d439 bmi.n 800224c ::remove+0x1e8> - 80021d8: 1d01 adds r1, r0, #4 - 80021da: 9a05 ldr r2, [sp, #20] - 80021dc: 43d2 mvns r2, r2 - self.distance_to_initial_bucket = -1; - 80021de: 600a str r2, [r1, #0] - Some(unsafe { (key.assume_init(), value.assume_init(), self.hash) }) - 80021e0: 6881 ldr r1, [r0, #8] - match self { - 80021e2: 2900 cmp r1, #0 - 80021e4: d032 beq.n 800224c ::remove+0x1e8> - 80021e6: 6940 ldr r0, [r0, #20] - } - 80021e8: b00f add sp, #60 ; 0x3c - 80021ea: bcf0 pop {r4, r5, r6, r7} - 80021ec: bc02 pop {r1} - 80021ee: 4708 bx r1 - 80021f0: 2000 movs r0, #0 - 80021f2: b00f add sp, #60 ; 0x3c - 80021f4: bcf0 pop {r4, r5, r6, r7} - 80021f6: bc02 pop {r1} - 80021f8: 4708 bx r1 - &(*slice)[self] - 80021fa: 4a26 ldr r2, [pc, #152] ; (8002294 ::remove+0x230>) - 80021fc: 0028 movs r0, r5 - 80021fe: f006 ff85 bl 800910c - 8002202: defe udf #254 ; 0xfe - 8002204: 4a24 ldr r2, [pc, #144] ; (8002298 ::remove+0x234>) - 8002206: 0018 movs r0, r3 - 8002208: f006 ff80 bl 800910c - 800220c: defe udf #254 ; 0xfe - self.distance_to_initial_bucket -= 1; - 800220e: 4825 ldr r0, [pc, #148] ; (80022a4 ::remove+0x240>) - 8002210: 2121 movs r1, #33 ; 0x21 - 8002212: 4a25 ldr r2, [pc, #148] ; (80022a8 ::remove+0x244>) - 8002214: f006 ff64 bl 80090e0 - 8002218: defe udf #254 ; 0xfe - self.number_of_items -= 1; - 800221a: 4822 ldr r0, [pc, #136] ; (80022a4 ::remove+0x240>) - 800221c: 2121 movs r1, #33 ; 0x21 - 800221e: 4a2a ldr r2, [pc, #168] ; (80022c8 ::remove+0x264>) - 8002220: f006 ff5e bl 80090e0 - 8002224: defe udf #254 ; 0xfe - fast_mod(self.backing_vec_size(), (current_location + 1) as HashType); - 8002226: 9808 ldr r0, [sp, #32] - 8002228: 1c40 adds r0, r0, #1 - 800222a: d01e beq.n 800226a ::remove+0x206> - (hash as usize) & (len - 1) - 800222c: 4822 ldr r0, [pc, #136] ; (80022b8 ::remove+0x254>) - 800222e: 2121 movs r1, #33 ; 0x21 - 8002230: 4a22 ldr r2, [pc, #136] ; (80022bc ::remove+0x258>) - 8002232: f006 ff55 bl 80090e0 - 8002236: defe udf #254 ; 0xfe - &mut (*slice)[self] - 8002238: 4a1c ldr r2, [pc, #112] ; (80022ac ::remove+0x248>) - 800223a: 0018 movs r0, r3 - 800223c: f006 ff66 bl 800910c - 8002240: defe udf #254 ; 0xfe - fast_mod(self.backing_vec_size(), (current_location + 1) as HashType); - 8002242: 9808 ldr r0, [sp, #32] - 8002244: 1c40 adds r0, r0, #1 - 8002246: d010 beq.n 800226a ::remove+0x206> - 8002248: defe udf #254 ; 0xfe - 800224a: defe udf #254 ; 0xfe - None => panic("called `Option::unwrap()` on a `None` value"), - 800224c: 4818 ldr r0, [pc, #96] ; (80022b0 ::remove+0x24c>) - 800224e: 212b movs r1, #43 ; 0x2b - 8002250: 4a18 ldr r2, [pc, #96] ; (80022b4 ::remove+0x250>) - 8002252: f006 ff45 bl 80090e0 - 8002256: defe udf #254 ; 0xfe - 8002258: 9808 ldr r0, [sp, #32] - 800225a: 1c40 adds r0, r0, #1 - 800225c: d005 beq.n 800226a ::remove+0x206> - debug_assert!(len.is_power_of_two(), "Length must be a power of 2"); - 800225e: 480b ldr r0, [pc, #44] ; (800228c ::remove+0x228>) - 8002260: 211b movs r1, #27 - 8002262: 4a0b ldr r2, [pc, #44] ; (8002290 ::remove+0x22c>) - 8002264: f006 ff3c bl 80090e0 - 8002268: defe udf #254 ; 0xfe - fast_mod(self.backing_vec_size(), (current_location + 1) as HashType); - 800226a: 4815 ldr r0, [pc, #84] ; (80022c0 ::remove+0x25c>) - 800226c: 211c movs r1, #28 - 800226e: 4a15 ldr r2, [pc, #84] ; (80022c4 ::remove+0x260>) - 8002270: f006 ff36 bl 80090e0 - 8002274: defe udf #254 ; 0xfe - 8002276: 46c0 nop ; (mov r8, r8) - 8002278: 9e3779b9 .word 0x9e3779b9 - 800227c: 55555555 .word 0x55555555 - 8002280: 33333333 .word 0x33333333 - 8002284: 0f0f0f0f .word 0x0f0f0f0f - 8002288: 01010101 .word 0x01010101 - 800228c: 0800b37c .word 0x0800b37c - 8002290: 0800b3a8 .word 0x0800b3a8 - 8002294: 0800ad34 .word 0x0800ad34 - 8002298: 0800ad64 .word 0x0800ad64 - 800229c: 0800ae08 .word 0x0800ae08 - 80022a0: 0800ae2c .word 0x0800ae2c - 80022a4: 0800ad00 .word 0x0800ad00 - 80022a8: 0800adf8 .word 0x0800adf8 - 80022ac: 0800ad44 .word 0x0800ad44 - 80022b0: 0800ab51 .word 0x0800ab51 - 80022b4: 0800ad54 .word 0x0800ad54 - 80022b8: 0800b3d0 .word 0x0800b3d0 - 80022bc: 0800b3b8 .word 0x0800b3b8 - 80022c0: 0800ab10 .word 0x0800ab10 - 80022c4: 0800ad24 .word 0x0800ad24 - 80022c8: 0800ace8 .word 0x0800ace8 - -080022cc ::insert_new>: - fn insert_new(&mut self, key: K, value: V, hash: HashType) -> usize { - 80022cc: b5f0 push {r4, r5, r6, r7, lr} - 80022ce: af03 add r7, sp, #12 - 80022d0: b097 sub sp, #92 ; 0x5c - 80022d2: 9303 str r3, [sp, #12] - 80022d4: 9204 str r2, [sp, #16] - 80022d6: 9105 str r1, [sp, #20] - self.capacity() > self.len(), - 80022d8: 6902 ldr r2, [r0, #16] - 80022da: 6941 ldr r1, [r0, #20] - debug_assert!( - 80022dc: 4291 cmp r1, r2 - 80022de: d800 bhi.n 80022e2 ::insert_new+0x16> - 80022e0: e0ac b.n 800243c ::insert_new+0x170> - 80022e2: 9200 str r2, [sp, #0] - 80022e4: 6804 ldr r4, [r0, #0] - 80022e6: 2203 movs r2, #3 - 80022e8: 4022 ands r2, r4 - 80022ea: 1e51 subs r1, r2, #1 - 80022ec: 418a sbcs r2, r1 - 80022ee: 4261 negs r1, r4 - 80022f0: 9409 str r4, [sp, #36] ; 0x24 - 80022f2: 4161 adcs r1, r4 - 80022f4: 9102 str r1, [sp, #8] - 80022f6: 210f movs r1, #15 - 80022f8: 070c lsls r4, r1, #28 - 80022fa: 9007 str r0, [sp, #28] - 80022fc: 6886 ldr r6, [r0, #8] - 80022fe: 0031 movs r1, r6 - 8002300: 43a1 bics r1, r4 - 8002302: 1a74 subs r4, r6, r1 - 8002304: 1e60 subs r0, r4, #1 - 8002306: 4184 sbcs r4, r0 - 8002308: 2101 movs r1, #1 - 800230a: 2500 movs r5, #0 - 800230c: 9608 str r6, [sp, #32] - 800230e: 0130 lsls r0, r6, #4 - 8002310: 910a str r1, [sp, #40] ; 0x28 - 8002312: d400 bmi.n 8002316 ::insert_new+0x4a> - 8002314: 0029 movs r1, r5 - 8002316: 9101 str r1, [sp, #4] - 8002318: 9b08 ldr r3, [sp, #32] - 800231a: 0858 lsrs r0, r3, #1 - 800231c: 495b ldr r1, [pc, #364] ; (800248c ::insert_new+0x1c0>) - 800231e: 4001 ands r1, r0 - 8002320: 1a58 subs r0, r3, r1 - 8002322: 495b ldr r1, [pc, #364] ; (8002490 ::insert_new+0x1c4>) - 8002324: 0886 lsrs r6, r0, #2 - 8002326: 4008 ands r0, r1 - 8002328: 400e ands r6, r1 - 800232a: 1980 adds r0, r0, r6 - 800232c: 0901 lsrs r1, r0, #4 - 800232e: 1840 adds r0, r0, r1 - 8002330: 4958 ldr r1, [pc, #352] ; (8002494 ::insert_new+0x1c8>) - 8002332: 4001 ands r1, r0 - 8002334: 4858 ldr r0, [pc, #352] ; (8002498 ::insert_new+0x1cc>) - 8002336: 4348 muls r0, r1 - 8002338: 0e00 lsrs r0, r0, #24 - 800233a: 1e59 subs r1, r3, #1 - 800233c: 9106 str r1, [sp, #24] - 800233e: 416d adcs r5, r5 - debug_assert!(len.is_power_of_two(), "Length must be a power of 2"); - 8002340: 2801 cmp r0, #1 - 8002342: d000 beq.n 8002346 ::insert_new+0x7a> - 8002344: e093 b.n 800246e ::insert_new+0x1a2> - 8002346: 990a ldr r1, [sp, #40] ; 0x28 - 8002348: 1b48 subs r0, r1, r5 - (hash as usize) & (len - 1) - 800234a: d16b bne.n 8002424 ::insert_new+0x158> - 800234c: 9802 ldr r0, [sp, #8] - 800234e: 4310 orrs r0, r2 - 8002350: d102 bne.n 8002358 ::insert_new+0x8c> - 8002352: 9801 ldr r0, [sp, #4] - 8002354: 4304 orrs r4, r0 - 8002356: 0021 movs r1, r4 - 8002358: 2900 cmp r1, #0 - 800235a: 9807 ldr r0, [sp, #28] - 800235c: d000 beq.n 8002360 ::insert_new+0x94> - 800235e: e08c b.n 800247a ::insert_new+0x1ae> - 8002360: 68bd ldr r5, [r7, #8] - 8002362: 68c0 ldr r0, [r0, #12] - 8002364: 900a str r0, [sp, #40] ; 0x28 - 8002366: 2300 movs r3, #0 - 8002368: 002a movs r2, r5 - 800236a: e006 b.n 800237a ::insert_new+0xae> - self.max_distance_to_initial_bucket = - 800236c: 60c8 str r0, [r1, #12] - 800236e: 2100 movs r1, #0 - new_node.hash + new_node.distance() as HashType, - 8002370: 18d5 adds r5, r2, r3 - 8002372: 4149 adcs r1, r1 - 8002374: 4295 cmp r5, r2 - 8002376: 900a str r0, [sp, #40] ; 0x28 - 8002378: d34e bcc.n 8002418 ::insert_new+0x14c> - (hash as usize) & (len - 1) - 800237a: 9806 ldr r0, [sp, #24] - 800237c: 4005 ands r5, r0 - 800237e: 9808 ldr r0, [sp, #32] - 8002380: 42a8 cmp r0, r5 - 8002382: d93d bls.n 8002400 ::insert_new+0x134> - self.distance_to_initial_bucket >= 0 - 8002384: 0129 lsls r1, r5, #4 - 8002386: 9809 ldr r0, [sp, #36] ; 0x24 - 8002388: 1840 adds r0, r0, r1 - 800238a: 6845 ldr r5, [r0, #4] - 800238c: 1d06 adds r6, r0, #4 - if current_node.has_value() { - 800238e: 2d00 cmp r5, #0 - 8002390: d421 bmi.n 80023d6 ::insert_new+0x10a> - if current_node.distance() <= new_node.distance() { - 8002392: 429d cmp r5, r3 - 8002394: dd01 ble.n 800239a ::insert_new+0xce> - 8002396: 001d movs r5, r3 - 8002398: e012 b.n 80023c0 ::insert_new+0xf4> - 800239a: 9201 str r2, [sp, #4] - 800239c: 9a09 ldr r2, [sp, #36] ; 0x24 - ptr::write(x, b); - 800239e: 5854 ldr r4, [r2, r1] - ptr::write(y, a); - 80023a0: 9402 str r4, [sp, #8] - 80023a2: 9c01 ldr r4, [sp, #4] - 80023a4: 5054 str r4, [r2, r1] - 80023a6: 6033 str r3, [r6, #0] - ptr::write(x, b); - 80023a8: 89c1 ldrh r1, [r0, #14] - ptr::write(y, a); - 80023aa: 9a03 ldr r2, [sp, #12] - 80023ac: 81c2 strh r2, [r0, #14] - ptr::write(x, b); - 80023ae: 8982 ldrh r2, [r0, #12] - ptr::write(y, a); - 80023b0: 9b04 ldr r3, [sp, #16] - 80023b2: 8183 strh r3, [r0, #12] - ptr::write(x, b); - 80023b4: 6883 ldr r3, [r0, #8] - ptr::write(y, a); - 80023b6: 9e05 ldr r6, [sp, #20] - 80023b8: 6086 str r6, [r0, #8] - 80023ba: a803 add r0, sp, #12 - 80023bc: c00e stmia r0!, {r1, r2, r3} - 80023be: 9a02 ldr r2, [sp, #8] - 80023c0: 9907 ldr r1, [sp, #28] - self.distance_to_initial_bucket += 1; - 80023c2: 1c6b adds r3, r5, #1 - 80023c4: 42ab cmp r3, r5 - 80023c6: d621 bvs.n 800240c ::insert_new+0x140> - 80023c8: 980a ldr r0, [sp, #40] ; 0x28 - 80023ca: 4283 cmp r3, r0 - 80023cc: b408 push {r3} - 80023ce: bc01 pop {r0} - 80023d0: dccc bgt.n 800236c ::insert_new+0xa0> - 80023d2: 980a ldr r0, [sp, #40] ; 0x28 - 80023d4: e7ca b.n 800236c ::insert_new+0xa0> - self.nodes[location] = new_node; - 80023d6: 9c09 ldr r4, [sp, #36] ; 0x24 - 80023d8: 5062 str r2, [r4, r1] - 80023da: 6033 str r3, [r6, #0] - 80023dc: 9903 ldr r1, [sp, #12] - 80023de: 81c1 strh r1, [r0, #14] - 80023e0: 9904 ldr r1, [sp, #16] - 80023e2: 8181 strh r1, [r0, #12] - 80023e4: 9905 ldr r1, [sp, #20] - 80023e6: 6081 str r1, [r0, #8] - 80023e8: 2100 movs r1, #0 - 80023ea: 9a00 ldr r2, [sp, #0] - self.number_of_items += 1; - 80023ec: 1c50 adds r0, r2, #1 - 80023ee: 4149 adcs r1, r1 - 80023f0: 4290 cmp r0, r2 - 80023f2: d31d bcc.n 8002430 ::insert_new+0x164> - 80023f4: 9907 ldr r1, [sp, #28] - 80023f6: 6108 str r0, [r1, #16] - } - 80023f8: b017 add sp, #92 ; 0x5c - 80023fa: bcf0 pop {r4, r5, r6, r7} - 80023fc: bc01 pop {r0} - 80023fe: 4700 bx r0 - 8002400: 4a28 ldr r2, [pc, #160] ; (80024a4 ::insert_new+0x1d8>) - 8002402: 0028 movs r0, r5 - 8002404: 9908 ldr r1, [sp, #32] - 8002406: f006 fe81 bl 800910c - 800240a: defe udf #254 ; 0xfe - self.distance_to_initial_bucket += 1; - 800240c: 4826 ldr r0, [pc, #152] ; (80024a8 ::insert_new+0x1dc>) - 800240e: 211c movs r1, #28 - 8002410: 4a28 ldr r2, [pc, #160] ; (80024b4 ::insert_new+0x1e8>) - 8002412: f006 fe65 bl 80090e0 - 8002416: defe udf #254 ; 0xfe - new_node.hash + new_node.distance() as HashType, - 8002418: 4823 ldr r0, [pc, #140] ; (80024a8 ::insert_new+0x1dc>) - 800241a: 211c movs r1, #28 - 800241c: 4a24 ldr r2, [pc, #144] ; (80024b0 ::insert_new+0x1e4>) - 800241e: f006 fe5f bl 80090e0 - 8002422: defe udf #254 ; 0xfe - (hash as usize) & (len - 1) - 8002424: 4824 ldr r0, [pc, #144] ; (80024b8 ::insert_new+0x1ec>) - 8002426: 2121 movs r1, #33 ; 0x21 - 8002428: 4a24 ldr r2, [pc, #144] ; (80024bc ::insert_new+0x1f0>) - 800242a: f006 fe59 bl 80090e0 - 800242e: defe udf #254 ; 0xfe - self.number_of_items += 1; - 8002430: 481d ldr r0, [pc, #116] ; (80024a8 ::insert_new+0x1dc>) - 8002432: 211c movs r1, #28 - 8002434: 4a1d ldr r2, [pc, #116] ; (80024ac ::insert_new+0x1e0>) - 8002436: f006 fe53 bl 80090e0 - 800243a: defe udf #254 ; 0xfe - self.nodes.len() - 800243c: 6880 ldr r0, [r0, #8] - self.backing_vec_size(), - 800243e: 9015 str r0, [sp, #84] ; 0x54 - 8002440: 2002 movs r0, #2 - 8002442: 9010 str r0, [sp, #64] ; 0x40 - 8002444: a911 add r1, sp, #68 ; 0x44 - 8002446: 910f str r1, [sp, #60] ; 0x3c - 8002448: 2100 movs r1, #0 - 800244a: 910e str r1, [sp, #56] ; 0x38 - 800244c: 910d str r1, [sp, #52] ; 0x34 - 800244e: 900c str r0, [sp, #48] ; 0x30 - 8002450: 480b ldr r0, [pc, #44] ; (8002480 ::insert_new+0x1b4>) - 8002452: 900b str r0, [sp, #44] ; 0x2c - debug_assert!( - 8002454: 480b ldr r0, [pc, #44] ; (8002484 ::insert_new+0x1b8>) - 8002456: 9014 str r0, [sp, #80] ; 0x50 - 8002458: a916 add r1, sp, #88 ; 0x58 - 800245a: 9113 str r1, [sp, #76] ; 0x4c - 800245c: 9012 str r0, [sp, #72] ; 0x48 - 800245e: a815 add r0, sp, #84 ; 0x54 - 8002460: 9011 str r0, [sp, #68] ; 0x44 - self.len() - 8002462: 9216 str r2, [sp, #88] ; 0x58 - 8002464: a80b add r0, sp, #44 ; 0x2c - debug_assert!( - 8002466: 4908 ldr r1, [pc, #32] ; (8002488 ::insert_new+0x1bc>) - 8002468: f006 fe70 bl 800914c - 800246c: defe udf #254 ; 0xfe - debug_assert!(len.is_power_of_two(), "Length must be a power of 2"); - 800246e: 480b ldr r0, [pc, #44] ; (800249c ::insert_new+0x1d0>) - 8002470: 211b movs r1, #27 - 8002472: 4a0b ldr r2, [pc, #44] ; (80024a0 ::insert_new+0x1d4>) - 8002474: f006 fe34 bl 80090e0 - 8002478: defe udf #254 ; 0xfe - ::core::intrinsics::abort(); - 800247a: defe udf #254 ; 0xfe - 800247c: defe udf #254 ; 0xfe - 800247e: 46c0 nop ; (mov r8, r8) - 8002480: 0800ac98 .word 0x0800ac98 - 8002484: 08007f49 .word 0x08007f49 - 8002488: 0800aca8 .word 0x0800aca8 - 800248c: 55555555 .word 0x55555555 - 8002490: 33333333 .word 0x33333333 - 8002494: 0f0f0f0f .word 0x0f0f0f0f - 8002498: 01010101 .word 0x01010101 - 800249c: 0800b37c .word 0x0800b37c - 80024a0: 0800b3a8 .word 0x0800b3a8 - 80024a4: 0800acc8 .word 0x0800acc8 - 80024a8: 0800ab10 .word 0x0800ab10 - 80024ac: 0800acd8 .word 0x0800acd8 - 80024b0: 0800acb8 .word 0x0800acb8 - 80024b4: 0800ade8 .word 0x0800ade8 - 80024b8: 0800b3d0 .word 0x0800b3d0 - 80024bc: 0800b3b8 .word 0x0800b3b8 - -080024c0 ::insert_new>: - fn insert_new(&mut self, key: K, value: V, hash: HashType) -> usize { - 80024c0: b5f0 push {r4, r5, r6, r7, lr} - 80024c2: af03 add r7, sp, #12 - 80024c4: b095 sub sp, #84 ; 0x54 - 80024c6: 001c movs r4, r3 - 80024c8: 0005 movs r5, r0 - self.capacity() > self.len(), - 80024ca: 6903 ldr r3, [r0, #16] - 80024cc: 6940 ldr r0, [r0, #20] - debug_assert!( - 80024ce: 4298 cmp r0, r3 - 80024d0: d800 bhi.n 80024d4 ::insert_new+0x14> - 80024d2: e0bf b.n 8002654 ::insert_new+0x194> - 80024d4: 9302 str r3, [sp, #8] - Self { - 80024d6: 9214 str r2, [sp, #80] ; 0x50 - 80024d8: 2600 movs r6, #0 - 80024da: 9610 str r6, [sp, #64] ; 0x40 - 80024dc: 940f str r4, [sp, #60] ; 0x3c - let mut new_node = Node::new_with(key, value, hash); - 80024de: c905 ldmia r1!, {r0, r2} - 80024e0: 6809 ldr r1, [r1, #0] - 80024e2: 9113 str r1, [sp, #76] ; 0x4c - 80024e4: 9212 str r2, [sp, #72] ; 0x48 - 80024e6: 9011 str r0, [sp, #68] ; 0x44 - 80024e8: 68a8 ldr r0, [r5, #8] - 80024ea: 2218 movs r2, #24 - 80024ec: 9008 str r0, [sp, #32] - 80024ee: 0031 movs r1, r6 - 80024f0: 9206 str r2, [sp, #24] - 80024f2: 0033 movs r3, r6 - 80024f4: f006 fe98 bl 8009228 <__aeabi_lmul> - 80024f8: 1e4a subs r2, r1, #1 - 80024fa: 4191 sbcs r1, r2 - 80024fc: 9101 str r1, [sp, #4] - 80024fe: 2101 movs r1, #1 - 8002500: 2800 cmp r0, #0 - 8002502: 9103 str r1, [sp, #12] - 8002504: d400 bmi.n 8002508 ::insert_new+0x48> - 8002506: 0031 movs r1, r6 - 8002508: 9100 str r1, [sp, #0] - 800250a: 9507 str r5, [sp, #28] - 800250c: 682a ldr r2, [r5, #0] - 800250e: 2503 movs r5, #3 - 8002510: 4015 ands r5, r2 - 8002512: 1e68 subs r0, r5, #1 - 8002514: 4185 sbcs r5, r0 - 8002516: 4251 negs r1, r2 - 8002518: 9205 str r2, [sp, #20] - 800251a: 4151 adcs r1, r2 - 800251c: 9808 ldr r0, [sp, #32] - 800251e: 0842 lsrs r2, r0, #1 - 8002520: 4b5f ldr r3, [pc, #380] ; (80026a0 ::insert_new+0x1e0>) - 8002522: 4013 ands r3, r2 - 8002524: 1ac2 subs r2, r0, r3 - 8002526: 9604 str r6, [sp, #16] - 8002528: 0896 lsrs r6, r2, #2 - 800252a: 4b5e ldr r3, [pc, #376] ; (80026a4 ::insert_new+0x1e4>) - 800252c: 401a ands r2, r3 - 800252e: 4b5d ldr r3, [pc, #372] ; (80026a4 ::insert_new+0x1e4>) - 8002530: 401e ands r6, r3 - 8002532: 1992 adds r2, r2, r6 - 8002534: 9e04 ldr r6, [sp, #16] - 8002536: 0913 lsrs r3, r2, #4 - 8002538: 18d2 adds r2, r2, r3 - 800253a: 4b5b ldr r3, [pc, #364] ; (80026a8 ::insert_new+0x1e8>) - 800253c: 4013 ands r3, r2 - 800253e: 4a5b ldr r2, [pc, #364] ; (80026ac ::insert_new+0x1ec>) - 8002540: 435a muls r2, r3 - 8002542: 0e12 lsrs r2, r2, #24 - 8002544: 1e43 subs r3, r0, #1 - 8002546: 4176 adcs r6, r6 - debug_assert!(len.is_power_of_two(), "Length must be a power of 2"); - 8002548: 2a01 cmp r2, #1 - 800254a: d000 beq.n 800254e ::insert_new+0x8e> - 800254c: e09b b.n 8002686 ::insert_new+0x1c6> - 800254e: 9803 ldr r0, [sp, #12] - 8002550: 1b82 subs r2, r0, r6 - (hash as usize) & (len - 1) - 8002552: d171 bne.n 8002638 ::insert_new+0x178> - 8002554: 4329 orrs r1, r5 - 8002556: d102 bne.n 800255e ::insert_new+0x9e> - 8002558: 9801 ldr r0, [sp, #4] - 800255a: 9900 ldr r1, [sp, #0] - 800255c: 4308 orrs r0, r1 - 800255e: 2800 cmp r0, #0 - 8002560: 9807 ldr r0, [sp, #28] - 8002562: d175 bne.n 8002650 ::insert_new+0x190> - 8002564: 68c2 ldr r2, [r0, #12] - 8002566: 2500 movs r5, #0 - 8002568: 0029 movs r1, r5 - 800256a: 0020 movs r0, r4 - 800256c: e00b b.n 8002586 ::insert_new+0xc6> - self.max_distance_to_initial_bucket = - 800256e: 9807 ldr r0, [sp, #28] - 8002570: 60c6 str r6, [r0, #12] - self.distance_to_initial_bucket += 1; - 8002572: 9110 str r1, [sp, #64] ; 0x40 - new_node.hash + new_node.distance() as HashType, - 8002574: 9c0f ldr r4, [sp, #60] ; 0x3c - 8002576: 1860 adds r0, r4, r1 - 8002578: b420 push {r5} - 800257a: bc04 pop {r2} - 800257c: 416a adcs r2, r5 - 800257e: 42a0 cmp r0, r4 - 8002580: b440 push {r6} - 8002582: bc04 pop {r2} - 8002584: d352 bcc.n 800262c ::insert_new+0x16c> - (hash as usize) & (len - 1) - 8002586: 4018 ands r0, r3 - 8002588: 9e08 ldr r6, [sp, #32] - 800258a: 4286 cmp r6, r0 - 800258c: d943 bls.n 8002616 ::insert_new+0x156> - 800258e: 9e06 ldr r6, [sp, #24] - 8002590: 4370 muls r0, r6 - 8002592: 9e05 ldr r6, [sp, #20] - 8002594: 1830 adds r0, r6, r0 - self.distance_to_initial_bucket >= 0 - 8002596: 6846 ldr r6, [r0, #4] - if current_node.has_value() { - 8002598: 2e00 cmp r6, #0 - 800259a: d42c bmi.n 80025f6 ::insert_new+0x136> - if current_node.distance() <= new_node.distance() { - 800259c: 428e cmp r6, r1 - 800259e: b402 push {r1} - 80025a0: bc40 pop {r6} - 80025a2: dc1f bgt.n 80025e4 ::insert_new+0x124> - is_aligned_and_not_null(x) - 80025a4: 0781 lsls r1, r0, #30 - 80025a6: d153 bne.n 8002650 ::insert_new+0x190> - 80025a8: ae0f add r6, sp, #60 ; 0x3c - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 80025aa: 1b81 subs r1, r0, r6 - 80025ac: d200 bcs.n 80025b0 ::insert_new+0xf0> - 80025ae: 1a31 subs r1, r6, r0 - if !$e { - 80025b0: 2917 cmp r1, #23 - 80025b2: d94d bls.n 8002650 ::insert_new+0x190> - let b = ptr::read(y); - 80025b4: 6801 ldr r1, [r0, #0] - copy_nonoverlapping(&src as *const T, dst, 1); - 80025b6: 6004 str r4, [r0, #0] - 80025b8: 910f str r1, [sp, #60] ; 0x3c - 80025ba: 6841 ldr r1, [r0, #4] - let a = ptr::read(x); - 80025bc: 9c10 ldr r4, [sp, #64] ; 0x40 - 80025be: 6044 str r4, [r0, #4] - 80025c0: 9110 str r1, [sp, #64] ; 0x40 - let b = ptr::read(y); - 80025c2: 6881 ldr r1, [r0, #8] - let a = ptr::read(x); - 80025c4: 9c11 ldr r4, [sp, #68] ; 0x44 - 80025c6: 6084 str r4, [r0, #8] - 80025c8: 9111 str r1, [sp, #68] ; 0x44 - let b = ptr::read(y); - 80025ca: 68c1 ldr r1, [r0, #12] - let a = ptr::read(x); - 80025cc: 9c12 ldr r4, [sp, #72] ; 0x48 - 80025ce: 60c4 str r4, [r0, #12] - 80025d0: 9112 str r1, [sp, #72] ; 0x48 - let b = ptr::read(y); - 80025d2: 6901 ldr r1, [r0, #16] - let a = ptr::read(x); - 80025d4: 9c13 ldr r4, [sp, #76] ; 0x4c - 80025d6: 6104 str r4, [r0, #16] - 80025d8: 9113 str r1, [sp, #76] ; 0x4c - let b = ptr::read(y); - 80025da: 6941 ldr r1, [r0, #20] - let a = ptr::read(x); - 80025dc: 9c14 ldr r4, [sp, #80] ; 0x50 - 80025de: 6144 str r4, [r0, #20] - 80025e0: 9114 str r1, [sp, #80] ; 0x50 - self.distance_to_initial_bucket += 1; - 80025e2: 9e10 ldr r6, [sp, #64] ; 0x40 - 80025e4: 1c71 adds r1, r6, #1 - 80025e6: 42b1 cmp r1, r6 - 80025e8: d61a bvs.n 8002620 ::insert_new+0x160> - 80025ea: 4291 cmp r1, r2 - 80025ec: b402 push {r1} - 80025ee: bc40 pop {r6} - 80025f0: dcbd bgt.n 800256e ::insert_new+0xae> - 80025f2: 0016 movs r6, r2 - 80025f4: e7bb b.n 800256e ::insert_new+0xae> - 80025f6: a90f add r1, sp, #60 ; 0x3c - 80025f8: 2218 movs r2, #24 - self.nodes[location] = new_node; - 80025fa: f006 fe5f bl 80092bc <__aeabi_memmove4> - 80025fe: 2100 movs r1, #0 - 8002600: 9a02 ldr r2, [sp, #8] - self.number_of_items += 1; - 8002602: 1c50 adds r0, r2, #1 - 8002604: 4149 adcs r1, r1 - 8002606: 4290 cmp r0, r2 - 8002608: d31c bcc.n 8002644 ::insert_new+0x184> - 800260a: 9907 ldr r1, [sp, #28] - 800260c: 6108 str r0, [r1, #16] - } - 800260e: b015 add sp, #84 ; 0x54 - 8002610: bcf0 pop {r4, r5, r6, r7} - 8002612: bc01 pop {r0} - 8002614: 4700 bx r0 - 8002616: 4a28 ldr r2, [pc, #160] ; (80026b8 ::insert_new+0x1f8>) - 8002618: 9908 ldr r1, [sp, #32] - 800261a: f006 fd77 bl 800910c - 800261e: defe udf #254 ; 0xfe - self.distance_to_initial_bucket += 1; - 8002620: 4826 ldr r0, [pc, #152] ; (80026bc ::insert_new+0x1fc>) - 8002622: 211c movs r1, #28 - 8002624: 4a28 ldr r2, [pc, #160] ; (80026c8 ::insert_new+0x208>) - 8002626: f006 fd5b bl 80090e0 - 800262a: defe udf #254 ; 0xfe - new_node.hash + new_node.distance() as HashType, - 800262c: 4823 ldr r0, [pc, #140] ; (80026bc ::insert_new+0x1fc>) - 800262e: 211c movs r1, #28 - 8002630: 4a24 ldr r2, [pc, #144] ; (80026c4 ::insert_new+0x204>) - 8002632: f006 fd55 bl 80090e0 - 8002636: defe udf #254 ; 0xfe - (hash as usize) & (len - 1) - 8002638: 4824 ldr r0, [pc, #144] ; (80026cc ::insert_new+0x20c>) - 800263a: 2121 movs r1, #33 ; 0x21 - 800263c: 4a24 ldr r2, [pc, #144] ; (80026d0 ::insert_new+0x210>) - 800263e: f006 fd4f bl 80090e0 - 8002642: defe udf #254 ; 0xfe - self.number_of_items += 1; - 8002644: 481d ldr r0, [pc, #116] ; (80026bc ::insert_new+0x1fc>) - 8002646: 211c movs r1, #28 - 8002648: 4a1d ldr r2, [pc, #116] ; (80026c0 ::insert_new+0x200>) - 800264a: f006 fd49 bl 80090e0 - 800264e: defe udf #254 ; 0xfe - 8002650: defe udf #254 ; 0xfe - 8002652: defe udf #254 ; 0xfe - self.nodes.len() - 8002654: 68a8 ldr r0, [r5, #8] - self.backing_vec_size(), - 8002656: 900d str r0, [sp, #52] ; 0x34 - 8002658: 2002 movs r0, #2 - 800265a: 9014 str r0, [sp, #80] ; 0x50 - 800265c: a909 add r1, sp, #36 ; 0x24 - 800265e: 9113 str r1, [sp, #76] ; 0x4c - 8002660: 2100 movs r1, #0 - 8002662: 9112 str r1, [sp, #72] ; 0x48 - 8002664: 9111 str r1, [sp, #68] ; 0x44 - 8002666: 9010 str r0, [sp, #64] ; 0x40 - 8002668: 480a ldr r0, [pc, #40] ; (8002694 ::insert_new+0x1d4>) - 800266a: 900f str r0, [sp, #60] ; 0x3c - debug_assert!( - 800266c: 480a ldr r0, [pc, #40] ; (8002698 ::insert_new+0x1d8>) - 800266e: 900c str r0, [sp, #48] ; 0x30 - 8002670: a90e add r1, sp, #56 ; 0x38 - 8002672: 910b str r1, [sp, #44] ; 0x2c - 8002674: 900a str r0, [sp, #40] ; 0x28 - 8002676: a80d add r0, sp, #52 ; 0x34 - 8002678: 9009 str r0, [sp, #36] ; 0x24 - self.len() - 800267a: 930e str r3, [sp, #56] ; 0x38 - 800267c: a80f add r0, sp, #60 ; 0x3c - debug_assert!( - 800267e: 4907 ldr r1, [pc, #28] ; (800269c ::insert_new+0x1dc>) - 8002680: f006 fd64 bl 800914c - 8002684: defe udf #254 ; 0xfe - debug_assert!(len.is_power_of_two(), "Length must be a power of 2"); - 8002686: 480a ldr r0, [pc, #40] ; (80026b0 ::insert_new+0x1f0>) - 8002688: 211b movs r1, #27 - 800268a: 4a0a ldr r2, [pc, #40] ; (80026b4 ::insert_new+0x1f4>) - 800268c: f006 fd28 bl 80090e0 - 8002690: defe udf #254 ; 0xfe - 8002692: 46c0 nop ; (mov r8, r8) - 8002694: 0800ac98 .word 0x0800ac98 - 8002698: 08007f49 .word 0x08007f49 - 800269c: 0800aca8 .word 0x0800aca8 - 80026a0: 55555555 .word 0x55555555 - 80026a4: 33333333 .word 0x33333333 - 80026a8: 0f0f0f0f .word 0x0f0f0f0f - 80026ac: 01010101 .word 0x01010101 - 80026b0: 0800b37c .word 0x0800b37c - 80026b4: 0800b3a8 .word 0x0800b3a8 - 80026b8: 0800acc8 .word 0x0800acc8 - 80026bc: 0800ab10 .word 0x0800ab10 - 80026c0: 0800acd8 .word 0x0800acd8 - 80026c4: 0800acb8 .word 0x0800acb8 - 80026c8: 0800ade8 .word 0x0800ade8 - 80026cc: 0800b3d0 .word 0x0800b3d0 - 80026d0: 0800b3b8 .word 0x0800b3b8 - -080026d4 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715>: - fn location(&self, key: &K, hash: HashType) -> Option - 80026d4: b5f0 push {r4, r5, r6, r7, lr} - 80026d6: af03 add r7, sp, #12 - 80026d8: b089 sub sp, #36 ; 0x24 - 80026da: 9207 str r2, [sp, #28] - for distance_to_initial_bucket in 0..(self.max_distance_to_initial_bucket + 1) { - 80026dc: 68c3 ldr r3, [r0, #12] - 80026de: 1c5a adds r2, r3, #1 - 80026e0: 9208 str r2, [sp, #32] - 80026e2: 9a08 ldr r2, [sp, #32] - 80026e4: 429a cmp r2, r3 - 80026e6: d675 bvs.n 80027d4 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x100> - 80026e8: 9101 str r1, [sp, #4] - 80026ea: 6805 ldr r5, [r0, #0] - 80026ec: 2103 movs r1, #3 - 80026ee: 4029 ands r1, r5 - 80026f0: 424a negs r2, r1 - 80026f2: 414a adcs r2, r1 - 80026f4: 9203 str r2, [sp, #12] - 80026f6: 1e69 subs r1, r5, #1 - 80026f8: 9505 str r5, [sp, #20] - 80026fa: 418d sbcs r5, r1 - 80026fc: 210f movs r1, #15 - 80026fe: 070a lsls r2, r1, #28 - 8002700: 6881 ldr r1, [r0, #8] - 8002702: 0008 movs r0, r1 - 8002704: 4390 bics r0, r2 - 8002706: 1a08 subs r0, r1, r0 - 8002708: 1e42 subs r2, r0, #1 - 800270a: 4190 sbcs r0, r2 - 800270c: 2301 movs r3, #1 - 800270e: 2400 movs r4, #0 - 8002710: 010a lsls r2, r1, #4 - 8002712: 9304 str r3, [sp, #16] - 8002714: b408 push {r3} - 8002716: bc04 pop {r2} - 8002718: d400 bmi.n 800271c <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x48> - 800271a: 0022 movs r2, r4 - 800271c: 9202 str r2, [sp, #8] - 800271e: 084a lsrs r2, r1, #1 - 8002720: 4e37 ldr r6, [pc, #220] ; (8002800 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x12c>) - 8002722: 4016 ands r6, r2 - 8002724: 1b8a subs r2, r1, r6 - 8002726: 4e37 ldr r6, [pc, #220] ; (8002804 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x130>) - 8002728: 0893 lsrs r3, r2, #2 - 800272a: 4032 ands r2, r6 - 800272c: 4033 ands r3, r6 - 800272e: 18d2 adds r2, r2, r3 - 8002730: 0913 lsrs r3, r2, #4 - 8002732: 18d2 adds r2, r2, r3 - 8002734: 4b34 ldr r3, [pc, #208] ; (8002808 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x134>) - 8002736: 4013 ands r3, r2 - 8002738: 4a34 ldr r2, [pc, #208] ; (800280c <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x138>) - 800273a: 435a muls r2, r3 - 800273c: 0e12 lsrs r2, r2, #24 - 800273e: 1e4b subs r3, r1, #1 - 8002740: 9306 str r3, [sp, #24] - 8002742: 4164 adcs r4, r4 - debug_assert!(len.is_power_of_two(), "Length must be a power of 2"); - 8002744: 2a01 cmp r2, #1 - 8002746: d10d bne.n 8002764 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x90> - 8002748: 9a04 ldr r2, [sp, #16] - 800274a: 1b12 subs r2, r2, r4 - (hash as usize) & (len - 1) - 800274c: d148 bne.n 80027e0 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x10c> - 800274e: 9a03 ldr r2, [sp, #12] - 8002750: 4015 ands r5, r2 - is_aligned_and_not_null(data) - 8002752: d002 beq.n 800275a <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x86> - 8002754: 9a02 ldr r2, [sp, #8] - 8002756: 4310 orrs r0, r2 - 8002758: d00d beq.n 8002776 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0xa2> -} - -impl RangeIteratorImpl for ops::Range { - #[inline] - fn spec_next(&mut self) -> Option { - if self.start < self.end { - 800275a: 9808 ldr r0, [sp, #32] - 800275c: 2801 cmp r0, #1 - 800275e: db04 blt.n 800276a <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x96> - ::core::intrinsics::abort(); - 8002760: defe udf #254 ; 0xfe - 8002762: defe udf #254 ; 0xfe - 8002764: 9808 ldr r0, [sp, #32] - 8002766: 2801 cmp r0, #1 - 8002768: da43 bge.n 80027f2 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x11e> - 800276a: 2000 movs r0, #0 - } - 800276c: 0019 movs r1, r3 - 800276e: b009 add sp, #36 ; 0x24 - 8002770: bcf0 pop {r4, r5, r6, r7} - 8002772: bc04 pop {r2} - 8002774: 4710 bx r2 - 8002776: 9c08 ldr r4, [sp, #32] - 8002778: 17e0 asrs r0, r4, #31 - 800277a: 4384 bics r4, r0 - 800277c: 9801 ldr r0, [sp, #4] - 800277e: 6800 ldr r0, [r0, #0] - 8002780: 9008 str r0, [sp, #32] - 8002782: 2000 movs r0, #0 - 8002784: 2201 movs r2, #1 - 8002786: 9204 str r2, [sp, #16] - 8002788: 0005 movs r5, r0 - 800278a: 42ac cmp r4, r5 - 800278c: d0ee beq.n 800276c <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x98> - 800278e: 9e07 ldr r6, [sp, #28] - hash + distance_to_initial_bucket as HashType, - 8002790: 1973 adds r3, r6, r5 - 8002792: b401 push {r0} - 8002794: bc04 pop {r2} - 8002796: 4142 adcs r2, r0 - 8002798: 42b3 cmp r3, r6 - 800279a: d310 bcc.n 80027be <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0xea> - (hash as usize) & (len - 1) - 800279c: 9a06 ldr r2, [sp, #24] - 800279e: 4013 ands r3, r2 - &(*slice)[self] - 80027a0: 4299 cmp r1, r3 - 80027a2: d912 bls.n 80027ca <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0xf6> - if self.distance_to_initial_bucket >= 0 { - 80027a4: 011a lsls r2, r3, #4 - 80027a6: 9e05 ldr r6, [sp, #20] - 80027a8: 18b2 adds r2, r6, r2 - 80027aa: 6856 ldr r6, [r2, #4] - if let Some(node_key_ref) = node.key_ref() { - 80027ac: 2e00 cmp r6, #0 - 80027ae: d4dd bmi.n 800276c <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x98> - if node_key_ref == key { - 80027b0: 6892 ldr r2, [r2, #8] - unsafe { intrinsics::unchecked_add(self, rhs) } - 80027b2: 1c6d adds r5, r5, #1 - 80027b4: 9e08 ldr r6, [sp, #32] - 80027b6: 42b2 cmp r2, r6 - 80027b8: d1e7 bne.n 800278a <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0xb6> - 80027ba: 9804 ldr r0, [sp, #16] - 80027bc: e7d6 b.n 800276c <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x98> - hash + distance_to_initial_bucket as HashType, - 80027be: 4817 ldr r0, [pc, #92] ; (800281c <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x148>) - 80027c0: 211c movs r1, #28 - 80027c2: 4a17 ldr r2, [pc, #92] ; (8002820 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x14c>) - 80027c4: f006 fc8c bl 80090e0 - 80027c8: defe udf #254 ; 0xfe - 80027ca: 4a13 ldr r2, [pc, #76] ; (8002818 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x144>) - 80027cc: 0018 movs r0, r3 - 80027ce: f006 fc9d bl 800910c - 80027d2: defe udf #254 ; 0xfe - for distance_to_initial_bucket in 0..(self.max_distance_to_initial_bucket + 1) { - 80027d4: 4811 ldr r0, [pc, #68] ; (800281c <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x148>) - 80027d6: 211c movs r1, #28 - 80027d8: 4a14 ldr r2, [pc, #80] ; (800282c <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x158>) - 80027da: f006 fc81 bl 80090e0 - 80027de: defe udf #254 ; 0xfe - 80027e0: 9808 ldr r0, [sp, #32] - 80027e2: 2801 cmp r0, #1 - 80027e4: dbc1 blt.n 800276a <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x96> - (hash as usize) & (len - 1) - 80027e6: 480f ldr r0, [pc, #60] ; (8002824 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x150>) - 80027e8: 2121 movs r1, #33 ; 0x21 - 80027ea: 4a0f ldr r2, [pc, #60] ; (8002828 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x154>) - 80027ec: f006 fc78 bl 80090e0 - 80027f0: defe udf #254 ; 0xfe - debug_assert!(len.is_power_of_two(), "Length must be a power of 2"); - 80027f2: 4807 ldr r0, [pc, #28] ; (8002810 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x13c>) - 80027f4: 211b movs r1, #27 - 80027f6: 4a07 ldr r2, [pc, #28] ; (8002814 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715+0x140>) - 80027f8: f006 fc72 bl 80090e0 - 80027fc: defe udf #254 ; 0xfe - 80027fe: 46c0 nop ; (mov r8, r8) - 8002800: 55555555 .word 0x55555555 - 8002804: 33333333 .word 0x33333333 - 8002808: 0f0f0f0f .word 0x0f0f0f0f - 800280c: 01010101 .word 0x01010101 - 8002810: 0800b37c .word 0x0800b37c - 8002814: 0800b3a8 .word 0x0800b3a8 - 8002818: 0800ad94 .word 0x0800ad94 - 800281c: 0800ab10 .word 0x0800ab10 - 8002820: 0800ad84 .word 0x0800ad84 - 8002824: 0800b3d0 .word 0x0800b3d0 - 8002828: 0800b3b8 .word 0x0800b3b8 - 800282c: 0800ad74 .word 0x0800ad74 - -08002830 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715>: - fn location(&self, key: &K, hash: HashType) -> Option - 8002830: b5f0 push {r4, r5, r6, r7, lr} - 8002832: af03 add r7, sp, #12 - 8002834: b08b sub sp, #44 ; 0x2c - 8002836: 9209 str r2, [sp, #36] ; 0x24 - 8002838: 0004 movs r4, r0 - for distance_to_initial_bucket in 0..(self.max_distance_to_initial_bucket + 1) { - 800283a: 68c0 ldr r0, [r0, #12] - 800283c: 1c42 adds r2, r0, #1 - 800283e: 4282 cmp r2, r0 - 8002840: d700 bvc.n 8002844 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x14> - 8002842: e089 b.n 8002958 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x128> - 8002844: 9101 str r1, [sp, #4] - 8002846: 9205 str r2, [sp, #20] - 8002848: 68a0 ldr r0, [r4, #8] - 800284a: 2218 movs r2, #24 - 800284c: 2600 movs r6, #0 - 800284e: 900a str r0, [sp, #40] ; 0x28 - 8002850: 0031 movs r1, r6 - 8002852: 9207 str r2, [sp, #28] - 8002854: 0033 movs r3, r6 - 8002856: f006 fce7 bl 8009228 <__aeabi_lmul> - 800285a: 1e4a subs r2, r1, #1 - 800285c: 4191 sbcs r1, r2 - 800285e: 9103 str r1, [sp, #12] - 8002860: 2101 movs r1, #1 - 8002862: 2800 cmp r0, #0 - 8002864: 9104 str r1, [sp, #16] - 8002866: b402 push {r1} - 8002868: bc01 pop {r0} - 800286a: d400 bmi.n 800286e <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x3e> - 800286c: 0030 movs r0, r6 - 800286e: 9002 str r0, [sp, #8] - 8002870: 6820 ldr r0, [r4, #0] - 8002872: 2203 movs r2, #3 - 8002874: 4002 ands r2, r0 - 8002876: 4251 negs r1, r2 - 8002878: 4151 adcs r1, r2 - 800287a: 1e43 subs r3, r0, #1 - 800287c: 9006 str r0, [sp, #24] - 800287e: b401 push {r0} - 8002880: bc04 pop {r2} - 8002882: 419a sbcs r2, r3 - 8002884: 980a ldr r0, [sp, #40] ; 0x28 - 8002886: 0843 lsrs r3, r0, #1 - 8002888: 4d3d ldr r5, [pc, #244] ; (8002980 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x150>) - 800288a: 401d ands r5, r3 - 800288c: 1b43 subs r3, r0, r5 - 800288e: 4d3d ldr r5, [pc, #244] ; (8002984 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x154>) - 8002890: 089c lsrs r4, r3, #2 - 8002892: 402b ands r3, r5 - 8002894: 402c ands r4, r5 - 8002896: 191b adds r3, r3, r4 - 8002898: 091c lsrs r4, r3, #4 - 800289a: 191b adds r3, r3, r4 - 800289c: 4c3a ldr r4, [pc, #232] ; (8002988 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x158>) - 800289e: 401c ands r4, r3 - 80028a0: 4b3a ldr r3, [pc, #232] ; (800298c <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x15c>) - 80028a2: 4363 muls r3, r4 - 80028a4: 0e1b lsrs r3, r3, #24 - 80028a6: 1e40 subs r0, r0, #1 - 80028a8: 9008 str r0, [sp, #32] - 80028aa: 4176 adcs r6, r6 - debug_assert!(len.is_power_of_two(), "Length must be a power of 2"); - 80028ac: 2b01 cmp r3, #1 - 80028ae: d10d bne.n 80028cc <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x9c> - 80028b0: 9804 ldr r0, [sp, #16] - 80028b2: 1b83 subs r3, r0, r6 - 80028b4: 9d05 ldr r5, [sp, #20] - (hash as usize) & (len - 1) - 80028b6: d155 bne.n 8002964 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x134> - 80028b8: 400a ands r2, r1 - 80028ba: d003 beq.n 80028c4 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x94> - 80028bc: 9803 ldr r0, [sp, #12] - 80028be: 9902 ldr r1, [sp, #8] - 80028c0: 4308 orrs r0, r1 - if !$e { - 80028c2: d00c beq.n 80028de <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0xae> - 80028c4: 2d01 cmp r5, #1 - 80028c6: db04 blt.n 80028d2 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0xa2> - ::core::intrinsics::abort(); - 80028c8: defe udf #254 ; 0xfe - 80028ca: defe udf #254 ; 0xfe - 80028cc: 9805 ldr r0, [sp, #20] - 80028ce: 2801 cmp r0, #1 - 80028d0: da50 bge.n 8002974 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x144> - 80028d2: 2300 movs r3, #0 - } - 80028d4: 0018 movs r0, r3 - 80028d6: b00b add sp, #44 ; 0x2c - 80028d8: bcf0 pop {r4, r5, r6, r7} - 80028da: bc04 pop {r2} - 80028dc: 4710 bx r2 - 80028de: 17e8 asrs r0, r5, #31 - 80028e0: 4385 bics r5, r0 - 80028e2: 9801 ldr r0, [sp, #4] - 80028e4: 8901 ldrh r1, [r0, #8] - 80028e6: 9103 str r1, [sp, #12] - 80028e8: 6801 ldr r1, [r0, #0] - 80028ea: 9105 str r1, [sp, #20] - 80028ec: 6840 ldr r0, [r0, #4] - 80028ee: 9004 str r0, [sp, #16] - 80028f0: 2300 movs r3, #0 - 80028f2: 2001 movs r0, #1 - 80028f4: 9002 str r0, [sp, #8] - 80028f6: 0018 movs r0, r3 - 80028f8: 4285 cmp r5, r0 - 80028fa: d0eb beq.n 80028d4 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0xa4> - 80028fc: 9c09 ldr r4, [sp, #36] ; 0x24 - hash + distance_to_initial_bucket as HashType, - 80028fe: 1821 adds r1, r4, r0 - 8002900: b408 push {r3} - 8002902: bc04 pop {r2} - 8002904: 415a adcs r2, r3 - 8002906: 42a1 cmp r1, r4 - 8002908: d31a bcc.n 8002940 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x110> - (hash as usize) & (len - 1) - 800290a: 9a08 ldr r2, [sp, #32] - 800290c: 4011 ands r1, r2 - 800290e: 9a0a ldr r2, [sp, #40] ; 0x28 - 8002910: 428a cmp r2, r1 - 8002912: d91b bls.n 800294c <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x11c> - if self.distance_to_initial_bucket >= 0 { - 8002914: 9a07 ldr r2, [sp, #28] - 8002916: 434a muls r2, r1 - 8002918: 9c06 ldr r4, [sp, #24] - 800291a: 18a2 adds r2, r4, r2 - 800291c: 6854 ldr r4, [r2, #4] - if let Some(node_key_ref) = node.key_ref() { - 800291e: 2c00 cmp r4, #0 - 8002920: d4d8 bmi.n 80028d4 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0xa4> - if node_key_ref == key { - 8002922: 6894 ldr r4, [r2, #8] - 8002924: 1c40 adds r0, r0, #1 - 8002926: 9e05 ldr r6, [sp, #20] - 8002928: 42b4 cmp r4, r6 - 800292a: d1e5 bne.n 80028f8 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0xc8> - 800292c: 68d4 ldr r4, [r2, #12] - 800292e: 9e04 ldr r6, [sp, #16] - 8002930: 42b4 cmp r4, r6 - 8002932: d1e1 bne.n 80028f8 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0xc8> - 8002934: 8a12 ldrh r2, [r2, #16] - 8002936: 9c03 ldr r4, [sp, #12] - 8002938: 42a2 cmp r2, r4 - 800293a: d1dd bne.n 80028f8 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0xc8> - 800293c: 9b02 ldr r3, [sp, #8] - 800293e: e7c9 b.n 80028d4 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0xa4> - hash + distance_to_initial_bucket as HashType, - 8002940: 4816 ldr r0, [pc, #88] ; (800299c <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x16c>) - 8002942: 211c movs r1, #28 - 8002944: 4a16 ldr r2, [pc, #88] ; (80029a0 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x170>) - 8002946: f006 fbcb bl 80090e0 - 800294a: defe udf #254 ; 0xfe - 800294c: 4a12 ldr r2, [pc, #72] ; (8002998 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x168>) - 800294e: 0008 movs r0, r1 - 8002950: 990a ldr r1, [sp, #40] ; 0x28 - 8002952: f006 fbdb bl 800910c - 8002956: defe udf #254 ; 0xfe - for distance_to_initial_bucket in 0..(self.max_distance_to_initial_bucket + 1) { - 8002958: 4810 ldr r0, [pc, #64] ; (800299c <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x16c>) - 800295a: 211c movs r1, #28 - 800295c: 4a13 ldr r2, [pc, #76] ; (80029ac <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x17c>) - 800295e: f006 fbbf bl 80090e0 - 8002962: defe udf #254 ; 0xfe - 8002964: 2d01 cmp r5, #1 - 8002966: dbb4 blt.n 80028d2 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0xa2> - (hash as usize) & (len - 1) - 8002968: 480e ldr r0, [pc, #56] ; (80029a4 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x174>) - 800296a: 2121 movs r1, #33 ; 0x21 - 800296c: 4a0e ldr r2, [pc, #56] ; (80029a8 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x178>) - 800296e: f006 fbb7 bl 80090e0 - 8002972: defe udf #254 ; 0xfe - debug_assert!(len.is_power_of_two(), "Length must be a power of 2"); - 8002974: 4806 ldr r0, [pc, #24] ; (8002990 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x160>) - 8002976: 211b movs r1, #27 - 8002978: 4a06 ldr r2, [pc, #24] ; (8002994 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h8333da0ed6de6b36E.llvm.16354310352647835715+0x164>) - 800297a: f006 fbb1 bl 80090e0 - 800297e: defe udf #254 ; 0xfe - 8002980: 55555555 .word 0x55555555 - 8002984: 33333333 .word 0x33333333 - 8002988: 0f0f0f0f .word 0x0f0f0f0f - 800298c: 01010101 .word 0x01010101 - 8002990: 0800b37c .word 0x0800b37c - 8002994: 0800b3a8 .word 0x0800b3a8 - 8002998: 0800ad94 .word 0x0800ad94 - 800299c: 0800ab10 .word 0x0800ab10 - 80029a0: 0800ad84 .word 0x0800ad84 - 80029a4: 0800b3d0 .word 0x0800b3d0 - 80029a8: 0800b3b8 .word 0x0800b3b8 - 80029ac: 0800ad74 .word 0x0800ad74 - -080029b0 >: -pub unsafe fn drop_in_place(to_drop: *mut T) { - 80029b0: 4770 bx lr - ... - -080029b4 : - regular: Default::default(), - screenblocks: Default::default(), - } - } - - pub fn background( - 80029b4: b5f0 push {r4, r5, r6, r7, lr} - 80029b6: af03 add r7, sp, #12 - 80029b8: b097 sub sp, #92 ; 0x5c - 80029ba: 9309 str r3, [sp, #36] ; 0x24 - 80029bc: 9207 str r2, [sp, #28] - 80029be: 0004 movs r4, r0 - fn new(borrow: &'b Cell) -> Option> { - // NOTE: Unlike BorrowRefMut::clone, new is called to create the initial - // mutable reference, and so there must currently be no existing - // references. Thus, while clone increments the mutable refcount, here - // we explicitly only allow going from UNUSED to UNUSED - 1. - match borrow.get() { - 80029c0: 6808 ldr r0, [r1, #0] - 80029c2: 2800 cmp r0, #0 - 80029c4: d000 beq.n 80029c8 - 80029c6: e0dd b.n 8002b84 - 80029c8: 000d movs r5, r1 - 80029ca: 2000 movs r0, #0 - 80029cc: 900c str r0, [sp, #48] ; 0x30 - 80029ce: 43c6 mvns r6, r0 - copy_nonoverlapping(&src as *const T, dst, 1); - 80029d0: 0008 movs r0, r1 - 80029d2: c040 stmia r0!, {r6} - &self, - priority: Priority, - size: RegularBackgroundSize, - ) -> MapLoan<'_, RegularMap> { - let mut regular = self.regular.borrow_mut(); - let new_background = regular.first_zero().unwrap(); - 80029d4: f003 fafa bl 8005fcc ::first_zero> - match self { - 80029d8: 2800 cmp r0, #0 - 80029da: d100 bne.n 80029de - 80029dc: e0d4 b.n 8002b88 - if new_background >= 4 { - 80029de: 2903 cmp r1, #3 - 80029e0: d900 bls.n 80029e4 - 80029e2: e0d7 b.n 8002b94 - 80029e4: 9108 str r1, [sp, #32] - 80029e6: 68a8 ldr r0, [r5, #8] - 80029e8: 2800 cmp r0, #0 - 80029ea: 9b0c ldr r3, [sp, #48] ; 0x30 - 80029ec: d000 beq.n 80029f0 - 80029ee: e0d7 b.n 8002ba0 - 80029f0: 9405 str r4, [sp, #20] - 80029f2: 3420 adds r4, #32 - 80029f4: 9404 str r4, [sp, #16] - 80029f6: 9809 ldr r0, [sp, #36] ; 0x24 - 80029f8: 0600 lsls r0, r0, #24 - 80029fa: 1600 asrs r0, r0, #24 - 80029fc: 0080 lsls r0, r0, #2 - 80029fe: 4970 ldr r1, [pc, #448] ; (8002bc0 ) - 8002a00: 5809 ldr r1, [r1, r0] - 8002a02: 4a70 ldr r2, [pc, #448] ; (8002bc4 ) - 8002a04: 5810 ldr r0, [r2, r0] - 8002a06: 4348 muls r0, r1 - 8002a08: 9006 str r0, [sp, #24] - 8002a0a: 0a81 lsrs r1, r0, #10 - 8002a0c: 0028 movs r0, r5 - 8002a0e: 3008 adds r0, #8 - 8002a10: 9003 str r0, [sp, #12] - 8002a12: 60ae str r6, [r5, #8] - 8002a14: 910e str r1, [sp, #56] ; 0x38 - 8002a16: 2010 movs r0, #16 - 8002a18: 1a40 subs r0, r0, r1 - 8002a1a: 9002 str r0, [sp, #8] - 8002a1c: 68e8 ldr r0, [r5, #12] - 8002a1e: 001e movs r6, r3 -} - -fn find_screenblock_gap(screenblocks: &Bitarray<1>, gap: usize) -> usize { - let mut candidate = 0; - - 'outer: while candidate < 16 - gap { - 8002a20: 950d str r5, [sp, #52] ; 0x34 - 8002a22: 910a str r1, [sp, #40] ; 0x28 - let starting_point = candidate; - for attempt in starting_point..(starting_point + gap) { - 8002a24: 1872 adds r2, r6, r1 - 8002a26: b408 push {r3} - 8002a28: bc02 pop {r1} - 8002a2a: 4159 adcs r1, r3 - 8002a2c: 42b2 cmp r2, r6 - 8002a2e: d200 bcs.n 8002a32 - 8002a30: e096 b.n 8002b60 - 8002a32: 4296 cmp r6, r2 - 8002a34: b440 push {r6} - 8002a36: bc08 pop {r3} - 8002a38: d800 bhi.n 8002a3c - 8002a3a: 0013 movs r3, r2 - 8002a3c: 960b str r6, [sp, #44] ; 0x2c - 8002a3e: 0035 movs r5, r6 - 8002a40: 42ab cmp r3, r5 - 8002a42: d022 beq.n 8002a8a - 8002a44: 002e movs r6, r5 - unsafe { intrinsics::unchecked_add(self, rhs) } - 8002a46: 1c6d adds r5, r5, #1 - if screenblocks.get(attempt) == Some(true) { - 8002a48: 2e1f cmp r6, #31 - 8002a4a: d8f9 bhi.n 8002a40 - 8002a4c: 2401 movs r4, #1 - 8002a4e: 0021 movs r1, r4 - 8002a50: 40b1 lsls r1, r6 - 8002a52: 4001 ands r1, r0 - 8002a54: d0f4 beq.n 8002a40 - 'outer: while candidate < 16 - gap { - 8002a56: 9902 ldr r1, [sp, #8] - 8002a58: 428d cmp r5, r1 - 8002a5a: b420 push {r5} - 8002a5c: bc40 pop {r6} - 8002a5e: 990a ldr r1, [sp, #40] ; 0x28 - 8002a60: 9b0c ldr r3, [sp, #48] ; 0x30 - 8002a62: d3df bcc.n 8002a24 - 8002a64: 9414 str r4, [sp, #80] ; 0x50 - 8002a66: a815 add r0, sp, #84 ; 0x54 - 8002a68: 9013 str r0, [sp, #76] ; 0x4c - 8002a6a: 2000 movs r0, #0 - 8002a6c: 9012 str r0, [sp, #72] ; 0x48 - 8002a6e: 9011 str r0, [sp, #68] ; 0x44 - 8002a70: 2002 movs r0, #2 - 8002a72: 9010 str r0, [sp, #64] ; 0x40 - 8002a74: 4855 ldr r0, [pc, #340] ; (8002bcc ) - 8002a76: 900f str r0, [sp, #60] ; 0x3c - } - - return candidate; - } - - panic!( - 8002a78: 4855 ldr r0, [pc, #340] ; (8002bd0 ) - 8002a7a: 9016 str r0, [sp, #88] ; 0x58 - 8002a7c: a80e add r0, sp, #56 ; 0x38 - 8002a7e: 9015 str r0, [sp, #84] ; 0x54 - 8002a80: a80f add r0, sp, #60 ; 0x3c - 8002a82: 4954 ldr r1, [pc, #336] ; (8002bd4 ) - 8002a84: f006 fb62 bl 800914c - 8002a88: defe udf #254 ; 0xfe - 8002a8a: 990b ldr r1, [sp, #44] ; 0x2c - 8002a8c: 4291 cmp r1, r2 - 8002a8e: d216 bcs.n 8002abe - 8002a90: 9e0b ldr r6, [sp, #44] ; 0x2c - - pub fn set(&mut self, index: usize, value: bool) { - let value = value as u32; - let mask = 1 << (index % 32); - let value_mask = value << (index % 32); - self.a[index / 32] = self.a[index / 32] & !mask | value_mask - 8002a92: 2e20 cmp r6, #32 - 8002a94: 960c str r6, [sp, #48] ; 0x30 - 8002a96: d801 bhi.n 8002a9c - 8002a98: 2120 movs r1, #32 - 8002a9a: 910c str r1, [sp, #48] ; 0x30 - 8002a9c: 221f movs r2, #31 - 8002a9e: 2101 movs r1, #1 - 8002aa0: 9d0a ldr r5, [sp, #40] ; 0x28 - 8002aa2: 9b0c ldr r3, [sp, #48] ; 0x30 - 8002aa4: 42b3 cmp r3, r6 - 8002aa6: d054 beq.n 8002b52 - 8002aa8: 1c74 adds r4, r6, #1 - let mask = 1 << (index % 32); - 8002aaa: 4016 ands r6, r2 - 8002aac: 000b movs r3, r1 - 8002aae: 40b3 lsls r3, r6 - self.a[index / 32] = self.a[index / 32] & !mask | value_mask - 8002ab0: 4318 orrs r0, r3 - 8002ab2: 9b0d ldr r3, [sp, #52] ; 0x34 - 8002ab4: 60d8 str r0, [r3, #12] - #[inline] - fn partial_cmp(&self, other: &$t) -> Option { - Some(self.cmp(other)) - } - #[inline] - fn lt(&self, other: &$t) -> bool { (*self) < (*other) } - 8002ab6: 1e6d subs r5, r5, #1 - 8002ab8: b410 push {r4} - 8002aba: bc40 pop {r6} - 8002abc: d1f1 bne.n 8002aa2 - 8002abe: 20ff movs r0, #255 ; 0xff - let bg = RegularMap::new(new_background as u8, screenblock as u8 + 16, priority, size); - 8002ac0: 9e0b ldr r6, [sp, #44] ; 0x2c - 8002ac2: 4006 ands r6, r0 - 8002ac4: 3610 adds r6, #16 - 8002ac6: 4030 ands r0, r6 - 8002ac8: 1b81 subs r1, r0, r6 - 8002aca: 1e4a subs r2, r1, #1 - 8002acc: 4191 sbcs r1, r2 - 8002ace: 42b0 cmp r0, r6 - 8002ad0: d14c bne.n 8002b6c - 8002ad2: 2500 movs r5, #0 - 8002ad4: 9c06 ldr r4, [sp, #24] - Self::allocate_in(capacity, AllocInit::Uninitialized, alloc) - 8002ad6: 0020 movs r0, r4 - 8002ad8: 0029 movs r1, r5 - 8002ada: f000 faa1 bl 8003020 ::allocate_in> - Vec { buf: RawVec::with_capacity_in(capacity, alloc), len: 0 } - 8002ade: 9511 str r5, [sp, #68] ; 0x44 - 8002ae0: 002a movs r2, r5 - 8002ae2: 9110 str r1, [sp, #64] ; 0x40 - 8002ae4: 900f str r0, [sp, #60] ; 0x3c - 8002ae6: ad0f add r5, sp, #60 ; 0x3c -} - -impl SpecFromElem for T { - default fn from_elem(elem: Self, n: usize, alloc: A) -> Vec { - let mut v = Vec::with_capacity_in(n, alloc); - v.extend_with(n, ExtendElement(elem)); - 8002ae8: 0028 movs r0, r5 - 8002aea: 0021 movs r1, r4 - 8002aec: 0014 movs r4, r2 - 8002aee: f000 fc93 bl 8003418 ::extend_with> - Self { - 8002af2: 746e strb r6, [r5, #17] - 8002af4: 9a08 ldr r2, [sp, #32] - 8002af6: 742a strb r2, [r5, #16] - 8002af8: 9809 ldr r0, [sp, #36] ; 0x24 - 8002afa: 7528 strb r0, [r5, #20] - 8002afc: 2101 movs r1, #1 - 8002afe: 74e9 strb r1, [r5, #19] - 8002b00: 9807 ldr r0, [sp, #28] - 8002b02: 74a8 strb r0, [r5, #18] - 8002b04: 9412 str r4, [sp, #72] ; 0x48 - 8002b06: 0950 lsrs r0, r2, #5 - 8002b08: d125 bne.n 8002b56 - let mask = 1 << (index % 32); - 8002b0a: 4091 lsls r1, r2 - 8002b0c: 9d0d ldr r5, [sp, #52] ; 0x34 - self.a[index / 32] = self.a[index / 32] & !mask | value_mask - 8002b0e: 6868 ldr r0, [r5, #4] - 8002b10: 4308 orrs r0, r1 - 8002b12: 6068 str r0, [r5, #4] - 8002b14: a80f add r0, sp, #60 ; 0x3c - 8002b16: 9e05 ldr r6, [sp, #20] - bg, - 8002b18: 0031 movs r1, r6 - 8002b1a: c81c ldmia r0!, {r2, r3, r4} - 8002b1c: c11c stmia r1!, {r2, r3, r4} - 8002b1e: c81c ldmia r0!, {r2, r3, r4} - 8002b20: c11c stmia r1!, {r2, r3, r4} - 8002b22: 9804 ldr r0, [sp, #16] - screenblock_id: u8, - screenblock_length: u8, - regular_map_list: &'a RefCell>, - screenblock_list: &'a RefCell>, - ) -> Self { - MapLoan { - 8002b24: 990a ldr r1, [sp, #40] ; 0x28 - 8002b26: 7081 strb r1, [r0, #2] - 8002b28: 990b ldr r1, [sp, #44] ; 0x2c - 8002b2a: 7041 strb r1, [r0, #1] - 8002b2c: 9908 ldr r1, [sp, #32] - 8002b2e: 7001 strb r1, [r0, #0] - 8002b30: 61b5 str r5, [r6, #24] - 8002b32: 9803 ldr r0, [sp, #12] - 8002b34: 61f0 str r0, [r6, #28] - let borrow = self.borrow.get(); - 8002b36: 68a8 ldr r0, [r5, #8] - debug_assert!(is_writing(borrow)); - 8002b38: 2800 cmp r0, #0 - 8002b3a: d51d bpl.n 8002b78 - self.borrow.set(borrow + 1); - 8002b3c: 1c40 adds r0, r0, #1 - 8002b3e: 60a8 str r0, [r5, #8] - let borrow = self.borrow.get(); - 8002b40: 6828 ldr r0, [r5, #0] - debug_assert!(is_writing(borrow)); - 8002b42: 2800 cmp r0, #0 - 8002b44: d518 bpl.n 8002b78 - self.borrow.set(borrow + 1); - 8002b46: 1c40 adds r0, r0, #1 - 8002b48: 6028 str r0, [r5, #0] - } - 8002b4a: b017 add sp, #92 ; 0x5c - 8002b4c: bcf0 pop {r4, r5, r6, r7} - 8002b4e: bc01 pop {r0} - 8002b50: 4700 bx r0 - 8002b52: 980c ldr r0, [sp, #48] ; 0x30 - 8002b54: 0940 lsrs r0, r0, #5 - 8002b56: 2101 movs r1, #1 - 8002b58: 4a1f ldr r2, [pc, #124] ; (8002bd8 ) - 8002b5a: f006 fad7 bl 800910c - 8002b5e: defe udf #254 ; 0xfe - for attempt in starting_point..(starting_point + gap) { - 8002b60: 4820 ldr r0, [pc, #128] ; (8002be4 ) - 8002b62: 211c movs r1, #28 - 8002b64: 4a21 ldr r2, [pc, #132] ; (8002bec ) - 8002b66: f006 fabb bl 80090e0 - 8002b6a: defe udf #254 ; 0xfe - let bg = RegularMap::new(new_background as u8, screenblock as u8 + 16, priority, size); - 8002b6c: 481d ldr r0, [pc, #116] ; (8002be4 ) - 8002b6e: 211c movs r1, #28 - 8002b70: 4a1d ldr r2, [pc, #116] ; (8002be8 ) - 8002b72: f006 fab5 bl 80090e0 - 8002b76: defe udf #254 ; 0xfe - 8002b78: 4818 ldr r0, [pc, #96] ; (8002bdc ) - 8002b7a: 2124 movs r1, #36 ; 0x24 - 8002b7c: 4a18 ldr r2, [pc, #96] ; (8002be0 ) - 8002b7e: f006 faaf bl 80090e0 - 8002b82: defe udf #254 ; 0xfe - Err(e) => unwrap_failed(msg, &e), - 8002b84: 480b ldr r0, [pc, #44] ; (8002bb4 ) - 8002b86: e00c b.n 8002ba2 - None => panic("called `Option::unwrap()` on a `None` value"), - 8002b88: 481b ldr r0, [pc, #108] ; (8002bf8 ) - 8002b8a: 212b movs r1, #43 ; 0x2b - 8002b8c: 4a1b ldr r2, [pc, #108] ; (8002bfc ) - 8002b8e: f006 faa7 bl 80090e0 - 8002b92: defe udf #254 ; 0xfe - panic!("can only have 4 active backgrounds"); - 8002b94: 4816 ldr r0, [pc, #88] ; (8002bf0 ) - 8002b96: 2122 movs r1, #34 ; 0x22 - 8002b98: 4a16 ldr r2, [pc, #88] ; (8002bf4 ) - 8002b9a: f006 faa1 bl 80090e0 - 8002b9e: defe udf #254 ; 0xfe - 8002ba0: 4809 ldr r0, [pc, #36] ; (8002bc8 ) - 8002ba2: 9000 str r0, [sp, #0] - 8002ba4: 4804 ldr r0, [pc, #16] ; (8002bb8 ) - 8002ba6: 2110 movs r1, #16 - 8002ba8: aa0f add r2, sp, #60 ; 0x3c - 8002baa: 4b04 ldr r3, [pc, #16] ; (8002bbc ) - 8002bac: f005 fa76 bl 800809c - 8002bb0: defe udf #254 ; 0xfe - 8002bb2: 46c0 nop ; (mov r8, r8) - 8002bb4: 0800aee4 .word 0x0800aee4 - 8002bb8: 0800ae5c .word 0x0800ae5c - 8002bbc: 0800aeb8 .word 0x0800aeb8 - 8002bc0: 0800ae6c .word 0x0800ae6c - 8002bc4: 0800ae7c .word 0x0800ae7c - 8002bc8: 0800af38 .word 0x0800af38 - 8002bcc: 0800af9c .word 0x0800af9c - 8002bd0: 08007f49 .word 0x08007f49 - 8002bd4: 0800afac .word 0x0800afac - 8002bd8: 0800c07c .word 0x0800c07c - 8002bdc: 0800c2ca .word 0x0800c2ca - 8002be0: 0800c2f0 .word 0x0800c2f0 - 8002be4: 0800ae40 .word 0x0800ae40 - 8002be8: 0800af48 .word 0x0800af48 - 8002bec: 0800af58 .word 0x0800af58 - 8002bf0: 0800af04 .word 0x0800af04 - 8002bf4: 0800af28 .word 0x0800af28 - 8002bf8: 0800ae8c .word 0x0800ae8c - 8002bfc: 0800aef4 .word 0x0800aef4 - -08002c00 <<&T as core::fmt::Debug>::fmt>: -macro_rules! fmt_refs { - ($($tr:ident),*) => { - $( - #[stable(feature = "rust1", since = "1.0.0")] - impl $tr for &T { - fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } - 8002c00: b5b0 push {r4, r5, r7, lr} - 8002c02: af02 add r7, sp, #8 - 8002c04: 000c movs r4, r1 - 8002c06: 6805 ldr r5, [r0, #0] - ($($T:ident)*) => {$( - #[stable(feature = "rust1", since = "1.0.0")] - impl fmt::Debug for $T { - #[inline] - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - if f.debug_lower_hex() { - 8002c08: 0008 movs r0, r1 - 8002c0a: f004 fc71 bl 80074f0 - 8002c0e: 2800 cmp r0, #0 - 8002c10: d006 beq.n 8002c20 <<&T as core::fmt::Debug>::fmt+0x20> - fmt::LowerHex::fmt(self, f) - 8002c12: 0028 movs r0, r5 - 8002c14: 0021 movs r1, r4 - 8002c16: f003 fff3 bl 8006c00 ::fmt> - 8002c1a: bcb0 pop {r4, r5, r7} - 8002c1c: bc02 pop {r1} - 8002c1e: 4708 bx r1 - } else if f.debug_upper_hex() { - 8002c20: 0020 movs r0, r4 - 8002c22: f004 fc6a bl 80074fa - 8002c26: 2800 cmp r0, #0 - 8002c28: d006 beq.n 8002c38 <<&T as core::fmt::Debug>::fmt+0x38> - fmt::UpperHex::fmt(self, f) - 8002c2a: 0028 movs r0, r5 - 8002c2c: 0021 movs r1, r4 - 8002c2e: f004 f81f bl 8006c70 ::fmt> - 8002c32: bcb0 pop {r4, r5, r7} - 8002c34: bc02 pop {r1} - 8002c36: 4708 bx r1 - } else { - fmt::Display::fmt(self, f) - 8002c38: 0028 movs r0, r5 - 8002c3a: 0021 movs r1, r4 - 8002c3c: f005 f976 bl 8007f2c ::fmt> - 8002c40: bcb0 pop {r4, r5, r7} - 8002c42: bc02 pop {r1} - 8002c44: 4708 bx r1 - -08002c46 <<&T as core::fmt::Debug>::fmt>: - 8002c46: b5b0 push {r4, r5, r7, lr} - 8002c48: af02 add r7, sp, #8 - 8002c4a: 000c movs r4, r1 - 8002c4c: 6805 ldr r5, [r0, #0] - if f.debug_lower_hex() { - 8002c4e: 0008 movs r0, r1 - 8002c50: f004 fc4e bl 80074f0 - 8002c54: 2800 cmp r0, #0 - 8002c56: d006 beq.n 8002c66 <<&T as core::fmt::Debug>::fmt+0x20> - fmt::LowerHex::fmt(self, f) - 8002c58: 0028 movs r0, r5 - 8002c5a: 0021 movs r1, r4 - 8002c5c: f003 ffd0 bl 8006c00 ::fmt> - 8002c60: bcb0 pop {r4, r5, r7} - 8002c62: bc02 pop {r1} - 8002c64: 4708 bx r1 - } else if f.debug_upper_hex() { - 8002c66: 0020 movs r0, r4 - 8002c68: f004 fc47 bl 80074fa - 8002c6c: 2800 cmp r0, #0 - 8002c6e: d006 beq.n 8002c7e <<&T as core::fmt::Debug>::fmt+0x38> - fmt::UpperHex::fmt(self, f) - 8002c70: 0028 movs r0, r5 - 8002c72: 0021 movs r1, r4 - 8002c74: f003 fffc bl 8006c70 ::fmt> - 8002c78: bcb0 pop {r4, r5, r7} - 8002c7a: bc02 pop {r1} - 8002c7c: 4708 bx r1 - fmt::Display::fmt(self, f) - 8002c7e: 0028 movs r0, r5 - 8002c80: 0021 movs r1, r4 - 8002c82: f005 f961 bl 8007f48 ::fmt> - 8002c86: bcb0 pop {r4, r5, r7} - 8002c88: bc02 pop {r1} - 8002c8a: 4708 bx r1 - -08002c8c <<&T as core::fmt::Debug>::fmt>: - 8002c8c: b5b0 push {r4, r5, r7, lr} - 8002c8e: af02 add r7, sp, #8 - 8002c90: 000c movs r4, r1 - 8002c92: 6805 ldr r5, [r0, #0] - if f.debug_lower_hex() { - 8002c94: 0008 movs r0, r1 - 8002c96: f004 fc2b bl 80074f0 - 8002c9a: 2800 cmp r0, #0 - 8002c9c: d006 beq.n 8002cac <<&T as core::fmt::Debug>::fmt+0x20> - fmt::LowerHex::fmt(self, f) - 8002c9e: 0028 movs r0, r5 - 8002ca0: 0021 movs r1, r4 - 8002ca2: f003 ffad bl 8006c00 ::fmt> - 8002ca6: bcb0 pop {r4, r5, r7} - 8002ca8: bc02 pop {r1} - 8002caa: 4708 bx r1 - } else if f.debug_upper_hex() { - 8002cac: 0020 movs r0, r4 - 8002cae: f004 fc24 bl 80074fa - 8002cb2: 2800 cmp r0, #0 - 8002cb4: d006 beq.n 8002cc4 <<&T as core::fmt::Debug>::fmt+0x38> - fmt::UpperHex::fmt(self, f) - 8002cb6: 0028 movs r0, r5 - 8002cb8: 0021 movs r1, r4 - 8002cba: f003 ffd9 bl 8006c70 ::fmt> - 8002cbe: bcb0 pop {r4, r5, r7} - 8002cc0: bc02 pop {r1} - 8002cc2: 4708 bx r1 - fmt::Display::fmt(self, f) - 8002cc4: 0028 movs r0, r5 - 8002cc6: 0021 movs r1, r4 - 8002cc8: f005 f93e bl 8007f48 ::fmt> - 8002ccc: bcb0 pop {r4, r5, r7} - 8002cce: bc02 pop {r1} - 8002cd0: 4708 bx r1 - ... - -08002cd4 <__RUST_INTERRUPT_HANDLER>: - InterruptRoot::new(Interrupt::Keypad), - InterruptRoot::new(Interrupt::Gamepak), -]; - -#[no_mangle] -extern "C" fn __RUST_INTERRUPT_HANDLER(interrupt: u16) -> u16 { - 8002cd4: b5b0 push {r4, r5, r7, lr} - 8002cd6: af02 add r7, sp, #8 - 8002cd8: b082 sub sp, #8 - 8002cda: 0004 movs r4, r0 - for (i, root) in unsafe { INTERRUPT_TABLE.iter().enumerate() } { - if (1 << i) & interrupt != 0 { - 8002cdc: 07c0 lsls r0, r0, #31 - 8002cde: d124 bne.n 8002d2a <__RUST_INTERRUPT_HANDLER+0x56> - 8002ce0: 07a0 lsls r0, r4, #30 - 8002ce2: d430 bmi.n 8002d46 <__RUST_INTERRUPT_HANDLER+0x72> - 8002ce4: 0760 lsls r0, r4, #29 - 8002ce6: d43c bmi.n 8002d62 <__RUST_INTERRUPT_HANDLER+0x8e> - 8002ce8: 0720 lsls r0, r4, #28 - 8002cea: d448 bmi.n 8002d7e <__RUST_INTERRUPT_HANDLER+0xaa> - 8002cec: 06e0 lsls r0, r4, #27 - 8002cee: d454 bmi.n 8002d9a <__RUST_INTERRUPT_HANDLER+0xc6> - 8002cf0: 06a0 lsls r0, r4, #26 - 8002cf2: d460 bmi.n 8002db6 <__RUST_INTERRUPT_HANDLER+0xe2> - 8002cf4: 0660 lsls r0, r4, #25 - 8002cf6: d46c bmi.n 8002dd2 <__RUST_INTERRUPT_HANDLER+0xfe> - 8002cf8: 0620 lsls r0, r4, #24 - 8002cfa: d478 bmi.n 8002dee <__RUST_INTERRUPT_HANDLER+0x11a> - 8002cfc: 05e0 lsls r0, r4, #23 - 8002cfe: d500 bpl.n 8002d02 <__RUST_INTERRUPT_HANDLER+0x2e> - 8002d00: e083 b.n 8002e0a <__RUST_INTERRUPT_HANDLER+0x136> - 8002d02: 05a0 lsls r0, r4, #22 - 8002d04: d500 bpl.n 8002d08 <__RUST_INTERRUPT_HANDLER+0x34> - 8002d06: e08f b.n 8002e28 <__RUST_INTERRUPT_HANDLER+0x154> - 8002d08: 0560 lsls r0, r4, #21 - 8002d0a: d500 bpl.n 8002d0e <__RUST_INTERRUPT_HANDLER+0x3a> - 8002d0c: e09b b.n 8002e46 <__RUST_INTERRUPT_HANDLER+0x172> - 8002d0e: 0520 lsls r0, r4, #20 - 8002d10: d500 bpl.n 8002d14 <__RUST_INTERRUPT_HANDLER+0x40> - 8002d12: e0a7 b.n 8002e64 <__RUST_INTERRUPT_HANDLER+0x190> - 8002d14: 04e0 lsls r0, r4, #19 - 8002d16: d500 bpl.n 8002d1a <__RUST_INTERRUPT_HANDLER+0x46> - 8002d18: e0b4 b.n 8002e84 <__RUST_INTERRUPT_HANDLER+0x1b0> - 8002d1a: 04a0 lsls r0, r4, #18 - 8002d1c: d500 bpl.n 8002d20 <__RUST_INTERRUPT_HANDLER+0x4c> - 8002d1e: e0c1 b.n 8002ea4 <__RUST_INTERRUPT_HANDLER+0x1d0> - root.trigger_interrupts(); - } - } - - interrupt -} - 8002d20: 0020 movs r0, r4 - 8002d22: b002 add sp, #8 - 8002d24: bcb0 pop {r4, r5, r7} - 8002d26: bc02 pop {r1} - 8002d28: 4708 bx r1 - 8002d2a: 4866 ldr r0, [pc, #408] ; (8002ec4 <__RUST_INTERRUPT_HANDLER+0x1f0>) - 8002d2c: 6805 ldr r5, [r0, #0] -} - -impl InterruptRoot { - fn trigger_interrupts(&self) { - let mut c = self.next.get(); - while !c.is_null() { - 8002d2e: 2d00 cmp r5, #0 - 8002d30: d0d6 beq.n 8002ce0 <__RUST_INTERRUPT_HANDLER+0xc> - let closure_ptr = unsafe { &*c }.closure; - 8002d32: 68a8 ldr r0, [r5, #8] - 8002d34: 68e9 ldr r1, [r5, #12] - let closure_ref = unsafe { &*closure_ptr }; - closure_ref(unsafe { &CriticalSection::new() }); - 8002d36: 694a ldr r2, [r1, #20] - 8002d38: a901 add r1, sp, #4 - 8002d3a: f000 f8c5 bl 8002ec8 <__RUST_INTERRUPT_HANDLER+0x1f4> - 8002d3e: 682d ldr r5, [r5, #0] - while !c.is_null() { - 8002d40: 2d00 cmp r5, #0 - 8002d42: d1f6 bne.n 8002d32 <__RUST_INTERRUPT_HANDLER+0x5e> - 8002d44: e7cc b.n 8002ce0 <__RUST_INTERRUPT_HANDLER+0xc> - 8002d46: 485f ldr r0, [pc, #380] ; (8002ec4 <__RUST_INTERRUPT_HANDLER+0x1f0>) - 8002d48: 68c5 ldr r5, [r0, #12] - 8002d4a: 2d00 cmp r5, #0 - 8002d4c: d0ca beq.n 8002ce4 <__RUST_INTERRUPT_HANDLER+0x10> - let closure_ptr = unsafe { &*c }.closure; - 8002d4e: 68a8 ldr r0, [r5, #8] - 8002d50: 68e9 ldr r1, [r5, #12] - closure_ref(unsafe { &CriticalSection::new() }); - 8002d52: 694a ldr r2, [r1, #20] - 8002d54: a901 add r1, sp, #4 - 8002d56: f000 f8b7 bl 8002ec8 <__RUST_INTERRUPT_HANDLER+0x1f4> - 8002d5a: 682d ldr r5, [r5, #0] - while !c.is_null() { - 8002d5c: 2d00 cmp r5, #0 - 8002d5e: d1f6 bne.n 8002d4e <__RUST_INTERRUPT_HANDLER+0x7a> - 8002d60: e7c0 b.n 8002ce4 <__RUST_INTERRUPT_HANDLER+0x10> - 8002d62: 4858 ldr r0, [pc, #352] ; (8002ec4 <__RUST_INTERRUPT_HANDLER+0x1f0>) - 8002d64: 6985 ldr r5, [r0, #24] - 8002d66: 2d00 cmp r5, #0 - 8002d68: d0be beq.n 8002ce8 <__RUST_INTERRUPT_HANDLER+0x14> - let closure_ptr = unsafe { &*c }.closure; - 8002d6a: 68a8 ldr r0, [r5, #8] - 8002d6c: 68e9 ldr r1, [r5, #12] - closure_ref(unsafe { &CriticalSection::new() }); - 8002d6e: 694a ldr r2, [r1, #20] - 8002d70: a901 add r1, sp, #4 - 8002d72: f000 f8a9 bl 8002ec8 <__RUST_INTERRUPT_HANDLER+0x1f4> - 8002d76: 682d ldr r5, [r5, #0] - while !c.is_null() { - 8002d78: 2d00 cmp r5, #0 - 8002d7a: d1f6 bne.n 8002d6a <__RUST_INTERRUPT_HANDLER+0x96> - 8002d7c: e7b4 b.n 8002ce8 <__RUST_INTERRUPT_HANDLER+0x14> - 8002d7e: 4851 ldr r0, [pc, #324] ; (8002ec4 <__RUST_INTERRUPT_HANDLER+0x1f0>) - 8002d80: 6a45 ldr r5, [r0, #36] ; 0x24 - 8002d82: 2d00 cmp r5, #0 - 8002d84: d0b2 beq.n 8002cec <__RUST_INTERRUPT_HANDLER+0x18> - let closure_ptr = unsafe { &*c }.closure; - 8002d86: 68a8 ldr r0, [r5, #8] - 8002d88: 68e9 ldr r1, [r5, #12] - closure_ref(unsafe { &CriticalSection::new() }); - 8002d8a: 694a ldr r2, [r1, #20] - 8002d8c: a901 add r1, sp, #4 - 8002d8e: f000 f89b bl 8002ec8 <__RUST_INTERRUPT_HANDLER+0x1f4> - 8002d92: 682d ldr r5, [r5, #0] - while !c.is_null() { - 8002d94: 2d00 cmp r5, #0 - 8002d96: d1f6 bne.n 8002d86 <__RUST_INTERRUPT_HANDLER+0xb2> - 8002d98: e7a8 b.n 8002cec <__RUST_INTERRUPT_HANDLER+0x18> - 8002d9a: 484a ldr r0, [pc, #296] ; (8002ec4 <__RUST_INTERRUPT_HANDLER+0x1f0>) - 8002d9c: 6b05 ldr r5, [r0, #48] ; 0x30 - 8002d9e: 2d00 cmp r5, #0 - 8002da0: d0a6 beq.n 8002cf0 <__RUST_INTERRUPT_HANDLER+0x1c> - let closure_ptr = unsafe { &*c }.closure; - 8002da2: 68a8 ldr r0, [r5, #8] - 8002da4: 68e9 ldr r1, [r5, #12] - closure_ref(unsafe { &CriticalSection::new() }); - 8002da6: 694a ldr r2, [r1, #20] - 8002da8: a901 add r1, sp, #4 - 8002daa: f000 f88d bl 8002ec8 <__RUST_INTERRUPT_HANDLER+0x1f4> - 8002dae: 682d ldr r5, [r5, #0] - while !c.is_null() { - 8002db0: 2d00 cmp r5, #0 - 8002db2: d1f6 bne.n 8002da2 <__RUST_INTERRUPT_HANDLER+0xce> - 8002db4: e79c b.n 8002cf0 <__RUST_INTERRUPT_HANDLER+0x1c> - 8002db6: 4843 ldr r0, [pc, #268] ; (8002ec4 <__RUST_INTERRUPT_HANDLER+0x1f0>) - 8002db8: 6bc5 ldr r5, [r0, #60] ; 0x3c - 8002dba: 2d00 cmp r5, #0 - 8002dbc: d09a beq.n 8002cf4 <__RUST_INTERRUPT_HANDLER+0x20> - let closure_ptr = unsafe { &*c }.closure; - 8002dbe: 68a8 ldr r0, [r5, #8] - 8002dc0: 68e9 ldr r1, [r5, #12] - closure_ref(unsafe { &CriticalSection::new() }); - 8002dc2: 694a ldr r2, [r1, #20] - 8002dc4: a901 add r1, sp, #4 - 8002dc6: f000 f87f bl 8002ec8 <__RUST_INTERRUPT_HANDLER+0x1f4> - 8002dca: 682d ldr r5, [r5, #0] - while !c.is_null() { - 8002dcc: 2d00 cmp r5, #0 - 8002dce: d1f6 bne.n 8002dbe <__RUST_INTERRUPT_HANDLER+0xea> - 8002dd0: e790 b.n 8002cf4 <__RUST_INTERRUPT_HANDLER+0x20> - 8002dd2: 483c ldr r0, [pc, #240] ; (8002ec4 <__RUST_INTERRUPT_HANDLER+0x1f0>) - 8002dd4: 6c85 ldr r5, [r0, #72] ; 0x48 - 8002dd6: 2d00 cmp r5, #0 - 8002dd8: d08e beq.n 8002cf8 <__RUST_INTERRUPT_HANDLER+0x24> - let closure_ptr = unsafe { &*c }.closure; - 8002dda: 68a8 ldr r0, [r5, #8] - 8002ddc: 68e9 ldr r1, [r5, #12] - closure_ref(unsafe { &CriticalSection::new() }); - 8002dde: 694a ldr r2, [r1, #20] - 8002de0: a901 add r1, sp, #4 - 8002de2: f000 f871 bl 8002ec8 <__RUST_INTERRUPT_HANDLER+0x1f4> - 8002de6: 682d ldr r5, [r5, #0] - while !c.is_null() { - 8002de8: 2d00 cmp r5, #0 - 8002dea: d1f6 bne.n 8002dda <__RUST_INTERRUPT_HANDLER+0x106> - 8002dec: e784 b.n 8002cf8 <__RUST_INTERRUPT_HANDLER+0x24> - 8002dee: 4835 ldr r0, [pc, #212] ; (8002ec4 <__RUST_INTERRUPT_HANDLER+0x1f0>) - 8002df0: 6d45 ldr r5, [r0, #84] ; 0x54 - 8002df2: 2d00 cmp r5, #0 - 8002df4: d082 beq.n 8002cfc <__RUST_INTERRUPT_HANDLER+0x28> - let closure_ptr = unsafe { &*c }.closure; - 8002df6: 68a8 ldr r0, [r5, #8] - 8002df8: 68e9 ldr r1, [r5, #12] - closure_ref(unsafe { &CriticalSection::new() }); - 8002dfa: 694a ldr r2, [r1, #20] - 8002dfc: a901 add r1, sp, #4 - 8002dfe: f000 f863 bl 8002ec8 <__RUST_INTERRUPT_HANDLER+0x1f4> - 8002e02: 682d ldr r5, [r5, #0] - while !c.is_null() { - 8002e04: 2d00 cmp r5, #0 - 8002e06: d1f6 bne.n 8002df6 <__RUST_INTERRUPT_HANDLER+0x122> - 8002e08: e778 b.n 8002cfc <__RUST_INTERRUPT_HANDLER+0x28> - 8002e0a: 482e ldr r0, [pc, #184] ; (8002ec4 <__RUST_INTERRUPT_HANDLER+0x1f0>) - 8002e0c: 6e05 ldr r5, [r0, #96] ; 0x60 - 8002e0e: 2d00 cmp r5, #0 - 8002e10: d100 bne.n 8002e14 <__RUST_INTERRUPT_HANDLER+0x140> - 8002e12: e776 b.n 8002d02 <__RUST_INTERRUPT_HANDLER+0x2e> - let closure_ptr = unsafe { &*c }.closure; - 8002e14: 68a8 ldr r0, [r5, #8] - 8002e16: 68e9 ldr r1, [r5, #12] - closure_ref(unsafe { &CriticalSection::new() }); - 8002e18: 694a ldr r2, [r1, #20] - 8002e1a: a901 add r1, sp, #4 - 8002e1c: f000 f854 bl 8002ec8 <__RUST_INTERRUPT_HANDLER+0x1f4> - 8002e20: 682d ldr r5, [r5, #0] - while !c.is_null() { - 8002e22: 2d00 cmp r5, #0 - 8002e24: d1f6 bne.n 8002e14 <__RUST_INTERRUPT_HANDLER+0x140> - 8002e26: e76c b.n 8002d02 <__RUST_INTERRUPT_HANDLER+0x2e> - 8002e28: 4826 ldr r0, [pc, #152] ; (8002ec4 <__RUST_INTERRUPT_HANDLER+0x1f0>) - 8002e2a: 6ec5 ldr r5, [r0, #108] ; 0x6c - 8002e2c: 2d00 cmp r5, #0 - 8002e2e: d100 bne.n 8002e32 <__RUST_INTERRUPT_HANDLER+0x15e> - 8002e30: e76a b.n 8002d08 <__RUST_INTERRUPT_HANDLER+0x34> - let closure_ptr = unsafe { &*c }.closure; - 8002e32: 68a8 ldr r0, [r5, #8] - 8002e34: 68e9 ldr r1, [r5, #12] - closure_ref(unsafe { &CriticalSection::new() }); - 8002e36: 694a ldr r2, [r1, #20] - 8002e38: a901 add r1, sp, #4 - 8002e3a: f000 f845 bl 8002ec8 <__RUST_INTERRUPT_HANDLER+0x1f4> - 8002e3e: 682d ldr r5, [r5, #0] - while !c.is_null() { - 8002e40: 2d00 cmp r5, #0 - 8002e42: d1f6 bne.n 8002e32 <__RUST_INTERRUPT_HANDLER+0x15e> - 8002e44: e760 b.n 8002d08 <__RUST_INTERRUPT_HANDLER+0x34> - 8002e46: 481f ldr r0, [pc, #124] ; (8002ec4 <__RUST_INTERRUPT_HANDLER+0x1f0>) - 8002e48: 6f85 ldr r5, [r0, #120] ; 0x78 - 8002e4a: 2d00 cmp r5, #0 - 8002e4c: d100 bne.n 8002e50 <__RUST_INTERRUPT_HANDLER+0x17c> - 8002e4e: e75e b.n 8002d0e <__RUST_INTERRUPT_HANDLER+0x3a> - let closure_ptr = unsafe { &*c }.closure; - 8002e50: 68a8 ldr r0, [r5, #8] - 8002e52: 68e9 ldr r1, [r5, #12] - closure_ref(unsafe { &CriticalSection::new() }); - 8002e54: 694a ldr r2, [r1, #20] - 8002e56: a901 add r1, sp, #4 - 8002e58: f000 f836 bl 8002ec8 <__RUST_INTERRUPT_HANDLER+0x1f4> - 8002e5c: 682d ldr r5, [r5, #0] - while !c.is_null() { - 8002e5e: 2d00 cmp r5, #0 - 8002e60: d1f6 bne.n 8002e50 <__RUST_INTERRUPT_HANDLER+0x17c> - 8002e62: e754 b.n 8002d0e <__RUST_INTERRUPT_HANDLER+0x3a> - 8002e64: 2084 movs r0, #132 ; 0x84 - 8002e66: 4917 ldr r1, [pc, #92] ; (8002ec4 <__RUST_INTERRUPT_HANDLER+0x1f0>) - 8002e68: 580d ldr r5, [r1, r0] - 8002e6a: 2d00 cmp r5, #0 - 8002e6c: d100 bne.n 8002e70 <__RUST_INTERRUPT_HANDLER+0x19c> - 8002e6e: e751 b.n 8002d14 <__RUST_INTERRUPT_HANDLER+0x40> - let closure_ptr = unsafe { &*c }.closure; - 8002e70: 68a8 ldr r0, [r5, #8] - 8002e72: 68e9 ldr r1, [r5, #12] - closure_ref(unsafe { &CriticalSection::new() }); - 8002e74: 694a ldr r2, [r1, #20] - 8002e76: a901 add r1, sp, #4 - 8002e78: f000 f826 bl 8002ec8 <__RUST_INTERRUPT_HANDLER+0x1f4> - 8002e7c: 682d ldr r5, [r5, #0] - while !c.is_null() { - 8002e7e: 2d00 cmp r5, #0 - 8002e80: d1f6 bne.n 8002e70 <__RUST_INTERRUPT_HANDLER+0x19c> - 8002e82: e747 b.n 8002d14 <__RUST_INTERRUPT_HANDLER+0x40> - 8002e84: 2090 movs r0, #144 ; 0x90 - 8002e86: 490f ldr r1, [pc, #60] ; (8002ec4 <__RUST_INTERRUPT_HANDLER+0x1f0>) - 8002e88: 580d ldr r5, [r1, r0] - 8002e8a: 2d00 cmp r5, #0 - 8002e8c: d100 bne.n 8002e90 <__RUST_INTERRUPT_HANDLER+0x1bc> - 8002e8e: e744 b.n 8002d1a <__RUST_INTERRUPT_HANDLER+0x46> - let closure_ptr = unsafe { &*c }.closure; - 8002e90: 68a8 ldr r0, [r5, #8] - 8002e92: 68e9 ldr r1, [r5, #12] - closure_ref(unsafe { &CriticalSection::new() }); - 8002e94: 694a ldr r2, [r1, #20] - 8002e96: a901 add r1, sp, #4 - 8002e98: f000 f816 bl 8002ec8 <__RUST_INTERRUPT_HANDLER+0x1f4> - 8002e9c: 682d ldr r5, [r5, #0] - while !c.is_null() { - 8002e9e: 2d00 cmp r5, #0 - 8002ea0: d1f6 bne.n 8002e90 <__RUST_INTERRUPT_HANDLER+0x1bc> - 8002ea2: e73a b.n 8002d1a <__RUST_INTERRUPT_HANDLER+0x46> - 8002ea4: 209c movs r0, #156 ; 0x9c - 8002ea6: 4907 ldr r1, [pc, #28] ; (8002ec4 <__RUST_INTERRUPT_HANDLER+0x1f0>) - 8002ea8: 580d ldr r5, [r1, r0] - 8002eaa: 2d00 cmp r5, #0 - 8002eac: d100 bne.n 8002eb0 <__RUST_INTERRUPT_HANDLER+0x1dc> - 8002eae: e737 b.n 8002d20 <__RUST_INTERRUPT_HANDLER+0x4c> - let closure_ptr = unsafe { &*c }.closure; - 8002eb0: 68a8 ldr r0, [r5, #8] - 8002eb2: 68e9 ldr r1, [r5, #12] - closure_ref(unsafe { &CriticalSection::new() }); - 8002eb4: 694a ldr r2, [r1, #20] - 8002eb6: a901 add r1, sp, #4 - 8002eb8: f000 f806 bl 8002ec8 <__RUST_INTERRUPT_HANDLER+0x1f4> - 8002ebc: 682d ldr r5, [r5, #0] - while !c.is_null() { - 8002ebe: 2d00 cmp r5, #0 - 8002ec0: d1f6 bne.n 8002eb0 <__RUST_INTERRUPT_HANDLER+0x1dc> - 8002ec2: e72d b.n 8002d20 <__RUST_INTERRUPT_HANDLER+0x4c> - 8002ec4: 02000030 .word 0x02000030 - 8002ec8: 4710 bx r2 - ... - -08002ecc : -pub struct VBlank {} - -impl VBlank { - /// Handles setting up everything reqired to be able to use the wait for - /// interrupt syscall. - pub fn get() -> Self { - 8002ecc: b5f0 push {r4, r5, r6, r7, lr} - 8002ece: af03 add r7, sp, #12 - 8002ed0: b081 sub sp, #4 - let count = self.count.get(); - 8002ed2: 4816 ldr r0, [pc, #88] ; (8002f2c ) - 8002ed4: 6841 ldr r1, [r0, #4] - if count == 0 { - 8002ed6: 2900 cmp r1, #0 - 8002ed8: d11a bne.n 8002f10 - self.interrupt.enable(); - 8002eda: 7a04 ldrb r4, [r0, #8] - 8002edc: 4a14 ldr r2, [pc, #80] ; (8002f30 ) - intrinsics::volatile_load(src) - 8002ede: 8816 ldrh r6, [r2, #0] - 8002ee0: 2500 movs r5, #0 - intrinsics::volatile_store(dst, src); - 8002ee2: 8015 strh r5, [r2, #0] - match self { - 8002ee4: 0725 lsls r5, r4, #28 - 8002ee6: d004 beq.n 8002ef2 - 8002ee8: 2c01 cmp r4, #1 - 8002eea: d109 bne.n 8002f00 - 8002eec: 9600 str r6, [sp, #0] - 8002eee: 2510 movs r5, #16 - 8002ef0: e001 b.n 8002ef6 - 8002ef2: 9600 str r6, [sp, #0] - 8002ef4: 2508 movs r5, #8 - 8002ef6: 4e0f ldr r6, [pc, #60] ; (8002f34 ) - 8002ef8: 8833 ldrh r3, [r6, #0] - 8002efa: 432b orrs r3, r5 - 8002efc: 8033 strh r3, [r6, #0] - 8002efe: 9e00 ldr r6, [sp, #0] - 8002f00: 2301 movs r3, #1 - let enabled = ENABLED_INTERRUPTS.get() | (1 << (interrupt as u16)); - 8002f02: 40a3 lsls r3, r4 - intrinsics::volatile_load(src) - 8002f04: 0014 movs r4, r2 - 8002f06: 3c08 subs r4, #8 - 8002f08: 8825 ldrh r5, [r4, #0] - 8002f0a: 431d orrs r5, r3 - intrinsics::volatile_store(dst, src); - 8002f0c: 8025 strh r5, [r4, #0] - 8002f0e: 8016 strh r6, [r2, #0] - self.count.set(count + 1); - 8002f10: 1c4a adds r2, r1, #1 - 8002f12: 428a cmp r2, r1 - 8002f14: d604 bvs.n 8002f20 - copy_nonoverlapping(&src as *const T, dst, 1); - 8002f16: 6042 str r2, [r0, #4] - interrupt_to_root(Interrupt::VBlank).add(); - VBlank {} - } - 8002f18: b001 add sp, #4 - 8002f1a: bcf0 pop {r4, r5, r6, r7} - 8002f1c: bc01 pop {r0} - 8002f1e: 4700 bx r0 - self.count.set(count + 1); - 8002f20: 4805 ldr r0, [pc, #20] ; (8002f38 ) - 8002f22: 211c movs r1, #28 - 8002f24: 4a05 ldr r2, [pc, #20] ; (8002f3c ) - 8002f26: f006 f8db bl 80090e0 - 8002f2a: defe udf #254 ; 0xfe - 8002f2c: 02000030 .word 0x02000030 - 8002f30: 04000208 .word 0x04000208 - 8002f34: 04000004 .word 0x04000004 - 8002f38: 0800afc0 .word 0x0800afc0 - 8002f3c: 0800afec .word 0x0800afec - -08002f40 : - /// Pauses CPU until vblank interrupt is triggered where code execution is - /// resumed. - pub fn wait_for_vblank(&self) { - 8002f40: b580 push {r7, lr} - 8002f42: af00 add r7, sp, #0 - -/// The vblank interrupt handler [VBlank][crate::interrupt::VBlank] should be -/// used instead of calling this function directly. -pub fn wait_for_vblank() { - unsafe { - asm!( - 8002f44: df05 svc 5 - crate::syscall::wait_for_vblank(); - } - 8002f46: bc80 pop {r7} - 8002f48: bc01 pop {r0} - 8002f4a: 4700 bx r0 - -08002f4c <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335>: -fn finish_grow( - 8002f4c: b5f0 push {r4, r5, r6, r7, lr} - 8002f4e: af03 add r7, sp, #12 - 8002f50: b08b sub sp, #44 ; 0x2c - 8002f52: 0016 movs r6, r2 - 8002f54: 000c movs r4, r1 - 8002f56: 0001 movs r1, r0 - match self { - 8002f58: 2a00 cmp r2, #0 - 8002f5a: b410 push {r4} - 8002f5c: bc20 pop {r5} - 8002f5e: d100 bne.n 8002f62 <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335+0x16> - 8002f60: 0035 movs r5, r6 - let new_layout = new_layout.map_err(|_| CapacityOverflow)?; - 8002f62: 2e00 cmp r6, #0 - 8002f64: d015 beq.n 8002f92 <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335+0x46> - if usize::BITS < 64 && alloc_size > isize::MAX as usize { - 8002f66: 2d00 cmp r5, #0 - 8002f68: d424 bmi.n 8002fb4 <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335+0x68> - 8002f6a: 9102 str r1, [sp, #8] - let memory = if let Some((ptr, old_layout)) = current_memory { - 8002f6c: 689a ldr r2, [r3, #8] - 8002f6e: 2a00 cmp r2, #0 - 8002f70: d013 beq.n 8002f9a <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335+0x4e> - 8002f72: cb03 ldmia r3!, {r0, r1} - debug_assert_eq!(old_layout.align(), new_layout.align()); - 8002f74: 9203 str r2, [sp, #12] - 8002f76: 9604 str r6, [sp, #16] - 8002f78: 42b2 cmp r2, r6 - 8002f7a: d12a bne.n 8002fd2 <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335+0x86> - ptr: NonNull, - old_layout: Layout, - new_layout: Layout, - zeroed: bool, - ) -> Result, AllocError> { - debug_assert!( - 8002f7c: 428d cmp r5, r1 - 8002f7e: d337 bcc.n 8002ff0 <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335+0xa4> - new_layout.size() >= old_layout.size(), - "`new_layout.size()` must be greater than or equal to `old_layout.size()`" - ); - - match old_layout.size() { - 8002f80: 2900 cmp r1, #0 - 8002f82: d00a beq.n 8002f9a <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335+0x4e> - unsafe { __rust_realloc(ptr, layout.size(), layout.align(), new_size) } - 8002f84: 0032 movs r2, r6 - 8002f86: 002b movs r3, r5 - 8002f88: f7fd fbf0 bl 800076c <__rust_realloc> - 8002f8c: 2800 cmp r0, #0 - 8002f8e: d117 bne.n 8002fc0 <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335+0x74> - 8002f90: e00b b.n 8002faa <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335+0x5e> -{ - #[inline] - #[track_caller] - fn from_residual(residual: Result) -> Self { - match residual { - Err(e) => Err(From::from(e)), - 8002f92: 604d str r5, [r1, #4] - 8002f94: 2001 movs r0, #1 - 8002f96: 2400 movs r4, #0 - 8002f98: e015 b.n 8002fc6 <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335+0x7a> - 8002f9a: 2d00 cmp r5, #0 - 8002f9c: d00e beq.n 8002fbc <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335+0x70> - 8002f9e: 0028 movs r0, r5 - 8002fa0: 0031 movs r1, r6 - 8002fa2: f7fd fbd5 bl 8000750 <__rust_alloc> - 8002fa6: 2800 cmp r0, #0 - 8002fa8: d10a bne.n 8002fc0 <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335+0x74> - 8002faa: 9902 ldr r1, [sp, #8] - Err(e) => Err(op(e)), - 8002fac: 604d str r5, [r1, #4] - 8002fae: 2001 movs r0, #1 - 8002fb0: 0034 movs r4, r6 - 8002fb2: e008 b.n 8002fc6 <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335+0x7a> - 8002fb4: 2400 movs r4, #0 - Err(e) => Err(From::from(e)), - 8002fb6: 604c str r4, [r1, #4] - 8002fb8: 2001 movs r0, #1 - 8002fba: e004 b.n 8002fc6 <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335+0x7a> - 8002fbc: 2400 movs r4, #0 - 8002fbe: 0030 movs r0, r6 - 8002fc0: 9902 ldr r1, [sp, #8] - Ok(t) => Ok(t), - 8002fc2: 6048 str r0, [r1, #4] - 8002fc4: 2000 movs r0, #0 - 8002fc6: 6008 str r0, [r1, #0] - 8002fc8: 608c str r4, [r1, #8] -} - 8002fca: b00b add sp, #44 ; 0x2c - 8002fcc: bcf0 pop {r4, r5, r6, r7} - 8002fce: bc01 pop {r0} - 8002fd0: 4700 bx r0 - 8002fd2: 2000 movs r0, #0 - debug_assert_eq!(old_layout.align(), new_layout.align()); - 8002fd4: 900a str r0, [sp, #40] ; 0x28 - 8002fd6: 9009 str r0, [sp, #36] ; 0x24 - 8002fd8: 9008 str r0, [sp, #32] - 8002fda: 9007 str r0, [sp, #28] - 8002fdc: 9006 str r0, [sp, #24] - 8002fde: 9005 str r0, [sp, #20] - 8002fe0: 490b ldr r1, [pc, #44] ; (8003010 <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335+0xc4>) - 8002fe2: 9100 str r1, [sp, #0] - 8002fe4: a903 add r1, sp, #12 - 8002fe6: aa04 add r2, sp, #16 - 8002fe8: ab05 add r3, sp, #20 - 8002fea: f003 f877 bl 80060dc - 8002fee: defe udf #254 ; 0xfe - 8002ff0: 2000 movs r0, #0 - Arguments { pieces, fmt: None, args } - 8002ff2: 900a str r0, [sp, #40] ; 0x28 - 8002ff4: 4907 ldr r1, [pc, #28] ; (8003014 <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335+0xc8>) - 8002ff6: 9109 str r1, [sp, #36] ; 0x24 - 8002ff8: 9008 str r0, [sp, #32] - 8002ffa: 9007 str r0, [sp, #28] - 8002ffc: 2001 movs r0, #1 - 8002ffe: 9006 str r0, [sp, #24] - 8003000: 4805 ldr r0, [pc, #20] ; (8003018 <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335+0xcc>) - 8003002: 9005 str r0, [sp, #20] - 8003004: a805 add r0, sp, #20 - debug_assert!( - 8003006: 4905 ldr r1, [pc, #20] ; (800301c <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335+0xd0>) - 8003008: f006 f8a0 bl 800914c - 800300c: defe udf #254 ; 0xfe - 800300e: 46c0 nop ; (mov r8, r8) - 8003010: 0800b160 .word 0x0800b160 - 8003014: 0800affc .word 0x0800affc - 8003018: 0800b0d4 .word 0x0800b0d4 - 800301c: 0800b0dc .word 0x0800b0dc - -08003020 ::allocate_in>: - fn allocate_in(capacity: usize, init: AllocInit, alloc: A) -> Self { - 8003020: b5b0 push {r4, r5, r7, lr} - 8003022: af02 add r7, sp, #8 - 8003024: 0004 movs r4, r0 - if mem::size_of::() == 0 || capacity == 0 { - 8003026: 2800 cmp r0, #0 - 8003028: d00d beq.n 8003046 ::allocate_in+0x26> - 800302a: 2000 movs r0, #0 - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 800302c: 1925 adds r5, r4, r4 - 800302e: 4140 adcs r0, r0 - 8003030: 42a5 cmp r5, r4 - 8003032: d314 bcc.n 800305e ::allocate_in+0x3e> - if usize::BITS < 64 && alloc_size > isize::MAX as usize { - 8003034: 2d00 cmp r5, #0 - 8003036: d412 bmi.n 800305e ::allocate_in+0x3e> - let result = match init { - 8003038: 2900 cmp r1, #0 - 800303a: d006 beq.n 800304a ::allocate_in+0x2a> - 800303c: 2102 movs r1, #2 - unsafe { __rust_alloc_zeroed(layout.size(), layout.align()) } - 800303e: 0028 movs r0, r5 - 8003040: f7fd fb9b bl 800077a <__rust_alloc_zeroed> - 8003044: e005 b.n 8003052 ::allocate_in+0x32> - 8003046: 2002 movs r0, #2 - 8003048: e005 b.n 8003056 ::allocate_in+0x36> - 800304a: 2102 movs r1, #2 - unsafe { __rust_alloc(layout.size(), layout.align()) } - 800304c: 0028 movs r0, r5 - 800304e: f7fd fb7f bl 8000750 <__rust_alloc> - 8003052: 2800 cmp r0, #0 - 8003054: d006 beq.n 8003064 ::allocate_in+0x44> - } - 8003056: 0021 movs r1, r4 - 8003058: bcb0 pop {r4, r5, r7} - 800305a: bc04 pop {r2} - 800305c: 4710 bx r2 - 800305e: f003 fcdd bl 8006a1c - 8003062: defe udf #254 ; 0xfe - 8003064: 2102 movs r1, #2 - Err(_) => handle_alloc_error(layout), - 8003066: 0028 movs r0, r5 - 8003068: f003 fd1a bl 8006aa0 - 800306c: defe udf #254 ; 0xfe - ... - -08003070 ::reserve_for_push>: - pub fn reserve_for_push(&mut self, len: usize) { - 8003070: b5b0 push {r4, r5, r7, lr} - 8003072: af02 add r7, sp, #8 - 8003074: b088 sub sp, #32 - let (a, b) = intrinsics::add_with_overflow(self as $ActualT, rhs as $ActualT); - 8003076: 1c4a adds r2, r1, #1 - match self { - 8003078: d234 bcs.n 80030e4 ::reserve_for_push+0x74> - 800307a: 0004 movs r4, r0 - let cap = cmp::max(self.cap * 2, required_cap); - 800307c: 6841 ldr r1, [r0, #4] - 800307e: 2000 movs r0, #0 - 8003080: 184d adds r5, r1, r1 - 8003082: b401 push {r0} - 8003084: bc08 pop {r3} - 8003086: 4143 adcs r3, r0 - 8003088: 428d cmp r5, r1 - 800308a: d322 bcc.n 80030d2 ::reserve_for_push+0x62> - 800308c: 4295 cmp r5, r2 - 800308e: d908 bls.n 80030a2 ::reserve_for_push+0x32> - 8003090: 2d08 cmp r5, #8 - 8003092: d909 bls.n 80030a8 ::reserve_for_push+0x38> - if mem::size_of::() == 0 || self.cap == 0 { - 8003094: 2900 cmp r1, #0 - 8003096: d00a beq.n 80030ae ::reserve_for_push+0x3e> - Some((self.ptr.cast().into(), layout)) - 8003098: 9105 str r1, [sp, #20] - 800309a: 6820 ldr r0, [r4, #0] - 800309c: 9004 str r0, [sp, #16] - 800309e: 2001 movs r0, #1 - 80030a0: e007 b.n 80030b2 ::reserve_for_push+0x42> - 80030a2: 0015 movs r5, r2 - 80030a4: 2d08 cmp r5, #8 - 80030a6: d8f5 bhi.n 8003094 ::reserve_for_push+0x24> - 80030a8: 2508 movs r5, #8 - if mem::size_of::() == 0 || self.cap == 0 { - 80030aa: 2900 cmp r1, #0 - 80030ac: d1f4 bne.n 8003098 ::reserve_for_push+0x28> - None - 80030ae: 9005 str r0, [sp, #20] - 80030b0: 9004 str r0, [sp, #16] - 80030b2: 9006 str r0, [sp, #24] - 80030b4: a801 add r0, sp, #4 - 80030b6: 2201 movs r2, #1 - 80030b8: ab04 add r3, sp, #16 - let ptr = finish_grow(new_layout, self.current_memory(), &mut self.alloc)?; - 80030ba: 0029 movs r1, r5 - 80030bc: f7ff ff46 bl 8002f4c <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335> - match self { - 80030c0: 9801 ldr r0, [sp, #4] - 80030c2: 2800 cmp r0, #0 - 80030c4: d10b bne.n 80030de ::reserve_for_push+0x6e> - Ok(v) => ControlFlow::Continue(v), - 80030c6: 9802 ldr r0, [sp, #8] - self.ptr = unsafe { Unique::new_unchecked(ptr.cast().as_ptr()) }; - 80030c8: c421 stmia r4!, {r0, r5} - } - 80030ca: b008 add sp, #32 - 80030cc: bcb0 pop {r4, r5, r7} - 80030ce: bc01 pop {r0} - 80030d0: 4700 bx r0 - let cap = cmp::max(self.cap * 2, required_cap); - 80030d2: 4808 ldr r0, [pc, #32] ; (80030f4 ::reserve_for_push+0x84>) - 80030d4: 2121 movs r1, #33 ; 0x21 - 80030d6: 4a08 ldr r2, [pc, #32] ; (80030f8 ::reserve_for_push+0x88>) - 80030d8: f006 f802 bl 80090e0 - 80030dc: defe udf #254 ; 0xfe - Err(e) => ControlFlow::Break(Err(e)), - 80030de: 9903 ldr r1, [sp, #12] - match result.map_err(|e| e.kind()) { - 80030e0: 2900 cmp r1, #0 - 80030e2: d102 bne.n 80030ea ::reserve_for_push+0x7a> - Err(CapacityOverflow) => capacity_overflow(), - 80030e4: f003 fc9a bl 8006a1c - 80030e8: defe udf #254 ; 0xfe - 80030ea: 9802 ldr r0, [sp, #8] - Err(AllocError { layout, .. }) => handle_alloc_error(layout), - 80030ec: f003 fcd8 bl 8006aa0 - 80030f0: defe udf #254 ; 0xfe - 80030f2: 46c0 nop ; (mov r8, r8) - 80030f4: 0800b1c0 .word 0x0800b1c0 - 80030f8: 0800b1b0 .word 0x0800b1b0 - -080030fc ::reserve_for_push>: - pub fn reserve_for_push(&mut self, len: usize) { - 80030fc: b5f0 push {r4, r5, r6, r7, lr} - 80030fe: af03 add r7, sp, #12 - 8003100: b087 sub sp, #28 - 8003102: 1c49 adds r1, r1, #1 - 8003104: d23f bcs.n 8003186 ::reserve_for_push+0x8a> - 8003106: 0004 movs r4, r0 - let cap = cmp::max(self.cap * 2, required_cap); - 8003108: 6843 ldr r3, [r0, #4] - 800310a: 2600 movs r6, #0 - 800310c: 18d8 adds r0, r3, r3 - 800310e: b440 push {r6} - 8003110: bc04 pop {r2} - 8003112: 4172 adcs r2, r6 - 8003114: 4298 cmp r0, r3 - 8003116: d32d bcc.n 8003174 ::reserve_for_push+0x78> - 8003118: 4288 cmp r0, r1 - 800311a: b401 push {r0} - 800311c: bc20 pop {r5} - 800311e: d907 bls.n 8003130 ::reserve_for_push+0x34> - 8003120: 2d04 cmp r5, #4 - 8003122: d908 bls.n 8003136 ::reserve_for_push+0x3a> - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 8003124: 1969 adds r1, r5, r5 - 8003126: d309 bcc.n 800313c ::reserve_for_push+0x40> - 8003128: 0032 movs r2, r6 - 800312a: 42a9 cmp r1, r5 - 800312c: d309 bcc.n 8003142 ::reserve_for_push+0x46> - 800312e: e009 b.n 8003144 ::reserve_for_push+0x48> - 8003130: 000d movs r5, r1 - 8003132: 2d04 cmp r5, #4 - 8003134: d8f6 bhi.n 8003124 ::reserve_for_push+0x28> - 8003136: 2504 movs r5, #4 - 8003138: 1969 adds r1, r5, r5 - 800313a: d2f5 bcs.n 8003128 ::reserve_for_push+0x2c> - 800313c: 2202 movs r2, #2 - 800313e: 42a9 cmp r1, r5 - 8003140: d200 bcs.n 8003144 ::reserve_for_push+0x48> - 8003142: 0031 movs r1, r6 - if mem::size_of::() == 0 || self.cap == 0 { - 8003144: 2b00 cmp r3, #0 - 8003146: d004 beq.n 8003152 ::reserve_for_push+0x56> - 8003148: 2302 movs r3, #2 - Some((self.ptr.cast().into(), layout)) - 800314a: 9306 str r3, [sp, #24] - 800314c: 9005 str r0, [sp, #20] - let ptr = finish_grow(new_layout, self.current_memory(), &mut self.alloc)?; - 800314e: 6820 ldr r0, [r4, #0] - 8003150: e002 b.n 8003158 ::reserve_for_push+0x5c> - 8003152: 2000 movs r0, #0 - None - 8003154: 9006 str r0, [sp, #24] - 8003156: 9005 str r0, [sp, #20] - 8003158: 9004 str r0, [sp, #16] - 800315a: a801 add r0, sp, #4 - 800315c: ab04 add r3, sp, #16 - let ptr = finish_grow(new_layout, self.current_memory(), &mut self.alloc)?; - 800315e: f7ff fef5 bl 8002f4c <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335> - match self { - 8003162: 9801 ldr r0, [sp, #4] - 8003164: 2800 cmp r0, #0 - 8003166: d10b bne.n 8003180 ::reserve_for_push+0x84> - Ok(v) => ControlFlow::Continue(v), - 8003168: 9802 ldr r0, [sp, #8] - self.ptr = unsafe { Unique::new_unchecked(ptr.cast().as_ptr()) }; - 800316a: c421 stmia r4!, {r0, r5} - } - 800316c: b007 add sp, #28 - 800316e: bcf0 pop {r4, r5, r6, r7} - 8003170: bc01 pop {r0} - 8003172: 4700 bx r0 - let cap = cmp::max(self.cap * 2, required_cap); - 8003174: 4807 ldr r0, [pc, #28] ; (8003194 ::reserve_for_push+0x98>) - 8003176: 2121 movs r1, #33 ; 0x21 - 8003178: 4a07 ldr r2, [pc, #28] ; (8003198 ::reserve_for_push+0x9c>) - 800317a: f005 ffb1 bl 80090e0 - 800317e: defe udf #254 ; 0xfe - Err(e) => ControlFlow::Break(Err(e)), - 8003180: 9903 ldr r1, [sp, #12] - match result.map_err(|e| e.kind()) { - 8003182: 2900 cmp r1, #0 - 8003184: d102 bne.n 800318c ::reserve_for_push+0x90> - Err(CapacityOverflow) => capacity_overflow(), - 8003186: f003 fc49 bl 8006a1c - 800318a: defe udf #254 ; 0xfe - 800318c: 9802 ldr r0, [sp, #8] - Err(AllocError { layout, .. }) => handle_alloc_error(layout), - 800318e: f003 fc87 bl 8006aa0 - 8003192: defe udf #254 ; 0xfe - 8003194: 0800b1c0 .word 0x0800b1c0 - 8003198: 0800b1b0 .word 0x0800b1b0 - -0800319c ::reserve_for_push>: - pub fn reserve_for_push(&mut self, len: usize) { - 800319c: b5f0 push {r4, r5, r6, r7, lr} - 800319e: af03 add r7, sp, #12 - 80031a0: b087 sub sp, #28 - let (a, b) = intrinsics::add_with_overflow(self as $ActualT, rhs as $ActualT); - 80031a2: 1c49 adds r1, r1, #1 - 80031a4: d24e bcs.n 8003244 ::reserve_for_push+0xa8> - 80031a6: 0004 movs r4, r0 - let cap = cmp::max(self.cap * 2, required_cap); - 80031a8: 6840 ldr r0, [r0, #4] - 80031aa: 2200 movs r2, #0 - 80031ac: 1805 adds r5, r0, r0 - 80031ae: b404 push {r2} - 80031b0: bc08 pop {r3} - 80031b2: 4153 adcs r3, r2 - 80031b4: 4285 cmp r5, r0 - 80031b6: d33c bcc.n 8003232 ::reserve_for_push+0x96> - 80031b8: 428d cmp r5, r1 - 80031ba: d800 bhi.n 80031be ::reserve_for_push+0x22> - 80031bc: 000d movs r5, r1 - 80031be: 2104 movs r1, #4 - 80031c0: 2d04 cmp r5, #4 - 80031c2: d800 bhi.n 80031c6 ::reserve_for_push+0x2a> - 80031c4: 000d movs r5, r1 - 80031c6: 9100 str r1, [sp, #0] - 80031c8: 2307 movs r3, #7 - 80031ca: 075e lsls r6, r3, #29 - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 80031cc: 002b movs r3, r5 - 80031ce: 43b3 bics r3, r6 - 80031d0: 1aeb subs r3, r5, r3 - 80031d2: 1e59 subs r1, r3, #1 - 80031d4: 418b sbcs r3, r1 - 80031d6: b404 push {r2} - 80031d8: bc02 pop {r1} - 80031da: d013 beq.n 8003204 ::reserve_for_push+0x68> - 80031dc: 2b00 cmp r3, #0 - 80031de: d014 beq.n 800320a ::reserve_for_push+0x6e> - if mem::size_of::() == 0 || self.cap == 0 { - 80031e0: 2800 cmp r0, #0 - 80031e2: d015 beq.n 8003210 ::reserve_for_push+0x74> - 80031e4: 9100 str r1, [sp, #0] - 80031e6: 0001 movs r1, r0 - 80031e8: 43b1 bics r1, r6 - 80031ea: 1a41 subs r1, r0, r1 - 80031ec: 1e4b subs r3, r1, #1 - 80031ee: 4199 sbcs r1, r3 - 80031f0: 2901 cmp r1, #1 - 80031f2: d02a beq.n 800324a ::reserve_for_push+0xae> - 80031f4: 00c0 lsls r0, r0, #3 - 80031f6: 2104 movs r1, #4 - Some((self.ptr.cast().into(), layout)) - 80031f8: 9106 str r1, [sp, #24] - 80031fa: 9005 str r0, [sp, #20] - 80031fc: 6820 ldr r0, [r4, #0] - 80031fe: 9004 str r0, [sp, #16] - 8003200: 9900 ldr r1, [sp, #0] - 8003202: e009 b.n 8003218 ::reserve_for_push+0x7c> - 8003204: 00e9 lsls r1, r5, #3 - 8003206: 2b00 cmp r3, #0 - 8003208: d1ea bne.n 80031e0 ::reserve_for_push+0x44> - 800320a: 9a00 ldr r2, [sp, #0] - if mem::size_of::() == 0 || self.cap == 0 { - 800320c: 2800 cmp r0, #0 - 800320e: d1e9 bne.n 80031e4 ::reserve_for_push+0x48> - 8003210: 2000 movs r0, #0 - None - 8003212: 9006 str r0, [sp, #24] - 8003214: 9005 str r0, [sp, #20] - 8003216: 9004 str r0, [sp, #16] - 8003218: a801 add r0, sp, #4 - 800321a: ab04 add r3, sp, #16 - let ptr = finish_grow(new_layout, self.current_memory(), &mut self.alloc)?; - 800321c: f7ff fe96 bl 8002f4c <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335> - match self { - 8003220: 9801 ldr r0, [sp, #4] - 8003222: 2800 cmp r0, #0 - 8003224: d10b bne.n 800323e ::reserve_for_push+0xa2> - Ok(v) => ControlFlow::Continue(v), - 8003226: 9802 ldr r0, [sp, #8] - self.ptr = unsafe { Unique::new_unchecked(ptr.cast().as_ptr()) }; - 8003228: c421 stmia r4!, {r0, r5} - } - 800322a: b007 add sp, #28 - 800322c: bcf0 pop {r4, r5, r6, r7} - 800322e: bc01 pop {r0} - 8003230: 4700 bx r0 - let cap = cmp::max(self.cap * 2, required_cap); - 8003232: 480d ldr r0, [pc, #52] ; (8003268 ::reserve_for_push+0xcc>) - 8003234: 2121 movs r1, #33 ; 0x21 - 8003236: 4a0d ldr r2, [pc, #52] ; (800326c ::reserve_for_push+0xd0>) - 8003238: f005 ff52 bl 80090e0 - 800323c: defe udf #254 ; 0xfe - Err(e) => ControlFlow::Break(Err(e)), - 800323e: 9903 ldr r1, [sp, #12] - match result.map_err(|e| e.kind()) { - 8003240: 2900 cmp r1, #0 - 8003242: d108 bne.n 8003256 ::reserve_for_push+0xba> - Err(CapacityOverflow) => capacity_overflow(), - 8003244: f003 fbea bl 8006a1c - 8003248: defe udf #254 ; 0xfe - debug_assert!(self.is_ok()); - 800324a: 4805 ldr r0, [pc, #20] ; (8003260 ::reserve_for_push+0xc4>) - 800324c: 211e movs r1, #30 - 800324e: 4a05 ldr r2, [pc, #20] ; (8003264 ::reserve_for_push+0xc8>) - 8003250: f005 ff46 bl 80090e0 - 8003254: defe udf #254 ; 0xfe - 8003256: 9802 ldr r0, [sp, #8] - Err(AllocError { layout, .. }) => handle_alloc_error(layout), - 8003258: f003 fc22 bl 8006aa0 - 800325c: defe udf #254 ; 0xfe - 800325e: 46c0 nop ; (mov r8, r8) - 8003260: 0800affc .word 0x0800affc - 8003264: 0800b170 .word 0x0800b170 - 8003268: 0800b1c0 .word 0x0800b1c0 - 800326c: 0800b1b0 .word 0x0800b1b0 - -08003270 ::reserve::do_reserve_and_handle>: - fn do_reserve_and_handle( - 8003270: b5f0 push {r4, r5, r6, r7, lr} - 8003272: af03 add r7, sp, #12 - 8003274: b087 sub sp, #28 - debug_assert!(additional > 0); - 8003276: 2a00 cmp r2, #0 - 8003278: d03e beq.n 80032f8 ::reserve::do_reserve_and_handle+0x88> - let (a, b) = intrinsics::add_with_overflow(self as $ActualT, rhs as $ActualT); - 800327a: 1889 adds r1, r1, r2 - 800327c: d245 bcs.n 800330a ::reserve::do_reserve_and_handle+0x9a> - 800327e: 0004 movs r4, r0 - let cap = cmp::max(self.cap * 2, required_cap); - 8003280: 6843 ldr r3, [r0, #4] - 8003282: 2600 movs r6, #0 - 8003284: 18d8 adds r0, r3, r3 - 8003286: b440 push {r6} - 8003288: bc04 pop {r2} - 800328a: 4172 adcs r2, r6 - 800328c: 4298 cmp r0, r3 - 800328e: d32d bcc.n 80032ec ::reserve::do_reserve_and_handle+0x7c> - 8003290: 4288 cmp r0, r1 - 8003292: b401 push {r0} - 8003294: bc20 pop {r5} - 8003296: d907 bls.n 80032a8 ::reserve::do_reserve_and_handle+0x38> - 8003298: 2d04 cmp r5, #4 - 800329a: d908 bls.n 80032ae ::reserve::do_reserve_and_handle+0x3e> - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 800329c: 1969 adds r1, r5, r5 - 800329e: d309 bcc.n 80032b4 ::reserve::do_reserve_and_handle+0x44> - 80032a0: 0032 movs r2, r6 - 80032a2: 42a9 cmp r1, r5 - 80032a4: d309 bcc.n 80032ba ::reserve::do_reserve_and_handle+0x4a> - 80032a6: e009 b.n 80032bc ::reserve::do_reserve_and_handle+0x4c> - 80032a8: 000d movs r5, r1 - 80032aa: 2d04 cmp r5, #4 - 80032ac: d8f6 bhi.n 800329c ::reserve::do_reserve_and_handle+0x2c> - 80032ae: 2504 movs r5, #4 - 80032b0: 1969 adds r1, r5, r5 - 80032b2: d2f5 bcs.n 80032a0 ::reserve::do_reserve_and_handle+0x30> - 80032b4: 2202 movs r2, #2 - 80032b6: 42a9 cmp r1, r5 - 80032b8: d200 bcs.n 80032bc ::reserve::do_reserve_and_handle+0x4c> - 80032ba: 0031 movs r1, r6 - if mem::size_of::() == 0 || self.cap == 0 { - 80032bc: 2b00 cmp r3, #0 - 80032be: d004 beq.n 80032ca ::reserve::do_reserve_and_handle+0x5a> - 80032c0: 2302 movs r3, #2 - Some((self.ptr.cast().into(), layout)) - 80032c2: 9306 str r3, [sp, #24] - 80032c4: 9005 str r0, [sp, #20] - let ptr = finish_grow(new_layout, self.current_memory(), &mut self.alloc)?; - 80032c6: 6820 ldr r0, [r4, #0] - 80032c8: e002 b.n 80032d0 ::reserve::do_reserve_and_handle+0x60> - 80032ca: 2000 movs r0, #0 - None - 80032cc: 9006 str r0, [sp, #24] - 80032ce: 9005 str r0, [sp, #20] - 80032d0: 9004 str r0, [sp, #16] - 80032d2: a801 add r0, sp, #4 - 80032d4: ab04 add r3, sp, #16 - let ptr = finish_grow(new_layout, self.current_memory(), &mut self.alloc)?; - 80032d6: f7ff fe39 bl 8002f4c <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335> - match self { - 80032da: 9801 ldr r0, [sp, #4] - 80032dc: 2800 cmp r0, #0 - 80032de: d111 bne.n 8003304 ::reserve::do_reserve_and_handle+0x94> - Ok(v) => ControlFlow::Continue(v), - 80032e0: 9802 ldr r0, [sp, #8] - self.ptr = unsafe { Unique::new_unchecked(ptr.cast().as_ptr()) }; - 80032e2: c421 stmia r4!, {r0, r5} - } - 80032e4: b007 add sp, #28 - 80032e6: bcf0 pop {r4, r5, r6, r7} - 80032e8: bc01 pop {r0} - 80032ea: 4700 bx r0 - let cap = cmp::max(self.cap * 2, required_cap); - 80032ec: 480a ldr r0, [pc, #40] ; (8003318 ::reserve::do_reserve_and_handle+0xa8>) - 80032ee: 2121 movs r1, #33 ; 0x21 - 80032f0: 4a0a ldr r2, [pc, #40] ; (800331c ::reserve::do_reserve_and_handle+0xac>) - 80032f2: f005 fef5 bl 80090e0 - 80032f6: defe udf #254 ; 0xfe - debug_assert!(additional > 0); - 80032f8: 4809 ldr r0, [pc, #36] ; (8003320 ::reserve::do_reserve_and_handle+0xb0>) - 80032fa: 2120 movs r1, #32 - 80032fc: 4a09 ldr r2, [pc, #36] ; (8003324 ::reserve::do_reserve_and_handle+0xb4>) - 80032fe: f005 feef bl 80090e0 - 8003302: defe udf #254 ; 0xfe - Err(e) => ControlFlow::Break(Err(e)), - 8003304: 9903 ldr r1, [sp, #12] - match result.map_err(|e| e.kind()) { - 8003306: 2900 cmp r1, #0 - 8003308: d102 bne.n 8003310 ::reserve::do_reserve_and_handle+0xa0> - Err(CapacityOverflow) => capacity_overflow(), - 800330a: f003 fb87 bl 8006a1c - 800330e: defe udf #254 ; 0xfe - 8003310: 9802 ldr r0, [sp, #8] - Err(AllocError { layout, .. }) => handle_alloc_error(layout), - 8003312: f003 fbc5 bl 8006aa0 - 8003316: defe udf #254 ; 0xfe - 8003318: 0800b1c0 .word 0x0800b1c0 - 800331c: 0800b1b0 .word 0x0800b1b0 - 8003320: 0800b180 .word 0x0800b180 - 8003324: 0800b1a0 .word 0x0800b1a0 - -08003328 ::reserve::do_reserve_and_handle>: - fn do_reserve_and_handle( - 8003328: b5f0 push {r4, r5, r6, r7, lr} - 800332a: af03 add r7, sp, #12 - 800332c: b089 sub sp, #36 ; 0x24 - debug_assert!(additional > 0); - 800332e: 2a00 cmp r2, #0 - 8003330: d04f beq.n 80033d2 ::reserve::do_reserve_and_handle+0xaa> - let (a, b) = intrinsics::add_with_overflow(self as $ActualT, rhs as $ActualT); - 8003332: 1889 adds r1, r1, r2 - 8003334: d256 bcs.n 80033e4 ::reserve::do_reserve_and_handle+0xbc> - let cap = cmp::max(self.cap * 2, required_cap); - 8003336: 6842 ldr r2, [r0, #4] - 8003338: 2600 movs r6, #0 - 800333a: 1895 adds r5, r2, r2 - 800333c: b440 push {r6} - 800333e: bc08 pop {r3} - 8003340: 4173 adcs r3, r6 - 8003342: 4295 cmp r5, r2 - 8003344: d33f bcc.n 80033c6 ::reserve::do_reserve_and_handle+0x9e> - 8003346: 428d cmp r5, r1 - 8003348: d800 bhi.n 800334c ::reserve::do_reserve_and_handle+0x24> - 800334a: 000d movs r5, r1 - 800334c: 9002 str r0, [sp, #8] - 800334e: 2304 movs r3, #4 - 8003350: 2d04 cmp r5, #4 - 8003352: d800 bhi.n 8003356 ::reserve::do_reserve_and_handle+0x2e> - 8003354: 001d movs r5, r3 - 8003356: 210f movs r1, #15 - 8003358: 0708 lsls r0, r1, #28 - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 800335a: 0029 movs r1, r5 - 800335c: 4381 bics r1, r0 - 800335e: 1a6c subs r4, r5, r1 - 8003360: 1e61 subs r1, r4, #1 - 8003362: 418c sbcs r4, r1 - 8003364: b440 push {r6} - 8003366: bc02 pop {r1} - 8003368: d013 beq.n 8003392 ::reserve::do_reserve_and_handle+0x6a> - 800336a: 2c00 cmp r4, #0 - 800336c: d014 beq.n 8003398 ::reserve::do_reserve_and_handle+0x70> - if mem::size_of::() == 0 || self.cap == 0 { - 800336e: 2a00 cmp r2, #0 - 8003370: 9601 str r6, [sp, #4] - 8003372: d015 beq.n 80033a0 ::reserve::do_reserve_and_handle+0x78> - 8003374: 0013 movs r3, r2 - 8003376: 4383 bics r3, r0 - 8003378: 1ad3 subs r3, r2, r3 - 800337a: 1e5c subs r4, r3, #1 - 800337c: 41a3 sbcs r3, r4 - 800337e: 2b01 cmp r3, #1 - 8003380: d033 beq.n 80033ea ::reserve::do_reserve_and_handle+0xc2> - 8003382: 9e02 ldr r6, [sp, #8] - 8003384: 6833 ldr r3, [r6, #0] - 8003386: 0110 lsls r0, r2, #4 - 8003388: 2404 movs r4, #4 - Some((self.ptr.cast().into(), layout)) - 800338a: 9408 str r4, [sp, #32] - 800338c: 9007 str r0, [sp, #28] - 800338e: 9306 str r3, [sp, #24] - 8003390: e00b b.n 80033aa ::reserve::do_reserve_and_handle+0x82> - 8003392: 0129 lsls r1, r5, #4 - 8003394: 2c00 cmp r4, #0 - 8003396: d1ea bne.n 800336e ::reserve::do_reserve_and_handle+0x46> - 8003398: 001e movs r6, r3 - if mem::size_of::() == 0 || self.cap == 0 { - 800339a: 2a00 cmp r2, #0 - 800339c: 9601 str r6, [sp, #4] - 800339e: d1e9 bne.n 8003374 ::reserve::do_reserve_and_handle+0x4c> - 80033a0: 2000 movs r0, #0 - None - 80033a2: 9008 str r0, [sp, #32] - 80033a4: 9007 str r0, [sp, #28] - 80033a6: 9006 str r0, [sp, #24] - 80033a8: 9e02 ldr r6, [sp, #8] - 80033aa: a803 add r0, sp, #12 - 80033ac: ab06 add r3, sp, #24 - let ptr = finish_grow(new_layout, self.current_memory(), &mut self.alloc)?; - 80033ae: 9a01 ldr r2, [sp, #4] - 80033b0: f7ff fdcc bl 8002f4c <_ZN5alloc7raw_vec11finish_grow17h26bff051574c8a05E.llvm.185608068815171335> - match self { - 80033b4: 9803 ldr r0, [sp, #12] - 80033b6: 2800 cmp r0, #0 - 80033b8: d111 bne.n 80033de ::reserve::do_reserve_and_handle+0xb6> - Ok(v) => ControlFlow::Continue(v), - 80033ba: 9804 ldr r0, [sp, #16] - self.ptr = unsafe { Unique::new_unchecked(ptr.cast().as_ptr()) }; - 80033bc: c621 stmia r6!, {r0, r5} - } - 80033be: b009 add sp, #36 ; 0x24 - 80033c0: bcf0 pop {r4, r5, r6, r7} - 80033c2: bc01 pop {r0} - 80033c4: 4700 bx r0 - let cap = cmp::max(self.cap * 2, required_cap); - 80033c6: 4810 ldr r0, [pc, #64] ; (8003408 ::reserve::do_reserve_and_handle+0xe0>) - 80033c8: 2121 movs r1, #33 ; 0x21 - 80033ca: 4a10 ldr r2, [pc, #64] ; (800340c ::reserve::do_reserve_and_handle+0xe4>) - 80033cc: f005 fe88 bl 80090e0 - 80033d0: defe udf #254 ; 0xfe - debug_assert!(additional > 0); - 80033d2: 480f ldr r0, [pc, #60] ; (8003410 ::reserve::do_reserve_and_handle+0xe8>) - 80033d4: 2120 movs r1, #32 - 80033d6: 4a0f ldr r2, [pc, #60] ; (8003414 ::reserve::do_reserve_and_handle+0xec>) - 80033d8: f005 fe82 bl 80090e0 - 80033dc: defe udf #254 ; 0xfe - Err(e) => ControlFlow::Break(Err(e)), - 80033de: 9905 ldr r1, [sp, #20] - match result.map_err(|e| e.kind()) { - 80033e0: 2900 cmp r1, #0 - 80033e2: d108 bne.n 80033f6 ::reserve::do_reserve_and_handle+0xce> - Err(CapacityOverflow) => capacity_overflow(), - 80033e4: f003 fb1a bl 8006a1c - 80033e8: defe udf #254 ; 0xfe - debug_assert!(self.is_ok()); - 80033ea: 4805 ldr r0, [pc, #20] ; (8003400 ::reserve::do_reserve_and_handle+0xd8>) - 80033ec: 211e movs r1, #30 - 80033ee: 4a05 ldr r2, [pc, #20] ; (8003404 ::reserve::do_reserve_and_handle+0xdc>) - 80033f0: f005 fe76 bl 80090e0 - 80033f4: defe udf #254 ; 0xfe - 80033f6: 9804 ldr r0, [sp, #16] - Err(AllocError { layout, .. }) => handle_alloc_error(layout), - 80033f8: f003 fb52 bl 8006aa0 - 80033fc: defe udf #254 ; 0xfe - 80033fe: 46c0 nop ; (mov r8, r8) - 8003400: 0800affc .word 0x0800affc - 8003404: 0800b170 .word 0x0800b170 - 8003408: 0800b1c0 .word 0x0800b1c0 - 800340c: 0800b1b0 .word 0x0800b1b0 - 8003410: 0800b180 .word 0x0800b180 - 8003414: 0800b1a0 .word 0x0800b1a0 - -08003418 ::extend_with>: -} - -impl Vec { - #[cfg(not(no_global_oom_handling))] - /// Extend the vector by `n` values, using the given generator. - fn extend_with>(&mut self, n: usize, mut value: E) { - 8003418: b5f0 push {r4, r5, r6, r7, lr} - 800341a: af03 add r7, sp, #12 - 800341c: b081 sub sp, #4 - 800341e: 0015 movs r5, r2 - 8003420: 000e movs r6, r1 - 8003422: 0004 movs r4, r0 - additional > self.capacity().wrapping_sub(len) - 8003424: 6840 ldr r0, [r0, #4] - self.buf.reserve(self.len, additional); - 8003426: 68a1 ldr r1, [r4, #8] - intrinsics::wrapping_sub(self, rhs) - 8003428: 1a40 subs r0, r0, r1 - if self.needs_to_grow(len, additional) { - 800342a: 42b0 cmp r0, r6 - 800342c: d322 bcc.n 8003474 ::extend_with+0x5c> - 800342e: 0048 lsls r0, r1, #1 - let ptr = self.buf.ptr(); - 8003430: 6822 ldr r2, [r4, #0] - 8003432: 1810 adds r0, r2, r0 - 8003434: 2e02 cmp r6, #2 - 8003436: d309 bcc.n 800344c ::extend_with+0x34> - self.local_len += increment; - 8003438: 1e72 subs r2, r6, #1 - 800343a: 4249 negs r1, r1 - 800343c: 8005 strh r5, [r0, #0] - 800343e: 1e49 subs r1, r1, #1 - 8003440: d00c beq.n 800345c ::extend_with+0x44> - 8003442: 1e52 subs r2, r2, #1 - 8003444: 1c80 adds r0, r0, #2 - 8003446: 2a00 cmp r2, #0 - 8003448: d1f8 bne.n 800343c ::extend_with+0x24> - ptr = ptr.offset(1); - // Increment the length in every step in case next() panics - local_len.increment_len(1); - } - - if n > 0 { - 800344a: 4249 negs r1, r1 - 800344c: 2e00 cmp r6, #0 - 800344e: d00b beq.n 8003468 ::extend_with+0x50> - 8003450: 8005 strh r5, [r0, #0] - 8003452: 2200 movs r2, #0 - 8003454: 1c48 adds r0, r1, #1 - 8003456: 4152 adcs r2, r2 - 8003458: 4288 cmp r0, r1 - 800345a: d206 bcs.n 800346a ::extend_with+0x52> - 800345c: 4808 ldr r0, [pc, #32] ; (8003480 ::extend_with+0x68>) - 800345e: 211c movs r1, #28 - 8003460: 4a08 ldr r2, [pc, #32] ; (8003484 ::extend_with+0x6c>) - 8003462: f005 fe3d bl 80090e0 - 8003466: defe udf #254 ; 0xfe - 8003468: 0008 movs r0, r1 - *self.len = self.local_len; - 800346a: 60a0 str r0, [r4, #8] - local_len.increment_len(1); - } - - // len set by scope guard - } - } - 800346c: b001 add sp, #4 - 800346e: bcf0 pop {r4, r5, r6, r7} - 8003470: bc01 pop {r0} - 8003472: 4700 bx r0 - do_reserve_and_handle(self, len, additional); - 8003474: 0020 movs r0, r4 - 8003476: 0032 movs r2, r6 - 8003478: f7ff fefa bl 8003270 ::reserve::do_reserve_and_handle> - let mut ptr = self.as_mut_ptr().add(self.len()); - 800347c: 68a1 ldr r1, [r4, #8] - 800347e: e7d6 b.n 800342e ::extend_with+0x16> - 8003480: 0800b220 .word 0x0800b220 - 8003484: 0800b2bc .word 0x0800b2bc - -08003488 ::resize>: - pub fn resize(&mut self, new_len: usize, value: T) { - 8003488: b5f0 push {r4, r5, r6, r7, lr} - 800348a: af03 add r7, sp, #12 - 800348c: b089 sub sp, #36 ; 0x24 - 800348e: 0006 movs r6, r0 - let len = self.len(); - 8003490: 6885 ldr r5, [r0, #8] - if new_len > len { - 8003492: 428d cmp r5, r1 - 8003494: d24c bcs.n 8003530 ::resize+0xa8> - 8003496: 9102 str r1, [sp, #8] - self.extend_with(new_len - len, ExtendElement(value)) - 8003498: 1b4b subs r3, r1, r5 - additional > self.capacity().wrapping_sub(len) - 800349a: 6870 ldr r0, [r6, #4] - 800349c: 1b40 subs r0, r0, r5 - 800349e: 89d1 ldrh r1, [r2, #14] - 80034a0: 9103 str r1, [sp, #12] - 80034a2: 8991 ldrh r1, [r2, #12] - 80034a4: 9108 str r1, [sp, #32] - 80034a6: 8951 ldrh r1, [r2, #10] - 80034a8: 9104 str r1, [sp, #16] - 80034aa: 8911 ldrh r1, [r2, #8] - 80034ac: 9105 str r1, [sp, #20] - 80034ae: 6814 ldr r4, [r2, #0] - 80034b0: 6851 ldr r1, [r2, #4] - if self.needs_to_grow(len, additional) { - 80034b2: 9106 str r1, [sp, #24] - 80034b4: 4298 cmp r0, r3 - 80034b6: b420 push {r5} - 80034b8: bc02 pop {r1} - 80034ba: d33e bcc.n 800353a ::resize+0xb2> - 80034bc: 0108 lsls r0, r1, #4 - let ptr = self.buf.ptr(); - 80034be: 6832 ldr r2, [r6, #0] - 80034c0: 1810 adds r0, r2, r0 - 80034c2: 2b02 cmp r3, #2 - 80034c4: d321 bcc.n 800350a ::resize+0x82> - 80034c6: 9301 str r3, [sp, #4] - 80034c8: 2c00 cmp r4, #0 - 80034ca: 9a05 ldr r2, [sp, #20] - 80034cc: 9207 str r2, [sp, #28] - 80034ce: d100 bne.n 80034d2 ::resize+0x4a> - 80034d0: 9407 str r4, [sp, #28] - 80034d2: 000a movs r2, r1 - 80034d4: 9600 str r6, [sp, #0] - 80034d6: 2c00 cmp r4, #0 - 80034d8: 9b06 ldr r3, [sp, #24] - 80034da: d100 bne.n 80034de ::resize+0x56> - 80034dc: 0023 movs r3, r4 - 80034de: 43ed mvns r5, r5 - 80034e0: 9902 ldr r1, [sp, #8] - 80034e2: 186d adds r5, r5, r1 - 80034e4: 4251 negs r1, r2 - 80034e6: 2600 movs r6, #0 - 80034e8: 0022 movs r2, r4 - 80034ea: 9c08 ldr r4, [sp, #32] - 80034ec: 8184 strh r4, [r0, #12] - 80034ee: 0014 movs r4, r2 - 80034f0: 8146 strh r6, [r0, #10] - 80034f2: 9a07 ldr r2, [sp, #28] - 80034f4: 8102 strh r2, [r0, #8] - 80034f6: 6004 str r4, [r0, #0] - 80034f8: 6043 str r3, [r0, #4] - 80034fa: 1e49 subs r1, r1, #1 - 80034fc: d026 beq.n 800354c ::resize+0xc4> - 80034fe: 3010 adds r0, #16 - 8003500: 1e6d subs r5, r5, #1 - 8003502: d1f1 bne.n 80034e8 ::resize+0x60> - if n > 0 { - 8003504: 4249 negs r1, r1 - 8003506: 9e00 ldr r6, [sp, #0] - 8003508: 9b01 ldr r3, [sp, #4] - 800350a: 2b00 cmp r3, #0 - 800350c: d010 beq.n 8003530 ::resize+0xa8> - 800350e: 9a03 ldr r2, [sp, #12] - 8003510: 81c2 strh r2, [r0, #14] - 8003512: 9a08 ldr r2, [sp, #32] - 8003514: 8182 strh r2, [r0, #12] - 8003516: 9a04 ldr r2, [sp, #16] - 8003518: 8142 strh r2, [r0, #10] - 800351a: 9a05 ldr r2, [sp, #20] - 800351c: 8102 strh r2, [r0, #8] - 800351e: 6004 str r4, [r0, #0] - 8003520: 9a06 ldr r2, [sp, #24] - 8003522: 6042 str r2, [r0, #4] - 8003524: 2000 movs r0, #0 - 8003526: 000a movs r2, r1 - self.local_len += increment; - 8003528: 1c49 adds r1, r1, #1 - 800352a: 4140 adcs r0, r0 - 800352c: 4291 cmp r1, r2 - 800352e: d30d bcc.n 800354c ::resize+0xc4> - 8003530: 60b1 str r1, [r6, #8] - } - 8003532: b009 add sp, #36 ; 0x24 - 8003534: bcf0 pop {r4, r5, r6, r7} - 8003536: bc01 pop {r0} - 8003538: 4700 bx r0 - do_reserve_and_handle(self, len, additional); - 800353a: 0030 movs r0, r6 - 800353c: 0029 movs r1, r5 - 800353e: 001a movs r2, r3 - 8003540: 9301 str r3, [sp, #4] - 8003542: f7ff fef1 bl 8003328 ::reserve::do_reserve_and_handle> - 8003546: 9b01 ldr r3, [sp, #4] - let mut ptr = self.as_mut_ptr().add(self.len()); - 8003548: 68b1 ldr r1, [r6, #8] - 800354a: e7b7 b.n 80034bc ::resize+0x34> - 800354c: 4802 ldr r0, [pc, #8] ; (8003558 ::resize+0xd0>) - 800354e: 211c movs r1, #28 - 8003550: 4a02 ldr r2, [pc, #8] ; (800355c ::resize+0xd4>) - 8003552: f005 fdc5 bl 80090e0 - 8003556: defe udf #254 ; 0xfe - 8003558: 0800b220 .word 0x0800b220 - 800355c: 0800b2bc .word 0x0800b2bc - -08003560 < as alloc::vec::spec_from_iter::SpecFromIter>::from_iter>: - -impl SpecFromIter for Vec -where - I: Iterator, -{ - default fn from_iter(iterator: I) -> Self { - 8003560: b5f0 push {r4, r5, r6, r7, lr} - 8003562: af03 add r7, sp, #12 - 8003564: b081 sub sp, #4 - 8003566: 000d movs r5, r1 - 8003568: 0004 movs r4, r0 - if mem::size_of::() == 0 || capacity == 0 { - 800356a: 2900 cmp r1, #0 - 800356c: d034 beq.n 80035d8 < as alloc::vec::spec_from_iter::SpecFromIter>::from_iter+0x78> - 800356e: 200f movs r0, #15 - 8003570: 0700 lsls r0, r0, #28 - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 8003572: 0029 movs r1, r5 - 8003574: 4381 bics r1, r0 - 8003576: 1a68 subs r0, r5, r1 - 8003578: 1e41 subs r1, r0, #1 - 800357a: 4188 sbcs r0, r1 - 800357c: d134 bne.n 80035e8 < as alloc::vec::spec_from_iter::SpecFromIter>::from_iter+0x88> - 800357e: 012e lsls r6, r5, #4 - if usize::BITS < 64 && alloc_size > isize::MAX as usize { - 8003580: d432 bmi.n 80035e8 < as alloc::vec::spec_from_iter::SpecFromIter>::from_iter+0x88> - 8003582: 2104 movs r1, #4 - 8003584: 0030 movs r0, r6 - 8003586: f7fd f8e3 bl 8000750 <__rust_alloc> - let ptr = NonNull::new(raw_ptr).ok_or(AllocError)?; - 800358a: 2800 cmp r0, #0 - 800358c: d02f beq.n 80035ee < as alloc::vec::spec_from_iter::SpecFromIter>::from_iter+0x8e> - Vec { buf: RawVec::with_capacity_in(capacity, alloc), len: 0 } - 800358e: 6020 str r0, [r4, #0] - 8003590: 9400 str r4, [sp, #0] - 8003592: 6065 str r5, [r4, #4] - 8003594: 2100 movs r1, #0 - 8003596: 43ca mvns r2, r1 - 8003598: c006 stmia r0!, {r1, r2} - 800359a: 300c adds r0, #12 - 800359c: 2401 movs r4, #1 - *n -= 1; - 800359e: 1e6d subs r5, r5, #1 - 80035a0: d014 beq.n 80035cc < as alloc::vec::spec_from_iter::SpecFromIter>::from_iter+0x6c> - 80035a2: 0006 movs r6, r0 - 80035a4: 3610 adds r6, #16 - 80035a6: 6002 str r2, [r0, #0] - 80035a8: 1f00 subs r0, r0, #4 - 80035aa: 6001 str r1, [r0, #0] - 80035ac: 1c63 adds r3, r4, #1 - 80035ae: b402 push {r1} - 80035b0: bc01 pop {r0} - 80035b2: 4148 adcs r0, r1 - 80035b4: 42a3 cmp r3, r4 - 80035b6: b440 push {r6} - 80035b8: bc01 pop {r0} - 80035ba: b408 push {r3} - 80035bc: bc10 pop {r4} - 80035be: d2ee bcs.n 800359e < as alloc::vec::spec_from_iter::SpecFromIter>::from_iter+0x3e> - 80035c0: 480d ldr r0, [pc, #52] ; (80035f8 < as alloc::vec::spec_from_iter::SpecFromIter>::from_iter+0x98>) - 80035c2: 211c movs r1, #28 - 80035c4: 4a0d ldr r2, [pc, #52] ; (80035fc < as alloc::vec::spec_from_iter::SpecFromIter>::from_iter+0x9c>) - 80035c6: f005 fd8b bl 80090e0 - 80035ca: defe udf #254 ; 0xfe - *self.len = self.local_len; - 80035cc: 9800 ldr r0, [sp, #0] - 80035ce: 6084 str r4, [r0, #8] - SpecFromIterNested::from_iter(iterator) - } - 80035d0: b001 add sp, #4 - 80035d2: bcf0 pop {r4, r5, r6, r7} - 80035d4: bc01 pop {r0} - 80035d6: 4700 bx r0 - 80035d8: 2000 movs r0, #0 - 80035da: 2104 movs r1, #4 - 80035dc: c422 stmia r4!, {r1, r5} - 80035de: 6020 str r0, [r4, #0] - 80035e0: b001 add sp, #4 - 80035e2: bcf0 pop {r4, r5, r6, r7} - 80035e4: bc01 pop {r0} - 80035e6: 4700 bx r0 - 80035e8: f003 fa18 bl 8006a1c - 80035ec: defe udf #254 ; 0xfe - 80035ee: 2104 movs r1, #4 - Err(_) => handle_alloc_error(layout), - 80035f0: 0030 movs r0, r6 - 80035f2: f003 fa55 bl 8006aa0 - 80035f6: defe udf #254 ; 0xfe - 80035f8: 0800b220 .word 0x0800b220 - 80035fc: 0800b2bc .word 0x0800b2bc - -08003600 : - -#[non_exhaustive] -pub struct ObjectDistribution {} - -impl ObjectDistribution { - pub fn get(&mut self) -> ObjectController { - 8003600: b580 push {r7, lr} - 8003602: af00 add r7, sp, #0 - ObjectController::new() - 8003604: f000 fa94 bl 8003b30 - } - 8003608: bc80 pop {r7} - 800360a: bc01 pop {r0} - 800360c: 4700 bx r0 - ... - -08003610 : -pub mod timer; - -#[cfg(not(test))] -#[panic_handler] -#[allow(unused_must_use)] -fn panic_implementation(info: &core::panic::PanicInfo) -> ! { - 8003610: b580 push {r7, lr} - 8003612: af00 add r7, sp, #0 - 8003614: b08c sub sp, #48 ; 0x30 - 8003616: 9001 str r0, [sp, #4] - 8003618: 4810 ldr r0, [pc, #64] ; (800365c ) - 800361a: 4911 ldr r1, [pc, #68] ; (8003660 ) - intrinsics::volatile_store(dst, src); - 800361c: 8001 strh r1, [r0, #0] - intrinsics::volatile_load(src) - 800361e: 8800 ldrh r0, [r0, #0] - 8003620: 4910 ldr r1, [pc, #64] ; (8003664 ) - use core::fmt::Write; - if let Some(mut mgba) = mgba::Mgba::new() { - 8003622: 4288 cmp r0, r1 - 8003624: d118 bne.n 8003658 - 8003626: 2000 movs r0, #0 - 8003628: 9002 str r0, [sp, #8] - write!(mgba, "{}", info); - 800362a: 490f ldr r1, [pc, #60] ; (8003668 ) - 800362c: 9104 str r1, [sp, #16] - 800362e: a901 add r1, sp, #4 - 8003630: 9103 str r1, [sp, #12] - 8003632: a902 add r1, sp, #8 - 8003634: 9105 str r1, [sp, #20] - 8003636: 2401 movs r4, #1 - write(&mut self, args) - 8003638: 940b str r4, [sp, #44] ; 0x2c - 800363a: a903 add r1, sp, #12 - 800363c: 910a str r1, [sp, #40] ; 0x28 - 800363e: 9009 str r0, [sp, #36] ; 0x24 - 8003640: 9008 str r0, [sp, #32] - 8003642: 9407 str r4, [sp, #28] - 8003644: 4809 ldr r0, [pc, #36] ; (800366c ) - 8003646: 9006 str r0, [sp, #24] - 8003648: a805 add r0, sp, #20 - 800364a: 4909 ldr r1, [pc, #36] ; (8003670 ) - 800364c: aa06 add r2, sp, #24 - 800364e: f003 fb5d bl 8006d0c - 8003652: 0220 lsls r0, r4, #8 - 8003654: 4907 ldr r1, [pc, #28] ; (8003674 ) - intrinsics::volatile_store(dst, src); - 8003656: 8008 strh r0, [r1, #0] - mgba.set_level(mgba::DebugLevel::Fatal); - } - - #[allow(clippy::empty_loop)] - loop {} - 8003658: e7fe b.n 8003658 - 800365a: 46c0 nop ; (mov r8, r8) - 800365c: 04fff780 .word 0x04fff780 - 8003660: 0000c0de .word 0x0000c0de - 8003664: 00001dea .word 0x00001dea - 8003668: 0800372b .word 0x0800372b - 800366c: 0800b434 .word 0x0800b434 - 8003670: 0800c414 .word 0x0800c414 - 8003674: 04fff700 .word 0x04fff700 - -08003678 : - pub timers: timer::TimerController, -} - -impl Gba { - #[doc(hidden)] - pub unsafe fn new_in_entry() -> Self { - 8003678: b580 push {r7, lr} - 800367a: af00 add r7, sp, #0 - let result = ptr::read(dest); - 800367c: 4807 ldr r0, [pc, #28] ; (800369c ) - 800367e: 7801 ldrb r1, [r0, #0] - 8003680: 2201 movs r2, #1 - copy_nonoverlapping(&src as *const T, dst, 1); - 8003682: 7002 strb r2, [r0, #0] - match self { - 8003684: 2901 cmp r1, #1 - 8003686: d002 beq.n 800368e - GBASINGLE.take() - } - 8003688: bc80 pop {r7} - 800368a: bc01 pop {r0} - 800368c: 4700 bx r0 - None => panic("called `Option::unwrap()` on a `None` value"), - 800368e: 4804 ldr r0, [pc, #16] ; (80036a0 ) - 8003690: 212b movs r1, #43 ; 0x2b - 8003692: 4a04 ldr r2, [pc, #16] ; (80036a4 ) - 8003694: f005 fd24 bl 80090e0 - 8003698: defe udf #254 ; 0xfe - 800369a: 46c0 nop ; (mov r8, r8) - 800369c: 03000084 .word 0x03000084 - 80036a0: 0800c3cc .word 0x0800c3cc - 80036a4: 0800c404 .word 0x0800c404 - -080036a8 : - /// Bitmap 4 provides two 8-bit paletted framebuffers with page switching - pub fn bitmap4(&mut self) -> Bitmap4 { - unsafe { Bitmap4::new() } - } - - pub fn tiled0(&mut self) -> (Tiled0, VRamManager) { - 80036a8: b5b0 push {r4, r5, r7, lr} - 80036aa: af02 add r7, sp, #8 - 80036ac: 0004 movs r4, r0 - 80036ae: 2500 movs r5, #0 - Self { - 80036b0: 6005 str r5, [r0, #0] - 80036b2: 6045 str r5, [r0, #4] - 80036b4: 6085 str r5, [r0, #8] - 80036b6: 60c5 str r5, [r0, #12] - 80036b8: 2101 movs r1, #1 - 80036ba: 0688 lsls r0, r1, #26 - intrinsics::volatile_load(src) - 80036bc: 8802 ldrh r2, [r0, #0] - 80036be: 2387 movs r3, #135 ; 0x87 - } -} - -unsafe fn set_graphics_mode(mode: DisplayMode) { - let current = DISPLAY_CONTROL.get(); - let current = current & (!0b111); - 80036c0: 439a bics r2, r3 - intrinsics::volatile_store(dst, src); - 80036c2: 8002 strh r2, [r0, #0] - 80036c4: 0020 movs r0, r4 - 80036c6: 3010 adds r0, #16 - 80036c8: 0209 lsls r1, r1, #8 - HashMap::with_capacity(256); - 80036ca: f7fd fd0b bl 80010e4 ::with_capacity> - 80036ce: 2002 movs r0, #2 - 80036d0: 2104 movs r1, #4 - Vec { buf: RawVec::NEW, len: 0 } - 80036d2: 62a1 str r1, [r4, #40] ; 0x28 - 80036d4: 62e5 str r5, [r4, #44] ; 0x2c - 80036d6: 6325 str r5, [r4, #48] ; 0x30 - 80036d8: 6360 str r0, [r4, #52] ; 0x34 - 80036da: 63a5 str r5, [r4, #56] ; 0x38 - 80036dc: 63e5 str r5, [r4, #60] ; 0x3c - (unsafe { Tiled0::new() }, VRamManager::new()) - } - 80036de: bcb0 pop {r4, r5, r7} - 80036e0: bc01 pop {r0} - 80036e2: 4700 bx r0 - -080036e4 : - ButtonController::new() - } -} - -impl ButtonController { - pub fn new() -> Self { - 80036e4: 4802 ldr r0, [pc, #8] ; (80036f0 ) - intrinsics::volatile_load(src) - 80036e6: 8800 ldrh r0, [r0, #0] - let pressed = !unsafe { BUTTON_INPUT.read_volatile() }; - 80036e8: 43c0 mvns r0, r0 - ButtonController { - previous: pressed, - current: pressed, - } - } - 80036ea: 0001 movs r1, r0 - 80036ec: 4770 bx lr - 80036ee: 46c0 nop ; (mov r8, r8) - 80036f0: 04000130 .word 0x04000130 - -080036f4 : - - pub fn update(&mut self) { - self.previous = self.current; - 80036f4: 8841 ldrh r1, [r0, #2] - 80036f6: 8001 strh r1, [r0, #0] - 80036f8: 4902 ldr r1, [pc, #8] ; (8003704 ) - 80036fa: 8809 ldrh r1, [r1, #0] - self.current = !unsafe { BUTTON_INPUT.read_volatile() }; - 80036fc: 43c9 mvns r1, r1 - 80036fe: 8041 strh r1, [r0, #2] - } - 8003700: 4770 bx lr - 8003702: 46c0 nop ; (mov r8, r8) - 8003704: 04000130 .word 0x04000130 - -08003708 : - - (up, down).into() - } - - pub fn is_pressed(&self, keys: Button) -> bool { - let currently_pressed = self.current as u32; - 8003708: 8840 ldrh r0, [r0, #2] - let b1 = a.0 as i8; - 800370a: 0681 lsls r1, r0, #26 - 800370c: 17c9 asrs r1, r1, #31 - let b2 = a.1 as i8; - 800370e: 06c0 lsls r0, r0, #27 - 8003710: 0fc0 lsrs r0, r0, #31 - unsafe { core::mem::transmute(b2 - b1) } - 8003712: 1840 adds r0, r0, r1 - } - 8003714: 4770 bx lr - -08003716 : - !self.is_pressed(keys) - } - - pub fn is_just_pressed(&self, keys: Button) -> bool { - let current = self.current as u32; - let previous = self.previous as u32; - 8003716: 8802 ldrh r2, [r0, #0] - let keys = keys.bits(); - ((current & keys) != 0) && ((previous & keys) == 0) - 8003718: 400a ands r2, r1 - 800371a: 4253 negs r3, r2 - 800371c: 4153 adcs r3, r2 - let current = self.current as u32; - 800371e: 8840 ldrh r0, [r0, #2] - ((current & keys) != 0) && ((previous & keys) == 0) - 8003720: 4008 ands r0, r1 - 8003722: 1e41 subs r1, r0, #1 - 8003724: 4188 sbcs r0, r1 - 8003726: 4018 ands r0, r3 - } - 8003728: 4770 bx lr - -0800372a <<&T as core::fmt::Display>::fmt>: - fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } - 800372a: b580 push {r7, lr} - 800372c: af00 add r7, sp, #0 - 800372e: 6800 ldr r0, [r0, #0] - 8003730: f004 fc2c bl 8007f8c <::fmt> - 8003734: bc80 pop {r7} - 8003736: bc02 pop {r1} - 8003738: 4708 bx r1 - ... - -0800373c : - 800373c: 4800 ldr r0, [pc, #0] ; (8003740 ) - 800373e: 4770 bx lr - 8003740: 05000400 .word 0x05000400 - -08003744 : - 8003744: 4800 ldr r0, [pc, #0] ; (8003748 ) - 8003746: 4770 bx lr - 8003748: 05000200 .word 0x05000200 - -0800374c : - 800374c: 4800 ldr r0, [pc, #0] ; (8003750 ) - 800374e: 4770 bx lr - 8003750: 06018000 .word 0x06018000 - -08003754 : - 8003754: 4800 ldr r0, [pc, #0] ; (8003758 ) - 8003756: 4770 bx lr - 8003758: 06010000 .word 0x06010000 - -0800375c >: -pub unsafe fn drop_in_place(to_drop: *mut T) { - 800375c: 4770 bx lr - ... - -08003760 : - pub fn commit(&self) { - 8003760: b5f0 push {r4, r5, r6, r7, lr} - 8003762: af03 add r7, sp, #12 - 8003764: b08f sub sp, #60 ; 0x3c - 8003766: 49d1 ldr r1, [pc, #836] ; (8003aac ) - intrinsics::volatile_load(src) - 8003768: 880c ldrh r4, [r1, #0] - 800376a: 2000 movs r0, #0 - intrinsics::volatile_store(dst, src); - 800376c: 8008 strh r0, [r1, #0] - match borrow.get() { - 800376e: 4ad0 ldr r2, [pc, #832] ; (8003ab0 ) - 8003770: 6811 ldr r1, [r2, #0] - 8003772: 2900 cmp r1, #0 - 8003774: d000 beq.n 8003778 - 8003776: e180 b.n 8003a7a - 8003778: 43c3 mvns r3, r0 - copy_nonoverlapping(&src as *const T, dst, 1); - 800377a: 6013 str r3, [r2, #0] - let a = *b; - 800377c: 6851 ldr r1, [r2, #4] - *b += 1; - 800377e: 1c4a adds r2, r1, #1 - 8003780: 428a cmp r2, r1 - 8003782: d700 bvc.n 8003786 - 8003784: e153 b.n 8003a2e - 8003786: 9301 str r3, [sp, #4] - 8003788: 4bc9 ldr r3, [pc, #804] ; (8003ab0 ) - 800378a: c305 stmia r3!, {r0, r2} - intrinsics::volatile_store(dst, src); - 800378c: 4ac7 ldr r2, [pc, #796] ; (8003aac ) - 800378e: 8014 strh r4, [r2, #0] - let a = crate::interrupt::free(|c| { - 8003790: 9108 str r1, [sp, #32] - assert_eq!(a, 0); - 8003792: 2900 cmp r1, #0 - 8003794: d000 beq.n 8003798 - 8003796: e172 b.n 8003a7e - let ptr = self.buf.ptr(); - 8003798: 4ccb ldr r4, [pc, #812] ; (8003ac8 ) -impl ops::Deref for Vec { - type Target = [T]; - - #[inline] - fn deref(&self) -> &[T] { - unsafe { slice::from_raw_parts(self.as_ptr(), self.len) } - 800379a: 6ae1 ldr r1, [r4, #44] ; 0x2c - 800379c: 9105 str r1, [sp, #20] - 800379e: 2900 cmp r1, #0 - 80037a0: d500 bpl.n 80037a4 - 80037a2: e150 b.n 8003a46 - 80037a4: d100 bne.n 80037a8 - 80037a6: e100 b.n 80039aa - 80037a8: 6a61 ldr r1, [r4, #36] ; 0x24 - 80037aa: 9104 str r1, [sp, #16] - 80037ac: 2101 movs r1, #1 - 80037ae: 0249 lsls r1, r1, #9 - 80037b0: 9103 str r1, [sp, #12] - 80037b2: 2107 movs r1, #7 - 80037b4: 0609 lsls r1, r1, #24 - 80037b6: 9106 str r1, [sp, #24] - 80037b8: e014 b.n 80037e4 - 80037ba: 2003 movs r0, #3 - 80037bc: 0782 lsls r2, r0, #30 - 80037be: 9807 ldr r0, [sp, #28] - .add(i * 4) - 80037c0: 0001 movs r1, r0 - 80037c2: 4391 bics r1, r2 - 80037c4: 1a42 subs r2, r0, r1 - 80037c6: 1e51 subs r1, r2, #1 - 80037c8: 418a sbcs r2, r1 - 80037ca: d000 beq.n 80037ce - 80037cc: e106 b.n 80039dc - 80037ce: 0081 lsls r1, r0, #2 - 80037d0: 0049 lsls r1, r1, #1 - 80037d2: 9a03 ldr r2, [sp, #12] - 80037d4: 9b06 ldr r3, [sp, #24] - 80037d6: 525a strh r2, [r3, r1] - 80037d8: 4cbb ldr r4, [pc, #748] ; (8003ac8 ) - 80037da: 1c40 adds r0, r0, #1 - if is_empty!(self) { - 80037dc: 9905 ldr r1, [sp, #20] - 80037de: 4281 cmp r1, r0 - 80037e0: d100 bne.n 80037e4 - 80037e2: e0e2 b.n 80039aa - self.ptr.as_ptr() - 80037e4: 69a6 ldr r6, [r4, #24] - is_aligned_and_not_null(data) - 80037e6: 07b1 lsls r1, r6, #30 - 80037e8: d000 beq.n 80037ec - 80037ea: e12c b.n 8003a46 - 80037ec: 6a21 ldr r1, [r4, #32] - 80037ee: 221f movs r2, #31 - 80037f0: 06d4 lsls r4, r2, #27 - 80037f2: 000a movs r2, r1 - 80037f4: 43a2 bics r2, r4 - 80037f6: 1a8a subs r2, r1, r2 - 80037f8: 1e53 subs r3, r2, #1 - 80037fa: 419a sbcs r2, r3 - 80037fc: d000 beq.n 8003800 - 80037fe: e122 b.n 8003a46 - 8003800: 014a lsls r2, r1, #5 - 8003802: d500 bpl.n 8003806 - 8003804: e11f b.n 8003a46 - 8003806: 9a04 ldr r2, [sp, #16] - 8003808: 5c15 ldrb r5, [r2, r0] - &mut (*slice)[self] - 800380a: 42a9 cmp r1, r5 - 800380c: d800 bhi.n 8003810 - 800380e: e0e3 b.n 80039d8 - 8003810: 9007 str r0, [sp, #28] - 8003812: 016a lsls r2, r5, #5 - 8003814: 18b6 adds r6, r6, r2 - if let Some(o) = &mut s.shadow_oam[z as usize] { - 8003816: 7f30 ldrb r0, [r6, #28] - 8003818: 0781 lsls r1, r0, #30 - 800381a: d05c beq.n 80038d6 - 800381c: 2802 cmp r0, #2 - 800381e: d0cc beq.n 80037ba - 8003820: 4ea9 ldr r6, [pc, #676] ; (8003ac8 ) - if mem::size_of::() == 0 { usize::MAX } else { self.cap } - 8003822: 6930 ldr r0, [r6, #16] - if self.len == self.buf.capacity() { - 8003824: 6971 ldr r1, [r6, #20] - 8003826: 4281 cmp r1, r0 - 8003828: 9202 str r2, [sp, #8] - 800382a: d104 bne.n 8003836 - self.buf.reserve_for_push(self.len); - 800382c: 0030 movs r0, r6 - 800382e: 300c adds r0, #12 - 8003830: f7ff fc1e bl 8003070 ::reserve_for_push> - let end = self.as_mut_ptr().add(self.len); - 8003834: 6971 ldr r1, [r6, #20] - let ptr = self.buf.ptr(); - 8003836: 68f0 ldr r0, [r6, #12] - copy_nonoverlapping(&src as *const T, dst, 1); - 8003838: 5445 strb r5, [r0, r1] - self.len += 1; - 800383a: 6972 ldr r2, [r6, #20] - 800383c: 2000 movs r0, #0 - 800383e: 1c51 adds r1, r2, #1 - 8003840: b401 push {r0} - 8003842: bc08 pop {r3} - 8003844: 4143 adcs r3, r0 - 8003846: 4291 cmp r1, r2 - 8003848: d200 bcs.n 800384c - 800384a: e0cd b.n 80039e8 - 800384c: 6171 str r1, [r6, #20] - 800384e: 2103 movs r1, #3 - 8003850: 0789 lsls r1, r1, #30 - 8003852: 9b07 ldr r3, [sp, #28] - .add((i as usize) * 4) - 8003854: 001a movs r2, r3 - 8003856: 438a bics r2, r1 - 8003858: 1a99 subs r1, r3, r2 - 800385a: 1e4a subs r2, r1, #1 - 800385c: 4191 sbcs r1, r2 - 800385e: d000 beq.n 8003862 - 8003860: e0ce b.n 8003a00 - 8003862: 0099 lsls r1, r3, #2 - 8003864: 0049 lsls r1, r1, #1 - intrinsics::volatile_store(dst, src); - 8003866: 9a03 ldr r2, [sp, #12] - 8003868: 9b06 ldr r3, [sp, #24] - 800386a: 525a strh r2, [r3, r1] - self.ptr.as_ptr() - 800386c: 69b2 ldr r2, [r6, #24] - 800386e: 0791 lsls r1, r2, #30 - 8003870: d000 beq.n 8003874 - 8003872: e0e8 b.n 8003a46 - 8003874: 4994 ldr r1, [pc, #592] ; (8003ac8 ) - 8003876: 6a09 ldr r1, [r1, #32] - 8003878: 000b movs r3, r1 - 800387a: 43a3 bics r3, r4 - 800387c: 1acb subs r3, r1, r3 - 800387e: 1e5c subs r4, r3, #1 - 8003880: 41a3 sbcs r3, r4 - 8003882: d000 beq.n 8003886 - 8003884: e0df b.n 8003a46 - 8003886: 014b lsls r3, r1, #5 - 8003888: d500 bpl.n 800388c - 800388a: e0dc b.n 8003a46 - 800388c: 42a9 cmp r1, r5 - 800388e: d800 bhi.n 8003892 - 8003890: e0bc b.n 8003a0c - 8003892: 9902 ldr r1, [sp, #8] - tmp.assume_init() - 8003894: 5855 ldr r5, [r2, r1] - ptr::write(dest, src); - 8003896: 5050 str r0, [r2, r1] - 8003898: 1852 adds r2, r2, r1 - 800389a: 6110 str r0, [r2, #16] - 800389c: 6150 str r0, [r2, #20] - 800389e: 6190 str r0, [r2, #24] - 80038a0: 60d0 str r0, [r2, #12] - 80038a2: 6891 ldr r1, [r2, #8] - 80038a4: 6090 str r0, [r2, #8] - 80038a6: 6050 str r0, [r2, #4] - 80038a8: 7f10 ldrb r0, [r2, #28] - 80038aa: 2302 movs r3, #2 - 80038ac: 61d3 str r3, [r2, #28] - debug_assert!(self.is_some()); - 80038ae: 2802 cmp r0, #2 - 80038b0: d100 bne.n 80038b4 - 80038b2: e0d0 b.n 8003a56 - 80038b4: 2900 cmp r1, #0 - 80038b6: d100 bne.n 80038ba - 80038b8: e0c7 b.n 8003a4a - } -} - -impl<'a> SpriteBorrow<'a> { - fn drop(self, s: &mut SpriteControllerInner) { - s.return_sprite(self.id.sprite()); - 80038ba: 4e83 ldr r6, [pc, #524] ; (8003ac8 ) - 80038bc: 3630 adds r6, #48 ; 0x30 - 80038be: 0030 movs r0, r6 - 80038c0: f001 fa2e bl 8004d20 - 80038c4: 2d00 cmp r5, #0 - 80038c6: d100 bne.n 80038ca - 80038c8: e0bf b.n 8003a4a - 80038ca: 0030 movs r0, r6 - 80038cc: 0029 movs r1, r5 - 80038ce: f001 fa27 bl 8004d20 - 80038d2: 9807 ldr r0, [sp, #28] - 80038d4: e780 b.n 80037d8 - 80038d6: 2003 movs r0, #3 - 80038d8: 0780 lsls r0, r0, #30 - 80038da: 9a07 ldr r2, [sp, #28] - let ptr = (OBJECT_ATTRIBUTE_MEMORY as *mut u16).add(location * 4); - 80038dc: 0011 movs r1, r2 - 80038de: 4381 bics r1, r0 - 80038e0: 1a50 subs r0, r2, r1 - 80038e2: 1e41 subs r1, r0, #1 - 80038e4: 4188 sbcs r0, r1 - 80038e6: 2801 cmp r0, #1 - 80038e8: d100 bne.n 80038ec - 80038ea: e083 b.n 80039f4 - 80038ec: 0090 lsls r0, r2, #2 - 80038ee: 7d31 ldrb r1, [r6, #20] - let mode = self.a0.object_mode(); - 80038f0: 7d72 ldrb r2, [r6, #21] - 80038f2: 0213 lsls r3, r2, #8 - 80038f4: 1859 adds r1, r3, r1 - 80038f6: 0040 lsls r0, r0, #1 - intrinsics::volatile_store(dst, src); - 80038f8: 9b06 ldr r3, [sp, #24] - 80038fa: 5219 strh r1, [r3, r0] - 80038fc: 0791 lsls r1, r2, #30 - 80038fe: d002 beq.n 8003906 - 8003900: 0031 movs r1, r6 - 8003902: 3118 adds r1, #24 - 8003904: e001 b.n 800390a - 8003906: 0031 movs r1, r6 - 8003908: 3116 adds r1, #22 - 800390a: 780a ldrb r2, [r1, #0] - 800390c: 7849 ldrb r1, [r1, #1] - 800390e: 0209 lsls r1, r1, #8 - 8003910: 1889 adds r1, r1, r2 - 8003912: 9a06 ldr r2, [sp, #24] - 8003914: 1810 adds r0, r2, r0 - 8003916: 8041 strh r1, [r0, #2] - 8003918: 7eb1 ldrb r1, [r6, #26] - 800391a: 7ef2 ldrb r2, [r6, #27] - 800391c: 0212 lsls r2, r2, #8 - 800391e: 1851 adds r1, r2, r1 - 8003920: 8081 strh r1, [r0, #4] - core::mem::forget(self); - } - - fn clone(&self, s: &mut SpriteControllerInner) -> Self { - s.sprite.entry(self.id).and_modify(|a| a.count += 1); - 8003922: 6835 ldr r5, [r6, #0] - 8003924: 9509 str r5, [sp, #36] ; 0x24 - intrinsics::wrapping_mul(self, rhs) - 8003926: 4a6a ldr r2, [pc, #424] ; (8003ad0 ) - 8003928: 436a muls r2, r5 - 800392a: 4c67 ldr r4, [pc, #412] ; (8003ac8 ) - let location = self.nodes.location(&key, hash); - 800392c: 0020 movs r0, r4 - 800392e: 3048 adds r0, #72 ; 0x48 - 8003930: a909 add r1, sp, #36 ; 0x24 - 8003932: f7fe fecf bl 80026d4 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715> - if let Some(location) = location { - 8003936: 2801 cmp r0, #1 - 8003938: d123 bne.n 8003982 - let ptr = self.buf.ptr(); - 800393a: 6ca0 ldr r0, [r4, #72] ; 0x48 - 800393c: 0782 lsls r2, r0, #30 - 800393e: d000 beq.n 8003942 - 8003940: e081 b.n 8003a46 - 8003942: 4a61 ldr r2, [pc, #388] ; (8003ac8 ) - 8003944: 6d13 ldr r3, [r2, #80] ; 0x50 - 8003946: 220f movs r2, #15 - 8003948: 0712 lsls r2, r2, #28 - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 800394a: 001c movs r4, r3 - 800394c: 4394 bics r4, r2 - 800394e: 1b1a subs r2, r3, r4 - 8003950: 1e54 subs r4, r2, #1 - 8003952: 41a2 sbcs r2, r4 - if !$e { - 8003954: d177 bne.n 8003a46 - 8003956: 011a lsls r2, r3, #4 - 8003958: d475 bmi.n 8003a46 - 800395a: 428b cmp r3, r1 - 800395c: d95b bls.n 8003a16 - self.distance_to_initial_bucket >= 0 - 800395e: 0109 lsls r1, r1, #4 - 8003960: 1840 adds r0, r0, r1 - 8003962: 6841 ldr r1, [r0, #4] - match self { - 8003964: 2900 cmp r1, #0 - 8003966: d500 bpl.n 800396a - 8003968: e081 b.n 8003a6e - 800396a: 89c1 ldrh r1, [r0, #14] - 800396c: 1c49 adds r1, r1, #1 - 800396e: 000a movs r2, r1 - 8003970: 4b5b ldr r3, [pc, #364] ; (8003ae0 ) - 8003972: 401a ands r2, r3 - 8003974: 1a53 subs r3, r2, r1 - 8003976: 1e5c subs r4, r3, #1 - 8003978: 41a3 sbcs r3, r4 - 800397a: 428a cmp r2, r1 - 800397c: d151 bne.n 8003a22 - 800397e: 300c adds r0, #12 - 8003980: 8041 strh r1, [r0, #2] - debug_assert!(self.is_some()); - 8003982: 2d00 cmp r5, #0 - 8003984: d061 beq.n 8003a4a - let _ = s.palette(self.id.sprite().palette).unwrap(); - 8003986: 6828 ldr r0, [r5, #0] - 8003988: f001 f946 bl 8004c18 - match self { - 800398c: 0400 lsls r0, r0, #16 - 800398e: d068 beq.n 8003a62 - 8003990: 6870 ldr r0, [r6, #4] - copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); - 8003992: 68b1 ldr r1, [r6, #8] - copy_nonoverlapping(&src as *const T, dst, 1); - 8003994: 60b5 str r5, [r6, #8] - 8003996: 60f0 str r0, [r6, #12] - debug_assert!(self.is_some()); - 8003998: 2900 cmp r1, #0 - 800399a: d056 beq.n 8003a4a - 800399c: 4c4a ldr r4, [pc, #296] ; (8003ac8 ) - s.return_sprite(self.id.sprite()); - 800399e: 0020 movs r0, r4 - 80039a0: 3030 adds r0, #48 ; 0x30 - 80039a2: f001 f9bd bl 8004d20 - 80039a6: 9807 ldr r0, [sp, #28] - 80039a8: e717 b.n 80037da - 80039aa: 4a40 ldr r2, [pc, #256] ; (8003aac ) - intrinsics::volatile_load(src) - 80039ac: 8810 ldrh r0, [r2, #0] - 80039ae: 2100 movs r1, #0 - intrinsics::volatile_store(dst, src); - 80039b0: 8011 strh r1, [r2, #0] - 80039b2: 4b3f ldr r3, [pc, #252] ; (8003ab0 ) - 80039b4: 681a ldr r2, [r3, #0] - 80039b6: 2a00 cmp r2, #0 - 80039b8: d16f bne.n 8003a9a - copy_nonoverlapping(&src as *const T, dst, 1); - 80039ba: 9a01 ldr r2, [sp, #4] - 80039bc: 601a str r2, [r3, #0] - *b -= 1; - 80039be: 685b ldr r3, [r3, #4] - 80039c0: 1e5a subs r2, r3, #1 - 80039c2: 429a cmp r2, r3 - 80039c4: 429a cmp r2, r3 - 80039c6: d638 bvs.n 8003a3a - 80039c8: 4b39 ldr r3, [pc, #228] ; (8003ab0 ) - 80039ca: c306 stmia r3!, {r1, r2} - intrinsics::volatile_store(dst, src); - 80039cc: 4937 ldr r1, [pc, #220] ; (8003aac ) - 80039ce: 8008 strh r0, [r1, #0] - } - 80039d0: b00f add sp, #60 ; 0x3c - 80039d2: bcf0 pop {r4, r5, r6, r7} - 80039d4: bc01 pop {r0} - 80039d6: 4700 bx r0 - 80039d8: 4a3c ldr r2, [pc, #240] ; (8003acc ) - 80039da: e018 b.n 8003a0e - .add(i * 4) - 80039dc: 4847 ldr r0, [pc, #284] ; (8003afc ) - 80039de: 2121 movs r1, #33 ; 0x21 - 80039e0: 4a48 ldr r2, [pc, #288] ; (8003b04 ) - 80039e2: f005 fb7d bl 80090e0 - 80039e6: defe udf #254 ; 0xfe - self.len += 1; - 80039e8: 484a ldr r0, [pc, #296] ; (8003b14 ) - 80039ea: 211c movs r1, #28 - 80039ec: 4a4a ldr r2, [pc, #296] ; (8003b18 ) - 80039ee: f005 fb77 bl 80090e0 - 80039f2: defe udf #254 ; 0xfe - let ptr = (OBJECT_ATTRIBUTE_MEMORY as *mut u16).add(location * 4); - 80039f4: 4841 ldr r0, [pc, #260] ; (8003afc ) - 80039f6: 2121 movs r1, #33 ; 0x21 - 80039f8: 4a41 ldr r2, [pc, #260] ; (8003b00 ) - 80039fa: f005 fb71 bl 80090e0 - 80039fe: defe udf #254 ; 0xfe - .add((i as usize) * 4) - 8003a00: 483e ldr r0, [pc, #248] ; (8003afc ) - 8003a02: 2121 movs r1, #33 ; 0x21 - 8003a04: 4a42 ldr r2, [pc, #264] ; (8003b10 ) - 8003a06: f005 fb6b bl 80090e0 - 8003a0a: defe udf #254 ; 0xfe - 8003a0c: 4a3e ldr r2, [pc, #248] ; (8003b08 ) - 8003a0e: 0028 movs r0, r5 - 8003a10: f005 fb7c bl 800910c - 8003a14: defe udf #254 ; 0xfe - 8003a16: 4a2f ldr r2, [pc, #188] ; (8003ad4 ) - 8003a18: 0008 movs r0, r1 - 8003a1a: 0019 movs r1, r3 - 8003a1c: f005 fb76 bl 800910c - 8003a20: defe udf #254 ; 0xfe - s.sprite.entry(self.id).and_modify(|a| a.count += 1); - 8003a22: 4834 ldr r0, [pc, #208] ; (8003af4 ) - 8003a24: 211c movs r1, #28 - 8003a26: 4a34 ldr r2, [pc, #208] ; (8003af8 ) - 8003a28: f005 fb5a bl 80090e0 - 8003a2c: defe udf #254 ; 0xfe - *b += 1; - 8003a2e: 483e ldr r0, [pc, #248] ; (8003b28 ) - 8003a30: 211c movs r1, #28 - 8003a32: 4a3e ldr r2, [pc, #248] ; (8003b2c ) - 8003a34: f005 fb54 bl 80090e0 - 8003a38: defe udf #254 ; 0xfe - *b -= 1; - 8003a3a: 4839 ldr r0, [pc, #228] ; (8003b20 ) - 8003a3c: 2121 movs r1, #33 ; 0x21 - 8003a3e: 4a39 ldr r2, [pc, #228] ; (8003b24 ) - 8003a40: f005 fb4e bl 80090e0 - 8003a44: defe udf #254 ; 0xfe - 8003a46: defe udf #254 ; 0xfe - 8003a48: defe udf #254 ; 0xfe - 8003a4a: 4826 ldr r0, [pc, #152] ; (8003ae4 ) - 8003a4c: 2120 movs r1, #32 - 8003a4e: 4a26 ldr r2, [pc, #152] ; (8003ae8 ) - 8003a50: f005 fb46 bl 80090e0 - 8003a54: defe udf #254 ; 0xfe - 8003a56: 4823 ldr r0, [pc, #140] ; (8003ae4 ) - 8003a58: 2120 movs r1, #32 - 8003a5a: 4a2c ldr r2, [pc, #176] ; (8003b0c ) - 8003a5c: f005 fb40 bl 80090e0 - 8003a60: defe udf #254 ; 0xfe - None => panic("called `Option::unwrap()` on a `None` value"), - 8003a62: 4822 ldr r0, [pc, #136] ; (8003aec ) - 8003a64: 212b movs r1, #43 ; 0x2b - 8003a66: 4a22 ldr r2, [pc, #136] ; (8003af0 ) - 8003a68: f005 fb3a bl 80090e0 - 8003a6c: defe udf #254 ; 0xfe - 8003a6e: 481a ldr r0, [pc, #104] ; (8003ad8 ) - 8003a70: 212b movs r1, #43 ; 0x2b - 8003a72: 4a1a ldr r2, [pc, #104] ; (8003adc ) - 8003a74: f005 fb34 bl 80090e0 - 8003a78: defe udf #254 ; 0xfe - Err(e) => unwrap_failed(msg, &e), - 8003a7a: 480e ldr r0, [pc, #56] ; (8003ab4 ) - 8003a7c: e00e b.n 8003a9c - assert_eq!(a, 0); - 8003a7e: 900e str r0, [sp, #56] ; 0x38 - 8003a80: 900d str r0, [sp, #52] ; 0x34 - 8003a82: 900c str r0, [sp, #48] ; 0x30 - 8003a84: 900b str r0, [sp, #44] ; 0x2c - 8003a86: 900a str r0, [sp, #40] ; 0x28 - 8003a88: 9009 str r0, [sp, #36] ; 0x24 - 8003a8a: 490d ldr r1, [pc, #52] ; (8003ac0 ) - 8003a8c: 9100 str r1, [sp, #0] - 8003a8e: a908 add r1, sp, #32 - 8003a90: 4a0c ldr r2, [pc, #48] ; (8003ac4 ) - 8003a92: ab09 add r3, sp, #36 ; 0x24 - 8003a94: f002 fb3a bl 800610c - 8003a98: defe udf #254 ; 0xfe - 8003a9a: 4820 ldr r0, [pc, #128] ; (8003b1c ) - 8003a9c: 9000 str r0, [sp, #0] - 8003a9e: 4806 ldr r0, [pc, #24] ; (8003ab8 ) - 8003aa0: 2110 movs r1, #16 - 8003aa2: aa09 add r2, sp, #36 ; 0x24 - 8003aa4: 4b05 ldr r3, [pc, #20] ; (8003abc ) - 8003aa6: f004 faf9 bl 800809c - 8003aaa: defe udf #254 ; 0xfe - 8003aac: 04000208 .word 0x04000208 - 8003ab0: 030000e8 .word 0x030000e8 - 8003ab4: 0800ba1c .word 0x0800ba1c - 8003ab8: 0800ae5c .word 0x0800ae5c - 8003abc: 0800b8c8 .word 0x0800b8c8 - 8003ac0: 0800b670 .word 0x0800b670 - 8003ac4: 0800b650 .word 0x0800b650 - 8003ac8: 03000088 .word 0x03000088 - 8003acc: 0800b6b0 .word 0x0800b6b0 - 8003ad0: 9e3779b9 .word 0x9e3779b9 - 8003ad4: 0800ac1c .word 0x0800ac1c - 8003ad8: 0800ab51 .word 0x0800ab51 - 8003adc: 0800ac2c .word 0x0800ac2c - 8003ae0: 0000ffff .word 0x0000ffff - 8003ae4: 0800b551 .word 0x0800b551 - 8003ae8: 0800b780 .word 0x0800b780 - 8003aec: 0800b591 .word 0x0800b591 - 8003af0: 0800b7e0 .word 0x0800b7e0 - 8003af4: 0800ab10 .word 0x0800ab10 - 8003af8: 0800ab94 .word 0x0800ab94 - 8003afc: 0800b530 .word 0x0800b530 - 8003b00: 0800b6a0 .word 0x0800b6a0 - 8003b04: 0800b6c0 .word 0x0800b6c0 - 8003b08: 0800b6e0 .word 0x0800b6e0 - 8003b0c: 0800b6f0 .word 0x0800b6f0 - 8003b10: 0800b6d0 .word 0x0800b6d0 - 8003b14: 0800b490 .word 0x0800b490 - 8003b18: 0800b640 .word 0x0800b640 - 8003b1c: 0800ba3c .word 0x0800ba3c - 8003b20: 0800b9d0 .word 0x0800b9d0 - 8003b24: 0800ba4c .word 0x0800ba4c - 8003b28: 0800b990 .word 0x0800b990 - 8003b2c: 0800ba2c .word 0x0800ba2c - -08003b30 : - pub(crate) fn new() -> Self { - 8003b30: b5f0 push {r4, r5, r6, r7, lr} - 8003b32: af03 add r7, sp, #12 - 8003b34: b09d sub sp, #116 ; 0x74 - 8003b36: 2101 movs r1, #1 - 8003b38: 068a lsls r2, r1, #26 - intrinsics::volatile_load(src) - 8003b3a: 8810 ldrh r0, [r2, #0] - 8003b3c: 2340 movs r3, #64 ; 0x40 - fn bitor(self, rhs: $t) -> $t { self | rhs } - 8003b3e: 4303 orrs r3, r0 - intrinsics::volatile_store(dst, src); - 8003b40: 8013 strh r3, [r2, #0] - 8003b42: 030c lsls r4, r1, #12 - intrinsics::volatile_load(src) - 8003b44: 8810 ldrh r0, [r2, #0] - 8003b46: 4320 orrs r0, r4 - intrinsics::volatile_store(dst, src); - 8003b48: 8010 strh r0, [r2, #0] - intrinsics::volatile_load(src) - 8003b4a: 8813 ldrh r3, [r2, #0] - 8003b4c: 2080 movs r0, #128 ; 0x80 - fn bitand(self, rhs: $t) -> $t { self & rhs } - 8003b4e: 4383 bics r3, r0 - intrinsics::volatile_store(dst, src); - 8003b50: 8013 strh r3, [r2, #0] - 8003b52: 2207 movs r2, #7 - 8003b54: 920a str r2, [sp, #40] ; 0x28 - 8003b56: 0612 lsls r2, r2, #24 - 8003b58: 0249 lsls r1, r1, #9 - 8003b5a: 8011 strh r1, [r2, #0] - 8003b5c: 3208 adds r2, #8 - 8003b5e: 1e40 subs r0, r0, #1 - 8003b60: d1fb bne.n 8003b5a - 8003b62: 2104 movs r1, #4 - unsafe { __rust_alloc(layout.size(), layout.align()) } - 8003b64: 0020 movs r0, r4 - 8003b66: 9107 str r1, [sp, #28] - 8003b68: f7fc fdf2 bl 8000750 <__rust_alloc> - let ptr = NonNull::new(raw_ptr).ok_or(AllocError)?; - 8003b6c: 2800 cmp r0, #0 - 8003b6e: d100 bne.n 8003b72 - 8003b70: e0be b.n 8003cf0 - 8003b72: 0006 movs r6, r0 - 8003b74: 2080 movs r0, #128 ; 0x80 - 8003b76: 2400 movs r4, #0 - 8003b78: 2502 movs r5, #2 - 8003b7a: 0031 movs r1, r6 - copy_nonoverlapping(&src as *const T, dst, 1); - 8003b7c: 600c str r4, [r1, #0] - 8003b7e: 604c str r4, [r1, #4] - 8003b80: 608c str r4, [r1, #8] - 8003b82: 60cc str r4, [r1, #12] - 8003b84: 610c str r4, [r1, #16] - 8003b86: 614c str r4, [r1, #20] - 8003b88: 618c str r4, [r1, #24] - 8003b8a: 61cd str r5, [r1, #28] - 8003b8c: 3120 adds r1, #32 - 8003b8e: 1e40 subs r0, r0, #1 - 8003b90: d1f4 bne.n 8003b7c - 8003b92: 2080 movs r0, #128 ; 0x80 - 8003b94: 2101 movs r1, #1 - unsafe { __rust_alloc(layout.size(), layout.align()) } - 8003b96: f7fc fddb bl 8000750 <__rust_alloc> - let ptr = NonNull::new(raw_ptr).ok_or(AllocError)?; - 8003b9a: 2800 cmp r0, #0 - 8003b9c: d100 bne.n 8003ba0 - 8003b9e: e0a5 b.n 8003cec - 8003ba0: 0021 movs r1, r4 - 8003ba2: 5501 strb r1, [r0, r4] - unsafe { intrinsics::unchecked_add(self, rhs) } - 8003ba4: 1c49 adds r1, r1, #1 - 8003ba6: 1c64 adds r4, r4, #1 - 8003ba8: 2c80 cmp r4, #128 ; 0x80 - 8003baa: d1fa bne.n 8003ba2 - 8003bac: 9006 str r0, [sp, #24] - 8003bae: 2080 movs r0, #128 ; 0x80 - 8003bb0: 2101 movs r1, #1 - 8003bb2: 9005 str r0, [sp, #20] - unsafe { __rust_alloc(layout.size(), layout.align()) } - 8003bb4: f7fc fdcc bl 8000750 <__rust_alloc> - let ptr = NonNull::new(raw_ptr).ok_or(AllocError)?; - 8003bb8: 2800 cmp r0, #0 - 8003bba: d100 bne.n 8003bbe - 8003bbc: e096 b.n 8003cec - 8003bbe: 9604 str r6, [sp, #16] - 8003bc0: 2200 movs r2, #0 - 8003bc2: 0011 movs r1, r2 - 8003bc4: 5481 strb r1, [r0, r2] - 8003bc6: 1c49 adds r1, r1, #1 - 8003bc8: 1c52 adds r2, r2, #1 - 8003bca: 2a80 cmp r2, #128 ; 0x80 - 8003bcc: d1fa bne.n 8003bc4 - 8003bce: 9001 str r0, [sp, #4] - 8003bd0: 2020 movs r0, #32 - 8003bd2: 2101 movs r1, #1 - 8003bd4: 9003 str r0, [sp, #12] - 8003bd6: 9102 str r1, [sp, #8] - unsafe { __rust_alloc(layout.size(), layout.align()) } - 8003bd8: f7fc fdba bl 8000750 <__rust_alloc> - let ptr = NonNull::new(raw_ptr).ok_or(AllocError)?; - 8003bdc: 2800 cmp r0, #0 - 8003bde: d100 bne.n 8003be2 - 8003be0: e08b b.n 8003cfa - 8003be2: 0006 movs r6, r0 - 8003be4: 201f movs r0, #31 - 8003be6: 77f0 strb r0, [r6, #31] - 8003be8: 201e movs r0, #30 - 8003bea: 77b0 strb r0, [r6, #30] - 8003bec: 201d movs r0, #29 - 8003bee: 7770 strb r0, [r6, #29] - 8003bf0: 201c movs r0, #28 - 8003bf2: 7730 strb r0, [r6, #28] - 8003bf4: 201b movs r0, #27 - 8003bf6: 76f0 strb r0, [r6, #27] - 8003bf8: 201a movs r0, #26 - 8003bfa: 76b0 strb r0, [r6, #26] - 8003bfc: 2019 movs r0, #25 - 8003bfe: 7670 strb r0, [r6, #25] - 8003c00: 2018 movs r0, #24 - 8003c02: 7630 strb r0, [r6, #24] - 8003c04: 2017 movs r0, #23 - 8003c06: 75f0 strb r0, [r6, #23] - 8003c08: 2016 movs r0, #22 - 8003c0a: 75b0 strb r0, [r6, #22] - 8003c0c: 2015 movs r0, #21 - 8003c0e: 7570 strb r0, [r6, #21] - 8003c10: 2014 movs r0, #20 - 8003c12: 7530 strb r0, [r6, #20] - 8003c14: 2013 movs r0, #19 - 8003c16: 74f0 strb r0, [r6, #19] - 8003c18: 2012 movs r0, #18 - 8003c1a: 74b0 strb r0, [r6, #18] - 8003c1c: 2011 movs r0, #17 - 8003c1e: 7470 strb r0, [r6, #17] - 8003c20: 2010 movs r0, #16 - 8003c22: 9008 str r0, [sp, #32] - 8003c24: 7430 strb r0, [r6, #16] - 8003c26: 200f movs r0, #15 - 8003c28: 73f0 strb r0, [r6, #15] - 8003c2a: 200e movs r0, #14 - 8003c2c: 73b0 strb r0, [r6, #14] - 8003c2e: 200d movs r0, #13 - 8003c30: 9009 str r0, [sp, #36] ; 0x24 - 8003c32: 7370 strb r0, [r6, #13] - 8003c34: 200c movs r0, #12 - 8003c36: 7330 strb r0, [r6, #12] - 8003c38: 200b movs r0, #11 - 8003c3a: 72f0 strb r0, [r6, #11] - 8003c3c: 200a movs r0, #10 - 8003c3e: 72b0 strb r0, [r6, #10] - 8003c40: 2009 movs r0, #9 - 8003c42: 7270 strb r0, [r6, #9] - 8003c44: 2008 movs r0, #8 - 8003c46: 7230 strb r0, [r6, #8] - 8003c48: 980a ldr r0, [sp, #40] ; 0x28 - 8003c4a: 71f0 strb r0, [r6, #7] - 8003c4c: 2006 movs r0, #6 - 8003c4e: 71b0 strb r0, [r6, #6] - 8003c50: 2005 movs r0, #5 - 8003c52: 7170 strb r0, [r6, #5] - 8003c54: 9807 ldr r0, [sp, #28] - 8003c56: 7130 strb r0, [r6, #4] - 8003c58: 2003 movs r0, #3 - 8003c5a: 70f0 strb r0, [r6, #3] - 8003c5c: 70b5 strb r5, [r6, #2] - 8003c5e: 9802 ldr r0, [sp, #8] - 8003c60: 7070 strb r0, [r6, #1] - 8003c62: 2500 movs r5, #0 - 8003c64: 7035 strb r5, [r6, #0] - 8003c66: ac17 add r4, sp, #92 ; 0x5c -#[cfg(not(no_global_oom_handling))] -#[stable(feature = "rust1", since = "1.0.0")] -impl FromIterator for Vec { - #[inline] - fn from_iter>(iter: I) -> Vec { - >::from_iter(iter.into_iter()) - 8003c68: 0020 movs r0, r4 - 8003c6a: 9908 ldr r1, [sp, #32] - 8003c6c: f7ff fc78 bl 8003560 < as alloc::vec::spec_from_iter::SpecFromIter>::from_iter> - Self { - 8003c70: 9809 ldr r0, [sp, #36] ; 0x24 - 8003c72: 901c str r0, [sp, #112] ; 0x70 - 8003c74: 9507 str r5, [sp, #28] - 8003c76: 951b str r5, [sp, #108] ; 0x6c - 8003c78: 951a str r5, [sp, #104] ; 0x68 - 8003c7a: ad0b add r5, sp, #44 ; 0x2c - Self { - 8003c7c: 0028 movs r0, r5 - 8003c7e: 950a str r5, [sp, #40] ; 0x28 - 8003c80: cc0e ldmia r4!, {r1, r2, r3} - 8003c82: c00e stmia r0!, {r1, r2, r3} - 8003c84: cc0e ldmia r4!, {r1, r2, r3} - 8003c86: c00e stmia r0!, {r1, r2, r3} - 8003c88: ac17 add r4, sp, #92 ; 0x5c - 8003c8a: 0020 movs r0, r4 - 8003c8c: 9908 ldr r1, [sp, #32] - 8003c8e: f7ff fc67 bl 8003560 < as alloc::vec::spec_from_iter::SpecFromIter>::from_iter> - Self { - 8003c92: 9809 ldr r0, [sp, #36] ; 0x24 - 8003c94: 901c str r0, [sp, #112] ; 0x70 - 8003c96: 9807 ldr r0, [sp, #28] - 8003c98: 901b str r0, [sp, #108] ; 0x6c - 8003c9a: 901a str r0, [sp, #104] ; 0x68 - Self { - 8003c9c: 3518 adds r5, #24 - Self { - 8003c9e: cc0e ldmia r4!, {r1, r2, r3} - 8003ca0: c50e stmia r5!, {r1, r2, r3} - 8003ca2: cc0e ldmia r4!, {r1, r2, r3} - 8003ca4: c50e stmia r5!, {r1, r2, r3} - Self { - 8003ca6: 4917 ldr r1, [pc, #92] ; (8003d04 ) - 8003ca8: 3130 adds r1, #48 ; 0x30 - 8003caa: 9c0a ldr r4, [sp, #40] ; 0x28 - 8003cac: cc2d ldmia r4!, {r0, r2, r3, r5} - 8003cae: c12d stmia r1!, {r0, r2, r3, r5} - 8003cb0: 940a str r4, [sp, #40] ; 0x28 - 8003cb2: 9c0a ldr r4, [sp, #40] ; 0x28 - 8003cb4: cc2d ldmia r4!, {r0, r2, r3, r5} - 8003cb6: c12d stmia r1!, {r0, r2, r3, r5} - 8003cb8: 940a str r4, [sp, #40] ; 0x28 - 8003cba: 9c0a ldr r4, [sp, #40] ; 0x28 - 8003cbc: cc2d ldmia r4!, {r0, r2, r3, r5} - 8003cbe: c12d stmia r1!, {r0, r2, r3, r5} - 8003cc0: 9905 ldr r1, [sp, #20] - 8003cc2: 4a10 ldr r2, [pc, #64] ; (8003d04 ) - /// ``` - #[stable(feature = "maybe_uninit_write", since = "1.55.0")] - #[rustc_const_unstable(feature = "const_maybe_uninit_write", issue = "63567")] - #[inline(always)] - pub const fn write(&mut self, val: T) -> &mut T { - *self = MaybeUninit::new(val); - 8003cc4: 6211 str r1, [r2, #32] - 8003cc6: 9806 ldr r0, [sp, #24] - 8003cc8: 6250 str r0, [r2, #36] ; 0x24 - 8003cca: 6291 str r1, [r2, #40] ; 0x28 - 8003ccc: 62d1 str r1, [r2, #44] ; 0x2c - 8003cce: 6016 str r6, [r2, #0] - 8003cd0: 9803 ldr r0, [sp, #12] - 8003cd2: 6050 str r0, [r2, #4] - 8003cd4: 6090 str r0, [r2, #8] - 8003cd6: 9801 ldr r0, [sp, #4] - 8003cd8: 60d0 str r0, [r2, #12] - 8003cda: 6111 str r1, [r2, #16] - 8003cdc: 6151 str r1, [r2, #20] - 8003cde: 9804 ldr r0, [sp, #16] - 8003ce0: 6190 str r0, [r2, #24] - 8003ce2: 61d1 str r1, [r2, #28] - } - 8003ce4: b01d add sp, #116 ; 0x74 - 8003ce6: bcf0 pop {r4, r5, r6, r7} - 8003ce8: bc01 pop {r0} - 8003cea: 4700 bx r0 - 8003cec: 2080 movs r0, #128 ; 0x80 - 8003cee: e005 b.n 8003cfc - 8003cf0: 2104 movs r1, #4 - Err(_) => handle_alloc_error(layout), - 8003cf2: 0020 movs r0, r4 - 8003cf4: f002 fed4 bl 8006aa0 - 8003cf8: defe udf #254 ; 0xfe - 8003cfa: 2020 movs r0, #32 - 8003cfc: 2101 movs r1, #1 - 8003cfe: f002 fecf bl 8006aa0 - 8003d02: defe udf #254 ; 0xfe - 8003d04: 03000088 .word 0x03000088 - -08003d08 : - pub fn object<'a>(&'a self, sprite: SpriteBorrow<'a>) -> Object<'a> { - 8003d08: b580 push {r7, lr} - 8003d0a: af00 add r7, sp, #0 - 8003d0c: b082 sub sp, #8 - self.try_get_object(sprite).expect("No object available") - 8003d0e: c903 ldmia r1, {r0, r1} - 8003d10: 9101 str r1, [sp, #4] - 8003d12: 9000 str r0, [sp, #0] - 8003d14: 4669 mov r1, sp - 8003d16: f000 f811 bl 8003d3c - match self { - 8003d1a: 07c0 lsls r0, r0, #31 - 8003d1c: d004 beq.n 8003d28 - } - 8003d1e: 0008 movs r0, r1 - 8003d20: b002 add sp, #8 - 8003d22: bc80 pop {r7} - 8003d24: bc02 pop {r1} - 8003d26: 4708 bx r1 - None => expect_failed(msg), - 8003d28: 4802 ldr r0, [pc, #8] ; (8003d34 ) - 8003d2a: 2113 movs r1, #19 - 8003d2c: 4a02 ldr r2, [pc, #8] ; (8003d38 ) - 8003d2e: f004 fa3d bl 80081ac - 8003d32: defe udf #254 ; 0xfe - 8003d34: 0800b700 .word 0x0800b700 - 8003d38: 0800b714 .word 0x0800b714 - -08003d3c : - pub fn try_get_object<'a>(&'a self, sprite: SpriteBorrow<'a>) -> Option> { - 8003d3c: b5f0 push {r4, r5, r6, r7, lr} - 8003d3e: af03 add r7, sp, #12 - 8003d40: b095 sub sp, #84 ; 0x54 - 8003d42: 910c str r1, [sp, #48] ; 0x30 - 8003d44: 4cd1 ldr r4, [pc, #836] ; (800408c ) - intrinsics::volatile_load(src) - 8003d46: 8821 ldrh r1, [r4, #0] - 8003d48: 2000 movs r0, #0 - intrinsics::volatile_store(dst, src); - 8003d4a: 8020 strh r0, [r4, #0] - 8003d4c: 4dd0 ldr r5, [pc, #832] ; (8004090 ) - 8003d4e: 682a ldr r2, [r5, #0] - 8003d50: 2a00 cmp r2, #0 - 8003d52: d000 beq.n 8003d56 - 8003d54: e167 b.n 8004026 - 8003d56: 43c6 mvns r6, r0 - copy_nonoverlapping(&src as *const T, dst, 1); - 8003d58: 602e str r6, [r5, #0] - let a = *b; - 8003d5a: 686a ldr r2, [r5, #4] - *b += 1; - 8003d5c: 1c53 adds r3, r2, #1 - 8003d5e: 4293 cmp r3, r2 - 8003d60: d700 bvc.n 8003d64 - 8003d62: e12c b.n 8003fbe - 8003d64: c509 stmia r5!, {r0, r3} - intrinsics::volatile_store(dst, src); - 8003d66: 8021 strh r1, [r4, #0] - let a = crate::interrupt::free(|c| { - 8003d68: 920e str r2, [sp, #56] ; 0x38 - assert_eq!(a, 0); - 8003d6a: 2a00 cmp r2, #0 - 8003d6c: d000 beq.n 8003d70 - 8003d6e: e15c b.n 800402a - 8003d70: 9606 str r6, [sp, #24] - 8003d72: 900b str r0, [sp, #44] ; 0x2c - attrs.a2.set_tile_index(sprite.sprite_location); - 8003d74: 980c ldr r0, [sp, #48] ; 0x30 - 8003d76: 8881 ldrh r1, [r0, #4] - ) -> Result>; -} - -/// The default set of predefined specifiers. -pub mod specifiers { - ::modular_bitfield_impl::define_specifiers!(); - 8003d78: 0a88 lsrs r0, r1, #10 - 8003d7a: d000 beq.n 8003d7e - 8003d7c: e163 b.n 8004046 - intrinsics::ctpop(self as $ActualT) as u32 - 8003d7e: 084a lsrs r2, r1, #1 - 8003d80: 48c9 ldr r0, [pc, #804] ; (80040a8 ) - 8003d82: 4010 ands r0, r2 - 8003d84: 1a0b subs r3, r1, r0 - 8003d86: 48c9 ldr r0, [pc, #804] ; (80040ac ) - 8003d88: 089c lsrs r4, r3, #2 - 8003d8a: 4003 ands r3, r0 - 8003d8c: 4004 ands r4, r0 - 8003d8e: 191b adds r3, r3, r4 - 8003d90: 091c lsrs r4, r3, #4 - 8003d92: 191b adds r3, r3, r4 - 8003d94: 48c6 ldr r0, [pc, #792] ; (80040b0 ) - 8003d96: 4003 ands r3, r0 - 8003d98: 24ff movs r4, #255 ; 0xff - 8003d9a: 940a str r4, [sp, #40] ; 0x28 - 8003d9c: 3402 adds r4, #2 - 8003d9e: 4363 muls r3, r4 - 8003da0: 48c4 ldr r0, [pc, #784] ; (80040b4 ) - 8003da2: 4003 ands r3, r0 - 8003da4: 0a18 lsrs r0, r3, #8 - - impl PopBits for PopBuffer<$type> { - #[inline] - fn pop_bits(&mut self, amount: u32) -> u8 { - let Self { bytes } = self; - let orig_ones = bytes.count_ones(); - 8003da6: 9008 str r0, [sp, #32] - 8003da8: 900d str r0, [sp, #52] ; 0x34 - 8003daa: 2355 movs r3, #85 ; 0x55 - 8003dac: 401a ands r2, r3 - 8003dae: 1a8e subs r6, r1, r2 - 8003db0: 2233 movs r2, #51 ; 0x33 - 8003db2: 08b0 lsrs r0, r6, #2 - 8003db4: 4016 ands r6, r2 - 8003db6: 4010 ands r0, r2 - 8003db8: 1830 adds r0, r6, r0 - 8003dba: 0906 lsrs r6, r0, #4 - 8003dbc: 1986 adds r6, r0, r6 - 8003dbe: 200f movs r0, #15 - 8003dc0: 9009 str r0, [sp, #36] ; 0x24 - 8003dc2: 4006 ands r6, r0 - 8003dc4: 0a48 lsrs r0, r1, #9 - 8003dc6: 9307 str r3, [sp, #28] - 8003dc8: 4018 ands r0, r3 - 8003dca: 9105 str r1, [sp, #20] - intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT) - 8003dcc: 0a0d lsrs r5, r1, #8 - intrinsics::ctpop(self as $ActualT) as u32 - 8003dce: 1a28 subs r0, r5, r0 - 8003dd0: 0881 lsrs r1, r0, #2 - 8003dd2: 4bb6 ldr r3, [pc, #728] ; (80040ac ) - 8003dd4: 4018 ands r0, r3 - 8003dd6: 4bb5 ldr r3, [pc, #724] ; (80040ac ) - 8003dd8: 4019 ands r1, r3 - 8003dda: 1840 adds r0, r0, r1 - 8003ddc: 0901 lsrs r1, r0, #4 - 8003dde: 1840 adds r0, r0, r1 - 8003de0: 49b3 ldr r1, [pc, #716] ; (80040b0 ) - 8003de2: 4008 ands r0, r1 - 8003de4: 4360 muls r0, r4 - 8003de6: 49b3 ldr r1, [pc, #716] ; (80040b4 ) - 8003de8: 4008 ands r0, r1 - 8003dea: 0a00 lsrs r0, r0, #8 - debug_assert!(1 <= amount && amount <= 8); - let bitmask = 0xFF >> (8 - amount); - let res = (*bytes & bitmask) as u8; - *bytes = bytes.checked_shr(amount).unwrap_or(0); - debug_assert_eq!(res.count_ones() + bytes.count_ones(), orig_ones); - 8003dec: 1831 adds r1, r6, r0 - 8003dee: 910e str r1, [sp, #56] ; 0x38 - 8003df0: 9b08 ldr r3, [sp, #32] - 8003df2: 4299 cmp r1, r3 - 8003df4: d000 beq.n 8003df8 - 8003df6: e101 b.n 8003ffc - let orig_ones = bytes.count_ones(); - 8003df8: 900d str r0, [sp, #52] ; 0x34 - 8003dfa: 0869 lsrs r1, r5, #1 - 8003dfc: 9b07 ldr r3, [sp, #28] - 8003dfe: 4019 ands r1, r3 - 8003e00: 9507 str r5, [sp, #28] - 8003e02: 1a69 subs r1, r5, r1 - 8003e04: 088b lsrs r3, r1, #2 - 8003e06: 4011 ands r1, r2 - 8003e08: 4013 ands r3, r2 - 8003e0a: 18c9 adds r1, r1, r3 - 8003e0c: 090a lsrs r2, r1, #4 - 8003e0e: 1889 adds r1, r1, r2 - 8003e10: 9a09 ldr r2, [sp, #36] ; 0x24 - 8003e12: 4011 ands r1, r2 - debug_assert_eq!(res.count_ones() + bytes.count_ones(), orig_ones); - 8003e14: 910e str r1, [sp, #56] ; 0x38 - 8003e16: 4281 cmp r1, r0 - 8003e18: d000 beq.n 8003e1c - 8003e1a: e0ef b.n 8003ffc - 8003e1c: 9b0c ldr r3, [sp, #48] ; 0x30 - let shape_size = sprite.id.sprite().size.shape_size(); - 8003e1e: 6818 ldr r0, [r3, #0] - debug_assert!(self.is_some()); - 8003e20: 2800 cmp r0, #0 - 8003e22: 9c0b ldr r4, [sp, #44] ; 0x2c - 8003e24: 4e9a ldr r6, [pc, #616] ; (8004090 ) - 8003e26: d100 bne.n 8003e2a - 8003e28: e0f7 b.n 800401a - attrs.a2.set_palete_bank(sprite.palette_location as u8); - 8003e2a: 88d9 ldrh r1, [r3, #6] - 8003e2c: 9104 str r1, [sp, #16] - 8003e2e: 9a0a ldr r2, [sp, #40] ; 0x28 - 8003e30: 4011 ands r1, r2 - #[bitfield] - #[derive(Clone, Copy, PartialEq, Eq)] - pub(super) struct ObjectAttribute2 { - pub tile_index: B10, - pub priority: Priority, - pub palete_bank: B4, - 8003e32: 2910 cmp r1, #16 - 8003e34: d300 bcc.n 8003e38 - 8003e36: e10b b.n 8004050 - if self.len == 0 { - 8003e38: 4da0 ldr r5, [pc, #640] ; (80040bc ) - 8003e3a: 6969 ldr r1, [r5, #20] - 8003e3c: 2900 cmp r1, #0 - 8003e3e: 9108 str r1, [sp, #32] - 8003e40: d100 bne.n 8003e44 - 8003e42: e0a2 b.n 8003f8a - 8003e44: 7b00 ldrb r0, [r0, #12] - 8003e46: 9002 str r0, [sp, #8] - self.len -= 1; - 8003e48: 1e48 subs r0, r1, #1 - 8003e4a: 6168 str r0, [r5, #20] - let ptr = self.buf.ptr(); - 8003e4c: 68e9 ldr r1, [r5, #12] - Some(ptr::read(self.as_ptr().add(self.len()))) - 8003e4e: 5c0e ldrb r6, [r1, r0] - let new_sprite: SpriteBorrow<'static> = unsafe { core::mem::transmute(sprite) }; - 8003e50: 681c ldr r4, [r3, #0] - 8003e52: 6858 ldr r0, [r3, #4] - 8003e54: 900c str r0, [sp, #48] ; 0x30 - 8003e56: 940f str r4, [sp, #60] ; 0x3c - 8003e58: 4a99 ldr r2, [pc, #612] ; (80040c0 ) - intrinsics::wrapping_mul(self, rhs) - 8003e5a: 4362 muls r2, r4 - let location = self.nodes.location(&key, hash); - 8003e5c: 0028 movs r0, r5 - 8003e5e: 3048 adds r0, #72 ; 0x48 - 8003e60: a90f add r1, sp, #60 ; 0x3c - 8003e62: f7fe fc37 bl 80026d4 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715> - if let Some(location) = location { - 8003e66: 2801 cmp r0, #1 - 8003e68: 9403 str r4, [sp, #12] - 8003e6a: d126 bne.n 8003eba - let ptr = self.buf.ptr(); - 8003e6c: 6ca8 ldr r0, [r5, #72] ; 0x48 - 8003e6e: 0782 lsls r2, r0, #30 - 8003e70: d000 beq.n 8003e74 - 8003e72: e0c1 b.n 8003ff8 - 8003e74: 6d2b ldr r3, [r5, #80] ; 0x50 - 8003e76: 9a09 ldr r2, [sp, #36] ; 0x24 - 8003e78: 0712 lsls r2, r2, #28 - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 8003e7a: 001c movs r4, r3 - 8003e7c: 4394 bics r4, r2 - 8003e7e: 1b1a subs r2, r3, r4 - 8003e80: 1e54 subs r4, r2, #1 - 8003e82: 41a2 sbcs r2, r4 - 8003e84: d000 beq.n 8003e88 - 8003e86: e0b7 b.n 8003ff8 - 8003e88: 011a lsls r2, r3, #4 - 8003e8a: d500 bpl.n 8003e8e - 8003e8c: e0b4 b.n 8003ff8 - 8003e8e: 428b cmp r3, r1 - 8003e90: d800 bhi.n 8003e94 - 8003e92: e0a5 b.n 8003fe0 - self.distance_to_initial_bucket >= 0 - 8003e94: 0109 lsls r1, r1, #4 - 8003e96: 1840 adds r0, r0, r1 - 8003e98: 6841 ldr r1, [r0, #4] - match self { - 8003e9a: 2900 cmp r1, #0 - 8003e9c: d500 bpl.n 8003ea0 - 8003e9e: e0ef b.n 8004080 - s.sprite.entry(self.id).and_modify(|a| a.count += 1); - 8003ea0: 89c1 ldrh r1, [r0, #14] - 8003ea2: 1c49 adds r1, r1, #1 - 8003ea4: 4c83 ldr r4, [pc, #524] ; (80040b4 ) - 8003ea6: 400c ands r4, r1 - 8003ea8: 1a62 subs r2, r4, r1 - 8003eaa: 1e53 subs r3, r2, #1 - 8003eac: 419a sbcs r2, r3 - 8003eae: 428c cmp r4, r1 - 8003eb0: d000 beq.n 8003eb4 - 8003eb2: e09b b.n 8003fec - 8003eb4: 300c adds r0, #12 - 8003eb6: 8041 strh r1, [r0, #2] - 8003eb8: 9c03 ldr r4, [sp, #12] - debug_assert!(self.is_some()); - 8003eba: 2c00 cmp r4, #0 - 8003ebc: d100 bne.n 8003ec0 - 8003ebe: e0ac b.n 800401a - let _ = s.palette(self.id.sprite().palette).unwrap(); - 8003ec0: 6820 ldr r0, [r4, #0] - 8003ec2: f000 fea9 bl 8004c18 - match self { - 8003ec6: 0400 lsls r0, r0, #16 - 8003ec8: d100 bne.n 8003ecc - 8003eca: e0d3 b.n 8004074 - self.ptr.as_ptr() - 8003ecc: 69a8 ldr r0, [r5, #24] - 8003ece: 0781 lsls r1, r0, #30 - 8003ed0: d000 beq.n 8003ed4 - 8003ed2: e091 b.n 8003ff8 - 8003ed4: 6a29 ldr r1, [r5, #32] - 8003ed6: 221f movs r2, #31 - 8003ed8: 06d2 lsls r2, r2, #27 - 8003eda: 000b movs r3, r1 - 8003edc: 4393 bics r3, r2 - 8003ede: 1aca subs r2, r1, r3 - 8003ee0: 1e53 subs r3, r2, #1 - 8003ee2: 419a sbcs r2, r3 - 8003ee4: d000 beq.n 8003ee8 - 8003ee6: e087 b.n 8003ff8 - 8003ee8: 014a lsls r2, r1, #5 - 8003eea: d500 bpl.n 8003eee - 8003eec: e084 b.n 8003ff8 - 8003eee: 42b1 cmp r1, r6 - 8003ef0: 9b07 ldr r3, [sp, #28] - 8003ef2: d970 bls.n 8003fd6 - 8003ef4: 9a05 ldr r2, [sp, #20] - 8003ef6: 990a ldr r1, [sp, #40] ; 0x28 - 8003ef8: 400a ands r2, r1 - 8003efa: 9904 ldr r1, [sp, #16] - 8003efc: 0109 lsls r1, r1, #4 - 8003efe: 4319 orrs r1, r3 - 8003f00: 0209 lsls r1, r1, #8 - 8003f02: 1889 adds r1, r1, r2 - 8003f04: 0409 lsls r1, r1, #16 - 8003f06: 9c02 ldr r4, [sp, #8] - 8003f08: 07a2 lsls r2, r4, #30 - 8003f0a: 0e12 lsrs r2, r2, #24 - 8003f0c: 0213 lsls r3, r2, #8 - 8003f0e: 18c9 adds r1, r1, r3 - 8003f10: 910a str r1, [sp, #40] ; 0x28 - 8003f12: 2103 movs r1, #3 - 8003f14: 0389 lsls r1, r1, #14 - 8003f16: 0323 lsls r3, r4, #12 - 8003f18: 400b ands r3, r1 - 8003f1a: 0611 lsls r1, r2, #24 - 8003f1c: 18cd adds r5, r1, r3 - 8003f1e: 9609 str r6, [sp, #36] ; 0x24 - 8003f20: 0171 lsls r1, r6, #5 - 8003f22: 1846 adds r6, r0, r1 -pub unsafe fn drop_in_place(to_drop: *mut T) { - 8003f24: 0034 movs r4, r6 - 8003f26: 341c adds r4, #28 - 8003f28: 7f30 ldrb r0, [r6, #28] - 8003f2a: 2802 cmp r0, #2 - 8003f2c: d002 beq.n 8003f34 - 8003f2e: 0030 movs r0, r6 - 8003f30: f002 fa7a bl 8006428 > - 8003f34: 980b ldr r0, [sp, #44] ; 0x2c - s.shadow_oam[index as usize] = Some(ObjectInner { - 8003f36: 7020 strb r0, [r4, #0] - 8003f38: 0004 movs r4, r0 - 8003f3a: 9803 ldr r0, [sp, #12] - 8003f3c: 6030 str r0, [r6, #0] - 8003f3e: 990c ldr r1, [sp, #48] ; 0x30 - 8003f40: 6071 str r1, [r6, #4] - 8003f42: 0032 movs r2, r6 - 8003f44: 3208 adds r2, #8 - 8003f46: c233 stmia r2!, {r0, r1, r4, r5} - 8003f48: 980a ldr r0, [sp, #40] ; 0x28 - 8003f4a: 61b0 str r0, [r6, #24] - 8003f4c: 4a5b ldr r2, [pc, #364] ; (80040bc ) - let shadow_oam = &self.shadow_oam; - 8003f4e: 0010 movs r0, r2 - 8003f50: 3018 adds r0, #24 - 8003f52: 900e str r0, [sp, #56] ; 0x38 - unsafe { slice::from_raw_parts_mut(self.as_mut_ptr(), self.len) } - 8003f54: 6ad1 ldr r1, [r2, #44] ; 0x2c - 8003f56: 2900 cmp r1, #0 - 8003f58: d44e bmi.n 8003ff8 - let ptr = self.buf.ptr(); - 8003f5a: 6a50 ldr r0, [r2, #36] ; 0x24 - 8003f5c: aa0e add r2, sp, #56 ; 0x38 - 8003f5e: 920f str r2, [sp, #60] ; 0x3c - 8003f60: aa0f add r2, sp, #60 ; 0x3c - pub fn sort_by_key(&mut self, mut f: F) - where - F: FnMut(&T) -> K, - K: Ord, - { - merge_sort(self, |a, b| f(a).lt(&f(b))); - 8003f62: f001 fa45 bl 80053f0 - 8003f66: 4b49 ldr r3, [pc, #292] ; (800408c ) - intrinsics::volatile_load(src) - 8003f68: 8818 ldrh r0, [r3, #0] - intrinsics::volatile_store(dst, src); - 8003f6a: 801c strh r4, [r3, #0] - 8003f6c: 4d48 ldr r5, [pc, #288] ; (8004090 ) - 8003f6e: 6829 ldr r1, [r5, #0] - 8003f70: 2900 cmp r1, #0 - 8003f72: 9a06 ldr r2, [sp, #24] - 8003f74: 9909 ldr r1, [sp, #36] ; 0x24 - 8003f76: d174 bne.n 8004062 - copy_nonoverlapping(&src as *const T, dst, 1); - 8003f78: 602a str r2, [r5, #0] - *b -= 1; - 8003f7a: 686a ldr r2, [r5, #4] - 8003f7c: 1e56 subs r6, r2, #1 - 8003f7e: 4296 cmp r6, r2 - 8003f80: 4296 cmp r6, r2 - 8003f82: d622 bvs.n 8003fca - 8003f84: c550 stmia r5!, {r4, r6} - intrinsics::volatile_store(dst, src); - 8003f86: 8018 strh r0, [r3, #0] - 8003f88: e012 b.n 8003fb0 - 8003f8a: 4d40 ldr r5, [pc, #256] ; (800408c ) - intrinsics::volatile_load(src) - 8003f8c: 8828 ldrh r0, [r5, #0] - intrinsics::volatile_store(dst, src); - 8003f8e: 802c strh r4, [r5, #0] - 8003f90: 6831 ldr r1, [r6, #0] - 8003f92: 2900 cmp r1, #0 - 8003f94: d165 bne.n 8004062 - copy_nonoverlapping(&src as *const T, dst, 1); - 8003f96: 9906 ldr r1, [sp, #24] - 8003f98: 6031 str r1, [r6, #0] - 8003f9a: 6873 ldr r3, [r6, #4] - 8003f9c: 1e5a subs r2, r3, #1 - 8003f9e: 429a cmp r2, r3 - 8003fa0: 429a cmp r2, r3 - 8003fa2: d612 bvs.n 8003fca - 8003fa4: 6034 str r4, [r6, #0] - 8003fa6: 6072 str r2, [r6, #4] - intrinsics::volatile_store(dst, src); - 8003fa8: 8028 strh r0, [r5, #0] - } - 8003faa: 980c ldr r0, [sp, #48] ; 0x30 - 8003fac: f002 fae4 bl 8006578 > - 8003fb0: 9808 ldr r0, [sp, #32] - if self.len == 0 { - 8003fb2: 1e42 subs r2, r0, #1 - 8003fb4: 4190 sbcs r0, r2 - 8003fb6: b015 add sp, #84 ; 0x54 - 8003fb8: bcf0 pop {r4, r5, r6, r7} - 8003fba: bc04 pop {r2} - 8003fbc: 4710 bx r2 - *b += 1; - 8003fbe: 4853 ldr r0, [pc, #332] ; (800410c ) - 8003fc0: 211c movs r1, #28 - 8003fc2: 4a53 ldr r2, [pc, #332] ; (8004110 ) - 8003fc4: f005 f88c bl 80090e0 - 8003fc8: defe udf #254 ; 0xfe - 8003fca: 4843 ldr r0, [pc, #268] ; (80040d8 ) - 8003fcc: 2121 movs r1, #33 ; 0x21 - 8003fce: 4a43 ldr r2, [pc, #268] ; (80040dc ) - 8003fd0: f005 f886 bl 80090e0 - 8003fd4: defe udf #254 ; 0xfe - 8003fd6: 4a3e ldr r2, [pc, #248] ; (80040d0 ) - 8003fd8: 0030 movs r0, r6 - 8003fda: f005 f897 bl 800910c - 8003fde: defe udf #254 ; 0xfe - 8003fe0: 4a38 ldr r2, [pc, #224] ; (80040c4 ) - 8003fe2: 0008 movs r0, r1 - 8003fe4: 0019 movs r1, r3 - 8003fe6: f005 f891 bl 800910c - 8003fea: defe udf #254 ; 0xfe - s.sprite.entry(self.id).and_modify(|a| a.count += 1); - 8003fec: 4840 ldr r0, [pc, #256] ; (80040f0 ) - 8003fee: 211c movs r1, #28 - 8003ff0: 4a40 ldr r2, [pc, #256] ; (80040f4 ) - 8003ff2: f005 f875 bl 80090e0 - 8003ff6: defe udf #254 ; 0xfe - 8003ff8: defe udf #254 ; 0xfe - 8003ffa: defe udf #254 ; 0xfe - 8003ffc: 980b ldr r0, [sp, #44] ; 0x2c - 8003ffe: 9014 str r0, [sp, #80] ; 0x50 - 8004000: 9013 str r0, [sp, #76] ; 0x4c - 8004002: 9012 str r0, [sp, #72] ; 0x48 - 8004004: 9011 str r0, [sp, #68] ; 0x44 - 8004006: 9010 str r0, [sp, #64] ; 0x40 - 8004008: 900f str r0, [sp, #60] ; 0x3c - 800400a: 492b ldr r1, [pc, #172] ; (80040b8 ) - 800400c: 9100 str r1, [sp, #0] - 800400e: a90e add r1, sp, #56 ; 0x38 - 8004010: aa0d add r2, sp, #52 ; 0x34 - 8004012: ab0f add r3, sp, #60 ; 0x3c - 8004014: f002 f892 bl 800613c - 8004018: defe udf #254 ; 0xfe - 800401a: 4833 ldr r0, [pc, #204] ; (80040e8 ) - 800401c: 2120 movs r1, #32 - 800401e: 4a33 ldr r2, [pc, #204] ; (80040ec ) - 8004020: f005 f85e bl 80090e0 - 8004024: defe udf #254 ; 0xfe - 8004026: 481b ldr r0, [pc, #108] ; (8004094 ) - 8004028: e01c b.n 8004064 - assert_eq!(a, 0); - 800402a: 9014 str r0, [sp, #80] ; 0x50 - 800402c: 9013 str r0, [sp, #76] ; 0x4c - 800402e: 9012 str r0, [sp, #72] ; 0x48 - 8004030: 9011 str r0, [sp, #68] ; 0x44 - 8004032: 9010 str r0, [sp, #64] ; 0x40 - 8004034: 900f str r0, [sp, #60] ; 0x3c - 8004036: 491a ldr r1, [pc, #104] ; (80040a0 ) - 8004038: 9100 str r1, [sp, #0] - 800403a: a90e add r1, sp, #56 ; 0x38 - 800403c: 4a19 ldr r2, [pc, #100] ; (80040a4 ) - 800403e: ab0f add r3, sp, #60 ; 0x3c - 8004040: f002 f864 bl 800610c - 8004044: defe udf #254 ; 0xfe - 8004046: 482f ldr r0, [pc, #188] ; (8004104 ) - 8004048: 9000 str r0, [sp, #0] - 800404a: 482f ldr r0, [pc, #188] ; (8004108 ) - 800404c: 2139 movs r1, #57 ; 0x39 - 800404e: e003 b.n 8004058 - 8004050: 4829 ldr r0, [pc, #164] ; (80040f8 ) - 8004052: 9000 str r0, [sp, #0] - 8004054: 4829 ldr r0, [pc, #164] ; (80040fc ) - 8004056: 213a movs r1, #58 ; 0x3a - 8004058: aa0f add r2, sp, #60 ; 0x3c - 800405a: 4b29 ldr r3, [pc, #164] ; (8004100 ) - 800405c: f004 f81e bl 800809c - 8004060: defe udf #254 ; 0xfe - 8004062: 481c ldr r0, [pc, #112] ; (80040d4 ) - 8004064: 9000 str r0, [sp, #0] - 8004066: 480c ldr r0, [pc, #48] ; (8004098 ) - 8004068: 2110 movs r1, #16 - 800406a: aa0f add r2, sp, #60 ; 0x3c - 800406c: 4b0b ldr r3, [pc, #44] ; (800409c ) - 800406e: f004 f815 bl 800809c - 8004072: defe udf #254 ; 0xfe - None => panic("called `Option::unwrap()` on a `None` value"), - 8004074: 481a ldr r0, [pc, #104] ; (80040e0 ) - 8004076: 212b movs r1, #43 ; 0x2b - 8004078: 4a1a ldr r2, [pc, #104] ; (80040e4 ) - 800407a: f005 f831 bl 80090e0 - 800407e: defe udf #254 ; 0xfe - 8004080: 4811 ldr r0, [pc, #68] ; (80040c8 ) - 8004082: 212b movs r1, #43 ; 0x2b - 8004084: 4a11 ldr r2, [pc, #68] ; (80040cc ) - 8004086: f005 f82b bl 80090e0 - 800408a: defe udf #254 ; 0xfe - 800408c: 04000208 .word 0x04000208 - 8004090: 030000e8 .word 0x030000e8 - 8004094: 0800ba1c .word 0x0800ba1c - 8004098: 0800ae5c .word 0x0800ae5c - 800409c: 0800b8c8 .word 0x0800b8c8 - 80040a0: 0800b670 .word 0x0800b670 - 80040a4: 0800b650 .word 0x0800b650 - 80040a8: 00005555 .word 0x00005555 - 80040ac: 00003333 .word 0x00003333 - 80040b0: 00000f0f .word 0x00000f0f - 80040b4: 0000ffff .word 0x0000ffff - 80040b8: 0800b518 .word 0x0800b518 - 80040bc: 03000088 .word 0x03000088 - 80040c0: 9e3779b9 .word 0x9e3779b9 - 80040c4: 0800ac1c .word 0x0800ac1c - 80040c8: 0800ab51 .word 0x0800ab51 - 80040cc: 0800ac2c .word 0x0800ac2c - 80040d0: 0800b724 .word 0x0800b724 - 80040d4: 0800ba3c .word 0x0800ba3c - 80040d8: 0800b9d0 .word 0x0800b9d0 - 80040dc: 0800ba4c .word 0x0800ba4c - 80040e0: 0800b591 .word 0x0800b591 - 80040e4: 0800b7e0 .word 0x0800b7e0 - 80040e8: 0800b551 .word 0x0800b551 - 80040ec: 0800b780 .word 0x0800b780 - 80040f0: 0800ab10 .word 0x0800ab10 - 80040f4: 0800ab94 .word 0x0800ab94 - 80040f8: 0800b878 .word 0x0800b878 - 80040fc: 0800b83c .word 0x0800b83c - 8004100: 0800b5bc .word 0x0800b5bc - 8004104: 0800b82c .word 0x0800b82c - 8004108: 0800b7f0 .word 0x0800b7f0 - 800410c: 0800b990 .word 0x0800b990 - 8004110: 0800ba2c .word 0x0800ba2c - -08004114 : - pub fn sprite(&self, sprite: &'static Sprite) -> SpriteBorrow { - 8004114: b5d0 push {r4, r6, r7, lr} - 8004116: af02 add r7, sp, #8 - 8004118: b084 sub sp, #16 - 800411a: 0004 movs r4, r0 - 800411c: a801 add r0, sp, #4 - self.try_get_sprite(sprite) - 800411e: f000 f815 bl 800414c - match self { - 8004122: 9801 ldr r0, [sp, #4] - 8004124: 2800 cmp r0, #0 - 8004126: d007 beq.n 8004138 - Some(val) => val, - 8004128: 9803 ldr r0, [sp, #12] - 800412a: 9902 ldr r1, [sp, #8] - 800412c: 6021 str r1, [r4, #0] - 800412e: 6060 str r0, [r4, #4] - } - 8004130: b004 add sp, #16 - 8004132: bcd0 pop {r4, r6, r7} - 8004134: bc01 pop {r0} - 8004136: 4700 bx r0 - None => expect_failed(msg), - 8004138: 4802 ldr r0, [pc, #8] ; (8004144 ) - 800413a: 211c movs r1, #28 - 800413c: 4a02 ldr r2, [pc, #8] ; (8004148 ) - 800413e: f004 f835 bl 80081ac - 8004142: defe udf #254 ; 0xfe - 8004144: 0800b734 .word 0x0800b734 - 8004148: 0800b750 .word 0x0800b750 - -0800414c : - pub fn try_get_sprite(&self, sprite: &'static Sprite) -> Option { - 800414c: b5f0 push {r4, r5, r6, r7, lr} - 800414e: af03 add r7, sp, #12 - 8004150: b08d sub sp, #52 ; 0x34 - 8004152: 9004 str r0, [sp, #16] - 8004154: 4c7b ldr r4, [pc, #492] ; (8004344 ) - intrinsics::volatile_load(src) - 8004156: 8820 ldrh r0, [r4, #0] - 8004158: 2300 movs r3, #0 - intrinsics::volatile_store(dst, src); - 800415a: 8023 strh r3, [r4, #0] - 800415c: 4d7a ldr r5, [pc, #488] ; (8004348 ) - 800415e: 6829 ldr r1, [r5, #0] - 8004160: 2900 cmp r1, #0 - 8004162: d000 beq.n 8004166 - 8004164: e0c6 b.n 80042f4 - 8004166: 0016 movs r6, r2 - 8004168: 43d9 mvns r1, r3 - 800416a: 9103 str r1, [sp, #12] - copy_nonoverlapping(&src as *const T, dst, 1); - 800416c: 6029 str r1, [r5, #0] - let a = *b; - 800416e: 6869 ldr r1, [r5, #4] - *b += 1; - 8004170: 1c4a adds r2, r1, #1 - 8004172: 428a cmp r2, r1 - 8004174: d700 bvc.n 8004178 - 8004176: e09f b.n 80042b8 - 8004178: 9305 str r3, [sp, #20] - 800417a: 602b str r3, [r5, #0] - 800417c: 606a str r2, [r5, #4] - intrinsics::volatile_store(dst, src); - 800417e: 8020 strh r0, [r4, #0] - let a = crate::interrupt::free(|c| { - 8004180: 910c str r1, [sp, #48] ; 0x30 - assert_eq!(a, 0); - 8004182: 2900 cmp r1, #0 - 8004184: d000 beq.n 8004188 - 8004186: e0b7 b.n 80042f8 - let id = sprite.id(); - 8004188: 960c str r6, [sp, #48] ; 0x30 - 800418a: 4a75 ldr r2, [pc, #468] ; (8004360 ) - intrinsics::wrapping_mul(self, rhs) - 800418c: 4372 muls r2, r6 - if let Some(location) = self.nodes.location(key, hash) { - 800418e: 4c75 ldr r4, [pc, #468] ; (8004364 ) - 8004190: 0025 movs r5, r4 - 8004192: 3548 adds r5, #72 ; 0x48 - 8004194: a90c add r1, sp, #48 ; 0x30 - 8004196: 0028 movs r0, r5 - 8004198: f7fe fa9c bl 80026d4 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715> - 800419c: 2801 cmp r0, #1 - 800419e: d12e bne.n 80041fe - let ptr = self.buf.ptr(); - 80041a0: 6ca0 ldr r0, [r4, #72] ; 0x48 - 80041a2: 0782 lsls r2, r0, #30 - 80041a4: d000 beq.n 80041a8 - 80041a6: e0b6 b.n 8004316 - 80041a8: 6d23 ldr r3, [r4, #80] ; 0x50 - 80041aa: 220f movs r2, #15 - 80041ac: 0712 lsls r2, r2, #28 - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 80041ae: 001c movs r4, r3 - 80041b0: 4394 bics r4, r2 - 80041b2: 1b1a subs r2, r3, r4 - 80041b4: 1e54 subs r4, r2, #1 - 80041b6: 41a2 sbcs r2, r4 - 80041b8: d000 beq.n 80041bc - 80041ba: e0ac b.n 8004316 - 80041bc: 011a lsls r2, r3, #4 - 80041be: d500 bpl.n 80041c2 - 80041c0: e0a9 b.n 8004316 - 80041c2: 428b cmp r3, r1 - 80041c4: d800 bhi.n 80041c8 - 80041c6: e083 b.n 80042d0 - self.distance_to_initial_bucket >= 0 - 80041c8: 0109 lsls r1, r1, #4 - 80041ca: 1840 adds r0, r0, r1 - 80041cc: 6841 ldr r1, [r0, #4] - 80041ce: 2900 cmp r1, #0 - 80041d0: d415 bmi.n 80041fe - 80041d2: 300c adds r0, #12 - storage.count += 1; - 80041d4: 8841 ldrh r1, [r0, #2] - 80041d6: 1c49 adds r1, r1, #1 - 80041d8: 4a6d ldr r2, [pc, #436] ; (8004390 ) - 80041da: 400a ands r2, r1 - 80041dc: 1a53 subs r3, r2, r1 - 80041de: 1e5c subs r4, r3, #1 - 80041e0: 41a3 sbcs r3, r4 - 80041e2: 428a cmp r2, r1 - 80041e4: d17a bne.n 80042dc - 80041e6: 8041 strh r1, [r0, #2] - let location = storage.location; - 80041e8: 8804 ldrh r4, [r0, #0] - let palette_location = self.palette(sprite.palette).unwrap(); - 80041ea: 6830 ldr r0, [r6, #0] - 80041ec: f000 fd14 bl 8004c18 - match self { - 80041f0: 0400 lsls r0, r0, #16 - 80041f2: d100 bne.n 80041f6 - 80041f4: e09a b.n 800432c - 80041f6: 9b05 ldr r3, [sp, #20] - 80041f8: 4d52 ldr r5, [pc, #328] ; (8004344 ) - 80041fa: 9a04 ldr r2, [sp, #16] - 80041fc: e032 b.n 8004264 - 80041fe: 200c movs r0, #12 - 8004200: 9002 str r0, [sp, #8] - let dest = unsafe { SPRITE_ALLOCATOR.alloc(sprite.layout())? }; - 8004202: 5630 ldrsb r0, [r6, r0] - match self { - 8004204: 0080 lsls r0, r0, #2 - 8004206: 4959 ldr r1, [pc, #356] ; (800436c ) - 8004208: 5809 ldr r1, [r1, r0] - let dest = unsafe { SPRITE_ALLOCATOR.alloc(sprite.layout())? }; - 800420a: 4859 ldr r0, [pc, #356] ; (8004370 ) - 800420c: 2208 movs r2, #8 - 800420e: f000 fff3 bl 80051f8 - 8004212: 2800 cmp r0, #0 - 8004214: d037 beq.n 8004286 - 8004216: 0004 movs r4, r0 - let palette_location = self.palette(sprite.palette); - 8004218: 6830 ldr r0, [r6, #0] - 800421a: f000 fcfd bl 8004c18 - 800421e: 9101 str r1, [sp, #4] - let palette_location = match palette_location { - 8004220: 0400 lsls r0, r0, #16 - 8004222: d026 beq.n 8004272 - sprite.data.len() / 2, - 8004224: 68b1 ldr r1, [r6, #8] - 8004226: 4853 ldr r0, [pc, #332] ; (8004374 ) - 8004228: 4281 cmp r1, r0 - 800422a: d300 bcc.n 800422e - 800422c: e084 b.n 8004338 - sprite.data.as_ptr().cast(), - 800422e: 6870 ldr r0, [r6, #4] - 8004230: 4a51 ldr r2, [pc, #324] ; (8004378 ) - 8004232: 6010 str r0, [r2, #0] - 8004234: 6054 str r4, [r2, #4] - 8004236: 2001 movs r0, #1 - 8004238: 07c3 lsls r3, r0, #31 - sprite.data.len() / 2, - 800423a: 0849 lsrs r1, r1, #1 - DMA3_CONTROL.set(count as u32 | (1 << 31)); - 800423c: 18c9 adds r1, r1, r3 - 800423e: 6091 str r1, [r2, #8] - 8004240: 4a4e ldr r2, [pc, #312] ; (800437c ) - location: (((d.as_ptr() as usize) - TILE_SPRITE) / BYTES_PER_TILE_4BPP) as u16, - 8004242: 1aa1 subs r1, r4, r2 - 8004244: 9b05 ldr r3, [sp, #20] - 8004246: 415b adcs r3, r3 - 8004248: 4294 cmp r4, r2 - 800424a: d34d bcc.n 80042e8 - self.sprite.insert(id, storage); - 800424c: 9a0c ldr r2, [sp, #48] ; 0x30 - 800424e: 9000 str r0, [sp, #0] - location: (((d.as_ptr() as usize) - TILE_SPRITE) / BYTES_PER_TILE_4BPP) as u16, - 8004250: 094c lsrs r4, r1, #5 - 8004252: a806 add r0, sp, #24 - self.sprite.insert(id, storage); - 8004254: 0029 movs r1, r5 - 8004256: 0023 movs r3, r4 - 8004258: f7fd f9dc bl 8001614 ::insert> - 800425c: 9b05 ldr r3, [sp, #20] - 800425e: 4d39 ldr r5, [pc, #228] ; (8004344 ) - 8004260: 9a04 ldr r2, [sp, #16] - 8004262: 9901 ldr r1, [sp, #4] - 8004264: 8114 strh r4, [r2, #8] - 8004266: 980c ldr r0, [sp, #48] ; 0x30 - 8004268: 2401 movs r4, #1 - 800426a: 6014 str r4, [r2, #0] - 800426c: 6050 str r0, [r2, #4] - 800426e: 8151 strh r1, [r2, #10] - 8004270: e00d b.n 800428e - unsafe { SPRITE_ALLOCATOR.dealloc(dest.as_ptr(), sprite.layout()) } - 8004272: 9802 ldr r0, [sp, #8] - 8004274: 5630 ldrsb r0, [r6, r0] - match self { - 8004276: 0080 lsls r0, r0, #2 - 8004278: 493c ldr r1, [pc, #240] ; (800436c ) - 800427a: 580a ldr r2, [r1, r0] - unsafe { SPRITE_ALLOCATOR.dealloc(dest.as_ptr(), sprite.layout()) } - 800427c: 483c ldr r0, [pc, #240] ; (8004370 ) - 800427e: 2308 movs r3, #8 - 8004280: 0021 movs r1, r4 - 8004282: f001 f809 bl 8005298 - 8004286: 9b05 ldr r3, [sp, #20] - 8004288: 9804 ldr r0, [sp, #16] - 800428a: 6003 str r3, [r0, #0] - 800428c: 4d2d ldr r5, [pc, #180] ; (8004344 ) - intrinsics::volatile_load(src) - 800428e: 8828 ldrh r0, [r5, #0] - intrinsics::volatile_store(dst, src); - 8004290: 802b strh r3, [r5, #0] - 8004292: 4a2d ldr r2, [pc, #180] ; (8004348 ) - 8004294: 6811 ldr r1, [r2, #0] - 8004296: 2900 cmp r1, #0 - 8004298: d13f bne.n 800431a - copy_nonoverlapping(&src as *const T, dst, 1); - 800429a: 9903 ldr r1, [sp, #12] - 800429c: 6011 str r1, [r2, #0] - *b -= 1; - 800429e: 6852 ldr r2, [r2, #4] - 80042a0: 1e51 subs r1, r2, #1 - 80042a2: 4291 cmp r1, r2 - 80042a4: 4291 cmp r1, r2 - 80042a6: d60d bvs.n 80042c4 - 80042a8: 4a27 ldr r2, [pc, #156] ; (8004348 ) - 80042aa: 6013 str r3, [r2, #0] - 80042ac: 6051 str r1, [r2, #4] - intrinsics::volatile_store(dst, src); - 80042ae: 8028 strh r0, [r5, #0] - } - 80042b0: b00d add sp, #52 ; 0x34 - 80042b2: bcf0 pop {r4, r5, r6, r7} - 80042b4: bc01 pop {r0} - 80042b6: 4700 bx r0 - *b += 1; - 80042b8: 483d ldr r0, [pc, #244] ; (80043b0 ) - 80042ba: 211c movs r1, #28 - 80042bc: 4a3d ldr r2, [pc, #244] ; (80043b4 ) - 80042be: f004 ff0f bl 80090e0 - 80042c2: defe udf #254 ; 0xfe - *b -= 1; - 80042c4: 4834 ldr r0, [pc, #208] ; (8004398 ) - 80042c6: 2121 movs r1, #33 ; 0x21 - 80042c8: 4a34 ldr r2, [pc, #208] ; (800439c ) - 80042ca: f004 ff09 bl 80090e0 - 80042ce: defe udf #254 ; 0xfe - 80042d0: 4a25 ldr r2, [pc, #148] ; (8004368 ) - 80042d2: 0008 movs r0, r1 - 80042d4: 0019 movs r1, r3 - 80042d6: f004 ff19 bl 800910c - 80042da: defe udf #254 ; 0xfe - storage.count += 1; - 80042dc: 4832 ldr r0, [pc, #200] ; (80043a8 ) - 80042de: 211c movs r1, #28 - 80042e0: 4a32 ldr r2, [pc, #200] ; (80043ac ) - 80042e2: f004 fefd bl 80090e0 - 80042e6: defe udf #254 ; 0xfe - location: (((d.as_ptr() as usize) - TILE_SPRITE) / BYTES_PER_TILE_4BPP) as u16, - 80042e8: 4825 ldr r0, [pc, #148] ; (8004380 ) - 80042ea: 2121 movs r1, #33 ; 0x21 - 80042ec: 4a25 ldr r2, [pc, #148] ; (8004384 ) - 80042ee: f004 fef7 bl 80090e0 - 80042f2: defe udf #254 ; 0xfe - 80042f4: 4815 ldr r0, [pc, #84] ; (800434c ) - 80042f6: e011 b.n 800431c - 80042f8: 9805 ldr r0, [sp, #20] - assert_eq!(a, 0); - 80042fa: 900b str r0, [sp, #44] ; 0x2c - 80042fc: 900a str r0, [sp, #40] ; 0x28 - 80042fe: 9009 str r0, [sp, #36] ; 0x24 - 8004300: 9008 str r0, [sp, #32] - 8004302: 9007 str r0, [sp, #28] - 8004304: 9006 str r0, [sp, #24] - 8004306: 4914 ldr r1, [pc, #80] ; (8004358 ) - 8004308: 9100 str r1, [sp, #0] - 800430a: a90c add r1, sp, #48 ; 0x30 - 800430c: 4a13 ldr r2, [pc, #76] ; (800435c ) - 800430e: ab06 add r3, sp, #24 - 8004310: f001 fefc bl 800610c - 8004314: defe udf #254 ; 0xfe - ::core::intrinsics::abort(); - 8004316: defe udf #254 ; 0xfe - 8004318: defe udf #254 ; 0xfe - 800431a: 481e ldr r0, [pc, #120] ; (8004394 ) - 800431c: 9000 str r0, [sp, #0] - 800431e: 480c ldr r0, [pc, #48] ; (8004350 ) - 8004320: 2110 movs r1, #16 - 8004322: aa06 add r2, sp, #24 - 8004324: 4b0b ldr r3, [pc, #44] ; (8004354 ) - 8004326: f003 feb9 bl 800809c - 800432a: defe udf #254 ; 0xfe - None => panic("called `Option::unwrap()` on a `None` value"), - 800432c: 481c ldr r0, [pc, #112] ; (80043a0 ) - 800432e: 212b movs r1, #43 ; 0x2b - 8004330: 4a1c ldr r2, [pc, #112] ; (80043a4 ) - 8004332: f004 fed5 bl 80090e0 - 8004336: defe udf #254 ; 0xfe - assert!(count < u16::MAX as usize); - 8004338: 4813 ldr r0, [pc, #76] ; (8004388 ) - 800433a: 212b movs r1, #43 ; 0x2b - 800433c: 4a13 ldr r2, [pc, #76] ; (800438c ) - 800433e: f004 fecf bl 80090e0 - 8004342: defe udf #254 ; 0xfe - 8004344: 04000208 .word 0x04000208 - 8004348: 030000e8 .word 0x030000e8 - 800434c: 0800ba1c .word 0x0800ba1c - 8004350: 0800ae5c .word 0x0800ae5c - 8004354: 0800b8c8 .word 0x0800b8c8 - 8004358: 0800b670 .word 0x0800b670 - 800435c: 0800b650 .word 0x0800b650 - 8004360: 9e3779b9 .word 0x9e3779b9 - 8004364: 03000088 .word 0x03000088 - 8004368: 0800ac0c .word 0x0800ac0c - 800436c: 0800b888 .word 0x0800b888 - 8004370: 020000d8 .word 0x020000d8 - 8004374: 0001fffe .word 0x0001fffe - 8004378: 040000d4 .word 0x040000d4 - 800437c: 06010000 .word 0x06010000 - 8004380: 0800b460 .word 0x0800b460 - 8004384: 0800b680 .word 0x0800b680 - 8004388: 0800c0bc .word 0x0800c0bc - 800438c: 0800c0f4 .word 0x0800c0f4 - 8004390: 0000ffff .word 0x0000ffff - 8004394: 0800ba3c .word 0x0800ba3c - 8004398: 0800b9d0 .word 0x0800b9d0 - 800439c: 0800ba4c .word 0x0800ba4c - 80043a0: 0800b591 .word 0x0800b591 - 80043a4: 0800b7a0 .word 0x0800b7a0 - 80043a8: 0800b490 .word 0x0800b490 - 80043ac: 0800b790 .word 0x0800b790 - 80043b0: 0800b990 .word 0x0800b990 - 80043b4: 0800ba2c .word 0x0800ba2c - -080043b8 : - pub fn set_sprite(&'_ mut self, sprite: SpriteBorrow<'a>) { - 80043b8: b5f0 push {r4, r5, r6, r7, lr} - 80043ba: af03 add r7, sp, #12 - 80043bc: b093 sub sp, #76 ; 0x4c - let object_inner = unsafe { self.object_inner() }; - 80043be: 7804 ldrb r4, [r0, #0] - 80043c0: 4a95 ldr r2, [pc, #596] ; (8004618 ) - intrinsics::volatile_load(src) - 80043c2: 8810 ldrh r0, [r2, #0] - 80043c4: 2300 movs r3, #0 - intrinsics::volatile_store(dst, src); - 80043c6: 8013 strh r3, [r2, #0] - 80043c8: 4d94 ldr r5, [pc, #592] ; (800461c ) - 80043ca: 682a ldr r2, [r5, #0] - 80043cc: 2a00 cmp r2, #0 - 80043ce: d000 beq.n 80043d2 - 80043d0: e0ed b.n 80045ae - 80043d2: 930a str r3, [sp, #40] ; 0x28 - 80043d4: 43da mvns r2, r3 - copy_nonoverlapping(&src as *const T, dst, 1); - 80043d6: 602a str r2, [r5, #0] - let a = *b; - 80043d8: 686e ldr r6, [r5, #4] - *b += 1; - 80043da: 1c73 adds r3, r6, #1 - 80043dc: 42b3 cmp r3, r6 - 80043de: d700 bvc.n 80043e2 - 80043e0: e0c2 b.n 8004568 - 80043e2: 9109 str r1, [sp, #36] ; 0x24 - 80043e4: 990a ldr r1, [sp, #40] ; 0x28 - 80043e6: c50a stmia r5!, {r1, r3} - intrinsics::volatile_store(dst, src); - 80043e8: 498b ldr r1, [pc, #556] ; (8004618 ) - 80043ea: 8008 strh r0, [r1, #0] - let a = crate::interrupt::free(|c| { - 80043ec: 960c str r6, [sp, #48] ; 0x30 - copy_nonoverlapping(&src as *const T, dst, 1); - 80043ee: 3d08 subs r5, #8 - assert_eq!(a, 0); - 80043f0: 2e00 cmp r6, #0 - 80043f2: d000 beq.n 80043f6 - 80043f4: e0dd b.n 80045b2 - 80043f6: 498f ldr r1, [pc, #572] ; (8004634 ) - 80043f8: 6988 ldr r0, [r1, #24] - 80043fa: 0783 lsls r3, r0, #30 - 80043fc: d000 beq.n 8004400 - 80043fe: e0c5 b.n 800458c - 8004400: 6a0e ldr r6, [r1, #32] - 8004402: 211f movs r1, #31 - 8004404: 06c9 lsls r1, r1, #27 - 8004406: 0033 movs r3, r6 - 8004408: 438b bics r3, r1 - 800440a: 1af1 subs r1, r6, r3 - 800440c: 1e4b subs r3, r1, #1 - 800440e: 4199 sbcs r1, r3 - 8004410: d000 beq.n 8004414 - 8004412: e0bb b.n 800458c - 8004414: 0171 lsls r1, r6, #5 - 8004416: d500 bpl.n 800441a - 8004418: e0b8 b.n 800458c - 800441a: 42a6 cmp r6, r4 - 800441c: d800 bhi.n 8004420 - 800441e: e0a9 b.n 8004574 - match *self { - 8004420: 0161 lsls r1, r4, #5 - 8004422: 1844 adds r4, r0, r1 - 8004424: 7f20 ldrb r0, [r4, #28] - debug_assert!(self.is_some()); - 8004426: 2802 cmp r0, #2 - 8004428: d100 bne.n 800442c - 800442a: e0d1 b.n 80045d0 - 800442c: 4b7a ldr r3, [pc, #488] ; (8004618 ) - intrinsics::volatile_load(src) - 800442e: 8818 ldrh r0, [r3, #0] - intrinsics::volatile_store(dst, src); - 8004430: 990a ldr r1, [sp, #40] ; 0x28 - 8004432: 8019 strh r1, [r3, #0] - 8004434: 6829 ldr r1, [r5, #0] - 8004436: 2900 cmp r1, #0 - 8004438: 9e09 ldr r6, [sp, #36] ; 0x24 - 800443a: d000 beq.n 800443e - 800443c: e0ce b.n 80045dc - copy_nonoverlapping(&src as *const T, dst, 1); - 800443e: 602a str r2, [r5, #0] - *b -= 1; - 8004440: 686b ldr r3, [r5, #4] - 8004442: 1e59 subs r1, r3, #1 - 8004444: 4299 cmp r1, r3 - 8004446: 4299 cmp r1, r3 - 8004448: d700 bvc.n 800444c - 800444a: e099 b.n 8004580 - 800444c: 9406 str r4, [sp, #24] - 800444e: 9a0a ldr r2, [sp, #40] ; 0x28 - 8004450: 602a str r2, [r5, #0] - 8004452: 6069 str r1, [r5, #4] - intrinsics::volatile_store(dst, src); - 8004454: 4970 ldr r1, [pc, #448] ; (8004618 ) - 8004456: 8008 strh r0, [r1, #0] - object_inner.attrs.a2.set_tile_index(sprite.sprite_location); - 8004458: 88b3 ldrh r3, [r6, #4] - 800445a: 0a98 lsrs r0, r3, #10 - 800445c: d000 beq.n 8004460 - 800445e: e0c6 b.n 80045ee - intrinsics::ctpop(self as $ActualT) as u32 - 8004460: 085d lsrs r5, r3, #1 - 8004462: 4877 ldr r0, [pc, #476] ; (8004640 ) - 8004464: 4028 ands r0, r5 - 8004466: 1a18 subs r0, r3, r0 - 8004468: 4a76 ldr r2, [pc, #472] ; (8004644 ) - 800446a: 0881 lsrs r1, r0, #2 - 800446c: 4010 ands r0, r2 - 800446e: 4011 ands r1, r2 - 8004470: 1840 adds r0, r0, r1 - 8004472: 0901 lsrs r1, r0, #4 - 8004474: 1840 adds r0, r0, r1 - 8004476: 4974 ldr r1, [pc, #464] ; (8004648 ) - 8004478: 4008 ands r0, r1 - 800447a: 22ff movs r2, #255 ; 0xff - 800447c: 9202 str r2, [sp, #8] - 800447e: 3202 adds r2, #2 - 8004480: 4350 muls r0, r2 - 8004482: 4972 ldr r1, [pc, #456] ; (800464c ) - 8004484: 4008 ands r0, r1 - 8004486: 0a00 lsrs r0, r0, #8 - let orig_ones = bytes.count_ones(); - 8004488: 9005 str r0, [sp, #20] - 800448a: 900b str r0, [sp, #44] ; 0x2c - 800448c: 2455 movs r4, #85 ; 0x55 - 800448e: 4025 ands r5, r4 - 8004490: 1b58 subs r0, r3, r5 - 8004492: 2133 movs r1, #51 ; 0x33 - 8004494: 0886 lsrs r6, r0, #2 - 8004496: 4008 ands r0, r1 - 8004498: 9103 str r1, [sp, #12] - 800449a: 400e ands r6, r1 - 800449c: 1980 adds r0, r0, r6 - 800449e: 0906 lsrs r6, r0, #4 - 80044a0: 1980 adds r0, r0, r6 - 80044a2: 210f movs r1, #15 - 80044a4: 9107 str r1, [sp, #28] - 80044a6: 4008 ands r0, r1 - 80044a8: 0a59 lsrs r1, r3, #9 - 80044aa: 9404 str r4, [sp, #16] - 80044ac: 4021 ands r1, r4 - intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT) - 80044ae: 0a1e lsrs r6, r3, #8 - 80044b0: 9608 str r6, [sp, #32] - intrinsics::ctpop(self as $ActualT) as u32 - 80044b2: 1a71 subs r1, r6, r1 - 80044b4: 088e lsrs r6, r1, #2 - 80044b6: 4c63 ldr r4, [pc, #396] ; (8004644 ) - 80044b8: 4021 ands r1, r4 - 80044ba: 4026 ands r6, r4 - 80044bc: 1989 adds r1, r1, r6 - 80044be: 090e lsrs r6, r1, #4 - 80044c0: 1989 adds r1, r1, r6 - 80044c2: 4c61 ldr r4, [pc, #388] ; (8004648 ) - 80044c4: 4021 ands r1, r4 - 80044c6: 4351 muls r1, r2 - 80044c8: 4a60 ldr r2, [pc, #384] ; (800464c ) - 80044ca: 4011 ands r1, r2 - 80044cc: 0a0a lsrs r2, r1, #8 - debug_assert_eq!(res.count_ones() + bytes.count_ones(), orig_ones); - 80044ce: 1880 adds r0, r0, r2 - 80044d0: 900c str r0, [sp, #48] ; 0x30 - 80044d2: 9905 ldr r1, [sp, #20] - 80044d4: 4288 cmp r0, r1 - 80044d6: d15b bne.n 8004590 - 80044d8: 9d06 ldr r5, [sp, #24] - 80044da: 0028 movs r0, r5 - 80044dc: 301a adds r0, #26 - !((0x01 << msb_offset) - 1) - } else { - 0u8 - } | ((0x01 << lsb_offset as u32) - 1)); - let overwrite = buffer.pop_bits(8 - lsb_offset as u32); - bytes[ls_byte] = stays_same | (overwrite << lsb_offset as u32); - 80044de: 7003 strb r3, [r0, #0] - if msb_offset == 8 { - // We don't need to respect what was formerly stored in the byte. - bytes[ms_byte] = buffer.pop_bits(msb_offset as u32); - } else { - // All bits that do not belong to this field should be preserved. - let stays_same = bytes[ms_byte] & !((0x01 << msb_offset) - 1); - 80044e0: 7eeb ldrb r3, [r5, #27] - let orig_ones = bytes.count_ones(); - 80044e2: 920b str r2, [sp, #44] ; 0x2c - 80044e4: 9908 ldr r1, [sp, #32] - 80044e6: 0848 lsrs r0, r1, #1 - 80044e8: 9c04 ldr r4, [sp, #16] - 80044ea: 4020 ands r0, r4 - 80044ec: 1a08 subs r0, r1, r0 - 80044ee: 0881 lsrs r1, r0, #2 - 80044f0: 9c03 ldr r4, [sp, #12] - 80044f2: 4020 ands r0, r4 - 80044f4: 4021 ands r1, r4 - 80044f6: 1840 adds r0, r0, r1 - 80044f8: 0901 lsrs r1, r0, #4 - 80044fa: 1840 adds r0, r0, r1 - 80044fc: 9907 ldr r1, [sp, #28] - 80044fe: 4008 ands r0, r1 - debug_assert_eq!(res.count_ones() + bytes.count_ones(), orig_ones); - 8004500: 900c str r0, [sp, #48] ; 0x30 - 8004502: 4290 cmp r0, r2 - 8004504: 9e09 ldr r6, [sp, #36] ; 0x24 - 8004506: d143 bne.n 8004590 - 8004508: 0028 movs r0, r5 - 800450a: 301b adds r0, #27 - 800450c: 21fc movs r1, #252 ; 0xfc - 800450e: 400b ands r3, r1 - let overwrite = buffer.pop_bits(msb_offset as u32); - bytes[ms_byte] = stays_same | overwrite; - 8004510: 9908 ldr r1, [sp, #32] - 8004512: 430b orrs r3, r1 - 8004514: 7003 strb r3, [r0, #0] - let shape_size = sprite.id.sprite().size.shape_size(); - 8004516: 6831 ldr r1, [r6, #0] - 8004518: 2900 cmp r1, #0 - 800451a: d06d beq.n 80045f8 - 800451c: 002c movs r4, r5 - .set_palete_bank(sprite.palette_location as u8); - 800451e: 88f2 ldrh r2, [r6, #6] - 8004520: 9d02 ldr r5, [sp, #8] - 8004522: 4015 ands r5, r2 - pub palete_bank: B4, - 8004524: 2d10 cmp r5, #16 - 8004526: d26d bcs.n 8004604 - 8004528: 7b09 ldrb r1, [r1, #12] - let stays_same = bytes[ls_byte] - 800452a: 9d07 ldr r5, [sp, #28] - 800452c: 402b ands r3, r5 - bytes[ls_byte] = stays_same | (overwrite << lsb_offset as u32); - 800452e: 0112 lsls r2, r2, #4 - 8004530: 189a adds r2, r3, r2 - 8004532: 7002 strb r2, [r0, #0] - 8004534: 0108 lsls r0, r1, #4 - 8004536: 22c0 movs r2, #192 ; 0xc0 - 8004538: 4002 ands r2, r0 - let stays_same = bytes[ls_byte] - 800453a: 7d60 ldrb r0, [r4, #21] - 800453c: 233f movs r3, #63 ; 0x3f - 800453e: 4018 ands r0, r3 - bytes[ls_byte] = stays_same | (overwrite << lsb_offset as u32); - 8004540: 1880 adds r0, r0, r2 - 8004542: 7560 strb r0, [r4, #21] - let stays_same = bytes[ls_byte] - 8004544: 7e60 ldrb r0, [r4, #25] - 8004546: 4018 ands r0, r3 - bytes[ls_byte] = stays_same | (overwrite << lsb_offset as u32); - 8004548: 0189 lsls r1, r1, #6 - 800454a: 1840 adds r0, r0, r1 - 800454c: 7660 strb r0, [r4, #25] - let stays_same = bytes[ls_byte] - 800454e: 7de0 ldrb r0, [r4, #23] - 8004550: 4018 ands r0, r3 - bytes[ls_byte] = stays_same | (overwrite << lsb_offset as u32); - 8004552: 1840 adds r0, r0, r1 - 8004554: 75e0 strb r0, [r4, #23] - object_inner.sprite = unsafe { core::mem::transmute(sprite) }; - 8004556: ce60 ldmia r6, {r5, r6} - 8004558: 0020 movs r0, r4 - 800455a: f002 f80d bl 8006578 > - 800455e: c460 stmia r4!, {r5, r6} - } - 8004560: b013 add sp, #76 ; 0x4c - 8004562: bcf0 pop {r4, r5, r6, r7} - 8004564: bc01 pop {r0} - 8004566: 4700 bx r0 - *b += 1; - 8004568: 4844 ldr r0, [pc, #272] ; (800467c ) - 800456a: 211c movs r1, #28 - 800456c: 4a44 ldr r2, [pc, #272] ; (8004680 ) - 800456e: f004 fdb7 bl 80090e0 - 8004572: defe udf #254 ; 0xfe - 8004574: 4a30 ldr r2, [pc, #192] ; (8004638 ) - 8004576: 0020 movs r0, r4 - 8004578: 0031 movs r1, r6 - 800457a: f004 fdc7 bl 800910c - 800457e: defe udf #254 ; 0xfe - *b -= 1; - 8004580: 483b ldr r0, [pc, #236] ; (8004670 ) - 8004582: 2121 movs r1, #33 ; 0x21 - 8004584: 4a3b ldr r2, [pc, #236] ; (8004674 ) - 8004586: f004 fdab bl 80090e0 - 800458a: defe udf #254 ; 0xfe - 800458c: defe udf #254 ; 0xfe - 800458e: defe udf #254 ; 0xfe - 8004590: 980a ldr r0, [sp, #40] ; 0x28 - 8004592: 9012 str r0, [sp, #72] ; 0x48 - 8004594: 9011 str r0, [sp, #68] ; 0x44 - 8004596: 9010 str r0, [sp, #64] ; 0x40 - 8004598: 900f str r0, [sp, #60] ; 0x3c - 800459a: 900e str r0, [sp, #56] ; 0x38 - 800459c: 900d str r0, [sp, #52] ; 0x34 - 800459e: 492c ldr r1, [pc, #176] ; (8004650 ) - 80045a0: 9100 str r1, [sp, #0] - 80045a2: a90c add r1, sp, #48 ; 0x30 - 80045a4: aa0b add r2, sp, #44 ; 0x2c - 80045a6: ab0d add r3, sp, #52 ; 0x34 - 80045a8: f001 fdc8 bl 800613c - 80045ac: defe udf #254 ; 0xfe - 80045ae: 481c ldr r0, [pc, #112] ; (8004620 ) - 80045b0: e015 b.n 80045de - 80045b2: 980a ldr r0, [sp, #40] ; 0x28 - assert_eq!(a, 0); - 80045b4: 9012 str r0, [sp, #72] ; 0x48 - 80045b6: 9011 str r0, [sp, #68] ; 0x44 - 80045b8: 9010 str r0, [sp, #64] ; 0x40 - 80045ba: 900f str r0, [sp, #60] ; 0x3c - 80045bc: 900e str r0, [sp, #56] ; 0x38 - 80045be: 900d str r0, [sp, #52] ; 0x34 - 80045c0: 491a ldr r1, [pc, #104] ; (800462c ) - 80045c2: 9100 str r1, [sp, #0] - 80045c4: a90c add r1, sp, #48 ; 0x30 - 80045c6: 4a1a ldr r2, [pc, #104] ; (8004630 ) - 80045c8: ab0d add r3, sp, #52 ; 0x34 - 80045ca: f001 fd9f bl 800610c - 80045ce: defe udf #254 ; 0xfe - 80045d0: 4823 ldr r0, [pc, #140] ; (8004660 ) - 80045d2: 2120 movs r1, #32 - 80045d4: 4a28 ldr r2, [pc, #160] ; (8004678 ) - 80045d6: f004 fd83 bl 80090e0 - 80045da: defe udf #254 ; 0xfe - 80045dc: 4817 ldr r0, [pc, #92] ; (800463c ) - 80045de: 9000 str r0, [sp, #0] - 80045e0: 4810 ldr r0, [pc, #64] ; (8004624 ) - 80045e2: 2110 movs r1, #16 - 80045e4: aa0b add r2, sp, #44 ; 0x2c - 80045e6: 4b10 ldr r3, [pc, #64] ; (8004628 ) - 80045e8: f003 fd58 bl 800809c - 80045ec: defe udf #254 ; 0xfe - 80045ee: 481e ldr r0, [pc, #120] ; (8004668 ) - 80045f0: 9000 str r0, [sp, #0] - 80045f2: 481e ldr r0, [pc, #120] ; (800466c ) - 80045f4: 2139 movs r1, #57 ; 0x39 - 80045f6: e009 b.n 800460c - 80045f8: 4819 ldr r0, [pc, #100] ; (8004660 ) - 80045fa: 2120 movs r1, #32 - 80045fc: 4a19 ldr r2, [pc, #100] ; (8004664 ) - 80045fe: f004 fd6f bl 80090e0 - 8004602: defe udf #254 ; 0xfe - 8004604: 4813 ldr r0, [pc, #76] ; (8004654 ) - 8004606: 9000 str r0, [sp, #0] - 8004608: 4813 ldr r0, [pc, #76] ; (8004658 ) - 800460a: 213a movs r1, #58 ; 0x3a - 800460c: aa0b add r2, sp, #44 ; 0x2c - 800460e: 4b13 ldr r3, [pc, #76] ; (800465c ) - 8004610: f003 fd44 bl 800809c - 8004614: defe udf #254 ; 0xfe - 8004616: 46c0 nop ; (mov r8, r8) - 8004618: 04000208 .word 0x04000208 - 800461c: 030000e8 .word 0x030000e8 - 8004620: 0800ba1c .word 0x0800ba1c - 8004624: 0800ae5c .word 0x0800ae5c - 8004628: 0800b8c8 .word 0x0800b8c8 - 800462c: 0800b670 .word 0x0800b670 - 8004630: 0800b650 .word 0x0800b650 - 8004634: 03000088 .word 0x03000088 - 8004638: 0800b760 .word 0x0800b760 - 800463c: 0800ba3c .word 0x0800ba3c - 8004640: 00005555 .word 0x00005555 - 8004644: 00003333 .word 0x00003333 - 8004648: 00000f0f .word 0x00000f0f - 800464c: 0000ffff .word 0x0000ffff - 8004650: 0800b518 .word 0x0800b518 - 8004654: 0800b878 .word 0x0800b878 - 8004658: 0800b83c .word 0x0800b83c - 800465c: 0800b5bc .word 0x0800b5bc - 8004660: 0800b551 .word 0x0800b551 - 8004664: 0800b780 .word 0x0800b780 - 8004668: 0800b82c .word 0x0800b82c - 800466c: 0800b7f0 .word 0x0800b7f0 - 8004670: 0800b9d0 .word 0x0800b9d0 - 8004674: 0800ba4c .word 0x0800ba4c - 8004678: 0800b770 .word 0x0800b770 - 800467c: 0800b990 .word 0x0800b990 - 8004680: 0800ba2c .word 0x0800ba2c - -08004684 : - pub fn show(&mut self) -> &mut Self { - 8004684: b5f0 push {r4, r5, r6, r7, lr} - 8004686: af03 add r7, sp, #12 - 8004688: b08b sub sp, #44 ; 0x2c - 800468a: 0006 movs r6, r0 - let object_inner = unsafe { self.object_inner() }; - 800468c: 7804 ldrb r4, [r0, #0] - 800468e: 4a3d ldr r2, [pc, #244] ; (8004784 ) - intrinsics::volatile_load(src) - 8004690: 8811 ldrh r1, [r2, #0] - 8004692: 2000 movs r0, #0 - intrinsics::volatile_store(dst, src); - 8004694: 8010 strh r0, [r2, #0] - 8004696: 4d3c ldr r5, [pc, #240] ; (8004788 ) - 8004698: 682a ldr r2, [r5, #0] - 800469a: 2a00 cmp r2, #0 - 800469c: d152 bne.n 8004744 - 800469e: 43c2 mvns r2, r0 - 80046a0: 9202 str r2, [sp, #8] - copy_nonoverlapping(&src as *const T, dst, 1); - 80046a2: 602a str r2, [r5, #0] - let a = *b; - 80046a4: 686b ldr r3, [r5, #4] - *b += 1; - 80046a6: 1c5a adds r2, r3, #1 - 80046a8: 429a cmp r2, r3 - 80046aa: d637 bvs.n 800471c - 80046ac: 9601 str r6, [sp, #4] - 80046ae: c505 stmia r5!, {r0, r2} - intrinsics::volatile_store(dst, src); - 80046b0: 4a34 ldr r2, [pc, #208] ; (8004784 ) - 80046b2: 8011 strh r1, [r2, #0] - let a = crate::interrupt::free(|c| { - 80046b4: 9303 str r3, [sp, #12] - copy_nonoverlapping(&src as *const T, dst, 1); - 80046b6: 3d08 subs r5, #8 - assert_eq!(a, 0); - 80046b8: 2b00 cmp r3, #0 - 80046ba: d145 bne.n 8004748 - 80046bc: 4938 ldr r1, [pc, #224] ; (80047a0 ) - 80046be: 698b ldr r3, [r1, #24] - 80046c0: 079a lsls r2, r3, #30 - 80046c2: d13d bne.n 8004740 - 80046c4: 6a0e ldr r6, [r1, #32] - 80046c6: 221f movs r2, #31 - 80046c8: 06d2 lsls r2, r2, #27 - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 80046ca: 0031 movs r1, r6 - 80046cc: 4391 bics r1, r2 - 80046ce: 1a71 subs r1, r6, r1 - 80046d0: 1e4a subs r2, r1, #1 - 80046d2: 4191 sbcs r1, r2 - if !$e { - 80046d4: d134 bne.n 8004740 - 80046d6: 0171 lsls r1, r6, #5 - 80046d8: d432 bmi.n 8004740 - 80046da: 42a6 cmp r6, r4 - 80046dc: d924 bls.n 8004728 - match *self { - 80046de: 0161 lsls r1, r4, #5 - 80046e0: 1859 adds r1, r3, r1 - 80046e2: 7f0a ldrb r2, [r1, #28] - debug_assert!(self.is_some()); - 80046e4: 2a02 cmp r2, #2 - 80046e6: d03d beq.n 8004764 - 80046e8: 4a26 ldr r2, [pc, #152] ; (8004784 ) - intrinsics::volatile_load(src) - 80046ea: 8813 ldrh r3, [r2, #0] - intrinsics::volatile_store(dst, src); - 80046ec: 8010 strh r0, [r2, #0] - 80046ee: 682a ldr r2, [r5, #0] - 80046f0: 2a00 cmp r2, #0 - 80046f2: 9e01 ldr r6, [sp, #4] - 80046f4: d13c bne.n 8004770 - copy_nonoverlapping(&src as *const T, dst, 1); - 80046f6: 9a02 ldr r2, [sp, #8] - 80046f8: 602a str r2, [r5, #0] - *b -= 1; - 80046fa: 686a ldr r2, [r5, #4] - 80046fc: 1e54 subs r4, r2, #1 - 80046fe: 4294 cmp r4, r2 - 8004700: 4294 cmp r4, r2 - 8004702: d617 bvs.n 8004734 - 8004704: c511 stmia r5!, {r0, r4} - intrinsics::volatile_store(dst, src); - 8004706: 481f ldr r0, [pc, #124] ; (8004784 ) - 8004708: 8003 strh r3, [r0, #0] - let stays_same = bytes[ls_byte] - 800470a: 7d48 ldrb r0, [r1, #21] - 800470c: 22fc movs r2, #252 ; 0xfc - 800470e: 4002 ands r2, r0 - bytes[ls_byte] = stays_same | (overwrite << lsb_offset as u32); - 8004710: 754a strb r2, [r1, #21] - } - 8004712: 0030 movs r0, r6 - 8004714: b00b add sp, #44 ; 0x2c - 8004716: bcf0 pop {r4, r5, r6, r7} - 8004718: bc02 pop {r1} - 800471a: 4708 bx r1 - *b += 1; - 800471c: 4827 ldr r0, [pc, #156] ; (80047bc ) - 800471e: 211c movs r1, #28 - 8004720: 4a27 ldr r2, [pc, #156] ; (80047c0 ) - 8004722: f004 fcdd bl 80090e0 - 8004726: defe udf #254 ; 0xfe - 8004728: 4a1e ldr r2, [pc, #120] ; (80047a4 ) - 800472a: 0020 movs r0, r4 - 800472c: 0031 movs r1, r6 - 800472e: f004 fced bl 800910c - 8004732: defe udf #254 ; 0xfe - *b -= 1; - 8004734: 481d ldr r0, [pc, #116] ; (80047ac ) - 8004736: 2121 movs r1, #33 ; 0x21 - 8004738: 4a1d ldr r2, [pc, #116] ; (80047b0 ) - 800473a: f004 fcd1 bl 80090e0 - 800473e: defe udf #254 ; 0xfe - ::core::intrinsics::abort(); - 8004740: defe udf #254 ; 0xfe - 8004742: defe udf #254 ; 0xfe - 8004744: 4811 ldr r0, [pc, #68] ; (800478c ) - 8004746: e014 b.n 8004772 - assert_eq!(a, 0); - 8004748: 9009 str r0, [sp, #36] ; 0x24 - 800474a: 9008 str r0, [sp, #32] - 800474c: 9007 str r0, [sp, #28] - 800474e: 9006 str r0, [sp, #24] - 8004750: 9005 str r0, [sp, #20] - 8004752: 9004 str r0, [sp, #16] - 8004754: 4910 ldr r1, [pc, #64] ; (8004798 ) - 8004756: 9100 str r1, [sp, #0] - 8004758: a903 add r1, sp, #12 - 800475a: 4a10 ldr r2, [pc, #64] ; (800479c ) - 800475c: ab04 add r3, sp, #16 - 800475e: f001 fcd5 bl 800610c - 8004762: defe udf #254 ; 0xfe - 8004764: 4813 ldr r0, [pc, #76] ; (80047b4 ) - 8004766: 2120 movs r1, #32 - 8004768: 4a13 ldr r2, [pc, #76] ; (80047b8 ) - 800476a: f004 fcb9 bl 80090e0 - 800476e: defe udf #254 ; 0xfe - 8004770: 480d ldr r0, [pc, #52] ; (80047a8 ) - 8004772: 9000 str r0, [sp, #0] - 8004774: 4806 ldr r0, [pc, #24] ; (8004790 ) - 8004776: 2110 movs r1, #16 - 8004778: aa0a add r2, sp, #40 ; 0x28 - 800477a: 4b06 ldr r3, [pc, #24] ; (8004794 ) - 800477c: f003 fc8e bl 800809c - 8004780: defe udf #254 ; 0xfe - 8004782: 46c0 nop ; (mov r8, r8) - 8004784: 04000208 .word 0x04000208 - 8004788: 030000e8 .word 0x030000e8 - 800478c: 0800ba1c .word 0x0800ba1c - 8004790: 0800ae5c .word 0x0800ae5c - 8004794: 0800b8c8 .word 0x0800b8c8 - 8004798: 0800b670 .word 0x0800b670 - 800479c: 0800b650 .word 0x0800b650 - 80047a0: 03000088 .word 0x03000088 - 80047a4: 0800b760 .word 0x0800b760 - 80047a8: 0800ba3c .word 0x0800ba3c - 80047ac: 0800b9d0 .word 0x0800b9d0 - 80047b0: 0800ba4c .word 0x0800ba4c - 80047b4: 0800b551 .word 0x0800b551 - 80047b8: 0800b770 .word 0x0800b770 - 80047bc: 0800b990 .word 0x0800b990 - 80047c0: 0800ba2c .word 0x0800ba2c - -080047c4 : - pub fn set_hflip(&mut self, flip: bool) -> &mut Self { - 80047c4: b5f0 push {r4, r5, r6, r7, lr} - 80047c6: af03 add r7, sp, #12 - 80047c8: b08d sub sp, #52 ; 0x34 - 80047ca: 9103 str r1, [sp, #12] - let object_inner = unsafe { self.object_inner() }; - 80047cc: 7803 ldrb r3, [r0, #0] - 80047ce: 4a3f ldr r2, [pc, #252] ; (80048cc ) - intrinsics::volatile_load(src) - 80047d0: 8811 ldrh r1, [r2, #0] - 80047d2: 2500 movs r5, #0 - intrinsics::volatile_store(dst, src); - 80047d4: 8015 strh r5, [r2, #0] - 80047d6: 4e3e ldr r6, [pc, #248] ; (80048d0 ) - 80047d8: 6832 ldr r2, [r6, #0] - 80047da: 2a00 cmp r2, #0 - 80047dc: d156 bne.n 800488c - 80047de: 43ea mvns r2, r5 - 80047e0: 9204 str r2, [sp, #16] - copy_nonoverlapping(&src as *const T, dst, 1); - 80047e2: 6032 str r2, [r6, #0] - let a = *b; - 80047e4: 6874 ldr r4, [r6, #4] - *b += 1; - 80047e6: 1c62 adds r2, r4, #1 - 80047e8: 42a2 cmp r2, r4 - 80047ea: d63c bvs.n 8004866 - 80047ec: 9002 str r0, [sp, #8] - 80047ee: 6035 str r5, [r6, #0] - 80047f0: 6072 str r2, [r6, #4] - intrinsics::volatile_store(dst, src); - 80047f2: 4836 ldr r0, [pc, #216] ; (80048cc ) - 80047f4: 8001 strh r1, [r0, #0] - let a = crate::interrupt::free(|c| { - 80047f6: 9405 str r4, [sp, #20] - assert_eq!(a, 0); - 80047f8: 2c00 cmp r4, #0 - 80047fa: d149 bne.n 8004890 - 80047fc: 4a3a ldr r2, [pc, #232] ; (80048e8 ) - 80047fe: 6990 ldr r0, [r2, #24] - 8004800: 0784 lsls r4, r0, #30 - 8004802: d141 bne.n 8004888 - 8004804: 6a11 ldr r1, [r2, #32] - 8004806: 221f movs r2, #31 - 8004808: 06d2 lsls r2, r2, #27 - 800480a: 000c movs r4, r1 - 800480c: 4394 bics r4, r2 - 800480e: 1b0a subs r2, r1, r4 - 8004810: 1e54 subs r4, r2, #1 - 8004812: 41a2 sbcs r2, r4 - if !$e { - 8004814: d138 bne.n 8004888 - 8004816: 014a lsls r2, r1, #5 - 8004818: d436 bmi.n 8004888 - 800481a: 4299 cmp r1, r3 - 800481c: d929 bls.n 8004872 - match *self { - 800481e: 0159 lsls r1, r3, #5 - 8004820: 1843 adds r3, r0, r1 - 8004822: 7f18 ldrb r0, [r3, #28] - debug_assert!(self.is_some()); - 8004824: 2802 cmp r0, #2 - 8004826: d042 beq.n 80048ae - 8004828: 4928 ldr r1, [pc, #160] ; (80048cc ) - intrinsics::volatile_load(src) - 800482a: 8808 ldrh r0, [r1, #0] - intrinsics::volatile_store(dst, src); - 800482c: 800d strh r5, [r1, #0] - 800482e: 6831 ldr r1, [r6, #0] - 8004830: 2900 cmp r1, #0 - 8004832: d142 bne.n 80048ba - copy_nonoverlapping(&src as *const T, dst, 1); - 8004834: 9904 ldr r1, [sp, #16] - 8004836: 6031 str r1, [r6, #0] - *b -= 1; - 8004838: 6874 ldr r4, [r6, #4] - 800483a: 1e62 subs r2, r4, #1 - 800483c: 42a2 cmp r2, r4 - 800483e: 42a2 cmp r2, r4 - 8004840: d61c bvs.n 800487c - 8004842: 6035 str r5, [r6, #0] - 8004844: 6072 str r2, [r6, #4] - intrinsics::volatile_store(dst, src); - 8004846: 4921 ldr r1, [pc, #132] ; (80048cc ) - 8004848: 8008 strh r0, [r1, #0] - 800484a: 9903 ldr r1, [sp, #12] - 800484c: 1e48 subs r0, r1, #1 - 800484e: 4181 sbcs r1, r0 - 8004850: 0108 lsls r0, r1, #4 - let stays_same = bytes[ls_byte] - 8004852: 7dd9 ldrb r1, [r3, #23] - 8004854: 22ef movs r2, #239 ; 0xef - 8004856: 400a ands r2, r1 - bytes[ls_byte] = stays_same | (overwrite << lsb_offset as u32); - 8004858: 4302 orrs r2, r0 - 800485a: 75da strb r2, [r3, #23] - } - 800485c: 9802 ldr r0, [sp, #8] - 800485e: b00d add sp, #52 ; 0x34 - 8004860: bcf0 pop {r4, r5, r6, r7} - 8004862: bc02 pop {r1} - 8004864: 4708 bx r1 - *b += 1; - 8004866: 4827 ldr r0, [pc, #156] ; (8004904 ) - 8004868: 211c movs r1, #28 - 800486a: 4a27 ldr r2, [pc, #156] ; (8004908 ) - 800486c: f004 fc38 bl 80090e0 - 8004870: defe udf #254 ; 0xfe - 8004872: 4a1e ldr r2, [pc, #120] ; (80048ec ) - 8004874: 0018 movs r0, r3 - 8004876: f004 fc49 bl 800910c - 800487a: defe udf #254 ; 0xfe - *b -= 1; - 800487c: 481d ldr r0, [pc, #116] ; (80048f4 ) - 800487e: 2121 movs r1, #33 ; 0x21 - 8004880: 4a1d ldr r2, [pc, #116] ; (80048f8 ) - 8004882: f004 fc2d bl 80090e0 - 8004886: defe udf #254 ; 0xfe - ::core::intrinsics::abort(); - 8004888: defe udf #254 ; 0xfe - 800488a: defe udf #254 ; 0xfe - 800488c: 4811 ldr r0, [pc, #68] ; (80048d4 ) - 800488e: e015 b.n 80048bc - assert_eq!(a, 0); - 8004890: 950b str r5, [sp, #44] ; 0x2c - 8004892: 950a str r5, [sp, #40] ; 0x28 - 8004894: 9509 str r5, [sp, #36] ; 0x24 - 8004896: 9508 str r5, [sp, #32] - 8004898: 9507 str r5, [sp, #28] - 800489a: 9506 str r5, [sp, #24] - 800489c: 4810 ldr r0, [pc, #64] ; (80048e0 ) - 800489e: 9000 str r0, [sp, #0] - 80048a0: a905 add r1, sp, #20 - 80048a2: 4a10 ldr r2, [pc, #64] ; (80048e4 ) - 80048a4: ab06 add r3, sp, #24 - 80048a6: 0028 movs r0, r5 - 80048a8: f001 fc30 bl 800610c - 80048ac: defe udf #254 ; 0xfe - 80048ae: 4813 ldr r0, [pc, #76] ; (80048fc ) - 80048b0: 2120 movs r1, #32 - 80048b2: 4a13 ldr r2, [pc, #76] ; (8004900 ) - 80048b4: f004 fc14 bl 80090e0 - 80048b8: defe udf #254 ; 0xfe - 80048ba: 480d ldr r0, [pc, #52] ; (80048f0 ) - 80048bc: 9000 str r0, [sp, #0] - 80048be: 4806 ldr r0, [pc, #24] ; (80048d8 ) - 80048c0: 2110 movs r1, #16 - 80048c2: aa0c add r2, sp, #48 ; 0x30 - 80048c4: 4b05 ldr r3, [pc, #20] ; (80048dc ) - 80048c6: f003 fbe9 bl 800809c - 80048ca: defe udf #254 ; 0xfe - 80048cc: 04000208 .word 0x04000208 - 80048d0: 030000e8 .word 0x030000e8 - 80048d4: 0800ba1c .word 0x0800ba1c - 80048d8: 0800ae5c .word 0x0800ae5c - 80048dc: 0800b8c8 .word 0x0800b8c8 - 80048e0: 0800b670 .word 0x0800b670 - 80048e4: 0800b650 .word 0x0800b650 - 80048e8: 03000088 .word 0x03000088 - 80048ec: 0800b760 .word 0x0800b760 - 80048f0: 0800ba3c .word 0x0800ba3c - 80048f4: 0800b9d0 .word 0x0800b9d0 - 80048f8: 0800ba4c .word 0x0800ba4c - 80048fc: 0800b551 .word 0x0800b551 - 8004900: 0800b770 .word 0x0800b770 - 8004904: 0800b990 .word 0x0800b990 - 8004908: 0800ba2c .word 0x0800ba2c - -0800490c : - pub fn set_x(&mut self, x: u16) -> &mut Self { - 800490c: b5f0 push {r4, r5, r6, r7, lr} - 800490e: af03 add r7, sp, #12 - 8004910: b08d sub sp, #52 ; 0x34 - 8004912: 9103 str r1, [sp, #12] - 8004914: 9002 str r0, [sp, #8] - let object_inner = unsafe { self.object_inner() }; - 8004916: 7803 ldrb r3, [r0, #0] - 8004918: 485c ldr r0, [pc, #368] ; (8004a8c ) - intrinsics::volatile_load(src) - 800491a: 8804 ldrh r4, [r0, #0] - 800491c: 2100 movs r1, #0 - intrinsics::volatile_store(dst, src); - 800491e: 8001 strh r1, [r0, #0] - 8004920: 4e5b ldr r6, [pc, #364] ; (8004a90 ) - 8004922: 6830 ldr r0, [r6, #0] - 8004924: 2800 cmp r0, #0 - 8004926: d000 beq.n 800492a - 8004928: e080 b.n 8004a2c - 800492a: 43c8 mvns r0, r1 - copy_nonoverlapping(&src as *const T, dst, 1); - 800492c: 6030 str r0, [r6, #0] - let a = *b; - 800492e: 6875 ldr r5, [r6, #4] - *b += 1; - 8004930: 1c6a adds r2, r5, #1 - 8004932: 42aa cmp r2, r5 - 8004934: d667 bvs.n 8004a06 - 8004936: 9104 str r1, [sp, #16] - 8004938: c606 stmia r6!, {r1, r2} - intrinsics::volatile_store(dst, src); - 800493a: 4954 ldr r1, [pc, #336] ; (8004a8c ) - 800493c: 800c strh r4, [r1, #0] - let a = crate::interrupt::free(|c| { - 800493e: 9506 str r5, [sp, #24] - copy_nonoverlapping(&src as *const T, dst, 1); - 8004940: 3e08 subs r6, #8 - assert_eq!(a, 0); - 8004942: 2d00 cmp r5, #0 - 8004944: d174 bne.n 8004a30 - 8004946: 4a58 ldr r2, [pc, #352] ; (8004aa8 ) - 8004948: 6995 ldr r5, [r2, #24] - 800494a: 07ac lsls r4, r5, #30 - 800494c: d16c bne.n 8004a28 - 800494e: 6a11 ldr r1, [r2, #32] - 8004950: 221f movs r2, #31 - 8004952: 06d2 lsls r2, r2, #27 - 8004954: 000c movs r4, r1 - 8004956: 4394 bics r4, r2 - 8004958: 1b0a subs r2, r1, r4 - 800495a: 1e54 subs r4, r2, #1 - 800495c: 41a2 sbcs r2, r4 - if !$e { - 800495e: d163 bne.n 8004a28 - 8004960: 014a lsls r2, r1, #5 - 8004962: d461 bmi.n 8004a28 - 8004964: 4299 cmp r1, r3 - 8004966: d954 bls.n 8004a12 - match *self { - 8004968: 0159 lsls r1, r3, #5 - 800496a: 186b adds r3, r5, r1 - 800496c: 7f19 ldrb r1, [r3, #28] - debug_assert!(self.is_some()); - 800496e: 2902 cmp r1, #2 - 8004970: d06d beq.n 8004a4e - 8004972: 4a46 ldr r2, [pc, #280] ; (8004a8c ) - intrinsics::volatile_load(src) - 8004974: 8814 ldrh r4, [r2, #0] - intrinsics::volatile_store(dst, src); - 8004976: 9904 ldr r1, [sp, #16] - 8004978: 8011 strh r1, [r2, #0] - 800497a: 6831 ldr r1, [r6, #0] - 800497c: 2900 cmp r1, #0 - 800497e: 9d03 ldr r5, [sp, #12] - 8004980: d16b bne.n 8004a5a - copy_nonoverlapping(&src as *const T, dst, 1); - 8004982: 6030 str r0, [r6, #0] - *b -= 1; - 8004984: 6870 ldr r0, [r6, #4] - 8004986: 1e42 subs r2, r0, #1 - 8004988: 4282 cmp r2, r0 - 800498a: 4282 cmp r2, r0 - 800498c: 9904 ldr r1, [sp, #16] - 800498e: d645 bvs.n 8004a1c - 8004990: c606 stmia r6!, {r1, r2} - intrinsics::volatile_store(dst, src); - 8004992: 483e ldr r0, [pc, #248] ; (8004a8c ) - 8004994: 8004 strh r4, [r0, #0] - 8004996: 4a47 ldr r2, [pc, #284] ; (8004ab4 ) - #[must_use = "this returns the result of the operation, \ - without modifying the original"] - #[inline(always)] - #[rustc_inherit_overflow_checks] - pub const fn rem_euclid(self, rhs: Self) -> Self { - self % rhs - 8004998: 402a ands r2, r5 - intrinsics::ctpop(self as $ActualT) as u32 - 800499a: 0850 lsrs r0, r2, #1 - 800499c: 2455 movs r4, #85 ; 0x55 - 800499e: 4020 ands r0, r4 - 80049a0: 1a10 subs r0, r2, r0 - 80049a2: 4945 ldr r1, [pc, #276] ; (8004ab8 ) - 80049a4: 002e movs r6, r5 - 80049a6: 0885 lsrs r5, r0, #2 - 80049a8: 4008 ands r0, r1 - 80049aa: 400d ands r5, r1 - 80049ac: 1940 adds r0, r0, r5 - 80049ae: 0901 lsrs r1, r0, #4 - 80049b0: 1840 adds r0, r0, r1 - 80049b2: 4942 ldr r1, [pc, #264] ; (8004abc ) - 80049b4: 4001 ands r1, r0 - 80049b6: 20ff movs r0, #255 ; 0xff - 80049b8: 3002 adds r0, #2 - 80049ba: 4348 muls r0, r1 - 80049bc: 4940 ldr r1, [pc, #256] ; (8004ac0 ) - 80049be: 4001 ands r1, r0 - 80049c0: 0a0d lsrs r5, r1, #8 - let orig_ones = bytes.count_ones(); - 80049c2: 9505 str r5, [sp, #20] - 80049c4: 0870 lsrs r0, r6, #1 - 80049c6: 4020 ands r0, r4 - 80049c8: 1a30 subs r0, r6, r0 - 80049ca: 2133 movs r1, #51 ; 0x33 - 80049cc: 0884 lsrs r4, r0, #2 - 80049ce: 4008 ands r0, r1 - 80049d0: 400c ands r4, r1 - 80049d2: 1900 adds r0, r0, r4 - 80049d4: 0901 lsrs r1, r0, #4 - 80049d6: 1840 adds r0, r0, r1 - 80049d8: 210f movs r1, #15 - 80049da: 4001 ands r1, r0 - intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT) - 80049dc: 0a12 lsrs r2, r2, #8 - debug_assert_eq!(res.count_ones() + bytes.count_ones(), orig_ones); - 80049de: 1888 adds r0, r1, r2 - 80049e0: 9006 str r0, [sp, #24] - 80049e2: 42a8 cmp r0, r5 - 80049e4: d142 bne.n 8004a6c - 80049e6: 761e strb r6, [r3, #24] - 80049e8: 759e strb r6, [r3, #22] - let stays_same = bytes[ms_byte] & !((0x01 << msb_offset) - 1); - 80049ea: 7e58 ldrb r0, [r3, #25] - 80049ec: 21fe movs r1, #254 ; 0xfe - 80049ee: 4008 ands r0, r1 - bytes[ms_byte] = stays_same | overwrite; - 80049f0: 1880 adds r0, r0, r2 - 80049f2: 7658 strb r0, [r3, #25] - let stays_same = bytes[ms_byte] & !((0x01 << msb_offset) - 1); - 80049f4: 7dd8 ldrb r0, [r3, #23] - 80049f6: 4008 ands r0, r1 - bytes[ms_byte] = stays_same | overwrite; - 80049f8: 1880 adds r0, r0, r2 - 80049fa: 75d8 strb r0, [r3, #23] - } - 80049fc: 9802 ldr r0, [sp, #8] - 80049fe: b00d add sp, #52 ; 0x34 - 8004a00: bcf0 pop {r4, r5, r6, r7} - 8004a02: bc02 pop {r1} - 8004a04: 4708 bx r1 - *b += 1; - 8004a06: 4834 ldr r0, [pc, #208] ; (8004ad8 ) - 8004a08: 211c movs r1, #28 - 8004a0a: 4a34 ldr r2, [pc, #208] ; (8004adc ) - 8004a0c: f004 fb68 bl 80090e0 - 8004a10: defe udf #254 ; 0xfe - 8004a12: 4a26 ldr r2, [pc, #152] ; (8004aac ) - 8004a14: 0018 movs r0, r3 - 8004a16: f004 fb79 bl 800910c - 8004a1a: defe udf #254 ; 0xfe - *b -= 1; - 8004a1c: 482a ldr r0, [pc, #168] ; (8004ac8 ) - 8004a1e: 2121 movs r1, #33 ; 0x21 - 8004a20: 4a2a ldr r2, [pc, #168] ; (8004acc ) - 8004a22: f004 fb5d bl 80090e0 - 8004a26: defe udf #254 ; 0xfe - ::core::intrinsics::abort(); - 8004a28: defe udf #254 ; 0xfe - 8004a2a: defe udf #254 ; 0xfe - 8004a2c: 4819 ldr r0, [pc, #100] ; (8004a94 ) - 8004a2e: e015 b.n 8004a5c - 8004a30: 9804 ldr r0, [sp, #16] - assert_eq!(a, 0); - 8004a32: 900c str r0, [sp, #48] ; 0x30 - 8004a34: 900b str r0, [sp, #44] ; 0x2c - 8004a36: 900a str r0, [sp, #40] ; 0x28 - 8004a38: 9009 str r0, [sp, #36] ; 0x24 - 8004a3a: 9008 str r0, [sp, #32] - 8004a3c: 9007 str r0, [sp, #28] - 8004a3e: 4918 ldr r1, [pc, #96] ; (8004aa0 ) - 8004a40: 9100 str r1, [sp, #0] - 8004a42: a906 add r1, sp, #24 - 8004a44: 4a17 ldr r2, [pc, #92] ; (8004aa4 ) - 8004a46: ab07 add r3, sp, #28 - 8004a48: f001 fb60 bl 800610c - 8004a4c: defe udf #254 ; 0xfe - 8004a4e: 4820 ldr r0, [pc, #128] ; (8004ad0 ) - 8004a50: 2120 movs r1, #32 - 8004a52: 4a20 ldr r2, [pc, #128] ; (8004ad4 ) - 8004a54: f004 fb44 bl 80090e0 - 8004a58: defe udf #254 ; 0xfe - 8004a5a: 4815 ldr r0, [pc, #84] ; (8004ab0 ) - 8004a5c: 9000 str r0, [sp, #0] - 8004a5e: 480e ldr r0, [pc, #56] ; (8004a98 ) - 8004a60: 2110 movs r1, #16 - 8004a62: aa05 add r2, sp, #20 - 8004a64: 4b0d ldr r3, [pc, #52] ; (8004a9c ) - 8004a66: f003 fb19 bl 800809c - 8004a6a: defe udf #254 ; 0xfe - 8004a6c: 9804 ldr r0, [sp, #16] - 8004a6e: 900c str r0, [sp, #48] ; 0x30 - 8004a70: 900b str r0, [sp, #44] ; 0x2c - 8004a72: 900a str r0, [sp, #40] ; 0x28 - 8004a74: 9009 str r0, [sp, #36] ; 0x24 - 8004a76: 9008 str r0, [sp, #32] - 8004a78: 9007 str r0, [sp, #28] - 8004a7a: 4912 ldr r1, [pc, #72] ; (8004ac4 ) - 8004a7c: 9100 str r1, [sp, #0] - 8004a7e: a906 add r1, sp, #24 - 8004a80: aa05 add r2, sp, #20 - 8004a82: ab07 add r3, sp, #28 - 8004a84: f001 fb5a bl 800613c - 8004a88: defe udf #254 ; 0xfe - 8004a8a: 46c0 nop ; (mov r8, r8) - 8004a8c: 04000208 .word 0x04000208 - 8004a90: 030000e8 .word 0x030000e8 - 8004a94: 0800ba1c .word 0x0800ba1c - 8004a98: 0800ae5c .word 0x0800ae5c - 8004a9c: 0800b8c8 .word 0x0800b8c8 - 8004aa0: 0800b670 .word 0x0800b670 - 8004aa4: 0800b650 .word 0x0800b650 - 8004aa8: 03000088 .word 0x03000088 - 8004aac: 0800b760 .word 0x0800b760 - 8004ab0: 0800ba3c .word 0x0800ba3c - 8004ab4: 000001ff .word 0x000001ff - 8004ab8: 00003333 .word 0x00003333 - 8004abc: 00000f0f .word 0x00000f0f - 8004ac0: 0000ffff .word 0x0000ffff - 8004ac4: 0800b518 .word 0x0800b518 - 8004ac8: 0800b9d0 .word 0x0800b9d0 - 8004acc: 0800ba4c .word 0x0800ba4c - 8004ad0: 0800b551 .word 0x0800b551 - 8004ad4: 0800b770 .word 0x0800b770 - 8004ad8: 0800b990 .word 0x0800b990 - 8004adc: 0800ba2c .word 0x0800ba2c - -08004ae0 : - pub fn set_y(&mut self, y: u16) -> &mut Self { - 8004ae0: b5f0 push {r4, r5, r6, r7, lr} - 8004ae2: af03 add r7, sp, #12 - 8004ae4: b08d sub sp, #52 ; 0x34 - 8004ae6: 9103 str r1, [sp, #12] - 8004ae8: 9004 str r0, [sp, #16] - let object_inner = unsafe { self.object_inner() }; - 8004aea: 7803 ldrb r3, [r0, #0] - 8004aec: 4a3a ldr r2, [pc, #232] ; (8004bd8 ) - intrinsics::volatile_load(src) - 8004aee: 8811 ldrh r1, [r2, #0] - 8004af0: 2000 movs r0, #0 - intrinsics::volatile_store(dst, src); - 8004af2: 8010 strh r0, [r2, #0] - 8004af4: 4e39 ldr r6, [pc, #228] ; (8004bdc ) - 8004af6: 6832 ldr r2, [r6, #0] - 8004af8: 2a00 cmp r2, #0 - 8004afa: d14d bne.n 8004b98 - 8004afc: 43c2 mvns r2, r0 - copy_nonoverlapping(&src as *const T, dst, 1); - 8004afe: 6032 str r2, [r6, #0] - let a = *b; - 8004b00: 6874 ldr r4, [r6, #4] - *b += 1; - 8004b02: 1c65 adds r5, r4, #1 - 8004b04: 42a5 cmp r5, r4 - 8004b06: d634 bvs.n 8004b72 - 8004b08: 9202 str r2, [sp, #8] - 8004b0a: c621 stmia r6!, {r0, r5} - intrinsics::volatile_store(dst, src); - 8004b0c: 4a32 ldr r2, [pc, #200] ; (8004bd8 ) - 8004b0e: 8011 strh r1, [r2, #0] - let a = crate::interrupt::free(|c| { - 8004b10: 9405 str r4, [sp, #20] - copy_nonoverlapping(&src as *const T, dst, 1); - 8004b12: 3e08 subs r6, #8 - assert_eq!(a, 0); - 8004b14: 2c00 cmp r4, #0 - 8004b16: d141 bne.n 8004b9c - 8004b18: 4c36 ldr r4, [pc, #216] ; (8004bf4 ) - 8004b1a: 69a2 ldr r2, [r4, #24] - 8004b1c: 0795 lsls r5, r2, #30 - 8004b1e: d139 bne.n 8004b94 - 8004b20: 6a21 ldr r1, [r4, #32] - 8004b22: 251f movs r5, #31 - 8004b24: 06ed lsls r5, r5, #27 - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 8004b26: 000c movs r4, r1 - 8004b28: 43ac bics r4, r5 - 8004b2a: 1b0c subs r4, r1, r4 - 8004b2c: 1e65 subs r5, r4, #1 - 8004b2e: 41ac sbcs r4, r5 - if !$e { - 8004b30: d130 bne.n 8004b94 - 8004b32: 014c lsls r4, r1, #5 - 8004b34: d42e bmi.n 8004b94 - 8004b36: 4299 cmp r1, r3 - 8004b38: d921 bls.n 8004b7e - match *self { - 8004b3a: 0159 lsls r1, r3, #5 - 8004b3c: 1853 adds r3, r2, r1 - 8004b3e: 7f19 ldrb r1, [r3, #28] - debug_assert!(self.is_some()); - 8004b40: 2902 cmp r1, #2 - 8004b42: d039 beq.n 8004bb8 - 8004b44: 4a24 ldr r2, [pc, #144] ; (8004bd8 ) - intrinsics::volatile_load(src) - 8004b46: 8811 ldrh r1, [r2, #0] - intrinsics::volatile_store(dst, src); - 8004b48: 8010 strh r0, [r2, #0] - 8004b4a: 6832 ldr r2, [r6, #0] - 8004b4c: 2a00 cmp r2, #0 - 8004b4e: d139 bne.n 8004bc4 - copy_nonoverlapping(&src as *const T, dst, 1); - 8004b50: 9a02 ldr r2, [sp, #8] - 8004b52: 6032 str r2, [r6, #0] - *b -= 1; - 8004b54: 6874 ldr r4, [r6, #4] - 8004b56: 1e62 subs r2, r4, #1 - 8004b58: 42a2 cmp r2, r4 - 8004b5a: 42a2 cmp r2, r4 - 8004b5c: d614 bvs.n 8004b88 - 8004b5e: c605 stmia r6!, {r0, r2} - intrinsics::volatile_store(dst, src); - 8004b60: 481d ldr r0, [pc, #116] ; (8004bd8 ) - 8004b62: 8001 strh r1, [r0, #0] - *byte = buffer.pop_bits(8); - 8004b64: 9803 ldr r0, [sp, #12] - 8004b66: 7518 strb r0, [r3, #20] - } - 8004b68: 9804 ldr r0, [sp, #16] - 8004b6a: b00d add sp, #52 ; 0x34 - 8004b6c: bcf0 pop {r4, r5, r6, r7} - 8004b6e: bc02 pop {r1} - 8004b70: 4708 bx r1 - *b += 1; - 8004b72: 4827 ldr r0, [pc, #156] ; (8004c10 ) - 8004b74: 211c movs r1, #28 - 8004b76: 4a27 ldr r2, [pc, #156] ; (8004c14 ) - 8004b78: f004 fab2 bl 80090e0 - 8004b7c: defe udf #254 ; 0xfe - 8004b7e: 4a1e ldr r2, [pc, #120] ; (8004bf8 ) - 8004b80: 0018 movs r0, r3 - 8004b82: f004 fac3 bl 800910c - 8004b86: defe udf #254 ; 0xfe - *b -= 1; - 8004b88: 481d ldr r0, [pc, #116] ; (8004c00 ) - 8004b8a: 2121 movs r1, #33 ; 0x21 - 8004b8c: 4a1d ldr r2, [pc, #116] ; (8004c04 ) - 8004b8e: f004 faa7 bl 80090e0 - 8004b92: defe udf #254 ; 0xfe - ::core::intrinsics::abort(); - 8004b94: defe udf #254 ; 0xfe - 8004b96: defe udf #254 ; 0xfe - 8004b98: 4811 ldr r0, [pc, #68] ; (8004be0 ) - 8004b9a: e014 b.n 8004bc6 - assert_eq!(a, 0); - 8004b9c: 900b str r0, [sp, #44] ; 0x2c - 8004b9e: 900a str r0, [sp, #40] ; 0x28 - 8004ba0: 9009 str r0, [sp, #36] ; 0x24 - 8004ba2: 9008 str r0, [sp, #32] - 8004ba4: 9007 str r0, [sp, #28] - 8004ba6: 9006 str r0, [sp, #24] - 8004ba8: 4910 ldr r1, [pc, #64] ; (8004bec ) - 8004baa: 9100 str r1, [sp, #0] - 8004bac: a905 add r1, sp, #20 - 8004bae: 4a10 ldr r2, [pc, #64] ; (8004bf0 ) - 8004bb0: ab06 add r3, sp, #24 - 8004bb2: f001 faab bl 800610c - 8004bb6: defe udf #254 ; 0xfe - 8004bb8: 4813 ldr r0, [pc, #76] ; (8004c08 ) - 8004bba: 2120 movs r1, #32 - 8004bbc: 4a13 ldr r2, [pc, #76] ; (8004c0c ) - 8004bbe: f004 fa8f bl 80090e0 - 8004bc2: defe udf #254 ; 0xfe - 8004bc4: 480d ldr r0, [pc, #52] ; (8004bfc ) - 8004bc6: 9000 str r0, [sp, #0] - 8004bc8: 4806 ldr r0, [pc, #24] ; (8004be4 ) - 8004bca: 2110 movs r1, #16 - 8004bcc: aa0c add r2, sp, #48 ; 0x30 - 8004bce: 4b06 ldr r3, [pc, #24] ; (8004be8 ) - 8004bd0: f003 fa64 bl 800809c - 8004bd4: defe udf #254 ; 0xfe - 8004bd6: 46c0 nop ; (mov r8, r8) - 8004bd8: 04000208 .word 0x04000208 - 8004bdc: 030000e8 .word 0x030000e8 - 8004be0: 0800ba1c .word 0x0800ba1c - 8004be4: 0800ae5c .word 0x0800ae5c - 8004be8: 0800b8c8 .word 0x0800b8c8 - 8004bec: 0800b670 .word 0x0800b670 - 8004bf0: 0800b650 .word 0x0800b650 - 8004bf4: 03000088 .word 0x03000088 - 8004bf8: 0800b760 .word 0x0800b760 - 8004bfc: 0800ba3c .word 0x0800ba3c - 8004c00: 0800b9d0 .word 0x0800b9d0 - 8004c04: 0800ba4c .word 0x0800ba4c - 8004c08: 0800b551 .word 0x0800b551 - 8004c0c: 0800b770 .word 0x0800b770 - 8004c10: 0800b990 .word 0x0800b990 - 8004c14: 0800ba2c .word 0x0800ba2c - -08004c18 : - fn palette(&mut self, palette: &'static Palette16) -> Option { - 8004c18: b5f0 push {r4, r5, r6, r7, lr} - 8004c1a: af03 add r7, sp, #12 - 8004c1c: b085 sub sp, #20 - 8004c1e: 0005 movs r5, r0 - let id = palette.id(); - 8004c20: 9002 str r0, [sp, #8] - 8004c22: 4a33 ldr r2, [pc, #204] ; (8004cf0 ) - intrinsics::wrapping_mul(self, rhs) - 8004c24: 4342 muls r2, r0 - if let Some(location) = self.nodes.location(key, hash) { - 8004c26: 4e33 ldr r6, [pc, #204] ; (8004cf4 ) - 8004c28: 0034 movs r4, r6 - 8004c2a: 3430 adds r4, #48 ; 0x30 - 8004c2c: a902 add r1, sp, #8 - 8004c2e: 0020 movs r0, r4 - 8004c30: f7fd fd50 bl 80026d4 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715> - 8004c34: 2801 cmp r0, #1 - 8004c36: d122 bne.n 8004c7e - 8004c38: 6b30 ldr r0, [r6, #48] ; 0x30 - 8004c3a: 0782 lsls r2, r0, #30 - 8004c3c: d155 bne.n 8004cea - 8004c3e: 6bb3 ldr r3, [r6, #56] ; 0x38 - 8004c40: 220f movs r2, #15 - 8004c42: 0712 lsls r2, r2, #28 - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 8004c44: 001e movs r6, r3 - 8004c46: 4396 bics r6, r2 - 8004c48: 1b9a subs r2, r3, r6 - 8004c4a: 1e56 subs r6, r2, #1 - 8004c4c: 41b2 sbcs r2, r6 - if !$e { - 8004c4e: d14c bne.n 8004cea - 8004c50: 011a lsls r2, r3, #4 - 8004c52: d44a bmi.n 8004cea - 8004c54: 428b cmp r3, r1 - 8004c56: d936 bls.n 8004cc6 - self.distance_to_initial_bucket >= 0 - 8004c58: 0109 lsls r1, r1, #4 - 8004c5a: 1840 adds r0, r0, r1 - 8004c5c: 6841 ldr r1, [r0, #4] - 8004c5e: 2900 cmp r1, #0 - 8004c60: d40d bmi.n 8004c7e - 8004c62: 300c adds r0, #12 - storage.count += 1; - 8004c64: 8841 ldrh r1, [r0, #2] - 8004c66: 1c49 adds r1, r1, #1 - 8004c68: 4a2a ldr r2, [pc, #168] ; (8004d14 ) - 8004c6a: 400a ands r2, r1 - 8004c6c: 1a53 subs r3, r2, r1 - 8004c6e: 1e5c subs r4, r3, #1 - 8004c70: 41a3 sbcs r3, r4 - 8004c72: 428a cmp r2, r1 - 8004c74: d133 bne.n 8004cde - 8004c76: 8041 strh r1, [r0, #2] - Some(storage.location) - 8004c78: 8806 ldrh r6, [r0, #0] - 8004c7a: 2501 movs r5, #1 - 8004c7c: e01d b.n 8004cba - let dest = unsafe { PALETTE_ALLOCATOR.alloc(Palette16::layout())? }; - 8004c7e: 481f ldr r0, [pc, #124] ; (8004cfc ) - 8004c80: 3018 adds r0, #24 - 8004c82: 2120 movs r1, #32 - 8004c84: 2202 movs r2, #2 - 8004c86: f000 fab7 bl 80051f8 - 8004c8a: 2800 cmp r0, #0 - 8004c8c: d014 beq.n 8004cb8 - 8004c8e: 491c ldr r1, [pc, #112] ; (8004d00 ) - 8004c90: 600d str r5, [r1, #0] - 8004c92: 6048 str r0, [r1, #4] - 8004c94: 4a1b ldr r2, [pc, #108] ; (8004d04 ) - 8004c96: 608a str r2, [r1, #8] - 8004c98: 2200 movs r2, #0 - 8004c9a: 4b1b ldr r3, [pc, #108] ; (8004d08 ) - location: ((d.as_ptr() as usize - PALETTE_SPRITE) / Palette16::layout().size()) as u16, - 8004c9c: 1ac1 subs r1, r0, r3 - 8004c9e: 4152 adcs r2, r2 - 8004ca0: 4298 cmp r0, r3 - 8004ca2: d316 bcc.n 8004cd2 - self.palette.insert(id, storage); - 8004ca4: 9a02 ldr r2, [sp, #8] - 8004ca6: 2501 movs r5, #1 - 8004ca8: 9500 str r5, [sp, #0] - location: ((d.as_ptr() as usize - PALETTE_SPRITE) / Palette16::layout().size()) as u16, - 8004caa: 094e lsrs r6, r1, #5 - 8004cac: a803 add r0, sp, #12 - self.palette.insert(id, storage); - 8004cae: 0021 movs r1, r4 - 8004cb0: 0033 movs r3, r6 - 8004cb2: f7fc fe1b bl 80018ec ::insert> - 8004cb6: e000 b.n 8004cba - 8004cb8: 2500 movs r5, #0 - } - 8004cba: 0028 movs r0, r5 - 8004cbc: 0031 movs r1, r6 - 8004cbe: b005 add sp, #20 - 8004cc0: bcf0 pop {r4, r5, r6, r7} - 8004cc2: bc04 pop {r2} - 8004cc4: 4710 bx r2 - 8004cc6: 4a0c ldr r2, [pc, #48] ; (8004cf8 ) - 8004cc8: 0008 movs r0, r1 - 8004cca: 0019 movs r1, r3 - 8004ccc: f004 fa1e bl 800910c - 8004cd0: defe udf #254 ; 0xfe - location: ((d.as_ptr() as usize - PALETTE_SPRITE) / Palette16::layout().size()) as u16, - 8004cd2: 480e ldr r0, [pc, #56] ; (8004d0c ) - 8004cd4: 2121 movs r1, #33 ; 0x21 - 8004cd6: 4a0e ldr r2, [pc, #56] ; (8004d10 ) - 8004cd8: f004 fa02 bl 80090e0 - 8004cdc: defe udf #254 ; 0xfe - storage.count += 1; - 8004cde: 480e ldr r0, [pc, #56] ; (8004d18 ) - 8004ce0: 211c movs r1, #28 - 8004ce2: 4a0e ldr r2, [pc, #56] ; (8004d1c ) - 8004ce4: f004 f9fc bl 80090e0 - 8004ce8: defe udf #254 ; 0xfe - ::core::intrinsics::abort(); - 8004cea: defe udf #254 ; 0xfe - 8004cec: defe udf #254 ; 0xfe - 8004cee: 46c0 nop ; (mov r8, r8) - 8004cf0: 9e3779b9 .word 0x9e3779b9 - 8004cf4: 03000088 .word 0x03000088 - 8004cf8: 0800ac0c .word 0x0800ac0c - 8004cfc: 020000d8 .word 0x020000d8 - 8004d00: 040000d4 .word 0x040000d4 - 8004d04: 80000010 .word 0x80000010 - 8004d08: 05000200 .word 0x05000200 - 8004d0c: 0800b460 .word 0x0800b460 - 8004d10: 0800b690 .word 0x0800b690 - 8004d14: 0000ffff .word 0x0000ffff - 8004d18: 0800b490 .word 0x0800b490 - 8004d1c: 0800b7b0 .word 0x0800b7b0 - -08004d20 : - fn return_sprite(&mut self, sprite: &'static Sprite) { - 8004d20: b5f0 push {r4, r5, r6, r7, lr} - 8004d22: af03 add r7, sp, #12 - 8004d24: b087 sub sp, #28 - 8004d26: 000e movs r6, r1 - 8004d28: 0004 movs r4, r0 - let storage = self.sprite.get_mut(&sprite.id()); - 8004d2a: 9105 str r1, [sp, #20] - 8004d2c: 4d4e ldr r5, [pc, #312] ; (8004e68 ) - intrinsics::wrapping_mul(self, rhs) - 8004d2e: 002a movs r2, r5 - 8004d30: 434a muls r2, r1 - 8004d32: 9003 str r0, [sp, #12] - 8004d34: 3418 adds r4, #24 - 8004d36: a905 add r1, sp, #20 - if let Some(location) = self.nodes.location(key, hash) { - 8004d38: 0020 movs r0, r4 - 8004d3a: f7fd fccb bl 80026d4 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715> - 8004d3e: 2801 cmp r0, #1 - 8004d40: d138 bne.n 8004db4 - 8004d42: 9102 str r1, [sp, #8] - 8004d44: 9803 ldr r0, [sp, #12] - 8004d46: 6980 ldr r0, [r0, #24] - 8004d48: 9001 str r0, [sp, #4] - 8004d4a: 0782 lsls r2, r0, #30 - 8004d4c: d000 beq.n 8004d50 - 8004d4e: e088 b.n 8004e62 - 8004d50: 9903 ldr r1, [sp, #12] - 8004d52: 6a09 ldr r1, [r1, #32] - 8004d54: 220f movs r2, #15 - 8004d56: 0712 lsls r2, r2, #28 - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 8004d58: 000b movs r3, r1 - 8004d5a: 4393 bics r3, r2 - 8004d5c: 1aca subs r2, r1, r3 - 8004d5e: 1e53 subs r3, r2, #1 - 8004d60: 419a sbcs r2, r3 - if !$e { - 8004d62: d17e bne.n 8004e62 - 8004d64: 010a lsls r2, r1, #4 - 8004d66: d47c bmi.n 8004e62 - 8004d68: 9802 ldr r0, [sp, #8] - 8004d6a: 4281 cmp r1, r0 - 8004d6c: d963 bls.n 8004e36 - self.distance_to_initial_bucket >= 0 - 8004d6e: 0101 lsls r1, r0, #4 - 8004d70: 9801 ldr r0, [sp, #4] - 8004d72: 1840 adds r0, r0, r1 - 8004d74: 6841 ldr r1, [r0, #4] - 8004d76: 2900 cmp r1, #0 - 8004d78: d41c bmi.n 8004db4 - 8004d7a: 300c adds r0, #12 - storage.count -= 1; - 8004d7c: 8841 ldrh r1, [r0, #2] - 8004d7e: 1e49 subs r1, r1, #1 - 8004d80: 4a3b ldr r2, [pc, #236] ; (8004e70 ) - 8004d82: 400a ands r2, r1 - 8004d84: 428a cmp r2, r1 - 8004d86: d160 bne.n 8004e4a - 8004d88: 8041 strh r1, [r0, #2] - if storage.count == 0 { - 8004d8a: 0409 lsls r1, r1, #16 - 8004d8c: d112 bne.n 8004db4 - unsafe { SPRITE_ALLOCATOR.dealloc(storage.as_sprite_ptr(), sprite.layout()) }; - 8004d8e: 8800 ldrh r0, [r0, #0] - (self.location as usize * BYTES_PER_TILE_4BPP + TILE_SPRITE) as *mut u8 - 8004d90: 0140 lsls r0, r0, #5 - 8004d92: 4938 ldr r1, [pc, #224] ; (8004e74 ) - 8004d94: 1841 adds r1, r0, r1 - 8004d96: 200c movs r0, #12 - unsafe { SPRITE_ALLOCATOR.dealloc(storage.as_sprite_ptr(), sprite.layout()) }; - 8004d98: 5630 ldrsb r0, [r6, r0] - match self { - 8004d9a: 0080 lsls r0, r0, #2 - 8004d9c: 4a36 ldr r2, [pc, #216] ; (8004e78 ) - 8004d9e: 5812 ldr r2, [r2, r0] - unsafe { SPRITE_ALLOCATOR.dealloc(storage.as_sprite_ptr(), sprite.layout()) }; - 8004da0: 4836 ldr r0, [pc, #216] ; (8004e7c ) - 8004da2: 2308 movs r3, #8 - 8004da4: f000 fa78 bl 8005298 - self.sprite.remove(&sprite.id()); - 8004da8: 9604 str r6, [sp, #16] - 8004daa: a805 add r0, sp, #20 - 8004dac: aa04 add r2, sp, #16 - 8004dae: 0021 movs r1, r4 - 8004db0: f7fd f830 bl 8001e14 ::remove> - self.return_palette(sprite.palette) - 8004db4: 6830 ldr r0, [r6, #0] - let id = palette.id(); - 8004db6: 9004 str r0, [sp, #16] - intrinsics::wrapping_mul(self, rhs) - 8004db8: 4345 muls r5, r0 - 8004dba: a904 add r1, sp, #16 - 8004dbc: 9e03 ldr r6, [sp, #12] - if let Some(location) = self.nodes.location(key, hash) { - 8004dbe: 0030 movs r0, r6 - 8004dc0: 002a movs r2, r5 - 8004dc2: f7fd fc87 bl 80026d4 <_ZN3agb8hash_map24NodeStorage$LT$K$C$V$GT$8location17h5597e3b88d05300eE.llvm.16354310352647835715> - 8004dc6: 2801 cmp r0, #1 - 8004dc8: d11e bne.n 8004e08 - 8004dca: 6830 ldr r0, [r6, #0] - 8004dcc: 0782 lsls r2, r0, #30 - 8004dce: d148 bne.n 8004e62 - 8004dd0: 68b3 ldr r3, [r6, #8] - 8004dd2: 220f movs r2, #15 - 8004dd4: 0712 lsls r2, r2, #28 - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 8004dd6: 001c movs r4, r3 - 8004dd8: 4394 bics r4, r2 - 8004dda: 1b1a subs r2, r3, r4 - 8004ddc: 1e54 subs r4, r2, #1 - 8004dde: 41a2 sbcs r2, r4 - 8004de0: d13f bne.n 8004e62 - 8004de2: 011a lsls r2, r3, #4 - 8004de4: d43d bmi.n 8004e62 - 8004de6: 428b cmp r3, r1 - 8004de8: d929 bls.n 8004e3e - self.distance_to_initial_bucket >= 0 - 8004dea: 0109 lsls r1, r1, #4 - 8004dec: 1840 adds r0, r0, r1 - 8004dee: 6841 ldr r1, [r0, #4] - 8004df0: 2900 cmp r1, #0 - 8004df2: d409 bmi.n 8004e08 - 8004df4: 300c adds r0, #12 - storage.count -= 1; - 8004df6: 8841 ldrh r1, [r0, #2] - 8004df8: 1e49 subs r1, r1, #1 - 8004dfa: 4a1d ldr r2, [pc, #116] ; (8004e70 ) - 8004dfc: 400a ands r2, r1 - 8004dfe: 428a cmp r2, r1 - 8004e00: d129 bne.n 8004e56 - 8004e02: 8041 strh r1, [r0, #2] - if storage.count == 0 { - 8004e04: 0409 lsls r1, r1, #16 - 8004e06: d003 beq.n 8004e10 - } - 8004e08: b007 add sp, #28 - 8004e0a: bcf0 pop {r4, r5, r6, r7} - 8004e0c: bc01 pop {r0} - 8004e0e: 4700 bx r0 - unsafe { PALETTE_ALLOCATOR.dealloc(storage.as_palette_ptr(), Palette16::layout()) }; - 8004e10: 8800 ldrh r0, [r0, #0] - (self.location as usize * Palette16::layout().size() + PALETTE_SPRITE) as *mut u8 - 8004e12: 0140 lsls r0, r0, #5 - 8004e14: 491a ldr r1, [pc, #104] ; (8004e80 ) - 8004e16: 1841 adds r1, r0, r1 - unsafe { PALETTE_ALLOCATOR.dealloc(storage.as_palette_ptr(), Palette16::layout()) }; - 8004e18: 4818 ldr r0, [pc, #96] ; (8004e7c ) - 8004e1a: 3018 adds r0, #24 - 8004e1c: 2220 movs r2, #32 - 8004e1e: 2302 movs r3, #2 - 8004e20: f000 fa3a bl 8005298 - 8004e24: a805 add r0, sp, #20 - 8004e26: aa04 add r2, sp, #16 - self.palette.remove(&id); - 8004e28: 0031 movs r1, r6 - 8004e2a: f7fc fecb bl 8001bc4 ::remove> - } - 8004e2e: b007 add sp, #28 - 8004e30: bcf0 pop {r4, r5, r6, r7} - 8004e32: bc01 pop {r0} - 8004e34: 4700 bx r0 - 8004e36: 4a0d ldr r2, [pc, #52] ; (8004e6c ) - 8004e38: f004 f968 bl 800910c - 8004e3c: defe udf #254 ; 0xfe - 8004e3e: 4a0b ldr r2, [pc, #44] ; (8004e6c ) - 8004e40: 0008 movs r0, r1 - 8004e42: 0019 movs r1, r3 - 8004e44: f004 f962 bl 800910c - 8004e48: defe udf #254 ; 0xfe - storage.count -= 1; - 8004e4a: 480e ldr r0, [pc, #56] ; (8004e84 ) - 8004e4c: 2121 movs r1, #33 ; 0x21 - 8004e4e: 4a0f ldr r2, [pc, #60] ; (8004e8c ) - 8004e50: f004 f946 bl 80090e0 - 8004e54: defe udf #254 ; 0xfe - storage.count -= 1; - 8004e56: 480b ldr r0, [pc, #44] ; (8004e84 ) - 8004e58: 2121 movs r1, #33 ; 0x21 - 8004e5a: 4a0b ldr r2, [pc, #44] ; (8004e88 ) - 8004e5c: f004 f940 bl 80090e0 - 8004e60: defe udf #254 ; 0xfe - 8004e62: defe udf #254 ; 0xfe - 8004e64: defe udf #254 ; 0xfe - 8004e66: 46c0 nop ; (mov r8, r8) - 8004e68: 9e3779b9 .word 0x9e3779b9 - 8004e6c: 0800ac0c .word 0x0800ac0c - 8004e70: 0000ffff .word 0x0000ffff - 8004e74: 06010000 .word 0x06010000 - 8004e78: 0800b888 .word 0x0800b888 - 8004e7c: 020000d8 .word 0x020000d8 - 8004e80: 05000200 .word 0x05000200 - 8004e84: 0800b460 .word 0x0800b460 - 8004e88: 0800b7d0 .word 0x0800b7d0 - 8004e8c: 0800b7c0 .word 0x0800b7c0 - -08004e90 <_ZN4core3ptr109drop_in_place$LT$agb..sound..mixer..sw_mixer..Mixer..setup_interrupt_handler..$u7b$$u7b$closure$u7d$$u7d$$GT$17hc429bd9059e4c0acE.llvm.17460398611298495953>: -pub unsafe fn drop_in_place(to_drop: *mut T) { - 8004e90: 4770 bx lr - ... - -08004e94 : -pub fn free(f: F) -> R - 8004e94: b5f0 push {r4, r5, r6, r7, lr} - 8004e96: af03 add r7, sp, #12 - 8004e98: b087 sub sp, #28 - 8004e9a: 4932 ldr r1, [pc, #200] ; (8004f64 ) - intrinsics::volatile_load(src) - 8004e9c: 880a ldrh r2, [r1, #0] - 8004e9e: 9205 str r2, [sp, #20] - 8004ea0: 2300 movs r3, #0 - intrinsics::volatile_store(dst, src); - 8004ea2: 800b strh r3, [r1, #0] - let r = f(unsafe { &CriticalSection::new() }); - 8004ea4: 6801 ldr r1, [r0, #0] - 8004ea6: 9104 str r1, [sp, #16] - let mut state = self.state.borrow(*key).borrow_mut(); - 8004ea8: 680e ldr r6, [r1, #0] - 8004eaa: 6932 ldr r2, [r6, #16] - 8004eac: 2a00 cmp r2, #0 - 8004eae: d14a bne.n 8004f46 - 8004eb0: 6842 ldr r2, [r0, #4] - 8004eb2: 6884 ldr r4, [r0, #8] - 8004eb4: 68c1 ldr r1, [r0, #12] - 8004eb6: 9101 str r1, [sp, #4] - 8004eb8: 6900 ldr r0, [r0, #16] - 8004eba: 9003 str r0, [sp, #12] - 8004ebc: 9302 str r3, [sp, #8] - 8004ebe: 43d8 mvns r0, r3 - copy_nonoverlapping(&src as *const T, dst, 1); - 8004ec0: 6130 str r0, [r6, #16] - let mut current_block = state.first_free_block; - 8004ec2: 6970 ldr r0, [r6, #20] - while let Some(mut curr) = current_block { - 8004ec4: 2800 cmp r0, #0 - 8004ec6: d00e beq.n 8004ee6 - 8004ec8: 0033 movs r3, r6 - 8004eca: 3314 adds r3, #20 - 8004ecc: 6815 ldr r5, [r2, #0] - if curr_block.size == full_layout.size() { - 8004ece: 6802 ldr r2, [r0, #0] - 8004ed0: 42aa cmp r2, r5 - 8004ed2: d017 beq.n 8004f04 - } else if curr_block.size >= block_after_layout.size() { - 8004ed4: 6821 ldr r1, [r4, #0] - 8004ed6: 428a cmp r2, r1 - 8004ed8: d217 bcs.n 8004f0a - current_block = curr_block.next; - 8004eda: 6841 ldr r1, [r0, #4] - 8004edc: 1d03 adds r3, r0, #4 - while let Some(mut curr) = current_block { - 8004ede: 2900 cmp r1, #0 - 8004ee0: b402 push {r1} - 8004ee2: bc01 pop {r0} - 8004ee4: d1f3 bne.n 8004ece - self.new_block(layout, key) - 8004ee6: 9804 ldr r0, [sp, #16] - 8004ee8: 6804 ldr r4, [r0, #0] - 8004eea: 9903 ldr r1, [sp, #12] - 8004eec: c903 ldmia r1, {r0, r1} - let overall_layout = Block::either_layout(layout); - 8004eee: f000 f911 bl 8005114 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179> - 8004ef2: 0002 movs r2, r0 - 8004ef4: 000d movs r5, r1 - 8004ef6: ab06 add r3, sp, #24 - self.inner_allocator.alloc_critical(overall_layout, cs) - 8004ef8: 0020 movs r0, r4 - 8004efa: 0011 movs r1, r2 - 8004efc: 002a movs r2, r5 - 8004efe: f001 fc1f bl 8006740 - 8004f02: e00e b.n 8004f22 - *list_ptr = curr_block.next; - 8004f04: 6841 ldr r1, [r0, #4] - 8004f06: 6019 str r1, [r3, #0] - 8004f08: e00b b.n 8004f22 - size: curr_block.size - block_after_layout_offset, - 8004f0a: 9901 ldr r1, [sp, #4] - 8004f0c: 680c ldr r4, [r1, #0] - 8004f0e: 1b15 subs r5, r2, r4 - 8004f10: 9902 ldr r1, [sp, #8] - 8004f12: 4149 adcs r1, r1 - 8004f14: 42a2 cmp r2, r4 - 8004f16: d310 bcc.n 8004f3a - next: curr_block.next, - 8004f18: 6841 ldr r1, [r0, #4] - *split_ptr = split_block; - 8004f1a: 5105 str r5, [r0, r4] - 8004f1c: 1902 adds r2, r0, r4 - 8004f1e: 6051 str r1, [r2, #4] - *list_ptr = NonNull::new(split_ptr).map(SendNonNull); - 8004f20: 601a str r2, [r3, #0] - 8004f22: 6931 ldr r1, [r6, #16] - 8004f24: 2900 cmp r1, #0 - 8004f26: d517 bpl.n 8004f58 - 8004f28: 1c49 adds r1, r1, #1 - 8004f2a: 6131 str r1, [r6, #16] - intrinsics::volatile_store(dst, src); - 8004f2c: 490d ldr r1, [pc, #52] ; (8004f64 ) - 8004f2e: 9a05 ldr r2, [sp, #20] - 8004f30: 800a strh r2, [r1, #0] -} - 8004f32: b007 add sp, #28 - 8004f34: bcf0 pop {r4, r5, r6, r7} - 8004f36: bc02 pop {r1} - 8004f38: 4708 bx r1 - size: curr_block.size - block_after_layout_offset, - 8004f3a: 480e ldr r0, [pc, #56] ; (8004f74 ) - 8004f3c: 2121 movs r1, #33 ; 0x21 - 8004f3e: 4a0e ldr r2, [pc, #56] ; (8004f78 ) - 8004f40: f004 f8ce bl 80090e0 - 8004f44: defe udf #254 ; 0xfe - 8004f46: 4808 ldr r0, [pc, #32] ; (8004f68 ) - 8004f48: 9000 str r0, [sp, #0] - 8004f4a: 4808 ldr r0, [pc, #32] ; (8004f6c ) - 8004f4c: 2110 movs r1, #16 - 8004f4e: aa06 add r2, sp, #24 - 8004f50: 4b07 ldr r3, [pc, #28] ; (8004f70 ) - 8004f52: f003 f8a3 bl 800809c - 8004f56: defe udf #254 ; 0xfe - 8004f58: 4808 ldr r0, [pc, #32] ; (8004f7c ) - 8004f5a: 2124 movs r1, #36 ; 0x24 - 8004f5c: 4a08 ldr r2, [pc, #32] ; (8004f80 ) - 8004f5e: f004 f8bf bl 80090e0 - 8004f62: defe udf #254 ; 0xfe - 8004f64: 04000208 .word 0x04000208 - 8004f68: 0800b9ac .word 0x0800b9ac - 8004f6c: 0800ae5c .word 0x0800ae5c - 8004f70: 0800b8c8 .word 0x0800b8c8 - 8004f74: 0800b9d0 .word 0x0800b9d0 - 8004f78: 0800b9bc .word 0x0800b9bc - 8004f7c: 0800c2ca .word 0x0800c2ca - 8004f80: 0800c2f0 .word 0x0800c2f0 - -08004f84 : -pub fn free(f: F) -> R - 8004f84: b5f0 push {r4, r5, r6, r7, lr} - 8004f86: af03 add r7, sp, #12 - 8004f88: b085 sub sp, #20 - 8004f8a: 0001 movs r1, r0 - 8004f8c: 4a2a ldr r2, [pc, #168] ; (8005038 ) - intrinsics::volatile_load(src) - 8004f8e: 8813 ldrh r3, [r2, #0] - 8004f90: 2000 movs r0, #0 - intrinsics::volatile_store(dst, src); - 8004f92: 8010 strh r0, [r2, #0] - let mut state = self.state.borrow(*key).borrow_mut(); - 8004f94: 680e ldr r6, [r1, #0] - 8004f96: 6931 ldr r1, [r6, #16] - 8004f98: 2900 cmp r1, #0 - 8004f9a: d13d bne.n 8005018 - 8004f9c: 43c5 mvns r5, r0 - copy_nonoverlapping(&src as *const T, dst, 1); - 8004f9e: 6135 str r5, [r6, #16] - while let Some(mut curr) = list_ptr { - 8004fa0: 6974 ldr r4, [r6, #20] - 8004fa2: 2c00 cmp r4, #0 - 8004fa4: d022 beq.n 8004fec - 8004fa6: 9303 str r3, [sp, #12] - 8004fa8: 9602 str r6, [sp, #8] - 8004faa: 0035 movs r5, r6 - 8004fac: 3514 adds r5, #20 - if let Some(next_elem) = curr.as_mut().next { - 8004fae: 6866 ldr r6, [r4, #4] - 8004fb0: 2e00 cmp r6, #0 - 8004fb2: d015 beq.n 8004fe0 - T: Sized, - { - let pointee_size = mem::size_of::(); - assert!(0 < pointee_size && pointee_size <= isize::MAX as usize); - // SAFETY: the caller must uphold the safety contract for `ptr_offset_from`. - unsafe { intrinsics::ptr_offset_from(self, origin) } - 8004fb4: 1b31 subs r1, r6, r4 - match self { - 8004fb6: d426 bmi.n 8005006 - if usize_difference == curr.as_mut().size { - 8004fb8: 6822 ldr r2, [r4, #0] - 8004fba: 4291 cmp r1, r2 - 8004fbc: d10d bne.n 8004fda - current.size += next.size; - 8004fbe: 6832 ldr r2, [r6, #0] - 8004fc0: 188a adds r2, r1, r2 - 8004fc2: b401 push {r0} - 8004fc4: bc08 pop {r3} - 8004fc6: 4143 adcs r3, r0 - 8004fc8: 428a cmp r2, r1 - 8004fca: d316 bcc.n 8004ffa - 8004fcc: 6022 str r2, [r4, #0] - current.next = next.next; - 8004fce: 6871 ldr r1, [r6, #4] - 8004fd0: 6061 str r1, [r4, #4] - while let Some(mut curr) = list_ptr { - 8004fd2: 682c ldr r4, [r5, #0] - 8004fd4: 2c00 cmp r4, #0 - 8004fd6: d1ea bne.n 8004fae - 8004fd8: e002 b.n 8004fe0 - 8004fda: 1d25 adds r5, r4, #4 - 8004fdc: 0034 movs r4, r6 - 8004fde: e7e6 b.n 8004fae - 8004fe0: 9e02 ldr r6, [sp, #8] - let borrow = self.borrow.get(); - 8004fe2: 6935 ldr r5, [r6, #16] - debug_assert!(is_writing(borrow)); - 8004fe4: 2d00 cmp r5, #0 - 8004fe6: 4a14 ldr r2, [pc, #80] ; (8005038 ) - 8004fe8: 9b03 ldr r3, [sp, #12] - 8004fea: d51e bpl.n 800502a - self.borrow.set(borrow + 1); - 8004fec: 1c68 adds r0, r5, #1 - 8004fee: 6130 str r0, [r6, #16] - intrinsics::volatile_store(dst, src); - 8004ff0: 8013 strh r3, [r2, #0] -} - 8004ff2: b005 add sp, #20 - 8004ff4: bcf0 pop {r4, r5, r6, r7} - 8004ff6: bc01 pop {r0} - 8004ff8: 4700 bx r0 - current.size += next.size; - 8004ffa: 4816 ldr r0, [pc, #88] ; (8005054 ) - 8004ffc: 211c movs r1, #28 - 8004ffe: 4a16 ldr r2, [pc, #88] ; (8005058 ) - 8005000: f004 f86e bl 80090e0 - 8005004: defe udf #254 ; 0xfe - Err(e) => unwrap_failed(msg, &e), - 8005006: 4810 ldr r0, [pc, #64] ; (8005048 ) - 8005008: 9000 str r0, [sp, #0] - 800500a: 4810 ldr r0, [pc, #64] ; (800504c ) - 800500c: 212c movs r1, #44 ; 0x2c - 800500e: aa04 add r2, sp, #16 - 8005010: 4b0f ldr r3, [pc, #60] ; (8005050 ) - 8005012: f003 f843 bl 800809c - 8005016: defe udf #254 ; 0xfe - 8005018: 4808 ldr r0, [pc, #32] ; (800503c ) - 800501a: 9000 str r0, [sp, #0] - 800501c: 4808 ldr r0, [pc, #32] ; (8005040 ) - 800501e: 2110 movs r1, #16 - 8005020: aa04 add r2, sp, #16 - 8005022: 4b08 ldr r3, [pc, #32] ; (8005044 ) - 8005024: f003 f83a bl 800809c - 8005028: defe udf #254 ; 0xfe - debug_assert!(is_writing(borrow)); - 800502a: 480c ldr r0, [pc, #48] ; (800505c ) - 800502c: 2124 movs r1, #36 ; 0x24 - 800502e: 4a0c ldr r2, [pc, #48] ; (8005060 ) - 8005030: f004 f856 bl 80090e0 - 8005034: defe udf #254 ; 0xfe - 8005036: 46c0 nop ; (mov r8, r8) - 8005038: 04000208 .word 0x04000208 - 800503c: 0800b928 .word 0x0800b928 - 8005040: 0800ae5c .word 0x0800ae5c - 8005044: 0800b8c8 .word 0x0800b8c8 - 8005048: 0800b964 .word 0x0800b964 - 800504c: 0800b938 .word 0x0800b938 - 8005050: 0800b8d8 .word 0x0800b8d8 - 8005054: 0800b990 .word 0x0800b990 - 8005058: 0800b974 .word 0x0800b974 - 800505c: 0800c2ca .word 0x0800c2ca - 8005060: 0800c2f0 .word 0x0800c2f0 - -08005064 : -pub fn free(f: F) -> R - 8005064: b5f0 push {r4, r5, r6, r7, lr} - 8005066: af03 add r7, sp, #12 - 8005068: b085 sub sp, #20 - 800506a: 4923 ldr r1, [pc, #140] ; (80050f8 ) - intrinsics::volatile_load(src) - 800506c: 880a ldrh r2, [r1, #0] - 800506e: 2500 movs r5, #0 - intrinsics::volatile_store(dst, src); - 8005070: 800d strh r5, [r1, #0] - let r = f(unsafe { &CriticalSection::new() }); - 8005072: 6801 ldr r1, [r0, #0] - 8005074: 680b ldr r3, [r1, #0] - match borrow.get() { - 8005076: 6919 ldr r1, [r3, #16] - 8005078: 2900 cmp r1, #0 - 800507a: d12e bne.n 80050da - 800507c: 6844 ldr r4, [r0, #4] - 800507e: 6880 ldr r0, [r0, #8] - 8005080: 9002 str r0, [sp, #8] - 8005082: 43e8 mvns r0, r5 - copy_nonoverlapping(&src as *const T, dst, 1); - 8005084: 6118 str r0, [r3, #16] - match list_ptr { - 8005086: 695e ldr r6, [r3, #20] - let value = unsafe { NonNull::new_unchecked(self.value.get()) }; - 8005088: 0018 movs r0, r3 - 800508a: 3014 adds r0, #20 - 800508c: 2e00 cmp r6, #0 - 800508e: 9203 str r2, [sp, #12] - 8005090: d011 beq.n 80050b6 - 8005092: 6821 ldr r1, [r4, #0] - if current_block.as_ptr().cast() > ptr { - 8005094: 42b1 cmp r1, r6 - 8005096: d201 bcs.n 800509c - 8005098: 0032 movs r2, r6 - 800509a: e007 b.n 80050ac - match list_ptr { - 800509c: 6872 ldr r2, [r6, #4] - list_ptr = &mut current_block.as_mut().next; - 800509e: 1d30 adds r0, r6, #4 - match list_ptr { - 80050a0: 2a00 cmp r2, #0 - 80050a2: d009 beq.n 80050b8 - if current_block.as_ptr().cast() > ptr { - 80050a4: 4291 cmp r1, r2 - 80050a6: b404 push {r2} - 80050a8: bc40 pop {r6} - 80050aa: d2f7 bcs.n 800509c - size: new_layout.size(), - 80050ac: 9d02 ldr r5, [sp, #8] - 80050ae: 682d ldr r5, [r5, #0] - *ptr.cast() = new_block_content; - 80050b0: 600d str r5, [r1, #0] - 80050b2: 604a str r2, [r1, #4] - 80050b4: e003 b.n 80050be - *ptr.cast() = new_block_content; - 80050b6: 6821 ldr r1, [r4, #0] - size: new_layout.size(), - 80050b8: 9a02 ldr r2, [sp, #8] - 80050ba: 6812 ldr r2, [r2, #0] - *ptr.cast() = new_block_content; - 80050bc: c124 stmia r1!, {r2, r5} - 80050be: 6821 ldr r1, [r4, #0] - 80050c0: 6001 str r1, [r0, #0] - let borrow = self.borrow.get(); - 80050c2: 6918 ldr r0, [r3, #16] - debug_assert!(is_writing(borrow)); - 80050c4: 2800 cmp r0, #0 - 80050c6: 490c ldr r1, [pc, #48] ; (80050f8 ) - 80050c8: 9a03 ldr r2, [sp, #12] - 80050ca: d50f bpl.n 80050ec - self.borrow.set(borrow + 1); - 80050cc: 1c40 adds r0, r0, #1 - 80050ce: 6118 str r0, [r3, #16] - intrinsics::volatile_store(dst, src); - 80050d0: 800a strh r2, [r1, #0] -} - 80050d2: b005 add sp, #20 - 80050d4: bcf0 pop {r4, r5, r6, r7} - 80050d6: bc01 pop {r0} - 80050d8: 4700 bx r0 - 80050da: 4808 ldr r0, [pc, #32] ; (80050fc ) - 80050dc: 9000 str r0, [sp, #0] - 80050de: 4808 ldr r0, [pc, #32] ; (8005100 ) - 80050e0: 2110 movs r1, #16 - 80050e2: aa04 add r2, sp, #16 - 80050e4: 4b07 ldr r3, [pc, #28] ; (8005104 ) - 80050e6: f002 ffd9 bl 800809c - 80050ea: defe udf #254 ; 0xfe - debug_assert!(is_writing(borrow)); - 80050ec: 4806 ldr r0, [pc, #24] ; (8005108 ) - 80050ee: 2124 movs r1, #36 ; 0x24 - 80050f0: 4a06 ldr r2, [pc, #24] ; (800510c ) - 80050f2: f003 fff5 bl 80090e0 - 80050f6: defe udf #254 ; 0xfe - 80050f8: 04000208 .word 0x04000208 - 80050fc: 0800b9f4 .word 0x0800b9f4 - 8005100: 0800ae5c .word 0x0800ae5c - 8005104: 0800b8c8 .word 0x0800b8c8 - 8005108: 0800c2ca .word 0x0800c2ca - 800510c: 0800c2f0 .word 0x0800c2f0 - -08005110 >: -pub unsafe fn drop_in_place(to_drop: *mut T) { - 8005110: 4770 bx lr - ... - -08005114 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179>: - pub fn either_layout(layout: Layout) -> Layout { - 8005114: b5f0 push {r4, r5, r6, r7, lr} - 8005116: af03 add r7, sp, #12 - 8005118: b083 sub sp, #12 - 800511a: 2900 cmp r1, #0 - 800511c: d049 beq.n 80051b2 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0x9e> - 800511e: 2904 cmp r1, #4 - 8005120: b402 push {r1} - 8005122: bc40 pop {r6} - 8005124: d800 bhi.n 8005128 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0x14> - 8005126: 2604 movs r6, #4 - intrinsics::ctpop(self as $ActualT) as u32 - 8005128: 0872 lsrs r2, r6, #1 - 800512a: 4b28 ldr r3, [pc, #160] ; (80051cc <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0xb8>) - 800512c: 401a ands r2, r3 - 800512e: 1ab3 subs r3, r6, r2 - 8005130: 4a27 ldr r2, [pc, #156] ; (80051d0 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0xbc>) - 8005132: 089c lsrs r4, r3, #2 - 8005134: 4013 ands r3, r2 - 8005136: 4014 ands r4, r2 - 8005138: 191b adds r3, r3, r4 - 800513a: 091c lsrs r4, r3, #4 - 800513c: 191b adds r3, r3, r4 - 800513e: 4c25 ldr r4, [pc, #148] ; (80051d4 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0xc0>) - 8005140: 4023 ands r3, r4 - 8005142: 4d25 ldr r5, [pc, #148] ; (80051d8 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0xc4>) - 8005144: 436b muls r3, r5 - 8005146: 0e1b lsrs r3, r3, #24 - if !align.is_power_of_two() { - 8005148: 2b01 cmp r3, #1 - 800514a: d130 bne.n 80051ae <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0x9a> - if size > usize::MAX - (align - 1) { - 800514c: 4273 negs r3, r6 - 800514e: 4283 cmp r3, r0 - 8005150: d32d bcc.n 80051ae <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0x9a> - 8005152: 2808 cmp r0, #8 - 8005154: d800 bhi.n 8005158 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0x44> - 8005156: 2008 movs r0, #8 - 8005158: 4298 cmp r0, r3 - 800515a: d82c bhi.n 80051b6 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0xa2> - 800515c: 2e08 cmp r6, #8 - 800515e: d800 bhi.n 8005162 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0x4e> - 8005160: 2108 movs r1, #8 - 8005162: 084b lsrs r3, r1, #1 - 8005164: 4e19 ldr r6, [pc, #100] ; (80051cc <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0xb8>) - 8005166: 4033 ands r3, r6 - 8005168: 1acb subs r3, r1, r3 - 800516a: 089e lsrs r6, r3, #2 - 800516c: 4013 ands r3, r2 - 800516e: 4016 ands r6, r2 - 8005170: 199a adds r2, r3, r6 - 8005172: 0913 lsrs r3, r2, #4 - 8005174: 18d2 adds r2, r2, r3 - 8005176: 4022 ands r2, r4 - 8005178: 4355 muls r5, r2 - 800517a: 0e2a lsrs r2, r5, #24 - if !align.is_power_of_two() { - 800517c: 2a01 cmp r2, #1 - 800517e: d11c bne.n 80051ba <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0xa6> - 8005180: 424a negs r2, r1 - 8005182: 4290 cmp r0, r2 - 8005184: d819 bhi.n 80051ba <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0xa6> - intrinsics::wrapping_add(self, rhs) - 8005186: 1843 adds r3, r0, r1 - intrinsics::wrapping_sub(self, rhs) - 8005188: 1e5b subs r3, r3, #1 - let len_rounded_up = len.wrapping_add(align).wrapping_sub(1) & !align.wrapping_sub(1); - 800518a: 4013 ands r3, r2 - 800518c: 1a1a subs r2, r3, r0 - 800518e: 2300 movs r3, #0 - let new_size = self.size() + pad; - 8005190: 1882 adds r2, r0, r2 - 8005192: 415b adcs r3, r3 - 8005194: 4282 cmp r2, r0 - 8005196: d304 bcc.n 80051a2 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0x8e> - } - 8005198: 0010 movs r0, r2 - 800519a: b003 add sp, #12 - 800519c: bcf0 pop {r4, r5, r6, r7} - 800519e: bc04 pop {r2} - 80051a0: 4710 bx r2 - 80051a2: 480e ldr r0, [pc, #56] ; (80051dc <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0xc8>) - 80051a4: 211c movs r1, #28 - 80051a6: 4a0e ldr r2, [pc, #56] ; (80051e0 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0xcc>) - 80051a8: f003 ff9a bl 80090e0 - 80051ac: defe udf #254 ; 0xfe - 80051ae: 4811 ldr r0, [pc, #68] ; (80051f4 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0xe0>) - 80051b0: e004 b.n 80051bc <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0xa8> - ::core::intrinsics::abort(); - 80051b2: defe udf #254 ; 0xfe - 80051b4: defe udf #254 ; 0xfe - 80051b6: 480e ldr r0, [pc, #56] ; (80051f0 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0xdc>) - 80051b8: e000 b.n 80051bc <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0xa8> - 80051ba: 480a ldr r0, [pc, #40] ; (80051e4 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0xd0>) - 80051bc: 9000 str r0, [sp, #0] - 80051be: 480a ldr r0, [pc, #40] ; (80051e8 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0xd4>) - 80051c0: 2114 movs r1, #20 - 80051c2: aa02 add r2, sp, #8 - 80051c4: 4b09 ldr r3, [pc, #36] ; (80051ec <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179+0xd8>) - 80051c6: f002 ff69 bl 800809c - 80051ca: defe udf #254 ; 0xfe - 80051cc: 55555555 .word 0x55555555 - 80051d0: 33333333 .word 0x33333333 - 80051d4: 0f0f0f0f .word 0x0f0f0f0f - 80051d8: 01010101 .word 0x01010101 - 80051dc: 0800bba0 .word 0x0800bba0 - 80051e0: 0800bb88 .word 0x0800bb88 - 80051e4: 0800bc4c .word 0x0800bc4c - 80051e8: 0800bbf7 .word 0x0800bbf7 - 80051ec: 0800bbbc .word 0x0800bbbc - 80051f0: 0800bc3c .word 0x0800bc3c - 80051f4: 0800bc2c .word 0x0800bc2c - -080051f8 : - pub unsafe fn alloc(&self, layout: Layout) -> Option> { - 80051f8: b5f0 push {r4, r5, r6, r7, lr} - 80051fa: af03 add r7, sp, #12 - 80051fc: b08f sub sp, #60 ; 0x3c - 80051fe: ab02 add r3, sp, #8 - 8005200: c307 stmia r3!, {r0, r1, r2} - let full_layout = Block::either_layout(layout); - 8005202: 0008 movs r0, r1 - 8005204: 0011 movs r1, r2 - 8005206: f7ff ff85 bl 8005114 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179> - 800520a: 9106 str r1, [sp, #24] - 800520c: 9005 str r0, [sp, #20] - if !$e { - 800520e: 2900 cmp r1, #0 - 8005210: d03a beq.n 8005288 - 8005212: 2908 cmp r1, #8 - 8005214: d800 bhi.n 8005218 - 8005216: 2108 movs r1, #8 - 8005218: 1dc2 adds r2, r0, #7 - 800521a: 2307 movs r3, #7 - let len_rounded_up = len.wrapping_add(align).wrapping_sub(1) & !align.wrapping_sub(1); - 800521c: 439a bics r2, r3 - 800521e: 1a12 subs r2, r2, r0 - let (a, b) = intrinsics::add_with_overflow(self as $ActualT, rhs as $ActualT); - 8005220: 1880 adds r0, r0, r2 - let offset = self.size().checked_add(pad).ok_or(LayoutError)?; - 8005222: d228 bcs.n 8005276 - 8005224: 2300 movs r3, #0 - 8005226: 0002 movs r2, r0 - 8005228: 3208 adds r2, #8 - 800522a: b408 push {r3} - 800522c: bc10 pop {r4} - 800522e: 415c adcs r4, r3 - 8005230: 424d negs r5, r1 - 8005232: 42aa cmp r2, r5 - 8005234: d900 bls.n 8005238 - 8005236: 2301 movs r3, #1 - 8005238: 1e4d subs r5, r1, #1 - 800523a: 400d ands r5, r1 - 800523c: 1e6e subs r6, r5, #1 - 800523e: 41b5 sbcs r5, r6 - 8005240: 424e negs r6, r1 - 8005242: 414e adcs r6, r1 - 8005244: 432e orrs r6, r5 - let new_size = offset.checked_add(next.size()).ok_or(LayoutError)?; - 8005246: 4334 orrs r4, r6 - 8005248: 431c orrs r4, r3 - 800524a: 2c01 cmp r4, #1 - 800524c: d013 beq.n 8005276 - let (block_after_layout, block_after_layout_offset) = full_layout - 800524e: 9108 str r1, [sp, #32] - 8005250: 9207 str r2, [sp, #28] - 8005252: 9009 str r0, [sp, #36] ; 0x24 - 8005254: a803 add r0, sp, #12 - free(|key| { - 8005256: 900e str r0, [sp, #56] ; 0x38 - 8005258: a809 add r0, sp, #36 ; 0x24 - 800525a: 900d str r0, [sp, #52] ; 0x34 - 800525c: a807 add r0, sp, #28 - 800525e: 900c str r0, [sp, #48] ; 0x30 - 8005260: a805 add r0, sp, #20 - 8005262: 900b str r0, [sp, #44] ; 0x2c - 8005264: a802 add r0, sp, #8 - 8005266: 900a str r0, [sp, #40] ; 0x28 - 8005268: a80a add r0, sp, #40 ; 0x28 - 800526a: f7ff fe13 bl 8004e94 - } - 800526e: b00f add sp, #60 ; 0x3c - 8005270: bcf0 pop {r4, r5, r6, r7} - 8005272: bc02 pop {r1} - 8005274: 4708 bx r1 - Err(e) => unwrap_failed("called `Result::unwrap()` on an `Err` value", &e), - 8005276: 4805 ldr r0, [pc, #20] ; (800528c ) - 8005278: 9000 str r0, [sp, #0] - 800527a: 4805 ldr r0, [pc, #20] ; (8005290 ) - 800527c: 212b movs r1, #43 ; 0x2b - 800527e: aa0a add r2, sp, #40 ; 0x28 - 8005280: 4b04 ldr r3, [pc, #16] ; (8005294 ) - 8005282: f002 ff0b bl 800809c - 8005286: defe udf #254 ; 0xfe - ::core::intrinsics::abort(); - 8005288: defe udf #254 ; 0xfe - 800528a: defe udf #254 ; 0xfe - 800528c: 0800bc5c .word 0x0800bc5c - 8005290: 0800bbcc .word 0x0800bbcc - 8005294: 0800bbbc .word 0x0800bbbc - -08005298 : - pub unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) { - 8005298: b5d0 push {r4, r6, r7, lr} - 800529a: af02 add r7, sp, #8 - 800529c: b082 sub sp, #8 - 800529e: 0004 movs r4, r0 - self.dealloc_no_normalise(ptr, layout); - 80052a0: f000 f808 bl 80052b4 - 80052a4: 9401 str r4, [sp, #4] - 80052a6: a801 add r0, sp, #4 - free(|key| { - 80052a8: f7ff fe6c bl 8004f84 - } - 80052ac: b002 add sp, #8 - 80052ae: bcd0 pop {r4, r6, r7} - 80052b0: bc01 pop {r0} - 80052b2: 4700 bx r0 - -080052b4 : - pub unsafe fn dealloc_no_normalise(&self, ptr: *mut u8, layout: Layout) { - 80052b4: b5f0 push {r4, r5, r6, r7, lr} - 80052b6: af03 add r7, sp, #12 - 80052b8: b083 sub sp, #12 - 80052ba: 000d movs r5, r1 - 80052bc: 0004 movs r4, r0 - let new_layout = Block::either_layout(layout).pad_to_align(); - 80052be: 0010 movs r0, r2 - 80052c0: 0019 movs r1, r3 - 80052c2: f7ff ff27 bl 8005114 <_ZN3agb9agb_alloc15block_allocator5Block13either_layout17he1acbb270cbcb69fE.llvm.2098481250538591179> - if !$e { - 80052c6: 2900 cmp r1, #0 - 80052c8: d04f beq.n 800536a - intrinsics::wrapping_add(self, rhs) - 80052ca: 1842 adds r2, r0, r1 - intrinsics::wrapping_sub(self, rhs) - 80052cc: 1e52 subs r2, r2, #1 - let len_rounded_up = len.wrapping_add(align).wrapping_sub(1) & !align.wrapping_sub(1); - 80052ce: 424b negs r3, r1 - 80052d0: 4013 ands r3, r2 - 80052d2: 1a1a subs r2, r3, r0 - 80052d4: 2300 movs r3, #0 - let new_size = self.size() + pad; - 80052d6: 1882 adds r2, r0, r2 - 80052d8: b408 push {r3} - 80052da: bc40 pop {r6} - 80052dc: 415e adcs r6, r3 - 80052de: 4282 cmp r2, r0 - 80052e0: d33d bcc.n 800535e - intrinsics::ctpop(self as $ActualT) as u32 - 80052e2: 0848 lsrs r0, r1, #1 - 80052e4: 4e2c ldr r6, [pc, #176] ; (8005398 ) - 80052e6: 4006 ands r6, r0 - 80052e8: 1b88 subs r0, r1, r6 - 80052ea: 492c ldr r1, [pc, #176] ; (800539c ) - 80052ec: 0886 lsrs r6, r0, #2 - 80052ee: 4008 ands r0, r1 - 80052f0: 400e ands r6, r1 - 80052f2: 1980 adds r0, r0, r6 - 80052f4: 0901 lsrs r1, r0, #4 - 80052f6: 1840 adds r0, r0, r1 - 80052f8: 4929 ldr r1, [pc, #164] ; (80053a0 ) - 80052fa: 4001 ands r1, r0 - 80052fc: 4829 ldr r0, [pc, #164] ; (80053a4 ) - 80052fe: 4348 muls r0, r1 - 8005300: 0e00 lsrs r0, r0, #24 - 8005302: 2801 cmp r0, #1 - 8005304: d133 bne.n 800536e - 8005306: 482a ldr r0, [pc, #168] ; (80053b0 ) - intrinsics::volatile_load(src) - 8005308: 8801 ldrh r1, [r0, #0] - intrinsics::volatile_store(dst, src); - 800530a: 9101 str r1, [sp, #4] - 800530c: 8003 strh r3, [r0, #0] - match borrow.get() { - 800530e: 6920 ldr r0, [r4, #16] - 8005310: 2800 cmp r0, #0 - 8005312: d132 bne.n 800537a - 8005314: 43d8 mvns r0, r3 - copy_nonoverlapping(&src as *const T, dst, 1); - 8005316: 6120 str r0, [r4, #16] - match list_ptr { - 8005318: 6961 ldr r1, [r4, #20] - let value = unsafe { NonNull::new_unchecked(self.value.get()) }; - 800531a: 0026 movs r6, r4 - 800531c: 3614 adds r6, #20 - 800531e: 2900 cmp r1, #0 - 8005320: d00e beq.n 8005340 - if current_block.as_ptr().cast() > ptr { - 8005322: 42a9 cmp r1, r5 - 8005324: d901 bls.n 800532a - 8005326: 0008 movs r0, r1 - 8005328: e007 b.n 800533a - match list_ptr { - 800532a: 6848 ldr r0, [r1, #4] - list_ptr = &mut current_block.as_mut().next; - 800532c: 1d0e adds r6, r1, #4 - match list_ptr { - 800532e: 2800 cmp r0, #0 - 8005330: d006 beq.n 8005340 - if current_block.as_ptr().cast() > ptr { - 8005332: 42a8 cmp r0, r5 - 8005334: b401 push {r0} - 8005336: bc02 pop {r1} - 8005338: d9f7 bls.n 800532a - *ptr.cast() = new_block_content; - 800533a: 602a str r2, [r5, #0] - 800533c: 6068 str r0, [r5, #4] - 800533e: e001 b.n 8005344 - *ptr.cast() = new_block_content; - 8005340: c50c stmia r5!, {r2, r3} - 8005342: 3d08 subs r5, #8 - 8005344: 6035 str r5, [r6, #0] - let borrow = self.borrow.get(); - 8005346: 6920 ldr r0, [r4, #16] - debug_assert!(is_writing(borrow)); - 8005348: 2800 cmp r0, #0 - 800534a: d51f bpl.n 800538c - self.borrow.set(borrow + 1); - 800534c: 1c40 adds r0, r0, #1 - 800534e: 6120 str r0, [r4, #16] - intrinsics::volatile_store(dst, src); - 8005350: 4817 ldr r0, [pc, #92] ; (80053b0 ) - 8005352: 9901 ldr r1, [sp, #4] - 8005354: 8001 strh r1, [r0, #0] - } - 8005356: b003 add sp, #12 - 8005358: bcf0 pop {r4, r5, r6, r7} - 800535a: bc01 pop {r0} - 800535c: 4700 bx r0 - 800535e: 481a ldr r0, [pc, #104] ; (80053c8 ) - 8005360: 211c movs r1, #28 - 8005362: 4a1a ldr r2, [pc, #104] ; (80053cc ) - 8005364: f003 febc bl 80090e0 - 8005368: defe udf #254 ; 0xfe - ::core::intrinsics::abort(); - 800536a: defe udf #254 ; 0xfe - 800536c: defe udf #254 ; 0xfe - 800536e: 480e ldr r0, [pc, #56] ; (80053a8 ) - 8005370: 2129 movs r1, #41 ; 0x29 - 8005372: 4a0e ldr r2, [pc, #56] ; (80053ac ) - 8005374: f003 feb4 bl 80090e0 - 8005378: defe udf #254 ; 0xfe - Err(e) => unwrap_failed(msg, &e), - 800537a: 480e ldr r0, [pc, #56] ; (80053b4 ) - 800537c: 9000 str r0, [sp, #0] - 800537e: 480e ldr r0, [pc, #56] ; (80053b8 ) - 8005380: 2110 movs r1, #16 - 8005382: aa02 add r2, sp, #8 - 8005384: 4b0d ldr r3, [pc, #52] ; (80053bc ) - 8005386: f002 fe89 bl 800809c - 800538a: defe udf #254 ; 0xfe - debug_assert!(is_writing(borrow)); - 800538c: 480c ldr r0, [pc, #48] ; (80053c0 ) - 800538e: 2124 movs r1, #36 ; 0x24 - 8005390: 4a0c ldr r2, [pc, #48] ; (80053c4 ) - 8005392: f003 fea5 bl 80090e0 - 8005396: defe udf #254 ; 0xfe - 8005398: 55555555 .word 0x55555555 - 800539c: 33333333 .word 0x33333333 - 80053a0: 0f0f0f0f .word 0x0f0f0f0f - 80053a4: 01010101 .word 0x01010101 - 80053a8: 0800ba5c .word 0x0800ba5c - 80053ac: 0800bb00 .word 0x0800bb00 - 80053b0: 04000208 .word 0x04000208 - 80053b4: 0800b9f4 .word 0x0800b9f4 - 80053b8: 0800ae5c .word 0x0800ae5c - 80053bc: 0800b8c8 .word 0x0800b8c8 - 80053c0: 0800c2ca .word 0x0800c2ca - 80053c4: 0800c2f0 .word 0x0800c2f0 - 80053c8: 0800bba0 .word 0x0800bba0 - 80053cc: 0800bb88 .word 0x0800bb88 - -080053d0 <::dealloc>: - None => core::ptr::null_mut(), - Some(p) => p.as_ptr(), - } - } - - unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) { - 80053d0: b5d0 push {r4, r6, r7, lr} - 80053d2: af02 add r7, sp, #8 - 80053d4: b082 sub sp, #8 - 80053d6: 0004 movs r4, r0 - self.dealloc_no_normalise(ptr, layout); - 80053d8: f7ff ff6c bl 80052b4 - 80053dc: 9401 str r4, [sp, #4] - 80053de: a801 add r0, sp, #4 - free(|key| { - 80053e0: f7ff fdd0 bl 8004f84 - self.dealloc(ptr, layout); - } - 80053e4: b002 add sp, #8 - 80053e6: bcd0 pop {r4, r6, r7} - 80053e8: bc01 pop {r0} - 80053ea: 4700 bx r0 - -080053ec : - } - 80053ec: 4770 bx lr - ... - -080053f0 : -/// 1. for every `i` in `1..runs.len()`: `runs[i - 1].len > runs[i].len` -/// 2. for every `i` in `2..runs.len()`: `runs[i - 2].len > runs[i - 1].len + runs[i].len` -/// -/// The invariants ensure that the total running time is *O*(*n* \* log(*n*)) worst-case. -#[cfg(not(no_global_oom_handling))] -fn merge_sort(v: &mut [T], mut is_less: F) - 80053f0: b5f0 push {r4, r5, r6, r7, lr} - 80053f2: af03 add r7, sp, #12 - 80053f4: b0a1 sub sp, #132 ; 0x84 - 80053f6: 9205 str r2, [sp, #20] - 80053f8: 000a movs r2, r1 - 80053fa: 900f str r0, [sp, #60] ; 0x3c - } - - let len = v.len(); - - // Short arrays get sorted in-place via insertion sort to avoid allocations. - if len <= MAX_INSERTION { - 80053fc: 2915 cmp r1, #21 - 80053fe: 9108 str r1, [sp, #32] - 8005400: d206 bcs.n 8005410 - if len >= 2 { - 8005402: 2a02 cmp r2, #2 - 8005404: d201 bcs.n 800540a - 8005406: f000 fc14 bl 8005c32 - 800540a: 2000 movs r0, #0 - 800540c: f000 fc12 bl 8005c34 - - // Allocate a buffer to use as scratch memory. We keep the length 0 so we can keep in it - // shallow copies of the contents of `v` without risking the dtors running on copies if - // `is_less` panics. When merging two sorted runs, this buffer holds a copy of the shorter run, - // which will always have length at most `len / 2`. - let mut buf = Vec::with_capacity(len / 2); - 8005410: 0850 lsrs r0, r2, #1 - 8005412: 2501 movs r5, #1 - 8005414: 9001 str r0, [sp, #4] - unsafe { __rust_alloc(layout.size(), layout.align()) } - 8005416: 0029 movs r1, r5 - 8005418: 0014 movs r4, r2 - 800541a: f7fb f999 bl 8000750 <__rust_alloc> - 800541e: 9016 str r0, [sp, #88] ; 0x58 - let ptr = NonNull::new(raw_ptr).ok_or(AllocError)?; - 8005420: 2800 cmp r0, #0 - 8005422: d101 bne.n 8005428 - 8005424: f000 fd65 bl 8005ef2 - 8005428: 2300 movs r3, #0 - Vec { buf: RawVec::NEW, len: 0 } - 800542a: 931e str r3, [sp, #120] ; 0x78 - 800542c: 931d str r3, [sp, #116] ; 0x74 - 800542e: 2004 movs r0, #4 - 8005430: 901c str r0, [sp, #112] ; 0x70 - 8005432: 990f ldr r1, [sp, #60] ; 0x3c - while v < *left && buf < *right { - 8005434: 1a6a subs r2, r5, r1 - // strange decision, but consider the fact that merges more often go in the opposite direction - // (forwards). According to benchmarks, merging forwards is slightly faster than merging - // backwards. To conclude, identifying runs by traversing backwards improves performance. - let mut runs = vec![]; - let mut end = len; - while end > 0 { - 8005436: 9204 str r2, [sp, #16] - 8005438: 1e49 subs r1, r1, #1 - 800543a: 9103 str r1, [sp, #12] - 800543c: 43d9 mvns r1, r3 - 800543e: 9115 str r1, [sp, #84] ; 0x54 - 8005440: 9302 str r3, [sp, #8] - 8005442: 9406 str r4, [sp, #24] - 8005444: 9507 str r5, [sp, #28] - 8005446: 9906 ldr r1, [sp, #24] - 8005448: 9117 str r1, [sp, #92] ; 0x5c - 800544a: 2901 cmp r1, #1 - 800544c: 9902 ldr r1, [sp, #8] - 800544e: 9106 str r1, [sp, #24] - 8005450: d100 bne.n 8005454 - 8005452: e1dd b.n 8005810 - 8005454: 9a17 ldr r2, [sp, #92] ; 0x5c - 8005456: 2a00 cmp r2, #0 - 8005458: d101 bne.n 800545e - 800545a: f000 fc91 bl 8005d80 - // Find the next natural run, and reverse it if it's strictly descending. - let mut start = end - 1; - if start > 0 { - start -= 1; - unsafe { - if is_less(v.get_unchecked(start + 1), v.get_unchecked(start)) { - 800545e: 1e50 subs r0, r2, #1 - 8005460: 9908 ldr r1, [sp, #32] - if !$e { - 8005462: 4288 cmp r0, r1 - 8005464: d301 bcc.n 800546a - 8005466: f000 fd20 bl 8005eaa - 800546a: 1e92 subs r2, r2, #2 - 800546c: 428a cmp r2, r1 - 800546e: d301 bcc.n 8005474 - 8005470: f000 fd1b bl 8005eaa - shadow_oam[a as usize] - 8005474: 9905 ldr r1, [sp, #20] - 8005476: 6809 ldr r1, [r1, #0] - 8005478: 680b ldr r3, [r1, #0] - let ptr = self.buf.ptr(); - 800547a: 6819 ldr r1, [r3, #0] - is_aligned_and_not_null(data) - 800547c: 078c lsls r4, r1, #30 - 800547e: d001 beq.n 8005484 - 8005480: f000 fd13 bl 8005eaa - 8005484: 689c ldr r4, [r3, #8] - 8005486: 231f movs r3, #31 - 8005488: 06dd lsls r5, r3, #27 - let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); - 800548a: 0023 movs r3, r4 - 800548c: 9512 str r5, [sp, #72] ; 0x48 - 800548e: 43ab bics r3, r5 - 8005490: 1ae3 subs r3, r4, r3 - 8005492: 1e5d subs r5, r3, #1 - 8005494: 41ab sbcs r3, r5 - 8005496: d001 beq.n 800549c - 8005498: f000 fd07 bl 8005eaa - 800549c: 0163 lsls r3, r4, #5 - 800549e: d501 bpl.n 80054a4 - 80054a0: f000 fd03 bl 8005eaa - 80054a4: 9b0f ldr r3, [sp, #60] ; 0x3c - 80054a6: 5c18 ldrb r0, [r3, r0] - &(*slice)[self] - 80054a8: 4284 cmp r4, r0 - 80054aa: d801 bhi.n 80054b0 - 80054ac: f000 fcc8 bl 8005e40 - match *self { - 80054b0: 0140 lsls r0, r0, #5 - 80054b2: 1808 adds r0, r1, r0 - 80054b4: 7f03 ldrb r3, [r0, #28] - match self { - 80054b6: 2b02 cmp r3, #2 - 80054b8: 4bd3 ldr r3, [pc, #844] ; (8005808 ) - 80054ba: d000 beq.n 80054be - Some(x) => Some(f(x)), - 80054bc: 6903 ldr r3, [r0, #16] - merge_sort(self, |a, b| f(a).lt(&f(b))); - 80054be: 980f ldr r0, [sp, #60] ; 0x3c - 80054c0: 5c80 ldrb r0, [r0, r2] - 80054c2: 4284 cmp r4, r0 - 80054c4: d801 bhi.n 80054ca - 80054c6: f000 fcbb bl 8005e40 - match *self { - 80054ca: 0140 lsls r0, r0, #5 - 80054cc: 1808 adds r0, r1, r0 - 80054ce: 7f05 ldrb r5, [r0, #28] - match self { - 80054d0: 2d02 cmp r5, #2 - 80054d2: 4dcd ldr r5, [pc, #820] ; (8005808 ) - 80054d4: d000 beq.n 80054d8 - Some(x) => Some(f(x)), - 80054d6: 6905 ldr r5, [r0, #16] - if is_less(v.get_unchecked(start + 1), v.get_unchecked(start)) { - 80054d8: 42ab cmp r3, r5 - 80054da: da37 bge.n 800554c - while start > 0 && is_less(v.get_unchecked(start), v.get_unchecked(start - 1)) { - 80054dc: 2a00 cmp r2, #0 - 80054de: d06f beq.n 80055c0 - 80054e0: 9817 ldr r0, [sp, #92] ; 0x5c - 80054e2: 1ec2 subs r2, r0, #3 - assert_unsafe_precondition!(self < slice.len()); - 80054e4: 1c53 adds r3, r2, #1 - 80054e6: 9808 ldr r0, [sp, #32] - 80054e8: 4283 cmp r3, r0 - 80054ea: d301 bcc.n 80054f0 - 80054ec: f000 fcdd bl 8005eaa - 80054f0: 4282 cmp r2, r0 - 80054f2: d301 bcc.n 80054f8 - 80054f4: f000 fcd9 bl 8005eaa - unsafe { intrinsics::offset(self, count) } - 80054f8: 980f ldr r0, [sp, #60] ; 0x3c - 80054fa: 1880 adds r0, r0, r2 - 80054fc: 7840 ldrb r0, [r0, #1] - &(*slice)[self] - 80054fe: 4284 cmp r4, r0 - 8005500: d801 bhi.n 8005506 - 8005502: f000 fc9d bl 8005e40 - match *self { - 8005506: 0140 lsls r0, r0, #5 - 8005508: 1808 adds r0, r1, r0 - 800550a: 7f05 ldrb r5, [r0, #28] - match self { - 800550c: 2d02 cmp r5, #2 - 800550e: 4def ldr r5, [pc, #956] ; (80058cc ) - 8005510: d000 beq.n 8005514 - Some(x) => Some(f(x)), - 8005512: 6905 ldr r5, [r0, #16] - merge_sort(self, |a, b| f(a).lt(&f(b))); - 8005514: 980f ldr r0, [sp, #60] ; 0x3c - 8005516: 5c80 ldrb r0, [r0, r2] - 8005518: 4284 cmp r4, r0 - 800551a: d801 bhi.n 8005520 - 800551c: f000 fc90 bl 8005e40 - match *self { - 8005520: 0140 lsls r0, r0, #5 - 8005522: 1808 adds r0, r1, r0 - 8005524: 7f06 ldrb r6, [r0, #28] - match self { - 8005526: 2e02 cmp r6, #2 - 8005528: 4ee8 ldr r6, [pc, #928] ; (80058cc ) - 800552a: d000 beq.n 800552e - Some(x) => Some(f(x)), - 800552c: 6906 ldr r6, [r0, #16] - while start > 0 && is_less(v.get_unchecked(start), v.get_unchecked(start - 1)) { - 800552e: 42b5 cmp r5, r6 - 8005530: da4e bge.n 80055d0 - 8005532: 2600 movs r6, #0 - start -= 1; - 8005534: 1e58 subs r0, r3, #1 - 8005536: b440 push {r6} - 8005538: bc20 pop {r5} - 800553a: 4175 adcs r5, r6 - 800553c: 2b01 cmp r3, #1 - 800553e: d201 bcs.n 8005544 - 8005540: f000 fc9b bl 8005e7a - while start > 0 && is_less(v.get_unchecked(start), v.get_unchecked(start - 1)) { - 8005544: 1e52 subs r2, r2, #1 - 8005546: 2800 cmp r0, #0 - 8005548: d1cc bne.n 80054e4 - 800554a: e048 b.n 80055de - } - v[start..end].reverse(); - } else { - while start > 0 && !is_less(v.get_unchecked(start), v.get_unchecked(start - 1)) - 800554c: 2a00 cmp r2, #0 - 800554e: 9802 ldr r0, [sp, #8] - 8005550: 9006 str r0, [sp, #24] - 8005552: d100 bne.n 8005556 - 8005554: e15c b.n 8005810 - 8005556: 9817 ldr r0, [sp, #92] ; 0x5c - 8005558: 1ec0 subs r0, r0, #3 - assert_unsafe_precondition!(self < slice.len()); - 800555a: 1c46 adds r6, r0, #1 - 800555c: 9a08 ldr r2, [sp, #32] - 800555e: 4296 cmp r6, r2 - 8005560: d301 bcc.n 8005566 - 8005562: f000 fca2 bl 8005eaa - 8005566: 4290 cmp r0, r2 - 8005568: d301 bcc.n 800556e - 800556a: f000 fc9e bl 8005eaa - 800556e: 9a0f ldr r2, [sp, #60] ; 0x3c - 8005570: 1812 adds r2, r2, r0 - 8005572: 7853 ldrb r3, [r2, #1] - &(*slice)[self] - 8005574: 429c cmp r4, r3 - 8005576: d801 bhi.n 800557c - 8005578: f000 fc64 bl 8005e44 - match *self { - 800557c: 015a lsls r2, r3, #5 - 800557e: 188b adds r3, r1, r2 - 8005580: 7f1a ldrb r2, [r3, #28] - match self { - 8005582: 2a02 cmp r2, #2 - 8005584: 4ad1 ldr r2, [pc, #836] ; (80058cc ) - 8005586: d000 beq.n 800558a - Some(x) => Some(f(x)), - 8005588: 691a ldr r2, [r3, #16] - merge_sort(self, |a, b| f(a).lt(&f(b))); - 800558a: 9b0f ldr r3, [sp, #60] ; 0x3c - 800558c: 5c1b ldrb r3, [r3, r0] - 800558e: 429c cmp r4, r3 - 8005590: d801 bhi.n 8005596 - 8005592: f000 fc57 bl 8005e44 - match *self { - 8005596: 015b lsls r3, r3, #5 - 8005598: 18cb adds r3, r1, r3 - 800559a: 7f1d ldrb r5, [r3, #28] - match self { - 800559c: 2d02 cmp r5, #2 - 800559e: 4dcb ldr r5, [pc, #812] ; (80058cc ) - 80055a0: d000 beq.n 80055a4 - Some(x) => Some(f(x)), - 80055a2: 691d ldr r5, [r3, #16] - while start > 0 && !is_less(v.get_unchecked(start), v.get_unchecked(start - 1)) - 80055a4: 42aa cmp r2, r5 - 80055a6: db5e blt.n 8005666 - 80055a8: 2300 movs r3, #0 - { - start -= 1; - 80055aa: 1e72 subs r2, r6, #1 - 80055ac: 9306 str r3, [sp, #24] - 80055ae: 415b adcs r3, r3 - 80055b0: 2e01 cmp r6, #1 - 80055b2: d201 bcs.n 80055b8 - 80055b4: f000 fc67 bl 8005e86 - while start > 0 && !is_less(v.get_unchecked(start), v.get_unchecked(start - 1)) - 80055b8: 1e40 subs r0, r0, #1 - 80055ba: 2a00 cmp r2, #0 - 80055bc: d1cd bne.n 800555a - 80055be: e127 b.n 8005810 - 80055c0: 9908 ldr r1, [sp, #32] - 80055c2: 9817 ldr r0, [sp, #92] ; 0x5c - - #[inline] - fn index_mut(self, slice: &mut [T]) -> &mut [T] { - if self.start > self.end { - slice_index_order_fail(self.start, self.end); - } else if self.end > slice.len() { - 80055c4: 4288 cmp r0, r1 - 80055c6: d901 bls.n 80055cc - 80055c8: f000 fc98 bl 8005efc - 80055cc: 2600 movs r6, #0 - 80055ce: e010 b.n 80055f2 - if self.start > self.end { - 80055d0: 9817 ldr r0, [sp, #92] ; 0x5c - 80055d2: 4283 cmp r3, r0 - 80055d4: b408 push {r3} - 80055d6: bc40 pop {r6} - 80055d8: d901 bls.n 80055de - 80055da: f000 fc9e bl 8005f1a - 80055de: 9908 ldr r1, [sp, #32] - 80055e0: 9817 ldr r0, [sp, #92] ; 0x5c - } else if self.end > slice.len() { - 80055e2: 4288 cmp r0, r1 - 80055e4: d901 bls.n 80055ea - 80055e6: f000 fc89 bl 8005efc - assert_unsafe_precondition!(self.end >= self.start && self.end <= slice.len()); - 80055ea: 42b0 cmp r0, r6 - 80055ec: d201 bcs.n 80055f2 - 80055ee: f000 fc5c bl 8005eaa - 80055f2: 2500 movs r5, #0 - ptr::slice_from_raw_parts_mut(slice.as_mut_ptr().add(self.start), self.end - self.start) - 80055f4: 1b83 subs r3, r0, r6 - 80055f6: b420 push {r5} - 80055f8: bc02 pop {r1} - 80055fa: 4169 adcs r1, r5 - 80055fc: 42b0 cmp r0, r6 - 80055fe: d200 bcs.n 8005602 - 8005600: e3ee b.n 8005de0 - 8005602: 9619 str r6, [sp, #100] ; 0x64 - /// assert!(v == [3, 2, 1]); - /// ``` - #[stable(feature = "rust1", since = "1.0.0")] - #[inline] - pub fn reverse(&mut self) { - let half_len = self.len() / 2; - 8005604: 085c lsrs r4, r3, #1 - 8005606: d02a beq.n 800565e - 8005608: 1e60 subs r0, r4, #1 - // in-bounds. Then after inlining -- once the actual - // lengths of the slices are known -- it's removed. - let (a, b) = (&mut a[..n], &mut b[..n]); - - for i in 0..n { - mem::swap(&mut a[i], &mut b[n - 1 - i]); - 800560a: 901a str r0, [sp, #104] ; 0x68 - 800560c: d201 bcs.n 8005612 - 800560e: f000 fc1b bl 8005e48 - 8005612: 990f ldr r1, [sp, #60] ; 0x3c - 8005614: 9819 ldr r0, [sp, #100] ; 0x64 - 8005616: 1808 adds r0, r1, r0 - 8005618: 9018 str r0, [sp, #96] ; 0x60 - 800561a: 18c3 adds r3, r0, r3 - 800561c: 1b18 subs r0, r3, r4 - 800561e: 9014 str r0, [sp, #80] ; 0x50 - 8005620: 42ac cmp r4, r5 - 8005622: d101 bne.n 8005628 - 8005624: f000 fc16 bl 8005e54 - 8005628: 2000 movs r0, #0 - 800562a: 991a ldr r1, [sp, #104] ; 0x68 - 800562c: 1b4b subs r3, r1, r5 - 800562e: 4140 adcs r0, r0 - 8005630: 42a9 cmp r1, r5 - 8005632: d201 bcs.n 8005638 - 8005634: f000 fc08 bl 8005e48 - 8005638: 42a3 cmp r3, r4 - 800563a: d301 bcc.n 8005640 - 800563c: f000 fc0d bl 8005e5a - 8005640: 1c68 adds r0, r5, #1 - 8005642: 9e18 ldr r6, [sp, #96] ; 0x60 - let a = ptr::read(x); - 8005644: 5d71 ldrb r1, [r6, r5] - 8005646: 911b str r1, [sp, #108] ; 0x6c - 8005648: 0021 movs r1, r4 - 800564a: 9c14 ldr r4, [sp, #80] ; 0x50 - let b = ptr::read(y); - 800564c: 5ce2 ldrb r2, [r4, r3] - copy_nonoverlapping(&src as *const T, dst, 1); - 800564e: 5572 strb r2, [r6, r5] - 8005650: 9a1b ldr r2, [sp, #108] ; 0x6c - 8005652: 54e2 strb r2, [r4, r3] - 8005654: 000c movs r4, r1 - 8005656: 4281 cmp r1, r0 - 8005658: b401 push {r0} - 800565a: bc20 pop {r5} - 800565c: d1e0 bne.n 8005620 - 800565e: 9e19 ldr r6, [sp, #100] ; 0x64 - } - } - - // Insert some more elements into the run if it's too short. Insertion sort is faster than - // merge sort on short sequences, so this significantly improves performance. - while start > 0 && end - start < MIN_RUN { - 8005660: 2e00 cmp r6, #0 - 8005662: d100 bne.n 8005666 - 8005664: e0d2 b.n 800580c - } else if self.end > slice.len() { - 8005666: 9808 ldr r0, [sp, #32] - 8005668: 9a17 ldr r2, [sp, #92] ; 0x5c - 800566a: 4282 cmp r2, r0 - 800566c: d90c bls.n 8005688 - 800566e: 2100 movs r1, #0 - 8005670: 1b90 subs r0, r2, r6 - 8005672: 4149 adcs r1, r1 - 8005674: 42b2 cmp r2, r6 - 8005676: d201 bcs.n 800567c - 8005678: f000 fc11 bl 8005e9e - 800567c: 2809 cmp r0, #9 - 800567e: d801 bhi.n 8005684 - 8005680: f000 fc40 bl 8005f04 - 8005684: 9606 str r6, [sp, #24] - 8005686: e0c3 b.n 8005810 - 8005688: 980f ldr r0, [sp, #60] ; 0x3c - 800568a: 1981 adds r1, r0, r6 - 800568c: 43f0 mvns r0, r6 - 800568e: 1880 adds r0, r0, r2 - 8005690: 901b str r0, [sp, #108] ; 0x6c - 8005692: 9118 str r1, [sp, #96] ; 0x60 - 8005694: 000d movs r5, r1 - 8005696: e010 b.n 80056ba - 8005698: 1a50 subs r0, r2, r1 - 800569a: 2800 cmp r0, #0 - 800569c: d101 bne.n 80056a2 - 800569e: f000 fc04 bl 8005eaa - copy_nonoverlapping(src, dst, count) - 80056a2: 9813 ldr r0, [sp, #76] ; 0x4c - 80056a4: 7008 strb r0, [r1, #0] - 80056a6: 981b ldr r0, [sp, #108] ; 0x6c - 80056a8: 1c40 adds r0, r0, #1 - 80056aa: 901b str r0, [sp, #108] ; 0x6c - 80056ac: 9818 ldr r0, [sp, #96] ; 0x60 - 80056ae: 1e40 subs r0, r0, #1 - 80056b0: 9018 str r0, [sp, #96] ; 0x60 - 80056b2: 1e6d subs r5, r5, #1 - 80056b4: 2e00 cmp r6, #0 - 80056b6: d100 bne.n 80056ba - 80056b8: e0aa b.n 8005810 - 80056ba: 2200 movs r2, #0 - 80056bc: 9b17 ldr r3, [sp, #92] ; 0x5c - 80056be: 1b99 subs r1, r3, r6 - 80056c0: 9206 str r2, [sp, #24] - 80056c2: 4152 adcs r2, r2 - 80056c4: 42b3 cmp r3, r6 - 80056c6: d200 bcs.n 80056ca - 80056c8: e3e9 b.n 8005e9e - 80056ca: 0030 movs r0, r6 - 80056cc: 290a cmp r1, #10 - 80056ce: d300 bcc.n 80056d2 - 80056d0: e09d b.n 800580e - start -= 1; - 80056d2: 1e46 subs r6, r0, #1 - if self.start > self.end { - 80056d4: 42b3 cmp r3, r6 - 80056d6: 9619 str r6, [sp, #100] ; 0x64 - 80056d8: d201 bcs.n 80056de - 80056da: f000 fc18 bl 8005f0e - ptr::slice_from_raw_parts_mut(slice.as_mut_ptr().add(self.start), self.end - self.start) - 80056de: 1b99 subs r1, r3, r6 - if v.len() >= 2 && is_less(&v[1], &v[0]) { - 80056e0: 2902 cmp r1, #2 - 80056e2: d3e0 bcc.n 80056a6 - 80056e4: 911a str r1, [sp, #104] ; 0x68 - 80056e6: 9905 ldr r1, [sp, #20] - 80056e8: 6809 ldr r1, [r1, #0] - 80056ea: 9111 str r1, [sp, #68] ; 0x44 - 80056ec: 680a ldr r2, [r1, #0] - 80056ee: 6811 ldr r1, [r2, #0] - 80056f0: 078b lsls r3, r1, #30 - 80056f2: d000 beq.n 80056f6 - 80056f4: e3d9 b.n 8005eaa - 80056f6: 6893 ldr r3, [r2, #8] - 80056f8: 001a movs r2, r3 - 80056fa: 9c12 ldr r4, [sp, #72] ; 0x48 - 80056fc: 43a2 bics r2, r4 - 80056fe: 1a9a subs r2, r3, r2 - 8005700: 1e54 subs r4, r2, #1 - 8005702: 41a2 sbcs r2, r4 - 8005704: d000 beq.n 8005708 - 8005706: e3d0 b.n 8005eaa - 8005708: 015a lsls r2, r3, #5 - 800570a: d500 bpl.n 800570e - 800570c: e3cd b.n 8005eaa - 800570e: 9a0f ldr r2, [sp, #60] ; 0x3c - 8005710: 5c14 ldrb r4, [r2, r0] - &(*slice)[self] - 8005712: 42a3 cmp r3, r4 - 8005714: d800 bhi.n 8005718 - 8005716: e3d6 b.n 8005ec6 - 8005718: 900e str r0, [sp, #56] ; 0x38 - 800571a: 9514 str r5, [sp, #80] ; 0x50 - match *self { - 800571c: 0162 lsls r2, r4, #5 - 800571e: 188e adds r6, r1, r2 - 8005720: 7f32 ldrb r2, [r6, #28] - match self { - 8005722: 2a02 cmp r2, #2 - 8005724: 4a69 ldr r2, [pc, #420] ; (80058cc ) - 8005726: d000 beq.n 800572a - Some(x) => Some(f(x)), - 8005728: 6932 ldr r2, [r6, #16] - merge_sort(self, |a, b| f(a).lt(&f(b))); - 800572a: 9d0f ldr r5, [sp, #60] ; 0x3c - 800572c: 9e19 ldr r6, [sp, #100] ; 0x64 - 800572e: 5da8 ldrb r0, [r5, r6] - 8005730: 4283 cmp r3, r0 - 8005732: d800 bhi.n 8005736 - 8005734: e31f b.n 8005d76 - 8005736: 9013 str r0, [sp, #76] ; 0x4c - match *self { - 8005738: 0140 lsls r0, r0, #5 - 800573a: 9010 str r0, [sp, #64] ; 0x40 - 800573c: 1809 adds r1, r1, r0 - 800573e: 7f0b ldrb r3, [r1, #28] - match self { - 8005740: 2b02 cmp r3, #2 - 8005742: 4b62 ldr r3, [pc, #392] ; (80058cc ) - 8005744: d000 beq.n 8005748 - Some(x) => Some(f(x)), - 8005746: 690b ldr r3, [r1, #16] - if v.len() >= 2 && is_less(&v[1], &v[0]) { - 8005748: 429a cmp r2, r3 - 800574a: 9d14 ldr r5, [sp, #80] ; 0x50 - 800574c: 9b1a ldr r3, [sp, #104] ; 0x68 - 800574e: daaa bge.n 80056a6 - 8005750: 9a0f ldr r2, [sp, #60] ; 0x3c - 8005752: 5594 strb r4, [r2, r6] - 8005754: a91f add r1, sp, #124 ; 0x7c - let tmp = mem::ManuallyDrop::new(ptr::read(&v[0])); - 8005756: 9813 ldr r0, [sp, #76] ; 0x4c - 8005758: 7008 strb r0, [r1, #0] - 800575a: 2b03 cmp r3, #3 - 800575c: d347 bcc.n 80057ee - 800575e: 2000 movs r0, #0 - 8005760: 9911 ldr r1, [sp, #68] ; 0x44 - 8005762: 6809 ldr r1, [r1, #0] - 8005764: 680a ldr r2, [r1, #0] - 8005766: 0793 lsls r3, r2, #30 - 8005768: d000 beq.n 800576c - 800576a: e39e b.n 8005eaa - 800576c: 688c ldr r4, [r1, #8] - 800576e: 0021 movs r1, r4 - 8005770: 9b12 ldr r3, [sp, #72] ; 0x48 - 8005772: 4399 bics r1, r3 - 8005774: 1a61 subs r1, r4, r1 - 8005776: 1e4b subs r3, r1, #1 - 8005778: 4199 sbcs r1, r3 - 800577a: d000 beq.n 800577e - 800577c: e395 b.n 8005eaa - 800577e: 0161 lsls r1, r4, #5 - 8005780: d500 bpl.n 8005784 - 8005782: e392 b.n 8005eaa - 8005784: 1829 adds r1, r5, r0 - 8005786: 784b ldrb r3, [r1, #1] - 8005788: 429c cmp r4, r3 - 800578a: d800 bhi.n 800578e - 800578c: e35a b.n 8005e44 - 800578e: 901a str r0, [sp, #104] ; 0x68 - match *self { - 8005790: 015d lsls r5, r3, #5 - 8005792: 1955 adds r5, r2, r5 - 8005794: 7f2e ldrb r6, [r5, #28] - match self { - 8005796: 2e02 cmp r6, #2 - 8005798: 4e4c ldr r6, [pc, #304] ; (80058cc ) - 800579a: d000 beq.n 800579e - Some(x) => Some(f(x)), - 800579c: 692e ldr r6, [r5, #16] - 800579e: 9813 ldr r0, [sp, #76] ; 0x4c - 80057a0: 4284 cmp r4, r0 - 80057a2: d800 bhi.n 80057a6 - 80057a4: e34c b.n 8005e40 - match *self { - 80057a6: 9810 ldr r0, [sp, #64] ; 0x40 - 80057a8: 1812 adds r2, r2, r0 - 80057aa: 7f14 ldrb r4, [r2, #28] - match self { - 80057ac: 2c02 cmp r4, #2 - 80057ae: 4c47 ldr r4, [pc, #284] ; (80058cc ) - 80057b0: d000 beq.n 80057b4 - Some(x) => Some(f(x)), - 80057b2: 6914 ldr r4, [r2, #16] - if !is_less(&v[i], &*tmp) { - 80057b4: 42a6 cmp r6, r4 - 80057b6: 9d14 ldr r5, [sp, #80] ; 0x50 - 80057b8: 981a ldr r0, [sp, #104] ; 0x68 - 80057ba: da1f bge.n 80057fc - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 80057bc: 4943 ldr r1, [pc, #268] ; (80058cc ) - 80057be: 1e49 subs r1, r1, #1 - 80057c0: 4281 cmp r1, r0 - 80057c2: 9e19 ldr r6, [sp, #100] ; 0x64 - 80057c4: d001 beq.n 80057ca - 80057c6: 2101 movs r1, #1 - 80057c8: e003 b.n 80057d2 - 80057ca: 9918 ldr r1, [sp, #96] ; 0x60 - 80057cc: 1809 adds r1, r1, r0 - 80057ce: 43ca mvns r2, r1 - 80057d0: 1851 adds r1, r2, r1 - if !$e { - 80057d2: 2900 cmp r1, #0 - 80057d4: d100 bne.n 80057d8 - 80057d6: e368 b.n 8005eaa - copy_nonoverlapping(src, dst, count) - 80057d8: 542b strb r3, [r5, r0] - 80057da: 1c40 adds r0, r0, #1 - 80057dc: 991b ldr r1, [sp, #108] ; 0x6c - 80057de: 4281 cmp r1, r0 - 80057e0: d1be bne.n 8005760 - unsafe { mem::transmute(self) } - 80057e2: 1829 adds r1, r5, r0 - 80057e4: aa1f add r2, sp, #124 ; 0x7c - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 80057e6: 1a88 subs r0, r1, r2 - 80057e8: d300 bcc.n 80057ec - 80057ea: e756 b.n 800569a - 80057ec: e754 b.n 8005698 - 80057ee: 980e ldr r0, [sp, #56] ; 0x38 - 80057f0: 1811 adds r1, r2, r0 - 80057f2: aa1f add r2, sp, #124 ; 0x7c - 80057f4: 1a88 subs r0, r1, r2 - 80057f6: d200 bcs.n 80057fa - 80057f8: e74e b.n 8005698 - 80057fa: e74e b.n 800569a - 80057fc: 9e19 ldr r6, [sp, #100] ; 0x64 - 80057fe: aa1f add r2, sp, #124 ; 0x7c - 8005800: 1a88 subs r0, r1, r2 - 8005802: d300 bcc.n 8005806 - 8005804: e749 b.n 800569a - 8005806: e747 b.n 8005698 - 8005808: 7fffffff .word 0x7fffffff - 800580c: 2000 movs r0, #0 - 800580e: 9006 str r0, [sp, #24] - 8005810: 9906 ldr r1, [sp, #24] - 8005812: 9a17 ldr r2, [sp, #92] ; 0x5c - insert_head(&mut v[start..end], &mut is_less); - } - - // Push this run onto the stack. - runs.push(Run { start, len: end - start }); - 8005814: 1a54 subs r4, r2, r1 - 8005816: 9802 ldr r0, [sp, #8] - 8005818: 4140 adcs r0, r0 - 800581a: 428a cmp r2, r1 - 800581c: d200 bcs.n 8005820 - 800581e: e346 b.n 8005eae - if self.len == self.buf.capacity() { - 8005820: 991e ldr r1, [sp, #120] ; 0x78 - 8005822: 981d ldr r0, [sp, #116] ; 0x74 - 8005824: 4281 cmp r1, r0 - 8005826: d103 bne.n 8005830 - 8005828: a81c add r0, sp, #112 ; 0x70 - self.buf.reserve_for_push(self.len); - 800582a: f7fd fcb7 bl 800319c ::reserve_for_push> - let end = self.as_mut_ptr().add(self.len); - 800582e: 991e ldr r1, [sp, #120] ; 0x78 - 8005830: 00c8 lsls r0, r1, #3 - let ptr = self.buf.ptr(); - 8005832: 991c ldr r1, [sp, #112] ; 0x70 - 8005834: 9a06 ldr r2, [sp, #24] - 8005836: 500a str r2, [r1, r0] - 8005838: 1808 adds r0, r1, r0 - 800583a: 6044 str r4, [r0, #4] - 800583c: 2100 movs r1, #0 - self.len += 1; - 800583e: 981e ldr r0, [sp, #120] ; 0x78 - 8005840: 1c43 adds r3, r0, #1 - 8005842: 9112 str r1, [sp, #72] ; 0x48 - 8005844: 4149 adcs r1, r1 - 8005846: 4283 cmp r3, r0 - 8005848: d200 bcs.n 800584c - 800584a: e336 b.n 8005eba - 800584c: 931e str r3, [sp, #120] ; 0x78 - let ptr = self.buf.ptr(); - 800584e: 981c ldr r0, [sp, #112] ; 0x70 - 8005850: 0781 lsls r1, r0, #30 - 8005852: d000 beq.n 8005856 - 8005854: e329 b.n 8005eaa - 8005856: 2107 movs r1, #7 - 8005858: 074a lsls r2, r1, #29 - 800585a: 0019 movs r1, r3 - 800585c: 920b str r2, [sp, #44] ; 0x2c - 800585e: 4391 bics r1, r2 - 8005860: 1a59 subs r1, r3, r1 - 8005862: 1e4a subs r2, r1, #1 - 8005864: 4191 sbcs r1, r2 - 8005866: d000 beq.n 800586a - 8005868: e31f b.n 8005eaa - 800586a: 00da lsls r2, r3, #3 - 800586c: d500 bpl.n 8005870 - 800586e: e31c b.n 8005eaa - // run starts at index 0, it will always demand a merge operation until the stack is fully - // collapsed, in order to complete the sort. - #[inline] - fn collapse(runs: &[Run]) -> Option { - let n = runs.len(); - if n >= 2 - 8005870: 2b02 cmp r3, #2 - 8005872: d200 bcs.n 8005876 - 8005874: e5e7 b.n 8005446 - && (runs[n - 1].start == 0 - 8005876: 1e59 subs r1, r3, #1 - 8005878: 00cc lsls r4, r1, #3 - 800587a: 5901 ldr r1, [r0, r4] - 800587c: 2900 cmp r1, #0 - 800587e: d027 beq.n 80058d0 - || runs[n - 2].len <= runs[n - 1].len - 8005880: 1901 adds r1, r0, r4 - 8005882: 6849 ldr r1, [r1, #4] - 8005884: 1812 adds r2, r2, r0 - 8005886: 0015 movs r5, r2 - 8005888: 3d0c subs r5, #12 - 800588a: 682d ldr r5, [r5, #0] - && (runs[n - 1].start == 0 - 800588c: 428d cmp r5, r1 - 800588e: d91f bls.n 80058d0 - || (n >= 3 && runs[n - 3].len <= runs[n - 2].len + runs[n - 1].len) - 8005890: 2b03 cmp r3, #3 - 8005892: d200 bcs.n 8005896 - 8005894: e5d7 b.n 8005446 - 8005896: 186e adds r6, r5, r1 - 8005898: 9c12 ldr r4, [sp, #72] ; 0x48 - 800589a: 4164 adcs r4, r4 - 800589c: 42ae cmp r6, r5 - 800589e: d200 bcs.n 80058a2 - 80058a0: e2e5 b.n 8005e6e - 80058a2: 1edc subs r4, r3, #3 - 80058a4: 9410 str r4, [sp, #64] ; 0x40 - 80058a6: 00e4 lsls r4, r4, #3 - 80058a8: 1904 adds r4, r0, r4 - 80058aa: 6864 ldr r4, [r4, #4] - && (runs[n - 1].start == 0 - 80058ac: 42b4 cmp r4, r6 - 80058ae: d918 bls.n 80058e2 - || (n >= 4 && runs[n - 4].len <= runs[n - 3].len + runs[n - 2].len)) - 80058b0: 2b04 cmp r3, #4 - 80058b2: d200 bcs.n 80058b6 - 80058b4: e5c7 b.n 8005446 - 80058b6: 1965 adds r5, r4, r5 - 80058b8: 9e12 ldr r6, [sp, #72] ; 0x48 - 80058ba: 4176 adcs r6, r6 - 80058bc: 42a5 cmp r5, r4 - 80058be: d200 bcs.n 80058c2 - 80058c0: e2e7 b.n 8005e92 - 80058c2: 3a1c subs r2, #28 - 80058c4: 6812 ldr r2, [r2, #0] - if n >= 2 - 80058c6: 42aa cmp r2, r5 - 80058c8: d90b bls.n 80058e2 - 80058ca: e5bc b.n 8005446 - 80058cc: 7fffffff .word 0x7fffffff - { - if n >= 3 && runs[n - 3].len < runs[n - 1].len { Some(n - 3) } else { Some(n - 2) } - 80058d0: 2b03 cmp r3, #3 - 80058d2: d309 bcc.n 80058e8 - 80058d4: 1901 adds r1, r0, r4 - 80058d6: 6849 ldr r1, [r1, #4] - 80058d8: 1eda subs r2, r3, #3 - 80058da: 9210 str r2, [sp, #64] ; 0x40 - 80058dc: 00d2 lsls r2, r2, #3 - 80058de: 1882 adds r2, r0, r2 - 80058e0: 6854 ldr r4, [r2, #4] - 80058e2: 428c cmp r4, r1 - 80058e4: 9c10 ldr r4, [sp, #64] ; 0x40 - 80058e6: d300 bcc.n 80058ea - 80058e8: 1e9c subs r4, r3, #2 - let left = runs[r + 1]; - 80058ea: 1c62 adds r2, r4, #1 - 80058ec: 4293 cmp r3, r2 - 80058ee: d800 bhi.n 80058f2 - 80058f0: e27c b.n 8005dec - 80058f2: 42a3 cmp r3, r4 - 80058f4: d800 bhi.n 80058f8 - 80058f6: e27f b.n 8005df8 - let right = runs[r]; - 80058f8: 00e6 lsls r6, r4, #3 - 80058fa: 5983 ldr r3, [r0, r6] - 80058fc: 1981 adds r1, r0, r6 - 80058fe: 6849 ldr r1, [r1, #4] - 8005900: 910c str r1, [sp, #48] ; 0x30 - &mut v[left.start..right.start + right.len], - 8005902: 185d adds r5, r3, r1 - 8005904: 9912 ldr r1, [sp, #72] ; 0x48 - 8005906: 4149 adcs r1, r1 - 8005908: 429d cmp r5, r3 - 800590a: d200 bcs.n 800590e - 800590c: e27a b.n 8005e04 - 800590e: 931b str r3, [sp, #108] ; 0x6c - 8005910: 00d1 lsls r1, r2, #3 - 8005912: 910e str r1, [sp, #56] ; 0x38 - 8005914: 5841 ldr r1, [r0, r1] - 8005916: 9111 str r1, [sp, #68] ; 0x44 - if self.start > self.end { - 8005918: 42a9 cmp r1, r5 - 800591a: d900 bls.n 800591e - 800591c: e2d9 b.n 8005ed2 - 800591e: 960a str r6, [sp, #40] ; 0x28 - 8005920: 9908 ldr r1, [sp, #32] - } else if self.end > slice.len() { - 8005922: 428d cmp r5, r1 - 8005924: b420 push {r5} - 8005926: bc40 pop {r6} - 8005928: d900 bls.n 800592c - 800592a: e2d8 b.n 8005ede - 800592c: 9d11 ldr r5, [sp, #68] ; 0x44 - ptr::slice_from_raw_parts_mut(slice.as_mut_ptr().add(self.start), self.end - self.start) - 800592e: 1b73 subs r3, r6, r5 - 8005930: 9912 ldr r1, [sp, #72] ; 0x48 - 8005932: 4149 adcs r1, r1 - 8005934: 42ae cmp r6, r5 - 8005936: d200 bcs.n 800593a - 8005938: e252 b.n 8005de0 - 800593a: 9209 str r2, [sp, #36] ; 0x24 - 800593c: 9410 str r4, [sp, #64] ; 0x40 - 800593e: 990e ldr r1, [sp, #56] ; 0x38 - 8005940: 1840 adds r0, r0, r1 - 8005942: 6845 ldr r5, [r0, #4] - if mid <= len - mid { - 8005944: 1b5c subs r4, r3, r5 - 8005946: d200 bcs.n 800594a - 8005948: e262 b.n 8005e10 - 800594a: 0032 movs r2, r6 - 800594c: 931a str r3, [sp, #104] ; 0x68 - 800594e: 980f ldr r0, [sp, #60] ; 0x3c - 8005950: 9911 ldr r1, [sp, #68] ; 0x44 - 8005952: 1841 adds r1, r0, r1 - 8005954: 194e adds r6, r1, r5 - 8005956: 950d str r5, [sp, #52] ; 0x34 - 8005958: 42ac cmp r4, r5 - 800595a: d300 bcc.n 800595e - 800595c: e08a b.n 8005a74 - 800595e: 911a str r1, [sp, #104] ; 0x68 - 8005960: 9816 ldr r0, [sp, #88] ; 0x58 - 8005962: 1b81 subs r1, r0, r6 - 8005964: d200 bcs.n 8005968 - 8005966: 1a31 subs r1, r6, r0 - 8005968: 0015 movs r5, r2 - if !$e { - 800596a: 42a1 cmp r1, r4 - 800596c: d200 bcs.n 8005970 - 800596e: e29c b.n 8005eaa - copy_nonoverlapping(src, dst, count) - 8005970: 0031 movs r1, r6 - 8005972: 0022 movs r2, r4 - 8005974: f003 fc94 bl 80092a0 <__aeabi_memcpy> - 8005978: 9916 ldr r1, [sp, #88] ; 0x58 - 800597a: 1908 adds r0, r1, r4 - while v < *left && buf < *right { - 800597c: 9019 str r0, [sp, #100] ; 0x64 - 800597e: 980d ldr r0, [sp, #52] ; 0x34 - 8005980: 2801 cmp r0, #1 - 8005982: da00 bge.n 8005986 - 8005984: e0f6 b.n 8005b74 - 8005986: 2c01 cmp r4, #1 - 8005988: da00 bge.n 800598c - 800598a: e0f3 b.n 8005b74 - 800598c: 9804 ldr r0, [sp, #16] - 800598e: 9b1b ldr r3, [sp, #108] ; 0x6c - 8005990: 1ac0 subs r0, r0, r3 - 8005992: 9a0c ldr r2, [sp, #48] ; 0x30 - 8005994: 1a80 subs r0, r0, r2 - 8005996: 9018 str r0, [sp, #96] ; 0x60 - 8005998: 9903 ldr r1, [sp, #12] - 800599a: 18c8 adds r0, r1, r3 - 800599c: 1880 adds r0, r0, r2 - 800599e: 9017 str r0, [sp, #92] ; 0x5c - 80059a0: 194d adds r5, r1, r5 - 80059a2: 9805 ldr r0, [sp, #20] - 80059a4: 6800 ldr r0, [r0, #0] - 80059a6: 9014 str r0, [sp, #80] ; 0x50 - 80059a8: 9814 ldr r0, [sp, #80] ; 0x50 - 80059aa: 6800 ldr r0, [r0, #0] - 80059ac: 6804 ldr r4, [r0, #0] - 80059ae: 07a1 lsls r1, r4, #30 - 80059b0: d000 beq.n 80059b4 - 80059b2: e27a b.n 8005eaa - 80059b4: 6881 ldr r1, [r0, #8] - 80059b6: 201f movs r0, #31 - 80059b8: 06c0 lsls r0, r0, #27 - 80059ba: 000a movs r2, r1 - 80059bc: 4382 bics r2, r0 - 80059be: 1a88 subs r0, r1, r2 - 80059c0: 1e42 subs r2, r0, #1 - 80059c2: 4190 sbcs r0, r2 - 80059c4: d000 beq.n 80059c8 - 80059c6: e270 b.n 8005eaa - 80059c8: 0148 lsls r0, r1, #5 - 80059ca: d500 bpl.n 80059ce - 80059cc: e26d b.n 8005eaa - 80059ce: 961b str r6, [sp, #108] ; 0x6c - 80059d0: 9819 ldr r0, [sp, #100] ; 0x64 - 80059d2: 1e46 subs r6, r0, #1 - 80059d4: 7833 ldrb r3, [r6, #0] - &(*slice)[self] - 80059d6: 4299 cmp r1, r3 - 80059d8: d800 bhi.n 80059dc - 80059da: e1c7 b.n 8005d6c - 80059dc: 981b ldr r0, [sp, #108] ; 0x6c - 80059de: 1e40 subs r0, r0, #1 - match *self { - 80059e0: 015a lsls r2, r3, #5 - 80059e2: 18a3 adds r3, r4, r2 - 80059e4: 7f1a ldrb r2, [r3, #28] - match self { - 80059e6: 2a02 cmp r2, #2 - 80059e8: 4afc ldr r2, [pc, #1008] ; (8005ddc ) - 80059ea: d000 beq.n 80059ee - Some(x) => Some(f(x)), - 80059ec: 691a ldr r2, [r3, #16] - merge_sort(self, |a, b| f(a).lt(&f(b))); - 80059ee: 7803 ldrb r3, [r0, #0] - 80059f0: 4299 cmp r1, r3 - 80059f2: d800 bhi.n 80059f6 - 80059f4: e1ba b.n 8005d6c - match *self { - 80059f6: 0159 lsls r1, r3, #5 - 80059f8: 1861 adds r1, r4, r1 - 80059fa: 7f0b ldrb r3, [r1, #28] - match self { - 80059fc: 2b02 cmp r3, #2 - 80059fe: 4bf7 ldr r3, [pc, #988] ; (8005ddc ) - 8005a00: d128 bne.n 8005a54 - let to_copy = if is_less(&*right.offset(-1), &*left.offset(-1)) { - 8005a02: 429a cmp r2, r3 - 8005a04: b401 push {r0} - 8005a06: bc02 pop {r1} - 8005a08: db29 blt.n 8005a5e - 8005a0a: 0031 movs r1, r6 - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 8005a0c: 428d cmp r5, r1 - 8005a0e: d228 bcs.n 8005a62 - 8005a10: 9c18 ldr r4, [sp, #96] ; 0x60 - 8005a12: 1864 adds r4, r4, r1 - 8005a14: 429a cmp r2, r3 - 8005a16: db00 blt.n 8005a1a - 8005a18: 981b ldr r0, [sp, #108] ; 0x6c - 8005a1a: 429a cmp r2, r3 - 8005a1c: db03 blt.n 8005a26 - 8005a1e: 9619 str r6, [sp, #100] ; 0x64 - if !$e { - 8005a20: 2c00 cmp r4, #0 - 8005a22: d103 bne.n 8005a2c - 8005a24: e241 b.n 8005eaa - 8005a26: 2c00 cmp r4, #0 - 8005a28: d100 bne.n 8005a2c - 8005a2a: e23e b.n 8005eaa - copy_nonoverlapping(src, dst, count) - 8005a2c: 7809 ldrb r1, [r1, #0] - 8005a2e: 7029 strb r1, [r5, #0] - while v < *left && buf < *right { - 8005a30: 991a ldr r1, [sp, #104] ; 0x68 - 8005a32: 4281 cmp r1, r0 - 8005a34: d300 bcc.n 8005a38 - 8005a36: e0a1 b.n 8005b7c - 8005a38: 9918 ldr r1, [sp, #96] ; 0x60 - 8005a3a: 1c49 adds r1, r1, #1 - 8005a3c: 9118 str r1, [sp, #96] ; 0x60 - 8005a3e: 9917 ldr r1, [sp, #92] ; 0x5c - 8005a40: 1e49 subs r1, r1, #1 - 8005a42: 9117 str r1, [sp, #92] ; 0x5c - 8005a44: 1e6d subs r5, r5, #1 - 8005a46: 9916 ldr r1, [sp, #88] ; 0x58 - 8005a48: 9a19 ldr r2, [sp, #100] ; 0x64 - 8005a4a: 428a cmp r2, r1 - 8005a4c: b401 push {r0} - 8005a4e: bc40 pop {r6} - 8005a50: d8aa bhi.n 80059a8 - 8005a52: e094 b.n 8005b7e - Some(x) => Some(f(x)), - 8005a54: 690b ldr r3, [r1, #16] - let to_copy = if is_less(&*right.offset(-1), &*left.offset(-1)) { - 8005a56: 429a cmp r2, r3 - 8005a58: b401 push {r0} - 8005a5a: bc02 pop {r1} - 8005a5c: dad5 bge.n 8005a0a - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 8005a5e: 428d cmp r5, r1 - 8005a60: d3d6 bcc.n 8005a10 - 8005a62: 9c15 ldr r4, [sp, #84] ; 0x54 - 8005a64: 434c muls r4, r1 - 8005a66: 9513 str r5, [sp, #76] ; 0x4c - 8005a68: 9d17 ldr r5, [sp, #92] ; 0x5c - 8005a6a: 192c adds r4, r5, r4 - 8005a6c: 9d13 ldr r5, [sp, #76] ; 0x4c - 8005a6e: 429a cmp r2, r3 - 8005a70: dad2 bge.n 8005a18 - 8005a72: e7d2 b.n 8005a1a - 8005a74: 961b str r6, [sp, #108] ; 0x6c - 8005a76: 9816 ldr r0, [sp, #88] ; 0x58 - 8005a78: 1a42 subs r2, r0, r1 - 8005a7a: b402 push {r1} - 8005a7c: bc20 pop {r5} - 8005a7e: d200 bcs.n 8005a82 - 8005a80: 1a2a subs r2, r5, r0 - 8005a82: 9c0d ldr r4, [sp, #52] ; 0x34 - if !$e { - 8005a84: 42a2 cmp r2, r4 - 8005a86: d200 bcs.n 8005a8a - 8005a88: e20f b.n 8005eaa - copy_nonoverlapping(src, dst, count) - 8005a8a: 0029 movs r1, r5 - 8005a8c: 0022 movs r2, r4 - 8005a8e: f003 fc07 bl 80092a0 <__aeabi_memcpy> - 8005a92: 9916 ldr r1, [sp, #88] ; 0x58 - 8005a94: 1908 adds r0, r1, r4 - while *left < hole.end && right < v_end { - 8005a96: 9019 str r0, [sp, #100] ; 0x64 - 8005a98: 2c01 cmp r4, #1 - 8005a9a: db6d blt.n 8005b78 - 8005a9c: 981a ldr r0, [sp, #104] ; 0x68 - 8005a9e: 4284 cmp r4, r0 - 8005aa0: da6a bge.n 8005b78 - 8005aa2: 1828 adds r0, r5, r0 - 8005aa4: 9017 str r0, [sp, #92] ; 0x5c - 8005aa6: 980f ldr r0, [sp, #60] ; 0x3c - 8005aa8: 9a11 ldr r2, [sp, #68] ; 0x44 - 8005aaa: 1884 adds r4, r0, r2 - 8005aac: 9a15 ldr r2, [sp, #84] ; 0x54 - 8005aae: 4362 muls r2, r4 - 8005ab0: 9805 ldr r0, [sp, #20] - 8005ab2: 6800 ldr r0, [r0, #0] - 8005ab4: 9018 str r0, [sp, #96] ; 0x60 - 8005ab6: 951a str r5, [sp, #104] ; 0x68 - 8005ab8: 9818 ldr r0, [sp, #96] ; 0x60 - 8005aba: 6800 ldr r0, [r0, #0] - 8005abc: 6806 ldr r6, [r0, #0] - 8005abe: 07b3 lsls r3, r6, #30 - 8005ac0: d000 beq.n 8005ac4 - 8005ac2: e1f2 b.n 8005eaa - 8005ac4: 6883 ldr r3, [r0, #8] - 8005ac6: 201f movs r0, #31 - 8005ac8: 06c0 lsls r0, r0, #27 - 8005aca: 001d movs r5, r3 - 8005acc: 4385 bics r5, r0 - 8005ace: 1b58 subs r0, r3, r5 - 8005ad0: 1e45 subs r5, r0, #1 - 8005ad2: 41a8 sbcs r0, r5 - 8005ad4: d000 beq.n 8005ad8 - 8005ad6: e1e8 b.n 8005eaa - 8005ad8: 0158 lsls r0, r3, #5 - 8005ada: d500 bpl.n 8005ade - 8005adc: e1e5 b.n 8005eaa - 8005ade: 981b ldr r0, [sp, #108] ; 0x6c - 8005ae0: 7800 ldrb r0, [r0, #0] - 8005ae2: 4283 cmp r3, r0 - 8005ae4: d800 bhi.n 8005ae8 - 8005ae6: e146 b.n 8005d76 - match *self { - 8005ae8: 0140 lsls r0, r0, #5 - 8005aea: 1830 adds r0, r6, r0 - 8005aec: 7f05 ldrb r5, [r0, #28] - match self { - 8005aee: 2d02 cmp r5, #2 - 8005af0: 4dcd ldr r5, [pc, #820] ; (8005e28 ) - 8005af2: d000 beq.n 8005af6 - Some(x) => Some(f(x)), - 8005af4: 6905 ldr r5, [r0, #16] - merge_sort(self, |a, b| f(a).lt(&f(b))); - 8005af6: 7808 ldrb r0, [r1, #0] - 8005af8: 4283 cmp r3, r0 - 8005afa: d800 bhi.n 8005afe - 8005afc: e13b b.n 8005d76 - match *self { - 8005afe: 0140 lsls r0, r0, #5 - 8005b00: 1833 adds r3, r6, r0 - 8005b02: 7f18 ldrb r0, [r3, #28] - match self { - 8005b04: 2802 cmp r0, #2 - 8005b06: 48c8 ldr r0, [pc, #800] ; (8005e28 ) - 8005b08: d112 bne.n 8005b30 - let to_copy = if is_less(&*right, &**left) { - 8005b0a: 4285 cmp r5, r0 - 8005b0c: 9b1b ldr r3, [sp, #108] ; 0x6c - 8005b0e: db13 blt.n 8005b38 - 8005b10: 000b movs r3, r1 - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 8005b12: 9e1a ldr r6, [sp, #104] ; 0x68 - 8005b14: 429e cmp r6, r3 - 8005b16: d212 bcs.n 8005b3e - 8005b18: 18d6 adds r6, r2, r3 - 8005b1a: 4285 cmp r5, r0 - 8005b1c: da04 bge.n 8005b28 - 8005b1e: 9614 str r6, [sp, #80] ; 0x50 - 8005b20: 9e1b ldr r6, [sp, #108] ; 0x6c - 8005b22: 1c76 adds r6, r6, #1 - 8005b24: 961b str r6, [sp, #108] ; 0x6c - 8005b26: 9e14 ldr r6, [sp, #80] ; 0x50 - 8005b28: 4285 cmp r5, r0 - 8005b2a: da0e bge.n 8005b4a - 8005b2c: 9812 ldr r0, [sp, #72] ; 0x48 - 8005b2e: e00d b.n 8005b4c - Some(x) => Some(f(x)), - 8005b30: 6918 ldr r0, [r3, #16] - 8005b32: 4285 cmp r5, r0 - 8005b34: 9b1b ldr r3, [sp, #108] ; 0x6c - 8005b36: daeb bge.n 8005b10 - 8005b38: 9e1a ldr r6, [sp, #104] ; 0x68 - 8005b3a: 429e cmp r6, r3 - 8005b3c: d3ec bcc.n 8005b18 - 8005b3e: 9e15 ldr r6, [sp, #84] ; 0x54 - 8005b40: 435e muls r6, r3 - 8005b42: 19a6 adds r6, r4, r6 - 8005b44: 4285 cmp r5, r0 - 8005b46: dbea blt.n 8005b1e - 8005b48: e7ee b.n 8005b28 - 8005b4a: 2001 movs r0, #1 - 8005b4c: 9d1a ldr r5, [sp, #104] ; 0x68 - if !$e { - 8005b4e: 2e00 cmp r6, #0 - 8005b50: d100 bne.n 8005b54 - 8005b52: e1aa b.n 8005eaa - 8005b54: 1809 adds r1, r1, r0 - 8005b56: 1c68 adds r0, r5, #1 - copy_nonoverlapping(src, dst, count) - 8005b58: 781b ldrb r3, [r3, #0] - 8005b5a: 702b strb r3, [r5, #0] - while *left < hole.end && right < v_end { - 8005b5c: 9b19 ldr r3, [sp, #100] ; 0x64 - 8005b5e: 4299 cmp r1, r3 - 8005b60: d20d bcs.n 8005b7e - 8005b62: 1e52 subs r2, r2, #1 - 8005b64: 1c64 adds r4, r4, #1 - 8005b66: 9b1b ldr r3, [sp, #108] ; 0x6c - 8005b68: 9d17 ldr r5, [sp, #92] ; 0x5c - 8005b6a: 42ab cmp r3, r5 - 8005b6c: b401 push {r0} - 8005b6e: bc20 pop {r5} - 8005b70: d3a1 bcc.n 8005ab6 - 8005b72: e004 b.n 8005b7e - 8005b74: 0030 movs r0, r6 - 8005b76: e002 b.n 8005b7e - 8005b78: 0028 movs r0, r5 - 8005b7a: e001 b.n 8005b80 - 8005b7c: 9916 ldr r1, [sp, #88] ; 0x58 - 8005b7e: 9c0d ldr r4, [sp, #52] ; 0x34 - if !$e { - 8005b80: 9a19 ldr r2, [sp, #100] ; 0x64 - 8005b82: 428a cmp r2, r1 - 8005b84: d200 bcs.n 8005b88 - 8005b86: e190 b.n 8005eaa - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 8005b88: 1a43 subs r3, r0, r1 - 8005b8a: d200 bcs.n 8005b8e - 8005b8c: 1a0b subs r3, r1, r0 - unsafe { assert_unsafe_precondition!(self >= origin) }; - - let pointee_size = mem::size_of::(); - assert!(0 < pointee_size && pointee_size <= isize::MAX as usize); - // SAFETY: the caller must uphold the safety contract for `ptr_offset_from_unsigned`. - unsafe { intrinsics::ptr_offset_from_unsigned(self, origin) } - 8005b8e: 9a19 ldr r2, [sp, #100] ; 0x64 - 8005b90: 1a52 subs r2, r2, r1 - if !$e { - 8005b92: 4293 cmp r3, r2 - 8005b94: d200 bcs.n 8005b98 - 8005b96: e188 b.n 8005eaa - copy_nonoverlapping(src, dst, count) - 8005b98: f003 fb82 bl 80092a0 <__aeabi_memcpy> - 8005b9c: 2600 movs r6, #0 - runs[r] = Run { start: left.start, len: left.len + right.len }; - 8005b9e: 980c ldr r0, [sp, #48] ; 0x30 - 8005ba0: 1822 adds r2, r4, r0 - 8005ba2: b440 push {r6} - 8005ba4: bc02 pop {r1} - 8005ba6: 4171 adcs r1, r6 - 8005ba8: 42a2 cmp r2, r4 - 8005baa: d200 bcs.n 8005bae - 8005bac: e136 b.n 8005e1c - let ptr = self.buf.ptr(); - 8005bae: 9b1c ldr r3, [sp, #112] ; 0x70 - is_aligned_and_not_null(data) - 8005bb0: 0799 lsls r1, r3, #30 - 8005bb2: d000 beq.n 8005bb6 - 8005bb4: e179 b.n 8005eaa - 8005bb6: 991e ldr r1, [sp, #120] ; 0x78 - 8005bb8: 000c movs r4, r1 - 8005bba: 9d0b ldr r5, [sp, #44] ; 0x2c - 8005bbc: 43ac bics r4, r5 - 8005bbe: 1b0c subs r4, r1, r4 - 8005bc0: 1e65 subs r5, r4, #1 - 8005bc2: 41ac sbcs r4, r5 - 8005bc4: d000 beq.n 8005bc8 - 8005bc6: e170 b.n 8005eaa - 8005bc8: 00cc lsls r4, r1, #3 - 8005bca: d500 bpl.n 8005bce - 8005bcc: e16d b.n 8005eaa - 8005bce: 9810 ldr r0, [sp, #64] ; 0x40 - &mut (*slice)[self] - 8005bd0: 4281 cmp r1, r0 - 8005bd2: d800 bhi.n 8005bd6 - 8005bd4: e12a b.n 8005e2c - 8005bd6: 980a ldr r0, [sp, #40] ; 0x28 - 8005bd8: 9911 ldr r1, [sp, #68] ; 0x44 - 8005bda: 5019 str r1, [r3, r0] - 8005bdc: 1819 adds r1, r3, r0 - 8005bde: 604a str r2, [r1, #4] - let len = self.len(); - 8005be0: 9c1e ldr r4, [sp, #120] ; 0x78 - 8005be2: 9809 ldr r0, [sp, #36] ; 0x24 - if index >= len { - 8005be4: 4284 cmp r4, r0 - 8005be6: d800 bhi.n 8005bea - 8005be8: e17e b.n 8005ee8 - ptr::copy(ptr.offset(1), ptr, len - index - 1); - 8005bea: 1a21 subs r1, r4, r0 - 8005bec: 1e4a subs r2, r1, #1 - 8005bee: 4176 adcs r6, r6 - 8005bf0: 2901 cmp r1, #1 - 8005bf2: 990e ldr r1, [sp, #56] ; 0x38 - 8005bf4: d200 bcs.n 8005bf8 - 8005bf6: e11d b.n 8005e34 - 8005bf8: 981c ldr r0, [sp, #112] ; 0x70 - 8005bfa: 1840 adds r0, r0, r1 - 8005bfc: 2303 movs r3, #3 - 8005bfe: 4003 ands r3, r0 - 8005c00: 1e59 subs r1, r3, #1 - 8005c02: 418b sbcs r3, r1 - 8005c04: 0001 movs r1, r0 - 8005c06: 3108 adds r1, #8 - assert_unsafe_precondition!(is_aligned_and_not_null(src) && is_aligned_and_not_null(dst)); - 8005c08: 078d lsls r5, r1, #30 - 8005c0a: 9d07 ldr r5, [sp, #28] - 8005c0c: d100 bne.n 8005c10 - 8005c0e: 001d movs r5, r3 - 8005c10: 2d01 cmp r5, #1 - 8005c12: d100 bne.n 8005c16 - 8005c14: e149 b.n 8005eaa - copy(src, dst, count) - 8005c16: 00d2 lsls r2, r2, #3 - 8005c18: f003 fb50 bl 80092bc <__aeabi_memmove4> - self.set_len(len - 1); - 8005c1c: 1e63 subs r3, r4, #1 - self.buf.capacity() - 8005c1e: 981d ldr r0, [sp, #116] ; 0x74 - debug_assert!(new_len <= self.capacity()); - 8005c20: 4298 cmp r0, r3 - 8005c22: d300 bcc.n 8005c26 - 8005c24: e612 b.n 800584c - 8005c26: 48df ldr r0, [pc, #892] ; (8005fa4 ) - 8005c28: 212c movs r1, #44 ; 0x2c - 8005c2a: 4adf ldr r2, [pc, #892] ; (8005fa8 ) - 8005c2c: f003 fa58 bl 80090e0 - 8005c30: defe udf #254 ; 0xfe - 8005c32: 2001 movs r0, #1 - 8005c34: 1e54 subs r4, r2, #1 - 8005c36: 4261 negs r1, r4 - 8005c38: 4161 adcs r1, r4 - if len >= 2 { - 8005c3a: 4301 orrs r1, r0 - 8005c3c: d003 beq.n 8005c46 - #[derive(Clone, Copy)] - struct Run { - start: usize, - len: usize, - } -} - 8005c3e: b021 add sp, #132 ; 0x84 - 8005c40: bcf0 pop {r4, r5, r6, r7} - 8005c42: bc01 pop {r0} - 8005c44: 4700 bx r0 - unsafe { &*self.get_unchecked(slice) } - } - - #[inline] - fn index_mut(self, slice: &mut [T]) -> &mut [T] { - if self.start > slice.len() { - 8005c46: 980f ldr r0, [sp, #60] ; 0x3c - 8005c48: 1906 adds r6, r0, r4 - 8005c4a: 9805 ldr r0, [sp, #20] - 8005c4c: 6800 ldr r0, [r0, #0] - 8005c4e: 901a str r0, [sp, #104] ; 0x68 - 8005c50: 2000 movs r0, #0 - 8005c52: 9015 str r0, [sp, #84] ; 0x54 - 8005c54: 9617 str r6, [sp, #92] ; 0x5c - 8005c56: e00b b.n 8005c70 - 8005c58: 1a11 subs r1, r2, r0 - if !$e { - 8005c5a: 2900 cmp r1, #0 - 8005c5c: d100 bne.n 8005c60 - 8005c5e: e124 b.n 8005eaa - copy_nonoverlapping(src, dst, count) - 8005c60: 991b ldr r1, [sp, #108] ; 0x6c - 8005c62: 7001 strb r1, [r0, #0] - if taken < n { Err(taken) } else { Ok(()) } - } - - #[inline] - fn spec_next_back(&mut self) -> Option { - if self.start < self.end { - 8005c64: 9815 ldr r0, [sp, #84] ; 0x54 - 8005c66: 1e40 subs r0, r0, #1 - 8005c68: 9015 str r0, [sp, #84] ; 0x54 - 8005c6a: 9c16 ldr r4, [sp, #88] ; 0x58 - 8005c6c: 2c00 cmp r4, #0 - 8005c6e: d0e6 beq.n 8005c3e - 8005c70: 981a ldr r0, [sp, #104] ; 0x68 - 8005c72: 6800 ldr r0, [r0, #0] - let ptr = self.buf.ptr(); - 8005c74: 6802 ldr r2, [r0, #0] - is_aligned_and_not_null(data) - 8005c76: 0791 lsls r1, r2, #30 - 8005c78: d000 beq.n 8005c7c - 8005c7a: e116 b.n 8005eaa - 8005c7c: 6881 ldr r1, [r0, #8] - 8005c7e: 201f movs r0, #31 - 8005c80: 06c3 lsls r3, r0, #27 - 8005c82: 0008 movs r0, r1 - 8005c84: 9319 str r3, [sp, #100] ; 0x64 - 8005c86: 4398 bics r0, r3 - 8005c88: 1a08 subs r0, r1, r0 - 8005c8a: 1e43 subs r3, r0, #1 - 8005c8c: 4198 sbcs r0, r3 - 8005c8e: d000 beq.n 8005c92 - 8005c90: e10b b.n 8005eaa - 8005c92: 0148 lsls r0, r1, #5 - 8005c94: d500 bpl.n 8005c98 - 8005c96: e108 b.n 8005eaa - 8005c98: 980f ldr r0, [sp, #60] ; 0x3c - 8005c9a: 5d03 ldrb r3, [r0, r4] - &(*slice)[self] - 8005c9c: 4299 cmp r1, r3 - 8005c9e: d965 bls.n 8005d6c - 8005ca0: 9414 str r4, [sp, #80] ; 0x50 - 8005ca2: 1e60 subs r0, r4, #1 - match *self { - 8005ca4: 9016 str r0, [sp, #88] ; 0x58 - 8005ca6: 0158 lsls r0, r3, #5 - 8005ca8: 1810 adds r0, r2, r0 - 8005caa: 7f05 ldrb r5, [r0, #28] - match self { - 8005cac: 2d02 cmp r5, #2 - 8005cae: 4da7 ldr r5, [pc, #668] ; (8005f4c ) - 8005cb0: d000 beq.n 8005cb4 - Some(x) => Some(f(x)), - 8005cb2: 6905 ldr r5, [r0, #16] - merge_sort(self, |a, b| f(a).lt(&f(b))); - 8005cb4: 980f ldr r0, [sp, #60] ; 0x3c - 8005cb6: 9c16 ldr r4, [sp, #88] ; 0x58 - 8005cb8: 5d00 ldrb r0, [r0, r4] - 8005cba: 4281 cmp r1, r0 - 8005cbc: d800 bhi.n 8005cc0 - 8005cbe: e0d2 b.n 8005e66 - 8005cc0: 901b str r0, [sp, #108] ; 0x6c - match *self { - 8005cc2: 0140 lsls r0, r0, #5 - 8005cc4: 9018 str r0, [sp, #96] ; 0x60 - 8005cc6: 1811 adds r1, r2, r0 - 8005cc8: 7f08 ldrb r0, [r1, #28] - match self { - 8005cca: 2802 cmp r0, #2 - 8005ccc: 489f ldr r0, [pc, #636] ; (8005f4c ) - 8005cce: d000 beq.n 8005cd2 - Some(x) => Some(f(x)), - 8005cd0: 6908 ldr r0, [r1, #16] - if v.len() >= 2 && is_less(&v[1], &v[0]) { - 8005cd2: 4285 cmp r5, r0 - 8005cd4: dac6 bge.n 8005c64 - 8005cd6: 9808 ldr r0, [sp, #32] - 8005cd8: 9a16 ldr r2, [sp, #88] ; 0x58 - 8005cda: 1a80 subs r0, r0, r2 - 8005cdc: 990f ldr r1, [sp, #60] ; 0x3c - 8005cde: 548b strb r3, [r1, r2] - 8005ce0: a920 add r1, sp, #128 ; 0x80 - let tmp = mem::ManuallyDrop::new(ptr::read(&v[0])); - 8005ce2: 9a1b ldr r2, [sp, #108] ; 0x6c - 8005ce4: 700a strb r2, [r1, #0] - if self.start < self.end { - 8005ce6: 2803 cmp r0, #3 - 8005ce8: 9a15 ldr r2, [sp, #84] ; 0x54 - 8005cea: d331 bcc.n 8005d50 - 8005cec: 981a ldr r0, [sp, #104] ; 0x68 - 8005cee: 6800 ldr r0, [r0, #0] - 8005cf0: 6805 ldr r5, [r0, #0] - 8005cf2: 07a9 lsls r1, r5, #30 - 8005cf4: d000 beq.n 8005cf8 - 8005cf6: e0d8 b.n 8005eaa - 8005cf8: 6881 ldr r1, [r0, #8] - 8005cfa: 0008 movs r0, r1 - 8005cfc: 9b19 ldr r3, [sp, #100] ; 0x64 - 8005cfe: 4398 bics r0, r3 - 8005d00: 1a08 subs r0, r1, r0 - 8005d02: 1e43 subs r3, r0, #1 - 8005d04: 4198 sbcs r0, r3 - 8005d06: d000 beq.n 8005d0a - 8005d08: e0cf b.n 8005eaa - 8005d0a: 0148 lsls r0, r1, #5 - 8005d0c: d500 bpl.n 8005d10 - 8005d0e: e0cc b.n 8005eaa - 8005d10: 18b0 adds r0, r6, r2 - 8005d12: 7843 ldrb r3, [r0, #1] - 8005d14: 4299 cmp r1, r3 - 8005d16: d929 bls.n 8005d6c - match *self { - 8005d18: 015c lsls r4, r3, #5 - 8005d1a: 192c adds r4, r5, r4 - 8005d1c: 7f26 ldrb r6, [r4, #28] - match self { - 8005d1e: 2e02 cmp r6, #2 - 8005d20: 4e8a ldr r6, [pc, #552] ; (8005f4c ) - 8005d22: d000 beq.n 8005d26 - Some(x) => Some(f(x)), - 8005d24: 6926 ldr r6, [r4, #16] - 8005d26: 9c1b ldr r4, [sp, #108] ; 0x6c - 8005d28: 42a1 cmp r1, r4 - 8005d2a: d952 bls.n 8005dd2 - match *self { - 8005d2c: 9918 ldr r1, [sp, #96] ; 0x60 - 8005d2e: 1869 adds r1, r5, r1 - 8005d30: 7f0c ldrb r4, [r1, #28] - match self { - 8005d32: 2c02 cmp r4, #2 - 8005d34: 4c85 ldr r4, [pc, #532] ; (8005f4c ) - 8005d36: d000 beq.n 8005d3a - Some(x) => Some(f(x)), - 8005d38: 690c ldr r4, [r1, #16] - if !is_less(&v[i], &*tmp) { - 8005d3a: 42a6 cmp r6, r4 - 8005d3c: da10 bge.n 8005d60 - 8005d3e: 9e17 ldr r6, [sp, #92] ; 0x5c - 8005d40: 54b3 strb r3, [r6, r2] - 8005d42: 1c52 adds r2, r2, #1 - 8005d44: d3d2 bcc.n 8005cec - unsafe { mem::transmute(self) } - 8005d46: 18b0 adds r0, r6, r2 - 8005d48: aa20 add r2, sp, #128 ; 0x80 - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 8005d4a: 1a81 subs r1, r0, r2 - 8005d4c: d285 bcs.n 8005c5a - 8005d4e: e783 b.n 8005c58 - 8005d50: 980f ldr r0, [sp, #60] ; 0x3c - 8005d52: 9914 ldr r1, [sp, #80] ; 0x50 - 8005d54: 1840 adds r0, r0, r1 - 8005d56: aa20 add r2, sp, #128 ; 0x80 - 8005d58: 1a81 subs r1, r0, r2 - 8005d5a: d200 bcs.n 8005d5e - 8005d5c: e77c b.n 8005c58 - 8005d5e: e77c b.n 8005c5a - 8005d60: 9e17 ldr r6, [sp, #92] ; 0x5c - 8005d62: aa20 add r2, sp, #128 ; 0x80 - 8005d64: 1a81 subs r1, r0, r2 - 8005d66: d300 bcc.n 8005d6a - 8005d68: e777 b.n 8005c5a - 8005d6a: e775 b.n 8005c58 - 8005d6c: 4a7c ldr r2, [pc, #496] ; (8005f60 ) - 8005d6e: 0018 movs r0, r3 - 8005d70: f003 f9cc bl 800910c - 8005d74: defe udf #254 ; 0xfe - 8005d76: 4a7a ldr r2, [pc, #488] ; (8005f60 ) - 8005d78: 0019 movs r1, r3 - 8005d7a: f003 f9c7 bl 800910c - 8005d7e: defe udf #254 ; 0xfe - debug_assert!(runs.len() == 1 && runs[0].start == 0 && runs[0].len == len); - 8005d80: 2b01 cmp r3, #1 - 8005d82: 9a08 ldr r2, [sp, #32] - 8005d84: d000 beq.n 8005d88 - 8005d86: e0d4 b.n 8005f32 - 8005d88: 0781 lsls r1, r0, #30 - 8005d8a: d000 beq.n 8005d8e - 8005d8c: e08d b.n 8005eaa - 8005d8e: 6801 ldr r1, [r0, #0] - 8005d90: 2900 cmp r1, #0 - 8005d92: d000 beq.n 8005d96 - 8005d94: e0cd b.n 8005f32 - 8005d96: 6841 ldr r1, [r0, #4] - 8005d98: 4291 cmp r1, r2 - 8005d9a: d000 beq.n 8005d9e - 8005d9c: e0c9 b.n 8005f32 - if mem::size_of::() == 0 || self.cap == 0 { - 8005d9e: 991d ldr r1, [sp, #116] ; 0x74 - 8005da0: 2900 cmp r1, #0 - 8005da2: d00d beq.n 8005dc0 - 8005da4: 2207 movs r2, #7 - 8005da6: 0752 lsls r2, r2, #29 - 8005da8: 000b movs r3, r1 - 8005daa: 4393 bics r3, r2 - 8005dac: 1aca subs r2, r1, r3 - 8005dae: 1e53 subs r3, r2, #1 - 8005db0: 419a sbcs r2, r3 - let array_size = mem::size_of::().checked_mul(n).ok_or(LayoutError)?; - 8005db2: 2a01 cmp r2, #1 - 8005db4: d100 bne.n 8005db8 - 8005db6: e0c2 b.n 8005f3e - 8005db8: 00c9 lsls r1, r1, #3 - 8005dba: 2204 movs r2, #4 - unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } - 8005dbc: f7fa fccf bl 800075e <__rust_dealloc> - 8005dc0: 2201 movs r2, #1 - 8005dc2: 9816 ldr r0, [sp, #88] ; 0x58 - 8005dc4: 9901 ldr r1, [sp, #4] - 8005dc6: f7fa fcca bl 800075e <__rust_dealloc> -} - 8005dca: b021 add sp, #132 ; 0x84 - 8005dcc: bcf0 pop {r4, r5, r6, r7} - 8005dce: bc01 pop {r0} - 8005dd0: 4700 bx r0 - 8005dd2: 4a63 ldr r2, [pc, #396] ; (8005f60 ) - 8005dd4: 981b ldr r0, [sp, #108] ; 0x6c - 8005dd6: f003 f999 bl 800910c - 8005dda: defe udf #254 ; 0xfe - 8005ddc: 7fffffff .word 0x7fffffff - 8005de0: 4860 ldr r0, [pc, #384] ; (8005f64 ) - 8005de2: 2121 movs r1, #33 ; 0x21 - 8005de4: 4a74 ldr r2, [pc, #464] ; (8005fb8 ) - 8005de6: f003 f97b bl 80090e0 - 8005dea: defe udf #254 ; 0xfe - 8005dec: 0010 movs r0, r2 - 8005dee: 4a69 ldr r2, [pc, #420] ; (8005f94 ) - 8005df0: 0019 movs r1, r3 - 8005df2: f003 f98b bl 800910c - 8005df6: defe udf #254 ; 0xfe - 8005df8: 4a67 ldr r2, [pc, #412] ; (8005f98 ) - 8005dfa: 0020 movs r0, r4 - 8005dfc: 0019 movs r1, r3 - 8005dfe: f003 f985 bl 800910c - 8005e02: defe udf #254 ; 0xfe - &mut v[left.start..right.start + right.len], - 8005e04: 4860 ldr r0, [pc, #384] ; (8005f88 ) - 8005e06: 211c movs r1, #28 - 8005e08: 4a6d ldr r2, [pc, #436] ; (8005fc0 ) - 8005e0a: f003 f969 bl 80090e0 - 8005e0e: defe udf #254 ; 0xfe - if mid <= len - mid { - 8005e10: 4854 ldr r0, [pc, #336] ; (8005f64 ) - 8005e12: 2121 movs r1, #33 ; 0x21 - 8005e14: 4a67 ldr r2, [pc, #412] ; (8005fb4 ) - 8005e16: f003 f963 bl 80090e0 - 8005e1a: defe udf #254 ; 0xfe - runs[r] = Run { start: left.start, len: left.len + right.len }; - 8005e1c: 485a ldr r0, [pc, #360] ; (8005f88 ) - 8005e1e: 211c movs r1, #28 - 8005e20: 4a63 ldr r2, [pc, #396] ; (8005fb0 ) - 8005e22: f003 f95d bl 80090e0 - 8005e26: defe udf #254 ; 0xfe - 8005e28: 7fffffff .word 0x7fffffff - &mut (*slice)[self] - 8005e2c: 4a5b ldr r2, [pc, #364] ; (8005f9c ) - 8005e2e: f003 f96d bl 800910c - 8005e32: defe udf #254 ; 0xfe - ptr::copy(ptr.offset(1), ptr, len - index - 1); - 8005e34: 485d ldr r0, [pc, #372] ; (8005fac ) - 8005e36: 2121 movs r1, #33 ; 0x21 - 8005e38: 4a59 ldr r2, [pc, #356] ; (8005fa0 ) - 8005e3a: f003 f951 bl 80090e0 - 8005e3e: defe udf #254 ; 0xfe - 8005e40: 4a47 ldr r2, [pc, #284] ; (8005f60 ) - 8005e42: e00c b.n 8005e5e - 8005e44: 4a46 ldr r2, [pc, #280] ; (8005f60 ) - 8005e46: e009 b.n 8005e5c - 8005e48: 4846 ldr r0, [pc, #280] ; (8005f64 ) - 8005e4a: 2121 movs r1, #33 ; 0x21 - 8005e4c: 4a4a ldr r2, [pc, #296] ; (8005f78 ) - 8005e4e: f003 f947 bl 80090e0 - 8005e52: defe udf #254 ; 0xfe - 8005e54: 4a49 ldr r2, [pc, #292] ; (8005f7c ) - 8005e56: 0020 movs r0, r4 - 8005e58: e001 b.n 8005e5e - 8005e5a: 4a46 ldr r2, [pc, #280] ; (8005f74 ) - 8005e5c: 0018 movs r0, r3 - 8005e5e: 0021 movs r1, r4 - 8005e60: f003 f954 bl 800910c - 8005e64: defe udf #254 ; 0xfe - &(*slice)[self] - 8005e66: 4a3e ldr r2, [pc, #248] ; (8005f60 ) - 8005e68: f003 f950 bl 800910c - 8005e6c: defe udf #254 ; 0xfe - || (n >= 3 && runs[n - 3].len <= runs[n - 2].len + runs[n - 1].len) - 8005e6e: 4846 ldr r0, [pc, #280] ; (8005f88 ) - 8005e70: 211c movs r1, #28 - 8005e72: 4a47 ldr r2, [pc, #284] ; (8005f90 ) - 8005e74: f003 f934 bl 80090e0 - 8005e78: defe udf #254 ; 0xfe - start -= 1; - 8005e7a: 483a ldr r0, [pc, #232] ; (8005f64 ) - 8005e7c: 2121 movs r1, #33 ; 0x21 - 8005e7e: 4a3c ldr r2, [pc, #240] ; (8005f70 ) - 8005e80: f003 f92e bl 80090e0 - 8005e84: defe udf #254 ; 0xfe - start -= 1; - 8005e86: 4837 ldr r0, [pc, #220] ; (8005f64 ) - 8005e88: 2121 movs r1, #33 ; 0x21 - 8005e8a: 4a37 ldr r2, [pc, #220] ; (8005f68 ) - 8005e8c: f003 f928 bl 80090e0 - 8005e90: defe udf #254 ; 0xfe - || (n >= 4 && runs[n - 4].len <= runs[n - 3].len + runs[n - 2].len)) - 8005e92: 483d ldr r0, [pc, #244] ; (8005f88 ) - 8005e94: 211c movs r1, #28 - 8005e96: 4a3d ldr r2, [pc, #244] ; (8005f8c ) - 8005e98: f003 f922 bl 80090e0 - 8005e9c: defe udf #254 ; 0xfe - while start > 0 && end - start < MIN_RUN { - 8005e9e: 4831 ldr r0, [pc, #196] ; (8005f64 ) - 8005ea0: 2121 movs r1, #33 ; 0x21 - 8005ea2: 4a38 ldr r2, [pc, #224] ; (8005f84 ) - 8005ea4: f003 f91c bl 80090e0 - 8005ea8: defe udf #254 ; 0xfe - 8005eaa: defe udf #254 ; 0xfe - 8005eac: defe udf #254 ; 0xfe - runs.push(Run { start, len: end - start }); - 8005eae: 482d ldr r0, [pc, #180] ; (8005f64 ) - 8005eb0: 2121 movs r1, #33 ; 0x21 - 8005eb2: 4a45 ldr r2, [pc, #276] ; (8005fc8 ) - 8005eb4: f003 f914 bl 80090e0 - 8005eb8: defe udf #254 ; 0xfe - self.len += 1; - 8005eba: 4833 ldr r0, [pc, #204] ; (8005f88 ) - 8005ebc: 211c movs r1, #28 - 8005ebe: 4a41 ldr r2, [pc, #260] ; (8005fc4 ) - 8005ec0: f003 f90e bl 80090e0 - 8005ec4: defe udf #254 ; 0xfe - 8005ec6: 4a26 ldr r2, [pc, #152] ; (8005f60 ) - 8005ec8: 0020 movs r0, r4 - 8005eca: 0019 movs r1, r3 - 8005ecc: f003 f91e bl 800910c - 8005ed0: defe udf #254 ; 0xfe - slice_index_order_fail(self.start, self.end); - 8005ed2: 4a3a ldr r2, [pc, #232] ; (8005fbc ) - 8005ed4: 9811 ldr r0, [sp, #68] ; 0x44 - 8005ed6: 0029 movs r1, r5 - 8005ed8: f002 fd96 bl 8008a08 - 8005edc: defe udf #254 ; 0xfe - slice_end_index_len_fail(self.end, slice.len()); - 8005ede: 4a37 ldr r2, [pc, #220] ; (8005fbc ) - 8005ee0: 0030 movs r0, r6 - 8005ee2: f002 fd69 bl 80089b8 - 8005ee6: defe udf #254 ; 0xfe - assert_failed(index, len); - 8005ee8: 4a2d ldr r2, [pc, #180] ; (8005fa0 ) - 8005eea: 0021 movs r1, r4 - 8005eec: f000 fdee bl 8006acc ::remove::assert_failed> - 8005ef0: defe udf #254 ; 0xfe - 8005ef2: 2101 movs r1, #1 - Err(_) => handle_alloc_error(layout), - 8005ef4: 9801 ldr r0, [sp, #4] - 8005ef6: f000 fdd3 bl 8006aa0 - 8005efa: defe udf #254 ; 0xfe - 8005efc: 4a1b ldr r2, [pc, #108] ; (8005f6c ) - 8005efe: f002 fd5b bl 80089b8 - 8005f02: defe udf #254 ; 0xfe - start -= 1; - 8005f04: 1e76 subs r6, r6, #1 - if self.start > self.end { - 8005f06: 9817 ldr r0, [sp, #92] ; 0x5c - 8005f08: 9619 str r6, [sp, #100] ; 0x64 - 8005f0a: 4286 cmp r6, r0 - 8005f0c: d90b bls.n 8005f26 - slice_index_order_fail(self.start, self.end); - 8005f0e: 4a1c ldr r2, [pc, #112] ; (8005f80 ) - 8005f10: 9819 ldr r0, [sp, #100] ; 0x64 - 8005f12: 9917 ldr r1, [sp, #92] ; 0x5c - 8005f14: f002 fd78 bl 8008a08 - 8005f18: defe udf #254 ; 0xfe - 8005f1a: 1c50 adds r0, r2, #1 - 8005f1c: 4a13 ldr r2, [pc, #76] ; (8005f6c ) - 8005f1e: 9917 ldr r1, [sp, #92] ; 0x5c - 8005f20: f002 fd72 bl 8008a08 - 8005f24: defe udf #254 ; 0xfe - slice_end_index_len_fail(self.end, slice.len()); - 8005f26: 4a16 ldr r2, [pc, #88] ; (8005f80 ) - 8005f28: 9817 ldr r0, [sp, #92] ; 0x5c - 8005f2a: 9908 ldr r1, [sp, #32] - 8005f2c: f002 fd44 bl 80089b8 - 8005f30: defe udf #254 ; 0xfe - debug_assert!(runs.len() == 1 && runs[0].start == 0 && runs[0].len == len); - 8005f32: 4807 ldr r0, [pc, #28] ; (8005f50 ) - 8005f34: 214d movs r1, #77 ; 0x4d - 8005f36: 4a07 ldr r2, [pc, #28] ; (8005f54 ) - 8005f38: f003 f8d2 bl 80090e0 - 8005f3c: defe udf #254 ; 0xfe - debug_assert!(self.is_ok()); - 8005f3e: 4806 ldr r0, [pc, #24] ; (8005f58 ) - 8005f40: 211e movs r1, #30 - 8005f42: 4a06 ldr r2, [pc, #24] ; (8005f5c ) - 8005f44: f003 f8cc bl 80090e0 - 8005f48: defe udf #254 ; 0xfe - 8005f4a: 46c0 nop ; (mov r8, r8) - 8005f4c: 7fffffff .word 0x7fffffff - 8005f50: 0800bfb4 .word 0x0800bfb4 - 8005f54: 0800c004 .word 0x0800c004 - 8005f58: 0800affc .word 0x0800affc - 8005f5c: 0800b170 .word 0x0800b170 - 8005f60: 0800c05c .word 0x0800c05c - 8005f64: 0800bd00 .word 0x0800bd00 - 8005f68: 0800bf04 .word 0x0800bf04 - 8005f6c: 0800bef4 .word 0x0800bef4 - 8005f70: 0800bee4 .word 0x0800bee4 - 8005f74: 0800bde0 .word 0x0800bde0 - 8005f78: 0800bdd0 .word 0x0800bdd0 - 8005f7c: 0800bdc0 .word 0x0800bdc0 - 8005f80: 0800bf24 .word 0x0800bf24 - 8005f84: 0800bf14 .word 0x0800bf14 - 8005f88: 0800bd30 .word 0x0800bd30 - 8005f8c: 0800c024 .word 0x0800c024 - 8005f90: 0800c014 .word 0x0800c014 - 8005f94: 0800bf44 .word 0x0800bf44 - 8005f98: 0800bf54 .word 0x0800bf54 - 8005f9c: 0800bf94 .word 0x0800bf94 - 8005fa0: 0800bfa4 .word 0x0800bfa4 - 8005fa4: 0800b33e .word 0x0800b33e - 8005fa8: 0800b36c .word 0x0800b36c - 8005fac: 0800b1f0 .word 0x0800b1f0 - 8005fb0: 0800bf84 .word 0x0800bf84 - 8005fb4: 0800c034 .word 0x0800c034 - 8005fb8: 0800bce4 .word 0x0800bce4 - 8005fbc: 0800bf74 .word 0x0800bf74 - 8005fc0: 0800bf64 .word 0x0800bf64 - 8005fc4: 0800be64 .word 0x0800be64 - 8005fc8: 0800bf34 .word 0x0800bf34 - -08005fcc ::first_zero>: - } - - pub fn first_zero(&self) -> Option { - 8005fcc: 6802 ldr r2, [r0, #0] - for index in 0..N * 32 { - if let Some(bit) = self.get(index) { - 8005fce: 07d0 lsls r0, r2, #31 - 8005fd0: d102 bne.n 8005fd8 ::first_zero+0xc> - 8005fd2: 2001 movs r0, #1 - 8005fd4: 2100 movs r1, #0 - } - } - } - - None - } - 8005fd6: 4770 bx lr - 8005fd8: 2001 movs r0, #1 - if let Some(bit) = self.get(index) { - 8005fda: 0791 lsls r1, r2, #30 - 8005fdc: d401 bmi.n 8005fe2 ::first_zero+0x16> - 8005fde: 0001 movs r1, r0 - } - 8005fe0: 4770 bx lr - if let Some(bit) = self.get(index) { - 8005fe2: 0751 lsls r1, r2, #29 - 8005fe4: d401 bmi.n 8005fea ::first_zero+0x1e> - 8005fe6: 2102 movs r1, #2 - } - 8005fe8: 4770 bx lr - if let Some(bit) = self.get(index) { - 8005fea: 0711 lsls r1, r2, #28 - 8005fec: d401 bmi.n 8005ff2 ::first_zero+0x26> - 8005fee: 2103 movs r1, #3 - } - 8005ff0: 4770 bx lr - if let Some(bit) = self.get(index) { - 8005ff2: 06d1 lsls r1, r2, #27 - 8005ff4: d401 bmi.n 8005ffa ::first_zero+0x2e> - 8005ff6: 2104 movs r1, #4 - } - 8005ff8: 4770 bx lr - if let Some(bit) = self.get(index) { - 8005ffa: 0691 lsls r1, r2, #26 - 8005ffc: d401 bmi.n 8006002 ::first_zero+0x36> - 8005ffe: 2105 movs r1, #5 - } - 8006000: 4770 bx lr - if let Some(bit) = self.get(index) { - 8006002: 0651 lsls r1, r2, #25 - 8006004: d401 bmi.n 800600a ::first_zero+0x3e> - 8006006: 2106 movs r1, #6 - } - 8006008: 4770 bx lr - if let Some(bit) = self.get(index) { - 800600a: 0611 lsls r1, r2, #24 - 800600c: d401 bmi.n 8006012 ::first_zero+0x46> - 800600e: 2107 movs r1, #7 - } - 8006010: 4770 bx lr - if let Some(bit) = self.get(index) { - 8006012: 05d1 lsls r1, r2, #23 - 8006014: d401 bmi.n 800601a ::first_zero+0x4e> - 8006016: 2108 movs r1, #8 - } - 8006018: 4770 bx lr - if let Some(bit) = self.get(index) { - 800601a: 0591 lsls r1, r2, #22 - 800601c: d401 bmi.n 8006022 ::first_zero+0x56> - 800601e: 2109 movs r1, #9 - } - 8006020: 4770 bx lr - if let Some(bit) = self.get(index) { - 8006022: 0551 lsls r1, r2, #21 - 8006024: d401 bmi.n 800602a ::first_zero+0x5e> - 8006026: 210a movs r1, #10 - } - 8006028: 4770 bx lr - if let Some(bit) = self.get(index) { - 800602a: 0511 lsls r1, r2, #20 - 800602c: d401 bmi.n 8006032 ::first_zero+0x66> - 800602e: 210b movs r1, #11 - } - 8006030: 4770 bx lr - if let Some(bit) = self.get(index) { - 8006032: 04d1 lsls r1, r2, #19 - 8006034: d401 bmi.n 800603a ::first_zero+0x6e> - 8006036: 210c movs r1, #12 - } - 8006038: 4770 bx lr - if let Some(bit) = self.get(index) { - 800603a: 0491 lsls r1, r2, #18 - 800603c: d401 bmi.n 8006042 ::first_zero+0x76> - 800603e: 210d movs r1, #13 - } - 8006040: 4770 bx lr - if let Some(bit) = self.get(index) { - 8006042: 0451 lsls r1, r2, #17 - 8006044: d401 bmi.n 800604a ::first_zero+0x7e> - 8006046: 210e movs r1, #14 - } - 8006048: 4770 bx lr - if let Some(bit) = self.get(index) { - 800604a: 0411 lsls r1, r2, #16 - 800604c: d401 bmi.n 8006052 ::first_zero+0x86> - 800604e: 210f movs r1, #15 - } - 8006050: 4770 bx lr - if let Some(bit) = self.get(index) { - 8006052: 03d1 lsls r1, r2, #15 - 8006054: d401 bmi.n 800605a ::first_zero+0x8e> - 8006056: 2110 movs r1, #16 - } - 8006058: 4770 bx lr - if let Some(bit) = self.get(index) { - 800605a: 0391 lsls r1, r2, #14 - 800605c: d401 bmi.n 8006062 ::first_zero+0x96> - 800605e: 2111 movs r1, #17 - } - 8006060: 4770 bx lr - if let Some(bit) = self.get(index) { - 8006062: 0351 lsls r1, r2, #13 - 8006064: d401 bmi.n 800606a ::first_zero+0x9e> - 8006066: 2112 movs r1, #18 - } - 8006068: 4770 bx lr - if let Some(bit) = self.get(index) { - 800606a: 0311 lsls r1, r2, #12 - 800606c: d401 bmi.n 8006072 ::first_zero+0xa6> - 800606e: 2113 movs r1, #19 - } - 8006070: 4770 bx lr - if let Some(bit) = self.get(index) { - 8006072: 02d1 lsls r1, r2, #11 - 8006074: d401 bmi.n 800607a ::first_zero+0xae> - 8006076: 2114 movs r1, #20 - } - 8006078: 4770 bx lr - if let Some(bit) = self.get(index) { - 800607a: 0291 lsls r1, r2, #10 - 800607c: d401 bmi.n 8006082 ::first_zero+0xb6> - 800607e: 2115 movs r1, #21 - } - 8006080: 4770 bx lr - if let Some(bit) = self.get(index) { - 8006082: 0251 lsls r1, r2, #9 - 8006084: d401 bmi.n 800608a ::first_zero+0xbe> - 8006086: 2116 movs r1, #22 - } - 8006088: 4770 bx lr - if let Some(bit) = self.get(index) { - 800608a: 0211 lsls r1, r2, #8 - 800608c: d401 bmi.n 8006092 ::first_zero+0xc6> - 800608e: 2117 movs r1, #23 - } - 8006090: 4770 bx lr - if let Some(bit) = self.get(index) { - 8006092: 01d1 lsls r1, r2, #7 - 8006094: d401 bmi.n 800609a ::first_zero+0xce> - 8006096: 2118 movs r1, #24 - } - 8006098: 4770 bx lr - if let Some(bit) = self.get(index) { - 800609a: 0191 lsls r1, r2, #6 - 800609c: d401 bmi.n 80060a2 ::first_zero+0xd6> - 800609e: 2119 movs r1, #25 - } - 80060a0: 4770 bx lr - if let Some(bit) = self.get(index) { - 80060a2: 0151 lsls r1, r2, #5 - 80060a4: d401 bmi.n 80060aa ::first_zero+0xde> - 80060a6: 211a movs r1, #26 - } - 80060a8: 4770 bx lr - if let Some(bit) = self.get(index) { - 80060aa: 0111 lsls r1, r2, #4 - 80060ac: d401 bmi.n 80060b2 ::first_zero+0xe6> - 80060ae: 211b movs r1, #27 - } - 80060b0: 4770 bx lr - if let Some(bit) = self.get(index) { - 80060b2: 00d1 lsls r1, r2, #3 - 80060b4: d401 bmi.n 80060ba ::first_zero+0xee> - 80060b6: 211c movs r1, #28 - } - 80060b8: 4770 bx lr - if let Some(bit) = self.get(index) { - 80060ba: 0091 lsls r1, r2, #2 - 80060bc: d401 bmi.n 80060c2 ::first_zero+0xf6> - 80060be: 211d movs r1, #29 - } - 80060c0: 4770 bx lr - if let Some(bit) = self.get(index) { - 80060c2: 0051 lsls r1, r2, #1 - 80060c4: d401 bmi.n 80060ca ::first_zero+0xfe> - 80060c6: 211e movs r1, #30 - } - 80060c8: 4770 bx lr - if let Some(bit) = self.get(index) { - 80060ca: 2a00 cmp r2, #0 - 80060cc: da01 bge.n 80060d2 ::first_zero+0x106> - 80060ce: 2120 movs r1, #32 - 80060d0: e000 b.n 80060d4 ::first_zero+0x108> - 80060d2: 211f movs r1, #31 - 80060d4: 43d0 mvns r0, r2 - 80060d6: 0fc0 lsrs r0, r0, #31 - } - 80060d8: 4770 bx lr - -080060da <_ZN4core3ptr28drop_in_place$LT$$RF$i32$GT$17hc1d1ee9a5f0dd429E.llvm.2266759416547592162>: -pub unsafe fn drop_in_place(to_drop: *mut T) { - 80060da: 4770 bx lr - -080060dc : - -/// Internal function for `assert_eq!` and `assert_ne!` macros -#[cold] -#[track_caller] -#[doc(hidden)] -pub fn assert_failed( - 80060dc: b580 push {r7, lr} - 80060de: af00 add r7, sp, #0 - 80060e0: b08c sub sp, #48 ; 0x30 - 80060e2: 9205 str r2, [sp, #20] - 80060e4: 9104 str r1, [sp, #16] - 80060e6: a906 add r1, sp, #24 -) -> ! -where - T: fmt::Debug + ?Sized, - U: fmt::Debug + ?Sized, -{ - assert_failed_inner(kind, &left, &right, args) - 80060e8: 000a movs r2, r1 - 80060ea: cb70 ldmia r3!, {r4, r5, r6} - 80060ec: c270 stmia r2!, {r4, r5, r6} - 80060ee: cb70 ldmia r3!, {r4, r5, r6} - 80060f0: c270 stmia r2!, {r4, r5, r6} - 80060f2: 68ba ldr r2, [r7, #8] - 80060f4: 9202 str r2, [sp, #8] - 80060f6: 9101 str r1, [sp, #4] - 80060f8: 4a03 ldr r2, [pc, #12] ; (8006108 ) - 80060fa: 9200 str r2, [sp, #0] - 80060fc: a904 add r1, sp, #16 - 80060fe: ab05 add r3, sp, #20 - 8006100: f003 f838 bl 8009174 - 8006104: defe udf #254 ; 0xfe - 8006106: 46c0 nop ; (mov r8, r8) - 8006108: 0800c08c .word 0x0800c08c - -0800610c : -pub fn assert_failed( - 800610c: b580 push {r7, lr} - 800610e: af00 add r7, sp, #0 - 8006110: b08c sub sp, #48 ; 0x30 - 8006112: 9205 str r2, [sp, #20] - 8006114: 9104 str r1, [sp, #16] - 8006116: a906 add r1, sp, #24 - assert_failed_inner(kind, &left, &right, args) - 8006118: 000a movs r2, r1 - 800611a: cb70 ldmia r3!, {r4, r5, r6} - 800611c: c270 stmia r2!, {r4, r5, r6} - 800611e: cb70 ldmia r3!, {r4, r5, r6} - 8006120: c270 stmia r2!, {r4, r5, r6} - 8006122: 68ba ldr r2, [r7, #8] - 8006124: 9202 str r2, [sp, #8] - 8006126: 9101 str r1, [sp, #4] - 8006128: 4a03 ldr r2, [pc, #12] ; (8006138 ) - 800612a: 9200 str r2, [sp, #0] - 800612c: a904 add r1, sp, #16 - 800612e: ab05 add r3, sp, #20 - 8006130: f003 f820 bl 8009174 - 8006134: defe udf #254 ; 0xfe - 8006136: 46c0 nop ; (mov r8, r8) - 8006138: 0800c09c .word 0x0800c09c - -0800613c : -pub fn assert_failed( - 800613c: b580 push {r7, lr} - 800613e: af00 add r7, sp, #0 - 8006140: b08c sub sp, #48 ; 0x30 - 8006142: 9205 str r2, [sp, #20] - 8006144: 9104 str r1, [sp, #16] - 8006146: a906 add r1, sp, #24 - assert_failed_inner(kind, &left, &right, args) - 8006148: 000a movs r2, r1 - 800614a: cb70 ldmia r3!, {r4, r5, r6} - 800614c: c270 stmia r2!, {r4, r5, r6} - 800614e: cb70 ldmia r3!, {r4, r5, r6} - 8006150: c270 stmia r2!, {r4, r5, r6} - 8006152: 68ba ldr r2, [r7, #8] - 8006154: 9202 str r2, [sp, #8] - 8006156: 9101 str r1, [sp, #4] - 8006158: 4a03 ldr r2, [pc, #12] ; (8006168 ) - 800615a: 9200 str r2, [sp, #0] - 800615c: a904 add r1, sp, #16 - 800615e: ab05 add r3, sp, #20 - 8006160: f003 f808 bl 8009174 - 8006164: defe udf #254 ; 0xfe - 8006166: 46c0 nop ; (mov r8, r8) - 8006168: 0800c0ac .word 0x0800c0ac - -0800616c >>>: - 800616c: b5f0 push {r4, r5, r6, r7, lr} - 800616e: af03 add r7, sp, #12 - 8006170: b083 sub sp, #12 - copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); - 8006172: 68c2 ldr r2, [r0, #12] - copy_nonoverlapping(&src as *const T, dst, 1); - 8006174: 4b2f ldr r3, [pc, #188] ; (8006234 >>+0xc8>) - 8006176: 60c3 str r3, [r0, #12] - copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); - 8006178: 6881 ldr r1, [r0, #8] - copy_nonoverlapping(&src as *const T, dst, 1); - 800617a: 6083 str r3, [r0, #8] - len!(self) - 800617c: 1a54 subs r4, r2, r1 - } - - // ensure elements are moved back into their appropriate places, even when drop_in_place panics - let _guard = DropGuard(self); - - if drop_len == 0 { - 800617e: d02c beq.n 80061da >>+0x6e> - 8006180: 2203 movs r2, #3 - !ptr.is_null() && ptr.addr() % mem::align_of::() == 0 - 8006182: 000b movs r3, r1 - 8006184: 4013 ands r3, r2 - 8006186: 1e5d subs r5, r3, #1 - 8006188: 41ab sbcs r3, r5 - 800618a: 2601 movs r6, #1 - 800618c: 2c00 cmp r4, #0 - 800618e: b440 push {r6} - 8006190: bc10 pop {r4} - 8006192: d400 bmi.n 8006196 >>+0x2a> - 8006194: 2400 movs r4, #0 - 8006196: 4323 orrs r3, r4 - 8006198: 2b01 cmp r3, #1 - 800619a: d03c beq.n 8006216 >>+0xaa> - 800619c: 6904 ldr r4, [r0, #16] - let ptr = self.buf.ptr(); - 800619e: 6823 ldr r3, [r4, #0] - if !$e { - 80061a0: 4299 cmp r1, r3 - 80061a2: d338 bcc.n 8006216 >>+0xaa> - if self.0.tail_len > 0 { - 80061a4: 6845 ldr r5, [r0, #4] - 80061a6: 2d00 cmp r5, #0 - 80061a8: d028 beq.n 80061fc >>+0x90> - 80061aa: 9602 str r6, [sp, #8] - let tail = self.0.tail_start; - 80061ac: 6800 ldr r0, [r0, #0] - let start = source_vec.len(); - 80061ae: 68a6 ldr r6, [r4, #8] - if tail != start { - 80061b0: 42b0 cmp r0, r6 - 80061b2: d01a beq.n 80061ea >>+0x7e> - 80061b4: 9001 str r0, [sp, #4] - 80061b6: 0130 lsls r0, r6, #4 - 80061b8: 1818 adds r0, r3, r0 - 80061ba: 4002 ands r2, r0 - 80061bc: 1e51 subs r1, r2, #1 - 80061be: 418a sbcs r2, r1 - unsafe { intrinsics::offset(self, count) } - 80061c0: 9901 ldr r1, [sp, #4] - 80061c2: 0109 lsls r1, r1, #4 - 80061c4: 1859 adds r1, r3, r1 - assert_unsafe_precondition!(is_aligned_and_not_null(src) && is_aligned_and_not_null(dst)); - 80061c6: 078b lsls r3, r1, #30 - 80061c8: d100 bne.n 80061cc >>+0x60> - 80061ca: 9202 str r2, [sp, #8] - 80061cc: 9a02 ldr r2, [sp, #8] - 80061ce: 2a01 cmp r2, #1 - 80061d0: d021 beq.n 8006216 >>+0xaa> - 80061d2: 012a lsls r2, r5, #4 - 80061d4: f003 f872 bl 80092bc <__aeabi_memmove4> - 80061d8: e007 b.n 80061ea >>+0x7e> - if self.0.tail_len > 0 { - 80061da: 6845 ldr r5, [r0, #4] - 80061dc: 2d00 cmp r5, #0 - 80061de: d00d beq.n 80061fc >>+0x90> - let tail = self.0.tail_start; - 80061e0: 6801 ldr r1, [r0, #0] - let source_vec = self.0.vec.as_mut(); - 80061e2: 6904 ldr r4, [r0, #16] - let start = source_vec.len(); - 80061e4: 68a6 ldr r6, [r4, #8] - if tail != start { - 80061e6: 42b1 cmp r1, r6 - 80061e8: d10c bne.n 8006204 >>+0x98> - 80061ea: 2100 movs r1, #0 - 80061ec: 1970 adds r0, r6, r5 - 80061ee: 4149 adcs r1, r1 - 80061f0: 42b0 cmp r0, r6 - 80061f2: d312 bcc.n 800621a >>+0xae> - 80061f4: 6861 ldr r1, [r4, #4] - 80061f6: 4281 cmp r1, r0 - 80061f8: d315 bcc.n 8006226 >>+0xba> - 80061fa: 60a0 str r0, [r4, #8] -pub unsafe fn drop_in_place(to_drop: *mut T) { - 80061fc: b003 add sp, #12 - 80061fe: bcf0 pop {r4, r5, r6, r7} - 8006200: bc01 pop {r0} - 8006202: 4700 bx r0 - 8006204: 0130 lsls r0, r6, #4 - let ptr = self.buf.ptr(); - 8006206: 6822 ldr r2, [r4, #0] - 8006208: 1810 adds r0, r2, r0 - 800620a: 0109 lsls r1, r1, #4 - 800620c: 1851 adds r1, r2, r1 - !ptr.is_null() && ptr.addr() % mem::align_of::() == 0 - 800620e: 000a movs r2, r1 - 8006210: 4302 orrs r2, r0 - assert_unsafe_precondition!(is_aligned_and_not_null(src) && is_aligned_and_not_null(dst)); - 8006212: 0792 lsls r2, r2, #30 - 8006214: d0dd beq.n 80061d2 >>+0x66> - 8006216: defe udf #254 ; 0xfe - 8006218: defe udf #254 ; 0xfe - 800621a: 4809 ldr r0, [pc, #36] ; (8006240 >>+0xd4>) - 800621c: 211c movs r1, #28 - 800621e: 4a09 ldr r2, [pc, #36] ; (8006244 >>+0xd8>) - 8006220: f002 ff5e bl 80090e0 - 8006224: defe udf #254 ; 0xfe - 8006226: 4804 ldr r0, [pc, #16] ; (8006238 >>+0xcc>) - 8006228: 212c movs r1, #44 ; 0x2c - 800622a: 4a04 ldr r2, [pc, #16] ; (800623c >>+0xd0>) - 800622c: f002 ff58 bl 80090e0 - 8006230: defe udf #254 ; 0xfe - 8006232: 46c0 nop ; (mov r8, r8) - 8006234: 0800c300 .word 0x0800c300 - 8006238: 0800c1ac .word 0x0800c1ac - 800623c: 0800c24c .word 0x0800c24c - 8006240: 0800c190 .word 0x0800c190 - 8006244: 0800c178 .word 0x0800c178 - -08006248 >>>: - 8006248: b5f0 push {r4, r5, r6, r7, lr} - 800624a: af03 add r7, sp, #12 - 800624c: b083 sub sp, #12 - copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); - 800624e: 68c2 ldr r2, [r0, #12] - copy_nonoverlapping(&src as *const T, dst, 1); - 8006250: 4b2f ldr r3, [pc, #188] ; (8006310 >>+0xc8>) - 8006252: 60c3 str r3, [r0, #12] - copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); - 8006254: 6881 ldr r1, [r0, #8] - copy_nonoverlapping(&src as *const T, dst, 1); - 8006256: 6083 str r3, [r0, #8] - 8006258: 1a54 subs r4, r2, r1 - if drop_len == 0 { - 800625a: d02c beq.n 80062b6 >>+0x6e> - 800625c: 2203 movs r2, #3 - !ptr.is_null() && ptr.addr() % mem::align_of::() == 0 - 800625e: 000b movs r3, r1 - 8006260: 4013 ands r3, r2 - 8006262: 1e5d subs r5, r3, #1 - 8006264: 41ab sbcs r3, r5 - 8006266: 2601 movs r6, #1 - 8006268: 2c00 cmp r4, #0 - 800626a: b440 push {r6} - 800626c: bc10 pop {r4} - 800626e: d400 bmi.n 8006272 >>+0x2a> - 8006270: 2400 movs r4, #0 - 8006272: 4323 orrs r3, r4 - 8006274: 2b01 cmp r3, #1 - 8006276: d03c beq.n 80062f2 >>+0xaa> - 8006278: 6904 ldr r4, [r0, #16] - let ptr = self.buf.ptr(); - 800627a: 6823 ldr r3, [r4, #0] - if !$e { - 800627c: 4299 cmp r1, r3 - 800627e: d338 bcc.n 80062f2 >>+0xaa> - if self.0.tail_len > 0 { - 8006280: 6845 ldr r5, [r0, #4] - 8006282: 2d00 cmp r5, #0 - 8006284: d028 beq.n 80062d8 >>+0x90> - 8006286: 9602 str r6, [sp, #8] - let tail = self.0.tail_start; - 8006288: 6800 ldr r0, [r0, #0] - let start = source_vec.len(); - 800628a: 68a6 ldr r6, [r4, #8] - if tail != start { - 800628c: 42b0 cmp r0, r6 - 800628e: d01a beq.n 80062c6 >>+0x7e> - 8006290: 9001 str r0, [sp, #4] - 8006292: 0130 lsls r0, r6, #4 - 8006294: 1818 adds r0, r3, r0 - 8006296: 4002 ands r2, r0 - 8006298: 1e51 subs r1, r2, #1 - 800629a: 418a sbcs r2, r1 - 800629c: 9901 ldr r1, [sp, #4] - 800629e: 0109 lsls r1, r1, #4 - 80062a0: 1859 adds r1, r3, r1 - assert_unsafe_precondition!(is_aligned_and_not_null(src) && is_aligned_and_not_null(dst)); - 80062a2: 078b lsls r3, r1, #30 - 80062a4: d100 bne.n 80062a8 >>+0x60> - 80062a6: 9202 str r2, [sp, #8] - 80062a8: 9a02 ldr r2, [sp, #8] - 80062aa: 2a01 cmp r2, #1 - 80062ac: d021 beq.n 80062f2 >>+0xaa> - 80062ae: 012a lsls r2, r5, #4 - 80062b0: f003 f804 bl 80092bc <__aeabi_memmove4> - 80062b4: e007 b.n 80062c6 >>+0x7e> - if self.0.tail_len > 0 { - 80062b6: 6845 ldr r5, [r0, #4] - 80062b8: 2d00 cmp r5, #0 - 80062ba: d00d beq.n 80062d8 >>+0x90> - let tail = self.0.tail_start; - 80062bc: 6801 ldr r1, [r0, #0] - let source_vec = self.0.vec.as_mut(); - 80062be: 6904 ldr r4, [r0, #16] - let start = source_vec.len(); - 80062c0: 68a6 ldr r6, [r4, #8] - if tail != start { - 80062c2: 42b1 cmp r1, r6 - 80062c4: d10c bne.n 80062e0 >>+0x98> - 80062c6: 2100 movs r1, #0 - 80062c8: 1970 adds r0, r6, r5 - 80062ca: 4149 adcs r1, r1 - 80062cc: 42b0 cmp r0, r6 - 80062ce: d312 bcc.n 80062f6 >>+0xae> - 80062d0: 6861 ldr r1, [r4, #4] - 80062d2: 4281 cmp r1, r0 - 80062d4: d315 bcc.n 8006302 >>+0xba> - 80062d6: 60a0 str r0, [r4, #8] -pub unsafe fn drop_in_place(to_drop: *mut T) { - 80062d8: b003 add sp, #12 - 80062da: bcf0 pop {r4, r5, r6, r7} - 80062dc: bc01 pop {r0} - 80062de: 4700 bx r0 - 80062e0: 0130 lsls r0, r6, #4 - let ptr = self.buf.ptr(); - 80062e2: 6822 ldr r2, [r4, #0] - 80062e4: 1810 adds r0, r2, r0 - 80062e6: 0109 lsls r1, r1, #4 - 80062e8: 1851 adds r1, r2, r1 - !ptr.is_null() && ptr.addr() % mem::align_of::() == 0 - 80062ea: 000a movs r2, r1 - 80062ec: 4302 orrs r2, r0 - assert_unsafe_precondition!(is_aligned_and_not_null(src) && is_aligned_and_not_null(dst)); - 80062ee: 0792 lsls r2, r2, #30 - 80062f0: d0dd beq.n 80062ae >>+0x66> - 80062f2: defe udf #254 ; 0xfe - 80062f4: defe udf #254 ; 0xfe - 80062f6: 4809 ldr r0, [pc, #36] ; (800631c >>+0xd4>) - 80062f8: 211c movs r1, #28 - 80062fa: 4a09 ldr r2, [pc, #36] ; (8006320 >>+0xd8>) - 80062fc: f002 fef0 bl 80090e0 - 8006300: defe udf #254 ; 0xfe - 8006302: 4804 ldr r0, [pc, #16] ; (8006314 >>+0xcc>) - 8006304: 212c movs r1, #44 ; 0x2c - 8006306: 4a04 ldr r2, [pc, #16] ; (8006318 >>+0xd0>) - 8006308: f002 feea bl 80090e0 - 800630c: defe udf #254 ; 0xfe - 800630e: 46c0 nop ; (mov r8, r8) - 8006310: 0800c300 .word 0x0800c300 - 8006314: 0800c1ac .word 0x0800c1ac - 8006318: 0800c24c .word 0x0800c24c - 800631c: 0800c190 .word 0x0800c190 - 8006320: 0800c178 .word 0x0800c178 - -08006324 >>>: - 8006324: b5f0 push {r4, r5, r6, r7, lr} - 8006326: af03 add r7, sp, #12 - 8006328: b085 sub sp, #20 - copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); - 800632a: 68c1 ldr r1, [r0, #12] - copy_nonoverlapping(&src as *const T, dst, 1); - 800632c: 4b39 ldr r3, [pc, #228] ; (8006414 >>+0xf0>) - 800632e: 60c3 str r3, [r0, #12] - copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); - 8006330: 6882 ldr r2, [r0, #8] - copy_nonoverlapping(&src as *const T, dst, 1); - 8006332: 6083 str r3, [r0, #8] - 8006334: 1a8c subs r4, r1, r2 - if drop_len == 0 { - 8006336: d043 beq.n 80063c0 >>+0x9c> - 8006338: 2303 movs r3, #3 - !ptr.is_null() && ptr.addr() % mem::align_of::() == 0 - 800633a: 0011 movs r1, r2 - 800633c: 4019 ands r1, r3 - 800633e: 1e4d subs r5, r1, #1 - 8006340: 41a9 sbcs r1, r5 - 8006342: 2501 movs r5, #1 - 8006344: 2c00 cmp r4, #0 - 8006346: b420 push {r5} - 8006348: bc10 pop {r4} - 800634a: d400 bmi.n 800634e >>+0x2a> - 800634c: 2400 movs r4, #0 - 800634e: 4321 orrs r1, r4 - 8006350: 2901 cmp r1, #1 - 8006352: d056 beq.n 8006402 >>+0xde> - 8006354: 6904 ldr r4, [r0, #16] - let ptr = self.buf.ptr(); - 8006356: 6821 ldr r1, [r4, #0] - if !$e { - 8006358: 428a cmp r2, r1 - 800635a: d352 bcc.n 8006402 >>+0xde> - if self.0.tail_len > 0 { - 800635c: 6842 ldr r2, [r0, #4] - 800635e: 2a00 cmp r2, #0 - 8006360: d02a beq.n 80063b8 >>+0x94> - let tail = self.0.tail_start; - 8006362: 6806 ldr r6, [r0, #0] - let start = source_vec.len(); - 8006364: 68a0 ldr r0, [r4, #8] - if tail != start { - 8006366: 4286 cmp r6, r0 - 8006368: d01c beq.n 80063a4 >>+0x80> - 800636a: 9203 str r2, [sp, #12] - 800636c: 2218 movs r2, #24 - 800636e: 9204 str r2, [sp, #16] - 8006370: 0002 movs r2, r0 - 8006372: 9804 ldr r0, [sp, #16] - 8006374: 9202 str r2, [sp, #8] - 8006376: 4350 muls r0, r2 - 8006378: 9a04 ldr r2, [sp, #16] - 800637a: 1808 adds r0, r1, r0 - 800637c: 9001 str r0, [sp, #4] - 800637e: 4003 ands r3, r0 - 8006380: 0028 movs r0, r5 - 8006382: 1e5d subs r5, r3, #1 - 8006384: 41ab sbcs r3, r5 - 8006386: 0005 movs r5, r0 - 8006388: 4356 muls r6, r2 - 800638a: 1989 adds r1, r1, r6 - assert_unsafe_precondition!(is_aligned_and_not_null(src) && is_aligned_and_not_null(dst)); - 800638c: 0788 lsls r0, r1, #30 - 800638e: d100 bne.n 8006392 >>+0x6e> - 8006390: 001d movs r5, r3 - 8006392: 2d01 cmp r5, #1 - 8006394: d035 beq.n 8006402 >>+0xde> - 8006396: 9d03 ldr r5, [sp, #12] - copy(src, dst, count) - 8006398: 436a muls r2, r5 - 800639a: 9801 ldr r0, [sp, #4] - 800639c: f002 ff8e bl 80092bc <__aeabi_memmove4> - 80063a0: 002a movs r2, r5 - 80063a2: 9802 ldr r0, [sp, #8] - 80063a4: 2100 movs r1, #0 - 80063a6: 0003 movs r3, r0 - source_vec.set_len(start + self.0.tail_len); - 80063a8: 1880 adds r0, r0, r2 - 80063aa: 4149 adcs r1, r1 - 80063ac: 4298 cmp r0, r3 - 80063ae: d322 bcc.n 80063f6 >>+0xd2> - 80063b0: 6861 ldr r1, [r4, #4] - 80063b2: 4281 cmp r1, r0 - 80063b4: d327 bcc.n 8006406 >>+0xe2> - 80063b6: 60a0 str r0, [r4, #8] -pub unsafe fn drop_in_place(to_drop: *mut T) { - 80063b8: b005 add sp, #20 - 80063ba: bcf0 pop {r4, r5, r6, r7} - 80063bc: bc01 pop {r0} - 80063be: 4700 bx r0 - if self.0.tail_len > 0 { - 80063c0: 6845 ldr r5, [r0, #4] - 80063c2: 2d00 cmp r5, #0 - 80063c4: d0f8 beq.n 80063b8 >>+0x94> - let tail = self.0.tail_start; - 80063c6: 6801 ldr r1, [r0, #0] - let source_vec = self.0.vec.as_mut(); - 80063c8: 6904 ldr r4, [r0, #16] - let start = source_vec.len(); - 80063ca: 68a6 ldr r6, [r4, #8] - if tail != start { - 80063cc: 42b1 cmp r1, r6 - 80063ce: d00d beq.n 80063ec >>+0xc8> - 80063d0: 2218 movs r2, #24 - 80063d2: 0010 movs r0, r2 - 80063d4: 4370 muls r0, r6 - let ptr = self.buf.ptr(); - 80063d6: 6823 ldr r3, [r4, #0] - 80063d8: 1818 adds r0, r3, r0 - 80063da: 4351 muls r1, r2 - 80063dc: 1859 adds r1, r3, r1 - !ptr.is_null() && ptr.addr() % mem::align_of::() == 0 - 80063de: 000b movs r3, r1 - 80063e0: 4303 orrs r3, r0 - assert_unsafe_precondition!(is_aligned_and_not_null(src) && is_aligned_and_not_null(dst)); - 80063e2: 079b lsls r3, r3, #30 - 80063e4: d10d bne.n 8006402 >>+0xde> - copy(src, dst, count) - 80063e6: 436a muls r2, r5 - 80063e8: f002 ff68 bl 80092bc <__aeabi_memmove4> - 80063ec: 2100 movs r1, #0 - source_vec.set_len(start + self.0.tail_len); - 80063ee: 1970 adds r0, r6, r5 - 80063f0: 4149 adcs r1, r1 - 80063f2: 42b0 cmp r0, r6 - 80063f4: d2dc bcs.n 80063b0 >>+0x8c> - 80063f6: 480a ldr r0, [pc, #40] ; (8006420 >>+0xfc>) - 80063f8: 211c movs r1, #28 - 80063fa: 4a0a ldr r2, [pc, #40] ; (8006424 >>+0x100>) - 80063fc: f002 fe70 bl 80090e0 - 8006400: defe udf #254 ; 0xfe - 8006402: defe udf #254 ; 0xfe - 8006404: defe udf #254 ; 0xfe - 8006406: 4804 ldr r0, [pc, #16] ; (8006418 >>+0xf4>) - 8006408: 212c movs r1, #44 ; 0x2c - 800640a: 4a04 ldr r2, [pc, #16] ; (800641c >>+0xf8>) - 800640c: f002 fe68 bl 80090e0 - 8006410: defe udf #254 ; 0xfe - 8006412: 46c0 nop ; (mov r8, r8) - 8006414: 0800c300 .word 0x0800c300 - 8006418: 0800c1ac .word 0x0800c1ac - 800641c: 0800c24c .word 0x0800c24c - 8006420: 0800c190 .word 0x0800c190 - 8006424: 0800c178 .word 0x0800c178 - -08006428 >: - 8006428: b5f0 push {r4, r5, r6, r7, lr} - 800642a: af03 add r7, sp, #12 - 800642c: b08b sub sp, #44 ; 0x2c - 800642e: 4b43 ldr r3, [pc, #268] ; (800653c +0x114>) - intrinsics::volatile_load(src) - 8006430: 881e ldrh r6, [r3, #0] - 8006432: 2400 movs r4, #0 - intrinsics::volatile_store(dst, src); - 8006434: 801c strh r4, [r3, #0] - match borrow.get() { - 8006436: 4d42 ldr r5, [pc, #264] ; (8006540 +0x118>) - 8006438: 6829 ldr r1, [r5, #0] - 800643a: 2900 cmp r1, #0 - 800643c: d15d bne.n 80064fa +0xd2> - 800643e: 43e1 mvns r1, r4 - 8006440: 9102 str r1, [sp, #8] - copy_nonoverlapping(&src as *const T, dst, 1); - 8006442: 6029 str r1, [r5, #0] - let a = *b; - 8006444: 6869 ldr r1, [r5, #4] - *b += 1; - 8006446: 1c4a adds r2, r1, #1 - 8006448: 428a cmp r2, r1 - 800644a: d64a bvs.n 80064e2 +0xba> - 800644c: 602c str r4, [r5, #0] - 800644e: 606a str r2, [r5, #4] - intrinsics::volatile_store(dst, src); - 8006450: 801e strh r6, [r3, #0] - let a = crate::interrupt::free(|c| { - 8006452: 9103 str r1, [sp, #12] - assert_eq!(a, 0); - 8006454: 2900 cmp r1, #0 - 8006456: d152 bne.n 80064fe +0xd6> - 8006458: 9001 str r0, [sp, #4] - s.sprite_controller.return_sprite(self.id.sprite()) - 800645a: 6801 ldr r1, [r0, #0] - debug_assert!(self.is_some()); - 800645c: 2900 cmp r1, #0 - 800645e: d05d beq.n 800651c +0xf4> - 8006460: 4e3d ldr r6, [pc, #244] ; (8006558 +0x130>) - 8006462: 3630 adds r6, #48 ; 0x30 - 8006464: 0030 movs r0, r6 - 8006466: f7fe fc5b bl 8004d20 - 800646a: 4b34 ldr r3, [pc, #208] ; (800653c +0x114>) - intrinsics::volatile_load(src) - 800646c: 8818 ldrh r0, [r3, #0] - intrinsics::volatile_store(dst, src); - 800646e: 801c strh r4, [r3, #0] - 8006470: 6829 ldr r1, [r5, #0] - 8006472: 2900 cmp r1, #0 - 8006474: d158 bne.n 8006528 +0x100> - copy_nonoverlapping(&src as *const T, dst, 1); - 8006476: 9902 ldr r1, [sp, #8] - 8006478: 6029 str r1, [r5, #0] - *b -= 1; - 800647a: 686a ldr r2, [r5, #4] - 800647c: 1e51 subs r1, r2, #1 - 800647e: 4291 cmp r1, r2 - 8006480: 4291 cmp r1, r2 - 8006482: d634 bvs.n 80064ee +0xc6> - 8006484: 602c str r4, [r5, #0] - 8006486: 6069 str r1, [r5, #4] - intrinsics::volatile_store(dst, src); - 8006488: 8018 strh r0, [r3, #0] - intrinsics::volatile_load(src) - 800648a: 8818 ldrh r0, [r3, #0] - intrinsics::volatile_store(dst, src); - 800648c: 801c strh r4, [r3, #0] - 800648e: 6829 ldr r1, [r5, #0] - 8006490: 2900 cmp r1, #0 - 8006492: d132 bne.n 80064fa +0xd2> - copy_nonoverlapping(&src as *const T, dst, 1); - 8006494: 9902 ldr r1, [sp, #8] - 8006496: 6029 str r1, [r5, #0] - let a = *b; - 8006498: 6869 ldr r1, [r5, #4] - *b += 1; - 800649a: 1c4a adds r2, r1, #1 - 800649c: 428a cmp r2, r1 - 800649e: d620 bvs.n 80064e2 +0xba> - 80064a0: 602c str r4, [r5, #0] - 80064a2: 606a str r2, [r5, #4] - intrinsics::volatile_store(dst, src); - 80064a4: 8018 strh r0, [r3, #0] - let a = crate::interrupt::free(|c| { - 80064a6: 9103 str r1, [sp, #12] - assert_eq!(a, 0); - 80064a8: 2900 cmp r1, #0 - 80064aa: d128 bne.n 80064fe +0xd6> - s.sprite_controller.return_sprite(self.id.sprite()) - 80064ac: 9801 ldr r0, [sp, #4] - 80064ae: 6881 ldr r1, [r0, #8] - 80064b0: 2900 cmp r1, #0 - 80064b2: d033 beq.n 800651c +0xf4> - 80064b4: 0030 movs r0, r6 - 80064b6: f7fe fc33 bl 8004d20 - 80064ba: 4b20 ldr r3, [pc, #128] ; (800653c +0x114>) - intrinsics::volatile_load(src) - 80064bc: 8818 ldrh r0, [r3, #0] - intrinsics::volatile_store(dst, src); - 80064be: 801c strh r4, [r3, #0] - 80064c0: 6829 ldr r1, [r5, #0] - 80064c2: 2900 cmp r1, #0 - 80064c4: d130 bne.n 8006528 +0x100> - copy_nonoverlapping(&src as *const T, dst, 1); - 80064c6: 9902 ldr r1, [sp, #8] - 80064c8: 6029 str r1, [r5, #0] - *b -= 1; - 80064ca: 686a ldr r2, [r5, #4] - 80064cc: 1e51 subs r1, r2, #1 - 80064ce: 4291 cmp r1, r2 - 80064d0: 4291 cmp r1, r2 - 80064d2: d60c bvs.n 80064ee +0xc6> - 80064d4: 602c str r4, [r5, #0] - 80064d6: 6069 str r1, [r5, #4] - intrinsics::volatile_store(dst, src); - 80064d8: 8018 strh r0, [r3, #0] -pub unsafe fn drop_in_place(to_drop: *mut T) { - 80064da: b00b add sp, #44 ; 0x2c - 80064dc: bcf0 pop {r4, r5, r6, r7} - 80064de: bc01 pop {r0} - 80064e0: 4700 bx r0 - 80064e2: 4823 ldr r0, [pc, #140] ; (8006570 +0x148>) - 80064e4: 211c movs r1, #28 - 80064e6: 4a23 ldr r2, [pc, #140] ; (8006574 +0x14c>) - 80064e8: f002 fdfa bl 80090e0 - 80064ec: defe udf #254 ; 0xfe - 80064ee: 481c ldr r0, [pc, #112] ; (8006560 +0x138>) - 80064f0: 2121 movs r1, #33 ; 0x21 - 80064f2: 4a1c ldr r2, [pc, #112] ; (8006564 +0x13c>) - 80064f4: f002 fdf4 bl 80090e0 - 80064f8: defe udf #254 ; 0xfe - 80064fa: 4812 ldr r0, [pc, #72] ; (8006544 +0x11c>) - 80064fc: e015 b.n 800652a +0x102> - 80064fe: 9409 str r4, [sp, #36] ; 0x24 - 8006500: 9408 str r4, [sp, #32] - 8006502: 9407 str r4, [sp, #28] - 8006504: 9406 str r4, [sp, #24] - 8006506: 9405 str r4, [sp, #20] - 8006508: 9404 str r4, [sp, #16] - 800650a: 4811 ldr r0, [pc, #68] ; (8006550 +0x128>) - 800650c: 9000 str r0, [sp, #0] - 800650e: a903 add r1, sp, #12 - 8006510: 4a10 ldr r2, [pc, #64] ; (8006554 +0x12c>) - 8006512: ab04 add r3, sp, #16 - 8006514: 0020 movs r0, r4 - 8006516: f7ff fdf9 bl 800610c - 800651a: defe udf #254 ; 0xfe - 800651c: 4812 ldr r0, [pc, #72] ; (8006568 +0x140>) - 800651e: 2120 movs r1, #32 - 8006520: 4a12 ldr r2, [pc, #72] ; (800656c +0x144>) - 8006522: f002 fddd bl 80090e0 - 8006526: defe udf #254 ; 0xfe - 8006528: 480c ldr r0, [pc, #48] ; (800655c +0x134>) - 800652a: 9000 str r0, [sp, #0] - 800652c: 4806 ldr r0, [pc, #24] ; (8006548 +0x120>) - 800652e: 2110 movs r1, #16 - 8006530: aa0a add r2, sp, #40 ; 0x28 - 8006532: 4b06 ldr r3, [pc, #24] ; (800654c +0x124>) - 8006534: f001 fdb2 bl 800809c - 8006538: defe udf #254 ; 0xfe - 800653a: 46c0 nop ; (mov r8, r8) - 800653c: 04000208 .word 0x04000208 - 8006540: 030000e8 .word 0x030000e8 - 8006544: 0800ba1c .word 0x0800ba1c - 8006548: 0800ae5c .word 0x0800ae5c - 800654c: 0800b8c8 .word 0x0800b8c8 - 8006550: 0800b670 .word 0x0800b670 - 8006554: 0800b650 .word 0x0800b650 - 8006558: 03000088 .word 0x03000088 - 800655c: 0800ba3c .word 0x0800ba3c - 8006560: 0800b9d0 .word 0x0800b9d0 - 8006564: 0800ba4c .word 0x0800ba4c - 8006568: 0800b551 .word 0x0800b551 - 800656c: 0800b780 .word 0x0800b780 - 8006570: 0800b990 .word 0x0800b990 - 8006574: 0800ba2c .word 0x0800ba2c - -08006578 >: - 8006578: b5f0 push {r4, r5, r6, r7, lr} - 800657a: af03 add r7, sp, #12 - 800657c: b089 sub sp, #36 ; 0x24 - 800657e: 4a2e ldr r2, [pc, #184] ; (8006638 +0xc0>) - intrinsics::volatile_load(src) - 8006580: 8811 ldrh r1, [r2, #0] - 8006582: 2400 movs r4, #0 - intrinsics::volatile_store(dst, src); - 8006584: 8014 strh r4, [r2, #0] - 8006586: 4e2d ldr r6, [pc, #180] ; (800663c +0xc4>) - 8006588: 6832 ldr r2, [r6, #0] - 800658a: 2a00 cmp r2, #0 - 800658c: d133 bne.n 80065f6 +0x7e> - 800658e: 43e5 mvns r5, r4 - copy_nonoverlapping(&src as *const T, dst, 1); - 8006590: 6035 str r5, [r6, #0] - let a = *b; - 8006592: 6872 ldr r2, [r6, #4] - *b += 1; - 8006594: 1c53 adds r3, r2, #1 - 8006596: 4293 cmp r3, r2 - 8006598: d621 bvs.n 80065de +0x66> - 800659a: 6034 str r4, [r6, #0] - 800659c: 6073 str r3, [r6, #4] - intrinsics::volatile_store(dst, src); - 800659e: 4b26 ldr r3, [pc, #152] ; (8006638 +0xc0>) - 80065a0: 8019 strh r1, [r3, #0] - let a = crate::interrupt::free(|c| { - 80065a2: 9201 str r2, [sp, #4] - assert_eq!(a, 0); - 80065a4: 2a00 cmp r2, #0 - 80065a6: d128 bne.n 80065fa +0x82> - s.sprite_controller.return_sprite(self.id.sprite()) - 80065a8: 6801 ldr r1, [r0, #0] - 80065aa: 2900 cmp r1, #0 - 80065ac: d034 beq.n 8006618 +0xa0> - 80065ae: 4829 ldr r0, [pc, #164] ; (8006654 +0xdc>) - 80065b0: 3030 adds r0, #48 ; 0x30 - 80065b2: f7fe fbb5 bl 8004d20 - 80065b6: 4920 ldr r1, [pc, #128] ; (8006638 +0xc0>) - intrinsics::volatile_load(src) - 80065b8: 8808 ldrh r0, [r1, #0] - intrinsics::volatile_store(dst, src); - 80065ba: 800c strh r4, [r1, #0] - 80065bc: 6831 ldr r1, [r6, #0] - 80065be: 2900 cmp r1, #0 - 80065c0: d130 bne.n 8006624 +0xac> - copy_nonoverlapping(&src as *const T, dst, 1); - 80065c2: 6035 str r5, [r6, #0] - *b -= 1; - 80065c4: 6872 ldr r2, [r6, #4] - 80065c6: 1e51 subs r1, r2, #1 - 80065c8: 4291 cmp r1, r2 - 80065ca: 4291 cmp r1, r2 - 80065cc: d60d bvs.n 80065ea +0x72> - 80065ce: 6034 str r4, [r6, #0] - 80065d0: 6071 str r1, [r6, #4] - intrinsics::volatile_store(dst, src); - 80065d2: 4919 ldr r1, [pc, #100] ; (8006638 +0xc0>) - 80065d4: 8008 strh r0, [r1, #0] -pub unsafe fn drop_in_place(to_drop: *mut T) { - 80065d6: b009 add sp, #36 ; 0x24 - 80065d8: bcf0 pop {r4, r5, r6, r7} - 80065da: bc01 pop {r0} - 80065dc: 4700 bx r0 - *b += 1; - 80065de: 4823 ldr r0, [pc, #140] ; (800666c +0xf4>) - 80065e0: 211c movs r1, #28 - 80065e2: 4a23 ldr r2, [pc, #140] ; (8006670 +0xf8>) - 80065e4: f002 fd7c bl 80090e0 - 80065e8: defe udf #254 ; 0xfe - *b -= 1; - 80065ea: 481c ldr r0, [pc, #112] ; (800665c +0xe4>) - 80065ec: 2121 movs r1, #33 ; 0x21 - 80065ee: 4a1c ldr r2, [pc, #112] ; (8006660 +0xe8>) - 80065f0: f002 fd76 bl 80090e0 - 80065f4: defe udf #254 ; 0xfe - Err(e) => unwrap_failed(msg, &e), - 80065f6: 4812 ldr r0, [pc, #72] ; (8006640 +0xc8>) - 80065f8: e015 b.n 8006626 +0xae> - assert_eq!(a, 0); - 80065fa: 9407 str r4, [sp, #28] - 80065fc: 9406 str r4, [sp, #24] - 80065fe: 9405 str r4, [sp, #20] - 8006600: 9404 str r4, [sp, #16] - 8006602: 9403 str r4, [sp, #12] - 8006604: 9402 str r4, [sp, #8] - 8006606: 4811 ldr r0, [pc, #68] ; (800664c +0xd4>) - 8006608: 9000 str r0, [sp, #0] - 800660a: a901 add r1, sp, #4 - 800660c: 4a10 ldr r2, [pc, #64] ; (8006650 +0xd8>) - 800660e: ab02 add r3, sp, #8 - 8006610: 0020 movs r0, r4 - 8006612: f7ff fd7b bl 800610c - 8006616: defe udf #254 ; 0xfe - 8006618: 4812 ldr r0, [pc, #72] ; (8006664 +0xec>) - 800661a: 2120 movs r1, #32 - 800661c: 4a12 ldr r2, [pc, #72] ; (8006668 +0xf0>) - 800661e: f002 fd5f bl 80090e0 - 8006622: defe udf #254 ; 0xfe - 8006624: 480c ldr r0, [pc, #48] ; (8006658 +0xe0>) - 8006626: 9000 str r0, [sp, #0] - 8006628: 4806 ldr r0, [pc, #24] ; (8006644 +0xcc>) - 800662a: 2110 movs r1, #16 - 800662c: aa08 add r2, sp, #32 - 800662e: 4b06 ldr r3, [pc, #24] ; (8006648 +0xd0>) - 8006630: f001 fd34 bl 800809c - 8006634: defe udf #254 ; 0xfe - 8006636: 46c0 nop ; (mov r8, r8) - 8006638: 04000208 .word 0x04000208 - 800663c: 030000e8 .word 0x030000e8 - 8006640: 0800ba1c .word 0x0800ba1c - 8006644: 0800ae5c .word 0x0800ae5c - 8006648: 0800b8c8 .word 0x0800b8c8 - 800664c: 0800b670 .word 0x0800b670 - 8006650: 0800b650 .word 0x0800b650 - 8006654: 03000088 .word 0x03000088 - 8006658: 0800ba3c .word 0x0800ba3c - 800665c: 0800b9d0 .word 0x0800b9d0 - 8006660: 0800ba4c .word 0x0800ba4c - 8006664: 0800b551 .word 0x0800b551 - 8006668: 0800b780 .word 0x0800b780 - 800666c: 0800b990 .word 0x0800b990 - 8006670: 0800ba2c .word 0x0800ba2c - -08006674 >>: - 8006674: b5f0 push {r4, r5, r6, r7, lr} - 8006676: af03 add r7, sp, #12 - 8006678: b081 sub sp, #4 - copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); - 800667a: 68c2 ldr r2, [r0, #12] - copy_nonoverlapping(&src as *const T, dst, 1); - 800667c: 4b2a ldr r3, [pc, #168] ; (8006728 >+0xb4>) - 800667e: 60c3 str r3, [r0, #12] - copy_nonoverlapping(src, tmp.as_mut_ptr(), 1); - 8006680: 6881 ldr r1, [r0, #8] - copy_nonoverlapping(&src as *const T, dst, 1); - 8006682: 6083 str r3, [r0, #8] - if drop_len == 0 { - 8006684: 428a cmp r2, r1 - 8006686: d10f bne.n 80066a8 >+0x34> - if self.0.tail_len > 0 { - 8006688: 6845 ldr r5, [r0, #4] - 800668a: 2d00 cmp r5, #0 - 800668c: d039 beq.n 8006702 >+0x8e> - let tail = self.0.tail_start; - 800668e: 6801 ldr r1, [r0, #0] - let source_vec = self.0.vec.as_mut(); - 8006690: 6904 ldr r4, [r0, #16] - let start = source_vec.len(); - 8006692: 68a6 ldr r6, [r4, #8] - if tail != start { - 8006694: 42b1 cmp r1, r6 - 8006696: d02b beq.n 80066f0 >+0x7c> - 8006698: 0070 lsls r0, r6, #1 - 800669a: 6822 ldr r2, [r4, #0] - 800669c: 1810 adds r0, r2, r0 - 800669e: 0049 lsls r1, r1, #1 - 80066a0: 1851 adds r1, r2, r1 - !ptr.is_null() && ptr.addr() % mem::align_of::() == 0 - 80066a2: 000a movs r2, r1 - 80066a4: 4302 orrs r2, r0 - 80066a6: e01e b.n 80066e6 >+0x72> - #[inline] - pub const fn guaranteed_eq(self, other: *const T) -> bool - where - T: Sized, - { - intrinsics::ptr_guaranteed_eq(self, other) - 80066a8: 424b negs r3, r1 - 80066aa: 414b adcs r3, r1 - 80066ac: 430b orrs r3, r1 - unsafe { from_raw_parts(self.ptr.as_ptr(), len!(self)) } - 80066ae: 1a54 subs r4, r2, r1 - 80066b0: 2201 movs r2, #1 - 80066b2: 2c00 cmp r4, #0 - 80066b4: b404 push {r2} - 80066b6: bc10 pop {r4} - 80066b8: d400 bmi.n 80066bc >+0x48> - 80066ba: 2400 movs r4, #0 - 80066bc: 4323 orrs r3, r4 - 80066be: 07db lsls r3, r3, #31 - 80066c0: d129 bne.n 8006716 >+0xa2> - 80066c2: 6904 ldr r4, [r0, #16] - let ptr = self.buf.ptr(); - 80066c4: 6823 ldr r3, [r4, #0] - if !$e { - 80066c6: 4299 cmp r1, r3 - 80066c8: d325 bcc.n 8006716 >+0xa2> - if self.0.tail_len > 0 { - 80066ca: 6845 ldr r5, [r0, #4] - 80066cc: 2d00 cmp r5, #0 - 80066ce: d018 beq.n 8006702 >+0x8e> - let tail = self.0.tail_start; - 80066d0: 6801 ldr r1, [r0, #0] - let start = source_vec.len(); - 80066d2: 68a6 ldr r6, [r4, #8] - if tail != start { - 80066d4: 42b1 cmp r1, r6 - 80066d6: d00b beq.n 80066f0 >+0x7c> - 80066d8: 0070 lsls r0, r6, #1 - 80066da: 1818 adds r0, r3, r0 - unsafe { intrinsics::offset(self, count) } - 80066dc: 0049 lsls r1, r1, #1 - 80066de: 1859 adds r1, r3, r1 - assert_unsafe_precondition!(is_aligned_and_not_null(src) && is_aligned_and_not_null(dst)); - 80066e0: 07cb lsls r3, r1, #31 - 80066e2: d100 bne.n 80066e6 >+0x72> - 80066e4: 0002 movs r2, r0 - 80066e6: 07d2 lsls r2, r2, #31 - 80066e8: d115 bne.n 8006716 >+0xa2> - 80066ea: 006a lsls r2, r5, #1 - 80066ec: f002 fddf bl 80092ae <__aeabi_memmove> - 80066f0: 2100 movs r1, #0 - 80066f2: 1970 adds r0, r6, r5 - 80066f4: 4149 adcs r1, r1 - 80066f6: 42b0 cmp r0, r6 - 80066f8: d307 bcc.n 800670a >+0x96> - 80066fa: 6861 ldr r1, [r4, #4] - 80066fc: 4281 cmp r1, r0 - 80066fe: d30c bcc.n 800671a >+0xa6> - 8006700: 60a0 str r0, [r4, #8] -pub unsafe fn drop_in_place(to_drop: *mut T) { - 8006702: b001 add sp, #4 - 8006704: bcf0 pop {r4, r5, r6, r7} - 8006706: bc01 pop {r0} - 8006708: 4700 bx r0 - 800670a: 480a ldr r0, [pc, #40] ; (8006734 >+0xc0>) - 800670c: 211c movs r1, #28 - 800670e: 4a0a ldr r2, [pc, #40] ; (8006738 >+0xc4>) - 8006710: f002 fce6 bl 80090e0 - 8006714: defe udf #254 ; 0xfe - 8006716: defe udf #254 ; 0xfe - 8006718: defe udf #254 ; 0xfe - 800671a: 4804 ldr r0, [pc, #16] ; (800672c >+0xb8>) - 800671c: 212c movs r1, #44 ; 0x2c - 800671e: 4a04 ldr r2, [pc, #16] ; (8006730 >+0xbc>) - 8006720: f002 fcde bl 80090e0 - 8006724: defe udf #254 ; 0xfe - 8006726: 46c0 nop ; (mov r8, r8) - 8006728: 0800c300 .word 0x0800c300 - 800672c: 0800c1ac .word 0x0800c1ac - 8006730: 0800c24c .word 0x0800c24c - 8006734: 0800c190 .word 0x0800c190 - 8006738: 0800c178 .word 0x0800c178 - -0800673c >: - 800673c: 4770 bx lr - ... - -08006740 : - } - } -} - -impl BumpAllocator { - pub fn alloc_critical(&self, layout: Layout, cs: &CriticalSection) -> Option> { - 8006740: b5f0 push {r4, r5, r6, r7, lr} - 8006742: af03 add r7, sp, #12 - 8006744: b085 sub sp, #20 - 8006746: 9103 str r1, [sp, #12] - 8006748: 0004 movs r4, r0 - 800674a: 6800 ldr r0, [r0, #0] - 800674c: 2800 cmp r0, #0 - 800674e: d145 bne.n 80067dc - 8006750: 0016 movs r6, r2 - 8006752: 2500 movs r5, #0 - 8006754: 43e8 mvns r0, r5 - copy_nonoverlapping(&src as *const T, dst, 1); - 8006756: 6020 str r0, [r4, #0] - let mut current_ptr = self.current_ptr.borrow(*cs).borrow_mut(); - - let ptr = if let Some(c) = *current_ptr { - 8006758: 6860 ldr r0, [r4, #4] - 800675a: 2800 cmp r0, #0 - 800675c: d102 bne.n 8006764 - c.as_ptr() as usize - } else { - (self.start_end.borrow(*cs).start)() - 800675e: 68a0 ldr r0, [r4, #8] - 8006760: f000 f85c bl 800681c - if !$e { - 8006764: 2e00 cmp r6, #0 - 8006766: d042 beq.n 80067ee - }; - - let alignment_bitmask = layout.align() - 1; - 8006768: 1e71 subs r1, r6, #1 - let fixup = ptr & alignment_bitmask; - 800676a: 0003 movs r3, r0 - 800676c: 400b ands r3, r1 - - let amount_to_add = (layout.align() - fixup) & alignment_bitmask; - 800676e: 1af2 subs r2, r6, r3 - 8006770: 9502 str r5, [sp, #8] - 8006772: 416d adcs r5, r5 - 8006774: 429e cmp r6, r3 - 8006776: d31f bcc.n 80067b8 - 8006778: 400a ands r2, r1 - - let resulting_ptr = ptr + amount_to_add; - 800677a: 1886 adds r6, r0, r2 - 800677c: d222 bcs.n 80067c4 - let new_current_ptr = resulting_ptr + layout.size(); - 800677e: 9803 ldr r0, [sp, #12] - 8006780: 1835 adds r5, r6, r0 - 8006782: d225 bcs.n 80067d0 - - if new_current_ptr as usize >= (self.start_end.borrow(*cs).end)() { - 8006784: 68e0 ldr r0, [r4, #12] - 8006786: f000 f849 bl 800681c - 800678a: 4285 cmp r5, r0 - 800678c: d209 bcs.n 80067a2 - return None; - } - - *current_ptr = NonNull::new(new_current_ptr as *mut _).map(SendNonNull); - 800678e: 6065 str r5, [r4, #4] - let borrow = self.borrow.get(); - 8006790: 6820 ldr r0, [r4, #0] - debug_assert!(is_writing(borrow)); - 8006792: 2800 cmp r0, #0 - 8006794: d409 bmi.n 80067aa - 8006796: 481a ldr r0, [pc, #104] ; (8006800 ) - 8006798: 2124 movs r1, #36 ; 0x24 - 800679a: 4a1a ldr r2, [pc, #104] ; (8006804 ) - 800679c: f002 fca0 bl 80090e0 - 80067a0: defe udf #254 ; 0xfe - let borrow = self.borrow.get(); - 80067a2: 6820 ldr r0, [r4, #0] - debug_assert!(is_writing(borrow)); - 80067a4: 2800 cmp r0, #0 - 80067a6: 9e02 ldr r6, [sp, #8] - 80067a8: d5f5 bpl.n 8006796 - 80067aa: 1c40 adds r0, r0, #1 - 80067ac: 6020 str r0, [r4, #0] - - NonNull::new(resulting_ptr as *mut _) - } - 80067ae: 0030 movs r0, r6 - 80067b0: b005 add sp, #20 - 80067b2: bcf0 pop {r4, r5, r6, r7} - 80067b4: bc02 pop {r1} - 80067b6: 4708 bx r1 - let amount_to_add = (layout.align() - fixup) & alignment_bitmask; - 80067b8: 4816 ldr r0, [pc, #88] ; (8006814 ) - 80067ba: 2121 movs r1, #33 ; 0x21 - 80067bc: 4a16 ldr r2, [pc, #88] ; (8006818 ) - 80067be: f002 fc8f bl 80090e0 - 80067c2: defe udf #254 ; 0xfe - let resulting_ptr = ptr + amount_to_add; - 80067c4: 4810 ldr r0, [pc, #64] ; (8006808 ) - 80067c6: 211c movs r1, #28 - 80067c8: 4a11 ldr r2, [pc, #68] ; (8006810 ) - 80067ca: f002 fc89 bl 80090e0 - 80067ce: defe udf #254 ; 0xfe - let new_current_ptr = resulting_ptr + layout.size(); - 80067d0: 480d ldr r0, [pc, #52] ; (8006808 ) - 80067d2: 211c movs r1, #28 - 80067d4: 4a0d ldr r2, [pc, #52] ; (800680c ) - 80067d6: f002 fc83 bl 80090e0 - 80067da: defe udf #254 ; 0xfe - 80067dc: 4805 ldr r0, [pc, #20] ; (80067f4 ) - 80067de: 9000 str r0, [sp, #0] - 80067e0: 4805 ldr r0, [pc, #20] ; (80067f8 ) - 80067e2: 2110 movs r1, #16 - 80067e4: aa04 add r2, sp, #16 - 80067e6: 4b05 ldr r3, [pc, #20] ; (80067fc ) - 80067e8: f001 fc58 bl 800809c - 80067ec: defe udf #254 ; 0xfe - ::core::intrinsics::abort(); - 80067ee: defe udf #254 ; 0xfe - 80067f0: defe udf #254 ; 0xfe - 80067f2: 46c0 nop ; (mov r8, r8) - 80067f4: 0800c340 .word 0x0800c340 - 80067f8: 0800c300 .word 0x0800c300 - 80067fc: 0800c310 .word 0x0800c310 - 8006800: 0800c2ca .word 0x0800c2ca - 8006804: 0800c2f0 .word 0x0800c2f0 - 8006808: 0800c3a0 .word 0x0800c3a0 - 800680c: 0800c3bc .word 0x0800c3bc - 8006810: 0800c384 .word 0x0800c384 - 8006814: 0800c350 .word 0x0800c350 - 8006818: 0800c374 .word 0x0800c374 - 800681c: 4700 bx r0 - -0800681e <_ZN4core3ptr48drop_in_place$LT$$RF$mut$u20$agb..mgba..Mgba$GT$17hd309ba7b217e9e91E.llvm.762686789252801379>: -pub unsafe fn drop_in_place(to_drop: *mut T) { - 800681e: 4770 bx lr - -08006820 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379>: - fn write_char(&mut self, c: char) -> Result { - 8006820: b5f0 push {r4, r5, r6, r7, lr} - 8006822: af03 add r7, sp, #12 - 8006824: b083 sub sp, #12 - (**self).write_char(c) - 8006826: 6806 ldr r6, [r0, #0] - 8006828: 2000 movs r0, #0 - self.write_str(c.encode_utf8(&mut [0; 4])) - 800682a: 9002 str r0, [sp, #8] - }; -} - -#[inline] -const fn len_utf8(code: u32) -> usize { - if code < MAX_ONE_B { - 800682c: 2980 cmp r1, #128 ; 0x80 - 800682e: d203 bcs.n 8006838 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x18> - 8006830: aa02 add r2, sp, #8 -#[inline] -pub fn encode_utf8_raw(code: u32, dst: &mut [u8]) -> &mut [u8] { - let len = len_utf8(code); - match (len, &mut dst[..]) { - (1, [a, ..]) => { - *a = code as u8; - 8006832: 7011 strb r1, [r2, #0] - 8006834: 2401 movs r4, #1 - 8006836: e02f b.n 8006898 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x78> - } else if code < MAX_TWO_B { - 8006838: 0aca lsrs r2, r1, #11 - 800683a: d10a bne.n 8006852 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x32> - 800683c: 223f movs r2, #63 ; 0x3f - } - (2, [a, b, ..]) => { - *a = (code >> 6 & 0x1F) as u8 | TAG_TWO_B; - *b = (code & 0x3F) as u8 | TAG_CONT; - 800683e: 400a ands r2, r1 - 8006840: 3280 adds r2, #128 ; 0x80 - 8006842: ab02 add r3, sp, #8 - 8006844: 705a strb r2, [r3, #1] - *a = (code >> 6 & 0x1F) as u8 | TAG_TWO_B; - 8006846: 0989 lsrs r1, r1, #6 - 8006848: 22c0 movs r2, #192 ; 0xc0 - 800684a: 430a orrs r2, r1 - 800684c: 701a strb r2, [r3, #0] - 800684e: 2402 movs r4, #2 - 8006850: e022 b.n 8006898 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x78> - } else if code < MAX_THREE_B { - 8006852: 0c0a lsrs r2, r1, #16 - 8006854: d10e bne.n 8006874 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x54> - 8006856: 223f movs r2, #63 ; 0x3f - } - (3, [a, b, c, ..]) => { - *a = (code >> 12 & 0x0F) as u8 | TAG_THREE_B; - *b = (code >> 6 & 0x3F) as u8 | TAG_CONT; - *c = (code & 0x3F) as u8 | TAG_CONT; - 8006858: 400a ands r2, r1 - 800685a: 3280 adds r2, #128 ; 0x80 - 800685c: ab02 add r3, sp, #8 - 800685e: 709a strb r2, [r3, #2] - *a = (code >> 12 & 0x0F) as u8 | TAG_THREE_B; - 8006860: 0b0a lsrs r2, r1, #12 - 8006862: 24e0 movs r4, #224 ; 0xe0 - 8006864: 4314 orrs r4, r2 - 8006866: 701c strb r4, [r3, #0] - *b = (code >> 6 & 0x3F) as u8 | TAG_CONT; - 8006868: 0509 lsls r1, r1, #20 - 800686a: 0e89 lsrs r1, r1, #26 - 800686c: 3180 adds r1, #128 ; 0x80 - 800686e: 7059 strb r1, [r3, #1] - 8006870: 2403 movs r4, #3 - 8006872: e011 b.n 8006898 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x78> - 8006874: 223f movs r2, #63 ; 0x3f - } - (4, [a, b, c, d, ..]) => { - *a = (code >> 18 & 0x07) as u8 | TAG_FOUR_B; - *b = (code >> 12 & 0x3F) as u8 | TAG_CONT; - *c = (code >> 6 & 0x3F) as u8 | TAG_CONT; - *d = (code & 0x3F) as u8 | TAG_CONT; - 8006876: 400a ands r2, r1 - 8006878: 3280 adds r2, #128 ; 0x80 - 800687a: ab02 add r3, sp, #8 - 800687c: 70da strb r2, [r3, #3] - *a = (code >> 18 & 0x07) as u8 | TAG_FOUR_B; - 800687e: 0c8a lsrs r2, r1, #18 - 8006880: 24f0 movs r4, #240 ; 0xf0 - 8006882: 4314 orrs r4, r2 - 8006884: 701c strb r4, [r3, #0] - *c = (code >> 6 & 0x3F) as u8 | TAG_CONT; - 8006886: 050a lsls r2, r1, #20 - 8006888: 0e92 lsrs r2, r2, #26 - 800688a: 3280 adds r2, #128 ; 0x80 - 800688c: 709a strb r2, [r3, #2] - *b = (code >> 12 & 0x3F) as u8 | TAG_CONT; - 800688e: 0389 lsls r1, r1, #14 - 8006890: 0e89 lsrs r1, r1, #26 - 8006892: 3180 adds r1, #128 ; 0x80 - 8006894: 7059 strb r1, [r3, #1] - 8006896: 2404 movs r4, #4 - 8006898: 4265 negs r5, r4 - 800689a: 4165 adcs r5, r4 - 800689c: 9601 str r6, [sp, #4] -} - -impl core::fmt::Write for Mgba { - fn write_str(&mut self, s: &str) -> Result<(), core::fmt::Error> { - let mut str_iter = s.bytes(); - while self.bytes_written < 255 { - 800689e: 6831 ldr r1, [r6, #0] - 80068a0: 2301 movs r3, #1 - 80068a2: 29fe cmp r1, #254 ; 0xfe - 80068a4: b408 push {r3} - 80068a6: bc40 pop {r6} - 80068a8: d800 bhi.n 80068ac <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x8c> - 80068aa: 0006 movs r6, r0 - 80068ac: 432e orrs r6, r5 - 80068ae: a802 add r0, sp, #8 - 80068b0: 2e00 cmp r6, #0 - 80068b2: d15d bne.n 8006970 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x150> - 80068b4: 1905 adds r5, r0, r4 - T: Copy, - { - // FIXME: this implementation, which sidesteps using `Option::map` since it's not const - // ready yet, should be reverted when possible to avoid code repetition - match self { - Some(&v) => Some(v), - 80068b6: 9802 ldr r0, [sp, #8] - 80068b8: 4a33 ldr r2, [pc, #204] ; (8006988 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x168>) - intrinsics::volatile_store(dst, src); - 80068ba: 5488 strb r0, [r1, r2] - match str_iter.next() { - Some(byte) => { - OUTPUT_STRING.set(self.bytes_written, byte); - self.bytes_written += 1; - 80068bc: 1c4e adds r6, r1, #1 - 80068be: 9801 ldr r0, [sp, #4] - 80068c0: 6006 str r6, [r0, #0] - 80068c2: a802 add r0, sp, #8 - 80068c4: 1c40 adds r0, r0, #1 - 80068c6: 1b42 subs r2, r0, r5 - 80068c8: 4250 negs r0, r2 - 80068ca: 4150 adcs r0, r2 - while self.bytes_written < 255 { - 80068cc: 2eff cmp r6, #255 ; 0xff - 80068ce: b408 push {r3} - 80068d0: bc10 pop {r4} - 80068d2: d000 beq.n 80068d6 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0xb6> - 80068d4: 0004 movs r4, r0 - 80068d6: 2c00 cmp r4, #0 - 80068d8: d14a bne.n 8006970 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x150> - 80068da: 2001 movs r0, #1 - 80068dc: 0200 lsls r0, r0, #8 - 80068de: 9000 str r0, [sp, #0] - pub fn get(&self, n: usize) -> T { - unsafe { (&mut (*self.array)[n] as *mut T).read_volatile() } - } - - pub fn set(&self, n: usize, val: T) { - unsafe { (&mut (*self.array)[n] as *mut T).write_volatile(val) } - 80068e0: 4286 cmp r6, r0 - 80068e2: d04a beq.n 800697a <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x15a> - 80068e4: aa02 add r2, sp, #8 - 80068e6: 7854 ldrb r4, [r2, #1] - 80068e8: 0028 movs r0, r5 - 80068ea: 4d27 ldr r5, [pc, #156] ; (8006988 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x168>) - 80068ec: 55ac strb r4, [r5, r6] - 80068ee: 0005 movs r5, r0 - self.bytes_written += 1; - 80068f0: 1c8e adds r6, r1, #2 - 80068f2: 9c01 ldr r4, [sp, #4] - 80068f4: 6026 str r6, [r4, #0] - 80068f6: 1c92 adds r2, r2, #2 - 80068f8: 1a12 subs r2, r2, r0 - 80068fa: 4254 negs r4, r2 - 80068fc: 4154 adcs r4, r2 - while self.bytes_written < 255 { - 80068fe: 2eff cmp r6, #255 ; 0xff - 8006900: b408 push {r3} - 8006902: bc04 pop {r2} - 8006904: d000 beq.n 8006908 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0xe8> - 8006906: 0022 movs r2, r4 - 8006908: 2a00 cmp r2, #0 - 800690a: d131 bne.n 8006970 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x150> - 800690c: 9a00 ldr r2, [sp, #0] - 800690e: 4296 cmp r6, r2 - 8006910: d033 beq.n 800697a <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x15a> - 8006912: aa02 add r2, sp, #8 - 8006914: 7894 ldrb r4, [r2, #2] - 8006916: 4d1c ldr r5, [pc, #112] ; (8006988 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x168>) - 8006918: 55ac strb r4, [r5, r6] - self.bytes_written += 1; - 800691a: 1cce adds r6, r1, #3 - 800691c: 9c01 ldr r4, [sp, #4] - 800691e: 6026 str r6, [r4, #0] - 8006920: 1cd2 adds r2, r2, #3 - 8006922: 1a12 subs r2, r2, r0 - 8006924: 4254 negs r4, r2 - 8006926: 4154 adcs r4, r2 - while self.bytes_written < 255 { - 8006928: 2eff cmp r6, #255 ; 0xff - 800692a: b408 push {r3} - 800692c: bc04 pop {r2} - 800692e: d000 beq.n 8006932 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x112> - 8006930: 0022 movs r2, r4 - 8006932: 2a00 cmp r2, #0 - 8006934: d11c bne.n 8006970 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x150> - 8006936: 9a00 ldr r2, [sp, #0] - 8006938: 4296 cmp r6, r2 - 800693a: d01e beq.n 800697a <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x15a> - 800693c: aa02 add r2, sp, #8 - 800693e: 78d4 ldrb r4, [r2, #3] - 8006940: 4d11 ldr r5, [pc, #68] ; (8006988 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x168>) - 8006942: 55ac strb r4, [r5, r6] - self.bytes_written += 1; - 8006944: 1d0e adds r6, r1, #4 - 8006946: 9c01 ldr r4, [sp, #4] - 8006948: 6026 str r6, [r4, #0] - 800694a: 1a82 subs r2, r0, r2 - 800694c: 1f12 subs r2, r2, #4 - 800694e: 4254 negs r4, r2 - 8006950: 4154 adcs r4, r2 - while self.bytes_written < 255 { - 8006952: 2eff cmp r6, #255 ; 0xff - 8006954: d000 beq.n 8006958 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x138> - 8006956: 0023 movs r3, r4 - 8006958: 2b00 cmp r3, #0 - 800695a: d109 bne.n 8006970 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x150> - 800695c: 9800 ldr r0, [sp, #0] - 800695e: 4286 cmp r6, r0 - 8006960: d00b beq.n 800697a <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x15a> - 8006962: a802 add r0, sp, #8 - 8006964: 7900 ldrb r0, [r0, #4] - 8006966: 4a08 ldr r2, [pc, #32] ; (8006988 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x168>) - 8006968: 5590 strb r0, [r2, r6] - self.bytes_written += 1; - 800696a: 1d48 adds r0, r1, #5 - 800696c: 9901 ldr r1, [sp, #4] - 800696e: 6008 str r0, [r1, #0] - 8006970: 2000 movs r0, #0 - } - 8006972: b003 add sp, #12 - 8006974: bcf0 pop {r4, r5, r6, r7} - 8006976: bc02 pop {r1} - 8006978: 4708 bx r1 - 800697a: 4a04 ldr r2, [pc, #16] ; (800698c <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$10write_char17ha980e71db072d783E.llvm.762686789252801379+0x16c>) - 800697c: 9800 ldr r0, [sp, #0] - 800697e: 0001 movs r1, r0 - 8006980: f002 fbc4 bl 800910c - 8006984: defe udf #254 ; 0xfe - 8006986: 46c0 nop ; (mov r8, r8) - 8006988: 04fff600 .word 0x04fff600 - 800698c: 0800b450 .word 0x0800b450 - -08006990 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$9write_fmt17ha44bce4fd07992dfE.llvm.762686789252801379>: - fn write_fmt(&mut self, args: Arguments<'_>) -> Result { - 8006990: b5b0 push {r4, r5, r7, lr} - 8006992: af02 add r7, sp, #8 - 8006994: b088 sub sp, #32 - (**self).write_fmt(args) - 8006996: 6800 ldr r0, [r0, #0] - 8006998: 9001 str r0, [sp, #4] - 800699a: aa02 add r2, sp, #8 - write(&mut self, args) - 800699c: 0010 movs r0, r2 - 800699e: c938 ldmia r1!, {r3, r4, r5} - 80069a0: c038 stmia r0!, {r3, r4, r5} - 80069a2: c938 ldmia r1!, {r3, r4, r5} - 80069a4: c038 stmia r0!, {r3, r4, r5} - 80069a6: a801 add r0, sp, #4 - 80069a8: 4903 ldr r1, [pc, #12] ; (80069b8 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$9write_fmt17ha44bce4fd07992dfE.llvm.762686789252801379+0x28>) - 80069aa: f000 f9af bl 8006d0c - } - 80069ae: b008 add sp, #32 - 80069b0: bcb0 pop {r4, r5, r7} - 80069b2: bc02 pop {r1} - 80069b4: 4708 bx r1 - 80069b6: 46c0 nop ; (mov r8, r8) - 80069b8: 0800c414 .word 0x0800c414 - -080069bc <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$9write_str17h66d4a05ce712f523E.llvm.762686789252801379>: - fn write_str(&mut self, s: &str) -> Result { - 80069bc: b5f0 push {r4, r5, r6, r7, lr} - 80069be: af03 add r7, sp, #12 - 80069c0: b081 sub sp, #4 - (**self).write_str(s) - 80069c2: 6803 ldr r3, [r0, #0] - while self.bytes_written < 255 { - 80069c4: 681c ldr r4, [r3, #0] - 80069c6: 2cfe cmp r4, #254 ; 0xfe - 80069c8: d80e bhi.n 80069e8 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$9write_str17h66d4a05ce712f523E.llvm.762686789252801379+0x2c> - 80069ca: 2001 movs r0, #1 - 80069cc: 0200 lsls r0, r0, #8 - 80069ce: 4d0b ldr r5, [pc, #44] ; (80069fc <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$9write_str17h66d4a05ce712f523E.llvm.762686789252801379+0x40>) - if is_empty!(self) { - 80069d0: 2a00 cmp r2, #0 - 80069d2: d009 beq.n 80069e8 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$9write_str17h66d4a05ce712f523E.llvm.762686789252801379+0x2c> - 80069d4: 42a0 cmp r0, r4 - 80069d6: d00c beq.n 80069f2 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$9write_str17h66d4a05ce712f523E.llvm.762686789252801379+0x36> - 80069d8: 780e ldrb r6, [r1, #0] - 80069da: 5566 strb r6, [r4, r5] - self.bytes_written += 1; - 80069dc: 1c64 adds r4, r4, #1 - 80069de: 601c str r4, [r3, #0] - while self.bytes_written < 255 { - 80069e0: 1e52 subs r2, r2, #1 - 80069e2: 1c49 adds r1, r1, #1 - 80069e4: 2cff cmp r4, #255 ; 0xff - 80069e6: d1f3 bne.n 80069d0 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$9write_str17h66d4a05ce712f523E.llvm.762686789252801379+0x14> - 80069e8: 2000 movs r0, #0 - } - 80069ea: b001 add sp, #4 - 80069ec: bcf0 pop {r4, r5, r6, r7} - 80069ee: bc02 pop {r1} - 80069f0: 4708 bx r1 - 80069f2: 4a03 ldr r2, [pc, #12] ; (8006a00 <_ZN50_$LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$9write_str17h66d4a05ce712f523E.llvm.762686789252801379+0x44>) - 80069f4: 0001 movs r1, r0 - 80069f6: f002 fb89 bl 800910c - 80069fa: defe udf #254 ; 0xfe - 80069fc: 04fff600 .word 0x04fff600 - 8006a00: 0800b450 .word 0x0800b450 - -08006a04 <::fmt>: -//! Errors that can occure while operating on modular bitfields. - -use core::fmt::Debug; - -/// The given value was out of range for the bitfield. -#[derive(Debug, PartialEq, Eq)] - 8006a04: b580 push {r7, lr} - 8006a06: af00 add r7, sp, #0 - 8006a08: 0008 movs r0, r1 - 8006a0a: 4903 ldr r1, [pc, #12] ; (8006a18 <::fmt+0x14>) - 8006a0c: 220b movs r2, #11 - 8006a0e: f000 fd63 bl 80074d8 - 8006a12: bc80 pop {r7} - 8006a14: bc02 pop {r1} - 8006a16: 4708 bx r1 - 8006a18: 0800c42c .word 0x0800c42c - -08006a1c : - -// One central function responsible for reporting capacity overflows. This'll -// ensure that the code generation related to these panics is minimal as there's -// only one location which panics rather than a bunch throughout the module. -#[cfg(not(no_global_oom_handling))] -fn capacity_overflow() -> ! { - 8006a1c: b580 push {r7, lr} - 8006a1e: af00 add r7, sp, #0 - 8006a20: b086 sub sp, #24 - 8006a22: 2000 movs r0, #0 - Arguments { pieces, fmt: None, args } - 8006a24: 9005 str r0, [sp, #20] - 8006a26: 4906 ldr r1, [pc, #24] ; (8006a40 ) - 8006a28: 9104 str r1, [sp, #16] - 8006a2a: 9003 str r0, [sp, #12] - 8006a2c: 9002 str r0, [sp, #8] - 8006a2e: 2001 movs r0, #1 - 8006a30: 9001 str r0, [sp, #4] - 8006a32: 4804 ldr r0, [pc, #16] ; (8006a44 ) - 8006a34: 9000 str r0, [sp, #0] - 8006a36: 4668 mov r0, sp - panic!("capacity overflow"); - 8006a38: 4903 ldr r1, [pc, #12] ; (8006a48 ) - 8006a3a: f002 fb87 bl 800914c - 8006a3e: defe udf #254 ; 0xfe - 8006a40: 0800c438 .word 0x0800c438 - 8006a44: 0800c4bc .word 0x0800c4bc - 8006a48: 0800c4c4 .word 0x0800c4c4 - -08006a4c : - pub const unsafe fn from_size_align_unchecked(size: usize, align: usize) -> Self { - 8006a4c: b5d0 push {r4, r6, r7, lr} - 8006a4e: af02 add r7, sp, #8 - intrinsics::ctpop(self as $ActualT) as u32 - 8006a50: 084a lsrs r2, r1, #1 - 8006a52: 4b0d ldr r3, [pc, #52] ; (8006a88 ) - 8006a54: 4013 ands r3, r2 - 8006a56: 1aca subs r2, r1, r3 - 8006a58: 4b0c ldr r3, [pc, #48] ; (8006a8c ) - 8006a5a: 0894 lsrs r4, r2, #2 - 8006a5c: 401a ands r2, r3 - 8006a5e: 401c ands r4, r3 - 8006a60: 1912 adds r2, r2, r4 - 8006a62: 0913 lsrs r3, r2, #4 - 8006a64: 18d2 adds r2, r2, r3 - 8006a66: 4b0a ldr r3, [pc, #40] ; (8006a90 ) - 8006a68: 4013 ands r3, r2 - 8006a6a: 4a0a ldr r2, [pc, #40] ; (8006a94 ) - 8006a6c: 435a muls r2, r3 - 8006a6e: 0e12 lsrs r2, r2, #24 - 8006a70: 2a01 cmp r2, #1 - 8006a72: d102 bne.n 8006a7a - } - 8006a74: bcd0 pop {r4, r6, r7} - 8006a76: bc04 pop {r2} - 8006a78: 4710 bx r2 - 8006a7a: 4807 ldr r0, [pc, #28] ; (8006a98 ) - 8006a7c: 2129 movs r1, #41 ; 0x29 - 8006a7e: 4a07 ldr r2, [pc, #28] ; (8006a9c ) - 8006a80: f002 fb2e bl 80090e0 - 8006a84: defe udf #254 ; 0xfe - 8006a86: 46c0 nop ; (mov r8, r8) - 8006a88: 55555555 .word 0x55555555 - 8006a8c: 33333333 .word 0x33333333 - 8006a90: 0f0f0f0f .word 0x0f0f0f0f - 8006a94: 01010101 .word 0x01010101 - 8006a98: 0800c4d4 .word 0x0800c4d4 - 8006a9c: 0800c578 .word 0x0800c578 - -08006aa0 : -/// [`take_alloc_error_hook`]: ../../std/alloc/fn.take_alloc_error_hook.html -#[stable(feature = "global_alloc", since = "1.28.0")] -#[rustc_const_unstable(feature = "const_alloc_error", issue = "92523")] -#[cfg(all(not(no_global_oom_handling), not(test)))] -#[cold] -pub const fn handle_alloc_error(layout: Layout) -> ! { - 8006aa0: b580 push {r7, lr} - 8006aa2: af00 add r7, sp, #0 - unsafe { - __rust_alloc_error_handler(layout.size(), layout.align()); - } - } - - unsafe { core::intrinsics::const_eval_select((layout,), ct_error, rt_error) } - 8006aa4: f000 f832 bl 8006b0c - 8006aa8: defe udf #254 ; 0xfe - -08006aaa : - fn rt_error(layout: Layout) -> ! { - 8006aaa: b580 push {r7, lr} - 8006aac: af00 add r7, sp, #0 - if !$e { - 8006aae: 2900 cmp r1, #0 - 8006ab0: d101 bne.n 8006ab6 - ::core::intrinsics::abort(); - 8006ab2: defe udf #254 ; 0xfe - 8006ab4: defe udf #254 ; 0xfe - __rust_alloc_error_handler(layout.size(), layout.align()); - 8006ab6: f7f9 fe67 bl 8000788 <__rust_alloc_error_handler> - 8006aba: defe udf #254 ; 0xfe - -08006abc <__rg_oom>: - panic!("memory allocation of {size} bytes failed") - } - - // if there is an `#[alloc_error_handler]` - #[rustc_std_internal_symbol] - pub unsafe fn __rg_oom(size: usize, align: usize) -> ! { - 8006abc: b580 push {r7, lr} - 8006abe: af00 add r7, sp, #0 - let layout = unsafe { Layout::from_size_align_unchecked(size, align) }; - 8006ac0: f7ff ffc4 bl 8006a4c - extern "Rust" { - #[lang = "oom"] - fn oom_impl(layout: Layout) -> !; - } - unsafe { oom_impl(layout) } - 8006ac4: f7f9 fe6a bl 800079c - 8006ac8: defe udf #254 ; 0xfe - ... - -08006acc ::remove::assert_failed>: - fn assert_failed(index: usize, len: usize) -> ! { - 8006acc: b580 push {r7, lr} - 8006ace: af00 add r7, sp, #0 - 8006ad0: b08c sub sp, #48 ; 0x30 - 8006ad2: 9101 str r1, [sp, #4] - 8006ad4: 9000 str r0, [sp, #0] - 8006ad6: 2002 movs r0, #2 - 8006ad8: 9007 str r0, [sp, #28] - 8006ada: a808 add r0, sp, #32 - 8006adc: 9006 str r0, [sp, #24] - 8006ade: 2000 movs r0, #0 - 8006ae0: 9005 str r0, [sp, #20] - 8006ae2: 9004 str r0, [sp, #16] - 8006ae4: 2003 movs r0, #3 - 8006ae6: 9003 str r0, [sp, #12] - 8006ae8: 4806 ldr r0, [pc, #24] ; (8006b04 ::remove::assert_failed+0x38>) - 8006aea: 9002 str r0, [sp, #8] - panic!("removal index (is {index}) should be < len (is {len})"); - 8006aec: 4806 ldr r0, [pc, #24] ; (8006b08 ::remove::assert_failed+0x3c>) - 8006aee: 900b str r0, [sp, #44] ; 0x2c - 8006af0: a901 add r1, sp, #4 - 8006af2: 910a str r1, [sp, #40] ; 0x28 - 8006af4: 9009 str r0, [sp, #36] ; 0x24 - 8006af6: 4668 mov r0, sp - 8006af8: 9008 str r0, [sp, #32] - 8006afa: a802 add r0, sp, #8 - 8006afc: 0011 movs r1, r2 - 8006afe: f002 fb25 bl 800914c - 8006b02: defe udf #254 ; 0xfe - 8006b04: 0800c5b4 .word 0x0800c5b4 - 8006b08: 08007f49 .word 0x08007f49 - -08006b0c : - reason = "const_eval_select will never be stable" -)] -#[rustc_const_unstable(feature = "const_eval_select", issue = "none")] -#[lang = "const_eval_select"] -#[rustc_do_not_const_check] -pub const unsafe fn const_eval_select( - 8006b0c: b580 push {r7, lr} - 8006b0e: af00 add r7, sp, #0 -) -> RET -where - F: ~const FnOnce, - G: FnOnce + ~const Destruct, -{ - called_at_rt.call_once(arg) - 8006b10: f000 f801 bl 8006b16 <_ZN4core3ops8function6FnOnce9call_once17hbcf164a9ffb9c4eaE.llvm.12007364597741989725> - 8006b14: defe udf #254 ; 0xfe - -08006b16 <_ZN4core3ops8function6FnOnce9call_once17hbcf164a9ffb9c4eaE.llvm.12007364597741989725>: - 8006b16: b580 push {r7, lr} - 8006b18: af00 add r7, sp, #0 - 8006b1a: f7ff ffc6 bl 8006aaa - 8006b1e: defe udf #254 ; 0xfe - -08006b20 <_ZN4core3fmt3num12GenericRadix7fmt_int17h201fe823e846fe78E.llvm.1471677695614126249>: - fn fmt_int(&self, mut x: T, f: &mut fmt::Formatter<'_>) -> fmt::Result { - 8006b20: b5f0 push {r4, r5, r6, r7, lr} - 8006b22: af03 add r7, sp, #12 - 8006b24: b0a5 sub sp, #148 ; 0x94 - 8006b26: 9103 str r1, [sp, #12] - 8006b28: 0005 movs r5, r0 - 8006b2a: 2200 movs r2, #0 - 8006b2c: 230f movs r3, #15 - 8006b2e: 2130 movs r1, #48 ; 0x30 - 8006b30: 2037 movs r0, #55 ; 0x37 - 8006b32: 9004 str r0, [sp, #16] - 8006b34: 267f movs r6, #127 ; 0x7f - 8006b36: e006 b.n 8006b46 <_ZN4core3fmt3num12GenericRadix7fmt_int17h201fe823e846fe78E.llvm.1471677695614126249+0x26> - 8006b38: 1820 adds r0, r4, r0 - 8006b3a: ac05 add r4, sp, #20 - fn to_u8(&self) -> u8 { *self as u8 } - 8006b3c: 18a4 adds r4, r4, r2 - 8006b3e: 55a0 strb r0, [r4, r6] - if x == zero { - 8006b40: 1e52 subs r2, r2, #1 - #[rustc_const_unstable(feature = "const_ops", issue = "90080")] - impl const Div for $t { - type Output = $t; - - #[inline] - fn div(self, other: $t) -> $t { self / other } - 8006b42: 092d lsrs r5, r5, #4 - 8006b44: d007 beq.n 8006b56 <_ZN4core3fmt3num12GenericRadix7fmt_int17h201fe823e846fe78E.llvm.1471677695614126249+0x36> - fn to_u8(&self) -> u8 { *self as u8 } - 8006b46: 0028 movs r0, r5 - 8006b48: 4018 ands r0, r3 -radix! { UpperHex, 16, "0x", x @ 0 ..= 9 => b'0' + x, x @ 10 ..= 15 => b'A' + (x - 10) } - 8006b4a: 280a cmp r0, #10 - 8006b4c: b402 push {r1} - 8006b4e: bc10 pop {r4} - 8006b50: d3f2 bcc.n 8006b38 <_ZN4core3fmt3num12GenericRadix7fmt_int17h201fe823e846fe78E.llvm.1471677695614126249+0x18> - 8006b52: 9c04 ldr r4, [sp, #16] - 8006b54: e7f0 b.n 8006b38 <_ZN4core3fmt3num12GenericRadix7fmt_int17h201fe823e846fe78E.llvm.1471677695614126249+0x18> - if self.start > slice.len() { - 8006b56: 0010 movs r0, r2 - 8006b58: 3080 adds r0, #128 ; 0x80 - 8006b5a: 2881 cmp r0, #129 ; 0x81 - 8006b5c: d20f bcs.n 8006b7e <_ZN4core3fmt3num12GenericRadix7fmt_int17h201fe823e846fe78E.llvm.1471677695614126249+0x5e> - 8006b5e: 4250 negs r0, r2 - f.pad_integral(is_nonnegative, Self::PREFIX, buf) - 8006b60: 9001 str r0, [sp, #4] - 8006b62: a805 add r0, sp, #20 - 8006b64: 1880 adds r0, r0, r2 - 8006b66: 3080 adds r0, #128 ; 0x80 - 8006b68: 9000 str r0, [sp, #0] - 8006b6a: 2101 movs r1, #1 - 8006b6c: 4a06 ldr r2, [pc, #24] ; (8006b88 <_ZN4core3fmt3num12GenericRadix7fmt_int17h201fe823e846fe78E.llvm.1471677695614126249+0x68>) - 8006b6e: 2302 movs r3, #2 - 8006b70: 9803 ldr r0, [sp, #12] - 8006b72: f000 f9b7 bl 8006ee4 - } - 8006b76: b025 add sp, #148 ; 0x94 - 8006b78: bcf0 pop {r4, r5, r6, r7} - 8006b7a: bc02 pop {r1} - 8006b7c: 4708 bx r1 - 8006b7e: 2180 movs r1, #128 ; 0x80 - slice_start_index_len_fail(self.start, slice.len()); - 8006b80: 4a02 ldr r2, [pc, #8] ; (8006b8c <_ZN4core3fmt3num12GenericRadix7fmt_int17h201fe823e846fe78E.llvm.1471677695614126249+0x6c>) - 8006b82: f001 fef1 bl 8008968 - 8006b86: defe udf #254 ; 0xfe - 8006b88: 0800c650 .word 0x0800c650 - 8006b8c: 0800c640 .word 0x0800c640 - -08006b90 <_ZN4core3fmt3num12GenericRadix7fmt_int17h270084e20ff88dd2E.llvm.1471677695614126249>: - fn fmt_int(&self, mut x: T, f: &mut fmt::Formatter<'_>) -> fmt::Result { - 8006b90: b5f0 push {r4, r5, r6, r7, lr} - 8006b92: af03 add r7, sp, #12 - 8006b94: b0a5 sub sp, #148 ; 0x94 - 8006b96: 9103 str r1, [sp, #12] - 8006b98: 0005 movs r5, r0 - 8006b9a: 2200 movs r2, #0 - 8006b9c: 230f movs r3, #15 - 8006b9e: 2130 movs r1, #48 ; 0x30 - 8006ba0: 2057 movs r0, #87 ; 0x57 - 8006ba2: 9004 str r0, [sp, #16] - 8006ba4: 267f movs r6, #127 ; 0x7f - 8006ba6: e006 b.n 8006bb6 <_ZN4core3fmt3num12GenericRadix7fmt_int17h270084e20ff88dd2E.llvm.1471677695614126249+0x26> - 8006ba8: 1820 adds r0, r4, r0 - 8006baa: ac05 add r4, sp, #20 - fn to_u8(&self) -> u8 { *self as u8 } - 8006bac: 18a4 adds r4, r4, r2 - 8006bae: 55a0 strb r0, [r4, r6] - if x == zero { - 8006bb0: 1e52 subs r2, r2, #1 - 8006bb2: 092d lsrs r5, r5, #4 - 8006bb4: d007 beq.n 8006bc6 <_ZN4core3fmt3num12GenericRadix7fmt_int17h270084e20ff88dd2E.llvm.1471677695614126249+0x36> - fn to_u8(&self) -> u8 { *self as u8 } - 8006bb6: 0028 movs r0, r5 - 8006bb8: 4018 ands r0, r3 -radix! { LowerHex, 16, "0x", x @ 0 ..= 9 => b'0' + x, x @ 10 ..= 15 => b'a' + (x - 10) } - 8006bba: 280a cmp r0, #10 - 8006bbc: b402 push {r1} - 8006bbe: bc10 pop {r4} - 8006bc0: d3f2 bcc.n 8006ba8 <_ZN4core3fmt3num12GenericRadix7fmt_int17h270084e20ff88dd2E.llvm.1471677695614126249+0x18> - 8006bc2: 9c04 ldr r4, [sp, #16] - 8006bc4: e7f0 b.n 8006ba8 <_ZN4core3fmt3num12GenericRadix7fmt_int17h270084e20ff88dd2E.llvm.1471677695614126249+0x18> - if self.start > slice.len() { - 8006bc6: 0010 movs r0, r2 - 8006bc8: 3080 adds r0, #128 ; 0x80 - 8006bca: 2881 cmp r0, #129 ; 0x81 - 8006bcc: d20f bcs.n 8006bee <_ZN4core3fmt3num12GenericRadix7fmt_int17h270084e20ff88dd2E.llvm.1471677695614126249+0x5e> - 8006bce: 4250 negs r0, r2 - f.pad_integral(is_nonnegative, Self::PREFIX, buf) - 8006bd0: 9001 str r0, [sp, #4] - 8006bd2: a805 add r0, sp, #20 - 8006bd4: 1880 adds r0, r0, r2 - 8006bd6: 3080 adds r0, #128 ; 0x80 - 8006bd8: 9000 str r0, [sp, #0] - 8006bda: 2101 movs r1, #1 - 8006bdc: 4a06 ldr r2, [pc, #24] ; (8006bf8 <_ZN4core3fmt3num12GenericRadix7fmt_int17h270084e20ff88dd2E.llvm.1471677695614126249+0x68>) - 8006bde: 2302 movs r3, #2 - 8006be0: 9803 ldr r0, [sp, #12] - 8006be2: f000 f97f bl 8006ee4 - } - 8006be6: b025 add sp, #148 ; 0x94 - 8006be8: bcf0 pop {r4, r5, r6, r7} - 8006bea: bc02 pop {r1} - 8006bec: 4708 bx r1 - 8006bee: 2180 movs r1, #128 ; 0x80 - slice_start_index_len_fail(self.start, slice.len()); - 8006bf0: 4a02 ldr r2, [pc, #8] ; (8006bfc <_ZN4core3fmt3num12GenericRadix7fmt_int17h270084e20ff88dd2E.llvm.1471677695614126249+0x6c>) - 8006bf2: f001 feb9 bl 8008968 - 8006bf6: defe udf #254 ; 0xfe - 8006bf8: 0800c650 .word 0x0800c650 - 8006bfc: 0800c640 .word 0x0800c640 - -08006c00 ::fmt>: - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - 8006c00: b5f0 push {r4, r5, r6, r7, lr} - 8006c02: af03 add r7, sp, #12 - 8006c04: b0a5 sub sp, #148 ; 0x94 - 8006c06: 9103 str r1, [sp, #12] - $Radix.fmt_int(*self as $U, f) - 8006c08: 6805 ldr r5, [r0, #0] - 8006c0a: 2200 movs r2, #0 - 8006c0c: 230f movs r3, #15 - 8006c0e: 2130 movs r1, #48 ; 0x30 - 8006c10: 2057 movs r0, #87 ; 0x57 - 8006c12: 9004 str r0, [sp, #16] - 8006c14: 267f movs r6, #127 ; 0x7f - 8006c16: e006 b.n 8006c26 ::fmt+0x26> - 8006c18: 1820 adds r0, r4, r0 - 8006c1a: ac05 add r4, sp, #20 - fn to_u8(&self) -> u8 { *self as u8 } - 8006c1c: 18a4 adds r4, r4, r2 - 8006c1e: 55a0 strb r0, [r4, r6] - if x == zero { - 8006c20: 1e52 subs r2, r2, #1 - 8006c22: 092d lsrs r5, r5, #4 - 8006c24: d007 beq.n 8006c36 ::fmt+0x36> - fn to_u8(&self) -> u8 { *self as u8 } - 8006c26: 0028 movs r0, r5 - 8006c28: 4018 ands r0, r3 -radix! { LowerHex, 16, "0x", x @ 0 ..= 9 => b'0' + x, x @ 10 ..= 15 => b'a' + (x - 10) } - 8006c2a: 280a cmp r0, #10 - 8006c2c: b402 push {r1} - 8006c2e: bc10 pop {r4} - 8006c30: d3f2 bcc.n 8006c18 ::fmt+0x18> - 8006c32: 9c04 ldr r4, [sp, #16] - 8006c34: e7f0 b.n 8006c18 ::fmt+0x18> - if self.start > slice.len() { - 8006c36: 0010 movs r0, r2 - 8006c38: 3080 adds r0, #128 ; 0x80 - 8006c3a: 2881 cmp r0, #129 ; 0x81 - 8006c3c: d20f bcs.n 8006c5e ::fmt+0x5e> - 8006c3e: 4250 negs r0, r2 - f.pad_integral(is_nonnegative, Self::PREFIX, buf) - 8006c40: 9001 str r0, [sp, #4] - 8006c42: a805 add r0, sp, #20 - 8006c44: 1880 adds r0, r0, r2 - 8006c46: 3080 adds r0, #128 ; 0x80 - 8006c48: 9000 str r0, [sp, #0] - 8006c4a: 2101 movs r1, #1 - 8006c4c: 4a06 ldr r2, [pc, #24] ; (8006c68 ::fmt+0x68>) - 8006c4e: 2302 movs r3, #2 - 8006c50: 9803 ldr r0, [sp, #12] - 8006c52: f000 f947 bl 8006ee4 - } - 8006c56: b025 add sp, #148 ; 0x94 - 8006c58: bcf0 pop {r4, r5, r6, r7} - 8006c5a: bc02 pop {r1} - 8006c5c: 4708 bx r1 - 8006c5e: 2180 movs r1, #128 ; 0x80 - slice_start_index_len_fail(self.start, slice.len()); - 8006c60: 4a02 ldr r2, [pc, #8] ; (8006c6c ::fmt+0x6c>) - 8006c62: f001 fe81 bl 8008968 - 8006c66: defe udf #254 ; 0xfe - 8006c68: 0800c650 .word 0x0800c650 - 8006c6c: 0800c640 .word 0x0800c640 - -08006c70 ::fmt>: - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - 8006c70: b5f0 push {r4, r5, r6, r7, lr} - 8006c72: af03 add r7, sp, #12 - 8006c74: b0a5 sub sp, #148 ; 0x94 - 8006c76: 9103 str r1, [sp, #12] - $Radix.fmt_int(*self as $U, f) - 8006c78: 6805 ldr r5, [r0, #0] - 8006c7a: 2200 movs r2, #0 - 8006c7c: 230f movs r3, #15 - 8006c7e: 2130 movs r1, #48 ; 0x30 - 8006c80: 2037 movs r0, #55 ; 0x37 - 8006c82: 9004 str r0, [sp, #16] - 8006c84: 267f movs r6, #127 ; 0x7f - 8006c86: e006 b.n 8006c96 ::fmt+0x26> - 8006c88: 1820 adds r0, r4, r0 - 8006c8a: ac05 add r4, sp, #20 - fn to_u8(&self) -> u8 { *self as u8 } - 8006c8c: 18a4 adds r4, r4, r2 - 8006c8e: 55a0 strb r0, [r4, r6] - if x == zero { - 8006c90: 1e52 subs r2, r2, #1 - 8006c92: 092d lsrs r5, r5, #4 - 8006c94: d007 beq.n 8006ca6 ::fmt+0x36> - fn to_u8(&self) -> u8 { *self as u8 } - 8006c96: 0028 movs r0, r5 - 8006c98: 4018 ands r0, r3 -radix! { UpperHex, 16, "0x", x @ 0 ..= 9 => b'0' + x, x @ 10 ..= 15 => b'A' + (x - 10) } - 8006c9a: 280a cmp r0, #10 - 8006c9c: b402 push {r1} - 8006c9e: bc10 pop {r4} - 8006ca0: d3f2 bcc.n 8006c88 ::fmt+0x18> - 8006ca2: 9c04 ldr r4, [sp, #16] - 8006ca4: e7f0 b.n 8006c88 ::fmt+0x18> - if self.start > slice.len() { - 8006ca6: 0010 movs r0, r2 - 8006ca8: 3080 adds r0, #128 ; 0x80 - 8006caa: 2881 cmp r0, #129 ; 0x81 - 8006cac: d20f bcs.n 8006cce ::fmt+0x5e> - 8006cae: 4250 negs r0, r2 - f.pad_integral(is_nonnegative, Self::PREFIX, buf) - 8006cb0: 9001 str r0, [sp, #4] - 8006cb2: a805 add r0, sp, #20 - 8006cb4: 1880 adds r0, r0, r2 - 8006cb6: 3080 adds r0, #128 ; 0x80 - 8006cb8: 9000 str r0, [sp, #0] - 8006cba: 2101 movs r1, #1 - 8006cbc: 4a06 ldr r2, [pc, #24] ; (8006cd8 ::fmt+0x68>) - 8006cbe: 2302 movs r3, #2 - 8006cc0: 9803 ldr r0, [sp, #12] - 8006cc2: f000 f90f bl 8006ee4 - } - 8006cc6: b025 add sp, #148 ; 0x94 - 8006cc8: bcf0 pop {r4, r5, r6, r7} - 8006cca: bc02 pop {r1} - 8006ccc: 4708 bx r1 - 8006cce: 2180 movs r1, #128 ; 0x80 - slice_start_index_len_fail(self.start, slice.len()); - 8006cd0: 4a02 ldr r2, [pc, #8] ; (8006cdc ::fmt+0x6c>) - 8006cd2: f001 fe49 bl 8008968 - 8006cd6: defe udf #254 ; 0xfe - 8006cd8: 0800c650 .word 0x0800c650 - 8006cdc: 0800c640 .word 0x0800c640 - -08006ce0 <_ZN4core3ops8function6FnOnce9call_once17he852cab797fe4d3bE.llvm.10536295135756948644>: - intrinsics::volatile_load(src) - 8006ce0: 6800 ldr r0, [r0, #0] - loop {} - 8006ce2: e7fe b.n 8006ce2 <_ZN4core3ops8function6FnOnce9call_once17he852cab797fe4d3bE.llvm.10536295135756948644+0x2> - -08006ce4 <_ZN4core3ptr52drop_in_place$LT$core..fmt..builders..PadAdapter$GT$17hf49268cc7616569fE.llvm.10536295135756948644>: -pub unsafe fn drop_in_place(to_drop: *mut T) { - 8006ce4: 4770 bx lr - -08006ce6 <::fmt>: - fn fmt(&self, fmt: &mut Formatter<'_>) -> Result { - 8006ce6: b5f0 push {r4, r5, r6, r7, lr} - 8006ce8: af03 add r7, sp, #12 - 8006cea: b087 sub sp, #28 - write(fmt.buf, *self) - 8006cec: 698a ldr r2, [r1, #24] - 8006cee: 9200 str r2, [sp, #0] - 8006cf0: 69c9 ldr r1, [r1, #28] - 8006cf2: aa01 add r2, sp, #4 - 8006cf4: 0014 movs r4, r2 - 8006cf6: c868 ldmia r0!, {r3, r5, r6} - 8006cf8: c468 stmia r4!, {r3, r5, r6} - 8006cfa: c868 ldmia r0!, {r3, r5, r6} - 8006cfc: c468 stmia r4!, {r3, r5, r6} - 8006cfe: 9800 ldr r0, [sp, #0] - 8006d00: f000 f804 bl 8006d0c - } - 8006d04: b007 add sp, #28 - 8006d06: bcf0 pop {r4, r5, r6, r7} - 8006d08: bc02 pop {r1} - 8006d0a: 4708 bx r1 - -08006d0c : -pub fn write(output: &mut dyn Write, args: Arguments<'_>) -> Result { - 8006d0c: b5f0 push {r4, r5, r6, r7, lr} - 8006d0e: af03 add r7, sp, #12 - 8006d10: b093 sub sp, #76 ; 0x4c - 8006d12: 2420 movs r4, #32 - 8006d14: ad0a add r5, sp, #40 ; 0x28 - 8006d16: 2303 movs r3, #3 - 8006d18: 9504 str r5, [sp, #16] - Formatter { - 8006d1a: 552b strb r3, [r5, r4] - 8006d1c: 940b str r4, [sp, #44] ; 0x2c - 8006d1e: 2600 movs r6, #0 - 8006d20: 960a str r6, [sp, #40] ; 0x28 - 8006d22: 9111 str r1, [sp, #68] ; 0x44 - 8006d24: 9010 str r0, [sp, #64] ; 0x40 - 8006d26: 960e str r6, [sp, #56] ; 0x38 - 8006d28: 960c str r6, [sp, #48] ; 0x30 - match args.fmt { - 8006d2a: 6890 ldr r0, [r2, #8] - 8006d2c: 9007 str r0, [sp, #28] - 8006d2e: 2800 cmp r0, #0 - 8006d30: 9205 str r2, [sp, #20] - 8006d32: d07b beq.n 8006e2c - Some(fmt) => { - 8006d34: 68d0 ldr r0, [r2, #12] - 8006d36: 0140 lsls r0, r0, #5 - 8006d38: 9002 str r0, [sp, #8] - 8006d3a: d100 bne.n 8006d3e - 8006d3c: e09d b.n 8006e7a - 8006d3e: 9804 ldr r0, [sp, #16] - 8006d40: 3020 adds r0, #32 - 8006d42: 9004 str r0, [sp, #16] - 8006d44: 9805 ldr r0, [sp, #20] - 8006d46: 6804 ldr r4, [r0, #0] - 8006d48: 6840 ldr r0, [r0, #4] - 8006d4a: 9003 str r0, [sp, #12] - 8006d4c: 2500 movs r5, #0 - 8006d4e: 002e movs r6, r5 - if !$e { - 8006d50: 9803 ldr r0, [sp, #12] - 8006d52: 4286 cmp r6, r0 - 8006d54: d300 bcc.n 8006d58 - 8006d56: e0ab b.n 8006eb0 - if !piece.is_empty() { - 8006d58: 6862 ldr r2, [r4, #4] - 8006d5a: 2a00 cmp r2, #0 - 8006d5c: d008 beq.n 8006d70 - formatter.buf.write_str(*piece)?; - 8006d5e: 9811 ldr r0, [sp, #68] ; 0x44 - 8006d60: 68c3 ldr r3, [r0, #12] - 8006d62: 6821 ldr r1, [r4, #0] - 8006d64: 9810 ldr r0, [sp, #64] ; 0x40 - 8006d66: f000 f8bb bl 8006ee0 - 8006d6a: 2800 cmp r0, #0 - 8006d6c: d000 beq.n 8006d70 - 8006d6e: e095 b.n 8006e9c - 8006d70: 9406 str r4, [sp, #24] - fmt.fill = arg.format.fill; - 8006d72: 9807 ldr r0, [sp, #28] - 8006d74: 1943 adds r3, r0, r5 - fmt.align = arg.format.align; - 8006d76: 7f18 ldrb r0, [r3, #28] - 8006d78: 9904 ldr r1, [sp, #16] - 8006d7a: 7008 strb r0, [r1, #0] - fmt.fill = arg.format.fill; - 8006d7c: 6858 ldr r0, [r3, #4] - 8006d7e: 900b str r0, [sp, #44] ; 0x2c - fmt.flags = arg.format.flags; - 8006d80: 6898 ldr r0, [r3, #8] - 8006d82: 900a str r0, [sp, #40] ; 0x28 - fmt.width = getcount(args, &arg.format.width); - 8006d84: 695a ldr r2, [r3, #20] - 8006d86: 6998 ldr r0, [r3, #24] - 8006d88: 9905 ldr r1, [sp, #20] - unsafe { run(&mut formatter, arg, args.args) }?; - 8006d8a: 690c ldr r4, [r1, #16] - 8006d8c: 9409 str r4, [sp, #36] ; 0x24 - 8006d8e: 6949 ldr r1, [r1, #20] - 8006d90: 9108 str r1, [sp, #32] - 8006d92: 2100 movs r1, #0 - match *cnt { - 8006d94: 2a00 cmp r2, #0 - 8006d96: d018 beq.n 8006dca - 8006d98: 2a01 cmp r2, #1 - 8006d9a: b402 push {r1} - 8006d9c: bc04 pop {r2} - 8006d9e: 9c06 ldr r4, [sp, #24] - 8006da0: d115 bne.n 8006dce - debug_assert!(i < args.len()); - 8006da2: 9a08 ldr r2, [sp, #32] - 8006da4: 4290 cmp r0, r2 - 8006da6: d300 bcc.n 8006daa - 8006da8: e08a b.n 8006ec0 - if self.formatter as usize == USIZE_MARKER as usize { - 8006daa: 00c2 lsls r2, r0, #3 - 8006dac: 9809 ldr r0, [sp, #36] ; 0x24 - 8006dae: 9201 str r2, [sp, #4] - 8006db0: 1880 adds r0, r0, r2 - 8006db2: 6840 ldr r0, [r0, #4] - 8006db4: 4a47 ldr r2, [pc, #284] ; (8006ed4 ) - 8006db6: 4290 cmp r0, r2 - 8006db8: b402 push {r1} - 8006dba: bc04 pop {r2} - 8006dbc: d107 bne.n 8006dce - Some(unsafe { *(self.value as *const _ as *const usize) }) - 8006dbe: 9809 ldr r0, [sp, #36] ; 0x24 - 8006dc0: 9a01 ldr r2, [sp, #4] - 8006dc2: 5880 ldr r0, [r0, r2] - 8006dc4: 6800 ldr r0, [r0, #0] - 8006dc6: 2201 movs r2, #1 - 8006dc8: e001 b.n 8006dce - 8006dca: 2201 movs r2, #1 - 8006dcc: 9c06 ldr r4, [sp, #24] - fmt.width = getcount(args, &arg.format.width); - 8006dce: 900d str r0, [sp, #52] ; 0x34 - 8006dd0: 920c str r2, [sp, #48] ; 0x30 - fmt.precision = getcount(args, &arg.format.precision); - 8006dd2: 68da ldr r2, [r3, #12] - 8006dd4: 6918 ldr r0, [r3, #16] - match *cnt { - 8006dd6: 2a00 cmp r2, #0 - 8006dd8: d00e beq.n 8006df8 - 8006dda: 2a01 cmp r2, #1 - 8006ddc: d10e bne.n 8006dfc - debug_assert!(i < args.len()); - 8006dde: 9a08 ldr r2, [sp, #32] - 8006de0: 4290 cmp r0, r2 - 8006de2: d26d bcs.n 8006ec0 - if self.formatter as usize == USIZE_MARKER as usize { - 8006de4: 00c2 lsls r2, r0, #3 - 8006de6: 9809 ldr r0, [sp, #36] ; 0x24 - 8006de8: 1880 adds r0, r0, r2 - 8006dea: 6840 ldr r0, [r0, #4] - 8006dec: 4b39 ldr r3, [pc, #228] ; (8006ed4 ) - 8006dee: 4298 cmp r0, r3 - 8006df0: d104 bne.n 8006dfc - Some(unsafe { *(self.value as *const _ as *const usize) }) - 8006df2: 9809 ldr r0, [sp, #36] ; 0x24 - 8006df4: 5880 ldr r0, [r0, r2] - 8006df6: 6800 ldr r0, [r0, #0] - 8006df8: 2101 movs r1, #1 - 8006dfa: e7ff b.n 8006dfc - fmt.precision = getcount(args, &arg.format.precision); - 8006dfc: 900f str r0, [sp, #60] ; 0x3c - 8006dfe: 910e str r1, [sp, #56] ; 0x38 - debug_assert!(arg.position < args.len()); - 8006e00: 9807 ldr r0, [sp, #28] - 8006e02: 5940 ldr r0, [r0, r5] - 8006e04: 9908 ldr r1, [sp, #32] - 8006e06: 4288 cmp r0, r1 - 8006e08: d254 bcs.n 8006eb4 - 8006e0a: 00c1 lsls r1, r0, #3 - 8006e0c: 9a09 ldr r2, [sp, #36] ; 0x24 - (value.formatter)(value.value, fmt) - 8006e0e: 5850 ldr r0, [r2, r1] - 8006e10: 1851 adds r1, r2, r1 - 8006e12: 684a ldr r2, [r1, #4] - 8006e14: a90a add r1, sp, #40 ; 0x28 - 8006e16: f000 f864 bl 8006ee2 - unsafe { run(&mut formatter, arg, args.args) }?; - 8006e1a: 2800 cmp r0, #0 - 8006e1c: d13e bne.n 8006e9c - 8006e1e: 1c76 adds r6, r6, #1 - 8006e20: 3520 adds r5, #32 - 8006e22: 3408 adds r4, #8 - 8006e24: 9802 ldr r0, [sp, #8] - 8006e26: 42a8 cmp r0, r5 - 8006e28: d192 bne.n 8006d50 - 8006e2a: e026 b.n 8006e7a - for (i, arg) in args.args.iter().enumerate() { - 8006e2c: 6950 ldr r0, [r2, #20] - 8006e2e: 2800 cmp r0, #0 - 8006e30: d023 beq.n 8006e7a - 8006e32: 9905 ldr r1, [sp, #20] - 8006e34: 690c ldr r4, [r1, #16] - 8006e36: 00c0 lsls r0, r0, #3 - 8006e38: 680d ldr r5, [r1, #0] - 8006e3a: 6849 ldr r1, [r1, #4] - 8006e3c: 9108 str r1, [sp, #32] - 8006e3e: 2600 movs r6, #0 - 8006e40: 9009 str r0, [sp, #36] ; 0x24 - 8006e42: 9808 ldr r0, [sp, #32] - 8006e44: 4286 cmp r6, r0 - 8006e46: d233 bcs.n 8006eb0 - if !piece.is_empty() { - 8006e48: 686a ldr r2, [r5, #4] - 8006e4a: 2a00 cmp r2, #0 - 8006e4c: d007 beq.n 8006e5e - formatter.buf.write_str(*piece)?; - 8006e4e: 9811 ldr r0, [sp, #68] ; 0x44 - 8006e50: 68c3 ldr r3, [r0, #12] - 8006e52: 6829 ldr r1, [r5, #0] - 8006e54: 9810 ldr r0, [sp, #64] ; 0x40 - 8006e56: f000 f843 bl 8006ee0 - 8006e5a: 2800 cmp r0, #0 - 8006e5c: d11e bne.n 8006e9c - (arg.formatter)(arg.value, &mut formatter)?; - 8006e5e: cc05 ldmia r4!, {r0, r2} - 8006e60: a90a add r1, sp, #40 ; 0x28 - 8006e62: 3c08 subs r4, #8 - 8006e64: f000 f83d bl 8006ee2 - 8006e68: 2800 cmp r0, #0 - 8006e6a: d117 bne.n 8006e9c - 8006e6c: 3408 adds r4, #8 - 8006e6e: 1c76 adds r6, r6, #1 - 8006e70: 9809 ldr r0, [sp, #36] ; 0x24 - 8006e72: 3808 subs r0, #8 - 8006e74: 3508 adds r5, #8 - 8006e76: 2800 cmp r0, #0 - 8006e78: d1e2 bne.n 8006e40 - if let Some(piece) = args.pieces.get(idx) { - 8006e7a: 9805 ldr r0, [sp, #20] - 8006e7c: 6840 ldr r0, [r0, #4] - if self < slice.len() { unsafe { Some(&*self.get_unchecked(slice)) } } else { None } - 8006e7e: 4286 cmp r6, r0 - 8006e80: d211 bcs.n 8006ea6 - formatter.buf.write_str(*piece)?; - 8006e82: 00f0 lsls r0, r6, #3 - if let Some(piece) = args.pieces.get(idx) { - 8006e84: 9905 ldr r1, [sp, #20] - 8006e86: 680a ldr r2, [r1, #0] - formatter.buf.write_str(*piece)?; - 8006e88: 5811 ldr r1, [r2, r0] - 8006e8a: 1810 adds r0, r2, r0 - 8006e8c: 6842 ldr r2, [r0, #4] - 8006e8e: 9811 ldr r0, [sp, #68] ; 0x44 - 8006e90: 68c3 ldr r3, [r0, #12] - 8006e92: 9810 ldr r0, [sp, #64] ; 0x40 - 8006e94: f000 f824 bl 8006ee0 - 8006e98: 2800 cmp r0, #0 - 8006e9a: d004 beq.n 8006ea6 - 8006e9c: 2001 movs r0, #1 -} - 8006e9e: b013 add sp, #76 ; 0x4c - 8006ea0: bcf0 pop {r4, r5, r6, r7} - 8006ea2: bc02 pop {r1} - 8006ea4: 4708 bx r1 - 8006ea6: 2000 movs r0, #0 - 8006ea8: b013 add sp, #76 ; 0x4c - 8006eaa: bcf0 pop {r4, r5, r6, r7} - 8006eac: bc02 pop {r1} - 8006eae: 4708 bx r1 - 8006eb0: defe udf #254 ; 0xfe - 8006eb2: defe udf #254 ; 0xfe - debug_assert!(arg.position < args.len()); - 8006eb4: 4808 ldr r0, [pc, #32] ; (8006ed8 ) - 8006eb6: 212b movs r1, #43 ; 0x2b - 8006eb8: 4a08 ldr r2, [pc, #32] ; (8006edc ) - 8006eba: f002 f911 bl 80090e0 - 8006ebe: defe udf #254 ; 0xfe - 8006ec0: 4802 ldr r0, [pc, #8] ; (8006ecc ) - 8006ec2: 2120 movs r1, #32 - 8006ec4: 4a02 ldr r2, [pc, #8] ; (8006ed0 ) - 8006ec6: f002 f90b bl 80090e0 - 8006eca: defe udf #254 ; 0xfe - 8006ecc: 0800c817 .word 0x0800c817 - 8006ed0: 0800c8fc .word 0x0800c8fc - 8006ed4: 08006ce1 .word 0x08006ce1 - 8006ed8: 0800c8c1 .word 0x0800c8c1 - 8006edc: 0800c8ec .word 0x0800c8ec - 8006ee0: 4718 bx r3 - 8006ee2: 4710 bx r2 - -08006ee4 : - pub fn pad_integral(&mut self, is_nonnegative: bool, prefix: &str, buf: &str) -> Result { - 8006ee4: b5f0 push {r4, r5, r6, r7, lr} - 8006ee6: af03 add r7, sp, #12 - 8006ee8: b08b sub sp, #44 ; 0x2c - 8006eea: 001e movs r6, r3 - 8006eec: 0004 movs r4, r0 - 8006eee: 68fb ldr r3, [r7, #12] - if !is_nonnegative { - 8006ef0: 2900 cmp r1, #0 - 8006ef2: d006 beq.n 8006f02 - self.flags & (1 << FlagV1::SignPlus as u32) != 0 - 8006ef4: 6820 ldr r0, [r4, #0] - } else if self.sign_plus() { - 8006ef6: 07c1 lsls r1, r0, #31 - 8006ef8: d10d bne.n 8006f16 - 8006efa: 2111 movs r1, #17 - 8006efc: 040d lsls r5, r1, #16 - 8006efe: 9308 str r3, [sp, #32] - 8006f00: e011 b.n 8006f26 - 8006f02: 2000 movs r0, #0 - width += 1; - 8006f04: 1c59 adds r1, r3, #1 - 8006f06: 4140 adcs r0, r0 - 8006f08: 4299 cmp r1, r3 - 8006f0a: d200 bcs.n 8006f0e - 8006f0c: e16b b.n 80071e6 - 8006f0e: 9108 str r1, [sp, #32] - self.flags & (1 << FlagV1::Alternate as u32) != 0 - 8006f10: 6820 ldr r0, [r4, #0] - 8006f12: 252d movs r5, #45 ; 0x2d - 8006f14: e007 b.n 8006f26 - 8006f16: 2100 movs r1, #0 - width += 1; - 8006f18: 1c5d adds r5, r3, #1 - 8006f1a: 4149 adcs r1, r1 - 8006f1c: 429d cmp r5, r3 - 8006f1e: d200 bcs.n 8006f22 - 8006f20: e16d b.n 80071fe - 8006f22: 9508 str r5, [sp, #32] - 8006f24: 252b movs r5, #43 ; 0x2b - let prefix = if self.alternate() { - 8006f26: 0741 lsls r1, r0, #29 - 8006f28: 2000 movs r0, #0 - 8006f2a: 2900 cmp r1, #0 - 8006f2c: 9305 str r3, [sp, #20] - 8006f2e: 9506 str r5, [sp, #24] - 8006f30: d426 bmi.n 8006f80 - 8006f32: 0002 movs r2, r0 - 8006f34: 9007 str r0, [sp, #28] - 8006f36: 9e08 ldr r6, [sp, #32] - 8006f38: 68bd ldr r5, [r7, #8] - match self.width { - 8006f3a: 68a0 ldr r0, [r4, #8] - 8006f3c: 2800 cmp r0, #0 - 8006f3e: d100 bne.n 8006f42 - 8006f40: e091 b.n 8007066 - 8006f42: 9508 str r5, [sp, #32] - 8006f44: 9209 str r2, [sp, #36] ; 0x24 - Some(min) if width >= min => { - 8006f46: 68e5 ldr r5, [r4, #12] - 8006f48: 42ae cmp r6, r5 - 8006f4a: d241 bcs.n 8006fd0 - Some(min) if self.sign_aware_zero_pad() => { - 8006f4c: 7820 ldrb r0, [r4, #0] - 8006f4e: 0700 lsls r0, r0, #28 - 8006f50: d451 bmi.n 8006ff6 - 8006f52: 2100 movs r1, #0 - let post_padding = self.padding(min - width, rt::v1::Alignment::Right)?; - 8006f54: 1ba8 subs r0, r5, r6 - 8006f56: b402 push {r1} - 8006f58: bc04 pop {r2} - 8006f5a: 414a adcs r2, r1 - 8006f5c: 42b5 cmp r5, r6 - 8006f5e: d200 bcs.n 8006f62 - 8006f60: e153 b.n 800720a - 8006f62: 2220 movs r2, #32 - let align = match self.align { - 8006f64: 5ca2 ldrb r2, [r4, r2] - let (pre_pad, post_pad) = match align { - 8006f66: 2a03 cmp r2, #3 - 8006f68: d100 bne.n 8006f6c - 8006f6a: 2201 movs r2, #1 - 8006f6c: 0793 lsls r3, r2, #30 - 8006f6e: d100 bne.n 8006f72 - 8006f70: e08b b.n 800708a - 8006f72: 2a01 cmp r2, #1 - 8006f74: d000 beq.n 8006f78 - 8006f76: e08c b.n 8007092 - 8006f78: 0022 movs r2, r4 - 8006f7a: 2100 movs r1, #0 - rt::v1::Alignment::Right | rt::v1::Alignment::Unknown => (padding, 0), - 8006f7c: 9102 str r1, [sp, #8] - 8006f7e: e092 b.n 80070a6 - 8006f80: 2e00 cmp r6, #0 - 8006f82: d500 bpl.n 8006f86 - 8006f84: e153 b.n 800722e -const USIZE_SIZE: usize = core::mem::size_of::(); -const UNROLL_INNER: usize = 4; - -#[inline] -pub(super) fn count_chars(s: &str) -> usize { - if s.len() < USIZE_SIZE * UNROLL_INNER { - 8006f86: 2e10 cmp r6, #16 - 8006f88: 9607 str r6, [sp, #28] - 8006f8a: 9209 str r2, [sp, #36] ; 0x24 - 8006f8c: d22d bcs.n 8006fea - 8006f8e: 2e00 cmp r6, #0 - 8006f90: d05b beq.n 800704a - 8006f92: 9404 str r4, [sp, #16] - 8006f94: 2300 movs r3, #0 - 8006f96: 2040 movs r0, #64 ; 0x40 - 8006f98: 43c1 mvns r1, r0 - 8006f9a: 2001 movs r0, #1 - 8006f9c: 900a str r0, [sp, #40] ; 0x28 - 8006f9e: 0018 movs r0, r3 - 8006fa0: 0014 movs r4, r2 - 8006fa2: 000a movs r2, r1 - Self: Sized, - F: FnMut(B, Self::Item) -> B, - { - let mut accum = init; - while let Some(x) = self.next() { - accum = f(accum, x); - 8006fa4: 7825 ldrb r5, [r4, #0] - 8006fa6: 062d lsls r5, r5, #24 - 8006fa8: 162d asrs r5, r5, #24 - -/// Checks whether the byte is a UTF-8 continuation byte (i.e., starts with the -/// bits `10`). -#[inline] -pub(super) const fn utf8_is_cont_byte(byte: u8) -> bool { - (byte as i8) < -64 - 8006faa: 4295 cmp r5, r2 - 8006fac: 9d0a ldr r5, [sp, #40] ; 0x28 - 8006fae: dc00 bgt.n 8006fb2 - 8006fb0: 001d movs r5, r3 - impl Sum for $a { - fn sum>(iter: I) -> Self { - iter.fold( - $zero, - #[rustc_inherit_overflow_checks] - |a, b| a + b, - 8006fb2: 1945 adds r5, r0, r5 - 8006fb4: b408 push {r3} - 8006fb6: bc02 pop {r1} - 8006fb8: 4159 adcs r1, r3 - 8006fba: 4285 cmp r5, r0 - 8006fbc: d200 bcs.n 8006fc0 - 8006fbe: e10c b.n 80071da - 8006fc0: 1e76 subs r6, r6, #1 - 8006fc2: 1c64 adds r4, r4, #1 - 8006fc4: 2e00 cmp r6, #0 - 8006fc6: b420 push {r5} - 8006fc8: bc01 pop {r0} - 8006fca: d1eb bne.n 8006fa4 - 8006fcc: 9c04 ldr r4, [sp, #16] - 8006fce: e03d b.n 800704c - write_prefix(self, sign, prefix)?; - 8006fd0: 0020 movs r0, r4 - 8006fd2: 9906 ldr r1, [sp, #24] - 8006fd4: 9a09 ldr r2, [sp, #36] ; 0x24 - 8006fd6: 9b07 ldr r3, [sp, #28] - 8006fd8: f000 f942 bl 8007260 - 8006fdc: 2800 cmp r0, #0 - 8006fde: d149 bne.n 8007074 - self.buf.write_str(buf) - 8006fe0: 69a0 ldr r0, [r4, #24] - 8006fe2: 69e1 ldr r1, [r4, #28] - 8006fe4: 68cb ldr r3, [r1, #12] - 8006fe6: 9908 ldr r1, [sp, #32] - 8006fe8: e04a b.n 8007080 - // difference is not likely to matter, or where it might even be slower. - // That said, a ton of thought was not spent on the particular threshold - // here, beyond "this value seems to make sense". - char_count_general_case(s.as_bytes()) - } else { - do_count_chars(s) - 8006fea: 0010 movs r0, r2 - 8006fec: 0031 movs r1, r6 - 8006fee: f001 f905 bl 80081fc - 8006ff2: 0005 movs r5, r0 - 8006ff4: e02a b.n 800704c - 8006ff6: 2020 movs r0, #32 - let result = ptr::read(dest); - 8006ff8: 5c21 ldrb r1, [r4, r0] - 8006ffa: 9102 str r1, [sp, #8] - 8006ffc: 2101 movs r1, #1 - 8006ffe: 9103 str r1, [sp, #12] - copy_nonoverlapping(&src as *const T, dst, 1); - 8007000: 5421 strb r1, [r4, r0] - 8007002: 6860 ldr r0, [r4, #4] - 8007004: 9001 str r0, [sp, #4] - 8007006: 2030 movs r0, #48 ; 0x30 - 8007008: 6060 str r0, [r4, #4] - write_prefix(self, sign, prefix)?; - 800700a: 0020 movs r0, r4 - 800700c: 9906 ldr r1, [sp, #24] - 800700e: 9a09 ldr r2, [sp, #36] ; 0x24 - 8007010: 9b07 ldr r3, [sp, #28] - 8007012: f000 f925 bl 8007260 - 8007016: 2800 cmp r0, #0 - 8007018: d000 beq.n 800701c - 800701a: e0a2 b.n 8007162 - 800701c: 2100 movs r1, #0 - let post_padding = self.padding(min - width, rt::v1::Alignment::Right)?; - 800701e: 1ba8 subs r0, r5, r6 - 8007020: b402 push {r1} - 8007022: bc04 pop {r2} - 8007024: 414a adcs r2, r1 - 8007026: 42b5 cmp r5, r6 - 8007028: d200 bcs.n 800702c - 800702a: e0f4 b.n 8007216 - 800702c: 0025 movs r5, r4 - 800702e: 3520 adds r5, #32 - let align = match self.align { - 8007030: 782a ldrb r2, [r5, #0] - let (pre_pad, post_pad) = match align { - 8007032: 2a03 cmp r2, #3 - 8007034: d100 bne.n 8007038 - 8007036: 2201 movs r2, #1 - 8007038: 0793 lsls r3, r2, #30 - 800703a: 9507 str r5, [sp, #28] - 800703c: d075 beq.n 800712a - 800703e: 2a01 cmp r2, #1 - 8007040: d177 bne.n 8007132 - 8007042: 0022 movs r2, r4 - 8007044: 2100 movs r1, #0 - rt::v1::Alignment::Right | rt::v1::Alignment::Unknown => (padding, 0), - 8007046: 9109 str r1, [sp, #36] ; 0x24 - 8007048: e07c b.n 8007144 - 800704a: 2500 movs r5, #0 - 800704c: 2000 movs r0, #0 - 800704e: 9908 ldr r1, [sp, #32] - width += prefix.chars().count(); - 8007050: 194e adds r6, r1, r5 - 8007052: 4140 adcs r0, r0 - 8007054: 428e cmp r6, r1 - 8007056: d200 bcs.n 800705a - 8007058: e0cb b.n 80071f2 - 800705a: 9a09 ldr r2, [sp, #36] ; 0x24 - 800705c: 68bd ldr r5, [r7, #8] - match self.width { - 800705e: 68a0 ldr r0, [r4, #8] - 8007060: 2800 cmp r0, #0 - 8007062: d000 beq.n 8007066 - 8007064: e76d b.n 8006f42 - write_prefix(self, sign, prefix)?; - 8007066: 0020 movs r0, r4 - 8007068: 9906 ldr r1, [sp, #24] - 800706a: 9b07 ldr r3, [sp, #28] - 800706c: f000 f8f8 bl 8007260 - 8007070: 2800 cmp r0, #0 - 8007072: d001 beq.n 8007078 - 8007074: 2501 movs r5, #1 - 8007076: e075 b.n 8007164 - self.buf.write_str(buf) - 8007078: 69a0 ldr r0, [r4, #24] - 800707a: 69e1 ldr r1, [r4, #28] - 800707c: 68cb ldr r3, [r1, #12] - 800707e: 0029 movs r1, r5 - 8007080: 9a05 ldr r2, [sp, #20] - 8007082: f000 f8eb bl 800725c - 8007086: 0005 movs r5, r0 - 8007088: e06c b.n 8007164 - 800708a: 0022 movs r2, r4 - 800708c: 9002 str r0, [sp, #8] - 800708e: 0008 movs r0, r1 - 8007090: e009 b.n 80070a6 - 8007092: 2200 movs r2, #0 - rt::v1::Alignment::Center => (padding / 2, (padding + 1) / 2), - 8007094: 1c41 adds r1, r0, #1 - 8007096: 4152 adcs r2, r2 - 8007098: 4281 cmp r1, r0 - 800709a: d200 bcs.n 800709e - 800709c: e0c1 b.n 8007222 - 800709e: 0022 movs r2, r4 - 80070a0: 0849 lsrs r1, r1, #1 - 80070a2: 9102 str r1, [sp, #8] - 80070a4: 0840 lsrs r0, r0, #1 - for _ in 0..pre_pad { - 80070a6: 1c44 adds r4, r0, #1 - 80070a8: 6850 ldr r0, [r2, #4] - 80070aa: 900a str r0, [sp, #40] ; 0x28 - 80070ac: 6996 ldr r6, [r2, #24] - 80070ae: 9204 str r2, [sp, #16] - 80070b0: 69d5 ldr r5, [r2, #28] - 80070b2: 2001 movs r0, #1 - 80070b4: 9003 str r0, [sp, #12] - 80070b6: 1e64 subs r4, r4, #1 - 80070b8: d007 beq.n 80070ca - self.buf.write_char(self.fill)?; - 80070ba: 692a ldr r2, [r5, #16] - 80070bc: 0030 movs r0, r6 - 80070be: 990a ldr r1, [sp, #40] ; 0x28 - 80070c0: f000 f8cd bl 800725e - 80070c4: 2800 cmp r0, #0 - 80070c6: d0f6 beq.n 80070b6 - 80070c8: e04b b.n 8007162 - 80070ca: 2011 movs r0, #17 - 80070cc: 0400 lsls r0, r0, #16 - 80070ce: 990a ldr r1, [sp, #40] ; 0x28 - 80070d0: 4281 cmp r1, r0 - 80070d2: d101 bne.n 80070d8 - 80070d4: 2100 movs r1, #0 - 80070d6: 9102 str r1, [sp, #8] - 80070d8: 9c04 ldr r4, [sp, #16] - 80070da: 9d05 ldr r5, [sp, #20] - 80070dc: 9b07 ldr r3, [sp, #28] - let post_padding = self.padding(min - width, rt::v1::Alignment::Right)?; - 80070de: 990a ldr r1, [sp, #40] ; 0x28 - 80070e0: 4281 cmp r1, r0 - 80070e2: d03e beq.n 8007162 - write_prefix(self, sign, prefix)?; - 80070e4: 0020 movs r0, r4 - 80070e6: 9906 ldr r1, [sp, #24] - 80070e8: 9a09 ldr r2, [sp, #36] ; 0x24 - 80070ea: f000 f8b9 bl 8007260 - 80070ee: 2800 cmp r0, #0 - 80070f0: d137 bne.n 8007162 - self.buf.write_str(buf)?; - 80070f2: 69a0 ldr r0, [r4, #24] - 80070f4: 69e1 ldr r1, [r4, #28] - 80070f6: 68cb ldr r3, [r1, #12] - 80070f8: 9908 ldr r1, [sp, #32] - 80070fa: 002a movs r2, r5 - 80070fc: f000 f8ae bl 800725c - 8007100: 2800 cmp r0, #0 - 8007102: 9d03 ldr r5, [sp, #12] - 8007104: d12e bne.n 8007164 - 8007106: 9804 ldr r0, [sp, #16] - 8007108: 6981 ldr r1, [r0, #24] - 800710a: 9109 str r1, [sp, #36] ; 0x24 - 800710c: 69c6 ldr r6, [r0, #28] - 800710e: 2400 movs r4, #0 - 8007110: 9d02 ldr r5, [sp, #8] - 8007112: 42a5 cmp r5, r4 - 8007114: d05b beq.n 80071ce - f.buf.write_char(self.fill)?; - 8007116: 6932 ldr r2, [r6, #16] - 8007118: 9809 ldr r0, [sp, #36] ; 0x24 - 800711a: 990a ldr r1, [sp, #40] ; 0x28 - 800711c: f000 f89f bl 800725e - unsafe { intrinsics::unchecked_add(self, rhs) } - 8007120: 1c64 adds r4, r4, #1 - 8007122: 2800 cmp r0, #0 - 8007124: d0f5 beq.n 8007112 - 8007126: 1e60 subs r0, r4, #1 - 8007128: e052 b.n 80071d0 - 800712a: 0022 movs r2, r4 - 800712c: 9009 str r0, [sp, #36] ; 0x24 - 800712e: 0008 movs r0, r1 - 8007130: e008 b.n 8007144 - 8007132: 2200 movs r2, #0 - rt::v1::Alignment::Center => (padding / 2, (padding + 1) / 2), - 8007134: 1c41 adds r1, r0, #1 - 8007136: 4152 adcs r2, r2 - 8007138: 4281 cmp r1, r0 - 800713a: d372 bcc.n 8007222 - 800713c: 0022 movs r2, r4 - 800713e: 0849 lsrs r1, r1, #1 - 8007140: 9109 str r1, [sp, #36] ; 0x24 - 8007142: 0840 lsrs r0, r0, #1 - for _ in 0..pre_pad { - 8007144: 1c44 adds r4, r0, #1 - 8007146: 6850 ldr r0, [r2, #4] - 8007148: 900a str r0, [sp, #40] ; 0x28 - 800714a: 6996 ldr r6, [r2, #24] - 800714c: 9204 str r2, [sp, #16] - 800714e: 69d5 ldr r5, [r2, #28] - 8007150: 1e64 subs r4, r4, #1 - 8007152: d00c beq.n 800716e - self.buf.write_char(self.fill)?; - 8007154: 692a ldr r2, [r5, #16] - 8007156: 0030 movs r0, r6 - 8007158: 990a ldr r1, [sp, #40] ; 0x28 - 800715a: f000 f880 bl 800725e - 800715e: 2800 cmp r0, #0 - 8007160: d0f6 beq.n 8007150 - 8007162: 9d03 ldr r5, [sp, #12] - } - 8007164: 0028 movs r0, r5 - 8007166: b00b add sp, #44 ; 0x2c - 8007168: bcf0 pop {r4, r5, r6, r7} - 800716a: bc02 pop {r1} - 800716c: 4708 bx r1 - 800716e: 2011 movs r0, #17 - 8007170: 0400 lsls r0, r0, #16 - 8007172: 990a ldr r1, [sp, #40] ; 0x28 - 8007174: 4281 cmp r1, r0 - 8007176: d101 bne.n 800717c - 8007178: 2100 movs r1, #0 - 800717a: 9109 str r1, [sp, #36] ; 0x24 - 800717c: 9c04 ldr r4, [sp, #16] - 800717e: 9a05 ldr r2, [sp, #20] - 8007180: 9908 ldr r1, [sp, #32] - 8007182: 9d03 ldr r5, [sp, #12] - let post_padding = self.padding(min - width, rt::v1::Alignment::Right)?; - 8007184: 9b0a ldr r3, [sp, #40] ; 0x28 - 8007186: 4283 cmp r3, r0 - 8007188: d0ec beq.n 8007164 - self.buf.write_str(buf)?; - 800718a: 69a0 ldr r0, [r4, #24] - 800718c: 69e3 ldr r3, [r4, #28] - 800718e: 68db ldr r3, [r3, #12] - 8007190: f000 f864 bl 800725c - 8007194: 2800 cmp r0, #0 - 8007196: d1e5 bne.n 8007164 - 8007198: 69a0 ldr r0, [r4, #24] - 800719a: 9008 str r0, [sp, #32] - 800719c: 69e6 ldr r6, [r4, #28] - 800719e: 2400 movs r4, #0 - 80071a0: 9809 ldr r0, [sp, #36] ; 0x24 - 80071a2: 42a0 cmp r0, r4 - 80071a4: d00b beq.n 80071be - f.buf.write_char(self.fill)?; - 80071a6: 6932 ldr r2, [r6, #16] - 80071a8: 9808 ldr r0, [sp, #32] - 80071aa: 990a ldr r1, [sp, #40] ; 0x28 - 80071ac: f000 f857 bl 800725e - 80071b0: 1c64 adds r4, r4, #1 - 80071b2: 2800 cmp r0, #0 - 80071b4: d0f4 beq.n 80071a0 - 80071b6: 1e60 subs r0, r4, #1 - post_padding.write(self)?; - 80071b8: 9909 ldr r1, [sp, #36] ; 0x24 - 80071ba: 4288 cmp r0, r1 - 80071bc: d3d2 bcc.n 8007164 - self.align = old_align; - 80071be: 9802 ldr r0, [sp, #8] - 80071c0: 9907 ldr r1, [sp, #28] - 80071c2: 7008 strb r0, [r1, #0] - self.fill = old_fill; - 80071c4: 9804 ldr r0, [sp, #16] - 80071c6: 9901 ldr r1, [sp, #4] - 80071c8: 6041 str r1, [r0, #4] - 80071ca: 2500 movs r5, #0 - 80071cc: e7ca b.n 8007164 - 80071ce: 0028 movs r0, r5 - 80071d0: 42a8 cmp r0, r5 - 80071d2: d200 bcs.n 80071d6 - 80071d4: e74e b.n 8007074 - 80071d6: 2500 movs r5, #0 - 80071d8: e7c4 b.n 8007164 - 80071da: 4819 ldr r0, [pc, #100] ; (8007240 ) - 80071dc: 211c movs r1, #28 - 80071de: 4a19 ldr r2, [pc, #100] ; (8007244 ) - 80071e0: f001 ff7e bl 80090e0 - 80071e4: defe udf #254 ; 0xfe - width += 1; - 80071e6: 4813 ldr r0, [pc, #76] ; (8007234 ) - 80071e8: 211c movs r1, #28 - 80071ea: 4a13 ldr r2, [pc, #76] ; (8007238 ) - 80071ec: f001 ff78 bl 80090e0 - 80071f0: defe udf #254 ; 0xfe - width += prefix.chars().count(); - 80071f2: 4810 ldr r0, [pc, #64] ; (8007234 ) - 80071f4: 211c movs r1, #28 - 80071f6: 4a14 ldr r2, [pc, #80] ; (8007248 ) - 80071f8: f001 ff72 bl 80090e0 - 80071fc: defe udf #254 ; 0xfe - width += 1; - 80071fe: 480d ldr r0, [pc, #52] ; (8007234 ) - 8007200: 211c movs r1, #28 - 8007202: 4a0e ldr r2, [pc, #56] ; (800723c ) - 8007204: f001 ff6c bl 80090e0 - 8007208: defe udf #254 ; 0xfe - let post_padding = self.padding(min - width, rt::v1::Alignment::Right)?; - 800720a: 4811 ldr r0, [pc, #68] ; (8007250 ) - 800720c: 2121 movs r1, #33 ; 0x21 - 800720e: 4a12 ldr r2, [pc, #72] ; (8007258 ) - 8007210: f001 ff66 bl 80090e0 - 8007214: defe udf #254 ; 0xfe - let post_padding = self.padding(min - width, rt::v1::Alignment::Right)?; - 8007216: 480e ldr r0, [pc, #56] ; (8007250 ) - 8007218: 2121 movs r1, #33 ; 0x21 - 800721a: 4a0e ldr r2, [pc, #56] ; (8007254 ) - 800721c: f001 ff60 bl 80090e0 - 8007220: defe udf #254 ; 0xfe - 8007222: 4804 ldr r0, [pc, #16] ; (8007234 ) - 8007224: 211c movs r1, #28 - 8007226: 4a09 ldr r2, [pc, #36] ; (800724c ) - 8007228: f001 ff5a bl 80090e0 - 800722c: defe udf #254 ; 0xfe - ::core::intrinsics::abort(); - 800722e: defe udf #254 ; 0xfe - 8007230: defe udf #254 ; 0xfe - 8007232: 46c0 nop ; (mov r8, r8) - 8007234: 0800c7d0 .word 0x0800c7d0 - 8007238: 0800c90c .word 0x0800c90c - 800723c: 0800c91c .word 0x0800c91c - 8007240: 0800e390 .word 0x0800e390 - 8007244: 0800e5f0 .word 0x0800e5f0 - 8007248: 0800c92c .word 0x0800c92c - 800724c: 0800c95c .word 0x0800c95c - 8007250: 0800c7a0 .word 0x0800c7a0 - 8007254: 0800c93c .word 0x0800c93c - 8007258: 0800c94c .word 0x0800c94c - 800725c: 4718 bx r3 - 800725e: 4710 bx r2 - -08007260 : - fn write_prefix(f: &mut Formatter<'_>, sign: Option, prefix: Option<&str>) -> Result { - 8007260: b5f0 push {r4, r5, r6, r7, lr} - 8007262: af03 add r7, sp, #12 - 8007264: b081 sub sp, #4 - 8007266: 001c movs r4, r3 - 8007268: 0015 movs r5, r2 - 800726a: 0006 movs r6, r0 - 800726c: 2011 movs r0, #17 - 800726e: 0400 lsls r0, r0, #16 - if let Some(c) = sign { - 8007270: 4281 cmp r1, r0 - 8007272: d00b beq.n 800728c - f.buf.write_char(c)?; - 8007274: 69b0 ldr r0, [r6, #24] - 8007276: 69f2 ldr r2, [r6, #28] - 8007278: 6912 ldr r2, [r2, #16] - 800727a: f000 f819 bl 80072b0 - 800727e: 2800 cmp r0, #0 - 8007280: d004 beq.n 800728c - 8007282: 2001 movs r0, #1 - } - 8007284: b001 add sp, #4 - 8007286: bcf0 pop {r4, r5, r6, r7} - 8007288: bc02 pop {r1} - 800728a: 4708 bx r1 - if let Some(prefix) = prefix { f.buf.write_str(prefix) } else { Ok(()) } - 800728c: 2d00 cmp r5, #0 - 800728e: d00a beq.n 80072a6 - 8007290: 69b0 ldr r0, [r6, #24] - 8007292: 69f1 ldr r1, [r6, #28] - 8007294: 68cb ldr r3, [r1, #12] - 8007296: 0029 movs r1, r5 - 8007298: 0022 movs r2, r4 - 800729a: f000 f80a bl 80072b2 - } - 800729e: b001 add sp, #4 - 80072a0: bcf0 pop {r4, r5, r6, r7} - 80072a2: bc02 pop {r1} - 80072a4: 4708 bx r1 - 80072a6: 2000 movs r0, #0 - 80072a8: b001 add sp, #4 - 80072aa: bcf0 pop {r4, r5, r6, r7} - 80072ac: bc02 pop {r1} - 80072ae: 4708 bx r1 - 80072b0: 4710 bx r2 - 80072b2: 4718 bx r3 - -080072b4 : - pub fn pad(&mut self, s: &str) -> Result { - 80072b4: b5f0 push {r4, r5, r6, r7, lr} - 80072b6: af03 add r7, sp, #12 - 80072b8: b089 sub sp, #36 ; 0x24 - 80072ba: 0016 movs r6, r2 - 80072bc: 000d movs r5, r1 - 80072be: 0004 movs r4, r0 - 80072c0: 6900 ldr r0, [r0, #16] - if self.width.is_none() && self.precision.is_none() { - 80072c2: 68a1 ldr r1, [r4, #8] - 80072c4: 2901 cmp r1, #1 - 80072c6: d001 beq.n 80072cc - 80072c8: 2801 cmp r0, #1 - 80072ca: d171 bne.n 80073b0 - let s = if let Some(max) = self.precision { - 80072cc: 2801 cmp r0, #1 - 80072ce: d138 bne.n 8007342 - 80072d0: 9105 str r1, [sp, #20] - 80072d2: 9403 str r4, [sp, #12] - 80072d4: 6964 ldr r4, [r4, #20] - 80072d6: 2000 movs r0, #0 - 80072d8: 9002 str r0, [sp, #8] - /// assert_eq!(None, char_indices.next()); - /// ``` - #[stable(feature = "rust1", since = "1.0.0")] - #[inline] - pub fn char_indices(&self) -> CharIndices<'_> { - CharIndices { front_offset: 0, iter: self.chars() } - 80072da: 9006 str r0, [sp, #24] - 80072dc: 9507 str r5, [sp, #28] - 80072de: 9504 str r5, [sp, #16] - 80072e0: 19a8 adds r0, r5, r6 - 80072e2: 9008 str r0, [sp, #32] - 80072e4: 2011 movs r0, #17 - 80072e6: 0405 lsls r5, r0, #16 - 80072e8: 2c00 cmp r4, #0 - 80072ea: d006 beq.n 80072fa - 80072ec: a806 add r0, sp, #24 - self.next().ok_or(i)?; - 80072ee: f000 fa35 bl 800775c <::next> - match self { - 80072f2: 42a9 cmp r1, r5 - 80072f4: d006 beq.n 8007304 - 80072f6: 1e64 subs r4, r4, #1 - 80072f8: d1f8 bne.n 80072ec - 80072fa: a806 add r0, sp, #24 - self.next() - 80072fc: f000 fa2e bl 800775c <::next> - if let Some((i, _)) = s.char_indices().nth(max) { - 8007300: 42a9 cmp r1, r5 - 8007302: d102 bne.n 800730a - 8007304: 9d04 ldr r5, [sp, #16] - 8007306: 9c03 ldr r4, [sp, #12] - 8007308: e01a b.n 8007340 - if index == 0 { - 800730a: 2800 cmp r0, #0 - 800730c: 9d04 ldr r5, [sp, #16] - 800730e: 9c03 ldr r4, [sp, #12] - 8007310: 9b02 ldr r3, [sp, #8] - 8007312: d00d beq.n 8007330 - 8007314: 42b0 cmp r0, r6 - 8007316: d208 bcs.n 800732a - Some(&b) => b.is_utf8_char_boundary(), - 8007318: 5629 ldrsb r1, [r5, r0] - 800731a: 2240 movs r2, #64 ; 0x40 - 800731c: 43d2 mvns r2, r2 - 800731e: 2300 movs r3, #0 -#[rustc_const_unstable(feature = "const_slice_index", issue = "none")] -unsafe impl const SliceIndex for ops::RangeTo { - type Output = str; - #[inline] - fn get(self, slice: &str) -> Option<&Self::Output> { - if slice.is_char_boundary(self.end) { - 8007320: 4291 cmp r1, r2 - 8007322: b408 push {r3} - 8007324: bc02 pop {r1} - 8007326: dc03 bgt.n 8007330 - 8007328: e004 b.n 8007334 - 800732a: b408 push {r3} - 800732c: bc02 pop {r1} - 800732e: d101 bne.n 8007334 - 8007330: 002b movs r3, r5 - 8007332: 0001 movs r1, r0 - match self { - 8007334: 2b00 cmp r3, #0 - 8007336: d000 beq.n 800733a - 8007338: 000e movs r6, r1 - 800733a: 2b00 cmp r3, #0 - 800733c: d000 beq.n 8007340 - 800733e: 001d movs r5, r3 - 8007340: 9905 ldr r1, [sp, #20] - match self.width { - 8007342: 2900 cmp r1, #0 - 8007344: d034 beq.n 80073b0 - 8007346: 2e00 cmp r6, #0 - 8007348: d500 bpl.n 800734c - 800734a: e0b8 b.n 80074be - 800734c: 68e3 ldr r3, [r4, #12] - if s.len() < USIZE_SIZE * UNROLL_INNER { - 800734e: 2e10 cmp r6, #16 - 8007350: 9602 str r6, [sp, #8] - 8007352: d238 bcs.n 80073c6 - 8007354: 2e00 cmp r6, #0 - 8007356: d051 beq.n 80073fc - 8007358: 9301 str r3, [sp, #4] - 800735a: 9403 str r4, [sp, #12] - 800735c: 2200 movs r2, #0 - 800735e: 2040 movs r0, #64 ; 0x40 - 8007360: 43c0 mvns r0, r0 - 8007362: 9005 str r0, [sp, #20] - 8007364: 2301 movs r3, #1 - 8007366: 002c movs r4, r5 - 8007368: 0035 movs r5, r6 - 800736a: 0010 movs r0, r2 - 800736c: 9404 str r4, [sp, #16] - accum = f(accum, x); - 800736e: 7826 ldrb r6, [r4, #0] - 8007370: 0636 lsls r6, r6, #24 - 8007372: 1636 asrs r6, r6, #24 - 8007374: 9905 ldr r1, [sp, #20] - 8007376: 428e cmp r6, r1 - 8007378: b408 push {r3} - 800737a: bc40 pop {r6} - 800737c: dc00 bgt.n 8007380 - 800737e: 0016 movs r6, r2 - 8007380: 1986 adds r6, r0, r6 - 8007382: b404 push {r2} - 8007384: bc02 pop {r1} - 8007386: 4151 adcs r1, r2 - 8007388: 4286 cmp r6, r0 - 800738a: d200 bcs.n 800738e - 800738c: e08b b.n 80074a6 - 800738e: 1e6d subs r5, r5, #1 - 8007390: 1c64 adds r4, r4, #1 - 8007392: 2d00 cmp r5, #0 - 8007394: b440 push {r6} - 8007396: bc01 pop {r0} - 8007398: d1e9 bne.n 800736e - 800739a: 9d04 ldr r5, [sp, #16] - 800739c: 9c03 ldr r4, [sp, #12] - 800739e: 9b01 ldr r3, [sp, #4] - if chars_count >= width { - 80073a0: 42b3 cmp r3, r6 - 80073a2: d819 bhi.n 80073d8 - self.buf.write_str(s) - 80073a4: 69a0 ldr r0, [r4, #24] - 80073a6: 69e1 ldr r1, [r4, #28] - 80073a8: 68cb ldr r3, [r1, #12] - 80073aa: 0029 movs r1, r5 - 80073ac: 9a02 ldr r2, [sp, #8] - 80073ae: e004 b.n 80073ba - 80073b0: 69a0 ldr r0, [r4, #24] - 80073b2: 69e1 ldr r1, [r4, #28] - 80073b4: 68cb ldr r3, [r1, #12] - 80073b6: 0029 movs r1, r5 - 80073b8: 0032 movs r2, r6 - 80073ba: f000 f88b bl 80074d4 - } - 80073be: b009 add sp, #36 ; 0x24 - 80073c0: bcf0 pop {r4, r5, r6, r7} - 80073c2: bc02 pop {r1} - 80073c4: 4708 bx r1 - do_count_chars(s) - 80073c6: 0028 movs r0, r5 - 80073c8: 0031 movs r1, r6 - 80073ca: 001e movs r6, r3 - 80073cc: f000 ff16 bl 80081fc - 80073d0: 0033 movs r3, r6 - 80073d2: 0006 movs r6, r0 - if chars_count >= width { - 80073d4: 42b3 cmp r3, r6 - 80073d6: d9e5 bls.n 80073a4 - 80073d8: 2020 movs r0, #32 - let align = match self.align { - 80073da: 5c20 ldrb r0, [r4, r0] - 80073dc: 2100 movs r1, #0 - let (pre_pad, post_pad) = match align { - 80073de: 2803 cmp r0, #3 - 80073e0: b402 push {r1} - 80073e2: bc04 pop {r2} - 80073e4: d000 beq.n 80073e8 - 80073e6: 0002 movs r2, r0 - 80073e8: 1b98 subs r0, r3, r6 - 80073ea: 0793 lsls r3, r2, #30 - 80073ec: 9504 str r5, [sp, #16] - 80073ee: d009 beq.n 8007404 - 80073f0: 2a01 cmp r2, #1 - 80073f2: d10b bne.n 800740c - 80073f4: 0022 movs r2, r4 - 80073f6: 2100 movs r1, #0 - rt::v1::Alignment::Right | rt::v1::Alignment::Unknown => (padding, 0), - 80073f8: 9103 str r1, [sp, #12] - 80073fa: e010 b.n 800741e - 80073fc: 2600 movs r6, #0 - if chars_count >= width { - 80073fe: 42b3 cmp r3, r6 - 8007400: d8ea bhi.n 80073d8 - 8007402: e7cf b.n 80073a4 - 8007404: 0022 movs r2, r4 - 8007406: 9003 str r0, [sp, #12] - 8007408: 0008 movs r0, r1 - 800740a: e008 b.n 800741e - 800740c: 2200 movs r2, #0 - rt::v1::Alignment::Center => (padding / 2, (padding + 1) / 2), - 800740e: 1c41 adds r1, r0, #1 - 8007410: 4152 adcs r2, r2 - 8007412: 4281 cmp r1, r0 - 8007414: d34d bcc.n 80074b2 - 8007416: 0022 movs r2, r4 - 8007418: 0849 lsrs r1, r1, #1 - 800741a: 9103 str r1, [sp, #12] - 800741c: 0840 lsrs r0, r0, #1 - for _ in 0..pre_pad { - 800741e: 1c44 adds r4, r0, #1 - 8007420: 6855 ldr r5, [r2, #4] - 8007422: 6990 ldr r0, [r2, #24] - 8007424: 9005 str r0, [sp, #20] - 8007426: 69d6 ldr r6, [r2, #28] - 8007428: 2001 movs r0, #1 - 800742a: 9001 str r0, [sp, #4] - 800742c: 1e64 subs r4, r4, #1 - 800742e: d007 beq.n 8007440 - self.buf.write_char(self.fill)?; - 8007430: 6932 ldr r2, [r6, #16] - 8007432: 9805 ldr r0, [sp, #20] - 8007434: 0029 movs r1, r5 - 8007436: f000 f84e bl 80074d6 - 800743a: 2800 cmp r0, #0 - 800743c: d0f6 beq.n 800742c - 800743e: e007 b.n 8007450 - 8007440: 2011 movs r0, #17 - 8007442: 0400 lsls r0, r0, #16 - 8007444: 4285 cmp r5, r0 - 8007446: d101 bne.n 800744c - 8007448: 2100 movs r1, #0 - 800744a: 9103 str r1, [sp, #12] - let post_padding = self.padding(width - chars_count, align)?; - 800744c: 4285 cmp r5, r0 - 800744e: d104 bne.n 800745a - 8007450: 9801 ldr r0, [sp, #4] - } - 8007452: b009 add sp, #36 ; 0x24 - 8007454: bcf0 pop {r4, r5, r6, r7} - 8007456: bc02 pop {r1} - 8007458: 4708 bx r1 - self.buf.write_str(s)?; - 800745a: 68f3 ldr r3, [r6, #12] - 800745c: 9805 ldr r0, [sp, #20] - 800745e: 9904 ldr r1, [sp, #16] - 8007460: 9a02 ldr r2, [sp, #8] - 8007462: f000 f837 bl 80074d4 - 8007466: 2800 cmp r0, #0 - 8007468: 9801 ldr r0, [sp, #4] - 800746a: d1a8 bne.n 80073be - 800746c: 2400 movs r4, #0 - 800746e: 9803 ldr r0, [sp, #12] - 8007470: 42a0 cmp r0, r4 - 8007472: d00a beq.n 800748a - f.buf.write_char(self.fill)?; - 8007474: 6932 ldr r2, [r6, #16] - 8007476: 9805 ldr r0, [sp, #20] - 8007478: 0029 movs r1, r5 - 800747a: f000 f82c bl 80074d6 - 800747e: 1c64 adds r4, r4, #1 - 8007480: 2800 cmp r0, #0 - 8007482: d0f4 beq.n 800746e - 8007484: 1e60 subs r0, r4, #1 - 8007486: 9903 ldr r1, [sp, #12] - 8007488: e001 b.n 800748e - 800748a: 9903 ldr r1, [sp, #12] - 800748c: 0008 movs r0, r1 - 800748e: 4288 cmp r0, r1 - 8007490: d304 bcc.n 800749c - 8007492: 2000 movs r0, #0 - } - 8007494: b009 add sp, #36 ; 0x24 - 8007496: bcf0 pop {r4, r5, r6, r7} - 8007498: bc02 pop {r1} - 800749a: 4708 bx r1 - 800749c: 2001 movs r0, #1 - 800749e: b009 add sp, #36 ; 0x24 - 80074a0: bcf0 pop {r4, r5, r6, r7} - 80074a2: bc02 pop {r1} - 80074a4: 4708 bx r1 - 80074a6: 4807 ldr r0, [pc, #28] ; (80074c4 ) - 80074a8: 211c movs r1, #28 - 80074aa: 4a07 ldr r2, [pc, #28] ; (80074c8 ) - 80074ac: f001 fe18 bl 80090e0 - 80074b0: defe udf #254 ; 0xfe - rt::v1::Alignment::Center => (padding / 2, (padding + 1) / 2), - 80074b2: 4806 ldr r0, [pc, #24] ; (80074cc ) - 80074b4: 211c movs r1, #28 - 80074b6: 4a06 ldr r2, [pc, #24] ; (80074d0 ) - 80074b8: f001 fe12 bl 80090e0 - 80074bc: defe udf #254 ; 0xfe - 80074be: defe udf #254 ; 0xfe - 80074c0: defe udf #254 ; 0xfe - 80074c2: 46c0 nop ; (mov r8, r8) - 80074c4: 0800e390 .word 0x0800e390 - 80074c8: 0800e5f0 .word 0x0800e5f0 - 80074cc: 0800c7d0 .word 0x0800c7d0 - 80074d0: 0800c95c .word 0x0800c95c - 80074d4: 4718 bx r3 - 80074d6: 4710 bx r2 - -080074d8 : - pub fn write_str(&mut self, data: &str) -> Result { - 80074d8: b5d0 push {r4, r6, r7, lr} - 80074da: af02 add r7, sp, #8 - self.buf.write_str(data) - 80074dc: 6983 ldr r3, [r0, #24] - 80074de: 69c0 ldr r0, [r0, #28] - 80074e0: 68c4 ldr r4, [r0, #12] - 80074e2: 0018 movs r0, r3 - 80074e4: f000 f803 bl 80074ee - } - 80074e8: bcd0 pop {r4, r6, r7} - 80074ea: bc02 pop {r1} - 80074ec: 4708 bx r1 - 80074ee: 4720 bx r4 - -080074f0 : - self.flags & (1 << FlagV1::DebugLowerHex as u32) != 0 - 80074f0: 7800 ldrb r0, [r0, #0] - 80074f2: 2110 movs r1, #16 - 80074f4: 4001 ands r1, r0 - 80074f6: 0908 lsrs r0, r1, #4 - } - 80074f8: 4770 bx lr - -080074fa : - self.flags & (1 << FlagV1::DebugUpperHex as u32) != 0 - 80074fa: 7800 ldrb r0, [r0, #0] - 80074fc: 2120 movs r1, #32 - 80074fe: 4001 ands r1, r0 - 8007500: 0948 lsrs r0, r1, #5 - } - 8007502: 4770 bx lr - -08007504 <::fmt>: - } -} - -#[stable(feature = "rust1", since = "1.0.0")] -impl Debug for char { - fn fmt(&self, f: &mut Formatter<'_>) -> Result { - 8007504: b5f0 push {r4, r5, r6, r7, lr} - 8007506: af03 add r7, sp, #12 - 8007508: b089 sub sp, #36 ; 0x24 - 800750a: 0006 movs r6, r0 - self.buf.write_char(c) - 800750c: 6988 ldr r0, [r1, #24] - 800750e: 69c9 ldr r1, [r1, #28] - 8007510: 690a ldr r2, [r1, #16] - 8007512: 2127 movs r1, #39 ; 0x27 - 8007514: 9007 str r0, [sp, #28] - 8007516: 9206 str r2, [sp, #24] - 8007518: f000 f91e bl 8007758 <::fmt+0x254> - 800751c: 2101 movs r1, #1 - f.write_char('\'')?; - 800751e: 2800 cmp r0, #0 - 8007520: d000 beq.n 8007524 <::fmt+0x20> - 8007522: e100 b.n 8007726 <::fmt+0x222> - 8007524: 9101 str r1, [sp, #4] - for c in self.escape_debug_ext(EscapeDebugExtArgs { - 8007526: 6834 ldr r4, [r6, #0] - 8007528: 2602 movs r6, #2 - let init_state = match self { - 800752a: 2c27 cmp r4, #39 ; 0x27 - 800752c: d858 bhi.n 80075e0 <::fmt+0xdc> - 800752e: 2030 movs r0, #48 ; 0x30 - 8007530: 9008 str r0, [sp, #32] - 8007532: 00a0 lsls r0, r4, #2 - 8007534: a101 add r1, pc, #4 ; (adr r1, 800753c <::fmt+0x38>) - 8007536: 5808 ldr r0, [r1, r0] - 8007538: 4687 mov pc, r0 - 800753a: 46c0 nop ; (mov r8, r8) - 800753c: 0800761f .word 0x0800761f - 8007540: 080075e5 .word 0x080075e5 - 8007544: 080075e5 .word 0x080075e5 - 8007548: 080075e5 .word 0x080075e5 - 800754c: 080075e5 .word 0x080075e5 - 8007550: 080075e5 .word 0x080075e5 - 8007554: 080075e5 .word 0x080075e5 - 8007558: 080075e5 .word 0x080075e5 - 800755c: 080075e5 .word 0x080075e5 - 8007560: 080075dd .word 0x080075dd - 8007564: 080075fd .word 0x080075fd - 8007568: 080075e5 .word 0x080075e5 - 800756c: 080075e5 .word 0x080075e5 - 8007570: 08007601 .word 0x08007601 - 8007574: 080075e5 .word 0x080075e5 - 8007578: 080075e5 .word 0x080075e5 - 800757c: 080075e5 .word 0x080075e5 - 8007580: 080075e5 .word 0x080075e5 - 8007584: 080075e5 .word 0x080075e5 - 8007588: 080075e5 .word 0x080075e5 - 800758c: 080075e5 .word 0x080075e5 - 8007590: 080075e5 .word 0x080075e5 - 8007594: 080075e5 .word 0x080075e5 - 8007598: 080075e5 .word 0x080075e5 - 800759c: 080075e5 .word 0x080075e5 - 80075a0: 080075e5 .word 0x080075e5 - 80075a4: 080075e5 .word 0x080075e5 - 80075a8: 080075e5 .word 0x080075e5 - 80075ac: 080075e5 .word 0x080075e5 - 80075b0: 080075e5 .word 0x080075e5 - 80075b4: 080075e5 .word 0x080075e5 - 80075b8: 080075e5 .word 0x080075e5 - 80075bc: 080075e5 .word 0x080075e5 - 80075c0: 080075e5 .word 0x080075e5 - 80075c4: 080075e5 .word 0x080075e5 - 80075c8: 080075e5 .word 0x080075e5 - 80075cc: 080075e5 .word 0x080075e5 - 80075d0: 080075e5 .word 0x080075e5 - 80075d4: 080075e5 .word 0x080075e5 - 80075d8: 080075fb .word 0x080075fb - 80075dc: 2074 movs r0, #116 ; 0x74 - 80075de: e010 b.n 8007602 <::fmt+0xfe> - 80075e0: 2c5c cmp r4, #92 ; 0x5c - 80075e2: d00a beq.n 80075fa <::fmt+0xf6> - unicode::Grapheme_Extend(self) - 80075e4: 0020 movs r0, r4 - 80075e6: f001 fcad bl 8008f44 - _ if args.escape_grapheme_extended && self.is_grapheme_extended() => { - 80075ea: 2800 cmp r0, #0 - 80075ec: d10b bne.n 8007606 <::fmt+0x102> - _ if is_printable(self) => EscapeDefaultState::Char(self), - 80075ee: 0020 movs r0, r4 - 80075f0: f001 f810 bl 8008614 - 80075f4: 2800 cmp r0, #0 - 80075f6: d006 beq.n 8007606 <::fmt+0x102> - 80075f8: 2601 movs r6, #1 - 80075fa: e00f b.n 800761c <::fmt+0x118> - 80075fc: 206e movs r0, #110 ; 0x6e - 80075fe: e000 b.n 8007602 <::fmt+0xfe> - 8007600: 2072 movs r0, #114 ; 0x72 - 8007602: 9008 str r0, [sp, #32] - 8007604: e00b b.n 800761e <::fmt+0x11a> - 8007606: 2101 movs r1, #1 - 8007608: 0020 movs r0, r4 - 800760a: 4308 orrs r0, r1 - 800760c: f001 fe5d bl 80092ca <__clzsi2> - 8007610: 0880 lsrs r0, r0, #2 - 8007612: 2107 movs r1, #7 - 8007614: 4041 eors r1, r0 - 8007616: 9105 str r1, [sp, #20] - 8007618: 2505 movs r5, #5 - 800761a: 2603 movs r6, #3 - 800761c: 9408 str r4, [sp, #32] - 800761e: 20ff movs r0, #255 ; 0xff - 8007620: 9004 str r0, [sp, #16] - 8007622: 43c0 mvns r0, r0 - 8007624: 9003 str r0, [sp, #12] - 8007626: 2400 movs r4, #0 - 8007628: 43e0 mvns r0, r4 - 800762a: 9002 str r0, [sp, #8] - 800762c: e005 b.n 800763a <::fmt+0x136> - self.buf.write_char(c) - 800762e: 9807 ldr r0, [sp, #28] - 8007630: 9a06 ldr r2, [sp, #24] - 8007632: f000 f891 bl 8007758 <::fmt+0x254> - escape_grapheme_extended: true, - escape_single_quote: true, - escape_double_quote: false, - }) { - f.write_char(c)? - 8007636: 2800 cmp r0, #0 - 8007638: d16d bne.n 8007716 <::fmt+0x212> - 800763a: 00b0 lsls r0, r6, #2 - 800763c: a102 add r1, pc, #8 ; (adr r1, 8007648 <::fmt+0x144>) - 800763e: 5808 ldr r0, [r1, r0] - 8007640: 0026 movs r6, r4 - 8007642: 9908 ldr r1, [sp, #32] - 8007644: 4687 mov pc, r0 - 8007646: 46c0 nop ; (mov r8, r8) - 8007648: 0800771b .word 0x0800771b - 800764c: 0800765f .word 0x0800765f - 8007650: 08007659 .word 0x08007659 - 8007654: 08007661 .word 0x08007661 - 8007658: 215c movs r1, #92 ; 0x5c - 800765a: 2601 movs r6, #1 - 800765c: e7e7 b.n 800762e <::fmt+0x12a> - 800765e: e7e6 b.n 800762e <::fmt+0x12a> -#[stable(feature = "rust1", since = "1.0.0")] -impl Iterator for EscapeUnicode { - type Item = char; - - fn next(&mut self) -> Option { - match self.state { - 8007660: 0028 movs r0, r5 - 8007662: 9904 ldr r1, [sp, #16] - 8007664: 4008 ands r0, r1 - 8007666: 46c0 nop ; (mov r8, r8) - 8007668: 4478 add r0, pc - 800766a: 7900 ldrb r0, [r0, #4] - 800766c: 0040 lsls r0, r0, #1 - 800766e: 4487 add pc, r0 - 8007670: 260b0254 .word 0x260b0254 - 8007674: 3b31 .short 0x3b31 - self.hex_digit_idx -= 1; - } - Some(c) - } - EscapeUnicodeState::RightBrace => { - self.state = EscapeUnicodeState::Done; - 8007676: 9805 ldr r0, [sp, #20] - 8007678: 9902 ldr r1, [sp, #8] - 800767a: 4008 ands r0, r1 - 800767c: 9005 str r0, [sp, #20] - 800767e: 9803 ldr r0, [sp, #12] - 8007680: 4005 ands r5, r0 - 8007682: 217d movs r1, #125 ; 0x7d - 8007684: 2603 movs r6, #3 - 8007686: e7d2 b.n 800762e <::fmt+0x12a> - 8007688: 2603 movs r6, #3 - 800768a: 07b0 lsls r0, r6, #30 - 800768c: 9a05 ldr r2, [sp, #20] - let hex_digit = ((self.c as u32) >> (self.hex_digit_idx * 4)) & 0xf; - 800768e: 0011 movs r1, r2 - 8007690: 4381 bics r1, r0 - 8007692: 1a50 subs r0, r2, r1 - 8007694: 1e41 subs r1, r0, #1 - 8007696: 4188 sbcs r0, r1 - 8007698: d14a bne.n 8007730 <::fmt+0x22c> - 800769a: 0090 lsls r0, r2, #2 - 800769c: 2820 cmp r0, #32 - 800769e: d24d bcs.n 800773c <::fmt+0x238> - 80076a0: 211c movs r1, #28 - 80076a2: 4008 ands r0, r1 - 80076a4: 9a08 ldr r2, [sp, #32] - 80076a6: 40c2 lsrs r2, r0 - 80076a8: 210f movs r1, #15 -pub(super) const fn from_digit(num: u32, radix: u32) -> Option { - if radix > 36 { - panic!("from_digit: radix is too high (maximum 36)"); - } - if num < radix { - let num = num as u8; - 80076aa: 4011 ands r1, r2 - if num < 10 { Some((b'0' + num) as char) } else { Some((b'a' + num - 10) as char) } - 80076ac: 290a cmp r1, #10 - 80076ae: d326 bcc.n 80076fe <::fmt+0x1fa> - 80076b0: 3157 adds r1, #87 ; 0x57 - 80076b2: 9805 ldr r0, [sp, #20] - if self.hex_digit_idx == 0 { - 80076b4: 2800 cmp r0, #0 - 80076b6: d026 beq.n 8007706 <::fmt+0x202> - self.hex_digit_idx -= 1; - 80076b8: 1e40 subs r0, r0, #1 - 80076ba: 9005 str r0, [sp, #20] - 80076bc: e7b7 b.n 800762e <::fmt+0x12a> - self.state = EscapeUnicodeState::Value; - 80076be: 9805 ldr r0, [sp, #20] - 80076c0: 9902 ldr r1, [sp, #8] - 80076c2: 4008 ands r0, r1 - 80076c4: 9005 str r0, [sp, #20] - 80076c6: 9803 ldr r0, [sp, #12] - 80076c8: 4005 ands r5, r0 - 80076ca: 2002 movs r0, #2 - 80076cc: 4305 orrs r5, r0 - 80076ce: 217b movs r1, #123 ; 0x7b - 80076d0: 2603 movs r6, #3 - 80076d2: e7ac b.n 800762e <::fmt+0x12a> - self.state = EscapeUnicodeState::LeftBrace; - 80076d4: 9805 ldr r0, [sp, #20] - 80076d6: 9902 ldr r1, [sp, #8] - 80076d8: 4008 ands r0, r1 - 80076da: 9005 str r0, [sp, #20] - 80076dc: 9803 ldr r0, [sp, #12] - 80076de: 4005 ands r5, r0 - 80076e0: 2603 movs r6, #3 - 80076e2: 4335 orrs r5, r6 - 80076e4: 2175 movs r1, #117 ; 0x75 - 80076e6: e7a2 b.n 800762e <::fmt+0x12a> - self.state = EscapeUnicodeState::Type; - 80076e8: 9805 ldr r0, [sp, #20] - 80076ea: 9902 ldr r1, [sp, #8] - 80076ec: 4008 ands r0, r1 - 80076ee: 9005 str r0, [sp, #20] - 80076f0: 9803 ldr r0, [sp, #12] - 80076f2: 4005 ands r5, r0 - 80076f4: 2004 movs r0, #4 - 80076f6: 4305 orrs r5, r0 - 80076f8: 215c movs r1, #92 ; 0x5c - 80076fa: 2603 movs r6, #3 - 80076fc: e797 b.n 800762e <::fmt+0x12a> - 80076fe: 3130 adds r1, #48 ; 0x30 - 8007700: 9805 ldr r0, [sp, #20] - if self.hex_digit_idx == 0 { - 8007702: 2800 cmp r0, #0 - 8007704: d1d8 bne.n 80076b8 <::fmt+0x1b4> - self.state = EscapeUnicodeState::RightBrace; - 8007706: 9a02 ldr r2, [sp, #8] - 8007708: 4010 ands r0, r2 - 800770a: 9005 str r0, [sp, #20] - 800770c: 9803 ldr r0, [sp, #12] - 800770e: 4005 ands r5, r0 - 8007710: 2001 movs r0, #1 - 8007712: 4305 orrs r5, r0 - 8007714: e78b b.n 800762e <::fmt+0x12a> - 8007716: 9901 ldr r1, [sp, #4] - 8007718: e005 b.n 8007726 <::fmt+0x222> - 800771a: 2127 movs r1, #39 ; 0x27 - self.buf.write_char(c) - 800771c: 9807 ldr r0, [sp, #28] - 800771e: 9a06 ldr r2, [sp, #24] - 8007720: f000 f81a bl 8007758 <::fmt+0x254> - 8007724: 0001 movs r1, r0 - } - f.write_char('\'') - } - 8007726: 0008 movs r0, r1 - 8007728: b009 add sp, #36 ; 0x24 - 800772a: bcf0 pop {r4, r5, r6, r7} - 800772c: bc02 pop {r1} - 800772e: 4708 bx r1 - let hex_digit = ((self.c as u32) >> (self.hex_digit_idx * 4)) & 0xf; - 8007730: 4807 ldr r0, [pc, #28] ; (8007750 <::fmt+0x24c>) - 8007732: 2121 movs r1, #33 ; 0x21 - 8007734: 4a07 ldr r2, [pc, #28] ; (8007754 <::fmt+0x250>) - 8007736: f001 fcd3 bl 80090e0 - 800773a: defe udf #254 ; 0xfe - 800773c: 4802 ldr r0, [pc, #8] ; (8007748 <::fmt+0x244>) - 800773e: 2124 movs r1, #36 ; 0x24 - 8007740: 4a02 ldr r2, [pc, #8] ; (800774c <::fmt+0x248>) - 8007742: f001 fccd bl 80090e0 - 8007746: defe udf #254 ; 0xfe - 8007748: 0800e470 .word 0x0800e470 - 800774c: 0800e454 .word 0x0800e454 - 8007750: 0800e430 .word 0x0800e430 - 8007754: 0800e420 .word 0x0800e420 - 8007758: 4710 bx r2 - ... - -0800775c <::next>: -#[stable(feature = "rust1", since = "1.0.0")] -impl<'a> Iterator for CharIndices<'a> { - type Item = (usize, char); - - #[inline] - fn next(&mut self) -> Option<(usize, char)> { - 800775c: b5f0 push {r4, r5, r6, r7, lr} - 800775e: af03 add r7, sp, #12 - 8007760: b087 sub sp, #28 - let pre_len = self.iter.iter.len(); - 8007762: 6842 ldr r2, [r0, #4] - 8007764: 6883 ldr r3, [r0, #8] - 8007766: 2111 movs r1, #17 - 8007768: 0409 lsls r1, r1, #16 - 800776a: 4293 cmp r3, r2 - 800776c: d037 beq.n 80077de <::next+0x82> - 800776e: 1c55 adds r5, r2, #1 - self.ptr = unsafe { NonNull::new_unchecked(self.ptr.as_ptr().offset(offset)) }; - 8007770: 6045 str r5, [r0, #4] -/// `bytes` must produce a valid UTF-8-like (UTF-8 or WTF-8) string -#[unstable(feature = "str_internals", issue = "none")] -#[inline] -pub unsafe fn next_code_point<'a, I: Iterator>(bytes: &mut I) -> Option { - // Decode UTF-8 - let x = *bytes.next()?; - 8007772: 7814 ldrb r4, [r2, #0] - 8007774: 0626 lsls r6, r4, #24 - 8007776: 1636 asrs r6, r6, #24 - if x < 128 { - 8007778: 9306 str r3, [sp, #24] - 800777a: d53a bpl.n 80077f2 <::next+0x96> - if is_empty!(self) { - 800777c: 429d cmp r5, r3 - 800777e: d06a beq.n 8007856 <::next+0xfa> - 8007780: 251f movs r5, #31 - 8007782: 4025 ands r5, r4 - 8007784: 9503 str r5, [sp, #12] - 8007786: 1c95 adds r5, r2, #2 - 8007788: 9505 str r5, [sp, #20] - self.ptr = unsafe { NonNull::new_unchecked(self.ptr.as_ptr().offset(offset)) }; - 800778a: 6045 str r5, [r0, #4] - // Decode from a byte combination out of: [[[x y] z] w] - // NOTE: Performance is sensitive to the exact formulation here - let init = utf8_first_byte(x, 2); - // SAFETY: `bytes` produces an UTF-8-like string, - // so the iterator must produce a value here. - let y = unsafe { *bytes.next().unwrap_unchecked() }; - 800778c: 7856 ldrb r6, [r2, #1] - 800778e: 253f movs r5, #63 ; 0x3f - 8007790: 9504 str r5, [sp, #16] - (ch << 6) | (byte & CONT_MASK) as u32 - 8007792: 9d04 ldr r5, [sp, #16] - 8007794: 402e ands r6, r5 - let mut ch = utf8_acc_cont_byte(init, y); - if x >= 0xE0 { - 8007796: 2cdf cmp r4, #223 ; 0xdf - 8007798: d923 bls.n 80077e2 <::next+0x86> - 800779a: 9601 str r6, [sp, #4] - if is_empty!(self) { - 800779c: 9d05 ldr r5, [sp, #20] - 800779e: 429d cmp r5, r3 - 80077a0: d05f beq.n 8007862 <::next+0x106> - 80077a2: 1cd5 adds r5, r2, #3 - 80077a4: 9505 str r5, [sp, #20] - self.ptr = unsafe { NonNull::new_unchecked(self.ptr.as_ptr().offset(offset)) }; - 80077a6: 6045 str r5, [r0, #4] - // [[x y z] w] case - // 5th bit in 0xE0 .. 0xEF is always clear, so `init` is still valid - // SAFETY: `bytes` produces an UTF-8-like string, - // so the iterator must produce a value here. - let z = unsafe { *bytes.next().unwrap_unchecked() }; - 80077a8: 7895 ldrb r5, [r2, #2] - (ch << 6) | (byte & CONT_MASK) as u32 - 80077aa: 9502 str r5, [sp, #8] - 80077ac: 9e04 ldr r6, [sp, #16] - 80077ae: 9d02 ldr r5, [sp, #8] - 80077b0: 4035 ands r5, r6 - 80077b2: 9502 str r5, [sp, #8] - 80077b4: 9e01 ldr r6, [sp, #4] - 80077b6: 01b6 lsls r6, r6, #6 - 80077b8: 9d02 ldr r5, [sp, #8] - 80077ba: 1976 adds r6, r6, r5 - let y_z = utf8_acc_cont_byte((y & CONT_MASK) as u32, z); - ch = init << 12 | y_z; - if x >= 0xF0 { - 80077bc: 2cf0 cmp r4, #240 ; 0xf0 - 80077be: d314 bcc.n 80077ea <::next+0x8e> - if is_empty!(self) { - 80077c0: 9c05 ldr r4, [sp, #20] - 80077c2: 429c cmp r4, r3 - 80077c4: d053 beq.n 800786e <::next+0x112> - 80077c6: 1d15 adds r5, r2, #4 - self.ptr = unsafe { NonNull::new_unchecked(self.ptr.as_ptr().offset(offset)) }; - 80077c8: 6045 str r5, [r0, #4] - // [x y z w] case - // use only the lower 3 bits of `init` - // SAFETY: `bytes` produces an UTF-8-like string, - // so the iterator must produce a value here. - let w = unsafe { *bytes.next().unwrap_unchecked() }; - 80077ca: 78d4 ldrb r4, [r2, #3] - (ch << 6) | (byte & CONT_MASK) as u32 - 80077cc: 9b04 ldr r3, [sp, #16] - 80077ce: 401c ands r4, r3 - 80077d0: 01b6 lsls r6, r6, #6 - 80077d2: 1934 adds r4, r6, r4 - ch = (init & 7) << 18 | utf8_acc_cont_byte(y_z, w); - 80077d4: 9b03 ldr r3, [sp, #12] - 80077d6: 075e lsls r6, r3, #29 - 80077d8: 0af6 lsrs r6, r6, #11 - 80077da: 19a4 adds r4, r4, r6 - 80077dc: e009 b.n 80077f2 <::next+0x96> - 80077de: 2200 movs r2, #0 - 80077e0: e022 b.n 8007828 <::next+0xcc> - 80077e2: 9b03 ldr r3, [sp, #12] - 80077e4: 019c lsls r4, r3, #6 - 80077e6: 19a4 adds r4, r4, r6 - 80077e8: e002 b.n 80077f0 <::next+0x94> - 80077ea: 9b03 ldr r3, [sp, #12] - 80077ec: 031c lsls r4, r3, #12 - 80077ee: 1934 adds r4, r6, r4 - 80077f0: 9d05 ldr r5, [sp, #20] - 80077f2: 261b movs r6, #27 - 80077f4: 02f6 lsls r6, r6, #11 - if (i ^ 0xD800).wrapping_sub(0x800) >= 0x110000 - 0x800 { - 80077f6: 4066 eors r6, r4 - 80077f8: 4b24 ldr r3, [pc, #144] ; (800788c <::next+0x130>) - 80077fa: 18f3 adds r3, r6, r3 - 80077fc: 4e24 ldr r6, [pc, #144] ; (8007890 <::next+0x134>) - match self { - 80077fe: 42b3 cmp r3, r6 - 8007800: d323 bcc.n 800784a <::next+0xee> - 8007802: 428c cmp r4, r1 - 8007804: d021 beq.n 800784a <::next+0xee> - 8007806: 9906 ldr r1, [sp, #24] - 8007808: 1a8a subs r2, r1, r2 - len!(self) - 800780a: 1b4d subs r5, r1, r5 - 800780c: 2100 movs r1, #0 - match self.iter.next() { - None => None, - Some(ch) => { - let index = self.front_offset; - let len = self.iter.iter.len(); - self.front_offset += pre_len - len; - 800780e: 1b53 subs r3, r2, r5 - 8007810: b402 push {r1} - 8007812: bc40 pop {r6} - 8007814: 414e adcs r6, r1 - 8007816: 42aa cmp r2, r5 - 8007818: d30b bcc.n 8007832 <::next+0xd6> - 800781a: 6802 ldr r2, [r0, #0] - 800781c: 18d3 adds r3, r2, r3 - 800781e: 4149 adcs r1, r1 - 8007820: 4293 cmp r3, r2 - 8007822: d30c bcc.n 800783e <::next+0xe2> - 8007824: 6003 str r3, [r0, #0] - 8007826: 0021 movs r1, r4 - Some((index, ch)) - } - } - } - 8007828: 0010 movs r0, r2 - 800782a: b007 add sp, #28 - 800782c: bcf0 pop {r4, r5, r6, r7} - 800782e: bc04 pop {r2} - 8007830: 4710 bx r2 - self.front_offset += pre_len - len; - 8007832: 481a ldr r0, [pc, #104] ; (800789c <::next+0x140>) - 8007834: 2121 movs r1, #33 ; 0x21 - 8007836: 4a1a ldr r2, [pc, #104] ; (80078a0 <::next+0x144>) - 8007838: f001 fc52 bl 80090e0 - 800783c: defe udf #254 ; 0xfe - 800783e: 4815 ldr r0, [pc, #84] ; (8007894 <::next+0x138>) - 8007840: 211c movs r1, #28 - 8007842: 4a15 ldr r2, [pc, #84] ; (8007898 <::next+0x13c>) - 8007844: f001 fc4c bl 80090e0 - 8007848: defe udf #254 ; 0xfe - None => panic("called `Option::unwrap()` on a `None` value"), - 800784a: 4816 ldr r0, [pc, #88] ; (80078a4 <::next+0x148>) - 800784c: 212b movs r1, #43 ; 0x2b - 800784e: 4a16 ldr r2, [pc, #88] ; (80078a8 <::next+0x14c>) - 8007850: f001 fc46 bl 80090e0 - 8007854: defe udf #254 ; 0xfe - debug_assert!(self.is_some()); - 8007856: 4809 ldr r0, [pc, #36] ; (800787c <::next+0x120>) - 8007858: 2120 movs r1, #32 - 800785a: 4a0b ldr r2, [pc, #44] ; (8007888 <::next+0x12c>) - 800785c: f001 fc40 bl 80090e0 - 8007860: defe udf #254 ; 0xfe - 8007862: 4806 ldr r0, [pc, #24] ; (800787c <::next+0x120>) - 8007864: 2120 movs r1, #32 - 8007866: 4a07 ldr r2, [pc, #28] ; (8007884 <::next+0x128>) - 8007868: f001 fc3a bl 80090e0 - 800786c: defe udf #254 ; 0xfe - 800786e: 4803 ldr r0, [pc, #12] ; (800787c <::next+0x120>) - 8007870: 2120 movs r1, #32 - 8007872: 4a03 ldr r2, [pc, #12] ; (8007880 <::next+0x124>) - 8007874: f001 fc34 bl 80090e0 - 8007878: defe udf #254 ; 0xfe - 800787a: 46c0 nop ; (mov r8, r8) - 800787c: 0800b551 .word 0x0800b551 - 8007880: 0800ca9c .word 0x0800ca9c - 8007884: 0800ca8c .word 0x0800ca8c - 8007888: 0800ca7c .word 0x0800ca7c - 800788c: ffef0000 .word 0xffef0000 - 8007890: ffef0800 .word 0xffef0800 - 8007894: 0800c7d0 .word 0x0800c7d0 - 8007898: 0800c9f0 .word 0x0800c9f0 - 800789c: 0800c7a0 .word 0x0800c7a0 - 80078a0: 0800c9e0 .word 0x0800c9e0 - 80078a4: 0800c7ec .word 0x0800c7ec - 80078a8: 0800c790 .word 0x0800c790 - -080078ac <<&T as core::fmt::Debug>::fmt>: - fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } - 80078ac: b580 push {r7, lr} - 80078ae: af00 add r7, sp, #0 - 80078b0: 0008 movs r0, r1 - -#[stable(feature = "rust1", since = "1.0.0")] -impl Debug for () { - #[inline] - fn fmt(&self, f: &mut Formatter<'_>) -> Result { - f.pad("()") - 80078b2: 4903 ldr r1, [pc, #12] ; (80078c0 <<&T as core::fmt::Debug>::fmt+0x14>) - 80078b4: 2202 movs r2, #2 - 80078b6: f7ff fcfd bl 80072b4 - fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } - 80078ba: bc80 pop {r7} - 80078bc: bc02 pop {r1} - 80078be: 4708 bx r1 - 80078c0: 0800c96c .word 0x0800c96c - -080078c4 <<&T as core::fmt::Debug>::fmt>: - 80078c4: b580 push {r7, lr} - 80078c6: af00 add r7, sp, #0 - 80078c8: 6802 ldr r2, [r0, #0] - 80078ca: 6840 ldr r0, [r0, #4] - 80078cc: 68c3 ldr r3, [r0, #12] - 80078ce: 0010 movs r0, r2 - 80078d0: f000 f803 bl 80078da <<&T as core::fmt::Debug>::fmt+0x16> - 80078d4: bc80 pop {r7} - 80078d6: bc02 pop {r1} - 80078d8: 4708 bx r1 - 80078da: 4718 bx r3 - -080078dc <<&T as core::fmt::Display>::fmt>: - 80078dc: b580 push {r7, lr} - 80078de: af00 add r7, sp, #0 - 80078e0: 000b movs r3, r1 - 80078e2: 6800 ldr r0, [r0, #0] - 80078e4: c806 ldmia r0!, {r1, r2} - f.pad(self) - 80078e6: 0018 movs r0, r3 - 80078e8: f7ff fce4 bl 80072b4 - fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } - 80078ec: bc80 pop {r7} - 80078ee: bc02 pop {r1} - 80078f0: 4708 bx r1 - -080078f2 <<&T as core::fmt::Display>::fmt>: - 80078f2: b580 push {r7, lr} - 80078f4: af00 add r7, sp, #0 - 80078f6: 000b movs r3, r1 - 80078f8: c806 ldmia r0!, {r1, r2} - f.pad(self) - 80078fa: 0018 movs r0, r3 - 80078fc: f7ff fcda bl 80072b4 - fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } - 8007900: bc80 pop {r7} - 8007902: bc02 pop {r1} - 8007904: 4708 bx r1 - -08007906 <<&T as core::fmt::Display>::fmt>: - 8007906: b5f0 push {r4, r5, r6, r7, lr} - 8007908: af03 add r7, sp, #12 - 800790a: b087 sub sp, #28 - write(fmt.buf, *self) - 800790c: 698a ldr r2, [r1, #24] - 800790e: 9200 str r2, [sp, #0] - 8007910: 69c9 ldr r1, [r1, #28] - fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } - 8007912: 6800 ldr r0, [r0, #0] - 8007914: aa01 add r2, sp, #4 - write(fmt.buf, *self) - 8007916: 0014 movs r4, r2 - 8007918: c868 ldmia r0!, {r3, r5, r6} - 800791a: c468 stmia r4!, {r3, r5, r6} - 800791c: c868 ldmia r0!, {r3, r5, r6} - 800791e: c468 stmia r4!, {r3, r5, r6} - 8007920: 9800 ldr r0, [sp, #0] - 8007922: f7ff f9f3 bl 8006d0c - fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } - 8007926: b007 add sp, #28 - 8007928: bcf0 pop {r4, r5, r6, r7} - 800792a: bc02 pop {r1} - 800792c: 4708 bx r1 - -0800792e <_ZN4core3ptr25drop_in_place$LT$char$GT$17h449ec997af88cb61E.llvm.5455399706166832180>: -pub unsafe fn drop_in_place(to_drop: *mut T) { - 800792e: 4770 bx lr - -08007930 <::write_str>: - fmt.wrap_buf(move |buf| slot.insert(PadAdapter { buf, state })) - } -} - -impl fmt::Write for PadAdapter<'_, '_> { - fn write_str(&mut self, mut s: &str) -> fmt::Result { - 8007930: b5f0 push {r4, r5, r6, r7, lr} - 8007932: af03 add r7, sp, #12 - 8007934: b08f sub sp, #60 ; 0x3c - while !s.is_empty() { - 8007936: 2a00 cmp r2, #0 - 8007938: d100 bne.n 800793c <::write_str+0xc> - 800793a: e0aa b.n 8007a92 <::write_str+0x162> - 800793c: 0014 movs r4, r2 - 800793e: 000d movs r5, r1 - 8007940: 6801 ldr r1, [r0, #0] - 8007942: 9103 str r1, [sp, #12] - 8007944: 6841 ldr r1, [r0, #4] - if self.state.on_newline { - 8007946: 9102 str r1, [sp, #8] - 8007948: 6880 ldr r0, [r0, #8] - 800794a: 9005 str r0, [sp, #20] - 800794c: 2001 movs r0, #1 - 800794e: 9001 str r0, [sp, #4] - 8007950: 9805 ldr r0, [sp, #20] - 8007952: 7800 ldrb r0, [r0, #0] - 8007954: 2800 cmp r0, #0 - 8007956: d009 beq.n 800796c <::write_str+0x3c> - self.buf.write_str(" ")?; - 8007958: 9802 ldr r0, [sp, #8] - 800795a: 68c3 ldr r3, [r0, #12] - 800795c: 2204 movs r2, #4 - 800795e: 9803 ldr r0, [sp, #12] - 8007960: 4967 ldr r1, [pc, #412] ; (8007b00 <::write_str+0x1d0>) - 8007962: f000 f8df bl 8007b24 <::write_str+0x1f4> - 8007966: 2800 cmp r0, #0 - 8007968: d000 beq.n 800796c <::write_str+0x3c> - 800796a: e097 b.n 8007a9c <::write_str+0x16c> - 800796c: 200a movs r0, #10 - - #[inline] - fn into_searcher(self, haystack: &'a str) -> Self::Searcher { - let mut utf8_encoded = [0; 4]; - let utf8_size = self.encode_utf8(&mut utf8_encoded).len(); - CharSearcher { - 800796e: 900e str r0, [sp, #56] ; 0x38 - 8007970: 2101 movs r1, #1 - 8007972: 9106 str r1, [sp, #24] - 8007974: 910d str r1, [sp, #52] ; 0x34 - 8007976: 900c str r0, [sp, #48] ; 0x30 - 8007978: 940b str r4, [sp, #44] ; 0x2c - 800797a: 9409 str r4, [sp, #36] ; 0x24 - 800797c: 9508 str r5, [sp, #32] - 800797e: 9507 str r5, [sp, #28] - let bytes = self.haystack.as_bytes().get(self.finger..self.finger_back)?; - 8007980: 2d00 cmp r5, #0 - 8007982: d055 beq.n 8007a30 <::write_str+0x100> - 8007984: a808 add r0, sp, #32 - 8007986: 7e00 ldrb r0, [r0, #24] - 8007988: 9004 str r0, [sp, #16] - 800798a: 2600 movs r6, #0 - 800798c: e001 b.n 8007992 <::write_str+0x62> - if self.start > self.end || self.end > slice.len() { - 800798e: 42a6 cmp r6, r4 - 8007990: d84e bhi.n 8007a30 <::write_str+0x100> - assert_unsafe_precondition!(self.end >= self.start && self.end <= slice.len()); - 8007992: 42b4 cmp r4, r6 - 8007994: d200 bcs.n 8007998 <::write_str+0x68> - 8007996: e09e b.n 8007ad6 <::write_str+0x1a6> - 8007998: 0035 movs r5, r6 - 800799a: 9807 ldr r0, [sp, #28] - 800799c: 1981 adds r1, r0, r6 - ptr::slice_from_raw_parts(slice.as_ptr().add(self.start), self.end - self.start) - 800799e: 1ba2 subs r2, r4, r6 -/// Returns the first index matching the byte `x` in `text`. -#[must_use] -#[inline] -pub fn memchr(x: u8, text: &[u8]) -> Option { - // Fast path for small slices - if text.len() < 2 * USIZE_BYTES { - 80079a0: 2a08 cmp r2, #8 - 80079a2: d20c bcs.n 80079be <::write_str+0x8e> - if is_empty!(self) { - 80079a4: 2a00 cmp r2, #0 - 80079a6: d011 beq.n 80079cc <::write_str+0x9c> - 80079a8: 2000 movs r0, #0 - P: FnMut(Self::Item) -> bool, - { - let n = len!(self); - let mut i = 0; - while let Some(x) = self.next() { - if predicate(x) { - 80079aa: 5c0b ldrb r3, [r1, r0] - 80079ac: 2b0a cmp r3, #10 - 80079ae: d012 beq.n 80079d6 <::write_str+0xa6> - 80079b0: 1c40 adds r0, r0, #1 - if is_empty!(self) { - 80079b2: 4282 cmp r2, r0 - 80079b4: d1f9 bne.n 80079aa <::write_str+0x7a> - 80079b6: 2000 movs r0, #0 - if let Some(index) = memchr::memchr(last_byte, bytes) { - 80079b8: 2801 cmp r0, #1 - 80079ba: d010 beq.n 80079de <::write_str+0xae> - 80079bc: e038 b.n 8007a30 <::write_str+0x100> - 80079be: 200a movs r0, #10 - return text.iter().position(|elt| *elt == x); - } - - memchr_general_case(x, text) - 80079c0: f000 fec0 bl 8008744 - 80079c4: 000a movs r2, r1 - 80079c6: 2801 cmp r0, #1 - 80079c8: d009 beq.n 80079de <::write_str+0xae> - 80079ca: e031 b.n 8007a30 <::write_str+0x100> - 80079cc: 2200 movs r2, #0 - 80079ce: 0010 movs r0, r2 - 80079d0: 2801 cmp r0, #1 - 80079d2: d004 beq.n 80079de <::write_str+0xae> - 80079d4: e02c b.n 8007a30 <::write_str+0x100> - 80079d6: 0002 movs r2, r0 - 80079d8: 9806 ldr r0, [sp, #24] - 80079da: 2801 cmp r0, #1 - 80079dc: d128 bne.n 8007a30 <::write_str+0x100> - 80079de: 2000 movs r0, #0 - self.finger += index + 1; - 80079e0: 1c51 adds r1, r2, #1 - 80079e2: b401 push {r0} - 80079e4: bc08 pop {r3} - 80079e6: 4143 adcs r3, r0 - 80079e8: 4291 cmp r1, r2 - 80079ea: d35c bcc.n 8007aa6 <::write_str+0x176> - 80079ec: 186e adds r6, r5, r1 - 80079ee: b401 push {r0} - 80079f0: bc02 pop {r1} - 80079f2: 4141 adcs r1, r0 - 80079f4: 42ae cmp r6, r5 - 80079f6: d35c bcc.n 8007ab2 <::write_str+0x182> - if self.finger >= self.utf8_size { - 80079f8: 2e00 cmp r6, #0 - 80079fa: d0c8 beq.n 800798e <::write_str+0x5e> - if self.start > self.end || self.end > slice.len() { - 80079fc: 42a6 cmp r6, r4 - 80079fe: d8c6 bhi.n 800798e <::write_str+0x5e> - 8007a00: 1e71 subs r1, r6, #1 - ptr::slice_from_raw_parts(slice.as_ptr().add(self.start), self.end - self.start) - 8007a02: 1a72 subs r2, r6, r1 - 8007a04: 4140 adcs r0, r0 - 8007a06: 428e cmp r6, r1 - 8007a08: d359 bcc.n 8007abe <::write_str+0x18e> -impl SlicePartialEq for [A] -where - A: BytewiseEquality, -{ - fn equal(&self, other: &[B]) -> bool { - if self.len() != other.len() { - 8007a0a: 2a01 cmp r2, #1 - 8007a0c: d1bf bne.n 800798e <::write_str+0x5e> - - // SAFETY: `self` and `other` are references and are thus guaranteed to be valid. - // The two slices have been checked to have the same size above. - unsafe { - let size = mem::size_of_val(self); - memcmp(self.as_ptr() as *const u8, other.as_ptr() as *const u8, size) == 0 - 8007a0e: 9807 ldr r0, [sp, #28] - 8007a10: 5c40 ldrb r0, [r0, r1] - if slice == &self.utf8_encoded[0..self.utf8_size] { - 8007a12: 9904 ldr r1, [sp, #16] - 8007a14: 4288 cmp r0, r1 - 8007a16: d1ba bne.n 800798e <::write_str+0x5e> - } - - let split = match s.find('\n') { - Some(pos) => { - self.state.on_newline = true; - 8007a18: 9805 ldr r0, [sp, #20] - 8007a1a: 9906 ldr r1, [sp, #24] - 8007a1c: 7001 strb r1, [r0, #0] - if self < slice.len() { unsafe { Some(&*self.get_unchecked(slice)) } } else { None } - 8007a1e: 42a6 cmp r6, r4 - 8007a20: d235 bcs.n 8007a8e <::write_str+0x15e> - 8007a22: 9d07 ldr r5, [sp, #28] - 8007a24: 57a8 ldrsb r0, [r5, r6] - 8007a26: 2140 movs r1, #64 ; 0x40 - 8007a28: 43c9 mvns r1, r1 - 8007a2a: 4288 cmp r0, r1 - 8007a2c: dc09 bgt.n 8007a42 <::write_str+0x112> - 8007a2e: e05d b.n 8007aec <::write_str+0x1bc> - 8007a30: 2000 movs r0, #0 - pos + 1 - } - None => { - self.state.on_newline = false; - 8007a32: 9905 ldr r1, [sp, #20] - 8007a34: 7008 strb r0, [r1, #0] - 8007a36: 0023 movs r3, r4 - 8007a38: 9d07 ldr r5, [sp, #28] - 8007a3a: 429c cmp r4, r3 - 8007a3c: b410 push {r4} - 8007a3e: bc40 pop {r6} - 8007a40: d155 bne.n 8007aee <::write_str+0x1be> - s.len() - } - }; - self.buf.write_str(&s[..split])?; - 8007a42: 9802 ldr r0, [sp, #8] - 8007a44: 68c3 ldr r3, [r0, #12] - 8007a46: 9803 ldr r0, [sp, #12] - 8007a48: 0029 movs r1, r5 - 8007a4a: 0032 movs r2, r6 - 8007a4c: f000 f86a bl 8007b24 <::write_str+0x1f4> - 8007a50: 2800 cmp r0, #0 - 8007a52: d123 bne.n 8007a9c <::write_str+0x16c> - 8007a54: 4268 negs r0, r5 - 8007a56: 4168 adcs r0, r5 - 8007a58: 42a6 cmp r6, r4 - 8007a5a: 9901 ldr r1, [sp, #4] - 8007a5c: d200 bcs.n 8007a60 <::write_str+0x130> - 8007a5e: 0001 movs r1, r0 - 8007a60: 2901 cmp r1, #1 - 8007a62: d102 bne.n 8007a6a <::write_str+0x13a> -#[rustc_const_unstable(feature = "const_slice_index", issue = "none")] -unsafe impl const SliceIndex for ops::RangeFrom { - type Output = str; - #[inline] - fn get(self, slice: &str) -> Option<&Self::Output> { - if slice.is_char_boundary(self.start) { - 8007a64: 42b4 cmp r4, r6 - 8007a66: d005 beq.n 8007a74 <::write_str+0x144> - 8007a68: e037 b.n 8007ada <::write_str+0x1aa> - 8007a6a: 57a8 ldrsb r0, [r5, r6] - 8007a6c: 213f movs r1, #63 ; 0x3f - 8007a6e: 43c9 mvns r1, r1 - 8007a70: 4288 cmp r0, r1 - 8007a72: db32 blt.n 8007ada <::write_str+0x1aa> - 8007a74: 2000 movs r0, #0 - unsafe fn get_unchecked(self, slice: *const str) -> *const Self::Output { - let slice = slice as *const [u8]; - // SAFETY: the caller guarantees that `self` is in bounds of `slice` - // which satisfies all the conditions for `add`. - let ptr = unsafe { slice.as_ptr().add(self.start) }; - let len = slice.len() - self.start; - 8007a76: 1ba1 subs r1, r4, r6 - 8007a78: b401 push {r0} - 8007a7a: bc04 pop {r2} - 8007a7c: 4142 adcs r2, r0 - 8007a7e: 42b4 cmp r4, r6 - 8007a80: d323 bcc.n 8007aca <::write_str+0x19a> - 8007a82: 19ad adds r5, r5, r6 - while !s.is_empty() { - 8007a84: 2900 cmp r1, #0 - 8007a86: b402 push {r1} - 8007a88: bc10 pop {r4} - 8007a8a: d003 beq.n 8007a94 <::write_str+0x164> - 8007a8c: e760 b.n 8007950 <::write_str+0x20> - 8007a8e: 0033 movs r3, r6 - 8007a90: e7d2 b.n 8007a38 <::write_str+0x108> - 8007a92: 2000 movs r0, #0 - s = &s[split..]; - } - - Ok(()) - } - 8007a94: b00f add sp, #60 ; 0x3c - 8007a96: bcf0 pop {r4, r5, r6, r7} - 8007a98: bc02 pop {r1} - 8007a9a: 4708 bx r1 - 8007a9c: 9801 ldr r0, [sp, #4] - 8007a9e: b00f add sp, #60 ; 0x3c - 8007aa0: bcf0 pop {r4, r5, r6, r7} - 8007aa2: bc02 pop {r1} - 8007aa4: 4708 bx r1 - self.finger += index + 1; - 8007aa6: 4819 ldr r0, [pc, #100] ; (8007b0c <::write_str+0x1dc>) - 8007aa8: 211c movs r1, #28 - 8007aaa: 4a1a ldr r2, [pc, #104] ; (8007b14 <::write_str+0x1e4>) - 8007aac: f001 fb18 bl 80090e0 - 8007ab0: defe udf #254 ; 0xfe - 8007ab2: 4816 ldr r0, [pc, #88] ; (8007b0c <::write_str+0x1dc>) - 8007ab4: 211c movs r1, #28 - 8007ab6: 4a16 ldr r2, [pc, #88] ; (8007b10 <::write_str+0x1e0>) - 8007ab8: f001 fb12 bl 80090e0 - 8007abc: defe udf #254 ; 0xfe - ptr::slice_from_raw_parts(slice.as_ptr().add(self.start), self.end - self.start) - 8007abe: 4811 ldr r0, [pc, #68] ; (8007b04 <::write_str+0x1d4>) - 8007ac0: 2121 movs r1, #33 ; 0x21 - 8007ac2: 4a11 ldr r2, [pc, #68] ; (8007b08 <::write_str+0x1d8>) - 8007ac4: f001 fb0c bl 80090e0 - 8007ac8: defe udf #254 ; 0xfe - 8007aca: 480e ldr r0, [pc, #56] ; (8007b04 <::write_str+0x1d4>) - 8007acc: 2121 movs r1, #33 ; 0x21 - 8007ace: 4a14 ldr r2, [pc, #80] ; (8007b20 <::write_str+0x1f0>) - 8007ad0: f001 fb06 bl 80090e0 - 8007ad4: defe udf #254 ; 0xfe - 8007ad6: defe udf #254 ; 0xfe - 8007ad8: defe udf #254 ; 0xfe - #[inline] - fn index(self, slice: &str) -> &Self::Output { - let (start, end) = (self.start, slice.len()); - match self.get(slice) { - Some(s) => s, - None => super::slice_error_fail(slice, start, end), - 8007ada: 4810 ldr r0, [pc, #64] ; (8007b1c <::write_str+0x1ec>) - 8007adc: 9000 str r0, [sp, #0] - 8007ade: 0028 movs r0, r5 - 8007ae0: 0021 movs r1, r4 - 8007ae2: 0032 movs r2, r6 - 8007ae4: 0023 movs r3, r4 - 8007ae6: f001 f843 bl 8008b70 - 8007aea: defe udf #254 ; 0xfe - 8007aec: 0033 movs r3, r6 - None => super::slice_error_fail(slice, 0, end), - 8007aee: 480a ldr r0, [pc, #40] ; (8007b18 <::write_str+0x1e8>) - 8007af0: 9000 str r0, [sp, #0] - 8007af2: 2200 movs r2, #0 - 8007af4: 0028 movs r0, r5 - 8007af6: 0021 movs r1, r4 - 8007af8: f001 f83a bl 8008b70 - 8007afc: defe udf #254 ; 0xfe - 8007afe: 46c0 nop ; (mov r8, r8) - 8007b00: 0800cacc .word 0x0800cacc - 8007b04: 0800cc40 .word 0x0800cc40 - 8007b08: 0800cc24 .word 0x0800cc24 - 8007b0c: 0800cab0 .word 0x0800cab0 - 8007b10: 0800cd70 .word 0x0800cd70 - 8007b14: 0800cd60 .word 0x0800cd60 - 8007b18: 0800cb58 .word 0x0800cb58 - 8007b1c: 0800cb68 .word 0x0800cb68 - 8007b20: 0800ccd8 .word 0x0800ccd8 - 8007b24: 4718 bx r3 - ... - -08007b28 : - /// format!("{:?}", Foo(10, "Hello World".to_string())), - /// "Foo(10, \"Hello World\")", - /// ); - /// ``` - #[stable(feature = "debug_builders", since = "1.2.0")] - pub fn field(&mut self, value: &dyn fmt::Debug) -> &mut Self { - 8007b28: b5f0 push {r4, r5, r6, r7, lr} - 8007b2a: af03 add r7, sp, #12 - 8007b2c: b091 sub sp, #68 ; 0x44 - 8007b2e: 0004 movs r4, r0 - self.result = self.result.and_then(|_| { - 8007b30: 7a00 ldrb r0, [r0, #8] - match self { - 8007b32: 2800 cmp r0, #0 - 8007b34: d002 beq.n 8007b3c - self.fmt.write_str(prefix)?; - value.fmt(self.fmt) - } - }); - - self.fields += 1; - 8007b36: 6862 ldr r2, [r4, #4] - 8007b38: 2601 movs r6, #1 - 8007b3a: e05b b.n 8007bf4 - 8007b3c: 000e movs r6, r1 - if self.is_pretty() { - 8007b3e: 6825 ldr r5, [r4, #0] - 8007b40: 6863 ldr r3, [r4, #4] - 8007b42: 7828 ldrb r0, [r5, #0] - 8007b44: 0740 lsls r0, r0, #29 - 8007b46: 9303 str r3, [sp, #12] - 8007b48: 9102 str r1, [sp, #8] - 8007b4a: 9201 str r2, [sp, #4] - 8007b4c: d403 bmi.n 8007b56 - let prefix = if self.fields == 0 { "(" } else { ", " }; - 8007b4e: 2b00 cmp r3, #0 - 8007b50: d03a beq.n 8007bc8 - 8007b52: 4935 ldr r1, [pc, #212] ; (8007c28 ) - 8007b54: e039 b.n 8007bca - if self.fields == 0 { - 8007b56: 2b00 cmp r3, #0 - 8007b58: d10b bne.n 8007b72 - self.buf.write_str(data) - 8007b5a: 69a8 ldr r0, [r5, #24] - 8007b5c: 69e9 ldr r1, [r5, #28] - 8007b5e: 68cb ldr r3, [r1, #12] - 8007b60: 492d ldr r1, [pc, #180] ; (8007c18 ) - 8007b62: 2202 movs r2, #2 - 8007b64: f000 f866 bl 8007c34 - self.fmt.write_str("(\n")?; - 8007b68: 2800 cmp r0, #0 - 8007b6a: d002 beq.n 8007b72 - 8007b6c: 2200 movs r2, #0 - 8007b6e: 2601 movs r6, #1 - 8007b70: e040 b.n 8007bf4 - 8007b72: a807 add r0, sp, #28 - 8007b74: 2601 movs r6, #1 - let mut state = Default::default(); - 8007b76: 7006 strb r6, [r0, #0] - 8007b78: 2220 movs r2, #32 - align: self.align, - 8007b7a: 5cab ldrb r3, [r5, r2] - 8007b7c: a908 add r1, sp, #32 - Formatter { - 8007b7e: 548b strb r3, [r1, r2] - *self = Some(value); - 8007b80: 9006 str r0, [sp, #24] - 8007b82: 4826 ldr r0, [pc, #152] ; (8007c1c ) - 8007b84: 900f str r0, [sp, #60] ; 0x3c - 8007b86: a804 add r0, sp, #16 - 8007b88: 900e str r0, [sp, #56] ; 0x38 - buf: wrap(self.buf), - 8007b8a: 69e8 ldr r0, [r5, #28] - 8007b8c: 9005 str r0, [sp, #20] - 8007b8e: 69a8 ldr r0, [r5, #24] - 8007b90: 9004 str r0, [sp, #16] - fill: self.fill, - 8007b92: 6868 ldr r0, [r5, #4] - Formatter { - 8007b94: 9009 str r0, [sp, #36] ; 0x24 - flags: self.flags, - 8007b96: 6828 ldr r0, [r5, #0] - Formatter { - 8007b98: 9008 str r0, [sp, #32] - precision: self.precision, - 8007b9a: 6968 ldr r0, [r5, #20] - Formatter { - 8007b9c: 900d str r0, [sp, #52] ; 0x34 - precision: self.precision, - 8007b9e: 6928 ldr r0, [r5, #16] - Formatter { - 8007ba0: 900c str r0, [sp, #48] ; 0x30 - width: self.width, - 8007ba2: 68e8 ldr r0, [r5, #12] - Formatter { - 8007ba4: 900b str r0, [sp, #44] ; 0x2c - width: self.width, - 8007ba6: 68a8 ldr r0, [r5, #8] - Formatter { - 8007ba8: 900a str r0, [sp, #40] ; 0x28 - value.fmt(&mut writer)?; - 8007baa: 9801 ldr r0, [sp, #4] - 8007bac: 68c2 ldr r2, [r0, #12] - 8007bae: 9802 ldr r0, [sp, #8] - 8007bb0: f000 f841 bl 8007c36 - 8007bb4: 2800 cmp r0, #0 - 8007bb6: d11c bne.n 8007bf2 - self.buf.write_str(data) - 8007bb8: 980f ldr r0, [sp, #60] ; 0x3c - 8007bba: 68c3 ldr r3, [r0, #12] - 8007bbc: 980e ldr r0, [sp, #56] ; 0x38 - 8007bbe: 4918 ldr r1, [pc, #96] ; (8007c20 ) - 8007bc0: 2202 movs r2, #2 - 8007bc2: f000 f837 bl 8007c34 - 8007bc6: e013 b.n 8007bf0 - 8007bc8: 4916 ldr r1, [pc, #88] ; (8007c24 ) - 8007bca: 2601 movs r6, #1 - let prefix = if self.fields == 0 { "(" } else { ", " }; - 8007bcc: 2b00 cmp r3, #0 - 8007bce: b440 push {r6} - 8007bd0: bc04 pop {r2} - 8007bd2: d000 beq.n 8007bd6 - 8007bd4: 2202 movs r2, #2 - 8007bd6: 69a8 ldr r0, [r5, #24] - 8007bd8: 69eb ldr r3, [r5, #28] - 8007bda: 68db ldr r3, [r3, #12] - 8007bdc: f000 f82a bl 8007c34 - self.fmt.write_str(prefix)?; - 8007be0: 2800 cmp r0, #0 - 8007be2: d106 bne.n 8007bf2 - value.fmt(self.fmt) - 8007be4: 9801 ldr r0, [sp, #4] - 8007be6: 68c2 ldr r2, [r0, #12] - 8007be8: 9802 ldr r0, [sp, #8] - 8007bea: 0029 movs r1, r5 - 8007bec: f000 f823 bl 8007c36 - 8007bf0: 0006 movs r6, r0 - 8007bf2: 9a03 ldr r2, [sp, #12] - self.result = self.result.and_then(|_| { - 8007bf4: 7226 strb r6, [r4, #8] - 8007bf6: 2100 movs r1, #0 - self.fields += 1; - 8007bf8: 1c50 adds r0, r2, #1 - 8007bfa: 4149 adcs r1, r1 - 8007bfc: 4290 cmp r0, r2 - 8007bfe: d305 bcc.n 8007c0c - 8007c00: 6060 str r0, [r4, #4] - self - } - 8007c02: 0020 movs r0, r4 - 8007c04: b011 add sp, #68 ; 0x44 - 8007c06: bcf0 pop {r4, r5, r6, r7} - 8007c08: bc02 pop {r1} - 8007c0a: 4708 bx r1 - self.fields += 1; - 8007c0c: 4807 ldr r0, [pc, #28] ; (8007c2c ) - 8007c0e: 211c movs r1, #28 - 8007c10: 4a07 ldr r2, [pc, #28] ; (8007c30 ) - 8007c12: f001 fa65 bl 80090e0 - 8007c16: defe udf #254 ; 0xfe - 8007c18: 0800cb8c .word 0x0800cb8c - 8007c1c: 0800c838 .word 0x0800c838 - 8007c20: 0800cb78 .word 0x0800cb78 - 8007c24: 0800cb8e .word 0x0800cb8e - 8007c28: 0800cb7a .word 0x0800cb7a - 8007c2c: 0800cab0 .word 0x0800cab0 - 8007c30: 0800cb7c .word 0x0800cb7c - 8007c34: 4718 bx r3 - 8007c36: 4710 bx r2 - -08007c38 : - fn write_char(&mut self, c: char) -> Result { - 8007c38: b5d0 push {r4, r6, r7, lr} - 8007c3a: af02 add r7, sp, #8 - 8007c3c: b082 sub sp, #8 - 8007c3e: 2200 movs r2, #0 - self.write_str(c.encode_utf8(&mut [0; 4])) - 8007c40: 9201 str r2, [sp, #4] - if code < MAX_ONE_B { - 8007c42: 2980 cmp r1, #128 ; 0x80 - 8007c44: d203 bcs.n 8007c4e - 8007c46: aa01 add r2, sp, #4 - *a = code as u8; - 8007c48: 7011 strb r1, [r2, #0] - 8007c4a: 2201 movs r2, #1 - 8007c4c: e02f b.n 8007cae - } else if code < MAX_TWO_B { - 8007c4e: 0aca lsrs r2, r1, #11 - 8007c50: d10a bne.n 8007c68 - 8007c52: 223f movs r2, #63 ; 0x3f - *b = (code & 0x3F) as u8 | TAG_CONT; - 8007c54: 400a ands r2, r1 - 8007c56: 3280 adds r2, #128 ; 0x80 - 8007c58: ab01 add r3, sp, #4 - 8007c5a: 705a strb r2, [r3, #1] - *a = (code >> 6 & 0x1F) as u8 | TAG_TWO_B; - 8007c5c: 0989 lsrs r1, r1, #6 - 8007c5e: 22c0 movs r2, #192 ; 0xc0 - 8007c60: 430a orrs r2, r1 - 8007c62: 701a strb r2, [r3, #0] - 8007c64: 2202 movs r2, #2 - 8007c66: e022 b.n 8007cae - } else if code < MAX_THREE_B { - 8007c68: 0c0a lsrs r2, r1, #16 - 8007c6a: d10e bne.n 8007c8a - 8007c6c: 223f movs r2, #63 ; 0x3f - *c = (code & 0x3F) as u8 | TAG_CONT; - 8007c6e: 400a ands r2, r1 - 8007c70: 3280 adds r2, #128 ; 0x80 - 8007c72: ab01 add r3, sp, #4 - 8007c74: 709a strb r2, [r3, #2] - *a = (code >> 12 & 0x0F) as u8 | TAG_THREE_B; - 8007c76: 0b0a lsrs r2, r1, #12 - 8007c78: 24e0 movs r4, #224 ; 0xe0 - 8007c7a: 4314 orrs r4, r2 - 8007c7c: 701c strb r4, [r3, #0] - *b = (code >> 6 & 0x3F) as u8 | TAG_CONT; - 8007c7e: 0509 lsls r1, r1, #20 - 8007c80: 0e89 lsrs r1, r1, #26 - 8007c82: 3180 adds r1, #128 ; 0x80 - 8007c84: 7059 strb r1, [r3, #1] - 8007c86: 2203 movs r2, #3 - 8007c88: e011 b.n 8007cae - 8007c8a: 233f movs r3, #63 ; 0x3f - *d = (code & 0x3F) as u8 | TAG_CONT; - 8007c8c: 400b ands r3, r1 - 8007c8e: 3380 adds r3, #128 ; 0x80 - 8007c90: aa01 add r2, sp, #4 - 8007c92: 70d3 strb r3, [r2, #3] - *a = (code >> 18 & 0x07) as u8 | TAG_FOUR_B; - 8007c94: 0c8b lsrs r3, r1, #18 - 8007c96: 24f0 movs r4, #240 ; 0xf0 - 8007c98: 431c orrs r4, r3 - 8007c9a: 7014 strb r4, [r2, #0] - *c = (code >> 6 & 0x3F) as u8 | TAG_CONT; - 8007c9c: 050b lsls r3, r1, #20 - 8007c9e: 0e9b lsrs r3, r3, #26 - 8007ca0: 3380 adds r3, #128 ; 0x80 - 8007ca2: 7093 strb r3, [r2, #2] - *b = (code >> 12 & 0x3F) as u8 | TAG_CONT; - 8007ca4: 0389 lsls r1, r1, #14 - 8007ca6: 0e89 lsrs r1, r1, #26 - 8007ca8: 3180 adds r1, #128 ; 0x80 - 8007caa: 7051 strb r1, [r2, #1] - 8007cac: 2204 movs r2, #4 - 8007cae: a901 add r1, sp, #4 - 8007cb0: f7ff fe3e bl 8007930 <::write_str> - } - 8007cb4: b002 add sp, #8 - 8007cb6: bcd0 pop {r4, r6, r7} - 8007cb8: bc02 pop {r1} - 8007cba: 4708 bx r1 - -08007cbc : - fn write_fmt(mut self: &mut Self, args: Arguments<'_>) -> Result { - 8007cbc: b5b0 push {r4, r5, r7, lr} - 8007cbe: af02 add r7, sp, #8 - 8007cc0: b088 sub sp, #32 - 8007cc2: 9001 str r0, [sp, #4] - 8007cc4: aa02 add r2, sp, #8 - write(&mut self, args) - 8007cc6: 0010 movs r0, r2 - 8007cc8: c938 ldmia r1!, {r3, r4, r5} - 8007cca: c038 stmia r0!, {r3, r4, r5} - 8007ccc: c938 ldmia r1!, {r3, r4, r5} - 8007cce: c038 stmia r0!, {r3, r4, r5} - 8007cd0: a801 add r0, sp, #4 - 8007cd2: 4903 ldr r1, [pc, #12] ; (8007ce0 ) - 8007cd4: f7ff f81a bl 8006d0c - } - 8007cd8: b008 add sp, #32 - 8007cda: bcb0 pop {r4, r5, r7} - 8007cdc: bc02 pop {r1} - 8007cde: 4708 bx r1 - 8007ce0: 0800cb94 .word 0x0800cb94 - -08007ce4 <<&mut W as core::fmt::Write>::write_str>: - fn write_str(&mut self, s: &str) -> Result { - 8007ce4: b580 push {r7, lr} - 8007ce6: af00 add r7, sp, #0 - (**self).write_str(s) - 8007ce8: 6800 ldr r0, [r0, #0] - 8007cea: f7ff fe21 bl 8007930 <::write_str> - } - 8007cee: bc80 pop {r7} - 8007cf0: bc02 pop {r1} - 8007cf2: 4708 bx r1 - -08007cf4 <<&mut W as core::fmt::Write>::write_char>: - fn write_char(&mut self, c: char) -> Result { - 8007cf4: b5d0 push {r4, r6, r7, lr} - 8007cf6: af02 add r7, sp, #8 - 8007cf8: b082 sub sp, #8 - (**self).write_char(c) - 8007cfa: 6800 ldr r0, [r0, #0] - 8007cfc: 2200 movs r2, #0 - self.write_str(c.encode_utf8(&mut [0; 4])) - 8007cfe: 9201 str r2, [sp, #4] - if code < MAX_ONE_B { - 8007d00: 2980 cmp r1, #128 ; 0x80 - 8007d02: d203 bcs.n 8007d0c <<&mut W as core::fmt::Write>::write_char+0x18> - 8007d04: aa01 add r2, sp, #4 - *a = code as u8; - 8007d06: 7011 strb r1, [r2, #0] - 8007d08: 2201 movs r2, #1 - 8007d0a: e02f b.n 8007d6c <<&mut W as core::fmt::Write>::write_char+0x78> - } else if code < MAX_TWO_B { - 8007d0c: 0aca lsrs r2, r1, #11 - 8007d0e: d10a bne.n 8007d26 <<&mut W as core::fmt::Write>::write_char+0x32> - 8007d10: 223f movs r2, #63 ; 0x3f - *b = (code & 0x3F) as u8 | TAG_CONT; - 8007d12: 400a ands r2, r1 - 8007d14: 3280 adds r2, #128 ; 0x80 - 8007d16: ab01 add r3, sp, #4 - 8007d18: 705a strb r2, [r3, #1] - *a = (code >> 6 & 0x1F) as u8 | TAG_TWO_B; - 8007d1a: 0989 lsrs r1, r1, #6 - 8007d1c: 22c0 movs r2, #192 ; 0xc0 - 8007d1e: 430a orrs r2, r1 - 8007d20: 701a strb r2, [r3, #0] - 8007d22: 2202 movs r2, #2 - 8007d24: e022 b.n 8007d6c <<&mut W as core::fmt::Write>::write_char+0x78> - } else if code < MAX_THREE_B { - 8007d26: 0c0a lsrs r2, r1, #16 - 8007d28: d10e bne.n 8007d48 <<&mut W as core::fmt::Write>::write_char+0x54> - 8007d2a: 223f movs r2, #63 ; 0x3f - *c = (code & 0x3F) as u8 | TAG_CONT; - 8007d2c: 400a ands r2, r1 - 8007d2e: 3280 adds r2, #128 ; 0x80 - 8007d30: ab01 add r3, sp, #4 - 8007d32: 709a strb r2, [r3, #2] - *a = (code >> 12 & 0x0F) as u8 | TAG_THREE_B; - 8007d34: 0b0a lsrs r2, r1, #12 - 8007d36: 24e0 movs r4, #224 ; 0xe0 - 8007d38: 4314 orrs r4, r2 - 8007d3a: 701c strb r4, [r3, #0] - *b = (code >> 6 & 0x3F) as u8 | TAG_CONT; - 8007d3c: 0509 lsls r1, r1, #20 - 8007d3e: 0e89 lsrs r1, r1, #26 - 8007d40: 3180 adds r1, #128 ; 0x80 - 8007d42: 7059 strb r1, [r3, #1] - 8007d44: 2203 movs r2, #3 - 8007d46: e011 b.n 8007d6c <<&mut W as core::fmt::Write>::write_char+0x78> - 8007d48: 233f movs r3, #63 ; 0x3f - *d = (code & 0x3F) as u8 | TAG_CONT; - 8007d4a: 400b ands r3, r1 - 8007d4c: 3380 adds r3, #128 ; 0x80 - 8007d4e: aa01 add r2, sp, #4 - 8007d50: 70d3 strb r3, [r2, #3] - *a = (code >> 18 & 0x07) as u8 | TAG_FOUR_B; - 8007d52: 0c8b lsrs r3, r1, #18 - 8007d54: 24f0 movs r4, #240 ; 0xf0 - 8007d56: 431c orrs r4, r3 - 8007d58: 7014 strb r4, [r2, #0] - *c = (code >> 6 & 0x3F) as u8 | TAG_CONT; - 8007d5a: 050b lsls r3, r1, #20 - 8007d5c: 0e9b lsrs r3, r3, #26 - 8007d5e: 3380 adds r3, #128 ; 0x80 - 8007d60: 7093 strb r3, [r2, #2] - *b = (code >> 12 & 0x3F) as u8 | TAG_CONT; - 8007d62: 0389 lsls r1, r1, #14 - 8007d64: 0e89 lsrs r1, r1, #26 - 8007d66: 3180 adds r1, #128 ; 0x80 - 8007d68: 7051 strb r1, [r2, #1] - 8007d6a: 2204 movs r2, #4 - 8007d6c: a901 add r1, sp, #4 - 8007d6e: f7ff fddf bl 8007930 <::write_str> - } - 8007d72: b002 add sp, #8 - 8007d74: bcd0 pop {r4, r6, r7} - 8007d76: bc02 pop {r1} - 8007d78: 4708 bx r1 - ... - -08007d7c <<&mut W as core::fmt::Write>::write_fmt>: - fn write_fmt(&mut self, args: Arguments<'_>) -> Result { - 8007d7c: b5b0 push {r4, r5, r7, lr} - 8007d7e: af02 add r7, sp, #8 - 8007d80: b088 sub sp, #32 - (**self).write_fmt(args) - 8007d82: 6800 ldr r0, [r0, #0] - 8007d84: 9001 str r0, [sp, #4] - 8007d86: aa02 add r2, sp, #8 - write(&mut self, args) - 8007d88: 0010 movs r0, r2 - 8007d8a: c938 ldmia r1!, {r3, r4, r5} - 8007d8c: c038 stmia r0!, {r3, r4, r5} - 8007d8e: c938 ldmia r1!, {r3, r4, r5} - 8007d90: c038 stmia r0!, {r3, r4, r5} - 8007d92: a801 add r0, sp, #4 - 8007d94: 4903 ldr r1, [pc, #12] ; (8007da4 <<&mut W as core::fmt::Write>::write_fmt+0x28>) - 8007d96: f7fe ffb9 bl 8006d0c - } - 8007d9a: b008 add sp, #32 - 8007d9c: bcb0 pop {r4, r5, r7} - 8007d9e: bc02 pop {r1} - 8007da0: 4708 bx r1 - 8007da2: 46c0 nop ; (mov r8, r8) - 8007da4: 0800cb94 .word 0x0800cb94 - -08007da8 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698>: - 6061626364656667686970717273747576777879\ - 8081828384858687888990919293949596979899"; - -macro_rules! impl_Display { - ($($t:ident),* as $u:ident via $conv_fn:ident named $name:ident) => { - fn $name(mut n: $u, is_nonnegative: bool, f: &mut fmt::Formatter<'_>) -> fmt::Result { - 8007da8: b5f0 push {r4, r5, r6, r7, lr} - 8007daa: af03 add r7, sp, #12 - 8007dac: b08f sub sp, #60 ; 0x3c - 8007dae: 9203 str r2, [sp, #12] - 8007db0: 0006 movs r6, r0 - 8007db2: 4854 ldr r0, [pc, #336] ; (8007f04 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x15c>) - unsafe { - // need at least 16 bits for the 4-characters-at-a-time to work. - assert!(crate::mem::size_of::<$u>() >= 2); - - // eagerly decode 4 characters at a time - while n >= 10000 { - 8007db4: 4286 cmp r6, r0 - 8007db6: d953 bls.n 8007e60 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0xb8> - 8007db8: 9102 str r1, [sp, #8] - 8007dba: 2527 movs r5, #39 ; 0x27 - let rem = (n % 10000) as isize; - n /= 10000; - - let d1 = (rem / 100) << 1; - let d2 = (rem % 100) << 1; - curr -= 4; - 8007dbc: 1f2c subs r4, r5, #4 - 8007dbe: 42ac cmp r4, r5 - n /= 10000; - 8007dc0: 0030 movs r0, r6 - 8007dc2: 4951 ldr r1, [pc, #324] ; (8007f08 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x160>) - 8007dc4: f001 fa5a bl 800927c <__aeabi_uidiv> - curr -= 4; - 8007dc8: 42ac cmp r4, r5 - 8007dca: d700 bvc.n 8007dce <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x26> - 8007dcc: e08e b.n 8007eec <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x144> - 8007dce: a905 add r1, sp, #20 - 8007dd0: 190d adds r5, r1, r4 - 8007dd2: 494c ldr r1, [pc, #304] ; (8007f04 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x15c>) - 8007dd4: 1c49 adds r1, r1, #1 - 8007dd6: 4341 muls r1, r0 - 8007dd8: 9604 str r6, [sp, #16] - 8007dda: 1a71 subs r1, r6, r1 - let d1 = (rem / 100) << 1; - 8007ddc: 000a movs r2, r1 - 8007dde: 4b4b ldr r3, [pc, #300] ; (8007f0c <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x164>) - 8007de0: 401a ands r2, r3 - 8007de2: 0892 lsrs r2, r2, #2 - 8007de4: 4b4a ldr r3, [pc, #296] ; (8007f10 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x168>) - 8007de6: 435a muls r2, r3 - 8007de8: 0c52 lsrs r2, r2, #17 - 8007dea: 0053 lsls r3, r2, #1 - 8007dec: 4e49 ldr r6, [pc, #292] ; (8007f14 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x16c>) - 8007dee: 18f3 adds r3, r6, r3 - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 8007df0: 1aee subs r6, r5, r3 - 8007df2: d200 bcs.n 8007df6 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x4e> - 8007df4: 1b5e subs r6, r3, r5 - if !$e { - 8007df6: 2e01 cmp r6, #1 - 8007df8: d800 bhi.n 8007dfc <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x54> - 8007dfa: e080 b.n 8007efe <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x156> - copy_nonoverlapping(src, dst, count) - 8007dfc: 781d ldrb r5, [r3, #0] - 8007dfe: ae05 add r6, sp, #20 - 8007e00: 5535 strb r5, [r6, r4] - 8007e02: 1935 adds r5, r6, r4 - 8007e04: 785b ldrb r3, [r3, #1] - 8007e06: 706b strb r3, [r5, #1] - - // We are allowed to copy to `buf_ptr[curr..curr + 3]` here since - // otherwise `curr < 0`. But then `n` was originally at least `10000^10` - // which is `10^40 > 2^128 > n`. - ptr::copy_nonoverlapping(lut_ptr.offset(d1), buf_ptr.offset(curr), 2); - ptr::copy_nonoverlapping(lut_ptr.offset(d2), buf_ptr.offset(curr + 2), 2); - 8007e08: 1ca3 adds r3, r4, #2 - 8007e0a: 42a3 cmp r3, r4 - 8007e0c: 9e04 ldr r6, [sp, #16] - 8007e0e: d670 bvs.n 8007ef2 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x14a> - 8007e10: ad05 add r5, sp, #20 - 8007e12: 18eb adds r3, r5, r3 - 8007e14: 2564 movs r5, #100 ; 0x64 - 8007e16: 4355 muls r5, r2 - 8007e18: 1b49 subs r1, r1, r5 - let d2 = (rem % 100) << 1; - 8007e1a: 0449 lsls r1, r1, #17 - 8007e1c: 0c09 lsrs r1, r1, #16 - 8007e1e: 4a3d ldr r2, [pc, #244] ; (8007f14 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x16c>) - 8007e20: 1851 adds r1, r2, r1 - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 8007e22: 1a5a subs r2, r3, r1 - 8007e24: d200 bcs.n 8007e28 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x80> - 8007e26: 1aca subs r2, r1, r3 - if !$e { - 8007e28: 2a01 cmp r2, #1 - 8007e2a: d968 bls.n 8007efe <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x156> - copy_nonoverlapping(src, dst, count) - 8007e2c: 784a ldrb r2, [r1, #1] - 8007e2e: 705a strb r2, [r3, #1] - 8007e30: 7809 ldrb r1, [r1, #0] - 8007e32: 7019 strb r1, [r3, #0] - while n >= 10000 { - 8007e34: 4938 ldr r1, [pc, #224] ; (8007f18 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x170>) - 8007e36: 428e cmp r6, r1 - 8007e38: b410 push {r4} - 8007e3a: bc20 pop {r5} - 8007e3c: b401 push {r0} - 8007e3e: bc40 pop {r6} - 8007e40: d8bc bhi.n 8007dbc <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x14> - 8007e42: 0006 movs r6, r0 - 8007e44: 9902 ldr r1, [sp, #8] - - // if we reach here numbers are <= 9999, so at most 4 chars long - let mut n = n as isize; // possibly reduce 64bit math - - // decode 2 more chars, if > 2 chars - if n >= 100 { - 8007e46: 2e63 cmp r6, #99 ; 0x63 - 8007e48: d80d bhi.n 8007e66 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0xbe> - 8007e4a: 0035 movs r5, r6 - 8007e4c: 0022 movs r2, r4 - curr -= 2; - ptr::copy_nonoverlapping(lut_ptr.offset(d1), buf_ptr.offset(curr), 2); - } - - // decode last 1 or 2 chars - if n < 10 { - 8007e4e: 2d0a cmp r5, #10 - 8007e50: d226 bcs.n 8007ea0 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0xf8> - curr -= 1; - 8007e52: 1e50 subs r0, r2, #1 - 8007e54: 4290 cmp r0, r2 - 8007e56: d649 bvs.n 8007eec <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x144> - *buf_ptr.offset(curr) = (n as u8) + b'0'; - 8007e58: 3530 adds r5, #48 ; 0x30 - 8007e5a: aa05 add r2, sp, #20 - 8007e5c: 5415 strb r5, [r2, r0] - 8007e5e: e030 b.n 8007ec2 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x11a> - 8007e60: 2427 movs r4, #39 ; 0x27 - if n >= 100 { - 8007e62: 2e63 cmp r6, #99 ; 0x63 - 8007e64: d9f1 bls.n 8007e4a <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0xa2> - curr -= 2; - 8007e66: 1ea2 subs r2, r4, #2 - 8007e68: 42a2 cmp r2, r4 - 8007e6a: d63f bvs.n 8007eec <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x144> - 8007e6c: a805 add r0, sp, #20 - 8007e6e: 1880 adds r0, r0, r2 - 8007e70: 4b26 ldr r3, [pc, #152] ; (8007f0c <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x164>) - 8007e72: 4033 ands r3, r6 - n /= 100; - 8007e74: 089c lsrs r4, r3, #2 - 8007e76: 4b26 ldr r3, [pc, #152] ; (8007f10 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x168>) - 8007e78: 4363 muls r3, r4 - 8007e7a: 0c5d lsrs r5, r3, #17 - 8007e7c: 2364 movs r3, #100 ; 0x64 - 8007e7e: 436b muls r3, r5 - 8007e80: 1af3 subs r3, r6, r3 - let d1 = (n % 100) << 1; - 8007e82: 045b lsls r3, r3, #17 - 8007e84: 0c1b lsrs r3, r3, #16 - 8007e86: 4c23 ldr r4, [pc, #140] ; (8007f14 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x16c>) - 8007e88: 18e3 adds r3, r4, r3 - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 8007e8a: 1ac4 subs r4, r0, r3 - 8007e8c: d200 bcs.n 8007e90 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0xe8> - 8007e8e: 1a1c subs r4, r3, r0 - if !$e { - 8007e90: 2c01 cmp r4, #1 - 8007e92: d934 bls.n 8007efe <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x156> - copy_nonoverlapping(src, dst, count) - 8007e94: 785c ldrb r4, [r3, #1] - 8007e96: 7044 strb r4, [r0, #1] - 8007e98: 781b ldrb r3, [r3, #0] - 8007e9a: 7003 strb r3, [r0, #0] - if n < 10 { - 8007e9c: 2d0a cmp r5, #10 - 8007e9e: d3d8 bcc.n 8007e52 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0xaa> - } else { - let d1 = n << 1; - curr -= 2; - 8007ea0: 1e90 subs r0, r2, #2 - 8007ea2: 4290 cmp r0, r2 - 8007ea4: d622 bvs.n 8007eec <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x144> - 8007ea6: aa05 add r2, sp, #20 - 8007ea8: 1812 adds r2, r2, r0 - let d1 = n << 1; - 8007eaa: 006c lsls r4, r5, #1 - 8007eac: 4b19 ldr r3, [pc, #100] ; (8007f14 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x16c>) - 8007eae: 191c adds r4, r3, r4 - let diff = if src_usize > dst_usize { src_usize - dst_usize } else { dst_usize - src_usize }; - 8007eb0: 1b13 subs r3, r2, r4 - 8007eb2: d200 bcs.n 8007eb6 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x10e> - 8007eb4: 1aa3 subs r3, r4, r2 - if !$e { - 8007eb6: 2b01 cmp r3, #1 - 8007eb8: d921 bls.n 8007efe <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x156> - copy_nonoverlapping(src, dst, count) - 8007eba: 7863 ldrb r3, [r4, #1] - 8007ebc: 7053 strb r3, [r2, #1] - 8007ebe: 7823 ldrb r3, [r4, #0] - 8007ec0: 7013 strb r3, [r2, #0] - 8007ec2: 2200 movs r2, #0 - 8007ec4: 2327 movs r3, #39 ; 0x27 - - // SAFETY: `curr` > 0 (since we made `buf` large enough), and all the chars are valid - // UTF-8 since `DEC_DIGITS_LUT` is - let buf_slice = unsafe { - str::from_utf8_unchecked( - slice::from_raw_parts(buf_ptr.offset(curr), buf.len() - curr as usize)) - 8007ec6: 1a1c subs r4, r3, r0 - 8007ec8: 4152 adcs r2, r2 - 8007eca: 4283 cmp r3, r0 - 8007ecc: d30e bcc.n 8007eec <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x144> - 8007ece: 2c00 cmp r4, #0 - 8007ed0: d415 bmi.n 8007efe <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x156> - }; - f.pad_integral(is_nonnegative, "", buf_slice) - 8007ed2: 9401 str r4, [sp, #4] - 8007ed4: aa05 add r2, sp, #20 - 8007ed6: 1810 adds r0, r2, r0 - 8007ed8: 9000 str r0, [sp, #0] - 8007eda: 4a12 ldr r2, [pc, #72] ; (8007f24 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x17c>) - 8007edc: 2300 movs r3, #0 - 8007ede: 9803 ldr r0, [sp, #12] - 8007ee0: f7ff f800 bl 8006ee4 - } - 8007ee4: b00f add sp, #60 ; 0x3c - 8007ee6: bcf0 pop {r4, r5, r6, r7} - 8007ee8: bc02 pop {r1} - 8007eea: 4708 bx r1 - 8007eec: 480b ldr r0, [pc, #44] ; (8007f1c <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x174>) - 8007eee: 2121 movs r1, #33 ; 0x21 - 8007ef0: e001 b.n 8007ef6 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x14e> - ptr::copy_nonoverlapping(lut_ptr.offset(d2), buf_ptr.offset(curr + 2), 2); - 8007ef2: 480d ldr r0, [pc, #52] ; (8007f28 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x180>) - 8007ef4: 211c movs r1, #28 - 8007ef6: 4a0a ldr r2, [pc, #40] ; (8007f20 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698+0x178>) - 8007ef8: f001 f8f2 bl 80090e0 - 8007efc: defe udf #254 ; 0xfe - 8007efe: defe udf #254 ; 0xfe - 8007f00: defe udf #254 ; 0xfe - 8007f02: 46c0 nop ; (mov r8, r8) - 8007f04: 0000270f .word 0x0000270f - 8007f08: 00002710 .word 0x00002710 - 8007f0c: 0000ffff .word 0x0000ffff - 8007f10: 0000147b .word 0x0000147b - 8007f14: 0800c652 .word 0x0800c652 - 8007f18: 05f5e0ff .word 0x05f5e0ff - 8007f1c: 0800ce10 .word 0x0800ce10 - 8007f20: 0800cdf4 .word 0x0800cdf4 - 8007f24: 0800ce5c .word 0x0800ce5c - 8007f28: 0800ce40 .word 0x0800ce40 - -08007f2c ::fmt>: - - $(#[stable(feature = "rust1", since = "1.0.0")] - impl fmt::Display for $t { - #[allow(unused_comparisons)] - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - 8007f2c: b580 push {r7, lr} - 8007f2e: af00 add r7, sp, #0 - 8007f30: 000a movs r2, r1 - let is_nonnegative = *self >= 0; - 8007f32: 6801 ldr r1, [r0, #0] - let n = if is_nonnegative { - 8007f34: 17cb asrs r3, r1, #31 - 8007f36: 18c8 adds r0, r1, r3 - 8007f38: 4058 eors r0, r3 - self.$conv_fn() - } else { - // convert the negative num to positive by summing 1 to it's 2 complement - (!self.$conv_fn()).wrapping_add(1) - }; - $name(n, is_nonnegative, f) - 8007f3a: 43c9 mvns r1, r1 - 8007f3c: 0fc9 lsrs r1, r1, #31 - 8007f3e: f7ff ff33 bl 8007da8 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698> - } - 8007f42: bc80 pop {r7} - 8007f44: bc02 pop {r1} - 8007f46: 4708 bx r1 - -08007f48 ::fmt>: - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - 8007f48: b580 push {r7, lr} - 8007f4a: af00 add r7, sp, #0 - 8007f4c: 000a movs r2, r1 - fn to_u32(&self) -> u32 { *self as u32 } - 8007f4e: 6800 ldr r0, [r0, #0] - 8007f50: 2101 movs r1, #1 - $name(n, is_nonnegative, f) - 8007f52: f7ff ff29 bl 8007da8 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698> - } - 8007f56: bc80 pop {r7} - 8007f58: bc02 pop {r1} - 8007f5a: 4708 bx r1 - -08007f5c <::fmt>: -/// The parameters given to `Layout::from_size_align` -/// or some other `Layout` constructor -/// do not satisfy its documented constraints. -#[stable(feature = "alloc_layout_error", since = "1.50.0")] -#[non_exhaustive] -#[derive(Clone, PartialEq, Eq, Debug)] - 8007f5c: b580 push {r7, lr} - 8007f5e: af00 add r7, sp, #0 - self.buf.write_str(data) - 8007f60: 6988 ldr r0, [r1, #24] - 8007f62: 69c9 ldr r1, [r1, #28] - 8007f64: 68cb ldr r3, [r1, #12] - 8007f66: 4903 ldr r1, [pc, #12] ; (8007f74 <::fmt+0x18>) - 8007f68: 220b movs r2, #11 - 8007f6a: f000 f805 bl 8007f78 <::fmt+0x1c> - 8007f6e: bc80 pop {r7} - 8007f70: bc02 pop {r1} - 8007f72: 4708 bx r1 - 8007f74: 0800ce78 .word 0x0800ce78 - 8007f78: 4718 bx r3 - ... - -08007f7c <::type_id>: - fn type_id(&self) -> TypeId; -} - -#[stable(feature = "rust1", since = "1.0.0")] -impl Any for T { - fn type_id(&self) -> TypeId { - 8007f7c: 4801 ldr r0, [pc, #4] ; (8007f84 <::type_id+0x8>) - 8007f7e: 4902 ldr r1, [pc, #8] ; (8007f88 <::type_id+0xc>) - TypeId::of::() - } - 8007f80: 4770 bx lr - 8007f82: 46c0 nop ; (mov r8, r8) - 8007f84: 4d474a4e .word 0x4d474a4e - 8007f88: 846c8d6e .word 0x846c8d6e - -08007f8c <::fmt>: - } -} - -#[stable(feature = "panic_hook_display", since = "1.26.0")] -impl fmt::Display for PanicInfo<'_> { - fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { - 8007f8c: b5f0 push {r4, r5, r6, r7, lr} - 8007f8e: af03 add r7, sp, #12 - 8007f90: b091 sub sp, #68 ; 0x44 - 8007f92: 0004 movs r4, r0 - 8007f94: 6988 ldr r0, [r1, #24] - 8007f96: 69cd ldr r5, [r1, #28] - 8007f98: 68eb ldr r3, [r5, #12] - 8007f9a: 4934 ldr r1, [pc, #208] ; (800806c <::fmt+0xe0>) - 8007f9c: 220c movs r2, #12 - 8007f9e: 9003 str r0, [sp, #12] - 8007fa0: f000 f87a bl 8008098 <::fmt+0x10c> - 8007fa4: 2601 movs r6, #1 - formatter.write_str("panicked at ")?; - 8007fa6: 2800 cmp r0, #0 - 8007fa8: d154 bne.n 8008054 <::fmt+0xc8> - if let Some(message) = self.message { - 8007faa: 68a0 ldr r0, [r4, #8] - 8007fac: 2800 cmp r0, #0 - 8007fae: 9402 str r4, [sp, #8] - 8007fb0: d002 beq.n 8007fb8 <::fmt+0x2c> - 8007fb2: 9004 str r0, [sp, #16] - write!(formatter, "'{}', ", message)? - 8007fb4: 482e ldr r0, [pc, #184] ; (8008070 <::fmt+0xe4>) - 8007fb6: e019 b.n 8007fec <::fmt+0x60> - } else if let Some(payload) = self.payload.downcast_ref::<&'static str>() { - 8007fb8: cc03 ldmia r4!, {r0, r1} - pub fn is(&self) -> bool { - // Get `TypeId` of the type this function is instantiated with. - let t = TypeId::of::(); - - // Get `TypeId` of the type in the trait object (`self`). - let concrete = self.type_id(); - 8007fba: 68c9 ldr r1, [r1, #12] - 8007fbc: 9001 str r0, [sp, #4] - 8007fbe: 9100 str r1, [sp, #0] - 8007fc0: f000 f86b bl 800809a <::fmt+0x10e> - 8007fc4: 4a2c ldr r2, [pc, #176] ; (8008078 <::fmt+0xec>) -/// noting that the hashes and ordering will vary between Rust releases. Beware -/// of relying on them inside of your code! -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)] -#[stable(feature = "rust1", since = "1.0.0")] -pub struct TypeId { - t: u64, - 8007fc6: 4051 eors r1, r2 - 8007fc8: 4b2c ldr r3, [pc, #176] ; (800807c <::fmt+0xf0>) - 8007fca: 4058 eors r0, r3 - 8007fcc: 4308 orrs r0, r1 - 8007fce: 9c03 ldr r4, [sp, #12] - if self.is::() { - 8007fd0: d122 bne.n 8008018 <::fmt+0x8c> - 8007fd2: 9c01 ldr r4, [sp, #4] - let concrete = self.type_id(); - 8007fd4: 0020 movs r0, r4 - 8007fd6: 9900 ldr r1, [sp, #0] - 8007fd8: f000 f85f bl 800809a <::fmt+0x10e> - t: u64, - 8007fdc: 4a26 ldr r2, [pc, #152] ; (8008078 <::fmt+0xec>) - 8007fde: 4051 eors r1, r2 - 8007fe0: 4a26 ldr r2, [pc, #152] ; (800807c <::fmt+0xf0>) - 8007fe2: 4050 eors r0, r2 - 8007fe4: 4308 orrs r0, r1 - debug_assert!(self.is::()); - 8007fe6: d13a bne.n 800805e <::fmt+0xd2> - 8007fe8: 9404 str r4, [sp, #16] - write!(formatter, "'{}', ", payload)? - 8007fea: 4827 ldr r0, [pc, #156] ; (8008088 <::fmt+0xfc>) - 8007fec: 9006 str r0, [sp, #24] - 8007fee: a804 add r0, sp, #16 - 8007ff0: 9005 str r0, [sp, #20] - 8007ff2: 2001 movs r0, #1 - 8007ff4: 9010 str r0, [sp, #64] ; 0x40 - 8007ff6: a805 add r0, sp, #20 - 8007ff8: 900f str r0, [sp, #60] ; 0x3c - 8007ffa: 2000 movs r0, #0 - 8007ffc: 900e str r0, [sp, #56] ; 0x38 - 8007ffe: 900d str r0, [sp, #52] ; 0x34 - 8008000: 2002 movs r0, #2 - 8008002: 900c str r0, [sp, #48] ; 0x30 - 8008004: 481b ldr r0, [pc, #108] ; (8008074 <::fmt+0xe8>) - 8008006: 900b str r0, [sp, #44] ; 0x2c - 8008008: aa0b add r2, sp, #44 ; 0x2c - 800800a: 9c03 ldr r4, [sp, #12] - 800800c: 0020 movs r0, r4 - 800800e: 0029 movs r1, r5 - 8008010: f7fe fe7c bl 8006d0c - 8008014: 2800 cmp r0, #0 - 8008016: d11d bne.n 8008054 <::fmt+0xc8> - // NOTE: we cannot use downcast_ref::() here - // since String is not available in libcore! - // The payload is a String when `std::panic!` is called with multiple arguments, - // but in that case the message is also available. - - self.location.fmt(formatter) - 8008018: 9802 ldr r0, [sp, #8] - 800801a: 68c0 ldr r0, [r0, #12] -} - -#[stable(feature = "panic_hook_display", since = "1.26.0")] -impl fmt::Display for Location<'_> { - fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(formatter, "{}:{}:{}", self.file, self.line, self.col) - 800801c: 491b ldr r1, [pc, #108] ; (800808c <::fmt+0x100>) - 800801e: 910a str r1, [sp, #40] ; 0x28 - 8008020: 0002 movs r2, r0 - 8008022: 320c adds r2, #12 - 8008024: 9209 str r2, [sp, #36] ; 0x24 - 8008026: 9108 str r1, [sp, #32] - 8008028: 0001 movs r1, r0 - 800802a: 3108 adds r1, #8 - 800802c: 9107 str r1, [sp, #28] - 800802e: 4918 ldr r1, [pc, #96] ; (8008090 <::fmt+0x104>) - 8008030: 9106 str r1, [sp, #24] - 8008032: 9005 str r0, [sp, #20] - 8008034: 2003 movs r0, #3 - write(self.buf, fmt) - 8008036: 9010 str r0, [sp, #64] ; 0x40 - 8008038: a905 add r1, sp, #20 - 800803a: 910f str r1, [sp, #60] ; 0x3c - 800803c: 2100 movs r1, #0 - 800803e: 910e str r1, [sp, #56] ; 0x38 - 8008040: 910d str r1, [sp, #52] ; 0x34 - 8008042: 900c str r0, [sp, #48] ; 0x30 - 8008044: 4813 ldr r0, [pc, #76] ; (8008094 <::fmt+0x108>) - 8008046: 900b str r0, [sp, #44] ; 0x2c - 8008048: aa0b add r2, sp, #44 ; 0x2c - 800804a: 0020 movs r0, r4 - 800804c: 0029 movs r1, r5 - 800804e: f7fe fe5d bl 8006d0c - 8008052: 0006 movs r6, r0 - } - 8008054: 0030 movs r0, r6 - 8008056: b011 add sp, #68 ; 0x44 - 8008058: bcf0 pop {r4, r5, r6, r7} - 800805a: bc02 pop {r1} - 800805c: 4708 bx r1 - 800805e: 4808 ldr r0, [pc, #32] ; (8008080 <::fmt+0xf4>) - 8008060: 2120 movs r1, #32 - 8008062: 4a08 ldr r2, [pc, #32] ; (8008084 <::fmt+0xf8>) - 8008064: f001 f83c bl 80090e0 - 8008068: defe udf #254 ; 0xfe - 800806a: 46c0 nop ; (mov r8, r8) - 800806c: 0800cf50 .word 0x0800cf50 - 8008070: 08007907 .word 0x08007907 - 8008074: 0800cf60 .word 0x0800cf60 - 8008078: b8ae3dc7 .word 0xb8ae3dc7 - 800807c: 22b9f20b .word 0x22b9f20b - 8008080: 0800ceb1 .word 0x0800ceb1 - 8008084: 0800cf40 .word 0x0800cf40 - 8008088: 080078dd .word 0x080078dd - 800808c: 08007f49 .word 0x08007f49 - 8008090: 080078f3 .word 0x080078f3 - 8008094: 0800ce60 .word 0x0800ce60 - 8008098: 4718 bx r3 - 800809a: 4708 bx r1 - -0800809c : -fn unwrap_failed(msg: &str, error: &dyn fmt::Debug) -> ! { - 800809c: b580 push {r7, lr} - 800809e: af00 add r7, sp, #0 - 80080a0: b08e sub sp, #56 ; 0x38 - 80080a2: 9101 str r1, [sp, #4] - 80080a4: 9000 str r0, [sp, #0] - 80080a6: 9303 str r3, [sp, #12] - 80080a8: 9202 str r2, [sp, #8] - 80080aa: 2002 movs r0, #2 - Arguments { pieces, fmt: None, args } - 80080ac: 9009 str r0, [sp, #36] ; 0x24 - 80080ae: a90a add r1, sp, #40 ; 0x28 - 80080b0: 9108 str r1, [sp, #32] - 80080b2: 2100 movs r1, #0 - 80080b4: 9107 str r1, [sp, #28] - 80080b6: 9106 str r1, [sp, #24] - 80080b8: 9005 str r0, [sp, #20] - 80080ba: 4807 ldr r0, [pc, #28] ; (80080d8 ) - 80080bc: 9004 str r0, [sp, #16] - panic!("{msg}: {error:?}") - 80080be: 4807 ldr r0, [pc, #28] ; (80080dc ) - 80080c0: 900d str r0, [sp, #52] ; 0x34 - 80080c2: a802 add r0, sp, #8 - 80080c4: 900c str r0, [sp, #48] ; 0x30 - 80080c6: 4806 ldr r0, [pc, #24] ; (80080e0 ) - 80080c8: 900b str r0, [sp, #44] ; 0x2c - 80080ca: 4668 mov r0, sp - 80080cc: 900a str r0, [sp, #40] ; 0x28 - 80080ce: a804 add r0, sp, #16 - 80080d0: 68b9 ldr r1, [r7, #8] - 80080d2: f001 f83b bl 800914c - 80080d6: defe udf #254 ; 0xfe - 80080d8: 0800cf74 .word 0x0800cf74 - 80080dc: 080078c5 .word 0x080078c5 - 80080e0: 080078f3 .word 0x080078f3 - -080080e4 ::align_to>: - /// // less_efficient_algorithm_for_bytes(suffix); - /// } - /// ``` - #[stable(feature = "slice_align_to", since = "1.30.0")] - #[must_use] - pub unsafe fn align_to(&self) -> (&[T], &[U], &[T]) { - 80080e4: b5f0 push {r4, r5, r6, r7, lr} - 80080e6: af03 add r7, sp, #12 - 80080e8: b083 sub sp, #12 - // - // round_up_to_next_alignment(p, a) - p - // - // which distributes operations around the load-bearing, but pessimizing `and` sufficiently - // for LLVM to be able to utilize the various optimizations it knows about. - return wrapping_sub(wrapping_add(addr, a_minus_one) & wrapping_sub(0, a), addr); - 80080ea: 1ccc adds r4, r1, #3 - 80080ec: 2303 movs r3, #3 - 80080ee: 439c bics r4, r3 - 80080f0: 1a65 subs r5, r4, r1 - // First, find at what point do we split between the first and 2nd slice. Easy with - // ptr.align_offset. - let ptr = self.as_ptr(); - // SAFETY: See the `align_to_mut` method for the detailed safety comment. - let offset = unsafe { crate::ptr::align_offset(ptr, mem::align_of::()) }; - if offset > self.len() { - 80080f2: 4295 cmp r5, r2 - 80080f4: d905 bls.n 8008102 ::align_to+0x1e> - (self, &[], &[]) - 80080f6: 6001 str r1, [r0, #0] - 80080f8: 4c15 ldr r4, [pc, #84] ; (8008150 ::align_to+0x6c>) - 80080fa: 2600 movs r6, #0 - 80080fc: 0021 movs r1, r4 - 80080fe: 0033 movs r3, r6 - 8008100: e012 b.n 8008128 ::align_to+0x44> - 8008102: 194c adds r4, r1, r5 - 8008104: 9402 str r4, [sp, #8] - 8008106: 07a6 lsls r6, r4, #30 - 8008108: d11c bne.n 8008144 ::align_to+0x60> - 800810a: 1b52 subs r2, r2, r5 - 800810c: d41a bmi.n 8008144 ::align_to+0x60> - 800810e: 4013 ands r3, r2 - 8008110: 2600 movs r6, #0 - // since the caller guarantees that we can transmute `T` to `U` safely. - unsafe { - ( - left, - from_raw_parts(rest.as_ptr() as *const U, us_len), - from_raw_parts(rest.as_ptr().add(rest.len() - ts_len), ts_len), - 8008112: 1ad4 subs r4, r2, r3 - 8008114: 9401 str r4, [sp, #4] - 8008116: 4176 adcs r6, r6 - 8008118: 429a cmp r2, r3 - 800811a: d30d bcc.n 8008138 ::align_to+0x54> - 800811c: 0896 lsrs r6, r2, #2 - ( - 800811e: 6001 str r1, [r0, #0] - 8008120: 9901 ldr r1, [sp, #4] - 8008122: 9c02 ldr r4, [sp, #8] - 8008124: 1861 adds r1, r4, r1 - 8008126: 002a movs r2, r5 - 8008128: 1d05 adds r5, r0, #4 - 800812a: c554 stmia r5!, {r2, r4, r6} - 800812c: 6101 str r1, [r0, #16] - 800812e: 6143 str r3, [r0, #20] - ) - } - } - } - 8008130: b003 add sp, #12 - 8008132: bcf0 pop {r4, r5, r6, r7} - 8008134: bc01 pop {r0} - 8008136: 4700 bx r0 - from_raw_parts(rest.as_ptr().add(rest.len() - ts_len), ts_len), - 8008138: 4803 ldr r0, [pc, #12] ; (8008148 ::align_to+0x64>) - 800813a: 2121 movs r1, #33 ; 0x21 - 800813c: 4a03 ldr r2, [pc, #12] ; (800814c ::align_to+0x68>) - 800813e: f000 ffcf bl 80090e0 - 8008142: defe udf #254 ; 0xfe - ::core::intrinsics::abort(); - 8008144: defe udf #254 ; 0xfe - 8008146: defe udf #254 ; 0xfe - 8008148: 0800ce90 .word 0x0800ce90 - 800814c: 0800cff8 .word 0x0800cff8 - 8008150: 0800cf70 .word 0x0800cf70 - -08008154 <_ZN4core3ops8function6FnOnce9call_once17h0102fc3272732c1cE.llvm.17363974103973521492>: - 8008154: b580 push {r7, lr} - 8008156: af00 add r7, sp, #0 - 8008158: f000 fc5c bl 8008a14 - 800815c: defe udf #254 ; 0xfe - -0800815e <_ZN4core3ops8function6FnOnce9call_once17h34ae9695be47d2adE.llvm.17363974103973521492>: - 800815e: b580 push {r7, lr} - 8008160: af00 add r7, sp, #0 - 8008162: f000 fc2f bl 80089c4 - 8008166: defe udf #254 ; 0xfe - -08008168 <_ZN4core3ops8function6FnOnce9call_once17h539abbe21611469cE.llvm.17363974103973521492>: - 8008168: b580 push {r7, lr} - 800816a: af00 add r7, sp, #0 - 800816c: f000 fd0c bl 8008b88 - 8008170: defe udf #254 ; 0xfe - -08008172 <_ZN4core3ops8function6FnOnce9call_once17hd8d99e1b191df880E.llvm.17363974103973521492>: - 8008172: b580 push {r7, lr} - 8008174: af00 add r7, sp, #0 - 8008176: f000 fbfd bl 8008974 - 800817a: defe udf #254 ; 0xfe - -0800817c : -pub const unsafe fn const_eval_select( - 800817c: b580 push {r7, lr} - 800817e: af00 add r7, sp, #0 - called_at_rt.call_once(arg) - 8008180: 6804 ldr r4, [r0, #0] - 8008182: 1d03 adds r3, r0, #4 - 8008184: cb0e ldmia r3, {r1, r2, r3} - 8008186: 0020 movs r0, r4 - 8008188: f7ff ffee bl 8008168 <_ZN4core3ops8function6FnOnce9call_once17h539abbe21611469cE.llvm.17363974103973521492> - 800818c: defe udf #254 ; 0xfe - -0800818e : -pub const unsafe fn const_eval_select( - 800818e: b580 push {r7, lr} - 8008190: af00 add r7, sp, #0 - called_at_rt.call_once(arg) - 8008192: f7ff ffee bl 8008172 <_ZN4core3ops8function6FnOnce9call_once17hd8d99e1b191df880E.llvm.17363974103973521492> - 8008196: defe udf #254 ; 0xfe - -08008198 : -pub const unsafe fn const_eval_select( - 8008198: b580 push {r7, lr} - 800819a: af00 add r7, sp, #0 - called_at_rt.call_once(arg) - 800819c: f7ff ffda bl 8008154 <_ZN4core3ops8function6FnOnce9call_once17h0102fc3272732c1cE.llvm.17363974103973521492> - 80081a0: defe udf #254 ; 0xfe - -080081a2 : -pub const unsafe fn const_eval_select( - 80081a2: b580 push {r7, lr} - 80081a4: af00 add r7, sp, #0 - called_at_rt.call_once(arg) - 80081a6: f7ff ffda bl 800815e <_ZN4core3ops8function6FnOnce9call_once17h34ae9695be47d2adE.llvm.17363974103973521492> - 80081aa: defe udf #254 ; 0xfe - -080081ac : -#[cfg_attr(not(feature = "panic_immediate_abort"), inline(never))] -#[cfg_attr(feature = "panic_immediate_abort", inline)] -#[cold] -#[track_caller] -#[rustc_const_unstable(feature = "const_option", issue = "67441")] -const fn expect_failed(msg: &str) -> ! { - 80081ac: b580 push {r7, lr} - 80081ae: af00 add r7, sp, #0 - panic_str(msg) - 80081b0: f000 f801 bl 80081b6 - 80081b4: defe udf #254 ; 0xfe - -080081b6 : -pub const fn panic_str(expr: &str) -> ! { - 80081b6: b580 push {r7, lr} - 80081b8: af00 add r7, sp, #0 - 80081ba: b082 sub sp, #8 - 80081bc: 9101 str r1, [sp, #4] - 80081be: 9000 str r0, [sp, #0] - 80081c0: 4668 mov r0, sp - panic_display(&expr); - 80081c2: 0011 movs r1, r2 - 80081c4: f000 f802 bl 80081cc - 80081c8: defe udf #254 ; 0xfe - ... - -080081cc : -pub const fn panic_display(x: &T) -> ! { - 80081cc: b580 push {r7, lr} - 80081ce: af00 add r7, sp, #0 - 80081d0: b088 sub sp, #32 - 80081d2: 2201 movs r2, #1 - 80081d4: 9205 str r2, [sp, #20] - 80081d6: ab06 add r3, sp, #24 - 80081d8: 9304 str r3, [sp, #16] - 80081da: 2300 movs r3, #0 - 80081dc: 9303 str r3, [sp, #12] - 80081de: 9302 str r3, [sp, #8] - 80081e0: 9201 str r2, [sp, #4] - 80081e2: 4a04 ldr r2, [pc, #16] ; (80081f4 ) - 80081e4: 9200 str r2, [sp, #0] - panic_fmt(format_args!("{}", *x)); - 80081e6: 4a04 ldr r2, [pc, #16] ; (80081f8 ) - 80081e8: 9207 str r2, [sp, #28] - 80081ea: 9006 str r0, [sp, #24] - 80081ec: 4668 mov r0, sp - 80081ee: f000 ffad bl 800914c - 80081f2: defe udf #254 ; 0xfe - 80081f4: 0800d088 .word 0x0800d088 - 80081f8: 080078f3 .word 0x080078f3 - -080081fc : - } -} - -fn do_count_chars(s: &str) -> usize { - 80081fc: b5f0 push {r4, r5, r6, r7, lr} - 80081fe: af03 add r7, sp, #12 - 8008200: b08d sub sp, #52 ; 0x34 - 8008202: 000c movs r4, r1 - 8008204: 0005 movs r5, r0 - 8008206: a807 add r0, sp, #28 - const _: () = assert!(CHUNK_SIZE < 256); - const _: () = assert!(CHUNK_SIZE % UNROLL_INNER == 0); - - // SAFETY: transmuting `[u8]` to `[usize]` is safe except for size - // differences which are handled by `align_to`. - let (head, body, tail) = unsafe { s.as_bytes().align_to::() }; - 8008208: 0029 movs r1, r5 - 800820a: 0022 movs r2, r4 - 800820c: f7ff ff6a bl 80080e4 ::align_to> - 8008210: 2101 movs r1, #1 - 8008212: 2200 movs r2, #0 - 8008214: 9808 ldr r0, [sp, #32] - 8008216: 9006 str r0, [sp, #24] - // mode). - // - // The `unlikely` helps discourage LLVM from inlining the body, which is - // nice, as we would rather not mark the `char_count_general_case` function - // as cold. - if unlikely(body.is_empty() || head.len() > USIZE_SIZE || tail.len() > USIZE_SIZE) { - 8008218: 2804 cmp r0, #4 - 800821a: b402 push {r1} - 800821c: bc01 pop {r0} - 800821e: d800 bhi.n 8008222 - 8008220: 0010 movs r0, r2 - let (head, body, tail) = unsafe { s.as_bytes().align_to::() }; - 8008222: 9e0a ldr r6, [sp, #40] ; 0x28 - self.len() == 0 - 8008224: 4273 negs r3, r6 - 8008226: 9605 str r6, [sp, #20] - 8008228: 4173 adcs r3, r6 - if unlikely(body.is_empty() || head.len() > USIZE_SIZE || tail.len() > USIZE_SIZE) { - 800822a: 4303 orrs r3, r0 - let (head, body, tail) = unsafe { s.as_bytes().align_to::() }; - 800822c: 980c ldr r0, [sp, #48] ; 0x30 - 800822e: 2804 cmp r0, #4 - 8008230: d800 bhi.n 8008234 - 8008232: 0011 movs r1, r2 - if unlikely(body.is_empty() || head.len() > USIZE_SIZE || tail.len() > USIZE_SIZE) { - 8008234: 430b orrs r3, r1 - 8008236: d022 beq.n 800827e - 8008238: 2c00 cmp r4, #0 - 800823a: d036 beq.n 80082aa - 800823c: 2100 movs r1, #0 - 800823e: 2040 movs r0, #64 ; 0x40 - 8008240: 43c0 mvns r0, r0 - 8008242: 9006 str r0, [sp, #24] - 8008244: 2301 movs r3, #1 - 8008246: 000e movs r6, r1 - 8008248: 7828 ldrb r0, [r5, #0] - 800824a: 0600 lsls r0, r0, #24 - 800824c: 1600 asrs r0, r0, #24 - (byte as i8) < -64 - 800824e: 9a06 ldr r2, [sp, #24] - 8008250: 4290 cmp r0, r2 - 8008252: b408 push {r3} - 8008254: bc01 pop {r0} - 8008256: dc00 bgt.n 800825a - 8008258: 0008 movs r0, r1 - 800825a: 1832 adds r2, r6, r0 - 800825c: b402 push {r1} - 800825e: bc01 pop {r0} - 8008260: 4148 adcs r0, r1 - 8008262: 42b2 cmp r2, r6 - 8008264: d200 bcs.n 8008268 - 8008266: e10c b.n 8008482 - 8008268: 0010 movs r0, r2 - 800826a: 1e64 subs r4, r4, #1 - 800826c: 1c6d adds r5, r5, #1 - 800826e: 2c00 cmp r4, #0 - 8008270: b404 push {r2} - 8008272: bc40 pop {r6} - 8008274: d1e8 bne.n 8008248 - total += sum_bytes_in_usize(counts); - break; - } - } - total -} - 8008276: b00d add sp, #52 ; 0x34 - 8008278: bcf0 pop {r4, r5, r6, r7} - 800827a: bc02 pop {r1} - 800827c: 4708 bx r1 - 800827e: 9c0b ldr r4, [sp, #44] ; 0x2c - 8008280: 9d09 ldr r5, [sp, #36] ; 0x24 - 8008282: 2600 movs r6, #0 - 8008284: 9906 ldr r1, [sp, #24] - 8008286: 2900 cmp r1, #0 - 8008288: b440 push {r6} - 800828a: bc08 pop {r3} - 800828c: d032 beq.n 80082f4 - 800828e: 9a07 ldr r2, [sp, #28] - 8008290: 2140 movs r1, #64 ; 0x40 - 8008292: 43c9 mvns r1, r1 - 8008294: 9204 str r2, [sp, #16] - 8008296: 7812 ldrb r2, [r2, #0] - 8008298: 0612 lsls r2, r2, #24 - 800829a: 1612 asrs r2, r2, #24 - 800829c: 428a cmp r2, r1 - 800829e: dc09 bgt.n 80082b4 - 80082a0: 2300 movs r3, #0 - 80082a2: 9a06 ldr r2, [sp, #24] - 80082a4: 2a01 cmp r2, #1 - 80082a6: d109 bne.n 80082bc - 80082a8: e024 b.n 80082f4 - 80082aa: 2000 movs r0, #0 - 80082ac: b00d add sp, #52 ; 0x34 - 80082ae: bcf0 pop {r4, r5, r6, r7} - 80082b0: bc02 pop {r1} - 80082b2: 4708 bx r1 - 80082b4: 2301 movs r3, #1 - 80082b6: 9a06 ldr r2, [sp, #24] - 80082b8: 2a01 cmp r2, #1 - 80082ba: d01b beq.n 80082f4 - 80082bc: 2201 movs r2, #1 - 80082be: 9103 str r1, [sp, #12] - 80082c0: 9904 ldr r1, [sp, #16] - 80082c2: 568a ldrsb r2, [r1, r2] - 80082c4: 9903 ldr r1, [sp, #12] - 80082c6: 428a cmp r2, r1 - 80082c8: dd00 ble.n 80082cc - 80082ca: 1c5b adds r3, r3, #1 - 80082cc: 9a06 ldr r2, [sp, #24] - 80082ce: 2a02 cmp r2, #2 - 80082d0: d010 beq.n 80082f4 - 80082d2: 2202 movs r2, #2 - 80082d4: 9904 ldr r1, [sp, #16] - 80082d6: 568a ldrsb r2, [r1, r2] - 80082d8: 9903 ldr r1, [sp, #12] - 80082da: 428a cmp r2, r1 - 80082dc: dd00 ble.n 80082e0 - 80082de: 1c5b adds r3, r3, #1 - 80082e0: 9a06 ldr r2, [sp, #24] - 80082e2: 2a03 cmp r2, #3 - 80082e4: d006 beq.n 80082f4 - 80082e6: 2203 movs r2, #3 - 80082e8: 9904 ldr r1, [sp, #16] - 80082ea: 568a ldrsb r2, [r1, r2] - 80082ec: 9903 ldr r1, [sp, #12] - 80082ee: 428a cmp r2, r1 - 80082f0: dd00 ble.n 80082f4 - 80082f2: 1c5b adds r3, r3, #1 - 80082f4: 9304 str r3, [sp, #16] - 80082f6: 2800 cmp r0, #0 - 80082f8: b440 push {r6} - 80082fa: bc08 pop {r3} - 80082fc: d01f beq.n 800833e - 80082fe: 9602 str r6, [sp, #8] - 8008300: 9503 str r5, [sp, #12] - 8008302: 2600 movs r6, #0 - 8008304: 2240 movs r2, #64 ; 0x40 - 8008306: 43d1 mvns r1, r2 - 8008308: 9106 str r1, [sp, #24] - 800830a: 2501 movs r5, #1 - 800830c: 0032 movs r2, r6 - 800830e: 7823 ldrb r3, [r4, #0] - 8008310: 061b lsls r3, r3, #24 - 8008312: 161b asrs r3, r3, #24 - 8008314: 9906 ldr r1, [sp, #24] - 8008316: 428b cmp r3, r1 - 8008318: b420 push {r5} - 800831a: bc08 pop {r3} - 800831c: dc00 bgt.n 8008320 - 800831e: 0033 movs r3, r6 - 8008320: 18d3 adds r3, r2, r3 - 8008322: b440 push {r6} - 8008324: bc02 pop {r1} - 8008326: 4171 adcs r1, r6 - 8008328: 4293 cmp r3, r2 - 800832a: d200 bcs.n 800832e - 800832c: e0a9 b.n 8008482 - 800832e: 1e40 subs r0, r0, #1 - 8008330: 1c64 adds r4, r4, #1 - 8008332: 2800 cmp r0, #0 - 8008334: b408 push {r3} - 8008336: bc04 pop {r2} - 8008338: d1e9 bne.n 800830e - 800833a: 9d03 ldr r5, [sp, #12] - 800833c: 9e02 ldr r6, [sp, #8] - 800833e: 9904 ldr r1, [sp, #16] - let mut total = char_count_general_case(head) + char_count_general_case(tail); - 8008340: 18c8 adds r0, r1, r3 - 8008342: 4176 adcs r6, r6 - 8008344: 4288 cmp r0, r1 - 8008346: d200 bcs.n 800834a - 8008348: e0ad b.n 80084a6 - 800834a: 4c5e ldr r4, [pc, #376] ; (80084c4 ) - 800834c: 9b05 ldr r3, [sp, #20] -impl<'a, T> Iterator for Chunks<'a, T> { - type Item = &'a [T]; - - #[inline] - fn next(&mut self) -> Option<&'a [T]> { - if self.v.is_empty() { - 800834e: 2b00 cmp r3, #0 - 8008350: d091 beq.n 8008276 - 8008352: 001e movs r6, r3 - 8008354: 9005 str r0, [sp, #20] - 8008356: 2bc0 cmp r3, #192 ; 0xc0 - 8008358: b408 push {r3} - 800835a: bc02 pop {r1} - 800835c: d300 bcc.n 8008360 - 800835e: 21c0 movs r1, #192 ; 0xc0 - 8008360: 20fc movs r0, #252 ; 0xfc - 8008362: 9104 str r1, [sp, #16] - let (multiple_of_n, remainder) = self.split_at(len * N); - 8008364: 4008 ands r0, r1 - Self { ptr: NonNull::new_unchecked(ptr as *mut T), end, _marker: PhantomData } - 8008366: 0081 lsls r1, r0, #2 - 8008368: 1868 adds r0, r5, r1 - 800836a: 9006 str r0, [sp, #24] - 800836c: 2300 movs r3, #0 - 800836e: 2900 cmp r1, #0 - 8008370: b408 push {r3} - 8008372: bc02 pop {r1} - 8008374: d03b beq.n 80083ee - 8008376: 9301 str r3, [sp, #4] - 8008378: 9602 str r6, [sp, #8] - 800837a: 2200 movs r2, #0 - 800837c: 0011 movs r1, r2 - 800837e: 9503 str r5, [sp, #12] - 8008380: 002b movs r3, r5 - for &word in unrolled { - 8008382: 681d ldr r5, [r3, #0] -// false), and bytes which are non-continuation bytes are left as `0x01` (e.g. -// true) -#[inline] -fn contains_non_continuation_byte(w: usize) -> usize { - const LSB: usize = usize::repeat_u8(0x01); - ((!w >> 7) | (w >> 6)) & LSB - 8008384: 09ae lsrs r6, r5, #6 - 8008386: 43ed mvns r5, r5 - 8008388: 09ed lsrs r5, r5, #7 - 800838a: 4335 orrs r5, r6 - 800838c: 4025 ands r5, r4 - counts += contains_non_continuation_byte(word); - 800838e: 194d adds r5, r1, r5 - 8008390: b404 push {r2} - 8008392: bc40 pop {r6} - 8008394: 4156 adcs r6, r2 - 8008396: 428d cmp r5, r1 - 8008398: d36d bcc.n 8008476 - for &word in unrolled { - 800839a: 6859 ldr r1, [r3, #4] - ((!w >> 7) | (w >> 6)) & LSB - 800839c: 098e lsrs r6, r1, #6 - 800839e: 43c9 mvns r1, r1 - 80083a0: 09c9 lsrs r1, r1, #7 - 80083a2: 4331 orrs r1, r6 - 80083a4: 4021 ands r1, r4 - 80083a6: 2000 movs r0, #0 - counts += contains_non_continuation_byte(word); - 80083a8: 1869 adds r1, r5, r1 - 80083aa: b401 push {r0} - 80083ac: bc40 pop {r6} - 80083ae: 4146 adcs r6, r0 - 80083b0: 42a9 cmp r1, r5 - 80083b2: d360 bcc.n 8008476 - for &word in unrolled { - 80083b4: 689d ldr r5, [r3, #8] - ((!w >> 7) | (w >> 6)) & LSB - 80083b6: 09ae lsrs r6, r5, #6 - 80083b8: 43ed mvns r5, r5 - 80083ba: 09ed lsrs r5, r5, #7 - 80083bc: 4335 orrs r5, r6 - 80083be: 4025 ands r5, r4 - counts += contains_non_continuation_byte(word); - 80083c0: 194d adds r5, r1, r5 - 80083c2: b401 push {r0} - 80083c4: bc40 pop {r6} - 80083c6: 4146 adcs r6, r0 - 80083c8: 428d cmp r5, r1 - 80083ca: d354 bcc.n 8008476 - for &word in unrolled { - 80083cc: 68d9 ldr r1, [r3, #12] - ((!w >> 7) | (w >> 6)) & LSB - 80083ce: 098e lsrs r6, r1, #6 - 80083d0: 43c9 mvns r1, r1 - 80083d2: 09c9 lsrs r1, r1, #7 - 80083d4: 4331 orrs r1, r6 - 80083d6: 4021 ands r1, r4 - counts += contains_non_continuation_byte(word); - 80083d8: 1869 adds r1, r5, r1 - 80083da: 4140 adcs r0, r0 - 80083dc: 42a9 cmp r1, r5 - 80083de: d34a bcc.n 8008476 - 80083e0: 3310 adds r3, #16 - 80083e2: 9806 ldr r0, [sp, #24] - 80083e4: 4283 cmp r3, r0 - 80083e6: d1cc bne.n 8008382 - 80083e8: 9d03 ldr r5, [sp, #12] - 80083ea: 9e02 ldr r6, [sp, #8] - 80083ec: 9b01 ldr r3, [sp, #4] -#[inline] -fn sum_bytes_in_usize(values: usize) -> usize { - const LSB_SHORTS: usize = usize::repeat_u16(0x0001); - const SKIP_BYTES: usize = usize::repeat_u16(0x00ff); - - let pair_sum: usize = (values & SKIP_BYTES) + ((values >> 8) & SKIP_BYTES); - 80083ee: 0a0a lsrs r2, r1, #8 - 80083f0: 4833 ldr r0, [pc, #204] ; (80084c0 ) - 80083f2: 4001 ands r1, r0 - 80083f4: 4002 ands r2, r0 - 80083f6: 1851 adds r1, r2, r1 - intrinsics::wrapping_mul(self, rhs) - 80083f8: 4830 ldr r0, [pc, #192] ; (80084bc ) - 80083fa: 4341 muls r1, r0 - pair_sum.wrapping_mul(LSB_SHORTS) >> ((USIZE_SIZE - 2) * 8) - 80083fc: 0c09 lsrs r1, r1, #16 - 80083fe: 9805 ldr r0, [sp, #20] - total += sum_bytes_in_usize(counts); - 8008400: 1841 adds r1, r0, r1 - 8008402: 415b adcs r3, r3 - 8008404: 4281 cmp r1, r0 - 8008406: d342 bcc.n 800848e - 8008408: 2003 movs r0, #3 - 800840a: 9a04 ldr r2, [sp, #16] - 800840c: 4010 ands r0, r2 - 800840e: 1ab3 subs r3, r6, r2 - 8008410: 0092 lsls r2, r2, #2 - 8008412: 18ad adds r5, r5, r2 - if !remainder.is_empty() { - 8008414: 2800 cmp r0, #0 - 8008416: b402 push {r1} - 8008418: bc01 pop {r0} - 800841a: d098 beq.n 800834e - 800841c: 2ec0 cmp r6, #192 ; 0xc0 - 800841e: d300 bcc.n 8008422 - 8008420: 26c0 movs r6, #192 ; 0xc0 - 8008422: 07b0 lsls r0, r6, #30 - 8008424: 0f05 lsrs r5, r0, #28 - 8008426: 2600 movs r6, #0 - 8008428: 9605 str r6, [sp, #20] - 800842a: 9a06 ldr r2, [sp, #24] - for &word in remainder { - 800842c: 6810 ldr r0, [r2, #0] - ((!w >> 7) | (w >> 6)) & LSB - 800842e: 0983 lsrs r3, r0, #6 - 8008430: 43c0 mvns r0, r0 - 8008432: 09c0 lsrs r0, r0, #7 - 8008434: 4318 orrs r0, r3 - 8008436: 4020 ands r0, r4 - counts += contains_non_continuation_byte(word); - 8008438: 1833 adds r3, r6, r0 - 800843a: 9805 ldr r0, [sp, #20] - 800843c: 4140 adcs r0, r0 - 800843e: 42b3 cmp r3, r6 - 8008440: d32b bcc.n 800849a - 8008442: 1f2d subs r5, r5, #4 - 8008444: 1d12 adds r2, r2, #4 - 8008446: 2d00 cmp r5, #0 - 8008448: b408 push {r3} - 800844a: bc40 pop {r6} - 800844c: d1ee bne.n 800842c - let pair_sum: usize = (values & SKIP_BYTES) + ((values >> 8) & SKIP_BYTES); - 800844e: 0a18 lsrs r0, r3, #8 - 8008450: 4a1b ldr r2, [pc, #108] ; (80084c0 ) - 8008452: 4013 ands r3, r2 - 8008454: 4010 ands r0, r2 - 8008456: 18c0 adds r0, r0, r3 - 8008458: 4a18 ldr r2, [pc, #96] ; (80084bc ) - 800845a: 4342 muls r2, r0 - pair_sum.wrapping_mul(LSB_SHORTS) >> ((USIZE_SIZE - 2) * 8) - 800845c: 0c10 lsrs r0, r2, #16 - 800845e: 2200 movs r2, #0 - total += sum_bytes_in_usize(counts); - 8008460: 1808 adds r0, r1, r0 - 8008462: 4152 adcs r2, r2 - 8008464: 4288 cmp r0, r1 - 8008466: d300 bcc.n 800846a - 8008468: e705 b.n 8008276 - 800846a: 4817 ldr r0, [pc, #92] ; (80084c8 ) - 800846c: 211c movs r1, #28 - 800846e: 4a18 ldr r2, [pc, #96] ; (80084d0 ) - 8008470: f000 fe36 bl 80090e0 - 8008474: defe udf #254 ; 0xfe - counts += contains_non_continuation_byte(word); - 8008476: 4814 ldr r0, [pc, #80] ; (80084c8 ) - 8008478: 211c movs r1, #28 - 800847a: 4a14 ldr r2, [pc, #80] ; (80084cc ) - 800847c: f000 fe30 bl 80090e0 - 8008480: defe udf #254 ; 0xfe - 8008482: 480c ldr r0, [pc, #48] ; (80084b4 ) - 8008484: 211c movs r1, #28 - 8008486: 4a0c ldr r2, [pc, #48] ; (80084b8 ) - 8008488: f000 fe2a bl 80090e0 - 800848c: defe udf #254 ; 0xfe - total += sum_bytes_in_usize(counts); - 800848e: 480e ldr r0, [pc, #56] ; (80084c8 ) - 8008490: 211c movs r1, #28 - 8008492: 4a11 ldr r2, [pc, #68] ; (80084d8 ) - 8008494: f000 fe24 bl 80090e0 - 8008498: defe udf #254 ; 0xfe - counts += contains_non_continuation_byte(word); - 800849a: 480b ldr r0, [pc, #44] ; (80084c8 ) - 800849c: 211c movs r1, #28 - 800849e: 4a0d ldr r2, [pc, #52] ; (80084d4 ) - 80084a0: f000 fe1e bl 80090e0 - 80084a4: defe udf #254 ; 0xfe - let mut total = char_count_general_case(head) + char_count_general_case(tail); - 80084a6: 4808 ldr r0, [pc, #32] ; (80084c8 ) - 80084a8: 211c movs r1, #28 - 80084aa: 4a0c ldr r2, [pc, #48] ; (80084dc ) - 80084ac: f000 fe18 bl 80090e0 - 80084b0: defe udf #254 ; 0xfe - 80084b2: 46c0 nop ; (mov r8, r8) - 80084b4: 0800e390 .word 0x0800e390 - 80084b8: 0800e5f0 .word 0x0800e5f0 - 80084bc: 00010001 .word 0x00010001 - 80084c0: 00ff00ff .word 0x00ff00ff - 80084c4: 01010101 .word 0x01010101 - 80084c8: 0800d040 .word 0x0800d040 - 80084cc: 0800d114 .word 0x0800d114 - 80084d0: 0800d144 .word 0x0800d144 - 80084d4: 0800d134 .word 0x0800d134 - 80084d8: 0800d124 .word 0x0800d124 - 80084dc: 0800d104 .word 0x0800d104 - -080084e0 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492>: -// NOTE: The following code was generated by "library/core/src/unicode/printable.py", -// do not edit directly! - -fn check(x: u16, singletonuppers: &[(u8, u8)], singletonlowers: &[u8], normal: &[u8]) -> bool { - 80084e0: b5f0 push {r4, r5, r6, r7, lr} - 80084e2: af03 add r7, sp, #12 - 80084e4: b089 sub sp, #36 ; 0x24 - 80084e6: 9302 str r3, [sp, #8] - 80084e8: 000d movs r5, r1 - 80084ea: 0006 movs r6, r0 - 80084ec: 4941 ldr r1, [pc, #260] ; (80085f4 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0x114>) - 80084ee: 4001 ands r1, r0 - 80084f0: 2001 movs r0, #1 - 80084f2: 9006 str r0, [sp, #24] - 80084f4: 2a00 cmp r2, #0 - 80084f6: d046 beq.n 8008586 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0xa6> - 80084f8: 0050 lsls r0, r2, #1 - 80084fa: 1828 adds r0, r5, r0 - 80084fc: 9004 str r0, [sp, #16] - 80084fe: 0a08 lsrs r0, r1, #8 - 8008500: 9005 str r0, [sp, #20] - 8008502: 68b8 ldr r0, [r7, #8] - let xupper = (x >> 8) as u8; - let mut lowerstart = 0; - for &(upper, lowercount) in singletonuppers { - 8008504: 9001 str r0, [sp, #4] - 8008506: 786c ldrb r4, [r5, #1] - 8008508: 1ca8 adds r0, r5, #2 - 800850a: 9008 str r0, [sp, #32] - 800850c: 2000 movs r0, #0 - 800850e: 0003 movs r3, r0 - 8008510: 9403 str r4, [sp, #12] - 8008512: 782d ldrb r5, [r5, #0] - 8008514: 9a05 ldr r2, [sp, #20] - let lowerend = lowerstart + lowercount as usize; - if xupper == upper { - 8008516: 4295 cmp r5, r2 - 8008518: 9407 str r4, [sp, #28] - 800851a: d111 bne.n 8008540 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0x60> - } else if self.end > slice.len() { - 800851c: 9a01 ldr r2, [sp, #4] - 800851e: 4294 cmp r4, r2 - 8008520: d862 bhi.n 80085e8 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0x108> - for &lower in &singletonlowers[lowerstart..lowerend] { - 8008522: 1ae4 subs r4, r4, r3 - 8008524: 9a02 ldr r2, [sp, #8] - 8008526: 18d3 adds r3, r2, r3 - 8008528: 2c00 cmp r4, #0 - 800852a: d015 beq.n 8008558 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0x78> - 800852c: 25ff movs r5, #255 ; 0xff - 800852e: 4035 ands r5, r6 - if lower == x as u8 { - 8008530: 1e64 subs r4, r4, #1 - 8008532: 1c5a adds r2, r3, #1 - for &lower in &singletonlowers[lowerstart..lowerend] { - 8008534: 781b ldrb r3, [r3, #0] - if lower == x as u8 { - 8008536: 42ab cmp r3, r5 - 8008538: b404 push {r2} - 800853a: bc08 pop {r3} - 800853c: d1f4 bne.n 8008528 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0x48> - 800853e: e041 b.n 80085c4 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0xe4> - 8008540: 9b04 ldr r3, [sp, #16] - 8008542: 9c08 ldr r4, [sp, #32] - 8008544: 1ae4 subs r4, r4, r3 - 8008546: 4263 negs r3, r4 - 8008548: 4163 adcs r3, r4 - return false; - } - } - } else if xupper < upper { - 800854a: 4295 cmp r5, r2 - 800854c: 9c06 ldr r4, [sp, #24] - 800854e: d800 bhi.n 8008552 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0x72> - 8008550: 001c movs r4, r3 - 8008552: 2c00 cmp r4, #0 - 8008554: d004 beq.n 8008560 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0x80> - 8008556: e016 b.n 8008586 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0xa6> - 8008558: 9a04 ldr r2, [sp, #16] - 800855a: 9b08 ldr r3, [sp, #32] - 800855c: 4293 cmp r3, r2 - 800855e: d012 beq.n 8008586 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0xa6> - 8008560: 9d08 ldr r5, [sp, #32] - for &(upper, lowercount) in singletonuppers { - 8008562: 786b ldrb r3, [r5, #1] - 8008564: 9a07 ldr r2, [sp, #28] - let lowerend = lowerstart + lowercount as usize; - 8008566: 18d4 adds r4, r2, r3 - 8008568: b401 push {r0} - 800856a: bc08 pop {r3} - 800856c: 4143 adcs r3, r0 - 800856e: 1cab adds r3, r5, #2 - 8008570: 4294 cmp r4, r2 - 8008572: 9308 str r3, [sp, #32] - 8008574: b404 push {r2} - 8008576: bc08 pop {r3} - 8008578: d2ca bcs.n 8008510 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0x30> - 800857a: 481f ldr r0, [pc, #124] ; (80085f8 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0x118>) - 800857c: 211c movs r1, #28 - 800857e: 4a1f ldr r2, [pc, #124] ; (80085fc <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0x11c>) - 8008580: f000 fdae bl 80090e0 - 8008584: defe udf #254 ; 0xfe - 8008586: 693a ldr r2, [r7, #16] - 8008588: 2a00 cmp r2, #0 - 800858a: 9806 ldr r0, [sp, #24] - 800858c: d01a beq.n 80085c4 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0xe4> - 800858e: 68fb ldr r3, [r7, #12] - 8008590: 189a adds r2, r3, r2 - 8008592: 9806 ldr r0, [sp, #24] - 8008594: 1c5e adds r6, r3, #1 - Some(t) => Some(t.clone()), - 8008596: 781c ldrb r4, [r3, #0] - 8008598: 0625 lsls r5, r4, #24 - 800859a: 162d asrs r5, r5, #24 - 800859c: d403 bmi.n 80085a6 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0xc6> - 800859e: 0033 movs r3, r6 - let len = if v & 0x80 != 0 { - ((v & 0x7f) as i32) << 8 | normal.next().unwrap() as i32 - } else { - v as i32 - }; - x -= len; - 80085a0: 1b09 subs r1, r1, r4 - 80085a2: d709 bvc.n 80085b8 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0xd8> - 80085a4: e014 b.n 80085d0 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0xf0> - 80085a6: 4296 cmp r6, r2 - 80085a8: d018 beq.n 80085dc <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0xfc> - 80085aa: 785c ldrb r4, [r3, #1] - ((v & 0x7f) as i32) << 8 | normal.next().unwrap() as i32 - 80085ac: 066d lsls r5, r5, #25 - 80085ae: 0c6d lsrs r5, r5, #17 - 80085b0: 192c adds r4, r5, r4 - 80085b2: 1c9b adds r3, r3, #2 - x -= len; - 80085b4: 1b09 subs r1, r1, r4 - 80085b6: d60b bvs.n 80085d0 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0xf0> - if x < 0 { - 80085b8: 2900 cmp r1, #0 - 80085ba: d403 bmi.n 80085c4 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0xe4> - 80085bc: 2401 movs r4, #1 - break; - } - current = !current; - 80085be: 4060 eors r0, r4 - 80085c0: 4293 cmp r3, r2 - 80085c2: d1e7 bne.n 8008594 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0xb4> - } - current -} - 80085c4: 9906 ldr r1, [sp, #24] - 80085c6: 4008 ands r0, r1 - 80085c8: b009 add sp, #36 ; 0x24 - 80085ca: bcf0 pop {r4, r5, r6, r7} - 80085cc: bc02 pop {r1} - 80085ce: 4708 bx r1 - x -= len; - 80085d0: 480e ldr r0, [pc, #56] ; (800860c <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0x12c>) - 80085d2: 2121 movs r1, #33 ; 0x21 - 80085d4: 4a0e ldr r2, [pc, #56] ; (8008610 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0x130>) - 80085d6: f000 fd83 bl 80090e0 - 80085da: defe udf #254 ; 0xfe - None => panic("called `Option::unwrap()` on a `None` value"), - 80085dc: 4809 ldr r0, [pc, #36] ; (8008604 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0x124>) - 80085de: 212b movs r1, #43 ; 0x2b - 80085e0: 4a09 ldr r2, [pc, #36] ; (8008608 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0x128>) - 80085e2: f000 fd7d bl 80090e0 - 80085e6: defe udf #254 ; 0xfe - slice_end_index_len_fail(self.end, slice.len()); - 80085e8: 4a05 ldr r2, [pc, #20] ; (8008600 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492+0x120>) - 80085ea: 9803 ldr r0, [sp, #12] - 80085ec: 9901 ldr r1, [sp, #4] - 80085ee: f000 f9e3 bl 80089b8 - 80085f2: defe udf #254 ; 0xfe - 80085f4: 0000ffff .word 0x0000ffff - 80085f8: 0800d040 .word 0x0800d040 - 80085fc: 0800d1d0 .word 0x0800d1d0 - 8008600: 0800d1e0 .word 0x0800d1e0 - 8008604: 0800d05c .word 0x0800d05c - 8008608: 0800d1f0 .word 0x0800d1f0 - 800860c: 0800d010 .word 0x0800d010 - 8008610: 0800d200 .word 0x0800d200 - -08008614 : - -pub(crate) fn is_printable(x: char) -> bool { - 8008614: b5f0 push {r4, r5, r6, r7, lr} - 8008616: af03 add r7, sp, #12 - 8008618: b085 sub sp, #20 - let x = x as u32; - let lower = x as u16; - - if x < 32 { - 800861a: 2820 cmp r0, #32 - 800861c: d201 bcs.n 8008622 - 800861e: 2100 movs r1, #0 - 8008620: e066 b.n 80086f0 - 8008622: 2501 movs r5, #1 - // ASCII fast path - false - } else if x < 127 { - 8008624: 287f cmp r0, #127 ; 0x7f - 8008626: d201 bcs.n 800862c - 8008628: 0029 movs r1, r5 - 800862a: e061 b.n 80086f0 - // ASCII fast path - true - } else if x < 0x10000 { - 800862c: 0c01 lsrs r1, r0, #16 - 800862e: d10a bne.n 8008646 - check(lower, SINGLETONS0U, SINGLETONS0L, NORMAL0) - 8008630: 4941 ldr r1, [pc, #260] ; (8008738 ) - 8008632: 2209 movs r2, #9 - 8008634: 0152 lsls r2, r2, #5 - 8008636: 9200 str r2, [sp, #0] - 8008638: 320f adds r2, #15 - 800863a: 9101 str r1, [sp, #4] - 800863c: 9202 str r2, [sp, #8] - 800863e: 493f ldr r1, [pc, #252] ; (800873c ) - 8008640: 2228 movs r2, #40 ; 0x28 - 8008642: 4b3f ldr r3, [pc, #252] ; (8008740 ) - 8008644: e00c b.n 8008660 - } else if x < 0x20000 { - 8008646: 0c41 lsrs r1, r0, #17 - 8008648: d10e bne.n 8008668 - check(lower, SINGLETONS1U, SINGLETONS1L, NORMAL1) - 800864a: 4938 ldr r1, [pc, #224] ; (800872c ) - 800864c: 22c0 movs r2, #192 ; 0xc0 - 800864e: 2309 movs r3, #9 - 8008650: 015b lsls r3, r3, #5 - 8008652: 3396 adds r3, #150 ; 0x96 - 8008654: 9200 str r2, [sp, #0] - 8008656: 9101 str r1, [sp, #4] - 8008658: 9302 str r3, [sp, #8] - 800865a: 4935 ldr r1, [pc, #212] ; (8008730 ) - 800865c: 222a movs r2, #42 ; 0x2a - 800865e: 4b35 ldr r3, [pc, #212] ; (8008734 ) - 8008660: f7ff ff3e bl 80084e0 <_ZN4core7unicode9printable5check17h802535c29485deedE.llvm.17363974103973521492> - 8008664: 0001 movs r1, r0 - 8008666: e043 b.n 80086f0 - 8008668: 4924 ldr r1, [pc, #144] ; (80086fc ) - 800866a: 2201 movs r2, #1 - 800866c: 2300 movs r3, #0 - 800866e: 4288 cmp r0, r1 - 8008670: b404 push {r2} - 8008672: bc02 pop {r1} - 8008674: d300 bcc.n 8008678 - 8008676: 0019 movs r1, r3 - 8008678: 9304 str r3, [sp, #16] - 800867a: 4e21 ldr r6, [pc, #132] ; (8008700 ) - 800867c: 0033 movs r3, r6 - 800867e: 331e adds r3, #30 - 8008680: 4003 ands r3, r0 - 8008682: 4c20 ldr r4, [pc, #128] ; (8008704 ) - 8008684: 1b1c subs r4, r3, r4 - 8008686: 1e63 subs r3, r4, #1 - 8008688: 419c sbcs r4, r3 - 800868a: 4b1f ldr r3, [pc, #124] ; (8008708 ) - 800868c: 18c3 adds r3, r0, r3 - 800868e: 2b07 cmp r3, #7 - 8008690: b404 push {r2} - 8008692: bc08 pop {r3} - 8008694: d300 bcc.n 8008698 - 8008696: 9b04 ldr r3, [sp, #16] - 8008698: 9303 str r3, [sp, #12] - } else { - if 0x2a6e0 <= x && x < 0x2a700 { - 800869a: 4006 ands r6, r0 - 800869c: 4b1b ldr r3, [pc, #108] ; (800870c ) - 800869e: 429e cmp r6, r3 - 80086a0: d000 beq.n 80086a4 - 80086a2: 9d03 ldr r5, [sp, #12] - 80086a4: 43ac bics r4, r5 - 80086a6: 4b1a ldr r3, [pc, #104] ; (8008710 ) - 80086a8: 18c3 adds r3, r0, r3 - 80086aa: 250d movs r5, #13 - 80086ac: 43ed mvns r5, r5 - 80086ae: 42ab cmp r3, r5 - 80086b0: b404 push {r2} - 80086b2: bc08 pop {r3} - 80086b4: 9e04 ldr r6, [sp, #16] - 80086b6: d300 bcc.n 80086ba - 80086b8: 0033 movs r3, r6 - 80086ba: 401c ands r4, r3 - 80086bc: 4b15 ldr r3, [pc, #84] ; (8008714 ) - 80086be: 18c3 adds r3, r0, r3 - 80086c0: 4d15 ldr r5, [pc, #84] ; (8008718 ) - 80086c2: 42ab cmp r3, r5 - 80086c4: b404 push {r2} - 80086c6: bc08 pop {r3} - 80086c8: d300 bcc.n 80086cc - 80086ca: 0033 movs r3, r6 - 80086cc: 401c ands r4, r3 - 80086ce: 4b13 ldr r3, [pc, #76] ; (800871c ) - 80086d0: 18c3 adds r3, r0, r3 - 80086d2: 4d13 ldr r5, [pc, #76] ; (8008720 ) - 80086d4: 42ab cmp r3, r5 - 80086d6: b404 push {r2} - 80086d8: bc08 pop {r3} - 80086da: d300 bcc.n 80086de - 80086dc: 0033 movs r3, r6 - 80086de: 401c ands r4, r3 - 80086e0: 4b10 ldr r3, [pc, #64] ; (8008724 ) - 80086e2: 18c0 adds r0, r0, r3 - 80086e4: 4b10 ldr r3, [pc, #64] ; (8008728 ) - 80086e6: 4298 cmp r0, r3 - 80086e8: d300 bcc.n 80086ec - 80086ea: 0032 movs r2, r6 - 80086ec: 4014 ands r4, r2 - 80086ee: 4021 ands r1, r4 - if 0xe01f0 <= x && x < 0x110000 { - return false; - } - true - } -} - 80086f0: 0008 movs r0, r1 - 80086f2: b005 add sp, #20 - 80086f4: bcf0 pop {r4, r5, r6, r7} - 80086f6: bc02 pop {r1} - 80086f8: 4708 bx r1 - 80086fa: 46c0 nop ; (mov r8, r8) - 80086fc: 000e01f0 .word 0x000e01f0 - 8008700: 001fffe0 .word 0x001fffe0 - 8008704: 0002b81e .word 0x0002b81e - 8008708: fffd48c7 .word 0xfffd48c7 - 800870c: 0002a6e0 .word 0x0002a6e0 - 8008710: fffd3150 .word 0xfffd3150 - 8008714: fffd0800 .word 0xfffd0800 - 8008718: fffff3e1 .word 0xfffff3e1 - 800871c: fffd0000 .word 0xfffd0000 - 8008720: fffffa1e .word 0xfffffa1e - 8008724: fff1ff00 .word 0xfff1ff00 - 8008728: fff5124b .word 0xfff5124b - 800872c: 0800d5c3 .word 0x0800d5c3 - 8008730: 0800d4af .word 0x0800d4af - 8008734: 0800d503 .word 0x0800d503 - 8008738: 0800d380 .word 0x0800d380 - 800873c: 0800d210 .word 0x0800d210 - 8008740: 0800d260 .word 0x0800d260 - -08008744 : -} - -fn memchr_general_case(x: u8, text: &[u8]) -> Option { - 8008744: b5f0 push {r4, r5, r6, r7, lr} - 8008746: af03 add r7, sp, #12 - 8008748: b085 sub sp, #20 - 800874a: 000c movs r4, r1 - 800874c: 21ff movs r1, #255 ; 0xff - 800874e: 4001 ands r1, r0 - 8008750: 9104 str r1, [sp, #16] - 8008752: 0011 movs r1, r2 - 8008754: 1ce0 adds r0, r4, #3 - 8008756: 2203 movs r2, #3 - 8008758: 4390 bics r0, r2 - 800875a: 1b00 subs r0, r0, r4 - 800875c: 2200 movs r2, #0 - // search up to an aligned boundary - let len = text.len(); - let ptr = text.as_ptr(); - let mut offset = ptr.align_offset(USIZE_BYTES); - - if offset > 0 { - 800875e: 2800 cmp r0, #0 - 8008760: b404 push {r2} - 8008762: bc08 pop {r3} - 8008764: d014 beq.n 8008790 - 8008766: 4288 cmp r0, r1 - 8008768: b402 push {r1} - 800876a: bc40 pop {r6} - 800876c: d800 bhi.n 8008770 - 800876e: 0006 movs r6, r0 - 8008770: 2e00 cmp r6, #0 - 8008772: b404 push {r2} - 8008774: bc08 pop {r3} - 8008776: d00b beq.n 8008790 - 8008778: 9100 str r1, [sp, #0] - 800877a: 2300 movs r3, #0 - 800877c: 2001 movs r0, #1 - 800877e: 9904 ldr r1, [sp, #16] - if predicate(x) { - 8008780: 5ce5 ldrb r5, [r4, r3] - 8008782: 428d cmp r5, r1 - 8008784: d05d beq.n 8008842 - 8008786: 1c5b adds r3, r3, #1 - if is_empty!(self) { - 8008788: 429e cmp r6, r3 - 800878a: d1f9 bne.n 8008780 - 800878c: 0033 movs r3, r6 - 800878e: 9900 ldr r1, [sp, #0] - 8008790: 001e movs r6, r3 - 8008792: 000b movs r3, r1 - 8008794: 3b08 subs r3, #8 - 8008796: 4152 adcs r2, r2 - 8008798: 2908 cmp r1, #8 - } - } - - // search the body of the text - let repeated_x = repeat_byte(x); - while offset <= len - 2 * USIZE_BYTES { - 800879a: d363 bcc.n 8008864 - 800879c: 429e cmp r6, r3 - 800879e: d833 bhi.n 8008808 - 80087a0: 9100 str r1, [sp, #0] - 80087a2: 9403 str r4, [sp, #12] - 80087a4: 493a ldr r1, [pc, #232] ; (8008890 ) - 80087a6: 9804 ldr r0, [sp, #16] - 80087a8: 4341 muls r1, r0 - 80087aa: 9102 str r1, [sp, #8] - 80087ac: 2500 movs r5, #0 - // SAFETY: the while's predicate guarantees a distance of at least 2 * usize_bytes - // between the offset and the end of the slice. - unsafe { - let u = *(ptr.add(offset) as *const usize); - let v = *(ptr.add(offset + USIZE_BYTES) as *const usize); - 80087ae: 9301 str r3, [sp, #4] - 80087b0: 9c02 ldr r4, [sp, #8] - 80087b2: 1d30 adds r0, r6, #4 - 80087b4: b420 push {r5} - 80087b6: bc04 pop {r2} - 80087b8: 416a adcs r2, r5 - 80087ba: 42b0 cmp r0, r6 - 80087bc: d346 bcc.n 800884c - 80087be: 0031 movs r1, r6 - 80087c0: 9e03 ldr r6, [sp, #12] - 80087c2: 5830 ldr r0, [r6, r0] - - // break if there is a matching byte - let zu = contains_zero_byte(u ^ repeated_x); - let zv = contains_zero_byte(v ^ repeated_x); - 80087c4: 4060 eors r0, r4 - 80087c6: 4a34 ldr r2, [pc, #208] ; (8008898 ) - intrinsics::wrapping_sub(self, rhs) - 80087c8: 1882 adds r2, r0, r2 - x.wrapping_sub(LO_USIZE) & !x & HI_USIZE != 0 - 80087ca: 4b32 ldr r3, [pc, #200] ; (8008894 ) - 80087cc: 4383 bics r3, r0 - 80087ce: 4013 ands r3, r2 - let u = *(ptr.add(offset) as *const usize); - 80087d0: 5870 ldr r0, [r6, r1] - let zu = contains_zero_byte(u ^ repeated_x); - 80087d2: 4060 eors r0, r4 - 80087d4: 4a30 ldr r2, [pc, #192] ; (8008898 ) - 80087d6: 1882 adds r2, r0, r2 - x.wrapping_sub(LO_USIZE) & !x & HI_USIZE != 0 - 80087d8: 4e2e ldr r6, [pc, #184] ; (8008894 ) - 80087da: 4386 bics r6, r0 - 80087dc: 4016 ands r6, r2 - 80087de: 431e orrs r6, r3 - 80087e0: d10c bne.n 80087fc - if zu || zv { - break; - } - } - offset += USIZE_BYTES * 2; - 80087e2: 0008 movs r0, r1 - 80087e4: 3008 adds r0, #8 - 80087e6: b420 push {r5} - 80087e8: bc04 pop {r2} - 80087ea: 416a adcs r2, r5 - 80087ec: 4288 cmp r0, r1 - 80087ee: d333 bcc.n 8008858 - 80087f0: 9b01 ldr r3, [sp, #4] - while offset <= len - 2 * USIZE_BYTES { - 80087f2: 4298 cmp r0, r3 - 80087f4: b401 push {r0} - 80087f6: bc40 pop {r6} - 80087f8: d9db bls.n 80087b2 - 80087fa: e000 b.n 80087fe - 80087fc: 0008 movs r0, r1 - 80087fe: 9900 ldr r1, [sp, #0] - if self.start > slice.len() { - 8008800: 4288 cmp r0, r1 - 8008802: 9c03 ldr r4, [sp, #12] - 8008804: d840 bhi.n 8008888 - 8008806: 0006 movs r6, r0 - 8008808: 2000 movs r0, #0 - ptr::slice_from_raw_parts(slice.as_ptr().add(self.start), self.end - self.start) - 800880a: 1b8a subs r2, r1, r6 - 800880c: b402 push {r1} - 800880e: bc08 pop {r3} - 8008810: b401 push {r0} - 8008812: bc02 pop {r1} - 8008814: 4141 adcs r1, r0 - 8008816: 42b3 cmp r3, r6 - 8008818: d32a bcc.n 8008870 - 800881a: 2a00 cmp r2, #0 - 800881c: d00a beq.n 8008834 - 800881e: 0035 movs r5, r6 - if predicate(x) { - 8008820: 19a3 adds r3, r4, r6 - 8008822: 2000 movs r0, #0 - 8008824: 0001 movs r1, r0 - 8008826: 9e04 ldr r6, [sp, #16] - 8008828: 5c5c ldrb r4, [r3, r1] - 800882a: 42b4 cmp r4, r6 - 800882c: d003 beq.n 8008836 - 800882e: 1c49 adds r1, r1, #1 - if is_empty!(self) { - 8008830: 428a cmp r2, r1 - 8008832: d1f9 bne.n 8008828 - 8008834: e005 b.n 8008842 - 8008836: 2000 movs r0, #0 - } - - // Find the byte after the point the body loop stopped. - text[offset..].iter().position(|elt| *elt == x).map(|i| offset + i) - 8008838: 186b adds r3, r5, r1 - 800883a: 4140 adcs r0, r0 - 800883c: 42ab cmp r3, r5 - 800883e: d31d bcc.n 800887c - 8008840: 2001 movs r0, #1 -} - 8008842: 0019 movs r1, r3 - 8008844: b005 add sp, #20 - 8008846: bcf0 pop {r4, r5, r6, r7} - 8008848: bc04 pop {r2} - 800884a: 4710 bx r2 - let v = *(ptr.add(offset + USIZE_BYTES) as *const usize); - 800884c: 4813 ldr r0, [pc, #76] ; (800889c ) - 800884e: 211c movs r1, #28 - 8008850: 4a15 ldr r2, [pc, #84] ; (80088a8 ) - 8008852: f000 fc45 bl 80090e0 - 8008856: defe udf #254 ; 0xfe - offset += USIZE_BYTES * 2; - 8008858: 4810 ldr r0, [pc, #64] ; (800889c ) - 800885a: 211c movs r1, #28 - 800885c: 4a10 ldr r2, [pc, #64] ; (80088a0 ) - 800885e: f000 fc3f bl 80090e0 - 8008862: defe udf #254 ; 0xfe - while offset <= len - 2 * USIZE_BYTES { - 8008864: 4812 ldr r0, [pc, #72] ; (80088b0 ) - 8008866: 2121 movs r1, #33 ; 0x21 - 8008868: 4a13 ldr r2, [pc, #76] ; (80088b8 ) - 800886a: f000 fc39 bl 80090e0 - 800886e: defe udf #254 ; 0xfe - 8008870: 480f ldr r0, [pc, #60] ; (80088b0 ) - 8008872: 2121 movs r1, #33 ; 0x21 - 8008874: 4a0f ldr r2, [pc, #60] ; (80088b4 ) - 8008876: f000 fc33 bl 80090e0 - 800887a: defe udf #254 ; 0xfe - text[offset..].iter().position(|elt| *elt == x).map(|i| offset + i) - 800887c: 4807 ldr r0, [pc, #28] ; (800889c ) - 800887e: 211c movs r1, #28 - 8008880: 4a0a ldr r2, [pc, #40] ; (80088ac ) - 8008882: f000 fc2d bl 80090e0 - 8008886: defe udf #254 ; 0xfe - slice_start_index_len_fail(self.start, slice.len()); - 8008888: 4a06 ldr r2, [pc, #24] ; (80088a4 ) - 800888a: f000 f86d bl 8008968 - 800888e: defe udf #254 ; 0xfe - 8008890: 01010101 .word 0x01010101 - 8008894: 80808080 .word 0x80808080 - 8008898: fefefeff .word 0xfefefeff - 800889c: 0800d7b0 .word 0x0800d7b0 - 80088a0: 0800d864 .word 0x0800d864 - 80088a4: 0800d874 .word 0x0800d874 - 80088a8: 0800d854 .word 0x0800d854 - 80088ac: 0800d884 .word 0x0800d884 - 80088b0: 0800d780 .word 0x0800d780 - 80088b4: 0800d90c .word 0x0800d90c - 80088b8: 0800d844 .word 0x0800d844 - -080088bc < as core::fmt::Debug>::fmt>: - pub end: Idx, -} - -#[stable(feature = "rust1", since = "1.0.0")] -impl fmt::Debug for Range { - fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { - 80088bc: b5f0 push {r4, r5, r6, r7, lr} - 80088be: af03 add r7, sp, #12 - 80088c0: b087 sub sp, #28 - 80088c2: 000d movs r5, r1 - 80088c4: 0006 movs r6, r0 - self.flags & (1 << FlagV1::DebugLowerHex as u32) != 0 - 80088c6: 6808 ldr r0, [r1, #0] - 80088c8: 2101 movs r1, #1 - if f.debug_lower_hex() { - 80088ca: 06c2 lsls r2, r0, #27 - 80088cc: 9100 str r1, [sp, #0] - 80088ce: d408 bmi.n 80088e2 < as core::fmt::Debug>::fmt+0x26> - } else if f.debug_upper_hex() { - 80088d0: 0680 lsls r0, r0, #26 - 80088d2: d40d bmi.n 80088f0 < as core::fmt::Debug>::fmt+0x34> - fn to_u32(&self) -> u32 { *self as u32 } - 80088d4: 6830 ldr r0, [r6, #0] - $name(n, is_nonnegative, f) - 80088d6: 002a movs r2, r5 - 80088d8: f7ff fa66 bl 8007da8 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698> - self.start.fmt(fmt)?; - 80088dc: 2800 cmp r0, #0 - 80088de: d00d beq.n 80088fc < as core::fmt::Debug>::fmt+0x40> - 80088e0: e030 b.n 8008944 < as core::fmt::Debug>::fmt+0x88> - $Radix.fmt_int(*self as $U, f) - 80088e2: 6830 ldr r0, [r6, #0] - 80088e4: 0029 movs r1, r5 - 80088e6: f7fe f953 bl 8006b90 <_ZN4core3fmt3num12GenericRadix7fmt_int17h270084e20ff88dd2E.llvm.1471677695614126249> - 80088ea: 2800 cmp r0, #0 - 80088ec: d006 beq.n 80088fc < as core::fmt::Debug>::fmt+0x40> - 80088ee: e029 b.n 8008944 < as core::fmt::Debug>::fmt+0x88> - 80088f0: 6830 ldr r0, [r6, #0] - 80088f2: 0029 movs r1, r5 - 80088f4: f7fe f914 bl 8006b20 <_ZN4core3fmt3num12GenericRadix7fmt_int17h201fe823e846fe78E.llvm.1471677695614126249> - 80088f8: 2800 cmp r0, #0 - 80088fa: d123 bne.n 8008944 < as core::fmt::Debug>::fmt+0x88> - write(self.buf, fmt) - 80088fc: 69a8 ldr r0, [r5, #24] - 80088fe: 69e9 ldr r1, [r5, #28] - 8008900: 2400 movs r4, #0 - 8008902: 9406 str r4, [sp, #24] - 8008904: 4a16 ldr r2, [pc, #88] ; (8008960 < as core::fmt::Debug>::fmt+0xa4>) - 8008906: 9205 str r2, [sp, #20] - 8008908: 9404 str r4, [sp, #16] - 800890a: 9403 str r4, [sp, #12] - 800890c: 2201 movs r2, #1 - 800890e: 9202 str r2, [sp, #8] - 8008910: 4a14 ldr r2, [pc, #80] ; (8008964 < as core::fmt::Debug>::fmt+0xa8>) - 8008912: 9201 str r2, [sp, #4] - 8008914: aa01 add r2, sp, #4 - 8008916: f7fe f9f9 bl 8006d0c - write!(fmt, "..")?; - 800891a: 2800 cmp r0, #0 - 800891c: d112 bne.n 8008944 < as core::fmt::Debug>::fmt+0x88> - self.flags & (1 << FlagV1::DebugLowerHex as u32) != 0 - 800891e: 6828 ldr r0, [r5, #0] - if f.debug_lower_hex() { - 8008920: 06c1 lsls r1, r0, #27 - 8008922: d409 bmi.n 8008938 < as core::fmt::Debug>::fmt+0x7c> - } else if f.debug_upper_hex() { - 8008924: 0680 lsls r0, r0, #26 - 8008926: d413 bmi.n 8008950 < as core::fmt::Debug>::fmt+0x94> - fn to_u32(&self) -> u32 { *self as u32 } - 8008928: 6870 ldr r0, [r6, #4] - $name(n, is_nonnegative, f) - 800892a: 9900 ldr r1, [sp, #0] - 800892c: 002a movs r2, r5 - 800892e: f7ff fa3b bl 8007da8 <_ZN4core3fmt3num3imp7fmt_u3217h4aaeb9f9231e9536E.llvm.15824985523494270698> - self.end.fmt(fmt)?; - 8008932: 2800 cmp r0, #0 - 8008934: d106 bne.n 8008944 < as core::fmt::Debug>::fmt+0x88> - 8008936: e006 b.n 8008946 < as core::fmt::Debug>::fmt+0x8a> - $Radix.fmt_int(*self as $U, f) - 8008938: 6870 ldr r0, [r6, #4] - 800893a: 0029 movs r1, r5 - 800893c: f7fe f928 bl 8006b90 <_ZN4core3fmt3num12GenericRadix7fmt_int17h270084e20ff88dd2E.llvm.1471677695614126249> - 8008940: 2800 cmp r0, #0 - 8008942: d000 beq.n 8008946 < as core::fmt::Debug>::fmt+0x8a> - 8008944: 9c00 ldr r4, [sp, #0] - Ok(()) - } - 8008946: 0020 movs r0, r4 - 8008948: b007 add sp, #28 - 800894a: bcf0 pop {r4, r5, r6, r7} - 800894c: bc02 pop {r1} - 800894e: 4708 bx r1 - 8008950: 6870 ldr r0, [r6, #4] - 8008952: 0029 movs r1, r5 - 8008954: f7fe f8e4 bl 8006b20 <_ZN4core3fmt3num12GenericRadix7fmt_int17h201fe823e846fe78E.llvm.1471677695614126249> - self.end.fmt(fmt)?; - 8008958: 2800 cmp r0, #0 - 800895a: d1f3 bne.n 8008944 < as core::fmt::Debug>::fmt+0x88> - 800895c: e7f3 b.n 8008946 < as core::fmt::Debug>::fmt+0x8a> - 800895e: 46c0 nop ; (mov r8, r8) - 8008960: 0800d928 .word 0x0800d928 - 8008964: 0800d920 .word 0x0800d920 - -08008968 : -const fn slice_start_index_len_fail(index: usize, len: usize) -> ! { - 8008968: b580 push {r7, lr} - 800896a: af00 add r7, sp, #0 - const_eval_select( - 800896c: f7ff fc0f bl 800818e - 8008970: defe udf #254 ; 0xfe - ... - -08008974 : -fn slice_start_index_len_fail_rt(index: usize, len: usize) -> ! { - 8008974: b580 push {r7, lr} - 8008976: af00 add r7, sp, #0 - 8008978: b08c sub sp, #48 ; 0x30 - 800897a: 9101 str r1, [sp, #4] - 800897c: 9000 str r0, [sp, #0] - 800897e: 2002 movs r0, #2 - Arguments { pieces, fmt: None, args } - 8008980: 9007 str r0, [sp, #28] - 8008982: a908 add r1, sp, #32 - 8008984: 9106 str r1, [sp, #24] - 8008986: 2100 movs r1, #0 - 8008988: 9105 str r1, [sp, #20] - 800898a: 9104 str r1, [sp, #16] - 800898c: 9003 str r0, [sp, #12] - 800898e: 4807 ldr r0, [pc, #28] ; (80089ac ) - 8008990: 9002 str r0, [sp, #8] - panic!("range start index {index} out of range for slice of length {len}"); - 8008992: 4807 ldr r0, [pc, #28] ; (80089b0 ) - 8008994: 900b str r0, [sp, #44] ; 0x2c - 8008996: a901 add r1, sp, #4 - 8008998: 910a str r1, [sp, #40] ; 0x28 - 800899a: 9009 str r0, [sp, #36] ; 0x24 - 800899c: 4668 mov r0, sp - 800899e: 9008 str r0, [sp, #32] - 80089a0: a802 add r0, sp, #8 - 80089a2: 4904 ldr r1, [pc, #16] ; (80089b4 ) - 80089a4: f000 fbd2 bl 800914c - 80089a8: defe udf #254 ; 0xfe - 80089aa: 46c0 nop ; (mov r8, r8) - 80089ac: 0800d95c .word 0x0800d95c - 80089b0: 08007f49 .word 0x08007f49 - 80089b4: 0800d9e4 .word 0x0800d9e4 - -080089b8 : -const fn slice_end_index_len_fail(index: usize, len: usize) -> ! { - 80089b8: b580 push {r7, lr} - 80089ba: af00 add r7, sp, #0 - const_eval_select((index, len), slice_end_index_len_fail_ct, slice_end_index_len_fail_rt) - 80089bc: f7ff fbf1 bl 80081a2 - 80089c0: defe udf #254 ; 0xfe - ... - -080089c4 : -fn slice_end_index_len_fail_rt(index: usize, len: usize) -> ! { - 80089c4: b580 push {r7, lr} - 80089c6: af00 add r7, sp, #0 - 80089c8: b08c sub sp, #48 ; 0x30 - 80089ca: 9101 str r1, [sp, #4] - 80089cc: 9000 str r0, [sp, #0] - 80089ce: 2002 movs r0, #2 - 80089d0: 9007 str r0, [sp, #28] - 80089d2: a908 add r1, sp, #32 - 80089d4: 9106 str r1, [sp, #24] - 80089d6: 2100 movs r1, #0 - 80089d8: 9105 str r1, [sp, #20] - 80089da: 9104 str r1, [sp, #16] - 80089dc: 9003 str r0, [sp, #12] - 80089de: 4807 ldr r0, [pc, #28] ; (80089fc ) - 80089e0: 9002 str r0, [sp, #8] - panic!("range end index {index} out of range for slice of length {len}"); - 80089e2: 4807 ldr r0, [pc, #28] ; (8008a00 ) - 80089e4: 900b str r0, [sp, #44] ; 0x2c - 80089e6: a901 add r1, sp, #4 - 80089e8: 910a str r1, [sp, #40] ; 0x28 - 80089ea: 9009 str r0, [sp, #36] ; 0x24 - 80089ec: 4668 mov r0, sp - 80089ee: 9008 str r0, [sp, #32] - 80089f0: a802 add r0, sp, #8 - 80089f2: 4904 ldr r1, [pc, #16] ; (8008a04 ) - 80089f4: f000 fbaa bl 800914c - 80089f8: defe udf #254 ; 0xfe - 80089fa: 46c0 nop ; (mov r8, r8) - 80089fc: 0800da04 .word 0x0800da04 - 8008a00: 08007f49 .word 0x08007f49 - 8008a04: 0800da14 .word 0x0800da14 - -08008a08 : -const fn slice_index_order_fail(index: usize, end: usize) -> ! { - 8008a08: b580 push {r7, lr} - 8008a0a: af00 add r7, sp, #0 - unsafe { const_eval_select((index, end), slice_index_order_fail_ct, slice_index_order_fail_rt) } - 8008a0c: f7ff fbc4 bl 8008198 - 8008a10: defe udf #254 ; 0xfe - ... - -08008a14 : -fn slice_index_order_fail_rt(index: usize, end: usize) -> ! { - 8008a14: b580 push {r7, lr} - 8008a16: af00 add r7, sp, #0 - 8008a18: b08c sub sp, #48 ; 0x30 - 8008a1a: 9101 str r1, [sp, #4] - 8008a1c: 9000 str r0, [sp, #0] - 8008a1e: 2002 movs r0, #2 - 8008a20: 9007 str r0, [sp, #28] - 8008a22: a908 add r1, sp, #32 - 8008a24: 9106 str r1, [sp, #24] - 8008a26: 2100 movs r1, #0 - 8008a28: 9105 str r1, [sp, #20] - 8008a2a: 9104 str r1, [sp, #16] - 8008a2c: 9003 str r0, [sp, #12] - 8008a2e: 4807 ldr r0, [pc, #28] ; (8008a4c ) - 8008a30: 9002 str r0, [sp, #8] - panic!("slice index starts at {index} but ends at {end}"); - 8008a32: 4807 ldr r0, [pc, #28] ; (8008a50 ) - 8008a34: 900b str r0, [sp, #44] ; 0x2c - 8008a36: a901 add r1, sp, #4 - 8008a38: 910a str r1, [sp, #40] ; 0x28 - 8008a3a: 9009 str r0, [sp, #36] ; 0x24 - 8008a3c: 4668 mov r0, sp - 8008a3e: 9008 str r0, [sp, #32] - 8008a40: a802 add r0, sp, #8 - 8008a42: 4904 ldr r1, [pc, #16] ; (8008a54 ) - 8008a44: f000 fb82 bl 800914c - 8008a48: defe udf #254 ; 0xfe - 8008a4a: 46c0 nop ; (mov r8, r8) - 8008a4c: 0800da48 .word 0x0800da48 - 8008a50: 08007f49 .word 0x08007f49 - 8008a54: 0800da58 .word 0x0800da58 - -08008a58 >: -pub unsafe fn drop_in_place(to_drop: *mut T) { - 8008a58: 4770 bx lr - ... - -08008a5c <::fmt>: - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - 8008a5c: b580 push {r7, lr} - 8008a5e: af00 add r7, sp, #0 - self.buf.write_str(data) - 8008a60: 6988 ldr r0, [r1, #24] - 8008a62: 69c9 ldr r1, [r1, #28] - 8008a64: 68cb ldr r3, [r1, #12] - 8008a66: 4903 ldr r1, [pc, #12] ; (8008a74 <::fmt+0x18>) - 8008a68: 220e movs r2, #14 - 8008a6a: f000 f805 bl 8008a78 <::fmt+0x1c> - } - 8008a6e: bc80 pop {r7} - 8008a70: bc02 pop {r1} - 8008a72: 4708 bx r1 - 8008a74: 0800dab4 .word 0x0800dab4 - 8008a78: 4718 bx r3 - ... - -08008a7c <::next>: - fn next(&mut self) -> Option { - 8008a7c: b5f0 push {r4, r5, r6, r7, lr} - 8008a7e: af03 add r7, sp, #12 - 8008a80: b085 sub sp, #20 - 8008a82: 0001 movs r1, r0 - 8008a84: c818 ldmia r0!, {r3, r4} - 8008a86: 2011 movs r0, #17 - 8008a88: 0402 lsls r2, r0, #16 - 8008a8a: 42a3 cmp r3, r4 - 8008a8c: d031 beq.n 8008af2 <::next+0x76> - 8008a8e: 1c5d adds r5, r3, #1 - self.ptr = unsafe { NonNull::new_unchecked(self.ptr.as_ptr().offset(offset)) }; - 8008a90: 600d str r5, [r1, #0] - let x = *bytes.next()?; - 8008a92: 7818 ldrb r0, [r3, #0] - 8008a94: 0606 lsls r6, r0, #24 - 8008a96: 1636 asrs r6, r6, #24 - if x < 128 { - 8008a98: d534 bpl.n 8008b04 <::next+0x88> - 8008a9a: 9204 str r2, [sp, #16] - if is_empty!(self) { - 8008a9c: 42a5 cmp r5, r4 - 8008a9e: d045 beq.n 8008b2c <::next+0xb0> - 8008aa0: 251f movs r5, #31 - 8008aa2: 4005 ands r5, r0 - 8008aa4: 1c9a adds r2, r3, #2 - 8008aa6: 9202 str r2, [sp, #8] - self.ptr = unsafe { NonNull::new_unchecked(self.ptr.as_ptr().offset(offset)) }; - 8008aa8: 600a str r2, [r1, #0] - let y = unsafe { *bytes.next().unwrap_unchecked() }; - 8008aaa: 785e ldrb r6, [r3, #1] - 8008aac: 223f movs r2, #63 ; 0x3f - 8008aae: 9203 str r2, [sp, #12] - (ch << 6) | (byte & CONT_MASK) as u32 - 8008ab0: 4016 ands r6, r2 - if x >= 0xE0 { - 8008ab2: 28df cmp r0, #223 ; 0xdf - 8008ab4: d91f bls.n 8008af6 <::next+0x7a> - 8008ab6: 9501 str r5, [sp, #4] - if is_empty!(self) { - 8008ab8: 9a02 ldr r2, [sp, #8] - 8008aba: 42a2 cmp r2, r4 - 8008abc: d03c beq.n 8008b38 <::next+0xbc> - 8008abe: 1cda adds r2, r3, #3 - 8008ac0: 9202 str r2, [sp, #8] - self.ptr = unsafe { NonNull::new_unchecked(self.ptr.as_ptr().offset(offset)) }; - 8008ac2: 600a str r2, [r1, #0] - let z = unsafe { *bytes.next().unwrap_unchecked() }; - 8008ac4: 789a ldrb r2, [r3, #2] - (ch << 6) | (byte & CONT_MASK) as u32 - 8008ac6: 9d03 ldr r5, [sp, #12] - 8008ac8: 402a ands r2, r5 - 8008aca: 01b6 lsls r6, r6, #6 - 8008acc: 18b6 adds r6, r6, r2 - if x >= 0xF0 { - 8008ace: 28f0 cmp r0, #240 ; 0xf0 - 8008ad0: d314 bcc.n 8008afc <::next+0x80> - if is_empty!(self) { - 8008ad2: 9802 ldr r0, [sp, #8] - 8008ad4: 42a0 cmp r0, r4 - 8008ad6: 9c01 ldr r4, [sp, #4] - 8008ad8: 9a04 ldr r2, [sp, #16] - 8008ada: d033 beq.n 8008b44 <::next+0xc8> - 8008adc: 1d18 adds r0, r3, #4 - self.ptr = unsafe { NonNull::new_unchecked(self.ptr.as_ptr().offset(offset)) }; - 8008ade: 6008 str r0, [r1, #0] - let w = unsafe { *bytes.next().unwrap_unchecked() }; - 8008ae0: 78d8 ldrb r0, [r3, #3] - (ch << 6) | (byte & CONT_MASK) as u32 - 8008ae2: 9903 ldr r1, [sp, #12] - 8008ae4: 4008 ands r0, r1 - 8008ae6: 01b1 lsls r1, r6, #6 - 8008ae8: 1808 adds r0, r1, r0 - ch = (init & 7) << 18 | utf8_acc_cont_byte(y_z, w); - 8008aea: 0761 lsls r1, r4, #29 - 8008aec: 0ac9 lsrs r1, r1, #11 - 8008aee: 1840 adds r0, r0, r1 - 8008af0: e008 b.n 8008b04 <::next+0x88> - 8008af2: 0010 movs r0, r2 - 8008af4: e010 b.n 8008b18 <::next+0x9c> - 8008af6: 01a8 lsls r0, r5, #6 - 8008af8: 1980 adds r0, r0, r6 - 8008afa: e002 b.n 8008b02 <::next+0x86> - 8008afc: 9801 ldr r0, [sp, #4] - 8008afe: 0300 lsls r0, r0, #12 - 8008b00: 1830 adds r0, r6, r0 - 8008b02: 9a04 ldr r2, [sp, #16] - 8008b04: 211b movs r1, #27 - 8008b06: 02c9 lsls r1, r1, #11 - 8008b08: 4041 eors r1, r0 - 8008b0a: 4b15 ldr r3, [pc, #84] ; (8008b60 <::next+0xe4>) - 8008b0c: 18c9 adds r1, r1, r3 - 8008b0e: 4b15 ldr r3, [pc, #84] ; (8008b64 <::next+0xe8>) - match self { - 8008b10: 4299 cmp r1, r3 - 8008b12: d305 bcc.n 8008b20 <::next+0xa4> - 8008b14: 4290 cmp r0, r2 - 8008b16: d003 beq.n 8008b20 <::next+0xa4> - } - 8008b18: b005 add sp, #20 - 8008b1a: bcf0 pop {r4, r5, r6, r7} - 8008b1c: bc02 pop {r1} - 8008b1e: 4708 bx r1 - None => panic("called `Option::unwrap()` on a `None` value"), - 8008b20: 4811 ldr r0, [pc, #68] ; (8008b68 <::next+0xec>) - 8008b22: 212b movs r1, #43 ; 0x2b - 8008b24: 4a11 ldr r2, [pc, #68] ; (8008b6c <::next+0xf0>) - 8008b26: f000 fadb bl 80090e0 - 8008b2a: defe udf #254 ; 0xfe - debug_assert!(self.is_some()); - 8008b2c: 4808 ldr r0, [pc, #32] ; (8008b50 <::next+0xd4>) - 8008b2e: 2120 movs r1, #32 - 8008b30: 4a0a ldr r2, [pc, #40] ; (8008b5c <::next+0xe0>) - 8008b32: f000 fad5 bl 80090e0 - 8008b36: defe udf #254 ; 0xfe - 8008b38: 4805 ldr r0, [pc, #20] ; (8008b50 <::next+0xd4>) - 8008b3a: 2120 movs r1, #32 - 8008b3c: 4a06 ldr r2, [pc, #24] ; (8008b58 <::next+0xdc>) - 8008b3e: f000 facf bl 80090e0 - 8008b42: defe udf #254 ; 0xfe - 8008b44: 4802 ldr r0, [pc, #8] ; (8008b50 <::next+0xd4>) - 8008b46: 2120 movs r1, #32 - 8008b48: 4a02 ldr r2, [pc, #8] ; (8008b54 <::next+0xd8>) - 8008b4a: f000 fac9 bl 80090e0 - 8008b4e: defe udf #254 ; 0xfe - 8008b50: 0800b551 .word 0x0800b551 - 8008b54: 0800dd4c .word 0x0800dd4c - 8008b58: 0800dd3c .word 0x0800dd3c - 8008b5c: 0800dd2c .word 0x0800dd2c - 8008b60: ffef0000 .word 0xffef0000 - 8008b64: ffef0800 .word 0xffef0800 - 8008b68: 0800db6c .word 0x0800db6c - 8008b6c: 0800db5c .word 0x0800db5c - -08008b70 : -const fn slice_error_fail(s: &str, begin: usize, end: usize) -> ! { - 8008b70: b580 push {r7, lr} - 8008b72: af00 add r7, sp, #0 - 8008b74: b084 sub sp, #16 - (s, begin, end), - 8008b76: 9303 str r3, [sp, #12] - 8008b78: 9202 str r2, [sp, #8] - 8008b7a: 9101 str r1, [sp, #4] - 8008b7c: 9000 str r0, [sp, #0] - 8008b7e: 4668 mov r0, sp - crate::intrinsics::const_eval_select( - 8008b80: f7ff fafc bl 800817c - 8008b84: defe udf #254 ; 0xfe - ... - -08008b88 : -fn slice_error_fail_rt(s: &str, begin: usize, end: usize) -> ! { - 8008b88: b580 push {r7, lr} - 8008b8a: af00 add r7, sp, #0 - 8008b8c: b0a0 sub sp, #128 ; 0x80 - 8008b8e: 9304 str r3, [sp, #16] - 8008b90: 9307 str r3, [sp, #28] - 8008b92: 9206 str r2, [sp, #24] - 8008b94: 2301 movs r3, #1 - 8008b96: 021c lsls r4, r3, #8 - if index >= self.len() { - 8008b98: 42a1 cmp r1, r4 - 8008b9a: 9005 str r0, [sp, #20] - 8008b9c: d912 bls.n 8008bc4 - 8008b9e: 9302 str r3, [sp, #8] - 8008ba0: 0005 movs r5, r0 - 8008ba2: 35fd adds r5, #253 ; 0xfd - 8008ba4: 9103 str r1, [sp, #12] - 8008ba6: 2603 movs r6, #3 - { - let n = len!(self); - let mut i = n; - while let Some(x) = self.next_back() { - i -= 1; - if predicate(x) { - 8008ba8: 57ae ldrsb r6, [r5, r6] - 8008baa: 2040 movs r0, #64 ; 0x40 - 8008bac: 43c3 mvns r3, r0 - 8008bae: 429e cmp r6, r3 - 8008bb0: 9903 ldr r1, [sp, #12] - 8008bb2: dc15 bgt.n 8008be0 - 8008bb4: 2402 movs r4, #2 - 8008bb6: 572c ldrsb r4, [r5, r4] - 8008bb8: 429c cmp r4, r3 - 8008bba: dd0c ble.n 8008bd6 - 8008bbc: 24ff movs r4, #255 ; 0xff - if self < slice.len() { unsafe { Some(&*self.get_unchecked(slice)) } } else { None } - 8008bbe: 428c cmp r4, r1 - 8008bc0: d310 bcc.n 8008be4 - 8008bc2: e01e b.n 8008c02 - let s_trunc = &s[..trunc_len]; - 8008bc4: 9109 str r1, [sp, #36] ; 0x24 - 8008bc6: 9008 str r0, [sp, #32] - 8008bc8: 2500 movs r5, #0 - 8008bca: 4ea1 ldr r6, [pc, #644] ; (8008e50 ) - let ellipsis = if trunc_len < s.len() { "[...]" } else { "" }; - 8008bcc: 950b str r5, [sp, #44] ; 0x2c - 8008bce: 960a str r6, [sp, #40] ; 0x28 - if begin > s.len() || end > s.len() { - 8008bd0: 428a cmp r2, r1 - 8008bd2: d924 bls.n 8008c1e - 8008bd4: e027 b.n 8008c26 - 8008bd6: 2401 movs r4, #1 - 8008bd8: 572c ldrsb r4, [r5, r4] - 8008bda: 429c cmp r4, r3 - 8008bdc: dd09 ble.n 8008bf2 - 8008bde: 24fe movs r4, #254 ; 0xfe - 8008be0: 428c cmp r4, r1 - 8008be2: d20e bcs.n 8008c02 - 8008be4: 9805 ldr r0, [sp, #20] - Some(&b) => b.is_utf8_char_boundary(), - 8008be6: 5705 ldrsb r5, [r0, r4] - if slice.is_char_boundary(self.end) { - 8008be8: 429d cmp r5, r3 - 8008bea: dd37 ble.n 8008c5c - 8008bec: 4e9b ldr r6, [pc, #620] ; (8008e5c ) - 8008bee: 2505 movs r5, #5 - 8008bf0: e00c b.n 8008c0c - 8008bf2: 782c ldrb r4, [r5, #0] - 8008bf4: 0624 lsls r4, r4, #24 - 8008bf6: 1624 asrs r4, r4, #24 - 8008bf8: 429c cmp r4, r3 - 8008bfa: dd77 ble.n 8008cec - 8008bfc: 24fd movs r4, #253 ; 0xfd - 8008bfe: 428c cmp r4, r1 - 8008c00: d3f0 bcc.n 8008be4 - 8008c02: 428c cmp r4, r1 - 8008c04: 9805 ldr r0, [sp, #20] - 8008c06: d129 bne.n 8008c5c - 8008c08: 4e91 ldr r6, [pc, #580] ; (8008e50 ) - 8008c0a: 2500 movs r5, #0 - 8008c0c: 9b02 ldr r3, [sp, #8] - let s_trunc = &s[..trunc_len]; - 8008c0e: 9409 str r4, [sp, #36] ; 0x24 - 8008c10: 9805 ldr r0, [sp, #20] - 8008c12: 9008 str r0, [sp, #32] - 8008c14: 9903 ldr r1, [sp, #12] - let ellipsis = if trunc_len < s.len() { "[...]" } else { "" }; - 8008c16: 950b str r5, [sp, #44] ; 0x2c - 8008c18: 960a str r6, [sp, #40] ; 0x28 - if begin > s.len() || end > s.len() { - 8008c1a: 428a cmp r2, r1 - 8008c1c: d803 bhi.n 8008c26 - 8008c1e: 9e04 ldr r6, [sp, #16] - 8008c20: 428e cmp r6, r1 - 8008c22: d920 bls.n 8008c66 - 8008c24: 0032 movs r2, r6 - 8008c26: 920e str r2, [sp, #56] ; 0x38 - 8008c28: 2003 movs r0, #3 - Arguments { pieces, fmt: None, args } - 8008c2a: 9015 str r0, [sp, #84] ; 0x54 - 8008c2c: a916 add r1, sp, #88 ; 0x58 - 8008c2e: 9114 str r1, [sp, #80] ; 0x50 - 8008c30: 2100 movs r1, #0 - 8008c32: 9113 str r1, [sp, #76] ; 0x4c - 8008c34: 9112 str r1, [sp, #72] ; 0x48 - 8008c36: 9011 str r0, [sp, #68] ; 0x44 - 8008c38: 4899 ldr r0, [pc, #612] ; (8008ea0 ) - 8008c3a: 9010 str r0, [sp, #64] ; 0x40 - panic!("byte index {oob_index} is out of bounds of `{s_trunc}`{ellipsis}"); - 8008c3c: 4889 ldr r0, [pc, #548] ; (8008e64 ) - 8008c3e: 901b str r0, [sp, #108] ; 0x6c - 8008c40: a90a add r1, sp, #40 ; 0x28 - 8008c42: 911a str r1, [sp, #104] ; 0x68 - 8008c44: 9019 str r0, [sp, #100] ; 0x64 - 8008c46: a808 add r0, sp, #32 - 8008c48: 9018 str r0, [sp, #96] ; 0x60 - 8008c4a: 4889 ldr r0, [pc, #548] ; (8008e70 ) - 8008c4c: 9017 str r0, [sp, #92] ; 0x5c - 8008c4e: a80e add r0, sp, #56 ; 0x38 - 8008c50: 9016 str r0, [sp, #88] ; 0x58 - 8008c52: a810 add r0, sp, #64 ; 0x40 - 8008c54: 4993 ldr r1, [pc, #588] ; (8008ea4 ) - 8008c56: f000 fa79 bl 800914c - 8008c5a: defe udf #254 ; 0xfe - 8008c5c: 2200 movs r2, #0 - None => super::slice_error_fail(slice, 0, end), - 8008c5e: 0023 movs r3, r4 - 8008c60: f7ff ff86 bl 8008b70 - 8008c64: defe udf #254 ; 0xfe - assert!( - 8008c66: 42b2 cmp r2, r6 - 8008c68: d91c bls.n 8008ca4 - 8008c6a: 2004 movs r0, #4 - 8008c6c: 9015 str r0, [sp, #84] ; 0x54 - 8008c6e: a916 add r1, sp, #88 ; 0x58 - 8008c70: 9114 str r1, [sp, #80] ; 0x50 - 8008c72: 2100 movs r1, #0 - 8008c74: 9113 str r1, [sp, #76] ; 0x4c - 8008c76: 9112 str r1, [sp, #72] ; 0x48 - 8008c78: 9011 str r0, [sp, #68] ; 0x44 - 8008c7a: 4887 ldr r0, [pc, #540] ; (8008e98 ) - 8008c7c: 9010 str r0, [sp, #64] ; 0x40 - 8008c7e: 4879 ldr r0, [pc, #484] ; (8008e64 ) - 8008c80: 901d str r0, [sp, #116] ; 0x74 - 8008c82: a90a add r1, sp, #40 ; 0x28 - 8008c84: 911c str r1, [sp, #112] ; 0x70 - 8008c86: 901b str r0, [sp, #108] ; 0x6c - 8008c88: a808 add r0, sp, #32 - 8008c8a: 901a str r0, [sp, #104] ; 0x68 - 8008c8c: 4878 ldr r0, [pc, #480] ; (8008e70 ) - 8008c8e: 9019 str r0, [sp, #100] ; 0x64 - 8008c90: a907 add r1, sp, #28 - 8008c92: 9118 str r1, [sp, #96] ; 0x60 - 8008c94: 9017 str r0, [sp, #92] ; 0x5c - 8008c96: a806 add r0, sp, #24 - 8008c98: 9016 str r0, [sp, #88] ; 0x58 - 8008c9a: a810 add r0, sp, #64 ; 0x40 - 8008c9c: 497f ldr r1, [pc, #508] ; (8008e9c ) - 8008c9e: f000 fa55 bl 800914c - 8008ca2: defe udf #254 ; 0xfe - if index == 0 { - 8008ca4: 2a00 cmp r2, #0 - 8008ca6: 9805 ldr r0, [sp, #20] - 8008ca8: d111 bne.n 8008cce - 8008caa: 0032 movs r2, r6 - 8008cac: 920c str r2, [sp, #48] ; 0x30 - if index >= self.len() { - 8008cae: 428a cmp r2, r1 - 8008cb0: b402 push {r1} - 8008cb2: bc10 pop {r4} - 8008cb4: d233 bcs.n 8008d1e - intrinsics::saturating_sub(self, rhs) - 8008cb6: 1ed6 subs r6, r2, #3 - 8008cb8: d200 bcs.n 8008cbc - 8008cba: 2600 movs r6, #0 - #[inline] - pub(crate) const fn into_slice_range(self) -> Range { - // If we're not exhausted, we want to simply slice `start..end + 1`. - // If we are exhausted, then slicing with `end + 1..end + 1` gives us an - // empty range that is still subject to bounds-checks for that endpoint. - let exclusive_end = self.end + 1; - 8008cbc: 1c54 adds r4, r2, #1 - if self.start > self.end { - 8008cbe: 42b4 cmp r4, r6 - 8008cc0: d210 bcs.n 8008ce4 - slice_index_order_fail(self.start, self.end); - 8008cc2: 4a74 ldr r2, [pc, #464] ; (8008e94 ) - 8008cc4: 0030 movs r0, r6 - 8008cc6: 0021 movs r1, r4 - 8008cc8: f7ff fe9e bl 8008a08 - 8008ccc: defe udf #254 ; 0xfe - if self < slice.len() { unsafe { Some(&*self.get_unchecked(slice)) } } else { None } - 8008cce: 428a cmp r2, r1 - 8008cd0: d212 bcs.n 8008cf8 - 8008cd2: 001d movs r5, r3 - Some(&b) => b.is_utf8_char_boundary(), - 8008cd4: 5683 ldrsb r3, [r0, r2] - 8008cd6: 2440 movs r4, #64 ; 0x40 - 8008cd8: 43e4 mvns r4, r4 - let index = if !s.is_char_boundary(begin) { begin } else { end }; - 8008cda: 42a3 cmp r3, r4 - 8008cdc: b420 push {r5} - 8008cde: bc08 pop {r3} - 8008ce0: dce3 bgt.n 8008caa - 8008ce2: e7e3 b.n 8008cac - 8008ce4: 9103 str r1, [sp, #12] - 8008ce6: 9302 str r3, [sp, #8] - unsafe { - assume(!self.ptr.as_ptr().is_null()); - if mem::size_of::() != 0 { - assume(!self.end.is_null()); - } - if is_empty!(self) { - 8008ce8: 42b4 cmp r4, r6 - 8008cea: d107 bne.n 8008cfc - 8008cec: 4859 ldr r0, [pc, #356] ; (8008e54 ) - 8008cee: 2120 movs r1, #32 - 8008cf0: 4a59 ldr r2, [pc, #356] ; (8008e58 ) - 8008cf2: f000 f9f5 bl 80090e0 - 8008cf6: defe udf #254 ; 0xfe - 8008cf8: d0d7 beq.n 8008caa - 8008cfa: e7d7 b.n 8008cac - 8008cfc: 0001 movs r1, r0 - 8008cfe: 1ba4 subs r4, r4, r6 - if predicate(x) { - 8008d00: 5680 ldrsb r0, [r0, r2] - 8008d02: 2540 movs r5, #64 ; 0x40 - 8008d04: 43eb mvns r3, r5 - 8008d06: 4298 cmp r0, r3 - 8008d08: dd3a ble.n 8008d80 - 8008d0a: 1e62 subs r2, r4, #1 - 8008d0c: 2000 movs r0, #0 - unsafe { lower_bound + new_index.unwrap_unchecked() } - 8008d0e: 18b4 adds r4, r6, r2 - 8008d10: 4140 adcs r0, r0 - 8008d12: 42b4 cmp r4, r6 - 8008d14: d200 bcs.n 8008d18 - 8008d16: e095 b.n 8008e44 - 8008d18: 0008 movs r0, r1 - 8008d1a: 9b02 ldr r3, [sp, #8] - 8008d1c: 9903 ldr r1, [sp, #12] - 8008d1e: 001d movs r5, r3 - if index == 0 { - 8008d20: 2c00 cmp r4, #0 - 8008d22: d118 bne.n 8008d56 - 8008d24: 0003 movs r3, r0 - 8008d26: 2600 movs r6, #0 - let len = slice.len() - self.start; - 8008d28: 1b0a subs r2, r1, r4 - 8008d2a: b440 push {r6} - 8008d2c: bc01 pop {r0} - 8008d2e: 4170 adcs r0, r6 - 8008d30: 42a1 cmp r1, r4 - 8008d32: d37b bcc.n 8008e2c - 8008d34: 1918 adds r0, r3, r4 - let ch = s[char_start..].chars().next().unwrap(); - 8008d36: 9016 str r0, [sp, #88] ; 0x58 - 8008d38: 1880 adds r0, r0, r2 - 8008d3a: 9017 str r0, [sp, #92] ; 0x5c - 8008d3c: a816 add r0, sp, #88 ; 0x58 - 8008d3e: f7ff fe9d bl 8008a7c <::next> - 8008d42: 2111 movs r1, #17 - 8008d44: 0409 lsls r1, r1, #16 - match self { - 8008d46: 4288 cmp r0, r1 - 8008d48: d10d bne.n 8008d66 - None => panic("called `Option::unwrap()` on a `None` value"), - 8008d4a: 484d ldr r0, [pc, #308] ; (8008e80 ) - 8008d4c: 212b movs r1, #43 ; 0x2b - 8008d4e: 4a4d ldr r2, [pc, #308] ; (8008e84 ) - 8008d50: f000 f9c6 bl 80090e0 - 8008d54: defe udf #254 ; 0xfe - 8008d56: 428c cmp r4, r1 - 8008d58: d20c bcs.n 8008d74 - Some(&b) => b.is_utf8_char_boundary(), - 8008d5a: 5703 ldrsb r3, [r0, r4] - 8008d5c: 2240 movs r2, #64 ; 0x40 - 8008d5e: 43d2 mvns r2, r2 - if slice.is_char_boundary(self.start) { - 8008d60: 4293 cmp r3, r2 - 8008d62: dcdf bgt.n 8008d24 - 8008d64: e007 b.n 8008d76 - let ch = s[char_start..].chars().next().unwrap(); - 8008d66: 900d str r0, [sp, #52] ; 0x34 - if code < MAX_ONE_B { - 8008d68: 2880 cmp r0, #128 ; 0x80 - 8008d6a: d318 bcc.n 8008d9e - } else if code < MAX_TWO_B { - 8008d6c: 0ac1 lsrs r1, r0, #11 - 8008d6e: d111 bne.n 8008d94 - 8008d70: 2502 movs r5, #2 - 8008d72: e014 b.n 8008d9e - 8008d74: d0d6 beq.n 8008d24 - None => super::slice_error_fail(slice, start, end), - 8008d76: 0022 movs r2, r4 - 8008d78: 000b movs r3, r1 - 8008d7a: f7ff fef9 bl 8008b70 - 8008d7e: defe udf #254 ; 0xfe - if is_empty!(self) { - 8008d80: 4296 cmp r6, r2 - 8008d82: d0b3 beq.n 8008cec - 8008d84: 188a adds r2, r1, r2 - 8008d86: 2000 movs r0, #0 - 8008d88: 43c0 mvns r0, r0 - if predicate(x) { - 8008d8a: 5610 ldrsb r0, [r2, r0] - 8008d8c: 4298 cmp r0, r3 - 8008d8e: dd2f ble.n 8008df0 - 8008d90: 1ea2 subs r2, r4, #2 - 8008d92: e7bb b.n 8008d0c - } else if code < MAX_THREE_B { - 8008d94: 0c00 lsrs r0, r0, #16 - 8008d96: d001 beq.n 8008d9c - 8008d98: 2504 movs r5, #4 - 8008d9a: e000 b.n 8008d9e - 8008d9c: 2503 movs r5, #3 - let char_range = char_start..char_start + ch.len_utf8(); - 8008d9e: 1960 adds r0, r4, r5 - 8008da0: b440 push {r6} - 8008da2: bc02 pop {r1} - 8008da4: 4171 adcs r1, r6 - 8008da6: 42a0 cmp r0, r4 - 8008da8: d346 bcc.n 8008e38 - 8008daa: 900f str r0, [sp, #60] ; 0x3c - 8008dac: 940e str r4, [sp, #56] ; 0x38 - 8008dae: 2005 movs r0, #5 - 8008db0: 9015 str r0, [sp, #84] ; 0x54 - 8008db2: a916 add r1, sp, #88 ; 0x58 - 8008db4: 9114 str r1, [sp, #80] ; 0x50 - 8008db6: 9613 str r6, [sp, #76] ; 0x4c - 8008db8: 9612 str r6, [sp, #72] ; 0x48 - 8008dba: 9011 str r0, [sp, #68] ; 0x44 - 8008dbc: 4828 ldr r0, [pc, #160] ; (8008e60 ) - 8008dbe: 9010 str r0, [sp, #64] ; 0x40 - panic!( - 8008dc0: 4828 ldr r0, [pc, #160] ; (8008e64 ) - 8008dc2: 901f str r0, [sp, #124] ; 0x7c - 8008dc4: a90a add r1, sp, #40 ; 0x28 - 8008dc6: 911e str r1, [sp, #120] ; 0x78 - 8008dc8: 901d str r0, [sp, #116] ; 0x74 - 8008dca: a808 add r0, sp, #32 - 8008dcc: 901c str r0, [sp, #112] ; 0x70 - 8008dce: 4826 ldr r0, [pc, #152] ; (8008e68 ) - 8008dd0: 901b str r0, [sp, #108] ; 0x6c - 8008dd2: a80e add r0, sp, #56 ; 0x38 - 8008dd4: 901a str r0, [sp, #104] ; 0x68 - 8008dd6: 4825 ldr r0, [pc, #148] ; (8008e6c ) - 8008dd8: 9019 str r0, [sp, #100] ; 0x64 - 8008dda: a80d add r0, sp, #52 ; 0x34 - 8008ddc: 9018 str r0, [sp, #96] ; 0x60 - 8008dde: 4824 ldr r0, [pc, #144] ; (8008e70 ) - 8008de0: 9017 str r0, [sp, #92] ; 0x5c - 8008de2: a80c add r0, sp, #48 ; 0x30 - 8008de4: 9016 str r0, [sp, #88] ; 0x58 - 8008de6: a810 add r0, sp, #64 ; 0x40 - 8008de8: 4922 ldr r1, [pc, #136] ; (8008e74 ) - 8008dea: f000 f9af bl 800914c - 8008dee: defe udf #254 ; 0xfe - 8008df0: 000d movs r5, r1 - 8008df2: 198d adds r5, r1, r6 - 8008df4: 1e50 subs r0, r2, #1 - if is_empty!(self) { - 8008df6: 4285 cmp r5, r0 - 8008df8: d100 bne.n 8008dfc - 8008dfa: e777 b.n 8008cec - 8008dfc: 2001 movs r0, #1 - 8008dfe: 43c0 mvns r0, r0 - if predicate(x) { - 8008e00: 5610 ldrsb r0, [r2, r0] - 8008e02: 4298 cmp r0, r3 - 8008e04: dd01 ble.n 8008e0a - 8008e06: 1ee2 subs r2, r4, #3 - 8008e08: e780 b.n 8008d0c - 8008e0a: 1e90 subs r0, r2, #2 - if is_empty!(self) { - 8008e0c: 4285 cmp r5, r0 - 8008e0e: d100 bne.n 8008e12 - 8008e10: e76c b.n 8008cec - 8008e12: 2002 movs r0, #2 - 8008e14: 43c0 mvns r0, r0 - if predicate(x) { - 8008e16: 5610 ldrsb r0, [r2, r0] - 8008e18: 4298 cmp r0, r3 - 8008e1a: dd01 ble.n 8008e20 - 8008e1c: 1f22 subs r2, r4, #4 - 8008e1e: e775 b.n 8008d0c - 8008e20: 1ed0 subs r0, r2, #3 - if is_empty!(self) { - 8008e22: 4285 cmp r5, r0 - 8008e24: d100 bne.n 8008e28 - 8008e26: e761 b.n 8008cec - i -= 1; - 8008e28: 1f62 subs r2, r4, #5 - 8008e2a: e76f b.n 8008d0c - let len = slice.len() - self.start; - 8008e2c: 4816 ldr r0, [pc, #88] ; (8008e88 ) - 8008e2e: 2121 movs r1, #33 ; 0x21 - 8008e30: 4a16 ldr r2, [pc, #88] ; (8008e8c ) - 8008e32: f000 f955 bl 80090e0 - 8008e36: defe udf #254 ; 0xfe - let char_range = char_start..char_start + ch.len_utf8(); - 8008e38: 480f ldr r0, [pc, #60] ; (8008e78 ) - 8008e3a: 211c movs r1, #28 - 8008e3c: 4a0f ldr r2, [pc, #60] ; (8008e7c ) - 8008e3e: f000 f94f bl 80090e0 - 8008e42: defe udf #254 ; 0xfe - unsafe { lower_bound + new_index.unwrap_unchecked() } - 8008e44: 480c ldr r0, [pc, #48] ; (8008e78 ) - 8008e46: 211c movs r1, #28 - 8008e48: 4a11 ldr r2, [pc, #68] ; (8008e90 ) - 8008e4a: f000 f949 bl 80090e0 - 8008e4e: defe udf #254 ; 0xfe - 8008e50: 0800dab4 .word 0x0800dab4 - 8008e54: 0800b551 .word 0x0800b551 - 8008e58: 0800df00 .word 0x0800df00 - 8008e5c: 0800ddcd .word 0x0800ddcd - 8008e60: 0800deb8 .word 0x0800deb8 - 8008e64: 080078f3 .word 0x080078f3 - 8008e68: 080088bd .word 0x080088bd - 8008e6c: 08007505 .word 0x08007505 - 8008e70: 08007f49 .word 0x08007f49 - 8008e74: 0800dee0 .word 0x0800dee0 - 8008e78: 0800da70 .word 0x0800da70 - 8008e7c: 0800de74 .word 0x0800de74 - 8008e80: 0800db6c .word 0x0800db6c - 8008e84: 0800de64 .word 0x0800de64 - 8008e88: 0800da90 .word 0x0800da90 - 8008e8c: 0800dca0 .word 0x0800dca0 - 8008e90: 0800df10 .word 0x0800df10 - 8008e94: 0800def0 .word 0x0800def0 - 8008e98: 0800de34 .word 0x0800de34 - 8008e9c: 0800de54 .word 0x0800de54 - 8008ea0: 0800ddf4 .word 0x0800ddf4 - 8008ea4: 0800de0c .word 0x0800de0c - -08008ea8 <::fmt>: -use crate::convert::Infallible; -use crate::fmt; - -/// The error type returned when a checked integral type conversion fails. -#[stable(feature = "try_from", since = "1.34.0")] -#[derive(Debug, Copy, Clone, PartialEq, Eq)] - 8008ea8: b5b0 push {r4, r5, r7, lr} - 8008eaa: af02 add r7, sp, #8 - 8008eac: b084 sub sp, #16 - 8008eae: 000d movs r5, r1 - 8008eb0: 0004 movs r4, r0 - self.buf.write_str(data) - 8008eb2: 6988 ldr r0, [r1, #24] - 8008eb4: 69c9 ldr r1, [r1, #28] - 8008eb6: 68cb ldr r3, [r1, #12] - 8008eb8: 491d ldr r1, [pc, #116] ; (8008f30 <::fmt+0x88>) - 8008eba: 220f movs r2, #15 - 8008ebc: f000 f840 bl 8008f40 <::fmt+0x98> - 8008ec0: 0001 movs r1, r0 - 8008ec2: 4668 mov r0, sp - DebugTuple { fmt, result, fields: 0, empty_name: name.is_empty() } - 8008ec4: 7201 strb r1, [r0, #8] - 8008ec6: 2100 movs r1, #0 - 8008ec8: 7241 strb r1, [r0, #9] - 8008eca: 9500 str r5, [sp, #0] - 8008ecc: 9101 str r1, [sp, #4] -pub struct TryFromIntError(pub(crate) ()); - 8008ece: 9403 str r4, [sp, #12] - 8008ed0: a903 add r1, sp, #12 -#[derive(Debug, Copy, Clone, PartialEq, Eq)] - 8008ed2: 4a18 ldr r2, [pc, #96] ; (8008f34 <::fmt+0x8c>) - 8008ed4: f7fe fe28 bl 8007b28 - 8008ed8: 7a01 ldrb r1, [r0, #8] - /// "Foo(10, \"Hello World\")", - /// ); - /// ``` - #[stable(feature = "debug_builders", since = "1.2.0")] - pub fn finish(&mut self) -> fmt::Result { - if self.fields > 0 { - 8008eda: 9801 ldr r0, [sp, #4] - 8008edc: 2800 cmp r0, #0 - 8008ede: d01e beq.n 8008f1e <::fmt+0x76> - 8008ee0: 2401 movs r4, #1 - match self { - 8008ee2: 2900 cmp r1, #0 - 8008ee4: d11c bne.n 8008f20 <::fmt+0x78> - 8008ee6: 4669 mov r1, sp - 8008ee8: 9d00 ldr r5, [sp, #0] - self.result = self.result.and_then(|_| { - if self.fields == 1 && self.empty_name && !self.is_pretty() { - 8008eea: 2801 cmp r0, #1 - 8008eec: d10e bne.n 8008f0c <::fmt+0x64> - 8008eee: 7a48 ldrb r0, [r1, #9] - 8008ef0: 2800 cmp r0, #0 - 8008ef2: d00b beq.n 8008f0c <::fmt+0x64> - 8008ef4: 7828 ldrb r0, [r5, #0] - 8008ef6: 0740 lsls r0, r0, #29 - 8008ef8: d408 bmi.n 8008f0c <::fmt+0x64> - 8008efa: 69a8 ldr r0, [r5, #24] - 8008efc: 69e9 ldr r1, [r5, #28] - 8008efe: 68cb ldr r3, [r1, #12] - 8008f00: 490d ldr r1, [pc, #52] ; (8008f38 <::fmt+0x90>) - 8008f02: 2201 movs r2, #1 - 8008f04: f000 f81c bl 8008f40 <::fmt+0x98> - self.fmt.write_str(",")?; - 8008f08: 2800 cmp r0, #0 - 8008f0a: d109 bne.n 8008f20 <::fmt+0x78> - 8008f0c: 69a8 ldr r0, [r5, #24] - 8008f0e: 69e9 ldr r1, [r5, #28] - 8008f10: 68cb ldr r3, [r1, #12] - 8008f12: 490a ldr r1, [pc, #40] ; (8008f3c <::fmt+0x94>) - 8008f14: 2201 movs r2, #1 - 8008f16: f000 f813 bl 8008f40 <::fmt+0x98> - 8008f1a: 0004 movs r4, r0 - 8008f1c: e000 b.n 8008f20 <::fmt+0x78> - 8008f1e: 000c movs r4, r1 - } - self.fmt.write_str(")") - }); - } - self.result - 8008f20: 1e60 subs r0, r4, #1 - 8008f22: 4184 sbcs r4, r0 - 8008f24: 0020 movs r0, r4 - 8008f26: b004 add sp, #16 - 8008f28: bcb0 pop {r4, r5, r7} - 8008f2a: bc02 pop {r1} - 8008f2c: 4708 bx r1 - 8008f2e: 46c0 nop ; (mov r8, r8) - 8008f30: 0800e020 .word 0x0800e020 - 8008f34: 0800e030 .word 0x0800e030 - 8008f38: 0800cb8f .word 0x0800cb8f - 8008f3c: 0800cb90 .word 0x0800cb90 - 8008f40: 4718 bx r3 - ... - -08008f44 : - 1, 82, 22, 2, 7, 1, 2, 1, 2, 122, 6, 3, 1, 1, 2, 1, 7, 1, 1, 72, 2, 3, 1, 1, 1, 0, 2, 0, 5, - 59, 7, 0, 1, 63, 4, 81, 1, 0, 2, 0, 46, 2, 23, 0, 1, 1, 3, 4, 5, 8, 8, 2, 7, 30, 4, 148, 3, - 0, 55, 4, 50, 8, 1, 14, 1, 22, 5, 1, 15, 0, 7, 1, 17, 2, 7, 1, 2, 1, 5, 0, 7, 0, 1, 61, 4, - 0, 7, 109, 7, 0, 96, 128, 240, 0, - ]; - pub fn lookup(c: char) -> bool { - 8008f44: b5f0 push {r4, r5, r6, r7, lr} - 8008f46: af03 add r7, sp, #12 - 8008f48: b081 sub sp, #4 - 8008f4a: 9000 str r0, [sp, #0] - match short_offset_runs.binary_search_by_key(&(needle << 11), |header| header << 11) { - 8008f4c: 02c1 lsls r1, r0, #11 - 8008f4e: 2400 movs r4, #0 - 8008f50: 2620 movs r6, #32 - 8008f52: 4852 ldr r0, [pc, #328] ; (800909c ) - 8008f54: 0023 movs r3, r4 - 8008f56: 0032 movs r2, r6 - let mid = left + size / 2; - 8008f58: 0875 lsrs r5, r6, #1 - 8008f5a: 195d adds r5, r3, r5 - 8008f5c: b410 push {r4} - 8008f5e: bc40 pop {r6} - 8008f60: 4166 adcs r6, r4 - 8008f62: 429d cmp r5, r3 - 8008f64: d368 bcc.n 8009038 - if !$e { - 8008f66: 2d20 cmp r5, #32 - 8008f68: d300 bcc.n 8008f6c - 8008f6a: e094 b.n 8009096 - 8008f6c: 00ae lsls r6, r5, #2 - let cmp = f(unsafe { self.get_unchecked(mid) }); - 8008f6e: 5986 ldr r6, [r0, r6] - type Output = $t; - - #[inline] - #[rustc_inherit_overflow_checks] - fn shl(self, other: $f) -> $t { - self << other - 8008f70: 02f6 lsls r6, r6, #11 - if cmp == Less { - 8008f72: 42b1 cmp r1, r6 - 8008f74: d902 bls.n 8008f7c - left = mid + 1; - 8008f76: 1c6b adds r3, r5, #1 - 8008f78: 0015 movs r5, r2 - 8008f7a: e001 b.n 8008f80 - } else if cmp == Greater { - 8008f7c: 428e cmp r6, r1 - 8008f7e: d055 beq.n 800902c - 8008f80: 2200 movs r2, #0 - size = right - left; - 8008f82: 1aee subs r6, r5, r3 - 8008f84: 4152 adcs r2, r2 - 8008f86: 429d cmp r5, r3 - 8008f88: d35c bcc.n 8009044 - while left < right { - 8008f8a: 42ab cmp r3, r5 - 8008f8c: b420 push {r5} - 8008f8e: bc04 pop {r2} - 8008f90: d3e2 bcc.n 8008f58 - let mut offset_idx = decode_length(short_offset_runs[last_idx]); - 8008f92: 2b1f cmp r3, #31 - 8008f94: d84d bhi.n 8009032 - 8008f96: 009a lsls r2, r3, #2 - 8008f98: 5881 ldr r1, [r0, r2] - (short_offset_run_header >> 21) as usize - 8008f9a: 0d49 lsrs r1, r1, #21 - 8008f9c: 2b1f cmp r3, #31 - 8008f9e: d10b bne.n 8008fb8 - 8008fa0: 2200 movs r2, #0 - 8008fa2: 4d42 ldr r5, [pc, #264] ; (80090ac ) - offsets.len() - offset_idx - 8008fa4: 1a6c subs r4, r5, r1 - 8008fa6: 4152 adcs r2, r2 - 8008fa8: 428d cmp r5, r1 - 8008faa: d20d bcs.n 8008fc8 - 8008fac: 483d ldr r0, [pc, #244] ; (80090a4 ) - 8008fae: 2121 movs r1, #33 ; 0x21 - 8008fb0: 4a47 ldr r2, [pc, #284] ; (80090d0 ) - 8008fb2: f000 f895 bl 80090e0 - 8008fb6: defe udf #254 ; 0xfe - 8008fb8: 1812 adds r2, r2, r0 - decode_length(*next) - offset_idx - 8008fba: 6852 ldr r2, [r2, #4] - (short_offset_run_header >> 21) as usize - 8008fbc: 0d52 lsrs r2, r2, #21 - 8008fbe: 2500 movs r5, #0 - decode_length(*next) - offset_idx - 8008fc0: 1a54 subs r4, r2, r1 - 8008fc2: 416d adcs r5, r5 - 8008fc4: 428a cmp r2, r1 - 8008fc6: d35a bcc.n 800907e - let (a, b) = intrinsics::sub_with_overflow(self as $ActualT, rhs as $ActualT); - 8008fc8: 1e5b subs r3, r3, #1 - match self { - 8008fca: d201 bcs.n 8008fd0 - 8008fcc: 2000 movs r0, #0 - 8008fce: e005 b.n 8008fdc - last_idx.checked_sub(1).map(|prev| decode_prefix_sum(short_offset_runs[prev])).unwrap_or(0); - 8008fd0: 2b20 cmp r3, #32 - 8008fd2: d25a bcs.n 800908a - 8008fd4: 009a lsls r2, r3, #2 - 8008fd6: 5882 ldr r2, [r0, r2] - 8008fd8: 4836 ldr r0, [pc, #216] ; (80090b4 ) - short_offset_run_header & ((1 << 21) - 1) - 8008fda: 4010 ands r0, r2 - let total = needle - prev; - 8008fdc: 9a00 ldr r2, [sp, #0] - 8008fde: 1a12 subs r2, r2, r0 - 8008fe0: d341 bcc.n 8009066 - 8008fe2: 2300 movs r3, #0 - for _ in 0..(length - 1) { - 8008fe4: 1e65 subs r5, r4, #1 - 8008fe6: b408 push {r3} - 8008fe8: bc01 pop {r0} - 8008fea: 4158 adcs r0, r3 - 8008fec: 2c01 cmp r4, #1 - 8008fee: d340 bcc.n 8009072 - 8008ff0: 2d00 cmp r5, #0 - 8008ff2: d015 beq.n 8009020 - 8008ff4: 4e2d ldr r6, [pc, #180] ; (80090ac ) - let offset = offsets[offset_idx]; - 8008ff6: 42b1 cmp r1, r6 - 8008ff8: b402 push {r1} - 8008ffa: bc01 pop {r0} - 8008ffc: d800 bhi.n 8009000 - 8008ffe: 0030 movs r0, r6 - 8009000: 190c adds r4, r1, r4 - 8009002: 1e64 subs r4, r4, #1 - 8009004: 9400 str r4, [sp, #0] - 8009006: 4e2c ldr r6, [pc, #176] ; (80090b8 ) - 8009008: 4288 cmp r0, r1 - 800900a: d021 beq.n 8009050 - 800900c: 5c74 ldrb r4, [r6, r1] - prefix_sum += offset as u32; - 800900e: 191b adds r3, r3, r4 - 8009010: d223 bcs.n 800905a - if prefix_sum > total { - 8009012: 4293 cmp r3, r2 - 8009014: d804 bhi.n 8009020 - 8009016: 1e6d subs r5, r5, #1 - offset_idx += 1; - 8009018: 1c49 adds r1, r1, #1 - 800901a: 2d00 cmp r5, #0 - 800901c: d1f4 bne.n 8009008 - 800901e: 9900 ldr r1, [sp, #0] - 8009020: 2001 movs r0, #1 - offset_idx % 2 == 1 - 8009022: 4008 ands r0, r1 - super::skip_search( - c as u32, - &SHORT_OFFSET_RUNS, - &OFFSETS, - ) - } - 8009024: b001 add sp, #4 - 8009026: bcf0 pop {r4, r5, r6, r7} - 8009028: bc02 pop {r1} - 800902a: 4708 bx r1 - Ok(idx) => idx + 1, - 800902c: 1c6b adds r3, r5, #1 - let mut offset_idx = decode_length(short_offset_runs[last_idx]); - 800902e: 2b1f cmp r3, #31 - 8009030: d9b1 bls.n 8008f96 - 8009032: 2120 movs r1, #32 - 8009034: 4a1a ldr r2, [pc, #104] ; (80090a0 ) - 8009036: e02a b.n 800908e - let mid = left + size / 2; - 8009038: 4820 ldr r0, [pc, #128] ; (80090bc ) - 800903a: 211c movs r1, #28 - 800903c: 4a26 ldr r2, [pc, #152] ; (80090d8 ) - 800903e: f000 f84f bl 80090e0 - 8009042: defe udf #254 ; 0xfe - size = right - left; - 8009044: 4817 ldr r0, [pc, #92] ; (80090a4 ) - 8009046: 2121 movs r1, #33 ; 0x21 - 8009048: 4a22 ldr r2, [pc, #136] ; (80090d4 ) - 800904a: f000 f849 bl 80090e0 - 800904e: defe udf #254 ; 0xfe - 8009050: 4916 ldr r1, [pc, #88] ; (80090ac ) - let offset = offsets[offset_idx]; - 8009052: 4a1c ldr r2, [pc, #112] ; (80090c4 ) - 8009054: f000 f85a bl 800910c - 8009058: defe udf #254 ; 0xfe - prefix_sum += offset as u32; - 800905a: 4818 ldr r0, [pc, #96] ; (80090bc ) - 800905c: 211c movs r1, #28 - 800905e: 4a18 ldr r2, [pc, #96] ; (80090c0 ) - 8009060: f000 f83e bl 80090e0 - 8009064: defe udf #254 ; 0xfe - let total = needle - prev; - 8009066: 480f ldr r0, [pc, #60] ; (80090a4 ) - 8009068: 2121 movs r1, #33 ; 0x21 - 800906a: 4a18 ldr r2, [pc, #96] ; (80090cc ) - 800906c: f000 f838 bl 80090e0 - 8009070: defe udf #254 ; 0xfe - for _ in 0..(length - 1) { - 8009072: 480c ldr r0, [pc, #48] ; (80090a4 ) - 8009074: 2121 movs r1, #33 ; 0x21 - 8009076: 4a14 ldr r2, [pc, #80] ; (80090c8 ) - 8009078: f000 f832 bl 80090e0 - 800907c: defe udf #254 ; 0xfe - decode_length(*next) - offset_idx - 800907e: 4809 ldr r0, [pc, #36] ; (80090a4 ) - 8009080: 2121 movs r1, #33 ; 0x21 - 8009082: 4a09 ldr r2, [pc, #36] ; (80090a8 ) - 8009084: f000 f82c bl 80090e0 - 8009088: defe udf #254 ; 0xfe - 800908a: 2120 movs r1, #32 - last_idx.checked_sub(1).map(|prev| decode_prefix_sum(short_offset_runs[prev])).unwrap_or(0); - 800908c: 4a08 ldr r2, [pc, #32] ; (80090b0 ) - 800908e: 0018 movs r0, r3 - 8009090: f000 f83c bl 800910c - 8009094: defe udf #254 ; 0xfe - ::core::intrinsics::abort(); - 8009096: defe udf #254 ; 0xfe - 8009098: defe udf #254 ; 0xfe - 800909a: 46c0 nop ; (mov r8, r8) - 800909c: 0800e040 .word 0x0800e040 - 80090a0: 0800dfa0 .word 0x0800dfa0 - 80090a4: 0800da90 .word 0x0800da90 - 80090a8: 0800dfc0 .word 0x0800dfc0 - 80090ac: 000002c3 .word 0x000002c3 - 80090b0: 0800e010 .word 0x0800e010 - 80090b4: 001fffff .word 0x001fffff - 80090b8: 0800e0c0 .word 0x0800e0c0 - 80090bc: 0800da70 .word 0x0800da70 - 80090c0: 0800e000 .word 0x0800e000 - 80090c4: 0800dff0 .word 0x0800dff0 - 80090c8: 0800dfe0 .word 0x0800dfe0 - 80090cc: 0800dfd0 .word 0x0800dfd0 - 80090d0: 0800dfb0 .word 0x0800dfb0 - 80090d4: 0800dc1c .word 0x0800dc1c - 80090d8: 0800dc0c .word 0x0800dc0c - -080090dc <_ZN4core3ptr28drop_in_place$LT$$RF$i16$GT$17h0218c831d5c1a6a4E.llvm.16600258558454192696>: - 80090dc: 4770 bx lr - ... - -080090e0 : -pub const fn panic(expr: &'static str) -> ! { - 80090e0: b580 push {r7, lr} - 80090e2: af00 add r7, sp, #0 - 80090e4: b088 sub sp, #32 - 80090e6: 2300 movs r3, #0 - Arguments { pieces, fmt: None, args } - 80090e8: 9305 str r3, [sp, #20] - 80090ea: 4c07 ldr r4, [pc, #28] ; (8009108 ) - 80090ec: 9404 str r4, [sp, #16] - 80090ee: 9303 str r3, [sp, #12] - 80090f0: 9302 str r3, [sp, #8] - 80090f2: 2301 movs r3, #1 - 80090f4: 9301 str r3, [sp, #4] - 80090f6: ab06 add r3, sp, #24 - 80090f8: 9300 str r3, [sp, #0] - panic_fmt(fmt::Arguments::new_v1(&[expr], &[])); - 80090fa: 9107 str r1, [sp, #28] - 80090fc: 9006 str r0, [sp, #24] - 80090fe: 4668 mov r0, sp - 8009100: 0011 movs r1, r2 - 8009102: f000 f823 bl 800914c - 8009106: defe udf #254 ; 0xfe - 8009108: 0800e384 .word 0x0800e384 - -0800910c : -fn panic_bounds_check(index: usize, len: usize) -> ! { - 800910c: b580 push {r7, lr} - 800910e: af00 add r7, sp, #0 - 8009110: b08c sub sp, #48 ; 0x30 - 8009112: 9101 str r1, [sp, #4] - 8009114: 9000 str r0, [sp, #0] - 8009116: 2002 movs r0, #2 - 8009118: 9007 str r0, [sp, #28] - 800911a: a908 add r1, sp, #32 - 800911c: 9106 str r1, [sp, #24] - 800911e: 2100 movs r1, #0 - 8009120: 9105 str r1, [sp, #20] - 8009122: 9104 str r1, [sp, #16] - 8009124: 9003 str r0, [sp, #12] - 8009126: 4807 ldr r0, [pc, #28] ; (8009144 ) - 8009128: 9002 str r0, [sp, #8] - panic!("index out of bounds: the len is {len} but the index is {index}") - 800912a: 4807 ldr r0, [pc, #28] ; (8009148 ) - 800912c: 900b str r0, [sp, #44] ; 0x2c - 800912e: 4669 mov r1, sp - 8009130: 910a str r1, [sp, #40] ; 0x28 - 8009132: 9009 str r0, [sp, #36] ; 0x24 - 8009134: a801 add r0, sp, #4 - 8009136: 9008 str r0, [sp, #32] - 8009138: a802 add r0, sp, #8 - 800913a: 0011 movs r1, r2 - 800913c: f000 f806 bl 800914c - 8009140: defe udf #254 ; 0xfe - 8009142: 46c0 nop ; (mov r8, r8) - 8009144: 0800e4d8 .word 0x0800e4d8 - 8009148: 08007f49 .word 0x08007f49 - -0800914c : -pub const fn panic_fmt(fmt: fmt::Arguments<'_>) -> ! { - 800914c: b580 push {r7, lr} - 800914e: af00 add r7, sp, #0 - 8009150: b086 sub sp, #24 - 8009152: aa01 add r2, sp, #4 - 8009154: 2301 movs r3, #1 - PanicInfo { location, message, payload: &NoPayload, can_unwind } - 8009156: 7413 strb r3, [r2, #16] - 8009158: 9104 str r1, [sp, #16] - 800915a: 9003 str r0, [sp, #12] - 800915c: 4803 ldr r0, [pc, #12] ; (800916c ) - 800915e: 9002 str r0, [sp, #8] - 8009160: 4803 ldr r0, [pc, #12] ; (8009170 ) - 8009162: 9001 str r0, [sp, #4] - unsafe { panic_impl(&pi) } - 8009164: 0010 movs r0, r2 - 8009166: f7fa fa53 bl 8003610 - 800916a: defe udf #254 ; 0xfe - 800916c: 0800e4b4 .word 0x0800e4b4 - 8009170: 0800e384 .word 0x0800e384 - -08009174 : - assert_failed_inner(AssertKind::Match, &left, &Pattern(right), args); -} - -/// Non-generic version of the above functions, to avoid code bloat. -#[track_caller] -fn assert_failed_inner( - 8009174: b580 push {r7, lr} - 8009176: af00 add r7, sp, #0 - 8009178: b09a sub sp, #104 ; 0x68 - 800917a: 9201 str r2, [sp, #4] - 800917c: 9100 str r1, [sp, #0] - 800917e: 68b9 ldr r1, [r7, #8] - 8009180: 9103 str r1, [sp, #12] - 8009182: 9302 str r3, [sp, #8] - 8009184: 21ff movs r1, #255 ; 0xff - 8009186: 4001 ands r1, r0 - 8009188: 68f8 ldr r0, [r7, #12] - kind: AssertKind, - left: &dyn fmt::Debug, - right: &dyn fmt::Debug, - args: Option>, -) -> ! { - let op = match kind { - 800918a: d003 beq.n 8009194 - 800918c: 2901 cmp r1, #1 - 800918e: d105 bne.n 800919c - AssertKind::Eq => "==", - AssertKind::Ne => "!=", - 8009190: 491e ldr r1, [pc, #120] ; (800920c ) - 8009192: e000 b.n 8009196 - AssertKind::Eq => "==", - 8009194: 491e ldr r1, [pc, #120] ; (8009210 ) - 8009196: 9104 str r1, [sp, #16] - 8009198: 2202 movs r2, #2 - 800919a: e002 b.n 80091a2 - AssertKind::Match => "matches", - 800919c: 491a ldr r1, [pc, #104] ; (8009208 ) - 800919e: 9104 str r1, [sp, #16] - 80091a0: 2207 movs r2, #7 - 80091a2: 6939 ldr r1, [r7, #16] - 80091a4: 9205 str r2, [sp, #20] - }; - - match args { - 80091a6: 6802 ldr r2, [r0, #0] - 80091a8: 2a00 cmp r2, #0 - 80091aa: d10b bne.n 80091c4 - 80091ac: 2003 movs r0, #3 - 80091ae: 9019 str r0, [sp, #100] ; 0x64 - 80091b0: a80c add r0, sp, #48 ; 0x30 - 80091b2: 9018 str r0, [sp, #96] ; 0x60 - 80091b4: 2000 movs r0, #0 - 80091b6: 9017 str r0, [sp, #92] ; 0x5c - 80091b8: 9016 str r0, [sp, #88] ; 0x58 - 80091ba: 2004 movs r0, #4 - 80091bc: 9015 str r0, [sp, #84] ; 0x54 - 80091be: 4819 ldr r0, [pc, #100] ; (8009224 ) - 80091c0: 9014 str r0, [sp, #80] ; 0x50 - 80091c2: e012 b.n 80091ea - 80091c4: aa06 add r2, sp, #24 - Some(args) => panic!( - 80091c6: 0013 movs r3, r2 - 80091c8: c870 ldmia r0!, {r4, r5, r6} - 80091ca: c370 stmia r3!, {r4, r5, r6} - 80091cc: c870 ldmia r0!, {r4, r5, r6} - 80091ce: c370 stmia r3!, {r4, r5, r6} - 80091d0: 2004 movs r0, #4 - 80091d2: 9019 str r0, [sp, #100] ; 0x64 - 80091d4: ab0c add r3, sp, #48 ; 0x30 - 80091d6: 9318 str r3, [sp, #96] ; 0x60 - 80091d8: 2300 movs r3, #0 - 80091da: 9317 str r3, [sp, #92] ; 0x5c - 80091dc: 9316 str r3, [sp, #88] ; 0x58 - 80091de: 9015 str r0, [sp, #84] ; 0x54 - 80091e0: 480c ldr r0, [pc, #48] ; (8009214 ) - 80091e2: 9014 str r0, [sp, #80] ; 0x50 - 80091e4: 480c ldr r0, [pc, #48] ; (8009218 ) - 80091e6: 9013 str r0, [sp, #76] ; 0x4c - 80091e8: 9212 str r2, [sp, #72] ; 0x48 - 80091ea: 480c ldr r0, [pc, #48] ; (800921c ) - 80091ec: 9011 str r0, [sp, #68] ; 0x44 - 80091ee: aa02 add r2, sp, #8 - 80091f0: 9210 str r2, [sp, #64] ; 0x40 - 80091f2: 900f str r0, [sp, #60] ; 0x3c - 80091f4: 4668 mov r0, sp - 80091f6: 900e str r0, [sp, #56] ; 0x38 - 80091f8: 4809 ldr r0, [pc, #36] ; (8009220 ) - 80091fa: 900d str r0, [sp, #52] ; 0x34 - 80091fc: a804 add r0, sp, #16 - 80091fe: 900c str r0, [sp, #48] ; 0x30 - 8009200: a814 add r0, sp, #80 ; 0x50 - 8009202: f7ff ffa3 bl 800914c - 8009206: defe udf #254 ; 0xfe - 8009208: 0800e4e8 .word 0x0800e4e8 - 800920c: 0800e4ef .word 0x0800e4ef - 8009210: 0800e4f1 .word 0x0800e4f1 - 8009214: 0800e530 .word 0x0800e530 - 8009218: 08006ce7 .word 0x08006ce7 - 800921c: 080078c5 .word 0x080078c5 - 8009220: 080078f3 .word 0x080078f3 - 8009224: 0800e554 .word 0x0800e554 - -08009228 <__aeabi_lmul>: - } - - #[cfg(target_arch = "arm")] - pub mod $alias { - #[cfg_attr(not(feature = "mangled-names"), no_mangle)] - pub extern "aapcs" fn $alias( $($argname: $ty),* ) $(-> $ret)? { - 8009228: b5f0 push {r4, r5, r6, r7, lr} - 800922a: af03 add r7, sp, #12 - 800922c: b084 sub sp, #16 - 800922e: ac01 add r4, sp, #4 - 8009230: c40b stmia r4!, {r0, r1, r3} - 8009232: 4c11 ldr r4, [pc, #68] ; (8009278 <__aeabi_lmul+0x50>) - - fn widen(self) -> Self::D { - self as $X - } - fn zero_widen(self) -> Self::D { - (self as $uH) as $X - 8009234: 0006 movs r6, r0 - 8009236: 4026 ands r6, r4 - (self >> <$X as Int>::BITS) as $X - 8009238: 0c11 lsrs r1, r2, #16 - intrinsics::wrapping_mul(self, rhs) - 800923a: 9100 str r1, [sp, #0] - 800923c: 0033 movs r3, r6 - 800923e: 434b muls r3, r1 - (self as $uH) as $X - 8009240: 4014 ands r4, r2 - (self >> <$X as Int>::BITS) as $X - 8009242: 0c05 lsrs r5, r0, #16 - 8009244: 0028 movs r0, r5 - 8009246: 4360 muls r0, r4 - 8009248: 2100 movs r1, #0 - 800924a: 18c0 adds r0, r0, r3 - 800924c: 4149 adcs r1, r1 - 800924e: 0c03 lsrs r3, r0, #16 - 8009250: 0409 lsls r1, r1, #16 - 8009252: 18c9 adds r1, r1, r3 - 8009254: 4374 muls r4, r6 - 8009256: 0400 lsls r0, r0, #16 - 8009258: 9b00 ldr r3, [sp, #0] - 800925a: 435d muls r5, r3 - intrinsics::wrapping_add(self, rhs) - 800925c: 1824 adds r4, r4, r0 - 800925e: 414d adcs r5, r1 - 8009260: 9902 ldr r1, [sp, #8] - intrinsics::wrapping_mul(self, rhs) - 8009262: 4351 muls r1, r2 - 8009264: 9803 ldr r0, [sp, #12] - 8009266: 9a01 ldr r2, [sp, #4] - 8009268: 4350 muls r0, r2 - 800926a: 1840 adds r0, r0, r1 - intrinsics::wrapping_add(self, rhs) - 800926c: 1829 adds r1, r5, r0 - super::$name($($argname),*) - } - 800926e: 0020 movs r0, r4 - 8009270: b004 add sp, #16 - 8009272: bcf0 pop {r4, r5, r6, r7} - 8009274: bc04 pop {r2} - 8009276: 4710 bx r2 - 8009278: 0000ffff .word 0x0000ffff - -0800927c <__aeabi_uidiv>: - pub extern "aapcs" fn $alias( $($argname: $ty),* ) $(-> $ret)? { - 800927c: b580 push {r7, lr} - 800927e: af00 add r7, sp, #0 -intrinsics! { - #[maybe_use_optimized_c_shim] - #[arm_aeabi_alias = __aeabi_uidiv] - /// Returns `n / d` - pub extern "C" fn __udivsi3(n: u32, d: u32) -> u32 { - u32_div_rem(n, d).0 - 8009280: f000 f88c bl 800939c - } - 8009284: bc80 pop {r7} - 8009286: bc02 pop {r1} - 8009288: 4708 bx r1 - -0800928a <__udivmodsi4>: - } - - pub mod $name { - $(#[$($attr)*])* - #[cfg_attr(not(feature = "mangled-names"), no_mangle)] - pub extern $abi fn $name( $($argname: $ty),* ) $(-> $ret)? { - 800928a: b5d0 push {r4, r6, r7, lr} - 800928c: af02 add r7, sp, #8 - 800928e: 0014 movs r4, r2 - - #[avr_skip] - #[maybe_use_optimized_c_shim] - /// Returns `n / d` and sets `*rem = n % d` - pub extern "C" fn __udivmodsi4(n: u32, d: u32, rem: Option<&mut u32>) -> u32 { - let quo_rem = u32_div_rem(n, d); - 8009290: f000 f884 bl 800939c - if let Some(rem) = rem { - 8009294: 2c00 cmp r4, #0 - 8009296: d000 beq.n 800929a <__udivmodsi4+0x10> - *rem = quo_rem.1; - 8009298: 6021 str r1, [r4, #0] - super::$name($($argname),*) - } - 800929a: bcd0 pop {r4, r6, r7} - 800929c: bc02 pop {r1} - 800929e: 4708 bx r1 - -080092a0 <__aeabi_memcpy>: - } - - pub mod $name { - $(#[$($attr)*])* - #[cfg_attr(not(feature = "mangled-names"), no_mangle)] - pub unsafe extern $abi fn $name( $($argname: $ty),* ) $(-> $ret)? { - 80092a0: b580 push {r7, lr} - 80092a2: af00 add r7, sp, #0 - super::$name($($argname),*) - 80092a4: f000 f84b bl 800933e - } - 80092a8: bc80 pop {r7} - 80092aa: bc01 pop {r0} - 80092ac: 4700 bx r0 - -080092ae <__aeabi_memmove>: - pub unsafe extern $abi fn $name( $($argname: $ty),* ) $(-> $ret)? { - 80092ae: b580 push {r7, lr} - 80092b0: af00 add r7, sp, #0 - super::$name($($argname),*) - 80092b2: f000 f84b bl 800934c - } - 80092b6: bc80 pop {r7} - 80092b8: bc01 pop {r0} - 80092ba: 4700 bx r0 - -080092bc <__aeabi_memmove4>: - pub unsafe extern $abi fn $name( $($argname: $ty),* ) $(-> $ret)? { - 80092bc: b580 push {r7, lr} - 80092be: af00 add r7, sp, #0 - super::$name($($argname),*) - 80092c0: f000 f84b bl 800935a - } - 80092c4: bc80 pop {r7} - 80092c6: bc01 pop {r0} - 80092c8: 4700 bx r0 - -080092ca <__clzsi2>: - x = t; - } - } - #[cfg(any(target_pointer_width = "32", target_pointer_width = "64"))] - { - t = x >> 16; - 80092ca: 0c02 lsrs r2, r0, #16 - if t != 0 { - 80092cc: d003 beq.n 80092d6 <__clzsi2+0xc> - 80092ce: 2110 movs r1, #16 - 80092d0: 2a00 cmp r2, #0 - 80092d2: d103 bne.n 80092dc <__clzsi2+0x12> - 80092d4: e003 b.n 80092de <__clzsi2+0x14> - 80092d6: 2120 movs r1, #32 - 80092d8: 2a00 cmp r2, #0 - 80092da: d000 beq.n 80092de <__clzsi2+0x14> - 80092dc: 0010 movs r0, r2 - z -= 16; - x = t; - } - } - t = x >> 8; - 80092de: 0a02 lsrs r2, r0, #8 - if t != 0 { - 80092e0: d10f bne.n 8009302 <__clzsi2+0x38> - 80092e2: 2a00 cmp r2, #0 - 80092e4: d110 bne.n 8009308 <__clzsi2+0x3e> - z -= 8; - x = t; - } - t = x >> 4; - if t != 0 { - 80092e6: 2810 cmp r0, #16 - 80092e8: d211 bcs.n 800930e <__clzsi2+0x44> - 80092ea: 2810 cmp r0, #16 - 80092ec: d212 bcs.n 8009314 <__clzsi2+0x4a> - z -= 4; - x = t; - } - t = x >> 2; - if t != 0 { - 80092ee: 2804 cmp r0, #4 - 80092f0: d213 bcs.n 800931a <__clzsi2+0x50> - 80092f2: 2804 cmp r0, #4 - 80092f4: d214 bcs.n 8009320 <__clzsi2+0x56> - z -= 2; - x = t; - } - // the last two bisections are combined into one conditional - t = x >> 1; - if t != 0 { - 80092f6: 2802 cmp r0, #2 - 80092f8: d315 bcc.n 8009326 <__clzsi2+0x5c> - 80092fa: 2001 movs r0, #1 - 80092fc: 43c0 mvns r0, r0 - 80092fe: 1840 adds r0, r0, r1 - } - 8009300: 4770 bx lr - 8009302: 3908 subs r1, #8 - if t != 0 { - 8009304: 2a00 cmp r2, #0 - 8009306: d0ee beq.n 80092e6 <__clzsi2+0x1c> - 8009308: 0010 movs r0, r2 - if t != 0 { - 800930a: 2810 cmp r0, #16 - 800930c: d3ed bcc.n 80092ea <__clzsi2+0x20> - 800930e: 1f09 subs r1, r1, #4 - 8009310: 2810 cmp r0, #16 - 8009312: d3ec bcc.n 80092ee <__clzsi2+0x24> - 8009314: 0900 lsrs r0, r0, #4 - if t != 0 { - 8009316: 2804 cmp r0, #4 - 8009318: d3eb bcc.n 80092f2 <__clzsi2+0x28> - 800931a: 1e89 subs r1, r1, #2 - 800931c: 2804 cmp r0, #4 - 800931e: d3ea bcc.n 80092f6 <__clzsi2+0x2c> - 8009320: 0880 lsrs r0, r0, #2 - if t != 0 { - 8009322: 2802 cmp r0, #2 - 8009324: d2e9 bcs.n 80092fa <__clzsi2+0x30> - 8009326: 4240 negs r0, r0 - 8009328: 1840 adds r0, r0, r1 - 800932a: 4770 bx lr - -0800932c <__aeabi_uidivmod>: - // NOTE This function and the ones below are implemented using assembly because they are using a - // custom calling convention which can't be implemented using a normal Rust function. - #[naked] - #[cfg(not(target_env = "msvc"))] - pub unsafe extern "C" fn __aeabi_uidivmod() { - core::arch::asm!( - 800932c: b500 push {lr} - 800932e: b081 sub sp, #4 - 8009330: 466a mov r2, sp - 8009332: f7ff ffaa bl 800928a <__udivmodsi4> - 8009336: 9900 ldr r1, [sp, #0] - 8009338: b001 add sp, #4 - 800933a: bd00 pop {pc} - 800933c: defe udf #254 ; 0xfe - -0800933e : - pub unsafe extern $abi fn $name( $($argname: $ty),* ) $(-> $ret)? { - 800933e: b580 push {r7, lr} - 8009340: af00 add r7, sp, #0 - // FIXME: The `*4` and `*8` variants should be defined as aliases. - - #[cfg(not(target_os = "ios"))] - #[linkage = "weak"] - pub unsafe extern "aapcs" fn __aeabi_memcpy(dest: *mut u8, src: *const u8, n: usize) { - ::mem::memcpy(dest, src, n); - 8009342: f000 f8d5 bl 80094f0 - } - 8009346: bc80 pop {r7} - 8009348: bc01 pop {r0} - 800934a: 4700 bx r0 - -0800934c : - pub unsafe extern $abi fn $name( $($argname: $ty),* ) $(-> $ret)? { - 800934c: b580 push {r7, lr} - 800934e: af00 add r7, sp, #0 - } - - #[cfg(not(target_os = "ios"))] - #[linkage = "weak"] - pub unsafe extern "aapcs" fn __aeabi_memmove(dest: *mut u8, src: *const u8, n: usize) { - ::mem::memmove(dest, src, n); - 8009350: f000 f94c bl 80095ec - } - 8009354: bc80 pop {r7} - 8009356: bc01 pop {r0} - 8009358: 4700 bx r0 - -0800935a : - pub unsafe extern $abi fn $name( $($argname: $ty),* ) $(-> $ret)? { - 800935a: b580 push {r7, lr} - 800935c: af00 add r7, sp, #0 - } - - #[cfg(not(any(target_os = "ios", target_env = "msvc")))] - #[linkage = "weak"] - pub unsafe extern "aapcs" fn __aeabi_memmove4(dest: *mut u8, src: *const u8, n: usize) { - __aeabi_memmove(dest, src, n); - 800935e: f7ff fff5 bl 800934c - } - 8009362: bc80 pop {r7} - 8009364: bc01 pop {r0} - 8009366: 4700 bx r0 - -08009368 : - pub unsafe extern $abi fn $name( $($argname: $ty),* ) $(-> $ret)? { - 8009368: b580 push {r7, lr} - 800936a: af00 add r7, sp, #0 - 800936c: 000b movs r3, r1 - - #[cfg(not(target_os = "ios"))] - #[linkage = "weak"] - pub unsafe extern "aapcs" fn __aeabi_memset(dest: *mut u8, n: usize, c: i32) { - // Note the different argument order - ::mem::memset(dest, c, n); - 800936e: 0011 movs r1, r2 - 8009370: 001a movs r2, r3 - 8009372: f000 fa39 bl 80097e8 - } - 8009376: bc80 pop {r7} - 8009378: bc01 pop {r0} - 800937a: 4700 bx r0 - -0800937c : - pub unsafe extern $abi fn $name( $($argname: $ty),* ) $(-> $ret)? { - 800937c: b580 push {r7, lr} - 800937e: af00 add r7, sp, #0 - 8009380: 2200 movs r2, #0 - } - - #[cfg(not(target_os = "ios"))] - #[linkage = "weak"] - pub unsafe extern "aapcs" fn __aeabi_memclr(dest: *mut u8, n: usize) { - __aeabi_memset(dest, n, 0); - 8009382: f7ff fff1 bl 8009368 - } - 8009386: bc80 pop {r7} - 8009388: bc01 pop {r0} - 800938a: 4700 bx r0 - -0800938c <__aeabi_memclr>: - pub unsafe extern $abi fn $name( $($argname: $ty),* ) $(-> $ret)? { - 800938c: b580 push {r7, lr} - 800938e: af00 add r7, sp, #0 - super::$name($($argname),*) - 8009390: f7ff fff4 bl 800937c - } - 8009394: bc80 pop {r7} - 8009396: bc01 pop {r0} - 8009398: 4700 bx r0 - ... - -0800939c : - $uX:ident, // unsigned integer type for the inputs and outputs of `$fn` - $iX:ident // signed integer type with same bitwidth as `$uX` - ) => { - /// Computes the quotient and remainder of `duo` divided by `div` and returns them as a - /// tuple. - pub fn $fn(duo: $uX, div: $uX) -> ($uX, $uX) { - 800939c: b5f0 push {r4, r5, r6, r7, lr} - 800939e: af03 add r7, sp, #12 - 80093a0: b083 sub sp, #12 - 80093a2: 0002 movs r2, r0 - let mut duo = duo; - // handle edge cases before calling `$normalization_shift` - if div == 0 { - $zero_div_fn() - } - if duo < div { - 80093a4: 4288 cmp r0, r1 - 80093a6: d201 bcs.n 80093ac - 80093a8: 2000 movs r0, #0 - 80093aa: e07f b.n 80094ac - } else { - let mut test = duo; - shl = 0usize; - let mut lvl = $n >> 1; - loop { - let tmp = test >> lvl; - 80093ac: 0c10 lsrs r0, r2, #16 - 80093ae: 4281 cmp r1, r0 - 80093b0: d905 bls.n 80093be - 80093b2: 2400 movs r4, #0 - // It happens that a final `duo < (div << shl)` check is not needed, because the - // `div <= tmp` check insures that the msb of `test` never passes the msb of - // `div`, and any set bits shifted off the end of `test` would still keep - // `div <= tmp` true. - if div <= tmp { - 80093b4: 4281 cmp r1, r0 - 80093b6: b404 push {r2} - 80093b8: bc08 pop {r3} - 80093ba: d905 bls.n 80093c8 - 80093bc: e005 b.n 80093ca - 80093be: 2401 movs r4, #1 - 80093c0: 4281 cmp r1, r0 - 80093c2: b404 push {r2} - 80093c4: bc08 pop {r3} - 80093c6: d800 bhi.n 80093ca - 80093c8: 0003 movs r3, r0 - 80093ca: 0120 lsls r0, r4, #4 - let tmp = test >> lvl; - 80093cc: 0a1c lsrs r4, r3, #8 - if div <= tmp { - 80093ce: 42a1 cmp r1, r4 - 80093d0: d910 bls.n 80093f4 - 80093d2: 42a1 cmp r1, r4 - 80093d4: d911 bls.n 80093fa - let tmp = test >> lvl; - 80093d6: 091c lsrs r4, r3, #4 - if div <= tmp { - 80093d8: 42a1 cmp r1, r4 - 80093da: d912 bls.n 8009402 - 80093dc: 42a1 cmp r1, r4 - 80093de: d913 bls.n 8009408 - let tmp = test >> lvl; - 80093e0: 089c lsrs r4, r3, #2 - if div <= tmp { - 80093e2: 42a1 cmp r1, r4 - 80093e4: d914 bls.n 8009410 - 80093e6: 42a1 cmp r1, r4 - 80093e8: d915 bls.n 8009416 - let tmp = test >> lvl; - 80093ea: 085b lsrs r3, r3, #1 - if div <= tmp { - 80093ec: 4299 cmp r1, r3 - 80093ee: d916 bls.n 800941e - 80093f0: 0003 movs r3, r0 - 80093f2: e019 b.n 8009428 - 80093f4: 3008 adds r0, #8 - 80093f6: 42a1 cmp r1, r4 - 80093f8: d8ed bhi.n 80093d6 - 80093fa: 0023 movs r3, r4 - let tmp = test >> lvl; - 80093fc: 091c lsrs r4, r3, #4 - if div <= tmp { - 80093fe: 42a1 cmp r1, r4 - 8009400: d8ec bhi.n 80093dc - 8009402: 1d00 adds r0, r0, #4 - 8009404: 42a1 cmp r1, r4 - 8009406: d8eb bhi.n 80093e0 - 8009408: 0023 movs r3, r4 - let tmp = test >> lvl; - 800940a: 089c lsrs r4, r3, #2 - if div <= tmp { - 800940c: 42a1 cmp r1, r4 - 800940e: d8ea bhi.n 80093e6 - 8009410: 1c80 adds r0, r0, #2 - 8009412: 42a1 cmp r1, r4 - 8009414: d8e9 bhi.n 80093ea - 8009416: 0023 movs r3, r4 - let tmp = test >> lvl; - 8009418: 085b lsrs r3, r3, #1 - if div <= tmp { - 800941a: 4299 cmp r1, r3 - 800941c: d8e8 bhi.n 80093f0 - 800941e: 2400 movs r4, #0 - test = tmp; - shl += lvl; - 8009420: 1c43 adds r3, r0, #1 - 8009422: 4164 adcs r4, r4 - 8009424: 4283 cmp r3, r0 - 8009426: d34c bcc.n 80094c2 - // will unroll it in a decent way. - - // standard opening for SWAR algorithm with first step and edge case handling - let div_original = div; - let mut shl = $normalization_shift(duo, div, true); - let mut div: $uX = (div << shl); - 8009428: 2b20 cmp r3, #32 - 800942a: d244 bcs.n 80094b6 - 800942c: 201f movs r0, #31 - 800942e: 001d movs r5, r3 - 8009430: 4005 ands r5, r0 - 8009432: 000c movs r4, r1 - 8009434: 40ac lsls r4, r5 - 8009436: 2601 movs r6, #1 - 8009438: 9602 str r6, [sp, #8] - duo = duo.wrapping_sub(div); - let mut quo: $uX = 1 << shl; - 800943a: 40ae lsls r6, r5 - intrinsics::wrapping_sub(self, rhs) - 800943c: 1b15 subs r5, r2, r4 - if duo < div_original { - 800943e: 428d cmp r5, r1 - 8009440: d202 bcs.n 8009448 - 8009442: 002a movs r2, r5 - 8009444: 0030 movs r0, r6 - 8009446: e031 b.n 80094ac - return (quo, duo); - } - let mask: $uX; - if (div as $iX) < 0 { - 8009448: 2c00 cmp r4, #0 - 800944a: d403 bmi.n 8009454 - 800944c: 0031 movs r1, r6 - 800944e: 0030 movs r0, r6 - 8009450: 002a movs r2, r5 - 8009452: e017 b.n 8009484 - div >>= 1; - shl -= 1; - 8009454: 1e5b subs r3, r3, #1 - 8009456: d33a bcc.n 80094ce - let tmp = 1 << shl; - 8009458: 2b20 cmp r3, #32 - 800945a: d22c bcs.n 80094b6 - 800945c: 0864 lsrs r4, r4, #1 - 800945e: 4018 ands r0, r3 - 8009460: 1b2a subs r2, r5, r4 - mask = tmp - 1; - let sub = duo.wrapping_sub(div); - if (sub as $iX) >= 0 { - 8009462: 2a00 cmp r2, #0 - 8009464: 9201 str r2, [sp, #4] - 8009466: da00 bge.n 800946a - 8009468: 002a movs r2, r5 - 800946a: 9d02 ldr r5, [sp, #8] - 800946c: 4085 lsls r5, r0 - 800946e: 9801 ldr r0, [sp, #4] - 8009470: 2800 cmp r0, #0 - 8009472: 9501 str r5, [sp, #4] - 8009474: b420 push {r5} - 8009476: bc01 pop {r0} - 8009478: da00 bge.n 800947c - 800947a: 2000 movs r0, #0 - 800947c: 4330 orrs r0, r6 - duo = sub; - quo |= tmp; - } - if duo < div_original { - 800947e: 428a cmp r2, r1 - 8009480: 9901 ldr r1, [sp, #4] - 8009482: d313 bcc.n 80094ac - 8009484: 1e49 subs r1, r1, #1 - - // central loop - div = div.wrapping_sub(1); - let mut i = shl; - loop { - if i == 0 { - 8009486: 2b00 cmp r3, #0 - 8009488: d00b beq.n 80094a2 - 800948a: 9d02 ldr r5, [sp, #8] - 800948c: 1b2d subs r5, r5, r4 - 800948e: 0014 movs r4, r2 - 8009490: 001a movs r2, r3 - 8009492: e001 b.n 8009498 - break; - } - i -= 1; - 8009494: 1e52 subs r2, r2, #1 - if i == 0 { - 8009496: d005 beq.n 80094a4 - intrinsics::unchecked_shl(self, (rhs & ($BITS - 1)) as $SelfT) - 8009498: 0064 lsls r4, r4, #1 - intrinsics::wrapping_sub(self, rhs) - 800949a: 1966 adds r6, r4, r5 - intrinsics::wrapping_add(self, rhs) - 800949c: d4fa bmi.n 8009494 - 800949e: 0034 movs r4, r6 - 80094a0: e7f8 b.n 8009494 - 80094a2: 0014 movs r4, r2 - let mask = (duo as $iX).wrapping_shr($n - 1) as $uX; - // restore - duo = duo.wrapping_add(div & mask); - } - // unpack - return ((duo & mask) | quo, duo >> shl); - 80094a4: 0022 movs r2, r4 - 80094a6: 40da lsrs r2, r3 - 80094a8: 4021 ands r1, r4 - 80094aa: 4308 orrs r0, r1 - duo = duo.wrapping_add(div); - } - // unpack - return ((duo & mask) | quo, duo >> shl); - */ - } - 80094ac: 0011 movs r1, r2 - 80094ae: b003 add sp, #12 - 80094b0: bcf0 pop {r4, r5, r6, r7} - 80094b2: bc04 pop {r2} - 80094b4: 4710 bx r2 - 80094b6: 480b ldr r0, [pc, #44] ; (80094e4 ) - 80094b8: 2123 movs r1, #35 ; 0x23 - 80094ba: 4a0b ldr r2, [pc, #44] ; (80094e8 ) - 80094bc: f7ff fe10 bl 80090e0 - 80094c0: defe udf #254 ; 0xfe - 80094c2: 4806 ldr r0, [pc, #24] ; (80094dc ) - 80094c4: 211c movs r1, #28 - 80094c6: 4a06 ldr r2, [pc, #24] ; (80094e0 ) - 80094c8: f7ff fe0a bl 80090e0 - 80094cc: defe udf #254 ; 0xfe - shl -= 1; - 80094ce: 4807 ldr r0, [pc, #28] ; (80094ec ) - 80094d0: 2121 movs r1, #33 ; 0x21 - 80094d2: 4a05 ldr r2, [pc, #20] ; (80094e8 ) - 80094d4: f7ff fe04 bl 80090e0 - 80094d8: defe udf #254 ; 0xfe - 80094da: 46c0 nop ; (mov r8, r8) - 80094dc: 0800e690 .word 0x0800e690 - 80094e0: 0800e678 .word 0x0800e678 - 80094e4: 0800e6e0 .word 0x0800e6e0 - 80094e8: 0800e704 .word 0x0800e704 - 80094ec: 0800e6b0 .word 0x0800e6b0 - -080094f0 : - pub unsafe extern $abi fn $name( $($argname: $ty),* ) $(-> $ret)? { - 80094f0: b5f0 push {r4, r5, r6, r7, lr} - 80094f2: af03 add r7, sp, #12 - 80094f4: b087 sub sp, #28 - dest_usize = dest_usize.add(1); - src_usize = src_usize.add(1); - } - } - - if n >= WORD_COPY_THRESHOLD { - 80094f6: 2a0f cmp r2, #15 - 80094f8: d939 bls.n 800956e - intrinsics::wrapping_sub(self, rhs) - 80094fa: 4243 negs r3, r0 - 80094fc: 2403 movs r4, #3 - 80094fe: 9402 str r4, [sp, #8] - // Align dest - // Because of n >= 2 * WORD_SIZE, dst_misalignment < n - let dest_misalignment = (dest as usize).wrapping_neg() & WORD_MASK; - 8009500: 4023 ands r3, r4 - 8009502: 9004 str r0, [sp, #16] - 8009504: 18c4 adds r4, r0, r3 - while dest < dest_end { - 8009506: 2b00 cmp r3, #0 - 8009508: d007 beq.n 800951a - 800950a: 9804 ldr r0, [sp, #16] - 800950c: 000e movs r6, r1 - *dest = *src; - 800950e: 7835 ldrb r5, [r6, #0] - 8009510: 7005 strb r5, [r0, #0] - 8009512: 1c76 adds r6, r6, #1 - 8009514: 1c40 adds r0, r0, #1 - while dest < dest_end { - 8009516: 42a0 cmp r0, r4 - 8009518: d3f9 bcc.n 800950e - copy_forward_bytes(dest, src, dest_misalignment); - dest = dest.add(dest_misalignment); - src = src.add(dest_misalignment); - n -= dest_misalignment; - 800951a: 1ad2 subs r2, r2, r3 - 800951c: d349 bcc.n 80095b2 - 800951e: 18c8 adds r0, r1, r3 - 8009520: 9201 str r2, [sp, #4] - - let n_words = n & !WORD_MASK; - 8009522: 9902 ldr r1, [sp, #8] - 8009524: 438a bics r2, r1 - 8009526: 18a3 adds r3, r4, r2 - 8009528: 9003 str r0, [sp, #12] - let src_misalignment = src as usize & WORD_MASK; - if likely(src_misalignment == 0) { - 800952a: 0781 lsls r1, r0, #30 - 800952c: 9200 str r2, [sp, #0] - 800952e: d022 beq.n 8009576 - while dest_usize < dest_end { - 8009530: 2a01 cmp r2, #1 - 8009532: db27 blt.n 8009584 - 8009534: 0eca lsrs r2, r1, #27 - 8009536: 2120 movs r1, #32 - 8009538: 1a88 subs r0, r1, r2 - 800953a: 9006 str r0, [sp, #24] - let resembled = prev_word >> shift | cur_word << (WORD_SIZE * 8 - shift); - 800953c: 0685 lsls r5, r0, #26 - 800953e: d444 bmi.n 80095ca - 8009540: 9e03 ldr r6, [sp, #12] - 8009542: 9802 ldr r0, [sp, #8] - 8009544: 4386 bics r6, r0 - 8009546: 2518 movs r5, #24 - 8009548: 9806 ldr r0, [sp, #24] - 800954a: 4028 ands r0, r5 - while dest_usize < dest_end { - 800954c: 9006 str r0, [sp, #24] - 800954e: 1d35 adds r5, r6, #4 - let mut prev_word = core::intrinsics::atomic_load_unordered(src_aligned); - 8009550: 6836 ldr r6, [r6, #0] - 8009552: 9205 str r2, [sp, #20] - 8009554: 9906 ldr r1, [sp, #24] - let resembled = prev_word >> shift | cur_word << (WORD_SIZE * 8 - shift); - 8009556: 40d6 lsrs r6, r2 - let cur_word = *src_aligned; - 8009558: cd04 ldmia r5!, {r2} - let resembled = prev_word >> shift | cur_word << (WORD_SIZE * 8 - shift); - 800955a: 0010 movs r0, r2 - 800955c: 4088 lsls r0, r1 - 800955e: 4330 orrs r0, r6 - *dest_usize = resembled; - 8009560: c401 stmia r4!, {r0} - while dest_usize < dest_end { - 8009562: 429c cmp r4, r3 - 8009564: b404 push {r2} - 8009566: bc40 pop {r6} - 8009568: 9a05 ldr r2, [sp, #20] - 800956a: d3f4 bcc.n 8009556 - 800956c: e00a b.n 8009584 - 800956e: 0003 movs r3, r0 - while dest < dest_end { - 8009570: 2a01 cmp r2, #1 - 8009572: da13 bge.n 800959c - 8009574: e019 b.n 80095aa - while dest_usize < dest_end { - 8009576: 2a01 cmp r2, #1 - 8009578: db04 blt.n 8009584 - 800957a: 9903 ldr r1, [sp, #12] - *dest_usize = *src_usize; - 800957c: c901 ldmia r1!, {r0} - 800957e: c401 stmia r4!, {r0} - while dest_usize < dest_end { - 8009580: 429c cmp r4, r3 - 8009582: d3fb bcc.n 800957c - 8009584: 2000 movs r0, #0 - 8009586: 9901 ldr r1, [sp, #4] - 8009588: 9c00 ldr r4, [sp, #0] - } else { - copy_forward_misaligned_words(dest, src, n_words); - } - dest = dest.add(n_words); - src = src.add(n_words); - n -= n_words; - 800958a: 1b0a subs r2, r1, r4 - 800958c: 4140 adcs r0, r0 - 800958e: 42a1 cmp r1, r4 - 8009590: d315 bcc.n 80095be - 8009592: 9803 ldr r0, [sp, #12] - 8009594: 1901 adds r1, r0, r4 - 8009596: 9804 ldr r0, [sp, #16] - while dest < dest_end { - 8009598: 2a01 cmp r2, #1 - 800959a: db06 blt.n 80095aa - 800959c: 189c adds r4, r3, r2 - *dest = *src; - 800959e: 780a ldrb r2, [r1, #0] - 80095a0: 701a strb r2, [r3, #0] - 80095a2: 1c49 adds r1, r1, #1 - 80095a4: 1c5b adds r3, r3, #1 - while dest < dest_end { - 80095a6: 42a3 cmp r3, r4 - 80095a8: d3f9 bcc.n 800959e - } - 80095aa: b007 add sp, #28 - 80095ac: bcf0 pop {r4, r5, r6, r7} - 80095ae: bc02 pop {r1} - 80095b0: 4708 bx r1 - n -= dest_misalignment; - 80095b2: 480b ldr r0, [pc, #44] ; (80095e0 ) - 80095b4: 2121 movs r1, #33 ; 0x21 - 80095b6: 4a0c ldr r2, [pc, #48] ; (80095e8 ) - 80095b8: f7ff fd92 bl 80090e0 - 80095bc: defe udf #254 ; 0xfe - n -= n_words; - 80095be: 4808 ldr r0, [pc, #32] ; (80095e0 ) - 80095c0: 2121 movs r1, #33 ; 0x21 - 80095c2: 4a08 ldr r2, [pc, #32] ; (80095e4 ) - 80095c4: f7ff fd8c bl 80090e0 - 80095c8: defe udf #254 ; 0xfe - let resembled = prev_word >> shift | cur_word << (WORD_SIZE * 8 - shift); - 80095ca: 4803 ldr r0, [pc, #12] ; (80095d8 ) - 80095cc: 2123 movs r1, #35 ; 0x23 - 80095ce: 4a03 ldr r2, [pc, #12] ; (80095dc ) - 80095d0: f7ff fd86 bl 80090e0 - 80095d4: defe udf #254 ; 0xfe - 80095d6: 46c0 nop ; (mov r8, r8) - 80095d8: 0800e720 .word 0x0800e720 - 80095dc: 0800e7f4 .word 0x0800e7f4 - 80095e0: 0800e7c0 .word 0x0800e7c0 - 80095e4: 0800e7e4 .word 0x0800e7e4 - 80095e8: 0800e7ac .word 0x0800e7ac - -080095ec : - pub unsafe extern $abi fn $name( $($argname: $ty),* ) $(-> $ret)? { - 80095ec: b5f0 push {r4, r5, r6, r7, lr} - 80095ee: af03 add r7, sp, #12 - 80095f0: b087 sub sp, #28 - 80095f2: 1a43 subs r3, r0, r1 - - #[mem_builtin] - #[cfg_attr(not(all(target_os = "windows", target_env = "gnu")), linkage = "weak")] - pub unsafe extern "C" fn memmove(dest: *mut u8, src: *const u8, n: usize) -> *mut u8 { - let delta = (dest as usize).wrapping_sub(src as usize); - if delta >= n { - 80095f4: 4293 cmp r3, r2 - 80095f6: d245 bcs.n 8009684 - 80095f8: 188d adds r5, r1, r2 - 80095fa: 1883 adds r3, r0, r2 - } - - let mut dest = dest.add(n); - let mut src = src.add(n); - - if n >= WORD_COPY_THRESHOLD { - 80095fc: 2a0f cmp r2, #15 - 80095fe: d800 bhi.n 8009602 - 8009600: e095 b.n 800972e - 8009602: 9506 str r5, [sp, #24] - 8009604: 9004 str r0, [sp, #16] - 8009606: 2003 movs r0, #3 - 8009608: 001c movs r4, r3 - 800960a: 4384 bics r4, r0 - // Align dest - // Because of n >= 2 * WORD_SIZE, dst_misalignment < n - let dest_misalignment = dest as usize & WORD_MASK; - 800960c: 001e movs r6, r3 - 800960e: 9002 str r0, [sp, #8] - 8009610: 4006 ands r6, r0 - while dest_start < dest { - 8009612: d007 beq.n 8009624 - 8009614: 1888 adds r0, r1, r2 - 8009616: 1e40 subs r0, r0, #1 - *dest = *src; - 8009618: 7805 ldrb r5, [r0, #0] - 800961a: 1e5b subs r3, r3, #1 - 800961c: 701d strb r5, [r3, #0] - while dest_start < dest { - 800961e: 1e40 subs r0, r0, #1 - 8009620: 429c cmp r4, r3 - 8009622: d3f9 bcc.n 8009618 - copy_backward_bytes(dest, src, dest_misalignment); - dest = dest.sub(dest_misalignment); - src = src.sub(dest_misalignment); - n -= dest_misalignment; - 8009624: 1b92 subs r2, r2, r6 - 8009626: d200 bcs.n 800962a - 8009628: e0aa b.n 8009780 - 800962a: 4270 negs r0, r6 - 800962c: 9b06 ldr r3, [sp, #24] - 800962e: 1818 adds r0, r3, r0 - 8009630: 9203 str r2, [sp, #12] - 8009632: 9d02 ldr r5, [sp, #8] - - let n_words = n & !WORD_MASK; - 8009634: 43aa bics r2, r5 - 8009636: 1aa3 subs r3, r4, r2 - 8009638: 9201 str r2, [sp, #4] - 800963a: 4252 negs r2, r2 - 800963c: 9005 str r0, [sp, #20] - let src_misalignment = src as usize & WORD_MASK; - if likely(src_misalignment == 0) { - 800963e: 0780 lsls r0, r0, #30 - 8009640: 9200 str r2, [sp, #0] - 8009642: d05e beq.n 8009702 - while dest_start < dest_usize { - 8009644: 2a00 cmp r2, #0 - 8009646: d567 bpl.n 8009718 - 8009648: 0ec1 lsrs r1, r0, #27 - 800964a: 2020 movs r0, #32 - 800964c: 1a40 subs r0, r0, r1 - 800964e: 9006 str r0, [sp, #24] - let resembled = prev_word << (WORD_SIZE * 8 - shift) | cur_word >> shift; - 8009650: 0680 lsls r0, r0, #26 - 8009652: d500 bpl.n 8009656 - 8009654: e0b2 b.n 80097bc - 8009656: 000a movs r2, r1 - 8009658: 9e05 ldr r6, [sp, #20] - 800965a: 43ae bics r6, r5 - 800965c: 2018 movs r0, #24 - 800965e: 9906 ldr r1, [sp, #24] - 8009660: 4001 ands r1, r0 - while dest_start < dest_usize { - 8009662: 9106 str r1, [sp, #24] - 8009664: 1f30 subs r0, r6, #4 - let mut prev_word = core::intrinsics::atomic_load_unordered(src_aligned); - 8009666: 6836 ldr r6, [r6, #0] - let resembled = prev_word << (WORD_SIZE * 8 - shift) | cur_word >> shift; - 8009668: 9906 ldr r1, [sp, #24] - 800966a: 408e lsls r6, r1 - let cur_word = *src_aligned; - 800966c: 6801 ldr r1, [r0, #0] - let resembled = prev_word << (WORD_SIZE * 8 - shift) | cur_word >> shift; - 800966e: 000d movs r5, r1 - 8009670: 40d5 lsrs r5, r2 - 8009672: 4335 orrs r5, r6 - 8009674: 1f24 subs r4, r4, #4 - *dest_usize = resembled; - 8009676: 6025 str r5, [r4, #0] - while dest_start < dest_usize { - 8009678: 1f00 subs r0, r0, #4 - 800967a: 429c cmp r4, r3 - 800967c: b402 push {r1} - 800967e: bc40 pop {r6} - 8009680: d8f2 bhi.n 8009668 - 8009682: e049 b.n 8009718 - if n >= WORD_COPY_THRESHOLD { - 8009684: 2a0f cmp r2, #15 - 8009686: d938 bls.n 80096fa - 8009688: 4243 negs r3, r0 - 800968a: 2403 movs r4, #3 - 800968c: 9402 str r4, [sp, #8] - let dest_misalignment = (dest as usize).wrapping_neg() & WORD_MASK; - 800968e: 4023 ands r3, r4 - 8009690: 9004 str r0, [sp, #16] - 8009692: 18c4 adds r4, r0, r3 - while dest < dest_end { - 8009694: 2b00 cmp r3, #0 - 8009696: d007 beq.n 80096a8 - 8009698: 9804 ldr r0, [sp, #16] - 800969a: 000e movs r6, r1 - *dest = *src; - 800969c: 7835 ldrb r5, [r6, #0] - 800969e: 7005 strb r5, [r0, #0] - 80096a0: 1c76 adds r6, r6, #1 - 80096a2: 1c40 adds r0, r0, #1 - while dest < dest_end { - 80096a4: 42a0 cmp r0, r4 - 80096a6: d3f9 bcc.n 800969c - n -= dest_misalignment; - 80096a8: 1ad2 subs r2, r2, r3 - 80096aa: d36f bcc.n 800978c - 80096ac: 18c8 adds r0, r1, r3 - 80096ae: 9201 str r2, [sp, #4] - 80096b0: 9e02 ldr r6, [sp, #8] - let n_words = n & !WORD_MASK; - 80096b2: 43b2 bics r2, r6 - 80096b4: 18a3 adds r3, r4, r2 - 80096b6: 9003 str r0, [sp, #12] - if likely(src_misalignment == 0) { - 80096b8: 0780 lsls r0, r0, #30 - 80096ba: 9200 str r2, [sp, #0] - 80096bc: d042 beq.n 8009744 - while dest_usize < dest_end { - 80096be: 2a01 cmp r2, #1 - 80096c0: db47 blt.n 8009752 - 80096c2: 0ec2 lsrs r2, r0, #27 - 80096c4: 2020 movs r0, #32 - 80096c6: 1a80 subs r0, r0, r2 - 80096c8: 9006 str r0, [sp, #24] - let resembled = prev_word >> shift | cur_word << (WORD_SIZE * 8 - shift); - 80096ca: 0680 lsls r0, r0, #26 - 80096cc: d470 bmi.n 80097b0 - 80096ce: 9d03 ldr r5, [sp, #12] - 80096d0: 43b5 bics r5, r6 - 80096d2: 2018 movs r0, #24 - 80096d4: 9906 ldr r1, [sp, #24] - 80096d6: 4001 ands r1, r0 - while dest_usize < dest_end { - 80096d8: 9106 str r1, [sp, #24] - 80096da: 1d28 adds r0, r5, #4 - let mut prev_word = core::intrinsics::atomic_load_unordered(src_aligned); - 80096dc: 682d ldr r5, [r5, #0] - 80096de: 9205 str r2, [sp, #20] - 80096e0: 9906 ldr r1, [sp, #24] - let resembled = prev_word >> shift | cur_word << (WORD_SIZE * 8 - shift); - 80096e2: 40d5 lsrs r5, r2 - let cur_word = *src_aligned; - 80096e4: c804 ldmia r0!, {r2} - let resembled = prev_word >> shift | cur_word << (WORD_SIZE * 8 - shift); - 80096e6: 0016 movs r6, r2 - 80096e8: 408e lsls r6, r1 - 80096ea: 432e orrs r6, r5 - *dest_usize = resembled; - 80096ec: c440 stmia r4!, {r6} - while dest_usize < dest_end { - 80096ee: 429c cmp r4, r3 - 80096f0: b404 push {r2} - 80096f2: bc20 pop {r5} - 80096f4: 9a05 ldr r2, [sp, #20] - 80096f6: d3f4 bcc.n 80096e2 - 80096f8: e02b b.n 8009752 - 80096fa: 0003 movs r3, r0 - while dest < dest_end { - 80096fc: 2a01 cmp r2, #1 - 80096fe: da34 bge.n 800976a - 8009700: e03a b.n 8009778 - while dest_start < dest_usize { - 8009702: 2a00 cmp r2, #0 - 8009704: d508 bpl.n 8009718 - 8009706: 9803 ldr r0, [sp, #12] - 8009708: 1840 adds r0, r0, r1 - 800970a: 1f00 subs r0, r0, #4 - *dest_usize = *src_usize; - 800970c: 6801 ldr r1, [r0, #0] - 800970e: 1f24 subs r4, r4, #4 - 8009710: 6021 str r1, [r4, #0] - while dest_start < dest_usize { - 8009712: 1f00 subs r0, r0, #4 - 8009714: 429c cmp r4, r3 - 8009716: d8f9 bhi.n 800970c - 8009718: 2000 movs r0, #0 - 800971a: 9903 ldr r1, [sp, #12] - 800971c: 9c01 ldr r4, [sp, #4] - } else { - copy_backward_misaligned_words(dest, src, n_words); - } - dest = dest.sub(n_words); - src = src.sub(n_words); - n -= n_words; - 800971e: 1b0a subs r2, r1, r4 - 8009720: 4140 adcs r0, r0 - 8009722: 42a1 cmp r1, r4 - 8009724: d338 bcc.n 8009798 - 8009726: 9805 ldr r0, [sp, #20] - 8009728: 9900 ldr r1, [sp, #0] - 800972a: 1845 adds r5, r0, r1 - 800972c: 9804 ldr r0, [sp, #16] - intrinsics::wrapping_sub(self, rhs) - 800972e: 4251 negs r1, r2 - while dest_start < dest { - 8009730: d522 bpl.n 8009778 - 8009732: 1a9c subs r4, r3, r2 - 8009734: 1e69 subs r1, r5, #1 - *dest = *src; - 8009736: 780a ldrb r2, [r1, #0] - 8009738: 1e5b subs r3, r3, #1 - 800973a: 701a strb r2, [r3, #0] - while dest_start < dest { - 800973c: 1e49 subs r1, r1, #1 - 800973e: 429c cmp r4, r3 - 8009740: d3f9 bcc.n 8009736 - 8009742: e019 b.n 8009778 - while dest_usize < dest_end { - 8009744: 2a01 cmp r2, #1 - 8009746: db04 blt.n 8009752 - 8009748: 9803 ldr r0, [sp, #12] - *dest_usize = *src_usize; - 800974a: c802 ldmia r0!, {r1} - 800974c: c402 stmia r4!, {r1} - while dest_usize < dest_end { - 800974e: 429c cmp r4, r3 - 8009750: d3fb bcc.n 800974a - 8009752: 2000 movs r0, #0 - 8009754: 9901 ldr r1, [sp, #4] - 8009756: 9c00 ldr r4, [sp, #0] - n -= n_words; - 8009758: 1b0a subs r2, r1, r4 - 800975a: 4140 adcs r0, r0 - 800975c: 42a1 cmp r1, r4 - 800975e: d321 bcc.n 80097a4 - 8009760: 9803 ldr r0, [sp, #12] - 8009762: 1901 adds r1, r0, r4 - 8009764: 9804 ldr r0, [sp, #16] - while dest < dest_end { - 8009766: 2a01 cmp r2, #1 - 8009768: db06 blt.n 8009778 - 800976a: 189c adds r4, r3, r2 - *dest = *src; - 800976c: 780a ldrb r2, [r1, #0] - 800976e: 701a strb r2, [r3, #0] - 8009770: 1c49 adds r1, r1, #1 - 8009772: 1c5b adds r3, r3, #1 - while dest < dest_end { - 8009774: 42a3 cmp r3, r4 - 8009776: d3f9 bcc.n 800976c - } - 8009778: b007 add sp, #28 - 800977a: bcf0 pop {r4, r5, r6, r7} - 800977c: bc02 pop {r1} - 800977e: 4708 bx r1 - n -= dest_misalignment; - 8009780: 4813 ldr r0, [pc, #76] ; (80097d0 ) - 8009782: 2121 movs r1, #33 ; 0x21 - 8009784: 4a17 ldr r2, [pc, #92] ; (80097e4 ) - 8009786: f7ff fcab bl 80090e0 - 800978a: defe udf #254 ; 0xfe - n -= dest_misalignment; - 800978c: 4810 ldr r0, [pc, #64] ; (80097d0 ) - 800978e: 2121 movs r1, #33 ; 0x21 - 8009790: 4a11 ldr r2, [pc, #68] ; (80097d8 ) - 8009792: f7ff fca5 bl 80090e0 - 8009796: defe udf #254 ; 0xfe - n -= n_words; - 8009798: 480d ldr r0, [pc, #52] ; (80097d0 ) - 800979a: 2121 movs r1, #33 ; 0x21 - 800979c: 4a10 ldr r2, [pc, #64] ; (80097e0 ) - 800979e: f7ff fc9f bl 80090e0 - 80097a2: defe udf #254 ; 0xfe - n -= n_words; - 80097a4: 480a ldr r0, [pc, #40] ; (80097d0 ) - 80097a6: 2121 movs r1, #33 ; 0x21 - 80097a8: 4a0a ldr r2, [pc, #40] ; (80097d4 ) - 80097aa: f7ff fc99 bl 80090e0 - 80097ae: defe udf #254 ; 0xfe - let resembled = prev_word >> shift | cur_word << (WORD_SIZE * 8 - shift); - 80097b0: 4805 ldr r0, [pc, #20] ; (80097c8 ) - 80097b2: 2123 movs r1, #35 ; 0x23 - 80097b4: 4a05 ldr r2, [pc, #20] ; (80097cc ) - 80097b6: f7ff fc93 bl 80090e0 - 80097ba: defe udf #254 ; 0xfe - let resembled = prev_word << (WORD_SIZE * 8 - shift) | cur_word >> shift; - 80097bc: 4802 ldr r0, [pc, #8] ; (80097c8 ) - 80097be: 2123 movs r1, #35 ; 0x23 - 80097c0: 4a06 ldr r2, [pc, #24] ; (80097dc ) - 80097c2: f7ff fc8d bl 80090e0 - 80097c6: defe udf #254 ; 0xfe - 80097c8: 0800e720 .word 0x0800e720 - 80097cc: 0800e7f4 .word 0x0800e7f4 - 80097d0: 0800e7c0 .word 0x0800e7c0 - 80097d4: 0800e7e4 .word 0x0800e7e4 - 80097d8: 0800e7ac .word 0x0800e7ac - 80097dc: 0800e824 .word 0x0800e824 - 80097e0: 0800e814 .word 0x0800e814 - 80097e4: 0800e804 .word 0x0800e804 - -080097e8 : - pub unsafe extern $abi fn $name( $($argname: $ty),* ) $(-> $ret)? { - 80097e8: b5f0 push {r4, r5, r6, r7, lr} - 80097ea: af03 add r7, sp, #12 - 80097ec: b081 sub sp, #4 - *s_usize = broadcast; - s_usize = s_usize.add(1); - } - } - - if likely(n >= WORD_COPY_THRESHOLD) { - 80097ee: 2a0f cmp r2, #15 - 80097f0: d922 bls.n 8009838 - 80097f2: 4245 negs r5, r0 - 80097f4: 2303 movs r3, #3 - // Align s - // Because of n >= 2 * WORD_SIZE, dst_misalignment < n - let misalignment = (s as usize).wrapping_neg() & WORD_MASK; - 80097f6: 401d ands r5, r3 - 80097f8: 1944 adds r4, r0, r5 - while s < end { - 80097fa: 2d00 cmp r5, #0 - 80097fc: d004 beq.n 8009808 - 80097fe: 0006 movs r6, r0 - *s = c; - 8009800: 7031 strb r1, [r6, #0] - 8009802: 1c76 adds r6, r6, #1 - while s < end { - 8009804: 42a6 cmp r6, r4 - 8009806: d3fb bcc.n 8009800 - 8009808: 9000 str r0, [sp, #0] - set_bytes_bytes(s, c, misalignment); - s = s.add(misalignment); - n -= misalignment; - 800980a: 1b50 subs r0, r2, r5 - 800980c: d320 bcc.n 8009850 - - let n_words = n & !WORD_MASK; - 800980e: 0006 movs r6, r0 - 8009810: 439e bics r6, r3 - 8009812: 19a3 adds r3, r4, r6 - while s_usize < end { - 8009814: 2e01 cmp r6, #1 - 8009816: db06 blt.n 8009826 - 8009818: 25ff movs r5, #255 ; 0xff - 800981a: 400d ands r5, r1 - 800981c: 4a12 ldr r2, [pc, #72] ; (8009868 ) - 800981e: 436a muls r2, r5 - *s_usize = broadcast; - 8009820: c404 stmia r4!, {r2} - while s_usize < end { - 8009822: 429c cmp r4, r3 - 8009824: d3fc bcc.n 8009820 - 8009826: 2400 movs r4, #0 - set_bytes_words(s, c, n_words); - s = s.add(n_words); - n -= n_words; - 8009828: 1b82 subs r2, r0, r6 - 800982a: 4164 adcs r4, r4 - 800982c: 42b0 cmp r0, r6 - 800982e: d315 bcc.n 800985c - 8009830: 9800 ldr r0, [sp, #0] - while s < end { - 8009832: 2a01 cmp r2, #1 - 8009834: da03 bge.n 800983e - 8009836: e007 b.n 8009848 - 8009838: 0003 movs r3, r0 - 800983a: 2a01 cmp r2, #1 - 800983c: db04 blt.n 8009848 - 800983e: 189a adds r2, r3, r2 - *s = c; - 8009840: 7019 strb r1, [r3, #0] - 8009842: 1c5b adds r3, r3, #1 - while s < end { - 8009844: 4293 cmp r3, r2 - 8009846: d3fb bcc.n 8009840 - } - 8009848: b001 add sp, #4 - 800984a: bcf0 pop {r4, r5, r6, r7} - 800984c: bc02 pop {r1} - 800984e: 4708 bx r1 - n -= misalignment; - 8009850: 4806 ldr r0, [pc, #24] ; (800986c ) - 8009852: 2121 movs r1, #33 ; 0x21 - 8009854: 4a07 ldr r2, [pc, #28] ; (8009874 ) - 8009856: f7ff fc43 bl 80090e0 - 800985a: defe udf #254 ; 0xfe - n -= n_words; - 800985c: 4803 ldr r0, [pc, #12] ; (800986c ) - 800985e: 2121 movs r1, #33 ; 0x21 - 8009860: 4a03 ldr r2, [pc, #12] ; (8009870 ) - 8009862: f7ff fc3d bl 80090e0 - 8009866: defe udf #254 ; 0xfe - 8009868: 01010101 .word 0x01010101 - 800986c: 0800e7c0 .word 0x0800e7c0 - 8009870: 0800e844 .word 0x0800e844 - 8009874: 0800e834 .word 0x0800e834 - -Disassembly of section .iwram: - -03000000 : - .arm - .global InterruptHandler - .section .iwram, "ax" - .align -InterruptHandler: - mov r2, #0x04000000 @ interrupt enable register location - 3000000: e3a02301 mov r2, #67108864 ; 0x4000000 - add r2, #0x200 - 3000004: e2822c02 add r2, r2, #512 ; 0x200 - - mov r1, #0 - 3000008: e3a01000 mov r1, #0 - strh r1, [r2, #8] - 300000c: e1c210b8 strh r1, [r2, #8] - - ldrh r1, [r2] @ load 16 bit interrupt enable to r1 - 3000010: e1d210b0 ldrh r1, [r2] - ldrh r3, [r2, #2] @ load 16 bit interrupt request to r3 - 3000014: e1d230b2 ldrh r3, [r2, #2] - and r0, r1, r3 @ interrupts both enabled and requested - 3000018: e0010003 and r0, r1, r3 - - ldr r1, [sp, #20] - 300001c: e59d1014 ldr r1, [sp, #20] - ldr r3, =agb_rs__program_counter - 3000020: e59f304c ldr r3, [pc, #76] ; 3000074 - str r1, [r3] - 3000024: e5831000 str r1, [r3] - - @ change to system mode - mrs r1, cpsr - 3000028: e10f1000 mrs r1, CPSR - orr r1, r1, #0xD - 300002c: e381100d orr r1, r1, #13 - msr cpsr_c, r1 - 3000030: e121f001 msr CPSR_c, r1 - - @ call the rust interrupt handler with r0 set to the triggered interrupts - ldr r1, =__RUST_INTERRUPT_HANDLER - 3000034: e59f103c ldr r1, [pc, #60] ; 3000078 - push {r2, lr} - 3000038: e92d4004 push {r2, lr} - mov lr, pc - 300003c: e1a0e00f mov lr, pc - bx r1 - 3000040: e12fff11 bx r1 - pop {r2, lr} - 3000044: e8bd4004 pop {r2, lr} - - @ change back to interrupt mode - mrs r1, cpsr - 3000048: e10f1000 mrs r1, CPSR - bic r1, r1, #0xD - 300004c: e3c1100d bic r1, r1, #13 - msr cpsr_c, r1 - 3000050: e121f001 msr CPSR_c, r1 - - mov r1, #1 - 3000054: e3a01001 mov r1, #1 - strh r1, [r2, #8] - 3000058: e1c210b8 strh r1, [r2, #8] - - strh r0, [r2, #2] @ store to interrupt request - 300005c: e1c200b2 strh r0, [r2, #2] - - ldr r2, =0x03007FF8 @ load bios interrupt request location - 3000060: e59f2014 ldr r2, [pc, #20] ; 300007c - ldrh r1, [r2] @ load bios interrupt requests - 3000064: e1d210b0 ldrh r1, [r2] - orr r1, r1, r0 @ or with enabled and requested interrupts - 3000068: e1811000 orr r1, r1, r0 - strh r1, [r2] @ acknowlege bios requests - 300006c: e1c210b0 strh r1, [r2] - - bx lr @ return to bios - 3000070: e12fff1e bx lr - ldr r3, =agb_rs__program_counter - 3000074: 03000080 .word 0x03000080 - ldr r1, =__RUST_INTERRUPT_HANDLER - 3000078: 08002cd5 .word 0x08002cd5 - ldr r2, =0x03007FF8 @ load bios interrupt request location - 300007c: 03007ff8 .word 0x03007ff8 - -03000080 : - 3000080: 00000000 .word 0x00000000