#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef size_t uint16_t;
typedef int /*<<< orphan*/ msg_to_callsign;
typedef int /*<<< orphan*/ msg_from_callsign;
typedef int /*<<< orphan*/ msg;
typedef int /*<<< orphan*/ ackpart;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, ...);
int /*<<< orphan*/ strncpy(char *, char *, int);
void aprs_processreceivedline(char *line, uint16_t line_length) {
  char msg_from_callsign[10] = {
      0,
  };
  char msg_to_callsign[10] = {
      0,
  };
  char msg[100] = {
      0,
  };
  char ackpart[6] = {
      0,
  };
  uint16_t i, j;
  i = 0;
  while (line[i] != '>' && i < line_length)
    i++;
  strncpy(msg_from_callsign, line,
          (((sizeof(msg_from_callsign)) < (i)) ? (sizeof(msg_from_callsign))
                                               : (i)));
  while (line[i] != ':' && i < line_length)
    i++;
  if (i + 1 < line_length && line[i + 1] == ':') {
    i += 2;
    j = 0;
    while (line[i + j] != ':' && line[i + j] != ' ' && i + j < line_length)
      j++;
    strncpy(
        msg_to_callsign, line + i,
        (((sizeof(msg_to_callsign)) < (j)) ? (sizeof(msg_to_callsign)) : (j)));
    while (line[i] != ':' && i < line_length)
      i++;
    i++;
    j = 0;
    while (line[i + j] != '\n' && line[i + j] != 0 && line[i + j] != '{' &&
           i + j < line_length)
      j++;
    strncpy(msg, line + i, (((sizeof(msg)) < (j)) ? (sizeof(msg)) : (j)));
    i += j;
    j = 0;
    while (line[i + j] != '\n' && line[i + j] != 0 && line[i + j] != '}' &&
           i + j < line_length)
      j++;
    strncpy(ackpart, line + i + 1,
            (((sizeof(ackpart)) < (j - 1)) ? (sizeof(ackpart)) : (j - 1)));
    if (msg_from_callsign[0] != 0 && msg_to_callsign[0] != 0 && msg[0] != 0) {
      printf("aprs: message from %s to %s: %s\n", msg_from_callsign,
             msg_to_callsign, msg);
      if (*ackpart)
        printf("  ack part: %s\n", ackpart);
    }
  }
}


x86 assembly (clang, -O0):
<aprs_processreceivedline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1a(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <memset@plt>
lea    -0x24(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <memset@plt>
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1050 <memset@plt>
lea    -0x96(%rbp),%rdi
xor    %esi,%esi
mov    $0x6,%edx
call   1050 <memset@plt>
movq   $0x0,-0xa0(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xa0(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x3e,%ecx
mov    %al,-0xa9(%rbp)
je     11c8 <aprs_processreceivedline+0x98>
mov    -0xa0(%rbp),%rax
cmp    -0x10(%rbp),%rax
setb   %al
mov    %al,-0xa9(%rbp)
mov    -0xa9(%rbp),%al
test   $0x1,%al
jne    11db <aprs_processreceivedline+0xab>
jmp    11f2 <aprs_processreceivedline+0xc2>
mov    -0xa0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xa0(%rbp)
jmp    1194 <aprs_processreceivedline+0x64>
lea    -0x1a(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    $0xa,%eax
cmp    -0xa0(%rbp),%rax
jae    122b <aprs_processreceivedline+0xfb>
mov    $0xa,%eax
mov    %rax,-0xc8(%rbp)
jmp    1239 <aprs_processreceivedline+0x109>
mov    -0xa0(%rbp),%rax
mov    %rax,-0xc8(%rbp)
mov    -0xb8(%rbp),%rsi
mov    -0xc0(%rbp),%rdi
mov    -0xc8(%rbp),%rax
mov    %eax,%edx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
mov    -0xa0(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x3a,%ecx
mov    %al,-0xc9(%rbp)
je     1289 <aprs_processreceivedline+0x159>
mov    -0xa0(%rbp),%rax
cmp    -0x10(%rbp),%rax
setb   %al
mov    %al,-0xc9(%rbp)
mov    -0xc9(%rbp),%al
test   $0x1,%al
jne    129c <aprs_processreceivedline+0x16c>
jmp    12b3 <aprs_processreceivedline+0x183>
mov    -0xa0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xa0(%rbp)
jmp    1255 <aprs_processreceivedline+0x125>
mov    -0xa0(%rbp),%rax
add    $0x1,%rax
cmp    -0x10(%rbp),%rax
jae    1766 <aprs_processreceivedline+0x636>
mov    -0x8(%rbp),%rax
mov    -0xa0(%rbp),%rcx
movsbl 0x1(%rax,%rcx,1),%eax
cmp    $0x3a,%eax
jne    1766 <aprs_processreceivedline+0x636>
mov    -0xa0(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0xa0(%rbp)
movq   $0x0,-0xa8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xa0(%rbp),%rcx
add    -0xa8(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x3a,%ecx
mov    %al,-0xca(%rbp)
je     1367 <aprs_processreceivedline+0x237>
mov    -0x8(%rbp),%rax
mov    -0xa0(%rbp),%rcx
add    -0xa8(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0xca(%rbp)
je     1367 <aprs_processreceivedline+0x237>
mov    -0xa0(%rbp),%rax
add    -0xa8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setb   %al
mov    %al,-0xca(%rbp)
mov    -0xca(%rbp),%al
test   $0x1,%al
jne    137a <aprs_processreceivedline+0x24a>
jmp    1391 <aprs_processreceivedline+0x261>
mov    -0xa8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xa8(%rbp)
jmp    12fe <aprs_processreceivedline+0x1ce>
lea    -0x24(%rbp),%rax
mov    %rax,-0xe0(%rbp)
mov    -0x8(%rbp),%rax
add    -0xa0(%rbp),%rax
mov    %rax,-0xd8(%rbp)
mov    $0xa,%eax
cmp    -0xa8(%rbp),%rax
jae    13d1 <aprs_processreceivedline+0x2a1>
mov    $0xa,%eax
mov    %rax,-0xe8(%rbp)
jmp    13df <aprs_processreceivedline+0x2af>
mov    -0xa8(%rbp),%rax
mov    %rax,-0xe8(%rbp)
mov    -0xd8(%rbp),%rsi
mov    -0xe0(%rbp),%rdi
mov    -0xe8(%rbp),%rax
mov    %eax,%edx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
mov    -0xa0(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x3a,%ecx
mov    %al,-0xe9(%rbp)
je     142f <aprs_processreceivedline+0x2ff>
mov    -0xa0(%rbp),%rax
cmp    -0x10(%rbp),%rax
setb   %al
mov    %al,-0xe9(%rbp)
mov    -0xe9(%rbp),%al
test   $0x1,%al
jne    1442 <aprs_processreceivedline+0x312>
jmp    1459 <aprs_processreceivedline+0x329>
mov    -0xa0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xa0(%rbp)
jmp    13fb <aprs_processreceivedline+0x2cb>
mov    -0xa0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xa0(%rbp)
movq   $0x0,-0xa8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xa0(%rbp),%rcx
add    -0xa8(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0xea(%rbp)
je     1506 <aprs_processreceivedline+0x3d6>
mov    -0x8(%rbp),%rax
mov    -0xa0(%rbp),%rcx
add    -0xa8(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xea(%rbp)
je     1506 <aprs_processreceivedline+0x3d6>
mov    -0x8(%rbp),%rax
mov    -0xa0(%rbp),%rcx
add    -0xa8(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x7b,%ecx
mov    %al,-0xea(%rbp)
je     1506 <aprs_processreceivedline+0x3d6>
mov    -0xa0(%rbp),%rax
add    -0xa8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setb   %al
mov    %al,-0xea(%rbp)
mov    -0xea(%rbp),%al
test   $0x1,%al
jne    1519 <aprs_processreceivedline+0x3e9>
jmp    1530 <aprs_processreceivedline+0x400>
mov    -0xa8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xa8(%rbp)
jmp    1476 <aprs_processreceivedline+0x346>
lea    -0x90(%rbp),%rax
mov    %rax,-0x100(%rbp)
mov    -0x8(%rbp),%rax
add    -0xa0(%rbp),%rax
mov    %rax,-0xf8(%rbp)
mov    $0x64,%eax
cmp    -0xa8(%rbp),%rax
jae    1573 <aprs_processreceivedline+0x443>
mov    $0x64,%eax
mov    %rax,-0x108(%rbp)
jmp    1581 <aprs_processreceivedline+0x451>
mov    -0xa8(%rbp),%rax
mov    %rax,-0x108(%rbp)
mov    -0xf8(%rbp),%rsi
mov    -0x100(%rbp),%rdi
mov    -0x108(%rbp),%rax
mov    %eax,%edx
call   1030 <strncpy@plt>
mov    -0xa8(%rbp),%rax
add    -0xa0(%rbp),%rax
mov    %rax,-0xa0(%rbp)
movq   $0x0,-0xa8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xa0(%rbp),%rcx
add    -0xa8(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x109(%rbp)
je     164d <aprs_processreceivedline+0x51d>
mov    -0x8(%rbp),%rax
mov    -0xa0(%rbp),%rcx
add    -0xa8(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x109(%rbp)
je     164d <aprs_processreceivedline+0x51d>
mov    -0x8(%rbp),%rax
mov    -0xa0(%rbp),%rcx
add    -0xa8(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x7d,%ecx
mov    %al,-0x109(%rbp)
je     164d <aprs_processreceivedline+0x51d>
mov    -0xa0(%rbp),%rax
add    -0xa8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setb   %al
mov    %al,-0x109(%rbp)
mov    -0x109(%rbp),%al
test   $0x1,%al
jne    1660 <aprs_processreceivedline+0x530>
jmp    1677 <aprs_processreceivedline+0x547>
mov    -0xa8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xa8(%rbp)
jmp    15bd <aprs_processreceivedline+0x48d>
lea    -0x96(%rbp),%rax
mov    %rax,-0x120(%rbp)
mov    -0x8(%rbp),%rax
add    -0xa0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x118(%rbp)
mov    -0xa8(%rbp),%rcx
sub    $0x1,%rcx
mov    $0x6,%eax
cmp    %rcx,%rax
jae    16c5 <aprs_processreceivedline+0x595>
mov    $0x6,%eax
mov    %rax,-0x128(%rbp)
jmp    16d7 <aprs_processreceivedline+0x5a7>
mov    -0xa8(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x128(%rbp)
mov    -0x118(%rbp),%rsi
mov    -0x120(%rbp),%rdi
mov    -0x128(%rbp),%rax
mov    %eax,%edx
call   1030 <strncpy@plt>
movsbl -0x1a(%rbp),%eax
cmp    $0x0,%eax
je     1761 <aprs_processreceivedline+0x631>
movsbl -0x24(%rbp),%eax
cmp    $0x0,%eax
je     1761 <aprs_processreceivedline+0x631>
movsbl -0x90(%rbp),%eax
cmp    $0x0,%eax
je     1761 <aprs_processreceivedline+0x631>
lea    -0x1a(%rbp),%rsi
lea    -0x24(%rbp),%rdx
lea    -0x90(%rbp),%rcx
lea    0x8cd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpb   $0x0,-0x96(%rbp)
je     175c <aprs_processreceivedline+0x62c>
lea    -0x96(%rbp),%rsi
lea    0x8cc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1761 <aprs_processreceivedline+0x631>
jmp    1766 <aprs_processreceivedline+0x636>
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aprs_processreceivedline>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa0,%rsp
mov    %rsi,%r14
mov    %rdi,%r13
movw   $0x0,0x28(%rsp)
movq   $0x0,0x20(%rsp)
movw   $0x0,0x18(%rsp)
movq   $0x0,0x10(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movl   $0x0,0x90(%rsp)
movw   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
lea    0x1(%rax),%rbx
cmpb   $0x3e,0x0(%r13,%rax,1)
je     11b4 <aprs_processreceivedline+0x94>
cmp    %r14,%rax
mov    %rbx,%rax
jb     11a0 <aprs_processreceivedline+0x80>
lea    -0x1(%rbx),%rax
cmp    $0xa,%rax
mov    $0xa,%edx
cmovb  %eax,%edx
lea    0x20(%rsp),%rdi
mov    %r13,%rsi
call   1030 <strncpy@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0x1(%rbx),%r15
cmpb   $0x3a,-0x1(%r13,%rbx,1)
je     11f8 <aprs_processreceivedline+0xd8>
add    $0xffffffffffffffff,%rbx
cmp    %r14,%rbx
mov    %r15,%rbx
jb     11e0 <aprs_processreceivedline+0xc0>
lea    -0x1(%r15),%rax
cmp    %r14,%rax
jae    136f <aprs_processreceivedline+0x24f>
cmpb   $0x3a,-0x1(%r13,%r15,1)
jne    136f <aprs_processreceivedline+0x24f>
mov    %r14,%rcx
sub    %r15,%rcx
mov    %r15,%rdx
sub    %r14,%rdx
xor    %eax,%eax
nop
lea    (%rax,%r13,1),%rsi
movzbl (%r15,%rsi,1),%ebx
cmp    $0x20,%bl
je     1244 <aprs_processreceivedline+0x124>
cmp    $0x3a,%bl
je     1244 <aprs_processreceivedline+0x124>
mov    %rdx,%rsi
add    %rax,%rsi
je     1241 <aprs_processreceivedline+0x121>
add    $0x1,%rax
jmp    1220 <aprs_processreceivedline+0x100>
mov    %rcx,%rax
lea    (%r15,%r13,1),%rsi
cmp    $0xa,%rax
mov    $0xa,%edx
cmovb  %eax,%edx
lea    0x10(%rsp),%rdi
call   1030 <strncpy@plt>
xchg   %ax,%ax
lea    0x1(%r15),%rsi
cmpb   $0x3a,0x0(%r13,%r15,1)
je     1274 <aprs_processreceivedline+0x154>
cmp    %r14,%r15
mov    %rsi,%r15
jb     1260 <aprs_processreceivedline+0x140>
cmp    %rsi,%r14
mov    %rsi,%rcx
cmova  %r14,%rcx
lea    (%rsi,%r13,1),%rdx
xor    %eax,%eax
mov    %rsi,%r12
nopw   0x0(%rax,%rax,1)
movzbl (%rdx),%ebx
test   %bl,%bl
je     12b7 <aprs_processreceivedline+0x197>
cmp    $0xa,%bl
je     12b7 <aprs_processreceivedline+0x197>
cmp    $0x7b,%bl
je     12b7 <aprs_processreceivedline+0x197>
cmp    %r14,%r12
jae    12b4 <aprs_processreceivedline+0x194>
add    $0x1,%rax
add    $0x1,%r12
add    $0x1,%rdx
jmp    1290 <aprs_processreceivedline+0x170>
mov    %rcx,%r12
lea    (%r12,%r13,1),%r15
add    %r13,%rsi
cmp    $0x64,%rax
mov    $0x64,%edx
cmovb  %eax,%edx
lea    0x30(%rsp),%rdi
call   1030 <strncpy@plt>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movzbl (%r15,%rax,1),%ecx
test   %cl,%cl
je     1302 <aprs_processreceivedline+0x1e2>
cmp    $0xa,%cl
je     1302 <aprs_processreceivedline+0x1e2>
cmp    $0x7d,%cl
je     1302 <aprs_processreceivedline+0x1e2>
lea    (%r12,%rax,1),%rcx
cmp    %r14,%rcx
jae    1302 <aprs_processreceivedline+0x1e2>
add    $0x1,%rax
jmp    12e0 <aprs_processreceivedline+0x1c0>
add    $0x1,%r15
add    $0xffffffffffffffff,%rax
cmp    $0x6,%rax
mov    $0x6,%edx
cmovb  %eax,%edx
lea    0x8(%rsp),%rdi
mov    %r15,%rsi
call   1030 <strncpy@plt>
cmpb   $0x0,0x20(%rsp)
je     136f <aprs_processreceivedline+0x24f>
cmpb   $0x0,0x10(%rsp)
je     136f <aprs_processreceivedline+0x24f>
cmpb   $0x0,0x30(%rsp)
je     136f <aprs_processreceivedline+0x24f>
lea    0xcc1(%rip),%rdi
lea    0x20(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x30(%rsp),%rcx
xor    %eax,%eax
call   1040 <printf@plt>
cmpb   $0x0,0x8(%rsp)
je     136f <aprs_processreceivedline+0x24f>
lea    0xcbe(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xa0,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [33 x i8] c"aprs: message from %s to %s: %s\0A\00"
@.str.1 = [16 x i8] c" ack part: %s\0A\00"
define void @aprs_processreceivedline(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca [10 x i8]
%6 = alloca [10 x i8]
%7 = alloca [100 x i8]
%8 = alloca [6 x i8]
%9 = alloca i64
%10 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%11 = bitcast [10 x i8]* %5 to i8*
%12 = bitcast [10 x i8]* %6 to i8*
%13 = bitcast [100 x i8]* %7 to i8*
%14 = bitcast [6 x i8]* %8 to i8*
store i64 0, i64* %9
br label %15
15: ; preds = %28, %2
%16 = load i8*, i8** %3
%17 = load i64, i64* %9
%18 = getelementptr inbounds i8, i8* %16, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp ne i32 %20, 62
br i1 %21, label %22, label %26
22: ; preds = %15
%23 = load i64, i64* %9
%24 = load i64, i64* %4
%25 = icmp ult i64 %23, %24
br label %26
26: ; preds = %22, %15
%27 = phi i1 [ false, %15 ], [ %25, %22 ]
br i1 %27, label %28, label %31
28: ; preds = %26
%29 = load i64, i64* %9
%30 = add i64 %29, 1
store i64 %30, i64* %9
br label %15
31: ; preds = %26
%32 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%33 = load i8*, i8** %3
%34 = load i64, i64* %9
%35 = icmp ult i64 10, %34
br i1 %35, label %36, label %37
36: ; preds = %31
br label %39
37: ; preds = %31
%38 = load i64, i64* %9
br label %39
39: ; preds = %37, %36
%40 = phi i64 [ 10, %36 ], [ %38, %37 ]
%41 = trunc i64 %40 to i32
%42 = call i32 @strncpy(i8* %32, i8* %33, i32 %41)
br label %43
43: ; preds = %56, %39
%44 = load i8*, i8** %3
%45 = load i64, i64* %9
%46 = getelementptr inbounds i8, i8* %44, i64 %45
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = icmp ne i32 %48, 58
br i1 %49, label %50, label %54
50: ; preds = %43
%51 = load i64, i64* %9
%52 = load i64, i64* %4
%53 = icmp ult i64 %51, %52
br label %54
54: ; preds = %50, %43
%55 = phi i1 [ false, %43 ], [ %53, %50 ]
br i1 %55, label %56, label %59
56: ; preds = %54
%57 = load i64, i64* %9
%58 = add i64 %57, 1
store i64 %58, i64* %9
br label %43
59: ; preds = %54
%60 = load i64, i64* %9
%61 = add i64 %60, 1
%62 = load i64, i64* %4
%63 = icmp ult i64 %61, %62
br i1 %63, label %64, label %274
64: ; preds = %59
%65 = load i8*, i8** %3
%66 = load i64, i64* %9
%67 = add i64 %66, 1
%68 = getelementptr inbounds i8, i8* %65, i64 %67
%69 = load i8, i8* %68
%70 = sext i8 %69 to i32
%71 = icmp eq i32 %70, 58
br i1 %71, label %72, label %274
72: ; preds = %64
%73 = load i64, i64* %9
%74 = add i64 %73, 2
store i64 %74, i64* %9
store i64 0, i64* %10
br label %75
75: ; preds = %101, %72
%76 = load i8*, i8** %3
%77 = load i64, i64* %9
%78 = load i64, i64* %10
%79 = add i64 %77, %78
%80 = getelementptr inbounds i8, i8* %76, i64 %79
%81 = load i8, i8* %80
%82 = sext i8 %81 to i32
%83 = icmp ne i32 %82, 58
br i1 %83, label %84, label %99
84: ; preds = %75
%85 = load i8*, i8** %3
%86 = load i64, i64* %9
%87 = load i64, i64* %10
%88 = add i64 %86, %87
%89 = getelementptr inbounds i8, i8* %85, i64 %88
%90 = load i8, i8* %89
%91 = sext i8 %90 to i32
%92 = icmp ne i32 %91, 32
br i1 %92, label %93, label %99
93: ; preds = %84
%94 = load i64, i64* %9
%95 = load i64, i64* %10
%96 = add i64 %94, %95
%97 = load i64, i64* %4
%98 = icmp ult i64 %96, %97
br label %99
99: ; preds = %93, %84, %75
%100 = phi i1 [ false, %84 ], [ false, %75 ], [ %98, %93 ]
br i1 %100, label %101, label %104
101: ; preds = %99
%102 = load i64, i64* %10
%103 = add i64 %102, 1
store i64 %103, i64* %10
br label %75
104: ; preds = %99
%105 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%106 = load i8*, i8** %3
%107 = load i64, i64* %9
%108 = getelementptr inbounds i8, i8* %106, i64 %107
%109 = load i64, i64* %10
%110 = icmp ult i64 10, %109
br i1 %110, label %111, label %112
111: ; preds = %104
br label %114
112: ; preds = %104
%113 = load i64, i64* %10
br label %114
114: ; preds = %112, %111
%115 = phi i64 [ 10, %111 ], [ %113, %112 ]
%116 = trunc i64 %115 to i32
%117 = call i32 @strncpy(i8* %105, i8* %108, i32 %116)
br label %118
118: ; preds = %131, %114
%119 = load i8*, i8** %3
%120 = load i64, i64* %9
%121 = getelementptr inbounds i8, i8* %119, i64 %120
%122 = load i8, i8* %121
%123 = sext i8 %122 to i32
%124 = icmp ne i32 %123, 58
br i1 %124, label %125, label %129
125: ; preds = %118
%126 = load i64, i64* %9
%127 = load i64, i64* %4
%128 = icmp ult i64 %126, %127
br label %129
129: ; preds = %125, %118
%130 = phi i1 [ false, %118 ], [ %128, %125 ]
br i1 %130, label %131, label %134
131: ; preds = %129
%132 = load i64, i64* %9
%133 = add i64 %132, 1
store i64 %133, i64* %9
br label %118
134: ; preds = %129
%135 = load i64, i64* %9
%136 = add i64 %135, 1
store i64 %136, i64* %9
store i64 0, i64* %10
br label %137
137: ; preds = %172, %134
%138 = load i8*, i8** %3
%139 = load i64, i64* %9
%140 = load i64, i64* %10
%141 = add i64 %139, %140
%142 = getelementptr inbounds i8, i8* %138, i64 %141
%143 = load i8, i8* %142
%144 = sext i8 %143 to i32
%145 = icmp ne i32 %144, 10
br i1 %145, label %146, label %170
146: ; preds = %137
%147 = load i8*, i8** %3
%148 = load i64, i64* %9
%149 = load i64, i64* %10
%150 = add i64 %148, %149
%151 = getelementptr inbounds i8, i8* %147, i64 %150
%152 = load i8, i8* %151
%153 = sext i8 %152 to i32
%154 = icmp ne i32 %153, 0
br i1 %154, label %155, label %170
155: ; preds = %146
%156 = load i8*, i8** %3
%157 = load i64, i64* %9
%158 = load i64, i64* %10
%159 = add i64 %157, %158
%160 = getelementptr inbounds i8, i8* %156, i64 %159
%161 = load i8, i8* %160
%162 = sext i8 %161 to i32
%163 = icmp ne i32 %162, 123
br i1 %163, label %164, label %170
164: ; preds = %155
%165 = load i64, i64* %9
%166 = load i64, i64* %10
%167 = add i64 %165, %166
%168 = load i64, i64* %4
%169 = icmp ult i64 %167, %168
br label %170
170: ; preds = %164, %155, %146, %137
%171 = phi i1 [ false, %155 ], [ false, %146 ], [ false, %137 ], [ %169, %164 ]
br i1 %171, label %172, label %175
172: ; preds = %170
%173 = load i64, i64* %10
%174 = add i64 %173, 1
store i64 %174, i64* %10
br label %137
175: ; preds = %170
%176 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%177 = load i8*, i8** %3
%178 = load i64, i64* %9
%179 = getelementptr inbounds i8, i8* %177, i64 %178
%180 = load i64, i64* %10
%181 = icmp ult i64 100, %180
br i1 %181, label %182, label %183
182: ; preds = %175
br label %185
183: ; preds = %175
%184 = load i64, i64* %10
br label %185
185: ; preds = %183, %182
%186 = phi i64 [ 100, %182 ], [ %184, %183 ]
%187 = trunc i64 %186 to i32
%188 = call i32 @strncpy(i8* %176, i8* %179, i32 %187)
%189 = load i64, i64* %10
%190 = load i64, i64* %9
%191 = add i64 %190, %189
store i64 %191, i64* %9
store i64 0, i64* %10
br label %192
192: ; preds = %227, %185
%193 = load i8*, i8** %3
%194 = load i64, i64* %9
%195 = load i64, i64* %10
%196 = add i64 %194, %195
%197 = getelementptr inbounds i8, i8* %193, i64 %196
%198 = load i8, i8* %197
%199 = sext i8 %198 to i32
%200 = icmp ne i32 %199, 10
br i1 %200, label %201, label %225
201: ; preds = %192
%202 = load i8*, i8** %3
%203 = load i64, i64* %9
%204 = load i64, i64* %10
%205 = add i64 %203, %204
%206 = getelementptr inbounds i8, i8* %202, i64 %205
%207 = load i8, i8* %206
%208 = sext i8 %207 to i32
%209 = icmp ne i32 %208, 0
br i1 %209, label %210, label %225
210: ; preds = %201
%211 = load i8*, i8** %3
%212 = load i64, i64* %9
%213 = load i64, i64* %10
%214 = add i64 %212, %213
%215 = getelementptr inbounds i8, i8* %211, i64 %214
%216 = load i8, i8* %215
%217 = sext i8 %216 to i32
%218 = icmp ne i32 %217, 125
br i1 %218, label %219, label %225
219: ; preds = %210
%220 = load i64, i64* %9
%221 = load i64, i64* %10
%222 = add i64 %220, %221
%223 = load i64, i64* %4
%224 = icmp ult i64 %222, %223
br label %225
225: ; preds = %219, %210, %201, %192
%226 = phi i1 [ false, %210 ], [ false, %201 ], [ false, %192 ], [ %224, %219 ]
br i1 %226, label %227, label %230
227: ; preds = %225
%228 = load i64, i64* %10
%229 = add i64 %228, 1
store i64 %229, i64* %10
br label %192
230: ; preds = %225
%231 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 0
%232 = load i8*, i8** %3
%233 = load i64, i64* %9
%234 = getelementptr inbounds i8, i8* %232, i64 %233
%235 = getelementptr inbounds i8, i8* %234, i64 1
%236 = load i64, i64* %10
%237 = sub i64 %236, 1
%238 = icmp ult i64 6, %237
br i1 %238, label %239, label %240
239: ; preds = %230
br label %243
240: ; preds = %230
%241 = load i64, i64* %10
%242 = sub i64 %241, 1
br label %243
243: ; preds = %240, %239
%244 = phi i64 [ 6, %239 ], [ %242, %240 ]
%245 = trunc i64 %244 to i32
%246 = call i32 @strncpy(i8* %231, i8* %235, i32 %245)
%247 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%248 = load i8, i8* %247
%249 = sext i8 %248 to i32
%250 = icmp ne i32 %249, 0
br i1 %250, label %251, label %273
251: ; preds = %243
%252 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%253 = load i8, i8* %252
%254 = sext i8 %253 to i32
%255 = icmp ne i32 %254, 0
br i1 %255, label %256, label %273
256: ; preds = %251
%257 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%258 = load i8, i8* %257
%259 = sext i8 %258 to i32
%260 = icmp ne i32 %259, 0
br i1 %260, label %261, label %273
261: ; preds = %256
%262 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%263 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%264 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%265 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %262, i8* %263, i8* %264)
%266 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 0
%267 = load i8, i8* %266
%268 = icmp ne i8 %267, 0
br i1 %268, label %269, label %272
269: ; preds = %261
%270 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 0
%271 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %270)
br label %272
272: ; preds = %269, %261
br label %273
273: ; preds = %272, %256, %251, %243
br label %274
274: ; preds = %273, %64, %59
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"aprs: message from %s to %s: %s\0A\00"
@.str.1 = [16 x i8] c" ack part: %s\0A\00"
define void @aprs_processreceivedline(i8* %0, i64 %1) {
%3 = alloca [10 x i8]
%4 = alloca [10 x i8]
%5 = alloca [100 x i8]
%6 = alloca [6 x i8]
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%10 = getelementptr inbounds [6 x i8], [6 x i8]* %6, i64 0, i64 0
br label %11
11: ; preds = %11, %2
%12 = phi i64 [ 0, %2 ], [ %18, %11 ]
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = icmp ne i8 %14, 62
%16 = icmp ult i64 %12, %1
%17 = select i1 %15, i1 %16, i1 false
%18 = add nuw i64 %12, 1
br i1 %17, label %11, label %19
19: ; preds = %11
%20 = icmp ult i64 %12, 10
%21 = select i1 %20, i64 %12, i64 10
%22 = trunc i64 %21 to i32
%23 = call i32 @strncpy(i8* %7, i8* %0, i32 %22)
br label %24
24: ; preds = %24, %19
%25 = phi i64 [ %12, %19 ], [ %31, %24 ]
%26 = getelementptr inbounds i8, i8* %0, i64 %25
%27 = load i8, i8* %26
%28 = icmp ne i8 %27, 58
%29 = icmp ult i64 %25, %1
%30 = select i1 %28, i1 %29, i1 false
%31 = add i64 %25, 1
br i1 %30, label %24, label %32
32: ; preds = %24
%33 = icmp ult i64 %31, %1
br i1 %33, label %34, label %115
34: ; preds = %32
%35 = getelementptr inbounds i8, i8* %0, i64 %31
%36 = load i8, i8* %35
%37 = icmp eq i8 %36, 58
br i1 %37, label %38, label %115
38: ; preds = %34
%39 = add i64 %25, 2
%40 = add i64 %1, -2
%41 = sub i64 %40, %25
br label %42
42: ; preds = %49, %38
%43 = phi i64 [ 0, %38 ], [ %50, %49 ]
%44 = add nuw i64 %43, %39
%45 = getelementptr inbounds i8, i8* %0, i64 %44
%46 = load i8, i8* %45
switch i8 %46, label %47 [
i8 58, label %51
i8 32, label %51
]
47: ; preds = %42
%48 = icmp eq i64 %43, %41
br i1 %48, label %51, label %49
49: ; preds = %47
%50 = add i64 %43, 1
br label %42
51: ; preds = %42, %42, %47
%52 = phi i64 [ %43, %42 ], [ %43, %42 ], [ %41, %47 ]
%53 = getelementptr inbounds i8, i8* %0, i64 %39
%54 = icmp ult i64 %52, 10
%55 = select i1 %54, i64 %52, i64 10
%56 = trunc i64 %55 to i32
%57 = call i32 @strncpy(i8* %8, i8* %53, i32 %56)
br label %58
58: ; preds = %58, %51
%59 = phi i64 [ %39, %51 ], [ %65, %58 ]
%60 = getelementptr inbounds i8, i8* %0, i64 %59
%61 = load i8, i8* %60
%62 = icmp ne i8 %61, 58
%63 = icmp ult i64 %59, %1
%64 = select i1 %62, i1 %63, i1 false
%65 = add i64 %59, 1
br i1 %64, label %58, label %66
66: ; preds = %58
%67 = call i64 @llvm.umax.i64(i64 %1, i64 %65)
br label %68
68: ; preds = %75, %66
%69 = phi i64 [ 0, %66 ], [ %76, %75 ]
%70 = add nuw i64 %69, %65
%71 = getelementptr inbounds i8, i8* %0, i64 %70
%72 = load i8, i8* %71
switch i8 %72, label %73 [
i8 10, label %77
i8 0, label %77
i8 123, label %77
]
73: ; preds = %68
%74 = icmp ult i64 %70, %1
br i1 %74, label %75, label %77
75: ; preds = %73
%76 = add i64 %69, 1
br label %68
77: ; preds = %68, %68, %68, %73
%78 = phi i64 [ %70, %68 ], [ %70, %68 ], [ %70, %68 ], [ %67, %73 ]
%79 = getelementptr inbounds i8, i8* %0, i64 %78
%80 = getelementptr inbounds i8, i8* %0, i64 %65
%81 = icmp ult i64 %69, 100
%82 = select i1 %81, i64 %69, i64 100
%83 = trunc i64 %82 to i32
%84 = call i32 @strncpy(i8* %9, i8* %80, i32 %83)
br label %85
85: ; preds = %92, %77
%86 = phi i64 [ 0, %77 ], [ %93, %92 ]
%87 = add nuw i64 %86, %78
%88 = getelementptr inbounds i8, i8* %0, i64 %87
%89 = load i8, i8* %88
switch i8 %89, label %90 [
i8 10, label %94
i8 0, label %94
i8 125, label %94
]
90: ; preds = %85
%91 = icmp ult i64 %87, %1
br i1 %91, label %92, label %94
92: ; preds = %90
%93 = add i64 %86, 1
br label %85
94: ; preds = %85, %85, %85, %90
%95 = getelementptr inbounds i8, i8* %79, i64 1
%96 = add i64 %86, -1
%97 = icmp ult i64 %96, 6
%98 = select i1 %97, i64 %96, i64 6
%99 = trunc i64 %98 to i32
%100 = call i32 @strncpy(i8* %10, i8* %95, i32 %99)
%101 = load i8, i8* %7
%102 = icmp ne i8 %101, 0
%103 = load i8, i8* %8
%104 = icmp ne i8 %103, 0
%105 = select i1 %102, i1 %104, i1 false
%106 = load i8, i8* %9
%107 = icmp ne i8 %106, 0
%108 = select i1 %105, i1 %107, i1 false
br i1 %108, label %109, label %115
109: ; preds = %94
%110 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i8* %9)
%111 = load i8, i8* %10
%112 = icmp eq i8 %111, 0
br i1 %112, label %115, label %113
113: ; preds = %109
%114 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %10)
br label %115
115: ; preds = %94, %113, %109, %34, %32
ret void
}