	.file	"431916.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"ftok"
.LC1:
	.string	"shmget"
	.text
	.type	CommShm, @function
CommShm:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	DWORD PTR -36[rbp], ecx
	mov	DWORD PTR -12[rbp], 0
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	ftok@PLT
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -8[rbp], -1
	jne	.L6
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L3
.L6:
	nop
.L2:
	mov	eax, DWORD PTR -32[rbp]
	movsx	rcx, eax
	mov	edx, DWORD PTR -36[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	shmget@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L4
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -12[rbp], edx
	cmp	eax, 1
	jg	.L5
	mov	eax, DWORD PTR -8[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmget@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	je	.L5
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmctl@PLT
	jmp	.L2
.L5:
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, -2
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -4[rbp]
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	CommShm, .-CommShm
	.section	.rodata
.LC2:
	.string	"shmctl"
	.text
	.globl	DestroyShm
	.type	DestroyShm, @function
DestroyShm:
.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	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmctl@PLT
	test	eax, eax
	jns	.L8
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L9
.L8:
	mov	eax, 0
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	DestroyShm, .-DestroyShm
	.globl	CreateShm
	.type	CreateShm, @function
CreateShm:
.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
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	DWORD PTR -16[rbp], edx
	mov	edx, DWORD PTR -16[rbp]
	mov	esi, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, 1974
	mov	rdi, rax
	call	CommShm
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	CreateShm, .-CreateShm
	.globl	GetShm
	.type	GetShm, @function
GetShm:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	DWORD PTR -16[rbp], edx
	mov	edx, DWORD PTR -16[rbp]
	mov	esi, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, 512
	mov	rdi, rax
	call	CommShm
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	GetShm, .-GetShm
	.globl	Shmat
	.type	Shmat, @function
Shmat:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmat@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	Shmat, .-Shmat
	.globl	Shmdt
	.type	Shmdt, @function
Shmdt:
.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
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	shmdt@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	Shmdt, .-Shmdt
	.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	"431916.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"ftok\000"
	.align	2
.LC1:
	.ascii	"shmget\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	CommShm, %function
CommShm:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	ftok
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L6
	ldr	r0, .L7
	bl	perror
	mvn	r3, #0
	b	.L3
.L6:
	nop
.L2:
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-36]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	shmget
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L4
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	cmp	r3, #1
	bgt	.L5
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-12]
	bl	shmget
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	beq	.L5
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	shmctl
	b	.L2
.L5:
	ldr	r0, .L7+4
	bl	perror
	mvn	r3, #1
	b	.L3
.L4:
	ldr	r3, [fp, #-8]
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC0
	.word	.LC1
	.size	CommShm, .-CommShm
	.section	.rodata
	.align	2
.LC2:
	.ascii	"shmctl\000"
	.text
	.align	2
	.global	DestroyShm
	.syntax unified
	.arm
	.fpu softvfp
	.type	DestroyShm, %function
DestroyShm:
	@ 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]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	shmctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L10
	ldr	r0, .L12
	bl	perror
	mvn	r3, #0
	b	.L11
.L10:
	mov	r3, #0
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC2
	.size	DestroyShm, .-DestroyShm
	.align	2
	.global	CreateShm
	.syntax unified
	.arm
	.fpu softvfp
	.type	CreateShm, %function
CreateShm:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, .L16
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	CommShm
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	1974
	.size	CreateShm, .-CreateShm
	.align	2
	.global	GetShm
	.syntax unified
	.arm
	.fpu softvfp
	.type	GetShm, %function
GetShm:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	mov	r3, #512
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	CommShm
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	GetShm, .-GetShm
	.align	2
	.global	Shmat
	.syntax unified
	.arm
	.fpu softvfp
	.type	Shmat, %function
Shmat:
	@ 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]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	shmat
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	Shmat, .-Shmat
	.align	2
	.global	Shmdt
	.syntax unified
	.arm
	.fpu softvfp
	.type	Shmdt, %function
Shmdt:
	@ 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]
	ldr	r0, [fp, #-8]
	bl	shmdt
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	Shmdt, .-Shmdt
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
