	.file	"extr_pgbench.c_threadRun.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"pgbench_log"
.LC1:
	.string	"%s.%d"
.LC2:
	.string	"%s.%d.%d"
.LC3:
	.string	"w"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC4:
	.string	"could not open logfile \"%s\": %s\n"
	.section	.rodata.str1.1
.LC5:
	.string	"invalid socket: %s"
.LC6:
	.string	"%s() failed: %s\n"
	.text
	.p2align 4
	.type	threadRun, @function
threadRun:
.LFB0:
	.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
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	xor	r13d, r13d
	push	r12
	push	rbx
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 104
	mov	r12d, DWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 40[rdi]
	mov	edi, r12d
	mov	QWORD PTR -112[rbp], rax
	call	alloc_socket_set@PLT
	mov	edi, DWORD PTR 28[rbx]
	mov	QWORD PTR -88[rbp], rax
	call	INSTR_TIME_GET_MICROSEC@PLT
	mov	edi, r13d
	mov	r14, QWORD PTR progress[rip]
	mov	QWORD PTR -96[rbp], rax
	mov	DWORD PTR -104[rbp], eax
	mov	DWORD PTR -68[rbp], eax
	call	INSTR_TIME_SET_CURRENT@PLT
	mov	edi, r13d
	call	INSTR_TIME_GET_MICROSEC@PLT
	mov	edi, DWORD PTR 24[rbx]
	mov	QWORD PTR 32[rbx], rax
	call	INSTR_TIME_SET_ZERO@PLT
	xor	edi, edi
	call	time@PLT
	mov	esi, eax
	lea	rax, -60[rbp]
	mov	rdi, rax
	mov	QWORD PTR -128[rbp], rax
	call	initStats@PLT
	mov	eax, DWORD PTR -60[rbp]
	cmp	QWORD PTR use_log[rip], 0
	mov	DWORD PTR -64[rbp], eax
	je	.L2
	movsx	rax, DWORD PTR MAXPGPATH[rip]
	mov	rcx, rsp
	mov	r13, rsp
	mov	rsi, rax
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L4
.L84:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L84
.L4:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L5
	or	QWORD PTR -8[rsp+rdx], 0
.L5:
	mov	rcx, QWORD PTR logfile_prefix[rip]
	mov	r9, QWORD PTR 8[rbx]
	mov	r15, rsp
	lea	rax, .LC0[rip]
	mov	r8d, DWORD PTR main_pid[rip]
	test	rcx, rcx
	cmove	rcx, rax
	test	r9, r9
	jne	.L7
	lea	rdx, .LC1[rip]
	mov	rdi, rsp
	xor	eax, eax
	call	snprintf@PLT
.L8:
	lea	rsi, .LC3[rip]
	mov	rdi, r15
	call	fopen@PLT
	mov	QWORD PTR 16[rbx], rax
	test	rax, rax
	je	.L85
	mov	rsp, r13
.L2:
	mov	ecx, DWORD PTR is_connect[rip]
	test	ecx, ecx
	jne	.L11
	test	r12d, r12d
	jle	.L12
	mov	rcx, QWORD PTR -112[rbp]
	lea	eax, -1[r12]
	lea	rax, [rax+rax*2]
	lea	r15, 16[rcx]
	lea	r13, 40[rcx+rax*8]
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L87:
	add	r15, 24
	cmp	r15, r13
	je	.L86
.L14:
	xor	eax, eax
	call	doConnect@PLT
	mov	QWORD PTR [r15], rax
	test	rax, rax
	jne	.L87
.L10:
	xor	r13d, r13d
	mov	edi, r13d
	call	INSTR_TIME_SET_CURRENT@PLT
	mov	r14, QWORD PTR -112[rbp]
	mov	esi, r12d
	xor	r12d, r12d
	mov	rdi, r14
	call	disconnect_all@PLT
	mov	edi, r12d
	call	INSTR_TIME_SET_CURRENT@PLT
	mov	edi, DWORD PTR 24[rbx]
	mov	edx, r13d
	mov	esi, r12d
	call	INSTR_TIME_ACCUM_DIFF@PLT
	mov	rdi, QWORD PTR 16[rbx]
	test	rdi, rdi
	je	.L42
	cmp	QWORD PTR agg_interval[rip], 0
	jg	.L88
.L43:
	call	fclose@PLT
	mov	QWORD PTR 16[rbx], 0
.L42:
	mov	rdi, QWORD PTR -88[rbp]
	call	free_socket_set@PLT
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L89
	lea	rsp, -40[rbp]
	xor	eax, eax
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L88:
	.cfi_restore_state
	mov	rdx, QWORD PTR -128[rbp]
	mov	rdi, rbx
	xor	r9d, r9d
	xor	r8d, r8d
	xor	ecx, ecx
	mov	rsi, r14
	call	doLog@PLT
	mov	rdi, QWORD PTR 16[rbx]
	jmp	.L43
.L11:
	mov	edi, DWORD PTR 24[rbx]
	call	INSTR_TIME_SET_CURRENT@PLT
	mov	esi, DWORD PTR 28[rbx]
	mov	edi, DWORD PTR 24[rbx]
	call	INSTR_TIME_SUBTRACT@PLT
	test	r12d, r12d
	jle	.L10
.L47:
	mov	rcx, QWORD PTR CSTATE_CHOOSE_SCRIPT[rip]
	mov	rdx, QWORD PTR -112[rbp]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L16:
	add	eax, 1
	mov	QWORD PTR [rdx], rcx
	add	rdx, 24
	cmp	r12d, eax
	jg	.L16
	imul	eax, r14d, 1000000
	add	eax, DWORD PTR -96[rbp]
	mov	DWORD PTR -100[rbp], r12d
	mov	DWORD PTR -132[rbp], eax
	mov	QWORD PTR -120[rbp], rbx
.L41:
	mov	rdi, QWORD PTR -88[rbp]
	xor	r15d, r15d
	xor	ebx, ebx
	call	clear_socket_set@PLT
	mov	r14d, DWORD PTR PG_INT64_MAX[rip]
	mov	eax, r12d
	mov	r13, QWORD PTR -112[rbp]
	mov	r12d, r15d
	mov	DWORD PTR -96[rbp], 0
	mov	r15d, r14d
	mov	r14d, eax
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L93:
	cmp	rax, QWORD PTR CSTATE_THROTTLE[rip]
	je	.L90
	cmp	rax, QWORD PTR CSTATE_WAIT_RESULT[rip]
	je	.L91
	cmp	rax, QWORD PTR CSTATE_ABORTED[rip]
	je	.L21
	cmp	rax, QWORD PTR CSTATE_FINISHED[rip]
	jne	.L79
.L21:
	add	ebx, 1
	add	r13, 24
	cmp	r14d, ebx
	jle	.L92
.L25:
	mov	rax, QWORD PTR 0[r13]
	cmp	rax, QWORD PTR CSTATE_SLEEP[rip]
	jne	.L93
	test	r12d, r12d
	je	.L44
.L81:
	mov	eax, DWORD PTR 8[r13]
.L20:
	sub	eax, r12d
	cmp	r15d, eax
	cmovg	r15d, eax
	add	ebx, 1
	add	r13, 24
	cmp	r14d, ebx
	jg	.L25
.L92:
	mov	eax, r14d
	cmp	QWORD PTR progress[rip], 0
	mov	r14d, r15d
	mov	r15d, r12d
	mov	r12d, eax
	je	.L26
	test	r14d, r14d
	jle	.L24
	mov	rax, QWORD PTR -120[rbp]
	cmp	QWORD PTR 8[rax], 0
	jne	.L27
	test	r15d, r15d
	je	.L94
.L28:
	mov	eax, DWORD PTR -132[rbp]
	cmp	r15d, eax
	jge	.L24
	sub	eax, r15d
	cmp	r14d, eax
	cmovg	r14d, eax
.L27:
	cmp	DWORD PTR PG_INT64_MAX[rip], r14d
	je	.L29
.L101:
	mov	edx, DWORD PTR -96[rbp]
	test	edx, edx
	je	.L30
	mov	rdi, QWORD PTR -88[rbp]
	mov	esi, r14d
	call	wait_on_socket_set@PLT
.L31:
	test	eax, eax
	jns	.L32
	mov	rdi, QWORD PTR errno[rip]
	cmp	rdi, QWORD PTR EINTR[rip]
	je	.L33
	mov	rbx, QWORD PTR -120[rbp]
	call	strerror@PLT
	mov	rdx, QWORD PTR SOCKET_WAIT_METHOD[rip]
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC6[rip]
	mov	rcx, rax
	xor	eax, eax
	call	fprintf@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L90:
	test	r12d, r12d
	je	.L44
	mov	eax, DWORD PTR 12[r13]
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L44:
	xor	r12d, r12d
	mov	edi, r12d
	call	INSTR_TIME_SET_CURRENT@PLT
	mov	edi, r12d
	call	INSTR_TIME_GET_MICROSEC@PLT
	mov	rcx, QWORD PTR CSTATE_SLEEP[rip]
	mov	r12d, eax
	mov	eax, DWORD PTR 12[r13]
	cmp	QWORD PTR 0[r13], rcx
	jne	.L20
	jmp	.L81
	.p2align 4,,10
	.p2align 3
.L91:
	mov	rdi, QWORD PTR 16[r13]
	call	PQsocket@PLT
	mov	esi, eax
	test	eax, eax
	js	.L95
	mov	edx, DWORD PTR -96[rbp]
	mov	rdi, QWORD PTR -88[rbp]
	lea	eax, 1[rdx]
	mov	DWORD PTR -96[rbp], eax
	call	add_socket_to_set@PLT
	jmp	.L21
.L79:
	mov	r12d, r14d
.L24:
	mov	rdi, QWORD PTR -88[rbp]
	call	clear_socket_set@PLT
.L32:
	mov	r15, QWORD PTR -112[rbp]
	xor	r14d, r14d
	xor	r13d, r13d
	mov	DWORD PTR -96[rbp], r14d
	mov	r14, QWORD PTR -128[rbp]
	mov	rbx, r15
	mov	r15d, r13d
	mov	r13, QWORD PTR -120[rbp]
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L98:
	cmp	rax, QWORD PTR CSTATE_ABORTED[rip]
	je	.L38
.L36:
	add	r15d, 1
	add	rbx, 24
	cmp	r12d, r15d
	jle	.L96
.L39:
	mov	rax, QWORD PTR [rbx]
	cmp	rax, QWORD PTR CSTATE_WAIT_RESULT[rip]
	je	.L97
	cmp	rax, QWORD PTR CSTATE_FINISHED[rip]
	je	.L36
	cmp	rax, QWORD PTR CSTATE_ABORTED[rip]
	je	.L36
.L37:
	mov	rdx, r14
	mov	rsi, rbx
	mov	rdi, r13
	call	advanceConnectionState@PLT
	mov	rax, QWORD PTR [rbx]
	cmp	rax, QWORD PTR CSTATE_FINISHED[rip]
	jne	.L98
.L38:
	add	r15d, 1
	sub	DWORD PTR -100[rbp], 1
	add	rbx, 24
	cmp	r12d, r15d
	jg	.L39
.L96:
	cmp	QWORD PTR progress[rip], 0
	je	.L33
	mov	rax, QWORD PTR -120[rbp]
	cmp	QWORD PTR 8[rax], 0
	je	.L99
.L33:
	mov	eax, DWORD PTR -100[rbp]
	test	eax, eax
	jg	.L41
	mov	rbx, QWORD PTR -120[rbp]
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L97:
	mov	rdi, QWORD PTR 16[rbx]
	call	PQsocket@PLT
	mov	esi, eax
	test	eax, eax
	js	.L100
	mov	edx, DWORD PTR -96[rbp]
	mov	rdi, QWORD PTR -88[rbp]
	lea	eax, 1[rdx]
	mov	DWORD PTR -96[rbp], eax
	call	socket_has_input@PLT
	test	eax, eax
	jne	.L37
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L26:
	test	r14d, r14d
	jle	.L24
	cmp	DWORD PTR PG_INT64_MAX[rip], r14d
	jne	.L101
.L29:
	mov	rdi, QWORD PTR -88[rbp]
	xor	esi, esi
	call	wait_on_socket_set@PLT
	jmp	.L31
.L86:
	mov	edi, DWORD PTR 24[rbx]
	call	INSTR_TIME_SET_CURRENT@PLT
	mov	esi, DWORD PTR 28[rbx]
	mov	edi, DWORD PTR 24[rbx]
	call	INSTR_TIME_SUBTRACT@PLT
	jmp	.L47
.L99:
	xor	r14d, r14d
	mov	edi, r14d
	call	INSTR_TIME_SET_CURRENT@PLT
	mov	edi, r14d
	call	INSTR_TIME_GET_MICROSEC@PLT
	mov	r14d, eax
	cmp	eax, DWORD PTR -132[rbp]
	jl	.L33
	mov	esi, DWORD PTR -104[rbp]
	mov	rdi, QWORD PTR -120[rbp]
	mov	edx, eax
	lea	rcx, -64[rbp]
	lea	r8, -68[rbp]
	call	printProgressReport@PLT
	mov	edx, DWORD PTR -132[rbp]
	imul	eax, DWORD PTR progress[rip], 1000000
.L40:
	add	edx, eax
	cmp	r14d, edx
	jge	.L40
	mov	DWORD PTR -132[rbp], edx
	jmp	.L33
.L94:
	mov	edi, r15d
	call	INSTR_TIME_SET_CURRENT@PLT
	mov	edi, r15d
	call	INSTR_TIME_GET_MICROSEC@PLT
	mov	r15d, eax
	jmp	.L28
.L7:
	lea	rdx, .LC2[rip]
	mov	rdi, rsp
	xor	eax, eax
	call	snprintf@PLT
	jmp	.L8
.L30:
	mov	edi, r14d
	call	pg_usleep@PLT
	jmp	.L32
.L100:
	mov	r15, rbx
	mov	rbx, r13
	mov	rdi, QWORD PTR 16[r15]
.L82:
	call	PQerrorMessage@PLT
	mov	edi, DWORD PTR stderr[rip]
	lea	rsi, .LC5[rip]
	mov	rdx, rax
	xor	eax, eax
	call	fprintf@PLT
	jmp	.L10
.L95:
	mov	rbx, QWORD PTR -120[rbp]
	mov	rdi, QWORD PTR 16[r13]
	mov	r12d, r14d
	jmp	.L82
.L85:
	mov	rdi, QWORD PTR errno[rip]
	call	strerror@PLT
	mov	edi, DWORD PTR stderr[rip]
	mov	rdx, r15
	lea	rsi, .LC4[rip]
	mov	rcx, rax
	xor	eax, eax
	call	fprintf@PLT
	mov	rsp, r13
	jmp	.L10
.L12:
	mov	edi, DWORD PTR 24[rbx]
	call	INSTR_TIME_SET_CURRENT@PLT
	mov	esi, DWORD PTR 28[rbx]
	mov	edi, DWORD PTR 24[rbx]
	call	INSTR_TIME_SUBTRACT@PLT
	jmp	.L10
.L89:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	threadRun, .-threadRun
	.comm	use_log,8,8
	.comm	stderr,4,4
	.comm	progress,8,8
	.comm	main_pid,4,4
	.comm	logfile_prefix,8,8
	.comm	is_connect,4,4
	.comm	errno,8,8
	.comm	agg_interval,8,8
	.comm	SOCKET_WAIT_METHOD,8,8
	.comm	PG_INT64_MAX,4,4
	.comm	MAXPGPATH,4,4
	.comm	EINTR,8,8
	.comm	CSTATE_WAIT_RESULT,8,8
	.comm	CSTATE_THROTTLE,8,8
	.comm	CSTATE_SLEEP,8,8
	.comm	CSTATE_FINISHED,8,8
	.comm	CSTATE_CHOOSE_SCRIPT,8,8
	.comm	CSTATE_ABORTED,8,8
	.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_pgbench.c_threadRun.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"pgbench_log\000"
	.align	2
.LC1:
	.ascii	"%s.%d\000"
	.align	2
.LC2:
	.ascii	"%s.%d.%d\000"
	.align	2
.LC3:
	.ascii	"w\000"
	.align	2
.LC4:
	.ascii	"could not open logfile \"%s\": %s\012\000"
	.align	2
.LC5:
	.ascii	"invalid socket: %s\000"
	.align	2
.LC6:
	.ascii	"%s() failed: %s\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	threadRun, %function
threadRun:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #60
	mov	r6, r0
	ldr	r3, .L105
	str	r0, [fp, #-56]
	ldr	r7, [r0]
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	ldr	r3, [r6, #24]
	mov	r0, r7
	str	r3, [fp, #-76]
	bl	alloc_socket_set
	mov	r3, r0
	ldr	r0, [r6, #16]
	str	r3, [fp, #-68]
	bl	INSTR_TIME_GET_MICROSEC
	mov	r3, r0
	mov	r5, #0
	str	r3, [fp, #-52]
	ldr	r3, .L105+4
	str	r0, [fp, #-80]
	mov	r0, r5
	ldr	r4, [r3]
	bl	INSTR_TIME_SET_CURRENT
	mov	r0, r5
	bl	INSTR_TIME_GET_MICROSEC
	mov	r3, r0
	ldr	r0, [r6, #12]
	str	r3, [r6, #20]
	bl	INSTR_TIME_SET_ZERO
	mov	r0, #0
	bl	time
	mov	r1, r0
	sub	r0, fp, #44
	bl	initStats
	ldr	r3, .L105+8
	ldr	r2, [fp, #-44]
	ldr	r3, [r3]
	str	r2, [fp, #-48]
	cmp	r3, #0
	beq	.L2
	ldr	r2, .L105+12
	ldr	r3, .L105+16
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r0, [r6, #4]
	ldr	ip, .L105+20
	add	r2, r1, #7
	bic	r2, r2, #7
	cmp	r3, #0
	ldr	lr, .L105+24
	mov	r6, sp
	moveq	r3, ip
	sub	sp, sp, r2
	cmp	r0, #0
	ldr	r2, [lr]
	add	r5, sp, #8
	beq	.L87
	str	r0, [sp, #4]
	str	r2, [sp]
	mov	r0, r5
	ldr	r2, .L105+28
	bl	snprintf
.L5:
	mov	r0, r5
	ldr	r1, .L105+32
	bl	fopen
	ldr	r3, [fp, #-56]
	cmp	r0, #0
	str	r0, [r3, #8]
	beq	.L88
	mov	sp, r6
.L2:
	ldr	r3, .L105+36
	ldr	r6, [r3]
	cmp	r6, #0
	bne	.L8
	cmp	r7, #0
	ble	.L9
	ldr	r3, [fp, #-76]
	add	r5, r3, #12
	b	.L11
.L90:
	add	r6, r6, #1
	cmp	r7, r6
	beq	.L89
.L11:
	bl	doConnect
	cmp	r0, #0
	str	r0, [r5, r6, lsl #4]
	bne	.L90
.L7:
	mov	r5, #0
	mov	r0, r5
	bl	INSTR_TIME_SET_CURRENT
	ldr	r6, [fp, #-76]
	mov	r1, r7
	mov	r0, r6
	bl	disconnect_all
	mov	r0, r5
	bl	INSTR_TIME_SET_CURRENT
	ldr	r4, [fp, #-56]
	mov	r2, r5
	mov	r1, r5
	ldr	r0, [r4, #12]
	bl	INSTR_TIME_ACCUM_DIFF
	ldr	r0, [r4, #8]
	cmp	r0, r5
	beq	.L39
	ldr	r3, .L105+40
	ldr	r3, [r3]
	cmp	r3, r5
	bgt	.L91
.L40:
	bl	fclose
	mov	r3, #0
	ldr	r2, [fp, #-56]
	str	r3, [r2, #8]
.L39:
	ldr	r0, [fp, #-68]
	bl	free_socket_set
	ldr	r3, .L105
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L92
	mov	r0, #0
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L91:
	mov	r3, r5
	mov	r1, r6
	mov	r0, r4
	sub	r2, fp, #44
	str	r5, [sp, #4]
	str	r5, [sp]
	bl	doLog
	ldr	r0, [r4, #8]
	b	.L40
.L87:
	str	r2, [sp]
	mov	r0, r5
	ldr	r2, .L105+44
	bl	snprintf
	b	.L5
.L8:
	ldr	r5, [fp, #-56]
	ldr	r0, [r5, #12]
	bl	INSTR_TIME_SET_CURRENT
	ldr	r1, [r5, #16]
	ldr	r0, [r5, #12]
	bl	INSTR_TIME_SUBTRACT
	cmp	r7, #0
	ble	.L7
.L44:
	mov	r3, #0
	ldr	r2, .L105+48
	ldr	r1, [fp, #-76]
	ldr	r2, [r2]
.L13:
	str	r2, [r1, r3, lsl #4]
	add	r3, r3, #1
	cmp	r7, r3
	bgt	.L13
	rsb	r3, r4, r4, lsl #5
	rsb	r3, r3, r3, lsl #6
	add	r4, r4, r3, lsl #3
	ldr	r3, [fp, #-80]
	ldr	r8, .L105+52
	add	r3, r3, r4, lsl #6
	ldr	r9, .L105+56
	ldr	r10, .L105+60
	str	r7, [fp, #-64]
	str	r3, [fp, #-84]
.L38:
	mov	r6, #0
	ldr	r0, [fp, #-68]
	str	r6, [fp, #-72]
	ldr	r4, [fp, #-76]
	bl	clear_socket_set
	mov	r2, r7
	ldr	r3, .L105+64
	mov	r5, r6
	ldr	r3, [r3]
	mov	r7, r6
	mov	r6, r3
	mov	r3, r2
	b	.L22
.L96:
	ldr	r1, .L105+68
	ldr	r1, [r1]
	cmp	r2, r1
	beq	.L93
	ldr	r1, [r9]
	cmp	r2, r1
	beq	.L94
	ldr	r1, .L105+72
	ldr	r1, [r1]
	cmp	r2, r1
	beq	.L18
	ldr	r1, [r10]
	cmp	r2, r1
	bne	.L82
.L18:
	add	r5, r5, #1
	cmp	r3, r5
	add	r4, r4, #16
	ble	.L95
.L22:
	ldr	r2, [r4]
	ldr	r1, [r8]
	cmp	r2, r1
	bne	.L96
	cmp	r7, #0
	beq	.L41
.L84:
	ldr	r2, [r4, #4]
.L17:
	sub	r2, r2, r7
	cmp	r6, r2
	add	r5, r5, #1
	movge	r6, r2
	cmp	r3, r5
	add	r4, r4, #16
	bgt	.L22
.L95:
	mov	r2, r3
	mov	r3, r6
	mov	r6, r7
	mov	r7, r2
	ldr	r2, .L105+4
	ldr	r2, [r2]
	cmp	r2, #0
	beq	.L23
	cmp	r3, #0
	ble	.L21
	ldr	r2, [fp, #-56]
	ldr	r2, [r2, #4]
	cmp	r2, #0
	bne	.L24
	cmp	r6, #0
	beq	.L97
.L25:
	ldr	r2, [fp, #-84]
	cmp	r6, r2
	bge	.L21
	sub	r6, r2, r6
	cmp	r3, r6
	movge	r3, r6
.L24:
	ldr	r2, .L105+64
	ldr	r2, [r2]
	cmp	r2, r3
	beq	.L26
.L104:
	ldr	r2, [fp, #-72]
	cmp	r2, #0
	beq	.L27
	mov	r1, r3
	ldr	r0, [fp, #-68]
	bl	wait_on_socket_set
.L28:
	cmp	r0, #0
	bge	.L29
	ldr	r2, .L105+76
	ldr	r3, .L105+80
	ldr	r0, [r2]
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L30
	ldr	r2, .L105+84
	ldr	r3, .L105+88
	ldr	r4, [r2]
	ldr	r5, [r3]
	bl	strerror
	mov	r2, r5
	mov	r3, r0
	ldr	r1, .L105+92
	mov	r0, r4
	bl	fprintf
	b	.L7
.L93:
	cmp	r7, #0
	ldrne	r2, [r4, #8]
	bne	.L17
.L41:
	mov	r7, #0
	mov	r0, r7
	str	r3, [fp, #-60]
	bl	INSTR_TIME_SET_CURRENT
	mov	r0, r7
	bl	INSTR_TIME_GET_MICROSEC
	ldr	r2, [r8]
	ldr	r1, [r4]
	mov	r7, r0
	cmp	r1, r2
	ldr	r3, [fp, #-60]
	ldr	r2, [r4, #8]
	bne	.L17
	b	.L84
.L94:
	ldr	r0, [r4, #12]
	str	r3, [fp, #-60]
	bl	PQsocket
	subs	r1, r0, #0
	ldr	r3, [fp, #-60]
	blt	.L98
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-72]
	ldr	r0, [fp, #-68]
	add	ip, r3, #1
	mov	r2, r3
	str	ip, [fp, #-72]
	bl	add_socket_to_set
	ldr	r3, [fp, #-60]
	b	.L18
.L82:
	mov	r7, r3
.L21:
	ldr	r0, [fp, #-68]
	bl	clear_socket_set
.L29:
	mov	r6, #0
	ldr	r3, [fp, #-76]
	mov	r5, r6
	add	r4, r3, #12
	b	.L36
.L101:
	ldr	r2, .L105+72
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L35
.L33:
	add	r5, r5, #1
	cmp	r7, r5
	add	r4, r4, #16
	ble	.L99
.L36:
	ldr	r2, [r4, #-12]
	ldr	r1, [r9]
	sub	r3, r4, #12
	cmp	r2, r1
	beq	.L100
	ldr	r1, [r10]
	cmp	r2, r1
	beq	.L33
	ldr	r1, .L105+72
	ldr	r1, [r1]
	cmp	r2, r1
	beq	.L33
.L34:
	mov	r1, r3
	sub	r2, fp, #44
	ldr	r0, [fp, #-56]
	bl	advanceConnectionState
	ldr	r3, [r4, #-12]
	ldr	r2, [r10]
	cmp	r3, r2
	bne	.L101
.L35:
	ldr	r3, [fp, #-64]
	add	r5, r5, #1
	sub	r3, r3, #1
	cmp	r7, r5
	str	r3, [fp, #-64]
	add	r4, r4, #16
	bgt	.L36
.L99:
	ldr	r3, .L105+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L30
	ldr	r3, [fp, #-56]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L102
.L30:
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bgt	.L38
	b	.L7
.L100:
	ldr	r0, [r4]
	str	r3, [fp, #-60]
	bl	PQsocket
	subs	r1, r0, #0
	ldr	r3, [fp, #-60]
	blt	.L103
	mov	r2, r6
	ldr	r0, [fp, #-68]
	str	r3, [fp, #-60]
	bl	socket_has_input
	cmp	r0, #0
	add	r6, r6, #1
	beq	.L33
	ldr	r3, [fp, #-60]
	b	.L34
.L23:
	cmp	r3, #0
	ble	.L21
	ldr	r2, .L105+64
	ldr	r2, [r2]
	cmp	r2, r3
	bne	.L104
.L26:
	mov	r1, #0
	ldr	r0, [fp, #-68]
	bl	wait_on_socket_set
	b	.L28
.L89:
	ldr	r5, [fp, #-56]
	ldr	r0, [r5, #12]
	bl	INSTR_TIME_SET_CURRENT
	ldr	r1, [r5, #16]
	ldr	r0, [r5, #12]
	bl	INSTR_TIME_SUBTRACT
	b	.L44
.L102:
	mov	r4, #0
	mov	r0, r4
	bl	INSTR_TIME_SET_CURRENT
	mov	r0, r4
	bl	INSTR_TIME_GET_MICROSEC
	ldr	r3, [fp, #-84]
	mov	r4, r0
	cmp	r0, r3
	blt	.L30
	sub	r3, fp, #52
	str	r3, [sp]
	mov	r2, r0
	sub	r3, fp, #48
	ldr	r1, [fp, #-80]
	ldr	r0, [fp, #-56]
	bl	printProgressReport
	ldr	r3, .L105+4
	ldr	r3, [r3]
	rsb	r2, r3, r3, lsl #5
	rsb	r2, r2, r2, lsl #6
	add	r3, r3, r2, lsl #3
	ldr	r2, [fp, #-84]
	lsl	r3, r3, #6
.L37:
	add	r2, r2, r3
	cmp	r4, r2
	bge	.L37
	str	r2, [fp, #-84]
	b	.L30
.L97:
	mov	r4, #0
	mov	r0, r4
	str	r3, [fp, #-60]
	bl	INSTR_TIME_SET_CURRENT
	mov	r0, r4
	bl	INSTR_TIME_GET_MICROSEC
	ldr	r3, [fp, #-60]
	mov	r6, r0
	b	.L25
.L27:
	mov	r0, r3
	bl	pg_usleep
	b	.L29
.L103:
	mov	r2, r3
	ldr	r3, .L105+84
	ldr	r0, [r2, #12]
.L85:
	ldr	r4, [r3]
	bl	PQerrorMessage
	ldr	r1, .L105+96
	mov	r2, r0
	mov	r0, r4
	bl	fprintf
	b	.L7
.L98:
	mov	r7, r3
	ldr	r0, [r4, #12]
	ldr	r3, .L105+84
	b	.L85
.L88:
	ldr	r3, .L105+76
	ldr	r2, .L105+84
	ldr	r0, [r3]
	ldr	r4, [r2]
	bl	strerror
	mov	r2, r5
	mov	r3, r0
	ldr	r1, .L105+100
	mov	r0, r4
	bl	fprintf
	mov	sp, r6
	b	.L7
.L9:
	ldr	r4, [fp, #-56]
	ldr	r0, [r4, #12]
	bl	INSTR_TIME_SET_CURRENT
	ldr	r1, [r4, #16]
	ldr	r0, [r4, #12]
	bl	INSTR_TIME_SUBTRACT
	b	.L7
.L92:
	bl	__stack_chk_fail
.L106:
	.align	2
.L105:
	.word	.LC7
	.word	progress
	.word	use_log
	.word	MAXPGPATH
	.word	logfile_prefix
	.word	.LC0
	.word	main_pid
	.word	.LC2
	.word	.LC3
	.word	is_connect
	.word	agg_interval
	.word	.LC1
	.word	CSTATE_CHOOSE_SCRIPT
	.word	CSTATE_SLEEP
	.word	CSTATE_WAIT_RESULT
	.word	CSTATE_FINISHED
	.word	PG_INT64_MAX
	.word	CSTATE_THROTTLE
	.word	CSTATE_ABORTED
	.word	errno
	.word	EINTR
	.word	stderr
	.word	SOCKET_WAIT_METHOD
	.word	.LC6
	.word	.LC5
	.word	.LC4
	.size	threadRun, .-threadRun
	.comm	use_log,4,4
	.comm	stderr,4,4
	.comm	progress,4,4
	.comm	main_pid,4,4
	.comm	logfile_prefix,4,4
	.comm	is_connect,4,4
	.comm	errno,4,4
	.comm	agg_interval,4,4
	.comm	SOCKET_WAIT_METHOD,4,4
	.comm	PG_INT64_MAX,4,4
	.comm	MAXPGPATH,4,4
	.comm	EINTR,4,4
	.comm	CSTATE_WAIT_RESULT,4,4
	.comm	CSTATE_THROTTLE,4,4
	.comm	CSTATE_SLEEP,4,4
	.comm	CSTATE_FINISHED,4,4
	.comm	CSTATE_CHOOSE_SCRIPT,4,4
	.comm	CSTATE_ABORTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
