function: fact (entry: bb_0x2010)

loops: 1 (0 with a derived trip count; max nesting depth 1)
  iters = executions of a block per single call of fact (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.
  R1  recursion  header bb_0x2010  latch bb_0x2022  depth 1  blocks 2  trips ?  (recursive call, not an iteration — depth is not statically bounded here)

[fact_0x2010] 0x2010-0x201e  (entry, loop-header R1, recursion, iters=?)
source: recursion_extern.c:8:9;
  push {r7, lr}
  sub sp, #8
  add r7, sp, #0
  str r0, [r7, #4]
  ldr r3, [r7, #4]
  cmp r3, #1
  bhi #0x2022
  -> bb_0x201e (ls=fallthrough), bb_0x2022 (hi=taken)

[fact_0x201e] 0x201e-0x2022
source: recursion_extern.c:10:10;
  movs r3, #1
  b #0x2032
  -> bb_0x2032

[fact_0x2022] 0x2022-0x202c  (in R1, iters=?)
source: recursion_extern.c:11:11;
  ldr r3, [r7, #4]
  subs r3, #1
  movs r0, r3
  bl #0x2010
  -> bb_0x2010 (back-edge, loop R1)

[fact_0x202c] 0x202c-0x2032
source: recursion_extern.c:11:11;
  movs r2, r0
  ldr r3, [r7, #4]
  muls r3, r2, r3
  -> bb_0x2032

[fact_0x2032] 0x2032-0x203a  (exit)
source: recursion_extern.c:12:12;
  movs r0, r3
  mov sp, r7
  add sp, #8
  pop {r7, pc}

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

function: irreducible (entry: bb_0x203a)

cycles: 1 backward edge(s) that are not natural loops — bb_0x205a -> bb_0x204c. Multi-entry/irreducible: no trip count is derivable, and blocks on them can run more often than iters says.

[irreducible_0x203a] 0x203a-0x204c  (entry)
source: recursion_extern.c:15:18;
  push {r7, lr}
  sub sp, #8
  add r7, sp, #0
  movs r3, #0
  str r3, [r7, #4]
  ldr r3, [pc, #0x28]
  ldr r3, [r3]
  cmp r3, #0
  bne #0x2058
  -> bb_0x204c (eq=fallthrough), bb_0x2058 (ne=taken)

[irreducible_0x204c] 0x204c-0x2058
source: recursion_extern.c:21:21;
  ldr r3, [pc, #0x20]
  ldr r3, [r3]
  adds r2, r3, #1
  ldr r3, [pc, #0x1c]
  str r2, [r3]
  b #0x205a
  -> bb_0x205a

[irreducible_0x2058] 0x2058-0x205a
source: recursion_extern.c:19:19;
  mov r8, r8
  -> bb_0x205a

[irreducible_0x205a] 0x205a-0x2066
source: recursion_extern.c:23:24;
  ldr r3, [r7, #4]
  adds r3, #1
  str r3, [r7, #4]
  ldr r3, [r7, #4]
  cmp r3, #3
  ble #0x204c
  -> bb_0x204c (le=taken, backward-edge, irreducible), bb_0x2066 (gt=fallthrough)

[irreducible_0x2066] 0x2066-0x2070  (exit)
source: recursion_extern.c:25:27;
  mov r8, r8
  mov r8, r8
  mov sp, r7
  add sp, #8
  pop {r7, pc}

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

function: kernel_main (entry: bb_0x2074)

[kernel_main_0x2074] 0x2074-0x207e  (entry)
source: recursion_extern.c:30:31;
  push {r7, lr}
  add r7, sp, #0
  movs r0, #5
  bl #0x2010
  -> bb_0x207e

[kernel_main_0x207e] 0x207e-0x2088
source: recursion_extern.c:31:32;
  movs r2, r0
  ldr r3, [pc, #0x1c]
  str r2, [r3]
  bl #0x203a
  -> bb_0x2088

[kernel_main_0x2088] 0x2088-0x208e
source: recursion_extern.c:33:33;
  movs r0, #3
  bl #0
  -> bb_0x208e

[kernel_main_0x208e] 0x208e-0x20a0  (exit)
source: recursion_extern.c:33:34;
  movs r2, r0
  ldr r3, [pc, #0xc]
  ldr r3, [r3]
  adds r2, r2, r3
  ldr r3, [pc, #8]
  str r2, [r3]
  mov r8, r8
  mov sp, r7
  pop {r7, pc}
