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

```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define QUERY_PUSH 0
#define QUERY_ACCESS 1
#define QUERY_POP 2

typedef struct Slice {
    int *list;
    int len;
    int size;
} * Slice;

void initSlice(Slice *);
void pushBack(Slice, int);
void randomAccess(Slice, int);
int popBack(Slice);
void freeSlice(Slice);

int main(void)
{
    Slice arr;
    initSlice(&arr);
    int n, query, val;

    scanf("%d", &n);
    while (n--) {
        scanf("%d", &query);
        if (query == QUERY_PUSH) {
            scanf("%d", &val);
            pushBack(arr, val);
        } else if (query == QUERY_ACCESS) {
            scanf("%d", &val);
            randomAccess(arr, val);
        } else if (query == QUERY_POP) {
            popBack(arr);
        }
    }
    freeSlice(arr);

    return 0;
}

void initSlice(Slice * s)
{
    *s = (Slice) malloc(sizeof(struct Slice));
    (*s)->len = 0;
    (*s)->size = 0;
    (*s)->list = NULL;
}

void pushBack(Slice s, int x)
{
    if (s->len == s->size) {
        if (s->size)
            s->size *= 2;
        else
            s->size = 2;
        int *tmp = (int *) malloc(s->size * sizeof(int));
        memcpy(tmp, s->list, sizeof(int) * s->len);
        s->list = tmp;
    }
    s->list[s->len++] = x;
}

void randomAccess(Slice s, int p)
{
    printf("%d\n", s->list[p]);
}

int popBack(Slice s)
{
    int x = s->list[--s->len];
    return x;
}

void freeSlice(Slice s)
{
    free(s->list);
    free(s);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rdi
	call	initSlice
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L5:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L3
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movq	-16(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	pushBack
	jmp	.L2
.L3:
	movl	-24(%rbp), %eax
	cmpl	$1, %eax
	jne	.L4
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movq	-16(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	randomAccess
	jmp	.L2
.L4:
	movl	-24(%rbp), %eax
	cmpl	$2, %eax
	jne	.L2
	movq	-16(%rbp), %rax
	movq	%rax, %rdi
	call	popBack
.L2:
	movl	-28(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -28(%rbp)
	testl	%eax, %eax
	jne	.L5
	movq	-16(%rbp), %rax
	movq	%rax, %rdi
	call	freeSlice
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	initSlice
	.type	initSlice, @function
initSlice:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	$16, %edi
	call	malloc@PLT
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movl	$0, 8(%rax)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movl	$0, 12(%rax)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	$0, (%rax)
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	initSlice, .-initSlice
	.globl	pushBack
	.type	pushBack, @function
pushBack:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movq	-24(%rbp), %rax
	movl	8(%rax), %edx
	movq	-24(%rbp), %rax
	movl	12(%rax), %eax
	cmpl	%eax, %edx
	jne	.L10
	movq	-24(%rbp), %rax
	movl	12(%rax), %eax
	testl	%eax, %eax
	je	.L11
	movq	-24(%rbp), %rax
	movl	12(%rax), %eax
	leal	(%rax,%rax), %edx
	movq	-24(%rbp), %rax
	movl	%edx, 12(%rax)
	jmp	.L12
.L11:
	movq	-24(%rbp), %rax
	movl	$2, 12(%rax)
.L12:
	movq	-24(%rbp), %rax
	movl	12(%rax), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	movq	(%rax), %rcx
	movq	-8(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movq	-24(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
.L10:
	movq	-24(%rbp), %rax
	movq	(%rax), %rsi
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	leal	1(%rax), %ecx
	movq	-24(%rbp), %rdx
	movl	%ecx, 8(%rdx)
	cltq
	salq	$2, %rax
	leaq	(%rsi,%rax), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rdx)
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	pushBack, .-pushBack
	.section	.rodata
.LC1:
	.string	"%d\n"
	.text
	.globl	randomAccess
	.type	randomAccess, @function
randomAccess:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	randomAccess, .-randomAccess
	.globl	popBack
	.type	popBack, @function
popBack:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rcx
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	leal	-1(%rax), %edx
	movq	-24(%rbp), %rax
	movl	%edx, 8(%rax)
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	popBack, .-popBack
	.globl	freeSlice
	.type	freeSlice, @function
freeSlice:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	freeSlice, .-freeSlice
	.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.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$16, %edi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r12
	call	malloc@PLT
	leaq	28(%rsp), %rsi
	movq	%rbx, %rdi
	movq	$0, 8(%rax)
	movq	%rax, %rbp
	movq	$0, (%rax)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 28(%rsp)
	testl	%eax, %eax
	jne	.L2
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	$1, %eax
	je	.L19
	cmpl	$2, %eax
	jne	.L7
	subl	$1, 8(%rbp)
.L7:
	movl	28(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 28(%rsp)
	testl	%eax, %eax
	je	.L9
.L2:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	32(%rsp), %eax
	testl	%eax, %eax
	jne	.L3
	leaq	36(%rsp), %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %r8d
	movl	8(%rbp), %r14d
	cmpl	12(%rbp), %r14d
	je	.L4
	movslq	%r14d, %r15
	movq	0(%rbp), %rcx
	salq	$2, %r15
.L5:
	movl	28(%rsp), %eax
	addl	$1, %r14d
	movl	%r8d, (%rcx,%r15)
	movl	%r14d, 8(%rbp)
	leal	-1(%rax), %edx
	movl	%edx, 28(%rsp)
	testl	%eax, %eax
	jne	.L2
.L9:
	movq	0(%rbp), %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	leaq	36(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	0(%rbp), %rax
	movslq	36(%rsp), %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	movl	(%rax,%rdx,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	testl	%r14d, %r14d
	movl	$2, %eax
	leal	(%r14,%r14), %edi
	movslq	%r14d, %r15
	cmove	%eax, %edi
	movl	%r8d, 12(%rsp)
	salq	$2, %r15
	movl	%edi, 12(%rbp)
	movslq	%edi, %rdi
	salq	$2, %rdi
	call	malloc@PLT
	movq	0(%rbp), %rsi
	movq	%r15, %rdx
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	12(%rsp), %r8d
	movq	%rax, 0(%rbp)
	movq	%rax, %rcx
	jmp	.L5
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.text
	.p2align 4
	.globl	initSlice
	.type	initSlice, @function
initSlice:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	movl	$16, %edi
	call	malloc@PLT
	movq	%rax, (%rbx)
	movq	$0, 8(%rax)
	movq	$0, (%rax)
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE52:
	.size	initSlice, .-initSlice
	.p2align 4
	.globl	pushBack
	.type	pushBack, @function
pushBack:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movslq	8(%rdi), %r13
	movq	%rdi, %rbx
	movq	%r13, %rbp
	cmpl	12(%rdi), %r13d
	je	.L24
	movq	(%rdi), %rcx
.L25:
	addl	$1, %ebp
	movl	%ebp, 8(%rbx)
	movl	%r12d, (%rcx,%r13,4)
	popq	%rbx
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	leaq	0(,%r13,4), %r14
	testl	%r13d, %r13d
	jne	.L29
	movl	$8, %edi
	movl	$2, %eax
.L26:
	movl	%eax, 12(%rbx)
	call	malloc@PLT
	movq	(%rbx), %rsi
	movq	%r14, %rdx
	movq	%rax, %rdi
	call	memcpy@PLT
	movq	%rax, (%rbx)
	movq	%rax, %rcx
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L29:
	leal	(%r13,%r13), %eax
	movslq	%eax, %rdi
	salq	$2, %rdi
	jmp	.L26
	.cfi_endproc
.LFE53:
	.size	pushBack, .-pushBack
	.p2align 4
	.globl	randomAccess
	.type	randomAccess, @function
randomAccess:
.LFB54:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	movslq	%esi, %rsi
	movl	$1, %edi
	movl	(%rax,%rsi,4), %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE54:
	.size	randomAccess, .-randomAccess
	.p2align 4
	.globl	popBack
	.type	popBack, @function
popBack:
.LFB55:
	.cfi_startproc
	endbr64
	movl	8(%rdi), %eax
	movq	(%rdi), %rdx
	subl	$1, %eax
	movl	%eax, 8(%rdi)
	cltq
	movl	(%rdx,%rax,4), %eax
	ret
	.cfi_endproc
.LFE55:
	.size	popBack, .-popBack
	.p2align 4
	.globl	freeSlice
	.type	freeSlice, @function
freeSlice:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rbp
	movq	(%rdi), %rdi
	call	free@PLT
	movq	%rbp, %rdi
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	free@PLT
	.cfi_endproc
.LFE56:
	.size	freeSlice, .-freeSlice
	.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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$16, %edi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %r12
	call	malloc@PLT
	leaq	28(%rsp), %rsi
	movq	%rbx, %rdi
	movq	$0, 8(%rax)
	movq	%rax, %rbp
	movq	$0, (%rax)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 28(%rsp)
	testl	%eax, %eax
	jne	.L2
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	$1, %eax
	je	.L19
	cmpl	$2, %eax
	jne	.L7
	subl	$1, 8(%rbp)
.L7:
	movl	28(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 28(%rsp)
	testl	%eax, %eax
	je	.L9
.L2:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	32(%rsp), %eax
	testl	%eax, %eax
	jne	.L3
	leaq	36(%rsp), %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %r8d
	movl	8(%rbp), %r14d
	cmpl	12(%rbp), %r14d
	je	.L4
	movslq	%r14d, %r15
	movq	0(%rbp), %rcx
	salq	$2, %r15
.L5:
	movl	28(%rsp), %eax
	addl	$1, %r14d
	movl	%r8d, (%rcx,%r15)
	movl	%r14d, 8(%rbp)
	leal	-1(%rax), %edx
	movl	%edx, 28(%rsp)
	testl	%eax, %eax
	jne	.L2
.L9:
	movq	0(%rbp), %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	leaq	36(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	0(%rbp), %rax
	movslq	36(%rsp), %rdx
	movq	%r13, %rsi
	movl	$1, %edi
	movl	(%rax,%rdx,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	testl	%r14d, %r14d
	movl	$2, %eax
	leal	(%r14,%r14), %edi
	movslq	%r14d, %r15
	cmove	%eax, %edi
	movl	%r8d, 12(%rsp)
	salq	$2, %r15
	movl	%edi, 12(%rbp)
	movslq	%edi, %rdi
	salq	$2, %rdi
	call	malloc@PLT
	movq	0(%rbp), %rsi
	movq	%r15, %rdx
	movq	%rax, %rdi
	call	memcpy@PLT
	movl	12(%rsp), %r8d
	movq	%rax, 0(%rbp)
	movq	%rax, %rcx
	jmp	.L5
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.text
	.p2align 4
	.globl	initSlice
	.type	initSlice, @function
initSlice:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	movl	$16, %edi
	call	malloc@PLT
	movq	%rax, (%rbx)
	movq	$0, 8(%rax)
	movq	$0, (%rax)
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE52:
	.size	initSlice, .-initSlice
	.p2align 4
	.globl	pushBack
	.type	pushBack, @function
pushBack:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movslq	8(%rdi), %r13
	movq	%rdi, %rbx
	movq	%r13, %rbp
	cmpl	12(%rdi), %r13d
	je	.L24
	movq	(%rdi), %rcx
.L25:
	addl	$1, %ebp
	movl	%ebp, 8(%rbx)
	movl	%r12d, (%rcx,%r13,4)
	popq	%rbx
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	leaq	0(,%r13,4), %r14
	testl	%r13d, %r13d
	jne	.L29
	movl	$8, %edi
	movl	$2, %eax
.L26:
	movl	%eax, 12(%rbx)
	call	malloc@PLT
	movq	(%rbx), %rsi
	movq	%r14, %rdx
	movq	%rax, %rdi
	call	memcpy@PLT
	movq	%rax, (%rbx)
	movq	%rax, %rcx
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L29:
	leal	(%r13,%r13), %eax
	movslq	%eax, %rdi
	salq	$2, %rdi
	jmp	.L26
	.cfi_endproc
.LFE53:
	.size	pushBack, .-pushBack
	.p2align 4
	.globl	randomAccess
	.type	randomAccess, @function
randomAccess:
.LFB54:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	movslq	%esi, %rsi
	movl	$1, %edi
	movl	(%rax,%rsi,4), %edx
	leaq	.LC1(%rip), %rsi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE54:
	.size	randomAccess, .-randomAccess
	.p2align 4
	.globl	popBack
	.type	popBack, @function
popBack:
.LFB55:
	.cfi_startproc
	endbr64
	movl	8(%rdi), %eax
	movq	(%rdi), %rdx
	subl	$1, %eax
	movl	%eax, 8(%rdi)
	cltq
	movl	(%rdx,%rax,4), %eax
	ret
	.cfi_endproc
.LFE55:
	.size	popBack, .-popBack
	.p2align 4
	.globl	freeSlice
	.type	freeSlice, @function
freeSlice:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rbp
	movq	(%rdi), %rdi
	call	free@PLT
	movq	%rbp, %rdi
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	free@PLT
	.cfi_endproc
.LFE56:
	.size	freeSlice, .-freeSlice
	.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:

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

#define QUERY_PUSH 0
#define QUERY_ACCESS 1
#define QUERY_POP 2

typedef struct Slice {
    int *list;
    int len;
    int size;
} * Slice;

void initSlice(Slice *);
void pushBack(Slice, int);
void randomAccess(Slice, int);
int popBack(Slice);
void freeSlice(Slice);

int main(void)
{
    Slice arr;
    initSlice(&arr);
    int n, query, val;

    scanf("%d", &n);
    while (n--) {
        scanf("%d", &query);
        if (query == QUERY_PUSH) {
            scanf("%d", &val);
            pushBack(arr, val);
        } else if (query == QUERY_ACCESS) {
            scanf("%d", &val);
            randomAccess(arr, val);
        } else if (query == QUERY_POP) {
            popBack(arr);
        }
    }
    freeSlice(arr);

    return 0;
}

void initSlice(Slice * s)
{
    *s = (Slice) malloc(sizeof(struct Slice));
    (*s)->len = 0;
    (*s)->size = 0;
    (*s)->list = NULL;
}

void pushBack(Slice s, int x)
{
    if (s->len == s->size) {
        if (s->size)
            s->size *= 2;
        else
            s->size = 2;
        int *tmp = (int *) malloc(s->size * sizeof(int));
        memcpy(tmp, s->list, sizeof(int) * s->len);
        s->list = tmp;
    }
    s->list[s->len++] = x;
}

void randomAccess(Slice s, int p)
{
    printf("%d\n", s->list[p]);
}

int popBack(Slice s)
{
    int x = s->list[--s->len];
    return x;
}

void freeSlice(Slice s)
{
    free(s->list);
    free(s);
}

8
0 0
0 2
0 3
2
0 4
1 0
1 1
1 2
 8
0 0
0 2
0 3
2
0 4
1 0
1 1
1 1
 8
0 0
0 2
0 3
2
1 0
1 0
1 1
1 1
 8
0 1
0 2
0 4
2
0 4
1 0
1 1
1 2
 8
0 0
0 2
0 3
2
0 4
1 0
1 1
0 2
 8
0 0
0 2
0 3
2
0 4
1 0
1 1
1 0
 8
0 0
0 3
0 3
2
0 0
1 0
1 1
1 1
 8
0 1
0 2
0 4
2
0 3
1 0
1 1
1 2
 8
0 0
0 2
0 3
2
0 4
1 0
1 0
1 0
 8
0 1
0 2
0 4
2
0 3
1 0
1 1
2 2

0
2
4
 0
2
2
 0
0
2
2
 1
2
4
 0
2
 0
2
0
 0
3
3
 1
2
3
 0
0
0
 1
2

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

```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define QUERY_PUSH 0
#define QUERY_ACCESS 1
#define QUERY_POP 2

typedef struct Slice {
    int *list;
    int len;
    int size;
} * Slice;

void initSlice(Slice *);
void pushBack(Slice, int);
void randomAccess(Slice, int);
int popBack(Slice);
void freeSlice(Slice);

int main(void)
{
    Slice arr;
    initSlice(&arr);
    int n, query, val;

    scanf("%d", &n);
    while (n--) {
        scanf("%d", &query);
        if (query == QUERY_PUSH) {
            scanf("%d", &val);
            pushBack(arr, val);
        } else if (query == QUERY_ACCESS) {
            scanf("%d", &val);
            randomAccess(arr, val);
        } else if (query == QUERY_POP) {
            popBack(arr);
        }
    }
    freeSlice(arr);

    return 0;
}

void initSlice(Slice * s)
{
    *s = (Slice) malloc(sizeof(struct Slice));
    (*s)->len = 0;
    (*s)->size = 0;
    (*s)->list = NULL;
}

void pushBack(Slice s, int x)
{
    if (s->len == s->size) {
        if (s->size)
            s->size *= 2;
        else
            s->size = 2;
        int *tmp = (int *) malloc(s->size * sizeof(int));
        memcpy(tmp, s->list, sizeof(int) * s->len);
        s->list = tmp;
    }
    s->list[s->len++] = x;
}

void randomAccess(Slice s, int p)
{
    printf("%d\n", s->list[p]);
}

int popBack(Slice s)
{
    int x = s->list[--s->len];
    return x;
}

void freeSlice(Slice s)
{
    free(s->list);
    free(s);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rdi
	call	initSlice
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L5:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L3
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movq	-16(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	pushBack
	jmp	.L2
.L3:
	movl	-24(%rbp), %eax
	cmpl	$1, %eax
	jne	.L4
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movq	-16(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	randomAccess
	jmp	.L2
.L4:
	movl	-24(%rbp), %eax
	cmpl	$2, %eax
	jne	.L2
	movq	-16(%rbp), %rax
	movq	%rax, %rdi
	call	popBack
.L2:
	movl	-28(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -28(%rbp)
	testl	%eax, %eax
	jne	.L5
	movq	-16(%rbp), %rax
	movq	%rax, %rdi
	call	freeSlice
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	initSlice
	.type	initSlice, @function
initSlice:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	$16, %edi
	call	malloc@PLT
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movl	$0, 8(%rax)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movl	$0, 12(%rax)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	$0, (%rax)
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	initSlice, .-initSlice
	.globl	pushBack
	.type	pushBack, @function
pushBack:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movq	-24(%rbp), %rax
	movl	8(%rax), %edx
	movq	-24(%rbp), %rax
	movl	12(%rax), %eax
	cmpl	%eax, %edx
	jne	.L10
	movq	-24(%rbp), %rax
	movl	12(%rax), %eax
	testl	%eax, %eax
	je	.L11
	movq	-24(%rbp), %rax
	movl	12(%rax), %eax
	leal	(%rax,%rax), %edx
	movq	-24(%rbp), %rax
	movl	%edx, 12(%rax)
	jmp	.L12
.L11:
	movq	-24(%rbp), %rax
	movl	$2, 12(%rax)
.L12:
	movq	-24(%rbp), %rax
	movl	12(%rax), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	movq	(%rax), %rcx
	movq	-8(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movq	-24(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
.L10:
	movq	-24(%rbp), %rax
	movq	(%rax), %rsi
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	leal	1(%rax), %ecx
	movq	-24(%rbp), %rdx
	movl	%ecx, 8(%rdx)
	cltq
	salq	$2, %rax
	leaq	(%rsi,%rax), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rdx)
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	pushBack, .-pushBack
	.section	.rodata
.LC1:
	.string	"%d\n"
	.text
	.globl	randomAccess
	.type	randomAccess, @function
randomAccess:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	randomAccess, .-randomAccess
	.globl	popBack
	.type	popBack, @function
popBack:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rcx
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	leal	-1(%rax), %edx
	movq	-24(%rbp), %rax
	movl	%edx, 8(%rax)
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	popBack, .-popBack
	.globl	freeSlice
	.type	freeSlice, @function
freeSlice:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	freeSlice, .-freeSlice
	.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.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rdi
	call	initSlice
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L5:
	leaq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %eax
	testl	%eax, %eax
	jne	.L3
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movq	-16(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	pushBack
	jmp	.L2
.L3:
	movl	-24(%rbp), %eax
	cmpl	$1, %eax
	jne	.L4
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20(%rbp), %edx
	movq	-16(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	randomAccess
	jmp	.L2
.L4:
	movl	-24(%rbp), %eax
	cmpl	$2, %eax
	jne	.L2
	movq	-16(%rbp), %rax
	movq	%rax, %rdi
	call	popBack
.L2:
	movl	-28(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -28(%rbp)
	testl	%eax, %eax
	jne	.L5
	movq	-16(%rbp), %rax
	movq	%rax, %rdi
	call	freeSlice
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	initSlice
	.type	initSlice, @function
initSlice:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	$16, %edi
	call	malloc@PLT
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movl	$0, 8(%rax)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movl	$0, 12(%rax)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	$0, (%rax)
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	initSlice, .-initSlice
	.globl	pushBack
	.type	pushBack, @function
pushBack:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movq	-24(%rbp), %rax
	movl	8(%rax), %edx
	movq	-24(%rbp), %rax
	movl	12(%rax), %eax
	cmpl	%eax, %edx
	jne	.L10
	movq	-24(%rbp), %rax
	movl	12(%rax), %eax
	testl	%eax, %eax
	je	.L11
	movq	-24(%rbp), %rax
	movl	12(%rax), %eax
	leal	(%rax,%rax), %edx
	movq	-24(%rbp), %rax
	movl	%edx, 12(%rax)
	jmp	.L12
.L11:
	movq	-24(%rbp), %rax
	movl	$2, 12(%rax)
.L12:
	movq	-24(%rbp), %rax
	movl	12(%rax), %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	movq	(%rax), %rcx
	movq	-8(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcpy@PLT
	movq	-24(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
.L10:
	movq	-24(%rbp), %rax
	movq	(%rax), %rsi
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	leal	1(%rax), %ecx
	movq	-24(%rbp), %rdx
	movl	%ecx, 8(%rdx)
	cltq
	salq	$2, %rax
	leaq	(%rsi,%rax), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rdx)
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	pushBack, .-pushBack
	.section	.rodata
.LC1:
	.string	"%d\n"
	.text
	.globl	randomAccess
	.type	randomAccess, @function
randomAccess:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	randomAccess, .-randomAccess
	.globl	popBack
	.type	popBack, @function
popBack:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rcx
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	leal	-1(%rax), %edx
	movq	-24(%rbp), %rax
	movl	%edx, 8(%rax)
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	cltq
	salq	$2, %rax
	addq	%rcx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	popBack, .-popBack
	.globl	freeSlice
	.type	freeSlice, @function
freeSlice:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	freeSlice, .-freeSlice
	.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:
