I'm trying to understand following inline assembly code, it took from https://elixir.bootlin.com/linux/v3.16.82/source/arch/x86/include/asm/checksum_32.h at line 114
how it works please....
static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
                    unsigned short len, unsigned short proto,           __wsum sum)
{
    asm("addl %1, %0    ;\n"
        "adcl %2, %0    ;\n"
        "adcl %3, %0    ;\n"
        "adcl $0, %0    ;\n"
        : "=r" (sum)
        : "g" (daddr), "g"(saddr),
          "g" ((len + proto) << 8), "0" (sum));
    return sum;
}