	.file	"873539.c"
	.intel_syntax noprefix
	.text
	.globl	stride
	.data
	.align 4
	.type	stride, @object
	.size	stride, 4
stride:
	.long	128
	.globl	chases
	.bss
	.align 8
	.type	chases, @object
	.size	chases, 8
chases:
	.zero	8
	.globl	chase_array
	.align 8
	.type	chase_array, @object
	.size	chase_array, 8
chase_array:
	.zero	8
	.text
	.globl	initialize_pointer_chase
	.type	initialize_pointer_chase, @function
initialize_pointer_chase:
.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 -56[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR chase_array[rip], rax
	mov	eax, DWORD PTR stride[rip]
	movsx	rsi, eax
	mov	rax, QWORD PTR -56[rbp]
	cqo
	idiv	rsi
	mov	QWORD PTR chases[rip], rax
	mov	rax, QWORD PTR chases[rip]
	mov	rdx, rax
	shr	rdx, 63
	add	rax, rdx
	sar	rax
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR stride[rip]
	lea	edx, 7[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 3
	cdqe
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR chase_array[rip]
	mov	QWORD PTR -32[rbp], rax
	mov	rdx, QWORD PTR chase_array[rip]
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, rax
	shr	rcx, 63
	add	rax, rcx
	sar	rax
	add	rax, rdx
	mov	QWORD PTR -24[rbp], rax
	mov	QWORD PTR -40[rbp], 0
	jmp	.L2
.L3:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	sal	rax, 3
	add	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	sal	rax, 3
	add	QWORD PTR -24[rbp], rax
	add	QWORD PTR -40[rbp], 1
.L2:
	mov	rax, QWORD PTR -40[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	jl	.L3
	mov	rax, QWORD PTR -8[rbp]
	sal	rax, 3
	neg	rax
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	initialize_pointer_chase, .-initialize_pointer_chase
	.globl	pointer_chase
	.type	pointer_chase, @function
pointer_chase:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	sal	rax, 10
	mov	rdi, rax
	call	initialize_pointer_chase
	mov	QWORD PTR -16[rbp], 0
	jmp	.L5
.L7:
	mov	rax, QWORD PTR chase_array[rip]
	mov	QWORD PTR -8[rbp], rax
	nop
.L6:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L6
	add	QWORD PTR -16[rbp], 1
.L5:
	mov	rax, QWORD PTR -16[rbp]
	cmp	rax, QWORD PTR -24[rbp]
	jl	.L7
	mov	rax, QWORD PTR chase_array[rip]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	pointer_chase, .-pointer_chase
	.section	.rodata
	.align 8
.LC0:
	.string	"Striding through %ld KB with %ld iterations\n"
	.text
	.globl	memory_stride
	.type	memory_stride, @function
memory_stride:
.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, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	edi, 30
	call	sysconf@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 1023[rax]
	test	rax, rax
	cmovs	rax, rdx
	sar	rax, 10
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	sal	rax, 10
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L9
.L12:
	mov	QWORD PTR -40[rbp], 0
	jmp	.L10
.L11:
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 102
	mov	rax, QWORD PTR -32[rbp]
	add	QWORD PTR -40[rbp], rax
.L10:
	mov	rax, QWORD PTR -40[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	jl	.L11
.L9:
	sub	QWORD PTR -56[rbp], 1
	cmp	QWORD PTR -56[rbp], 0
	jne	.L12
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	memory_stride, .-memory_stride
	.section	.rodata
.LC1:
	.string	"Usage: %s size(KB) iter\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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	cmp	DWORD PTR -20[rbp], 3
	je	.L14
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atol@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atol@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	pointer_chase
	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	"873539.c"
	.text
	.global	stride
	.data
	.align	2
	.type	stride, %object
	.size	stride, 4
stride:
	.word	128
	.comm	chases,4,4
	.comm	chase_array,4,4
	.global	__aeabi_idiv
	.text
	.align	2
	.global	initialize_pointer_chase
	.syntax unified
	.arm
	.fpu softvfp
	.type	initialize_pointer_chase, %function
initialize_pointer_chase:
	@ 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, [fp, #-32]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L4
	str	r2, [r3]
	ldr	r3, .L4+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L4+8
	str	r2, [r3]
	ldr	r3, .L4+8
	ldr	r3, [r3]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, .L4+4
	ldr	r3, [r3]
	add	r2, r3, #7
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #3
	str	r3, [fp, #-8]
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r3, .L4
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	lsr	r1, r3, #31
	add	r3, r1, r3
	asr	r3, r3, #1
	add	r3, r2, r3
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L2
.L3:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L2:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	blt	.L3
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	rsb	r3, r3, #0
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	chase_array
	.word	stride
	.word	chases
	.size	initialize_pointer_chase, .-initialize_pointer_chase
	.align	2
	.global	pointer_chase
	.syntax unified
	.arm
	.fpu softvfp
	.type	pointer_chase, %function
pointer_chase:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #10
	mov	r0, r3
	bl	initialize_pointer_chase
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L7
.L9:
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	nop
.L8:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L7:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L9
	ldr	r3, .L10
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	chase_array
	.size	pointer_chase, .-pointer_chase
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Striding through %ld KB with %ld iterations\012\000"
	.text
	.align	2
	.global	memory_stride
	.syntax unified
	.arm
	.fpu softvfp
	.type	memory_stride, %function
memory_stride:
	@ 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]
	str	r1, [fp, #-36]
	mov	r0, #30
	bl	sysconf
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	add	r2, r3, #1020
	add	r2, r2, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #10
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #10
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-36]
	ldr	r0, .L17
	bl	printf
	b	.L13
.L16:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L14
.L15:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #102
	strb	r2, [r3]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-24]
.L14:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	blt	.L15
.L13:
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L16
	ldr	r0, [fp, #-8]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC0
	.size	memory_stride, .-memory_stride
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Usage: %s size(KB) iter\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	beq	.L20
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L22
	bl	printf
	mov	r0, #1
	bl	exit
.L20:
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atol
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-20]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atol
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	pointer_chase
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
