	.file	"215769348.c"
	.intel_syntax noprefix
	.text
	.globl	sigint
	.type	sigint, @function
sigint:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sigint, .-sigint
	.section	.rodata
.LC0:
	.string	"Master started\n"
.LC1:
	.string	"."
.LC2:
	.string	"ftok"
.LC3:
	.string	"msgget"
.LC4:
	.string	"slave: %ld\nstatus: %s\n"
.LC5:
	.string	"msgctl"
.LC6:
	.string	"Master finished normally\n"
	.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, 560
	mov	DWORD PTR -548[rbp], edi
	mov	QWORD PTR -560[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -540[rbp], 0
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 15
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	esi, 103
	lea	rdi, .LC1[rip]
	call	ftok@PLT
	mov	DWORD PTR -536[rbp], eax
	cmp	DWORD PTR -536[rbp], -1
	jne	.L3
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L14
.L3:
	mov	eax, DWORD PTR -536[rbp]
	mov	esi, 896
	mov	edi, eax
	call	msgget@PLT
	mov	DWORD PTR -532[rbp], eax
	cmp	DWORD PTR -532[rbp], -1
	jne	.L5
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L14
.L5:
	lea	rsi, sigint[rip]
	mov	edi, 2
	call	signal@PLT
	jmp	.L6
.L11:
	movzx	eax, BYTE PTR -520[rbp]
	cmp	al, 70
	jne	.L7
	movzx	eax, BYTE PTR -519[rbp]
	test	al, al
	jne	.L7
	cmp	DWORD PTR -540[rbp], 0
	je	.L7
	sub	DWORD PTR -540[rbp], 1
	cmp	DWORD PTR -540[rbp], 0
	je	.L16
	jmp	.L6
.L7:
	movzx	eax, BYTE PTR -520[rbp]
	cmp	al, 82
	jne	.L10
	movzx	eax, BYTE PTR -519[rbp]
	test	al, al
	jne	.L10
	add	DWORD PTR -540[rbp], 1
.L10:
	mov	rdx, QWORD PTR -528[rbp]
	mov	rax, QWORD PTR stdout[rip]
	lea	rcx, -528[rbp]
	add	rcx, 8
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L6:
	lea	rsi, -528[rbp]
	mov	eax, DWORD PTR -532[rbp]
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 512
	mov	edi, eax
	call	msgrcv@PLT
	cmp	rax, -1
	jne	.L11
	jmp	.L9
.L16:
	nop
.L9:
	mov	eax, DWORD PTR -532[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	msgctl@PLT
	cmp	eax, -1
	jne	.L12
	lea	rdi, .LC5[rip]
	call	perror@PLT
	jmp	.L13
.L12:
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
.L13:
	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	"215769348.c"
	.text
	.align	2
	.global	sigint
	.syntax unified
	.arm
	.fpu softvfp
	.type	sigint, %function
sigint:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	sigint, .-sigint
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Master started\012\000"
	.align	2
.LC1:
	.ascii	".\000"
	.align	2
.LC2:
	.ascii	"ftok\000"
	.align	2
.LC3:
	.ascii	"msgget\000"
	.align	2
.LC4:
	.ascii	"slave: %ld\012status: %s\012\000"
	.align	2
.LC5:
	.ascii	"msgctl\000"
	.align	2
.LC6:
	.ascii	"Master finished normally\012\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 544
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #552
	str	r0, [fp, #-544]
	str	r1, [fp, #-548]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-536]
	ldr	r3, .L17+4
	ldr	r3, [r3]
	mov	r2, #15
	mov	r1, #1
	ldr	r0, .L17+8
	bl	fwrite
	mov	r1, #103
	ldr	r0, .L17+12
	bl	ftok
	str	r0, [fp, #-532]
	ldr	r3, [fp, #-532]
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L17+16
	bl	perror
	mvn	r3, #0
	b	.L14
.L3:
	mov	r1, #896
	ldr	r0, [fp, #-532]
	bl	msgget
	str	r0, [fp, #-528]
	ldr	r3, [fp, #-528]
	cmn	r3, #1
	bne	.L5
	ldr	r0, .L17+20
	bl	perror
	mvn	r3, #0
	b	.L14
.L5:
	ldr	r1, .L17+24
	mov	r0, #2
	bl	signal
	b	.L6
.L11:
	ldrb	r3, [fp, #-520]	@ zero_extendqisi2
	cmp	r3, #70
	bne	.L7
	ldrb	r3, [fp, #-519]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L7
	ldr	r3, [fp, #-536]
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-536]
	sub	r3, r3, #1
	str	r3, [fp, #-536]
	ldr	r3, [fp, #-536]
	cmp	r3, #0
	beq	.L16
	b	.L6
.L7:
	ldrb	r3, [fp, #-520]	@ zero_extendqisi2
	cmp	r3, #82
	bne	.L10
	ldrb	r3, [fp, #-519]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-536]
	add	r3, r3, #1
	str	r3, [fp, #-536]
.L10:
	ldr	r3, .L17+4
	ldr	r0, [r3]
	ldr	r2, [fp, #-524]
	sub	r3, fp, #524
	add	r3, r3, #4
	ldr	r1, .L17+28
	bl	fprintf
.L6:
	sub	r1, fp, #524
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #512
	ldr	r0, [fp, #-528]
	bl	msgrcv
	mov	r3, r0
	cmn	r3, #1
	bne	.L11
	b	.L9
.L16:
	nop
.L9:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-528]
	bl	msgctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L12
	ldr	r0, .L17+32
	bl	perror
	b	.L13
.L12:
	ldr	r3, .L17+4
	ldr	r3, [r3]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L17+36
	bl	fwrite
.L13:
	mov	r3, #0
.L14:
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC7
	.word	stdout
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	sigint
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
