Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
// AOJ 2783 Parentheses
// 2018.2.2 bal4u

#include <stdio.h>
#include <string.h>

char s[50000];

int main()
{
	long long A, lo, hi, mi;

	scanf("%lld", &A);
	lo = 0, hi = A+1;
	while (hi - lo > 1) {
		mi = (lo + hi) >> 1;
		if ((mi*(mi+1)>>1) <= A) lo = mi; else hi = mi;
	}
	A -= lo*(lo+1) >> 1;

	if (A) {
		memset(s, ')', lo+2), s[lo+2] = 0;
		if (A < lo+2) s[A] = '(', A = -1;
		else A -= lo+2;
		printf(s);

		memset(s, '(', lo), s[lo] = 0;
		if (A >= 0) s[A] = '(';
		puts(s);
	} else {
		memset(s, ')', lo), s[lo] = 0; printf(s);
		memset(s, '(', lo); puts(s);
	}
	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rsi
	leaq	1(%rsi), %rcx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	(%rcx,%r12), %rdx
	sarq	%rdx
	leaq	1(%rdx), %rax
	imulq	%rdx, %rax
	sarq	%rax
	cmpq	%rax, %rsi
	cmovl	%rdx, %rcx
	cmovge	%rdx, %r12
.L3:
	movq	%rcx, %rax
	subq	%r12, %rax
	cmpq	$1, %rax
	jg	.L4
	leaq	1(%r12), %r13
	movq	%rsi, %rbx
	movq	%r13, %rax
	imulq	%r12, %rax
	sarq	%rax
	subq	%rax, %rbx
	movq	%rbx, (%rsp)
	je	.L5
	leaq	2(%r12), %r14
	movl	$50000, %ecx
	movl	$41, %esi
	leaq	s(%rip), %rbp
	movq	%r14, %rdx
	movq	%rbp, %rdi
	call	__memset_chk@PLT
	movq	%rbx, %rax
	movb	$0, 2(%rbp,%r12)
	subq	%r14, %rax
	cmpq	%rbx, %r13
	jl	.L7
	movb	$40, 0(%rbp,%rbx)
	orq	$-1, %rax
.L7:
	movq	%rax, (%rsp)
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$50000, %ecx
	movq	%r12, %rdx
	movq	%rbp, %rdi
	movl	$40, %esi
	call	__memset_chk@PLT
	movq	(%rsp), %rax
	movb	$0, 0(%rbp,%r12)
	testq	%rax, %rax
	js	.L13
	movb	$40, 0(%rbp,%rax)
.L13:
	movq	%rbp, %rdi
	call	puts@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	leaq	s(%rip), %rbp
	movq	%r12, %rdx
	movl	$50000, %ecx
	movl	$41, %esi
	movq	%rbp, %rdi
	call	__memset_chk@PLT
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movb	$0, 0(%rbp,%r12)
	call	__printf_chk@PLT
	movl	$50000, %ecx
	movq	%r12, %rdx
	movq	%rbp, %rdi
	movl	$40, %esi
	call	__memset_chk@PLT
	jmp	.L13
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 50000
s:
	.zero	50000
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.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:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rsi
	leaq	1(%rsi), %rcx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	(%rcx,%r12), %rdx
	sarq	%rdx
	leaq	1(%rdx), %rax
	imulq	%rdx, %rax
	sarq	%rax
	cmpq	%rax, %rsi
	cmovl	%rdx, %rcx
	cmovge	%rdx, %r12
.L3:
	movq	%rcx, %rax
	subq	%r12, %rax
	cmpq	$1, %rax
	jg	.L4
	leaq	1(%r12), %r13
	movq	%rsi, %rbx
	movq	%r13, %rax
	imulq	%r12, %rax
	sarq	%rax
	subq	%rax, %rbx
	movq	%rbx, (%rsp)
	je	.L5
	leaq	2(%r12), %r14
	movl	$50000, %ecx
	movl	$41, %esi
	leaq	s(%rip), %rbp
	movq	%r14, %rdx
	movq	%rbp, %rdi
	call	__memset_chk@PLT
	movq	%rbx, %rax
	movb	$0, 2(%rbp,%r12)
	subq	%r14, %rax
	cmpq	%rbx, %r13
	jl	.L7
	movb	$40, 0(%rbp,%rbx)
	orq	$-1, %rax
.L7:
	movq	%rax, (%rsp)
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$50000, %ecx
	movq	%r12, %rdx
	movq	%rbp, %rdi
	movl	$40, %esi
	call	__memset_chk@PLT
	movq	(%rsp), %rax
	movb	$0, 0(%rbp,%r12)
	testq	%rax, %rax
	js	.L13
	movb	$40, 0(%rbp,%rax)
.L13:
	movq	%rbp, %rdi
	call	puts@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	leaq	s(%rip), %rbp
	movq	%r12, %rdx
	movl	$50000, %ecx
	movl	$41, %esi
	movq	%rbp, %rdi
	call	__memset_chk@PLT
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movb	$0, 0(%rbp,%r12)
	call	__printf_chk@PLT
	movl	$50000, %ecx
	movq	%r12, %rdx
	movq	%rbp, %rdi
	movl	$40, %esi
	call	__memset_chk@PLT
	jmp	.L13
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 50000
s:
	.zero	50000
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.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:
```
rule
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rsi
	leaq	1(%rsi), %rcx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	(%rcx,%r12), %rdx
	sarq	%rdx
	leaq	1(%rdx), %rax
	imulq	%rdx, %rax
	sarq	%rax
	cmpq	%rax, %rsi
	cmovl	%rdx, %rcx
	cmovge	%rdx, %r12
.L3:
	movq	%rcx, %rax
	subq	%r12, %rax
	cmpq	$1, %rax
	jg	.L4
	leaq	1(%r12), %r13
	movq	%rsi, %rbx
	movq	%r13, %rax
	imulq	%r12, %rax
	sarq	%rax
	subq	%rax, %rbx
	movq	%rbx, (%rsp)
	je	.L5
	leaq	2(%r12), %r14
	movl	$50000, %ecx
	movl	$41, %esi
	leaq	s(%rip), %rbp
	movq	%r14, %rdx
	movq	%rbp, %rdi
	call	__memset_chk@PLT
	movq	%rbx, %rax
	movb	$0, 2(%rbp,%r12)
	subq	%r14, %rax
	cmpq	%rbx, %r13
	jl	.L7
	movb	$40, 0(%rbp,%rbx)
	orq	$-1, %rax
.L7:
	movq	%rax, (%rsp)
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$50000, %ecx
	movq	%r12, %rdx
	movq	%rbp, %rdi
	movl	$40, %esi
	call	__memset_chk@PLT
	movq	(%rsp), %rax
	movb	$0, 0(%rbp,%r12)
	testq	%rax, %rax
	js	.L13
	movb	$40, 0(%rbp,%rax)
.L13:
	movq	%rbp, %rdi
	call	puts@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	leaq	s(%rip), %rbp
	movq	%r12, %rdx
	movl	$50000, %ecx
	movl	$41, %esi
	movq	%rbp, %rdi
	call	__memset_chk@PLT
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movb	$0, 0(%rbp,%r12)
	call	__printf_chk@PLT
	movl	$50000, %ecx
	movq	%r12, %rdx
	movq	%rbp, %rdi
	movl	$40, %esi
	call	__memset_chk@PLT
	jmp	.L13
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 50000
s:
	.zero	50000
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.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:
```
```c
// AOJ 2783 Parentheses
// 2018.2.2 bal4u

#include <stdio.h>
#include <string.h>

char s[50000];

int main()
{
	long long A, lo, hi, mi;

	scanf("%lld", &A);
	lo = 0, hi = A+1;
	while (hi - lo > 1) {
		mi = (lo + hi) >> 1;
		if ((mi*(mi+1)>>1) <= A) lo = mi; else hi = mi;
	}
	A -= lo*(lo+1) >> 1;

	if (A) {
		memset(s, ')', lo+2), s[lo+2] = 0;
		if (A < lo+2) s[A] = '(', A = -1;
		else A -= lo+2;
		printf(s);

		memset(s, '(', lo), s[lo] = 0;
		if (A >= 0) s[A] = '(';
		puts(s);
	} else {
		memset(s, ')', lo), s[lo] = 0; printf(s);
		memset(s, '(', lo); puts(s);
	}
	return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
// AOJ 2783 Parentheses
// 2018.2.2 bal4u

#include <stdio.h>
#include <string.h>

char s[50000];

int main()
{
	long long A, lo, hi, mi;

	scanf("%lld", &A);
	lo = 0, hi = A+1;
	while (hi - lo > 1) {
		mi = (lo + hi) >> 1;
		if ((mi*(mi+1)>>1) <= A) lo = mi; else hi = mi;
	}
	A -= lo*(lo+1) >> 1;

	if (A) {
		memset(s, ')', lo+2), s[lo+2] = 0;
		if (A < lo+2) s[A] = '(', A = -1;
		else A -= lo+2;
		printf(s);

		memset(s, '(', lo), s[lo] = 0;
		if (A >= 0) s[A] = '(';
		puts(s);
	} else {
		memset(s, ')', lo), s[lo] = 0; printf(s);
		memset(s, '(', lo); puts(s);
	}
	return 0;
}
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

2
 4
 3
 5
 6
 9
 7
 8
 12
 22

)()(
 )())((
 ))((
 ))()((
 )))(((
 )))()(((
 )()))(((
 ))())(((
 ))()))((((
 )())))))((((((

Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
// AOJ 2783 Parentheses
// 2018.2.2 bal4u

#include <stdio.h>
#include <string.h>

char s[50000];

int main()
{
	long long A, lo, hi, mi;

	scanf("%lld", &A);
	lo = 0, hi = A+1;
	while (hi - lo > 1) {
		mi = (lo + hi) >> 1;
		if ((mi*(mi+1)>>1) <= A) lo = mi; else hi = mi;
	}
	A -= lo*(lo+1) >> 1;

	if (A) {
		memset(s, ')', lo+2), s[lo+2] = 0;
		if (A < lo+2) s[A] = '(', A = -1;
		else A -= lo+2;
		printf(s);

		memset(s, '(', lo), s[lo] = 0;
		if (A >= 0) s[A] = '(';
		puts(s);
	} else {
		memset(s, ')', lo), s[lo] = 0; printf(s);
		memset(s, '(', lo); puts(s);
	}
	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rsi
	leaq	1(%rsi), %rcx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	(%rcx,%r12), %rdx
	sarq	%rdx
	leaq	1(%rdx), %rax
	imulq	%rdx, %rax
	sarq	%rax
	cmpq	%rax, %rsi
	cmovl	%rdx, %rcx
	cmovge	%rdx, %r12
.L3:
	movq	%rcx, %rax
	subq	%r12, %rax
	cmpq	$1, %rax
	jg	.L4
	leaq	1(%r12), %r13
	movq	%rsi, %rbx
	movq	%r13, %rax
	imulq	%r12, %rax
	sarq	%rax
	subq	%rax, %rbx
	movq	%rbx, (%rsp)
	je	.L5
	leaq	2(%r12), %r14
	movl	$50000, %ecx
	movl	$41, %esi
	leaq	s(%rip), %rbp
	movq	%r14, %rdx
	movq	%rbp, %rdi
	call	__memset_chk@PLT
	movq	%rbx, %rax
	movb	$0, 2(%rbp,%r12)
	subq	%r14, %rax
	cmpq	%rbx, %r13
	jl	.L7
	movb	$40, 0(%rbp,%rbx)
	orq	$-1, %rax
.L7:
	movq	%rax, (%rsp)
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$50000, %ecx
	movq	%r12, %rdx
	movq	%rbp, %rdi
	movl	$40, %esi
	call	__memset_chk@PLT
	movq	(%rsp), %rax
	movb	$0, 0(%rbp,%r12)
	testq	%rax, %rax
	js	.L13
	movb	$40, 0(%rbp,%rax)
.L13:
	movq	%rbp, %rdi
	call	puts@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	leaq	s(%rip), %rbp
	movq	%r12, %rdx
	movl	$50000, %ecx
	movl	$41, %esi
	movq	%rbp, %rdi
	call	__memset_chk@PLT
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movb	$0, 0(%rbp,%r12)
	call	__printf_chk@PLT
	movl	$50000, %ecx
	movq	%r12, %rdx
	movq	%rbp, %rdi
	movl	$40, %esi
	call	__memset_chk@PLT
	jmp	.L13
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 50000
s:
	.zero	50000
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.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:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rsi
	leaq	1(%rsi), %rcx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	(%rcx,%r12), %rdx
	sarq	%rdx
	leaq	1(%rdx), %rax
	imulq	%rdx, %rax
	sarq	%rax
	cmpq	%rax, %rsi
	cmovl	%rdx, %rcx
	cmovge	%rdx, %r12
.L3:
	movq	%rcx, %rax
	subq	%r12, %rax
	cmpq	$1, %rax
	jg	.L4
	leaq	1(%r12), %r13
	movq	%rsi, %rbx
	movq	%r13, %rax
	imulq	%r12, %rax
	sarq	%rax
	subq	%rax, %rbx
	movq	%rbx, (%rsp)
	je	.L5
	leaq	2(%r12), %r14
	movl	$50000, %ecx
	movl	$41, %esi
	leaq	s(%rip), %rbp
	movq	%r14, %rdx
	movq	%rbp, %rdi
	call	__memset_chk@PLT
	movq	%rbx, %rax
	movb	$0, 2(%rbp,%r12)
	subq	%r14, %rax
	cmpq	%rbx, %r13
	jl	.L7
	movb	$40, 0(%rbp,%rbx)
	orq	$-1, %rax
.L7:
	movq	%rax, (%rsp)
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$50000, %ecx
	movq	%r12, %rdx
	movq	%rbp, %rdi
	movl	$40, %esi
	call	__memset_chk@PLT
	movq	(%rsp), %rax
	movb	$0, 0(%rbp,%r12)
	testq	%rax, %rax
	js	.L13
	movb	$40, 0(%rbp,%rax)
.L13:
	movq	%rbp, %rdi
	call	puts@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	leaq	s(%rip), %rbp
	movq	%r12, %rdx
	movl	$50000, %ecx
	movl	$41, %esi
	movq	%rbp, %rdi
	call	__memset_chk@PLT
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movb	$0, 0(%rbp,%r12)
	call	__printf_chk@PLT
	movl	$50000, %ecx
	movq	%r12, %rdx
	movq	%rbp, %rdi
	movl	$40, %esi
	call	__memset_chk@PLT
	jmp	.L13
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 50000
s:
	.zero	50000
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.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:
```