	.file	"extr_misc.c_bin2str.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"0x"
.LC1:
	.string	"%%02%c"
.LC2:
	.string	"0b"
	.text
	.p2align 4
	.globl	bin2str
	.type	bin2str, @function
bin2str:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edx
	mov	edx, 2
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	lea	rsi, .LC0[rip]
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	strncasecmp@PLT
	test	rax, rax
	je	.L21
	mov	edx, 2
	lea	rsi, .LC2[rip]
	mov	rdi, r13
	xor	r12d, r12d
	call	strncasecmp@PLT
	test	rax, rax
	je	.L22
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L23
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	lea	eax, 8[0+rbp*4]
	movsx	rdi, eax
	sar	eax, 31
	imul	rdi, rdi, 1431655766
	shr	rdi, 32
	sub	edi, eax
	add	edi, 3
	call	malloc@PLT
	mov	rsi, r13
	mov	r12, rax
	mov	rdi, rax
	call	strcpy@PLT
	lea	rsi, 2[r12]
	xor	r8d, r8d
	test	ebp, ebp
	jle	.L6
	xor	ecx, ecx
	mov	edi, 2863311531
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L24:
	shr	dl, 2
	add	rsi, 1
	movzx	edx, dl
	mov	rax, QWORD PTR [r9+rdx*8]
	mov	BYTE PTR -1[rsi], al
	movzx	eax, BYTE PTR [rbx]
	sal	eax, 4
	and	eax, 48
	mov	r8d, eax
.L9:
	add	ecx, 1
	add	rbx, 1
	cmp	ebp, ecx
	je	.L6
.L10:
	mov	eax, ecx
	mov	edx, ecx
	mov	r9, QWORD PTR base64[rip]
	imul	rax, rdi
	shr	rax, 33
	lea	eax, [rax+rax*2]
	sub	edx, eax
	mov	eax, edx
	movzx	edx, BYTE PTR [rbx]
	cmp	eax, 1
	je	.L7
	cmp	eax, 2
	jne	.L24
	shr	dl, 6
	add	ecx, 1
	add	rsi, 2
	add	rbx, 1
	movzx	edx, dl
	add	r8d, edx
	movsx	rax, r8d
	mov	rax, QWORD PTR [r9+rax*8]
	mov	BYTE PTR -2[rsi], al
	movzx	eax, BYTE PTR -1[rbx]
	mov	rdx, QWORD PTR base64[rip]
	and	eax, 63
	mov	rax, QWORD PTR [rdx+rax*8]
	mov	BYTE PTR -1[rsi], al
	cmp	ebp, ecx
	jne	.L10
.L6:
	movsx	rax, ebp
	mov	edx, ebp
	imul	rax, rax, 1431655766
	sar	edx, 31
	shr	rax, 32
	sub	eax, edx
	lea	eax, [rax+rax*2]
	sub	ebp, eax
	cmp	ebp, 1
	je	.L11
	cmp	ebp, 2
	je	.L12
.L13:
	mov	BYTE PTR [rsi], 0
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	shr	dl, 4
	add	rsi, 1
	movzx	eax, dl
	add	eax, r8d
	cdqe
	mov	rax, QWORD PTR [r9+rax*8]
	mov	BYTE PTR -1[rsi], al
	movzx	eax, BYTE PTR [rbx]
	sal	eax, 2
	and	eax, 60
	mov	r8d, eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L21:
	lea	edi, 3[rbp+rbp]
	lea	r15d, -1[rbp]
	call	malloc@PLT
	mov	rsi, r13
	mov	rdi, rax
	mov	r12, rax
	call	strcpy@PLT
	movsx	edx, BYTE PTR 1[r13]
	lea	r13, 19[rsp]
	lea	rsi, .LC1[rip]
	mov	rdi, r13
	lea	r14, 2[r12]
	call	sprintf@PLT
	test	ebp, ebp
	jle	.L3
	mov	eax, r15d
	mov	r15, r14
	mov	QWORD PTR 8[rsp], rax
	lea	rbp, 4[r12+rax*2]
	.p2align 4,,10
	.p2align 3
.L4:
	movsx	edx, BYTE PTR [rbx]
	mov	rdi, r15
	mov	rsi, r13
	add	r15, 2
	add	rbx, 1
	call	sprintf@PLT
	cmp	r15, rbp
	jne	.L4
	mov	rax, QWORD PTR 8[rsp]
	lea	r14, 2[r14+rax*2]
.L3:
	mov	BYTE PTR [r14], 0
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdx, QWORD PTR base64[rip]
	movsx	rax, r8d
	add	rsi, 2
	mov	rax, QWORD PTR [rdx+rax*8]
	mov	BYTE PTR -1[rsi], 61
	mov	BYTE PTR -2[rsi], al
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdx, QWORD PTR base64[rip]
	movsx	rax, r8d
	add	rsi, 3
	mov	rax, QWORD PTR [rdx+rax*8]
	mov	BYTE PTR -3[rsi], al
	mov	eax, 15677
	mov	WORD PTR -2[rsi], ax
	jmp	.L13
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	bin2str, .-bin2str
	.comm	base64,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_misc.c_bin2str.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"0x\000"
	.align	2
.LC1:
	.ascii	"%%02%c\000"
	.align	2
.LC2:
	.ascii	"0b\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	bin2str
	.syntax unified
	.arm
	.fpu softvfp
	.type	bin2str, %function
bin2str:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L24
	sub	sp, sp, #16
	mov	r10, r1
	mov	r6, r2
	ldr	r1, .L24+4
	mov	r2, #2
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r4, r0
	bl	strncasecmp
	cmp	r0, #0
	beq	.L20
	mov	r2, #2
	mov	r0, r4
	ldr	r1, .L24+8
	bl	strncasecmp
	subs	r5, r0, #0
	movne	r7, #0
	beq	.L21
.L1:
	ldr	r3, .L24
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	mov	r0, r7
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L21:
	ldr	r3, .L24+12
	add	r0, r6, #2
	lsl	r0, r0, #2
	smull	r2, r3, r0, r3
	sub	r0, r3, r0, asr #31
	add	r0, r0, #3
	bl	malloc
	mov	r7, r0
	mov	r1, r4
	bl	strcpy
	cmp	r6, #0
	add	ip, r7, #2
	ble	.L6
	ldr	r3, .L24+16
	sub	r4, r10, #1
	rsb	r1, r10, #1
	ldr	r8, [r3]
	ldr	r9, .L24+20
	add	r10, r4, r6
	b	.L10
.L23:
	lsr	r3, lr, #2
	ldr	r3, [r8, r3, lsl #2]
	lsl	lr, lr, #4
	strb	r3, [ip], #1
	and	r5, lr, #48
.L9:
	cmp	r4, r10
	beq	.L6
.L10:
	add	r3, r1, r4
	umull	r2, r0, r9, r3
	bic	r2, r0, #1
	add	r2, r2, r0, lsr #1
	sub	r3, r3, r2
	cmp	r3, #1
	ldrb	lr, [r4, #1]!	@ zero_extendqisi2
	beq	.L7
	cmp	r3, #2
	bne	.L23
	mov	r3, ip
	add	r5, r5, lr, lsr #6
	ldr	r2, [r8, r5, lsl #2]
	and	lr, lr, #63
	strb	r2, [r3], #2
	ldr	r2, [r8, lr, lsl #2]
	cmp	r4, r10
	strb	r2, [ip, #1]
	mov	ip, r3
	bne	.L10
.L6:
	ldr	r3, .L24+12
	smull	r2, r3, r6, r3
	sub	r3, r3, r6, asr #31
	add	r3, r3, r3, lsl #1
	sub	r3, r6, r3
	cmp	r3, #1
	beq	.L11
	cmp	r3, #2
	beq	.L12
	mov	r3, #0
	strb	r3, [ip]
	b	.L1
.L7:
	add	r5, r5, lr, lsr #4
	ldr	r3, [r8, r5, lsl #2]
	lsl	lr, lr, #2
	strb	r3, [ip], #1
	and	r5, lr, #60
	b	.L9
.L20:
	lsl	r0, r6, #1
	add	r0, r0, #3
	bl	malloc
	mov	r7, r0
	mov	r1, r4
	bl	strcpy
	ldrb	r2, [r4, #1]	@ zero_extendqisi2
	ldr	r1, .L24+24
	add	r0, sp, #4
	bl	sprintf
	cmp	r6, #0
	add	r4, r7, #2
	ble	.L3
	add	r6, r6, #1
	add	r6, r7, r6, lsl #1
.L4:
	mov	r0, r4
	ldrb	r2, [r10], #1	@ zero_extendqisi2
	add	r1, sp, #4
	add	r4, r4, #2
	bl	sprintf
	cmp	r6, r4
	bne	.L4
.L3:
	mov	r3, #0
	strb	r3, [r4]
	b	.L1
.L12:
	mov	r3, ip
	mov	r2, #61
	ldr	r1, .L24+16
	ldr	r1, [r1]
	ldr	r1, [r1, r5, lsl #2]
	strb	r1, [r3], #2
	strb	r2, [ip, #1]
	mov	ip, r3
	mov	r3, #0
	strb	r3, [ip]
	b	.L1
.L11:
	mov	r3, #61
	ldr	r2, .L24+16
	add	ip, ip, #3
	ldr	r2, [r2]
	ldr	r2, [r2, r5, lsl #2]
	strb	r3, [ip, #-2]
	strb	r3, [ip, #-1]
	mov	r3, #0
	strb	r2, [ip, #-3]
	strb	r3, [ip]
	b	.L1
.L22:
	bl	__stack_chk_fail
.L25:
	.align	2
.L24:
	.word	.LC3
	.word	.LC0
	.word	.LC2
	.word	1431655766
	.word	base64
	.word	-1431655765
	.word	.LC1
	.size	bin2str, .-bin2str
	.comm	base64,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
