	.file	"29825607.c"
	.intel_syntax noprefix
	.text
	.globl	mutex
	.bss
	.align 32
	.type	mutex, @object
	.size	mutex, 40
mutex:
	.zero	40
	.globl	cond
	.align 32
	.type	cond, @object
	.size	cond, 48
cond:
	.zero	48
	.globl	shangpin_head
	.align 8
	.type	shangpin_head, @object
	.size	shangpin_head, 8
shangpin_head:
	.zero	8
	.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, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 0
	lea	rdi, mutex[rip]
	call	pthread_mutex_init@PLT
	mov	esi, 0
	lea	rdi, cond[rip]
	call	pthread_cond_init@PLT
	lea	rax, -24[rbp]
	mov	ecx, 0
	lea	rdx, shengchan[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -16[rbp]
	mov	ecx, 0
	lea	rdx, xiaofei[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rdi, mutex[rip]
	call	pthread_mutex_destroy@PLT
	lea	rdi, cond[rip]
	call	pthread_cond_destroy@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC0:
	.string	"shangpin+1"
.LC1:
	.string	"shangpin + 1"
	.text
	.globl	shengchan
	.type	shengchan, @function
shengchan:
.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	QWORD PTR -24[rbp], rdi
.L7:
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR shangpin_head[rip]
	test	rax, rax
	jne	.L5
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR shangpin_head[rip], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], 0
	lea	rdi, .LC0[rip]
	call	puts@PLT
	jmp	.L6
.L5:
	mov	rax, QWORD PTR shangpin_head[rip]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], 0
	lea	rdi, .LC1[rip]
	call	puts@PLT
.L6:
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	lea	rdi, cond[rip]
	call	pthread_cond_signal@PLT
	mov	edi, 1
	call	sleep@PLT
	jmp	.L7
	.cfi_endproc
.LFE7:
	.size	shengchan, .-shengchan
	.section	.rodata
.LC2:
	.string	"------shangpin - 1"
	.text
	.globl	xiaofei
	.type	xiaofei, @function
xiaofei:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
.L11:
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR shangpin_head[rip]
	test	rax, rax
	jne	.L9
	lea	rsi, mutex[rip]
	lea	rdi, cond[rip]
	call	pthread_cond_wait@PLT
	jmp	.L10
.L9:
	mov	rax, QWORD PTR shangpin_head[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR shangpin_head[rip], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
.L10:
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	mov	edi, 1
	call	sleep@PLT
	jmp	.L11
	.cfi_endproc
.LFE8:
	.size	xiaofei, .-xiaofei
	.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	"29825607.c"
	.text
	.comm	mutex,24,4
	.comm	cond,48,8
	.global	shangpin_head
	.bss
	.align	2
	.type	shangpin_head, %object
	.size	shangpin_head, 4
shangpin_head:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.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
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #0
	ldr	r0, .L4+4
	bl	pthread_mutex_init
	mov	r1, #0
	ldr	r0, .L4+8
	bl	pthread_cond_init
	sub	r0, fp, #16
	mov	r3, #0
	ldr	r2, .L4+12
	mov	r1, #0
	bl	pthread_create
	sub	r0, fp, #12
	mov	r3, #0
	ldr	r2, .L4+16
	mov	r1, #0
	bl	pthread_create
	ldr	r0, .L4+4
	bl	pthread_mutex_destroy
	ldr	r0, .L4+8
	bl	pthread_cond_destroy
	ldr	r3, [fp, #-16]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-12]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, #0
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.word	mutex
	.word	cond
	.word	shengchan
	.word	xiaofei
	.size	main, .-main
	.section	.rodata
	.align	2
.LC1:
	.ascii	"shangpin+1\000"
	.align	2
.LC2:
	.ascii	"shangpin + 1\000"
	.text
	.align	2
	.global	shengchan
	.syntax unified
	.arm
	.fpu softvfp
	.type	shengchan, %function
shengchan:
	@ 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]
.L9:
	ldr	r0, .L10
	bl	pthread_mutex_lock
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, .L10+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L7
	ldr	r2, .L10+4
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r0, .L10+8
	bl	puts
	b	.L8
.L7:
	ldr	r3, .L10+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r0, .L10+12
	bl	puts
.L8:
	ldr	r0, .L10
	bl	pthread_mutex_unlock
	ldr	r0, .L10+16
	bl	pthread_cond_signal
	mov	r0, #1
	bl	sleep
	b	.L9
.L11:
	.align	2
.L10:
	.word	mutex
	.word	shangpin_head
	.word	.LC1
	.word	.LC2
	.word	cond
	.size	shengchan, .-shengchan
	.section	.rodata
	.align	2
.LC3:
	.ascii	"------shangpin - 1\000"
	.text
	.align	2
	.global	xiaofei
	.syntax unified
	.arm
	.fpu softvfp
	.type	xiaofei, %function
xiaofei:
	@ 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]
.L15:
	ldr	r0, .L16
	bl	pthread_mutex_lock
	ldr	r3, .L16+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L13
	ldr	r1, .L16
	ldr	r0, .L16+8
	bl	pthread_cond_wait
	b	.L14
.L13:
	ldr	r3, .L16+4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, .L16+4
	str	r3, [r2]
	ldr	r0, [fp, #-8]
	bl	free
	ldr	r0, .L16+12
	bl	puts
.L14:
	ldr	r0, .L16
	bl	pthread_mutex_unlock
	mov	r0, #1
	bl	sleep
	b	.L15
.L17:
	.align	2
.L16:
	.word	mutex
	.word	shangpin_head
	.word	cond
	.word	.LC3
	.size	xiaofei, .-xiaofei
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
