	.file	"159515957.c"
	.intel_syntax noprefix
	.text
	.globl	A
	.bss
	.align 32
	.type	A, @object
	.size	A, 48
A:
	.zero	48
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 48
B:
	.zero	48
	.globl	counter
	.align 4
	.type	counter, @object
	.size	counter, 4
counter:
	.zero	4
	.text
	.globl	init_account
	.type	init_account, @function
init_account:
.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
	mov	eax, DWORD PTR counter[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR counter[rip], edx
	mov	rdx, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rdx], eax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	mov	esi, 0
	mov	rdi, rax
	call	pthread_mutex_init@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	init_account, .-init_account
	.globl	deposit
	.type	deposit, @function
deposit:
.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 -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	DWORD PTR -20[rbp], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	edx, eax
	je	.L7
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	edx, eax
	jge	.L5
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	jmp	.L6
.L5:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
.L6:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -20[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	sub	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	jmp	.L2
.L7:
	nop
.L2:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	deposit, .-deposit
	.globl	t1
	.type	t1, @function
t1:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	eax, 0
	call	rand@PLT
	mov	edx, eax
	movsx	rax, edx
	imul	rax, rax, 1374389535
	shr	rax, 32
	sar	eax, 5
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	imul	ecx, eax, 100
	mov	eax, edx
	sub	eax, ecx
	mov	edx, eax
	lea	rsi, B[rip]
	lea	rdi, A[rip]
	call	deposit
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	t1, .-t1
	.globl	t2
	.type	t2, @function
t2:
.LFB3:
	.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	eax, 0
	call	rand@PLT
	mov	edx, eax
	movsx	rax, edx
	imul	rax, rax, 1374389535
	shr	rax, 32
	sar	eax, 5
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	imul	ecx, eax, 100
	mov	eax, edx
	sub	eax, ecx
	mov	edx, eax
	lea	rsi, A[rip]
	lea	rdi, B[rip]
	call	deposit
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	t2, .-t2
	.section	.rodata
.LC0:
	.string	"%d: A = %d, B = %d.\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.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
	lea	rdi, A[rip]
	call	init_account
	lea	rdi, B[rip]
	call	init_account
	mov	DWORD PTR -28[rbp], 0
	jmp	.L13
.L14:
	lea	rax, -24[rbp]
	mov	ecx, 0
	lea	rdx, t1[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	lea	rax, -16[rbp]
	mov	ecx, 0
	lea	rdx, t2[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
	mov	ecx, DWORD PTR B[rip]
	mov	edx, DWORD PTR A[rip]
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -28[rbp], 1
.L13:
	cmp	DWORD PTR -28[rbp], 99999
	jle	.L14
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.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	"159515957.c"
	.text
	.comm	A,32,4
	.comm	B,32,4
	.global	counter
	.bss
	.align	2
	.type	counter, %object
	.size	counter, 4
counter:
	.space	4
	.text
	.align	2
	.global	init_account
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_account, %function
init_account:
	@ 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, .L2
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L2
	str	r2, [r1]
	ldr	r2, [fp, #-8]
	str	r3, [r2, #4]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #8
	mov	r1, #0
	mov	r0, r3
	bl	pthread_mutex_init
	nop
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	counter
	.size	init_account, .-init_account
	.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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	beq	.L9
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bge	.L7
	ldr	r3, [fp, #-8]
	add	r3, r3, #8
	mov	r0, r3
	bl	pthread_mutex_lock
	ldr	r3, [fp, #-12]
	add	r3, r3, #8
	mov	r0, r3
	bl	pthread_mutex_lock
	b	.L8
.L7:
	ldr	r3, [fp, #-12]
	add	r3, r3, #8
	mov	r0, r3
	bl	pthread_mutex_lock
	ldr	r3, [fp, #-8]
	add	r3, r3, #8
	mov	r0, r3
	bl	pthread_mutex_lock
.L8:
	ldr	r3, [fp, #-12]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r2, r2, r3
	ldr	r3, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	sub	r2, r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #8
	mov	r0, r3
	bl	pthread_mutex_unlock
	ldr	r3, [fp, #-8]
	add	r3, r3, #8
	mov	r0, r3
	bl	pthread_mutex_unlock
	b	.L4
.L9:
	nop
.L4:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	deposit, .-deposit
	.align	2
	.global	t1
	.syntax unified
	.arm
	.fpu softvfp
	.type	t1, %function
t1:
	@ 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]
	bl	rand
	mov	r1, r0
	ldr	r3, .L12
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	ldr	r1, .L12+4
	ldr	r0, .L12+8
	bl	deposit
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	1374389535
	.word	B
	.word	A
	.size	t1, .-t1
	.align	2
	.global	t2
	.syntax unified
	.arm
	.fpu softvfp
	.type	t2, %function
t2:
	@ 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]
	bl	rand
	mov	r1, r0
	ldr	r3, .L16
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	ldr	r1, .L16+4
	ldr	r0, .L16+8
	bl	deposit
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	1374389535
	.word	A
	.word	B
	.size	t2, .-t2
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d: A = %d, B = %d.\012\000"
	.align	2
.LC1:
	.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, #16
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L23+4
	bl	init_account
	ldr	r0, .L23+8
	bl	init_account
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L19
.L20:
	sub	r0, fp, #20
	mov	r3, #0
	ldr	r2, .L23+12
	mov	r1, #0
	bl	pthread_create
	sub	r0, fp, #16
	mov	r3, #0
	ldr	r2, .L23+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, .L23+4
	ldr	r2, [r3]
	ldr	r3, .L23+8
	ldr	r3, [r3]
	ldr	r1, [fp, #-12]
	ldr	r0, .L23+20
	bl	printf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L19:
	ldr	r3, [fp, #-12]
	ldr	r2, .L23+24
	cmp	r3, r2
	blt	.L20
	mov	r3, #0
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC1
	.word	A
	.word	B
	.word	t1
	.word	t2
	.word	.LC0
	.word	100000
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
