decompiled_code:
__int64 __fastcall isc_forward(__int64 a1, const char **a2, __int64 a3)
{
void *v5; // rdi
int v6; // er10
__int64 v7; // rbp
int v8; // er14
int v9; // er13
int v10; // ebx
__int64 result; // rax
const char *v12; // r15
int v13; // er14
const char *v14; // r13
unsigned int v15; // eax
int v16; // er12
__int64 v17; // rbp
const char *v18; // r12
unsigned int v19; // eax
const char *v20; // r13
unsigned int v21; // eax
const char *v22; // r12
unsigned int v23; // eax
const char *v24; // r15
unsigned int v25; // eax
__int64 v26; // r13
__int64 v27; // r12
const char *v28; // rbp
unsigned int v29; // eax
__int64 v30; // r15
__int64 v31; // r14
const char *v32; // rbp
unsigned int v33; // eax
const char *v34; // rbx
unsigned int v35; // eax
unsigned int v36; // [rsp+8h] [rbp-40h] BYREF
int v37[15]; // [rsp+Ch] [rbp-3Ch] BYREF

if ( (int)get_debug_level("ims_isc", 7LL) > 2 && !dprint_crit )
{
++dprint_crit;
if ( log_stderr )
{
if ( log_color )
dprint_color(3LL);
v12 = *a2;
v13 = *((_DWORD *)a2 + 2);
v14 = (const char *)*((_QWORD *)&log_level_info + 16);
v15 = my_pid();
fprintf(
stderr,
"%2d(%d) %s: %s%s(): marking for AS <%.*s>\n",
process_no,
v15,
v14,
"ims_isc [isc.c:63]: ",
"isc_forward",
v13,
v12);
if ( log_color )
dprint_color_reset();
}
else
{
syslog(
*((_DWORD *)&log_level_info + 34) | *(_DWORD *)(core_cfg + 4LL),
"%s: %s%s(): marking for AS <%.*s>\n",
*((_QWORD *)&log_level_info + 16),
"ims_isc [isc.c:63]: ",
"isc_forward",
*((unsigned int *)a2 + 2),
*a2);
}
--dprint_crit;
}
isc_mark_set(a1, a2, a3);
if ( *(_QWORD *)(a1 + 640) )
qm_free(mem_block);
v5 = (void *)qm_malloc(mem_block, *((int *)a2 + 2));
*(_QWORD *)(a1 + 640) = v5;
if ( v5 )
{
v6 = *((_DWORD *)a2 + 2);
*(_DWORD *)(a1 + 648) = v6;
memcpy(v5, *a2, v6);
if ( (route_type & 2) != 0 )
append_branch(a1, a1 + 56, a1 + 640, 0LL, 0xFFFFFFFFLL, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL);
if ( ((int (__fastcall *)(__int64, int *, unsigned int *))isc_tmb[9])(a1, v37, &v36) < 0 )
{
if ( (int)get_debug_level("ims_isc", 7LL) > 2 && !dprint_crit )
{
++dprint_crit;
if ( log_stderr )
{
if ( log_color )
dprint_color(3LL);
v20 = (const char *)*((_QWORD *)&log_level_info + 16);
v21 = my_pid();
fprintf(
stderr,
"%2d(%d) %s: %s%s(): SIP message without transaction. OK - first request\n",
process_no,
v21,
v20,
"ims_isc [isc.c:85]: ",
"isc_forward");
if ( log_color )
dprint_color_reset();
}
else
{
syslog(
*((_DWORD *)&log_level_info + 34) | *(_DWORD *)(core_cfg + 4LL),
"%s: %s%s(): SIP message without transaction. OK - first request\n",
*((const char **)&log_level_info + 16),
"ims_isc [isc.c:85]: ",
"isc_forward");
}
--dprint_crit;
}
if ( isc_tmb[5](a1) < 0 && (int)get_debug_level("ims_isc", 7LL) > 1 && !dprint_crit )
{
++dprint_crit;
if ( log_stderr )
{
if ( log_color )
dprint_color(2LL);
v22 = (const char *)*((_QWORD *)&log_level_info + 14);
v23 = my_pid();
fprintf(
stderr,
"%2d(%d) %s: %s%s(): Failed creating SIP transaction\n",
process_no,
v23,
v22,
"ims_isc [isc.c:87]: ",
"isc_forward");
if ( log_color )
dprint_color_reset();
}
else
{
syslog(
*((_DWORD *)&log_level_info + 30) | *(_DWORD *)(core_cfg + 4LL),
"%s: %s%s(): Failed creating SIP transaction\n",
*((const char **)&log_level_info + 14),
"ims_isc [isc.c:87]: ",
"isc_forward");
}
--dprint_crit;
}
if ( ((int (__fastcall *)(__int64, int *, unsigned int *))isc_tmb[9])(a1, v37, &v36) < 0 )
{
if ( (int)get_debug_level("ims_isc", 7LL) > 1 && !dprint_crit )
{
++dprint_crit;
if ( log_stderr )
{
if ( log_color )
dprint_color(2LL);
v24 = (const char *)*((_QWORD *)&log_level_info + 14);
v25 = my_pid();
fprintf(
stderr,
"%2d(%d) %s: %s%s(): SIP message still without transaction\n",
process_no,
v25,
v24,
"ims_isc [isc.c:89]: ",
"isc_forward");
if ( log_color )
dprint_color_reset();
}
else
{
syslog(
*((_DWORD *)&log_level_info + 30) | *(_DWORD *)(core_cfg + 4LL),
"%s: %s%s(): SIP message still without transaction\n",
*((const char **)&log_level_info + 14),
"ims_isc [isc.c:89]: ",
"isc_forward");
}
--dprint_crit;
}
}
else if ( (int)get_debug_level("ims_isc", 7LL) > 2 && !dprint_crit )
{
++dprint_crit;
if ( log_stderr )
{
if ( log_color )
dprint_color(3LL);
v26 = v36;
v27 = (unsigned int)v37[0];
v28 = (const char *)*((_QWORD *)&log_level_info + 16);
v29 = my_pid();
fprintf(
stderr,
"%2d(%d) %s: %s%s(): New SIP message transaction %u %u\n",
process_no,
v29,
v28,
"ims_isc [isc.c:91]: ",
"isc_forward",
v27,
v26);
if ( log_color )
dprint_color_reset();
}
else
{
syslog(
*((_DWORD *)&log_level_info + 34) | *(_DWORD *)(core_cfg + 4LL),
"%s: %s%s(): New SIP message transaction %u %u\n",
*((const char **)&log_level_info + 16),
"ims_isc [isc.c:91]: ",
"isc_forward",
(unsigned int)v37[0],
v36);
}
--dprint_crit;
}
}
else if ( (int)get_debug_level("ims_isc", 7LL) > 1 && !dprint_crit )
{
++dprint_crit;
if ( log_stderr )
{
if ( log_color )
dprint_color(2LL);
v30 = v36;
v31 = (unsigned int)v37[0];
v32 = (const char *)*((_QWORD *)&log_level_info + 14);
v33 = my_pid();
fprintf(
stderr,
"%2d(%d) %s: %s%s(): Transaction %u %u exists. Retransmission?\n",
process_no,
v33,
v32,
"ims_isc [isc.c:94]: ",
"isc_forward",
v31,
v30);
if ( log_color )
dprint_color_reset();
}
else
{
syslog(
*((_DWORD *)&log_level_info + 30) | *(_DWORD *)(core_cfg + 4LL),
"%s: %s%s(): Transaction %u %u exists. Retransmission?\n",
*((const char **)&log_level_info + 14),
"ims_isc [isc.c:94]: ",
"isc_forward",
(unsigned int)v37[0],
v36);
}
--dprint_crit;
}
v7 = ((__int64 (*)(void))isc_tmb[26])();
v8 = *(_DWORD *)(v7 + 5440);
v9 = *(_DWORD *)(v7 + 5444);
*(_DWORD *)(v7 + 5440) = 16 * isc_fr_timeout / 0x3E8u;
*(_DWORD *)(v7 + 5444) = 16 * isc_fr_inv_timeout / 0x3E8u;
((void (__fastcall *)(__int64, _QWORD, _QWORD))isc_tmb[3])(a1, 0LL, 0LL);
*(_DWORD *)(v7 + 5440) = v8;
*(_DWORD *)(v7 + 5444) = v9;
v10 = get_debug_level("ims_isc", 7LL);
result = 1LL;
if ( v10 > 1 )
{
result = 1LL;
if ( !dprint_crit )
{
++dprint_crit;
if ( log_stderr )
{
if ( log_color )
dprint_color(2LL);
v34 = (const char *)*((_QWORD *)&log_level_info + 14);
v35 = my_pid();
fprintf(
stderr,
"%2d(%d) %s: %s%s(): >> msg was fwded to AS\n",
process_no,
v35,
v34,
"ims_isc [isc.c:112]: ",
"isc_forward");
if ( log_color )
dprint_color_reset();
}
else
{
syslog(
*((_DWORD *)&log_level_info + 30) | *(_DWORD *)(core_cfg + 4LL),
"%s: %s%s(): >> msg was fwded to AS\n",
*((const char **)&log_level_info + 14),
"ims_isc [isc.c:112]: ",
"isc_forward");
}
--dprint_crit;
result = 1LL;
}
}
}
else
{
v16 = get_debug_level("ims_isc", 7LL);
result = 4294967293LL;
if ( v16 >= -1 )
{
result = 4294967293LL;
if ( !dprint_crit )
{
++dprint_crit;
if ( log_stderr )
{
if ( log_color )
dprint_color(0xFFFFFFFFLL);
v17 = *((unsigned int *)a2 + 2);
v18 = (const char *)*((_QWORD *)&log_level_info + 8);
v19 = my_pid();
fprintf(
stderr,
"%2d(%d) %s: %s%s(): error allocating %d bytes\n",
process_no,
v19,
v18,
"ims_isc [isc.c:71]: ",
"isc_forward",
v17);
if ( log_color )
dprint_color_reset();
}
else
{
syslog(
*((_DWORD *)&log_level_info + 18) | *(_DWORD *)(core_cfg + 4LL),
"%s: %s%s(): error allocating %d bytes\n",
*((const char **)&log_level_info + 8),
"ims_isc [isc.c:71]: ",
"isc_forward",
*((unsigned int *)a2 + 2));
}
--dprint_crit;
result = 4294967293LL;
}
}
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(__int64 a1, const char **a2, __int64 a3)
{
void *v5; // rdi
int v6; // er10
__int64 v7; // rbp
int v8; // er14
int v9; // er13
int v10; // ebx
__int64 result; // rax
const char *v12; // r15
int v13; // er14
const char *v14; // r13
unsigned int v15; // eax
int v16; // er12
__int64 v17; // rbp
const char *v18; // r12
unsigned int v19; // eax
const char *v20; // r13
unsigned int v21; // eax
const char *v22; // r12
unsigned int v23; // eax
const char *v24; // r15
unsigned int v25; // eax
__int64 v26; // r13
__int64 v27; // r12
const char *v28; // rbp
unsigned int v29; // eax
__int64 v30; // r15
__int64 v31; // r14
const char *v32; // rbp
unsigned int v33; // eax
const char *v34; // rbx
unsigned int v35; // eax
unsigned int v36; // [rsp+8h] [rbp-40h] BYREF
int v37[15]; // [rsp+Ch] [rbp-3Ch] BYREF

if ( (int)get_debug_level("ims_isc", 7LL) > 2 && !dprint_crit )
{
++dprint_crit;
if ( log_stderr )
{
if ( log_color )
dprint_color(3LL);
v12 = *a2;
v13 = *((_DWORD *)a2 + 2);
v14 = (const char *)*((_QWORD *)&log_level_info + 16);
v15 = my_pid();
fprintf(
stderr,
"%2d(%d) %s: %s%s(): marking for AS <%.*s>\n",
process_no,
v15,
v14,
"ims_isc [isc.c:63]: ",
"isc_forward",
v13,
v12);
if ( log_color )
dprint_color_reset();
}
else
{
syslog(
*((_DWORD *)&log_level_info + 34) | *(_DWORD *)(core_cfg + 4LL),
"%s: %s%s(): marking for AS <%.*s>\n",
*((_QWORD *)&log_level_info + 16),
"ims_isc [isc.c:63]: ",
"isc_forward",
*((unsigned int *)a2 + 2),
*a2);
}
--dprint_crit;
}
isc_mark_set(a1, a2, a3);
if ( *(_QWORD *)(a1 + 640) )
qm_free(mem_block);
v5 = (void *)qm_malloc(mem_block, *((int *)a2 + 2));
*(_QWORD *)(a1 + 640) = v5;
if ( v5 )
{
v6 = *((_DWORD *)a2 + 2);
*(_DWORD *)(a1 + 648) = v6;
memcpy(v5, *a2, v6);
if ( (route_type & 2) != 0 )
append_branch(a1, a1 + 56, a1 + 640, 0LL, 0xFFFFFFFFLL, 0LL, 0LL, 0LL, 0LL, 0LL, 0LL);
if ( ((int (__fastcall *)(__int64, int *, unsigned int *))isc_tmb[9])(a1, v37, &v36) < 0 )
{
if ( (int)get_debug_level("ims_isc", 7LL) > 2 && !dprint_crit )
{
++dprint_crit;
if ( log_stderr )
{
if ( log_color )
dprint_color(3LL);
v20 = (const char *)*((_QWORD *)&log_level_info + 16);
v21 = my_pid();
fprintf(
stderr,
"%2d(%d) %s: %s%s(): SIP message without transaction. OK - first request\n",
process_no,
v21,
v20,
"ims_isc [isc.c:85]: ",
"isc_forward");
if ( log_color )
dprint_color_reset();
}
else
{
syslog(
*((_DWORD *)&log_level_info + 34) | *(_DWORD *)(core_cfg + 4LL),
"%s: %s%s(): SIP message without transaction. OK - first request\n",
*((const char **)&log_level_info + 16),
"ims_isc [isc.c:85]: ",
"isc_forward");
}
--dprint_crit;
}
if ( isc_tmb[5](a1) < 0 && (int)get_debug_level("ims_isc", 7LL) > 1 && !dprint_crit )
{
++dprint_crit;
if ( log_stderr )
{
if ( log_color )
dprint_color(2LL);
v22 = (const char *)*((_QWORD *)&log_level_info + 14);
v23 = my_pid();
fprintf(
stderr,
"%2d(%d) %s: %s%s(): Failed creating SIP transaction\n",
process_no,
v23,
v22,
"ims_isc [isc.c:87]: ",
"isc_forward");
if ( log_color )
dprint_color_reset();
}
else
{
syslog(
*((_DWORD *)&log_level_info + 30) | *(_DWORD *)(core_cfg + 4LL),
"%s: %s%s(): Failed creating SIP transaction\n",
*((const char **)&log_level_info + 14),
"ims_isc [isc.c:87]: ",
"isc_forward");
}
--dprint_crit;
}
if ( ((int (__fastcall *)(__int64, int *, unsigned int *))isc_tmb[9])(a1, v37, &v36) < 0 )
{
if ( (int)get_debug_level("ims_isc", 7LL) > 1 && !dprint_crit )
{
++dprint_crit;
if ( log_stderr )
{
if ( log_color )
dprint_color(2LL);
v24 = (const char *)*((_QWORD *)&log_level_info + 14);
v25 = my_pid();
fprintf(
stderr,
"%2d(%d) %s: %s%s(): SIP message still without transaction\n",
process_no,
v25,
v24,
"ims_isc [isc.c:89]: ",
"isc_forward");
if ( log_color )
dprint_color_reset();
}
else
{
syslog(
*((_DWORD *)&log_level_info + 30) | *(_DWORD *)(core_cfg + 4LL),
"%s: %s%s(): SIP message still without transaction\n",
*((const char **)&log_level_info + 14),
"ims_isc [isc.c:89]: ",
"isc_forward");
}
--dprint_crit;
}
}
else if ( (int)get_debug_level("ims_isc", 7LL) > 2 && !dprint_crit )
{
++dprint_crit;
if ( log_stderr )
{
if ( log_color )
dprint_color(3LL);
v26 = v36;
v27 = (unsigned int)v37[0];
v28 = (const char *)*((_QWORD *)&log_level_info + 16);
v29 = my_pid();
fprintf(
stderr,
"%2d(%d) %s: %s%s(): New SIP message transaction %u %u\n",
process_no,
v29,
v28,
"ims_isc [isc.c:91]: ",
"isc_forward",
v27,
v26);
if ( log_color )
dprint_color_reset();
}
else
{
syslog(
*((_DWORD *)&log_level_info + 34) | *(_DWORD *)(core_cfg + 4LL),
"%s: %s%s(): New SIP message transaction %u %u\n",
*((const char **)&log_level_info + 16),
"ims_isc [isc.c:91]: ",
"isc_forward",
(unsigned int)v37[0],
v36);
}
--dprint_crit;
}
}
else if ( (int)get_debug_level("ims_isc", 7LL) > 1 && !dprint_crit )
{
++dprint_crit;
if ( log_stderr )
{
if ( log_color )
dprint_color(2LL);
v30 = v36;
v31 = (unsigned int)v37[0];
v32 = (const char *)*((_QWORD *)&log_level_info + 14);
v33 = my_pid();
fprintf(
stderr,
"%2d(%d) %s: %s%s(): Transaction %u %u exists. Retransmission?\n",
process_no,
v33,
v32,
"ims_isc [isc.c:94]: ",
"isc_forward",
v31,
v30);
if ( log_color )
dprint_color_reset();
}
else
{
syslog(
*((_DWORD *)&log_level_info + 30) | *(_DWORD *)(core_cfg + 4LL),
"%s: %s%s(): Transaction %u %u exists. Retransmission?\n",
*((const char **)&log_level_info + 14),
"ims_isc [isc.c:94]: ",
"isc_forward",
(unsigned int)v37[0],
v36);
}
--dprint_crit;
}
v7 = ((__int64 (*)(void))isc_tmb[26])();
v8 = *(_DWORD *)(v7 + 5440);
v9 = *(_DWORD *)(v7 + 5444);
*(_DWORD *)(v7 + 5440) = 16 * isc_fr_timeout / 0x3E8u;
*(_DWORD *)(v7 + 5444) = 16 * isc_fr_inv_timeout / 0x3E8u;
((void (__fastcall *)(__int64, _QWORD, _QWORD))isc_tmb[3])(a1, 0LL, 0LL);
*(_DWORD *)(v7 + 5440) = v8;
*(_DWORD *)(v7 + 5444) = v9;
v10 = get_debug_level("ims_isc", 7LL);
result = 1LL;
if ( v10 > 1 )
{
result = 1LL;
if ( !dprint_crit )
{
++dprint_crit;
if ( log_stderr )
{
if ( log_color )
dprint_color(2LL);
v34 = (const char *)*((_QWORD *)&log_level_info + 14);
v35 = my_pid();
fprintf(
stderr,
"%2d(%d) %s: %s%s(): >> msg was fwded to AS\n",
process_no,
v35,
v34,
"ims_isc [isc.c:112]: ",
"isc_forward");
if ( log_color )
dprint_color_reset();
}
else
{
syslog(
*((_DWORD *)&log_level_info + 30) | *(_DWORD *)(core_cfg + 4LL),
"%s: %s%s(): >> msg was fwded to AS\n",
*((const char **)&log_level_info + 14),
"ims_isc [isc.c:112]: ",
"isc_forward");
}
--dprint_crit;
result = 1LL;
}
}
}
else
{
v16 = get_debug_level("ims_isc", 7LL);
result = 4294967293LL;
if ( v16 >= -1 )
{
result = 4294967293LL;
if ( !dprint_crit )
{
++dprint_crit;
if ( log_stderr )
{
if ( log_color )
dprint_color(0xFFFFFFFFLL);
v17 = *((unsigned int *)a2 + 2);
v18 = (const char *)*((_QWORD *)&log_level_info + 8);
v19 = my_pid();
fprintf(
stderr,
"%2d(%d) %s: %s%s(): error allocating %d bytes\n",
process_no,
v19,
v18,
"ims_isc [isc.c:71]: ",
"isc_forward",
v17);
if ( log_color )
dprint_color_reset();
}
else
{
syslog(
*((_DWORD *)&log_level_info + 18) | *(_DWORD *)(core_cfg + 4LL),
"%s: %s%s(): error allocating %d bytes\n",
*((const char **)&log_level_info + 8),
"ims_isc [isc.c:71]: ",
"isc_forward",
*((unsigned int *)a2 + 2));
}
--dprint_crit;
result = 4294967293LL;
}
}
}
return result;
}

original_code:
int isc_forward(struct sip_msg *msg, isc_match *m, isc_mark *mark) {
 struct cell *t;
 unsigned int hash, label;
 ticks_t fr_timeout, fr_inv_timeout;
 do { if (get_debug_level("ims_isc", (sizeof("ims_isc")-1)) >= ((3)) && (dprint_crit==0)) { (dprint_crit++); if (__builtin_expect(!!((((3)) >= -5) && (((3)) <= 3)), 1)){ if (__builtin_expect(!!(log_stderr), 0)) { if (__builtin_expect(!!(log_color), 0)) dprint_color((3)); fprintf(stderr, "%2d(%d) %s: %s" "%s(): " "marking for AS <%.*s>\n", process_no, my_pid(), (log_level_info[((3)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "63" "]: ") , __func__, m->server_name.len, m->server_name.s); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { syslog((log_level_info[((3)) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s: %s" "%s(): " "marking for AS <%.*s>\n", (log_level_info[((3)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "63" "]: ") , __func__, m->server_name.len, m->server_name.s); } } else { if (log_stderr) { if (__builtin_expect(!!(log_color), 0)) dprint_color((3)); fprintf(stderr, "%2d(%d) %s" "%s(): " "marking for AS <%.*s>\n", process_no, my_pid(), ("ims_isc" " [" "isc.c" ":" "63" "]: ") , __func__, m->server_name.len, m->server_name.s); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { if (((3))<-5) syslog((log_level_info[(-5) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "marking for AS <%.*s>\n", ("ims_isc" " [" "isc.c" ":" "63" "]: ") , __func__, m->server_name.len, m->server_name.s); else syslog((log_level_info[(3) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "marking for AS <%.*s>\n", ("ims_isc" " [" "isc.c" ":" "63" "]: ") , __func__, m->server_name.len, m->server_name.s); } } (dprint_crit--); } } while(0);
 isc_mark_set(msg, m, mark);
 if (msg->dst_uri.s)
  qm_free(mem_block, (msg->dst_uri.s));
 msg->dst_uri.s = qm_malloc(mem_block, (m->server_name.len));
 if (!msg->dst_uri.s) {
  do { if (get_debug_level("ims_isc", (sizeof("ims_isc")-1)) >= ((-1)) && (dprint_crit==0)) { (dprint_crit++); if (__builtin_expect(!!((((-1)) >= -5) && (((-1)) <= 3)), 1)){ if (__builtin_expect(!!(log_stderr), 0)) { if (__builtin_expect(!!(log_color), 0)) dprint_color((-1)); fprintf(stderr, "%2d(%d) %s: %s" "%s(): " "error allocating %d bytes\n", process_no, my_pid(), (log_level_info[((-1)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "71" "]: ") , __func__, m->server_name.len); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { syslog((log_level_info[((-1)) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s: %s" "%s(): " "error allocating %d bytes\n", (log_level_info[((-1)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "71" "]: ") , __func__, m->server_name.len); } } else { if (log_stderr) { if (__builtin_expect(!!(log_color), 0)) dprint_color((-1)); fprintf(stderr, "%2d(%d) %s" "%s(): " "error allocating %d bytes\n", process_no, my_pid(), ("ims_isc" " [" "isc.c" ":" "71" "]: ") , __func__, m->server_name.len); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { if (((-1))<-5) syslog((log_level_info[(-5) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "error allocating %d bytes\n", ("ims_isc" " [" "isc.c" ":" "71" "]: ") , __func__, m->server_name.len); else syslog((log_level_info[(3) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "error allocating %d bytes\n", ("ims_isc" " [" "isc.c" ":" "71" "]: ") , __func__, m->server_name.len); } } (dprint_crit--); } } while(0);
  return -3;
 }
 msg->dst_uri.len = m->server_name.len;
 memcpy(msg->dst_uri.s, m->server_name.s, m->server_name.len);
 if ((route_type & ((1 << 1))))
  append_branch(msg, &(msg->first_line.u.request.uri), &(msg->dst_uri), 0, ((qvalue_t)-1), 0, 0, 0, 0, 0, 0);
 if (isc_tmb.t_get_trans_ident(msg, &hash, &label) < 0) {
  do { if (get_debug_level("ims_isc", (sizeof("ims_isc")-1)) >= ((3)) && (dprint_crit==0)) { (dprint_crit++); if (__builtin_expect(!!((((3)) >= -5) && (((3)) <= 3)), 1)){ if (__builtin_expect(!!(log_stderr), 0)) { if (__builtin_expect(!!(log_color), 0)) dprint_color((3)); fprintf(stderr, "%2d(%d) %s: %s" "%s(): " "SIP message without transaction. OK - first request\n", process_no, my_pid(), (log_level_info[((3)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "85" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { syslog((log_level_info[((3)) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s: %s" "%s(): " "SIP message without transaction. OK - first request\n", (log_level_info[((3)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "85" "]: ") , __func__); } } else { if (log_stderr) { if (__builtin_expect(!!(log_color), 0)) dprint_color((3)); fprintf(stderr, "%2d(%d) %s" "%s(): " "SIP message without transaction. OK - first request\n", process_no, my_pid(), ("ims_isc" " [" "isc.c" ":" "85" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { if (((3))<-5) syslog((log_level_info[(-5) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "SIP message without transaction. OK - first request\n", ("ims_isc" " [" "isc.c" ":" "85" "]: ") , __func__); else syslog((log_level_info[(3) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "SIP message without transaction. OK - first request\n", ("ims_isc" " [" "isc.c" ":" "85" "]: ") , __func__); } } (dprint_crit--); } } while(0);
  if (isc_tmb.t_newtran(msg) < 0)
   do { if (get_debug_level("ims_isc", (sizeof("ims_isc")-1)) >= ((2)) && (dprint_crit==0)) { (dprint_crit++); if (__builtin_expect(!!((((2)) >= -5) && (((2)) <= 3)), 1)){ if (__builtin_expect(!!(log_stderr), 0)) { if (__builtin_expect(!!(log_color), 0)) dprint_color((2)); fprintf(stderr, "%2d(%d) %s: %s" "%s(): " "Failed creating SIP transaction\n", process_no, my_pid(), (log_level_info[((2)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "87" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { syslog((log_level_info[((2)) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s: %s" "%s(): " "Failed creating SIP transaction\n", (log_level_info[((2)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "87" "]: ") , __func__); } } else { if (log_stderr) { if (__builtin_expect(!!(log_color), 0)) dprint_color((2)); fprintf(stderr, "%2d(%d) %s" "%s(): " "Failed creating SIP transaction\n", process_no, my_pid(), ("ims_isc" " [" "isc.c" ":" "87" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { if (((2))<-5) syslog((log_level_info[(-5) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "Failed creating SIP transaction\n", ("ims_isc" " [" "isc.c" ":" "87" "]: ") , __func__); else syslog((log_level_info[(3) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "Failed creating SIP transaction\n", ("ims_isc" " [" "isc.c" ":" "87" "]: ") , __func__); } } (dprint_crit--); } } while(0);
  if (isc_tmb.t_get_trans_ident(msg, &hash, &label) < 0) {
   do { if (get_debug_level("ims_isc", (sizeof("ims_isc")-1)) >= ((2)) && (dprint_crit==0)) { (dprint_crit++); if (__builtin_expect(!!((((2)) >= -5) && (((2)) <= 3)), 1)){ if (__builtin_expect(!!(log_stderr), 0)) { if (__builtin_expect(!!(log_color), 0)) dprint_color((2)); fprintf(stderr, "%2d(%d) %s: %s" "%s(): " "SIP message still without transaction\n", process_no, my_pid(), (log_level_info[((2)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "89" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { syslog((log_level_info[((2)) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s: %s" "%s(): " "SIP message still without transaction\n", (log_level_info[((2)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "89" "]: ") , __func__); } } else { if (log_stderr) { if (__builtin_expect(!!(log_color), 0)) dprint_color((2)); fprintf(stderr, "%2d(%d) %s" "%s(): " "SIP message still without transaction\n", process_no, my_pid(), ("ims_isc" " [" "isc.c" ":" "89" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { if (((2))<-5) syslog((log_level_info[(-5) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "SIP message still without transaction\n", ("ims_isc" " [" "isc.c" ":" "89" "]: ") , __func__); else syslog((log_level_info[(3) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "SIP message still without transaction\n", ("ims_isc" " [" "isc.c" ":" "89" "]: ") , __func__); } } (dprint_crit--); } } while(0);
  } else {
   do { if (get_debug_level("ims_isc", (sizeof("ims_isc")-1)) >= ((3)) && (dprint_crit==0)) { (dprint_crit++); if (__builtin_expect(!!((((3)) >= -5) && (((3)) <= 3)), 1)){ if (__builtin_expect(!!(log_stderr), 0)) { if (__builtin_expect(!!(log_color), 0)) dprint_color((3)); fprintf(stderr, "%2d(%d) %s: %s" "%s(): " "New SIP message transaction %u %u\n", process_no, my_pid(), (log_level_info[((3)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "91" "]: ") , __func__, hash, label); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { syslog((log_level_info[((3)) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s: %s" "%s(): " "New SIP message transaction %u %u\n", (log_level_info[((3)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "91" "]: ") , __func__, hash, label); } } else { if (log_stderr) { if (__builtin_expect(!!(log_color), 0)) dprint_color((3)); fprintf(stderr, "%2d(%d) %s" "%s(): " "New SIP message transaction %u %u\n", process_no, my_pid(), ("ims_isc" " [" "isc.c" ":" "91" "]: ") , __func__, hash, label); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { if (((3))<-5) syslog((log_level_info[(-5) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "New SIP message transaction %u %u\n", ("ims_isc" " [" "isc.c" ":" "91" "]: ") , __func__, hash, label); else syslog((log_level_info[(3) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "New SIP message transaction %u %u\n", ("ims_isc" " [" "isc.c" ":" "91" "]: ") , __func__, hash, label); } } (dprint_crit--); } } while(0);
  }
 } else {
  do { if (get_debug_level("ims_isc", (sizeof("ims_isc")-1)) >= ((2)) && (dprint_crit==0)) { (dprint_crit++); if (__builtin_expect(!!((((2)) >= -5) && (((2)) <= 3)), 1)){ if (__builtin_expect(!!(log_stderr), 0)) { if (__builtin_expect(!!(log_color), 0)) dprint_color((2)); fprintf(stderr, "%2d(%d) %s: %s" "%s(): " "Transaction %u %u exists. Retransmission?\n", process_no, my_pid(), (log_level_info[((2)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "94" "]: ") , __func__, hash, label); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { syslog((log_level_info[((2)) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s: %s" "%s(): " "Transaction %u %u exists. Retransmission?\n", (log_level_info[((2)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "94" "]: ") , __func__, hash, label); } } else { if (log_stderr) { if (__builtin_expect(!!(log_color), 0)) dprint_color((2)); fprintf(stderr, "%2d(%d) %s" "%s(): " "Transaction %u %u exists. Retransmission?\n", process_no, my_pid(), ("ims_isc" " [" "isc.c" ":" "94" "]: ") , __func__, hash, label); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { if (((2))<-5) syslog((log_level_info[(-5) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "Transaction %u %u exists. Retransmission?\n", ("ims_isc" " [" "isc.c" ":" "94" "]: ") , __func__, hash, label); else syslog((log_level_info[(3) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "Transaction %u %u exists. Retransmission?\n", ("ims_isc" " [" "isc.c" ":" "94" "]: ") , __func__, hash, label); } } (dprint_crit--); } } while(0);
 }
 t = isc_tmb.t_gett();
 fr_timeout = t->fr_timeout;
 fr_inv_timeout = t->fr_inv_timeout;
 t->fr_timeout = ((isc_fr_timeout)*16U) / 1000;
 t->fr_inv_timeout = ((isc_fr_inv_timeout)*16U) / 1000;
 isc_tmb.t_relay(msg, 0, 0);
 t->fr_timeout = fr_timeout;
 t->fr_inv_timeout = fr_inv_timeout;
 do { if (get_debug_level("ims_isc", (sizeof("ims_isc")-1)) >= ((2)) && (dprint_crit==0)) { (dprint_crit++); if (__builtin_expect(!!((((2)) >= -5) && (((2)) <= 3)), 1)){ if (__builtin_expect(!!(log_stderr), 0)) { if (__builtin_expect(!!(log_color), 0)) dprint_color((2)); fprintf(stderr, "%2d(%d) %s: %s" "%s(): " ">>       msg was fwded to AS\n", process_no, my_pid(), (log_level_info[((2)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "112" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { syslog((log_level_info[((2)) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s: %s" "%s(): " ">>       msg was fwded to AS\n", (log_level_info[((2)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "112" "]: ") , __func__); } } else { if (log_stderr) { if (__builtin_expect(!!(log_color), 0)) dprint_color((2)); fprintf(stderr, "%2d(%d) %s" "%s(): " ">>       msg was fwded to AS\n", process_no, my_pid(), ("ims_isc" " [" "isc.c" ":" "112" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { if (((2))<-5) syslog((log_level_info[(-5) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " ">>       msg was fwded to AS\n", ("ims_isc" " [" "isc.c" ":" "112" "]: ") , __func__); else syslog((log_level_info[(3) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " ">>       msg was fwded to AS\n", ("ims_isc" " [" "isc.c" ":" "112" "]: ") , __func__); } } (dprint_crit--); } } while(0);
 return 1;
}

canonical_original_code:
int isc_forward(struct sip_msg *msg, struct isc_match *m, struct _isc_mark *mark) {
 struct cell *t;
 unsigned int hash; unsigned int label;
 unsigned int fr_timeout; unsigned int fr_inv_timeout;
 do { if (get_debug_level("ims_isc", (sizeof("ims_isc")-1)) >= ((3)) && (dprint_crit==0)) { (dprint_crit++); if (__builtin_expect(!!((((3)) >= -5) && (((3)) <= 3)), 1)){ if (__builtin_expect(!!(log_stderr), 0)) { if (__builtin_expect(!!(log_color), 0)) dprint_color((3)); fprintf(stderr, "%2d(%d) %s: %s" "%s(): " "marking for AS <%.*s>\n", process_no, my_pid(), (log_level_info[((3)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "63" "]: ") , __func__, m->server_name.len, m->server_name.s); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { syslog((log_level_info[((3)) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s: %s" "%s(): " "marking for AS <%.*s>\n", (log_level_info[((3)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "63" "]: ") , __func__, m->server_name.len, m->server_name.s); } } else { if (log_stderr) { if (__builtin_expect(!!(log_color), 0)) dprint_color((3)); fprintf(stderr, "%2d(%d) %s" "%s(): " "marking for AS <%.*s>\n", process_no, my_pid(), ("ims_isc" " [" "isc.c" ":" "63" "]: ") , __func__, m->server_name.len, m->server_name.s); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { if (((3))<-5) syslog((log_level_info[(-5) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "marking for AS <%.*s>\n", ("ims_isc" " [" "isc.c" ":" "63" "]: ") , __func__, m->server_name.len, m->server_name.s); else syslog((log_level_info[(3) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "marking for AS <%.*s>\n", ("ims_isc" " [" "isc.c" ":" "63" "]: ") , __func__, m->server_name.len, m->server_name.s); } } (dprint_crit--); } } while(0);
 isc_mark_set(msg, m, mark);
 if (msg->dst_uri.s)
  qm_free(mem_block, (msg->dst_uri.s));
 msg->dst_uri.s = qm_malloc(mem_block, (m->server_name.len));
 if (!msg->dst_uri.s) {
  do { if (get_debug_level("ims_isc", (sizeof("ims_isc")-1)) >= ((-1)) && (dprint_crit==0)) { (dprint_crit++); if (__builtin_expect(!!((((-1)) >= -5) && (((-1)) <= 3)), 1)){ if (__builtin_expect(!!(log_stderr), 0)) { if (__builtin_expect(!!(log_color), 0)) dprint_color((-1)); fprintf(stderr, "%2d(%d) %s: %s" "%s(): " "error allocating %d bytes\n", process_no, my_pid(), (log_level_info[((-1)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "71" "]: ") , __func__, m->server_name.len); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { syslog((log_level_info[((-1)) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s: %s" "%s(): " "error allocating %d bytes\n", (log_level_info[((-1)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "71" "]: ") , __func__, m->server_name.len); } } else { if (log_stderr) { if (__builtin_expect(!!(log_color), 0)) dprint_color((-1)); fprintf(stderr, "%2d(%d) %s" "%s(): " "error allocating %d bytes\n", process_no, my_pid(), ("ims_isc" " [" "isc.c" ":" "71" "]: ") , __func__, m->server_name.len); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { if (((-1))<-5) syslog((log_level_info[(-5) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "error allocating %d bytes\n", ("ims_isc" " [" "isc.c" ":" "71" "]: ") , __func__, m->server_name.len); else syslog((log_level_info[(3) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "error allocating %d bytes\n", ("ims_isc" " [" "isc.c" ":" "71" "]: ") , __func__, m->server_name.len); } } (dprint_crit--); } } while(0);
  return -3;
 }
 msg->dst_uri.len = m->server_name.len;
 memcpy(msg->dst_uri.s, m->server_name.s, m->server_name.len);
 if ((route_type & ((1 << 1))))
  append_branch(msg, &(msg->first_line.u.request.uri), &(msg->dst_uri), 0, ((qvalue_t)-1), 0, 0, 0, 0, 0, 0);
 if (isc_tmb.t_get_trans_ident(msg, &hash, &label) < 0) {
  do { if (get_debug_level("ims_isc", (sizeof("ims_isc")-1)) >= ((3)) && (dprint_crit==0)) { (dprint_crit++); if (__builtin_expect(!!((((3)) >= -5) && (((3)) <= 3)), 1)){ if (__builtin_expect(!!(log_stderr), 0)) { if (__builtin_expect(!!(log_color), 0)) dprint_color((3)); fprintf(stderr, "%2d(%d) %s: %s" "%s(): " "SIP message without transaction. OK - first request\n", process_no, my_pid(), (log_level_info[((3)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "85" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { syslog((log_level_info[((3)) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s: %s" "%s(): " "SIP message without transaction. OK - first request\n", (log_level_info[((3)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "85" "]: ") , __func__); } } else { if (log_stderr) { if (__builtin_expect(!!(log_color), 0)) dprint_color((3)); fprintf(stderr, "%2d(%d) %s" "%s(): " "SIP message without transaction. OK - first request\n", process_no, my_pid(), ("ims_isc" " [" "isc.c" ":" "85" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { if (((3))<-5) syslog((log_level_info[(-5) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "SIP message without transaction. OK - first request\n", ("ims_isc" " [" "isc.c" ":" "85" "]: ") , __func__); else syslog((log_level_info[(3) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "SIP message without transaction. OK - first request\n", ("ims_isc" " [" "isc.c" ":" "85" "]: ") , __func__); } } (dprint_crit--); } } while(0);
  if (isc_tmb.t_newtran(msg) < 0)
   do { if (get_debug_level("ims_isc", (sizeof("ims_isc")-1)) >= ((2)) && (dprint_crit==0)) { (dprint_crit++); if (__builtin_expect(!!((((2)) >= -5) && (((2)) <= 3)), 1)){ if (__builtin_expect(!!(log_stderr), 0)) { if (__builtin_expect(!!(log_color), 0)) dprint_color((2)); fprintf(stderr, "%2d(%d) %s: %s" "%s(): " "Failed creating SIP transaction\n", process_no, my_pid(), (log_level_info[((2)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "87" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { syslog((log_level_info[((2)) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s: %s" "%s(): " "Failed creating SIP transaction\n", (log_level_info[((2)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "87" "]: ") , __func__); } } else { if (log_stderr) { if (__builtin_expect(!!(log_color), 0)) dprint_color((2)); fprintf(stderr, "%2d(%d) %s" "%s(): " "Failed creating SIP transaction\n", process_no, my_pid(), ("ims_isc" " [" "isc.c" ":" "87" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { if (((2))<-5) syslog((log_level_info[(-5) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "Failed creating SIP transaction\n", ("ims_isc" " [" "isc.c" ":" "87" "]: ") , __func__); else syslog((log_level_info[(3) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "Failed creating SIP transaction\n", ("ims_isc" " [" "isc.c" ":" "87" "]: ") , __func__); } } (dprint_crit--); } } while(0);
  if (isc_tmb.t_get_trans_ident(msg, &hash, &label) < 0) {
   do { if (get_debug_level("ims_isc", (sizeof("ims_isc")-1)) >= ((2)) && (dprint_crit==0)) { (dprint_crit++); if (__builtin_expect(!!((((2)) >= -5) && (((2)) <= 3)), 1)){ if (__builtin_expect(!!(log_stderr), 0)) { if (__builtin_expect(!!(log_color), 0)) dprint_color((2)); fprintf(stderr, "%2d(%d) %s: %s" "%s(): " "SIP message still without transaction\n", process_no, my_pid(), (log_level_info[((2)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "89" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { syslog((log_level_info[((2)) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s: %s" "%s(): " "SIP message still without transaction\n", (log_level_info[((2)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "89" "]: ") , __func__); } } else { if (log_stderr) { if (__builtin_expect(!!(log_color), 0)) dprint_color((2)); fprintf(stderr, "%2d(%d) %s" "%s(): " "SIP message still without transaction\n", process_no, my_pid(), ("ims_isc" " [" "isc.c" ":" "89" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { if (((2))<-5) syslog((log_level_info[(-5) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "SIP message still without transaction\n", ("ims_isc" " [" "isc.c" ":" "89" "]: ") , __func__); else syslog((log_level_info[(3) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "SIP message still without transaction\n", ("ims_isc" " [" "isc.c" ":" "89" "]: ") , __func__); } } (dprint_crit--); } } while(0);
  } else {
   do { if (get_debug_level("ims_isc", (sizeof("ims_isc")-1)) >= ((3)) && (dprint_crit==0)) { (dprint_crit++); if (__builtin_expect(!!((((3)) >= -5) && (((3)) <= 3)), 1)){ if (__builtin_expect(!!(log_stderr), 0)) { if (__builtin_expect(!!(log_color), 0)) dprint_color((3)); fprintf(stderr, "%2d(%d) %s: %s" "%s(): " "New SIP message transaction %u %u\n", process_no, my_pid(), (log_level_info[((3)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "91" "]: ") , __func__, hash, label); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { syslog((log_level_info[((3)) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s: %s" "%s(): " "New SIP message transaction %u %u\n", (log_level_info[((3)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "91" "]: ") , __func__, hash, label); } } else { if (log_stderr) { if (__builtin_expect(!!(log_color), 0)) dprint_color((3)); fprintf(stderr, "%2d(%d) %s" "%s(): " "New SIP message transaction %u %u\n", process_no, my_pid(), ("ims_isc" " [" "isc.c" ":" "91" "]: ") , __func__, hash, label); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { if (((3))<-5) syslog((log_level_info[(-5) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "New SIP message transaction %u %u\n", ("ims_isc" " [" "isc.c" ":" "91" "]: ") , __func__, hash, label); else syslog((log_level_info[(3) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "New SIP message transaction %u %u\n", ("ims_isc" " [" "isc.c" ":" "91" "]: ") , __func__, hash, label); } } (dprint_crit--); } } while(0);
  }
 } else {
  do { if (get_debug_level("ims_isc", (sizeof("ims_isc")-1)) >= ((2)) && (dprint_crit==0)) { (dprint_crit++); if (__builtin_expect(!!((((2)) >= -5) && (((2)) <= 3)), 1)){ if (__builtin_expect(!!(log_stderr), 0)) { if (__builtin_expect(!!(log_color), 0)) dprint_color((2)); fprintf(stderr, "%2d(%d) %s: %s" "%s(): " "Transaction %u %u exists. Retransmission?\n", process_no, my_pid(), (log_level_info[((2)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "94" "]: ") , __func__, hash, label); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { syslog((log_level_info[((2)) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s: %s" "%s(): " "Transaction %u %u exists. Retransmission?\n", (log_level_info[((2)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "94" "]: ") , __func__, hash, label); } } else { if (log_stderr) { if (__builtin_expect(!!(log_color), 0)) dprint_color((2)); fprintf(stderr, "%2d(%d) %s" "%s(): " "Transaction %u %u exists. Retransmission?\n", process_no, my_pid(), ("ims_isc" " [" "isc.c" ":" "94" "]: ") , __func__, hash, label); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { if (((2))<-5) syslog((log_level_info[(-5) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "Transaction %u %u exists. Retransmission?\n", ("ims_isc" " [" "isc.c" ":" "94" "]: ") , __func__, hash, label); else syslog((log_level_info[(3) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "Transaction %u %u exists. Retransmission?\n", ("ims_isc" " [" "isc.c" ":" "94" "]: ") , __func__, hash, label); } } (dprint_crit--); } } while(0);
 }
 t = isc_tmb.t_gett();
 fr_timeout = t->fr_timeout;
 fr_inv_timeout = t->fr_inv_timeout;
 t->fr_timeout = ((isc_fr_timeout)*16U) / 1000;
 t->fr_inv_timeout = ((isc_fr_inv_timeout)*16U) / 1000;
 isc_tmb.t_relay(msg, 0, 0);
 t->fr_timeout = fr_timeout;
 t->fr_inv_timeout = fr_inv_timeout;
 do { if (get_debug_level("ims_isc", (sizeof("ims_isc")-1)) >= ((2)) && (dprint_crit==0)) { (dprint_crit++); if (__builtin_expect(!!((((2)) >= -5) && (((2)) <= 3)), 1)){ if (__builtin_expect(!!(log_stderr), 0)) { if (__builtin_expect(!!(log_color), 0)) dprint_color((2)); fprintf(stderr, "%2d(%d) %s: %s" "%s(): " ">>       msg was fwded to AS\n", process_no, my_pid(), (log_level_info[((2)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "112" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { syslog((log_level_info[((2)) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s: %s" "%s(): " ">>       msg was fwded to AS\n", (log_level_info[((2)) - (-5)].name), ("ims_isc" " [" "isc.c" ":" "112" "]: ") , __func__); } } else { if (log_stderr) { if (__builtin_expect(!!(log_color), 0)) dprint_color((2)); fprintf(stderr, "%2d(%d) %s" "%s(): " ">>       msg was fwded to AS\n", process_no, my_pid(), ("ims_isc" " [" "isc.c" ":" "112" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { if (((2))<-5) syslog((log_level_info[(-5) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " ">>       msg was fwded to AS\n", ("ims_isc" " [" "isc.c" ":" "112" "]: ") , __func__); else syslog((log_level_info[(3) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " ">>       msg was fwded to AS\n", ("ims_isc" " [" "isc.c" ":" "112" "]: ") , __func__); } } (dprint_crit--); } } while(0);
 return 1;
}

variable_types: struct sip_msg { unsigned int id; int pid; struct timeval { long tv_sec; long tv_usec; } tval; struct snd_flags { unsigned char f; unsigned char blst_imask; } fwd_send_flags; struct snd_flags rpl_send_flags; struct msg_start { int type; int len; union { struct { struct _str { char *s; int len; } method; struct _str uri; struct _str version; int method_value; } request; struct { struct _str version; struct _str status; struct _str reason; unsigned int statuscode; } reply; } u; } first_line; struct via_body { int error; struct _str hdr; struct _str name; struct _str version; struct _str transport; struct _str host; short proto; unsigned short port; struct _str port_str; struct _str params; struct _str comment; int bsize; struct via_param { int type; struct _str name; struct _str value; char *start; int size; struct via_param *next; } *param_lst; struct via_param *last_param; struct via_param *branch; struct _str tid; struct via_param *received; struct via_param *rport; struct via_param *i; struct via_param *alias; struct via_body *next; } *via1; struct via_body *via2; struct hdr_field { enum _hdr_types_t { HDR_ERROR_T=-1, HDR_OTHER_T=0, HDR_VIA_T=1, HDR_VIA1_T=1, HDR_VIA2_T=2, HDR_TO_T=3, HDR_FROM_T=4, HDR_CSEQ_T=5, HDR_CALLID_T=6, HDR_CONTACT_T=7, HDR_MAXFORWARDS_T=8, HDR_ROUTE_T=9, HDR_RECORDROUTE_T=10, HDR_CONTENTTYPE_T=11, HDR_CONTENTLENGTH_T=12, HDR_AUTHORIZATION_T=13, HDR_EXPIRES_T=14, HDR_PROXYAUTH_T=15, HDR_SUPPORTED_T=16, HDR_REQUIRE_T=17, HDR_PROXYREQUIRE_T=18, HDR_UNSUPPORTED_T=19, HDR_ALLOW_T=20, HDR_EVENT_T=21, HDR_ACCEPT_T=22, HDR_ACCEPTLANGUAGE_T=23, HDR_ORGANIZATION_T=24, HDR_PRIORITY_T=25, HDR_SUBJECT_T=26, HDR_USERAGENT_T=27, HDR_SERVER_T=28, HDR_CONTENTDISPOSITION_T=29, HDR_DIVERSION_T=30, HDR_RPID_T=31, HDR_REFER_TO_T=32, HDR_SIPIFMATCH_T=33, HDR_SESSIONEXPIRES_T=34, HDR_MIN_SE_T=35, HDR_SUBSCRIPTION_STATE_T=36, HDR_ACCEPTCONTACT_T=37, HDR_ALLOWEVENTS_T=38, HDR_CONTENTENCODING_T=39, HDR_REFERREDBY_T=40, HDR_REJECTCONTACT_T=41, HDR_REQUESTDISPOSITION_T=42, HDR_WWW_AUTHENTICATE_T=43, HDR_PROXY_AUTHENTICATE_T=44, HDR_DATE_T=45, HDR_IDENTITY_T=46, HDR_IDENTITY_INFO_T=47, HDR_RETRY_AFTER_T=48, HDR_PPI_T=49, HDR_PAI_T=50, HDR_PATH_T=51, HDR_PRIVACY_T=52, HDR_REASON_T=53, HDR_EOH_T=54 } type; struct _str name; struct _str body; int len; void *parsed; struct hdr_field *next; } *headers; struct hdr_field *last_header; unsigned long long parsed_flag; struct hdr_field *h_via1; struct hdr_field *h_via2; struct hdr_field *callid; struct hdr_field *to; struct hdr_field *cseq; struct hdr_field *from; struct hdr_field *contact; struct hdr_field *maxforwards; struct hdr_field *route; struct hdr_field *record_route; struct hdr_field *content_type; struct hdr_field *content_length; struct hdr_field *authorization; struct hdr_field *expires; struct hdr_field *proxy_auth; struct hdr_field *supported; struct hdr_field *require; struct hdr_field *proxy_require; struct hdr_field *unsupported; struct hdr_field *allow; struct hdr_field *event; struct hdr_field *accept; struct hdr_field *accept_language; struct hdr_field *organization; struct hdr_field *priority; struct hdr_field *subject; struct hdr_field *user_agent; struct hdr_field *server; struct hdr_field *content_disposition; struct hdr_field *diversion; struct hdr_field *rpid; struct hdr_field *refer_to; struct hdr_field *session_expires; struct hdr_field *min_se; struct hdr_field *sipifmatch; struct hdr_field *subscription_state; struct hdr_field *date; struct hdr_field *identity; struct hdr_field *identity_info; struct hdr_field *pai; struct hdr_field *ppi; struct hdr_field *path; struct hdr_field *privacy; struct msg_body { enum msg_body_type { MSG_BODY_UNKNOWN=0, MSG_BODY_SDP=1 } type; void (*free)(struct msg_body **ptr); } *body; char *eoh; char *unparsed; struct receive_info { struct ip_addr { unsigned int af; unsigned int len; union { unsigned long addrl[-1]; unsigned int addr32[4]; unsigned short addr16[8]; unsigned char addr[16]; } u; } src_ip; struct ip_addr dst_ip; unsigned short src_port; unsigned short dst_port; int proto_reserved1; int proto_reserved2; union sockaddr_union { struct sockaddr { unsigned short sa_family; char sa_data[14]; } s; struct sockaddr_in { unsigned short sin_family; unsigned short sin_port; struct in_addr { unsigned int s_addr; } sin_addr; unsigned char sin_zero[-1]; } sin; struct sockaddr_in6 { unsigned short sin6_family; unsigned short sin6_port; unsigned int sin6_flowinfo; struct in6_addr { union { unsigned char __u6_addr8[16]; unsigned short __u6_addr16[8]; unsigned int __u6_addr32[4]; } __in6_u; } sin6_addr; unsigned int sin6_scope_id; } sin6; } src_su; struct socket_info { int socket; struct _str name; struct ip_addr address; struct _str address_str; struct _str port_no_str; enum si_flags { SI_NONE=0, SI_IS_IP=1, SI_IS_LO=2, SI_IS_MCAST=4, SI_IS_ANY=8, SI_IS_MHOMED=16 } flags; union sockaddr_union su; struct socket_info *next; struct socket_info *prev; unsigned short port_no; char proto; struct _str sock_str; struct addr_info { struct _str name; struct ip_addr address; struct _str address_str; enum si_flags { SI_NONE=0, SI_IS_IP=1, SI_IS_LO=2, SI_IS_MCAST=4, SI_IS_ANY=8, SI_IS_MHOMED=16 } flags; union sockaddr_union su; struct addr_info *next; struct addr_info *prev; } *addr_info_lst; int workers; int workers_tcpidx; struct advertise_info { struct _str name; unsigned short port_no; struct _str port_no_str; struct _str address_str; struct ip_addr address; struct _str sock_str; } useinfo; } *bind_address; char proto; } rcv; char *buf; unsigned int len; struct _str new_uri; struct _str dst_uri; int parsed_uri_ok; struct sip_uri { struct _str user; struct _str passwd; struct _str host; struct _str port; struct _str params; struct _str sip_params; struct _str headers; unsigned short port_no; unsigned short proto; enum _uri_type { ERROR_URI_T=0, SIP_URI_T=1, SIPS_URI_T=2, TEL_URI_T=3, TELS_URI_T=4, URN_URI_T=5 } type; enum _uri_flags { URI_USER_NORMALIZE=1, URI_SIP_USER_PHONE=2 } flags; struct _str transport; struct _str ttl; struct _str user_param; struct _str maddr; struct _str method; struct _str lr; struct _str r2; struct _str gr; struct _str transport_val; struct _str ttl_val; struct _str user_param_val; struct _str maddr_val; struct _str method_val; struct _str lr_val; struct _str r2_val; struct _str gr_val; } parsed_uri; int parsed_orig_ruri_ok; struct sip_uri parsed_orig_ruri; struct lump { enum _hdr_types_t { HDR_ERROR_T=-1, HDR_OTHER_T=0, HDR_VIA_T=1, HDR_VIA1_T=1, HDR_VIA2_T=2, HDR_TO_T=3, HDR_FROM_T=4, HDR_CSEQ_T=5, HDR_CALLID_T=6, HDR_CONTACT_T=7, HDR_MAXFORWARDS_T=8, HDR_ROUTE_T=9, HDR_RECORDROUTE_T=10, HDR_CONTENTTYPE_T=11, HDR_CONTENTLENGTH_T=12, HDR_AUTHORIZATION_T=13, HDR_EXPIRES_T=14, HDR_PROXYAUTH_T=15, HDR_SUPPORTED_T=16, HDR_REQUIRE_T=17, HDR_PROXYREQUIRE_T=18, HDR_UNSUPPORTED_T=19, HDR_ALLOW_T=20, HDR_EVENT_T=21, HDR_ACCEPT_T=22, HDR_ACCEPTLANGUAGE_T=23, HDR_ORGANIZATION_T=24, HDR_PRIORITY_T=25, HDR_SUBJECT_T=26, HDR_USERAGENT_T=27, HDR_SERVER_T=28, HDR_CONTENTDISPOSITION_T=29, HDR_DIVERSION_T=30, HDR_RPID_T=31, HDR_REFER_TO_T=32, HDR_SIPIFMATCH_T=33, HDR_SESSIONEXPIRES_T=34, HDR_MIN_SE_T=35, HDR_SUBSCRIPTION_STATE_T=36, HDR_ACCEPTCONTACT_T=37, HDR_ALLOWEVENTS_T=38, HDR_CONTENTENCODING_T=39, HDR_REFERREDBY_T=40, HDR_REJECTCONTACT_T=41, HDR_REQUESTDISPOSITION_T=42, HDR_WWW_AUTHENTICATE_T=43, HDR_PROXY_AUTHENTICATE_T=44, HDR_DATE_T=45, HDR_IDENTITY_T=46, HDR_IDENTITY_INFO_T=47, HDR_RETRY_AFTER_T=48, HDR_PPI_T=49, HDR_PAI_T=50, HDR_PATH_T=51, HDR_PRIVACY_T=52, HDR_REASON_T=53, HDR_EOH_T=54 } type; enum lump_op { LUMP_NOP=0, LUMP_DEL=1, LUMP_ADD=2, LUMP_ADD_SUBST=3, LUMP_ADD_OPT=4 } op; union { int offset; enum lump_subst { SUBST_NOP=0, SUBST_RCV_IP=1, SUBST_SND_IP=2, SUBST_RCV_PORT=3, SUBST_SND_PORT=4, SUBST_RCV_PROTO=5, SUBST_SND_PROTO=6, SUBST_RCV_ALL=7, SUBST_SND_ALL=8 } subst; enum lump_conditions { COND_FALSE=0, COND_TRUE=1, COND_IF_DIFF_REALMS=2, COND_IF_DIFF_AF=3, COND_IF_DIFF_PROTO=4, COND_IF_DIFF_PORT=5, COND_IF_DIFF_IP=6, COND_IF_RAND=7 } cond; char *value; } u; int len; struct lump *before; struct lump *after; struct lump *next; enum lump_flag { LUMPFLAG_NONE=0, LUMPFLAG_DUPED=1, LUMPFLAG_SHMEM=2, LUMPFLAG_BRANCH=4, LUMPFLAG_COND_TRUE=8 } flags; } *add_rm; struct lump *body_lumps; struct lump_rpl { struct _str text; int flags; struct lump_rpl *next; } *reply_lump; char add_to_branch_s[-1]; int add_to_branch_len; unsigned int hash_index; unsigned int msg_flags; unsigned int flags; struct _str set_global_address; struct _str set_global_port; struct socket_info *force_send_socket; struct _str path_vec; struct _str instance; unsigned int reg_id; struct _str ruid; struct _str location_ua; struct msg_ldata { struct ocd_flow { int decoded; struct receive_info rcv; } flow; } ldv; } *

variable_types: struct isc_match { struct _str server_name; char default_handling; struct _str service_info; int index; } *

variable_types: struct _isc_mark { int skip; char handling; char direction; struct _str aor; } *

variable_types: struct cell { struct cell *next_c; struct cell *prev_c; unsigned int hash_index; unsigned int label; unsigned short flags; short nr_of_outgoings; struct atomic_t { int val; } ref_count; struct _str { char *s; int len; } from; struct _str method; struct tmcb_head_list { struct tm_callback { int id; int types; void (*callback)(struct cell *t, int type, struct tmcb_params { struct sip_msg { unsigned int id; int pid; struct timeval { long tv_sec; long tv_usec; } tval; struct snd_flags { unsigned char f; unsigned char blst_imask; } fwd_send_flags; struct snd_flags rpl_send_flags; struct msg_start { int type; int len; union { struct { struct _str method; struct _str uri; struct _str version; int method_value; } request; struct { struct _str version; struct _str status; struct _str reason; unsigned int statuscode; } reply; } u; } first_line; struct via_body { int error; struct _str hdr; struct _str name; struct _str version; struct _str transport; struct _str host; short proto; unsigned short port; struct _str port_str; struct _str params; struct _str comment; int bsize; struct via_param { int type; struct _str name; struct _str value; char *start; int size; struct via_param *next; } *param_lst; struct via_param *last_param; struct via_param *branch; struct _str tid; struct via_param *received; struct via_param *rport; struct via_param *i; struct via_param *alias; struct via_body *next; } *via1; struct via_body *via2; struct hdr_field { enum _hdr_types_t { HDR_ERROR_T=-1, HDR_OTHER_T=0, HDR_VIA_T=1, HDR_VIA1_T=1, HDR_VIA2_T=2, HDR_TO_T=3, HDR_FROM_T=4, HDR_CSEQ_T=5, HDR_CALLID_T=6, HDR_CONTACT_T=7, HDR_MAXFORWARDS_T=8, HDR_ROUTE_T=9, HDR_RECORDROUTE_T=10, HDR_CONTENTTYPE_T=11, HDR_CONTENTLENGTH_T=12, HDR_AUTHORIZATION_T=13, HDR_EXPIRES_T=14, HDR_PROXYAUTH_T=15, HDR_SUPPORTED_T=16, HDR_REQUIRE_T=17, HDR_PROXYREQUIRE_T=18, HDR_UNSUPPORTED_T=19, HDR_ALLOW_T=20, HDR_EVENT_T=21, HDR_ACCEPT_T=22, HDR_ACCEPTLANGUAGE_T=23, HDR_ORGANIZATION_T=24, HDR_PRIORITY_T=25, HDR_SUBJECT_T=26, HDR_USERAGENT_T=27, HDR_SERVER_T=28, HDR_CONTENTDISPOSITION_T=29, HDR_DIVERSION_T=30, HDR_RPID_T=31, HDR_REFER_TO_T=32, HDR_SIPIFMATCH_T=33, HDR_SESSIONEXPIRES_T=34, HDR_MIN_SE_T=35, HDR_SUBSCRIPTION_STATE_T=36, HDR_ACCEPTCONTACT_T=37, HDR_ALLOWEVENTS_T=38, HDR_CONTENTENCODING_T=39, HDR_REFERREDBY_T=40, HDR_REJECTCONTACT_T=41, HDR_REQUESTDISPOSITION_T=42, HDR_WWW_AUTHENTICATE_T=43, HDR_PROXY_AUTHENTICATE_T=44, HDR_DATE_T=45, HDR_IDENTITY_T=46, HDR_IDENTITY_INFO_T=47, HDR_RETRY_AFTER_T=48, HDR_PPI_T=49, HDR_PAI_T=50, HDR_PATH_T=51, HDR_PRIVACY_T=52, HDR_REASON_T=53, HDR_EOH_T=54 } type; struct _str name; struct _str body; int len; void *parsed; struct hdr_field *next; } *headers; struct hdr_field *last_header; unsigned long long parsed_flag; struct hdr_field *h_via1; struct hdr_field *h_via2; struct hdr_field *callid; struct hdr_field *to; struct hdr_field *cseq; struct hdr_field *from; struct hdr_field *contact; struct hdr_field *maxforwards; struct hdr_field *route; struct hdr_field *record_route; struct hdr_field *content_type; struct hdr_field *content_length; struct hdr_field *authorization; struct hdr_field *expires; struct hdr_field *proxy_auth; struct hdr_field *supported; struct hdr_field *require; struct hdr_field *proxy_require; struct hdr_field *unsupported; struct hdr_field *allow; struct hdr_field *event; struct hdr_field *accept; struct hdr_field *accept_language; struct hdr_field *organization; struct hdr_field *priority; struct hdr_field *subject; struct hdr_field *user_agent; struct hdr_field *server; struct hdr_field *content_disposition; struct hdr_field *diversion; struct hdr_field *rpid; struct hdr_field *refer_to; struct hdr_field *session_expires; struct hdr_field *min_se; struct hdr_field *sipifmatch; struct hdr_field *subscription_state; struct hdr_field *date; struct hdr_field *identity; struct hdr_field *identity_info; struct hdr_field *pai; struct hdr_field *ppi; struct hdr_field *path; struct hdr_field *privacy; struct msg_body { enum msg_body_type { MSG_BODY_UNKNOWN=0, MSG_BODY_SDP=1 } type; void (*free)(struct msg_body **ptr); } *body; char *eoh; char *unparsed; struct receive_info { struct ip_addr { unsigned int af; unsigned int len; union { unsigned long addrl[-1]; unsigned int addr32[4]; unsigned short addr16[8]; unsigned char addr[16]; } u; } src_ip; struct ip_addr dst_ip; unsigned short src_port; unsigned short dst_port; int proto_reserved1; int proto_reserved2; union sockaddr_union { struct sockaddr { unsigned short sa_family; char sa_data[14]; } s; struct sockaddr_in { unsigned short sin_family; unsigned short sin_port; struct in_addr { unsigned int s_addr; } sin_addr; unsigned char sin_zero[-1]; } sin; struct sockaddr_in6 { unsigned short sin6_family; unsigned short sin6_port; unsigned int sin6_flowinfo; struct in6_addr { union { unsigned char __u6_addr8[16]; unsigned short __u6_addr16[8]; unsigned int __u6_addr32[4]; } __in6_u; } sin6_addr; unsigned int sin6_scope_id; } sin6; } src_su; struct socket_info { int socket; struct _str name; struct ip_addr address; struct _str address_str; struct _str port_no_str; enum si_flags { SI_NONE=0, SI_IS_IP=1, SI_IS_LO=2, SI_IS_MCAST=4, SI_IS_ANY=8, SI_IS_MHOMED=16 } flags; union sockaddr_union su; struct socket_info *next; struct socket_info *prev; unsigned short port_no; char proto; struct _str sock_str; struct addr_info { struct _str name; struct ip_addr address; struct _str address_str; enum si_flags { SI_NONE=0, SI_IS_IP=1, SI_IS_LO=2, SI_IS_MCAST=4, SI_IS_ANY=8, SI_IS_MHOMED=16 } flags; union sockaddr_union su; struct addr_info *next; struct addr_info *prev; } *addr_info_lst; int workers; int workers_tcpidx; struct advertise_info { struct _str name; unsigned short port_no; struct _str port_no_str; struct _str address_str; struct ip_addr address; struct _str sock_str; } useinfo; } *bind_address; char proto; } rcv; char *buf; unsigned int len; struct _str new_uri; struct _str dst_uri; int parsed_uri_ok; struct sip_uri { struct _str user; struct _str passwd; struct _str host; struct _str port; struct _str params; struct _str sip_params; struct _str headers; unsigned short port_no; unsigned short proto; enum _uri_type { ERROR_URI_T=0, SIP_URI_T=1, SIPS_URI_T=2, TEL_URI_T=3, TELS_URI_T=4, URN_URI_T=5 } type; enum _uri_flags { URI_USER_NORMALIZE=1, URI_SIP_USER_PHONE=2 } flags; struct _str transport; struct _str ttl; struct _str user_param; struct _str maddr; struct _str method; struct _str lr; struct _str r2; struct _str gr; struct _str transport_val; struct _str ttl_val; struct _str user_param_val; struct _str maddr_val; struct _str method_val; struct _str lr_val; struct _str r2_val; struct _str gr_val; } parsed_uri; int parsed_orig_ruri_ok; struct sip_uri parsed_orig_ruri; struct lump { enum _hdr_types_t { HDR_ERROR_T=-1, HDR_OTHER_T=0, HDR_VIA_T=1, HDR_VIA1_T=1, HDR_VIA2_T=2, HDR_TO_T=3, HDR_FROM_T=4, HDR_CSEQ_T=5, HDR_CALLID_T=6, HDR_CONTACT_T=7, HDR_MAXFORWARDS_T=8, HDR_ROUTE_T=9, HDR_RECORDROUTE_T=10, HDR_CONTENTTYPE_T=11, HDR_CONTENTLENGTH_T=12, HDR_AUTHORIZATION_T=13, HDR_EXPIRES_T=14, HDR_PROXYAUTH_T=15, HDR_SUPPORTED_T=16, HDR_REQUIRE_T=17, HDR_PROXYREQUIRE_T=18, HDR_UNSUPPORTED_T=19, HDR_ALLOW_T=20, HDR_EVENT_T=21, HDR_ACCEPT_T=22, HDR_ACCEPTLANGUAGE_T=23, HDR_ORGANIZATION_T=24, HDR_PRIORITY_T=25, HDR_SUBJECT_T=26, HDR_USERAGENT_T=27, HDR_SERVER_T=28, HDR_CONTENTDISPOSITION_T=29, HDR_DIVERSION_T=30, HDR_RPID_T=31, HDR_REFER_TO_T=32, HDR_SIPIFMATCH_T=33, HDR_SESSIONEXPIRES_T=34, HDR_MIN_SE_T=35, HDR_SUBSCRIPTION_STATE_T=36, HDR_ACCEPTCONTACT_T=37, HDR_ALLOWEVENTS_T=38, HDR_CONTENTENCODING_T=39, HDR_REFERREDBY_T=40, HDR_REJECTCONTACT_T=41, HDR_REQUESTDISPOSITION_T=42, HDR_WWW_AUTHENTICATE_T=43, HDR_PROXY_AUTHENTICATE_T=44, HDR_DATE_T=45, HDR_IDENTITY_T=46, HDR_IDENTITY_INFO_T=47, HDR_RETRY_AFTER_T=48, HDR_PPI_T=49, HDR_PAI_T=50, HDR_PATH_T=51, HDR_PRIVACY_T=52, HDR_REASON_T=53, HDR_EOH_T=54 } type; enum lump_op { LUMP_NOP=0, LUMP_DEL=1, LUMP_ADD=2, LUMP_ADD_SUBST=3, LUMP_ADD_OPT=4 } op; union { int offset; enum lump_subst { SUBST_NOP=0, SUBST_RCV_IP=1, SUBST_SND_IP=2, SUBST_RCV_PORT=3, SUBST_SND_PORT=4, SUBST_RCV_PROTO=5, SUBST_SND_PROTO=6, SUBST_RCV_ALL=7, SUBST_SND_ALL=8 } subst; enum lump_conditions { COND_FALSE=0, COND_TRUE=1, COND_IF_DIFF_REALMS=2, COND_IF_DIFF_AF=3, COND_IF_DIFF_PROTO=4, COND_IF_DIFF_PORT=5, COND_IF_DIFF_IP=6, COND_IF_RAND=7 } cond; char *value; } u; int len; struct lump *before; struct lump *after; struct lump *next; enum lump_flag { LUMPFLAG_NONE=0, LUMPFLAG_DUPED=1, LUMPFLAG_SHMEM=2, LUMPFLAG_BRANCH=4, LUMPFLAG_COND_TRUE=8 } flags; } *add_rm; struct lump *body_lumps; struct lump_rpl { struct _str text; int flags; struct lump_rpl *next; } *reply_lump; char add_to_branch_s[-1]; int add_to_branch_len; unsigned int hash_index; unsigned int msg_flags; unsigned int flags; struct _str set_global_address; struct _str set_global_port; struct socket_info *force_send_socket; struct _str path_vec; struct _str instance; unsigned int reg_id; struct _str ruid; struct _str location_ua; struct msg_ldata { struct ocd_flow { int decoded; struct receive_info rcv; } flow; } ldv; } *req; struct sip_msg *rpl; void **param; int code; unsigned short flags; unsigned short branch; struct retr_buf { short activ_type; unsigned short flags; unsigned char t_active; unsigned short branch; int buffer_len; char *buffer; struct cell *my_T; struct timer_ln { struct timer_ln *next; struct timer_ln *prev; unsigned int expire; unsigned int initial_timeout; void *data; unsigned int (*f)(unsigned int t, struct timer_ln *tl, void *data); unsigned short flags; unsigned short slow_idx; } timer; struct dest_info { struct socket_info *send_sock; union sockaddr_union to; int id; char proto; struct snd_flags send_flags; } dst; unsigned int retr_expire; unsigned int fr_expire; } *t_rbuf; struct dest_info *dst; struct _str send_buf; } *); void *param; void (*release)(void *param); struct tm_callback *next; } *first; int reg_types; } tmcb_hl; struct timer_ln wait_timer; struct ua_server { struct sip_msg *request; char *end_request; struct retr_buf response; struct _str local_totag; struct cancel_reason { short cause; union { struct _str text; struct sip_msg *e2e_cancel; struct _str packed_hdrs; } u; } *cancel_reas; unsigned int status; } uas; struct ua_client { struct sip_msg *reply; struct retr_buf request; struct retr_buf local_cancel; struct dns_srv_handle { struct dns_hash_entry { struct dns_hash_entry *next; struct dns_hash_entry *prev; struct dns_lu_lst { struct dns_lu_lst *next; struct dns_lu_lst *prev; } last_used_lst; struct dns_rr { struct dns_rr *next; void *rdata; unsigned int expire; } *rr_lst; struct atomic_t refcnt; unsigned int last_used; unsigned int expire; int total_size; unsigned short type; unsigned char ent_flags; unsigned char name_len; char name[1]; } *srv; struct dns_hash_entry *a; unsigned short srv_tried_rrs; unsigned short port; unsigned char srv_no; unsigned char ip_no; unsigned char proto; } dns_h; struct _str uri; struct _str path; struct _str instance; struct _str ruid; struct _str location_ua; int last_received; unsigned int flags; unsigned int branch_flags; int icode; struct retr_buf *local_ack; unsigned short on_failure; unsigned short on_branch_failure; unsigned short on_reply; unsigned short on_unused; } uac[12]; struct async_state { unsigned int backup_route; unsigned int backup_branch; unsigned int blind_uac; unsigned int ruri_new; } async_backup; struct totag_elem { struct totag_elem *next; struct _str tag; int acked; } *fwded_totags; struct usr_avp { unsigned short id; unsigned int flags; struct usr_avp *next; union usr_avp_data { void *p; long l; char data[-1]; } d; } *uri_avps_from; struct usr_avp *uri_avps_to; struct usr_avp *user_avps_from; struct usr_avp *user_avps_to; struct usr_avp *domain_avps_from; struct usr_avp *domain_avps_to; struct _sr_xavp { unsigned int id; struct _str name; struct _sr_xval { enum sr_xtype_t { SR_XTYPE_NULL=0, SR_XTYPE_INT=1, SR_XTYPE_STR=2, SR_XTYPE_TIME=3, SR_XTYPE_LONG=4, SR_XTYPE_LLONG=5, SR_XTYPE_XAVP=6, SR_XTYPE_DATA=7 } type; union { int i; struct _str s; long t; long l; long long ll; struct _sr_xavp *xavp; struct _sr_data { void *p; void (*pfree)(void *d, void (*sfree)(void *d)); } *data; } v; } val; struct _sr_xavp *next; } *xavps_list; struct atomic_t reply_mutex; struct atomic_t async_mutex; unsigned int fr_timeout; unsigned int fr_inv_timeout; unsigned short rt_t1_timeout_ms; unsigned short rt_t2_timeout_ms; unsigned int end_of_life; short relayed_reply_branch; unsigned short on_failure; unsigned short on_branch_failure; unsigned short on_reply; unsigned short on_branch; char md5[]; } *

variable_types:
hash
unsigned int

variable_types:
label
unsigned int

user_defined_types: struct sip_msg { unsigned int id; int pid; struct timeval tval; struct snd_flags fwd_send_flags; struct snd_flags rpl_send_flags; struct msg_start first_line; struct via_body *via1; struct via_body *via2; struct hdr_field *headers; struct hdr_field *last_header; unsigned long long parsed_flag; struct hdr_field *h_via1; struct hdr_field *h_via2; struct hdr_field *callid; struct hdr_field *to; struct hdr_field *cseq; struct hdr_field *from; struct hdr_field *contact; struct hdr_field *maxforwards; struct hdr_field *route; struct hdr_field *record_route; struct hdr_field *content_type; struct hdr_field *content_length; struct hdr_field *authorization; struct hdr_field *expires; struct hdr_field *proxy_auth; struct hdr_field *supported; struct hdr_field *require; struct hdr_field *proxy_require; struct hdr_field *unsupported; struct hdr_field *allow; struct hdr_field *event; struct hdr_field *accept; struct hdr_field *accept_language; struct hdr_field *organization; struct hdr_field *priority; struct hdr_field *subject; struct hdr_field *user_agent; struct hdr_field *server; struct hdr_field *content_disposition; struct hdr_field *diversion; struct hdr_field *rpid; struct hdr_field *refer_to; struct hdr_field *session_expires; struct hdr_field *min_se; struct hdr_field *sipifmatch; struct hdr_field *subscription_state; struct hdr_field *date; struct hdr_field *identity; struct hdr_field *identity_info; struct hdr_field *pai; struct hdr_field *ppi; struct hdr_field *path; struct hdr_field *privacy; struct msg_body *body; char *eoh; char *unparsed; struct receive_info rcv; char *buf; unsigned int len; struct _str new_uri; struct _str dst_uri; int parsed_uri_ok; struct sip_uri parsed_uri; int parsed_orig_ruri_ok; struct sip_uri parsed_orig_ruri; struct lump *add_rm; struct lump *body_lumps; struct lump_rpl *reply_lump; char add_to_branch_s[-1]; int add_to_branch_len; unsigned int hash_index; unsigned int msg_flags; unsigned int flags; struct _str set_global_address; struct _str set_global_port; struct socket_info *force_send_socket; struct _str path_vec; struct _str instance; unsigned int reg_id; struct _str ruid; struct _str location_ua; struct msg_ldata ldv; }

user_defined_types: struct cell { struct cell *next_c; struct cell *prev_c; unsigned int hash_index; unsigned int label; unsigned short flags; short nr_of_outgoings; struct atomic_t ref_count; struct _str from; struct _str method; struct tmcb_head_list tmcb_hl; struct timer_ln wait_timer; struct ua_server uas; struct ua_client uac[12]; struct async_state async_backup; struct totag_elem *fwded_totags; struct usr_avp *uri_avps_from; struct usr_avp *uri_avps_to; struct usr_avp *user_avps_from; struct usr_avp *user_avps_to; struct usr_avp *domain_avps_from; struct usr_avp *domain_avps_to; struct _sr_xavp *xavps_list; struct atomic_t reply_mutex; struct atomic_t async_mutex; unsigned int fr_timeout; unsigned int fr_inv_timeout; unsigned short rt_t1_timeout_ms; unsigned short rt_t2_timeout_ms; unsigned int end_of_life; short relayed_reply_branch; unsigned short on_failure; unsigned short on_branch_failure; unsigned short on_reply; unsigned short on_branch; char md5[]; }

user_defined_types: struct receive_info { struct ip_addr src_ip; struct ip_addr dst_ip; unsigned short src_port; unsigned short dst_port; int proto_reserved1; int proto_reserved2; union sockaddr_union src_su; struct socket_info *bind_address; char proto; }

user_defined_types: struct sip_uri { struct _str user; struct _str passwd; struct _str host; struct _str port; struct _str params; struct _str sip_params; struct _str headers; unsigned short port_no; unsigned short proto; enum _uri_type type; enum _uri_flags flags; struct _str transport; struct _str ttl; struct _str user_param; struct _str maddr; struct _str method; struct _str lr; struct _str r2; struct _str gr; struct _str transport_val; struct _str ttl_val; struct _str user_param_val; struct _str maddr_val; struct _str method_val; struct _str lr_val; struct _str r2_val; struct _str gr_val; }

user_defined_types: struct msg_ldata { struct ocd_flow flow; }

user_defined_types: struct tmcb_head_list { struct tm_callback *first; int reg_types; }

user_defined_types: struct ua_server { struct sip_msg *request; char *end_request; struct retr_buf response; struct _str local_totag; struct cancel_reason *cancel_reas; unsigned int status; }

user_defined_types: struct via_body { int error; struct _str hdr; struct _str name; struct _str version; struct _str transport; struct _str host; short proto; unsigned short port; struct _str port_str; struct _str params; struct _str comment; int bsize; struct via_param *param_lst; struct via_param *last_param; struct via_param *branch; struct _str tid; struct via_param *received; struct via_param *rport; struct via_param *i; struct via_param *alias; struct via_body *next; }

user_defined_types: struct hdr_field { enum _hdr_types_t type; struct _str name; struct _str body; int len; void *parsed; struct hdr_field *next; }

user_defined_types: struct msg_body { enum msg_body_type type; void (*free)(struct msg_body **ptr); }

user_defined_types: struct lump { enum _hdr_types_t type; enum lump_op op; union { int offset; enum lump_subst subst; enum lump_conditions cond; char *value; } u; int len; struct lump *before; struct lump *after; struct lump *next; enum lump_flag flags; }

user_defined_types: struct ua_client { struct sip_msg *reply; struct retr_buf request; struct retr_buf local_cancel; struct dns_srv_handle dns_h; struct _str uri; struct _str path; struct _str instance; struct _str ruid; struct _str location_ua; int last_received; unsigned int flags; unsigned int branch_flags; int icode; struct retr_buf *local_ack; unsigned short on_failure; unsigned short on_branch_failure; unsigned short on_reply; unsigned short on_unused; }

user_defined_types: struct usr_avp { unsigned short id; unsigned int flags; struct usr_avp *next; union usr_avp_data d; }

user_defined_types: struct _sr_xavp { unsigned int id; struct _str name; struct _sr_xval val; struct _sr_xavp *next; }

user_defined_types: struct tm_callback { int id; int types; void (*callback)(struct cell *t, int type, struct tmcb_params *); void *param; void (*release)(void *param); struct tm_callback *next; }

user_defined_types: struct dns_srv_handle { struct dns_hash_entry *srv; struct dns_hash_entry *a; unsigned short srv_tried_rrs; unsigned short port; unsigned char srv_no; unsigned char ip_no; unsigned char proto; }

user_defined_types: struct _sr_xval { enum sr_xtype_t type; union { int i; struct _str s; long t; long l; long long ll; struct _sr_xavp *xavp; struct _sr_data *data; } v; }

user_defined_types: struct dns_hash_entry { struct dns_hash_entry *next; struct dns_hash_entry *prev; struct dns_lu_lst last_used_lst; struct dns_rr *rr_lst; struct atomic_t refcnt; unsigned int last_used; unsigned int expire; int total_size; unsigned short type; unsigned char ent_flags; unsigned char name_len; char name[1]; }

user_defined_types: struct tmcb_params { struct sip_msg *req; struct sip_msg *rpl; void **param; int code; unsigned short flags; unsigned short branch; struct retr_buf *t_rbuf; struct dest_info *dst; struct _str send_buf; }

user_defined_types: struct retr_buf { short activ_type; unsigned short flags; unsigned char t_active; unsigned short branch; int buffer_len; char *buffer; struct cell *my_T; struct timer_ln timer; struct dest_info dst; unsigned int retr_expire; unsigned int fr_expire; }


repo: virtualolson/who

decompiled_code:
__int64 __fastcall atomic_get_and_set_int(volatile __int32 *a1, __int32 a2)
{
return (unsigned int)_InterlockedExchange(a1, a2);
}

canonical_decompiled_code:
__int64 __fastcall func0(volatile __int32 *a1, __int32 a2)
{
return (unsigned int)_InterlockedExchange(a1, a2);
}

original_code: inline static int atomic_get_and_set_int(volatile int* var, int v) { asm volatile( "xchgl %1, %0" " \n\t" : "+q"(v), "=m"(*var) : "m"(*var) : "memory" ); return v; }

canonical_original_code: inline static int atomic_get_and_set_int(int *var, int v) { asm volatile( "xchgl %1, %0" " \n\t" : "+q"(v), "=m"(*var) : "m"(*var) : "memory" ); return v; }

variable_types:
var
int *

variable_types: v int

return_type: int


decompiled_code:
__int64 __fastcall futex_get(volatile signed __int32 *a1)
{
__int64 result; // rax
int v2; // ebp
int v3; // ebp

result = atomic_cmpxchg_int(a1, 0, 1);
if ( (_DWORD)result )
{
v2 = 1024;
if ( (_DWORD)result == 2 )
{
do
{
LABEL_3:
syscall(202LL, a1, 0LL, 2LL, 0LL, 0LL, 0LL);
result = atomic_get_and_set_int(a1, 2);
}
while ( (_DWORD)result );
}
else
{
while ( 1 )
{
result = atomic_cmpxchg_int(a1, 0, 1);
if ( !(_DWORD)result )
break;
if ( (_DWORD)result == 2 )
goto LABEL_3;
v3 = v2 - 1;
result = atomic_cmpxchg_int(a1, 0, 1);
if ( !(_DWORD)result )
break;
if ( (_DWORD)result == 2 )
goto LABEL_3;
result = atomic_cmpxchg_int(a1, 0, 1);
if ( !(_DWORD)result )
break;
if ( (_DWORD)result == 2 )
goto LABEL_3;
result = atomic_cmpxchg_int(a1, 0, 1);
if ( !(_DWORD)result )
break;
if ( (_DWORD)result == 2 )
goto LABEL_3;
result = atomic_cmpxchg_int(a1, 0, 1);
if ( !(_DWORD)result )
break;
if ( (_DWORD)result == 2 )
goto LABEL_3;
result = atomic_cmpxchg_int(a1, 0, 1);
if ( !(_DWORD)result )
break;
if ( (_DWORD)result == 2 )
goto LABEL_3;
result = atomic_cmpxchg_int(a1, 0, 1);
if ( !(_DWORD)result )
break;
if ( (_DWORD)result == 2 )
goto LABEL_3;
result = atomic_cmpxchg_int(a1, 0, 1);
if ( !(_DWORD)result )
break;
if ( (_DWORD)result == 2 )
goto LABEL_3;
v2 = v3 - 7;
if ( !v2 )
{
for ( result = atomic_get_and_set_int(a1, 2); (_DWORD)result; result = atomic_get_and_set_int(a1, 2) )
syscall(202LL, a1, 0LL, 2LL, 0LL, 0LL, 0LL);
return result;
}
}
}
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func2(volatile signed __int32 *a1)
{
__int64 result; // rax
int v2; // ebp
int v3; // ebp

result = func1(a1, 0, 1);
if ( (_DWORD)result )
{
v2 = 1024;
if ( (_DWORD)result == 2 )
{
do
{
LABEL_3:
syscall(202LL, a1, 0LL, 2LL, 0LL, 0LL, 0LL);
result = func0(a1, 2);
}
while ( (_DWORD)result );
}
else
{
while ( 1 )
{
result = func1(a1, 0, 1);
if ( !(_DWORD)result )
break;
if ( (_DWORD)result == 2 )
goto LABEL_3;
v3 = v2 - 1;
result = func1(a1, 0, 1);
if ( !(_DWORD)result )
break;
if ( (_DWORD)result == 2 )
goto LABEL_3;
result = func1(a1, 0, 1);
if ( !(_DWORD)result )
break;
if ( (_DWORD)result == 2 )
goto LABEL_3;
result = func1(a1, 0, 1);
if ( !(_DWORD)result )
break;
if ( (_DWORD)result == 2 )
goto LABEL_3;
result = func1(a1, 0, 1);
if ( !(_DWORD)result )
break;
if ( (_DWORD)result == 2 )
goto LABEL_3;
result = func1(a1, 0, 1);
if ( !(_DWORD)result )
break;
if ( (_DWORD)result == 2 )
goto LABEL_3;
result = func1(a1, 0, 1);
if ( !(_DWORD)result )
break;
if ( (_DWORD)result == 2 )
goto LABEL_3;
result = func1(a1, 0, 1);
if ( !(_DWORD)result )
break;
if ( (_DWORD)result == 2 )
goto LABEL_3;
v2 = v3 - 7;
if ( !v2 )
{
for ( result = func0(a1, 2); (_DWORD)result; result = func0(a1, 2) )
syscall(202LL, a1, 0LL, 2LL, 0LL, 0LL, 0LL);
return result;
}
}
}
}
return result;
}

original_code:
inline static void futex_get(futex_lock_t* lock)
{
 int v;
 register int i=1024;
retry:
 v=atomic_cmpxchg_int(&(lock)->val, 0, 1);
 if (__builtin_expect(!!(v==0), 1)){
  do {} while(0);
  return;
 }else if (__builtin_expect(!!(v==2), 0)){
  do{
   syscall(202 , (&(lock)->val), (0), (2), (0), (0), (0));
   v=atomic_get_and_set_int(&(lock)->val, 2);
  }while(v);
 }else{
  if (i>0){
   i--;
   goto retry;
  }
  v=atomic_get_and_set_int(&(lock)->val, 2);
  while(v){
   syscall(202 , (&(lock)->val), (0), (2), (0), (0), (0));
   v=atomic_get_and_set_int(&(lock)->val, 2);
  }
 }
 do {} while(0);
}

canonical_original_code:
inline static void futex_get(struct atomic_t *lock)
{
 int v;
 register int i = 1024;
retry:
 v=atomic_cmpxchg_int(&(lock)->val, 0, 1);
 if (__builtin_expect(!!(v==0), 1)){
  do {} while(0);
  return;
 }else if (__builtin_expect(!!(v==2), 0)){
  do{
   syscall(202 , (&(lock)->val), (0), (2), (0), (0), (0));
   v=atomic_get_and_set_int(&(lock)->val, 2);
  }while(v);
 }else{
  if (i>0){
   i--;
   goto retry;
  }
  v=atomic_get_and_set_int(&(lock)->val, 2);
  while(v){
   syscall(202 , (&(lock)->val), (0), (2), (0), (0), (0));
   v=atomic_get_and_set_int(&(lock)->val, 2);
  }
 }
 do {} while(0);
}

variable_types:
lock
struct atomic_t { int val; } *

variable_types: i int

return_type: void


decompiled_code:
__int64 __fastcall futex_release(volatile __int32 *a1)
{
__int64 result; // rax

result = atomic_get_and_set_int(a1, 0);
if ( (_DWORD)result == 2 )
result = syscall(202LL, a1, 1LL, 1LL, 0LL, 0LL, 0LL);
return result;
}

canonical_decompiled_code:
__int64 __fastcall func3(volatile __int32 *a1)
{
__int64 result; // rax

result = func0(a1, 0);
if ( (_DWORD)result == 2 )
result = syscall(202LL, a1, 1LL, 1LL, 0LL, 0LL, 0LL);
return result;
}

original_code:
inline static void futex_release(futex_lock_t* lock)
{
 int v;
 do {} while(0);
 v=atomic_get_and_set_int(&(lock)->val, 0);
 if (__builtin_expect(!!(v==2), 0)){
  syscall(202 , (&(lock)->val), (1), (1), (0), (0), (0));
 }
}

canonical_original_code:
inline static void futex_release(struct atomic_t *lock)
{
 int v;
 do {} while(0);
 v=atomic_get_and_set_int(&(lock)->val, 0);
 if (__builtin_expect(!!(v==2), 0)){
  syscall(202 , (&(lock)->val), (1), (1), (0), (0), (0));
 }
}


decompiled_code:
__int64 __fastcall shm_malloc(unsigned int a1)
{
__int64 v1; // rbx

futex_get(mem_lock);
v1 = qm_malloc(shm_block, a1);
futex_release(mem_lock);
return v1;
}

canonical_decompiled_code:
__int64 __fastcall func4(unsigned int a1)
{
__int64 v1; // rbx

func2(mem_lock);
v1 = qm_malloc(shm_block, a1);
func3(mem_lock);
return v1;
}

original_code:
inline static void* shm_malloc(unsigned int size)
{
 void *p;
 futex_get(mem_lock);
 p=qm_malloc(shm_block, (size));
 futex_release(mem_lock);
  return p;
}

canonical_original_code:
inline static void *shm_malloc(unsigned int size)
{
 void *p;
 futex_get(mem_lock);
 p=qm_malloc(shm_block, (size));
 futex_release(mem_lock);
  return p;
}

variable_types:
size
unsigned int

variable_types:
p
void *

return_type: void *


decompiled_code:
__int64 __fastcall dstr_append(__int64 a1, char *a2, int a3)
{
int v4; // er12
_DWORD *v5; // rbp
int v6; // eax
int v7; // ebx
unsigned int v9; // [rsp+Ch] [rbp-3Ch]

v9 = *(_DWORD *)(a1 + 24);
if ( v9 )
return (unsigned int)-2;
v4 = a3;
if ( !a3 )
return 0;
v5 = *(_DWORD **)(a1 + 8);
if ( !v5 )
v5 = add_new_buffer(a1);
if ( v4 > 0 && v5 )
{
while ( 1 )
{
v6 = v5[1];
v7 = *v5 - v6;
if ( v7 > v4 )
v7 = v4;
memcpy((char *)v5 + v6 + 16, a2, v7);
v5[1] += v7;
v4 -= v7;
a2 += v7;
*(_DWORD *)(a1 + 16) += v7;
if ( v4 <= 0 )
break;
v5 = add_new_buffer(a1);
if ( !v5 )
goto LABEL_8;
}
}
else if ( !v5 )
{
LABEL_8:
*(_DWORD *)(a1 + 24) = 1;
v9 = -1;
}
return v9;
}

original_code:
int dstr_append(dstring_t *dstr, const char *s, int len)
{
 int size;
 dstr_buff_t *buff;
 if (dstr->error) return -2;
 if (len == 0) return 0;
 buff = (dstr)->last;
 if (!buff) buff = add_new_buffer(dstr);
 while ((len > 0) && (buff)) {
  size = buff->len - buff->used;
  if (size > len) size = len;
  memcpy(buff->data + buff->used, s, size);
  buff->used += size;
  len -= size;
  s += size;
  dstr->len += size;
  if (len > 0) buff = add_new_buffer(dstr);
 }
 if (!buff) {
  dstr->error = 1;
  return -1;
 }
 return 0;
}

canonical_original_code:
int dstr_append(struct _dstring_t *dstr, char *s, int len)
{
 int size;
 struct _dstr_buff_t *buff;
 if (dstr->error) return -2;
 if (len == 0) return 0;
 buff = (dstr)->last;
 if (!buff) buff = add_new_buffer(dstr);
 while ((len > 0) && (buff)) {
  size = buff->len - buff->used;
  if (size > len) size = len;
  memcpy(buff->data + buff->used, s, size);
  buff->used += size;
  len -= size;
  s += size;
  dstr->len += size;
  if (len > 0) buff = add_new_buffer(dstr);
 }
 if (!buff) {
  dstr->error = 1;
  return -1;
 }
 return 0;
}

variable_types: struct _dstring_t { struct _dstr_buff_t { int len; int used; struct _dstr_buff_t *next; char data[1]; } *first; struct _dstr_buff_t *last; int len; int buff_size; int error; } *

variable_types:
s
char *

variable_types: len int

variable_types: size int

user_defined_types: struct _dstring_t { struct _dstr_buff_t *first; struct _dstr_buff_t *last; int len; int buff_size; int error; }


decompiled_code:
__int64 __fastcall dstr_append_zt(__int64 a1, char *a2)
{
__int64 result; // rax
int v3; // eax

result = 0LL;
if ( a2 )
{
v3 = strlen(a2);
result = dstr_append(a1, a2, v3);
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func6(__int64 a1, char *a2)
{
__int64 result; // rax
int v3; // eax

result = 0LL;
if ( a2 )
{
v3 = strlen(a2);
result = func5(a1, a2, v3);
}
return result;
}

original_code:
int dstr_append_zt(dstring_t *dstr, const char *s)
{
 if (!s) return 0;
 return dstr_append(dstr, s, strlen(s));
}

canonical_original_code:
int dstr_append_zt(struct _dstring_t *dstr, char *s)
{
 if (!s) return 0;
 return dstr_append(dstr, s, strlen(s));
}

user_defined_types: struct _dstr_buff_t { int len; int used; struct _dstr_buff_t *next; char data[1]; }


decompiled_code:
__int64 __fastcall dstr_append_str(__int64 a1, __int64 a2)
{
__int64 result; // rax

result = 0LL;
if ( a2 )
result = dstr_append(a1, *(char **)a2, *(_DWORD *)(a2 + 8));
return result;
}

canonical_decompiled_code:
__int64 __fastcall func7(__int64 a1, __int64 a2)
{
__int64 result; // rax

result = 0LL;
if ( a2 )
result = func5(a1, *(char **)a2, *(_DWORD *)(a2 + 8));
return result;
}

original_code:
int dstr_append_str(dstring_t *dstr, const str_t *s)
{
 if (!s) return 0;
 return dstr_append(dstr, s->s, s->len);
}

canonical_original_code:
int dstr_append_str(struct _dstring_t *dstr, struct _str *s)
{
 if (!s) return 0;
 return dstr_append(dstr, s->s, s->len);
}

variable_types:
s
struct _str { char *s; int len; } *


decompiled_code:
__int64 __fastcall dstr_get_data(__int64 *a1, char *a2)
{
unsigned int v2; // er12
__int64 i; // rbx

v2 = *((_DWORD *)a1 + 6);
if ( v2 )
return (unsigned int)-2;
for ( i = *a1; i; i = *(_QWORD *)(i + 8) )
{
memcpy(a2, (const void *)(i + 16), *(int *)(i + 4));
a2 += *(int *)(i + 4);
}
return v2;
}

canonical_decompiled_code:
__int64 __fastcall func8(__int64 *a1, char *a2)
{
unsigned int v2; // er12
__int64 i; // rbx

v2 = *((_DWORD *)a1 + 6);
if ( v2 )
return (unsigned int)-2;
for ( i = *a1; i; i = *(_QWORD *)(i + 8) )
{
memcpy(a2, (const void *)(i + 16), *(int *)(i + 4));
a2 += *(int *)(i + 4);
}
return v2;
}

original_code:
int dstr_get_data(dstring_t *dstr, char *dst)
{
 dstr_buff_t* buff;
 if (dstr->error) return -2;
 buff = dstr->first;
 while (buff) {
  memcpy(dst, buff->data, buff->used);
  dst += buff->used;
  buff = buff->next;
 }
 return 0;
}

canonical_original_code:
int dstr_get_data(struct _dstring_t *dstr, char *dst)
{
 struct _dstr_buff_t *buff;
 if (dstr->error) return -2;
 buff = dstr->first;
 while (buff) {
  memcpy(dst, buff->data, buff->used);
  dst += buff->used;
  buff = buff->next;
 }
 return 0;
}

variable_types:
dst
char *

variable_types: struct _dstr_buff_t { int len; int used; struct _dstr_buff_t *next; char data[1]; } *


decompiled_code:
__int64 __fastcall dstr_get_str(__int64 a1, __int64 a2)
{
__int64 result; // rax
signed int v5; // edi
char *v6; // rsi

if ( !a2 )
return 0xFFFFFFFFLL;
result = *(unsigned int *)(a1 + 24);
if ( (_DWORD)result )
{
*(_QWORD *)a2 = 0LL;
*(_DWORD *)(a2 + 8) = 0;
result = 4294967294LL;
}
else
{
v5 = *(_DWORD *)(a1 + 16);
*(_DWORD *)(a2 + 8) = v5;
if ( v5 > 0 )
{
v6 = (char *)shm_malloc(v5);
*(_QWORD *)a2 = v6;
if ( v6 )
{
result = dstr_get_data((__int64 *)a1, v6);
}
else
{
*(_DWORD *)(a2 + 8) = 0;
result = 0xFFFFFFFFLL;
}
}
else
{
*(_QWORD *)a2 = 0LL;
*(_DWORD *)(a2 + 8) = 0;
}
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func9(__int64 a1, __int64 a2)
{
__int64 result; // rax
signed int v5; // edi
char *v6; // rsi

if ( !a2 )
return 0xFFFFFFFFLL;
result = *(unsigned int *)(a1 + 24);
if ( (_DWORD)result )
{
*(_QWORD *)a2 = 0LL;
*(_DWORD *)(a2 + 8) = 0;
result = 4294967294LL;
}
else
{
v5 = *(_DWORD *)(a1 + 16);
*(_DWORD *)(a2 + 8) = v5;
if ( v5 > 0 )
{
v6 = (char *)func4(v5);
*(_QWORD *)a2 = v6;
if ( v6 )
{
result = func8((__int64 *)a1, v6);
}
else
{
*(_DWORD *)(a2 + 8) = 0;
result = 0xFFFFFFFFLL;
}
}
else
{
*(_QWORD *)a2 = 0LL;
*(_DWORD *)(a2 + 8) = 0;
}
}
return result;
}

original_code:
int dstr_get_str(dstring_t *dstr, str_t *dst)
{
 int res = 0;
 if (!dst) return -1;
 if (dstr->error) {
  dst->s = ((void *)0);
  dst->len = 0;
  return -2;
 }
 dst->len = (dstr)->len;
 if (dst->len > 0) {
  dst->s = (char*)shm_malloc(dst->len);
  if (!dst->s) {
   res = -1;
   dst->len = 0;
  }
  else res = dstr_get_data(dstr, dst->s);
 }
 else {
  dst->s = ((void *)0);
  dst->len = 0;
 }
 return res;
}

canonical_original_code:
int dstr_get_str(struct _dstring_t *dstr, struct _str *dst)
{
 int res = 0;
 if (!dst) return -1;
 if (dstr->error) {
  dst->s = ((void *)0);
  dst->len = 0;
  return -2;
 }
 dst->len = (dstr)->len;
 if (dst->len > 0) {
  dst->s = (char *)shm_malloc(dst->len);
  if (!dst->s) {
   res = -1;
   dst->len = 0;
  }
  else res = dstr_get_data(dstr, dst->s);
 }
 else {
  dst->s = ((void *)0);
  dst->len = 0;
 }
 return res;
}

variable_types:
dst
struct _str { char *s; int len; } *

variable_types: res int


decompiled_code:
__int64 __fastcall dstr_get_str_pkg(__int64 a1, __int64 a2)
{
__int64 result; // rax
int v4; // esi
char *v5; // rsi

if ( !a2 )
return 0xFFFFFFFFLL;
result = *(unsigned int *)(a1 + 24);
if ( (_DWORD)result )
{
*(_QWORD *)a2 = 0LL;
*(_DWORD *)(a2 + 8) = 0;
result = 4294967294LL;
}
else
{
v4 = *(_DWORD *)(a1 + 16);
*(_DWORD *)(a2 + 8) = v4;
if ( v4 > 0 )
{
v5 = (char *)qm_malloc(mem_block, v4);
*(_QWORD *)a2 = v5;
if ( v5 )
{
result = dstr_get_data((__int64 *)a1, v5);
}
else
{
*(_DWORD *)(a2 + 8) = 0;
result = 0xFFFFFFFFLL;
}
}
else
{
*(_QWORD *)a2 = 0LL;
*(_DWORD *)(a2 + 8) = 0;
}
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func10(__int64 a1, __int64 a2)
{
__int64 result; // rax
int v4; // esi
char *v5; // rsi

if ( !a2 )
return 0xFFFFFFFFLL;
result = *(unsigned int *)(a1 + 24);
if ( (_DWORD)result )
{
*(_QWORD *)a2 = 0LL;
*(_DWORD *)(a2 + 8) = 0;
result = 4294967294LL;
}
else
{
v4 = *(_DWORD *)(a1 + 16);
*(_DWORD *)(a2 + 8) = v4;
if ( v4 > 0 )
{
v5 = (char *)qm_malloc(mem_block, v4);
*(_QWORD *)a2 = v5;
if ( v5 )
{
result = func8((__int64 *)a1, v5);
}
else
{
*(_DWORD *)(a2 + 8) = 0;
result = 0xFFFFFFFFLL;
}
}
else
{
*(_QWORD *)a2 = 0LL;
*(_DWORD *)(a2 + 8) = 0;
}
}
return result;
}

original_code:
int dstr_get_str_pkg(dstring_t *dstr, str_t *dst)
{
 int res = 0;
 if (!dst) return -1;
 if (dstr->error) {
  dst->s = ((void *)0);
  dst->len = 0;
  return -2;
 }
 dst->len = (dstr)->len;
 if (dst->len > 0) {
  dst->s = (char*)qm_malloc(mem_block, (dst->len));
  if (!dst->s) {
   res = -1;
   dst->len = 0;
  }
  else res = dstr_get_data(dstr, dst->s);
 }
 else {
  dst->s = ((void *)0);
  dst->len = 0;
 }
 return res;
}

canonical_original_code:
int dstr_get_str_pkg(struct _dstring_t *dstr, struct _str *dst)
{
 int res = 0;
 if (!dst) return -1;
 if (dstr->error) {
  dst->s = ((void *)0);
  dst->len = 0;
  return -2;
 }
 dst->len = (dstr)->len;
 if (dst->len > 0) {
  dst->s = (char *)qm_malloc(mem_block, (dst->len));
  if (!dst->s) {
   res = -1;
   dst->len = 0;
  }
  else res = dstr_get_data(dstr, dst->s);
 }
 else {
  dst->s = ((void *)0);
  dst->len = 0;
 }
 return res;
}


original_code:
int dstr_init(dstring_t *dstr, int buff_size)
{
 dstr->buff_size = buff_size;
 dstr->len = 0;
 dstr->error = 0;
 dstr->first = 0;
 dstr->last = 0;
 return 0;
}

canonical_original_code:
int dstr_init(struct _dstring_t *dstr, int buff_size)
{
 dstr->buff_size = buff_size;
 dstr->len = 0;
 dstr->error = 0;
 dstr->first = 0;
 dstr->last = 0;
 return 0;
}


decompiled_code:
__int64 __fastcall dstr_destroy(__int64 *a1)
{
__int64 v1; // rbx
__int64 v2; // rsi

v1 = *a1;
while ( v1 )
{
v2 = v1;
v1 = *(_QWORD *)(v1 + 8);
qm_free(mem_block, v2);
}
*a1 = 0LL;
a1[1] = 0LL;
return 0LL;
}

original_code:
int dstr_destroy(dstring_t *dstr)
{
 dstr_buff_t *e,*n;
 e = dstr->first;
 while (e) {
  n = e->next;
  qm_free(mem_block, (e));
  e = n;
 }
 dstr->first = 0;
 dstr->last = 0;
 return 0;
}

canonical_original_code:
int dstr_destroy(struct _dstring_t *dstr)
{
 struct _dstr_buff_t *e; struct _dstr_buff_t *n;
 e = dstr->first;
 while (e) {
  n = e->next;
  qm_free(mem_block, (e));
  e = n;
 }
 dstr->first = 0;
 dstr->last = 0;
 return 0;
}


initdynstr

decompiled_code:
__int64 __fastcall initdynstr(__int64 *a1, int a2)
{
__int64 v2; // rax
__int64 result; // rax
int v4; // edx
const char *v5; // rbx
unsigned int v6; // eax

*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v2 = qm_malloc(mem_block, a2);
*a1 = v2;
if ( v2 )
{
*((_DWORD *)a1 + 4) = a2;
result = 0LL;
}
else
{
v4 = get_debug_level("auth_identity", 13LL);
result = 0xFFFFFFFFLL;
if ( v4 >= 0 )
{
result = 0xFFFFFFFFLL;
if ( !dprint_crit )
{
++dprint_crit;
if ( log_stderr )
{
if ( log_color )
dprint_color(0LL);
v5 = (const char *)*((_QWORD *)&log_level_info + 10);
v6 = my_pid();
fprintf(
stderr,
"%2d(%d) %s: %s%s(): AUTH_IDENTITY:initdynstr: Not enough memory error\n",
process_no,
v6,
v5,
"auth_identity [auth_dynstr.c:51]: ",
"initdynstr");
if ( log_color )
dprint_color_reset();
}
else
{
syslog(
*((_DWORD *)&log_level_info + 22) | *(_DWORD *)(core_cfg + 4LL),
"%s: %s%s(): AUTH_IDENTITY:initdynstr: Not enough memory error\n",
*((const char **)&log_level_info + 10),
"auth_identity [auth_dynstr.c:51]: ",
"initdynstr");
}
--dprint_crit;
result = 0xFFFFFFFFLL;
}
}
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(__int64 *a1, int a2)
{
__int64 v2; // rax
__int64 result; // rax
int v4; // edx
const char *v5; // rbx
unsigned int v6; // eax

*a1 = 0LL;
a1[1] = 0LL;
a1[2] = 0LL;
v2 = qm_malloc(mem_block, a2);
*a1 = v2;
if ( v2 )
{
*((_DWORD *)a1 + 4) = a2;
result = 0LL;
}
else
{
v4 = get_debug_level("auth_identity", 13LL);
result = 0xFFFFFFFFLL;
if ( v4 >= 0 )
{
result = 0xFFFFFFFFLL;
if ( !dprint_crit )
{
++dprint_crit;
if ( log_stderr )
{
if ( log_color )
dprint_color(0LL);
v5 = (const char *)*((_QWORD *)&log_level_info + 10);
v6 = my_pid();
fprintf(
stderr,
"%2d(%d) %s: %s%s(): AUTH_IDENTITY:initdynstr: Not enough memory error\n",
process_no,
v6,
v5,
"auth_identity [auth_dynstr.c:51]: ",
"initdynstr");
if ( log_color )
dprint_color_reset();
}
else
{
syslog(
*((_DWORD *)&log_level_info + 22) | *(_DWORD *)(core_cfg + 4LL),
"%s: %s%s(): AUTH_IDENTITY:initdynstr: Not enough memory error\n",
*((const char **)&log_level_info + 10),
"auth_identity [auth_dynstr.c:51]: ",
"initdynstr");
}
--dprint_crit;
result = 0xFFFFFFFFLL;
}
}
}
return result;
}

original_code:
int initdynstr(dynstr *sout, int isize)
{
 memset(sout,0,sizeof(*sout));
 (sout)->sd.s=qm_malloc(mem_block, (isize));
 if (!(sout)->sd.s) {
  do { if (get_debug_level("auth_identity", (sizeof("auth_identity")-1)) >= ((0)) && (dprint_crit==0)) { (dprint_crit++); if (__builtin_expect(!!((((0)) >= -5) && (((0)) <= 3)), 1)){ if (__builtin_expect(!!(log_stderr), 0)) { if (__builtin_expect(!!(log_color), 0)) dprint_color((0)); fprintf(stderr, "%2d(%d) %s: %s" "%s(): " "AUTH_IDENTITY:initdynstr: Not enough memory error\n", process_no, my_pid(), (log_level_info[((0)) - (-5)].name), ("auth_identity" " [" "auth_dynstr.c" ":" "51" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { syslog((log_level_info[((0)) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s: %s" "%s(): " "AUTH_IDENTITY:initdynstr: Not enough memory error\n", (log_level_info[((0)) - (-5)].name), ("auth_identity" " [" "auth_dynstr.c" ":" "51" "]: ") , __func__); } } else { if (log_stderr) { if (__builtin_expect(!!(log_color), 0)) dprint_color((0)); fprintf(stderr, "%2d(%d) %s" "%s(): " "AUTH_IDENTITY:initdynstr: Not enough memory error\n", process_no, my_pid(), ("auth_identity" " [" "auth_dynstr.c" ":" "51" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { if (((0))<-5) syslog((log_level_info[(-5) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "AUTH_IDENTITY:initdynstr: Not enough memory error\n", ("auth_identity" " [" "auth_dynstr.c" ":" "51" "]: ") , __func__); else syslog((log_level_info[(3) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "AUTH_IDENTITY:initdynstr: Not enough memory error\n", ("auth_identity" " [" "auth_dynstr.c" ":" "51" "]: ") , __func__); } } (dprint_crit--); } } while(0);
  return -1;
 }
 sout->size=isize;
 return 0;
}

canonical_original_code:
int initdynstr(struct _dstr *sout, int isize)
{
 memset(sout,0,sizeof(*sout));
 (sout)->sd.s=qm_malloc(mem_block, (isize));
 if (!(sout)->sd.s) {
  do { if (get_debug_level("auth_identity", (sizeof("auth_identity")-1)) >= ((0)) && (dprint_crit==0)) { (dprint_crit++); if (__builtin_expect(!!((((0)) >= -5) && (((0)) <= 3)), 1)){ if (__builtin_expect(!!(log_stderr), 0)) { if (__builtin_expect(!!(log_color), 0)) dprint_color((0)); fprintf(stderr, "%2d(%d) %s: %s" "%s(): " "AUTH_IDENTITY:initdynstr: Not enough memory error\n", process_no, my_pid(), (log_level_info[((0)) - (-5)].name), ("auth_identity" " [" "auth_dynstr.c" ":" "51" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { syslog((log_level_info[((0)) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s: %s" "%s(): " "AUTH_IDENTITY:initdynstr: Not enough memory error\n", (log_level_info[((0)) - (-5)].name), ("auth_identity" " [" "auth_dynstr.c" ":" "51" "]: ") , __func__); } } else { if (log_stderr) { if (__builtin_expect(!!(log_color), 0)) dprint_color((0)); fprintf(stderr, "%2d(%d) %s" "%s(): " "AUTH_IDENTITY:initdynstr: Not enough memory error\n", process_no, my_pid(), ("auth_identity" " [" "auth_dynstr.c" ":" "51" "]: ") , __func__); if (__builtin_expect(!!(log_color), 0)) dprint_color_reset(); } else { if (((0))<-5) syslog((log_level_info[(-5) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "AUTH_IDENTITY:initdynstr: Not enough memory error\n", ("auth_identity" " [" "auth_dynstr.c" ":" "51" "]: ") , __func__); else syslog((log_level_info[(3) - (-5)].syslog_level) | (((0) != 0) ? (0) : ((struct cfg_group_core *)core_cfg)->log_facility), "%s" "%s(): " "AUTH_IDENTITY:initdynstr: Not enough memory error\n", ("auth_identity" " [" "auth_dynstr.c" ":" "51" "]: ") , __func__); } } (dprint_crit--); } } while(0);
  return -1;
 }
 sout->size=isize;
 return 0;
}

variable_types: struct _dstr { struct _str { char *s; int len; } sd; int size; } *

variable_types: isize int

user_defined_types: struct _dstr { struct _str sd; int size; }

user_defined_types: struct cfg_group_core { int debug; int log_facility; int memdbg; int use_dst_blacklist; unsigned int blst_timeout; unsigned int blst_max_mem; unsigned int blst_udp_imask; unsigned int blst_tcp_imask; unsigned int blst_tls_imask; unsigned int blst_sctp_imask; int dns_try_ipv6; int dns_try_naptr; int dns_udp_pref; int dns_tcp_pref; int dns_tls_pref; int dns_sctp_pref; int dns_retr_time; int dns_retr_no; int dns_servers_no; int dns_search_list; int dns_search_fmatch; int dns_reinit; int use_dns_cache; int dns_cache_flags; int use_dns_failover; int dns_srv_lb; unsigned int dns_neg_cache_ttl; unsigned int dns_cache_min_ttl; unsigned int dns_cache_max_ttl; unsigned int dns_cache_max_mem; int dns_cache_del_nonexp; int dns_cache_rec_pref; int mem_dump_pkg; int mem_dump_shm; int max_while_loops; int udp_mtu; int udp_mtu_try_proto; int udp4_raw; int udp4_raw_mtu; int udp4_raw_ttl; int force_rport; int memlog; int mem_summary; int mem_safety; int mem_join; int corelog; int latency_log; int latency_limit_db; int latency_limit_action; }