{"$schema": "https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json",
 "version": "2.1.0",
 "runs": [{"tool": {"driver": {"name": "GNU C23",
                               "fullName": "GNU C23 (GCC) version 16.1.1 20260703 (Red Hat 16.1.1-4) (x86_64-redhat-linux)",
                               "version": "16.1.1 20260703 (Red Hat 16.1.1-4)",
                               "informationUri": "https://gcc.gnu.org/gcc-16/",
                               "rules": [{"id": "-Wanalyzer-null-dereference",
                                          "helpUri": "https://gcc.gnu.org/onlinedocs/gcc-16.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-null-dereference"},
                                         {"id": "-Wanalyzer-malloc-leak",
                                          "helpUri": "https://gcc.gnu.org/onlinedocs/gcc-16.1.0/gcc/Static-Analyzer-Options.html#index-Wanalyzer-malloc-leak"}]}},
           "taxonomies": [{"name": "CWE",
                           "version": "4.7",
                           "organization": "MITRE",
                           "shortDescription": {"text": "The MITRE Common Weakness Enumeration"},
                           "taxa": [{"id": "476",
                                     "helpUri": "https://cwe.mitre.org/data/definitions/476.html"},
                                    {"id": "401",
                                     "helpUri": "https://cwe.mitre.org/data/definitions/401.html"}]}],
           "invocations": [{"arguments": ["/usr/libexec/gcc/x86_64-redhat-linux/16/cc1",
                                          "-quiet",
                                          "-I",
                                          "../src/include/",
                                          "-D",
                                          "_GNU_SOURCE",
                                          "-D",
                                          "__SANE_USERSPACE_TYPES__",
                                          "-D",
                                          "_LARGEFILE_SOURCE",
                                          "-D",
                                          "_FILE_OFFSET_BITS=64",
                                          "-D",
                                          "LIBURING_BUILD_TEST",
                                          "-include",
                                          "../config-host.h",
                                          "fdinfo.c",
                                          "-quiet",
                                          "-dumpbase",
                                          "fdinfo.c",
                                          "-dumpbase-ext",
                                          ".c",
                                          "-m64",
                                          "-mtune=generic",
                                          "-march=x86-64",
                                          "-mtls-dialect=gnu2",
                                          "-O2",
                                          "-Wno-unused-parameter",
                                          "-Wno-sign-compare",
                                          "-Wno-unknown-pragmas",
                                          "-flto=auto",
                                          "-ffat-lto-objects",
                                          "-fexceptions",
                                          "-fstack-protector-strong",
                                          "-fasynchronous-unwind-tables",
                                          "-fstack-clash-protection",
                                          "-fcf-protection=full",
                                          "-fno-omit-frame-pointer",
                                          "-fanalyzer",
                                          "-fdiagnostics-path-format=separate-events",
                                          "-fno-diagnostics-show-caret",
                                          "-fno-lto",
                                          "-fanalyzer-assume-nothrow",
                                          "-fdiagnostics-text-art-charset=none",
                                          "-fdiagnostics-set-output=sarif:file=/builddir/gcc-results/2011-8BAn.sarif",
                                          "-o",
                                          "/tmp/ccUGPlFB.s"],
                            "workingDirectory": {"uri": "/builddir/build/BUILD/liburing-2.13-build/liburing-2.13/test"},
                            "startTimeUtc": "2026-08-03T18:01:42Z",
                            "executionSuccessful": true,
                            "toolExecutionNotifications": [],
                            "endTimeUtc": "2026-08-03T18:01:44Z"}],
           "originalUriBaseIds": {"PWD": {"uri": "file:///builddir/build/BUILD/liburing-2.13-build/liburing-2.13/test/"}},
           "artifacts": [{"location": {"uri": "fdinfo.c",
                                       "uriBaseId": "PWD"},
                          "sourceLanguage": "c",
                          "contents": {"text": "/* SPDX-License-Identifier: MIT */\n/*\n * Description: do SQPOLL IO with concurrent fdinfo reading\n */\n#include <errno.h>\n#include <stdio.h>\n#include <unistd.h>\n#include <stdlib.h>\n#include <string.h>\n#include <fcntl.h>\n#include <sys/types.h>\n#include <poll.h>\n#include <sys/eventfd.h>\n#include <sys/resource.h>\n\n#include \"helpers.h\"\n#include \"liburing.h\"\n\n#define FILE_SIZE\t(256 * 1024)\n#define BS\t\t8192\n#define BUFFERS\t\t(FILE_SIZE / BS)\n\nstatic struct iovec *vecs;\nstatic int no_read;\nstatic int warned;\n\nstatic void fdinfo_read(struct io_uring *ring)\n{\n\tchar fd_name[128];\n\tchar *buf;\n\tint fd;\n\n\tbuf = malloc(4096);\n\n\tsprintf(fd_name, \"/proc/self/fdinfo/%d\", ring->ring_fd);\n\tfd = open(fd_name, O_RDONLY);\n\tif (fd < 0) {\n\t\tperror(\"open\");\n\t\treturn;\n\t}\n\n\tdo {\n\t\tint ret = read(fd, buf, 4096);\n\n\t\tif (ret < 0) {\n\t\t\tperror(\"fdinfo read\");\n\t\t\tbreak;\n\t\t} else if (ret == 4096) {\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t} while (1);\n\n\tclose(fd);\n\tfree(buf);\n}\n\nstatic int __test_io(const char *file, struct io_uring *ring, int write,\n\t\t     int buffered, int sqthread, int fixed, int nonvec,\n\t\t     int buf_select, int seq, int exp_len, int mixed)\n{\n\tstruct io_uring_sqe *sqe;\n\tstruct io_uring_cqe *cqe;\n\tint open_flags;\n\tint i, fd = -1, ret;\n\toff_t offset;\n\n#ifdef VERBOSE\n\tfprintf(stdout, \"%s: start %d/%d/%d/%d/%d/%d: \", __FUNCTION__, write,\n\t\t\t\t\t\t\tbuffered, sqthread,\n\t\t\t\t\t\t\tfixed, nonvec, mixed);\n#endif\n\tif (write)\n\t\topen_flags = O_WRONLY;\n\telse\n\t\topen_flags = O_RDONLY;\n\tif (!buffered)\n\t\topen_flags |= O_DIRECT;\n\n\tif (fixed) {\n\t\tret = t_register_buffers(ring, vecs, BUFFERS);\n\t\tif (ret == T_SETUP_SKIP)\n\t\t\treturn T_EXIT_SKIP;\n\t\tif (ret != T_SETUP_OK) {\n\t\t\tfprintf(stderr, \"buffer reg failed: %d\\n\", ret);\n\t\t\tgoto err;\n\t\t}\n\t}\n\n\tfd = open(file, open_flags);\n\tif (fd < 0) {\n\t\tif (errno == EINVAL)\n\t\t\treturn 0;\n\t\tif (errno == EPERM || errno == EACCES)\n\t\t\treturn T_EXIT_SKIP;\n\t\tperror(\"file open\");\n\t\tgoto err;\n\t}\n\n\tif (sqthread) {\n\t\tret = io_uring_register_files(ring, &fd, 1);\n\t\tif (ret) {\n\t\t\tfprintf(stderr, \"file reg failed: %d\\n\", ret);\n\t\t\tgoto err;\n\t\t}\n\t}\n\n\toffset = 0;\n\tfor (i = 0; i < BUFFERS; i++) {\n\t\tif (mixed && i & 1) {\n\t\t\tsqe = io_uring_get_sqe128(ring);\n\t\t\tif (!sqe) {\n\t\t\t\tfprintf(stderr, \"sqe get failed\\n\");\n\t\t\t\tgoto err;\n\t\t\t}\n\t\t\tio_uring_prep_nop128(sqe);\n\t\t\tsqe->user_data = i;\n\t\t\tcontinue;\n\t\t}\n\n\t\tsqe = io_uring_get_sqe(ring);\n\t\tif (!sqe) {\n\t\t\tfprintf(stderr, \"sqe get failed\\n\");\n\t\t\tgoto err;\n\t\t}\n\t\tif (!seq)\n\t\t\toffset = BS * (rand() % BUFFERS);\n\t\tif (write) {\n\t\t\tint do_fixed = fixed;\n\t\t\tint use_fd = fd;\n\n\t\t\tif (sqthread)\n\t\t\t\tuse_fd = 0;\n\t\t\tif (fixed && (i & 1))\n\t\t\t\tdo_fixed = 0;\n\t\t\tif (do_fixed) {\n\t\t\t\tio_uring_prep_write_fixed(sqe, use_fd, vecs[i].iov_base,\n\t\t\t\t\t\t\t\tvecs[i].iov_len,\n\t\t\t\t\t\t\t\toffset, i);\n\t\t\t} else if (nonvec) {\n\t\t\t\tio_uring_prep_write(sqe, use_fd, vecs[i].iov_base,\n\t\t\t\t\t\t\tvecs[i].iov_len, offset);\n\t\t\t} else {\n\t\t\t\tio_uring_prep_writev(sqe, use_fd, &vecs[i], 1,\n\t\t\t\t\t\t\t\toffset);\n\t\t\t}\n\t\t} else {\n\t\t\tint do_fixed = fixed;\n\t\t\tint use_fd = fd;\n\n\t\t\tif (sqthread)\n\t\t\t\tuse_fd = 0;\n\t\t\tif (fixed && (i & 1))\n\t\t\t\tdo_fixed = 0;\n\t\t\tif (do_fixed) {\n\t\t\t\tio_uring_prep_read_fixed(sqe, use_fd, vecs[i].iov_base,\n\t\t\t\t\t\t\t\tvecs[i].iov_len,\n\t\t\t\t\t\t\t\toffset, i);\n\t\t\t} else if (nonvec) {\n\t\t\t\tio_uring_prep_read(sqe, use_fd, vecs[i].iov_base,\n\t\t\t\t\t\t\tvecs[i].iov_len, offset);\n\t\t\t} else {\n\t\t\t\tio_uring_prep_readv(sqe, use_fd, &vecs[i], 1,\n\t\t\t\t\t\t\t\toffset);\n\t\t\t}\n\n\t\t}\n\t\tsqe->user_data = i;\n\t\tif (sqthread)\n\t\t\tsqe->flags |= IOSQE_FIXED_FILE;\n\t\tif (buf_select) {\n\t\t\tif (nonvec)\n\t\t\t\tsqe->addr = 0;\n\t\t\tsqe->flags |= IOSQE_BUFFER_SELECT;\n\t\t\tsqe->buf_group = buf_select;\n\t\t}\n\t\tif (seq)\n\t\t\toffset += BS;\n\t}\n\n\t__io_uring_flush_sq(ring);\n\tfdinfo_read(ring);\n\n\tret = io_uring_submit(ring);\n\tif (!mixed && ret != BUFFERS) {\n\t\tfprintf(stderr, \"submit got %d, wanted %d\\n\", ret, BUFFERS);\n\t\tgoto err;\n\t} else if (mixed && ret != BUFFERS + (BUFFERS >> 1)) {\n\t\tfprintf(stderr, \"submit got %d, wanted %d\\n\", ret,\n\t\t\tBUFFERS + (BUFFERS >> 1));\n\t\tgoto err;\n\t}\n\n\tfor (i = 0; i < 10; i++) {\n\t\tfdinfo_read(ring);\n\t\tusleep(2);\n\t}\n\n\tfor (i = 0; i < BUFFERS; i++) {\n\t\tret = io_uring_wait_cqe(ring, &cqe);\n\t\tif (ret) {\n\t\t\tfprintf(stderr, \"wait_cqe=%d\\n\", ret);\n\t\t\tgoto err;\n\t\t}\n\t\tif (mixed && cqe->user_data & 1) {\n\t\t\tif (cqe->user_data > 32) {\n\t\t\t\tfprintf(stderr, \"cqe user data %lld, max expected %d\\n\",\n\t\t\t\t\tcqe->user_data, BUFFERS - 1);\n\t\t\t\tgoto err;\n\t\t\t}\n\t\t} else if (cqe->res == -EINVAL && nonvec) {\n\t\t\tif (!warned) {\n\t\t\t\tfprintf(stdout, \"Non-vectored IO not \"\n\t\t\t\t\t\"supported, skipping\\n\");\n\t\t\t\twarned = 1;\n\t\t\t\tno_read = 1;\n\t\t\t}\n\t\t} else if (exp_len == -1) {\n\t\t\tint iov_len = vecs[cqe->user_data].iov_len;\n\n\t\t\tif (cqe->res != iov_len) {\n\t\t\t\tfprintf(stderr, \"cqe res %d, wanted %d\\n\",\n\t\t\t\t\tcqe->res, iov_len);\n\t\t\t\tgoto err;\n\t\t\t}\n\t\t} else if (cqe->res != exp_len) {\n\t\t\tfprintf(stderr, \"cqe res %d, wanted %d\\n\", cqe->res, exp_len);\n\t\t\tgoto err;\n\t\t}\n\t\tif (buf_select && exp_len == BS) {\n\t\t\tint bid = cqe->flags >> 16;\n\t\t\tunsigned char *ptr = vecs[bid].iov_base;\n\t\t\tint j;\n\n\t\t\tfor (j = 0; j < BS; j++) {\n\t\t\t\tif (ptr[j] == cqe->user_data)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tfprintf(stderr, \"Data mismatch! bid=%d, \"\n\t\t\t\t\t\t\"wanted=%d, got=%d\\n\", bid,\n\t\t\t\t\t\t(int)cqe->user_data, ptr[j]);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\tio_uring_cqe_seen(ring, cqe);\n\t}\n\n\tif (fixed) {\n\t\tret = io_uring_unregister_buffers(ring);\n\t\tif (ret) {\n\t\t\tfprintf(stderr, \"buffer unreg failed: %d\\n\", ret);\n\t\t\tgoto err;\n\t\t}\n\t}\n\tif (sqthread) {\n\t\tret = io_uring_unregister_files(ring);\n\t\tif (ret) {\n\t\t\tfprintf(stderr, \"file unreg failed: %d\\n\", ret);\n\t\t\tgoto err;\n\t\t}\n\t}\n\n\tclose(fd);\n#ifdef VERBOSE\n\tfprintf(stdout, \"PASS\\n\");\n#endif\n\treturn 0;\nerr:\n#ifdef VERBOSE\n\tfprintf(stderr, \"FAILED\\n\");\n#endif\n\tif (fd != -1)\n\t\tclose(fd);\n\treturn 1;\n}\nstatic int test_io(const char *file, int write, int buffered, int sqthread,\n\t\t   int fixed, int nonvec, int exp_len, int mixed)\n{\n\tstruct io_uring ring;\n\tint ret, ring_flags = 0, entries = 64;\n\n\tif (sqthread)\n\t\tring_flags = IORING_SETUP_SQPOLL;\n\tif (mixed) {\n\t\tring_flags |= IORING_SETUP_SQE_MIXED;\n\t\tentries = 128;\n\t}\n\n\tret = t_create_ring(entries, &ring, ring_flags);\n\tif (ret == T_SETUP_SKIP)\n\t\treturn 0;\n\tif (ret != T_SETUP_OK) {\n\t\tfprintf(stderr, \"ring create failed: %d\\n\", ret);\n\t\treturn 1;\n\t}\n\n\tret = __test_io(file, &ring, write, buffered, sqthread, fixed, nonvec,\n\t\t\t0, 0, exp_len, mixed);\n\tio_uring_queue_exit(&ring);\n\treturn ret;\n}\n\nstatic int has_nonvec_read(void)\n{\n\tstruct io_uring_probe *p;\n\tstruct io_uring ring;\n\tint ret;\n\n\tret = io_uring_queue_init(1, &ring, 0);\n\tif (ret) {\n\t\tfprintf(stderr, \"queue init failed: %d\\n\", ret);\n\t\texit(ret);\n\t}\n\n\tp = t_calloc(1, sizeof(*p) + 256 * sizeof(struct io_uring_probe_op));\n\tret = io_uring_register_probe(&ring, p, 256);\n\t/* if we don't have PROBE_REGISTER, we don't have OP_READ/WRITE */\n\tif (ret == -EINVAL) {\nout:\n\t\tio_uring_queue_exit(&ring);\n\t\tfree(p);\n\t\treturn 0;\n\t} else if (ret) {\n\t\tfprintf(stderr, \"register_probe: %d\\n\", ret);\n\t\tgoto out;\n\t}\n\n\tif (p->ops_len <= IORING_OP_READ)\n\t\tgoto out;\n\tif (!(p->ops[IORING_OP_READ].flags & IO_URING_OP_SUPPORTED))\n\t\tgoto out;\n\tio_uring_queue_exit(&ring);\n\tfree(p);\n\treturn 1;\n}\n\nstatic int test_eventfd_read(int flags)\n{\n\tstruct io_uring ring;\n\tint fd, ret;\n\teventfd_t event;\n\tstruct io_uring_sqe *sqe;\n\tstruct io_uring_cqe *cqe;\n\n\tif (no_read)\n\t\treturn 0;\n\tret = t_create_ring(64, &ring, flags);\n\tif (ret == T_SETUP_SKIP)\n\t\treturn 0;\n\tif (ret != T_SETUP_OK) {\n\t\tif (ret == -EINVAL)\n\t\t\treturn 0;\n\t\tfprintf(stderr, \"ring create failed: %d\\n\", ret);\n\t\treturn 1;\n\t}\n\n\tfd = eventfd(1, 0);\n\tif (fd < 0) {\n\t\tperror(\"eventfd\");\n\t\treturn 1;\n\t}\n\tsqe = io_uring_get_sqe(&ring);\n\tio_uring_prep_read(sqe, fd, &event, sizeof(eventfd_t), 0);\n\tret = io_uring_submit(&ring);\n\tif (ret != 1) {\n\t\tfprintf(stderr, \"submitted %d\\n\", ret);\n\t\treturn 1;\n\t}\n\tfdinfo_read(&ring);\n\teventfd_write(fd, 1);\n\tret = io_uring_wait_cqe(&ring, &cqe);\n\tif (ret) {\n\t\tfprintf(stderr, \"wait_cqe=%d\\n\", ret);\n\t\treturn 1;\n\t}\n\tif (cqe->res == -EINVAL) {\n\t\tfprintf(stdout, \"eventfd IO not supported, skipping\\n\");\n\t} else if (cqe->res != sizeof(eventfd_t)) {\n\t\tfprintf(stderr, \"cqe res %d, wanted %d\\n\", cqe->res,\n\t\t\t\t\t\t(int) sizeof(eventfd_t));\n\t\treturn 1;\n\t}\n\tio_uring_cqe_seen(&ring, cqe);\n\treturn 0;\n}\n\nint main(int argc, char *argv[])\n{\n\tint i, ret, nr;\n\tchar buf[256];\n\tchar *fname;\n\n\tif (argc > 1) {\n\t\tfname = argv[1];\n\t} else {\n\t\tsrand((unsigned)time(NULL));\n\t\tsnprintf(buf, sizeof(buf), \".basic-rw-%u-%u\",\n\t\t\t(unsigned)rand(), (unsigned)getpid());\n\t\tfname = buf;\n\t\tt_create_file(fname, FILE_SIZE);\n\t}\n\n\tsignal(SIGXFSZ, SIG_IGN);\n\n\tvecs = t_create_buffers(BUFFERS, BS);\n\n\t/* if we don't have nonvec read, skip testing that */\n\tnr = has_nonvec_read() ? 64 : 32;\n\n\tfor (i = 0; i < nr; i++) {\n\t\tint write = (i & 1) != 0;\n\t\tint buffered = (i & 2) != 0;\n\t\tint sqthread = (i & 4) != 0;\n\t\tint fixed = (i & 8) != 0;\n\t\tint mixed = (i & 16) != 0;\n\t\tint nonvec = (i & 32) != 0;\n\n\t\tret = test_io(fname, write, buffered, sqthread, fixed, nonvec,\n\t\t\t      BS, mixed);\n\t\tif (ret == T_EXIT_SKIP)\n\t\t\tcontinue;\n\t\tif (ret) {\n\t\t\tfprintf(stderr, \"test_io failed %d/%d/%d/%d/%d\\n\",\n\t\t\t\twrite, buffered, sqthread, fixed, nonvec);\n\t\t\tgoto err;\n\t\t}\n\t}\n\n\tret = test_eventfd_read(0);\n\tif (ret) {\n\t\tfprintf(stderr, \"eventfd read 0 failed\\n\");\n\t\tgoto err;\n\t}\n\n\tret = test_eventfd_read(IORING_SETUP_DEFER_TASKRUN|IORING_SETUP_SINGLE_ISSUER);\n\tif (ret) {\n\t\tfprintf(stderr, \"eventfd read defer failed\\n\");\n\t\tgoto err;\n\t}\n\n\tret = test_eventfd_read(IORING_SETUP_SQPOLL);\n\tif (ret) {\n\t\tfprintf(stderr, \"eventfd read sqpoll failed\\n\");\n\t\tgoto err;\n\t}\n\n\tif (fname != argv[1])\n\t\tunlink(fname);\n\treturn 0;\nerr:\n\tif (fname != argv[1])\n\t\tunlink(fname);\n\treturn 1;\n}\n"},
                          "roles": ["analysisTarget",
                                    "tracedFile"]},
                         {"location": {"uri": "../src/include/liburing.h",
                                       "uriBaseId": "PWD"},
                          "sourceLanguage": "c",
                          "contents": {"text": "/* SPDX-License-Identifier: MIT */\n#ifndef LIB_URING_H\n#define LIB_URING_H\n\n#include <sys/socket.h>\n#include <sys/stat.h>\n#include <sys/uio.h>\n#include <errno.h>\n#include <signal.h>\n#include <stdbool.h>\n#include <inttypes.h>\n#include <time.h>\n#include <fcntl.h>\n#include <sched.h>\n#include <linux/swab.h>\n#include <sys/wait.h>\n#include \"liburing/compat.h\"\n#include \"liburing/io_uring.h\"\n#include \"liburing/io_uring/query.h\"\n#include \"liburing/io_uring_version.h\"\n\n#ifndef uring_unlikely\n#define uring_unlikely(cond)\t__builtin_expect(!!(cond), 0)\n#endif\n\n#ifndef uring_likely\n#define uring_likely(cond)\t__builtin_expect(!!(cond), 1)\n#endif\n\n/*\n * NOTE: Use IOURINGINLINE macro for \"static inline\" functions that are\n *       expected to be available in the FFI bindings. They must also\n *       be included in the liburing-ffi.map file.\n *\n *       Use _LOCAL_INLINE macro for \"static inline\" functions that are\n *       not expected to be available in the FFI bindings.\n *\n *       Don't use \"static inline\" directly when defining new functions\n *       in this header file.\n *\n *       Reason:\n *       The C++20 module export feature fails to operate correctly\n *       with the \"static inline\" functions. Use \"inline\" instead of\n *       \"static inline\" when compiling with C++20 or later.\n *\n *       See:\n *         https://github.com/axboe/liburing/issues/1457\n *         https://lore.kernel.org/io-uring/e0559c10-104d-4da8-9f7f-d2ffd73d8df3@acm.org\n */\n#ifndef IOURINGINLINE\n#if defined(__cplusplus) && __cplusplus >= 202002L\n#define IOURINGINLINE inline\n#else\n#define IOURINGINLINE static inline\n#endif\n#endif\n\n#ifndef _LOCAL_INLINE\n#if defined(__cplusplus) && __cplusplus >= 202002L\n#define _LOCAL_INLINE inline\n#else\n#define _LOCAL_INLINE static inline\n#endif\n#endif\n\n/*\n * barrier.h needs _LOCAL_INLINE.\n */\n#include \"liburing/barrier.h\"\n\n#ifdef __alpha__\n/*\n * alpha and mips are the exceptions, all other architectures have\n * common numbers for new system calls.\n */\n#ifndef __NR_io_uring_setup\n#define __NR_io_uring_setup\t\t535\n#endif\n#ifndef __NR_io_uring_enter\n#define __NR_io_uring_enter\t\t536\n#endif\n#ifndef __NR_io_uring_register\n#define __NR_io_uring_register\t\t537\n#endif\n#elif defined __mips__\n#ifndef __NR_io_uring_setup\n#define __NR_io_uring_setup\t\t(__NR_Linux + 425)\n#endif\n#ifndef __NR_io_uring_enter\n#define __NR_io_uring_enter\t\t(__NR_Linux + 426)\n#endif\n#ifndef __NR_io_uring_register\n#define __NR_io_uring_register\t\t(__NR_Linux + 427)\n#endif\n#else /* !__alpha__ and !__mips__ */\n#ifndef __NR_io_uring_setup\n#define __NR_io_uring_setup\t\t425\n#endif\n#ifndef __NR_io_uring_enter\n#define __NR_io_uring_enter\t\t426\n#endif\n#ifndef __NR_io_uring_register\n#define __NR_io_uring_register\t\t427\n#endif\n#endif\n\n#ifdef __cplusplus\n#define LIBURING_NOEXCEPT noexcept\n#else\n#define LIBURING_NOEXCEPT\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * Library interface to io_uring\n */\nstruct io_uring_sq {\n\tunsigned *khead;\n\tunsigned *ktail;\n\t// Deprecated: use `ring_mask` instead of `*kring_mask`\n\tunsigned *kring_mask;\n\t// Deprecated: use `ring_entries` instead of `*kring_entries`\n\tunsigned *kring_entries;\n\tunsigned *kflags;\n\tunsigned *kdropped;\n\tunsigned *array;\n\tstruct io_uring_sqe *sqes;\n\n\tunsigned sqe_head;\n\tunsigned sqe_tail;\n\n\tsize_t ring_sz;\n\tvoid *ring_ptr;\n\n\tunsigned ring_mask;\n\tunsigned ring_entries;\n\n\tunsigned pad[2];\n};\n\nstruct io_uring_cq {\n\tunsigned *khead;\n\tunsigned *ktail;\n\t// Deprecated: use `ring_mask` instead of `*kring_mask`\n\tunsigned *kring_mask;\n\t// Deprecated: use `ring_entries` instead of `*kring_entries`\n\tunsigned *kring_entries;\n\tunsigned *kflags;\n\tunsigned *koverflow;\n\tstruct io_uring_cqe *cqes;\n\n\tsize_t ring_sz;\n\tvoid *ring_ptr;\n\n\tunsigned ring_mask;\n\tunsigned ring_entries;\n\n\tunsigned pad[2];\n};\n\nstruct io_uring {\n\tstruct io_uring_sq sq;\n\tstruct io_uring_cq cq;\n\tunsigned flags;\n\tint ring_fd;\n\n\tunsigned features;\n\tint enter_ring_fd;\n\t__u8 int_flags;\n\t__u8 pad[3];\n\tunsigned pad2;\n};\n\nstruct io_uring_zcrx_rq {\n\t__u32 *khead;\n\t__u32 *ktail;\n\t__u32 rq_tail;\n\tunsigned ring_entries;\n\n\tstruct io_uring_zcrx_rqe *rqes;\n\tvoid *ring_ptr;\n};\n\n/*\n * Library interface\n */\n\n_LOCAL_INLINE __u64 uring_ptr_to_u64(const void *ptr) LIBURING_NOEXCEPT\n{\n\treturn (__u64) (unsigned long) ptr;\n}\n\n/*\n * return an allocated io_uring_probe structure, or NULL if probe fails (for\n * example, if it is not available). The caller is responsible for freeing it\n */\nstruct io_uring_probe *io_uring_get_probe_ring(struct io_uring *ring)\n\tLIBURING_NOEXCEPT;\n/* same as io_uring_get_probe_ring, but takes care of ring init and teardown */\nstruct io_uring_probe *io_uring_get_probe(void) LIBURING_NOEXCEPT;\n\n/*\n * frees a probe allocated through io_uring_get_probe() or\n * io_uring_get_probe_ring()\n */\nvoid io_uring_free_probe(struct io_uring_probe *probe) LIBURING_NOEXCEPT;\n\nIOURINGINLINE int io_uring_opcode_supported(const struct io_uring_probe *p,\n\t\t\t\t\t    int op) LIBURING_NOEXCEPT\n{\n\tif (op > p->last_op)\n\t\treturn 0;\n\treturn (p->ops[op].flags & IO_URING_OP_SUPPORTED) != 0;\n}\n\nint io_uring_queue_init_mem(unsigned entries, struct io_uring *ring,\n\t\t\t\tstruct io_uring_params *p,\n\t\t\t\tvoid *buf, size_t buf_size) LIBURING_NOEXCEPT;\nint io_uring_queue_init_params(unsigned entries, struct io_uring *ring,\n\t\t\t\tstruct io_uring_params *p) LIBURING_NOEXCEPT;\nint io_uring_queue_init(unsigned entries, struct io_uring *ring,\n\t\t\tunsigned flags) LIBURING_NOEXCEPT;\nint io_uring_queue_mmap(int fd, struct io_uring_params *p,\n\t\t\tstruct io_uring *ring) LIBURING_NOEXCEPT;\nint io_uring_ring_dontfork(struct io_uring *ring) LIBURING_NOEXCEPT;\nvoid io_uring_queue_exit(struct io_uring *ring) LIBURING_NOEXCEPT;\nunsigned io_uring_peek_batch_cqe(struct io_uring *ring,\n\tstruct io_uring_cqe **cqes, unsigned count) LIBURING_NOEXCEPT;\nint io_uring_wait_cqes(struct io_uring *ring, struct io_uring_cqe **cqe_ptr,\n\t\t       unsigned wait_nr, struct __kernel_timespec *ts,\n\t\t       sigset_t *sigmask) LIBURING_NOEXCEPT;\nint io_uring_wait_cqes_min_timeout(struct io_uring *ring,\n\t\t\t\t   struct io_uring_cqe **cqe_ptr,\n\t\t\t\t   unsigned wait_nr,\n\t\t\t\t   struct __kernel_timespec *ts,\n\t\t\t\t   unsigned int min_ts_usec,\n\t\t\t\t   sigset_t *sigmask) LIBURING_NOEXCEPT;\nint io_uring_wait_cqe_timeout(struct io_uring *ring,\n\t\t\t      struct io_uring_cqe **cqe_ptr,\n\t\t\t      struct __kernel_timespec *ts) LIBURING_NOEXCEPT;\nint io_uring_submit(struct io_uring *ring) LIBURING_NOEXCEPT;\nint io_uring_submit_and_wait(struct io_uring *ring, unsigned wait_nr)\n\tLIBURING_NOEXCEPT;\nint io_uring_submit_and_wait_timeout(struct io_uring *ring,\n\t\t\t\t     struct io_uring_cqe **cqe_ptr,\n\t\t\t\t     unsigned wait_nr,\n\t\t\t\t     struct __kernel_timespec *ts,\n\t\t\t\t     sigset_t *sigmask) LIBURING_NOEXCEPT;\nint io_uring_submit_and_wait_min_timeout(struct io_uring *ring,\n\t\t\t\t\t struct io_uring_cqe **cqe_ptr,\n\t\t\t\t\t unsigned wait_nr,\n\t\t\t\t\t struct __kernel_timespec *ts,\n\t\t\t\t\t unsigned min_wait,\n\t\t\t\t\t sigset_t *sigmask) LIBURING_NOEXCEPT;\nint io_uring_submit_and_wait_reg(struct io_uring *ring,\n\t\t\t\t struct io_uring_cqe **cqe_ptr, unsigned wait_nr,\n\t\t\t\t int reg_index) LIBURING_NOEXCEPT;\n\nint io_uring_register_wait_reg(struct io_uring *ring,\n\t\t\t       struct io_uring_reg_wait *reg, int nr)\n   LIBURING_NOEXCEPT;\nint io_uring_resize_rings(struct io_uring *ring, struct io_uring_params *p)\n\tLIBURING_NOEXCEPT;\nint io_uring_clone_buffers_offset(struct io_uring *dst, struct io_uring *src,\n\t\t\t\t  unsigned int dst_off, unsigned int src_off,\n\t\t\t\t  unsigned int nr, unsigned int flags)\n\tLIBURING_NOEXCEPT;\nint __io_uring_clone_buffers_offset(struct io_uring *dst, struct io_uring *src,\n\t\t\t\t  unsigned int dst_off, unsigned int src_off,\n\t\t\t\t  unsigned int nr, unsigned int flags)\n\tLIBURING_NOEXCEPT;\nint io_uring_clone_buffers(struct io_uring *dst, struct io_uring *src)\n\tLIBURING_NOEXCEPT;\nint __io_uring_clone_buffers(struct io_uring *dst, struct io_uring *src,\n\t\t\t     unsigned int flags) LIBURING_NOEXCEPT;\nint io_uring_register_buffers(struct io_uring *ring, const struct iovec *iovecs,\n\t\t\t      unsigned nr_iovecs) LIBURING_NOEXCEPT;\nint io_uring_register_buffers_tags(struct io_uring *ring,\n\t\t\t\t   const struct iovec *iovecs,\n\t\t\t\t   const __u64 *tags, unsigned nr)\n\tLIBURING_NOEXCEPT;\nint io_uring_register_buffers_sparse(struct io_uring *ring, unsigned nr)\n\tLIBURING_NOEXCEPT;\nint io_uring_register_buffers_update_tag(struct io_uring *ring,\n\t\t\t\t\t unsigned off,\n\t\t\t\t\t const struct iovec *iovecs,\n\t\t\t\t\t const __u64 *tags, unsigned nr)\n\tLIBURING_NOEXCEPT;\nint io_uring_unregister_buffers(struct io_uring *ring) LIBURING_NOEXCEPT;\n\nint io_uring_register_files(struct io_uring *ring, const int *files,\n\t\t\t    unsigned nr_files) LIBURING_NOEXCEPT;\nint io_uring_register_files_tags(struct io_uring *ring, const int *files,\n\t\t\t\t const __u64 *tags, unsigned nr)\n\tLIBURING_NOEXCEPT;\nint io_uring_register_files_sparse(struct io_uring *ring, unsigned nr)\n\tLIBURING_NOEXCEPT;\nint io_uring_register_files_update_tag(struct io_uring *ring, unsigned off,\n\t\t\t\t       const int *files, const __u64 *tags,\n\t\t\t\t       unsigned nr_files) LIBURING_NOEXCEPT;\n\nint io_uring_unregister_files(struct io_uring *ring) LIBURING_NOEXCEPT;\nint io_uring_register_files_update(struct io_uring *ring, unsigned off,\n\t\t\t\t   const int *files, unsigned nr_files)\n\tLIBURING_NOEXCEPT;\nint io_uring_register_eventfd(struct io_uring *ring, int fd) LIBURING_NOEXCEPT;\nint io_uring_register_eventfd_async(struct io_uring *ring, int fd)\n\tLIBURING_NOEXCEPT;\nint io_uring_unregister_eventfd(struct io_uring *ring) LIBURING_NOEXCEPT;\nint io_uring_register_probe(struct io_uring *ring, struct io_uring_probe *p,\n\t\t\t    unsigned nr) LIBURING_NOEXCEPT;\nint io_uring_register_personality(struct io_uring *ring) LIBURING_NOEXCEPT;\nint io_uring_unregister_personality(struct io_uring *ring, int id)\n\tLIBURING_NOEXCEPT;\nint io_uring_register_restrictions(struct io_uring *ring,\n\t\t\t\t   struct io_uring_restriction *res,\n\t\t\t\t   unsigned int nr_res) LIBURING_NOEXCEPT;\nint io_uring_enable_rings(struct io_uring *ring) LIBURING_NOEXCEPT;\nint __io_uring_sqring_wait(struct io_uring *ring) LIBURING_NOEXCEPT;\n#ifdef _GNU_SOURCE\nint io_uring_register_iowq_aff(struct io_uring *ring, size_t cpusz,\n\t\t\t\tconst cpu_set_t *mask) LIBURING_NOEXCEPT;\n#endif\nint io_uring_unregister_iowq_aff(struct io_uring *ring) LIBURING_NOEXCEPT;\nint io_uring_register_iowq_max_workers(struct io_uring *ring,\n\t\t\t\t       unsigned int *values) LIBURING_NOEXCEPT;\nint io_uring_register_ring_fd(struct io_uring *ring) LIBURING_NOEXCEPT;\nint io_uring_unregister_ring_fd(struct io_uring *ring) LIBURING_NOEXCEPT;\nint io_uring_close_ring_fd(struct io_uring *ring) LIBURING_NOEXCEPT;\nint io_uring_register_buf_ring(struct io_uring *ring,\n\tstruct io_uring_buf_reg *reg, unsigned int flags) LIBURING_NOEXCEPT;\nint io_uring_unregister_buf_ring(struct io_uring *ring, int bgid)\n\tLIBURING_NOEXCEPT;\nint io_uring_buf_ring_head(struct io_uring *ring,\n\tint buf_group, uint16_t *head) LIBURING_NOEXCEPT;\nint io_uring_register_sync_cancel(struct io_uring *ring,\n\t\t\t\t  struct io_uring_sync_cancel_reg *reg)\n\tLIBURING_NOEXCEPT;\nint io_uring_register_sync_msg(struct io_uring_sqe *sqe) LIBURING_NOEXCEPT;\n\nint io_uring_register_file_alloc_range(struct io_uring *ring,\n\t\t\t\t       unsigned off, unsigned len)\n\tLIBURING_NOEXCEPT;\n\nint io_uring_register_napi(struct io_uring *ring, struct io_uring_napi *napi)\n\tLIBURING_NOEXCEPT;\nint io_uring_unregister_napi(struct io_uring *ring, struct io_uring_napi *napi)\n\tLIBURING_NOEXCEPT;\nint io_uring_register_ifq(struct io_uring *ring,\n\t\t\t  struct io_uring_zcrx_ifq_reg *reg) LIBURING_NOEXCEPT;\n\nint io_uring_register_clock(struct io_uring *ring,\n\t\t\t    struct io_uring_clock_register *arg)\n   LIBURING_NOEXCEPT;\n\nint io_uring_get_events(struct io_uring *ring) LIBURING_NOEXCEPT;\nint io_uring_submit_and_get_events(struct io_uring *ring) LIBURING_NOEXCEPT;\n\n/*\n * io_uring syscalls.\n */\nint io_uring_enter(unsigned int fd, unsigned int to_submit,\n\t\t   unsigned int min_complete, unsigned int flags, sigset_t *sig)\n\tLIBURING_NOEXCEPT;\nint io_uring_enter2(unsigned int fd, unsigned int to_submit,\n\t\t    unsigned int min_complete, unsigned int flags,\n\t\t    void *arg, size_t sz) LIBURING_NOEXCEPT;\nint io_uring_setup(unsigned int entries, struct io_uring_params *p)\n\tLIBURING_NOEXCEPT;\nint io_uring_register(unsigned int fd, unsigned int opcode, const void *arg,\n\t\t      unsigned int nr_args) LIBURING_NOEXCEPT;\n\n/*\n * Mapped/registered regions\n */\nint io_uring_register_region(struct io_uring *ring,\n\t\t\t     struct io_uring_mem_region_reg *reg)\n\tLIBURING_NOEXCEPT;\n\n/*\n * Mapped buffer ring alloc/register + unregister/free helpers\n */\nstruct io_uring_buf_ring *io_uring_setup_buf_ring(struct io_uring *ring,\n\t\t\t\t\t\t  unsigned int nentries,\n\t\t\t\t\t\t  int bgid, unsigned int flags,\n\t\t\t\t\t\t  int *err) LIBURING_NOEXCEPT;\nint io_uring_free_buf_ring(struct io_uring *ring, struct io_uring_buf_ring *br,\n\t\t\t   unsigned int nentries, int bgid) LIBURING_NOEXCEPT;\n\n/*\n * Helper for the peek/wait single cqe functions. Exported because of that,\n * but probably shouldn't be used directly in an application.\n */\nint __io_uring_get_cqe(struct io_uring *ring,\n\t\t\tstruct io_uring_cqe **cqe_ptr, unsigned submit,\n\t\t\tunsigned wait_nr, sigset_t *sigmask) LIBURING_NOEXCEPT;\n\n/*\n * Enable/disable setting of iowait by the kernel.\n */\nint io_uring_set_iowait(struct io_uring *ring, bool enable_iowait)\n\tLIBURING_NOEXCEPT;\n\n#define LIBURING_UDATA_TIMEOUT\t((__u64) -1)\n\n/*\n * Returns the bit shift needed to index the CQ.\n * This shift is 1 for rings with big CQEs, and 0 for rings with normal CQEs.\n * CQE `index` can be computed as &cq.cqes[(index & cq.ring_mask) << cqe_shift].\n */\nIOURINGINLINE unsigned io_uring_cqe_shift_from_flags(unsigned flags)\n\tLIBURING_NOEXCEPT\n{\n\treturn !!(flags & IORING_SETUP_CQE32);\n}\n\nIOURINGINLINE unsigned io_uring_cqe_shift(const struct io_uring *ring)\n\tLIBURING_NOEXCEPT\n{\n\treturn io_uring_cqe_shift_from_flags(ring->flags);\n}\n\nIOURINGINLINE unsigned io_uring_cqe_nr(const struct io_uring_cqe *cqe)\n{\n\treturn 1U << !!(cqe->flags & IORING_CQE_F_32);\n}\n\nstruct io_uring_cqe_iter {\n\tstruct io_uring_cqe *cqes;\n\tunsigned mask;\n\tunsigned shift;\n\tunsigned head;\n\tunsigned tail;\n};\n\n_LOCAL_INLINE struct io_uring_cqe_iter\nio_uring_cqe_iter_init(const struct io_uring *ring)\n\tLIBURING_NOEXCEPT\n{\n\treturn (struct io_uring_cqe_iter) {\n\t\t.cqes = ring->cq.cqes,\n\t\t.mask = ring->cq.ring_mask,\n\t\t.shift = io_uring_cqe_shift(ring),\n\t\t.head = *ring->cq.khead,\n\t\t/* Acquire ordering ensures tail is loaded before any CQEs */\n\t\t.tail = io_uring_smp_load_acquire(ring->cq.ktail),\n\t};\n}\n\n_LOCAL_INLINE bool io_uring_cqe_iter_next(struct io_uring_cqe_iter *iter,\n\t\t\t\t\t  struct io_uring_cqe **cqe)\n\tLIBURING_NOEXCEPT\n{\n\tif (iter->head == iter->tail)\n\t\treturn false;\n\n\t*cqe = &iter->cqes[(iter->head++ & iter->mask) << iter->shift];\n\tif ((*cqe)->flags & IORING_CQE_F_32)\n\t\titer->head++;\n\treturn true;\n}\n\n/*\n * NOTE: we should just get rid of the '__head__' being passed in here, it doesn't\n * serve a purpose anymore. The below is a bit of a work-around to ensure that\n * the compiler doesn't complain about '__head__' being unused (or only written,\n * never read), as we use a local iterator for both the head and tail tracking.\n */\n#define io_uring_for_each_cqe(ring, __head__, cqe)\t\t\t\t\t\\\n\tfor (struct io_uring_cqe_iter __ITER__ = io_uring_cqe_iter_init(ring);\t\\\n\t     (__head__) = __ITER__.head, io_uring_cqe_iter_next(&__ITER__, &(cqe));\t\\\n\t     (void)(__head__))\n\n/*\n * Must be called after io_uring_for_each_cqe()\n */\nIOURINGINLINE void io_uring_cq_advance(struct io_uring *ring, unsigned nr)\n\tLIBURING_NOEXCEPT\n{\n\tif (nr) {\n\t\tstruct io_uring_cq *cq = &ring->cq;\n\n\t\t/*\n\t\t * Ensure that the kernel only sees the new value of the head\n\t\t * index after the CQEs have been read.\n\t\t */\n\t\tio_uring_smp_store_release(cq->khead, *cq->khead + nr);\n\t}\n}\n\n/*\n * Must be called after io_uring_{peek,wait}_cqe() after the cqe has\n * been processed by the application.\n */\nIOURINGINLINE void io_uring_cqe_seen(struct io_uring *ring,\n\t\t\t\t     struct io_uring_cqe *cqe)\n\tLIBURING_NOEXCEPT\n{\n\tif (cqe)\n\t\tio_uring_cq_advance(ring, io_uring_cqe_nr(cqe));\n}\n\n/*\n * Command prep helpers\n */\n\n/*\n * Associate pointer @data with the sqe, for later retrieval from the cqe\n * at command completion time with io_uring_cqe_get_data().\n */\nIOURINGINLINE void io_uring_sqe_set_data(struct io_uring_sqe *sqe, void *data)\n\tLIBURING_NOEXCEPT\n{\n\tsqe->user_data = (unsigned long) data;\n}\n\nIOURINGINLINE void *io_uring_cqe_get_data(const struct io_uring_cqe *cqe)\n\tLIBURING_NOEXCEPT\n{\n\treturn (void *) (uintptr_t) cqe->user_data;\n}\n\n/*\n * Assign a 64-bit value to this sqe, which can get retrieved at completion\n * time with io_uring_cqe_get_data64. Just like the non-64 variants, except\n * these store a 64-bit type rather than a data pointer.\n */\nIOURINGINLINE void io_uring_sqe_set_data64(struct io_uring_sqe *sqe,\n\t\t\t\t\t   __u64 data)\n\tLIBURING_NOEXCEPT\n{\n\tsqe->user_data = data;\n}\n\nIOURINGINLINE __u64 io_uring_cqe_get_data64(const struct io_uring_cqe *cqe)\n{\n\treturn cqe->user_data;\n}\n\n/*\n * Tell the app the have the 64-bit variants of the get/set userdata\n */\n#define LIBURING_HAVE_DATA64\n\nIOURINGINLINE void io_uring_sqe_set_flags(struct io_uring_sqe *sqe,\n\t\t\t\t\t  unsigned flags)\n\tLIBURING_NOEXCEPT\n{\n\tsqe->flags = (__u8) flags;\n}\n\nIOURINGINLINE void io_uring_sqe_set_buf_group(struct io_uring_sqe *sqe,\n\t\t\t\t\t      int bgid)\n\tLIBURING_NOEXCEPT\n{\n\tsqe->buf_group = (__u16) bgid;\n}\n\n_LOCAL_INLINE void __io_uring_set_target_fixed_file(struct io_uring_sqe *sqe,\n\t\t\t\t\t\t    unsigned int file_index)\n\tLIBURING_NOEXCEPT\n{\n\t/* 0 means no fixed files, indexes should be encoded as \"index + 1\" */\n\tsqe->file_index = file_index + 1;\n}\n\nIOURINGINLINE void io_uring_initialize_sqe(struct io_uring_sqe *sqe)\n\tLIBURING_NOEXCEPT\n{\n\tsqe->flags = 0;\n\tsqe->ioprio = 0;\n\tsqe->rw_flags = 0;\n\tsqe->buf_index = 0;\n\tsqe->personality = 0;\n\tsqe->file_index = 0;\n\tsqe->addr3 = 0;\n\tsqe->__pad2[0] = 0;\n}\n\nIOURINGINLINE void io_uring_prep_rw(int op, struct io_uring_sqe *sqe, int fd,\n\t\t\t\t    const void *addr, unsigned len,\n\t\t\t\t    __u64 offset)\n\tLIBURING_NOEXCEPT\n{\n\tsqe->opcode = (__u8) op;\n\tsqe->fd = fd;\n\tsqe->off = offset;\n\tsqe->addr = (unsigned long) addr;\n\tsqe->len = len;\n}\n\n/*\n * io_uring_prep_splice() - Either @fd_in or @fd_out must be a pipe.\n *\n * - If @fd_in refers to a pipe, @off_in is ignored and must be set to -1.\n *\n * - If @fd_in does not refer to a pipe and @off_in is -1, then @nbytes are read\n *   from @fd_in starting from the file offset, which is incremented by the\n *   number of bytes read.\n *\n * - If @fd_in does not refer to a pipe and @off_in is not -1, then the starting\n *   offset of @fd_in will be @off_in.\n *\n * This splice operation can be used to implement sendfile by splicing to an\n * intermediate pipe first, then splice to the final destination.\n * In fact, the implementation of sendfile in kernel uses splice internally.\n *\n * NOTE that even if fd_in or fd_out refers to a pipe, the splice operation\n * can still fail with EINVAL if one of the fd doesn't explicitly support splice\n * operation, e.g. reading from terminal is unsupported from kernel 5.7 to 5.11.\n * Check issue #291 for more information.\n */\nIOURINGINLINE void io_uring_prep_splice(struct io_uring_sqe *sqe,\n\t\t\t\t\tint fd_in, int64_t off_in,\n\t\t\t\t\tint fd_out, int64_t off_out,\n\t\t\t\t\tunsigned int nbytes,\n\t\t\t\t\tunsigned int splice_flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_SPLICE, sqe, fd_out, NULL, nbytes,\n\t\t\t\t(__u64) off_out);\n\tsqe->splice_off_in = (__u64) off_in;\n\tsqe->splice_fd_in = fd_in;\n\tsqe->splice_flags = splice_flags;\n}\n\nIOURINGINLINE void io_uring_prep_tee(struct io_uring_sqe *sqe,\n\t\t\t\t     int fd_in, int fd_out,\n\t\t\t\t     unsigned int nbytes,\n\t\t\t\t     unsigned int splice_flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_TEE, sqe, fd_out, NULL, nbytes, 0);\n\tsqe->splice_off_in = 0;\n\tsqe->splice_fd_in = fd_in;\n\tsqe->splice_flags = splice_flags;\n}\n\nIOURINGINLINE void io_uring_prep_readv(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t       const struct iovec *iovecs,\n\t\t\t\t       unsigned nr_vecs, __u64 offset)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_READV, sqe, fd, iovecs, nr_vecs, offset);\n}\n\nIOURINGINLINE void io_uring_prep_readv2(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t       const struct iovec *iovecs,\n\t\t\t\t       unsigned nr_vecs, __u64 offset,\n\t\t\t\t       int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_readv(sqe, fd, iovecs, nr_vecs, offset);\n\tsqe->rw_flags = flags;\n}\n\nIOURINGINLINE void io_uring_prep_read_fixed(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\t    void *buf, unsigned nbytes,\n\t\t\t\t\t    __u64 offset, int buf_index)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_READ_FIXED, sqe, fd, buf, nbytes, offset);\n\tsqe->buf_index = (__u16) buf_index;\n}\n\nIOURINGINLINE void io_uring_prep_readv_fixed(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\t     const struct iovec *iovecs,\n\t\t\t\t\t     unsigned nr_vecs, __u64 offset,\n\t\t\t\t\t     int flags, int buf_index)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_readv2(sqe, fd, iovecs, nr_vecs, offset, flags);\n\tsqe->opcode = IORING_OP_READV_FIXED;\n\tsqe->buf_index = (__u16)buf_index;\n}\n\nIOURINGINLINE void io_uring_prep_writev(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\tconst struct iovec *iovecs,\n\t\t\t\t\tunsigned nr_vecs, __u64 offset)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_WRITEV, sqe, fd, iovecs, nr_vecs, offset);\n}\n\nIOURINGINLINE void io_uring_prep_writev2(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t       const struct iovec *iovecs,\n\t\t\t\t       unsigned nr_vecs, __u64 offset,\n\t\t\t\t       int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_writev(sqe, fd, iovecs, nr_vecs, offset);\n\tsqe->rw_flags = flags;\n}\n\nIOURINGINLINE void io_uring_prep_write_fixed(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\t     const void *buf, unsigned nbytes,\n\t\t\t\t\t     __u64 offset, int buf_index)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_WRITE_FIXED, sqe, fd, buf, nbytes, offset);\n\tsqe->buf_index = (__u16) buf_index;\n}\n\nIOURINGINLINE void io_uring_prep_writev_fixed(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t       const struct iovec *iovecs,\n\t\t\t\t       unsigned nr_vecs, __u64 offset,\n\t\t\t\t       int flags, int buf_index)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_writev2(sqe, fd, iovecs, nr_vecs, offset, flags);\n\tsqe->opcode = IORING_OP_WRITEV_FIXED;\n\tsqe->buf_index = (__u16)buf_index;\n}\n\nIOURINGINLINE void io_uring_prep_recvmsg(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\t struct msghdr *msg, unsigned flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_RECVMSG, sqe, fd, msg, 1, 0);\n\tsqe->msg_flags = flags;\n}\n\nIOURINGINLINE void io_uring_prep_recvmsg_multishot(struct io_uring_sqe *sqe,\n\t\t\t\t\t\t   int fd, struct msghdr *msg,\n\t\t\t\t\t\t   unsigned flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_recvmsg(sqe, fd, msg, flags);\n\tsqe->ioprio |= IORING_RECV_MULTISHOT;\n}\n\nIOURINGINLINE void io_uring_prep_sendmsg(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\t const struct msghdr *msg,\n\t\t\t\t\t unsigned flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_SENDMSG, sqe, fd, msg, 1, 0);\n\tsqe->msg_flags = flags;\n}\n\n_LOCAL_INLINE unsigned __io_uring_prep_poll_mask(unsigned poll_mask)\n\tLIBURING_NOEXCEPT\n{\n#if __BYTE_ORDER == __BIG_ENDIAN\n\tpoll_mask = __swahw32(poll_mask);\n#endif\n\treturn poll_mask;\n}\n\nIOURINGINLINE void io_uring_prep_poll_add(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\t  unsigned poll_mask)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_POLL_ADD, sqe, fd, NULL, 0, 0);\n\tsqe->poll32_events = __io_uring_prep_poll_mask(poll_mask);\n}\n\nIOURINGINLINE void io_uring_prep_poll_multishot(struct io_uring_sqe *sqe,\n\t\t\t\t\t\tint fd, unsigned poll_mask)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_poll_add(sqe, fd, poll_mask);\n\tsqe->len = IORING_POLL_ADD_MULTI;\n}\n\nIOURINGINLINE void io_uring_prep_poll_remove(struct io_uring_sqe *sqe,\n\t\t\t\t\t     __u64 user_data)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_POLL_REMOVE, sqe, -1, NULL, 0, 0);\n\tsqe->addr = user_data;\n}\n\nIOURINGINLINE void io_uring_prep_poll_update(struct io_uring_sqe *sqe,\n\t\t\t\t\t     __u64 old_user_data,\n\t\t\t\t\t     __u64 new_user_data,\n\t\t\t\t\t     unsigned poll_mask, unsigned flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_POLL_REMOVE, sqe, -1, NULL, flags,\n\t\t\t new_user_data);\n\tsqe->addr = old_user_data;\n\tsqe->poll32_events = __io_uring_prep_poll_mask(poll_mask);\n}\n\nIOURINGINLINE void io_uring_prep_fsync(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t       unsigned fsync_flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_FSYNC, sqe, fd, NULL, 0, 0);\n\tsqe->fsync_flags = fsync_flags;\n}\n\nIOURINGINLINE void io_uring_prep_nop(struct io_uring_sqe *sqe)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_NOP, sqe, -1, NULL, 0, 0);\n}\n\nIOURINGINLINE void io_uring_prep_nop128(struct io_uring_sqe *sqe)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_NOP128, sqe, -1, NULL, 0, 0);\n}\n\nIOURINGINLINE void io_uring_prep_timeout(struct io_uring_sqe *sqe,\n\t\t\t\t\t const struct __kernel_timespec *ts,\n\t\t\t\t\t unsigned count, unsigned flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_TIMEOUT, sqe, -1, ts, 1, count);\n\tsqe->timeout_flags = flags;\n}\n\nIOURINGINLINE void io_uring_prep_timeout_remove(struct io_uring_sqe *sqe,\n\t\t\t\t\t\t__u64 user_data, unsigned flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_TIMEOUT_REMOVE, sqe, -1, NULL, 0, 0);\n\tsqe->addr = user_data;\n\tsqe->timeout_flags = flags;\n}\n\nIOURINGINLINE void io_uring_prep_timeout_update(struct io_uring_sqe *sqe,\n\t\t\t\t\t\tconst struct __kernel_timespec *ts,\n\t\t\t\t\t\t__u64 user_data, unsigned flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_TIMEOUT_REMOVE, sqe, -1, NULL, 0,\n\t\t\t\t(uintptr_t) ts);\n\tsqe->addr = user_data;\n\tsqe->timeout_flags = flags | IORING_TIMEOUT_UPDATE;\n}\n\nIOURINGINLINE void io_uring_prep_accept(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\tstruct sockaddr *addr,\n\t\t\t\t\tsocklen_t *addrlen, int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_ACCEPT, sqe, fd, addr, 0,\n\t\t\t\turing_ptr_to_u64(addrlen));\n\tsqe->accept_flags = (__u32) flags;\n}\n\n/* accept directly into the fixed file table */\nIOURINGINLINE void io_uring_prep_accept_direct(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\t       struct sockaddr *addr,\n\t\t\t\t\t       socklen_t *addrlen, int flags,\n\t\t\t\t\t       unsigned int file_index)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_accept(sqe, fd, addr, addrlen, flags);\n\t/* offset by 1 for allocation */\n\tif (file_index == IORING_FILE_INDEX_ALLOC)\n\t\tfile_index--;\n\t__io_uring_set_target_fixed_file(sqe, file_index);\n}\n\nIOURINGINLINE void io_uring_prep_multishot_accept(struct io_uring_sqe *sqe,\n\t\t\t\t\t\t  int fd, struct sockaddr *addr,\n\t\t\t\t\t\t  socklen_t *addrlen, int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_accept(sqe, fd, addr, addrlen, flags);\n\tsqe->ioprio |= IORING_ACCEPT_MULTISHOT;\n}\n\n/* multishot accept directly into the fixed file table */\nIOURINGINLINE void io_uring_prep_multishot_accept_direct(struct io_uring_sqe *sqe,\n\t\t\t\t\t\t\t int fd,\n\t\t\t\t\t\t\t struct sockaddr *addr,\n\t\t\t\t\t\t\t socklen_t *addrlen,\n\t\t\t\t\t\t\t int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_multishot_accept(sqe, fd, addr, addrlen, flags);\n\t__io_uring_set_target_fixed_file(sqe, IORING_FILE_INDEX_ALLOC - 1);\n}\n\nIOURINGINLINE void io_uring_prep_cancel64(struct io_uring_sqe *sqe,\n\t\t\t\t\t  __u64 user_data, int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_ASYNC_CANCEL, sqe, -1, NULL, 0, 0);\n\tsqe->addr = user_data;\n\tsqe->cancel_flags = (__u32) flags;\n}\n\nIOURINGINLINE void io_uring_prep_cancel(struct io_uring_sqe *sqe,\n\t\t\t\t\tconst void *user_data, int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_cancel64(sqe, (__u64) (uintptr_t) user_data, flags);\n}\n\nIOURINGINLINE void io_uring_prep_cancel_fd(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\t   unsigned int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_ASYNC_CANCEL, sqe, fd, NULL, 0, 0);\n\tsqe->cancel_flags = (__u32) flags | IORING_ASYNC_CANCEL_FD;\n}\n\nIOURINGINLINE void io_uring_prep_link_timeout(struct io_uring_sqe *sqe,\n\t\t\t\t\t      const struct __kernel_timespec *ts,\n\t\t\t\t\t      unsigned flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_LINK_TIMEOUT, sqe, -1, ts, 1, 0);\n\tsqe->timeout_flags = flags;\n}\n\nIOURINGINLINE void io_uring_prep_connect(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\t const struct sockaddr *addr,\n\t\t\t\t\t socklen_t addrlen)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_CONNECT, sqe, fd, addr, 0, addrlen);\n}\n\nIOURINGINLINE void io_uring_prep_bind(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t      const struct sockaddr *addr,\n\t\t\t\t      socklen_t addrlen)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_BIND, sqe, fd, addr, 0, addrlen);\n}\n\nIOURINGINLINE void io_uring_prep_listen(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\tint backlog)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_LISTEN, sqe, fd, 0, backlog, 0);\n}\n\nstruct epoll_event;\nIOURINGINLINE void io_uring_prep_epoll_wait(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\t    struct epoll_event *events,\n\t\t\t\t\t    int maxevents, unsigned flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_EPOLL_WAIT, sqe, fd, events, maxevents, 0);\n\tsqe->rw_flags = flags;\n}\n\nIOURINGINLINE void io_uring_prep_files_update(struct io_uring_sqe *sqe,\n\t\t\t\t\t      const int *fds, unsigned nr_fds,\n\t\t\t\t\t      int offset)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_FILES_UPDATE, sqe, -1, fds, nr_fds,\n\t\t\t\t(__u64) offset);\n}\n\nIOURINGINLINE void io_uring_prep_fallocate(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\t   int mode, __u64 offset, __u64 len)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_FALLOCATE, sqe, fd,\n\t\t\t0, (unsigned int) mode, (__u64) offset);\n\tsqe->addr = (__u64) len;\n}\n\nIOURINGINLINE void io_uring_prep_openat(struct io_uring_sqe *sqe, int dfd,\n\t\t\t\t\tconst char *path, int flags,\n\t\t\t\t\tmode_t mode)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_OPENAT, sqe, dfd, path, mode, 0);\n\tsqe->open_flags = (__u32) flags;\n}\n\n/* open directly into the fixed file table */\nIOURINGINLINE void io_uring_prep_openat_direct(struct io_uring_sqe *sqe,\n\t\t\t\t\t       int dfd, const char *path,\n\t\t\t\t\t       int flags, mode_t mode,\n\t\t\t\t\t       unsigned file_index)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_openat(sqe, dfd, path, flags, mode);\n\t/* offset by 1 for allocation */\n\tif (file_index == IORING_FILE_INDEX_ALLOC)\n\t\tfile_index--;\n\t__io_uring_set_target_fixed_file(sqe, file_index);\n}\n\nIOURINGINLINE void io_uring_prep_open(struct io_uring_sqe *sqe,\n\t\t\t\t\tconst char *path, int flags, mode_t mode)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_openat(sqe, AT_FDCWD, path, flags, mode);\n}\n\n/* open directly into the fixed file table */\nIOURINGINLINE void io_uring_prep_open_direct(struct io_uring_sqe *sqe,\n\t\t\t\t\t\t\tconst char *path, int flags, mode_t mode,\n\t\t\t\t\t\t\tunsigned file_index)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_openat_direct(sqe, AT_FDCWD, path, flags, mode, file_index);\n}\n\nIOURINGINLINE void io_uring_prep_close(struct io_uring_sqe *sqe, int fd)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_CLOSE, sqe, fd, NULL, 0, 0);\n}\n\nIOURINGINLINE void io_uring_prep_close_direct(struct io_uring_sqe *sqe,\n\t\t\t\t\t      unsigned file_index)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_close(sqe, 0);\n\t__io_uring_set_target_fixed_file(sqe, file_index);\n}\n\nIOURINGINLINE void io_uring_prep_read(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t      void *buf, unsigned nbytes, __u64 offset)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_READ, sqe, fd, buf, nbytes, offset);\n}\n\nIOURINGINLINE void io_uring_prep_read_multishot(struct io_uring_sqe *sqe,\n\t\t\t\t\t\tint fd, unsigned nbytes,\n\t\t\t\t\t\t__u64 offset, int buf_group)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_READ_MULTISHOT, sqe, fd, NULL, nbytes,\n\t\t\t offset);\n\tsqe->buf_group = buf_group;\n\tsqe->flags = IOSQE_BUFFER_SELECT;\n}\n\nIOURINGINLINE void io_uring_prep_write(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t       const void *buf, unsigned nbytes,\n\t\t\t\t       __u64 offset)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_WRITE, sqe, fd, buf, nbytes, offset);\n}\n\nstruct statx;\nIOURINGINLINE void io_uring_prep_statx(struct io_uring_sqe *sqe, int dfd,\n\t\t\t\t       const char *path, int flags,\n\t\t\t\t       unsigned mask, struct statx *statxbuf)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_STATX, sqe, dfd, path, mask,\n\t\t\t\turing_ptr_to_u64(statxbuf));\n\tsqe->statx_flags = (__u32) flags;\n}\n\nIOURINGINLINE void io_uring_prep_fadvise(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\t __u64 offset, __u32 len, int advice)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_FADVISE, sqe, fd, NULL, (__u32) len, offset);\n\tsqe->fadvise_advice = (__u32) advice;\n}\n\nIOURINGINLINE void io_uring_prep_madvise(struct io_uring_sqe *sqe, void *addr,\n\t\t\t\t\t __u32 length, int advice)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_MADVISE, sqe, -1, addr, (__u32) length, 0);\n\tsqe->fadvise_advice = (__u32) advice;\n}\n\nIOURINGINLINE void io_uring_prep_fadvise64(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\t __u64 offset, off_t len, int advice)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_FADVISE, sqe, fd, NULL, 0, offset);\n\tsqe->addr = len;\n\tsqe->fadvise_advice = (__u32) advice;\n}\n\nIOURINGINLINE void io_uring_prep_madvise64(struct io_uring_sqe *sqe, void *addr,\n\t\t\t\t\t off_t length, int advice)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_MADVISE, sqe, -1, addr, 0, length);\n\tsqe->fadvise_advice = (__u32) advice;\n}\n\nIOURINGINLINE void io_uring_prep_send(struct io_uring_sqe *sqe, int sockfd,\n\t\t\t\t      const void *buf, size_t len, int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_SEND, sqe, sockfd, buf, (__u32) len, 0);\n\tsqe->msg_flags = (__u32) flags;\n}\n\nIOURINGINLINE void io_uring_prep_send_bundle(struct io_uring_sqe *sqe,\n\t\t\t\t\t     int sockfd, size_t len, int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_send(sqe, sockfd, NULL, len, flags);\n\tsqe->ioprio |= IORING_RECVSEND_BUNDLE;\n}\n\nIOURINGINLINE void io_uring_prep_send_set_addr(struct io_uring_sqe *sqe,\n\t\t\t\t\t\tconst struct sockaddr *dest_addr,\n\t\t\t\t\t\t__u16 addr_len)\n\tLIBURING_NOEXCEPT\n{\n\tsqe->addr2 = (unsigned long)(const void *)dest_addr;\n\tsqe->addr_len = addr_len;\n}\n\nIOURINGINLINE void io_uring_prep_sendto(struct io_uring_sqe *sqe, int sockfd,\n\t\t\t\t\tconst void *buf, size_t len, int flags,\n\t\t\t\t\tconst struct sockaddr *addr,\n\t\t\t\t\tsocklen_t addrlen)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_send(sqe, sockfd, buf, len, flags);\n\tio_uring_prep_send_set_addr(sqe, addr, addrlen);\n}\n\nIOURINGINLINE void io_uring_prep_send_zc(struct io_uring_sqe *sqe, int sockfd,\n\t\t\t\t\t const void *buf, size_t len, int flags,\n\t\t\t\t\t unsigned zc_flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_SEND_ZC, sqe, sockfd, buf, (__u32) len, 0);\n\tsqe->msg_flags = (__u32) flags;\n\tsqe->ioprio = zc_flags;\n}\n\nIOURINGINLINE void io_uring_prep_send_zc_fixed(struct io_uring_sqe *sqe,\n\t\t\t\t\t\tint sockfd, const void *buf,\n\t\t\t\t\t\tsize_t len, int flags,\n\t\t\t\t\t\tunsigned zc_flags,\n\t\t\t\t\t\tunsigned buf_index)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_send_zc(sqe, sockfd, buf, len, flags, zc_flags);\n\tsqe->ioprio |= IORING_RECVSEND_FIXED_BUF;\n\tsqe->buf_index = buf_index;\n}\n\nIOURINGINLINE void io_uring_prep_sendmsg_zc(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\t    const struct msghdr *msg,\n\t\t\t\t\t    unsigned flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_sendmsg(sqe, fd, msg, flags);\n\tsqe->opcode = IORING_OP_SENDMSG_ZC;\n}\n\nIOURINGINLINE void io_uring_prep_sendmsg_zc_fixed(struct io_uring_sqe *sqe,\n\t\t\t\t\t\tint fd,\n\t\t\t\t\t\tconst struct msghdr *msg,\n\t\t\t\t\t\tunsigned flags,\n\t\t\t\t\t\tunsigned buf_index)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_sendmsg_zc(sqe, fd, msg, flags);\n\tsqe->ioprio |= IORING_RECVSEND_FIXED_BUF;\n\tsqe->buf_index = buf_index;\n}\n\nIOURINGINLINE void io_uring_prep_recv(struct io_uring_sqe *sqe, int sockfd,\n\t\t\t\t      void *buf, size_t len, int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_RECV, sqe, sockfd, buf, (__u32) len, 0);\n\tsqe->msg_flags = (__u32) flags;\n}\n\nIOURINGINLINE void io_uring_prep_recv_multishot(struct io_uring_sqe *sqe,\n\t\t\t\t\t\tint sockfd, void *buf,\n\t\t\t\t\t\tsize_t len, int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_recv(sqe, sockfd, buf, len, flags);\n\tsqe->ioprio |= IORING_RECV_MULTISHOT;\n}\n\nIOURINGINLINE struct io_uring_recvmsg_out *\nio_uring_recvmsg_validate(void *buf, int buf_len, struct msghdr *msgh)\n\tLIBURING_NOEXCEPT\n{\n\tunsigned long header = msgh->msg_controllen + msgh->msg_namelen +\n\t\t\t\tsizeof(struct io_uring_recvmsg_out);\n\tif (buf_len < 0 || (unsigned long)buf_len < header)\n\t\treturn NULL;\n\treturn (struct io_uring_recvmsg_out *)buf;\n}\n\nIOURINGINLINE void *io_uring_recvmsg_name(struct io_uring_recvmsg_out *o)\n\tLIBURING_NOEXCEPT\n{\n\treturn (void *) &o[1];\n}\n\nIOURINGINLINE struct cmsghdr *\nio_uring_recvmsg_cmsg_firsthdr(struct io_uring_recvmsg_out *o,\n\t\t\t       struct msghdr *msgh)\n\tLIBURING_NOEXCEPT\n{\n\tif (o->controllen < sizeof(struct cmsghdr))\n\t\treturn NULL;\n\n\treturn (struct cmsghdr *)((unsigned char *) io_uring_recvmsg_name(o) +\n\t\t\tmsgh->msg_namelen);\n}\n\nIOURINGINLINE struct cmsghdr *\nio_uring_recvmsg_cmsg_nexthdr(struct io_uring_recvmsg_out *o, struct msghdr *msgh,\n\t\t\t      struct cmsghdr *cmsg)\n\tLIBURING_NOEXCEPT\n{\n\tunsigned char *end;\n\n\tif (cmsg->cmsg_len < sizeof(struct cmsghdr))\n\t\treturn NULL;\n\tend = (unsigned char *) io_uring_recvmsg_cmsg_firsthdr(o, msgh) +\n\t\to->controllen;\n\tcmsg = (struct cmsghdr *)((unsigned char *) cmsg +\n\t\t\tCMSG_ALIGN(cmsg->cmsg_len));\n\n\tif ((unsigned char *) (cmsg + 1) > end)\n\t\treturn NULL;\n\tif (((unsigned char *) cmsg) + CMSG_ALIGN(cmsg->cmsg_len) > end)\n\t\treturn NULL;\n\n\treturn cmsg;\n}\n\nIOURINGINLINE void *io_uring_recvmsg_payload(struct io_uring_recvmsg_out *o,\n\t\t\t\t\t     struct msghdr *msgh)\n\tLIBURING_NOEXCEPT\n{\n\treturn (void *)((unsigned char *)io_uring_recvmsg_name(o) +\n\t\t\tmsgh->msg_namelen + msgh->msg_controllen);\n}\n\nIOURINGINLINE unsigned int\nio_uring_recvmsg_payload_length(struct io_uring_recvmsg_out *o,\n\t\t\t\tint buf_len, struct msghdr *msgh)\n\tLIBURING_NOEXCEPT\n{\n\tunsigned long payload_start, payload_end;\n\n\tpayload_start = (unsigned long) io_uring_recvmsg_payload(o, msgh);\n\tpayload_end = (unsigned long) o + buf_len;\n\treturn (unsigned int) (payload_end - payload_start);\n}\n\nIOURINGINLINE void io_uring_prep_openat2(struct io_uring_sqe *sqe, int dfd,\n\t\t\t\t\tconst char *path, const struct open_how *how)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_OPENAT2, sqe, dfd, path, sizeof(*how),\n\t\t\t\t(uint64_t) (uintptr_t) how);\n}\n\n/* open directly into the fixed file table */\nIOURINGINLINE void io_uring_prep_openat2_direct(struct io_uring_sqe *sqe,\n\t\t\t\t\t\tint dfd, const char *path,\n\t\t\t\t\t\tconst struct open_how *how,\n\t\t\t\t\t\tunsigned file_index)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_openat2(sqe, dfd, path, how);\n\t/* offset by 1 for allocation */\n\tif (file_index == IORING_FILE_INDEX_ALLOC)\n\t\tfile_index--;\n\t__io_uring_set_target_fixed_file(sqe, file_index);\n}\n\nstruct epoll_event;\nIOURINGINLINE void io_uring_prep_epoll_ctl(struct io_uring_sqe *sqe, int epfd,\n\t\t\t\t\t   int fd, int op,\n\t\t\t\t\t   const struct epoll_event *ev)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_EPOLL_CTL, sqe, epfd, ev,\n\t\t\t\t(__u32) op, (__u32) fd);\n}\n\nIOURINGINLINE void io_uring_prep_provide_buffers(struct io_uring_sqe *sqe,\n\t\t\t\t\t\t void *addr, int len, int nr,\n\t\t\t\t\t\t int bgid, int bid)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_PROVIDE_BUFFERS, sqe, nr, addr, (__u32) len,\n\t\t\t\t(__u64) bid);\n\tsqe->buf_group = (__u16) bgid;\n}\n\nIOURINGINLINE void io_uring_prep_remove_buffers(struct io_uring_sqe *sqe,\n\t\t\t\t\t\tint nr, int bgid)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_REMOVE_BUFFERS, sqe, nr, NULL, 0, 0);\n\tsqe->buf_group = (__u16) bgid;\n}\n\nIOURINGINLINE void io_uring_prep_shutdown(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\t  int how)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_SHUTDOWN, sqe, fd, NULL, (__u32) how, 0);\n}\n\nIOURINGINLINE void io_uring_prep_unlinkat(struct io_uring_sqe *sqe, int dfd,\n\t\t\t\t\t  const char *path, int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_UNLINKAT, sqe, dfd, path, 0, 0);\n\tsqe->unlink_flags = (__u32) flags;\n}\n\nIOURINGINLINE void io_uring_prep_unlink(struct io_uring_sqe *sqe,\n\t\t\t\t\t  const char *path, int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_unlinkat(sqe, AT_FDCWD, path, flags);\n}\n\nIOURINGINLINE void io_uring_prep_renameat(struct io_uring_sqe *sqe, int olddfd,\n\t\t\t\t\t  const char *oldpath, int newdfd,\n\t\t\t\t\t  const char *newpath, unsigned int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_RENAMEAT, sqe, olddfd, oldpath,\n\t\t\t\t(__u32) newdfd,\n\t\t\t\t(uint64_t) (uintptr_t) newpath);\n\tsqe->rename_flags = (__u32) flags;\n}\n\nIOURINGINLINE void io_uring_prep_rename(struct io_uring_sqe *sqe,\n\t\t\t\t\tconst char *oldpath,\n\t\t\t\t\tconst char *newpath)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_renameat(sqe, AT_FDCWD, oldpath, AT_FDCWD, newpath, 0);\n}\n\nIOURINGINLINE void io_uring_prep_sync_file_range(struct io_uring_sqe *sqe,\n\t\t\t\t\t\t int fd, unsigned len,\n\t\t\t\t\t\t __u64 offset, int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_SYNC_FILE_RANGE, sqe, fd, NULL, len, offset);\n\tsqe->sync_range_flags = (__u32) flags;\n}\n\nIOURINGINLINE void io_uring_prep_mkdirat(struct io_uring_sqe *sqe, int dfd,\n\t\t\t\t\tconst char *path, mode_t mode)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_MKDIRAT, sqe, dfd, path, mode, 0);\n}\n\nIOURINGINLINE void io_uring_prep_mkdir(struct io_uring_sqe *sqe,\n\t\t\t\t\tconst char *path, mode_t mode)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_mkdirat(sqe, AT_FDCWD, path, mode);\n}\n\nIOURINGINLINE void io_uring_prep_symlinkat(struct io_uring_sqe *sqe,\n\t\t\t\t\t   const char *target, int newdirfd,\n\t\t\t\t\t   const char *linkpath)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_SYMLINKAT, sqe, newdirfd, target, 0,\n\t\t\t\t(uint64_t) (uintptr_t) linkpath);\n}\n\nIOURINGINLINE void io_uring_prep_symlink(struct io_uring_sqe *sqe,\n\t\t\t\t\t const char *target,\n\t\t\t\t\t const char *linkpath)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_symlinkat(sqe, target, AT_FDCWD, linkpath);\n}\n\nIOURINGINLINE void io_uring_prep_linkat(struct io_uring_sqe *sqe, int olddfd,\n\t\t\t\t\tconst char *oldpath, int newdfd,\n\t\t\t\t\tconst char *newpath, int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_LINKAT, sqe, olddfd, oldpath, (__u32) newdfd,\n\t\t\t\t(uint64_t) (uintptr_t) newpath);\n\tsqe->hardlink_flags = (__u32) flags;\n}\n\nIOURINGINLINE void io_uring_prep_link(struct io_uring_sqe *sqe,\n\t\t\t\t      const char *oldpath, const char *newpath,\n\t\t\t\t      int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_linkat(sqe, AT_FDCWD, oldpath, AT_FDCWD, newpath, flags);\n}\n\nIOURINGINLINE void io_uring_prep_msg_ring_cqe_flags(struct io_uring_sqe *sqe,\n\t\t\t\t\t  int fd, unsigned int len, __u64 data,\n\t\t\t\t\t  unsigned int flags, unsigned int cqe_flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_MSG_RING, sqe, fd, NULL, len, data);\n\tsqe->msg_ring_flags = IORING_MSG_RING_FLAGS_PASS | flags;\n\tsqe->file_index = cqe_flags;\n}\n\nIOURINGINLINE void io_uring_prep_msg_ring(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\t  unsigned int len, __u64 data,\n\t\t\t\t\t  unsigned int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_MSG_RING, sqe, fd, NULL, len, data);\n\tsqe->msg_ring_flags = flags;\n}\n\nIOURINGINLINE void io_uring_prep_msg_ring_fd(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\t     int source_fd, int target_fd,\n\t\t\t\t\t     __u64 data, unsigned int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_MSG_RING, sqe, fd,\n\t\t\t (void *) (uintptr_t) IORING_MSG_SEND_FD, 0, data);\n\tsqe->addr3 = source_fd;\n\t/* offset by 1 for allocation */\n\tif ((unsigned int) target_fd == IORING_FILE_INDEX_ALLOC)\n\t\ttarget_fd--;\n\t__io_uring_set_target_fixed_file(sqe, target_fd);\n\tsqe->msg_ring_flags = flags;\n}\n\nIOURINGINLINE void io_uring_prep_msg_ring_fd_alloc(struct io_uring_sqe *sqe,\n\t\t\t\t\t\t   int fd, int source_fd,\n\t\t\t\t\t\t   __u64 data, unsigned int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_msg_ring_fd(sqe, fd, source_fd, IORING_FILE_INDEX_ALLOC,\n\t\t\t\t  data, flags);\n}\n\nIOURINGINLINE void io_uring_prep_getxattr(struct io_uring_sqe *sqe,\n\t\t\t\t\t  const char *name, char *value,\n\t\t\t\t\t  const char *path, unsigned int len)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_GETXATTR, sqe, 0, name, len,\n\t\t\t\t(__u64) (uintptr_t) value);\n\tsqe->addr3 = (__u64) (uintptr_t) path;\n\tsqe->xattr_flags = 0;\n}\n\nIOURINGINLINE void io_uring_prep_setxattr(struct io_uring_sqe *sqe,\n\t\t\t\t\t  const char *name, const char *value,\n\t\t\t\t\t  const char *path, int flags,\n\t\t\t\t\t  unsigned int len)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_SETXATTR, sqe, 0, name, len,\n\t\t\t\t(__u64) (uintptr_t) value);\n\tsqe->addr3 = (__u64) (uintptr_t) path;\n\tsqe->xattr_flags = flags;\n}\n\nIOURINGINLINE void io_uring_prep_fgetxattr(struct io_uring_sqe *sqe,\n\t\t\t\t\t   int fd, const char *name,\n\t\t\t\t\t   char *value, unsigned int len)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_FGETXATTR, sqe, fd, name, len,\n\t\t\t\t(__u64) (uintptr_t) value);\n\tsqe->xattr_flags = 0;\n}\n\nIOURINGINLINE void io_uring_prep_fsetxattr(struct io_uring_sqe *sqe, int fd,\n\t\t\t\t\t   const char *name, const char\t*value,\n\t\t\t\t\t   int flags, unsigned int len)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_FSETXATTR, sqe, fd, name, len,\n\t\t\t\t(__u64) (uintptr_t) value);\n\tsqe->xattr_flags = flags;\n}\n\nIOURINGINLINE void io_uring_prep_socket(struct io_uring_sqe *sqe, int domain,\n\t\t\t\t\tint type, int protocol,\n\t\t\t\t\tunsigned int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_SOCKET, sqe, domain, NULL, protocol, type);\n\tsqe->rw_flags = flags;\n}\n\nIOURINGINLINE void io_uring_prep_socket_direct(struct io_uring_sqe *sqe,\n\t\t\t\t\t       int domain, int type,\n\t\t\t\t\t       int protocol,\n\t\t\t\t\t       unsigned file_index,\n\t\t\t\t\t       unsigned int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_SOCKET, sqe, domain, NULL, protocol, type);\n\tsqe->rw_flags = flags;\n\t/* offset by 1 for allocation */\n\tif (file_index == IORING_FILE_INDEX_ALLOC)\n\t\tfile_index--;\n\t__io_uring_set_target_fixed_file(sqe, file_index);\n}\n\nIOURINGINLINE void io_uring_prep_socket_direct_alloc(struct io_uring_sqe *sqe,\n\t\t\t\t\t\t     int domain, int type,\n\t\t\t\t\t\t     int protocol,\n\t\t\t\t\t\t     unsigned int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_SOCKET, sqe, domain, NULL, protocol, type);\n\tsqe->rw_flags = flags;\n\t__io_uring_set_target_fixed_file(sqe, IORING_FILE_INDEX_ALLOC - 1);\n}\n\nIOURINGINLINE void __io_uring_prep_uring_cmd(struct io_uring_sqe *sqe,\n\t\t\t\t\t     int op,\n\t\t\t\t\t     __u32 cmd_op,\n\t\t\t\t\t     int fd)\n\tLIBURING_NOEXCEPT\n{\n\tsqe->opcode = (__u8) op;\n\tsqe->fd = fd;\n\tsqe->cmd_op = cmd_op;\n\tsqe->__pad1 = 0;\n\tsqe->addr = 0ul;\n\tsqe->len = 0;\n}\n\nIOURINGINLINE void io_uring_prep_uring_cmd(struct io_uring_sqe *sqe,\n\t\t\t\t\t   int cmd_op,\n\t\t\t\t\t   int fd)\n\tLIBURING_NOEXCEPT\n{\n\t__io_uring_prep_uring_cmd(sqe, IORING_OP_URING_CMD, cmd_op, fd);\n}\n\nIOURINGINLINE void io_uring_prep_uring_cmd128(struct io_uring_sqe *sqe,\n\t\t\t\t\t      int cmd_op,\n\t\t\t\t\t      int fd)\n\tLIBURING_NOEXCEPT\n{\n\t__io_uring_prep_uring_cmd(sqe, IORING_OP_URING_CMD128, cmd_op, fd);\n}\n\n/*\n * Prepare commands for sockets\n */\nIOURINGINLINE void io_uring_prep_cmd_sock(struct io_uring_sqe *sqe,\n\t\t\t\t\t  int cmd_op,\n\t\t\t\t\t  int fd,\n\t\t\t\t\t  int level,\n\t\t\t\t\t  int optname,\n\t\t\t\t\t  void *optval,\n\t\t\t\t\t  int optlen)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_uring_cmd(sqe, cmd_op, fd);\n\tsqe->optval = (unsigned long) (uintptr_t) optval;\n\tsqe->optname = optname;\n\tsqe->optlen = optlen;\n\tsqe->level = level;\n}\n\nIOURINGINLINE void io_uring_prep_cmd_getsockname(struct io_uring_sqe *sqe,\n\t\t\t\t\t\t int fd, struct sockaddr *sockaddr,\n\t\t\t\t\t\t socklen_t *sockaddr_len,\n\t\t\t\t\t\t int peer)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_uring_cmd(sqe, SOCKET_URING_OP_GETSOCKNAME, fd);\n\n\tsqe->addr = (uintptr_t) sockaddr;\n\tsqe->addr3 = (unsigned long) (uintptr_t) sockaddr_len;\n\tsqe->optlen = peer;\n}\n\nIOURINGINLINE void io_uring_prep_waitid(struct io_uring_sqe *sqe,\n\t\t\t\t\tidtype_t idtype,\n\t\t\t\t\tid_t id,\n\t\t\t\t\tsiginfo_t *infop,\n\t\t\t\t\tint options, unsigned int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_WAITID, sqe, id, NULL, (unsigned) idtype, 0);\n\tsqe->waitid_flags = flags;\n\tsqe->file_index = options;\n\tsqe->addr2 = (unsigned long) infop;\n}\n\nIOURINGINLINE void io_uring_prep_futex_wake(struct io_uring_sqe *sqe,\n\t\t\t\t\t    const uint32_t *futex, uint64_t val,\n\t\t\t\t\t    uint64_t mask, uint32_t futex_flags,\n\t\t\t\t\t    unsigned int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_FUTEX_WAKE, sqe, futex_flags, futex, 0, val);\n\tsqe->futex_flags = flags;\n\tsqe->addr3 = mask;\n}\n\nIOURINGINLINE void io_uring_prep_futex_wait(struct io_uring_sqe *sqe,\n\t\t\t\t\t    const uint32_t *futex, uint64_t val,\n\t\t\t\t\t    uint64_t mask, uint32_t futex_flags,\n\t\t\t\t\t    unsigned int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_FUTEX_WAIT, sqe, futex_flags, futex, 0, val);\n\tsqe->futex_flags = flags;\n\tsqe->addr3 = mask;\n}\n\nstruct futex_waitv;\nIOURINGINLINE void io_uring_prep_futex_waitv(struct io_uring_sqe *sqe,\n\t\t\t\t\t     const struct futex_waitv *futex,\n\t\t\t\t\t     uint32_t nr_futex,\n\t\t\t\t\t     unsigned int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_FUTEX_WAITV, sqe, 0, futex, nr_futex, 0);\n\tsqe->futex_flags = flags;\n}\n\nIOURINGINLINE void io_uring_prep_fixed_fd_install(struct io_uring_sqe *sqe,\n\t\t\t\t\t\t  int fd,\n\t\t\t\t\t\t  unsigned int flags)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_FIXED_FD_INSTALL, sqe, fd, NULL, 0, 0);\n\tsqe->flags = IOSQE_FIXED_FILE;\n\tsqe->install_fd_flags = flags;\n}\n\n#ifdef _GNU_SOURCE\nIOURINGINLINE void io_uring_prep_ftruncate(struct io_uring_sqe *sqe,\n\t\t\t\t       int fd, loff_t len)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_rw(IORING_OP_FTRUNCATE, sqe, fd, 0, 0, len);\n}\n#endif\n\nIOURINGINLINE void io_uring_prep_cmd_discard(struct io_uring_sqe *sqe,\n\t\t\t\t\t     int fd,\n\t\t\t\t\t     uint64_t offset, uint64_t nbytes)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_prep_uring_cmd(sqe, BLOCK_URING_CMD_DISCARD, fd);\n\tsqe->addr = offset;\n\tsqe->addr3 = nbytes;\n}\n\nIOURINGINLINE void io_uring_prep_pipe(struct io_uring_sqe *sqe, int *fds,\n\t\t\t\t      int pipe_flags)\n{\n\tio_uring_prep_rw(IORING_OP_PIPE, sqe, 0, fds, 0, 0);\n\tsqe->pipe_flags = (__u32) pipe_flags;\n}\n\n/* setup pipe directly into the fixed file table */\nIOURINGINLINE void io_uring_prep_pipe_direct(struct io_uring_sqe *sqe, int *fds,\n\t\t\t\t\t     int pipe_flags,\n\t\t\t\t\t     unsigned int file_index)\n{\n\tio_uring_prep_pipe(sqe, fds, pipe_flags);\n\t/* offset by 1 for allocation */\n\tif (file_index == IORING_FILE_INDEX_ALLOC)\n\t\tfile_index--;\n\t__io_uring_set_target_fixed_file(sqe, file_index);\n}\n\n/* Read the kernel's SQ head index with appropriate memory ordering */\nIOURINGINLINE unsigned io_uring_load_sq_head(const struct io_uring *ring)\n\tLIBURING_NOEXCEPT\n{\n\t/*\n\t * Without acquire ordering, we could overwrite a SQE before the kernel\n\t * finished reading it. We don't need the acquire ordering for\n\t * non-SQPOLL since then we drive updates.\n\t */\n\tif (ring->flags & IORING_SETUP_SQPOLL)\n\t\treturn io_uring_smp_load_acquire(ring->sq.khead);\n\n\treturn *ring->sq.khead;\n}\n\n/*\n * Returns number of unconsumed (if SQPOLL) or unsubmitted entries exist in\n * the SQ ring\n */\nIOURINGINLINE unsigned io_uring_sq_ready(const struct io_uring *ring)\n\tLIBURING_NOEXCEPT\n{\n\t/* always use real head, to avoid losing sync for short submit */\n\treturn ring->sq.sqe_tail - io_uring_load_sq_head(ring);\n}\n\n/*\n * Returns how much space is left in the SQ ring.\n */\nIOURINGINLINE unsigned io_uring_sq_space_left(const struct io_uring *ring)\n\tLIBURING_NOEXCEPT\n{\n\treturn ring->sq.ring_entries - io_uring_sq_ready(ring);\n}\n\n/*\n * Returns the bit shift needed to index the SQ.\n * This shift is 1 for rings with big SQEs, and 0 for rings with normal SQEs.\n * SQE `index` can be computed as &sq.sqes[(index & sq.ring_mask) << sqe_shift].\n */\nIOURINGINLINE unsigned io_uring_sqe_shift_from_flags(unsigned flags)\n\tLIBURING_NOEXCEPT\n{\n\treturn !!(flags & IORING_SETUP_SQE128);\n}\n\nIOURINGINLINE unsigned io_uring_sqe_shift(const struct io_uring *ring)\n\tLIBURING_NOEXCEPT\n{\n\treturn io_uring_sqe_shift_from_flags(ring->flags);\n}\n\n/*\n * Only applicable when using SQPOLL - allows the caller to wait for space\n * to free up in the SQ ring, which happens when the kernel side thread has\n * consumed one or more entries. If the SQ ring is currently non-full, no\n * action is taken. Note: may return -EINVAL if the kernel doesn't support\n * this feature.\n */\nIOURINGINLINE int io_uring_sqring_wait(struct io_uring *ring)\n\tLIBURING_NOEXCEPT\n{\n\tif (!(ring->flags & IORING_SETUP_SQPOLL))\n\t\treturn 0;\n\tif (io_uring_sq_space_left(ring))\n\t\treturn 0;\n\n\treturn __io_uring_sqring_wait(ring);\n}\n\n/*\n * Returns how many unconsumed entries are ready in the CQ ring\n */\nIOURINGINLINE unsigned io_uring_cq_ready(const struct io_uring *ring)\n\tLIBURING_NOEXCEPT\n{\n\treturn io_uring_smp_load_acquire(ring->cq.ktail) - *ring->cq.khead;\n}\n\n/*\n * Returns true if there are overflow entries waiting to be flushed onto\n * the CQ ring\n */\nIOURINGINLINE bool io_uring_cq_has_overflow(const struct io_uring *ring)\n\tLIBURING_NOEXCEPT\n{\n\treturn IO_URING_READ_ONCE(*ring->sq.kflags) & IORING_SQ_CQ_OVERFLOW;\n}\n\n/*\n * Returns true if the eventfd notification is currently enabled\n */\nIOURINGINLINE bool io_uring_cq_eventfd_enabled(const struct io_uring *ring)\n\tLIBURING_NOEXCEPT\n{\n\tif (!ring->cq.kflags)\n\t\treturn true;\n\n\treturn !(*ring->cq.kflags & IORING_CQ_EVENTFD_DISABLED);\n}\n\n/*\n * Toggle eventfd notification on or off, if an eventfd is registered with\n * the ring.\n */\nIOURINGINLINE int io_uring_cq_eventfd_toggle(struct io_uring *ring,\n\t\t\t\t\t     bool enabled)\n\tLIBURING_NOEXCEPT\n{\n\tuint32_t flags;\n\n\tif (enabled == io_uring_cq_eventfd_enabled(ring))\n\t\treturn 0;\n\n\tif (!ring->cq.kflags)\n\t\treturn -EOPNOTSUPP;\n\n\tflags = *ring->cq.kflags;\n\n\tif (enabled)\n\t\tflags &= ~IORING_CQ_EVENTFD_DISABLED;\n\telse\n\t\tflags |= IORING_CQ_EVENTFD_DISABLED;\n\n\tIO_URING_WRITE_ONCE(*ring->cq.kflags, flags);\n\n\treturn 0;\n}\n\n/*\n * Return an IO completion, waiting for 'wait_nr' completions if one isn't\n * readily available. Returns 0 with cqe_ptr filled in on success, -errno on\n * failure.\n */\nIOURINGINLINE int io_uring_wait_cqe_nr(struct io_uring *ring,\n\t\t\t\t      struct io_uring_cqe **cqe_ptr,\n\t\t\t\t      unsigned wait_nr)\n\tLIBURING_NOEXCEPT\n{\n\treturn __io_uring_get_cqe(ring, cqe_ptr, 0, wait_nr, NULL);\n}\n\n_LOCAL_INLINE bool io_uring_skip_cqe(struct io_uring *ring,\n\t\t\t\t     struct io_uring_cqe *cqe, int *err)\n{\n\tif (cqe->flags & IORING_CQE_F_SKIP)\n\t\tgoto out;\n\tif (ring->features & IORING_FEAT_EXT_ARG)\n\t\treturn false;\n\tif (cqe->user_data != LIBURING_UDATA_TIMEOUT)\n\t\treturn false;\n\tif (cqe->res < 0)\n\t\t*err = cqe->res;\nout:\n\tio_uring_cq_advance(ring, io_uring_cqe_nr(cqe));\n\treturn !*err;\n}\n\n/*\n * Internal helper, don't use directly in applications. Use one of the\n * \"official\" versions of this, io_uring_peek_cqe(), io_uring_wait_cqe(),\n * or io_uring_wait_cqes*().\n */\n_LOCAL_INLINE int __io_uring_peek_cqe(struct io_uring *ring,\n\t\t\t\t      struct io_uring_cqe **cqe_ptr,\n\t\t\t\t      unsigned *nr_available)\n\tLIBURING_NOEXCEPT\n{\n\tstruct io_uring_cqe *cqe;\n\tint err = 0;\n\tunsigned available;\n\tunsigned mask = ring->cq.ring_mask;\n\tunsigned shift = io_uring_cqe_shift(ring);\n\n\tdo {\n\t\tunsigned tail = io_uring_smp_load_acquire(ring->cq.ktail);\n\n\t\t/**\n\t\t * A load_acquire on the head prevents reordering with the\n\t\t * cqe load below, ensuring that we see the correct cq entry.\n\t\t */\n\t\tunsigned head = io_uring_smp_load_acquire(ring->cq.khead);\n\n\t\tcqe = NULL;\n\t\tavailable = tail - head;\n\t\tif (!available)\n\t\t\tbreak;\n\n\t\tcqe = &ring->cq.cqes[(head & mask) << shift];\n\t\tif (!io_uring_skip_cqe(ring, cqe, &err))\n\t\t\tbreak;\n\t\tcqe = NULL;\n\t} while (1);\n\n\t*cqe_ptr = cqe;\n\tif (nr_available)\n\t\t*nr_available = available;\n\treturn err;\n}\n\n/*\n * Return an IO completion, if one is readily available. Returns 0 with\n * cqe_ptr filled in on success, -errno on failure.\n */\nIOURINGINLINE int io_uring_peek_cqe(struct io_uring *ring,\n\t\t\t\t    struct io_uring_cqe **cqe_ptr)\n\tLIBURING_NOEXCEPT\n{\n\tif (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr)\n\t\treturn 0;\n\n\treturn io_uring_wait_cqe_nr(ring, cqe_ptr, 0);\n}\n\n/*\n * Return an IO completion, waiting for it if necessary. Returns 0 with\n * cqe_ptr filled in on success, -errno on failure.\n */\nIOURINGINLINE int io_uring_wait_cqe(struct io_uring *ring,\n\t\t\t\t    struct io_uring_cqe **cqe_ptr)\n\tLIBURING_NOEXCEPT\n{\n\tif (!__io_uring_peek_cqe(ring, cqe_ptr, NULL) && *cqe_ptr)\n\t\treturn 0;\n\n\treturn io_uring_wait_cqe_nr(ring, cqe_ptr, 1);\n}\n\n/*\n * Return an sqe to fill. Application must later call io_uring_submit()\n * when it's ready to tell the kernel about it. The caller may call this\n * function multiple times before calling io_uring_submit().\n *\n * Returns a vacant sqe, or NULL if we're full.\n */\nIOURINGINLINE struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring)\n\tLIBURING_NOEXCEPT\n{\n\tstruct io_uring_sq *sq = &ring->sq;\n\tunsigned head = io_uring_load_sq_head(ring), tail = sq->sqe_tail;\n\tstruct io_uring_sqe *sqe;\n\n\tif (tail - head >= sq->ring_entries)\n\t\treturn NULL;\n\n\tsqe = &sq->sqes[(tail & sq->ring_mask) << io_uring_sqe_shift(ring)];\n\tsq->sqe_tail = tail + 1;\n\tio_uring_initialize_sqe(sqe);\n\treturn sqe;\n}\n\n/*\n * Return the appropriate mask for a buffer ring of size 'ring_entries'\n */\nIOURINGINLINE int io_uring_buf_ring_mask(__u32 ring_entries)\n\tLIBURING_NOEXCEPT\n{\n\treturn ring_entries - 1;\n}\n\nIOURINGINLINE void io_uring_buf_ring_init(struct io_uring_buf_ring *br)\n\tLIBURING_NOEXCEPT\n{\n\tbr->tail = 0;\n}\n\n/*\n * Assign 'buf' with the addr/len/buffer ID supplied\n */\nIOURINGINLINE void io_uring_buf_ring_add(struct io_uring_buf_ring *br,\n\t\t\t\t\t void *addr, unsigned int len,\n\t\t\t\t\t unsigned short bid, int mask,\n\t\t\t\t\t int buf_offset)\n\tLIBURING_NOEXCEPT\n{\n\tstruct io_uring_buf *buf = &br->bufs[(br->tail + buf_offset) & mask];\n\n\tbuf->addr = (unsigned long) (uintptr_t) addr;\n\tbuf->len = len;\n\tbuf->bid = bid;\n}\n\n/*\n * Make 'count' new buffers visible to the kernel. Called after\n * io_uring_buf_ring_add() has been called 'count' times to fill in new\n * buffers.\n */\nIOURINGINLINE void io_uring_buf_ring_advance(struct io_uring_buf_ring *br,\n\t\t\t\t\t     int count)\n\tLIBURING_NOEXCEPT\n{\n\tunsigned short new_tail = br->tail + count;\n\n\tio_uring_smp_store_release(&br->tail, new_tail);\n}\n\nIOURINGINLINE void __io_uring_buf_ring_cq_advance(struct io_uring *ring,\n\t\t\t\t\t\t  struct io_uring_buf_ring *br,\n\t\t\t\t\t\t  int cq_count, int buf_count)\n\tLIBURING_NOEXCEPT\n{\n\tio_uring_buf_ring_advance(br, buf_count);\n\tio_uring_cq_advance(ring, cq_count);\n}\n\n/*\n * Make 'count' new buffers visible to the kernel while at the same time\n * advancing the CQ ring seen entries. This can be used when the application\n * is using ring provided buffers and returns buffers while processing CQEs,\n * avoiding an extra atomic when needing to increment both the CQ ring and\n * the ring buffer index at the same time.\n */\nIOURINGINLINE void io_uring_buf_ring_cq_advance(struct io_uring *ring,\n\t\t\t\t\t\tstruct io_uring_buf_ring *br,\n\t\t\t\t\t\tint count)\n\tLIBURING_NOEXCEPT\n{\n\t__io_uring_buf_ring_cq_advance(ring, br, count, count);\n}\n\nIOURINGINLINE int io_uring_buf_ring_available(struct io_uring *ring,\n\t\t\t\t\t      struct io_uring_buf_ring *br,\n\t\t\t\t\t      unsigned short bgid)\n\tLIBURING_NOEXCEPT\n{\n\tuint16_t head;\n\tint ret;\n\n\tret = io_uring_buf_ring_head(ring, bgid, &head);\n\tif (ret)\n\t\treturn ret;\n\n\treturn (uint16_t) (br->tail - head);\n}\n\n/*\n * As of liburing-2.2, io_uring_get_sqe() has been converted into a\n * \"static inline\" function. However, this change breaks seamless\n * updates of liburing.so, as applications would need to be recompiled.\n * To ensure backward compatibility, liburing keeps the original\n * io_uring_get_sqe() symbol available in the shared library.\n *\n * To accomplish this, io_uring_get_sqe() is defined as a non-static\n * inline function when LIBURING_INTERNAL is set, which only applies\n * during liburing.so builds.\n *\n * This strategy ensures new users adopt the \"static inline\" version\n * while preserving compatibility for old applications linked against\n * the shared library.\n *\n * Relevant commits:\n * 8be8af4afcb4 (\"queue: provide io_uring_get_sqe() symbol again\")\n * 52dcdbba35c8 (\"src/queue: protect io_uring_get_sqe() with LIBURING_INTERNAL\")\n */\n#ifndef LIBURING_INTERNAL\nIOURINGINLINE struct io_uring_sqe *io_uring_get_sqe(struct io_uring *ring)\n\tLIBURING_NOEXCEPT\n{\n\treturn _io_uring_get_sqe(ring);\n}\n#else\nstruct io_uring_sqe *io_uring_get_sqe(struct io_uring *ring);\n#endif\n\n\n/*\n * Return a 128B sqe to fill. Applications must later call io_uring_submit()\n * when it's ready to tell the kernel about it. The caller may call this\n * function multiple times before calling io_uring_submit().\n *\n * Returns a vacant 128B sqe, or NULL if we're full. If the current tail is the\n * last entry in the ring, this function will insert a nop + skip complete such\n * that the 128b entry wraps back to the beginning of the queue for a\n * contiguous big sq entry. It's up to the caller to use a 128b opcode in order\n * for the kernel to know how to advance its sq head pointer.\n */\nIOURINGINLINE struct io_uring_sqe *io_uring_get_sqe128(struct io_uring *ring)\n\tLIBURING_NOEXCEPT\n{\n\tstruct io_uring_sq *sq = &ring->sq;\n\tunsigned head = io_uring_load_sq_head(ring), tail = sq->sqe_tail;\n\tstruct io_uring_sqe *sqe;\n\n\tif (ring->flags & IORING_SETUP_SQE128)\n\t\treturn io_uring_get_sqe(ring);\n\tif (!(ring->flags & IORING_SETUP_SQE_MIXED))\n\t\treturn NULL;\n\n\tif (((tail + 1) & sq->ring_mask) == 0) {\n\t\tif ((tail + 2) - head >= sq->ring_entries)\n\t\t\treturn NULL;\n\n\t\tsqe = _io_uring_get_sqe(ring);\n\t\tio_uring_prep_nop(sqe);\n\t\tsqe->flags |= IOSQE_CQE_SKIP_SUCCESS;\n\t\ttail = sq->sqe_tail;\n\t} else if ((tail + 1) - head >= sq->ring_entries) {\n\t\treturn NULL;\n\t}\n\n\tsqe = &sq->sqes[tail & sq->ring_mask];\n\tsq->sqe_tail = tail + 2;\n\tio_uring_initialize_sqe(sqe);\n\treturn sqe;\n}\n\nssize_t io_uring_mlock_size(unsigned entries, unsigned flags)\n\tLIBURING_NOEXCEPT;\nssize_t io_uring_mlock_size_params(unsigned entries, struct io_uring_params *p)\n\tLIBURING_NOEXCEPT;\n\nssize_t io_uring_memory_size(unsigned entries, unsigned flags)\n\tLIBURING_NOEXCEPT;\nssize_t io_uring_memory_size_params(unsigned entries, struct io_uring_params *p)\n\tLIBURING_NOEXCEPT;\n\n/*\n * Versioning information for liburing.\n *\n * Use IO_URING_CHECK_VERSION() for compile time checks including from\n * preprocessor directives.\n *\n * Use io_uring_check_version() for runtime checks of the version of\n * liburing that was loaded by the dynamic linker.\n */\nint io_uring_major_version(void) LIBURING_NOEXCEPT;\nint io_uring_minor_version(void) LIBURING_NOEXCEPT;\nbool io_uring_check_version(int major, int minor) LIBURING_NOEXCEPT;\n\n#define IO_URING_CHECK_VERSION(major,minor) \\\n  (major > IO_URING_VERSION_MAJOR ||        \\\n   (major == IO_URING_VERSION_MAJOR &&      \\\n    minor > IO_URING_VERSION_MINOR))\n\n#ifdef __cplusplus\n}\n#endif\n\n#ifdef IOURINGINLINE\n#undef IOURINGINLINE\n#endif\n\n#ifdef _LOCAL_INLINE\n#undef _LOCAL_INLINE\n#endif\n\n#endif\n"},
                          "roles": ["resultFile",
                                    "tracedFile"]},
                         {"location": {"uri": "helpers.h",
                                       "uriBaseId": "PWD"},
                          "sourceLanguage": "c"}],
           "results": [{"ruleId": "-Wanalyzer-null-dereference",
                        "taxa": [{"id": "476",
                                  "toolComponent": {"name": "cwe"}}],
                        "properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                       "gcc/analyzer/saved_diagnostic/ploc": {"enode": 99},
                                       "gcc/analyzer/saved_diagnostic/var": "_7",
                                       "gcc/analyzer/saved_diagnostic/sval": "(struct io_uring_sqe *)0B",
                                       "gcc/analyzer/saved_diagnostic/state": "null",
                                       "gcc/analyzer/saved_diagnostic/idx": 0,
                                       "gcc/analyzer/pending_diagnostic/kind": "null_deref"},
                        "level": "warning",
                        "message": {"text": "dereference of NULL ‘0’"},
                        "locations": [{"physicalLocation": {"artifactLocation": {"uri": "../src/include/liburing.h",
                                                                                 "uriBaseId": "PWD"},
                                                            "region": {"startLine": 588,
                                                                       "startColumn": 9,
                                                                       "endColumn": 32},
                                                            "contextRegion": {"startLine": 588,
                                                                              "snippet": {"text": "\tsqe->opcode = (__u8) op;\n"}}},
                                       "logicalLocations": [{"index": 0,
                                                             "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                       "id": 0,
                                       "relationships": [{"target": 1,
                                                          "kinds": ["isIncludedBy"]}]}],
                        "codeFlows": [{"threadFlows": [{"id": "main",
                                                        "locations": [{"properties": {"gcc/analyzer/checker_event/emission_id": "(1)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 337,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 29},
                                                                                                         "contextRegion": {"startLine": 337,
                                                                                                                           "snippet": {"text": "static int test_eventfd_read(int flags)\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "entry to ‘test_eventfd_read’"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 1},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(2)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 5,
                                                                                                                                 "dst_id": 8}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 348,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 348,
                                                                                                                           "snippet": {"text": "\tif (ret == T_SETUP_SKIP)\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "following ‘false’ branch (when ‘ret != 1’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 2},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(3)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 5,
                                                                                                                                 "dst_id": 8}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 350,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 350,
                                                                                                                           "snippet": {"text": "\tif (ret != T_SETUP_OK) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 3},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(4)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 8,
                                                                                                                                 "dst_id": 16}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 350,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 350,
                                                                                                                           "snippet": {"text": "\tif (ret != T_SETUP_OK) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "following ‘false’ branch (when ‘ret == 0’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 4},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(5)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 8,
                                                                                                                                 "dst_id": 16}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 357,
                                                                                                                    "startColumn": 14,
                                                                                                                    "endColumn": 27},
                                                                                                         "contextRegion": {"startLine": 357,
                                                                                                                           "snippet": {"text": "\tfd = eventfd(1, 0);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 5},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(6)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 17,
                                                                                                                                 "dst_id": 21}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 358,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 358,
                                                                                                                           "snippet": {"text": "\tif (fd < 0) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "following ‘false’ branch (when ‘fd >= 0’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 6},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(7)",
                                                                                      "gcc/analyzer/checker_event/kind": "inlined_call"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 362,
                                                                                                                    "startColumn": 15,
                                                                                                                    "endColumn": 16},
                                                                                                         "contextRegion": {"startLine": 362,
                                                                                                                           "snippet": {"text": "\tsqe = io_uring_get_sqe(&ring);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "inlined call to ‘io_uring_get_sqe’ from ‘test_eventfd_read’"}},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 7},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(8)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/checker_event/original_fndecl": {"index": 0,
                                                                                                                                     "fullyQualifiedName": "test_eventfd_read.part.0"},
                                                                                      "gcc/analyzer/checker_event/original_depth": 1,
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 17,
                                                                                                                                 "dst_id": 21}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "../src/include/liburing.h",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 2040,
                                                                                                                    "startColumn": 16,
                                                                                                                    "endColumn": 39},
                                                                                                         "contextRegion": {"startLine": 2040,
                                                                                                                           "snippet": {"text": "\treturn _io_uring_get_sqe(ring);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "io_uring_get_sqe"}],
                                                                                    "message": {"text": "...to here"},
                                                                                    "id": 2,
                                                                                    "relationships": [{"target": 1,
                                                                                                       "kinds": ["isIncludedBy"]}]},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 8},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(9)",
                                                                                      "gcc/analyzer/checker_event/kind": "call",
                                                                                      "gcc/analyzer/checker_event/original_fndecl": {"index": 0,
                                                                                                                                     "fullyQualifiedName": "test_eventfd_read.part.0"},
                                                                                      "gcc/analyzer/checker_event/original_depth": 1,
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 21,
                                                                                                                                 "dst_id": 22}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "../src/include/liburing.h",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 2040,
                                                                                                                    "startColumn": 16,
                                                                                                                    "endColumn": 39},
                                                                                                         "contextRegion": {"startLine": 2040,
                                                                                                                           "snippet": {"text": "\treturn _io_uring_get_sqe(ring);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "io_uring_get_sqe"}],
                                                                                    "message": {"text": "calling ‘_io_uring_get_sqe’ from ‘test_eventfd_read’"},
                                                                                    "id": 3,
                                                                                    "relationships": [{"target": 1,
                                                                                                       "kinds": ["isIncludedBy"]}]},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 9},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(10)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "../src/include/liburing.h",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 1917,
                                                                                                                    "startColumn": 36,
                                                                                                                    "endColumn": 53},
                                                                                                         "contextRegion": {"startLine": 1917,
                                                                                                                           "snippet": {"text": "IOURINGINLINE struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring)\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "_io_uring_get_sqe"}],
                                                                                    "message": {"text": "entry to ‘_io_uring_get_sqe’"},
                                                                                    "id": 4,
                                                                                    "relationships": [{"target": 1,
                                                                                                       "kinds": ["isIncludedBy"]}]},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 10},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(11)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 770,
                                                                                                                                 "dst_id": 771}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "../src/include/liburing.h",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 1924,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 1924,
                                                                                                                           "snippet": {"text": "\tif (tail - head >= sq->ring_entries)\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "_io_uring_get_sqe"}],
                                                                                    "message": {"text": "following ‘true’ branch..."},
                                                                                    "id": 5,
                                                                                    "relationships": [{"target": 1,
                                                                                                       "kinds": ["isIncludedBy"]}]},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 11},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(12)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 770,
                                                                                                                                 "dst_id": 771}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "../src/include/liburing.h",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 1924,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 1924,
                                                                                                                           "snippet": {"text": "\tif (tail - head >= sq->ring_entries)\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "_io_uring_get_sqe"}],
                                                                                    "message": {"text": "...to here"},
                                                                                    "id": 6,
                                                                                    "relationships": [{"target": 1,
                                                                                                       "kinds": ["isIncludedBy"]}]},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 12},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(13)",
                                                                                      "gcc/analyzer/checker_event/kind": "inlined_call"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 362,
                                                                                                                    "startColumn": 15,
                                                                                                                    "endColumn": 16},
                                                                                                         "contextRegion": {"startLine": 362,
                                                                                                                           "snippet": {"text": "\tsqe = io_uring_get_sqe(&ring);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "inlined call to ‘io_uring_get_sqe’ from ‘test_eventfd_read’"}},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 13},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(14)",
                                                                                      "gcc/analyzer/checker_event/kind": "return",
                                                                                      "gcc/analyzer/checker_event/original_fndecl": {"index": 0,
                                                                                                                                     "fullyQualifiedName": "test_eventfd_read.part.0"},
                                                                                      "gcc/analyzer/checker_event/original_depth": 1},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "../src/include/liburing.h",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 2040,
                                                                                                                    "startColumn": 16,
                                                                                                                    "endColumn": 39},
                                                                                                         "contextRegion": {"startLine": 2040,
                                                                                                                           "snippet": {"text": "\treturn _io_uring_get_sqe(ring);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "io_uring_get_sqe"}],
                                                                                    "message": {"text": "returning to ‘test_eventfd_read’ from ‘_io_uring_get_sqe’"},
                                                                                    "id": 7,
                                                                                    "relationships": [{"target": 1,
                                                                                                       "kinds": ["isIncludedBy"]}]},
                                                                       "kinds": ["return",
                                                                                 "function"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 14},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(15)",
                                                                                      "gcc/analyzer/checker_event/kind": "inlined_call"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 363,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 10},
                                                                                                         "contextRegion": {"startLine": 363,
                                                                                                                           "snippet": {"text": "\tio_uring_prep_read(sqe, fd, &event, sizeof(eventfd_t), 0);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "inlined call to ‘io_uring_prep_read’ from ‘test_eventfd_read’"}},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 15},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(16)",
                                                                                      "gcc/analyzer/checker_event/kind": "inlined_call"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "../src/include/liburing.h",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 1024,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 10},
                                                                                                         "contextRegion": {"startLine": 1024,
                                                                                                                           "snippet": {"text": "\tio_uring_prep_rw(IORING_OP_READ, sqe, fd, buf, nbytes, offset);\n"}}},
                                                                                    "logicalLocations": [{"index": 3,
                                                                                                          "fullyQualifiedName": "io_uring_prep_read"}],
                                                                                    "message": {"text": "inlined call to ‘io_uring_prep_rw’ from ‘io_uring_prep_read’"},
                                                                                    "id": 8,
                                                                                    "relationships": [{"target": 1,
                                                                                                       "kinds": ["isIncludedBy"]}]},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 16},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(17)",
                                                                                      "gcc/analyzer/checker_event/kind": "warning",
                                                                                      "gcc/analyzer/checker_event/original_fndecl": {"index": 0,
                                                                                                                                     "fullyQualifiedName": "test_eventfd_read.part.0"},
                                                                                      "gcc/analyzer/checker_event/original_depth": 1},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "../src/include/liburing.h",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 588,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 32},
                                                                                                         "contextRegion": {"startLine": 588,
                                                                                                                           "snippet": {"text": "\tsqe->opcode = (__u8) op;\n"}}},
                                                                                    "logicalLocations": [{"index": 4,
                                                                                                          "fullyQualifiedName": "io_uring_prep_rw"}],
                                                                                    "message": {"text": "dereference of NULL ‘_io_uring_get_sqe(&ring)’"},
                                                                                    "id": 9,
                                                                                    "relationships": [{"target": 1,
                                                                                                       "kinds": ["isIncludedBy"]}]},
                                                                       "kinds": ["danger"],
                                                                       "nestingLevel": 3,
                                                                       "executionOrder": 17}]}]}],
                        "relatedLocations": [{"physicalLocation": {"artifactLocation": {"uri": "helpers.h",
                                                                                        "uriBaseId": "PWD"},
                                                                   "region": {"startLine": 12},
                                                                   "contextRegion": {"startLine": 12,
                                                                                     "snippet": {"text": "#include \"liburing.h\"\n"}}},
                                              "relationships": [{"target": 0,
                                                                 "kinds": ["includes"]},
                                                                {"target": 2,
                                                                 "kinds": ["includes"]},
                                                                {"target": 3,
                                                                 "kinds": ["includes"]},
                                                                {"target": 4,
                                                                 "kinds": ["includes"]},
                                                                {"target": 5,
                                                                 "kinds": ["includes"]},
                                                                {"target": 6,
                                                                 "kinds": ["includes"]},
                                                                {"target": 7,
                                                                 "kinds": ["includes"]},
                                                                {"target": 8,
                                                                 "kinds": ["includes"]},
                                                                {"target": 9,
                                                                 "kinds": ["includes"]},
                                                                {"target": 10,
                                                                 "kinds": ["isIncludedBy"]}],
                                              "id": 1},
                                             {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                        "uriBaseId": "PWD"},
                                                                   "region": {"startLine": 16},
                                                                   "contextRegion": {"startLine": 16,
                                                                                     "snippet": {"text": "#include \"helpers.h\"\n"}}},
                                              "relationships": [{"target": 1,
                                                                 "kinds": ["includes"]}],
                                              "id": 10}]},
                       {"ruleId": "-Wanalyzer-malloc-leak",
                        "taxa": [{"id": "401",
                                  "toolComponent": {"name": "cwe"}}],
                        "properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                       "gcc/analyzer/saved_diagnostic/ploc": {"enode": 144},
                                       "gcc/analyzer/saved_diagnostic/var": "buf_7",
                                       "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(577)",
                                       "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                       "gcc/analyzer/saved_diagnostic/idx": 1,
                                       "gcc/analyzer/saved_diagnostic/duplicates": [{"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 144},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_7",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(577)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 2,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "malloc_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 865},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_7",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(577)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 3,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "malloc_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 865},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_7",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(577)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 4,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "malloc_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 916},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_7",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(577)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 5,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "malloc_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 916},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_7",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(577)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 6,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "malloc_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 954},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_7",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(577)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 7,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "malloc_leak"}},
                                                                                    {"properties": {"gcc/analyzer/saved_diagnostic/sm": "malloc",
                                                                                                    "gcc/analyzer/saved_diagnostic/ploc": {"enode": 954},
                                                                                                    "gcc/analyzer/saved_diagnostic/var": "buf_7",
                                                                                                    "gcc/analyzer/saved_diagnostic/sval": "&HEAP_ALLOCATED_REGION(577)",
                                                                                                    "gcc/analyzer/saved_diagnostic/state": "unchecked ({free})",
                                                                                                    "gcc/analyzer/saved_diagnostic/idx": 8,
                                                                                                    "gcc/analyzer/pending_diagnostic/kind": "malloc_leak"}}],
                                       "gcc/analyzer/pending_diagnostic/kind": "malloc_leak"},
                        "level": "warning",
                        "message": {"text": "leak of ‘buf’"},
                        "locations": [{"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                 "uriBaseId": "PWD"},
                                                            "region": {"startLine": 56,
                                                                       "startColumn": 1,
                                                                       "endColumn": 2},
                                                            "contextRegion": {"startLine": 56,
                                                                              "snippet": {"text": "}\n"}}},
                                       "logicalLocations": [{"index": 5,
                                                             "fullyQualifiedName": "fdinfo_read"}]}],
                        "codeFlows": [{"threadFlows": [{"id": "main",
                                                        "locations": [{"properties": {"gcc/analyzer/checker_event/emission_id": "(1)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 337,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 29},
                                                                                                         "contextRegion": {"startLine": 337,
                                                                                                                           "snippet": {"text": "static int test_eventfd_read(int flags)\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "entry to ‘test_eventfd_read’"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 1},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(2)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 5,
                                                                                                                                 "dst_id": 8}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 348,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 348,
                                                                                                                           "snippet": {"text": "\tif (ret == T_SETUP_SKIP)\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "following ‘false’ branch (when ‘ret != 1’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 2},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(3)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 5,
                                                                                                                                 "dst_id": 8}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 350,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 350,
                                                                                                                           "snippet": {"text": "\tif (ret != T_SETUP_OK) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 3},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(4)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 8,
                                                                                                                                 "dst_id": 16}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 350,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 350,
                                                                                                                           "snippet": {"text": "\tif (ret != T_SETUP_OK) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "following ‘false’ branch (when ‘ret == 0’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 4},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(5)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 8,
                                                                                                                                 "dst_id": 16}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 357,
                                                                                                                    "startColumn": 14,
                                                                                                                    "endColumn": 27},
                                                                                                         "contextRegion": {"startLine": 357,
                                                                                                                           "snippet": {"text": "\tfd = eventfd(1, 0);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 5},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(6)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 17,
                                                                                                                                 "dst_id": 21}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 358,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 358,
                                                                                                                           "snippet": {"text": "\tif (fd < 0) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "following ‘false’ branch (when ‘fd >= 0’)..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 6},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(7)",
                                                                                      "gcc/analyzer/checker_event/kind": "inlined_call"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 362,
                                                                                                                    "startColumn": 15,
                                                                                                                    "endColumn": 16},
                                                                                                         "contextRegion": {"startLine": 362,
                                                                                                                           "snippet": {"text": "\tsqe = io_uring_get_sqe(&ring);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "inlined call to ‘io_uring_get_sqe’ from ‘test_eventfd_read’"}},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 7},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(8)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/checker_event/original_fndecl": {"index": 0,
                                                                                                                                     "fullyQualifiedName": "test_eventfd_read.part.0"},
                                                                                      "gcc/analyzer/checker_event/original_depth": 1,
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 17,
                                                                                                                                 "dst_id": 21}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "../src/include/liburing.h",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 2040,
                                                                                                                    "startColumn": 16,
                                                                                                                    "endColumn": 39},
                                                                                                         "contextRegion": {"startLine": 2040,
                                                                                                                           "snippet": {"text": "\treturn _io_uring_get_sqe(ring);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "io_uring_get_sqe"}],
                                                                                    "message": {"text": "...to here"},
                                                                                    "id": 0,
                                                                                    "relationships": [{"target": 1,
                                                                                                       "kinds": ["isIncludedBy"]}]},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 8},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(9)",
                                                                                      "gcc/analyzer/checker_event/kind": "call",
                                                                                      "gcc/analyzer/checker_event/original_fndecl": {"index": 0,
                                                                                                                                     "fullyQualifiedName": "test_eventfd_read.part.0"},
                                                                                      "gcc/analyzer/checker_event/original_depth": 1,
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 21,
                                                                                                                                 "dst_id": 22}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "../src/include/liburing.h",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 2040,
                                                                                                                    "startColumn": 16,
                                                                                                                    "endColumn": 39},
                                                                                                         "contextRegion": {"startLine": 2040,
                                                                                                                           "snippet": {"text": "\treturn _io_uring_get_sqe(ring);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "io_uring_get_sqe"}],
                                                                                    "message": {"text": "calling ‘_io_uring_get_sqe’ from ‘test_eventfd_read’"},
                                                                                    "id": 2,
                                                                                    "relationships": [{"target": 1,
                                                                                                       "kinds": ["isIncludedBy"]}]},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 9},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(10)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "../src/include/liburing.h",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 1917,
                                                                                                                    "startColumn": 36,
                                                                                                                    "endColumn": 53},
                                                                                                         "contextRegion": {"startLine": 1917,
                                                                                                                           "snippet": {"text": "IOURINGINLINE struct io_uring_sqe *_io_uring_get_sqe(struct io_uring *ring)\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "_io_uring_get_sqe"}],
                                                                                    "message": {"text": "entry to ‘_io_uring_get_sqe’"},
                                                                                    "id": 3,
                                                                                    "relationships": [{"target": 1,
                                                                                                       "kinds": ["isIncludedBy"]}]},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 10},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(11)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 770,
                                                                                                                                 "dst_id": 772}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "../src/include/liburing.h",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 1924,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 1924,
                                                                                                                           "snippet": {"text": "\tif (tail - head >= sq->ring_entries)\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "_io_uring_get_sqe"}],
                                                                                    "message": {"text": "following ‘false’ branch..."},
                                                                                    "id": 4,
                                                                                    "relationships": [{"target": 1,
                                                                                                       "kinds": ["isIncludedBy"]}]},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 11},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(12)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 770,
                                                                                                                                 "dst_id": 772}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "../src/include/liburing.h",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 1927,
                                                                                                                    "startColumn": 16,
                                                                                                                    "endColumn": 24},
                                                                                                         "contextRegion": {"startLine": 1927,
                                                                                                                           "snippet": {"text": "\tsqe = &sq->sqes[(tail & sq->ring_mask) << io_uring_sqe_shift(ring)];\n"}}},
                                                                                    "logicalLocations": [{"index": 2,
                                                                                                          "fullyQualifiedName": "_io_uring_get_sqe"}],
                                                                                    "message": {"text": "...to here"},
                                                                                    "id": 5,
                                                                                    "relationships": [{"target": 1,
                                                                                                       "kinds": ["isIncludedBy"]}]},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 12},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(13)",
                                                                                      "gcc/analyzer/checker_event/kind": "inlined_call"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 362,
                                                                                                                    "startColumn": 15,
                                                                                                                    "endColumn": 16},
                                                                                                         "contextRegion": {"startLine": 362,
                                                                                                                           "snippet": {"text": "\tsqe = io_uring_get_sqe(&ring);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "inlined call to ‘io_uring_get_sqe’ from ‘test_eventfd_read’"}},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 13},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(14)",
                                                                                      "gcc/analyzer/checker_event/kind": "return",
                                                                                      "gcc/analyzer/checker_event/original_fndecl": {"index": 0,
                                                                                                                                     "fullyQualifiedName": "test_eventfd_read.part.0"},
                                                                                      "gcc/analyzer/checker_event/original_depth": 1},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "../src/include/liburing.h",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 2040,
                                                                                                                    "startColumn": 16,
                                                                                                                    "endColumn": 39},
                                                                                                         "contextRegion": {"startLine": 2040,
                                                                                                                           "snippet": {"text": "\treturn _io_uring_get_sqe(ring);\n"}}},
                                                                                    "logicalLocations": [{"index": 1,
                                                                                                          "fullyQualifiedName": "io_uring_get_sqe"}],
                                                                                    "message": {"text": "returning to ‘test_eventfd_read’ from ‘_io_uring_get_sqe’"},
                                                                                    "id": 6,
                                                                                    "relationships": [{"target": 1,
                                                                                                       "kinds": ["isIncludedBy"]}]},
                                                                       "kinds": ["return",
                                                                                 "function"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 14},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(15)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 29,
                                                                                                                                 "dst_id": 34}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 365,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 365,
                                                                                                                           "snippet": {"text": "\tif (ret != 1) {\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "following ‘false’ branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 15},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(16)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 29,
                                                                                                                                 "dst_id": 34}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 369,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 27},
                                                                                                         "contextRegion": {"startLine": 369,
                                                                                                                           "snippet": {"text": "\tfdinfo_read(&ring);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "false"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 16},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(17)",
                                                                                      "gcc/analyzer/checker_event/kind": "call",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 34,
                                                                                                                                 "dst_id": 35}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 369,
                                                                                                                    "startColumn": 9,
                                                                                                                    "endColumn": 27},
                                                                                                         "contextRegion": {"startLine": 369,
                                                                                                                           "snippet": {"text": "\tfdinfo_read(&ring);\n"}}},
                                                                                    "logicalLocations": [{"index": 0,
                                                                                                          "fullyQualifiedName": "test_eventfd_read.part.0"}],
                                                                                    "message": {"text": "calling ‘fdinfo_read’ from ‘test_eventfd_read’"}},
                                                                       "kinds": ["call",
                                                                                 "function"],
                                                                       "nestingLevel": 1,
                                                                       "executionOrder": 17},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(18)",
                                                                                      "gcc/analyzer/checker_event/kind": "function_entry"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 27,
                                                                                                                    "startColumn": 13,
                                                                                                                    "endColumn": 24},
                                                                                                         "contextRegion": {"startLine": 27,
                                                                                                                           "snippet": {"text": "static void fdinfo_read(struct io_uring *ring)\n"}}},
                                                                                    "logicalLocations": [{"index": 5,
                                                                                                          "fullyQualifiedName": "fdinfo_read"}],
                                                                                    "message": {"text": "entry to ‘fdinfo_read’"}},
                                                                       "kinds": ["enter",
                                                                                 "function"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 18},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(19)",
                                                                                      "gcc/analyzer/checker_event/kind": "state_change"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 33,
                                                                                                                    "startColumn": 15,
                                                                                                                    "endColumn": 27},
                                                                                                         "contextRegion": {"startLine": 33,
                                                                                                                           "snippet": {"text": "\tbuf = malloc(4096);\n"}}},
                                                                                    "logicalLocations": [{"index": 5,
                                                                                                          "fullyQualifiedName": "fdinfo_read"}],
                                                                                    "message": {"text": "allocated here"}},
                                                                       "kinds": ["acquire",
                                                                                 "memory"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 19},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(20)",
                                                                                      "gcc/analyzer/checker_event/kind": "start_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 679,
                                                                                                                                 "dst_id": 680}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 37,
                                                                                                                    "startColumn": 12,
                                                                                                                    "endColumn": 13},
                                                                                                         "contextRegion": {"startLine": 37,
                                                                                                                           "snippet": {"text": "\tif (fd < 0) {\n"}}},
                                                                                    "logicalLocations": [{"index": 5,
                                                                                                          "fullyQualifiedName": "fdinfo_read"}],
                                                                                    "message": {"text": "following ‘true’ branch..."}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 20},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(21)",
                                                                                      "gcc/analyzer/checker_event/kind": "end_cfg_edge",
                                                                                      "gcc/analyzer/superedge_event/superedge": {"src_id": 679,
                                                                                                                                 "dst_id": 680}},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 38,
                                                                                                                    "startColumn": 17,
                                                                                                                    "endColumn": 31},
                                                                                                         "contextRegion": {"startLine": 38,
                                                                                                                           "snippet": {"text": "\t\tperror(\"open\");\n"}}},
                                                                                    "logicalLocations": [{"index": 5,
                                                                                                          "fullyQualifiedName": "fdinfo_read"}],
                                                                                    "message": {"text": "...to here"}},
                                                                       "kinds": ["branch",
                                                                                 "true"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 21},
                                                                      {"properties": {"gcc/analyzer/checker_event/emission_id": "(22)",
                                                                                      "gcc/analyzer/checker_event/kind": "warning"},
                                                                       "location": {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                                                              "uriBaseId": "PWD"},
                                                                                                         "region": {"startLine": 56,
                                                                                                                    "startColumn": 1,
                                                                                                                    "endColumn": 2},
                                                                                                         "contextRegion": {"startLine": 56,
                                                                                                                           "snippet": {"text": "}\n"}}},
                                                                                    "logicalLocations": [{"index": 5,
                                                                                                          "fullyQualifiedName": "fdinfo_read"}],
                                                                                    "message": {"text": "‘buf’ leaks here; was allocated at [(19)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/18)"}},
                                                                       "kinds": ["danger"],
                                                                       "nestingLevel": 2,
                                                                       "executionOrder": 22}]}]}],
                        "relatedLocations": [{"physicalLocation": {"artifactLocation": {"uri": "helpers.h",
                                                                                        "uriBaseId": "PWD"},
                                                                   "region": {"startLine": 12},
                                                                   "contextRegion": {"startLine": 12,
                                                                                     "snippet": {"text": "#include \"liburing.h\"\n"}}},
                                              "relationships": [{"target": 0,
                                                                 "kinds": ["includes"]},
                                                                {"target": 2,
                                                                 "kinds": ["includes"]},
                                                                {"target": 3,
                                                                 "kinds": ["includes"]},
                                                                {"target": 4,
                                                                 "kinds": ["includes"]},
                                                                {"target": 5,
                                                                 "kinds": ["includes"]},
                                                                {"target": 6,
                                                                 "kinds": ["includes"]},
                                                                {"target": 7,
                                                                 "kinds": ["isIncludedBy"]}],
                                              "id": 1},
                                             {"physicalLocation": {"artifactLocation": {"uri": "fdinfo.c",
                                                                                        "uriBaseId": "PWD"},
                                                                   "region": {"startLine": 16},
                                                                   "contextRegion": {"startLine": 16,
                                                                                     "snippet": {"text": "#include \"helpers.h\"\n"}}},
                                              "relationships": [{"target": 1,
                                                                 "kinds": ["includes"]}],
                                              "id": 7}]}],
           "logicalLocations": [{"name": "test_eventfd_read.part.0",
                                 "fullyQualifiedName": "test_eventfd_read.part.0",
                                 "decoratedName": "test_eventfd_read.part.0",
                                 "kind": "function",
                                 "index": 0},
                                {"name": "io_uring_get_sqe",
                                 "fullyQualifiedName": "io_uring_get_sqe",
                                 "decoratedName": "io_uring_get_sqe",
                                 "kind": "function",
                                 "index": 1},
                                {"name": "_io_uring_get_sqe",
                                 "fullyQualifiedName": "_io_uring_get_sqe",
                                 "decoratedName": "_io_uring_get_sqe",
                                 "kind": "function",
                                 "index": 2},
                                {"name": "io_uring_prep_read",
                                 "fullyQualifiedName": "io_uring_prep_read",
                                 "decoratedName": "io_uring_prep_read",
                                 "kind": "function",
                                 "index": 3},
                                {"name": "io_uring_prep_rw",
                                 "fullyQualifiedName": "io_uring_prep_rw",
                                 "decoratedName": "io_uring_prep_rw",
                                 "kind": "function",
                                 "index": 4},
                                {"name": "fdinfo_read",
                                 "fullyQualifiedName": "fdinfo_read",
                                 "decoratedName": "fdinfo_read",
                                 "kind": "function",
                                 "index": 5}]}]}
