	.file	"37639099.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%%%02X"
	.text
	.globl	urlencode
	.type	urlencode, @function
urlencode:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	add	rax, 1
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	QWORD PTR -48[rbp], 0
	jmp	.L2
.L5:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rcx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8
	test	eax, eax
	je	.L3
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	rdi, rax
	call	strncat@PLT
	jmp	.L4
.L3:
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	lea	rax, -12[rbp]
	mov	ecx, edx
	lea	rdx, .LC0[rip]
	mov	esi, 4
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	lea	rdx, -12[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
.L4:
	add	QWORD PTR -48[rbp], 1
.L2:
	mov	rax, QWORD PTR -48[rbp]
	cmp	rax, QWORD PTR -32[rbp]
	jb	.L5
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	urlencode, .-urlencode
	.type	is_hex_digit, @function
is_hex_digit:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	eax, edi
	mov	BYTE PTR -4[rbp], al
	movsx	eax, BYTE PTR -4[rbp]
	mov	edi, eax
	call	toupper@PLT
	mov	BYTE PTR -4[rbp], al
	cmp	BYTE PTR -4[rbp], 64
	jle	.L9
	cmp	BYTE PTR -4[rbp], 70
	jle	.L10
.L9:
	cmp	BYTE PTR -4[rbp], 47
	jle	.L11
	cmp	BYTE PTR -4[rbp], 57
	jg	.L11
.L10:
	mov	eax, 1
	jmp	.L13
.L11:
	mov	eax, 0
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	is_hex_digit, .-is_hex_digit
	.globl	urldecode
	.type	urldecode, @function
urldecode:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	QWORD PTR -72[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -52[rbp], 78
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 1
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	QWORD PTR -48[rbp], 0
	mov	DWORD PTR -13[rbp], 808482864
	mov	BYTE PTR -9[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	jmp	.L15
.L28:
	cmp	DWORD PTR -52[rbp], 80
	je	.L16
	cmp	DWORD PTR -52[rbp], 80
	ja	.L17
	cmp	DWORD PTR -52[rbp], 78
	je	.L18
	cmp	DWORD PTR -52[rbp], 78
	ja	.L17
	cmp	DWORD PTR -52[rbp], 66
	je	.L19
	cmp	DWORD PTR -52[rbp], 73
	je	.L20
	jmp	.L17
.L18:
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 37
	jne	.L21
	mov	DWORD PTR -52[rbp], 80
	jmp	.L17
.L21:
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -40[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -48[rbp], rdx
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR [rcx]
	mov	BYTE PTR [rdx], al
	jmp	.L17
.L16:
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	is_hex_digit
	test	eax, eax
	jne	.L23
	mov	DWORD PTR -52[rbp], 73
	jmp	.L17
.L23:
	mov	DWORD PTR -52[rbp], 66
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	toupper@PLT
	mov	BYTE PTR -11[rbp], al
	jmp	.L17
.L19:
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	is_hex_digit
	test	eax, eax
	jne	.L25
	mov	DWORD PTR -52[rbp], 73
	jmp	.L17
.L25:
	mov	DWORD PTR -52[rbp], 78
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	toupper@PLT
	mov	BYTE PTR -10[rbp], al
	lea	rax, -13[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -48[rbp], rdx
	mov	rdx, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	jmp	.L17
.L20:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	jmp	.L29
.L17:
	add	QWORD PTR -40[rbp], 1
.L15:
	mov	rax, QWORD PTR -40[rbp]
	cmp	rax, QWORD PTR -32[rbp]
	jb	.L28
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -24[rbp]
.L29:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	urldecode, .-urldecode
	.section	.rodata
	.align 8
.LC1:
	.string	"\303\201rv\303\255zt\305\261r\305\221 T\303\274k\303\266rf\303\272r\303\263g\303\251p"
.LC2:
	.string	"Original: %s\n"
.LC3:
	.string	" Encoded: %s\n"
.LC4:
	.string	" Decoded: %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	lea	rax, .LC1[rip]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	urlencode
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	urldecode
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"37639099.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%%%02X\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	urlencode
	.syntax unified
	.arm
	.fpu softvfp
	.type	urlencode, %function
urlencode:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-32]
	bl	strlen
	str	r0, [fp, #-20]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L2
.L5:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r1, [fp, #-24]
	ldr	r3, [fp, #-28]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8
	cmp	r3, #0
	beq	.L3
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	strncat
	b	.L4
.L3:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r0, fp, #12
	ldr	r2, .L8+4
	mov	r1, #4
	bl	snprintf
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	strcat
.L4:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L2:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bcc	.L5
	ldr	r3, [fp, #-16]
	ldr	r2, .L8
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC1
	.word	.LC0
	.size	urlencode, .-urlencode
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_hex_digit, %function
is_hex_digit:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	toupper
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #64
	bls	.L11
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #70
	bls	.L12
.L11:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #47
	bls	.L13
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #57
	bhi	.L13
.L12:
	mov	r3, #1
	b	.L15
.L13:
	mov	r3, #0
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	is_hex_digit, .-is_hex_digit
	.section	.rodata
	.align	2
.LC2:
	.ascii	"0x00\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	urldecode
	.syntax unified
	.arm
	.fpu softvfp
	.type	urldecode, %function
urldecode:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	ldr	r3, .L34
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #78
	str	r3, [fp, #-36]
	ldr	r0, [fp, #-40]
	bl	strlen
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-32]
	ldr	r2, .L34+4
	sub	r3, fp, #16
	ldm	r2, {r0, r1}
	str	r0, [r3]
	add	r3, r3, #4
	strb	r1, [r3]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L17
.L31:
	ldr	r3, [fp, #-36]
	sub	r3, r3, #66
	cmp	r3, #14
	ldrls	pc, [pc, r3, asl #2]
	b	.L18
.L20:
	.word	.L23
	.word	.L18
	.word	.L18
	.word	.L18
	.word	.L18
	.word	.L18
	.word	.L18
	.word	.L22
	.word	.L18
	.word	.L18
	.word	.L18
	.word	.L18
	.word	.L21
	.word	.L18
	.word	.L19
.L21:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #37
	bne	.L24
	mov	r3, #80
	str	r3, [fp, #-36]
	b	.L18
.L24:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r2, r2, r3
	ldr	r3, [fp, #-32]
	add	r1, r3, #1
	str	r1, [fp, #-32]
	ldr	r1, [fp, #-20]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	b	.L18
.L19:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	is_hex_digit
	mov	r3, r0
	cmp	r3, #0
	bne	.L26
	mov	r3, #73
	str	r3, [fp, #-36]
	b	.L18
.L26:
	mov	r3, #66
	str	r3, [fp, #-36]
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	toupper
	mov	r3, r0
	and	r3, r3, #255
	strb	r3, [fp, #-14]
	b	.L18
.L23:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	is_hex_digit
	mov	r3, r0
	cmp	r3, #0
	bne	.L28
	mov	r3, #73
	str	r3, [fp, #-36]
	b	.L18
.L28:
	mov	r3, #78
	str	r3, [fp, #-36]
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	toupper
	mov	r3, r0
	and	r3, r3, #255
	strb	r3, [fp, #-13]
	sub	r3, fp, #16
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	mov	r1, r0
	ldr	r3, [fp, #-32]
	add	r2, r3, #1
	str	r2, [fp, #-32]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	and	r2, r1, #255
	strb	r2, [r3]
	b	.L18
.L22:
	ldr	r0, [fp, #-20]
	bl	free
	mov	r3, #0
	b	.L32
.L18:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L17:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	bcc	.L31
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-20]
.L32:
	ldr	r2, .L34
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L33
	bl	__stack_chk_fail
.L33:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L35:
	.align	2
.L34:
	.word	.LC3
	.word	.LC2
	.size	urldecode, .-urldecode
	.section	.rodata
	.align	2
.LC4:
	.ascii	"\303\201rv\303\255zt\305\261r\305\221 T\303\274k\303"
	.ascii	"\266rf\303\272r\303\263g\303\251p\000"
	.align	2
.LC5:
	.ascii	"Original: %s\012\000"
	.align	2
.LC6:
	.ascii	" Encoded: %s\012\000"
	.align	2
.LC7:
	.ascii	" Decoded: %s\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L38
	str	r3, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	urlencode
	str	r0, [fp, #-12]
	ldr	r0, [fp, #-12]
	bl	urldecode
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-16]
	ldr	r0, .L38+4
	bl	printf
	ldr	r1, [fp, #-12]
	ldr	r0, .L38+8
	bl	printf
	ldr	r1, [fp, #-8]
	ldr	r0, .L38+12
	bl	printf
	ldr	r0, [fp, #-12]
	bl	free
	ldr	r0, [fp, #-8]
	bl	free
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L39:
	.align	2
.L38:
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
