	.file	"649262.c"
	.intel_syntax noprefix
	.text
	.globl	sets
	.bss
	.align 4
	.type	sets, @object
	.size	sets, 4
sets:
	.zero	4
	.globl	assoc
	.align 4
	.type	assoc, @object
	.size	assoc, 4
assoc:
	.zero	4
	.globl	block
	.align 4
	.type	block, @object
	.size	block, 4
block:
	.zero	4
	.globl	block_log2
	.align 4
	.type	block_log2, @object
	.size	block_log2, 4
block_log2:
	.zero	4
	.globl	total_cache_accesses
	.align 4
	.type	total_cache_accesses, @object
	.size	total_cache_accesses, 4
total_cache_accesses:
	.zero	4
	.globl	total_cache_misses
	.align 4
	.type	total_cache_misses, @object
	.size	total_cache_misses, 4
total_cache_misses:
	.zero	4
	.globl	sim_time
	.align 4
	.type	sim_time, @object
	.size	sim_time, 4
sim_time:
	.zero	4
	.globl	cache
	.align 8
	.type	cache, @object
	.size	cache, 8
cache:
	.zero	8
	.text
	.globl	index_of_addr
	.type	index_of_addr, @function
index_of_addr:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	DWORD PTR -28[rbp], edx
	mov	DWORD PTR -12[rbp], 0
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -28[rbp]
	add	eax, edx
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	sub	eax, 1
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	and	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	mov	ecx, eax
	shr	DWORD PTR -12[rbp], cl
	mov	eax, DWORD PTR -12[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	index_of_addr, .-index_of_addr
	.section	.rodata
.LC0:
	.string	"the_stack_data/649262.c"
	.align 8
.LC1:
	.string	"addr < (1 << (WORD_SIZE - (index_width + block_width)))"
	.text
	.globl	tag_of_addr
	.type	tag_of_addr, @function
tag_of_addr:
.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	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	DWORD PTR -28[rbp], edx
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -28[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	ecx, eax
	shr	DWORD PTR -20[rbp], cl
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -28[rbp]
	add	edx, eax
	mov	eax, 4
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	cmp	DWORD PTR -20[rbp], eax
	jb	.L4
	lea	rcx, __PRETTY_FUNCTION__.1[rip]
	mov	edx, 65
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	__assert_fail@PLT
.L4:
	mov	eax, DWORD PTR -20[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	tag_of_addr, .-tag_of_addr
	.globl	get_block
	.type	get_block, @function
get_block:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	DWORD PTR -12[rbp], 0
	jmp	.L7
.L10:
	mov	rdx, QWORD PTR cache[rip]
	mov	ecx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, ecx
	mov	ecx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 2
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	DWORD PTR -24[rbp], eax
	jne	.L8
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L9
.L8:
	add	DWORD PTR -12[rbp], 1
.L7:
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR assoc[rip]
	cmp	edx, eax
	jb	.L10
	mov	eax, 0
.L9:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	get_block, .-get_block
	.globl	insert_block
	.type	insert_block, @function
insert_block:
.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	DWORD PTR -40[rbp], esi
	mov	eax, DWORD PTR assoc[rip]
	mov	edx, DWORD PTR -36[rbp]
	imul	eax, edx
	mov	DWORD PTR -20[rbp], eax
	mov	edx, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, edx
	mov	edi, eax
	call	get_block
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L12
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], 0
	jmp	.L13
.L12:
	mov	eax, DWORD PTR total_cache_misses[rip]
	add	eax, 1
	mov	DWORD PTR total_cache_misses[rip], eax
	mov	QWORD PTR -16[rbp], 0
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	is_full
	test	al, al
	je	.L14
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	evict_block
	mov	QWORD PTR -16[rbp], rax
	jmp	.L15
.L14:
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	find_next_empty
	mov	QWORD PTR -16[rbp], rax
.L15:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -40[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], 1
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 8[rax], 0
.L13:
	mov	edx, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, edx
	mov	edi, eax
	call	increment_all
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	insert_block, .-insert_block
	.globl	evict_block
	.type	evict_block, @function
evict_block:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L17
.L19:
	mov	rdx, QWORD PTR cache[rip]
	mov	ecx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -36[rbp]
	add	eax, ecx
	mov	ecx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 2
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -16[rbp], eax
	jnb	.L18
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -12[rbp], eax
.L18:
	add	DWORD PTR -20[rbp], 1
.L17:
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR assoc[rip]
	cmp	edx, eax
	jb	.L19
	mov	rdx, QWORD PTR cache[rip]
	mov	ecx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -36[rbp]
	add	eax, ecx
	mov	ecx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 2
	add	rax, rdx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	evict_block, .-evict_block
	.globl	is_full
	.type	is_full, @function
is_full:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -12[rbp], 0
	jmp	.L22
.L25:
	mov	rdx, QWORD PTR cache[rip]
	mov	ecx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, ecx
	mov	ecx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 2
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L23
	mov	eax, 0
	jmp	.L24
.L23:
	add	DWORD PTR -12[rbp], 1
.L22:
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR assoc[rip]
	cmp	edx, eax
	jb	.L25
	mov	eax, 1
.L24:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	is_full, .-is_full
	.globl	find_next_empty
	.type	find_next_empty, @function
find_next_empty:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -12[rbp], 0
	jmp	.L27
.L30:
	mov	rdx, QWORD PTR cache[rip]
	mov	ecx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, ecx
	mov	ecx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 2
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L28
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L29
.L28:
	add	DWORD PTR -12[rbp], 1
.L27:
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR assoc[rip]
	cmp	edx, eax
	jb	.L30
	mov	eax, 0
.L29:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	find_next_empty, .-find_next_empty
	.globl	increment_all
	.type	increment_all, @function
increment_all:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	DWORD PTR -12[rbp], 0
	jmp	.L32
.L34:
	mov	rdx, QWORD PTR cache[rip]
	mov	ecx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, ecx
	mov	ecx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 2
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	DWORD PTR -24[rbp], eax
	je	.L33
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], edx
.L33:
	add	DWORD PTR -12[rbp], 1
.L32:
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR assoc[rip]
	cmp	edx, eax
	jb	.L34
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	increment_all, .-increment_all
	.section	.rodata
.LC2:
	.string	"index < sets"
	.align 8
.LC3:
	.string	"(addr >> block_log2) == (index + (tag << (int)log2(sets)))"
	.text
	.globl	cache_access
	.type	cache_access, @function
cache_access:
.LFB14:
	.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, 40
	.cfi_offset 3, -24
	mov	eax, edi
	mov	DWORD PTR -40[rbp], esi
	mov	BYTE PTR -36[rbp], al
	mov	ebx, DWORD PTR block_log2[rip]
	mov	eax, DWORD PTR sets[rip]
	mov	eax, eax
	test	rax, rax
	js	.L36
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	movq	rax, xmm1
	jmp	.L37
.L36:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
	movq	rax, xmm0
.L37:
	movq	xmm0, rax
	call	log2@PLT
	cvttsd2si	rax, xmm0
	mov	ecx, eax
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, ebx
	mov	esi, ecx
	mov	edi, eax
	call	index_of_addr
	mov	DWORD PTR -24[rbp], eax
	mov	ebx, DWORD PTR block_log2[rip]
	mov	eax, DWORD PTR sets[rip]
	mov	eax, eax
	test	rax, rax
	js	.L38
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, rax
	movq	rax, xmm2
	jmp	.L39
.L38:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
	movq	rax, xmm0
.L39:
	movq	xmm0, rax
	call	log2@PLT
	cvttsd2si	rax, xmm0
	mov	ecx, eax
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, ebx
	mov	esi, ecx
	mov	edi, eax
	call	tag_of_addr
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR sets[rip]
	cmp	DWORD PTR -24[rbp], eax
	jb	.L40
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 169
	lea	rsi, .LC0[rip]
	lea	rdi, .LC2[rip]
	call	__assert_fail@PLT
.L40:
	mov	eax, DWORD PTR block_log2[rip]
	mov	edx, DWORD PTR -40[rbp]
	mov	ebx, edx
	mov	ecx, eax
	shr	ebx, cl
	mov	eax, DWORD PTR sets[rip]
	mov	eax, eax
	test	rax, rax
	js	.L41
	pxor	xmm3, xmm3
	cvtsi2sd	xmm3, rax
	movq	rax, xmm3
	jmp	.L42
.L41:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
	movq	rax, xmm0
.L42:
	movq	xmm0, rax
	call	log2@PLT
	cvttsd2si	eax, xmm0
	mov	edx, DWORD PTR -20[rbp]
	mov	ecx, eax
	sal	edx, cl
	mov	eax, DWORD PTR -24[rbp]
	add	eax, edx
	cmp	ebx, eax
	je	.L43
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 170
	lea	rsi, .LC0[rip]
	lea	rdi, .LC3[rip]
	call	__assert_fail@PLT
.L43:
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, edx
	mov	edi, eax
	call	insert_block
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	cache_access, .-cache_access
	.section	.rodata
	.align 8
.LC4:
	.string	"Usage: %s <number_of_sets> <associativity> <cache_block_size> <trace_file>\n"
.LC5:
	.string	"r"
.LC6:
	.string	"trace file does not exist"
.LC7:
	.string	"%c 0x%x\n"
.LC8:
	.string	"Cache accesses = %u\n"
.LC9:
	.string	"Cache misses = %u\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB15:
	.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
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -36[rbp], 5
	je	.L45
	mov	rax, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L54
.L45:
	mov	BYTE PTR -25[rbp], 0
	mov	DWORD PTR -24[rbp], 0
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR sets[rip], eax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR assoc[rip], eax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR block[rip], eax
	jmp	.L47
.L48:
	mov	eax, DWORD PTR block_log2[rip]
	add	eax, 1
	mov	DWORD PTR block_log2[rip], eax
.L47:
	mov	eax, DWORD PTR block[rip]
	shr	eax
	mov	DWORD PTR block[rip], eax
	mov	eax, DWORD PTR block[rip]
	test	eax, eax
	jne	.L48
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 32
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L49
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L54
.L49:
	mov	eax, DWORD PTR sets[rip]
	mov	edx, eax
	mov	eax, DWORD PTR assoc[rip]
	mov	eax, eax
	imul	rdx, rax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR cache[rip], rax
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	jmp	.L50
.L51:
	mov	rcx, QWORD PTR cache[rip]
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	DWORD PTR 8[rax], 0
	mov	rcx, QWORD PTR cache[rip]
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	DWORD PTR 4[rax], 0
	mov	rcx, QWORD PTR cache[rip]
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	add	rax, rcx
	mov	DWORD PTR [rax], 0
	add	DWORD PTR -20[rbp], 1
.L50:
	mov	edx, DWORD PTR sets[rip]
	mov	eax, DWORD PTR assoc[rip]
	imul	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	cmp	edx, eax
	ja	.L51
	jmp	.L52
.L53:
	mov	edx, DWORD PTR -24[rbp]
	movzx	eax, BYTE PTR -25[rbp]
	movsx	eax, al
	mov	esi, edx
	mov	edi, eax
	call	cache_access
	mov	eax, DWORD PTR total_cache_accesses[rip]
	add	eax, 1
	mov	DWORD PTR total_cache_accesses[rip], eax
	mov	eax, DWORD PTR sim_time[rip]
	add	eax, 1
	mov	DWORD PTR sim_time[rip], eax
.L52:
	lea	rcx, -24[rbp]
	lea	rdx, -25[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	cmp	eax, -1
	jne	.L53
	mov	eax, DWORD PTR total_cache_accesses[rip]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR total_cache_misses[rip]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR cache[rip]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L54:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L55
	call	__stack_chk_fail@PLT
.L55:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	main, .-main
	.section	.rodata
	.align 8
	.type	__PRETTY_FUNCTION__.1, @object
	.size	__PRETTY_FUNCTION__.1, 12
__PRETTY_FUNCTION__.1:
	.string	"tag_of_addr"
	.align 8
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 13
__PRETTY_FUNCTION__.0:
	.string	"cache_access"
	.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	"649262.c"
	.text
	.comm	sets,4,4
	.comm	assoc,4,4
	.comm	block,4,4
	.global	block_log2
	.bss
	.align	2
	.type	block_log2, %object
	.size	block_log2, 4
block_log2:
	.space	4
	.global	total_cache_accesses
	.align	2
	.type	total_cache_accesses, %object
	.size	total_cache_accesses, 4
total_cache_accesses:
	.space	4
	.global	total_cache_misses
	.align	2
	.type	total_cache_misses, %object
	.size	total_cache_misses, 4
total_cache_misses:
	.space	4
	.global	sim_time
	.align	2
	.type	sim_time, %object
	.size	sim_time, 4
sim_time:
	.space	4
	.comm	cache,4,4
	.text
	.align	2
	.global	index_of_addr
	.syntax unified
	.arm
	.fpu softvfp
	.type	index_of_addr, %function
index_of_addr:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #36
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	mov	r2, #1
	ldr	r3, [fp, #-12]
	lsl	r3, r2, r3
	sub	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-8]
	and	r3, r3, r2
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-32]
	lsr	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	index_of_addr, .-index_of_addr
	.section	.rodata
	.align	2
.LC0:
	.ascii	"the_stack_data/649262.c\000"
	.align	2
.LC1:
	.ascii	"addr < (1 << (WORD_SIZE - (index_width + block_widt"
	.ascii	"h)))\000"
	.text
	.align	2
	.global	tag_of_addr
	.syntax unified
	.arm
	.fpu softvfp
	.type	tag_of_addr, %function
tag_of_addr:
	@ 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	lsr	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	rsb	r3, r3, #4
	mov	r2, #1
	lsl	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-16]
	cmp	r3, r2
	bcc	.L4
	ldr	r3, .L6
	mov	r2, #65
	ldr	r1, .L6+4
	ldr	r0, .L6+8
	bl	__assert_fail
.L4:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	__PRETTY_FUNCTION__.6224
	.word	.LC0
	.word	.LC1
	.size	tag_of_addr, .-tag_of_addr
	.align	2
	.global	get_block
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_block, %function
get_block:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L9
.L12:
	ldr	r3, .L13
	ldr	r1, [r3]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	add	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bne	.L10
	ldr	r3, [fp, #-8]
	b	.L11
.L10:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L9:
	ldr	r2, [fp, #-12]
	ldr	r3, .L13+4
	ldr	r3, [r3]
	cmp	r2, r3
	bcc	.L12
	mov	r3, #0
.L11:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L14:
	.align	2
.L13:
	.word	cache
	.word	assoc
	.size	get_block, .-get_block
	.align	2
	.global	insert_block
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert_block, %function
insert_block:
	@ 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, .L20
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	mul	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-12]
	bl	get_block
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L16
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #8]
	b	.L17
.L16:
	ldr	r3, .L20+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L20+4
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r0, [fp, #-12]
	bl	is_full
	mov	r3, r0
	cmp	r3, #0
	beq	.L18
	ldr	r0, [fp, #-12]
	bl	evict_block
	str	r0, [fp, #-16]
	b	.L19
.L18:
	ldr	r0, [fp, #-12]
	bl	find_next_empty
	str	r0, [fp, #-16]
.L19:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3, #8]
.L17:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-12]
	bl	increment_all
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	assoc
	.word	total_cache_misses
	.size	insert_block, .-insert_block
	.align	2
	.global	evict_block
	.syntax unified
	.arm
	.fpu softvfp
	.type	evict_block, %function
evict_block:
	@ 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, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L23
.L25:
	ldr	r3, .L27
	ldr	r1, [r3]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	add	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bcs	.L24
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-12]
.L24:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L23:
	ldr	r2, [fp, #-20]
	ldr	r3, .L27+4
	ldr	r3, [r3]
	cmp	r2, r3
	bcc	.L25
	ldr	r3, .L27
	ldr	r1, [r3]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-24]
	add	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L28:
	.align	2
.L27:
	.word	cache
	.word	assoc
	.size	evict_block, .-evict_block
	.align	2
	.global	is_full
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_full, %function
is_full:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L30
.L33:
	ldr	r3, .L34
	ldr	r1, [r3]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	add	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L31
	mov	r3, #0
	b	.L32
.L31:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L30:
	ldr	r2, [fp, #-12]
	ldr	r3, .L34+4
	ldr	r3, [r3]
	cmp	r2, r3
	bcc	.L33
	mov	r3, #1
.L32:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L35:
	.align	2
.L34:
	.word	cache
	.word	assoc
	.size	is_full, .-is_full
	.align	2
	.global	find_next_empty
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_next_empty, %function
find_next_empty:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L37
.L40:
	ldr	r3, .L41
	ldr	r1, [r3]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	add	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L38
	ldr	r3, [fp, #-8]
	b	.L39
.L38:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L37:
	ldr	r2, [fp, #-12]
	ldr	r3, .L41+4
	ldr	r3, [r3]
	cmp	r2, r3
	bcc	.L40
	mov	r3, #0
.L39:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L42:
	.align	2
.L41:
	.word	cache
	.word	assoc
	.size	find_next_empty, .-find_next_empty
	.align	2
	.global	increment_all
	.syntax unified
	.arm
	.fpu softvfp
	.type	increment_all, %function
increment_all:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L44
.L46:
	ldr	r3, .L47
	ldr	r1, [r3]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	add	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	beq	.L45
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	add	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
.L45:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L44:
	ldr	r2, [fp, #-12]
	ldr	r3, .L47+4
	ldr	r3, [r3]
	cmp	r2, r3
	bcc	.L46
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L48:
	.align	2
.L47:
	.word	cache
	.word	assoc
	.size	increment_all, .-increment_all
	.global	__aeabi_ui2d
	.global	__aeabi_d2uiz
	.section	.rodata
	.align	2
.LC2:
	.ascii	"index < sets\000"
	.global	__aeabi_d2iz
	.align	2
.LC3:
	.ascii	"(addr >> block_log2) == (index + (tag << (int)log2("
	.ascii	"sets)))\000"
	.text
	.align	2
	.global	cache_access
	.syntax unified
	.arm
	.fpu softvfp
	.type	cache_access, %function
cache_access:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	mov	r3, r0
	str	r1, [fp, #-28]
	strb	r3, [fp, #-21]
	ldr	r3, .L52
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	log2
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2uiz
	mov	r1, r0
	ldr	r3, .L52+4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r0, [fp, #-28]
	bl	index_of_addr
	str	r0, [fp, #-20]
	ldr	r3, .L52
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	log2
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2uiz
	mov	r1, r0
	ldr	r3, .L52+4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r0, [fp, #-28]
	bl	tag_of_addr
	str	r0, [fp, #-16]
	ldr	r3, .L52
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bcc	.L50
	ldr	r3, .L52+8
	mov	r2, #169
	ldr	r1, .L52+12
	ldr	r0, .L52+16
	bl	__assert_fail
.L50:
	ldr	r3, .L52+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	lsr	r4, r2, r3
	ldr	r3, .L52
	ldr	r3, [r3]
	mov	r0, r3
	bl	__aeabi_ui2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	log2
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r2, r0
	ldr	r3, [fp, #-16]
	lsl	r2, r3, r2
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	cmp	r4, r3
	beq	.L51
	ldr	r3, .L52+8
	mov	r2, #170
	ldr	r1, .L52+12
	ldr	r0, .L52+20
	bl	__assert_fail
.L51:
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-20]
	bl	insert_block
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L53:
	.align	2
.L52:
	.word	sets
	.word	block_log2
	.word	__PRETTY_FUNCTION__.6282
	.word	.LC0
	.word	.LC2
	.word	.LC3
	.size	cache_access, .-cache_access
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Usage: %s <number_of_sets> <associativity> <cache_b"
	.ascii	"lock_size> <trace_file>\012\000"
	.align	2
.LC5:
	.ascii	"r\000"
	.align	2
.LC6:
	.ascii	"trace file does not exist\000"
	.align	2
.LC7:
	.ascii	"%c 0x%x\012\000"
	.align	2
.LC8:
	.ascii	"Cache accesses = %u\012\000"
	.align	2
.LC9:
	.ascii	"Cache misses = %u\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	ldr	r3, .L66
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-32]
	cmp	r3, #5
	beq	.L55
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L66+4
	bl	printf
	mvn	r3, #0
	b	.L64
.L55:
	mov	r3, #0
	strb	r3, [fp, #-21]
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L66+8
	str	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L66+12
	str	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L66+16
	str	r2, [r3]
	b	.L57
.L58:
	ldr	r3, .L66+20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L66+20
	str	r3, [r2]
.L57:
	ldr	r3, .L66+16
	ldr	r3, [r3]
	lsr	r3, r3, #1
	ldr	r2, .L66+16
	str	r3, [r2]
	ldr	r3, .L66+16
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L58
	ldr	r3, [fp, #-36]
	add	r3, r3, #16
	ldr	r3, [r3]
	ldr	r1, .L66+24
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L59
	ldr	r0, .L66+28
	bl	puts
	mvn	r3, #0
	b	.L64
.L59:
	ldr	r3, .L66+8
	ldr	r3, [r3]
	ldr	r2, .L66+12
	ldr	r2, [r2]
	mul	r2, r3, r2
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L66+32
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L60
.L61:
	ldr	r3, .L66+32
	ldr	r1, [r3]
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L66+32
	ldr	r1, [r3]
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L66+32
	ldr	r1, [r3]
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L60:
	ldr	r3, .L66+8
	ldr	r3, [r3]
	ldr	r2, .L66+12
	ldr	r2, [r2]
	mul	r2, r3, r2
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bhi	.L61
	b	.L62
.L63:
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	ldr	r2, [fp, #-20]
	mov	r1, r2
	mov	r0, r3
	bl	cache_access
	ldr	r3, .L66+36
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L66+36
	str	r3, [r2]
	ldr	r3, .L66+40
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L66+40
	str	r3, [r2]
.L62:
	sub	r3, fp, #20
	sub	r2, fp, #21
	ldr	r1, .L66+44
	ldr	r0, [fp, #-12]
	bl	__isoc99_fscanf
	mov	r3, r0
	cmn	r3, #1
	bne	.L63
	ldr	r3, .L66+36
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L66+48
	bl	printf
	ldr	r3, .L66+52
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L66+56
	bl	printf
	ldr	r3, .L66+32
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-12]
	bl	fclose
	mov	r3, #0
.L64:
	ldr	r2, .L66
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L65
	bl	__stack_chk_fail
.L65:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L67:
	.align	2
.L66:
	.word	.LC10
	.word	.LC4
	.word	sets
	.word	assoc
	.word	block
	.word	block_log2
	.word	.LC5
	.word	.LC6
	.word	cache
	.word	total_cache_accesses
	.word	sim_time
	.word	.LC7
	.word	.LC8
	.word	total_cache_misses
	.word	.LC9
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.6224, %object
	.size	__PRETTY_FUNCTION__.6224, 12
__PRETTY_FUNCTION__.6224:
	.ascii	"tag_of_addr\000"
	.align	2
	.type	__PRETTY_FUNCTION__.6282, %object
	.size	__PRETTY_FUNCTION__.6282, 13
__PRETTY_FUNCTION__.6282:
	.ascii	"cache_access\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
