void l_specRemErr(int s, int **momentum, char **txtmom, char *mem, int id,
                  long ind) {
  free_mem(momentum);
  free_mem(txtmom);
  switch (s) {
  case -3:
    halt("Wrong structure of special remark %s in topology table id=%d entry "
         "%d:\n  %s ",
         mem, id, ind, "digit expected");
  case -4:
    halt("Wrong structure of special remark %s in topology table id=%d entry "
         "%d:\n  %s ",
         mem, id, ind, "invalid vertex index");
  case -5:
    halt("Wrong structure of special remark %s in topology table id=%d entry "
         "%d:\n  %s ",
         mem, id, ind, "unexpected symbol");
  case -6:
    halt("Wrong structure of special remark %s in topology table id=%d entry "
         "%d:\n  %s ",
         mem, id, ind, "empty remark");
  default:
    halt("Wrong structure of special remark %s in topology table id=%d entry "
         "%d:\n  %s ",
         mem, id, ind, "Internal error.");
  }
}


x86 assembly (clang, -O0):
<l_specRemErr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %al,-0x39(%rbp)
call   1040 <free_mem@plt>
mov    -0x39(%rbp),%al
mov    -0x18(%rbp),%rdi
call   1040 <free_mem@plt>
mov    -0x4(%rbp),%eax
add    $0x6,%eax
mov    %eax,%ecx
mov    %rcx,-0x38(%rbp)
sub    $0x3,%eax
ja     1202 <l_specRemErr+0xe2>
mov    -0x38(%rbp),%rax
lea    0xe87(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x30(%rbp),%rcx
lea    0xe7c(%rip),%rdi
lea    0xec2(%rip),%r8
mov    $0x0,%al
call   1030 <halt@plt>
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x30(%rbp),%rcx
lea    0xe5c(%rip),%rdi
lea    0xeb1(%rip),%r8
mov    $0x0,%al
call   1030 <halt@plt>
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x30(%rbp),%rcx
lea    0xe3c(%rip),%rdi
lea    0xea6(%rip),%r8
mov    $0x0,%al
call   1030 <halt@plt>
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x30(%rbp),%rcx
lea    0xe1c(%rip),%rdi
lea    0xe98(%rip),%r8
mov    $0x0,%al
call   1030 <halt@plt>
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x30(%rbp),%rcx
lea    0xdfc(%rip),%rdi
lea    0xe85(%rip),%r8
mov    $0x0,%al
call   1030 <halt@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l_specRemErr>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r9,%r14
mov    %r8d,%r15d
mov    %rcx,%r12
mov    %rdx,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
xor    %eax,%eax
call   1040 <free_mem@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <free_mem@plt>
add    $0x6,%ebp
cmp    $0x3,%ebp
ja     11de <l_specRemErr+0xbe>
lea    0xea3(%rip),%rax
movslq (%rax,%rbp,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xea3(%rip),%rdi
lea    0xee9(%rip),%r8
mov    %r12,%rsi
mov    %r15d,%edx
mov    %r14,%rcx
xor    %eax,%eax
call   1030 <halt@plt>
lea    0xe85(%rip),%rdi
lea    0xeda(%rip),%r8
mov    %r12,%rsi
mov    %r15d,%edx
mov    %r14,%rcx
xor    %eax,%eax
call   1030 <halt@plt>
lea    0xe67(%rip),%rdi
lea    0xed1(%rip),%r8
mov    %r12,%rsi
mov    %r15d,%edx
mov    %r14,%rcx
xor    %eax,%eax
call   1030 <halt@plt>
lea    0xe49(%rip),%rdi
lea    0xec5(%rip),%r8
mov    %r12,%rsi
mov    %r15d,%edx
mov    %r14,%rcx
xor    %eax,%eax
call   1030 <halt@plt>
lea    0xe2b(%rip),%rdi
lea    0xeb4(%rip),%r8
mov    %r12,%rsi
mov    %r15d,%edx
mov    %r14,%rcx
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <halt@plt>

LLVM IR (-O0):
@.str = [77 x i8] c"Wrong structure of special remark %s in topology table id=%d entry %d:\0A %s \00"
@.str.1 = [15 x i8] c"digit expected\00"
@.str.2 = [21 x i8] c"invalid vertex index\00"
@.str.3 = [18 x i8] c"unexpected symbol\00"
@.str.4 = [13 x i8] c"empty remark\00"
@.str.5 = [16 x i8] c"Internal error.\00"
define void @l_specRemErr(i32 %0, i32** %1, i8** %2, i8* %3, i32 %4, i64 %5) {
%7 = alloca i32
%8 = alloca i32**
%9 = alloca i8**
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i64
store i32 %0, i32* %7
store i32** %1, i32*** %8
store i8** %2, i8*** %9
store i8* %3, i8** %10
store i32 %4, i32* %11
store i64 %5, i64* %12
%13 = load i32**, i32*** %8
%14 = call i32 (i32**, ...) bitcast (i32 (...)* @free_mem to i32 (i32**, ...)*)(i32** %13)
%15 = load i8**, i8*** %9
%16 = call i32 (i8**, ...) bitcast (i32 (...)* @free_mem to i32 (i8**, ...)*)(i8** %15)
%17 = load i32, i32* %7
switch i32 %17, label %38 [
i32 -3, label %18
i32 -4, label %23
i32 -5, label %28
i32 -6, label %33
]
18: ; preds = %6
%19 = load i8*, i8** %10
%20 = load i32, i32* %11
%21 = load i64, i64* %12
%22 = call i32 (i8*, i8*, i32, i64, i8*, ...) bitcast (i32 (...)* @halt to i32 (i8*, i8*, i32, i64, i8*, ...)*)(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0), i8* %19, i32 %20, i64 %21, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %23
23: ; preds = %6, %18
%24 = load i8*, i8** %10
%25 = load i32, i32* %11
%26 = load i64, i64* %12
%27 = call i32 (i8*, i8*, i32, i64, i8*, ...) bitcast (i32 (...)* @halt to i32 (i8*, i8*, i32, i64, i8*, ...)*)(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0), i8* %24, i32 %25, i64 %26, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %28
28: ; preds = %6, %23
%29 = load i8*, i8** %10
%30 = load i32, i32* %11
%31 = load i64, i64* %12
%32 = call i32 (i8*, i8*, i32, i64, i8*, ...) bitcast (i32 (...)* @halt to i32 (i8*, i8*, i32, i64, i8*, ...)*)(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0), i8* %29, i32 %30, i64 %31, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
br label %33
33: ; preds = %6, %28
%34 = load i8*, i8** %10
%35 = load i32, i32* %11
%36 = load i64, i64* %12
%37 = call i32 (i8*, i8*, i32, i64, i8*, ...) bitcast (i32 (...)* @halt to i32 (i8*, i8*, i32, i64, i8*, ...)*)(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0), i8* %34, i32 %35, i64 %36, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
br label %38
38: ; preds = %6, %33
%39 = load i8*, i8** %10
%40 = load i32, i32* %11
%41 = load i64, i64* %12
%42 = call i32 (i8*, i8*, i32, i64, i8*, ...) bitcast (i32 (...)* @halt to i32 (i8*, i8*, i32, i64, i8*, ...)*)(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0), i8* %39, i32 %40, i64 %41, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
br label %43
43: ; preds = %38
ret void
}

LLVM IR (-O2):
@.str = [77 x i8] c"Wrong structure of special remark %s in topology table id=%d entry %d:\0A %s \00"
@.str.1 = [15 x i8] c"digit expected\00"
@.str.2 = [21 x i8] c"invalid vertex index\00"
@.str.3 = [18 x i8] c"unexpected symbol\00"
@.str.4 = [13 x i8] c"empty remark\00"
@.str.5 = [16 x i8] c"Internal error.\00"
define void @l_specRemErr(i32 %0, i32** %1, i8** %2, i8* %3, i32 %4, i64 %5) {
%7 = tail call i32 (i32**, ...) bitcast (i32 (...)* @free_mem to i32 (i32**, ...)*)(i32** %1)
%8 = tail call i32 (i8**, ...) bitcast (i32 (...)* @free_mem to i32 (i8**, ...)*)(i8** %2)
switch i32 %0, label %17 [
i32 -3, label %9
i32 -4, label %11
i32 -5, label %13
i32 -6, label %15
]
9: ; preds = %6
%10 = tail call i32 (i8*, i8*, i32, i64, i8*, ...) bitcast (i32 (...)* @halt to i32 (i8*, i8*, i32, i64, i8*, ...)*)(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %4, i64 %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %6, %9
%12 = tail call i32 (i8*, i8*, i32, i64, i8*, ...) bitcast (i32 (...)* @halt to i32 (i8*, i8*, i32, i64, i8*, ...)*)(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %4, i64 %5, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %6, %11
%14 = tail call i32 (i8*, i8*, i32, i64, i8*, ...) bitcast (i32 (...)* @halt to i32 (i8*, i8*, i32, i64, i8*, ...)*)(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %4, i64 %5, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
br label %15
15: ; preds = %6, %13
%16 = tail call i32 (i8*, i8*, i32, i64, i8*, ...) bitcast (i32 (...)* @halt to i32 (i8*, i8*, i32, i64, i8*, ...)*)(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %4, i64 %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
br label %17
17: ; preds = %6, %15
%18 = tail call i32 (i8*, i8*, i32, i64, i8*, ...) bitcast (i32 (...)* @halt to i32 (i8*, i8*, i32, i64, i8*, ...)*)(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %4, i64 %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
ret void
}