	.file	"287264.c"
	.intel_syntax noprefix
	.text
	.globl	bank_balance
	.bss
	.align 8
	.type	bank_balance, @object
	.size	bank_balance, 8
bank_balance:
	.zero	8
	.globl	ivan_account
	.align 8
	.type	ivan_account, @object
	.size	ivan_account, 8
ivan_account:
	.zero	8
	.globl	petar_account
	.align 8
	.type	petar_account, @object
	.size	petar_account, 8
petar_account:
	.zero	8
	.globl	mutex
	.align 32
	.type	mutex, @object
	.size	mutex, 40
mutex:
	.zero	40
	.text
	.globl	deposit
	.type	deposit, @function
deposit:
.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, 16
	movsd	QWORD PTR -8[rbp], xmm0
	mov	QWORD PTR -16[rbp], rdi
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR -16[rbp]
	movsd	xmm0, QWORD PTR [rax]
	addsd	xmm0, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	movsd	QWORD PTR [rax], xmm0
	movsd	xmm0, QWORD PTR bank_balance[rip]
	addsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR bank_balance[rip], xmm0
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	deposit, .-deposit
	.globl	withdraw
	.type	withdraw, @function
withdraw:
.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
	movsd	QWORD PTR -8[rbp], xmm0
	mov	QWORD PTR -16[rbp], rdi
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR -16[rbp]
	movsd	xmm0, QWORD PTR [rax]
	subsd	xmm0, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	movsd	QWORD PTR [rax], xmm0
	movsd	xmm0, QWORD PTR bank_balance[rip]
	subsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR bank_balance[rip], xmm0
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	withdraw, .-withdraw
	.globl	ivan
	.type	ivan, @function
ivan:
.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	DWORD PTR -4[rbp], 0
	jmp	.L4
.L7:
	call	rand@PLT
	cdq
	shr	edx, 31
	add	eax, edx
	and	eax, 1
	sub	eax, edx
	cmp	eax, 1
	jg	.L5
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1759218605
	shr	rdx, 32
	sar	edx, 12
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 10000
	sub	eax, ecx
	mov	edx, eax
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, edx
	movq	rax, xmm1
	lea	rdi, ivan_account[rip]
	movq	xmm0, rax
	call	deposit
	jmp	.L6
.L5:
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1759218605
	shr	rdx, 32
	sar	edx, 12
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 10000
	sub	eax, ecx
	mov	edx, eax
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, edx
	movq	rax, xmm2
	lea	rdi, ivan_account[rip]
	movq	xmm0, rax
	call	withdraw
.L6:
	add	DWORD PTR -4[rbp], 1
.L4:
	cmp	DWORD PTR -4[rbp], 999999
	jle	.L7
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	ivan, .-ivan
	.globl	petar
	.type	petar, @function
petar:
.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L9
.L12:
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 6
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 1000
	sub	eax, ecx
	mov	edx, eax
	cmp	edx, 500
	jg	.L10
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1759218605
	shr	rdx, 32
	sar	edx, 12
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 10000
	sub	eax, ecx
	mov	edx, eax
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, edx
	movq	rax, xmm1
	lea	rdi, petar_account[rip]
	movq	xmm0, rax
	call	deposit
	jmp	.L11
.L10:
	call	rand@PLT
	movsx	rdx, eax
	imul	rdx, rdx, 1759218605
	shr	rdx, 32
	sar	edx, 12
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 10000
	sub	eax, ecx
	mov	edx, eax
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, edx
	movq	rax, xmm2
	lea	rdi, petar_account[rip]
	movq	xmm0, rax
	call	withdraw
.L11:
	add	DWORD PTR -4[rbp], 1
.L9:
	cmp	DWORD PTR -4[rbp], 999999
	jle	.L12
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	petar, .-petar
	.section	.rodata
.LC0:
	.string	"Mutex was not initialized!"
.LC1:
	.string	"%f %f\n"
	.text
	.globl	main
	.type	main, @function
main:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	esi, 0
	lea	rdi, mutex[rip]
	call	pthread_mutex_init@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 0
	je	.L14
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L16
.L14:
	lea	rax, -24[rbp]
	mov	ecx, 0
	lea	rdx, petar[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -16[rbp]
	mov	ecx, 0
	lea	rdx, ivan[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@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
	movsd	xmm2, QWORD PTR bank_balance[rip]
	movsd	xmm1, QWORD PTR ivan_account[rip]
	movsd	xmm0, QWORD PTR petar_account[rip]
	addsd	xmm1, xmm0
	movq	rax, xmm1
	movapd	xmm1, xmm2
	movq	xmm0, rax
	lea	rdi, .LC1[rip]
	mov	eax, 2
	call	printf@PLT
	mov	eax, 0
.L16:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"287264.c"
	.text
	.global	bank_balance
	.bss
	.align	3
	.type	bank_balance, %object
	.size	bank_balance, 8
bank_balance:
	.space	8
	.global	ivan_account
	.align	3
	.type	ivan_account, %object
	.size	ivan_account, 8
ivan_account:
	.space	8
	.global	petar_account
	.align	3
	.type	petar_account, %object
	.size	petar_account, 8
petar_account:
	.space	8
	.comm	mutex,24,4
	.global	__aeabi_dadd
	.text
	.align	2
	.global	deposit
	.syntax unified
	.arm
	.fpu softvfp
	.type	deposit, %function
deposit:
	@ 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, #-12]
	str	r1, [fp, #-8]
	str	r2, [fp, #-16]
	ldr	r0, .L2
	bl	pthread_mutex_lock
	ldr	r3, [fp, #-16]
	ldmia	r3, {r0-r1}
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-16]
	stm	r1, {r2-r3}
	ldr	r3, .L2+4
	ldmia	r3, {r0-r1}
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L2+4
	stm	r1, {r2-r3}
	ldr	r0, .L2
	bl	pthread_mutex_unlock
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	mutex
	.word	bank_balance
	.size	deposit, .-deposit
	.global	__aeabi_dsub
	.align	2
	.global	withdraw
	.syntax unified
	.arm
	.fpu softvfp
	.type	withdraw, %function
withdraw:
	@ 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, #-12]
	str	r1, [fp, #-8]
	str	r2, [fp, #-16]
	ldr	r0, .L5
	bl	pthread_mutex_lock
	ldr	r3, [fp, #-16]
	ldmia	r3, {r0-r1}
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-16]
	stm	r1, {r2-r3}
	ldr	r3, .L5+4
	ldmia	r3, {r0-r1}
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L5+4
	stm	r1, {r2-r3}
	ldr	r0, .L5
	bl	pthread_mutex_unlock
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	mutex
	.word	bank_balance
	.size	withdraw, .-withdraw
	.global	__aeabi_i2d
	.align	2
	.global	ivan
	.syntax unified
	.arm
	.fpu softvfp
	.type	ivan, %function
ivan:
	@ 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, #-8]
	b	.L8
.L11:
	bl	rand
	mov	r3, r0
	cmp	r3, #0
	and	r3, r3, #1
	rsblt	r3, r3, #0
	cmp	r3, #1
	bgt	.L9
	bl	rand
	mov	r1, r0
	ldr	r3, .L12
	smull	r2, r3, r1, r3
	asr	r2, r3, #12
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r2, r1, r3
	mov	r0, r2
	bl	__aeabi_i2d
	ldr	r2, .L12+4
	bl	deposit
	b	.L10
.L9:
	bl	rand
	mov	r1, r0
	ldr	r3, .L12
	smull	r2, r3, r1, r3
	asr	r2, r3, #12
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r2, r1, r3
	mov	r0, r2
	bl	__aeabi_i2d
	ldr	r2, .L12+4
	bl	withdraw
.L10:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L8:
	ldr	r3, [fp, #-8]
	ldr	r2, .L12+8
	cmp	r3, r2
	blt	.L11
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	1759218605
	.word	ivan_account
	.word	1000000
	.size	ivan, .-ivan
	.align	2
	.global	petar
	.syntax unified
	.arm
	.fpu softvfp
	.type	petar, %function
petar:
	@ 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, #-8]
	b	.L15
.L18:
	bl	rand
	mov	r1, r0
	ldr	r3, .L19
	smull	r2, r3, r1, r3
	asr	r2, r3, #6
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	sub	r2, r1, r3
	cmp	r2, #500
	bgt	.L16
	bl	rand
	mov	r1, r0
	ldr	r3, .L19+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #12
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r2, r1, r3
	mov	r0, r2
	bl	__aeabi_i2d
	ldr	r2, .L19+8
	bl	deposit
	b	.L17
.L16:
	bl	rand
	mov	r1, r0
	ldr	r3, .L19+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #12
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r2, r1, r3
	mov	r0, r2
	bl	__aeabi_i2d
	ldr	r2, .L19+8
	bl	withdraw
.L17:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L15:
	ldr	r3, [fp, #-8]
	ldr	r2, .L19+12
	cmp	r3, r2
	blt	.L18
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	274877907
	.word	1759218605
	.word	petar_account
	.word	1000000
	.size	petar, .-petar
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Mutex was not initialized!\000"
	.align	2
.LC1:
	.ascii	"%f %f\012\000"
	.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 = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	mov	r1, #0
	ldr	r0, .L26+4
	bl	pthread_mutex_init
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L22
	ldr	r0, .L26+8
	bl	puts
	mov	r3, #0
	b	.L24
.L22:
	sub	r0, fp, #20
	mov	r3, #0
	ldr	r2, .L26+12
	mov	r1, #0
	bl	pthread_create
	sub	r0, fp, #16
	mov	r3, #0
	ldr	r2, .L26+16
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-20]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, [fp, #-16]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	ldr	r3, .L26+20
	ldmia	r3, {r0-r1}
	ldr	r3, .L26+24
	ldmia	r3, {r2-r3}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r3, .L26+28
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L26+32
	bl	printf
	mov	r3, #0
.L24:
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC2
	.word	mutex
	.word	.LC0
	.word	petar
	.word	ivan
	.word	ivan_account
	.word	petar_account
	.word	bank_balance
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
