// File: /workspace/github_c_makefile_star2_O0/xtanitfy[P]Murphy/src/blob.c
// Function: BLOB_create
int BLOB_create(BLOB_s **pBlob,
						unsigned long numSize,
						unsigned long channelSize, 
						unsigned long heightSize,
						unsigned long widthSize,
						BOOL bShape)
{
	unsigned long counts = 0;
	CHECK_EXPR_RET(numSize <= 0,-1);
	CHECK_EXPR_RET(channelSize <= 0,-1);
	CHECK_EXPR_RET(heightSize <= 0,-1);
	CHECK_EXPR_RET(widthSize <= 0,-1);

	CHECK_EXPR_RET(pBlob == NULL,-1);

	*pBlob = (BLOB_s *)malloc(sizeof(BLOB_s));
	CHECK_EXPR_RET(*pBlob == NULL,-1);

	(*pBlob)->numSize = numSize;
	(*pBlob)->widthSize = widthSize;
	(*pBlob)->heightSize = heightSize;
	(*pBlob)->channelSize = channelSize;
	
	counts = (*pBlob)->numSize * (*pBlob)->channelSize *\
				(*pBlob)->heightSize * (*pBlob)->widthSize;
	
	(*pBlob)->pady = 0;
	(*pBlob)->padx = 0;
	(*pBlob)->count = counts;
	if (bShape == TRUE) {
		BLOB_shape(*pBlob);
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %r9b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movb %al, -0x31(%rbp)
movq $0x0, -0x40(%rbp)
cmpq $0x0, -0x18(%rbp)
ja 0x1cde
leaq 0x1390(%rip), %rdi      # 0x3048
leaq 0x1446(%rip), %rsi      # 0x3105
leaq 0x1446(%rip), %rdx      # 0x310c
movl $0xc, %ecx
movb $0x0, %al
callq 0x1030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1eaf
cmpq $0x0, -0x20(%rbp)
ja 0x1d12
leaq 0x135c(%rip), %rdi      # 0x3048
leaq 0x1412(%rip), %rsi      # 0x3105
leaq 0x1412(%rip), %rdx      # 0x310c
movl $0xd, %ecx
movb $0x0, %al
callq 0x1030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1eaf
cmpq $0x0, -0x28(%rbp)
ja 0x1d46
leaq 0x1328(%rip), %rdi      # 0x3048
leaq 0x13de(%rip), %rsi      # 0x3105
leaq 0x13de(%rip), %rdx      # 0x310c
movl $0xe, %ecx
movb $0x0, %al
callq 0x1030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1eaf
cmpq $0x0, -0x30(%rbp)
ja 0x1d7a
leaq 0x12f4(%rip), %rdi      # 0x3048
leaq 0x13aa(%rip), %rsi      # 0x3105
leaq 0x13aa(%rip), %rdx      # 0x310c
movl $0xf, %ecx
movb $0x0, %al
callq 0x1030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1eaf
cmpq $0x0, -0x10(%rbp)
jne 0x1dae
leaq 0x12c0(%rip), %rdi      # 0x3048
leaq 0x1376(%rip), %rsi      # 0x3105
leaq 0x1376(%rip), %rdx      # 0x310c
movl $0x11, %ecx
movb $0x0, %al
callq 0x1030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1eaf
movl $0x40, %edi
callq 0x10b0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x1df9
leaq 0x1275(%rip), %rdi      # 0x3048
leaq 0x132b(%rip), %rsi      # 0x3105
leaq 0x132b(%rip), %rdx      # 0x310c
movl $0x14, %ecx
movb $0x0, %al
callq 0x1030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1eaf
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x28(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
imulq 0x18(%rcx), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
imulq 0x20(%rcx), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
imulq 0x28(%rcx), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl $0x0, 0x38(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl $0x0, 0x3c(%rax)
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x30(%rax)
movsbl -0x31(%rbp), %eax
cmpl $0x1, %eax
jne 0x1ea8
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x1ec0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)