	.file	"815184.c"
	.intel_syntax noprefix
	.text
	.globl	busStopped
	.bss
	.align 4
	.type	busStopped, @object
	.size	busStopped, 4
busStopped:
	.zero	4
	.globl	peopleBoarded
	.align 4
	.type	peopleBoarded, @object
	.size	peopleBoarded, 4
peopleBoarded:
	.zero	4
	.globl	peopleAbleToBoard
	.align 4
	.type	peopleAbleToBoard, @object
	.size	peopleAbleToBoard, 4
peopleAbleToBoard:
	.zero	4
	.globl	mutex
	.align 32
	.type	mutex, @object
	.size	mutex, 40
mutex:
	.zero	40
	.globl	busArrived
	.align 32
	.type	busArrived, @object
	.size	busArrived, 48
busArrived:
	.zero	48
	.globl	busFull
	.align 32
	.type	busFull, @object
	.size	busFull, 48
busFull:
	.zero	48
	.section	.rodata
.LC0:
	.string	"Bus Arrives"
.LC1:
	.string	"Bus leaving with %d people\n"
	.text
	.globl	busStop
	.type	busStop, @function
busStop:
.LFB0:
	.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
.L3:
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	DWORD PTR busStopped[rip], 1
	mov	eax, DWORD PTR peopleAbleToBoard[rip]
	test	eax, eax
	je	.L2
	lea	rdi, busArrived[rip]
	call	pthread_cond_broadcast@PLT
	lea	rsi, mutex[rip]
	lea	rdi, busFull[rip]
	call	pthread_cond_wait@PLT
.L2:
	mov	eax, DWORD PTR peopleBoarded[rip]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR peopleAbleToBoard[rip]
	mov	edx, DWORD PTR peopleBoarded[rip]
	sub	eax, edx
	mov	DWORD PTR peopleAbleToBoard[rip], eax
	mov	DWORD PTR busStopped[rip], 0
	mov	DWORD PTR peopleBoarded[rip], 0
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	busStop, .-busStop
	.section	.rodata
.LC2:
	.string	"Rider esperando bus chegar"
.LC3:
	.string	"Rider entrando no bus"
	.align 8
.LC4:
	.string	"Rider avisa para o motorista que o bus est\303\241 completo com as pessoas que podem subir"
	.text
	.globl	rider
	.type	rider, @function
rider:
.LFB1:
	.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	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 1
	jmp	.L5
.L10:
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	jmp	.L6
.L8:
	cmp	DWORD PTR -8[rbp], 0
	jne	.L7
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, DWORD PTR peopleAbleToBoard[rip]
	add	eax, 1
	mov	DWORD PTR peopleAbleToBoard[rip], eax
.L7:
	mov	DWORD PTR -8[rbp], 1
	lea	rsi, mutex[rip]
	lea	rdi, busArrived[rip]
	call	pthread_cond_wait@PLT
.L6:
	mov	eax, DWORD PTR busStopped[rip]
	test	eax, eax
	je	.L8
	cmp	DWORD PTR -8[rbp], 0
	je	.L9
	mov	eax, DWORD PTR peopleBoarded[rip]
	cmp	eax, 49
	jg	.L9
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	eax, DWORD PTR peopleBoarded[rip]
	add	eax, 1
	mov	DWORD PTR peopleBoarded[rip], eax
	mov	DWORD PTR -4[rbp], 0
	mov	eax, DWORD PTR peopleAbleToBoard[rip]
	mov	edx, 50
	cmp	eax, 50
	cmovle	edx, eax
	mov	eax, DWORD PTR peopleBoarded[rip]
	cmp	edx, eax
	jne	.L9
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, busFull[rip]
	call	pthread_cond_signal@PLT
.L9:
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
.L5:
	cmp	DWORD PTR -4[rbp], 0
	jne	.L10
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	rider, .-rider
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1632
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -1624[rbp]
	mov	ecx, 0
	lea	rdx, busStop[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -1628[rbp], 0
	jmp	.L13
.L14:
	lea	rdx, -1616[rbp]
	mov	eax, DWORD PTR -1628[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	ecx, 0
	lea	rdx, rider[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	add	DWORD PTR -1628[rbp], 1
.L13:
	cmp	DWORD PTR -1628[rbp], 199
	jle	.L14
	mov	rax, QWORD PTR -1624[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	"815184.c"
	.text
	.global	busStopped
	.bss
	.align	2
	.type	busStopped, %object
	.size	busStopped, 4
busStopped:
	.space	4
	.global	peopleBoarded
	.align	2
	.type	peopleBoarded, %object
	.size	peopleBoarded, 4
peopleBoarded:
	.space	4
	.global	peopleAbleToBoard
	.align	2
	.type	peopleAbleToBoard, %object
	.size	peopleAbleToBoard, 4
peopleAbleToBoard:
	.space	4
	.global	mutex
	.align	2
	.type	mutex, %object
	.size	mutex, 24
mutex:
	.space	24
	.global	busArrived
	.align	3
	.type	busArrived, %object
	.size	busArrived, 48
busArrived:
	.space	48
	.global	busFull
	.align	3
	.type	busFull, %object
	.size	busFull, 48
busFull:
	.space	48
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Bus Arrives\000"
	.align	2
.LC1:
	.ascii	"Bus leaving with %d people\012\000"
	.text
	.align	2
	.global	busStop
	.syntax unified
	.arm
	.fpu softvfp
	.type	busStop, %function
busStop:
	@ 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]
.L3:
	ldr	r0, .L4
	bl	pthread_mutex_lock
	ldr	r0, .L4+4
	bl	puts
	ldr	r3, .L4+8
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, .L4+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L2
	ldr	r0, .L4+16
	bl	pthread_cond_broadcast
	ldr	r1, .L4
	ldr	r0, .L4+20
	bl	pthread_cond_wait
.L2:
	ldr	r3, .L4+24
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L4+28
	bl	printf
	ldr	r3, .L4+12
	ldr	r2, [r3]
	ldr	r3, .L4+24
	ldr	r3, [r3]
	sub	r3, r2, r3
	ldr	r2, .L4+12
	str	r3, [r2]
	ldr	r3, .L4+8
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L4+24
	mov	r2, #0
	str	r2, [r3]
	ldr	r0, .L4
	bl	pthread_mutex_unlock
	b	.L3
.L5:
	.align	2
.L4:
	.word	mutex
	.word	.LC0
	.word	busStopped
	.word	peopleAbleToBoard
	.word	busArrived
	.word	busFull
	.word	peopleBoarded
	.word	.LC1
	.size	busStop, .-busStop
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Rider esperando bus chegar\000"
	.align	2
.LC3:
	.ascii	"Rider entrando no bus\000"
	.align	2
.LC4:
	.ascii	"Rider avisa para o motorista que o bus est\303\241 "
	.ascii	"completo com as pessoas que podem subir\000"
	.text
	.align	2
	.global	rider
	.syntax unified
	.arm
	.fpu softvfp
	.type	rider, %function
rider:
	@ 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	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L7
.L12:
	ldr	r0, .L14
	bl	pthread_mutex_lock
	b	.L8
.L10:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L9
	ldr	r0, .L14+4
	bl	puts
	ldr	r3, .L14+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L14+8
	str	r3, [r2]
.L9:
	mov	r3, #1
	str	r3, [fp, #-12]
	ldr	r1, .L14
	ldr	r0, .L14+12
	bl	pthread_cond_wait
.L8:
	ldr	r3, .L14+16
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L10
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L11
	ldr	r3, .L14+20
	ldr	r3, [r3]
	cmp	r3, #49
	bgt	.L11
	ldr	r0, .L14+24
	bl	puts
	ldr	r3, .L14+20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L14+20
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, .L14+8
	ldr	r3, [r3]
	cmp	r3, #50
	movlt	r2, r3
	movge	r2, #50
	ldr	r3, .L14+20
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L11
	ldr	r0, .L14+28
	bl	puts
	ldr	r0, .L14+32
	bl	pthread_cond_signal
.L11:
	ldr	r0, .L14
	bl	pthread_mutex_unlock
.L7:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L12
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	mutex
	.word	.LC2
	.word	peopleAbleToBoard
	.word	busArrived
	.word	busStopped
	.word	peopleBoarded
	.word	.LC3
	.word	.LC4
	.word	busFull
	.size	rider, .-rider
	.section	.rodata
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 816
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #816
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r0, fp, #816
	mov	r3, #0
	ldr	r2, .L21+4
	mov	r1, #0
	bl	pthread_create
	mov	r3, #0
	str	r3, [fp, #-812]
	b	.L17
.L18:
	sub	r2, fp, #808
	ldr	r3, [fp, #-812]
	lsl	r3, r3, #2
	add	r0, r2, r3
	mov	r3, #0
	ldr	r2, .L21+8
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-812]
	add	r3, r3, #1
	str	r3, [fp, #-812]
.L17:
	ldr	r3, [fp, #-812]
	cmp	r3, #199
	ble	.L18
	ldr	r3, [fp, #-816]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, #0
	ldr	r2, .L21
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC5
	.word	busStop
	.word	rider
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
