// File: /workspace/github_c_makefile_star2_O3/jsummers[P]deark/src/deark-util.c
// Function: de_print_base2_fixed
char *de_print_base2_fixed(char *buf, size_t buf_len, u64 n, UI bitcount)
{
	UI x;
	size_t bpos = 0;

	if(buf_len<(size_t)bitcount+1) {
		goto done;
	}

	for(x=0; x<bitcount; x++) {
		buf[bpos++] = (n & (1ULL<<(bitcount-1-x))) ? '1' : '0';
	}
done:
	buf[bpos] = '\0';
	return buf;
}

// Assembly:
movq %rdi, %rax
movl %ecx, %edi
cmpq %rsi, %rdi
setae %sil
testl %ecx, %ecx
sete %r8b
orb %sil, %r8b
jne 0xea3ec
leaq 0xf(%rdi), %rsi
andq $-0x10, %rsi
leaq -0x1(%rdi), %r8
movq %r8, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, -0x18(%rsp)
leal -0x1(%rcx), %r8d
movdqa 0x5c4ba(%rip), %xmm1    # 0x146200
movdqa 0x5c4c2(%rip), %xmm2    # 0x146210
movdqa 0x5c4ca(%rip), %xmm3    # 0x146220
movdqa 0x5c4d2(%rip), %xmm4    # 0x146230
movdqa 0x5c4da(%rip), %xmm5    # 0x146240
movdqa 0x5c4e2(%rip), %xmm6    # 0x146250
movdqa 0x4883a(%rip), %xmm7    # 0x1325b0
movdqa 0x46951(%rip), %xmm8    # 0x1306d0
xorl %r9d, %r9d
movdqa 0x46955(%rip), %xmm9    # 0x1306e0
pcmpeqd %xmm10, %xmm10
movdqa -0x18(%rsp), %xmm12
pxor %xmm9, %xmm12
movdqa %xmm8, %xmm13
pxor %xmm9, %xmm13
movdqa %xmm13, %xmm15
pcmpgtd %xmm12, %xmm15
pshufd $0xa0, %xmm15, %xmm14   # xmm14 = xmm15[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm0    # xmm0 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm13
pshufd $0xf5, %xmm13, %xmm13   # xmm13 = xmm13[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm11   # xmm11 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm0, %xmm11
pshufd $0xf5, %xmm15, %xmm15   # xmm15 = xmm15[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm0    # xmm0 = xmm15[0,2,2,3,4,5,6,7]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
movd %xmm0, %r10d
testb $0x1, %r10b
je 0xe9e07
btq %r8, %rdx
setae %r10b
xorb $0x31, %r10b
movb %r10b, (%rax,%r9)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm13
packsswb %xmm13, %xmm13
movd %xmm13, %r10d
shrl $0x8, %r10d
testb $0x1, %r10b
je 0xe9e4f
movl %r9d, %r10d
xorl $0x3e, %r10d
addl %ecx, %r10d
btq %r10, %rdx
setae %r10b
xorb $0x31, %r10b
movb %r10b, 0x1(%rax,%r9)
movdqa %xmm7, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm13   # xmm13 = xmm11[0,0,2,2]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm14    # xmm14 = xmm0[1,1,3,3]
movdqa %xmm14, %xmm0
pand %xmm13, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
por %xmm15, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
movd %xmm0, %r10d
shrl $0x10, %r10d
testb $0x1, %r10b
je 0xe9ec3
movl %r9d, %r10d
xorl $0x3d, %r10d
addl %ecx, %r10d
btq %r10, %rdx
setae %r10b
xorb $0x31, %r10b
movb %r10b, 0x2(%rax,%r9)
pshufhw $0x84, %xmm13, %xmm0    # xmm0 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm14, %xmm11   # xmm11 = xmm14[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm11
pshufhw $0x84, %xmm15, %xmm0    # xmm0 = xmm15[0,1,2,3,4,5,4,6]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
movd %xmm0, %r10d
shrl $0x18, %r10d
testb $0x1, %r10b
je 0xe9f16
movl %r9d, %r10d
xorl $0x3c, %r10d
addl %ecx, %r10d
btq %r10, %rdx
setae %r10b
xorb $0x31, %r10b
movb %r10b, 0x3(%rax,%r9)
movdqa %xmm6, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm14   # xmm14 = xmm11[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm15   # xmm15 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm13    # xmm13 = xmm0[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm0    # xmm0 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm15, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm11   # xmm11 = xmm15[0,2,2,3,4,5,6,7]
por %xmm0, %xmm11
pxor %xmm10, %xmm11
packssdw %xmm11, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x2, %xmm0, %r10d
testb $0x1, %r10b
je 0xe9f91
movl %r9d, %r10d
xorl $0x3b, %r10d
addl %ecx, %r10d
btq %r10, %rdx
setae %r10b
xorb $0x31, %r10b
movb %r10b, 0x4(%rax,%r9)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x2, %xmm0, %r10d
shrl $0x8, %r10d
testb $0x1, %r10b
je 0xe9fd9
movl %r9d, %r10d
xorl $0x3a, %r10d
addl %ecx, %r10d
btq %r10, %rdx
setae %r10b
xorb $0x31, %r10b
movb %r10b, 0x5(%rax,%r9)
movdqa %xmm5, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm13   # xmm13 = xmm11[0,0,2,2]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm14    # xmm14 = xmm0[1,1,3,3]
movdqa %xmm14, %xmm0
pand %xmm13, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
por %xmm15, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x3, %xmm0, %r10d
testb $0x1, %r10b
je 0xea04a
movl %r9d, %r10d
xorl $0x39, %r10d
addl %ecx, %r10d
btq %r10, %rdx
setae %r10b
xorb $0x31, %r10b
movb %r10b, 0x6(%rax,%r9)
pshufhw $0x84, %xmm13, %xmm0    # xmm0 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm14, %xmm11   # xmm11 = xmm14[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm11
pshufhw $0x84, %xmm15, %xmm0    # xmm0 = xmm15[0,1,2,3,4,5,4,6]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x3, %xmm0, %r10d
shrl $0x8, %r10d
testb $0x1, %r10b
je 0xea09e
movl %r9d, %r10d
xorl $0x38, %r10d
addl %ecx, %r10d
btq %r10, %rdx
setae %r10b
xorb $0x31, %r10b
movb %r10b, 0x7(%rax,%r9)
movdqa %xmm4, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm14   # xmm14 = xmm11[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm15   # xmm15 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm13    # xmm13 = xmm0[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm0    # xmm0 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm15, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm11   # xmm11 = xmm15[0,2,2,3,4,5,6,7]
por %xmm0, %xmm11
pxor %xmm10, %xmm11
packssdw %xmm11, %xmm11
packsswb %xmm11, %xmm0
pextrw $0x4, %xmm0, %r10d
testb $0x1, %r10b
je 0xea11a
movl %r9d, %r10d
xorl $0x37, %r10d
addl %ecx, %r10d
btq %r10, %rdx
setae %r10b
xorb $0x31, %r10b
movb %r10b, 0x8(%rax,%r9)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm13
packsswb %xmm13, %xmm0
pextrw $0x4, %xmm0, %r10d
shrl $0x8, %r10d
testb $0x1, %r10b
je 0xea163
movl %r9d, %r10d
xorl $0x36, %r10d
addl %ecx, %r10d
btq %r10, %rdx
setae %r10b
xorb $0x31, %r10b
movb %r10b, 0x9(%rax,%r9)
movdqa %xmm3, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm13   # xmm13 = xmm11[0,0,2,2]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm14    # xmm14 = xmm0[1,1,3,3]
movdqa %xmm14, %xmm0
pand %xmm13, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
por %xmm15, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x5, %xmm0, %r10d
testb $0x1, %r10b
je 0xea1d4
movl %r9d, %r10d
xorl $0x35, %r10d
addl %ecx, %r10d
btq %r10, %rdx
setae %r10b
xorb $0x31, %r10b
movb %r10b, 0xa(%rax,%r9)
pshufhw $0x84, %xmm13, %xmm0    # xmm0 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm14, %xmm11   # xmm11 = xmm14[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm11
pshufhw $0x84, %xmm15, %xmm0    # xmm0 = xmm15[0,1,2,3,4,5,4,6]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x5, %xmm0, %r10d
shrl $0x8, %r10d
testb $0x1, %r10b
je 0xea228
movl %r9d, %r10d
xorl $0x34, %r10d
addl %ecx, %r10d
btq %r10, %rdx
setae %r10b
xorb $0x31, %r10b
movb %r10b, 0xb(%rax,%r9)
movdqa %xmm2, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm14   # xmm14 = xmm11[0,0,2,2]
pshuflw $0xe8, %xmm14, %xmm15   # xmm15 = xmm14[0,2,2,3,4,5,6,7]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm13    # xmm13 = xmm0[1,1,3,3]
pshuflw $0xe8, %xmm13, %xmm0    # xmm0 = xmm13[0,2,2,3,4,5,6,7]
pand %xmm15, %xmm0
pshufd $0xf5, %xmm11, %xmm15   # xmm15 = xmm11[1,1,3,3]
pshuflw $0xe8, %xmm15, %xmm11   # xmm11 = xmm15[0,2,2,3,4,5,6,7]
por %xmm0, %xmm11
pxor %xmm10, %xmm11
packssdw %xmm11, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x6, %xmm0, %r10d
testb $0x1, %r10b
je 0xea2a3
movl %r9d, %r10d
xorl $0x33, %r10d
addl %ecx, %r10d
btq %r10, %rdx
setae %r10b
xorb $0x31, %r10b
movb %r10b, 0xc(%rax,%r9)
pand %xmm14, %xmm13
por %xmm15, %xmm13
packssdw %xmm13, %xmm13
pxor %xmm10, %xmm13
packssdw %xmm13, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x6, %xmm0, %r10d
shrl $0x8, %r10d
testb $0x1, %r10b
je 0xea2eb
movl %r9d, %r10d
xorl $0x32, %r10d
addl %ecx, %r10d
btq %r10, %rdx
setae %r10b
xorb $0x31, %r10b
movb %r10b, 0xd(%rax,%r9)
movdqa %xmm1, %xmm0
pxor %xmm9, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm12, %xmm11
pshufd $0xa0, %xmm11, %xmm13   # xmm13 = xmm11[0,0,2,2]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm12    # xmm12 = xmm0[1,1,3,3]
movdqa %xmm12, %xmm0
pand %xmm13, %xmm0
pshufd $0xf5, %xmm11, %xmm14   # xmm14 = xmm11[1,1,3,3]
por %xmm14, %xmm0
packssdw %xmm0, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x7, %xmm0, %r10d
testb $0x1, %r10b
je 0xea35c
movl %r9d, %r10d
xorl $0x31, %r10d
addl %ecx, %r10d
btq %r10, %rdx
setae %r10b
xorb $0x31, %r10b
movb %r10b, 0xe(%rax,%r9)
pshufhw $0x84, %xmm13, %xmm0    # xmm0 = xmm13[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm12, %xmm11   # xmm11 = xmm12[0,1,2,3,4,5,4,6]
pand %xmm0, %xmm11
pshufhw $0x84, %xmm14, %xmm0    # xmm0 = xmm14[0,1,2,3,4,5,4,6]
por %xmm11, %xmm0
pxor %xmm10, %xmm0
packssdw %xmm0, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x7, %xmm0, %r10d
shrl $0x8, %r10d
testb $0x1, %r10b
je 0xea3b0
movl %r9d, %r10d
xorl $0x30, %r10d
addl %ecx, %r10d
btq %r10, %rdx
setae %r10b
xorb $0x31, %r10b
movb %r10b, 0xf(%rax,%r9)
addq $0x10, %r9
movdqa 0x40484(%rip), %xmm0    # 0x12a840
paddq %xmm0, %xmm8
paddq %xmm0, %xmm7
paddq %xmm0, %xmm6
paddq %xmm0, %xmm5
paddq %xmm0, %xmm4
paddq %xmm0, %xmm3
paddq %xmm0, %xmm2
paddq %xmm0, %xmm1
addl $-0x10, %r8d
cmpq %r9, %rsi
jne 0xe9d90
jmp 0xea3ee
xorl %edi, %edi
movb $0x0, (%rax,%rdi)
retq