// File: /workspace/github_cpp_makefile_star2_O3/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 0xde10(%rip), %r15      # 0x1bfc8
leaq 0x6ec9(%rip), %rsi      # 0x15088
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 0x6e8d(%rip), %rsi      # 0x1509e
leaq -0x148(%rbp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0xd1df
leaq 0x6ef0(%rip), %rsi      # 0x1511a
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 0xe25f
movq %rdx, -0x108(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xf8(%rbp)
jmp 0xe267
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 0x6e19(%rip), %rsi      # 0x150a5
callq 0x5860
leaq -0x118(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xe2be
movq %rdx, -0x128(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x118(%rbp)
jmp 0xe2c5
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 0x7320(%rip), %rsi      # 0x1560a
callq 0x5860
leaq -0x98(%rbp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xe31c
movq %rdx, -0xa8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x98(%rbp)
jmp 0xe322
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 0x6d6b(%rip), %rsi      # 0x150b2
callq 0x5860
leaq -0xb8(%rbp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xe379
movq %rdx, -0xc8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xb8(%rbp)
jmp 0xe37f
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 0x6d1c(%rip), %rsi      # 0x150c0
callq 0x5860
leaq -0xd8(%rbp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xe3d6
movq %rdx, -0xe8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xd8(%rbp)
jmp 0xe3dc
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 0x6d25(%rip), %rsi      # 0x15126
callq 0x5860
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xe42d
movq %rdx, -0x88(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x78(%rbp)
jmp 0xe434
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 0xe4ac
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %rbx, %rcx
cmpq $0x63, %rcx
jbe 0xe4a5
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0xe4aa
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0xe4ac
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0xe46f
addl $-0x3, %esi
jmp 0xe4ac
addl $-0x2, %esi
jmp 0xe4ac
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 0x1025a
movq -0x88(%rbp), %rcx
movq -0x80(%rbp), %r8
movq -0x60(%rbp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r15, %rcx
je 0xe4f2
movq -0x78(%rbp), %rdi
movq -0x68(%rbp), %rsi
cmpq %rdi, %rax
jbe 0xe50e
movl $0xf, %edi
cmpq %r12, %rsi
je 0xe509
movq -0x58(%rbp), %rdi
cmpq %rdi, %rax
jbe 0xe51c
leaq -0x88(%rbp), %rdi
callq 0x5160
jmp 0xe529
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 0xe54a
movq %rsi, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0xe550
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 0xe57a
callq 0x5460
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0xe58b
callq 0x5460
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
leaq -0x98(%rbp), %rbx
leaq -0xb8(%rbp), %r15
je 0xe5b1
callq 0x5460
movq -0xc8(%rbp), %rdi
cmpq %r15, %rdi
je 0xe5c2
callq 0x5460
movq -0xa8(%rbp), %rdi
cmpq %rbx, %rdi
je 0xe5d3
callq 0x5460
movq -0x128(%rbp), %rdi
cmpq %r14, %rdi
je 0xe5e4
callq 0x5460
movq -0x108(%rbp), %rdi
cmpq %r13, %rdi
je 0xe5f5
callq 0x5460
leaq -0x138(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe60a
callq 0x5460
movq 0xd9b7(%rip), %rdi      # 0x1bfc8
leaq 0x6ab0(%rip), %rsi      # 0x150c8
movl $0x1a, %edx
callq 0x54f0
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq 0xd997(%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 0xe67d
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 0xe6ab
callq 0x5460
jmp 0xe6ab
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0xe6c1
callq 0x5460
jmp 0xe6c1
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0xe6de
callq 0x5460
jmp 0xe6de
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0xe6fb
callq 0x5460
jmp 0xe6fb
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0xe718
callq 0x5460
jmp 0xe718
movq %rax, %rbx
movq -0x128(%rbp), %rdi
cmpq %r14, %rdi
je 0xe72e
callq 0x5460
jmp 0xe72e
movq %rax, %rbx
movq -0x108(%rbp), %rdi
cmpq %r13, %rdi
je 0xe744
callq 0x5460
jmp 0xe744
movq %rax, %rbx
leaq -0x138(%rbp), %rax
jmp 0xe754
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe762
callq 0x5460
movq %rbx, %rdi
callq 0x57c0