	.file	"165766172.c"
	.intel_syntax noprefix
	.text
	.globl	binary_semaphore_allocation
	.type	binary_semaphore_allocation, @function
binary_semaphore_allocation:
.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	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, 1
	mov	edi, eax
	call	semget@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	binary_semaphore_allocation, .-binary_semaphore_allocation
	.globl	binary_semaphore_deallocate
	.type	binary_semaphore_deallocate, @function
binary_semaphore_deallocate:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rcx, rdx
	mov	edx, 0
	mov	esi, 1
	mov	edi, eax
	mov	eax, 0
	call	semctl@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	binary_semaphore_deallocate, .-binary_semaphore_deallocate
	.globl	binary_semaphore_initialize
	.type	binary_semaphore_initialize, @function
binary_semaphore_initialize:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	WORD PTR -10[rbp], 1
	lea	rax, -10[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	rcx, rdx
	mov	edx, 17
	mov	esi, 0
	mov	edi, eax
	mov	eax, 0
	call	semctl@PLT
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	binary_semaphore_initialize, .-binary_semaphore_initialize
	.globl	binary_semaphore_wait
	.type	binary_semaphore_wait, @function
binary_semaphore_wait:
.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	DWORD PTR -20[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	WORD PTR -14[rbp], 0
	mov	WORD PTR -12[rbp], -1
	mov	WORD PTR -10[rbp], 4096
	lea	rcx, -14[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	semop@PLT
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	binary_semaphore_wait, .-binary_semaphore_wait
	.globl	binary_semaphore_post
	.type	binary_semaphore_post, @function
binary_semaphore_post:
.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	DWORD PTR -20[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	WORD PTR -14[rbp], 0
	mov	WORD PTR -12[rbp], 1
	mov	WORD PTR -10[rbp], 4096
	lea	rcx, -14[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	semop@PLT
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	binary_semaphore_post, .-binary_semaphore_post
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.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, 144
	mov	esi, 896
	mov	edi, 0
	call	binary_semaphore_allocation
	mov	DWORD PTR -132[rbp], eax
	mov	eax, DWORD PTR -132[rbp]
	mov	edi, eax
	call	binary_semaphore_initialize
	call	getpagesize@PLT
	cdqe
	mov	edx, 1920
	mov	rsi, rax
	mov	edi, 0
	call	shmget@PLT
	mov	DWORD PTR -128[rbp], eax
	mov	eax, DWORD PTR -128[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR -120[rbp], rax
	mov	rax, QWORD PTR -120[rbp]
	mov	edx, 100
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	shmdt@PLT
	call	fork@PLT
	mov	DWORD PTR -124[rbp], eax
	mov	DWORD PTR -136[rbp], 0
	mov	DWORD PTR -136[rbp], 0
	jmp	.L15
.L16:
	mov	edx, DWORD PTR -128[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	esi, edx
	mov	edi, eax
	call	print_hundred
	add	DWORD PTR -136[rbp], 1
.L15:
	cmp	DWORD PTR -136[rbp], 999999
	jle	.L16
	mov	eax, DWORD PTR -128[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmctl@PLT
	mov	eax, DWORD PTR -132[rbp]
	mov	edi, eax
	call	binary_semaphore_deallocate
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	main, .-main
	.section	.rodata
.LC1:
	.string	"Number: %d - PID: %d\n"
	.text
	.globl	print_hundred
	.type	print_hundred, @function
print_hundred:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	binary_semaphore_wait
	lea	rdx, -20[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	mov	DWORD PTR -20[rbp], eax
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rdx, -20[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	mov	DWORD PTR -20[rbp], eax
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rdx, -20[rbp]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	call	getpid@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	binary_semaphore_post
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	shmdt@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	print_hundred, .-print_hundred
	.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	"165766172.c"
	.text
	.align	2
	.global	binary_semaphore_allocation
	.syntax unified
	.arm
	.fpu softvfp
	.type	binary_semaphore_allocation, %function
binary_semaphore_allocation:
	@ 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	r2, [fp, #-12]
	mov	r1, #1
	ldr	r0, [fp, #-8]
	bl	semget
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	binary_semaphore_allocation, .-binary_semaphore_allocation
	.align	2
	.global	binary_semaphore_deallocate
	.syntax unified
	.arm
	.fpu softvfp
	.type	binary_semaphore_deallocate, %function
binary_semaphore_deallocate:
	@ 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, [fp, #-8]
	mov	r2, #0
	mov	r1, #1
	ldr	r0, [fp, #-16]
	bl	semctl
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	binary_semaphore_deallocate, .-binary_semaphore_deallocate
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	binary_semaphore_initialize
	.syntax unified
	.arm
	.fpu softvfp
	.type	binary_semaphore_initialize, %function
binary_semaphore_initialize:
	@ 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, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	strh	r3, [fp, #-12]	@ movhi
	sub	r3, fp, #12
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	mov	r2, #17
	mov	r1, #0
	ldr	r0, [fp, #-24]
	bl	semctl
	mov	r3, r0
	ldr	r2, .L8
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC0
	.size	binary_semaphore_initialize, .-binary_semaphore_initialize
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	binary_semaphore_wait
	.syntax unified
	.arm
	.fpu softvfp
	.type	binary_semaphore_wait, %function
binary_semaphore_wait:
	@ 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, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	strh	r3, [fp, #-16]	@ movhi
	mvn	r3, #0
	strh	r3, [fp, #-14]	@ movhi
	mov	r3, #4096
	strh	r3, [fp, #-12]	@ movhi
	sub	r3, fp, #16
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	semop
	mov	r3, r0
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC1
	.size	binary_semaphore_wait, .-binary_semaphore_wait
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	binary_semaphore_post
	.syntax unified
	.arm
	.fpu softvfp
	.type	binary_semaphore_post, %function
binary_semaphore_post:
	@ 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, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	strh	r3, [fp, #-16]	@ movhi
	mov	r3, #1
	strh	r3, [fp, #-14]	@ movhi
	mov	r3, #4096
	strh	r3, [fp, #-12]	@ movhi
	sub	r3, fp, #16
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	semop
	mov	r3, r0
	ldr	r2, .L18
	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}
.L19:
	.align	2
.L18:
	.word	.LC2
	.size	binary_semaphore_post, .-binary_semaphore_post
	.section	.rodata
	.align	2
.LC3:
	.ascii	"%d\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #104
	mov	r1, #896
	mov	r0, #0
	bl	binary_semaphore_allocation
	str	r0, [fp, #-104]
	ldr	r0, [fp, #-104]
	bl	binary_semaphore_initialize
	bl	getpagesize
	mov	r3, r0
	mov	r2, #1920
	mov	r1, r3
	mov	r0, #0
	bl	shmget
	str	r0, [fp, #-100]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-100]
	bl	shmat
	str	r0, [fp, #-96]
	mov	r2, #100
	ldr	r1, .L24
	ldr	r0, [fp, #-96]
	bl	sprintf
	ldr	r0, [fp, #-96]
	bl	shmdt
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-92]
	mov	r3, #0
	str	r3, [fp, #-108]
	mov	r3, #0
	str	r3, [fp, #-108]
	b	.L21
.L22:
	ldr	r1, [fp, #-100]
	ldr	r0, [fp, #-104]
	bl	print_hundred
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L21:
	ldr	r3, [fp, #-108]
	ldr	r2, .L24+4
	cmp	r3, r2
	blt	.L22
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-100]
	bl	shmctl
	ldr	r0, [fp, #-104]
	bl	binary_semaphore_deallocate
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC3
	.word	1000000
	.size	main, .-main
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Number: %d - PID: %d\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	print_hundred
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_hundred, %function
print_hundred:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L28
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-36]
	bl	shmat
	str	r0, [fp, #-20]
	ldr	r0, [fp, #-32]
	bl	binary_semaphore_wait
	sub	r3, fp, #24
	mov	r2, r3
	ldr	r1, .L28+4
	ldr	r0, [fp, #-20]
	bl	__isoc99_sscanf
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	mov	r2, r3
	ldr	r1, .L28+4
	ldr	r0, [fp, #-20]
	bl	sprintf
	sub	r3, fp, #24
	mov	r2, r3
	ldr	r1, .L28+4
	ldr	r0, [fp, #-20]
	bl	__isoc99_sscanf
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	mov	r2, r3
	ldr	r1, .L28+4
	ldr	r0, [fp, #-20]
	bl	sprintf
	sub	r3, fp, #24
	mov	r2, r3
	ldr	r1, .L28+4
	ldr	r0, [fp, #-20]
	bl	__isoc99_sscanf
	ldr	r4, [fp, #-24]
	bl	getpid
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L28+8
	bl	printf
	ldr	r0, [fp, #-32]
	bl	binary_semaphore_post
	ldr	r0, [fp, #-20]
	bl	shmdt
	nop
	ldr	r3, .L28
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L27
	bl	__stack_chk_fail
.L27:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L29:
	.align	2
.L28:
	.word	.LC5
	.word	.LC3
	.word	.LC4
	.size	print_hundred, .-print_hundred
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
