// File: /workspace/github_cpp_makefile_star2_O1/williewillus[P]panda_scratchpad/src/utils/Tester.cpp
// Function: Tester::snapshot_device()
int Tester::snapshot_device() {
	cout << "Creating snapshot of " << record_device_path << endl;
	string command = "dd if=" + record_device_path + " of="
	       	+ MNT_POINT_SNAPSHOT + "/" + SNAPSHOT_NAME + " bs=1M "
		+ "count=" + to_string(device_size);
	cout << "Snapshot dev command is : " << command << endl;
	if (system(command.c_str()) != 0) {
		return SNAP_ERR;
	}
	return SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdi, %rbx
movq 0xddbc(%rip), %r15      # 0x1bfc8
leaq 0x6e85(%rip), %rsi      # 0x15098
movl $0x15, %edx
movq %r15, %rdi
callq 0x54f0
leaq 0x50(%rbx), %r14
movq 0x50(%rbx), %rsi
movq 0x58(%rbx), %rdx
movq %r15, %rdi
callq 0x54f0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x5470
movsbl %al, %esi
movq %r15, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5300
leaq 0x6e49(%rip), %rsi      # 0x150ae
leaq -0x148(%rbp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0xd239
leaq 0x6eac(%rip), %rsi      # 0x1512a
movq %r15, %rdi
callq 0x5860
leaq -0xf8(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xe2b3
movq %rdx, -0x108(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xf8(%rbp)
jmp 0xe2bb
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq -0x108(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x6dd5(%rip), %rsi      # 0x150b5
callq 0x5860
leaq -0x118(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xe312
movq %rdx, -0x128(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x118(%rbp)
jmp 0xe319
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq -0x128(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x72dc(%rip), %rsi      # 0x1561a
callq 0x5860
leaq -0x98(%rbp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xe370
movq %rdx, -0xa8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x98(%rbp)
jmp 0xe376
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq -0xa8(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x6d27(%rip), %rsi      # 0x150c2
callq 0x5860
leaq -0xb8(%rbp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xe3cd
movq %rdx, -0xc8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xb8(%rbp)
jmp 0xe3d3
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq -0xc8(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x6cd8(%rip), %rsi      # 0x150d0
callq 0x5860
leaq -0xd8(%rbp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xe42a
movq %rdx, -0xe8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xd8(%rbp)
jmp 0xe430
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq -0xe8(%rbp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x6ce1(%rip), %rsi      # 0x15136
callq 0x5860
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xe481
movq %rdx, -0x88(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x78(%rbp)
jmp 0xe488
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, -0x80(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x90(%rbx), %rbx
movl $0x1, %esi
cmpq $0xa, %rbx
jb 0xe500
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %rbx, %rcx
cmpq $0x63, %rcx
jbe 0xe4f9
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0xe4fe
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0xe500
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0xe4c3
addl $-0x3, %esi
jmp 0xe500
addl $-0x2, %esi
jmp 0xe500
decl %esi
movl %esi, %esi
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
leaq -0x68(%rbp), %rdi
xorl %edx, %edx
callq 0x5510
movq -0x68(%rbp), %rdi
movl -0x60(%rbp), %esi
movq %rbx, %rdx
callq 0x10326
movq -0x88(%rbp), %rcx
movq -0x80(%rbp), %r8
movq -0x60(%rbp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r15, %rcx
je 0xe546
movq -0x78(%rbp), %rsi
cmpq %rsi, %rax
jbe 0xe55f
movl $0xf, %esi
cmpq %r12, -0x68(%rbp)
je 0xe55a
movq -0x58(%rbp), %rsi
cmpq %rsi, %rax
jbe 0xe571
movq -0x68(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0x5160
jmp 0xe57e
leaq -0x68(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x54e0
leaq -0x38(%rbp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0xe59f
movq %rsi, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0xe5a5
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0xe5cf
callq 0x5460
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0xe5e0
callq 0x5460
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
leaq -0x98(%rbp), %rbx
leaq -0xb8(%rbp), %r15
je 0xe606
callq 0x5460
movq -0xc8(%rbp), %rdi
cmpq %r15, %rdi
je 0xe617
callq 0x5460
movq -0xa8(%rbp), %rdi
cmpq %rbx, %rdi
je 0xe628
callq 0x5460
movq -0x128(%rbp), %rdi
cmpq %r14, %rdi
je 0xe639
callq 0x5460
movq -0x108(%rbp), %rdi
cmpq %r13, %rdi
je 0xe64a
callq 0x5460
leaq -0x138(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe65f
callq 0x5460
movq 0xd962(%rip), %rdi      # 0x1bfc8
leaq 0x6a6b(%rip), %rsi      # 0x150d8
movl $0x1a, %edx
callq 0x54f0
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq 0xd942(%rip), %rdi      # 0x1bfc8
callq 0x54f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5470
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5300
movq -0x48(%rbp), %rdi
callq 0x53e0
movl %eax, %ebx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe6d2
callq 0x5460
xorl %eax, %eax
negl %ebx
sbbl %eax, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0xe700
callq 0x5460
jmp 0xe700
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0xe716
callq 0x5460
jmp 0xe716
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0xe733
callq 0x5460
jmp 0xe733
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0xe750
callq 0x5460
jmp 0xe750
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0xe76d
callq 0x5460
jmp 0xe76d
movq %rax, %rbx
movq -0x128(%rbp), %rdi
cmpq %r14, %rdi
je 0xe783
callq 0x5460
jmp 0xe783
movq %rax, %rbx
movq -0x108(%rbp), %rdi
cmpq %r13, %rdi
je 0xe799
callq 0x5460
jmp 0xe799
movq %rax, %rbx
leaq -0x138(%rbp), %rax
jmp 0xe7a9
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe7b7
callq 0x5460
movq %rbx, %rdi
callq 0x57c0
nop