// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]libcperciva/tests/sysendian/main.c
// Function: fill_testcases
static void
fill_testcases(struct tests * tests)
{
	uint16_t val16;
	uint32_t val32;
	uint64_t val64;
	size_t i;

	/* Load 16-bit tests. */
	for (i = 0; i < 2; i++) {
		tests->val16[i] = tests16[i].val;
		memcpy(&val16, tests16[i].be_arr, 2);
		tests->val16_be[i] = val16;
		memcpy(&val16, tests16[i].le_arr, 2);
		tests->val16_le[i] = val16;
	}

	/* Load 32-bit tests. */
	for (i = 0; i < 4; i++) {
		tests->val32[i] = tests32[i].val;
		memcpy(&val32, tests32[i].be_arr, 4);
		tests->val32_be[i] = val32;
		memcpy(&val32, tests32[i].le_arr, 4);
		tests->val32_le[i] = val32;
	}

	/* Load 64-bit tests. */
	for (i = 0; i < 8; i++) {
		tests->val64[i] = tests64[i].val;
		memcpy(&val64, tests64[i].be_arr, 8);
		tests->val64_be[i] = val64;
		memcpy(&val64, tests64[i].le_arr, 8);
		tests->val64_le[i] = val64;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x2, -0x20(%rbp)
jae 0x20c6
leaq 0x5092(%rip), %rax      # 0x70e0
imulq $0x6, -0x20(%rbp), %rcx
addq %rcx, %rax
movw (%rax), %dx
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
leaq 0x5074(%rip), %rax      # 0x70e0
imulq $0x6, -0x20(%rbp), %rcx
addq %rcx, %rax
movw 0x2(%rax), %ax
movw %ax, -0xa(%rbp)
movw -0xa(%rbp), %dx
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movw %dx, 0x4(%rax,%rcx,2)
leaq 0x504c(%rip), %rax      # 0x70e0
imulq $0x6, -0x20(%rbp), %rcx
addq %rcx, %rax
movw 0x4(%rax), %ax
movw %ax, -0xa(%rbp)
movw -0xa(%rbp), %dx
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movw %dx, 0x8(%rax,%rcx,2)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2040
movq $0x0, -0x20(%rbp)
cmpq $0x4, -0x20(%rbp)
jae 0x2148
leaq 0x5014(%rip), %rax      # 0x70f0
imulq $0xc, -0x20(%rbp), %rcx
addq %rcx, %rax
movl (%rax), %edx
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movl %edx, 0xc(%rax,%rcx,4)
leaq 0x4ff7(%rip), %rax      # 0x70f0
imulq $0xc, -0x20(%rbp), %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movl %edx, 0x1c(%rax,%rcx,4)
leaq 0x4fd3(%rip), %rax      # 0x70f0
imulq $0xc, -0x20(%rbp), %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %edx
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movl %edx, 0x2c(%rax,%rcx,4)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x20ce
movq $0x0, -0x20(%rbp)
cmpq $0x8, -0x20(%rbp)
jae 0x21e1
leaq 0x4fbe(%rip), %rax      # 0x7120
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rdx
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rdx, 0x40(%rax,%rcx,8)
leaq 0x4f9f(%rip), %rax      # 0x7120
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rdx, 0x80(%rax,%rcx,8)
leaq 0x4f74(%rip), %rax      # 0x7120
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rdx, 0xc0(%rax,%rcx,8)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2150
popq %rbp
retq
nopw %cs:(%rax,%rax)