function: simple_const_loop (entry: bb_0x2010)

loops: 1 (1 with a derived trip count; max nesting depth 1)
  iters = executions of a block per single call of simple_const_loop (product of enclosing trip counts);
  ? = not derivable from the code — treat that block's cost as per-iteration, not per-call.
  A block with no iters annotation is in no loop and runs once per call.
  L1  loop  header bb_0x202e  latch bb_0x2020  depth 1  blocks 2  trips 16 exact  (init r3=0 @bb_0x2010; step +1 (adds r3, #1 @bb_0x2020); limit 15 (cmp r3, #0xf @bb_0x202e); continue on le)

[simple_const_loop_0x2010] 0x2010-0x2020  (entry)
source: loop_shapes.c:6:10;
  push {r7, lr}
  sub sp, #8
  add r7, sp, #0
  movs r3, #0
  str r3, [r7, #4]
  movs r3, #0
  str r3, [r7]
  b #0x202e
  -> bb_0x202e

[simple_const_loop_0x2020] 0x2020-0x202e  (in L1, iters=16)
source: loop_shapes.c:10:11;
  ldr r3, [r7]
  ldr r2, [r7, #4]
  adds r3, r2, r3
  str r3, [r7, #4]
  ldr r3, [r7]
  adds r3, #1
  str r3, [r7]
  -> bb_0x202e (back-edge, loop L1)

[simple_const_loop_0x202e] 0x202e-0x2034  (loop-header L1, trips=16, iters=16)
source: loop_shapes.c:10:10;
  ldr r3, [r7]
  cmp r3, #0xf
  ble #0x2020
  -> bb_0x2020 (le=taken), bb_0x2034 (gt=fallthrough)

[simple_const_loop_0x2034] 0x2034-0x2042  (exit)
source: loop_shapes.c:12:13;
  ldr r3, [pc, #0xc]
  ldr r2, [r7, #4]
  str r2, [r3]
  mov r8, r8
  mov sp, r7
  add sp, #8
  pop {r7, pc}

[simple_const_loop_0x2042] 0x2042-0x2044  (exit)
source: loop_shapes.c:13:13;
  mov r8, r8

------------------------------------------------------------

function: nested_const_loop (entry: bb_0x2048)

loops: 2 (1 with a derived trip count; max nesting depth 2)
  iters = executions of a block per single call of nested_const_loop (product of enclosing trip counts);
  ? = not derivable from the code — treat that block's cost as per-iteration, not per-call.
  A block with no iters annotation is in no loop and runs once per call.
  L1  loop  header bb_0x2072  latch bb_0x205e  depth 2  in L2  blocks 2  trips 4 exact  (init r3=0 @bb_0x2058; step +1 (adds r3, #1 @bb_0x205e); limit 3 (cmp r3, #3 @bb_0x2072); continue on le)
  L2  loop  header bb_0x207e  latch bb_0x2078  depth 1  blocks 5  trips ?  (no single induction step for r3)

[nested_const_loop_0x2048] 0x2048-0x2058  (entry)
source: loop_shapes.c:16:20;
  push {r7, lr}
  sub sp, #0x10
  add r7, sp, #0
  movs r3, #0
  str r3, [r7, #0xc]
  movs r3, #0
  str r3, [r7, #8]
  b #0x207e
  -> bb_0x207e

[nested_const_loop_0x2058] 0x2058-0x205e  (in L2, iters=?)
source: loop_shapes.c:21:21;
  movs r3, #0
  str r3, [r7, #4]
  b #0x2072
  -> bb_0x2072

[nested_const_loop_0x205e] 0x205e-0x2072  (in L1, iters=?)
source: loop_shapes.c:21:22;
  ldr r3, [r7, #8]
  ldr r2, [r7, #4]
  muls r3, r2, r3
  movs r2, r3
  ldr r3, [r7, #0xc]
  adds r3, r3, r2
  str r3, [r7, #0xc]
  ldr r3, [r7, #4]
  adds r3, #1
  str r3, [r7, #4]
  -> bb_0x2072 (back-edge, loop L1)

[nested_const_loop_0x2072] 0x2072-0x2078  (loop-header L1, trips=4, in L2, iters=?)
source: loop_shapes.c:21:21;
  ldr r3, [r7, #4]
  cmp r3, #3
  ble #0x205e
  -> bb_0x205e (le=taken), bb_0x2078 (gt=fallthrough)

[nested_const_loop_0x2078] 0x2078-0x207e  (in L2, iters=?)
source: loop_shapes.c:20:20;
  ldr r3, [r7, #8]
  adds r3, #1
  str r3, [r7, #8]
  -> bb_0x207e (back-edge, loop L2)

[nested_const_loop_0x207e] 0x207e-0x2084  (loop-header L2, trips=?, iters=?)
source: loop_shapes.c:20:20;
  ldr r3, [r7, #8]
  cmp r3, #7
  ble #0x2058
  -> bb_0x2058 (le=taken), bb_0x2084 (gt=fallthrough)

[nested_const_loop_0x2084] 0x2084-0x2092  (exit)
source: loop_shapes.c:23:24;
  ldr r3, [pc, #0xc]
  ldr r2, [r7, #0xc]
  str r2, [r3]
  mov r8, r8
  mov sp, r7
  add sp, #0x10
  pop {r7, pc}

[nested_const_loop_0x2092] 0x2092-0x2094  (exit)
source: loop_shapes.c:24:24;
  mov r8, r8

------------------------------------------------------------

function: loop_with_break (entry: bb_0x2098)

loops: 1 (1 with a derived trip count; max nesting depth 1)
  iters = executions of a block per single call of loop_with_break (product of enclosing trip counts);
  ? = not derivable from the code — treat that block's cost as per-iteration, not per-call.
  A block with no iters annotation is in no loop and runs once per call.
  L1  loop  header bb_0x20c0  latch bb_0x20ba  depth 1  blocks 3  trips <=16  (init r3=0 @bb_0x2098; step +1 (adds r3, #1 @bb_0x20ba); limit 15 (cmp r3, #0xf @bb_0x20c0); continue on le; 2 exit tests — this bounds the loop from above)

[loop_with_break_0x2098] 0x2098-0x20a8  (entry)
source: loop_shapes.c:27:31;
  push {r7, lr}
  sub sp, #8
  add r7, sp, #0
  movs r3, #0
  str r3, [r7, #4]
  movs r3, #0
  str r3, [r7]
  b #0x20c0
  -> bb_0x20c0

[loop_with_break_0x20a8] 0x20a8-0x20ba  (in L1, iters<=16)
source: loop_shapes.c:32:33;
  ldr r3, [r7]
  ldr r2, [r7, #4]
  adds r3, r2, r3
  str r3, [r7, #4]
  ldr r3, [pc, #0x24]
  ldr r2, [r3]
  ldr r3, [r7]
  cmp r2, r3
  beq #0x20c8
  -> bb_0x20ba (ne=fallthrough), bb_0x20c8 (eq=taken)

[loop_with_break_0x20ba] 0x20ba-0x20c0  (in L1, iters<=16)
source: loop_shapes.c:31:31;
  ldr r3, [r7]
  adds r3, #1
  str r3, [r7]
  -> bb_0x20c0 (back-edge, loop L1)

[loop_with_break_0x20c0] 0x20c0-0x20c6  (loop-header L1, trips<=16, iters<=16)
source: loop_shapes.c:31:31;
  ldr r3, [r7]
  cmp r3, #0xf
  ble #0x20a8
  -> bb_0x20a8 (le=taken), bb_0x20c6 (gt=fallthrough)

[loop_with_break_0x20c6] 0x20c6-0x20c8
source: loop_shapes.c:31:31;
  b #0x20ca
  -> bb_0x20ca

[loop_with_break_0x20c8] 0x20c8-0x20ca
source: loop_shapes.c:34:34;
  mov r8, r8
  -> bb_0x20ca

[loop_with_break_0x20ca] 0x20ca-0x20d8  (exit)
source: loop_shapes.c:36:37;
  ldr r3, [pc, #0xc]
  ldr r2, [r7, #4]
  str r2, [r3]
  mov r8, r8
  mov sp, r7
  add sp, #8
  pop {r7, pc}
