map[SimplifiedCRepro:// autogenerated by syzkaller (https://github.com/google/syzkaller)
#define _GNU_SOURCE
#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#define BITMASK(bf_off,bf_len) (((1ull << (bf_len)) - 1) << (bf_off))
#define STORE_BY_BITMASK(type,htobe,addr,val,bf_off,bf_len) *(type*)(addr) = htobe((htobe(*(type*)(addr)) & ~BITMASK((bf_off), (bf_len))) | (((type)(val) << (bf_off)) & BITMASK((bf_off), (bf_len))))
int main(void)
{
syscall(__NR_mmap, /*addr=*/0x1ffffffff000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
syscall(__NR_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000ul, /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/7ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
syscall(__NR_mmap, /*addr=*/0x200001000000ul, /*len=*/0x1000ul, /*prot=*/0ul, /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/0x32ul, /*fd=*/(intptr_t)-1, /*offset=*/0ul);
const char* reason;
(void)reason;
if (write(1, "executing program\n", sizeof("executing program\n") - 1)) {}
// perf_event_open arguments: [
// attr: ptr[in, perf_event_attr] {
// perf_event_attr {
// type: perf_event_type = 0x1 (4 bytes)
// size: len = 0x80 (4 bytes)
// config0: int8 = 0x0 (1 bytes)
// config1: int8 = 0x0 (1 bytes)
// config2: int8 = 0x0 (1 bytes)
// config3: int8 = 0x0 (1 bytes)
// config4: const = 0x0 (4 bytes)
// sample_freq: int64 = 0x4d31 (8 bytes)
// sample_type: perf_sample_type = 0x0 (8 bytes)
// read_format: perf_read_format = 0x0 (8 bytes)
// disabled: int64 = 0x0 (0 bytes)
// inherit: int64 = 0x0 (0 bytes)
// pinned: int64 = 0x0 (0 bytes)
// exclusive: int64 = 0x0 (0 bytes)
// exclude_user: int64 = 0x0 (0 bytes)
// exclude_kernel: int64 = 0x0 (0 bytes)
// exclude_hv: int64 = 0x0 (0 bytes)
// exclude_idle: int64 = 0x0 (0 bytes)
// mmap: int64 = 0x0 (0 bytes)
// comm: int64 = 0x0 (0 bytes)
// freq: int64 = 0x0 (0 bytes)
// inherit_stat: int64 = 0x0 (0 bytes)
// enable_on_exec: int64 = 0x0 (0 bytes)
// task: int64 = 0x0 (0 bytes)
// watermark: int64 = 0x0 (0 bytes)
// precise_ip: int64 = 0x0 (0 bytes)
// mmap_data: int64 = 0x0 (0 bytes)
// sample_id_all: int64 = 0x0 (0 bytes)
// exclude_host: int64 = 0x0 (0 bytes)
// exclude_guest: int64 = 0x0 (0 bytes)
// exclude_callchain_kernel: int64 = 0x0 (0 bytes)
// exclude_callchain_user: int64 = 0x0 (0 bytes)
// mmap2: int64 = 0x0 (0 bytes)
// comm_exec: int64 = 0x0 (0 bytes)
// use_clockid: int64 = 0x0 (0 bytes)
// context_switch: int64 = 0x0 (0 bytes)
// write_backward: int64 = 0x0 (0 bytes)
// namespaces: int64 = 0x0 (0 bytes)
// ksymbol: int64 = 0x0 (0 bytes)
// bpf_event: int64 = 0x0 (0 bytes)
// aux_output: int64 = 0x0 (0 bytes)
// cgroup: int64 = 0x0 (0 bytes)
// text_poke: int64 = 0x0 (0 bytes)
// build_id: int64 = 0x0 (0 bytes)
// inherit_thread: int64 = 0x0 (0 bytes)
// remove_on_exec: int64 = 0x0 (0 bytes)
// sigtrap: int64 = 0x0 (0 bytes)
// __reserved_1: const = 0x0 (8 bytes)
// wakeup_events: int32 = 0x0 (4 bytes)
// bp_type: perf_bp_type = 0x4 (4 bytes)
// bp_config: union perf_bp_config {
// perf_config_ext: perf_config_ext {
// config1: int64 = 0x8 (8 bytes)
// config2: int64 = 0x830d (8 bytes)
// }
// }
// branch_sample_type: perf_branch_sample_type = 0x0 (8 bytes)
// sample_regs_user: int64 = 0x2 (8 bytes)
// sample_stack_user: int32 = 0xfffffffe (4 bytes)
// clockid: clock_type = 0x0 (4 bytes)
// sample_regs_intr: int64 = 0x0 (8 bytes)
// aux_watermark: int32 = 0x0 (4 bytes)
// sample_max_stack: int16 = 0x0 (2 bytes)
// __reserved_2: const = 0x0 (2 bytes)
// aux_sample_size: int32 = 0x0 (4 bytes)
// __reserved_3: const = 0x0 (4 bytes)
// sig_data: int64 = 0x0 (8 bytes)
// }
// }
// pid: pid (resource)
// cpu: intptr = 0xffffffffffffffff (8 bytes)
// group: fd_perf (resource)
// flags: perf_flags = 0x2 (8 bytes)
// ]
// returns fd_perf
*(uint32_t*)0x2000000003c0 = 1;
*(uint32_t*)0x2000000003c4 = 0x80;
*(uint8_t*)0x2000000003c8 = 0;
*(uint8_t*)0x2000000003c9 = 0;
*(uint8_t*)0x2000000003ca = 0;
*(uint8_t*)0x2000000003cb = 0;
*(uint32_t*)0x2000000003cc = 0;
*(uint64_t*)0x2000000003d0 = 0x4d31;
*(uint64_t*)0x2000000003d8 = 0;
*(uint64_t*)0x2000000003e0 = 0;
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 0, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 1, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 2, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 3, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 4, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 5, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 6, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 7, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 8, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 9, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 10, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 11, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 12, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 13, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 14, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 15, 2);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 17, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 18, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 19, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 20, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 21, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 22, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 23, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 24, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 25, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 26, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 27, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 28, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 29, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 30, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 31, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 32, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 33, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 34, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 35, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 36, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 37, 1);
STORE_BY_BITMASK(uint64_t, , 0x2000000003e8, 0, 38, 26);
*(uint32_t*)0x2000000003f0 = 0;
*(uint32_t*)0x2000000003f4 = 4;
*(uint64_t*)0x2000000003f8 = 8;
*(uint64_t*)0x200000000400 = 0x830d;
*(uint64_t*)0x200000000408 = 0;
*(uint64_t*)0x200000000410 = 2;
*(uint32_t*)0x200000000418 = 0xfffffffe;
*(uint32_t*)0x20000000041c = 0;
*(uint64_t*)0x200000000420 = 0;
*(uint32_t*)0x200000000428 = 0;
*(uint16_t*)0x20000000042c = 0;
*(uint16_t*)0x20000000042e = 0;
*(uint32_t*)0x200000000430 = 0;
*(uint32_t*)0x200000000434 = 0;
*(uint64_t*)0x200000000438 = 0;
syscall(__NR_perf_event_open, /*attr=*/0x2000000003c0ul, /*pid=*/0, /*cpu=*/(intptr_t)-1, /*group=*/(intptr_t)-1, /*flags=PERF_FLAG_FD_OUTPUT*/2ul);
// perf_event_open arguments: [
// attr: ptr[in, perf_event_attr] {
// perf_event_attr {
// type: perf_event_type = 0x1 (4 bytes)
// size: len = 0x80 (4 bytes)
// config0: int8 = 0x2 (1 bytes)
// config1: int8 = 0x0 (1 bytes)
// config2: int8 = 0x0 (1 bytes)
// config3: int8 = 0x0 (1 bytes)
// config4: const = 0x0 (4 bytes)
// sample_freq: int64 = 0x20 (8 bytes)
// sample_type: perf_sample_type = 0x12504 (8 bytes)
// read_format: perf_read_format = 0x0 (8 bytes)
// disabled: int64 = 0x0 (0 bytes)
// inherit: int64 = 0x0 (0 bytes)
// pinned: int64 = 0x0 (0 bytes)
// exclusive: int64 = 0x0 (0 bytes)
// exclude_user: int64 = 0x0 (0 bytes)
// exclude_kernel: int64 = 0x0 (0 bytes)
// exclude_hv: int64 = 0x0 (0 bytes)
// exclude_idle: int64 = 0x0 (0 bytes)
// mmap: int64 = 0x0 (0 bytes)
// comm: int64 = 0x0 (0 bytes)
// freq: int64 = 0x0 (0 bytes)
// inherit_stat: int64 = 0x0 (0 bytes)
// enable_on_exec: int64 = 0x0 (0 bytes)
// task: int64 = 0x0 (0 bytes)
// watermark: int64 = 0x0 (0 bytes)
// precise_ip: int64 = 0x0 (0 bytes)
// mmap_data: int64 = 0x0 (0 bytes)
// sample_id_all: int64 = 0x0 (0 bytes)
// exclude_host: int64 = 0x0 (0 bytes)
// exclude_guest: int64 = 0x0 (0 bytes)
// exclude_callchain_kernel: int64 = 0x0 (0 bytes)
// exclude_callchain_user: int64 = 0x0 (0 bytes)
// mmap2: int64 = 0x0 (0 bytes)
// comm_exec: int64 = 0x0 (0 bytes)
// use_clockid: int64 = 0x0 (0 bytes)
// context_switch: int64 = 0x0 (0 bytes)
// write_backward: int64 = 0x0 (0 bytes)
// namespaces: int64 = 0x0 (0 bytes)
// ksymbol: int64 = 0x0 (0 bytes)
// bpf_event: int64 = 0x0 (0 bytes)
// aux_output: int64 = 0x0 (0 bytes)
// cgroup: int64 = 0x0 (0 bytes)
// text_poke: int64 = 0x0 (0 bytes)
// build_id: int64 = 0x0 (0 bytes)
// inherit_thread: int64 = 0x0 (0 bytes)
// remove_on_exec: int64 = 0x1 (0 bytes)
// sigtrap: int64 = 0x1 (0 bytes)
// __reserved_1: const = 0x0 (8 bytes)
// wakeup_events: int32 = 0x4 (4 bytes)
// bp_type: perf_bp_type = 0x0 (4 bytes)
// bp_config: union perf_bp_config {
// perf_bp: perf_bp {
// bp_addr: nil
// bp_len: perf_bp_lens = 0x8 (8 bytes)
// }
// }
// branch_sample_type: perf_branch_sample_type = 0x7602 (8 bytes)
// sample_regs_user: int64 = 0x5 (8 bytes)
// sample_stack_user: int32 = 0x0 (4 bytes)
// clockid: clock_type = 0x0 (4 bytes)
// sample_regs_intr: int64 = 0x0 (8 bytes)
// aux_watermark: int32 = 0x6 (4 bytes)
// sample_max_stack: int16 = 0x0 (2 bytes)
// __reserved_2: const = 0x0 (2 bytes)
// aux_sample_size: int32 = 0x0 (4 bytes)
// __reserved_3: const = 0x0 (4 bytes)
// sig_data: int64 = 0x0 (8 bytes)
// }
// }
// pid: pid (resource)
// cpu: intptr = 0xffffffffffffffff (8 bytes)
// group: fd_perf (resource)
// flags: perf_flags = 0x2 (8 bytes)
// ]
// returns fd_perf
*(uint32_t*)0x200000000000 = 1;
*(uint32_t*)0x200000000004 = 0x80;
*(uint8_t*)0x200000000008 = 2;
*(uint8_t*)0x200000000009 = 0;
*(uint8_t*)0x20000000000a = 0;
*(uint8_t*)0x20000000000b = 0;
*(uint32_t*)0x20000000000c = 0;
*(uint64_t*)0x200000000010 = 0x20;
*(uint64_t*)0x200000000018 = 0x12504;
*(uint64_t*)0x200000000020 = 0;
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 0, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 1, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 2, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 3, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 4, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 5, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 6, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 7, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 8, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 9, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 10, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 11, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 12, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 13, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 14, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 15, 2);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 17, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 18, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 19, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 20, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 21, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 22, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 23, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 24, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 25, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 26, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 27, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 28, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 29, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 30, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 31, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 32, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 33, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 34, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 35, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 1, 36, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 1, 37, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000028, 0, 38, 26);
*(uint32_t*)0x200000000030 = 4;
*(uint32_t*)0x200000000034 = 0;
*(uint64_t*)0x200000000038 = 0;
*(uint64_t*)0x200000000040 = 8;
*(uint64_t*)0x200000000048 = 0x7602;
*(uint64_t*)0x200000000050 = 5;
*(uint32_t*)0x200000000058 = 0;
*(uint32_t*)0x20000000005c = 0;
*(uint64_t*)0x200000000060 = 0;
*(uint32_t*)0x200000000068 = 6;
*(uint16_t*)0x20000000006c = 0;
*(uint16_t*)0x20000000006e = 0;
*(uint32_t*)0x200000000070 = 0;
*(uint32_t*)0x200000000074 = 0;
*(uint64_t*)0x200000000078 = 0;
syscall(__NR_perf_event_open, /*attr=*/0x200000000000ul, /*pid=*/0, /*cpu=*/(intptr_t)-1, /*group=*/(intptr_t)-1, /*flags=PERF_FLAG_FD_OUTPUT*/2ul);
// perf_event_open arguments: [
// attr: ptr[in, perf_event_attr] {
// perf_event_attr {
// type: perf_event_type = 0x2 (4 bytes)
// size: len = 0x80 (4 bytes)
// config0: int8 = 0xec (1 bytes)
// config1: int8 = 0x0 (1 bytes)
// config2: int8 = 0x0 (1 bytes)
// config3: int8 = 0x0 (1 bytes)
// config4: const = 0x0 (4 bytes)
// sample_freq: int64 = 0x0 (8 bytes)
// sample_type: perf_sample_type = 0x2101 (8 bytes)
// read_format: perf_read_format = 0x0 (8 bytes)
// disabled: int64 = 0x0 (0 bytes)
// inherit: int64 = 0x0 (0 bytes)
// pinned: int64 = 0x0 (0 bytes)
// exclusive: int64 = 0x0 (0 bytes)
// exclude_user: int64 = 0x0 (0 bytes)
// exclude_kernel: int64 = 0x0 (0 bytes)
// exclude_hv: int64 = 0x0 (0 bytes)
// exclude_idle: int64 = 0x0 (0 bytes)
// mmap: int64 = 0x0 (0 bytes)
// comm: int64 = 0x0 (0 bytes)
// freq: int64 = 0x0 (0 bytes)
// inherit_stat: int64 = 0x0 (0 bytes)
// enable_on_exec: int64 = 0x0 (0 bytes)
// task: int64 = 0x0 (0 bytes)
// watermark: int64 = 0x0 (0 bytes)
// precise_ip: int64 = 0x0 (0 bytes)
// mmap_data: int64 = 0x0 (0 bytes)
// sample_id_all: int64 = 0x0 (0 bytes)
// exclude_host: int64 = 0x0 (0 bytes)
// exclude_guest: int64 = 0x0 (0 bytes)
// exclude_callchain_kernel: int64 = 0x0 (0 bytes)
// exclude_callchain_user: int64 = 0x0 (0 bytes)
// mmap2: int64 = 0x0 (0 bytes)
// comm_exec: int64 = 0x0 (0 bytes)
// use_clockid: int64 = 0x0 (0 bytes)
// context_switch: int64 = 0x0 (0 bytes)
// write_backward: int64 = 0x0 (0 bytes)
// namespaces: int64 = 0x0 (0 bytes)
// ksymbol: int64 = 0x0 (0 bytes)
// bpf_event: int64 = 0x0 (0 bytes)
// aux_output: int64 = 0x0 (0 bytes)
// cgroup: int64 = 0x0 (0 bytes)
// text_poke: int64 = 0x0 (0 bytes)
// build_id: int64 = 0x0 (0 bytes)
// inherit_thread: int64 = 0x0 (0 bytes)
// remove_on_exec: int64 = 0x0 (0 bytes)
// sigtrap: int64 = 0x0 (0 bytes)
// __reserved_1: const = 0x0 (8 bytes)
// wakeup_events: int32 = 0x0 (4 bytes)
// bp_type: perf_bp_type = 0x4 (4 bytes)
// bp_config: union perf_bp_config {
// perf_bp: perf_bp {
// bp_addr: nil
// bp_len: perf_bp_lens = 0x1 (8 bytes)
// }
// }
// branch_sample_type: perf_branch_sample_type = 0x828 (8 bytes)
// sample_regs_user: int64 = 0x0 (8 bytes)
// sample_stack_user: int32 = 0x0 (4 bytes)
// clockid: clock_type = 0x0 (4 bytes)
// sample_regs_intr: int64 = 0x9 (8 bytes)
// aux_watermark: int32 = 0x800000 (4 bytes)
// sample_max_stack: int16 = 0x0 (2 bytes)
// __reserved_2: const = 0x0 (2 bytes)
// aux_sample_size: int32 = 0x0 (4 bytes)
// __reserved_3: const = 0x0 (4 bytes)
// sig_data: int64 = 0x40 (8 bytes)
// }
// }
// pid: pid (resource)
// cpu: intptr = 0xffffffffffffffff (8 bytes)
// group: fd_perf (resource)
// flags: perf_flags = 0x0 (8 bytes)
// ]
// returns fd_perf
*(uint32_t*)0x200000000040 = 2;
*(uint32_t*)0x200000000044 = 0x80;
*(uint8_t*)0x200000000048 = 0xec;
*(uint8_t*)0x200000000049 = 0;
*(uint8_t*)0x20000000004a = 0;
*(uint8_t*)0x20000000004b = 0;
*(uint32_t*)0x20000000004c = 0;
*(uint64_t*)0x200000000050 = 0;
*(uint64_t*)0x200000000058 = 0x2101;
*(uint64_t*)0x200000000060 = 0;
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 0, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 1, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 2, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 3, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 4, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 5, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 6, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 7, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 8, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 9, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 10, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 11, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 12, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 13, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 14, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 15, 2);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 17, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 18, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 19, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 20, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 21, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 22, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 23, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 24, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 25, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 26, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 27, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 28, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 29, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 30, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 31, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 32, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 33, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 34, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 35, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 36, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 37, 1);
STORE_BY_BITMASK(uint64_t, , 0x200000000068, 0, 38, 26);
*(uint32_t*)0x200000000070 = 0;
*(uint32_t*)0x200000000074 = 4;
*(uint64_t*)0x200000000078 = 0;
*(uint64_t*)0x200000000080 = 1;
*(uint64_t*)0x200000000088 = 0x828;
*(uint64_t*)0x200000000090 = 0;
*(uint32_t*)0x200000000098 = 0;
*(uint32_t*)0x20000000009c = 0;
*(uint64_t*)0x2000000000a0 = 9;
*(uint32_t*)0x2000000000a8 = 0x800000;
*(uint16_t*)0x2000000000ac = 0;
*(uint16_t*)0x2000000000ae = 0;
*(uint32_t*)0x2000000000b0 = 0;
*(uint32_t*)0x2000000000b4 = 0;
*(uint64_t*)0x2000000000b8 = 0x40;
syscall(__NR_perf_event_open, /*attr=*/0x200000000040ul, /*pid=*/0, /*cpu=*/(intptr_t)-1, /*group=*/(intptr_t)-1, /*flags=*/0ul);
// perf_event_open arguments: [
// attr: nil
// pid: pid (resource)
// cpu: intptr = 0x1 (8 bytes)
// group: fd_perf (resource)
// flags: perf_flags = 0x0 (8 bytes)
// ]
// returns fd_perf
syscall(__NR_perf_event_open, /*attr=*/0ul, /*pid=*/0, /*cpu=*/1ul, /*group=*/(intptr_t)-1, /*flags=*/0ul);
return 0;
}
]