int main(int argc, char **argv) {
  if (ushift_53_i(0x12345678) != ((__uint128_t)(unsigned int)0x12345678 << 53))
    abort();
  if (shift_53_i(0x12345678) != ((__uint128_t)(signed int)0x12345678 << 53))
    abort();
  if (ushift_53_i(0xcafecafe) != ((__uint128_t)(unsigned int)0xcafecafe << 53))
    abort();
  if (shift_53_i(0xcafecafe) != ((__uint128_t)(signed int)0xcafecafe << 53))
    abort();
  if (ushift_3_ll(0x1234567890abcdefLL) !=
      ((__uint128_t)(unsigned long long)0x1234567890abcdefLL << 3))
    abort();
  if (shift_3_ll(0x1234567890abcdefLL) !=
      ((__uint128_t)(signed long long)0x1234567890abcdefLL << 3))
    abort();
  if (ushift_13_ll(0x1234567890abcdefLL) !=
      ((__uint128_t)(unsigned long long)0x1234567890abcdefLL << 13))
    abort();
  if (shift_13_ll(0x1234567890abcdefLL) !=
      ((__uint128_t)(signed long long)0x1234567890abcdefLL << 13))
    abort();
  if (ushift_53_ll(0x1234567890abcdefLL) !=
      ((__uint128_t)(unsigned long long)0x1234567890abcdefLL << 53))
    abort();
  if (shift_53_ll(0x1234567890abcdefLL) !=
      ((__uint128_t)(signed long long)0x1234567890abcdefLL << 53))
    abort();
  if (ushift_3_ll(0xcafecafedeaddeadLL) !=
      ((__uint128_t)(unsigned long long)0xcafecafedeaddeadLL << 3))
    abort();
  if (shift_3_ll(0xcafecafedeaddeadLL) !=
      ((__uint128_t)(signed long long)0xcafecafedeaddeadLL << 3))
    abort();
  if (ushift_13_ll(0xcafecafedeaddeadLL) !=
      ((__uint128_t)(unsigned long long)0xcafecafedeaddeadLL << 13))
    abort();
  if (shift_13_ll(0xcafecafedeaddeadLL) !=
      ((__uint128_t)(signed long long)0xcafecafedeaddeadLL << 13))
    abort();
  if (ushift_53_ll(0xcafecafedeaddeadLL) !=
      ((__uint128_t)(unsigned long long)0xcafecafedeaddeadLL << 53))
    abort();
  if (shift_53_ll(0xcafecafedeaddeadLL) !=
      ((__uint128_t)(signed long long)0xcafecafedeaddeadLL << 53))
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    $0x12345678,%edi
call   10b0 <ushift_53_i@plt>
cltq
mov    %rax,%rcx
sar    $0x3f,%rcx
movabs $0xcf00000000000000,%rdx
xor    %rdx,%rax
xor    $0x2468a,%rcx
or     %rcx,%rax
je     11e2 <main+0x52>
jmp    11dd <main+0x4d>
call   1040 <abort@plt>
xor    %eax,%eax
mov    $0x12345678,%edi
call   10a0 <shift_53_i@plt>
cltq
mov    %rax,%rcx
sar    $0x3f,%rcx
movabs $0xcf00000000000000,%rdx
xor    %rdx,%rax
xor    $0x2468a,%rcx
or     %rcx,%rax
je     121e <main+0x8e>
jmp    1219 <main+0x89>
call   1040 <abort@plt>
xor    %eax,%eax
mov    $0xcafecafe,%edi
call   10b0 <ushift_53_i@plt>
cltq
mov    %rax,%rcx
sar    $0x3f,%rcx
movabs $0x5fc0000000000000,%rdx
xor    %rdx,%rax
xor    $0x195fd9,%rcx
or     %rcx,%rax
je     125a <main+0xca>
jmp    1255 <main+0xc5>
call   1040 <abort@plt>
xor    %eax,%eax
mov    $0xcafecafe,%edi
call   10a0 <shift_53_i@plt>
cltq
mov    %rax,%rcx
sar    $0x3f,%rcx
movabs $0x5fc0000000000000,%rdx
xor    %rdx,%rax
xor    $0xfffffffffff95fd9,%rcx
or     %rcx,%rax
je     1296 <main+0x106>
jmp    1291 <main+0x101>
call   1040 <abort@plt>
xor    %eax,%eax
movabs $0x1234567890abcdef,%rdi
56 34 12
call   1080 <ushift_3_ll@plt>
cltq
mov    %rax,%rcx
sar    $0x3f,%rcx
movabs $0x91a2b3c4855e6f78,%rdx
b3 a2 91
xor    %rdx,%rax
or     %rcx,%rax
je     12d0 <main+0x140>
jmp    12cb <main+0x13b>
call   1040 <abort@plt>
xor    %eax,%eax
movabs $0x1234567890abcdef,%rdi
56 34 12
call   1030 <shift_3_ll@plt>
cltq
mov    %rax,%rcx
sar    $0x3f,%rcx
movabs $0x91a2b3c4855e6f78,%rdx
b3 a2 91
xor    %rdx,%rax
or     %rcx,%rax
je     130a <main+0x17a>
jmp    1305 <main+0x175>
call   1040 <abort@plt>
xor    %eax,%eax
movabs $0x1234567890abcdef,%rdi
56 34 12
call   1090 <ushift_13_ll@plt>
cltq
mov    %rax,%rcx
sar    $0x3f,%rcx
movabs $0x8acf121579bde000,%rdx
12 cf 8a
xor    %rdx,%rax
xor    $0x246,%rcx
or     %rcx,%rax
je     134b <main+0x1bb>
jmp    1346 <main+0x1b6>
call   1040 <abort@plt>
xor    %eax,%eax
movabs $0x1234567890abcdef,%rdi
56 34 12
call   1060 <shift_13_ll@plt>
cltq
mov    %rax,%rcx
sar    $0x3f,%rcx
movabs $0x8acf121579bde000,%rdx
12 cf 8a
xor    %rdx,%rax
xor    $0x246,%rcx
or     %rcx,%rax
je     138c <main+0x1fc>
jmp    1387 <main+0x1f7>
call   1040 <abort@plt>
xor    %eax,%eax
movabs $0x1234567890abcdef,%rdi
56 34 12
call   1070 <ushift_53_ll@plt>
cltq
mov    %rax,%rcx
sar    $0x3f,%rcx
movabs $0xbde0000000000000,%rdx
xor    %rdx,%rax
movabs $0x2468acf121579,%rdx
xor    %rdx,%rcx
or     %rcx,%rax
je     13d3 <main+0x243>
jmp    13ce <main+0x23e>
call   1040 <abort@plt>
xor    %eax,%eax
movabs $0x1234567890abcdef,%rdi
56 34 12
call   1050 <shift_53_ll@plt>
cltq
mov    %rax,%rcx
sar    $0x3f,%rcx
movabs $0xbde0000000000000,%rdx
xor    %rdx,%rax
movabs $0x2468acf121579,%rdx
xor    %rdx,%rcx
or     %rcx,%rax
je     141a <main+0x28a>
jmp    1415 <main+0x285>
call   1040 <abort@plt>
xor    %eax,%eax
movabs $0xcafecafedeaddead,%rdi
ca fe ca
call   1080 <ushift_3_ll@plt>
cltq
mov    %rax,%rcx
sar    $0x3f,%rcx
movabs $0x57f657f6f56ef568,%rdx
57 f6 57
xor    %rdx,%rax
xor    $0x6,%rcx
or     %rcx,%rax
je     1458 <main+0x2c8>
jmp    1453 <main+0x2c3>
call   1040 <abort@plt>
xor    %eax,%eax
movabs $0xcafecafedeaddead,%rdi
ca fe ca
call   1030 <shift_3_ll@plt>
cltq
mov    %rax,%rcx
sar    $0x3f,%rcx
movabs $0x57f657f6f56ef568,%rdx
57 f6 57
xor    %rdx,%rax
xor    $0xfffffffffffffffe,%rcx
or     %rcx,%rax
je     1496 <main+0x306>
jmp    1491 <main+0x301>
call   1040 <abort@plt>
xor    %eax,%eax
movabs $0xcafecafedeaddead,%rdi
ca fe ca
call   1090 <ushift_13_ll@plt>
cltq
mov    %rax,%rcx
sar    $0x3f,%rcx
movabs $0xd95fdbd5bbd5a000,%rdx
db 5f d9
xor    %rdx,%rax
xor    $0x195f,%rcx
or     %rcx,%rax
je     14d7 <main+0x347>
jmp    14d2 <main+0x342>
call   1040 <abort@plt>
xor    %eax,%eax
movabs $0xcafecafedeaddead,%rdi
ca fe ca
call   1060 <shift_13_ll@plt>
cltq
mov    %rax,%rcx
sar    $0x3f,%rcx
movabs $0xd95fdbd5bbd5a000,%rdx
db 5f d9
xor    %rdx,%rax
xor    $0xfffffffffffff95f,%rcx
or     %rcx,%rax
je     1518 <main+0x388>
jmp    1513 <main+0x383>
call   1040 <abort@plt>
xor    %eax,%eax
movabs $0xcafecafedeaddead,%rdi
ca fe ca
call   1070 <ushift_53_ll@plt>
cltq
mov    %rax,%rcx
sar    $0x3f,%rcx
movabs $0xd5a0000000000000,%rdx
xor    %rdx,%rax
movabs $0x195fd95fdbd5bb,%rdx
xor    %rdx,%rcx
or     %rcx,%rax
je     155f <main+0x3cf>
jmp    155a <main+0x3ca>
call   1040 <abort@plt>
xor    %eax,%eax
movabs $0xcafecafedeaddead,%rdi
ca fe ca
call   1050 <shift_53_ll@plt>
cltq
mov    %rax,%rcx
sar    $0x3f,%rcx
movabs $0xd5a0000000000000,%rdx
xor    %rdx,%rax
movabs $0xfff95fd95fdbd5bb,%rdx
5f f9 ff
xor    %rdx,%rcx
or     %rcx,%rax
je     15a6 <main+0x416>
jmp    15a1 <main+0x411>
call   1040 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x12345678,%edi
xor    %eax,%eax
call   1040 <ushift_53_i@plt>
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (i32, ...) bitcast (i32 (...)* @ushift_53_i to i32 (i32, ...)*)(i32 305419896)
%7 = sext i32 %6 to i128
%8 = icmp ne i128 %7, 2750977859634271283576832
br i1 %8, label %9, label %10
9: ; preds = %2
unreachable
10: ; preds = %2
%11 = call i32 (i32, ...) bitcast (i32 (...)* @shift_53_i to i32 (i32, ...)*)(i32 305419896)
%12 = sext i32 %11 to i128
%13 = icmp ne i128 %12, 2750977859634271283576832
br i1 %13, label %14, label %15
14: ; preds = %10
unreachable
15: ; preds = %10
%16 = call i32 (i32, ...) bitcast (i32 (...)* @ushift_53_i to i32 (i32, ...)*)(i32 -889271554)
%17 = sext i32 %16 to i128
%18 = icmp ne i128 %17, 30675780149216969767256064
br i1 %18, label %19, label %20
19: ; preds = %15
unreachable
20: ; preds = %15
%21 = call i32 (i32, ...) bitcast (i32 (...)* @shift_53_i to i32 (i32, ...)*)(i32 -889271554)
%22 = sext i32 %21 to i128
%23 = icmp ne i128 %22, -8009846078451163823341568
br i1 %23, label %24, label %25
24: ; preds = %20
unreachable
25: ; preds = %20
%26 = call i32 (i64, ...) bitcast (i32 (...)* @ushift_3_ll to i32 (i64, ...)*)(i64 1311768467294899695)
%27 = sext i32 %26 to i128
%28 = icmp ne i128 %27, 10494147738359197560
br i1 %28, label %29, label %30
29: ; preds = %25
unreachable
30: ; preds = %25
%31 = call i32 (i64, ...) bitcast (i32 (...)* @shift_3_ll to i32 (i64, ...)*)(i64 1311768467294899695)
%32 = sext i32 %31 to i128
%33 = icmp ne i128 %32, 10494147738359197560
br i1 %33, label %34, label %35
34: ; preds = %30
unreachable
35: ; preds = %30
%36 = call i32 (i64, ...) bitcast (i32 (...)* @ushift_13_ll to i32 (i64, ...)*)(i64 1311768467294899695)
%37 = sext i32 %36 to i128
%38 = icmp ne i128 %37, 10746007284079818301440
br i1 %38, label %39, label %40
39: ; preds = %35
unreachable
40: ; preds = %35
%41 = call i32 (i64, ...) bitcast (i32 (...)* @shift_13_ll to i32 (i64, ...)*)(i64 1311768467294899695)
%42 = sext i32 %41 to i128
%43 = icmp ne i128 %42, 10746007284079818301440
br i1 %43, label %44, label %45
44: ; preds = %40
unreachable
45: ; preds = %40
%46 = call i32 (i64, ...) bitcast (i32 (...)* @ushift_53_ll to i32 (i64, ...)*)(i64 1311768467294899695)
%47 = sext i32 %46 to i128
%48 = icmp ne i128 %47, 11815359961011353870926609844797440
br i1 %48, label %49, label %50
49: ; preds = %45
unreachable
50: ; preds = %45
%51 = call i32 (i64, ...) bitcast (i32 (...)* @shift_53_ll to i32 (i64, ...)*)(i64 1311768467294899695)
%52 = sext i32 %51 to i128
%53 = icmp ne i128 %52, 11815359961011353870926609844797440
br i1 %53, label %54, label %55
54: ; preds = %50
unreachable
55: ; preds = %50
%56 = call i32 (i64, ...) bitcast (i32 (...)* @ushift_3_ll to i32 (i64, ...)*)(i64 -3819392237957161299)
%57 = sext i32 %56 to i128
%58 = icmp ne i128 %57, 117018814686019122536
br i1 %58, label %59, label %60
59: ; preds = %55
unreachable
60: ; preds = %55
%61 = call i32 (i64, ...) bitcast (i32 (...)* @shift_3_ll to i32 (i64, ...)*)(i64 -3819392237957161299)
%62 = sext i32 %61 to i128
%63 = icmp ne i128 %62, -30555137903657290392
br i1 %63, label %64, label %65
64: ; preds = %60
unreachable
65: ; preds = %60
%66 = call i32 (i64, ...) bitcast (i32 (...)* @ushift_13_ll to i32 (i64, ...)*)(i64 -3819392237957161299)
%67 = sext i32 %66 to i128
%68 = icmp ne i128 %67, 119827266238483581476864
br i1 %68, label %69, label %70
69: ; preds = %65
unreachable
70: ; preds = %65
%71 = call i32 (i64, ...) bitcast (i32 (...)* @shift_13_ll to i32 (i64, ...)*)(i64 -3819392237957161299)
%72 = sext i32 %71 to i128
%73 = icmp ne i128 %72, -31288461213345065361408
br i1 %73, label %74, label %75
74: ; preds = %70
unreachable
75: ; preds = %70
%76 = call i32 (i64, ...) bitcast (i32 (...)* @ushift_53_ll to i32 (i64, ...)*)(i64 -3819392237957161299)
%77 = sext i32 %76 to i128
%78 = icmp ne i128 %77, 131751472553823211283477058723774464
br i1 %78, label %79, label %80
79: ; preds = %75
unreachable
80: ; preds = %75
%81 = call i32 (i64, ...) bitcast (i32 (...)* @shift_53_ll to i32 (i64, ...)*)(i64 -3819392237957161299)
%82 = sext i32 %81 to i128
%83 = icmp ne i128 %82, -34402026919291272829498823811268608
br i1 %83, label %84, label %85
84: ; preds = %80
unreachable
85: ; preds = %80
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @ushift_53_i to i32 (i32, ...)*)(i32 305419896)
tail call void @abort()
unreachable
}