	.file	"889732.c"
	.intel_syntax noprefix
	.text
	.globl	wlist
	.bss
	.align 32
	.type	wlist, @object
	.size	wlist, 32
wlist:
	.zero	32
	.globl	mutex
	.align 32
	.type	mutex, @object
	.size	mutex, 32
mutex:
	.zero	32
	.globl	balance
	.data
	.align 4
	.type	balance, @object
	.size	balance, 4
balance:
	.long	9001
	.globl	wcount
	.bss
	.align 4
	.type	wcount, @object
	.size	wcount, 4
wcount:
	.zero	4
	.globl	threadIWantToWake
	.data
	.align 4
	.type	threadIWantToWake, @object
	.size	threadIWantToWake, 4
threadIWantToWake:
	.long	-99
	.globl	totalWithdraw
	.align 4
	.type	totalWithdraw, @object
	.size	totalWithdraw, 4
totalWithdraw:
	.long	50000000
	.globl	totalDeposit
	.align 4
	.type	totalDeposit, @object
	.size	totalDeposit, 4
totalDeposit:
	.long	50000000
	.globl	head
	.bss
	.align 8
	.type	head, @object
	.size	head, 8
head:
	.zero	8
	.globl	curr
	.align 8
	.type	curr, @object
	.size	curr, 8
curr:
	.zero	8
	.section	.rodata
	.align 8
.LC0:
	.string	"Counts initialized. %d Depositors\t\t%d Withdrawers"
.LC1:
	.string	"usleep"
.LC2:
	.string	"Thread Creation: Depositor"
.LC3:
	.string	"Thread Creation: Withdrawer"
.LC4:
	.string	"Thread Join: Depositor"
	.align 8
.LC5:
	.string	"\nAll depositor threads finished and joined"
.LC6:
	.string	"Thread Join: Withdrawer"
	.align 8
.LC7:
	.string	"\nAll withdrawer threads finished and joined, all threads finished."
	.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
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 280
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, rsp
	mov	rbx, rax
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	DWORD PTR -212[rbp], 50
	mov	DWORD PTR -216[rbp], 50
	mov	eax, DWORD PTR -212[rbp]
	mov	DWORD PTR -220[rbp], eax
	mov	eax, DWORD PTR -216[rbp]
	mov	DWORD PTR -224[rbp], eax
	mov	edx, DWORD PTR -216[rbp]
	mov	eax, DWORD PTR -212[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -212[rbp]
	movsx	rax, edx
	sub	rax, 1
	mov	QWORD PTR -176[rbp], rax
	movsx	rax, edx
	mov	r12, rax
	mov	r13d, 0
	movsx	rax, edx
	mov	r14, rax
	mov	r15d, 0
	movsx	rax, edx
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rdx, rax, 16
	mov	rax, rdx
	and	rax, -4096
	mov	rcx, rsp
	sub	rcx, rax
.L2:
	cmp	rsp, rcx
	je	.L3
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L2
.L3:
	mov	rax, rdx
	and	eax, 4095
	sub	rsp, rax
	mov	rax, rdx
	and	eax, 4095
	test	rax, rax
	je	.L4
	mov	rax, rdx
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L4:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -168[rbp], rax
	mov	edx, DWORD PTR -216[rbp]
	movsx	rax, edx
	sub	rax, 1
	mov	QWORD PTR -160[rbp], rax
	movsx	rax, edx
	mov	QWORD PTR -240[rbp], rax
	mov	QWORD PTR -232[rbp], 0
	movsx	rax, edx
	mov	QWORD PTR -256[rbp], rax
	mov	QWORD PTR -248[rbp], 0
	movsx	rax, edx
	lea	rdx, 0[0+rax*4]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L5:
	cmp	rsp, rdx
	je	.L6
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L5
.L6:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L7
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L7:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -152[rbp], rax
	mov	eax, DWORD PTR -212[rbp]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -144[rbp], rdx
	movsx	rdx, eax
	mov	QWORD PTR -272[rbp], rdx
	mov	QWORD PTR -264[rbp], 0
	movsx	rdx, eax
	mov	QWORD PTR -288[rbp], rdx
	mov	QWORD PTR -280[rbp], 0
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L8:
	cmp	rsp, rdx
	je	.L9
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L8
.L9:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L10
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L10:
	mov	rax, rsp
	add	rax, 7
	shr	rax, 3
	sal	rax, 3
	mov	QWORD PTR -136[rbp], rax
	mov	eax, DWORD PTR -216[rbp]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -128[rbp], rdx
	movsx	rdx, eax
	mov	QWORD PTR -304[rbp], rdx
	mov	QWORD PTR -296[rbp], 0
	movsx	rdx, eax
	mov	QWORD PTR -320[rbp], rdx
	mov	QWORD PTR -312[rbp], 0
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L11:
	cmp	rsp, rdx
	je	.L12
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L11
.L12:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L13
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L13:
	mov	rax, rsp
	add	rax, 7
	shr	rax, 3
	sal	rax, 3
	mov	QWORD PTR -120[rbp], rax
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	pthread_attr_init@PLT
	lea	rax, -112[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_attr_setdetachstate@PLT
	mov	edx, 0
	mov	esi, 0
	lea	rdi, wlist[rip]
	call	sem_init@PLT
	mov	edx, 1
	mov	esi, 0
	lea	rdi, mutex[rip]
	call	sem_init@PLT
	jmp	.L14
.L18:
	mov	edi, 1000
	call	usleep@PLT
	test	eax, eax
	jns	.L15
	lea	rdi, .LC1[rip]
	call	perror@PLT
.L15:
	call	rand@PLT
	cdq
	shr	edx, 31
	add	eax, edx
	and	eax, 1
	sub	eax, edx
	mov	DWORD PTR -196[rbp], eax
	cmp	DWORD PTR -196[rbp], 0
	jne	.L16
	cmp	DWORD PTR -220[rbp], 0
	jle	.L16
	mov	eax, DWORD PTR -212[rbp]
	sub	eax, DWORD PTR -220[rbp]
	mov	DWORD PTR -192[rbp], eax
	sub	DWORD PTR -220[rbp], 1
	mov	rax, QWORD PTR -168[rbp]
	mov	edx, DWORD PTR -192[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR -192[rbp]
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	eax, DWORD PTR -192[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -168[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -192[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -136[rbp]
	lea	rdi, [rcx+rax]
	lea	rax, -112[rbp]
	mov	rcx, rdx
	lea	rdx, depositorThread[rip]
	mov	rsi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -188[rbp], eax
	cmp	DWORD PTR -188[rbp], 0
	jns	.L14
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L16:
	cmp	DWORD PTR -196[rbp], 1
	jne	.L14
	cmp	DWORD PTR -224[rbp], 0
	jle	.L14
	mov	eax, DWORD PTR -216[rbp]
	sub	eax, DWORD PTR -224[rbp]
	mov	DWORD PTR -184[rbp], eax
	sub	DWORD PTR -224[rbp], 1
	mov	rax, QWORD PTR -152[rbp]
	mov	edx, DWORD PTR -184[rbp]
	movsx	rdx, edx
	mov	ecx, DWORD PTR -184[rbp]
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -152[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -184[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	lea	rdi, [rcx+rax]
	lea	rax, -112[rbp]
	mov	rcx, rdx
	lea	rdx, withdrawerThread[rip]
	mov	rsi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -180[rbp], eax
	cmp	DWORD PTR -180[rbp], 0
	jns	.L14
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	mov	edx, DWORD PTR -220[rbp]
	mov	eax, DWORD PTR -224[rbp]
	add	eax, edx
	test	eax, eax
	jg	.L18
	mov	DWORD PTR -208[rbp], 0
	jmp	.L19
.L21:
	mov	rax, QWORD PTR -136[rbp]
	mov	edx, DWORD PTR -208[rbp]
	movsx	rdx, edx
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	DWORD PTR -200[rbp], eax
	cmp	DWORD PTR -200[rbp], 0
	jns	.L20
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L20:
	add	DWORD PTR -208[rbp], 1
.L19:
	mov	eax, DWORD PTR -208[rbp]
	cmp	eax, DWORD PTR -212[rbp]
	jl	.L21
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -208[rbp], 0
	jmp	.L22
.L24:
	mov	rax, QWORD PTR -120[rbp]
	mov	edx, DWORD PTR -208[rbp]
	movsx	rdx, edx
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	DWORD PTR -204[rbp], eax
	cmp	DWORD PTR -204[rbp], 0
	jns	.L23
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L23:
	add	DWORD PTR -208[rbp], 1
.L22:
	mov	eax, DWORD PTR -208[rbp]
	cmp	eax, DWORD PTR -216[rbp]
	jl	.L24
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rsp, rbx
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC8:
	.string	"total deposit is below zero!"
	.align 8
.LC9:
	.string	"\nDepositor: %d\tBalance: %d\t\tPost deposit of: %d"
	.text
	.globl	depositorThread
	.type	depositorThread, @function
depositorThread:
.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
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -16[rbp], eax
	lea	rdi, mutex[rip]
	call	sem_wait@PLT
	call	rand@PLT
	mov	edx, DWORD PTR totalDeposit[rip]
	mov	ecx, edx
	shr	ecx, 31
	add	edx, ecx
	sar	edx
	mov	ecx, edx
	cdq
	idiv	ecx
	mov	DWORD PTR -12[rbp], edx
	mov	eax, DWORD PTR totalDeposit[rip]
	sub	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR totalDeposit[rip], eax
	mov	eax, DWORD PTR totalDeposit[rip]
	test	eax, eax
	jns	.L28
	lea	rdi, .LC8[rip]
	call	perror@PLT
.L28:
	mov	edi, 100
	call	usleep@PLT
	mov	edx, DWORD PTR balance[rip]
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	mov	DWORD PTR balance[rip], eax
	mov	edx, DWORD PTR balance[rip]
	mov	ecx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR wcount[rip]
	test	eax, eax
	jne	.L29
	lea	rdi, mutex[rip]
	call	sem_post@PLT
	jmp	.L30
.L29:
	mov	rax, QWORD PTR head[rip]
	test	rax, rax
	je	.L31
	mov	rax, QWORD PTR head[rip]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR balance[rip]
	cmp	edx, eax
	jle	.L31
	lea	rdi, mutex[rip]
	call	sem_post@PLT
	jmp	.L30
.L31:
	mov	rax, QWORD PTR head[rip]
	mov	eax, DWORD PTR 16[rax]
	mov	DWORD PTR threadIWantToWake[rip], eax
	lea	rdi, wlist[rip]
	call	sem_post@PLT
.L30:
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE7:
	.size	depositorThread, .-depositorThread
	.section	.rodata
.LC10:
	.string	"totalwithdraw is below 0"
	.align 8
.LC11:
	.string	"A Balance of less than 0 was created!"
	.align 8
.LC12:
	.string	"\n\tnegative balance from above error: %d"
	.align 8
.LC13:
	.string	"\nWithdrawer: %d\t\tBalance: %d\t\tPost withdrawal of: %d"
	.align 8
.LC14:
	.string	"\nWithdrawer: %d\t\tBalance: %d\t\tPre overdraw/wait of: %d"
	.align 8
.LC15:
	.string	"\nI'm the thread you wanted to awake, I say %d = %d"
	.align 8
.LC16:
	.string	"\nInclusive of me, there are %d threads in line"
	.align 8
.LC17:
	.string	"\nWithdrawer: %d\t\tBalance: %d\t\tPost delayed withdrawal of: %d"
	.align 8
.LC18:
	.string	"\nWithdrawer: %d\t\tI want to wake thread %d"
	.text
	.globl	withdrawerThread
	.type	withdrawerThread, @function
withdrawerThread:
.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
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -16[rbp], eax
	lea	rdi, mutex[rip]
	call	sem_wait@PLT
	call	rand@PLT
	mov	edx, DWORD PTR totalWithdraw[rip]
	mov	ecx, edx
	shr	ecx, 31
	add	edx, ecx
	sar	edx
	mov	ecx, edx
	cdq
	idiv	ecx
	mov	DWORD PTR -12[rbp], edx
	mov	eax, DWORD PTR totalWithdraw[rip]
	sub	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR totalWithdraw[rip], eax
	mov	eax, DWORD PTR totalWithdraw[rip]
	test	eax, eax
	jns	.L33
	lea	rdi, .LC10[rip]
	call	perror@PLT
.L33:
	mov	edi, 10
	call	usleep@PLT
	mov	eax, DWORD PTR wcount[rip]
	test	eax, eax
	jne	.L34
	mov	eax, DWORD PTR balance[rip]
	cmp	DWORD PTR -12[rbp], eax
	jge	.L34
	mov	eax, DWORD PTR balance[rip]
	sub	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR balance[rip], eax
	mov	eax, DWORD PTR balance[rip]
	test	eax, eax
	jns	.L35
	lea	rdi, .LC11[rip]
	call	perror@PLT
	mov	eax, DWORD PTR balance[rip]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
.L35:
	mov	edx, DWORD PTR balance[rip]
	mov	ecx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, mutex[rip]
	call	sem_post@PLT
	jmp	.L36
.L34:
	mov	edx, DWORD PTR balance[rip]
	mov	ecx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -16[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, edx
	mov	edi, eax
	call	add_to_list
	mov	eax, DWORD PTR wcount[rip]
	add	eax, 1
	mov	DWORD PTR wcount[rip], eax
	lea	rdi, mutex[rip]
	call	sem_post@PLT
.L39:
	lea	rdi, wlist[rip]
	call	sem_wait@PLT
	mov	edi, 10
	call	usleep@PLT
	mov	eax, DWORD PTR threadIWantToWake[rip]
	cmp	DWORD PTR -16[rbp], eax
	jne	.L39
	mov	edx, DWORD PTR threadIWantToWake[rip]
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR wcount[rip]
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR threadIWantToWake[rip], -99
	nop
	mov	eax, DWORD PTR balance[rip]
	sub	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR balance[rip], eax
	mov	eax, DWORD PTR balance[rip]
	test	eax, eax
	jns	.L40
	lea	rdi, .LC11[rip]
	call	perror@PLT
	mov	eax, DWORD PTR balance[rip]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
.L40:
	mov	edx, DWORD PTR balance[rip]
	mov	ecx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	remove_head
	mov	eax, DWORD PTR wcount[rip]
	sub	eax, 1
	mov	DWORD PTR wcount[rip], eax
	mov	eax, DWORD PTR wcount[rip]
	test	eax, eax
	je	.L41
	mov	rax, QWORD PTR head[rip]
	test	rax, rax
	je	.L41
	mov	rax, QWORD PTR head[rip]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR balance[rip]
	cmp	edx, eax
	jg	.L41
	mov	rax, QWORD PTR head[rip]
	mov	eax, DWORD PTR 16[rax]
	mov	DWORD PTR threadIWantToWake[rip], eax
	mov	edx, DWORD PTR threadIWantToWake[rip]
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, wlist[rip]
	call	sem_post@PLT
	jmp	.L36
.L41:
	lea	rdi, mutex[rip]
	call	sem_post@PLT
.L36:
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE8:
	.size	withdrawerThread, .-withdrawerThread
	.section	.rodata
	.align 8
.LC19:
	.string	"\ncreating list with headnode as [%d]"
.LC20:
	.string	"\nNode creation failed "
	.align 8
.LC21:
	.string	"\nNode creation (that I know about) failed"
	.text
	.globl	create_list
	.type	create_list, @function
create_list:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L44
	lea	rdi, .LC20[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L45
.L44:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	DWORD PTR 16[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR head[rip], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR curr[rip], rax
	mov	rax, QWORD PTR head[rip]
	test	rax, rax
	jne	.L46
	lea	rdi, .LC21[rip]
	mov	eax, 0
	call	printf@PLT
.L46:
	mov	rax, QWORD PTR head[rip]
.L45:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	create_list, .-create_list
	.section	.rodata
.LC22:
	.string	"CURR WAS NULL!"
	.align 8
.LC23:
	.string	"\nAdding node to end of list with value [%d]"
	.text
	.globl	add_to_list
	.type	add_to_list, @function
add_to_list:
.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	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	edi, 10
	call	usleep@PLT
	mov	rax, QWORD PTR head[rip]
	test	rax, rax
	jne	.L48
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, edx
	mov	edi, eax
	call	create_list
	jmp	.L49
.L48:
	mov	rax, QWORD PTR curr[rip]
	test	rax, rax
	jne	.L50
	lea	rdi, .LC22[rip]
	call	perror@PLT
	mov	rax, QWORD PTR head[rip]
	mov	QWORD PTR curr[rip], rax
.L50:
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L51
	lea	rdi, .LC20[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L49
.L51:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	DWORD PTR 16[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR curr[rip]
	test	rax, rax
	jne	.L52
	lea	rdi, .LC22[rip]
	call	perror@PLT
	mov	rax, QWORD PTR head[rip]
	mov	QWORD PTR curr[rip], rax
.L52:
	mov	rax, QWORD PTR curr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR curr[rip], rax
	mov	rax, QWORD PTR -8[rbp]
.L49:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	add_to_list, .-add_to_list
	.section	.rodata
.LC24:
	.string	"\nList emptied."
	.text
	.globl	remove_head
	.type	remove_head, @function
remove_head:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR head[rip]
	test	rax, rax
	jne	.L54
	mov	eax, -1
	jmp	.L55
.L54:
	mov	rax, QWORD PTR head[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR head[rip], rax
	mov	rax, QWORD PTR head[rip]
	test	rax, rax
	jne	.L56
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	printf@PLT
.L56:
	mov	eax, 0
.L55:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	remove_head, .-remove_head
	.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	"889732.c"
	.text
	.comm	wlist,16,4
	.comm	mutex,16,4
	.global	balance
	.data
	.align	2
	.type	balance, %object
	.size	balance, 4
balance:
	.word	9001
	.global	wcount
	.bss
	.align	2
	.type	wcount, %object
	.size	wcount, 4
wcount:
	.space	4
	.global	threadIWantToWake
	.data
	.align	2
	.type	threadIWantToWake, %object
	.size	threadIWantToWake, 4
threadIWantToWake:
	.word	-99
	.global	totalWithdraw
	.align	2
	.type	totalWithdraw, %object
	.size	totalWithdraw, 4
totalWithdraw:
	.word	50000000
	.global	totalDeposit
	.align	2
	.type	totalDeposit, %object
	.size	totalDeposit, 4
totalDeposit:
	.word	50000000
	.global	head
	.bss
	.align	2
	.type	head, %object
	.size	head, 4
head:
	.space	4
	.global	curr
	.align	2
	.type	curr, %object
	.size	curr, 4
curr:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Counts initialized. %d Depositors\011\011%d Withdra"
	.ascii	"wers\000"
	.align	2
.LC1:
	.ascii	"usleep\000"
	.align	2
.LC2:
	.ascii	"Thread Creation: Depositor\000"
	.align	2
.LC3:
	.ascii	"Thread Creation: Withdrawer\000"
	.align	2
.LC4:
	.ascii	"Thread Join: Depositor\000"
	.align	2
.LC5:
	.ascii	"\012All depositor threads finished and joined\000"
	.align	2
.LC6:
	.ascii	"Thread Join: Withdrawer\000"
	.align	2
.LC7:
	.ascii	"\012All withdrawer threads finished and joined, all"
	.ascii	" threads finished.\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #124
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, sp
	mov	r4, r3
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	mov	r3, #50
	str	r3, [fp, #-116]
	mov	r3, #50
	str	r3, [fp, #-120]
	ldr	r3, [fp, #-116]
	str	r3, [fp, #-124]
	ldr	r3, [fp, #-120]
	str	r3, [fp, #-128]
	ldr	r2, [fp, #-120]
	ldr	r1, [fp, #-116]
	ldr	r0, .L15+4
	bl	printf
	ldr	ip, [fp, #-116]
	sub	r3, ip, #1
	str	r3, [fp, #-132]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-108]
	ldr	ip, [fp, #-120]
	sub	r3, ip, #1
	str	r3, [fp, #-104]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-100]
	ldr	ip, [fp, #-116]
	sub	r3, ip, #1
	str	r3, [fp, #-96]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-92]
	ldr	ip, [fp, #-120]
	sub	r3, ip, #1
	str	r3, [fp, #-88]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-84]
	sub	r3, fp, #52
	mov	r0, r3
	bl	pthread_attr_init
	sub	r3, fp, #52
	mov	r1, #0
	mov	r0, r3
	bl	pthread_attr_setdetachstate
	mov	r2, #0
	mov	r1, #0
	ldr	r0, .L15+8
	bl	sem_init
	mov	r2, #1
	mov	r1, #0
	ldr	r0, .L15+12
	bl	sem_init
	b	.L2
.L6:
	mov	r0, #1000
	bl	usleep
	mov	r3, r0
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L15+16
	bl	perror
.L3:
	bl	rand
	mov	r3, r0
	cmp	r3, #0
	and	r3, r3, #1
	rsblt	r3, r3, #0
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bne	.L4
	ldr	r3, [fp, #-124]
	cmp	r3, #0
	ble	.L4
	ldr	r2, [fp, #-116]
	ldr	r3, [fp, #-124]
	sub	r3, r2, r3
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-124]
	sub	r3, r3, #1
	str	r3, [fp, #-124]
	ldr	r3, [fp, #-108]
	ldr	r2, [fp, #-68]
	ldr	r1, [fp, #-68]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-68]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-92]
	add	r0, r2, r3
	ldr	r3, [fp, #-68]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-108]
	add	r3, r2, r3
	sub	r1, fp, #52
	ldr	r2, .L15+20
	bl	pthread_create
	str	r0, [fp, #-64]
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L15+24
	bl	perror
	mov	r0, #1
	bl	exit
.L4:
	ldr	r3, [fp, #-72]
	cmp	r3, #1
	bne	.L2
	ldr	r3, [fp, #-128]
	cmp	r3, #0
	ble	.L2
	ldr	r2, [fp, #-120]
	ldr	r3, [fp, #-128]
	sub	r3, r2, r3
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-128]
	sub	r3, r3, #1
	str	r3, [fp, #-128]
	ldr	r3, [fp, #-100]
	ldr	r2, [fp, #-60]
	ldr	r1, [fp, #-60]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-84]
	add	r0, r2, r3
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-100]
	add	r3, r2, r3
	sub	r1, fp, #52
	ldr	r2, .L15+28
	bl	pthread_create
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L15+32
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	ldr	r2, [fp, #-124]
	ldr	r3, [fp, #-128]
	add	r3, r2, r3
	cmp	r3, #0
	bgt	.L6
	mov	r3, #0
	str	r3, [fp, #-112]
	b	.L7
.L9:
	ldr	r3, [fp, #-92]
	ldr	r2, [fp, #-112]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	str	r0, [fp, #-76]
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L15+36
	bl	perror
	mov	r0, #1
	bl	exit
.L8:
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
.L7:
	ldr	r2, [fp, #-112]
	ldr	r3, [fp, #-116]
	cmp	r2, r3
	blt	.L9
	ldr	r0, .L15+40
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-112]
	b	.L10
.L12:
	ldr	r3, [fp, #-84]
	ldr	r2, [fp, #-112]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	str	r0, [fp, #-80]
	ldr	r3, [fp, #-80]
	cmp	r3, #0
	bge	.L11
	ldr	r0, .L15+44
	bl	perror
	mov	r0, #1
	bl	exit
.L11:
	ldr	r3, [fp, #-112]
	add	r3, r3, #1
	str	r3, [fp, #-112]
.L10:
	ldr	r2, [fp, #-112]
	ldr	r3, [fp, #-120]
	cmp	r2, r3
	blt	.L12
	ldr	r0, .L15+48
	bl	puts
	mov	r3, #0
	mov	sp, r4
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC8
	.word	.LC0
	.word	wlist
	.word	mutex
	.word	.LC1
	.word	depositorThread
	.word	.LC2
	.word	withdrawerThread
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.global	__aeabi_idivmod
	.section	.rodata
	.align	2
.LC9:
	.ascii	"total deposit is below zero!\000"
	.align	2
.LC10:
	.ascii	"\012Depositor: %d\011Balance: %d\011\011Post deposi"
	.ascii	"t of: %d\000"
	.text
	.align	2
	.global	depositorThread
	.syntax unified
	.arm
	.fpu softvfp
	.type	depositorThread, %function
depositorThread:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r0, .L22
	bl	sem_wait
	bl	rand
	ldr	r3, .L22+4
	ldr	r3, [r3]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r1, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	str	r3, [fp, #-8]
	ldr	r3, .L22+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	ldr	r2, .L22+4
	str	r3, [r2]
	ldr	r3, .L22+4
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L18
	ldr	r0, .L22+8
	bl	perror
.L18:
	mov	r0, #100
	bl	usleep
	ldr	r3, .L22+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, .L22+12
	str	r3, [r2]
	ldr	r3, .L22+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, .L22+16
	bl	printf
	ldr	r3, .L22+20
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L19
	ldr	r0, .L22
	bl	sem_post
	b	.L20
.L19:
	ldr	r3, .L22+24
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L21
	ldr	r3, .L22+24
	ldr	r3, [r3]
	ldr	r2, [r3]
	ldr	r3, .L22+12
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L21
	ldr	r0, .L22
	bl	sem_post
	b	.L20
.L21:
	ldr	r3, .L22+24
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r2, .L22+28
	str	r3, [r2]
	ldr	r0, .L22+32
	bl	sem_post
.L20:
	mov	r0, #0
	bl	pthread_exit
.L23:
	.align	2
.L22:
	.word	mutex
	.word	totalDeposit
	.word	.LC9
	.word	balance
	.word	.LC10
	.word	wcount
	.word	head
	.word	threadIWantToWake
	.word	wlist
	.size	depositorThread, .-depositorThread
	.section	.rodata
	.align	2
.LC11:
	.ascii	"totalwithdraw is below 0\000"
	.align	2
.LC12:
	.ascii	"A Balance of less than 0 was created!\000"
	.align	2
.LC13:
	.ascii	"\012\011negative balance from above error: %d\000"
	.align	2
.LC14:
	.ascii	"\012Withdrawer: %d\011\011Balance: %d\011\011Post w"
	.ascii	"ithdrawal of: %d\000"
	.align	2
.LC15:
	.ascii	"\012Withdrawer: %d\011\011Balance: %d\011\011Pre ov"
	.ascii	"erdraw/wait of: %d\000"
	.align	2
.LC16:
	.ascii	"\012I'm the thread you wanted to awake, I say %d = "
	.ascii	"%d\000"
	.align	2
.LC17:
	.ascii	"\012Inclusive of me, there are %d threads in line\000"
	.align	2
.LC18:
	.ascii	"\012Withdrawer: %d\011\011Balance: %d\011\011Post d"
	.ascii	"elayed withdrawal of: %d\000"
	.align	2
.LC19:
	.ascii	"\012Withdrawer: %d\011\011I want to wake thread %d\000"
	.text
	.align	2
	.global	withdrawerThread
	.syntax unified
	.arm
	.fpu softvfp
	.type	withdrawerThread, %function
withdrawerThread:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r0, .L35
	bl	sem_wait
	bl	rand
	ldr	r3, .L35+4
	ldr	r3, [r3]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r1, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	str	r3, [fp, #-8]
	ldr	r3, .L35+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	ldr	r2, .L35+4
	str	r3, [r2]
	ldr	r3, .L35+4
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L25
	ldr	r0, .L35+8
	bl	perror
.L25:
	mov	r0, #10
	bl	usleep
	ldr	r3, .L35+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L26
	ldr	r3, .L35+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bge	.L26
	ldr	r3, .L35+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	ldr	r2, .L35+16
	str	r3, [r2]
	ldr	r3, .L35+16
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L27
	ldr	r0, .L35+20
	bl	perror
	ldr	r3, .L35+16
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L35+24
	bl	printf
.L27:
	ldr	r3, .L35+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, .L35+28
	bl	printf
	ldr	r0, .L35
	bl	sem_post
	b	.L28
.L26:
	ldr	r3, .L35+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, .L35+32
	bl	printf
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	add_to_list
	ldr	r3, .L35+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L35+12
	str	r3, [r2]
	ldr	r0, .L35
	bl	sem_post
.L31:
	ldr	r0, .L35+36
	bl	sem_wait
	mov	r0, #10
	bl	usleep
	ldr	r3, .L35+40
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bne	.L31
	ldr	r3, .L35+40
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-12]
	ldr	r0, .L35+44
	bl	printf
	ldr	r3, .L35+12
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L35+48
	bl	printf
	ldr	r3, .L35+40
	mvn	r2, #98
	str	r2, [r3]
	nop
	ldr	r3, .L35+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	ldr	r2, .L35+16
	str	r3, [r2]
	ldr	r3, .L35+16
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L32
	ldr	r0, .L35+20
	bl	perror
	ldr	r3, .L35+16
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L35+24
	bl	printf
.L32:
	ldr	r3, .L35+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, .L35+52
	bl	printf
	bl	remove_head
	ldr	r3, .L35+12
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L35+12
	str	r3, [r2]
	ldr	r3, .L35+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L33
	ldr	r3, .L35+56
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L33
	ldr	r3, .L35+56
	ldr	r3, [r3]
	ldr	r2, [r3]
	ldr	r3, .L35+16
	ldr	r3, [r3]
	cmp	r2, r3
	bgt	.L33
	ldr	r3, .L35+56
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	ldr	r2, .L35+40
	str	r3, [r2]
	ldr	r3, .L35+40
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-12]
	ldr	r0, .L35+60
	bl	printf
	ldr	r0, .L35+36
	bl	sem_post
	b	.L28
.L33:
	ldr	r0, .L35
	bl	sem_post
.L28:
	mov	r0, #0
	bl	pthread_exit
.L36:
	.align	2
.L35:
	.word	mutex
	.word	totalWithdraw
	.word	.LC11
	.word	wcount
	.word	balance
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	wlist
	.word	threadIWantToWake
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	head
	.word	.LC19
	.size	withdrawerThread, .-withdrawerThread
	.section	.rodata
	.align	2
.LC20:
	.ascii	"\012creating list with headnode as [%d]\000"
	.align	2
.LC21:
	.ascii	"\012Node creation failed \000"
	.align	2
.LC22:
	.ascii	"\012Node creation (that I know about) failed\000"
	.text
	.align	2
	.global	create_list
	.syntax unified
	.arm
	.fpu softvfp
	.type	create_list, %function
create_list:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r1, [fp, #-16]
	ldr	r0, .L41
	bl	printf
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L38
	ldr	r0, .L41+4
	bl	puts
	mov	r3, #0
	b	.L39
.L38:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r2, .L41+8
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r2, .L41+12
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r3, .L41+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L40
	ldr	r0, .L41+16
	bl	printf
.L40:
	ldr	r3, .L41+8
	ldr	r3, [r3]
.L39:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L42:
	.align	2
.L41:
	.word	.LC20
	.word	.LC21
	.word	head
	.word	curr
	.word	.LC22
	.size	create_list, .-create_list
	.section	.rodata
	.align	2
.LC23:
	.ascii	"CURR WAS NULL!\000"
	.align	2
.LC24:
	.ascii	"\012Adding node to end of list with value [%d]\000"
	.text
	.align	2
	.global	add_to_list
	.syntax unified
	.arm
	.fpu softvfp
	.type	add_to_list, %function
add_to_list:
	@ 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]
	str	r1, [fp, #-20]
	mov	r0, #10
	bl	usleep
	ldr	r3, .L49
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L44
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	create_list
	mov	r3, r0
	b	.L45
.L44:
	ldr	r3, .L49+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L46
	ldr	r0, .L49+8
	bl	perror
	ldr	r3, .L49
	ldr	r3, [r3]
	ldr	r2, .L49+4
	str	r3, [r2]
.L46:
	ldr	r1, [fp, #-16]
	ldr	r0, .L49+12
	bl	printf
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L47
	ldr	r0, .L49+16
	bl	puts
	mov	r3, #0
	b	.L45
.L47:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L49+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L48
	ldr	r0, .L49+8
	bl	perror
	ldr	r3, .L49
	ldr	r3, [r3]
	ldr	r2, .L49+4
	str	r3, [r2]
.L48:
	ldr	r3, .L49+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r2, .L49+4
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r3, [fp, #-8]
.L45:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L50:
	.align	2
.L49:
	.word	head
	.word	curr
	.word	.LC23
	.word	.LC24
	.word	.LC21
	.size	add_to_list, .-add_to_list
	.section	.rodata
	.align	2
.LC25:
	.ascii	"\012List emptied.\000"
	.text
	.align	2
	.global	remove_head
	.syntax unified
	.arm
	.fpu softvfp
	.type	remove_head, %function
remove_head:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L55
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L52
	mvn	r3, #0
	b	.L53
.L52:
	ldr	r3, .L55
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	ldr	r2, .L55
	str	r3, [r2]
	ldr	r3, .L55
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L54
	ldr	r0, .L55+4
	bl	printf
.L54:
	mov	r3, #0
.L53:
	mov	r0, r3
	pop	{fp, pc}
.L56:
	.align	2
.L55:
	.word	head
	.word	.LC25
	.size	remove_head, .-remove_head
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
