	.file	"892529.c"
	.intel_syntax noprefix
	.text
	.globl	reverse
	.type	reverse, @function
reverse:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -1[rbp], al
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -28[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -1[rbp]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -28[rbp], 1
	sub	DWORD PTR -32[rbp], 1
.L2:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -32[rbp]
	jl	.L3
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	reverse, .-reverse
	.section	.rodata
.LC0:
	.string	")("
	.text
	.globl	recursion
	.type	recursion, @function
recursion:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 1080
	.cfi_offset 3, -24
	mov	QWORD PTR -1048[rbp], rdi
	mov	DWORD PTR -1052[rbp], esi
	mov	DWORD PTR -1056[rbp], edx
	mov	QWORD PTR -1064[rbp], rcx
	mov	QWORD PTR -1072[rbp], r8
	mov	QWORD PTR -1080[rbp], r9
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1040[rbp], 0
	mov	eax, DWORD PTR -1052[rbp]
	mov	DWORD PTR -1036[rbp], eax
	jmp	.L5
.L14:
	mov	eax, DWORD PTR -1036[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -1048[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -1064[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L6
	add	DWORD PTR -1040[rbp], 1
	jmp	.L7
.L6:
	mov	eax, DWORD PTR -1036[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -1048[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -1064[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L7
	sub	DWORD PTR -1040[rbp], 1
.L7:
	cmp	DWORD PTR -1040[rbp], 0
	js	.L8
	add	DWORD PTR -1036[rbp], 1
	jmp	.L5
.L8:
	mov	eax, DWORD PTR -1056[rbp]
	mov	DWORD PTR -1032[rbp], eax
	jmp	.L9
.L12:
	mov	eax, DWORD PTR -1032[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -1048[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -1064[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L10
	mov	eax, DWORD PTR -1032[rbp]
	cmp	eax, DWORD PTR -1056[rbp]
	je	.L11
	mov	eax, DWORD PTR -1032[rbp]
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -1048[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -1064[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	je	.L10
.L11:
	mov	eax, DWORD PTR -1032[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -1048[rbp]
	lea	rax, -1024[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	mov	eax, DWORD PTR -1032[rbp]
	cdqe
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -1048[rbp]
	add	rdx, rax
	lea	rcx, -1024[rbp]
	mov	eax, DWORD PTR -1032[rbp]
	cdqe
	add	rax, rcx
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	r8, QWORD PTR -1080[rbp]
	mov	rdi, QWORD PTR -1072[rbp]
	mov	rcx, QWORD PTR -1064[rbp]
	mov	edx, DWORD PTR -1032[rbp]
	mov	esi, DWORD PTR -1036[rbp]
	lea	rax, -1024[rbp]
	mov	r9, r8
	mov	r8, rdi
	mov	rdi, rax
	call	recursion
.L10:
	add	DWORD PTR -1032[rbp], 1
.L9:
	mov	eax, DWORD PTR -1032[rbp]
	cmp	eax, DWORD PTR -1036[rbp]
	jle	.L12
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -1036[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -1048[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L14
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -1028[rbp], eax
	mov	eax, DWORD PTR -1028[rbp]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -1048[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	reverse
	mov	rax, QWORD PTR -1064[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 40
	jne	.L15
	mov	rcx, QWORD PTR -1080[rbp]
	mov	rdx, QWORD PTR -1072[rbp]
	mov	rax, QWORD PTR -1048[rbp]
	mov	r9, rcx
	mov	r8, rdx
	lea	rcx, .LC0[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	recursion
	jmp	.L4
.L15:
	mov	rax, QWORD PTR -1080[rbp]
	mov	eax, DWORD PTR [rax]
	lea	ecx, 1[rax]
	mov	rdx, QWORD PTR -1080[rbp]
	mov	DWORD PTR [rdx], ecx
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -1072[rbp]
	lea	rbx, [rdx+rax]
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR [rbx], rax
.L4:
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	recursion, .-recursion
	.section	.rodata
.LC1:
	.string	"()"
	.text
	.globl	removeInvalidParentheses
	.type	removeInvalidParentheses, @function
removeInvalidParentheses:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	edi, 8000
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], 0
	mov	rcx, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r9, rcx
	mov	r8, rdx
	lea	rcx, .LC1[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	recursion
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	removeInvalidParentheses, .-removeInvalidParentheses
	.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	"892529.c"
	.text
	.align	2
	.global	reverse
	.syntax unified
	.arm
	.fpu softvfp
	.type	reverse, %function
reverse:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	b	.L2
.L3:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-5]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-16]
	add	r2, r2, r3
	ldr	r3, [fp, #-20]
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r2, [fp, #-5]
	strb	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
.L2:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L3
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	reverse, .-reverse
	.section	.rodata
	.align	2
.LC0:
	.ascii	")(\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	recursion
	.syntax unified
	.arm
	.fpu softvfp
	.type	recursion, %function
recursion:
	@ args = 8, pretend = 0, frame = 1048
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #1056
	sub	sp, sp, #4
	str	r0, [fp, #-1040]
	str	r1, [fp, #-1044]
	str	r2, [fp, #-1048]
	str	r3, [fp, #-1052]
	ldr	r3, [fp, #4]
	str	r3, [fp, #-1056]
	ldr	r3, [fp, #8]
	str	r3, [fp, #-1060]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1032]
	ldr	r3, [fp, #-1044]
	str	r3, [fp, #-1028]
	b	.L5
.L14:
	ldr	r3, [fp, #-1028]
	ldr	r2, [fp, #-1040]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-1052]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L6
	ldr	r3, [fp, #-1032]
	add	r3, r3, #1
	str	r3, [fp, #-1032]
	b	.L7
.L6:
	ldr	r3, [fp, #-1028]
	ldr	r2, [fp, #-1040]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-1052]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L7
	ldr	r3, [fp, #-1032]
	sub	r3, r3, #1
	str	r3, [fp, #-1032]
.L7:
	ldr	r3, [fp, #-1032]
	cmp	r3, #0
	blt	.L8
	ldr	r3, [fp, #-1028]
	add	r3, r3, #1
	str	r3, [fp, #-1028]
	b	.L5
.L8:
	ldr	r3, [fp, #-1048]
	str	r3, [fp, #-1024]
	b	.L9
.L12:
	ldr	r3, [fp, #-1024]
	ldr	r2, [fp, #-1040]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-1052]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L10
	ldr	r2, [fp, #-1024]
	ldr	r3, [fp, #-1048]
	cmp	r2, r3
	beq	.L11
	ldr	r3, [fp, #-1024]
	sub	r3, r3, #1
	ldr	r2, [fp, #-1040]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-1052]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L10
.L11:
	ldr	r2, [fp, #-1024]
	sub	r3, fp, #1016
	ldr	r1, [fp, #-1040]
	mov	r0, r3
	bl	strncpy
	sub	r2, fp, #1016
	ldr	r3, [fp, #-1024]
	add	r0, r2, r3
	ldr	r3, [fp, #-1024]
	add	r3, r3, #1
	ldr	r2, [fp, #-1040]
	add	r3, r2, r3
	mov	r1, r3
	bl	strcpy
	sub	r0, fp, #1016
	ldr	r3, [fp, #-1060]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-1056]
	str	r3, [sp]
	ldr	r3, [fp, #-1052]
	ldr	r2, [fp, #-1024]
	ldr	r1, [fp, #-1028]
	bl	recursion
.L10:
	ldr	r3, [fp, #-1024]
	add	r3, r3, #1
	str	r3, [fp, #-1024]
.L9:
	ldr	r2, [fp, #-1024]
	ldr	r3, [fp, #-1028]
	cmp	r2, r3
	ble	.L12
	b	.L4
.L5:
	ldr	r3, [fp, #-1028]
	ldr	r2, [fp, #-1040]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L14
	ldr	r0, [fp, #-1040]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-1020]
	ldr	r3, [fp, #-1020]
	sub	r3, r3, #1
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-1040]
	bl	reverse
	ldr	r3, [fp, #-1052]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #40
	bne	.L15
	ldr	r3, [fp, #-1060]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-1056]
	str	r3, [sp]
	ldr	r3, .L17+4
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-1040]
	bl	recursion
	b	.L4
.L15:
	ldr	r3, [fp, #-1060]
	ldr	r3, [r3]
	add	r1, r3, #1
	ldr	r2, [fp, #-1060]
	str	r1, [r2]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1056]
	add	r4, r2, r3
	ldr	r0, [fp, #-1040]
	bl	strdup
	mov	r3, r0
	str	r3, [r4]
.L4:
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC1
	.word	.LC0
	.size	recursion, .-recursion
	.section	.rodata
	.align	2
.LC2:
	.ascii	"()\000"
	.text
	.align	2
	.global	removeInvalidParentheses
	.syntax unified
	.arm
	.fpu softvfp
	.type	removeInvalidParentheses, %function
removeInvalidParentheses:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r0, #4000
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-8]
	str	r3, [sp]
	ldr	r3, .L21
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	recursion
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC2
	.size	removeInvalidParentheses, .-removeInvalidParentheses
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
