	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prepare_common
_prepare_common:                        ## @prepare_common
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movl	$72, %edi
	movl	%r14d, %esi
	callq	_ecpg_alloc
	xorl	%r13d, %r13d
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %r12
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r15
	movl	$72, %edi
	movl	%r14d, %esi
	callq	_ecpg_alloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	movl	%r14d, (%rax)
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, 40(%rax)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_ecpg_strdup
	movq	%rbx, %rdi
	addq	$16, %rdi
	movq	%rax, 16(%rbx)
	movq	$0, 56(%rbx)
	movl	$0, 64(%rbx)
	movl	%r14d, %esi
	callq	_replace_variables
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_ecpg_strdup
	movq	%rax, 24(%r12)
	movq	%rbx, 48(%r12)
	movq	16(%rbx), %rdx
	movq	40(%rbx), %rax
	movl	8(%rax), %edi
	xorl	%r13d, %r13d
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_PQprepare
	movq	%rax, %r14
	movq	40(%rbx), %rax
	movl	8(%rax), %edx
	movl	(%rbx), %esi
	movl	32(%rbx), %ecx
	movq	%r14, %rdi
	callq	_ecpg_check_PQresult
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	(%rbx), %esi
	movq	16(%rbx), %rcx
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rdx
	callq	_ecpg_log
	movq	%r14, %rdi
	callq	_PQclear
	movl	$1, 4(%r12)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, 8(%r12)
	jmp	LBB0_8
LBB0_2:
	movq	%r12, %rdi
	callq	_ecpg_free
	jmp	LBB0_9
LBB0_4:
	movq	16(%rbx), %rdi
	callq	_ecpg_free
	movq	24(%r12), %rdi
	callq	_ecpg_free
	movq	%r12, %rdi
	callq	_ecpg_free
	movq	%rbx, %rdi
	callq	_ecpg_free
	jmp	LBB0_9
LBB0_6:
	movq	$0, 8(%r12)
LBB0_8:
	movq	%r12, (%rcx)
	movl	$1, %r13d
LBB0_9:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"prepare_common on line %d: name %s; query: \"%s\"\n"

	.no_dead_strip	_prepare_common
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prepare_common
_prepare_common:                        ; @prepare_common
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x24, x3
	mov	x21, x2
	mov	x20, x1
	mov	x23, x0
	mov	w0, #72
	mov	x1, x23
	bl	_ecpg_alloc
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x0
	mov	w0, #72
	mov	x1, x23
	bl	_ecpg_alloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x22, x0
	str	w23, [x0]
	str	x20, [x0, #40]
	mov	x0, x24
	mov	x1, x23
	bl	_ecpg_strdup
	mov	x24, x22
	str	x0, [x24, #16]!
	str	xzr, [x22, #56]
	str	wzr, [x22, #64]
	mov	x0, x24
	mov	x1, x23
	bl	_replace_variables
	mov	x0, x21
	mov	x1, x23
	bl	_ecpg_strdup
	str	x0, [x19, #24]
	str	x22, [x19, #48]
	ldr	x8, [x22, #40]
	ldr	w0, [x8, #8]
	ldr	x2, [x24]
	mov	x1, x21
	mov	w3, #0
	mov	x4, #0
	bl	_PQprepare
	mov	x23, x0
	ldr	w1, [x22]
	ldr	x8, [x22, #40]
	ldr	w2, [x8, #8]
	ldr	w3, [x22, #32]
	bl	_ecpg_check_PQresult
	cbz	w0, LBB0_6
; %bb.3:
	ldr	w1, [x22]
	ldr	x3, [x22, #16]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x21
	bl	_ecpg_log
	mov	x0, x23
	bl	_PQclear
	mov	w8, #1
	str	w8, [x19, #4]
	ldr	x8, [x20]
	cbz	x8, LBB0_8
; %bb.4:
	str	x8, [x19, #8]
	b	LBB0_9
LBB0_5:
	mov	x0, x19
	b	LBB0_7
LBB0_6:
	ldr	x0, [x22, #16]
	bl	_ecpg_free
	ldr	x0, [x19, #24]
	bl	_ecpg_free
	mov	x0, x19
	bl	_ecpg_free
	mov	x0, x22
LBB0_7:
	bl	_ecpg_free
	mov	w0, #0
	b	LBB0_10
LBB0_8:
	str	xzr, [x19, #8]
LBB0_9:
	str	x19, [x20]
	mov	w0, #1
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"prepare_common on line %d: name %s; query: \"%s\"\n"

	.no_dead_strip	_prepare_common
.subsections_via_symbols
