// File: /workspace/github_c_makefile_star2_O0/wjmelements[P]evm/tst/uint256.c
// Function: test_shiftar
void test_shiftar() {
    uint256_t a;

    UPPER(UPPER(a)) = 0x8000000000000000;
    LOWER(UPPER(a)) = 0x8000000000000000;
    UPPER(LOWER(a)) = 0x8000000000000000;
    LOWER(LOWER(a)) = 0x8000000000000000;

    shiftar256(&a, 0, &a);

    assert(UPPER(UPPER(a)) == 0x8000000000000000);
    assert(LOWER(UPPER(a)) == 0x8000000000000000);
    assert(UPPER(LOWER(a)) == 0x8000000000000000);
    assert(LOWER(LOWER(a)) == 0x8000000000000000);

    shiftar256(&a, 1, &a);

    assert(UPPER(UPPER(a)) == 0xc000000000000000);
    assert(LOWER(UPPER(a)) == 0x4000000000000000);
    assert(UPPER(LOWER(a)) == 0x4000000000000000);
    assert(LOWER(LOWER(a)) == 0x4000000000000000);

    shiftar256(&a, 1, &a);

    assert(UPPER(UPPER(a)) == 0xe000000000000000);
    assert(LOWER(UPPER(a)) == 0x2000000000000000);
    assert(UPPER(LOWER(a)) == 0x2000000000000000);
    assert(LOWER(LOWER(a)) == 0x2000000000000000);

    shiftar256(&a, 1, &a);

    assert(UPPER(UPPER(a)) == 0xf000000000000000);
    assert(LOWER(UPPER(a)) == 0x1000000000000000);
    assert(UPPER(LOWER(a)) == 0x1000000000000000);
    assert(LOWER(LOWER(a)) == 0x1000000000000000);

    shiftar256(&a, 60, &a);

    assert(UPPER(UPPER(a)) == 0xffffffffffffffff);
    assert(LOWER(UPPER(a)) == 0x0000000000000001);
    assert(UPPER(LOWER(a)) == 0x0000000000000001);
    assert(LOWER(LOWER(a)) == 0x0000000000000001);

    shiftar256(&a, 60, &a);

    assert(UPPER(UPPER(a)) == 0xffffffffffffffff);
    assert(LOWER(UPPER(a)) == 0xfffffffffffffff0);
    assert(UPPER(LOWER(a)) == 0x0000000000000010);
    assert(LOWER(LOWER(a)) == 0x0000000000000010);

    shiftar256(&a, 128, &a);

    assert(UPPER(UPPER(a)) == 0xffffffffffffffff);
    assert(LOWER(UPPER(a)) == 0xffffffffffffffff);
    assert(UPPER(LOWER(a)) == 0xffffffffffffffff);
    assert(LOWER(LOWER(a)) == 0xfffffffffffffff0);

    shiftar256(&a, 1, &a);

    assert(UPPER(UPPER(a)) == 0xffffffffffffffff);
    assert(LOWER(UPPER(a)) == 0xffffffffffffffff);
    assert(UPPER(LOWER(a)) == 0xffffffffffffffff);
    assert(LOWER(LOWER(a)) == 0xfffffffffffffff8);

    UPPER(UPPER(a)) = 0x8760000000000000;
    LOWER(UPPER(a)) = 0x0800000000000000;
    UPPER(LOWER(a)) = 0x0080000000000000;
    LOWER(LOWER(a)) = 0x0008000000000000;

    shiftar256(&a, 196, &a);

    assert(UPPER(UPPER(a)) == 0xffffffffffffffff);
    assert(LOWER(UPPER(a)) == 0xffffffffffffffff);
    assert(UPPER(LOWER(a)) == 0xffffffffffffffff);
    assert(LOWER(LOWER(a)) == 0xf876000000000000);

    UPPER(UPPER(a)) = 0x8000000000000000;
    LOWER(UPPER(a)) = 0x0000000000000000;
    UPPER(LOWER(a)) = 0x0000000000000000;
    LOWER(LOWER(a)) = 0x0000000000000000;

    shiftar256(&a, 256, &a);

    assert(UPPER(UPPER(a)) == 0xffffffffffffffff);
    assert(LOWER(UPPER(a)) == 0xffffffffffffffff);
    assert(UPPER(LOWER(a)) == 0xffffffffffffffff);
    assert(LOWER(LOWER(a)) == 0xffffffffffffffff);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, -0x20(%rbp)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, -0x18(%rbp)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, -0x10(%rbp)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, -0x8(%rbp)
leaq -0x20(%rbp), %rdx
xorl %esi, %esi
movq %rdx, %rdi
callq 0x3e40
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, -0x20(%rbp)
jne 0x1f30
jmp 0x1f4f
leaq 0x598a(%rip), %rdi      # 0x78c1
leaq 0x50fd(%rip), %rsi      # 0x703b
movl $0xa0, %edx
leaq 0x599d(%rip), %rcx      # 0x78e7
callq 0x1030
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, -0x18(%rbp)
jne 0x1f61
jmp 0x1f80
leaq 0x5993(%rip), %rdi      # 0x78fb
leaq 0x50cc(%rip), %rsi      # 0x703b
movl $0xa1, %edx
leaq 0x596c(%rip), %rcx      # 0x78e7
callq 0x1030
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, -0x10(%rbp)
jne 0x1f92
jmp 0x1fb1
leaq 0x5988(%rip), %rdi      # 0x7921
leaq 0x509b(%rip), %rsi      # 0x703b
movl $0xa2, %edx
leaq 0x593b(%rip), %rcx      # 0x78e7
callq 0x1030
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, -0x8(%rbp)
jne 0x1fc3
jmp 0x1fe2
leaq 0x597d(%rip), %rdi      # 0x7947
leaq 0x506a(%rip), %rsi      # 0x703b
movl $0xa3, %edx
leaq 0x590a(%rip), %rcx      # 0x78e7
callq 0x1030
leaq -0x20(%rbp), %rdx
movl $0x1, %esi
movq %rdx, %rdi
callq 0x3e40
movabsq $-0x4000000000000000, %rax # imm = 0xC000000000000000
cmpq %rax, -0x20(%rbp)
jne 0x2005
jmp 0x2024
leaq 0x5961(%rip), %rdi      # 0x796d
leaq 0x5028(%rip), %rsi      # 0x703b
movl $0xa7, %edx
leaq 0x58c8(%rip), %rcx      # 0x78e7
callq 0x1030
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
cmpq %rax, -0x18(%rbp)
jne 0x2036
jmp 0x2055
leaq 0x5956(%rip), %rdi      # 0x7993
leaq 0x4ff7(%rip), %rsi      # 0x703b
movl $0xa8, %edx
leaq 0x5897(%rip), %rcx      # 0x78e7
callq 0x1030
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
cmpq %rax, -0x10(%rbp)
jne 0x2067
jmp 0x2086
leaq 0x594b(%rip), %rdi      # 0x79b9
leaq 0x4fc6(%rip), %rsi      # 0x703b
movl $0xa9, %edx
leaq 0x5866(%rip), %rcx      # 0x78e7
callq 0x1030
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
cmpq %rax, -0x8(%rbp)
jne 0x2098
jmp 0x20b7
leaq 0x5940(%rip), %rdi      # 0x79df
leaq 0x4f95(%rip), %rsi      # 0x703b
movl $0xaa, %edx
leaq 0x5835(%rip), %rcx      # 0x78e7
callq 0x1030
leaq -0x20(%rbp), %rdx
movl $0x1, %esi
movq %rdx, %rdi
callq 0x3e40
movabsq $-0x2000000000000000, %rax # imm = 0xE000000000000000
cmpq %rax, -0x20(%rbp)
jne 0x20da
jmp 0x20f9
leaq 0x5924(%rip), %rdi      # 0x7a05
leaq 0x4f53(%rip), %rsi      # 0x703b
movl $0xae, %edx
leaq 0x57f3(%rip), %rcx      # 0x78e7
callq 0x1030
movabsq $0x2000000000000000, %rax # imm = 0x2000000000000000
cmpq %rax, -0x18(%rbp)
jne 0x210b
jmp 0x212a
leaq 0x5919(%rip), %rdi      # 0x7a2b
leaq 0x4f22(%rip), %rsi      # 0x703b
movl $0xaf, %edx
leaq 0x57c2(%rip), %rcx      # 0x78e7
callq 0x1030
movabsq $0x2000000000000000, %rax # imm = 0x2000000000000000
cmpq %rax, -0x10(%rbp)
jne 0x213c
jmp 0x215b
leaq 0x590e(%rip), %rdi      # 0x7a51
leaq 0x4ef1(%rip), %rsi      # 0x703b
movl $0xb0, %edx
leaq 0x5791(%rip), %rcx      # 0x78e7
callq 0x1030
movabsq $0x2000000000000000, %rax # imm = 0x2000000000000000
cmpq %rax, -0x8(%rbp)
jne 0x216d
jmp 0x218c
leaq 0x5903(%rip), %rdi      # 0x7a77
leaq 0x4ec0(%rip), %rsi      # 0x703b
movl $0xb1, %edx
leaq 0x5760(%rip), %rcx      # 0x78e7
callq 0x1030
leaq -0x20(%rbp), %rdx
movl $0x1, %esi
movq %rdx, %rdi
callq 0x3e40
movabsq $-0x1000000000000000, %rax # imm = 0xF000000000000000
cmpq %rax, -0x20(%rbp)
jne 0x21af
jmp 0x21ce
leaq 0x58e7(%rip), %rdi      # 0x7a9d
leaq 0x4e7e(%rip), %rsi      # 0x703b
movl $0xb5, %edx
leaq 0x571e(%rip), %rcx      # 0x78e7
callq 0x1030
movabsq $0x1000000000000000, %rax # imm = 0x1000000000000000
cmpq %rax, -0x18(%rbp)
jne 0x21e0
jmp 0x21ff
leaq 0x58dc(%rip), %rdi      # 0x7ac3
leaq 0x4e4d(%rip), %rsi      # 0x703b
movl $0xb6, %edx
leaq 0x56ed(%rip), %rcx      # 0x78e7
callq 0x1030
movabsq $0x1000000000000000, %rax # imm = 0x1000000000000000
cmpq %rax, -0x10(%rbp)
jne 0x2211
jmp 0x2230
leaq 0x58d1(%rip), %rdi      # 0x7ae9
leaq 0x4e1c(%rip), %rsi      # 0x703b
movl $0xb7, %edx
leaq 0x56bc(%rip), %rcx      # 0x78e7
callq 0x1030
movabsq $0x1000000000000000, %rax # imm = 0x1000000000000000
cmpq %rax, -0x8(%rbp)
jne 0x2242
jmp 0x2261
leaq 0x58c6(%rip), %rdi      # 0x7b0f
leaq 0x4deb(%rip), %rsi      # 0x703b
movl $0xb8, %edx
leaq 0x568b(%rip), %rcx      # 0x78e7
callq 0x1030
leaq -0x20(%rbp), %rdx
movl $0x3c, %esi
movq %rdx, %rdi
callq 0x3e40
cmpq $-0x1, -0x20(%rbp)
jne 0x227b
jmp 0x229a
leaq 0x58b3(%rip), %rdi      # 0x7b35
leaq 0x4db2(%rip), %rsi      # 0x703b
movl $0xbc, %edx
leaq 0x5652(%rip), %rcx      # 0x78e7
callq 0x1030
cmpq $0x1, -0x18(%rbp)
jne 0x22a3
jmp 0x22c2
leaq 0x58b1(%rip), %rdi      # 0x7b5b
leaq 0x4d8a(%rip), %rsi      # 0x703b
movl $0xbd, %edx
leaq 0x562a(%rip), %rcx      # 0x78e7
callq 0x1030
cmpq $0x1, -0x10(%rbp)
jne 0x22cb
jmp 0x22ea
leaq 0x58af(%rip), %rdi      # 0x7b81
leaq 0x4d62(%rip), %rsi      # 0x703b
movl $0xbe, %edx
leaq 0x5602(%rip), %rcx      # 0x78e7
callq 0x1030
cmpq $0x1, -0x8(%rbp)
jne 0x22f3
jmp 0x2312
leaq 0x58ad(%rip), %rdi      # 0x7ba7
leaq 0x4d3a(%rip), %rsi      # 0x703b
movl $0xbf, %edx
leaq 0x55da(%rip), %rcx      # 0x78e7
callq 0x1030
leaq -0x20(%rbp), %rdx
movl $0x3c, %esi
movq %rdx, %rdi
callq 0x3e40
cmpq $-0x1, -0x20(%rbp)
jne 0x232c
jmp 0x234b
leaq 0x5802(%rip), %rdi      # 0x7b35
leaq 0x4d01(%rip), %rsi      # 0x703b
movl $0xc3, %edx
leaq 0x55a1(%rip), %rcx      # 0x78e7
callq 0x1030
cmpq $-0x10, -0x18(%rbp)
jne 0x2354
jmp 0x2373
leaq 0x5872(%rip), %rdi      # 0x7bcd
leaq 0x4cd9(%rip), %rsi      # 0x703b
movl $0xc4, %edx
leaq 0x5579(%rip), %rcx      # 0x78e7
callq 0x1030
cmpq $0x10, -0x10(%rbp)
jne 0x237c
jmp 0x239b
leaq 0x5870(%rip), %rdi      # 0x7bf3
leaq 0x4cb1(%rip), %rsi      # 0x703b
movl $0xc5, %edx
leaq 0x5551(%rip), %rcx      # 0x78e7
callq 0x1030
cmpq $0x10, -0x8(%rbp)
jne 0x23a4
jmp 0x23c3
leaq 0x586e(%rip), %rdi      # 0x7c19
leaq 0x4c89(%rip), %rsi      # 0x703b
movl $0xc6, %edx
leaq 0x5529(%rip), %rcx      # 0x78e7
callq 0x1030
leaq -0x20(%rbp), %rdx
movl $0x80, %esi
movq %rdx, %rdi
callq 0x3e40
cmpq $-0x1, -0x20(%rbp)
jne 0x23dd
jmp 0x23fc
leaq 0x5751(%rip), %rdi      # 0x7b35
leaq 0x4c50(%rip), %rsi      # 0x703b
movl $0xca, %edx
leaq 0x54f0(%rip), %rcx      # 0x78e7
callq 0x1030
cmpq $-0x1, -0x18(%rbp)
jne 0x2405
jmp 0x2424
leaq 0x5833(%rip), %rdi      # 0x7c3f
leaq 0x4c28(%rip), %rsi      # 0x703b
movl $0xcb, %edx
leaq 0x54c8(%rip), %rcx      # 0x78e7
callq 0x1030
cmpq $-0x1, -0x10(%rbp)
jne 0x242d
jmp 0x244c
leaq 0x5831(%rip), %rdi      # 0x7c65
leaq 0x4c00(%rip), %rsi      # 0x703b
movl $0xcc, %edx
leaq 0x54a0(%rip), %rcx      # 0x78e7
callq 0x1030
cmpq $-0x10, -0x8(%rbp)
jne 0x2455
jmp 0x2474
leaq 0x582f(%rip), %rdi      # 0x7c8b
leaq 0x4bd8(%rip), %rsi      # 0x703b
movl $0xcd, %edx
leaq 0x5478(%rip), %rcx      # 0x78e7
callq 0x1030
leaq -0x20(%rbp), %rdx
movl $0x1, %esi
movq %rdx, %rdi
callq 0x3e40
cmpq $-0x1, -0x20(%rbp)
jne 0x248e
jmp 0x24ad
leaq 0x56a0(%rip), %rdi      # 0x7b35
leaq 0x4b9f(%rip), %rsi      # 0x703b
movl $0xd1, %edx
leaq 0x543f(%rip), %rcx      # 0x78e7
callq 0x1030
cmpq $-0x1, -0x18(%rbp)
jne 0x24b6
jmp 0x24d5
leaq 0x5782(%rip), %rdi      # 0x7c3f
leaq 0x4b77(%rip), %rsi      # 0x703b
movl $0xd2, %edx
leaq 0x5417(%rip), %rcx      # 0x78e7
callq 0x1030
cmpq $-0x1, -0x10(%rbp)
jne 0x24de
jmp 0x24fd
leaq 0x5780(%rip), %rdi      # 0x7c65
leaq 0x4b4f(%rip), %rsi      # 0x703b
movl $0xd3, %edx
leaq 0x53ef(%rip), %rcx      # 0x78e7
callq 0x1030
cmpq $-0x8, -0x8(%rbp)
jne 0x2506
jmp 0x2525
leaq 0x57a4(%rip), %rdi      # 0x7cb1
leaq 0x4b27(%rip), %rsi      # 0x703b
movl $0xd4, %edx
leaq 0x53c7(%rip), %rcx      # 0x78e7
callq 0x1030
movabsq $-0x78a0000000000000, %rax # imm = 0x8760000000000000
movq %rax, -0x20(%rbp)
movabsq $0x800000000000000, %rax # imm = 0x800000000000000
movq %rax, -0x18(%rbp)
movabsq $0x80000000000000, %rax # imm = 0x80000000000000
movq %rax, -0x10(%rbp)
movabsq $0x8000000000000, %rax  # imm = 0x8000000000000
movq %rax, -0x8(%rbp)
leaq -0x20(%rbp), %rdx
movl $0xc4, %esi
movq %rdx, %rdi
callq 0x3e40
cmpq $-0x1, -0x20(%rbp)
jne 0x2577
jmp 0x2596
leaq 0x55b7(%rip), %rdi      # 0x7b35
leaq 0x4ab6(%rip), %rsi      # 0x703b
movl $0xdd, %edx
leaq 0x5356(%rip), %rcx      # 0x78e7
callq 0x1030
cmpq $-0x1, -0x18(%rbp)
jne 0x259f
jmp 0x25be
leaq 0x5699(%rip), %rdi      # 0x7c3f
leaq 0x4a8e(%rip), %rsi      # 0x703b
movl $0xde, %edx
leaq 0x532e(%rip), %rcx      # 0x78e7
callq 0x1030
cmpq $-0x1, -0x10(%rbp)
jne 0x25c7
jmp 0x25e6
leaq 0x5697(%rip), %rdi      # 0x7c65
leaq 0x4a66(%rip), %rsi      # 0x703b
movl $0xdf, %edx
leaq 0x5306(%rip), %rcx      # 0x78e7
callq 0x1030
movabsq $-0x78a000000000000, %rax # imm = 0xF876000000000000
cmpq %rax, -0x8(%rbp)
jne 0x25f8
jmp 0x2617
leaq 0x56d8(%rip), %rdi      # 0x7cd7
leaq 0x4a35(%rip), %rsi      # 0x703b
movl $0xe0, %edx
leaq 0x52d5(%rip), %rcx      # 0x78e7
callq 0x1030
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
leaq -0x20(%rbp), %rdx
movl $0x100, %esi            # imm = 0x100
movq %rdx, %rdi
callq 0x3e40
cmpq $-0x1, -0x20(%rbp)
jne 0x2657
jmp 0x2676
leaq 0x54d7(%rip), %rdi      # 0x7b35
leaq 0x49d6(%rip), %rsi      # 0x703b
movl $0xe9, %edx
leaq 0x5276(%rip), %rcx      # 0x78e7
callq 0x1030
cmpq $-0x1, -0x18(%rbp)
jne 0x267f
jmp 0x269e
leaq 0x55b9(%rip), %rdi      # 0x7c3f
leaq 0x49ae(%rip), %rsi      # 0x703b
movl $0xea, %edx
leaq 0x524e(%rip), %rcx      # 0x78e7
callq 0x1030
cmpq $-0x1, -0x10(%rbp)
jne 0x26a7
jmp 0x26c6
leaq 0x55b7(%rip), %rdi      # 0x7c65
leaq 0x4986(%rip), %rsi      # 0x703b
movl $0xeb, %edx
leaq 0x5226(%rip), %rcx      # 0x78e7
callq 0x1030
cmpq $-0x1, -0x8(%rbp)
jne 0x26cf
jmp 0x26ee
leaq 0x5627(%rip), %rdi      # 0x7cfd
leaq 0x495e(%rip), %rsi      # 0x703b
movl $0xec, %edx
leaq 0x51fe(%rip), %rcx      # 0x78e7
callq 0x1030
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)