	.file	"extr_oid2name.c_sql_conn.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"host"
.LC1:
	.string	"port"
.LC2:
	.string	"user"
.LC3:
	.string	"password"
.LC4:
	.string	"dbname"
.LC5:
	.string	"fallback_application_name"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC6:
	.string	"could not connect to database %s"
	.section	.rodata.str1.1
.LC7:
	.string	"Password: "
	.section	.rodata.str1.8
	.align 8
.LC8:
	.string	"could not connect to database %s: %s"
	.align 8
.LC9:
	.string	"could not clear search_path: %s"
	.text
	.p2align 4
	.globl	sql_conn
	.type	sql_conn, @function
sql_conn:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, 2
	sub	rsp, 248
	.cfi_def_cfa_offset 304
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 232[rsp], rax
	xor	eax, eax
	lea	r15, 64[rsp]
	lea	rax, .LC0[rip]
	mov	r14, rsp
	mov	QWORD PTR [rsp], rax
	mov	rax, QWORD PTR [rdi]
	lea	r13, 128[rsp]
	mov	QWORD PTR 64[rsp], rax
	lea	rax, .LC1[rip]
	mov	QWORD PTR 8[rsp], rax
	mov	rax, QWORD PTR 8[rdi]
	mov	QWORD PTR 72[rsp], rax
	lea	rax, .LC2[rip]
	mov	QWORD PTR 16[rsp], rax
	mov	rax, QWORD PTR 16[rdi]
	mov	QWORD PTR 80[rsp], rax
	lea	rax, .LC3[rip]
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
.L7:
	mov	QWORD PTR 88[rsp], rax
	mov	edx, 1
	mov	rsi, r15
	mov	rdi, r14
	mov	QWORD PTR 48[rsp], 0
	lea	rax, .LC4[rip]
	mov	QWORD PTR 32[rsp], rax
	mov	rax, QWORD PTR 24[rbp]
	mov	QWORD PTR 112[rsp], 0
	mov	QWORD PTR 96[rsp], rax
	lea	rax, .LC5[rip]
	mov	QWORD PTR 40[rsp], rax
	mov	rax, QWORD PTR 32[rbp]
	mov	QWORD PTR 104[rsp], rax
	call	PQconnectdbParams@PLT
	mov	r12, rax
	test	rax, rax
	je	.L18
.L2:
	mov	rdi, r12
	call	PQstatus@PLT
	cmp	rax, QWORD PTR CONNECTION_BAD[rip]
	jne	.L6
	mov	rdi, r12
	call	PQconnectionNeedsPassword@PLT
	test	rax, rax
	je	.L6
	cmp	ebx, 1
	je	.L6
	mov	rdi, r12
	mov	ebx, 1
	call	PQfinish@PLT
	xor	ecx, ecx
	mov	edx, 100
	mov	rsi, r13
	lea	rdi, .LC7[rip]
	call	simple_prompt@PLT
	lea	rax, .LC0[rip]
	mov	QWORD PTR [rsp], rax
	mov	rax, QWORD PTR 0[rbp]
	mov	QWORD PTR 64[rsp], rax
	lea	rax, .LC1[rip]
	mov	QWORD PTR 8[rsp], rax
	mov	rax, QWORD PTR 8[rbp]
	mov	QWORD PTR 72[rsp], rax
	lea	rax, .LC2[rip]
	mov	QWORD PTR 16[rsp], rax
	mov	rax, QWORD PTR 16[rbp]
	mov	QWORD PTR 80[rsp], rax
	lea	rax, .LC3[rip]
	mov	QWORD PTR 24[rsp], rax
	mov	rax, r13
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, r12
	call	PQstatus@PLT
	cmp	rax, QWORD PTR CONNECTION_BAD[rip]
	je	.L19
.L5:
	mov	esi, DWORD PTR ALWAYS_SECURE_SEARCH_PATH_SQL[rip]
	mov	rdi, r12
	call	PQexec@PLT
	mov	rdi, rax
	mov	rbp, rax
	call	PQresultStatus@PLT
	cmp	rax, QWORD PTR PGRES_TUPLES_OK[rip]
	je	.L8
	mov	rdi, r12
	call	PQerrorMessage@PLT
	lea	rdi, .LC9[rip]
	mov	rsi, rax
	xor	eax, eax
	call	pg_log_error@PLT
	mov	rdi, rbp
	call	PQclear@PLT
	mov	rdi, r12
	call	PQfinish@PLT
	mov	edi, -1
	call	exit@PLT
.L8:
	mov	rdi, rbp
	call	PQclear@PLT
	mov	rax, QWORD PTR 232[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L20
	add	rsp, 248
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	rsi, QWORD PTR 24[rbp]
	lea	rdi, .LC6[rip]
	xor	eax, eax
	call	pg_log_error@PLT
	mov	edi, 1
	call	exit@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, r12
	call	PQerrorMessage@PLT
	mov	rsi, QWORD PTR 24[rbp]
	lea	rdi, .LC8[rip]
	mov	rdx, rax
	xor	eax, eax
	call	pg_log_error@PLT
	mov	rdi, r12
	call	PQfinish@PLT
	mov	edi, 1
	call	exit@PLT
	jmp	.L5
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sql_conn, .-sql_conn
	.comm	PGRES_TUPLES_OK,8,8
	.comm	PARAMS_ARRAY_SIZE,4,4
	.comm	CONNECTION_BAD,8,8
	.comm	ALWAYS_SECURE_SEARCH_PATH_SQL,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_oid2name.c_sql_conn.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"host\000"
	.align	2
.LC1:
	.ascii	"port\000"
	.align	2
.LC2:
	.ascii	"user\000"
	.align	2
.LC3:
	.ascii	"password\000"
	.align	2
.LC4:
	.ascii	"dbname\000"
	.align	2
.LC5:
	.ascii	"fallback_application_name\000"
	.align	2
.LC6:
	.ascii	"could not connect to database %s\000"
	.align	2
.LC7:
	.ascii	"Password: \000"
	.align	2
.LC8:
	.ascii	"could not connect to database %s: %s\000"
	.align	2
.LC9:
	.ascii	"could not clear search_path: %s\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sql_conn
	.syntax unified
	.arm
	.fpu softvfp
	.type	sql_conn, %function
sql_conn:
	@ args = 0, pretend = 0, frame = 160
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r3
	mov	r7, #2
	ldr	r2, .L21
	sub	sp, sp, #164
	ldr	r2, [r2]
	str	r2, [sp, #156]
	mov	r2,#0
	mov	r4, r0
	ldm	r0, {r0, r1, r2}
	ldr	fp, .L21+4
	ldr	r10, .L21+8
	ldr	r9, .L21+12
	str	r2, [sp, #36]
	ldr	r2, .L21+16
	ldr	r6, .L21+20
	str	r0, [sp, #28]
	str	r1, [sp, #32]
	str	fp, [sp]
	str	r10, [sp, #4]
	str	r9, [sp, #8]
	str	r2, [sp, #12]
.L7:
	str	r3, [sp, #40]
	ldr	r3, .L21+24
	ldr	r0, [r4, #12]
	ldr	ip, [r4, #16]
	str	r3, [sp, #16]
	ldr	r3, .L21+28
	str	r0, [sp, #44]
	mov	r2, #1
	mov	r0, sp
	add	r1, sp, #28
	str	r3, [sp, #20]
	str	r5, [sp, #24]
	str	r5, [sp, #52]
	str	ip, [sp, #48]
	bl	PQconnectdbParams
	subs	r8, r0, #0
	beq	.L18
.L2:
	mov	r0, r8
	bl	PQstatus
	ldr	r3, [r6]
	cmp	r0, r3
	bne	.L6
	mov	r0, r8
	bl	PQconnectionNeedsPassword
	cmp	r0, #0
	beq	.L6
	cmp	r7, #1
	beq	.L6
	mov	r0, r8
	bl	PQfinish
	mov	r3, #0
	mov	r2, #100
	add	r1, sp, #56
	ldr	r0, .L21+32
	bl	simple_prompt
	ldm	r4, {r0, r1, r2}
	ldr	ip, .L21+16
	mov	r7, #1
	add	r3, sp, #56
	str	fp, [sp]
	str	r10, [sp, #4]
	str	r9, [sp, #8]
	str	ip, [sp, #12]
	str	r0, [sp, #28]
	str	r1, [sp, #32]
	str	r2, [sp, #36]
	b	.L7
.L6:
	mov	r0, r8
	bl	PQstatus
	ldr	r2, [r6]
	cmp	r0, r2
	beq	.L19
.L5:
	ldr	r2, .L21+36
	mov	r0, r8
	ldr	r1, [r2]
	bl	PQexec
	mov	r4, r0
	bl	PQresultStatus
	ldr	r2, .L21+40
	ldr	r2, [r2]
	cmp	r0, r2
	beq	.L8
	mov	r0, r8
	bl	PQerrorMessage
	mov	r1, r0
	ldr	r0, .L21+44
	bl	pg_log_error
	mov	r0, r4
	bl	PQclear
	mov	r0, r8
	bl	PQfinish
	mvn	r0, #0
	bl	exit
.L8:
	mov	r0, r4
	bl	PQclear
	ldr	r3, .L21
	ldr	r2, [r3]
	ldr	r3, [sp, #156]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	mov	r0, r8
	add	sp, sp, #164
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	ldr	r1, [r4, #12]
	ldr	r0, .L21+48
	bl	pg_log_error
	mov	r0, #1
	bl	exit
	b	.L2
.L19:
	mov	r0, r8
	ldr	r4, [r4, #12]
	bl	PQerrorMessage
	mov	r1, r4
	mov	r2, r0
	ldr	r0, .L21+52
	bl	pg_log_error
	mov	r0, r8
	bl	PQfinish
	mov	r0, #1
	bl	exit
	b	.L5
.L20:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	.LC10
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	CONNECTION_BAD
	.word	.LC4
	.word	.LC5
	.word	.LC7
	.word	ALWAYS_SECURE_SEARCH_PATH_SQL
	.word	PGRES_TUPLES_OK
	.word	.LC9
	.word	.LC6
	.word	.LC8
	.size	sql_conn, .-sql_conn
	.comm	PGRES_TUPLES_OK,4,4
	.comm	PARAMS_ARRAY_SIZE,4,4
	.comm	CONNECTION_BAD,4,4
	.comm	ALWAYS_SECURE_SEARCH_PATH_SQL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
