	.file	"286266.c"
	.intel_syntax noprefix
	.text
	.globl	bathroom_create
	.type	bathroom_create, @function
bathroom_create:
.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	DWORD PTR -20[rbp], edi
	mov	edi, 56
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 16
	mov	esi, 0
	mov	rdi, rax
	call	pthread_mutex_init@PLT
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	bathroom_create, .-bathroom_create
	.globl	bathroom_t_destroy
	.type	bathroom_t_destroy, @function
bathroom_t_destroy:
.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 16
	mov	rdi, rax
	call	pthread_mutex_destroy@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	bathroom_t_destroy, .-bathroom_t_destroy
	.globl	bathroom_full
	.type	bathroom_full, @function
bathroom_full:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	edx, eax
	sete	al
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	bathroom_full, .-bathroom_full
	.globl	bathroom_empty
	.type	bathroom_empty, @function
bathroom_empty:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	sete	al
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	bathroom_empty, .-bathroom_empty
	.section	.rodata
.LC0:
	.string	"Peeing count = %d\n"
	.text
	.globl	someone_need_to_pee
	.type	someone_need_to_pee, @function
someone_need_to_pee:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
.L12:
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1431655766
	shr	rdx, 32
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	mov	ecx, edx
	add	ecx, ecx
	add	ecx, edx
	sub	eax, ecx
	mov	edx, eax
	mov	eax, edx
	mov	edi, eax
	call	sleep@PLT
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 16
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	bathroom_full
	test	al, al
	je	.L9
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 16
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	jmp	.L10
.L9:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	xor	eax, 1
	test	al, al
	je	.L11
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	lea	ecx, 1[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR [rdx], ecx
	cdqe
	add	rax, rsi
	mov	BYTE PTR [rax], 1
.L11:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 16
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
.L10:
	jmp	.L12
	.cfi_endproc
.LFE10:
	.size	someone_need_to_pee, .-someone_need_to_pee
	.section	.rodata
.LC1:
	.string	"A people finish, count = %d\n"
	.text
	.globl	someone_finish_pee
	.type	someone_finish_pee, @function
someone_finish_pee:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
.L15:
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1431655766
	shr	rdx, 32
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	mov	ecx, edx
	add	ecx, ecx
	add	ecx, edx
	sub	eax, ecx
	mov	edx, eax
	mov	eax, edx
	mov	edi, eax
	call	sleep@PLT
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 16
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	bathroom_empty
	xor	eax, 1
	test	al, al
	je	.L14
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L14
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cdqe
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
.L14:
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 16
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	jmp	.L15
	.cfi_endproc
.LFE11:
	.size	someone_finish_pee, .-someone_finish_pee
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 5
	call	bathroom_create
	mov	QWORD PTR -56[rbp], rax
	mov	rdx, QWORD PTR -56[rbp]
	lea	rax, -48[rbp]
	mov	rcx, rdx
	lea	rdx, someone_finish_pee[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	rax, QWORD PTR -56[rbp]
	lea	rdx, -48[rbp]
	lea	rdi, 8[rdx]
	mov	rcx, rax
	lea	rdx, someone_need_to_pee[rip]
	mov	esi, 0
	call	pthread_create@PLT
	mov	rax, QWORD PTR -56[rbp]
	lea	rdx, -48[rbp]
	lea	rdi, 16[rdx]
	mov	rcx, rax
	lea	rdx, someone_need_to_pee[rip]
	mov	esi, 0
	call	pthread_create@PLT
	mov	rax, QWORD PTR -56[rbp]
	lea	rdx, -48[rbp]
	lea	rdi, 24[rdx]
	mov	rcx, rax
	lea	rdx, someone_need_to_pee[rip]
	mov	esi, 0
	call	pthread_create@PLT
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE12:
	.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	"286266.c"
	.text
	.align	2
	.global	bathroom_create
	.syntax unified
	.arm
	.fpu softvfp
	.type	bathroom_create, %function
bathroom_create:
	@ 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]
	mov	r0, #36
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	add	r3, r3, #12
	mov	r1, #0
	mov	r0, r3
	bl	pthread_mutex_init
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	bathroom_create, .-bathroom_create
	.align	2
	.global	bathroom_t_destroy
	.syntax unified
	.arm
	.fpu softvfp
	.type	bathroom_t_destroy, %function
bathroom_t_destroy:
	@ 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	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-8]
	add	r3, r3, #12
	mov	r0, r3
	bl	pthread_mutex_destroy
	ldr	r0, [fp, #-8]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	bathroom_t_destroy, .-bathroom_t_destroy
	.align	2
	.global	bathroom_full
	.syntax unified
	.arm
	.fpu softvfp
	.type	bathroom_full, %function
bathroom_full:
	@ 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]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	bathroom_full, .-bathroom_full
	.align	2
	.global	bathroom_empty
	.syntax unified
	.arm
	.fpu softvfp
	.type	bathroom_empty, %function
bathroom_empty:
	@ 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]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	bathroom_empty, .-bathroom_empty
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Peeing count = %d\012\000"
	.text
	.align	2
	.global	someone_need_to_pee
	.syntax unified
	.arm
	.fpu softvfp
	.type	someone_need_to_pee, %function
someone_need_to_pee:
	@ 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]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
.L12:
	bl	rand
	mov	r2, r0
	ldr	r3, .L13
	smull	r0, r1, r3, r2
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	sub	r1, r2, r3
	mov	r3, r1
	mov	r0, r3
	bl	sleep
	ldr	r3, [fp, #-8]
	add	r3, r3, #12
	mov	r0, r3
	bl	pthread_mutex_lock
	ldr	r0, [fp, #-8]
	bl	bathroom_full
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r3, [fp, #-8]
	add	r3, r3, #12
	mov	r0, r3
	bl	pthread_mutex_unlock
	b	.L10
.L9:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-8]
	ldr	r2, [r2]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L11
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	add	r0, r3, #1
	ldr	r1, [fp, #-8]
	str	r0, [r1]
	add	r3, r2, r3
	mov	r2, #1
	strb	r2, [r3]
.L11:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L13+4
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #12
	mov	r0, r3
	bl	pthread_mutex_unlock
.L10:
	b	.L12
.L14:
	.align	2
.L13:
	.word	1431655766
	.word	.LC0
	.size	someone_need_to_pee, .-someone_need_to_pee
	.section	.rodata
	.align	2
.LC1:
	.ascii	"A people finish, count = %d\012\000"
	.text
	.align	2
	.global	someone_finish_pee
	.syntax unified
	.arm
	.fpu softvfp
	.type	someone_finish_pee, %function
someone_finish_pee:
	@ 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]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
.L17:
	bl	rand
	mov	r2, r0
	ldr	r3, .L18
	smull	r0, r1, r3, r2
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #1
	add	r3, r3, r1
	sub	r1, r2, r3
	mov	r3, r1
	mov	r0, r3
	bl	sleep
	ldr	r3, [fp, #-8]
	add	r3, r3, #12
	mov	r0, r3
	bl	pthread_mutex_lock
	ldr	r0, [fp, #-8]
	bl	bathroom_empty
	mov	r3, r0
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L16
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-8]
	ldr	r2, [r2]
	sub	r1, r2, #1
	ldr	r2, [fp, #-8]
	str	r1, [r2]
	ldr	r2, [fp, #-8]
	ldr	r2, [r2]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L16
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-8]
	ldr	r2, [r2]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L18+4
	bl	printf
.L16:
	ldr	r3, [fp, #-8]
	add	r3, r3, #12
	mov	r0, r3
	bl	pthread_mutex_unlock
	b	.L17
.L19:
	.align	2
.L18:
	.word	1431655766
	.word	.LC1
	.size	someone_finish_pee, .-someone_finish_pee
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #5
	bl	bathroom_create
	str	r0, [fp, #-28]
	sub	r0, fp, #24
	ldr	r3, [fp, #-28]
	ldr	r2, .L22+4
	mov	r1, #0
	bl	pthread_create
	sub	r3, fp, #24
	add	r0, r3, #4
	ldr	r3, [fp, #-28]
	ldr	r2, .L22+8
	mov	r1, #0
	bl	pthread_create
	sub	r3, fp, #24
	add	r0, r3, #8
	ldr	r3, [fp, #-28]
	ldr	r2, .L22+8
	mov	r1, #0
	bl	pthread_create
	sub	r3, fp, #24
	add	r0, r3, #12
	ldr	r3, [fp, #-28]
	ldr	r2, .L22+8
	mov	r1, #0
	bl	pthread_create
	mov	r0, #0
	bl	pthread_exit
.L23:
	.align	2
.L22:
	.word	.LC2
	.word	someone_finish_pee
	.word	someone_need_to_pee
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
