	.file	"947811.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"shmget()"
.LC1:
	.string	"fork()"
.LC2:
	.string	"shmat()"
.LC3:
	.string	"Name: %s\n"
.LC4:
	.string	"Math: %d\n"
.LC5:
	.string	"Chinese: %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	edx, 384
	mov	esi, 40
	mov	edi, 0
	call	shmget@PLT
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], 0
	jns	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	call	fork@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jns	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	cmp	DWORD PTR -12[rbp], 0
	jne	.L4
	mov	eax, DWORD PTR -16[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], -1
	jne	.L5
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 1851878465
	mov	BYTE PTR 4[rax], 0
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 458129845
	shr	rdx, 32
	sar	edx, 4
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 150
	sub	eax, ecx
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 32[rax], edx
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 458129845
	shr	rdx, 32
	sar	edx, 4
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 150
	sub	eax, ecx
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 36[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	shmdt@PLT
	mov	edi, 0
	call	exit@PLT
.L4:
	mov	edi, 0
	mov	eax, 0
	call	wait@PLT
	mov	eax, DWORD PTR -16[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], -1
	jne	.L6
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 32[rax]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 36[rax]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	shmdt@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.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	"947811.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"shmget()\000"
	.align	2
.LC1:
	.ascii	"fork()\000"
	.align	2
.LC2:
	.ascii	"shmat()\000"
	.align	2
.LC3:
	.ascii	"Alan\000"
	.align	2
.LC4:
	.ascii	"Name: %s\012\000"
	.align	2
.LC5:
	.ascii	"Math: %d\012\000"
	.align	2
.LC6:
	.ascii	"Chinese: %d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r2, #384
	mov	r1, #40
	mov	r0, #0
	bl	shmget
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L7
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L7+4
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L4
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	shmat
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L5
	ldr	r0, .L7+8
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	ldr	r3, [fp, #-8]
	ldr	r2, .L7+12
	mov	r0, r3
	mov	r1, r2
	mov	r3, #5
	mov	r2, r3
	bl	memcpy
	bl	rand
	mov	r1, r0
	ldr	r3, .L7+16
	smull	r2, r3, r1, r3
	asr	r2, r3, #4
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #1
	mov	r2, r3
	sub	r2, r1, r2
	ldr	r3, [fp, #-8]
	str	r2, [r3, #32]
	bl	rand
	mov	r1, r0
	ldr	r3, .L7+16
	smull	r2, r3, r1, r3
	asr	r2, r3, #4
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	sub	r2, r2, r3
	lsl	r3, r2, #1
	mov	r2, r3
	sub	r2, r1, r2
	ldr	r3, [fp, #-8]
	str	r2, [r3, #36]
	ldr	r0, [fp, #-8]
	bl	shmdt
	mov	r0, #0
	bl	exit
.L4:
	mov	r0, #0
	bl	wait
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	shmat
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L6
	ldr	r0, .L7+8
	bl	perror
	mov	r0, #1
	bl	exit
.L6:
	ldr	r3, [fp, #-8]
	mov	r1, r3
	ldr	r0, .L7+20
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #32]
	mov	r1, r3
	ldr	r0, .L7+24
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #36]
	mov	r1, r3
	ldr	r0, .L7+28
	bl	printf
	ldr	r0, [fp, #-8]
	bl	shmdt
	mov	r0, #0
	bl	exit
.L8:
	.align	2
.L7:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	458129845
	.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
