// File: /workspace/github_c_makefile_star2_O0/983[P]bigint/bigint.c
// Function: bigint_raw_add_signed
int bigint_raw_add_signed(
    bigint_word *dst, int *dst_neg,
    const bigint_word *a, int na, int a_neg,
    const bigint_word *b, int nb, int b_neg
){
    if (a_neg){
        if (b_neg){
            if (na >= nb){
                *dst_neg = 1;
                return bigint_raw_add(dst, a, na, b, nb);
            }else{
                *dst_neg = 1;
                return bigint_raw_add(dst, b, nb, a, na);
            }
        }else{
            if (bigint_raw_cmp_abs(a, na, b, nb) >= 0){
                *dst_neg = 1;
                return bigint_raw_sub(dst, a, na, b, nb);
            }else{
                *dst_neg = 0;
                return bigint_raw_sub(dst, b, nb, a, na);
            }
        }
    }else{
        if (b_neg){
            if (bigint_raw_cmp_abs(a, na, b, nb) >= 0){
                *dst_neg = 0;
                return bigint_raw_sub(dst, a, na, b, nb);
            }else{
                *dst_neg = 1;
                return bigint_raw_sub(dst, b, nb, a, na);
            }
        }else{
            if (na >= nb){
                *dst_neg = 0;
                return bigint_raw_add(dst, a, na, b, nb);
            }else{
                *dst_neg = 0;
                return bigint_raw_add(dst, b, nb, a, na);
            }
        }
    }
}

// Assembly:
subq $0x38, %rsp
movl 0x48(%rsp), %eax
movl 0x40(%rsp), %eax
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movl %ecx, 0x14(%rsp)
movl %r8d, 0x10(%rsp)
movq %r9, 0x8(%rsp)
cmpl $0x0, 0x10(%rsp)
je 0x3be5
cmpl $0x0, 0x48(%rsp)
je 0x3b67
movl 0x14(%rsp), %eax
cmpl 0x40(%rsp), %eax
jl 0x3b36
movq 0x20(%rsp), %rax
movl $0x1, (%rax)
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl 0x14(%rsp), %edx
movq 0x8(%rsp), %rcx
movl 0x40(%rsp), %r8d
callq 0x2ce0
movl %eax, 0x34(%rsp)
jmp 0x3ccb
movq 0x20(%rsp), %rax
movl $0x1, (%rax)
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl 0x40(%rsp), %edx
movq 0x18(%rsp), %rcx
movl 0x14(%rsp), %r8d
callq 0x2ce0
movl %eax, 0x34(%rsp)
jmp 0x3ccb
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movq 0x8(%rsp), %rdx
movl 0x40(%rsp), %ecx
callq 0x21d0
cmpl $0x0, %eax
jl 0x3bb4
movq 0x20(%rsp), %rax
movl $0x1, (%rax)
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl 0x14(%rsp), %edx
movq 0x8(%rsp), %rcx
movl 0x40(%rsp), %r8d
callq 0x2e60
movl %eax, 0x34(%rsp)
jmp 0x3ccb
movq 0x20(%rsp), %rax
movl $0x0, (%rax)
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl 0x40(%rsp), %edx
movq 0x18(%rsp), %rcx
movl 0x14(%rsp), %r8d
callq 0x2e60
movl %eax, 0x34(%rsp)
jmp 0x3ccb
cmpl $0x0, 0x48(%rsp)
je 0x3c67
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movq 0x8(%rsp), %rdx
movl 0x40(%rsp), %ecx
callq 0x21d0
cmpl $0x0, %eax
jl 0x3c39
movq 0x20(%rsp), %rax
movl $0x0, (%rax)
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl 0x14(%rsp), %edx
movq 0x8(%rsp), %rcx
movl 0x40(%rsp), %r8d
callq 0x2e60
movl %eax, 0x34(%rsp)
jmp 0x3ccb
movq 0x20(%rsp), %rax
movl $0x1, (%rax)
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl 0x40(%rsp), %edx
movq 0x18(%rsp), %rcx
movl 0x14(%rsp), %r8d
callq 0x2e60
movl %eax, 0x34(%rsp)
jmp 0x3ccb
movl 0x14(%rsp), %eax
cmpl 0x40(%rsp), %eax
jl 0x3c9f
movq 0x20(%rsp), %rax
movl $0x0, (%rax)
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl 0x14(%rsp), %edx
movq 0x8(%rsp), %rcx
movl 0x40(%rsp), %r8d
callq 0x2ce0
movl %eax, 0x34(%rsp)
jmp 0x3ccb
movq 0x20(%rsp), %rax
movl $0x0, (%rax)
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl 0x40(%rsp), %edx
movq 0x18(%rsp), %rcx
movl 0x14(%rsp), %r8d
callq 0x2ce0
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)