	.file	"67325403.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"getcwd failed: %s\n"
	.text
	.globl	print_cwd
	.type	print_cwd, @function
print_cwd:
.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, 16
	mov	esi, 0
	mov	edi, 0
	call	getcwd@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L2
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_cwd, .-print_cwd
	.section	.rodata
.LC1:
	.string	"source"
.LC2:
	.string	"mkdir failed: %s\n"
	.text
	.globl	mkdir_source
	.type	mkdir_source, @function
mkdir_source:
.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, 16
	mov	esi, 493
	lea	rdi, .LC1[rip]
	call	mkdir@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L5
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	mkdir_source, .-mkdir_source
	.section	.rodata
.LC3:
	.string	"chdir failed: %s\n"
	.text
	.globl	chdir_source
	.type	chdir_source, @function
chdir_source:
.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, 16
	lea	rdi, .LC1[rip]
	call	chdir@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L8
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	chdir_source, .-chdir_source
	.section	.rodata
.LC4:
	.string	"w"
.LC5:
	.string	"hello"
	.text
	.globl	create_file
	.type	create_file, @function
create_file:
.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	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 0
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	create_file, .-create_file
	.section	.rodata
.LC6:
	.string	"link failed: %s\n"
	.text
	.globl	create_hardlink
	.type	create_hardlink, @function
create_hardlink:
.LFB10:
	.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	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	link@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L12
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	create_hardlink, .-create_hardlink
	.section	.rodata
.LC7:
	.string	".."
	.text
	.globl	chdir_parent
	.type	chdir_parent, @function
chdir_parent:
.LFB11:
	.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
	lea	rdi, .LC7[rip]
	call	chdir@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L15
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L15:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	chdir_parent, .-chdir_parent
	.section	.rodata
.LC8:
	.string	"stat failed: %s\n"
	.text
	.globl	get_inode
	.type	get_inode, @function
get_inode:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 192
	mov	QWORD PTR -184[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	mov	DWORD PTR -164[rbp], eax
	cmp	DWORD PTR -164[rbp], 0
	je	.L17
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L17:
	mov	rax, QWORD PTR -152[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	get_inode, .-get_inode
	.section	.rodata
.LC9:
	.string	"dir1"
.LC10:
	.string	"dir1/subdir"
.LC11:
	.string	"dir2"
.LC12:
	.string	"dir2/subdir"
.LC13:
	.string	"dir1/subdir/file1"
.LC14:
	.string	"/bin/cp -Rp source target"
.LC15:
	.string	"target/dir1/subdir"
.LC16:
	.string	"target/dir2/subdir"
	.align 8
.LC17:
	.string	"TEST FAILED: hardlinked dirs are not copied correct, inodes differs: %lli %lli\n"
	.align 8
.LC18:
	.string	"TEST SUCCESS: hardlinked dirs are copied correct, inodes the same"
	.text
	.globl	main
	.type	main, @function
main:
.LFB13:
	.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
	mov	eax, 0
	call	print_cwd
	mov	eax, 0
	call	mkdir_source
	mov	eax, 0
	call	chdir_source
	mov	esi, 493
	lea	rdi, .LC9[rip]
	call	mkdir@PLT
	mov	esi, 493
	lea	rdi, .LC10[rip]
	call	mkdir@PLT
	mov	esi, 493
	lea	rdi, .LC11[rip]
	call	mkdir@PLT
	lea	rsi, .LC12[rip]
	lea	rdi, .LC10[rip]
	call	create_hardlink
	lea	rdi, .LC13[rip]
	call	create_file
	mov	eax, 0
	call	chdir_parent
	lea	rdi, .LC14[rip]
	call	system@PLT
	lea	rdi, .LC15[rip]
	call	get_inode
	mov	QWORD PTR -16[rbp], rax
	lea	rdi, .LC16[rip]
	call	get_inode
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	cmp	rax, QWORD PTR -8[rbp]
	je	.L21
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L22
.L21:
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
.L22:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.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	"67325403.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"getcwd failed: %s\012\000"
	.text
	.align	2
	.global	print_cwd
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_cwd, %function
print_cwd:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r1, #0
	mov	r0, #0
	bl	getcwd
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L2
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L3
	bl	printf
	mov	r0, #1
	bl	exit
.L2:
	ldr	r0, [fp, #-8]
	bl	puts
	ldr	r0, [fp, #-8]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.size	print_cwd, .-print_cwd
	.section	.rodata
	.align	2
.LC1:
	.ascii	"source\000"
	.align	2
.LC2:
	.ascii	"mkdir failed: %s\012\000"
	.text
	.align	2
	.global	mkdir_source
	.syntax unified
	.arm
	.fpu softvfp
	.type	mkdir_source, %function
mkdir_source:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r1, .L8
	ldr	r0, .L8+4
	bl	mkdir
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L7
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L8+8
	bl	printf
	mov	r0, #1
	bl	exit
.L7:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	493
	.word	.LC1
	.word	.LC2
	.size	mkdir_source, .-mkdir_source
	.section	.rodata
	.align	2
.LC3:
	.ascii	"chdir failed: %s\012\000"
	.text
	.align	2
	.global	chdir_source
	.syntax unified
	.arm
	.fpu softvfp
	.type	chdir_source, %function
chdir_source:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L13
	bl	chdir
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L12
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L13+4
	bl	printf
	mov	r0, #1
	bl	exit
.L12:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC1
	.word	.LC3
	.size	chdir_source, .-chdir_source
	.section	.rodata
	.align	2
.LC4:
	.ascii	"w\000"
	.align	2
.LC5:
	.ascii	"hello\000"
	.text
	.align	2
	.global	create_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	create_file, %function
create_file:
	@ 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	r1, .L16
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-8]
	mov	r2, #0
	ldr	r1, .L16+4
	ldr	r0, [fp, #-8]
	bl	fprintf
	ldr	r0, [fp, #-8]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC4
	.word	.LC5
	.size	create_file, .-create_file
	.section	.rodata
	.align	2
.LC6:
	.ascii	"link failed: %s\012\000"
	.text
	.align	2
	.global	create_hardlink
	.syntax unified
	.arm
	.fpu softvfp
	.type	create_hardlink, %function
create_hardlink:
	@ 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	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	link
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L20
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L21
	bl	printf
	mov	r0, #1
	bl	exit
.L20:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC6
	.size	create_hardlink, .-create_hardlink
	.section	.rodata
	.align	2
.LC7:
	.ascii	"..\000"
	.text
	.align	2
	.global	chdir_parent
	.syntax unified
	.arm
	.fpu softvfp
	.type	chdir_parent, %function
chdir_parent:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L26
	bl	chdir
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L25
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L26+4
	bl	printf
	mov	r0, #1
	bl	exit
.L25:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC7
	.word	.LC3
	.size	chdir_parent, .-chdir_parent
	.section	.rodata
	.align	2
.LC8:
	.ascii	"stat failed: %s\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_inode
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_inode, %function
get_inode:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-112]
	ldr	r3, .L32
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	stat
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	beq	.L29
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L32+4
	bl	printf
	mov	r0, #1
	bl	exit
.L29:
	ldr	r3, [fp, #-88]
	ldr	r2, .L32
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L31
	bl	__stack_chk_fail
.L31:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L33:
	.align	2
.L32:
	.word	.LC9
	.word	.LC8
	.size	get_inode, .-get_inode
	.section	.rodata
	.align	2
.LC10:
	.ascii	"dir1\000"
	.align	2
.LC11:
	.ascii	"dir1/subdir\000"
	.align	2
.LC12:
	.ascii	"dir2\000"
	.align	2
.LC13:
	.ascii	"dir2/subdir\000"
	.align	2
.LC14:
	.ascii	"dir1/subdir/file1\000"
	.align	2
.LC15:
	.ascii	"/bin/cp -Rp source target\000"
	.align	2
.LC16:
	.ascii	"target/dir1/subdir\000"
	.align	2
.LC17:
	.ascii	"target/dir2/subdir\000"
	.align	2
.LC18:
	.ascii	"TEST FAILED: hardlinked dirs are not copied correct"
	.ascii	", inodes differs: %lli %lli\012\000"
	.align	2
.LC19:
	.ascii	"TEST SUCCESS: hardlinked dirs are copied correct, i"
	.ascii	"nodes the same\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]
	bl	print_cwd
	bl	mkdir_source
	bl	chdir_source
	ldr	r1, .L38
	ldr	r0, .L38+4
	bl	mkdir
	ldr	r1, .L38
	ldr	r0, .L38+8
	bl	mkdir
	ldr	r1, .L38
	ldr	r0, .L38+12
	bl	mkdir
	ldr	r1, .L38+16
	ldr	r0, .L38+8
	bl	create_hardlink
	ldr	r0, .L38+20
	bl	create_file
	bl	chdir_parent
	ldr	r0, .L38+24
	bl	system
	ldr	r0, .L38+28
	bl	get_inode
	str	r0, [fp, #-12]
	ldr	r0, .L38+32
	bl	get_inode
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	beq	.L35
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, .L38+36
	bl	printf
	b	.L36
.L35:
	ldr	r0, .L38+40
	bl	printf
.L36:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L39:
	.align	2
.L38:
	.word	493
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
