// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/obscure.c
// Function: sprintLongWithCommas
void sprintLongWithCommas(char *s, long long l)
/* Print out a long number with commas a thousands, millions, etc. */
{
long long trillions, billions, millions, thousands;
if (l >= 1000000000000LL)
    {
    trillions = l/1000000000000LL;
    l -= trillions * 1000000000000LL;
    billions = l/1000000000;
    l -= billions * 1000000000;
    millions = l/1000000;
    l -= millions * 1000000;
    thousands = l/1000;
    l -= thousands * 1000;
    sprintf(s, "%lld,%03lld,%03lld,%03lld,%03lld", trillions, billions, millions, thousands, l);
    }
else if (l >= 1000000000)
    {
    billions = l/1000000000;
    l -= billions * 1000000000;
    millions = l/1000000;
    l -= millions * 1000000;
    thousands = l/1000;
    l -= thousands * 1000;
    sprintf(s, "%lld,%03lld,%03lld,%03lld", billions, millions, thousands, l);
    }
else if (l >= 1000000)
    {
    millions = l/1000000;
    l -= millions * (long long)1000000;
    thousands = l/1000;
    l -= thousands * 1000;
    sprintf(s, "%lld,%03lld,%03lld", millions, thousands, l);
    }
else if (l >= 1000)
    {
    thousands = l/1000;
    l -= thousands * 1000;
    sprintf(s, "%lld,%03lld", thousands, l);
    }
else
    sprintf(s, "%lld", l);
}

// Assembly:
movq %rsi, %r8
movabsq $0xe8d4a51000, %rax     # imm = 0xE8D4A51000
cmpq %rax, %rsi
jl 0x10202
pushq %rax
movabsq $0x232f33025bd42233, %rcx # imm = 0x232F33025BD42233
movq %r8, %rax
mulq %rcx
movq %rdx, %r11
shrq $0x25, %r11
movabsq $-0xe8d4a51000, %rsi    # imm = 0xFFFFFF172B5AF000
imulq %r11, %rsi
addq %r8, %rsi
movabsq $0x112e0be826d694b3, %rcx # imm = 0x112E0BE826D694B3
movq %rsi, %rax
imulq %rcx
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x1a, %rdx
addq %rdx, %rcx
imulq $-0x3b9aca00, %rcx, %r10 # imm = 0xC4653600
addq %rsi, %r10
movabsq $0x431bde82d7b634db, %rdx # imm = 0x431BDE82D7B634DB
movq %r10, %rax
imulq %rdx
movq %rdx, %r8
shrq $0x3f, %r8
sarq $0x12, %rdx
addq %rdx, %r8
imulq $-0xf4240, %r8, %rsi    # imm = 0xFFF0BDC0
addq %r10, %rsi
movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF
movq %rsi, %rax
imulq %rdx
movq %rdx, %r9
shrq $0x3f, %r9
sarq $0x7, %rdx
addq %rdx, %r9
imulq $-0x3e8, %r9, %rax      # imm = 0xFC18
addq %rsi, %rax
movq %rax, (%rsp)
leaq 0xa713(%rip), %rsi      # 0x1a909
movq %r11, %rdx
xorl %eax, %eax
callq 0x36d0
popq %rax
retq
cmpq $0x3b9aca00, %r8        # imm = 0x3B9ACA00
jl 0x10295
movq %r8, %rax
shrq $0x9, %rax
movabsq $0x44b82fa09b5a53, %rcx # imm = 0x44B82FA09B5A53
mulq %rcx
movq %rdx, %r10
shrq $0xb, %r10
imulq $-0x3b9aca00, %r10, %rsi # imm = 0xC4653600
addq %r8, %rsi
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
movq %rsi, %rax
imulq %rcx
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x12, %rdx
addq %rdx, %rcx
imulq $-0xf4240, %rcx, %r11   # imm = 0xFFF0BDC0
addq %rsi, %r11
movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF
movq %r11, %rax
imulq %rdx
movq %rdx, %r8
shrq $0x3f, %r8
sarq $0x7, %rdx
addq %rdx, %r8
imulq $-0x3e8, %r8, %r9       # imm = 0xFC18
addq %r11, %r9
leaq 0xa69f(%rip), %rsi      # 0x1a92a
movq %r10, %rdx
xorl %eax, %eax
jmp 0x36d0
cmpq $0xf4240, %r8           # imm = 0xF4240
jl 0x102f8
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
movq %r8, %rax
mulq %rcx
movq %rdx, %r9
shrq $0x12, %r9
imulq $-0xf4240, %r9, %rsi    # imm = 0xFFF0BDC0
addq %r8, %rsi
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
movq %rsi, %rax
imulq %rcx
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x7, %rdx
addq %rdx, %rcx
imulq $-0x3e8, %rcx, %r8      # imm = 0xFC18
addq %rsi, %r8
leaq 0xa656(%rip), %rsi      # 0x1a944
movq %r9, %rdx
xorl %eax, %eax
jmp 0x36d0
cmpq $0x3e8, %r8             # imm = 0x3E8
jl 0x10331
movq %r8, %rax
shrq $0x3, %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
mulq %rcx
shrq $0x4, %rdx
imulq $-0x3e8, %rdx, %rcx     # imm = 0xFC18
addq %r8, %rcx
leaq 0xa62d(%rip), %rsi      # 0x1a957
xorl %eax, %eax
jmp 0x36d0
leaq 0x9546(%rip), %rsi      # 0x1987e
movq %r8, %rdx
xorl %eax, %eax
jmp 0x36d0