	.file	"877336.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Err.:(%d) - %s: buf\n"
.LC1:
	.string	"Err.:(%d) - %s; %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	call	get_working_dir
	call	change_dir
	mov	esi, 0
	mov	edi, 0
	call	getcwd@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L2
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rbx
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	call	get_working_dir
	call	change_dir
	call	get_working_dir
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	chdir@PLT
	test	eax, eax
	jns	.L3
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, QWORD PTR -24[rbp]
	mov	r8, rcx
	mov	rcx, rbx
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC2:
	.string	"Err.:(%d) - %s: curr. workdir\n"
	.text
	.globl	get_working_dir
	.type	get_working_dir, @function
get_working_dir:
.LFB7:
	.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rax, -4128[rbp]
	mov	esi, 4096
	mov	rdi, rax
	call	getcwd@PLT
	test	rax, rax
	jne	.L6
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rbx
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	lea	rax, -4128[rbp]
	mov	rdi, rax
	call	puts@PLT
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	get_working_dir, .-get_working_dir
	.section	.rodata
.LC3:
	.string	".."
.LC4:
	.string	"Err.:(%d) - %s: \"..\"\n"
	.text
	.globl	change_dir
	.type	change_dir, @function
change_dir:
.LFB8:
	.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, 8
	.cfi_offset 3, -24
	lea	rdi, .LC3[rip]
	call	chdir@PLT
	test	eax, eax
	jns	.L10
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rbx
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	change_dir, .-change_dir
	.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	"877336.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Err.:(%d) - %s: buf\012\000"
	.align	2
.LC1:
	.ascii	"Err.:(%d) - %s; %s\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	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	bl	get_working_dir
	bl	change_dir
	mov	r1, #0
	mov	r0, #0
	bl	getcwd
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L5
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L5+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	bl	get_working_dir
	bl	change_dir
	bl	get_working_dir
	ldr	r0, [fp, #-16]
	bl	chdir
	mov	r3, r0
	cmp	r3, #0
	bge	.L3
	ldr	r3, .L5
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r2, r0
	ldr	r3, [fp, #-16]
	str	r3, [sp]
	mov	r3, r2
	mov	r2, r5
	ldr	r1, .L5+8
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L3:
	ldr	r0, [fp, #-16]
	bl	puts
	ldr	r0, [fp, #-16]
	bl	free
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L6:
	.align	2
.L5:
	.word	stderr
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Err.:(%d) - %s: curr. workdir\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_working_dir
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_working_dir, %function
get_working_dir:
	@ args = 0, pretend = 0, frame = 4104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #4096
	sub	sp, sp, #8
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, #4096
	mov	r0, r3
	bl	getcwd
	mov	r3, r0
	cmp	r3, #0
	bne	.L8
	ldr	r3, .L10+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L10+8
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L8:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	puts
	nop
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC3
	.word	stderr
	.word	.LC2
	.size	get_working_dir, .-get_working_dir
	.section	.rodata
	.align	2
.LC4:
	.ascii	"..\000"
	.align	2
.LC5:
	.ascii	"Err.:(%d) - %s: \"..\"\012\000"
	.text
	.align	2
	.global	change_dir
	.syntax unified
	.arm
	.fpu softvfp
	.type	change_dir, %function
change_dir:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	ldr	r0, .L15
	bl	chdir
	mov	r3, r0
	cmp	r3, #0
	bge	.L14
	ldr	r3, .L15+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L15+8
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L14:
	nop
	pop	{r4, r5, fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC4
	.word	stderr
	.word	.LC5
	.size	change_dir, .-change_dir
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
