	.file	"810531.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Virtual address of 'buf' = Ox%p\n"
	.text
	.globl	overflow
	.type	overflow, @function
overflow:
.LFB0:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR -24[rbp]
	lea	rax, -12[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L2
	call	__stack_chk_fail@PLT
.L2:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	overflow, .-overflow
	.section	.rodata
	.align 8
.LC1:
	.string	"Function 'attack' has been called without an explicitly invocation."
	.align 8
.LC2:
	.string	"Buffer Overflow attack succeeded!"
.LC3:
	.string	"\346\265\213\350\257\225\346\210\220\345\212\237"
	.text
	.globl	attack
	.type	attack, @function
attack:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	attack, .-attack
	.section	.rodata
	.align 8
.LC4:
	.string	"Virtual address of 'overflow' = Ox%p\n"
	.align 8
.LC5:
	.string	"Virtual address of 'attack' = Ox%p\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.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
	lea	rsi, overflow[rip]
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, attack[rip]
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	movabs	rax, 4774451407313060418
	movabs	rdx, 4774451407313060418
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
	mov	DWORD PTR -16[rbp], 4199353
	mov	BYTE PTR -12[rbp], 0
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	overflow
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"810531.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Virtual address of 'buf' = Ox%p\012\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	overflow
	.syntax unified
	.arm
	.fpu softvfp
	.type	overflow, %function
overflow:
	@ 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]
	ldr	r3, .L3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L3+4
	bl	printf
	sub	r3, fp, #12
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	strcpy
	nop
	ldr	r3, .L3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L2
	bl	__stack_chk_fail
.L2:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC1
	.word	.LC0
	.size	overflow, .-overflow
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Function 'attack' has been called without an explic"
	.ascii	"itly invocation.\000"
	.align	2
.LC3:
	.ascii	"Buffer Overflow attack succeeded!\000"
	.align	2
.LC4:
	.ascii	"\346\265\213\350\257\225\346\210\220\345\212\237\000"
	.text
	.align	2
	.global	attack
	.syntax unified
	.arm
	.fpu softvfp
	.type	attack, %function
attack:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L6
	bl	puts
	ldr	r0, .L6+4
	bl	puts
	ldr	r0, .L6+8
	bl	printf
	nop
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	attack, .-attack
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Virtual address of 'overflow' = Ox%p\012\000"
	.align	2
.LC6:
	.ascii	"Virtual address of 'attack' = Ox%p\012\000"
	.align	2
.LC7:
	.ascii	"BBBBBBBBBBBBBBBB\271\023@\000\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L11+4
	ldr	r0, .L11+8
	bl	printf
	ldr	r1, .L11+12
	ldr	r0, .L11+16
	bl	printf
	ldr	r3, .L11+20
	sub	ip, fp, #32
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1}
	str	r0, [ip]
	add	ip, ip, #4
	strb	r1, [ip]
	sub	r3, fp, #32
	mov	r0, r3
	bl	overflow
	mov	r3, #0
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC8
	.word	overflow
	.word	.LC5
	.word	attack
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
