decompiled_code:
__int64 test_has_outport()
{
__int64 v0; // rax
__int64 v1; // rbp
__int64 v2; // rbp
_BYTE v4[32]; // [rsp+0h] [rbp-48h] BYREF
char v5[40]; // [rsp+20h] [rbp-28h] BYREF

v0 = of_list_action_new(1LL);
if ( !v0 )
{
fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE list != NULL :: %s:%d\n", "src/test_utils.c", 26LL);
loci_assert_fail("0", "src/test_utils.c", 26LL);
goto LABEL_30;
}
v1 = v0;
if ( (unsigned int)of_action_list_has_out_port(v0, 0xFFFFFFFFLL) )
{
if ( (unsigned int)of_action_list_has_out_port(v1, 1LL) )
{
LABEL_54:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE !of_action_list_has_out_port(list, 1) :: %s:%d\n",
"src/test_utils.c",
29LL);
loci_assert_fail("0", "src/test_utils.c", 29LL);
goto LABEL_55;
}
of_action_set_dl_src_init(v4, 1LL, 0xFFFFFFFFLL, 1LL);
if ( (unsigned int)of_list_action_append_bind(v1, v4) )
{
LABEL_53:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE (of_list_action_append_bind(list, &set_dl_src)) == OF_ERROR_NONE :: %s:%d\n",
"src/test_utils.c",
33LL);
loci_assert_fail("0", "src/test_utils.c", 33LL);
goto LABEL_54;
}
if ( !(unsigned int)of_action_list_has_out_port(v1, 0xFFFFFFFFLL) )
{
LABEL_52:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD) :: %s:%d\n",
"src/test_utils.c",
35LL);
loci_assert_fail("0", "src/test_utils.c", 35LL);
goto LABEL_53;
}
if ( (unsigned int)of_action_list_has_out_port(v1, 1LL) )
{
LABEL_51:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE !of_action_list_has_out_port(list, 1) :: %s:%d\n",
"src/test_utils.c",
36LL);
loci_assert_fail("0", "src/test_utils.c", 36LL);
goto LABEL_52;
}
of_action_output_init(v5, 1LL, 0xFFFFFFFFLL, 1LL);
if ( (unsigned int)of_list_action_append_bind(v1, v5) )
{
LABEL_50:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE (of_list_action_append_bind(list, &output)) == OF_ERROR_NONE :: %s:%d\n",
"src/test_utils.c",
40LL);
loci_assert_fail("0", "src/test_utils.c", 40LL);
goto LABEL_51;
}
of_action_output_port_set(v5, 2LL);
if ( !(unsigned int)of_action_list_has_out_port(v1, 0xFFFFFFFFLL) )
{
LABEL_49:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD) :: %s:%d\n",
"src/test_utils.c",
43LL);
loci_assert_fail("0", "src/test_utils.c", 43LL);
goto LABEL_50;
}
if ( (unsigned int)of_action_list_has_out_port(v1, 1LL) )
{
LABEL_48:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE !of_action_list_has_out_port(list, 1) :: %s:%d\n",
"src/test_utils.c",
44LL);
loci_assert_fail("0", "src/test_utils.c", 44LL);
goto LABEL_49;
}
if ( !(unsigned int)of_action_list_has_out_port(v1, 2LL) )
{
LABEL_47:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, 2) :: %s:%d\n",
"src/test_utils.c",
45LL);
loci_assert_fail("0", "src/test_utils.c", 45LL);
goto LABEL_48;
}
of_action_output_init(v5, 1LL, 0xFFFFFFFFLL, 1LL);
if ( (unsigned int)of_list_action_append_bind(v1, v5) )
{
LABEL_46:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE (of_list_action_append_bind(list, &output)) == OF_ERROR_NONE :: %s:%d\n",
"src/test_utils.c",
49LL);
loci_assert_fail("0", "src/test_utils.c", 49LL);
goto LABEL_47;
}
of_action_output_port_set(v5, 1LL);
if ( !(unsigned int)of_action_list_has_out_port(v1, 0xFFFFFFFFLL) )
{
LABEL_45:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD) :: %s:%d\n",
"src/test_utils.c",
52LL);
loci_assert_fail("0", "src/test_utils.c", 52LL);
goto LABEL_46;
}
if ( !(unsigned int)of_action_list_has_out_port(v1, 1LL) )
{
LABEL_44:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, 1) :: %s:%d\n",
"src/test_utils.c",
53LL);
loci_assert_fail("0", "src/test_utils.c", 53LL);
goto LABEL_45;
}
if ( !(unsigned int)of_action_list_has_out_port(v1, 2LL) )
{
LABEL_43:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, 2) :: %s:%d\n",
"src/test_utils.c",
54LL);
loci_assert_fail("0", "src/test_utils.c", 54LL);
goto LABEL_44;
}
of_list_action_delete(v1);
v2 = of_list_action_new(1LL);
if ( !v2 )
{
LABEL_42:
fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE list != NULL :: %s:%d\n", "src/test_utils.c", 60LL);
loci_assert_fail("0", "src/test_utils.c", 60LL);
goto LABEL_43;
}
of_action_output_init(v5, 1LL, 0xFFFFFFFFLL, 1LL);
if ( (unsigned int)of_list_action_append_bind(v2, v5) )
{
LABEL_41:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE (of_list_action_append_bind(list, &output)) == OF_ERROR_NONE :: %s:%d\n",
"src/test_utils.c",
64LL);
loci_assert_fail("0", "src/test_utils.c", 64LL);
goto LABEL_42;
}
of_action_output_port_set(v5, 2LL);
if ( !(unsigned int)of_action_list_has_out_port(v2, 0xFFFFFFFFLL) )
{
LABEL_40:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD) :: %s:%d\n",
"src/test_utils.c",
67LL);
loci_assert_fail("0", "src/test_utils.c", 67LL);
goto LABEL_41;
}
if ( (unsigned int)of_action_list_has_out_port(v2, 1LL) )
{
LABEL_39:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE !of_action_list_has_out_port(list, 1) :: %s:%d\n",
"src/test_utils.c",
68LL);
loci_assert_fail("0", "src/test_utils.c", 68LL);
goto LABEL_40;
}
if ( !(unsigned int)of_action_list_has_out_port(v2, 2LL) )
{
LABEL_38:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, 2) :: %s:%d\n",
"src/test_utils.c",
69LL);
loci_assert_fail("0", "src/test_utils.c", 69LL);
goto LABEL_39;
}
of_action_set_dl_src_init(v4, 1LL, 0xFFFFFFFFLL, 1LL);
if ( (unsigned int)of_list_action_append_bind(v2, v4) )
{
LABEL_37:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE (of_list_action_append_bind(list, &set_dl_src)) == OF_ERROR_NONE :: %s:%d\n",
"src/test_utils.c",
73LL);
loci_assert_fail("0", "src/test_utils.c", 73LL);
goto LABEL_38;
}
if ( !(unsigned int)of_action_list_has_out_port(v2, 0xFFFFFFFFLL) )
{
LABEL_36:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD) :: %s:%d\n",
"src/test_utils.c",
75LL);
loci_assert_fail("0", "src/test_utils.c", 75LL);
goto LABEL_37;
}
if ( (unsigned int)of_action_list_has_out_port(v2, 1LL) )
{
LABEL_35:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE !of_action_list_has_out_port(list, 1) :: %s:%d\n",
"src/test_utils.c",
76LL);
loci_assert_fail("0", "src/test_utils.c", 76LL);
goto LABEL_36;
}
if ( !(unsigned int)of_action_list_has_out_port(v2, 2LL) )
{
LABEL_34:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, 2) :: %s:%d\n",
"src/test_utils.c",
77LL);
loci_assert_fail("0", "src/test_utils.c", 77LL);
goto LABEL_35;
}
of_action_output_init(v5, 1LL, 0xFFFFFFFFLL, 1LL);
if ( (unsigned int)of_list_action_append_bind(v2, v5) )
{
LABEL_33:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE (of_list_action_append_bind(list, &output)) == OF_ERROR_NONE :: %s:%d\n",
"src/test_utils.c",
81LL);
loci_assert_fail("0", "src/test_utils.c", 81LL);
goto LABEL_34;
}
of_action_output_port_set(v5, 1LL);
if ( !(unsigned int)of_action_list_has_out_port(v2, 0xFFFFFFFFLL) )
{
LABEL_32:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD) :: %s:%d\n",
"src/test_utils.c",
84LL);
loci_assert_fail("0", "src/test_utils.c", 84LL);
goto LABEL_33;
}
if ( !(unsigned int)of_action_list_has_out_port(v2, 1LL) )
{
LABEL_31:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, 1) :: %s:%d\n",
"src/test_utils.c",
85LL);
loci_assert_fail("0", "src/test_utils.c", 85LL);
goto LABEL_32;
}
if ( (unsigned int)of_action_list_has_out_port(v2, 2LL) )
{
of_list_action_delete(v2);
return 1LL;
}
LABEL_30:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, 2) :: %s:%d\n",
"src/test_utils.c",
86LL);
loci_assert_fail("0", "src/test_utils.c", 86LL);
goto LABEL_31;
}
LABEL_55:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD) :: %s:%d\n",
"src/test_utils.c",
28LL);
loci_assert_fail("0", "src/test_utils.c", 28LL);
return run_utility_tests();
}

canonical_decompiled_code:
__int64 func4()
{
__int64 v0; // rax
__int64 v1; // rbp
__int64 v2; // rbp
_BYTE v4[32]; // [rsp+0h] [rbp-48h] BYREF
char v5[40]; // [rsp+20h] [rbp-28h] BYREF

v0 = of_list_action_new(1LL);
if ( !v0 )
{
fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE list != NULL :: %s:%d\n", "src/test_utils.c", 26LL);
loci_assert_fail("0", "src/test_utils.c", 26LL);
goto LABEL_30;
}
v1 = v0;
if ( (unsigned int)of_action_list_has_out_port(v0, 0xFFFFFFFFLL) )
{
if ( (unsigned int)of_action_list_has_out_port(v1, 1LL) )
{
LABEL_54:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE !of_action_list_has_out_port(list, 1) :: %s:%d\n",
"src/test_utils.c",
29LL);
loci_assert_fail("0", "src/test_utils.c", 29LL);
goto LABEL_55;
}
of_action_set_dl_src_init(v4, 1LL, 0xFFFFFFFFLL, 1LL);
if ( (unsigned int)of_list_action_append_bind(v1, v4) )
{
LABEL_53:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE (of_list_action_append_bind(list, &set_dl_src)) == OF_ERROR_NONE :: %s:%d\n",
"src/test_utils.c",
33LL);
loci_assert_fail("0", "src/test_utils.c", 33LL);
goto LABEL_54;
}
if ( !(unsigned int)of_action_list_has_out_port(v1, 0xFFFFFFFFLL) )
{
LABEL_52:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD) :: %s:%d\n",
"src/test_utils.c",
35LL);
loci_assert_fail("0", "src/test_utils.c", 35LL);
goto LABEL_53;
}
if ( (unsigned int)of_action_list_has_out_port(v1, 1LL) )
{
LABEL_51:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE !of_action_list_has_out_port(list, 1) :: %s:%d\n",
"src/test_utils.c",
36LL);
loci_assert_fail("0", "src/test_utils.c", 36LL);
goto LABEL_52;
}
of_action_output_init(v5, 1LL, 0xFFFFFFFFLL, 1LL);
if ( (unsigned int)of_list_action_append_bind(v1, v5) )
{
LABEL_50:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE (of_list_action_append_bind(list, &output)) == OF_ERROR_NONE :: %s:%d\n",
"src/test_utils.c",
40LL);
loci_assert_fail("0", "src/test_utils.c", 40LL);
goto LABEL_51;
}
of_action_output_port_set(v5, 2LL);
if ( !(unsigned int)of_action_list_has_out_port(v1, 0xFFFFFFFFLL) )
{
LABEL_49:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD) :: %s:%d\n",
"src/test_utils.c",
43LL);
loci_assert_fail("0", "src/test_utils.c", 43LL);
goto LABEL_50;
}
if ( (unsigned int)of_action_list_has_out_port(v1, 1LL) )
{
LABEL_48:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE !of_action_list_has_out_port(list, 1) :: %s:%d\n",
"src/test_utils.c",
44LL);
loci_assert_fail("0", "src/test_utils.c", 44LL);
goto LABEL_49;
}
if ( !(unsigned int)of_action_list_has_out_port(v1, 2LL) )
{
LABEL_47:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, 2) :: %s:%d\n",
"src/test_utils.c",
45LL);
loci_assert_fail("0", "src/test_utils.c", 45LL);
goto LABEL_48;
}
of_action_output_init(v5, 1LL, 0xFFFFFFFFLL, 1LL);
if ( (unsigned int)of_list_action_append_bind(v1, v5) )
{
LABEL_46:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE (of_list_action_append_bind(list, &output)) == OF_ERROR_NONE :: %s:%d\n",
"src/test_utils.c",
49LL);
loci_assert_fail("0", "src/test_utils.c", 49LL);
goto LABEL_47;
}
of_action_output_port_set(v5, 1LL);
if ( !(unsigned int)of_action_list_has_out_port(v1, 0xFFFFFFFFLL) )
{
LABEL_45:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD) :: %s:%d\n",
"src/test_utils.c",
52LL);
loci_assert_fail("0", "src/test_utils.c", 52LL);
goto LABEL_46;
}
if ( !(unsigned int)of_action_list_has_out_port(v1, 1LL) )
{
LABEL_44:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, 1) :: %s:%d\n",
"src/test_utils.c",
53LL);
loci_assert_fail("0", "src/test_utils.c", 53LL);
goto LABEL_45;
}
if ( !(unsigned int)of_action_list_has_out_port(v1, 2LL) )
{
LABEL_43:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, 2) :: %s:%d\n",
"src/test_utils.c",
54LL);
loci_assert_fail("0", "src/test_utils.c", 54LL);
goto LABEL_44;
}
func0(v1);
v2 = of_list_action_new(1LL);
if ( !v2 )
{
LABEL_42:
fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE list != NULL :: %s:%d\n", "src/test_utils.c", 60LL);
loci_assert_fail("0", "src/test_utils.c", 60LL);
goto LABEL_43;
}
of_action_output_init(v5, 1LL, 0xFFFFFFFFLL, 1LL);
if ( (unsigned int)of_list_action_append_bind(v2, v5) )
{
LABEL_41:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE (of_list_action_append_bind(list, &output)) == OF_ERROR_NONE :: %s:%d\n",
"src/test_utils.c",
64LL);
loci_assert_fail("0", "src/test_utils.c", 64LL);
goto LABEL_42;
}
of_action_output_port_set(v5, 2LL);
if ( !(unsigned int)of_action_list_has_out_port(v2, 0xFFFFFFFFLL) )
{
LABEL_40:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD) :: %s:%d\n",
"src/test_utils.c",
67LL);
loci_assert_fail("0", "src/test_utils.c", 67LL);
goto LABEL_41;
}
if ( (unsigned int)of_action_list_has_out_port(v2, 1LL) )
{
LABEL_39:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE !of_action_list_has_out_port(list, 1) :: %s:%d\n",
"src/test_utils.c",
68LL);
loci_assert_fail("0", "src/test_utils.c", 68LL);
goto LABEL_40;
}
if ( !(unsigned int)of_action_list_has_out_port(v2, 2LL) )
{
LABEL_38:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, 2) :: %s:%d\n",
"src/test_utils.c",
69LL);
loci_assert_fail("0", "src/test_utils.c", 69LL);
goto LABEL_39;
}
of_action_set_dl_src_init(v4, 1LL, 0xFFFFFFFFLL, 1LL);
if ( (unsigned int)of_list_action_append_bind(v2, v4) )
{
LABEL_37:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE (of_list_action_append_bind(list, &set_dl_src)) == OF_ERROR_NONE :: %s:%d\n",
"src/test_utils.c",
73LL);
loci_assert_fail("0", "src/test_utils.c", 73LL);
goto LABEL_38;
}
if ( !(unsigned int)of_action_list_has_out_port(v2, 0xFFFFFFFFLL) )
{
LABEL_36:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD) :: %s:%d\n",
"src/test_utils.c",
75LL);
loci_assert_fail("0", "src/test_utils.c", 75LL);
goto LABEL_37;
}
if ( (unsigned int)of_action_list_has_out_port(v2, 1LL) )
{
LABEL_35:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE !of_action_list_has_out_port(list, 1) :: %s:%d\n",
"src/test_utils.c",
76LL);
loci_assert_fail("0", "src/test_utils.c", 76LL);
goto LABEL_36;
}
if ( !(unsigned int)of_action_list_has_out_port(v2, 2LL) )
{
LABEL_34:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, 2) :: %s:%d\n",
"src/test_utils.c",
77LL);
loci_assert_fail("0", "src/test_utils.c", 77LL);
goto LABEL_35;
}
of_action_output_init(v5, 1LL, 0xFFFFFFFFLL, 1LL);
if ( (unsigned int)of_list_action_append_bind(v2, v5) )
{
LABEL_33:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE (of_list_action_append_bind(list, &output)) == OF_ERROR_NONE :: %s:%d\n",
"src/test_utils.c",
81LL);
loci_assert_fail("0", "src/test_utils.c", 81LL);
goto LABEL_34;
}
of_action_output_port_set(v5, 1LL);
if ( !(unsigned int)of_action_list_has_out_port(v2, 0xFFFFFFFFLL) )
{
LABEL_32:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD) :: %s:%d\n",
"src/test_utils.c",
84LL);
loci_assert_fail("0", "src/test_utils.c", 84LL);
goto LABEL_33;
}
if ( !(unsigned int)of_action_list_has_out_port(v2, 1LL) )
{
LABEL_31:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, 1) :: %s:%d\n",
"src/test_utils.c",
85LL);
loci_assert_fail("0", "src/test_utils.c", 85LL);
goto LABEL_32;
}
if ( (unsigned int)of_action_list_has_out_port(v2, 2LL) )
{
func0(v2);
return 1LL;
}
LABEL_30:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, 2) :: %s:%d\n",
"src/test_utils.c",
86LL);
loci_assert_fail("0", "src/test_utils.c", 86LL);
goto LABEL_31;
}
LABEL_55:
fprintf(
stderr,
"\nTEST LOCI_ASSERT FAILURE of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD) :: %s:%d\n",
"src/test_utils.c",
28LL);
loci_assert_fail("0", "src/test_utils.c", 28LL);
return func5();
}

original_code:
int
test_has_outport(void)
{
    of_list_action_t *list;
    of_object_t set_dl_src;
    of_object_t output;
    list = of_list_action_new(OF_VERSION_1_0);
    if (!(list != ((void *)0))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "list != NULL" " :: %s:%d\n","src/test_utils.c",26); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 26)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, (0xffffffff)))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD)" " :: %s:%d\n","src/test_utils.c",28); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 28)); return 0; } while (0);
    if (!(!of_action_list_has_out_port(list, 1))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "!of_action_list_has_out_port(list, 1)" " :: %s:%d\n","src/test_utils.c",29); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 29)); return 0; } while (0);
    of_action_set_dl_src_init(&set_dl_src, OF_VERSION_1_0, -1, 1);
    if (!((of_list_action_append_bind(list, &set_dl_src)) == OF_ERROR_NONE)) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "(of_list_action_append_bind(list, &set_dl_src)) == OF_ERROR_NONE" " :: %s:%d\n","src/test_utils.c",33); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 33)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, (0xffffffff)))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD)" " :: %s:%d\n","src/test_utils.c",35); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 35)); return 0; } while (0);
    if (!(!of_action_list_has_out_port(list, 1))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "!of_action_list_has_out_port(list, 1)" " :: %s:%d\n","src/test_utils.c",36); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 36)); return 0; } while (0);
    of_action_output_init(&output, OF_VERSION_1_0, -1, 1);
    if (!((of_list_action_append_bind(list, &output)) == OF_ERROR_NONE)) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "(of_list_action_append_bind(list, &output)) == OF_ERROR_NONE" " :: %s:%d\n","src/test_utils.c",40); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 40)); return 0; } while (0);
    of_action_output_port_set(&output, 2);
    if (!(of_action_list_has_out_port(list, (0xffffffff)))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD)" " :: %s:%d\n","src/test_utils.c",43); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 43)); return 0; } while (0);
    if (!(!of_action_list_has_out_port(list, 1))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "!of_action_list_has_out_port(list, 1)" " :: %s:%d\n","src/test_utils.c",44); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 44)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, 2))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, 2)" " :: %s:%d\n","src/test_utils.c",45); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 45)); return 0; } while (0);
    of_action_output_init(&output, OF_VERSION_1_0, -1, 1);
    if (!((of_list_action_append_bind(list, &output)) == OF_ERROR_NONE)) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "(of_list_action_append_bind(list, &output)) == OF_ERROR_NONE" " :: %s:%d\n","src/test_utils.c",49); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 49)); return 0; } while (0);
    of_action_output_port_set(&output, 1);
    if (!(of_action_list_has_out_port(list, (0xffffffff)))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD)" " :: %s:%d\n","src/test_utils.c",52); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 52)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, 1))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, 1)" " :: %s:%d\n","src/test_utils.c",53); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 53)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, 2))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, 2)" " :: %s:%d\n","src/test_utils.c",54); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 54)); return 0; } while (0);
    of_list_action_delete(list);
    list = of_list_action_new(OF_VERSION_1_0);
    if (!(list != ((void *)0))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "list != NULL" " :: %s:%d\n","src/test_utils.c",60); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 60)); return 0; } while (0);
    of_action_output_init(&output, OF_VERSION_1_0, -1, 1);
    if (!((of_list_action_append_bind(list, &output)) == OF_ERROR_NONE)) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "(of_list_action_append_bind(list, &output)) == OF_ERROR_NONE" " :: %s:%d\n","src/test_utils.c",64); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 64)); return 0; } while (0);
    of_action_output_port_set(&output, 2);
    if (!(of_action_list_has_out_port(list, (0xffffffff)))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD)" " :: %s:%d\n","src/test_utils.c",67); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 67)); return 0; } while (0);
    if (!(!of_action_list_has_out_port(list, 1))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "!of_action_list_has_out_port(list, 1)" " :: %s:%d\n","src/test_utils.c",68); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 68)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, 2))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, 2)" " :: %s:%d\n","src/test_utils.c",69); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 69)); return 0; } while (0);
    of_action_set_dl_src_init(&set_dl_src, OF_VERSION_1_0, -1, 1);
    if (!((of_list_action_append_bind(list, &set_dl_src)) == OF_ERROR_NONE)) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "(of_list_action_append_bind(list, &set_dl_src)) == OF_ERROR_NONE" " :: %s:%d\n","src/test_utils.c",73); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 73)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, (0xffffffff)))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD)" " :: %s:%d\n","src/test_utils.c",75); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 75)); return 0; } while (0);
    if (!(!of_action_list_has_out_port(list, 1))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "!of_action_list_has_out_port(list, 1)" " :: %s:%d\n","src/test_utils.c",76); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 76)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, 2))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, 2)" " :: %s:%d\n","src/test_utils.c",77); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 77)); return 0; } while (0);
    of_action_output_init(&output, OF_VERSION_1_0, -1, 1);
    if (!((of_list_action_append_bind(list, &output)) == OF_ERROR_NONE)) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "(of_list_action_append_bind(list, &output)) == OF_ERROR_NONE" " :: %s:%d\n","src/test_utils.c",81); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 81)); return 0; } while (0);
    of_action_output_port_set(&output, 1);
    if (!(of_action_list_has_out_port(list, (0xffffffff)))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD)" " :: %s:%d\n","src/test_utils.c",84); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 84)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, 1))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, 1)" " :: %s:%d\n","src/test_utils.c",85); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 85)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, 2))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, 2)" " :: %s:%d\n","src/test_utils.c",86); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 86)); return 0; } while (0);
    of_list_action_delete(list);
    return 1;
}

canonical_original_code:
int test_has_outport()
{
    struct of_object_s *list;
    struct of_object_s set_dl_src;
    struct of_object_s output;
    list = of_list_action_new(OF_VERSION_1_0);
    if (!(list != ((void *)0))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "list != NULL" " :: %s:%d\n","src/test_utils.c",26); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 26)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, (0xffffffff)))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD)" " :: %s:%d\n","src/test_utils.c",28); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 28)); return 0; } while (0);
    if (!(!of_action_list_has_out_port(list, 1))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "!of_action_list_has_out_port(list, 1)" " :: %s:%d\n","src/test_utils.c",29); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 29)); return 0; } while (0);
    of_action_set_dl_src_init(&set_dl_src, OF_VERSION_1_0, -1, 1);
    if (!((of_list_action_append_bind(list, &set_dl_src)) == OF_ERROR_NONE)) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "(of_list_action_append_bind(list, &set_dl_src)) == OF_ERROR_NONE" " :: %s:%d\n","src/test_utils.c",33); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 33)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, (0xffffffff)))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD)" " :: %s:%d\n","src/test_utils.c",35); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 35)); return 0; } while (0);
    if (!(!of_action_list_has_out_port(list, 1))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "!of_action_list_has_out_port(list, 1)" " :: %s:%d\n","src/test_utils.c",36); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 36)); return 0; } while (0);
    of_action_output_init(&output, OF_VERSION_1_0, -1, 1);
    if (!((of_list_action_append_bind(list, &output)) == OF_ERROR_NONE)) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "(of_list_action_append_bind(list, &output)) == OF_ERROR_NONE" " :: %s:%d\n","src/test_utils.c",40); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 40)); return 0; } while (0);
    of_action_output_port_set(&output, 2);
    if (!(of_action_list_has_out_port(list, (0xffffffff)))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD)" " :: %s:%d\n","src/test_utils.c",43); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 43)); return 0; } while (0);
    if (!(!of_action_list_has_out_port(list, 1))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "!of_action_list_has_out_port(list, 1)" " :: %s:%d\n","src/test_utils.c",44); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 44)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, 2))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, 2)" " :: %s:%d\n","src/test_utils.c",45); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 45)); return 0; } while (0);
    of_action_output_init(&output, OF_VERSION_1_0, -1, 1);
    if (!((of_list_action_append_bind(list, &output)) == OF_ERROR_NONE)) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "(of_list_action_append_bind(list, &output)) == OF_ERROR_NONE" " :: %s:%d\n","src/test_utils.c",49); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 49)); return 0; } while (0);
    of_action_output_port_set(&output, 1);
    if (!(of_action_list_has_out_port(list, (0xffffffff)))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD)" " :: %s:%d\n","src/test_utils.c",52); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 52)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, 1))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, 1)" " :: %s:%d\n","src/test_utils.c",53); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 53)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, 2))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, 2)" " :: %s:%d\n","src/test_utils.c",54); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 54)); return 0; } while (0);
    of_list_action_delete(list);
    list = of_list_action_new(OF_VERSION_1_0);
    if (!(list != ((void *)0))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "list != NULL" " :: %s:%d\n","src/test_utils.c",60); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 60)); return 0; } while (0);
    of_action_output_init(&output, OF_VERSION_1_0, -1, 1);
    if (!((of_list_action_append_bind(list, &output)) == OF_ERROR_NONE)) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "(of_list_action_append_bind(list, &output)) == OF_ERROR_NONE" " :: %s:%d\n","src/test_utils.c",64); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 64)); return 0; } while (0);
    of_action_output_port_set(&output, 2);
    if (!(of_action_list_has_out_port(list, (0xffffffff)))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD)" " :: %s:%d\n","src/test_utils.c",67); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 67)); return 0; } while (0);
    if (!(!of_action_list_has_out_port(list, 1))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "!of_action_list_has_out_port(list, 1)" " :: %s:%d\n","src/test_utils.c",68); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 68)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, 2))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, 2)" " :: %s:%d\n","src/test_utils.c",69); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 69)); return 0; } while (0);
    of_action_set_dl_src_init(&set_dl_src, OF_VERSION_1_0, -1, 1);
    if (!((of_list_action_append_bind(list, &set_dl_src)) == OF_ERROR_NONE)) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "(of_list_action_append_bind(list, &set_dl_src)) == OF_ERROR_NONE" " :: %s:%d\n","src/test_utils.c",73); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 73)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, (0xffffffff)))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD)" " :: %s:%d\n","src/test_utils.c",75); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 75)); return 0; } while (0);
    if (!(!of_action_list_has_out_port(list, 1))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "!of_action_list_has_out_port(list, 1)" " :: %s:%d\n","src/test_utils.c",76); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 76)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, 2))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, 2)" " :: %s:%d\n","src/test_utils.c",77); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 77)); return 0; } while (0);
    of_action_output_init(&output, OF_VERSION_1_0, -1, 1);
    if (!((of_list_action_append_bind(list, &output)) == OF_ERROR_NONE)) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "(of_list_action_append_bind(list, &output)) == OF_ERROR_NONE" " :: %s:%d\n","src/test_utils.c",81); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 81)); return 0; } while (0);
    of_action_output_port_set(&output, 1);
    if (!(of_action_list_has_out_port(list, (0xffffffff)))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD)" " :: %s:%d\n","src/test_utils.c",84); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 84)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, 1))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, 1)" " :: %s:%d\n","src/test_utils.c",85); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 85)); return 0; } while (0);
    if (!(of_action_list_has_out_port(list, 2))) do { fprintf(stderr, "\nTEST LOCI_ASSERT FAILURE " "of_action_list_has_out_port(list, 2)" " :: %s:%d\n","src/test_utils.c",86); ((0) ? (void)0 : loci_assert_fail("0", "src/test_utils.c", 86)); return 0; } while (0);
    of_list_action_delete(list);
    return 1;
}

user_defined_types: enum of_object_id_e { OF_OBJECT_INVALID=-1, OF_OBJECT=0, OF_AGGREGATE_STATS_REPLY=1, OF_AGGREGATE_STATS_REQUEST=2, OF_ASYNC_CONFIG_FAILED_ERROR_MSG=3, OF_ASYNC_GET_REPLY=4, OF_ASYNC_GET_REQUEST=5, OF_ASYNC_SET=6, OF_BAD_ACTION_ERROR_MSG=7, OF_BAD_INSTRUCTION_ERROR_MSG=8, OF_BAD_MATCH_ERROR_MSG=9, OF_BAD_PROPERTY_ERROR_MSG=10, OF_BAD_REQUEST_ERROR_MSG=11, OF_BARRIER_REPLY=12, OF_BARRIER_REQUEST=13, OF_BSN_ARP_IDLE=14, OF_BSN_BASE_ERROR=15, OF_BSN_BW_CLEAR_DATA_REPLY=16, OF_BSN_BW_CLEAR_DATA_REQUEST=17, OF_BSN_BW_ENABLE_GET_REPLY=18, OF_BSN_BW_ENABLE_GET_REQUEST=19, OF_BSN_BW_ENABLE_SET_REPLY=20, OF_BSN_BW_ENABLE_SET_REQUEST=21, OF_BSN_CONTROLLER_CONNECTIONS_REPLY=22, OF_BSN_CONTROLLER_CONNECTIONS_REQUEST=23, OF_BSN_DEBUG_COUNTER_DESC_STATS_REPLY=24, OF_BSN_DEBUG_COUNTER_DESC_STATS_REQUEST=25, OF_BSN_DEBUG_COUNTER_STATS_REPLY=26, OF_BSN_DEBUG_COUNTER_STATS_REQUEST=27, OF_BSN_ERROR=28, OF_BSN_FLOW_CHECKSUM_BUCKET_STATS_REPLY=29, OF_BSN_FLOW_CHECKSUM_BUCKET_STATS_REQUEST=30, OF_BSN_FLOW_IDLE=31, OF_BSN_FLOW_IDLE_ENABLE_GET_REPLY=32, OF_BSN_FLOW_IDLE_ENABLE_GET_REQUEST=33, OF_BSN_FLOW_IDLE_ENABLE_SET_REPLY=34, OF_BSN_FLOW_IDLE_ENABLE_SET_REQUEST=35, OF_BSN_GENERIC_ASYNC=36, OF_BSN_GENERIC_COMMAND=37, OF_BSN_GENERIC_COMMAND_REPLY=38, OF_BSN_GENERIC_STATS_REPLY=39, OF_BSN_GENERIC_STATS_REQUEST=40, OF_BSN_GENTABLE_BUCKET_STATS_REPLY=41, OF_BSN_GENTABLE_BUCKET_STATS_REQUEST=42, OF_BSN_GENTABLE_CLEAR_REPLY=43, OF_BSN_GENTABLE_CLEAR_REQUEST=44, OF_BSN_GENTABLE_DESC_STATS_REPLY=45, OF_BSN_GENTABLE_DESC_STATS_REQUEST=46, OF_BSN_GENTABLE_ENTRY_ADD=47, OF_BSN_GENTABLE_ENTRY_DELETE=48, OF_BSN_GENTABLE_ENTRY_DESC_STATS_REPLY=49, OF_BSN_GENTABLE_ENTRY_DESC_STATS_REQUEST=50, OF_BSN_GENTABLE_ENTRY_STATS_REPLY=51, OF_BSN_GENTABLE_ENTRY_STATS_REQUEST=52, OF_BSN_GENTABLE_ERROR=53, OF_BSN_GENTABLE_SET_BUCKETS_SIZE=54, OF_BSN_GENTABLE_STATS_REPLY=55, OF_BSN_GENTABLE_STATS_REQUEST=56, OF_BSN_GET_INTERFACES_REPLY=57, OF_BSN_GET_INTERFACES_REQUEST=58, OF_BSN_GET_IP_MASK_REPLY=59, OF_BSN_GET_IP_MASK_REQUEST=60, OF_BSN_GET_L2_TABLE_REPLY=61, OF_BSN_GET_L2_TABLE_REQUEST=62, OF_BSN_GET_MIRRORING_REPLY=63, OF_BSN_GET_MIRRORING_REQUEST=64, OF_BSN_GET_SWITCH_PIPELINE_REPLY=65, OF_BSN_GET_SWITCH_PIPELINE_REQUEST=66, OF_BSN_HEADER=67, OF_BSN_HYBRID_GET_REPLY=68, OF_BSN_HYBRID_GET_REQUEST=69, OF_BSN_IMAGE_DESC_STATS_REPLY=70, OF_BSN_IMAGE_DESC_STATS_REQUEST=71, OF_BSN_LACP_CONVERGENCE_NOTIF=72, OF_BSN_LACP_STATS_REPLY=73, OF_BSN_LACP_STATS_REQUEST=74, OF_BSN_LOG=75, OF_BSN_LUA_COMMAND_REPLY=76, OF_BSN_LUA_COMMAND_REQUEST=77, OF_BSN_LUA_NOTIFICATION=78, OF_BSN_LUA_UPLOAD=79, OF_BSN_PDU_RX_REPLY=80, OF_BSN_PDU_RX_REQUEST=81, OF_BSN_PDU_RX_TIMEOUT=82, OF_BSN_PDU_TX_REPLY=83, OF_BSN_PDU_TX_REQUEST=84, OF_BSN_PORT_COUNTER_STATS_REPLY=85, OF_BSN_PORT_COUNTER_STATS_REQUEST=86, OF_BSN_ROLE_STATUS=87, OF_BSN_SET_AUX_CXNS_REPLY=88, OF_BSN_SET_AUX_CXNS_REQUEST=89, OF_BSN_SET_IP_MASK=90, OF_BSN_SET_L2_TABLE_REPLY=91, OF_BSN_SET_L2_TABLE_REQUEST=92, OF_BSN_SET_LACP_REPLY=93, OF_BSN_SET_LACP_REQUEST=94, OF_BSN_SET_MIRRORING=95, OF_BSN_SET_PKTIN_SUPPRESSION_REPLY=96, OF_BSN_SET_PKTIN_SUPPRESSION_REQUEST=97, OF_BSN_SET_SWITCH_PIPELINE_REPLY=98, OF_BSN_SET_SWITCH_PIPELINE_REQUEST=99, OF_BSN_SHELL_COMMAND=100, OF_BSN_SHELL_OUTPUT=101, OF_BSN_SHELL_STATUS=102, OF_BSN_STATS_REPLY=103, OF_BSN_STATS_REQUEST=104, OF_BSN_SWITCH_PIPELINE_STATS_REPLY=105, OF_BSN_SWITCH_PIPELINE_STATS_REQUEST=106, OF_BSN_TABLE_CHECKSUM_STATS_REPLY=107, OF_BSN_TABLE_CHECKSUM_STATS_REQUEST=108, OF_BSN_TABLE_SET_BUCKETS_SIZE=109, OF_BSN_TAKEOVER=110, OF_BSN_TIME_REPLY=111, OF_BSN_TIME_REQUEST=112, OF_BSN_VIRTUAL_PORT_CREATE_REPLY=113, OF_BSN_VIRTUAL_PORT_CREATE_REQUEST=114, OF_BSN_VIRTUAL_PORT_REMOVE_REPLY=115, OF_BSN_VIRTUAL_PORT_REMOVE_REQUEST=116, OF_BSN_VLAN_COUNTER_CLEAR=117, OF_BSN_VLAN_COUNTER_STATS_REPLY=118, OF_BSN_VLAN_COUNTER_STATS_REQUEST=119, OF_BSN_VRF_COUNTER_STATS_REPLY=120, OF_BSN_VRF_COUNTER_STATS_REQUEST=121, OF_BUNDLE_ADD_MSG=122, OF_BUNDLE_CTRL_MSG=123, OF_BUNDLE_FAILED_ERROR_MSG=124, OF_DESC_STATS_REPLY=125, OF_DESC_STATS_REQUEST=126, OF_ECHO_REPLY=127, OF_ECHO_REQUEST=128, OF_ERROR_MSG=129, OF_EXPERIMENTER=130, OF_EXPERIMENTER_ERROR_MSG=131, OF_EXPERIMENTER_STATS_REPLY=132, OF_EXPERIMENTER_STATS_REQUEST=133, OF_FEATURES_REPLY=134, OF_FEATURES_REQUEST=135, OF_FLOW_ADD=136, OF_FLOW_DELETE=137, OF_FLOW_DELETE_STRICT=138, OF_FLOW_MOD=139, OF_FLOW_MOD_FAILED_ERROR_MSG=140, OF_FLOW_MODIFY=141, OF_FLOW_MODIFY_STRICT=142, OF_FLOW_MONITOR_FAILED_ERROR_MSG=143, OF_FLOW_REMOVED=144, OF_FLOW_STATS_REPLY=145, OF_FLOW_STATS_REQUEST=146, OF_GET_CONFIG_REPLY=147, OF_GET_CONFIG_REQUEST=148, OF_GROUP_ADD=149, OF_GROUP_DELETE=150, OF_GROUP_DESC_STATS_REPLY=151, OF_GROUP_DESC_STATS_REQUEST=152, OF_GROUP_FEATURES_STATS_REPLY=153, OF_GROUP_FEATURES_STATS_REQUEST=154, OF_GROUP_MOD=155, OF_GROUP_MOD_FAILED_ERROR_MSG=156, OF_GROUP_MODIFY=157, OF_GROUP_STATS_REPLY=158, OF_GROUP_STATS_REQUEST=159, OF_HEADER=160, OF_HELLO=161, OF_HELLO_FAILED_ERROR_MSG=162, OF_METER_CONFIG_STATS_REPLY=163, OF_METER_CONFIG_STATS_REQUEST=164, OF_METER_FEATURES_STATS_REPLY=165, OF_METER_FEATURES_STATS_REQUEST=166, OF_METER_MOD=167, OF_METER_MOD_FAILED_ERROR_MSG=168, OF_METER_STATS_REPLY=169, OF_METER_STATS_REQUEST=170, OF_NICIRA_CONTROLLER_ROLE_REPLY=171, OF_NICIRA_CONTROLLER_ROLE_REQUEST=172, OF_NICIRA_HEADER=173, OF_PACKET_IN=174, OF_PACKET_OUT=175, OF_PORT_DESC_STATS_REPLY=176, OF_PORT_DESC_STATS_REQUEST=177, OF_PORT_MOD=178, OF_PORT_MOD_FAILED_ERROR_MSG=179, OF_PORT_STATS_REPLY=180, OF_PORT_STATS_REQUEST=181, OF_PORT_STATUS=182, OF_QUEUE_DESC_STATS_REPLY=183, OF_QUEUE_DESC_STATS_REQUEST=184, OF_QUEUE_GET_CONFIG_REPLY=185, OF_QUEUE_GET_CONFIG_REQUEST=186, OF_QUEUE_OP_FAILED_ERROR_MSG=187, OF_QUEUE_STATS_REPLY=188, OF_QUEUE_STATS_REQUEST=189, OF_REQUESTFORWARD=190, OF_ROLE_REPLY=191, OF_ROLE_REQUEST=192, OF_ROLE_REQUEST_FAILED_ERROR_MSG=193, OF_ROLE_STATUS=194, OF_SET_CONFIG=195, OF_STATS_REPLY=196, OF_STATS_REQUEST=197, OF_SWITCH_CONFIG_FAILED_ERROR_MSG=198, OF_TABLE_DESC_STATS_REPLY=199, OF_TABLE_DESC_STATS_REQUEST=200, OF_TABLE_FEATURES_FAILED_ERROR_MSG=201, OF_TABLE_FEATURES_STATS_REPLY=202, OF_TABLE_FEATURES_STATS_REQUEST=203, OF_TABLE_MOD=204, OF_TABLE_MOD_FAILED_ERROR_MSG=205, OF_TABLE_STATS_REPLY=206, OF_TABLE_STATS_REQUEST=207, OF_TABLE_STATUS=208, OF_ACTION=209, OF_ACTION_BSN=210, OF_ACTION_BSN_CHECKSUM=211, OF_ACTION_BSN_GENTABLE=212, OF_ACTION_BSN_MIRROR=213, OF_ACTION_BSN_SET_TUNNEL_DST=214, OF_ACTION_COPY_TTL_IN=215, OF_ACTION_COPY_TTL_OUT=216, OF_ACTION_DEC_MPLS_TTL=217, OF_ACTION_DEC_NW_TTL=218, OF_ACTION_ENQUEUE=219, OF_ACTION_EXPERIMENTER=220, OF_ACTION_GROUP=221, OF_ACTION_ID=222, OF_ACTION_ID_BSN=223, OF_ACTION_ID_BSN_CHECKSUM=224, OF_ACTION_ID_BSN_GENTABLE=225, OF_ACTION_ID_BSN_MIRROR=226, OF_ACTION_ID_BSN_SET_TUNNEL_DST=227, OF_ACTION_ID_COPY_TTL_IN=228, OF_ACTION_ID_COPY_TTL_OUT=229, OF_ACTION_ID_DEC_MPLS_TTL=230, OF_ACTION_ID_DEC_NW_TTL=231, OF_ACTION_ID_EXPERIMENTER=232, OF_ACTION_ID_GROUP=233, OF_ACTION_ID_NICIRA=234, OF_ACTION_ID_NICIRA_DEC_TTL=235, OF_ACTION_ID_OUTPUT=236, OF_ACTION_ID_POP_MPLS=237, OF_ACTION_ID_POP_PBB=238, OF_ACTION_ID_POP_VLAN=239, OF_ACTION_ID_PUSH_MPLS=240, OF_ACTION_ID_PUSH_PBB=241, OF_ACTION_ID_PUSH_VLAN=242, OF_ACTION_ID_SET_FIELD=243, OF_ACTION_ID_SET_MPLS_TTL=244, OF_ACTION_ID_SET_NW_TTL=245, OF_ACTION_ID_SET_QUEUE=246, OF_ACTION_NICIRA=247, OF_ACTION_NICIRA_DEC_TTL=248, OF_ACTION_OUTPUT=249, OF_ACTION_POP_MPLS=250, OF_ACTION_POP_PBB=251, OF_ACTION_POP_VLAN=252, OF_ACTION_PUSH_MPLS=253, OF_ACTION_PUSH_PBB=254, OF_ACTION_PUSH_VLAN=255, OF_ACTION_SET_DL_DST=256, OF_ACTION_SET_DL_SRC=257, OF_ACTION_SET_FIELD=258, OF_ACTION_SET_MPLS_LABEL=259, OF_ACTION_SET_MPLS_TC=260, OF_ACTION_SET_MPLS_TTL=261, OF_ACTION_SET_NW_DST=262, OF_ACTION_SET_NW_ECN=263, OF_ACTION_SET_NW_SRC=264, OF_ACTION_SET_NW_TOS=265, OF_ACTION_SET_NW_TTL=266, OF_ACTION_SET_QUEUE=267, OF_ACTION_SET_TP_DST=268, OF_ACTION_SET_TP_SRC=269, OF_ACTION_SET_VLAN_PCP=270, OF_ACTION_SET_VLAN_VID=271, OF_ACTION_STRIP_VLAN=272, OF_ASYNC_CONFIG_PROP=273, OF_ASYNC_CONFIG_PROP_EXPERIMENTER_MASTER=274, OF_ASYNC_CONFIG_PROP_EXPERIMENTER_SLAVE=275, OF_ASYNC_CONFIG_PROP_FLOW_REMOVED_MASTER=276, OF_ASYNC_CONFIG_PROP_FLOW_REMOVED_SLAVE=277, OF_ASYNC_CONFIG_PROP_PACKET_IN_MASTER=278, OF_ASYNC_CONFIG_PROP_PACKET_IN_SLAVE=279, OF_ASYNC_CONFIG_PROP_PORT_STATUS_MASTER=280, OF_ASYNC_CONFIG_PROP_PORT_STATUS_SLAVE=281, OF_ASYNC_CONFIG_PROP_REQUESTFORWARD_MASTER=282, OF_ASYNC_CONFIG_PROP_REQUESTFORWARD_SLAVE=283, OF_ASYNC_CONFIG_PROP_ROLE_STATUS_MASTER=284, OF_ASYNC_CONFIG_PROP_ROLE_STATUS_SLAVE=285, OF_ASYNC_CONFIG_PROP_TABLE_STATUS_MASTER=286, OF_ASYNC_CONFIG_PROP_TABLE_STATUS_SLAVE=287, OF_BSN_CONTROLLER_CONNECTION=288, OF_BSN_DEBUG_COUNTER_DESC_STATS_ENTRY=289, OF_BSN_DEBUG_COUNTER_STATS_ENTRY=290, OF_BSN_FLOW_CHECKSUM_BUCKET_STATS_ENTRY=291, OF_BSN_GENERIC_STATS_ENTRY=292, OF_BSN_GENTABLE_BUCKET_STATS_ENTRY=293, OF_BSN_GENTABLE_DESC_STATS_ENTRY=294, OF_BSN_GENTABLE_ENTRY_DESC_STATS_ENTRY=295, OF_BSN_GENTABLE_ENTRY_STATS_ENTRY=296, OF_BSN_GENTABLE_STATS_ENTRY=297, OF_BSN_INTERFACE=298, OF_BSN_LACP_STATS_ENTRY=299, OF_BSN_PORT_COUNTER_STATS_ENTRY=300, OF_BSN_SWITCH_PIPELINE_STATS_ENTRY=301, OF_BSN_TABLE_CHECKSUM_STATS_ENTRY=302, OF_BSN_TLV=303, OF_BSN_TLV_ACTION_STATE=304, OF_BSN_TLV_ACTIVE=305, OF_BSN_TLV_ACTOR_KEY=306, OF_BSN_TLV_ACTOR_PORT_NUM=307, OF_BSN_TLV_ACTOR_PORT_PRIORITY=308, OF_BSN_TLV_ACTOR_STATE=309, OF_BSN_TLV_ACTOR_SYSTEM_MAC=310, OF_BSN_TLV_ACTOR_SYSTEM_PRIORITY=311, OF_BSN_TLV_ADMIN_STATE=312, OF_BSN_TLV_ANALYTICS=313, OF_BSN_TLV_ANCHOR=314, OF_BSN_TLV_APPLY_BYTES=315, OF_BSN_TLV_APPLY_PACKETS=316, OF_BSN_TLV_ARP_SPA=317, OF_BSN_TLV_ARP_TPA=318, OF_BSN_TLV_AUTO_NEGOTIATION=319, OF_BSN_TLV_BFD_ENDPOINT=320, OF_BSN_TLV_BFD_STATE=321, OF_BSN_TLV_BROADCAST_QUERY_TIMEOUT=322, OF_BSN_TLV_BROADCAST_RATE=323, OF_BSN_TLV_BUCKET=324, OF_BSN_TLV_CIRCUIT_ID=325, OF_BSN_TLV_CLIENT_LL_ADDR=326, OF_BSN_TLV_CONVERGENCE_STATUS=327, OF_BSN_TLV_CPU_LAG=328, OF_BSN_TLV_CRC_ENABLED=329, OF_BSN_TLV_DATA=330, OF_BSN_TLV_DATA_MASK=331, OF_BSN_TLV_DECAP=332, OF_BSN_TLV_DISABLE_SRC_MAC_CHECK=333, OF_BSN_TLV_DISABLE_XMIT=334, OF_BSN_TLV_DNS_ANALYTICS=335, OF_BSN_TLV_DROP=336, OF_BSN_TLV_DROP_CONTROL=337, OF_BSN_TLV_DSCP=338, OF_BSN_TLV_ECN=339, OF_BSN_TLV_EGRESS_ONLY=340, OF_BSN_TLV_EGRESS_PORT_GROUP_ID=341, OF_BSN_TLV_EGRESS_SAMPLING_RATE=342, OF_BSN_TLV_ENCAP=343, OF_BSN_TLV_ENHANCED_HASH_CAPABILITY=344, OF_BSN_TLV_ETH_DST=345, OF_BSN_TLV_ETH_SRC=346, OF_BSN_TLV_ETH_TYPE=347, OF_BSN_TLV_EXTERNAL_GATEWAY_IP=348, OF_BSN_TLV_EXTERNAL_GATEWAY_MAC=349, OF_BSN_TLV_EXTERNAL_IP=350, OF_BSN_TLV_EXTERNAL_MAC=351, OF_BSN_TLV_EXTERNAL_NETMASK=352, OF_BSN_TLV_FABRIC_PORT_ROLE=353, OF_BSN_TLV_FAIL_COUNT=354, OF_BSN_TLV_FLOOD=355, OF_BSN_TLV_FLOW_CLASSIFIER=356, OF_BSN_TLV_FLOW_CLASSIFY=357, OF_BSN_TLV_FLOW_IDENTIFIER=358, OF_BSN_TLV_FORCE_LINK_UP=359, OF_BSN_TLV_FORWARD_ERROR_CORRECTION=360, OF_BSN_TLV_FREE_COUNT=361, OF_BSN_TLV_GENERATION_ID=362, OF_BSN_TLV_HASH_ALGORITHM=363, OF_BSN_TLV_HASH_GTP_HEADER_MATCH=364, OF_BSN_TLV_HASH_GTP_PORT_MATCH=365, OF_BSN_TLV_HASH_PACKET_FIELD=366, OF_BSN_TLV_HASH_PACKET_TYPE=367, OF_BSN_TLV_HASH_SEED=368, OF_BSN_TLV_HASH_TYPE=369, OF_BSN_TLV_HEADER_SIZE=370, OF_BSN_TLV_ICMP_CODE=371, OF_BSN_TLV_ICMP_ID=372, OF_BSN_TLV_ICMP_TYPE=373, OF_BSN_TLV_ICMPV6_CHKSUM=374, OF_BSN_TLV_ICMPV6_CODE=375, OF_BSN_TLV_ICMPV6_TYPE=376, OF_BSN_TLV_IDENTIFIER=377, OF_BSN_TLV_IDLE_NOTIFICATION=378, OF_BSN_TLV_IDLE_TIME=379, OF_BSN_TLV_IDLE_TIMEOUT=380, OF_BSN_TLV_IFP_CLASS_ID=381, OF_BSN_TLV_IGMP_SNOOPING=382, OF_BSN_TLV_INGRESS_PORT_GROUP_ID=383, OF_BSN_TLV_INNER_VLAN_VID=384, OF_BSN_TLV_INTERNAL_GATEWAY_MAC=385, OF_BSN_TLV_INTERNAL_MAC=386, OF_BSN_TLV_INTERVAL=387, OF_BSN_TLV_IP_FRAGMENTATION=388, OF_BSN_TLV_IP_PROTO=389, OF_BSN_TLV_IP_TUNNEL_TYPE=390, OF_BSN_TLV_IPV4=391, OF_BSN_TLV_IPV4_DST=392, OF_BSN_TLV_IPV4_NETMASK=393, OF_BSN_TLV_IPV4_SRC=394, OF_BSN_TLV_IPV6=395, OF_BSN_TLV_IPV6_DST=396, OF_BSN_TLV_IPV6_PREFIX=397, OF_BSN_TLV_IPV6_SRC=398, OF_BSN_TLV_KNOWN_MULTICAST_RATE=399, OF_BSN_TLV_L2_CACHE_HIT=400, OF_BSN_TLV_L2_MULTICAST_LOOKUP=401, OF_BSN_TLV_L3=402, OF_BSN_TLV_L3_DST_CLASS_ID=403, OF_BSN_TLV_L3_INTERFACE_CLASS_ID=404, OF_BSN_TLV_L3_SRC_CLASS_ID=405, OF_BSN_TLV_LAG_OPTIONS=406, OF_BSN_TLV_LAG_TYPE=407, OF_BSN_TLV_LCORE=408, OF_BSN_TLV_LINK_UP=409, OF_BSN_TLV_LOAD=410, OF_BSN_TLV_LOOKUP_COUNT=411, OF_BSN_TLV_LOOPBACK_MODE=412, OF_BSN_TLV_LOOPBACK_PORT=413, OF_BSN_TLV_LOSSLESS=414, OF_BSN_TLV_LR_ALL_ENABLED=415, OF_BSN_TLV_MAC=416, OF_BSN_TLV_MAC_MASK=417, OF_BSN_TLV_MATCHED_COUNT=418, OF_BSN_TLV_MAX_COUNT=419, OF_BSN_TLV_MCG_TYPE_VXLAN=420, OF_BSN_TLV_METADATA=421, OF_BSN_TLV_MGMT=422, OF_BSN_TLV_MGMT_RESELECT_ON_FAILURE=423, OF_BSN_TLV_MISS_PACKETS=424, OF_BSN_TLV_MPLS_CONTROL_WORD=425, OF_BSN_TLV_MPLS_LABEL=426, OF_BSN_TLV_MPLS_SEQUENCED=427, OF_BSN_TLV_MULTICAST_INTERFACE_ID=428, OF_BSN_TLV_MULTICAST_PACKET=429, OF_BSN_TLV_MULTIPLIER=430, OF_BSN_TLV_NAME=431, OF_BSN_TLV_NDP_OFFLOAD=432, OF_BSN_TLV_NDP_STATIC=433, OF_BSN_TLV_NEGATE=434, OF_BSN_TLV_NEXT_HOP_IPV4=435, OF_BSN_TLV_NEXT_HOP_MAC=436, OF_BSN_TLV_NEXTHOP_TYPE_VXLAN=437, OF_BSN_TLV_NO_ARP_RESPONSE=438, OF_BSN_TLV_NO_DROP=439, OF_BSN_TLV_NO_NS_RESPONSE=440, OF_BSN_TLV_OFFSET=441, OF_BSN_TLV_OPTICS_ALWAYS_ENABLED=442, OF_BSN_TLV_OUTER_SRC_MAC=443, OF_BSN_TLV_PACKET_FIELD=444, OF_BSN_TLV_PARENT_PORT=445, OF_BSN_TLV_PARTNER_KEY=446, OF_BSN_TLV_PARTNER_PORT_NUM=447, OF_BSN_TLV_PARTNER_PORT_PRIORITY=448, OF_BSN_TLV_PARTNER_STATE=449, OF_BSN_TLV_PARTNER_SYSTEM_MAC=450, OF_BSN_TLV_PARTNER_SYSTEM_PRIORITY=451, OF_BSN_TLV_PASSIVE=452, OF_BSN_TLV_PDUA_RX_INSTANCE=453, OF_BSN_TLV_PIM_DR=454, OF_BSN_TLV_PIM_HELLO_FLOOD=455, OF_BSN_TLV_PORT=456, OF_BSN_TLV_PORT_MODE=457, OF_BSN_TLV_PORT_SPEED_GBPS=458, OF_BSN_TLV_PORT_USAGE=459, OF_BSN_TLV_PORT_VXLAN_MODE=460, OF_BSN_TLV_PRESERVE_VLAN=461, OF_BSN_TLV_PRIORITY=462, OF_BSN_TLV_PUSH_TWO_PER_POLICY=463, OF_BSN_TLV_PUSH_TWO_TAGS_CAPABILITY=464, OF_BSN_TLV_PUSH_VLAN_ON_EGRESS=465, OF_BSN_TLV_PUSH_VLAN_ON_INGRESS=466, OF_BSN_TLV_QOS_PRIORITY=467, OF_BSN_TLV_QUEUE_ID=468, OF_BSN_TLV_QUEUE_WEIGHT=469, OF_BSN_TLV_RATE_LIMIT=470, OF_BSN_TLV_RATE_UNIT=471, OF_BSN_TLV_RECORD_PACKETS=472, OF_BSN_TLV_REDUNDANT_MGMT=473, OF_BSN_TLV_REFERENCE=474, OF_BSN_TLV_REMOTE_ID=475, OF_BSN_TLV_REPLY_PACKETS=476, OF_BSN_TLV_REQUEST_PACKETS=477, OF_BSN_TLV_REST_SERVER=478, OF_BSN_TLV_ROUTING_PARAM=479, OF_BSN_TLV_RX_BYTES=480, OF_BSN_TLV_RX_PACKETS=481, OF_BSN_TLV_SAMPLING_RATE=482, OF_BSN_TLV_SCTP_DST=483, OF_BSN_TLV_SCTP_SRC=484, OF_BSN_TLV_SET_LOOPBACK_MODE=485, OF_BSN_TLV_SOCKET=486, OF_BSN_TLV_SRC_MAC_CML=487, OF_BSN_TLV_STATUS=488, OF_BSN_TLV_STRIP_MPLS_L2_ON_INGRESS=489, OF_BSN_TLV_STRIP_MPLS_L3_ON_INGRESS=490, OF_BSN_TLV_STRIP_VLAN_ON_EGRESS=491, OF_BSN_TLV_SUB_AGENT_ID=492, OF_BSN_TLV_SWL_FEATURE=493, OF_BSN_TLV_TCP_DST=494, OF_BSN_TLV_TCP_FLAGS=495, OF_BSN_TLV_TCP_SRC=496, OF_BSN_TLV_THREAD=497, OF_BSN_TLV_TIMESTAMP=498, OF_BSN_TLV_TTL=499, OF_BSN_TLV_TUNNEL_CAPABILITY=500, OF_BSN_TLV_TX_BYTES=501, OF_BSN_TLV_TX_PACKETS=502, OF_BSN_TLV_UDF_ANCHOR=503, OF_BSN_TLV_UDF_CAPABILITY=504, OF_BSN_TLV_UDF_DATA=505, OF_BSN_TLV_UDF_ID=506, OF_BSN_TLV_UDF_LENGTH=507, OF_BSN_TLV_UDF_OFFSET=508, OF_BSN_TLV_UDP_DST=509, OF_BSN_TLV_UDP_SRC=510, OF_BSN_TLV_UINT32=511, OF_BSN_TLV_UINT64_LIST=512, OF_BSN_TLV_UNICAST_QUERY_TIMEOUT=513, OF_BSN_TLV_UNICAST_RATE=514, OF_BSN_TLV_UNKNOWN_MULTICAST_RATE=515, OF_BSN_TLV_UNTAGGED=516, OF_BSN_TLV_UPGRADE=517, OF_BSN_TLV_URI_SCHEME=518, OF_BSN_TLV_USE_PACKET_STATE=519, OF_BSN_TLV_USER_CONFIGURED=520, OF_BSN_TLV_VFI=521, OF_BSN_TLV_VFP_CLASS_ID=522, OF_BSN_TLV_VIRTUAL=523, OF_BSN_TLV_VLAN_MAC_LIST=524, OF_BSN_TLV_VLAN_PCP=525, OF_BSN_TLV_VLAN_VID=526, OF_BSN_TLV_VLAN_VID_MASK=527, OF_BSN_TLV_VNI=528, OF_BSN_TLV_VPN_KEY=529, OF_BSN_TLV_VRF=530, OF_BSN_TLV_VXLAN_EGRESS_LAG=531, OF_BSN_VLAN_COUNTER_STATS_ENTRY=532, OF_BSN_VLAN_MAC=533, OF_BSN_VPORT=534, OF_BSN_VPORT_L2GRE=535, OF_BSN_VPORT_Q_IN_Q=536, OF_BSN_VRF_COUNTER_STATS_ENTRY=537, OF_BUCKET=538, OF_BUCKET_COUNTER=539, OF_BUNDLE_PROP=540, OF_BUNDLE_PROP_EXPERIMENTER=541, OF_FLOW_STATS_ENTRY=542, OF_GROUP_DESC_STATS_ENTRY=543, OF_GROUP_STATS_ENTRY=544, OF_HELLO_ELEM=545, OF_HELLO_ELEM_VERSIONBITMAP=546, OF_INSTRUCTION=547, OF_INSTRUCTION_APPLY_ACTIONS=548, OF_INSTRUCTION_BSN=549, OF_INSTRUCTION_BSN_ARP_OFFLOAD=550, OF_INSTRUCTION_BSN_AUTO_NEGOTIATION=551, OF_INSTRUCTION_BSN_DENY=552, OF_INSTRUCTION_BSN_DHCP_OFFLOAD=553, OF_INSTRUCTION_BSN_DIRECTED_BROADCAST=554, OF_INSTRUCTION_BSN_DISABLE_L3=555, OF_INSTRUCTION_BSN_DISABLE_SPLIT_HORIZON_CHECK=556, OF_INSTRUCTION_BSN_DISABLE_SRC_MAC_CHECK=557, OF_INSTRUCTION_BSN_DISABLE_VLAN_COUNTERS=558, OF_INSTRUCTION_BSN_HASH_SELECT=559, OF_INSTRUCTION_BSN_INTERNAL_PRIORITY=560, OF_INSTRUCTION_BSN_NDP_OFFLOAD=561, OF_INSTRUCTION_BSN_PACKET_OF_DEATH=562, OF_INSTRUCTION_BSN_PERMIT=563, OF_INSTRUCTION_BSN_PRIORITIZE_PDUS=564, OF_INSTRUCTION_BSN_REQUIRE_VLAN_XLATE=565, OF_INSTRUCTION_BSN_SPAN_DESTINATION=566, OF_INSTRUCTION_CLEAR_ACTIONS=567, OF_INSTRUCTION_EXPERIMENTER=568, OF_INSTRUCTION_GOTO_TABLE=569, OF_INSTRUCTION_ID=570, OF_INSTRUCTION_ID_APPLY_ACTIONS=571, OF_INSTRUCTION_ID_BSN=572, OF_INSTRUCTION_ID_BSN_ARP_OFFLOAD=573, OF_INSTRUCTION_ID_BSN_AUTO_NEGOTIATION=574, OF_INSTRUCTION_ID_BSN_DENY=575, OF_INSTRUCTION_ID_BSN_DHCP_OFFLOAD=576, OF_INSTRUCTION_ID_BSN_DIRECTED_BROADCAST=577, OF_INSTRUCTION_ID_BSN_DISABLE_L3=578, OF_INSTRUCTION_ID_BSN_DISABLE_SPLIT_HORIZON_CHECK=579, OF_INSTRUCTION_ID_BSN_DISABLE_SRC_MAC_CHECK=580, OF_INSTRUCTION_ID_BSN_DISABLE_VLAN_COUNTERS=581, OF_INSTRUCTION_ID_BSN_HASH_SELECT=582, OF_INSTRUCTION_ID_BSN_INTERNAL_PRIORITY=583, OF_INSTRUCTION_ID_BSN_NDP_OFFLOAD=584, OF_INSTRUCTION_ID_BSN_PACKET_OF_DEATH=585, OF_INSTRUCTION_ID_BSN_PERMIT=586, OF_INSTRUCTION_ID_BSN_PRIORITIZE_PDUS=587, OF_INSTRUCTION_ID_BSN_REQUIRE_VLAN_XLATE=588, OF_INSTRUCTION_ID_BSN_SPAN_DESTINATION=589, OF_INSTRUCTION_ID_CLEAR_ACTIONS=590, OF_INSTRUCTION_ID_EXPERIMENTER=591, OF_INSTRUCTION_ID_GOTO_TABLE=592, OF_INSTRUCTION_ID_METER=593, OF_INSTRUCTION_ID_WRITE_ACTIONS=594, OF_INSTRUCTION_ID_WRITE_METADATA=595, OF_INSTRUCTION_METER=596, OF_INSTRUCTION_WRITE_ACTIONS=597, OF_INSTRUCTION_WRITE_METADATA=598, OF_MATCH_V1=599, OF_MATCH_V2=600, OF_MATCH_V3=601, OF_METER_BAND=602, OF_METER_BAND_DROP=603, OF_METER_BAND_DSCP_REMARK=604, OF_METER_BAND_EXPERIMENTER=605, OF_METER_BAND_STATS=606, OF_METER_CONFIG=607, OF_METER_FEATURES=608, OF_METER_STATS=609, OF_OXM=610, OF_OXM_ARP_OP=611, OF_OXM_ARP_OP_MASKED=612, OF_OXM_ARP_SHA=613, OF_OXM_ARP_SHA_MASKED=614, OF_OXM_ARP_SPA=615, OF_OXM_ARP_SPA_MASKED=616, OF_OXM_ARP_THA=617, OF_OXM_ARP_THA_MASKED=618, OF_OXM_ARP_TPA=619, OF_OXM_ARP_TPA_MASKED=620, OF_OXM_BSN_EGR_PORT_GROUP_ID=621, OF_OXM_BSN_EGR_PORT_GROUP_ID_MASKED=622, OF_OXM_BSN_GLOBAL_VRF_ALLOWED=623, OF_OXM_BSN_GLOBAL_VRF_ALLOWED_MASKED=624, OF_OXM_BSN_IFP_CLASS_ID=625, OF_OXM_BSN_IFP_CLASS_ID_MASKED=626, OF_OXM_BSN_IN_PORTS_128=627, OF_OXM_BSN_IN_PORTS_128_MASKED=628, OF_OXM_BSN_IN_PORTS_512=629, OF_OXM_BSN_IN_PORTS_512_MASKED=630, OF_OXM_BSN_INGRESS_PORT_GROUP_ID=631, OF_OXM_BSN_INGRESS_PORT_GROUP_ID_MASKED=632, OF_OXM_BSN_INNER_ETH_DST=633, OF_OXM_BSN_INNER_ETH_DST_MASKED=634, OF_OXM_BSN_INNER_ETH_SRC=635, OF_OXM_BSN_INNER_ETH_SRC_MASKED=636, OF_OXM_BSN_INNER_VLAN_VID=637, OF_OXM_BSN_INNER_VLAN_VID_MASKED=638, OF_OXM_BSN_IP_FRAGMENTATION=639, OF_OXM_BSN_IP_FRAGMENTATION_MASKED=640, OF_OXM_BSN_L2_CACHE_HIT=641, OF_OXM_BSN_L2_CACHE_HIT_MASKED=642, OF_OXM_BSN_L3_DST_CLASS_ID=643, OF_OXM_BSN_L3_DST_CLASS_ID_MASKED=644, OF_OXM_BSN_L3_INTERFACE_CLASS_ID=645, OF_OXM_BSN_L3_INTERFACE_CLASS_ID_MASKED=646, OF_OXM_BSN_L3_SRC_CLASS_ID=647, OF_OXM_BSN_L3_SRC_CLASS_ID_MASKED=648, OF_OXM_BSN_LAG_ID=649, OF_OXM_BSN_LAG_ID_MASKED=650, OF_OXM_BSN_TCP_FLAGS=651, OF_OXM_BSN_TCP_FLAGS_MASKED=652, OF_OXM_BSN_UDF0=653, OF_OXM_BSN_UDF0_MASKED=654, OF_OXM_BSN_UDF1=655, OF_OXM_BSN_UDF1_MASKED=656, OF_OXM_BSN_UDF2=657, OF_OXM_BSN_UDF2_MASKED=658, OF_OXM_BSN_UDF3=659, OF_OXM_BSN_UDF3_MASKED=660, OF_OXM_BSN_UDF4=661, OF_OXM_BSN_UDF4_MASKED=662, OF_OXM_BSN_UDF5=663, OF_OXM_BSN_UDF5_MASKED=664, OF_OXM_BSN_UDF6=665, OF_OXM_BSN_UDF6_MASKED=666, OF_OXM_BSN_UDF7=667, OF_OXM_BSN_UDF7_MASKED=668, OF_OXM_BSN_VFI=669, OF_OXM_BSN_VFI_MASKED=670, OF_OXM_BSN_VLAN_XLATE_PORT_GROUP_ID=671, OF_OXM_BSN_VLAN_XLATE_PORT_GROUP_ID_MASKED=672, OF_OXM_BSN_VRF=673, OF_OXM_BSN_VRF_MASKED=674, OF_OXM_BSN_VXLAN_NETWORK_ID=675, OF_OXM_BSN_VXLAN_NETWORK_ID_MASKED=676, OF_OXM_CONN_TRACKING_IPV6_DST=677, OF_OXM_CONN_TRACKING_IPV6_DST_MASKED=678, OF_OXM_CONN_TRACKING_IPV6_SRC=679, OF_OXM_CONN_TRACKING_IPV6_SRC_MASKED=680, OF_OXM_CONN_TRACKING_LABEL=681, OF_OXM_CONN_TRACKING_LABEL_MASKED=682, OF_OXM_CONN_TRACKING_MARK=683, OF_OXM_CONN_TRACKING_MARK_MASKED=684, OF_OXM_CONN_TRACKING_NW_DST=685, OF_OXM_CONN_TRACKING_NW_DST_MASKED=686, OF_OXM_CONN_TRACKING_NW_PROTO=687, OF_OXM_CONN_TRACKING_NW_PROTO_MASKED=688, OF_OXM_CONN_TRACKING_NW_SRC=689, OF_OXM_CONN_TRACKING_NW_SRC_MASKED=690, OF_OXM_CONN_TRACKING_STATE=691, OF_OXM_CONN_TRACKING_STATE_MASKED=692, OF_OXM_CONN_TRACKING_TP_DST=693, OF_OXM_CONN_TRACKING_TP_DST_MASKED=694, OF_OXM_CONN_TRACKING_TP_SRC=695, OF_OXM_CONN_TRACKING_TP_SRC_MASKED=696, OF_OXM_CONN_TRACKING_ZONE=697, OF_OXM_CONN_TRACKING_ZONE_MASKED=698, OF_OXM_ETH_DST=699, OF_OXM_ETH_DST_MASKED=700, OF_OXM_ETH_SRC=701, OF_OXM_ETH_SRC_MASKED=702, OF_OXM_ETH_TYPE=703, OF_OXM_ETH_TYPE_MASKED=704, OF_OXM_ICMPV4_CODE=705, OF_OXM_ICMPV4_CODE_MASKED=706, OF_OXM_ICMPV4_TYPE=707, OF_OXM_ICMPV4_TYPE_MASKED=708, OF_OXM_ICMPV6_CODE=709, OF_OXM_ICMPV6_CODE_MASKED=710, OF_OXM_ICMPV6_TYPE=711, OF_OXM_ICMPV6_TYPE_MASKED=712, OF_OXM_IN_PHY_PORT=713, OF_OXM_IN_PHY_PORT_MASKED=714, OF_OXM_IN_PORT=715, OF_OXM_IN_PORT_MASKED=716, OF_OXM_IP_DSCP=717, OF_OXM_IP_DSCP_MASKED=718, OF_OXM_IP_ECN=719, OF_OXM_IP_ECN_MASKED=720, OF_OXM_IP_PROTO=721, OF_OXM_IP_PROTO_MASKED=722, OF_OXM_IPV4_DST=723, OF_OXM_IPV4_DST_MASKED=724, OF_OXM_IPV4_SRC=725, OF_OXM_IPV4_SRC_MASKED=726, OF_OXM_IPV6_DST=727, OF_OXM_IPV6_DST_MASKED=728, OF_OXM_IPV6_EXTHDR=729, OF_OXM_IPV6_EXTHDR_MASKED=730, OF_OXM_IPV6_FLABEL=731, OF_OXM_IPV6_FLABEL_MASKED=732, OF_OXM_IPV6_ND_SLL=733, OF_OXM_IPV6_ND_SLL_MASKED=734, OF_OXM_IPV6_ND_TARGET=735, OF_OXM_IPV6_ND_TARGET_MASKED=736, OF_OXM_IPV6_ND_TLL=737, OF_OXM_IPV6_ND_TLL_MASKED=738, OF_OXM_IPV6_SRC=739, OF_OXM_IPV6_SRC_MASKED=740, OF_OXM_METADATA=741, OF_OXM_METADATA_MASKED=742, OF_OXM_MPLS_BOS=743, OF_OXM_MPLS_BOS_MASKED=744, OF_OXM_MPLS_LABEL=745, OF_OXM_MPLS_LABEL_MASKED=746, OF_OXM_MPLS_TC=747, OF_OXM_MPLS_TC_MASKED=748, OF_OXM_OVS_TCP_FLAGS=749, OF_OXM_OVS_TCP_FLAGS_MASKED=750, OF_OXM_PBB_UCA=751, OF_OXM_PBB_UCA_MASKED=752, OF_OXM_SCTP_DST=753, OF_OXM_SCTP_DST_MASKED=754, OF_OXM_SCTP_SRC=755, OF_OXM_SCTP_SRC_MASKED=756, OF_OXM_TCP_DST=757, OF_OXM_TCP_DST_MASKED=758, OF_OXM_TCP_SRC=759, OF_OXM_TCP_SRC_MASKED=760, OF_OXM_TUNNEL_ID=761, OF_OXM_TUNNEL_ID_MASKED=762, OF_OXM_TUNNEL_IPV4_DST=763, OF_OXM_TUNNEL_IPV4_DST_MASKED=764, OF_OXM_TUNNEL_IPV4_SRC=765, OF_OXM_TUNNEL_IPV4_SRC_MASKED=766, OF_OXM_UDP_DST=767, OF_OXM_UDP_DST_MASKED=768, OF_OXM_UDP_SRC=769, OF_OXM_UDP_SRC_MASKED=770, OF_OXM_VLAN_PCP=771, OF_OXM_VLAN_PCP_MASKED=772, OF_OXM_VLAN_VID=773, OF_OXM_VLAN_VID_MASKED=774, OF_PACKET_QUEUE=775, OF_PORT_DESC=776, OF_PORT_DESC_PROP=777, OF_PORT_DESC_PROP_BSN=778, OF_PORT_DESC_PROP_BSN_BREAKOUT=779, OF_PORT_DESC_PROP_BSN_DRIVER_INFO_JSON=780, OF_PORT_DESC_PROP_BSN_EXTENDED_CAPABILITIES=781, OF_PORT_DESC_PROP_BSN_FORWARD_ERROR_CORRECTION=782, OF_PORT_DESC_PROP_BSN_GENERATION_ID=783, OF_PORT_DESC_PROP_BSN_MISC_CAPABILITIES=784, OF_PORT_DESC_PROP_BSN_SFF_JSON=785, OF_PORT_DESC_PROP_BSN_SPEED_CAPABILITIES=786, OF_PORT_DESC_PROP_BSN_UPLINK=787, OF_PORT_DESC_PROP_ETHERNET=788, OF_PORT_DESC_PROP_EXPERIMENTER=789, OF_PORT_DESC_PROP_OPTICAL=790, OF_PORT_MOD_PROP=791, OF_PORT_MOD_PROP_ETHERNET=792, OF_PORT_MOD_PROP_EXPERIMENTER=793, OF_PORT_MOD_PROP_OPTICAL=794, OF_PORT_STATS_ENTRY=795, OF_PORT_STATS_PROP=796, OF_PORT_STATS_PROP_ETHERNET=797, OF_PORT_STATS_PROP_EXPERIMENTER=798, OF_PORT_STATS_PROP_EXPERIMENTER_INTEL=799, OF_PORT_STATS_PROP_OPTICAL=800, OF_QUEUE_DESC=801, OF_QUEUE_DESC_PROP=802, OF_QUEUE_DESC_PROP_BSN=803, OF_QUEUE_DESC_PROP_BSN_QUEUE_NAME=804, OF_QUEUE_DESC_PROP_EXPERIMENTER=805, OF_QUEUE_DESC_PROP_MAX_RATE=806, OF_QUEUE_DESC_PROP_MIN_RATE=807, OF_QUEUE_PROP=808, OF_QUEUE_PROP_EXPERIMENTER=809, OF_QUEUE_PROP_MAX_RATE=810, OF_QUEUE_PROP_MIN_RATE=811, OF_QUEUE_STATS_ENTRY=812, OF_QUEUE_STATS_PROP=813, OF_QUEUE_STATS_PROP_EXPERIMENTER=814, OF_ROLE_PROP=815, OF_ROLE_PROP_EXPERIMENTER=816, OF_TABLE_DESC=817, OF_TABLE_FEATURE_PROP=818, OF_TABLE_FEATURE_PROP_APPLY_ACTIONS=819, OF_TABLE_FEATURE_PROP_APPLY_ACTIONS_MISS=820, OF_TABLE_FEATURE_PROP_APPLY_SETFIELD=821, OF_TABLE_FEATURE_PROP_APPLY_SETFIELD_MISS=822, OF_TABLE_FEATURE_PROP_EXPERIMENTER=823, OF_TABLE_FEATURE_PROP_EXPERIMENTER_MISS=824, OF_TABLE_FEATURE_PROP_INSTRUCTIONS=825, OF_TABLE_FEATURE_PROP_INSTRUCTIONS_MISS=826, OF_TABLE_FEATURE_PROP_MATCH=827, OF_TABLE_FEATURE_PROP_NEXT_TABLES=828, OF_TABLE_FEATURE_PROP_NEXT_TABLES_MISS=829, OF_TABLE_FEATURE_PROP_TABLE_SYNC_FROM=830, OF_TABLE_FEATURE_PROP_WILDCARDS=831, OF_TABLE_FEATURE_PROP_WRITE_ACTIONS=832, OF_TABLE_FEATURE_PROP_WRITE_ACTIONS_MISS=833, OF_TABLE_FEATURE_PROP_WRITE_SETFIELD=834, OF_TABLE_FEATURE_PROP_WRITE_SETFIELD_MISS=835, OF_TABLE_FEATURES=836, OF_TABLE_MOD_PROP=837, OF_TABLE_MOD_PROP_EVICTION=838, OF_TABLE_MOD_PROP_EXPERIMENTER=839, OF_TABLE_MOD_PROP_VACANCY=840, OF_TABLE_STATS_ENTRY=841, OF_UINT32=842, OF_UINT64=843, OF_UINT8=844, OF_LIST_ACTION=845, OF_LIST_ACTION_ID=846, OF_LIST_ASYNC_CONFIG_PROP=847, OF_LIST_BSN_CONTROLLER_CONNECTION=848, OF_LIST_BSN_DEBUG_COUNTER_DESC_STATS_ENTRY=849, OF_LIST_BSN_DEBUG_COUNTER_STATS_ENTRY=850, OF_LIST_BSN_FLOW_CHECKSUM_BUCKET_STATS_ENTRY=851, OF_LIST_BSN_GENERIC_STATS_ENTRY=852, OF_LIST_BSN_GENTABLE_BUCKET_STATS_ENTRY=853, OF_LIST_BSN_GENTABLE_DESC_STATS_ENTRY=854, OF_LIST_BSN_GENTABLE_ENTRY_DESC_STATS_ENTRY=855, OF_LIST_BSN_GENTABLE_ENTRY_STATS_ENTRY=856, OF_LIST_BSN_GENTABLE_STATS_ENTRY=857, OF_LIST_BSN_INTERFACE=858, OF_LIST_BSN_LACP_STATS_ENTRY=859, OF_LIST_BSN_PORT_COUNTER_STATS_ENTRY=860, OF_LIST_BSN_SWITCH_PIPELINE_STATS_ENTRY=861, OF_LIST_BSN_TABLE_CHECKSUM_STATS_ENTRY=862, OF_LIST_BSN_TLV=863, OF_LIST_BSN_VLAN_COUNTER_STATS_ENTRY=864, OF_LIST_BSN_VLAN_MAC=865, OF_LIST_BSN_VRF_COUNTER_STATS_ENTRY=866, OF_LIST_BUCKET=867, OF_LIST_BUCKET_COUNTER=868, OF_LIST_BUNDLE_PROP=869, OF_LIST_FLOW_STATS_ENTRY=870, OF_LIST_GROUP_DESC_STATS_ENTRY=871, OF_LIST_GROUP_STATS_ENTRY=872, OF_LIST_HELLO_ELEM=873, OF_LIST_INSTRUCTION=874, OF_LIST_INSTRUCTION_ID=875, OF_LIST_METER_BAND=876, OF_LIST_METER_BAND_STATS=877, OF_LIST_METER_CONFIG=878, OF_LIST_METER_STATS=879, OF_LIST_OXM=880, OF_LIST_PACKET_QUEUE=881, OF_LIST_PORT_DESC=882, OF_LIST_PORT_DESC_PROP=883, OF_LIST_PORT_MOD_PROP=884, OF_LIST_PORT_STATS_ENTRY=885, OF_LIST_PORT_STATS_PROP=886, OF_LIST_QUEUE_DESC=887, OF_LIST_QUEUE_DESC_PROP=888, OF_LIST_QUEUE_PROP=889, OF_LIST_QUEUE_STATS_ENTRY=890, OF_LIST_QUEUE_STATS_PROP=891, OF_LIST_ROLE_PROP=892, OF_LIST_TABLE_DESC=893, OF_LIST_TABLE_FEATURE_PROP=894, OF_LIST_TABLE_FEATURES=895, OF_LIST_TABLE_MOD_PROP=896, OF_LIST_TABLE_STATS_ENTRY=897, OF_LIST_UINT32=898, OF_LIST_UINT64=899, OF_LIST_UINT8=900, OF_OBJECT_COUNT=901 }

user_defined_types: enum of_version_e { OF_VERSION_UNKNOWN=0, OF_VERSION_1_0=1, OF_VERSION_1_1=2, OF_VERSION_1_2=3, OF_VERSION_1_3=4, OF_VERSION_1_4=5 }

user_defined_types: struct of_wire_buffer_s { unsigned char *buf; int alloc_bytes; int current_bytes; void (*free)(void *buf); }


repo: floodlight/loxigen-artifacts

decompiled_code:
__int64 run_utility_tests()
{
int v0; // eax
int v1; // ebx
int v2; // ebx
int v3; // ebx
int v4; // ebx
int v5; // ebx

fprintf(stderr, "test %s:", "has_outport");
v0 = test_has_outport();
if ( v0 )
{
v1 = v0;
fprintf(stderr, " %s\n", "PASS");
if ( v1 == 1 )
goto LABEL_4;
}
else
{
fprintf(stderr, " %s\n", "FAIL");
}
global_error = 1;
if ( exit_on_error )
return 1LL;
LABEL_4:
fprintf(stderr, "test %s:", "of_object_new_from_message");
v2 = test_of_object_new_from_message();
if ( v2 )
{
fprintf(stderr, " %s\n", "PASS");
if ( v2 == 1 )
goto LABEL_7;
}
else
{
fprintf(stderr, " %s\n", "FAIL");
}
global_error = 1;
if ( exit_on_error )
return 1LL;
LABEL_7:
fprintf(stderr, "test %s:", "of_object_new_from_message_preallocated");
v3 = test_of_object_new_from_message_preallocated();
if ( v3 )
{
fprintf(stderr, " %s\n", "PASS");
if ( v3 == 1 )
goto LABEL_10;
}
else
{
fprintf(stderr, " %s\n", "FAIL");
}
global_error = 1;
if ( exit_on_error )
return 1LL;
LABEL_10:
fprintf(stderr, "test %s:", "dump_objs");
v4 = test_dump_objs();
if ( !v4 )
{
fprintf(stderr, " %s\n", "FAIL");
goto LABEL_12;
}
fprintf(stderr, " %s\n", "PASS");
if ( v4 != 1 )
{
LABEL_12:
global_error = 1;
if ( !exit_on_error )
goto LABEL_13;
return 1LL;
}
LABEL_13:
fprintf(stderr, "test %s:", "truncate");
v5 = test_truncate();
if ( v5 )
{
fprintf(stderr, " %s\n", "PASS");
if ( v5 == 1 )
return 1LL;
}
else
{
fprintf(stderr, " %s\n", "FAIL");
}
global_error = 1;
return 1LL;
}

canonical_decompiled_code:
__int64 func5()
{
int v0; // eax
int v1; // ebx
int v2; // ebx
int v3; // ebx
int v4; // ebx
int v5; // ebx

fprintf(stderr, "test %s:", "has_outport");
v0 = func4();
if ( v0 )
{
v1 = v0;
fprintf(stderr, " %s\n", "PASS");
if ( v1 == 1 )
goto LABEL_4;
}
else
{
fprintf(stderr, " %s\n", "FAIL");
}
global_error = 1;
if ( exit_on_error )
return 1LL;
LABEL_4:
fprintf(stderr, "test %s:", "of_object_new_from_message");
v2 = func1();
if ( v2 )
{
fprintf(stderr, " %s\n", "PASS");
if ( v2 == 1 )
goto LABEL_7;
}
else
{
fprintf(stderr, " %s\n", "FAIL");
}
global_error = 1;
if ( exit_on_error )
return 1LL;
LABEL_7:
fprintf(stderr, "test %s:", "of_object_new_from_message_preallocated");
v3 = func2();
if ( v3 )
{
fprintf(stderr, " %s\n", "PASS");
if ( v3 == 1 )
goto LABEL_10;
}
else
{
fprintf(stderr, " %s\n", "FAIL");
}
global_error = 1;
if ( exit_on_error )
return 1LL;
LABEL_10:
fprintf(stderr, "test %s:", "dump_objs");
v4 = test_dump_objs();
if ( !v4 )
{
fprintf(stderr, " %s\n", "FAIL");
goto LABEL_12;
}
fprintf(stderr, " %s\n", "PASS");
if ( v4 != 1 )
{
LABEL_12:
global_error = 1;
if ( !exit_on_error )
goto LABEL_13;
return 1LL;
}
LABEL_13:
fprintf(stderr, "test %s:", "truncate");
v5 = func3();
if ( v5 )
{
fprintf(stderr, " %s\n", "PASS");
if ( v5 == 1 )
return 1LL;
}
else
{
fprintf(stderr, " %s\n", "FAIL");
}
global_error = 1;
return 1LL;
}

original_code:
int
run_utility_tests(void)
{
    do { int rv; do { fprintf(stderr, "test %s:", "has_outport"); fprintf(stderr, "  %s\n", (rv = test_has_outport()) ? "PASS" : "FAIL"); } while (0); if (rv != 1) { global_error=1; if (exit_on_error) return(1); } } while(0);
    do { int rv; do { fprintf(stderr, "test %s:", "of_object_new_from_message"); fprintf(stderr, "  %s\n", (rv = test_of_object_new_from_message()) ? "PASS" : "FAIL"); } while (0); if (rv != 1) { global_error=1; if (exit_on_error) return(1); } } while(0);
    do { int rv; do { fprintf(stderr, "test %s:", "of_object_new_from_message_preallocated"); fprintf(stderr, "  %s\n", (rv = test_of_object_new_from_message_preallocated()) ? "PASS" : "FAIL"); } while (0); if (rv != 1) { global_error=1; if (exit_on_error) return(1); } } while(0);
    do { int rv; do { fprintf(stderr, "test %s:", "dump_objs"); fprintf(stderr, "  %s\n", (rv = test_dump_objs()) ? "PASS" : "FAIL"); } while (0); if (rv != 1) { global_error=1; if (exit_on_error) return(1); } } while(0);
    do { int rv; do { fprintf(stderr, "test %s:", "truncate"); fprintf(stderr, "  %s\n", (rv = test_truncate()) ? "PASS" : "FAIL"); } while (0); if (rv != 1) { global_error=1; if (exit_on_error) return(1); } } while(0);
    return 1;
}

canonical_original_code:
int run_utility_tests()
{
    do { int rv; do { fprintf(stderr, "test %s:", "has_outport"); fprintf(stderr, "  %s\n", (rv = test_has_outport()) ? "PASS" : "FAIL"); } while (0); if (rv != 1) { global_error=1; if (exit_on_error) return(1); } } while(0);
    do { int rv; do { fprintf(stderr, "test %s:", "of_object_new_from_message"); fprintf(stderr, "  %s\n", (rv = test_of_object_new_from_message()) ? "PASS" : "FAIL"); } while (0); if (rv != 1) { global_error=1; if (exit_on_error) return(1); } } while(0);
    do { int rv; do { fprintf(stderr, "test %s:", "of_object_new_from_message_preallocated"); fprintf(stderr, "  %s\n", (rv = test_of_object_new_from_message_preallocated()) ? "PASS" : "FAIL"); } while (0); if (rv != 1) { global_error=1; if (exit_on_error) return(1); } } while(0);
    do { int rv; do { fprintf(stderr, "test %s:", "dump_objs"); fprintf(stderr, "  %s\n", (rv = test_dump_objs()) ? "PASS" : "FAIL"); } while (0); if (rv != 1) { global_error=1; if (exit_on_error) return(1); } } while(0);
    do { int rv; do { fprintf(stderr, "test %s:", "truncate"); fprintf(stderr, "  %s\n", (rv = test_truncate()) ? "PASS" : "FAIL"); } while (0); if (rv != 1) { global_error=1; if (exit_on_error) return(1); } } while(0);
    return 1;
}

variable_types: rv int

return_type: int


repo: ghoso/c-lesson-example

decompiled_code:
int get_loop_num()
{
char s[11]; // [rsp+Dh] [rbp-Bh] BYREF

printf("type number of loop[1-100]: ");
fgets(s, 3, stdin);
return atoi(s);
}

canonical_decompiled_code:
int func7()
{
char s[11]; // [rsp+Dh] [rbp-Bh] BYREF

printf("type number of loop[1-100]: ");
fgets(s, 3, stdin);
return atoi(s);
}

original_code:
int get_loop_num()
{
  char num_str[3];
  printf("type number of loop[1-100]: ");
  fgets(num_str,sizeof(num_str),stdin);
  int num = atoi(num_str);
  return num;
}

variable_types: num int


decompiled_code:
int __fastcall show_output(int a1)
{
unsigned int i; // ebx

puts("Count start !!");
if ( a1 > 0 )
{
for ( i = 0; i != a1; printf("%i\n", i) )
{
++i;
sleep(1u);
}
}
return puts("Count done !!");
}

canonical_decompiled_code:
int __fastcall func8(int a1)
{
unsigned int i; // ebx

puts("Count start !!");
if ( a1 > 0 )
{
for ( i = 0; i != a1; printf("%i\n", i) )
{
++i;
sleep(1u);
}
}
return puts("Count done !!");
}

original_code:
void show_output(int num){
  printf("Count start !!\n");
  int i = 0;
  while (i < num){
    sleep(1);
    printf("%i\n",i+1);
    i++;
  }
  printf("Count done !!\n");
}

variable_types: i int

return_type: void


main

canonical_name: main

decompiled_code:
int __cdecl __noreturn main(int argc, const char **argv, const char **envp)
{
unsigned int v3; // eax

v3 = get_loop_num(argc, argv, envp);
show_output(v3);
exit(0);
}

canonical_decompiled_code:
int __cdecl __noreturn main(int argc, const char **argv, const char **envp)
{
unsigned int v3; // eax

v3 = func7(argc, argv, envp);
func8(v3);
exit(0);
}

original_code:
int main(int argc, char** argv){
  int lnum = get_loop_num();
  show_output(lnum);
  exit(0);
}

canonical_original_code:
int main(int argc, char **argv){
  int lnum = get_loop_num();
  show_output(lnum);
  exit(0);
}

variable_types: argc int

variable_types:
argv
char **

variable_types: lnum int


increment

decompiled_code:
int increment()
{
int result; // eax

printf("static i = %d\n", (unsigned int)i_0);
result = printf("auto j = %d\n", 10LL);
i_0 += 10;
return result;
}

canonical_decompiled_code:
int func7()
{
int result; // eax

printf("static i = %d\n", (unsigned int)i_0);
result = printf("auto j = %d\n", 10LL);
i_0 += 10;
return result;
}

original_code:
void increment(){
  static int i = 10;
  int j = 10;
  printf("static i = %d\n", i);
  printf("auto j = %d\n", j);
  i += 10;
  j += 10;
}

variable_types: j int


main

decompiled_code:
int __cdecl main(int argc, const char **argv, const char **envp)
{
__int64 v3; // rdx
__int64 v4; // rdx

increment(argc, argv, envp);
increment(argc, argv, v3);
return increment(argc, argv, v4);
}

canonical_decompiled_code:
int __cdecl main(int argc, const char **argv, const char **envp)
{
__int64 v3; // rdx
__int64 v4; // rdx

func7(argc, argv, envp);
func7(argc, argv, v3);
return func7(argc, argv, v4);
}

original_code:
void main(int argc,char** argv){
  int i;
  for (i = 0;i < 3;i++){
    increment();
  }
}

canonical_original_code:
void main(int argc, char **argv){
  int i;
  for (i = 0;i < 3;i++){
    increment();
  }
}


sbox

repo: gipi/cryptanalysis

decompiled_code:
__int64 __fastcall sbox(unsigned __int8 a1)
{
if ( (a1 & 0xF0) != 0 )
__assert_fail("(input & 0xf0) == 0x00", "spn.c", 0x16u, "sbox");
return (unsigned __int8)sbox_matrix[a1];
}

canonical_decompiled_code:
__int64 __fastcall func7(unsigned __int8 a1)
{
if ( (a1 & 0xF0) != 0 )
__assert_fail("(input & 0xf0) == 0x00", "spn.c", 0x16u, "sbox");
return (unsigned __int8)sbox_matrix[a1];
}

original_code:
char sbox(uint8_t input) {
    ((void) sizeof (((input & 0xf0) == 0x00) ? 1 : 0), __extension__ ({ if ((input & 0xf0) == 0x00) ; else __assert_fail ("(input & 0xf0) == 0x00", "spn.c", 22, __extension__ __PRETTY_FUNCTION__); }));
    return sbox_matrix[input];
}

canonical_original_code:
char sbox(unsigned char input) {
    ((void) sizeof (((input & 0xf0) == 0x00) ? 1 : 0), __extension__ ({ if ((input & 0xf0) == 0x00) ; else __assert_fail ("(input & 0xf0) == 0x00", "spn.c", 22, __extension__ __PRETTY_FUNCTION__); }));
    return sbox_matrix[input];
}

variable_types:
input
unsigned char

return_type: char


permutation

decompiled_code:
__int64 __fastcall permutation(unsigned __int16 a1)
{
__int64 v1; // rax
unsigned int v2; // er8

v1 = 0LL;
v2 = 0;
do
{
if ( (a1 & (1 << v1)) != 0 )
v2 |= 1 << permutation_matrix[v1];
++v1;
}
while ( v1 != 16 );
return v2;
}

canonical_decompiled_code:
__int64 __fastcall func8(unsigned __int16 a1)
{
__int64 v1; // rax
unsigned int v2; // er8

v1 = 0LL;
v2 = 0;
do
{
if ( (a1 & (1 << v1)) != 0 )
v2 |= 1 << permutation_matrix[v1];
++v1;
}
while ( v1 != 16 );
return v2;
}

original_code:
uint16_t permutation(uint16_t input) {
    uint16_t output = 0;
    int cycle;
    for (cycle = 0 ; cycle < 0x10 ; cycle++) {
        int is = (1 << cycle) & input;
        if (is)
            output |= 1 << permutation_matrix[cycle];
    }
    return output;
}

canonical_original_code:
unsigned short permutation(unsigned short input) {
    unsigned short output = 0;
    int cycle;
    for (cycle = 0 ; cycle < 0x10 ; cycle++) {
        int is = (1 << cycle) & input;
        if (is)
            output |= 1 << permutation_matrix[cycle];
    }
    return output;
}

variable_types:
input
unsigned short

variable_types:
output
unsigned short

variable_types: cycle int

variable_types: is int

return_type: unsigned short


decompiled_code:
__int64 __fastcall four_sboxes(unsigned __int16 a1)
{
char v1; // r12
int v2; // ebp
int v3; // eax
int v4; // edx
int v5; // ebp

v1 = sbox(a1 & 0xF);
v2 = (char)sbox(((int)a1 >> 4) & 0xF);
v3 = sbox(HIBYTE(a1) & 0xF);
v4 = v2;
v5 = v3;
LOWORD(v3) = v1;
return v3 | (16 * v4) | (v5 << 8) | ((unsigned int)sbox(a1 >> 12) << 12);
}

canonical_decompiled_code:
__int64 __fastcall func9(unsigned __int16 a1)
{
char v1; // r12
int v2; // ebp
int v3; // eax
int v4; // edx
int v5; // ebp

v1 = func7(a1 & 0xF);
v2 = (char)func7(((int)a1 >> 4) & 0xF);
v3 = func7(HIBYTE(a1) & 0xF);
v4 = v2;
v5 = v3;
LOWORD(v3) = v1;
return v3 | (16 * v4) | (v5 << 8) | ((unsigned int)func7(a1 >> 12) << 12);
}

original_code:
uint16_t four_sboxes(uint16_t input) {
        uint16_t
        result = sbox(input & 0x000f);
        result |= sbox((input & 0x00f0) >> 4) << 4;
        result |= sbox((input & 0x0f00) >> 8) << 8;
        result |= sbox((input & 0xf000) >> 12) << 12;
        return result;
}

canonical_original_code:
unsigned short four_sboxes(unsigned short input) {
        unsigned short result = sbox(input & 0x000f);
        result |= sbox((input & 0x00f0) >> 4) << 4;
        result |= sbox((input & 0x0f00) >> 8) << 8;
        result |= sbox((input & 0xf000) >> 12) << 12;
        return result;
}

variable_types:
result
unsigned short


decompiled_code:
__int64 __fastcall complete_round(__int16 a1, __int16 a2)
{
unsigned __int16 v2; // ax

v2 = four_sboxes(a1 ^ a2);
return permutation(v2);
}

canonical_decompiled_code:
__int64 __fastcall func10(__int16 a1, __int16 a2)
{
unsigned __int16 v2; // ax

v2 = func9(a1 ^ a2);
return func8(v2);
}

original_code:
uint16_t complete_round(uint16_t input, uint16_t key) {
    input ^= key;
    return permutation(four_sboxes(input));
}

canonical_original_code:
unsigned short complete_round(unsigned short input, unsigned short key) {
    input ^= key;
    return permutation(four_sboxes(input));
}

variable_types:
key
unsigned short


decompiled_code:
__int64 __fastcall last_round(__int16 a1, __int16 a2)
{
return four_sboxes(a1 ^ a2);
}

canonical_decompiled_code:
__int64 __fastcall func11(__int16 a1, __int16 a2)
{
return func9(a1 ^ a2);
}

original_code:
uint16_t last_round(uint16_t input, uint16_t key) {
    return four_sboxes(input ^ key);
}

canonical_original_code:
unsigned short last_round(unsigned short input, unsigned short key) {
    return four_sboxes(input ^ key);
}


usage

decompiled_code:
int __fastcall usage(const char *a1)
{
return fprintf(_bss_start, "usage: %s -key <80bits key>\n\ncrypt the stdin", a1);
}

canonical_decompiled_code:
int __fastcall func12(const char *a1)
{
return fprintf(_bss_start, "usage: %s -key <80bits key>\n\ncrypt the stdin", a1);
}

original_code:
void usage(char* progname) {
    fprintf(stderr,
        "usage: %s -key <80bits key>\n\n"
        "crypt the stdin"
        , progname);
}

canonical_original_code:
void usage(char *progname) {
    fprintf(stderr,
        "usage: %s -key <80bits key>\n\n"
        "crypt the stdin"
        , progname);
}

variable_types:
progname
char *


main

decompiled_code:
int __cdecl main(int argc, const char **argv, const char **envp)
{
const char *v3; // rbp
int v4; // eax
__int16 v5; // r12
unsigned int v6; // er13
int v7; // ebp
__int64 v8; // rbx
unsigned __int16 v9; // si
unsigned __int16 buf; // [rsp+2h] [rbp-36h] BYREF
unsigned __int16 v12; // [rsp+4h] [rbp-34h]
__int16 v13; // [rsp+6h] [rbp-32h] BYREF
__int64 v14; // [rsp+8h] [rbp-30h]

buf = 0;
v14 = 0LL;
v12 = 0;
if ( argc <= 2 )
{
usage(*argv);
exit(1);
}
v3 = argv[2];
__isoc99_sscanf();
*((_BYTE *)v3 + 18) = 0;
__isoc99_sscanf();
while ( 1 )
{
v4 = read(0, &buf, 2uLL);
if ( v4 == -1 )
break;
if ( !v4 )
return 0;
v5 = v14;
v6 = buf;
v7 = 3;
v8 = 0xFFFFLL;
do
{
v9 = v8 & v5;
v8 <<= 16;
v13 = complete_round(v6, v9);
--v7;
}
while ( v7 );
v13 = last_round(v6, v12);
write(1, &v13, 2uLL);
}
perror("stdin");
return 0;
}

canonical_decompiled_code:
int __cdecl main(int argc, const char **argv, const char **envp)
{
const char *v3; // rbp
int v4; // eax
__int16 v5; // r12
unsigned int v6; // er13
int v7; // ebp
__int64 v8; // rbx
unsigned __int16 v9; // si
unsigned __int16 buf; // [rsp+2h] [rbp-36h] BYREF
unsigned __int16 v12; // [rsp+4h] [rbp-34h]
__int16 v13; // [rsp+6h] [rbp-32h] BYREF
__int64 v14; // [rsp+8h] [rbp-30h]

buf = 0;
v14 = 0LL;
v12 = 0;
if ( argc <= 2 )
{
func12(*argv);
exit(1);
}
v3 = argv[2];
__isoc99_sscanf();
*((_BYTE *)v3 + 18) = 0;
__isoc99_sscanf();
while ( 1 )
{
v4 = read(0, &buf, 2uLL);
if ( v4 == -1 )
break;
if ( !v4 )
return 0;
v5 = v14;
v6 = buf;
v7 = 3;
v8 = 0xFFFFLL;
do
{
v9 = v8 & v5;
v8 <<= 16;
v13 = func10(v6, v9);
--v7;
}
while ( v7 );
v13 = func11(v6, v12);
write(1, &v13, 2uLL);
}
perror("stdin");
return 0;
}

original_code:
int main(int argc, char* argv[]) {
    int isRunning = 1;
    uint16_t input = 0;
    uint64_t key = 0x0000000000000000;
    uint16_t key_tail = 0x0000;
    if (argc < 3) {
        usage(argv[0]);
        exit(1);
    }
    char* original_key = argv[2];
    sscanf(original_key + 16 + 2, "%hx", &key_tail);
    original_key[18] = '\0';
    sscanf(original_key, "0x%016llx", &key);
    while (isRunning) {
        int n = read(0, &input, 2);
        switch (n) {
            case -1:
                perror("stdin");
            case 0:
                isRunning = 0;
                continue;
                break;
            default:
                break;
        }
        int round;
        uint16_t result;
        uint64_t mask = 0x000000000000ffff;
        for (round = 0 ; round < 3 ; round++) {
            uint16_t subkey = key & mask;
            result = complete_round(input, subkey);
            mask <<= 16;
        }
        result = last_round(input, key_tail);
        write(1, &result, 2);
    }
    return 0;
}

canonical_original_code:
int main(int argc, char *argv[]) {
    int isRunning = 1;
    unsigned short input = 0;
    unsigned long key = 0x0000000000000000;
    unsigned short key_tail = 0x0000;
    if (argc < 3) {
        usage(argv[0]);
        exit(1);
    }
    char *original_key = argv[2];
    sscanf(original_key + 16 + 2, "%hx", &key_tail);
    original_key[18] = '\0';
    sscanf(original_key, "0x%016llx", &key);
    while (isRunning) {
        int n = read(0, &input, 2);
        switch (n) {
            case -1:
                perror("stdin");
            case 0:
                isRunning = 0;
                continue;
                break;
            default:
                break;
        }
        int round;
        unsigned short result;
        unsigned long mask = 0x000000000000ffff;
        for (round = 0 ; round < 3 ; round++) {
            unsigned short subkey = key & mask;
            result = complete_round(input, subkey);
            mask <<= 16;
        }
        result = last_round(input, key_tail);
        write(1, &result, 2);
    }
    return 0;
}

variable_types:
argv
char *[]

variable_types: isRunning int

variable_types:
key
unsigned long

variable_types: n int

variable_types: round int

variable_types:
mask
unsigned long

variable_types:
subkey
unsigned short


decompiled_code:
__int64 __fastcall get_error(__int64 a1, __int64 a2)
{
__int64 result; // rax
double v3; // xmm1_8
double v4; // xmm0_8

result = 0LL;
v3 = 0.0;
do
{
v4 = *(double *)(a1 + result) - *(double *)(a2 + result);
result += 8LL;
v3 = fmax(fabs(v4), v3);
}
while ( result != 800 );
return result;
}

canonical_decompiled_code:
__int64 __fastcall func7(__int64 a1, __int64 a2)
{
__int64 result; // rax
double v3; // xmm1_8
double v4; // xmm0_8

result = 0LL;
v3 = 0.0;
do
{
v4 = *(double *)(a1 + result) - *(double *)(a2 + result);
result += 8LL;
v3 = fmax(fabs(v4), v3);
}
while ( result != 800 );
return result;
}

original_code:
double get_error(double *x, double *x_final) {
    double max = 0;
    int i;
    for(i = 0; i < n; i++) {
 double error = fabs(x[i] - x_final[i]);
 if(error > max) {
     max = error;
 }
    }
    return max;
}

variable_types:
x
double *

variable_types: max double

variable_types: i int

variable_types: error double

return_type: double


repo: gpjt/rsp

decompiled_code:
__int64 __fastcall on_client_read(__int64 a1)
{
__int64 result; // rax

if ( *(_QWORD *)(a1 + 8) )
result = connection_write();
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(__int64 a1)
{
__int64 result; // rax

if ( *(_QWORD *)(a1 + 8) )
result = connection_write();
return result;
}

original_code:
void on_client_read(void* closure, char* buffer, int len)
{
    struct proxy_data* data = (struct proxy_data*) closure;
    if (data->backend == ((void *)0)) {
        return;
    }
    connection_write(data->backend, buffer, len);
}

canonical_original_code:
void on_client_read(void *closure, char *buffer, int len)
{
    struct proxy_data *data = (struct proxy_data*) closure;
    if (data->backend == ((void *)0)) {
        return;
    }
    connection_write(data->backend, buffer, len);
}

variable_types:
closure
void *

variable_types:
buffer
char *

variable_types: len int

variable_types: struct proxy_data { struct epoll_event_handler { int fd; void (*handle)(struct epoll_event_handler *, unsigned int); void *closure; } *client; struct epoll_event_handler *backend; } *

user_defined_types: struct proxy_data { struct epoll_event_handler *client; struct epoll_event_handler *backend; }


decompiled_code:
__int64 __fastcall on_backend_read(_QWORD *a1)
{
__int64 result; // rax

if ( *a1 )
result = connection_write();
return result;
}

canonical_decompiled_code:
__int64 __fastcall func1(_QWORD *a1)
{
__int64 result; // rax

if ( *a1 )
result = connection_write();
return result;
}

original_code:
void on_backend_read(void* closure, char* buffer, int len)
{
    struct proxy_data* data = (struct proxy_data*) closure;
    if (data->client == ((void *)0)) {
        return;
    }
    connection_write(data->client, buffer, len);
}

canonical_original_code:
void on_backend_read(void *closure, char *buffer, int len)
{
    struct proxy_data *data = (struct proxy_data*) closure;
    if (data->client == ((void *)0)) {
        return;
    }
    connection_write(data->client, buffer, len);
}

user_defined_types: struct epoll_event_handler { int fd; void (*handle)(struct epoll_event_handler *, unsigned int); void *closure; }


decompiled_code:
__int64 __fastcall on_client_close(_QWORD *a1)
{
__int64 result; // rax

if ( a1[1] )
{
connection_close();
*a1 = 0LL;
a1[1] = 0LL;
result = epoll_add_to_free_list(a1);
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func2(_QWORD *a1)
{
__int64 result; // rax

if ( a1[1] )
{
connection_close();
*a1 = 0LL;
a1[1] = 0LL;
result = epoll_add_to_free_list(a1);
}
return result;
}

original_code:
void on_client_close(void* closure)
{
    struct proxy_data* data = (struct proxy_data*) closure;
    if (data->backend == ((void *)0)) {
        return;
    }
    connection_close(data->backend);
    data->client = ((void *)0);
    data->backend = ((void *)0);
    epoll_add_to_free_list(closure);
}

canonical_original_code:
void on_client_close(void *closure)
{
    struct proxy_data *data = (struct proxy_data*) closure;
    if (data->backend == ((void *)0)) {
        return;
    }
    connection_close(data->backend);
    data->client = ((void *)0);
    data->backend = ((void *)0);
    epoll_add_to_free_list(closure);
}


decompiled_code:
__int64 __fastcall on_backend_close(_QWORD *a1)
{
__int64 result; // rax

if ( *a1 )
{
connection_close();
*a1 = 0LL;
a1[1] = 0LL;
result = epoll_add_to_free_list(a1);
}
return result;
}

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

if ( *a1 )
{
connection_close();
*a1 = 0LL;
a1[1] = 0LL;
result = epoll_add_to_free_list(a1);
}
return result;
}

original_code:
void on_backend_close(void* closure)
{
    struct proxy_data* data = (struct proxy_data*) closure;
    if (data->client == ((void *)0)) {
        return;
    }
    connection_close(data->client);
    data->client = ((void *)0);
    data->backend = ((void *)0);
    epoll_add_to_free_list(closure);
}

canonical_original_code:
void on_backend_close(void *closure)
{
    struct proxy_data *data = (struct proxy_data*) closure;
    if (data->client == ((void *)0)) {
        return;
    }
    connection_close(data->client);
    data->client = ((void *)0);
    data->backend = ((void *)0);
    epoll_add_to_free_list(closure);
}


decompiled_code:
int *__fastcall handle_server_socket_event(__int64 a1)
{
__int64 *i; // rbx
int v3; // edi
int *result; // rax

for ( i = *(__int64 **)(a1 + 16); ; handle_client_connection(v3, *i, i[1]) )
{
v3 = accept(*(_DWORD *)a1, 0LL, 0LL);
if ( v3 == -1 )
break;
}
result = _errno_location();
if ( *result != 11 )
{
rsp_log_error("Could not accept");
exit(1);
}
return result;
}

canonical_decompiled_code:
int *__fastcall func4(__int64 a1)
{
__int64 *i; // rbx
int v3; // edi
int *result; // rax

for ( i = *(__int64 **)(a1 + 16); ; handle_client_connection(v3, *i, i[1]) )
{
v3 = accept(*(_DWORD *)a1, 0LL, 0LL);
if ( v3 == -1 )
break;
}
result = _errno_location();
if ( *result != 11 )
{
rsp_log_error("Could not accept");
exit(1);
}
return result;
}

original_code:
void handle_server_socket_event(struct epoll_event_handler* self, uint32_t events)
{
    struct server_socket_event_data* closure = (struct server_socket_event_data*) self->closure;
    int client_socket_fd;
    while (1) {
        client_socket_fd = accept(self->fd, ((void *)0), ((void *)0));
        if (client_socket_fd == -1) {
            if (((*__errno_location ()) == 11) || ((*__errno_location ()) == 11)) {
                break;
            } else {
                rsp_log_error("Could not accept");
                exit(1);
            }
        }
        handle_client_connection(client_socket_fd,
                                 closure->backend_addr,
                                 closure->backend_port_str);
    }
}

canonical_original_code:
void handle_server_socket_event(struct epoll_event_handler *self, unsigned int events)
{
    struct server_socket_event_data *closure = (struct server_socket_event_data*) self->closure;
    int client_socket_fd;
    while (1) {
        client_socket_fd = accept(self->fd, ((void *)0), ((void *)0));
        if (client_socket_fd == -1) {
            if (((*__errno_location ()) == 11) || ((*__errno_location ()) == 11)) {
                break;
            } else {
                rsp_log_error("Could not accept");
                exit(1);
            }
        }
        handle_client_connection(client_socket_fd,
                                 closure->backend_addr,
                                 closure->backend_port_str);
    }
}

variable_types: struct epoll_event_handler { int fd; void (*handle)(struct epoll_event_handler *, unsigned int); void *closure; } *

variable_types:
events
unsigned int

variable_types: struct server_socket_event_data { char *backend_addr; char *backend_port_str; } *


decompiled_code:
__int64 __fastcall create_and_bind(char *service)
{
int v1; // eax
struct addrinfo *v2; // rbx
int v3; // eax
unsigned int v4; // ebp
const char *v6; // rax
int optval; // [rsp+0h] [rbp-54h] BYREF
struct addrinfo *pai; // [rsp+4h] [rbp-50h] BYREF
struct addrinfo req; // [rsp+Ch] [rbp-48h] BYREF

*(_OWORD *)&req.ai_flags = 0LL;
*(_OWORD *)&req.ai_addrlen = 0LL;
req.ai_socktype = 1;
req.ai_flags = 1;
*(_OWORD *)&req.ai_canonname = 0LL;
v1 = getaddrinfo(0LL, service, &req, &pai);
if ( v1 )
{
v6 = gai_strerror(v1);
rsp_log("Couldn't find local host details: %s", v6);
exit(1);
}
v2 = pai;
if ( !pai )
{
LABEL_8:
rsp_log("Couldn't bind");
exit(1);
}
while ( 1 )
{
v3 = socket(v2->ai_family, v2->ai_socktype, v2->ai_protocol);
v4 = v3;
if ( v3 == -1 )
goto LABEL_7;
optval = 1;
if ( setsockopt(v3, 1, 2, &optval, 4u) )
goto LABEL_7;
if ( !bind(v4, v2->ai_addr, v2->ai_addrlen) )
break;
close(v4);
LABEL_7:
v2 = v2->ai_next;
if ( !v2 )
goto LABEL_8;
}
freeaddrinfo(pai);
return v4;
}

canonical_decompiled_code:
__int64 __fastcall func5(char *service)
{
int v1; // eax
struct addrinfo *v2; // rbx
int v3; // eax
unsigned int v4; // ebp
const char *v6; // rax
int optval; // [rsp+0h] [rbp-54h] BYREF
struct addrinfo *pai; // [rsp+4h] [rbp-50h] BYREF
struct addrinfo req; // [rsp+Ch] [rbp-48h] BYREF

*(_OWORD *)&req.ai_flags = 0LL;
*(_OWORD *)&req.ai_addrlen = 0LL;
req.ai_socktype = 1;
req.ai_flags = 1;
*(_OWORD *)&req.ai_canonname = 0LL;
v1 = getaddrinfo(0LL, service, &req, &pai);
if ( v1 )
{
v6 = gai_strerror(v1);
rsp_log("Couldn't find local host details: %s", v6);
exit(1);
}
v2 = pai;
if ( !pai )
{
LABEL_8:
rsp_log("Couldn't bind");
exit(1);
}
while ( 1 )
{
v3 = socket(v2->ai_family, v2->ai_socktype, v2->ai_protocol);
v4 = v3;
if ( v3 == -1 )
goto LABEL_7;
optval = 1;
if ( setsockopt(v3, 1, 2, &optval, 4u) )
goto LABEL_7;
if ( !bind(v4, v2->ai_addr, v2->ai_addrlen) )
break;
close(v4);
LABEL_7:
v2 = v2->ai_next;
if ( !v2 )
goto LABEL_8;
}
freeaddrinfo(pai);
return v4;
}

original_code:
int create_and_bind(char* server_port_str)
{
    struct addrinfo hints;
    memset(&hints, 0, sizeof(struct addrinfo));
    hints.ai_family = 0;
    hints.ai_socktype = SOCK_STREAM;
    hints.ai_flags = 0x0001;
    struct addrinfo* addrs;
    int getaddrinfo_error;
    getaddrinfo_error = getaddrinfo(((void *)0), server_port_str, &hints, &addrs);
    if (getaddrinfo_error != 0) {
        rsp_log("Couldn't find local host details: %s", gai_strerror(getaddrinfo_error));
        exit(1);
    }
    int server_socket_fd;
    struct addrinfo* addr_iter;
    for (addr_iter = addrs; addr_iter != ((void *)0); addr_iter = addr_iter->ai_next) {
        server_socket_fd = socket(addr_iter->ai_family,
                                  addr_iter->ai_socktype,
                                  addr_iter->ai_protocol);
        if (server_socket_fd == -1) {
            continue;
        }
        int so_reuseaddr = 1;
        if (setsockopt(server_socket_fd, 1, 2, &so_reuseaddr, sizeof(so_reuseaddr)) != 0) {
            continue;
        }
        if (bind(server_socket_fd,
                 addr_iter->ai_addr,
                 addr_iter->ai_addrlen) == 0)
        {
            break;
        }
        close(server_socket_fd);
    }
    if (addr_iter == ((void *)0)) {
        rsp_log("Couldn't bind");
        exit(1);
    }
    freeaddrinfo(addrs);
    return server_socket_fd;
}

canonical_original_code:
int create_and_bind(char *server_port_str)
{
    struct addrinfo hints;
    memset(&hints, 0, sizeof(struct addrinfo));
    hints.ai_family = 0;
    hints.ai_socktype = SOCK_STREAM;
    hints.ai_flags = 0x0001;
    struct addrinfo *addrs;
    int getaddrinfo_error;
    getaddrinfo_error = getaddrinfo(((void *)0), server_port_str, &hints, &addrs);
    if (getaddrinfo_error != 0) {
        rsp_log("Couldn't find local host details: %s", gai_strerror(getaddrinfo_error));
        exit(1);
    }
    int server_socket_fd;
    struct addrinfo *addr_iter;
    for (addr_iter = addrs; addr_iter != ((void *)0); addr_iter = addr_iter->ai_next) {
        server_socket_fd = socket(addr_iter->ai_family,
                                  addr_iter->ai_socktype,
                                  addr_iter->ai_protocol);
        if (server_socket_fd == -1) {
            continue;
        }
        int so_reuseaddr = 1;
        if (setsockopt(server_socket_fd, 1, 2, &so_reuseaddr, sizeof(so_reuseaddr)) != 0) {
            continue;
        }
        if (bind(server_socket_fd,
                 addr_iter->ai_addr,
                 addr_iter->ai_addrlen) == 0)
        {
            break;
        }
        close(server_socket_fd);
    }
    if (addr_iter == ((void *)0)) {
        rsp_log("Couldn't bind");
        exit(1);
    }
    freeaddrinfo(addrs);
    return server_socket_fd;
}

variable_types: struct addrinfo { int ai_flags; int ai_family; int ai_socktype; int ai_protocol; unsigned int ai_addrlen; struct sockaddr { unsigned short sa_family; char sa_data[14]; } *ai_addr; char *ai_canonname; struct addrinfo *ai_next; } *

user_defined_types: struct addrinfo { int ai_flags; int ai_family; int ai_socktype; int ai_protocol; unsigned int ai_addrlen; struct sockaddr *ai_addr; char *ai_canonname; struct addrinfo *ai_next; }


decompiled_code:
__int64 __fastcall connection_really_close(__int64 a1)
{
__int64 v1; // rbp
__int64 i; // rbx
__int64 v3; // rax

v1 = *(_QWORD *)(a1 + 16);
for ( i = *(_QWORD *)(v1 + 32); i; *(_QWORD *)(v1 + 32) = i )
{
v3 = i;
i = *(_QWORD *)(i + 24);
if ( !*(_DWORD *)v3 )
epoll_add_to_free_list(*(_QWORD *)(v3 + 8));
epoll_add_to_free_list(*(_QWORD *)(v1 + 32));
}
epoll_remove_handler(a1);
close(*(_DWORD *)a1);
epoll_add_to_free_list(*(_QWORD *)(a1 + 16));
epoll_add_to_free_list(a1);
return rsp_log("Freed connection %p", (const void *)a1);
}

canonical_decompiled_code:
__int64 __fastcall func0(__int64 a1)
{
__int64 v1; // rbp
__int64 i; // rbx
__int64 v3; // rax

v1 = *(_QWORD *)(a1 + 16);
for ( i = *(_QWORD *)(v1 + 32); i; *(_QWORD *)(v1 + 32) = i )
{
v3 = i;
i = *(_QWORD *)(i + 24);
if ( !*(_DWORD *)v3 )
epoll_add_to_free_list(*(_QWORD *)(v3 + 8));
epoll_add_to_free_list(*(_QWORD *)(v1 + 32));
}
epoll_remove_handler(a1);
close(*(_DWORD *)a1);
epoll_add_to_free_list(*(_QWORD *)(a1 + 16));
epoll_add_to_free_list(a1);
return rsp_log("Freed connection %p", (const void *)a1);
}

original_code:
void connection_really_close(struct epoll_event_handler* self)
{
    struct connection_closure* closure = (struct connection_closure* ) self->closure;
    struct data_buffer_entry* next;
    while (closure->write_buffer != ((void *)0)) {
        next = closure->write_buffer->next;
        if (!closure->write_buffer->is_close_message) {
            epoll_add_to_free_list(closure->write_buffer->data);
        }
        epoll_add_to_free_list(closure->write_buffer);
        closure->write_buffer = next;
    }
    epoll_remove_handler(self);
    close(self->fd);
    epoll_add_to_free_list(self->closure);
    epoll_add_to_free_list(self);
    rsp_log("Freed connection %p", self);
}

canonical_original_code:
void connection_really_close(struct epoll_event_handler *self)
{
    struct connection_closure *closure = (struct connection_closure* ) self->closure;
    struct data_buffer_entry *next;
    while (closure->write_buffer != ((void *)0)) {
        next = closure->write_buffer->next;
        if (!closure->write_buffer->is_close_message) {
            epoll_add_to_free_list(closure->write_buffer->data);
        }
        epoll_add_to_free_list(closure->write_buffer);
        closure->write_buffer = next;
    }
    epoll_remove_handler(self);
    close(self->fd);
    epoll_add_to_free_list(self->closure);
    epoll_add_to_free_list(self);
    rsp_log("Freed connection %p", self);
}

variable_types: struct connection_closure { void (*on_read)(void *closure, char *buffer, int len); void *on_read_closure; void (*on_close)(void *closure); void *on_close_closure; struct data_buffer_entry { int is_close_message; char *data; int current_offset; int len; struct data_buffer_entry *next; } *write_buffer; } *

user_defined_types: struct connection_closure { void (*on_read)(void *closure, char *buffer, int len); void *on_read_closure; void (*on_close)(void *closure); void *on_close_closure; struct data_buffer_entry *write_buffer; }


decompiled_code:
__int64 __fastcall add_write_buffer_entry(__int64 a1, __int64 a2)
{
__int64 result; // rax
__int64 v3; // rdx

result = *(_QWORD *)(a1 + 32);
if ( result )
{
do
{
v3 = result;
result = *(_QWORD *)(result + 24);
}
while ( result );
*(_QWORD *)(v3 + 24) = a2;
}
else
{
*(_QWORD *)(a1 + 32) = a2;
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func1(__int64 a1, __int64 a2)
{
__int64 result; // rax
__int64 v3; // rdx

result = *(_QWORD *)(a1 + 32);
if ( result )
{
do
{
v3 = result;
result = *(_QWORD *)(result + 24);
}
while ( result );
*(_QWORD *)(v3 + 24) = a2;
}
else
{
*(_QWORD *)(a1 + 32) = a2;
}
return result;
}

original_code:
void add_write_buffer_entry(struct connection_closure* closure, struct data_buffer_entry* new_entry)
{
    struct data_buffer_entry* last_buffer_entry;
    if (closure->write_buffer == ((void *)0)) {
        closure->write_buffer = new_entry;
    } else {
        for (last_buffer_entry=closure->write_buffer; last_buffer_entry->next != ((void *)0); last_buffer_entry=last_buffer_entry->next)
            ;
        last_buffer_entry->next = new_entry;
    }
}

canonical_original_code:
void add_write_buffer_entry(struct connection_closure *closure, struct data_buffer_entry *new_entry)
{
    struct data_buffer_entry *last_buffer_entry;
    if (closure->write_buffer == ((void *)0)) {
        closure->write_buffer = new_entry;
    } else {
        for (last_buffer_entry=closure->write_buffer; last_buffer_entry->next != ((void *)0); last_buffer_entry=last_buffer_entry->next)
            ;
        last_buffer_entry->next = new_entry;
    }
}

variable_types: struct data_buffer_entry { int is_close_message; char *data; int current_offset; int len; struct data_buffer_entry *next; } *


decompiled_code:
__int64 __fastcall connection_close(__int64 a1)
{
_QWORD *v1; // rbp
bool v2; // zf
_QWORD *v3; // rax

v1 = *(_QWORD **)(a1 + 16);
v2 = v1[4] == 0LL;
*v1 = 0LL;
v1[2] = 0LL;
if ( v2 )
return connection_really_close(a1);
v3 = malloc(0x20uLL);
*(_DWORD *)v3 = 1;
v3[3] = 0LL;
return add_write_buffer_entry((__int64)v1, (__int64)v3);
}

original_code:
void connection_close(struct epoll_event_handler* self)
{
    struct connection_closure* closure = (struct connection_closure* ) self->closure;
    closure->on_read = ((void *)0);
    closure->on_close = ((void *)0);
    if (closure->write_buffer == ((void *)0)) {
        connection_really_close(self);
    } else {
        struct data_buffer_entry* new_entry = malloc(sizeof(struct data_buffer_entry));
        new_entry->is_close_message = 1;
        new_entry->next = ((void *)0);
        add_write_buffer_entry(closure, new_entry);
    }
}

canonical_original_code:
void connection_close(struct epoll_event_handler *self)
{
    struct connection_closure *closure = (struct connection_closure* ) self->closure;
    closure->on_read = ((void *)0);
    closure->on_close = ((void *)0);
    if (closure->write_buffer == ((void *)0)) {
        connection_really_close(self);
    } else {
        struct data_buffer_entry *new_entry = malloc(sizeof(struct data_buffer_entry));
        new_entry->is_close_message = 1;
        new_entry->next = ((void *)0);
        add_write_buffer_entry(closure, new_entry);
    }
}

user_defined_types: struct data_buffer_entry { int is_close_message; char *data; int current_offset; int len; struct data_buffer_entry *next; }


decompiled_code:
__int64 __fastcall connection_on_close_event(__int64 a1)
{
__int64 v1; // rdx
void (__fastcall *v2)(_QWORD); // rax

v1 = *(_QWORD *)(a1 + 16);
v2 = *(void (__fastcall **)(_QWORD))(v1 + 16);
if ( v2 )
v2(*(_QWORD *)(v1 + 24));
return connection_close(a1);
}

canonical_decompiled_code:
__int64 __fastcall func3(__int64 a1)
{
__int64 v1; // rdx
void (__fastcall *v2)(_QWORD); // rax

v1 = *(_QWORD *)(a1 + 16);
v2 = *(void (__fastcall **)(_QWORD))(v1 + 16);
if ( v2 )
v2(*(_QWORD *)(v1 + 24));
return func2(a1);
}

original_code:
void connection_on_close_event(struct epoll_event_handler* self)
{
    struct connection_closure* closure = (struct connection_closure*) self->closure;
    if (closure->on_close != ((void *)0)) {
        closure->on_close(closure->on_close_closure);
    }
    connection_close(self);
}

canonical_original_code:
void connection_on_close_event(struct epoll_event_handler *self)
{
    struct connection_closure *closure = (struct connection_closure*) self->closure;
    if (closure->on_close != ((void *)0)) {
        closure->on_close(closure->on_close_closure);
    }
    connection_close(self);
}