	.file	"extr_trace-agent.c_agent_main_loop.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"pthread_join() error:%d (cpu %d)\n"
	.text
	.p2align 4
	.type	agent_main_loop, @function
agent_main_loop:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	push	r13
	push	r12
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbx
	sub	rsp, 16
	.cfi_offset 3, -48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MAX_CPUS[rip]
	mov	rcx, rsp
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L21:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L21
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L22
.L4:
	mov	edx, DWORD PTR [r12]
	mov	r13, rsp
	test	edx, edx
	jle	.L5
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rax, QWORD PTR 8[r12]
	mov	edi, DWORD PTR [rax+rbx*4]
	call	rw_thread_run@PLT
	mov	DWORD PTR 0[r13+rbx*4], eax
	add	rbx, 1
	cmp	DWORD PTR [r12], ebx
	jg	.L6
.L5:
	mov	edi, DWORD PTR 4[r12]
	call	rw_ctl_loop@PLT
	mov	eax, DWORD PTR [r12]
	test	eax, eax
	jle	.L1
	xor	ebx, ebx
	lea	r14, .LC0[rip]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	add	rbx, 1
	cmp	DWORD PTR [r12], ebx
	jle	.L1
.L9:
	mov	edi, DWORD PTR 0[r13+rbx*4]
	xor	esi, esi
	call	pthread_join@PLT
	test	eax, eax
	je	.L8
	mov	edx, ebx
	mov	esi, eax
	mov	rdi, r14
	add	rbx, 1
	call	pr_err@PLT
	mov	edi, DWORD PTR EXIT_FAILURE[rip]
	call	exit@PLT
	cmp	DWORD PTR [r12], ebx
	jg	.L9
.L1:
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L23
	lea	rsp, -32[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	agent_main_loop, .-agent_main_loop
	.comm	MAX_CPUS,4,4
	.comm	EXIT_FAILURE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_trace-agent.c_agent_main_loop.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"pthread_join() error:%d (cpu %d)\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	agent_main_loop, %function
agent_main_loop:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, fp, lr}
	add	fp, sp, #24
	sub	sp, sp, #12
	ldr	r3, .L16
	ldr	r2, [r0]
	ldr	r3, [r3]
	cmp	r2, #0
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L16+4
	mov	r5, r0
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	mov	r6, sp
	ble	.L2
	mov	r4, #0
	sub	r7, r6, #4
.L3:
	ldr	r3, [r5, #8]
	ldr	r0, [r3, r4, lsl #2]
	bl	rw_thread_run
	ldr	r3, [r5]
	add	r4, r4, #1
	cmp	r3, r4
	str	r0, [r7, #4]!
	bgt	.L3
.L2:
	ldr	r0, [r5, #4]
	bl	rw_ctl_loop
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L1
	mov	r4, #0
	ldr	r8, .L16+8
	ldr	r7, .L16+12
	sub	r6, r6, #4
	b	.L6
.L5:
	ldr	r3, [r5]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L1
.L6:
	mov	r1, #0
	ldr	r0, [r6, #4]!
	bl	pthread_join
	subs	r1, r0, #0
	beq	.L5
	mov	r2, r4
	mov	r0, r8
	bl	pr_err
	ldr	r0, [r7]
	bl	exit
	ldr	r3, [r5]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L6
.L1:
	ldr	r3, .L16+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, fp, pc}
.L15:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	MAX_CPUS
	.word	.LC1
	.word	.LC0
	.word	EXIT_FAILURE
	.size	agent_main_loop, .-agent_main_loop
	.comm	MAX_CPUS,4,4
	.comm	EXIT_FAILURE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
