	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function firebird_alloc_prepare_stmt
_firebird_alloc_prepare_stmt:           ## @firebird_alloc_prepare_stmt
	.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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpq	$65537, %rdx                    ## imm = 0x10001
	jb	LBB0_2
## %bb.1:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
	jmp	LBB0_28
LBB0_2:
	movq	%r8, %r14
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rcx, -192(%rbp)                ## 8-byte Spill
	movq	%r9, -120(%rbp)                 ## 8-byte Spill
	movq	24(%rbx), %r13
	cmpq	$0, 8(%rbx)
	je	LBB0_6
## %bb.3:
	cmpl	$0, (%rbx)
	jne	LBB0_6
## %bb.4:
	movq	%rbx, %rdi
	callq	_firebird_handle_begin
	testl	%eax, %eax
	je	LBB0_28
## %bb.5:
	movl	$1, (%rbx)
LBB0_6:
	movl	8(%r13), %edi
	leaq	12(%r13), %rsi
	movq	%r14, %rdx
	callq	_isc_dsql_allocate_statement
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_RECORD_ERROR
LBB0_28:
	xorl	%ebx, %ebx
LBB0_29:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_31
## %bb.30:
	movl	%ebx, %eax
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r13, -176(%rbp)                ## 8-byte Spill
	movq	%r14, -184(%rbp)                ## 8-byte Spill
	movq	%rbx, -152(%rbp)                ## 8-byte Spill
	leaq	1(%r15), %rdi
	callq	_emalloc
	movq	%rax, %r13
	leaq	-112(%rbp), %rax
	notq	%rax
	movq	%rax, -160(%rbp)                ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	$-1, %rsi
	leaq	-111(%rbp), %r9
                                        ## implicit-def: $rax
	xorl	%ecx, %ecx
	xorl	%r14d, %r14d
	movq	%r13, -168(%rbp)                ## 8-byte Spill
	movq	-120(%rbp), %r8                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_9:                                 ##   in Loop: Header=BB0_13 Depth=1
	leaq	1(%rax), %rdx
	movb	$0, (%rax)
	testq	%r8, %r8
	je	LBB0_24
## %bb.10:                              ##   in Loop: Header=BB0_13 Depth=1
	leaq	-124(%rbp), %rdi
	movq	%rsi, -144(%rbp)                ## 8-byte Spill
	movq	%rdx, -136(%rbp)                ## 8-byte Spill
	callq	_ZVAL_LONG
	movq	-160(%rbp), %rax                ## 8-byte Reload
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	leal	(%rcx,%rax), %edx
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	leaq	-112(%rbp), %rsi
	leaq	-124(%rbp), %rcx
	callq	_zend_hash_str_update
	leaq	-111(%rbp), %r9
	movq	-144(%rbp), %rsi                ## 8-byte Reload
	movq	-120(%rbp), %r8                 ## 8-byte Reload
	xorl	%ecx, %ecx
	movq	-136(%rbp), %rax                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_13 Depth=1
	movzbl	(%r12,%rbx), %edx
	movb	%dl, (%r13)
	incq	%r13
LBB0_12:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%rbx
	cmpq	%r15, %rbx
	ja	LBB0_25
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	movsbl	(%r12,%rbx), %edx
	xorl	%r14d, %r14d
	cmpl	$39, %edx
	sete	%r14b
	xorl	%edi, %r14d
	testb	%r14b, %r14b
	jne	LBB0_11
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	testb	%cl, %cl
	je	LBB0_20
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	%edx, %ecx
	andb	$-33, %cl
	addb	$-65, %cl
	cmpb	$26, %cl
	jb	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	leal	-48(%rdx), %ecx
	cmpb	$10, %cl
	jb	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpb	$95, %dl
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpb	$45, %dl
	jne	LBB0_9
LBB0_19:                                ##   in Loop: Header=BB0_13 Depth=1
	movb	%dl, (%rax)
	incq	%rax
	movb	$1, %cl
	jmp	LBB0_12
LBB0_20:                                ##   in Loop: Header=BB0_13 Depth=1
	xorl	%ecx, %ecx
	cmpl	$63, %edx
	je	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpl	$58, %edx
	jne	LBB0_11
## %bb.22:                              ##   in Loop: Header=BB0_13 Depth=1
	movb	%dl, -112(%rbp)
	movb	$1, %cl
	movq	%r9, %rax
LBB0_23:                                ##   in Loop: Header=BB0_13 Depth=1
	movb	$63, (%r13)
	incq	%r13
	incq	%rsi
	jmp	LBB0_12
LBB0_24:                                ##   in Loop: Header=BB0_13 Depth=1
	xorl	%ecx, %ecx
	movq	%rdx, %rax
	jmp	LBB0_11
LBB0_25:
	movq	-176(%rbp), %rsi                ## 8-byte Reload
	movl	(%rsi), %r9d
	movl	8(%rsi), %edi
	addq	$4, %rsi
	movq	-192(%rbp), %rax                ## 8-byte Reload
	movq	%rax, (%rsp)
	xorl	%ebx, %ebx
	movq	-184(%rbp), %rdx                ## 8-byte Reload
	xorl	%ecx, %ecx
	movq	-168(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %r8
	callq	_isc_dsql_prepare
	testq	%rax, %rax
	je	LBB0_27
## %bb.26:
	movq	-152(%rbp), %rdi                ## 8-byte Reload
	callq	_RECORD_ERROR
	movq	%r14, %rdi
	callq	_efree
	jmp	LBB0_29
LBB0_27:
	movq	%r14, %rdi
	callq	_efree
	movl	$1, %ebx
	jmp	LBB0_29
LBB0_31:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"01004"

	.no_dead_strip	_firebird_alloc_prepare_stmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function firebird_alloc_prepare_stmt
_firebird_alloc_prepare_stmt:           ; @firebird_alloc_prepare_stmt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	x28, x27, [sp, #128]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	cmp	x2, #16, lsl #12                ; =65536
	b.ls	LBB0_2
; %bb.1:
	ldr	w0, [x19, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcpy
	mov	w0, #0
	b	LBB0_27
LBB0_2:
	mov	x22, x5
	mov	x21, x4
	mov	x20, x3
	mov	x23, x2
	mov	x24, x1
	ldr	x27, [x19, #24]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
; %bb.3:
	ldr	w8, [x19]
	cbnz	w8, LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_firebird_handle_begin
	cbz	w0, LBB0_27
; %bb.5:
	mov	w8, #1
	str	w8, [x19]
LBB0_6:
	ldr	w0, [x27, #8]
	add	x1, x27, #12
	mov	x2, x21
	bl	_isc_dsql_allocate_statement
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_RECORD_ERROR
	mov	w0, #0
	b	LBB0_27
LBB0_8:
	stp	x21, x20, [sp, #24]             ; 16-byte Folded Spill
	str	x22, [sp, #40]                  ; 8-byte Folded Spill
	add	x0, x23, #1
	bl	_emalloc
	mov	x20, x0
	mov	x28, #0
	mov	w8, #0
	mov	w25, #0
	add	x9, sp, #56
	mvn	x10, x9
	stp	x10, x0, [sp, #8]               ; 16-byte Folded Spill
	add	x11, x9, #1
	mov	x26, #-1
	mov	w12, #63
                                        ; implicit-def: $x22
	ldr	x21, [sp, #40]                  ; 8-byte Folded Reload
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_12 Depth=1
	mov	w8, #0
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	ldrb	w9, [x24, x28]
	strb	w9, [x20], #1
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x28, x28, #1
	cmp	x28, x23
	b.hi	LBB0_24
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldrsb	w10, [x24, x28]
	cmp	w10, #39
	cset	w9, eq
	eor	w25, w25, w9
	tst	w25, #0xff
	b.ne	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	and	w9, w10, #0xff
	cbz	w8, LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	and	w8, w9, #0xffffffdf
	sub	w8, w8, #65
	and	w8, w8, #0xff
	sub	w10, w9, #48
	cmp	w8, #26
	and	w8, w10, #0xff
	ccmp	w8, #10, #0, hs
	b.lo	LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	cmp	w9, #95
	b.eq	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
	cmp	w9, #45
	b.ne	LBB0_22
LBB0_17:                                ;   in Loop: Header=BB0_12 Depth=1
	strb	w9, [x22], #1
	mov	w8, #1
	b	LBB0_11
LBB0_18:                                ;   in Loop: Header=BB0_12 Depth=1
	cmp	w10, #63
	b.eq	LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_12 Depth=1
	cmp	w10, #58
	b.ne	LBB0_10
; %bb.20:                               ;   in Loop: Header=BB0_12 Depth=1
	strb	w9, [sp, #56]
	mov	w8, #1
	mov	x22, x11
LBB0_21:                                ;   in Loop: Header=BB0_12 Depth=1
	strb	w12, [x20], #1
	add	x26, x26, #1
	b	LBB0_11
LBB0_22:                                ;   in Loop: Header=BB0_12 Depth=1
	strb	wzr, [x22], #1
	cbz	x21, LBB0_9
; %bb.23:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x0, sp, #52
	mov	x1, x26
	str	x11, [sp]                       ; 8-byte Folded Spill
	bl	_ZVAL_LONG
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	w2, w22, w8
	add	x1, sp, #56
	add	x3, sp, #52
	mov	x0, x21
	bl	_zend_hash_str_update
	mov	w12, #63
	ldr	x11, [sp]                       ; 8-byte Folded Reload
	b	LBB0_9
LBB0_24:
	ldr	w0, [x27, #8]
	add	x1, x27, #4
	ldr	w5, [x27]
	ldp	x20, x2, [sp, #16]              ; 16-byte Folded Reload
	mov	w3, #0
	mov	x4, x20
	ldr	x6, [sp, #32]                   ; 8-byte Folded Reload
	bl	_isc_dsql_prepare
	cbz	x0, LBB0_26
; %bb.25:
	mov	x0, x19
	bl	_RECORD_ERROR
	mov	x0, x20
	bl	_efree
	mov	w0, #0
	b	LBB0_27
LBB0_26:
	mov	x0, x20
	bl	_efree
	mov	w0, #1
LBB0_27:
	ldur	x8, [x29, #-88]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_29
; %bb.28:
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
LBB0_29:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"01004"

	.no_dead_strip	_firebird_alloc_prepare_stmt
.subsections_via_symbols
