	.file	"extr_ccgi.c_CGI_decode_hex.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	CGI_decode_hex
	.type	CGI_decode_hex, @function
CGI_decode_hex:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	QWORD PTR 8[rsp], rsi
	test	rdi, rdi
	je	.L6
	mov	r12, rdi
	xor	r14d, r14d
	call	strlen@PLT
	mov	ecx, eax
	mov	rbp, rax
	and	ecx, 1
	mov	DWORD PTR 4[rsp], ecx
	jne	.L1
	mov	edi, eax
	shr	edi, 31
	add	edi, eax
	xor	eax, eax
	sar	edi
	add	edi, 1
	call	mymalloc@PLT
	test	ebp, ebp
	mov	ecx, DWORD PTR 4[rsp]
	movsx	r14, eax
	mov	r13, r14
	jle	.L3
	sub	ebp, 1
	mov	r15d, 1
	shr	ebp
	add	rbp, 2
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L16:
	movsx	edi, BYTE PTR -1[r12+r15*2]
	xor	eax, eax
	call	hex@PLT
	test	eax, eax
	js	.L4
	sal	ebx, 4
	mov	ecx, r15d
	add	r15, 1
	add	ebx, eax
	mov	BYTE PTR -2[r15+r13], bl
	cmp	r15, rbp
	je	.L15
.L5:
	movsx	edi, BYTE PTR -2[r12+r15*2]
	xor	eax, eax
	call	hex@PLT
	mov	ebx, eax
	test	eax, eax
	jns	.L16
.L4:
	mov	rdi, r13
	xor	r14d, r14d
	call	free@PLT
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r14
	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
.L15:
	.cfi_restore_state
	movsx	rax, ecx
	add	r13, rax
.L3:
	mov	rax, QWORD PTR 8[rsp]
	mov	BYTE PTR 0[r13], 0
	test	rax, rax
	je	.L1
	mov	DWORD PTR [rax], ecx
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	xor	r14d, r14d
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	CGI_decode_hex, .-CGI_decode_hex
	.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_ccgi.c_CGI_decode_hex.c"
	.text
	.align	2
	.global	CGI_decode_hex
	.syntax unified
	.arm
	.fpu softvfp
	.type	CGI_decode_hex, %function
CGI_decode_hex:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	subs	r4, r0, #0
	beq	.L7
	mov	r9, r1
	bl	strlen
	ands	r5, r0, #1
	mov	r7, r0
	bne	.L7
	asr	r0, r0, #1
	add	r0, r0, #1
	bl	mymalloc
	cmp	r7, #0
	mov	r6, r0
	beq	.L8
	sub	r8, r7, #1
	lsr	r8, r8, #1
	add	r8, r8, #1
	mov	r7, r8
	add	r4, r4, #1
	b	.L5
.L17:
	ldrb	r0, [r4]	@ zero_extendqisi2
	bl	hex
	cmp	r0, #0
	add	r3, r5, #1
	add	r0, r0, r10, lsl #4
	blt	.L4
	cmp	r3, r8
	strb	r0, [r6, r5]
	add	r4, r4, #2
	beq	.L16
	mov	r5, r3
.L5:
	ldrb	r0, [r4, #-1]	@ zero_extendqisi2
	bl	hex
	subs	r10, r0, #0
	bge	.L17
.L4:
	mov	r0, r6
	bl	free
.L7:
	mov	r6, #0
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L16:
	add	r8, r6, r8
.L3:
	mov	r3, #0
	cmp	r9, r3
	strb	r3, [r8]
	mov	r0, r6
	strne	r7, [r9]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	mov	r8, r0
	b	.L3
	.size	CGI_decode_hex, .-CGI_decode_hex
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
