.include "macros.inc"
.section .text, "ax"
.global TRKDoNotifyStopped
TRKDoNotifyStopped:
mflr r0
stw r0, 4(r1)
stwu r1, -0x20(r1)
stw r31, 0x1c(r1)
addi r4, r1, 0xc
stw r30, 0x18(r1)
addi r30, r3, 0
addi r3, r1, 8
bl TRKGetFreeBuffer
or. r31, r3, r3
bne lbl_8008A320
lwz r5, 0xc(r1)
lwz r3, 0xc(r5)
cmplwi r3, 0x880
blt lbl_8008A2A8
li r4, 0x301
b lbl_8008A2C8
lbl_8008A2A8:
addi r0, r3, 1
add r3, r5, r3
stw r0, 0xc(r5)
li r4, 0
stb r30, 0x10(r3)
lwz r3, 8(r5)
addi r0, r3, 1
stw r0, 8(r5)
lbl_8008A2C8:
cmpwi r4, 0
bne lbl_8008A2F0
clrlwi r0, r30, 0x18
cmplwi r0, 0x90
bne lbl_8008A2E8
lwz r3, 0xc(r1)
bl TRKTargetAddStopInfo
b lbl_8008A2F0
lbl_8008A2E8:
lwz r3, 0xc(r1)
bl TRKTargetAddExceptionInfo
lbl_8008A2F0:
lwz r3, 0xc(r1)
addi r4, r1, 0x10
li r5, 2
li r6, 3
li r7, 1
bl TRKRequestSend
or. r31, r3, r3
bne lbl_8008A318
lwz r3, 0x10(r1)
bl TRKReleaseBuffer
lbl_8008A318:
lwz r3, 8(r1)
bl TRKReleaseBuffer
lbl_8008A320:
mr r3, r31
lwz r31, 0x1c(r1)
lwz r30, 0x18(r1)
addi r1, r1, 0x20
lwz r0, 4(r1)
mtlr r0
blr