	.file	"804382.c"
	.intel_syntax noprefix
	.text
	.globl	hackers_t
	.bss
	.align 32
	.type	hackers_t, @object
	.size	hackers_t, 32
hackers_t:
	.zero	32
	.globl	serfs_t
	.align 32
	.type	serfs_t, @object
	.size	serfs_t, 32
serfs_t:
	.zero	32
	.globl	mutex
	.align 32
	.type	mutex, @object
	.size	mutex, 40
mutex:
	.zero	40
	.globl	barrier
	.align 32
	.type	barrier, @object
	.size	barrier, 32
barrier:
	.zero	32
	.globl	hacker_queue
	.align 32
	.type	hacker_queue, @object
	.size	hacker_queue, 32
hacker_queue:
	.zero	32
	.globl	serf_queue
	.align 32
	.type	serf_queue, @object
	.size	serf_queue, 32
serf_queue:
	.zero	32
	.globl	hackers
	.align 4
	.type	hackers, @object
	.size	hackers, 4
hackers:
	.zero	4
	.globl	serfs
	.align 4
	.type	serfs, @object
	.size	serfs, 4
serfs:
	.zero	4
	.globl	sail
	.align 4
	.type	sail, @object
	.size	sail, 4
sail:
	.zero	4
	.globl	ID_NUMBER
	.align 8
	.type	ID_NUMBER, @object
	.size	ID_NUMBER, 8
ID_NUMBER:
	.zero	8
	.section	.rodata
.LC0:
	.string	"************************"
.LC1:
	.string	"*River Crossing Problem*"
.LC2:
	.string	"************************\n"
	.align 8
.LC3:
	.string	"Hackers and Serfs will be represented by threads"
.LC4:
	.string	"Number of hackers:\t%d\n"
.LC5:
	.string	"Number of serfs:\t%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
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	esi, 4
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 4
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 0
	lea	rdi, mutex[rip]
	call	pthread_mutex_init@PLT
	mov	eax, 0
	call	init_semaphores
	mov	edi, 5
	call	sleep@PLT
	mov	eax, 0
	call	create_threads
	mov	eax, 0
	call	join_threads
	mov	eax, 0
	call	destroy_semaphores_and_barrier
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	init_barrier
	.type	init_barrier, @function
init_barrier:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edx, 4
	mov	esi, 0
	lea	rdi, barrier[rip]
	call	pthread_barrier_init@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	init_barrier, .-init_barrier
	.globl	init_semaphores
	.type	init_semaphores, @function
init_semaphores:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edx, 0
	mov	esi, 0
	lea	rdi, hacker_queue[rip]
	call	sem_init@PLT
	mov	edx, 0
	mov	esi, 0
	lea	rdi, serf_queue[rip]
	call	sem_init@PLT
	mov	eax, 0
	call	init_barrier
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	init_semaphores, .-init_semaphores
	.section	.rodata
	.align 8
.LC6:
	.string	"---------------------------------------------------------"
	.align 8
.LC7:
	.string	"Erro criando thread do hacker[%ld]\n"
	.align 8
.LC8:
	.string	"Erro criando thread do serf[%ld]\n"
	.text
	.globl	create_threads
	.type	create_threads, @function
create_threads:
.LFB9:
	.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
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	QWORD PTR -8[rbp], 0
	jmp	.L6
.L8:
	mov	rax, QWORD PTR ID_NUMBER[rip]
	add	rax, 1
	mov	QWORD PTR ID_NUMBER[rip], rax
	mov	rax, QWORD PTR ID_NUMBER[rip]
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rcx, 0[0+rax*8]
	lea	rax, hackers_t[rip]
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, hacker_do_something[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	je	.L7
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L7:
	add	QWORD PTR -8[rbp], 1
.L6:
	cmp	QWORD PTR -8[rbp], 3
	jle	.L8
	mov	QWORD PTR -8[rbp], 0
	jmp	.L9
.L11:
	mov	rax, QWORD PTR ID_NUMBER[rip]
	add	rax, 1
	mov	QWORD PTR ID_NUMBER[rip], rax
	mov	rax, QWORD PTR ID_NUMBER[rip]
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rcx, 0[0+rax*8]
	lea	rax, serfs_t[rip]
	add	rax, rcx
	mov	rcx, rdx
	lea	rdx, serf_do_something[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	je	.L10
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L10:
	add	QWORD PTR -8[rbp], 1
.L9:
	cmp	QWORD PTR -8[rbp], 3
	jle	.L11
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	create_threads, .-create_threads
	.section	.rodata
	.align 8
.LC9:
	.string	"Erro em pthread_join do hacker[%ld]\n"
	.align 8
.LC10:
	.string	"Erro em pthread_join do serf[%ld]\n"
	.text
	.globl	join_threads
	.type	join_threads, @function
join_threads:
.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, 16
	mov	QWORD PTR -8[rbp], 0
	jmp	.L13
.L15:
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, hackers_t[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	je	.L14
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L14:
	add	QWORD PTR -8[rbp], 1
.L13:
	cmp	QWORD PTR -8[rbp], 3
	jle	.L15
	mov	QWORD PTR -8[rbp], 0
	jmp	.L16
.L18:
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, serfs_t[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	je	.L17
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L17:
	add	QWORD PTR -8[rbp], 1
.L16:
	cmp	QWORD PTR -8[rbp], 3
	jle	.L18
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	join_threads, .-join_threads
	.section	.rodata
.LC11:
	.string	"Hacker"
.LC12:
	.string	"Hackers available:\t%d\n"
.LC13:
	.string	"Serfs available:\t%d\n"
	.align 8
.LC14:
	.string	"!Warning!\nThere were more than 2 serfs waiting, 1 could not sail."
	.text
	.globl	hacker_do_something
	.type	hacker_do_something, @function
hacker_do_something:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
.L34:
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR -4[rbp], eax
	mov	BYTE PTR -21[rbp], 0
	mov	eax, DWORD PTR hackers[rip]
	add	eax, 1
	mov	DWORD PTR hackers[rip], eax
	mov	eax, DWORD PTR hackers[rip]
	cmp	eax, 4
	jne	.L20
	mov	DWORD PTR -16[rbp], 0
	jmp	.L21
.L22:
	lea	rdi, hacker_queue[rip]
	call	sem_post@PLT
	add	DWORD PTR -16[rbp], 1
.L21:
	cmp	DWORD PTR -16[rbp], 3
	jle	.L22
	mov	DWORD PTR hackers[rip], 0
	mov	BYTE PTR -21[rbp], 1
	mov	DWORD PTR -20[rbp], 0
	jmp	.L23
.L20:
	mov	eax, DWORD PTR hackers[rip]
	cmp	eax, 2
	jne	.L24
	mov	eax, DWORD PTR serfs[rip]
	cmp	eax, 1
	jbe	.L24
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L25
.L26:
	lea	rdi, hacker_queue[rip]
	call	sem_post@PLT
	add	DWORD PTR -12[rbp], 1
.L25:
	cmp	DWORD PTR -12[rbp], 1
	jle	.L26
	mov	DWORD PTR -8[rbp], 0
	jmp	.L27
.L28:
	lea	rdi, serf_queue[rip]
	call	sem_post@PLT
	add	DWORD PTR -8[rbp], 1
.L27:
	cmp	DWORD PTR -8[rbp], 1
	jle	.L28
	mov	eax, DWORD PTR serfs[rip]
	cmp	eax, 2
	jbe	.L29
	mov	DWORD PTR -20[rbp], 1
.L29:
	mov	eax, DWORD PTR serfs[rip]
	sub	eax, 2
	mov	DWORD PTR serfs[rip], eax
	mov	DWORD PTR hackers[rip], 0
	mov	BYTE PTR -21[rbp], 1
	add	DWORD PTR -20[rbp], 1
	jmp	.L23
.L24:
	mov	BYTE PTR -21[rbp], 0
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
.L23:
	lea	rdi, hacker_queue[rip]
	call	sem_wait@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	call	board
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	call	get_to_barrier
	cmp	BYTE PTR -21[rbp], 0
	je	.L30
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	call	row_boat
	cmp	DWORD PTR -20[rbp], 0
	jne	.L31
	mov	esi, 0
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 4
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L32
.L31:
	cmp	DWORD PTR -20[rbp], 1
	jne	.L33
	mov	esi, 2
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 2
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L32
.L33:
	lea	rdi, .LC14[rip]
	call	puts@PLT
	mov	esi, 2
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 2
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
.L32:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
.L30:
	mov	edi, 5
	call	sleep@PLT
	jmp	.L34
	.cfi_endproc
.LFE11:
	.size	hacker_do_something, .-hacker_do_something
	.section	.rodata
.LC15:
	.string	"Serf"
	.align 8
.LC16:
	.string	"!Warning!\nThere were more than 2 hackers waiting, 1 could not sail."
	.text
	.globl	serf_do_something
	.type	serf_do_something, @function
serf_do_something:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
.L50:
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR -40[rbp]
	sub	eax, 4
	mov	DWORD PTR -4[rbp], eax
	mov	BYTE PTR -21[rbp], 0
	mov	eax, DWORD PTR serfs[rip]
	add	eax, 1
	mov	DWORD PTR serfs[rip], eax
	mov	eax, DWORD PTR serfs[rip]
	cmp	eax, 4
	jne	.L36
	mov	DWORD PTR -16[rbp], 0
	jmp	.L37
.L38:
	lea	rdi, serf_queue[rip]
	call	sem_post@PLT
	add	DWORD PTR -16[rbp], 1
.L37:
	cmp	DWORD PTR -16[rbp], 3
	jle	.L38
	mov	DWORD PTR serfs[rip], 0
	mov	BYTE PTR -21[rbp], 1
	mov	DWORD PTR -20[rbp], 0
	jmp	.L39
.L36:
	mov	eax, DWORD PTR serfs[rip]
	cmp	eax, 2
	jne	.L40
	mov	eax, DWORD PTR hackers[rip]
	cmp	eax, 1
	jbe	.L40
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L41
.L42:
	lea	rdi, serf_queue[rip]
	call	sem_post@PLT
	add	DWORD PTR -12[rbp], 1
.L41:
	cmp	DWORD PTR -12[rbp], 1
	jle	.L42
	mov	DWORD PTR -8[rbp], 0
	jmp	.L43
.L44:
	lea	rdi, hacker_queue[rip]
	call	sem_post@PLT
	add	DWORD PTR -8[rbp], 1
.L43:
	cmp	DWORD PTR -8[rbp], 1
	jle	.L44
	mov	eax, DWORD PTR hackers[rip]
	cmp	eax, 2
	jbe	.L45
	mov	DWORD PTR -20[rbp], 1
.L45:
	mov	eax, DWORD PTR hackers[rip]
	sub	eax, 2
	mov	DWORD PTR hackers[rip], eax
	mov	DWORD PTR serfs[rip], 0
	mov	BYTE PTR -21[rbp], 1
	add	DWORD PTR -20[rbp], 1
	jmp	.L39
.L40:
	mov	BYTE PTR -21[rbp], 0
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
.L39:
	lea	rdi, serf_queue[rip]
	call	sem_wait@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	call	board
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	call	get_to_barrier
	cmp	BYTE PTR -21[rbp], 0
	je	.L46
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	call	row_boat
	cmp	DWORD PTR -20[rbp], 0
	jne	.L47
	mov	esi, 4
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 0
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L48
.L47:
	cmp	DWORD PTR -20[rbp], 1
	jne	.L49
	mov	esi, 2
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 2
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L48
.L49:
	mov	esi, 2
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 2
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC16[rip]
	call	puts@PLT
.L48:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
.L46:
	mov	edi, 5
	call	sleep@PLT
	jmp	.L50
	.cfi_endproc
.LFE12:
	.size	serf_do_something, .-serf_do_something
	.section	.rodata
.LC17:
	.string	"%s \t %d on board\n"
	.text
	.globl	board
	.type	board, @function
board:
.LFB13:
	.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	DWORD PTR -12[rbp], esi
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	board, .-board
	.section	.rodata
	.align 8
.LC18:
	.string	"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
.LC19:
	.string	"Sail no. #%u\n"
.LC20:
	.string	"%s \t %d got the oars\n"
	.text
	.globl	row_boat
	.type	row_boat, @function
row_boat:
.LFB14:
	.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	DWORD PTR -12[rbp], esi
	lea	rdi, .LC18[rip]
	call	puts@PLT
	mov	eax, DWORD PTR sail[rip]
	add	eax, 1
	mov	DWORD PTR sail[rip], eax
	mov	eax, DWORD PTR sail[rip]
	mov	esi, eax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	row_boat, .-row_boat
	.globl	destroy_semaphores_and_barrier
	.type	destroy_semaphores_and_barrier, @function
destroy_semaphores_and_barrier:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, hacker_queue[rip]
	call	sem_destroy@PLT
	lea	rdi, serf_queue[rip]
	call	sem_destroy@PLT
	lea	rdi, barrier[rip]
	call	pthread_barrier_destroy@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	destroy_semaphores_and_barrier, .-destroy_semaphores_and_barrier
	.section	.rodata
	.align 8
.LC21:
	.string	"Th %u - erro em barrier_wait: %s\n"
	.text
	.globl	get_to_barrier
	.type	get_to_barrier, @function
get_to_barrier:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 176
	mov	QWORD PTR -168[rbp], rdi
	mov	DWORD PTR -172[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, barrier[rip]
	call	pthread_barrier_wait@PLT
	mov	DWORD PTR -148[rbp], eax
	cmp	DWORD PTR -148[rbp], 0
	jle	.L57
	lea	rcx, -144[rbp]
	mov	eax, DWORD PTR -148[rbp]
	mov	edx, 128
	mov	rsi, rcx
	mov	edi, eax
	call	__xpg_strerror_r@PLT
	lea	rdx, -144[rbp]
	mov	eax, DWORD PTR -172[rbp]
	mov	esi, eax
	lea	rdi, .LC21[rip]
	mov	eax, 0
	call	printf@PLT
.L57:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L56
	call	__stack_chk_fail@PLT
.L56:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	get_to_barrier, .-get_to_barrier
	.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	"804382.c"
	.text
	.comm	hackers_t,16,4
	.comm	serfs_t,16,4
	.comm	mutex,24,4
	.comm	barrier,20,4
	.comm	hacker_queue,16,4
	.comm	serf_queue,16,4
	.global	hackers
	.bss
	.align	2
	.type	hackers, %object
	.size	hackers, 4
hackers:
	.space	4
	.global	serfs
	.align	2
	.type	serfs, %object
	.size	serfs, 4
serfs:
	.space	4
	.global	sail
	.align	2
	.type	sail, %object
	.size	sail, 4
sail:
	.space	4
	.global	ID_NUMBER
	.align	2
	.type	ID_NUMBER, %object
	.size	ID_NUMBER, 4
ID_NUMBER:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"************************\000"
	.align	2
.LC1:
	.ascii	"*River Crossing Problem*\000"
	.align	2
.LC2:
	.ascii	"************************\012\000"
	.align	2
.LC3:
	.ascii	"Hackers and Serfs will be represented by threads\000"
	.align	2
.LC4:
	.ascii	"Number of hackers:\011%d\012\000"
	.align	2
.LC5:
	.ascii	"Number of serfs:\011%d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L3
	bl	puts
	ldr	r0, .L3+4
	bl	puts
	ldr	r0, .L3+8
	bl	puts
	ldr	r0, .L3+12
	bl	puts
	mov	r1, #4
	ldr	r0, .L3+16
	bl	printf
	mov	r1, #4
	ldr	r0, .L3+20
	bl	printf
	mov	r1, #0
	ldr	r0, .L3+24
	bl	pthread_mutex_init
	bl	init_semaphores
	mov	r0, #5
	bl	sleep
	bl	create_threads
	bl	join_threads
	bl	destroy_semaphores_and_barrier
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	mutex
	.size	main, .-main
	.align	2
	.global	init_barrier
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_barrier, %function
init_barrier:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r2, #4
	mov	r1, #0
	ldr	r0, .L6
	bl	pthread_barrier_init
	nop
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	barrier
	.size	init_barrier, .-init_barrier
	.align	2
	.global	init_semaphores
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_semaphores, %function
init_semaphores:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r2, #0
	mov	r1, #0
	ldr	r0, .L9
	bl	sem_init
	mov	r2, #0
	mov	r1, #0
	ldr	r0, .L9+4
	bl	sem_init
	bl	init_barrier
	nop
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	hacker_queue
	.word	serf_queue
	.size	init_semaphores, .-init_semaphores
	.section	.rodata
	.align	2
.LC6:
	.ascii	"---------------------------------------------------"
	.ascii	"------\000"
	.align	2
.LC7:
	.ascii	"Erro criando thread do hacker[%ld]\012\000"
	.align	2
.LC8:
	.ascii	"Erro criando thread do serf[%ld]\012\000"
	.text
	.align	2
	.global	create_threads
	.syntax unified
	.arm
	.fpu softvfp
	.type	create_threads, %function
create_threads:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L18
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L12
.L14:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, .L18+4
	add	r0, r3, r2
	ldr	r3, .L18+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L18+8
	str	r3, [r2]
	ldr	r3, .L18+8
	ldr	r3, [r3]
	ldr	r2, .L18+12
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L13
	ldr	r1, [fp, #-12]
	ldr	r0, .L18+16
	bl	printf
	mov	r0, #0
	bl	exit
.L13:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L12:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L14
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L15
.L17:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, .L18+20
	add	r0, r3, r2
	ldr	r3, .L18+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L18+8
	str	r3, [r2]
	ldr	r3, .L18+8
	ldr	r3, [r3]
	ldr	r2, .L18+24
	mov	r1, #0
	bl	pthread_create
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L16
	ldr	r1, [fp, #-12]
	ldr	r0, .L18+28
	bl	printf
	mov	r0, #0
	bl	exit
.L16:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L15:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L17
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC6
	.word	hackers_t
	.word	ID_NUMBER
	.word	hacker_do_something
	.word	.LC7
	.word	serfs_t
	.word	serf_do_something
	.word	.LC8
	.size	create_threads, .-create_threads
	.section	.rodata
	.align	2
.LC9:
	.ascii	"Erro em pthread_join do hacker[%ld]\012\000"
	.align	2
.LC10:
	.ascii	"Erro em pthread_join do serf[%ld]\012\000"
	.text
	.align	2
	.global	join_threads
	.syntax unified
	.arm
	.fpu softvfp
	.type	join_threads, %function
join_threads:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L21
.L23:
	ldr	r2, .L27
	ldr	r3, [fp, #-12]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L22
	ldr	r1, [fp, #-12]
	ldr	r0, .L27+4
	bl	printf
	mov	r0, #0
	bl	exit
.L22:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L21:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L23
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L24
.L26:
	ldr	r2, .L27+8
	ldr	r3, [fp, #-12]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L25
	ldr	r1, [fp, #-12]
	ldr	r0, .L27+12
	bl	printf
	mov	r0, #0
	bl	exit
.L25:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L24:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L26
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	hackers_t
	.word	.LC9
	.word	serfs_t
	.word	.LC10
	.size	join_threads, .-join_threads
	.section	.rodata
	.align	2
.LC11:
	.ascii	"Hacker\000"
	.align	2
.LC12:
	.ascii	"Hackers available:\011%d\012\000"
	.align	2
.LC13:
	.ascii	"Serfs available:\011%d\012\000"
	.align	2
.LC14:
	.ascii	"!Warning!\012There were more than 2 serfs waiting, "
	.ascii	"1 could not sail.\000"
	.text
	.align	2
	.global	hacker_do_something
	.syntax unified
	.arm
	.fpu softvfp
	.type	hacker_do_something, %function
hacker_do_something:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
.L44:
	ldr	r0, .L45
	bl	pthread_mutex_lock
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-8]
	mov	r3, #0
	strb	r3, [fp, #-25]
	ldr	r3, .L45+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L45+4
	str	r3, [r2]
	ldr	r3, .L45+4
	ldr	r3, [r3]
	cmp	r3, #4
	bne	.L30
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L31
.L32:
	ldr	r0, .L45+8
	bl	sem_post
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L31:
	ldr	r3, [fp, #-20]
	cmp	r3, #3
	ble	.L32
	ldr	r3, .L45+4
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #1
	strb	r3, [fp, #-25]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L33
.L30:
	ldr	r3, .L45+4
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L34
	ldr	r3, .L45+12
	ldr	r3, [r3]
	cmp	r3, #1
	bls	.L34
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L35
.L36:
	ldr	r0, .L45+8
	bl	sem_post
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L35:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	ble	.L36
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L37
.L38:
	ldr	r0, .L45+16
	bl	sem_post
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L37:
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	ble	.L38
	ldr	r3, .L45+12
	ldr	r3, [r3]
	cmp	r3, #2
	bls	.L39
	mov	r3, #1
	str	r3, [fp, #-24]
.L39:
	ldr	r3, .L45+12
	ldr	r3, [r3]
	sub	r3, r3, #2
	ldr	r2, .L45+12
	str	r3, [r2]
	ldr	r3, .L45+4
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #1
	strb	r3, [fp, #-25]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	b	.L33
.L34:
	mov	r3, #0
	strb	r3, [fp, #-25]
	ldr	r0, .L45
	bl	pthread_mutex_unlock
.L33:
	ldr	r0, .L45+8
	bl	sem_wait
	ldr	r1, [fp, #-8]
	ldr	r0, .L45+20
	bl	board
	ldr	r1, [fp, #-8]
	ldr	r0, .L45+20
	bl	get_to_barrier
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L40
	ldr	r1, [fp, #-8]
	ldr	r0, .L45+20
	bl	row_boat
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L41
	mov	r1, #0
	ldr	r0, .L45+24
	bl	printf
	mov	r1, #4
	ldr	r0, .L45+28
	bl	printf
	b	.L42
.L41:
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bne	.L43
	mov	r1, #2
	ldr	r0, .L45+24
	bl	printf
	mov	r1, #2
	ldr	r0, .L45+28
	bl	printf
	b	.L42
.L43:
	ldr	r0, .L45+32
	bl	puts
	mov	r1, #2
	ldr	r0, .L45+24
	bl	printf
	mov	r1, #2
	ldr	r0, .L45+28
	bl	printf
.L42:
	ldr	r0, .L45+36
	bl	puts
	ldr	r3, .L45+40
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r0, .L45
	bl	pthread_mutex_unlock
.L40:
	mov	r0, #5
	bl	sleep
	b	.L44
.L46:
	.align	2
.L45:
	.word	mutex
	.word	hackers
	.word	hacker_queue
	.word	serfs
	.word	serf_queue
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC6
	.word	stdout
	.size	hacker_do_something, .-hacker_do_something
	.section	.rodata
	.align	2
.LC15:
	.ascii	"Serf\000"
	.align	2
.LC16:
	.ascii	"!Warning!\012There were more than 2 hackers waiting"
	.ascii	", 1 could not sail.\000"
	.text
	.align	2
	.global	serf_do_something
	.syntax unified
	.arm
	.fpu softvfp
	.type	serf_do_something, %function
serf_do_something:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
.L62:
	ldr	r0, .L63
	bl	pthread_mutex_lock
	ldr	r3, [fp, #-32]
	sub	r3, r3, #4
	str	r3, [fp, #-8]
	mov	r3, #0
	strb	r3, [fp, #-25]
	ldr	r3, .L63+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L63+4
	str	r3, [r2]
	ldr	r3, .L63+4
	ldr	r3, [r3]
	cmp	r3, #4
	bne	.L48
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L49
.L50:
	ldr	r0, .L63+8
	bl	sem_post
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L49:
	ldr	r3, [fp, #-20]
	cmp	r3, #3
	ble	.L50
	ldr	r3, .L63+4
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #1
	strb	r3, [fp, #-25]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L51
.L48:
	ldr	r3, .L63+4
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L52
	ldr	r3, .L63+12
	ldr	r3, [r3]
	cmp	r3, #1
	bls	.L52
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L53
.L54:
	ldr	r0, .L63+8
	bl	sem_post
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L53:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	ble	.L54
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L55
.L56:
	ldr	r0, .L63+16
	bl	sem_post
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L55:
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	ble	.L56
	ldr	r3, .L63+12
	ldr	r3, [r3]
	cmp	r3, #2
	bls	.L57
	mov	r3, #1
	str	r3, [fp, #-24]
.L57:
	ldr	r3, .L63+12
	ldr	r3, [r3]
	sub	r3, r3, #2
	ldr	r2, .L63+12
	str	r3, [r2]
	ldr	r3, .L63+4
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #1
	strb	r3, [fp, #-25]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	b	.L51
.L52:
	mov	r3, #0
	strb	r3, [fp, #-25]
	ldr	r0, .L63
	bl	pthread_mutex_unlock
.L51:
	ldr	r0, .L63+8
	bl	sem_wait
	ldr	r1, [fp, #-8]
	ldr	r0, .L63+20
	bl	board
	ldr	r1, [fp, #-8]
	ldr	r0, .L63+20
	bl	get_to_barrier
	ldrb	r3, [fp, #-25]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L58
	ldr	r1, [fp, #-8]
	ldr	r0, .L63+20
	bl	row_boat
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L59
	mov	r1, #4
	ldr	r0, .L63+24
	bl	printf
	mov	r1, #0
	ldr	r0, .L63+28
	bl	printf
	b	.L60
.L59:
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bne	.L61
	mov	r1, #2
	ldr	r0, .L63+24
	bl	printf
	mov	r1, #2
	ldr	r0, .L63+28
	bl	printf
	b	.L60
.L61:
	mov	r1, #2
	ldr	r0, .L63+24
	bl	printf
	mov	r1, #2
	ldr	r0, .L63+28
	bl	printf
	ldr	r0, .L63+32
	bl	puts
.L60:
	ldr	r0, .L63+36
	bl	puts
	ldr	r3, .L63+40
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r0, .L63
	bl	pthread_mutex_unlock
.L58:
	mov	r0, #5
	bl	sleep
	b	.L62
.L64:
	.align	2
.L63:
	.word	mutex
	.word	serfs
	.word	serf_queue
	.word	hackers
	.word	hacker_queue
	.word	.LC15
	.word	.LC12
	.word	.LC13
	.word	.LC16
	.word	.LC6
	.word	stdout
	.size	serf_do_something, .-serf_do_something
	.section	.rodata
	.align	2
.LC17:
	.ascii	"%s \011 %d on board\012\000"
	.text
	.align	2
	.global	board
	.syntax unified
	.arm
	.fpu softvfp
	.type	board, %function
board:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-8]
	ldr	r0, .L66
	bl	printf
	ldr	r3, .L66+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L67:
	.align	2
.L66:
	.word	.LC17
	.word	stdout
	.size	board, .-board
	.section	.rodata
	.align	2
.LC18:
	.ascii	"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
	.ascii	"~~~~~~\000"
	.align	2
.LC19:
	.ascii	"Sail no. #%u\012\000"
	.align	2
.LC20:
	.ascii	"%s \011 %d got the oars\012\000"
	.text
	.align	2
	.global	row_boat
	.syntax unified
	.arm
	.fpu softvfp
	.type	row_boat, %function
row_boat:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r0, .L69
	bl	puts
	ldr	r3, .L69+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L69+4
	str	r3, [r2]
	ldr	r3, .L69+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L69+8
	bl	printf
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-8]
	ldr	r0, .L69+12
	bl	printf
	ldr	r3, .L69+16
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L70:
	.align	2
.L69:
	.word	.LC18
	.word	sail
	.word	.LC19
	.word	.LC20
	.word	stdout
	.size	row_boat, .-row_boat
	.align	2
	.global	destroy_semaphores_and_barrier
	.syntax unified
	.arm
	.fpu softvfp
	.type	destroy_semaphores_and_barrier, %function
destroy_semaphores_and_barrier:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L72
	bl	sem_destroy
	ldr	r0, .L72+4
	bl	sem_destroy
	ldr	r0, .L72+8
	bl	pthread_barrier_destroy
	nop
	pop	{fp, pc}
.L73:
	.align	2
.L72:
	.word	hacker_queue
	.word	serf_queue
	.word	barrier
	.size	destroy_semaphores_and_barrier, .-destroy_semaphores_and_barrier
	.section	.rodata
	.align	2
.LC21:
	.ascii	"Th %u - erro em barrier_wait: %s\012\000"
	.align	2
.LC22:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_to_barrier
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_to_barrier, %function
get_to_barrier:
	@ args = 0, pretend = 0, frame = 144
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #144
	str	r0, [fp, #-144]
	str	r1, [fp, #-148]
	ldr	r3, .L78
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L78+4
	bl	pthread_barrier_wait
	str	r0, [fp, #-140]
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	ble	.L77
	sub	r3, fp, #136
	mov	r2, #128
	mov	r1, r3
	ldr	r0, [fp, #-140]
	bl	__xpg_strerror_r
	sub	r3, fp, #136
	mov	r2, r3
	ldr	r1, [fp, #-148]
	ldr	r0, .L78+8
	bl	printf
.L77:
	nop
	ldr	r3, .L78
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L76
	bl	__stack_chk_fail
.L76:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L79:
	.align	2
.L78:
	.word	.LC22
	.word	barrier
	.word	.LC21
	.size	get_to_barrier, .-get_to_barrier
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
