	.file	"666792.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"My stack looks like:\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n\n"
.LC1:
	.string	"buf after is: %s\n"
	.align 8
.LC2:
	.string	"Now the stack looks like:\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n\n"
	.text
	.globl	foo
	.type	foo, @function
foo:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR -40[rbp]
	lea	rax, -18[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -18[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@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	foo, .-foo
	.section	.rodata
.LC3:
	.string	"Augh! I've been hacked!"
	.text
	.globl	bar
	.type	bar, @function
bar:
.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, .LC3[rip]
	call	puts@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	bar, .-bar
	.section	.rodata
.LC4:
	.string	"Address of foo = %p\n"
.LC5:
	.string	"Address of bar = %p\n"
	.align 8
.LC6:
	.string	"Please supply a string as an argument!"
	.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	lea	rsi, foo[rip]
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, bar[rip]
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -4[rbp], 2
	je	.L5
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L6
.L5:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	foo
	mov	eax, 0
.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	"666792.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"My stack looks like:\012%p\012%p\012%p\012%p\012%p\012"
	.ascii	"%p\012%p\012%p\012%p\012%p\012%p\012%p\012\012\000"
	.align	2
.LC1:
	.ascii	"buf after is: %s\012\000"
	.align	2
.LC2:
	.ascii	"Now the stack looks like:\012%p\012%p\012%p\012%p\012"
	.ascii	"%p\012%p\012%p\012%p\012%p\012%p\012%p\012%p\012\012"
	.ascii	"\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	foo
	.syntax unified
	.arm
	.fpu softvfp
	.type	foo, %function
foo:
	@ 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]
	ldr	r3, .L3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L3+4
	bl	printf
	sub	r3, fp, #20
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L3+8
	bl	printf
	ldr	r0, .L3+12
	bl	printf
	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	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	foo, .-foo
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Augh! I've been hacked!\000"
	.text
	.align	2
	.global	bar
	.syntax unified
	.arm
	.fpu softvfp
	.type	bar, %function
bar:
	@ 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
	nop
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC4
	.size	bar, .-bar
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Address of foo = %p\012\000"
	.align	2
.LC6:
	.ascii	"Address of bar = %p\012\000"
	.align	2
.LC7:
	.ascii	"Please supply a string as an argument!\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r1, .L11
	ldr	r0, .L11+4
	bl	printf
	ldr	r1, .L11+8
	ldr	r0, .L11+12
	bl	printf
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	beq	.L9
	ldr	r0, .L11+16
	bl	puts
	mvn	r3, #0
	b	.L10
.L9:
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	foo
	mov	r3, #0
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	foo
	.word	.LC5
	.word	bar
	.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
