// File: /workspace/github_c_makefile_star2_O0/inflex[P]ripMIME/boundary-stack.c
// Function: BS_push
int BS_push( char *boundary )
{

	struct BS_node *node;

	if ((glb.hold_limit > 0)&&(glb.count >= glb.hold_limit)) 
	{
		DBS LOGGER_log("%s:%d:BS_push:DEBUG: Number of boundaries to hold is at limit (limit=%d)",FL,glb.hold_limit);
		return 0;
	}
  
	node	= malloc(sizeof(struct BS_node));

	DBS LOGGER_log("%s:%d:BS_push:DEBUG: head = %p, nn = %p boundary = '%s'",FL, glb.boundarystack, node, boundary);

	if (node)
	{
		node->next = glb.boundarystack;
		glb.boundarystack = node;
		glb.boundarystack->boundary = strdup(boundary);
		glb.boundarystack->boundary_length = strlen(glb.boundarystack->boundary);
		if (glb.boundarystack->boundary_length == 0) glb.have_empty_boundary = 1;
		glb.boundarystack->boundary_nhl = BS_non_hyphen_length(boundary);
		glb.count++;

		// Set the smallest length
		if (glb.smallest_length == -1) glb.smallest_length = glb.boundarystack->boundary_length;
		else if (glb.boundarystack->boundary_length < glb.smallest_length) glb.smallest_length = glb.boundarystack->boundary_length;

		DBS LOGGER_log("%s:%d:DEBUGX: smallest = %d, NHL = %d,  boundary = '%s'",FL,glb.smallest_length, node->boundary_nhl, boundary);
	}
	else
	    {
		LOGGER_log("%s:%d:BS_push:ERROR: Cannot allocate memory for boundary stack PUSH, %s", FL, strerror(errno));
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpl $0x0, 0x23035(%rip)     # 0x35958
jle 0x12968
movl 0x23025(%rip), %eax     # 0x35950
cmpl 0x23027(%rip), %eax     # 0x35958
jl 0x12968
cmpl $0x0, 0x23006(%rip)     # 0x35940
je 0x1295c
movl 0x23016(%rip), %ecx     # 0x35958
leaq 0xc69a(%rip), %rdi      # 0x1efe3
leaq 0xc682(%rip), %rsi      # 0x1efd2
movl $0xff, %edx
movb $0x0, %al
callq 0x117c0
movl $0x0, -0x4(%rbp)
jmp 0x12adf
movl $0x18, %edi
callq 0x2290
movq %rax, -0x18(%rbp)
cmpl $0x0, 0x22fc3(%rip)     # 0x35940
je 0x129a8
movq 0x22fe2(%rip), %rcx     # 0x35968
movq -0x18(%rbp), %r8
movq -0x10(%rbp), %r9
leaq 0xc697(%rip), %rdi      # 0x1f02c
leaq 0xc636(%rip), %rsi      # 0x1efd2
movl $0x105, %edx            # imm = 0x105
movb $0x0, %al
callq 0x117c0
cmpq $0x0, -0x18(%rbp)
je 0x12aaf
movq 0x22fae(%rip), %rcx     # 0x35968
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq %rax, 0x22f9b(%rip)     # 0x35968
movq -0x10(%rbp), %rdi
callq 0x2390
movq %rax, %rcx
movq 0x22f88(%rip), %rax     # 0x35968
movq %rcx, (%rax)
movq 0x22f7e(%rip), %rax     # 0x35968
movq (%rax), %rdi
callq 0x2100
movl %eax, %ecx
movq 0x22f6d(%rip), %rax     # 0x35968
movl %ecx, 0x8(%rax)
movq 0x22f63(%rip), %rax     # 0x35968
cmpl $0x0, 0x8(%rax)
jne 0x12a15
movl $0x1, 0x22f4b(%rip)     # 0x35960
movq -0x10(%rbp), %rdi
callq 0x128a0
movl %eax, %ecx
movq 0x22f41(%rip), %rax     # 0x35968
movl %ecx, 0xc(%rax)
movl 0x22f20(%rip), %eax     # 0x35950
addl $0x1, %eax
movl %eax, 0x22f17(%rip)     # 0x35950
cmpl $-0x1, 0x22f1c(%rip)    # 0x3595c
jne 0x12a54
movq 0x22f1f(%rip), %rax     # 0x35968
movl 0x8(%rax), %eax
movl %eax, 0x22f0a(%rip)     # 0x3595c
jmp 0x12a78
movq 0x22f0d(%rip), %rax     # 0x35968
movl 0x8(%rax), %eax
cmpl 0x22ef8(%rip), %eax     # 0x3595c
jge 0x12a76
movq 0x22efb(%rip), %rax     # 0x35968
movl 0x8(%rax), %eax
movl %eax, 0x22ee6(%rip)     # 0x3595c
jmp 0x12a78
cmpl $0x0, 0x22ec1(%rip)     # 0x35940
je 0x12aad
movl 0x22ed5(%rip), %ecx     # 0x3595c
movq -0x18(%rbp), %rax
movl 0xc(%rax), %r8d
movq -0x10(%rbp), %r9
leaq 0xc5ca(%rip), %rdi      # 0x1f064
leaq 0xc531(%rip), %rsi      # 0x1efd2
movl $0x115, %edx            # imm = 0x115
movb $0x0, %al
callq 0x117c0
jmp 0x12ad8
callq 0x2050
movl (%rax), %edi
callq 0x23a0
movq %rax, %rcx
leaq 0xc5d7(%rip), %rdi      # 0x1f09c
leaq 0xc506(%rip), %rsi      # 0x1efd2
movl $0x119, %edx            # imm = 0x119
movb $0x0, %al
callq 0x117c0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)