Skip to content

Instantly share code, notes, and snippets.

View XanClic's full-sized avatar

Hanna Czenczek XanClic

View GitHub Profile
0000000000000000 <matrix_mul>:
matrix_mul():
0: c5 f8 28 1f vmovaps xmm3,XMMWORD PTR [rdi]
4: c4 e2 79 18 36 vbroadcastss xmm6,DWORD PTR [rsi]
9: c4 e2 79 18 6e 04 vbroadcastss xmm5,DWORD PTR [rsi+0x4]
f: c5 f8 28 57 10 vmovaps xmm2,XMMWORD PTR [rdi+0x10]
14: c4 e2 79 18 7e 0c vbroadcastss xmm7,DWORD PTR [rsi+0xc]
1a: c5 f8 28 4f 20 vmovaps xmm1,XMMWORD PTR [rdi+0x20]
1f: c4 e2 79 18 66 08 vbroadcastss xmm4,DWORD PTR [rsi+0x8]
25: c5 f8 28 47 30 vmovaps xmm0,XMMWORD PTR [rdi+0x30]
@XanClic
XanClic / test.c
Last active February 5, 2021 14:23
#define _POSIX_C_SOURCE 200809l
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
static void handler(int signum)
{
#!/usr/bin/ruby
diff = `git show`.lines.map { |l| l.sub("\n", '') }
file = nil
range = nil
removed = []
added = []
diff.each do |line|
if line.start_with?('diff ')
use std::collections::HashMap;
trait Descend {
fn descend(&self, key: &str, rem_path: Option<&str>) -> String;
}
impl Descend for HashMap<String, String> {
fn descend(&self, key: &str, rem_path: Option<&str>) -> String {
let obj = &self[key];
#!/bin/bash
cp -L $1 /tmp/diff-helper-1
cp -L $2 /tmp/diff-helper-2
kompare /tmp/diff-helper-{1,2} &> /dev/null
rm /tmp/diff-helper-{1,2}
#include <stdint.h>
#include <stdio.h>
#include <callback.h>
static void fn(void *x, va_alist alist)
{
va_start_void(alist);
printf("%i %i\n", (int)(uintptr_t)x, va_arg_int(alist));
va_return_void(alist);
}
#include <stdint.h>
#include <stdio.h>
#include <trampoline.h>
static void *i;
static int fn(void)
{
printf("%i\n", (int)(uintptr_t)i);
return 0;
#include <pthread.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
static uint64_t loop_counter;
static bool drop_out;
uint32_t xbegin(void)
#include <pthread.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
static uint64_t loop_counter;
static bool drop_out;
uint32_t xbegin(void)
format ELF64
public main
extrn printf
extrn pthread_create
extrn pthread_exit
use64
section '.text' executable