	.file	"105713.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Proces %d, tablica pod adresem %p:\n"
.LC1:
	.string	"|%c"
.LC2:
	.string	"|\n"
	.text
	.globl	print_table
	.type	print_table, @function
print_table:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	call	getpid@PLT
	mov	ecx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L2:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L3
	lea	rdi, .LC2[rip]
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_table, .-print_table
	.section	.rodata
.LC3:
	.string	"Wielko\305\233\304\207 strony to %lu\n"
.LC4:
	.string	"mmap"
.LC5:
	.string	"sem_init"
.LC6:
	.string	"fork"
.LC7:
	.string	"sem_wait"
	.align 8
.LC8:
	.string	"Pid rodzica %d, pid dziecka: %d\n"
	.align 8
.LC9:
	.string	"Proces %d, Zmieni\305\202em zawartos\304\207 pami\304\231ci\n"
.LC10:
	.string	"sem_post"
	.text
	.globl	main
	.type	main, @function
main:
.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, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movabs	rax, 7719276882635615297
	mov	QWORD PTR -20[rbp], rax
	mov	DWORD PTR -12[rbp], 6386799
	mov	DWORD PTR -72[rbp], -1
	mov	edi, 30
	call	sysconf@PLT
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -68[rbp], 3
	mov	DWORD PTR -64[rbp], 33
	mov	ecx, DWORD PTR -72[rbp]
	mov	edx, DWORD PTR -64[rbp]
	mov	eax, DWORD PTR -68[rbp]
	mov	r9d, 0
	mov	r8d, ecx
	mov	ecx, edx
	mov	edx, eax
	mov	esi, 44
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -56[rbp], rax
	cmp	QWORD PTR -56[rbp], -1
	jne	.L6
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	syserr@PLT
.L6:
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 32
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, 12
	mov	rdi, rax
	call	print_table
	mov	rax, QWORD PTR -32[rbp]
	mov	edx, 0
	mov	esi, 1
	mov	rdi, rax
	call	sem_init@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, 0
	mov	esi, 1
	mov	rdi, rax
	call	sem_init@PLT
	test	eax, eax
	je	.L7
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	syserr@PLT
.L7:
	call	fork@PLT
	mov	DWORD PTR -60[rbp], eax
	cmp	DWORD PTR -60[rbp], -1
	je	.L8
	cmp	DWORD PTR -60[rbp], 0
	je	.L9
	jmp	.L16
.L8:
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	syserr@PLT
.L9:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	sem_wait@PLT
	test	eax, eax
	je	.L11
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	syserr@PLT
.L11:
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, 12
	mov	rdi, rax
	call	print_table
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, 12
	mov	rdi, rax
	call	munmap@PLT
	mov	eax, 0
	jmp	.L14
.L16:
	call	getpid@PLT
	mov	ecx, eax
	mov	eax, DWORD PTR -60[rbp]
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	mov	edi, 2
	call	sleep@PLT
	lea	rcx, -20[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, 12
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	call	getpid@PLT
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, 12
	mov	rdi, rax
	call	print_table
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	sem_post@PLT
	test	eax, eax
	je	.L13
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	syserr@PLT
.L13:
	mov	edi, 0
	call	wait@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	sem_destroy@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	esi, 44
	mov	rdi, rax
	call	munmap@PLT
	mov	eax, 0
.L14:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"105713.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Proces %d, tablica pod adresem %p:\012\000"
	.align	2
.LC1:
	.ascii	"|%c\000"
	.align	2
.LC2:
	.ascii	"|\012\000"
	.text
	.align	2
	.global	print_table
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_table, %function
print_table:
	@ 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	getpid
	mov	r3, r0
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, .L5
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L3:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L5+4
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L3
	ldr	r0, .L5+8
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	print_table, .-print_table
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Wielko\305\233\304\207 strony to %lu\012\000"
	.align	2
.LC5:
	.ascii	"mmap\000"
	.align	2
.LC6:
	.ascii	"sem_init\000"
	.align	2
.LC7:
	.ascii	"fork\000"
	.align	2
.LC8:
	.ascii	"sem_wait\000"
	.align	2
.LC9:
	.ascii	"Pid rodzica %d, pid dziecka: %d\012\000"
	.align	2
.LC10:
	.ascii	"Proces %d, Zmieni\305\202em zawartos\304\207 pami\304"
	.ascii	"\231ci\012\000"
	.align	2
.LC11:
	.ascii	"sem_post\000"
	.align	2
.LC3:
	.ascii	"Ala ma kota\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L19+4
	sub	r3, fp, #20
	ldm	r2, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	mvn	r3, #0
	str	r3, [fp, #-52]
	mov	r0, #30
	bl	sysconf
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L19+8
	bl	printf
	mov	r3, #3
	str	r3, [fp, #-48]
	mov	r3, #33
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-52]
	str	r3, [sp]
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-48]
	mov	r1, #28
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmn	r3, #1
	bne	.L8
	ldr	r0, .L19+12
	bl	syserr
.L8:
	ldr	r3, [fp, #-40]
	add	r3, r3, #16
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-32]
	mov	r1, #12
	ldr	r0, [fp, #-36]
	bl	print_table
	mov	r2, #0
	mov	r1, #1
	ldr	r0, [fp, #-28]
	bl	sem_init
	mov	r2, #0
	mov	r1, #1
	ldr	r0, [fp, #-32]
	bl	sem_init
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r0, .L19+16
	bl	syserr
.L9:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmn	r3, #1
	beq	.L10
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L11
	b	.L18
.L10:
	ldr	r0, .L19+20
	bl	syserr
.L11:
	ldr	r0, [fp, #-32]
	bl	sem_wait
	mov	r3, r0
	cmp	r3, #0
	beq	.L13
	ldr	r0, .L19+24
	bl	syserr
.L13:
	mov	r1, #12
	ldr	r0, [fp, #-36]
	bl	print_table
	mov	r1, #12
	ldr	r0, [fp, #-36]
	bl	munmap
	mov	r3, #0
	b	.L16
.L18:
	bl	getpid
	mov	r3, r0
	ldr	r2, [fp, #-24]
	mov	r1, r3
	ldr	r0, .L19+28
	bl	printf
	nop
	mov	r0, #2
	bl	sleep
	sub	r3, fp, #20
	mov	r2, #12
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	strncpy
	bl	getpid
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L19+32
	bl	printf
	mov	r1, #12
	ldr	r0, [fp, #-36]
	bl	print_table
	ldr	r0, [fp, #-32]
	bl	sem_post
	mov	r3, r0
	cmp	r3, #0
	beq	.L15
	ldr	r0, .L19+36
	bl	syserr
.L15:
	mov	r0, #0
	bl	wait
	ldr	r0, [fp, #-32]
	bl	sem_destroy
	mov	r1, #28
	ldr	r0, [fp, #-40]
	bl	munmap
	mov	r3, #0
.L16:
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC12
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
