// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]vlink/linker.c
// Function: merge_sec_attrs
static void merge_sec_attrs(struct LinkedSection *lsn,struct Section *sec,
                            uint8_t target_flags)
{
  if (lsn->type == ST_UNDEFINED) {
    lsn->type = sec->type;
    lsn->flags = sec->flags;
  }
  else {
    lsn->flags &= SF_PORTABLE_MASK;
    lsn->flags |= (sec->flags&SF_SMALLDATA) | target_flags;
  }

  if (lsn->protection != sec->protection) {
    if (lsn->protection!=0 &&
        (lsn->protection & sec->protection)!=sec->protection &&
        !listempty(&lsn->sections)) {
      /* merge protection-flags of the two sections */
      char prot1[5],prot2[5];
      strncpy(prot1,protstring(lsn->protection),5);
      strncpy(prot2,protstring(lsn->protection|sec->protection),5);
      strcpy(namebuf2,getobjname(((struct Section *)lsn->sections.last)->obj));
      error(22,lsn->name,prot1,namebuf2,prot2,getobjname(sec->obj));
    }
    lsn->protection |= sec->protection;
  }

  if (sec->alignment > lsn->alignment) {
    /* increase alignment to fit the needs of the new section */
    #if 0 /* @@@ no longer report about alignment corrections */
    if (lsn->alignment && !listempty(&lsn->sections)) {
      strcpy(namebuf2,getobjname(((struct Section *)lsn->sections.last)->obj));
      error(23,lsn->name,1<<lsn->alignment,namebuf2,
            1<<sec->alignment,getobjname(sec->obj));
    }
    #endif
    lsn->alignment = sec->alignment;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x0, 0x20(%rdi)
je 0x8b0b
movb 0x21(%rbx), %al
andb $0x1f, %al
movb 0x2d(%r14), %cl
andb $0x4, %cl
orb %dl, %cl
orb %al, %cl
movb %cl, 0x21(%rbx)
jmp 0x8b19
movb 0x2c(%r14), %al
movb %al, 0x20(%rbx)
movb 0x2d(%r14), %al
movb %al, 0x21(%rbx)
movb 0x22(%rbx), %bpl
movb 0x2e(%r14), %r13b
cmpb %r13b, %bpl
je 0x8c64
testb %bpl, %bpl
sete %al
movl %ebp, %ecx
notb %cl
testb %cl, %r13b
sete %cl
orb %al, %cl
jne 0x8c5d
movq 0x60(%rbx), %rax
cmpq $0x0, (%rax)
je 0x8c5d
movzbl %bpl, %eax
movd %eax, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
pand 0x1952b(%rip), %xmm0    # 0x22090
pxor %xmm1, %xmm1
pcmpeqd %xmm1, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
movdqa %xmm0, %xmm1
pandn 0x1951f(%rip), %xmm1    # 0x220a0
pand 0x19527(%rip), %xmm0    # 0x220b0
por %xmm1, %xmm0
movd %xmm0, 0x265db(%rip)    # 0x2f170
leaq 0x265d4(%rip), %r12     # 0x2f170
leaq 0x13(%rsp), %r15
movl $0x5, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x5060
orb %bpl, %r13b
movzbl %r13b, %eax
movd %eax, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
pand 0x194c7(%rip), %xmm0    # 0x22090
pcmpeqd 0x194ef(%rip), %xmm0    # 0x220c0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
movdqa %xmm0, %xmm1
pandn 0x194bb(%rip), %xmm1    # 0x220a0
pand 0x194c3(%rip), %xmm0    # 0x220b0
por %xmm1, %xmm0
movd %xmm0, 0x26577(%rip)    # 0x2f170
leaq 0xe(%rsp), %r13
movl $0x5, %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x5060
movq 0x70(%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x7104
leaq 0x2a5de(%rip), %r12     # 0x33200
movq %r12, %rdi
movq %rax, %rsi
callq 0x5080
movq 0x18(%rbx), %rbp
movq 0x10(%r14), %rdi
callq 0x7104
movl $0x16, %edi
movq %rbp, %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x6f14
movb 0x2e(%r14), %r13b
movb 0x22(%rbx), %bpl
orb %r13b, %bpl
movb %bpl, 0x22(%rbx)
movb 0x2f(%r14), %al
cmpb 0x23(%rbx), %al
jbe 0x8c70
movb %al, 0x23(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq