	.file	"779128.c"
	.intel_syntax noprefix
	.text
	.globl	CHOOSE_JUDGE
	.bss
	.align 4
	.type	CHOOSE_JUDGE, @object
	.size	CHOOSE_JUDGE, 4
CHOOSE_JUDGE:
	.zero	4
	.globl	JUDGE_COUNT
	.align 4
	.type	JUDGE_COUNT, @object
	.size	JUDGE_COUNT, 4
JUDGE_COUNT:
	.zero	4
	.text
	.globl	handler_USR1
	.type	handler_USR1, @function
handler_USR1:
.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
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	mov	DWORD PTR CHOOSE_JUDGE[rip], 1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	handler_USR1, .-handler_USR1
	.globl	handler_USR2
	.type	handler_USR2, @function
handler_USR2:
.LFB7:
	.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
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	mov	eax, DWORD PTR JUDGE_COUNT[rip]
	add	eax, 1
	mov	DWORD PTR JUDGE_COUNT[rip], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	handler_USR2, .-handler_USR2
	.section	.rodata
.LC0:
	.string	"./queue"
.LC1:
	.string	"pidof ./judge%d"
.LC2:
	.string	"r"
.LC3:
	.string	"pidof ./performer"
.LC4:
	.string	"\nJudge%d is chosen\n"
.LC5:
	.string	"%d"
.LC6:
	.string	"Score from Judge %d is: %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 1536
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -1360[rbp]
	mov	eax, 0
	mov	ecx, 19
	mov	rdi, rdx
	rep stosq
	mov	DWORD PTR -1224[rbp], 4
	lea	rax, handler_USR1[rip]
	mov	QWORD PTR -1360[rbp], rax
	lea	rax, -1360[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 10
	call	sigaction@PLT
	lea	rdx, -1200[rbp]
	mov	eax, 0
	mov	ecx, 19
	mov	rdi, rdx
	rep stosq
	mov	DWORD PTR -1064[rbp], 4
	lea	rax, handler_USR2[rip]
	mov	QWORD PTR -1200[rbp], rax
	lea	rax, -1200[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 12
	call	sigaction@PLT
	mov	esi, 0
	lea	rdi, .LC0[rip]
	call	ftok@PLT
	mov	DWORD PTR -1512[rbp], eax
	mov	eax, DWORD PTR -1512[rbp]
	mov	esi, 950
	mov	edi, eax
	call	msgget@PLT
	mov	DWORD PTR -1508[rbp], eax
	mov	DWORD PTR -1524[rbp], 0
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -1524[rbp]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -1496[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -1496[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	popen@PLT
	mov	rdi, rax
	call	fileno@PLT
	mov	DWORD PTR -1504[rbp], eax
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1504[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	edx, DWORD PTR -1524[rbp]
	movsx	rdx, edx
	mov	DWORD PTR -1484[rbp+rdx*4], eax
	add	DWORD PTR -1524[rbp], 1
.L4:
	cmp	DWORD PTR -1524[rbp], 2
	jle	.L5
	nop
.L6:
	mov	eax, DWORD PTR CHOOSE_JUDGE[rip]
	test	eax, eax
	je	.L6
	lea	rsi, .LC2[rip]
	lea	rdi, .LC3[rip]
	call	popen@PLT
	mov	rdi, rax
	call	fileno@PLT
	mov	DWORD PTR -1504[rbp], eax
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1504[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -1500[rbp], eax
	mov	eax, DWORD PTR -1504[rbp]
	mov	edi, eax
	call	close@PLT
	call	rand@PLT
	mov	DWORD PTR -1520[rbp], eax
	cmp	DWORD PTR -1520[rbp], 50
	jle	.L7
	mov	DWORD PTR -1520[rbp], 0
	jmp	.L8
.L7:
	cmp	DWORD PTR -1520[rbp], 100
	jle	.L9
	mov	DWORD PTR -1520[rbp], 1
	jmp	.L8
.L9:
	mov	DWORD PTR -1520[rbp], 2
.L8:
	mov	eax, DWORD PTR -1520[rbp]
	add	eax, 1
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -1520[rbp]
	cdqe
	mov	eax, DWORD PTR -1484[rbp+rax*4]
	lea	rdx, -1472[rbp]
	lea	rcx, 8[rdx]
	mov	edx, eax
	lea	rsi, .LC5[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	sprintf@PLT
	call	getpid@PLT
	cdqe
	mov	QWORD PTR -1472[rbp], rax
	lea	rsi, -1472[rbp]
	mov	eax, DWORD PTR -1508[rbp]
	mov	ecx, 0
	mov	edx, 100
	mov	edi, eax
	call	msgsnd@PLT
	mov	eax, DWORD PTR -1500[rbp]
	mov	esi, 10
	mov	edi, eax
	call	kill@PLT
	mov	eax, DWORD PTR -1520[rbp]
	cdqe
	mov	eax, DWORD PTR -1484[rbp+rax*4]
	mov	esi, 10
	mov	edi, eax
	call	kill@PLT
	nop
.L10:
	mov	eax, DWORD PTR JUDGE_COUNT[rip]
	cmp	eax, 3
	jne	.L10
	mov	DWORD PTR -1516[rbp], 0
	jmp	.L11
.L12:
	mov	eax, DWORD PTR -1516[rbp]
	cdqe
	mov	eax, DWORD PTR -1484[rbp+rax*4]
	movsx	rdx, eax
	lea	rsi, -1472[rbp]
	mov	eax, DWORD PTR -1508[rbp]
	mov	r8d, 0
	mov	rcx, rdx
	mov	edx, 100
	mov	edi, eax
	call	msgrcv@PLT
	mov	eax, DWORD PTR -1516[rbp]
	add	eax, 1
	lea	rdx, -1472[rbp]
	add	rdx, 8
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -1516[rbp], 1
.L11:
	cmp	DWORD PTR -1516[rbp], 2
	jle	.L12
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"779128.c"
	.text
	.global	CHOOSE_JUDGE
	.bss
	.align	2
	.type	CHOOSE_JUDGE, %object
	.size	CHOOSE_JUDGE, 4
CHOOSE_JUDGE:
	.space	4
	.global	JUDGE_COUNT
	.align	2
	.type	JUDGE_COUNT, %object
	.size	JUDGE_COUNT, 4
JUDGE_COUNT:
	.space	4
	.text
	.align	2
	.global	handler_USR1
	.syntax unified
	.arm
	.fpu softvfp
	.type	handler_USR1, %function
handler_USR1:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, .L2
	mov	r2, #1
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L3:
	.align	2
.L2:
	.word	CHOOSE_JUDGE
	.size	handler_USR1, .-handler_USR1
	.align	2
	.global	handler_USR2
	.syntax unified
	.arm
	.fpu softvfp
	.type	handler_USR2, %function
handler_USR2:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, .L5
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L5
	str	r3, [r2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L6:
	.align	2
.L5:
	.word	JUDGE_COUNT
	.size	handler_USR2, .-handler_USR2
	.section	.rodata
	.align	2
.LC0:
	.ascii	"./queue\000"
	.align	2
.LC1:
	.ascii	"pidof ./judge%d\000"
	.align	2
.LC2:
	.ascii	"r\000"
	.align	2
.LC3:
	.ascii	"pidof ./performer\000"
	.align	2
.LC4:
	.ascii	"\012Judge%d is chosen\012\000"
	.align	2
.LC5:
	.ascii	"%d\000"
	.align	2
.LC6:
	.ascii	"Score from Judge %d is: %s\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 = 1456
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1456
	sub	sp, sp, #8
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #1296
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r2, #140
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #4
	str	r3, [fp, #-1180]
	ldr	r3, .L19+4
	str	r3, [fp, #-1312]
	sub	r3, fp, #1296
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r2, #0
	mov	r1, r3
	mov	r0, #10
	bl	sigaction
	sub	r3, fp, #1168
	sub	r3, r3, #4
	mov	r2, #140
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #4
	str	r3, [fp, #-1040]
	ldr	r3, .L19+8
	str	r3, [fp, #-1172]
	sub	r3, fp, #1168
	sub	r3, r3, #4
	mov	r2, #0
	mov	r1, r3
	mov	r0, #12
	bl	sigaction
	mov	r1, #0
	ldr	r0, .L19+12
	bl	ftok
	str	r0, [fp, #-1448]
	ldr	r1, .L19+16
	ldr	r0, [fp, #-1448]
	bl	msgget
	str	r0, [fp, #-1444]
	mov	r3, #0
	str	r3, [fp, #-1460]
	b	.L8
.L9:
	ldr	r3, [fp, #-1460]
	add	r3, r3, #1
	mov	r2, r3
	ldr	r1, .L19+20
	ldr	r0, [fp, #-1432]
	bl	sprintf
	ldr	r1, .L19+24
	ldr	r0, [fp, #-1432]
	bl	popen
	mov	r3, r0
	mov	r0, r3
	bl	fileno
	str	r0, [fp, #-1440]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1440]
	bl	read
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	atoi
	mov	r2, r0
	ldr	r3, [fp, #-1460]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-1424]
	ldr	r3, [fp, #-1460]
	add	r3, r3, #1
	str	r3, [fp, #-1460]
.L8:
	ldr	r3, [fp, #-1460]
	cmp	r3, #2
	ble	.L9
	nop
.L10:
	ldr	r3, .L19+28
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L10
	ldr	r1, .L19+24
	ldr	r0, .L19+32
	bl	popen
	mov	r3, r0
	mov	r0, r3
	bl	fileno
	str	r0, [fp, #-1440]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1440]
	bl	read
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-1436]
	ldr	r0, [fp, #-1440]
	bl	close
	bl	rand
	str	r0, [fp, #-1456]
	ldr	r3, [fp, #-1456]
	cmp	r3, #50
	ble	.L11
	mov	r3, #0
	str	r3, [fp, #-1456]
	b	.L12
.L11:
	ldr	r3, [fp, #-1456]
	cmp	r3, #100
	ble	.L13
	mov	r3, #1
	str	r3, [fp, #-1456]
	b	.L12
.L13:
	mov	r3, #2
	str	r3, [fp, #-1456]
.L12:
	ldr	r3, [fp, #-1456]
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L19+36
	bl	printf
	ldr	r3, [fp, #-1456]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-1424]
	sub	r3, fp, #1408
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #4
	ldr	r1, .L19+40
	mov	r0, r3
	bl	sprintf
	bl	getpid
	mov	r3, r0
	str	r3, [fp, #-1416]
	sub	r1, fp, #1408
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #100
	ldr	r0, [fp, #-1444]
	bl	msgsnd
	mov	r1, #10
	ldr	r0, [fp, #-1436]
	bl	kill
	ldr	r3, [fp, #-1456]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-1424]
	mov	r1, #10
	mov	r0, r3
	bl	kill
	nop
.L14:
	ldr	r3, .L19+44
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L14
	mov	r3, #0
	str	r3, [fp, #-1452]
	b	.L15
.L16:
	ldr	r3, [fp, #-1452]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-1424]
	sub	r1, fp, #1408
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r2, #0
	str	r2, [sp]
	mov	r2, #100
	ldr	r0, [fp, #-1444]
	bl	msgrcv
	ldr	r3, [fp, #-1452]
	add	r1, r3, #1
	sub	r3, fp, #1408
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #4
	mov	r2, r3
	ldr	r0, .L19+48
	bl	printf
	ldr	r3, [fp, #-1452]
	add	r3, r3, #1
	str	r3, [fp, #-1452]
.L15:
	ldr	r3, [fp, #-1452]
	cmp	r3, #2
	ble	.L16
	mov	r3, #0
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L18
	bl	__stack_chk_fail
.L18:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC7
	.word	handler_USR1
	.word	handler_USR2
	.word	.LC0
	.word	950
	.word	.LC1
	.word	.LC2
	.word	CHOOSE_JUDGE
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	JUDGE_COUNT
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
