	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function firebird_stmt_fetch
_firebird_stmt_fetch:                   ## @firebird_stmt_fetch
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	movq	24(%r15), %r12
	cmpl	$0, 8(%rdi)
	je	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	cmpl	$0, (%r15)
	jne	LBB0_12
## %bb.3:
	movq	8(%r15), %rax
	movq	_isc_info_sql_stmt_exec_procedure@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movl	$1, (%rbx)
	movl	$1, (%r15)
	jmp	LBB0_11
LBB0_1:
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%r12)
	xorl	%r14d, %r14d
	jmp	LBB0_12
LBB0_5:
	movq	8(%r12), %rdi
	leaq	20(%r15), %rsi
	movq	_PDO_FB_SQLDA_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	16(%r15), %rcx
	callq	_isc_dsql_fetch
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movq	8(%r12), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.7:
	cmpq	$0, 8(%rax)
	je	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_RECORD_ERROR
LBB0_9:
	movl	$1, (%r15)
	jmp	LBB0_12
LBB0_10:
	incl	(%rbx)
LBB0_11:
	movl	$1, %r14d
LBB0_12:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HY000"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot fetch from a closed cursor"

	.comm	_isc_info_sql_stmt_exec_procedure,8,3 ## @isc_info_sql_stmt_exec_procedure
	.comm	_PDO_FB_SQLDA_VERSION,4,2       ## @PDO_FB_SQLDA_VERSION
	.no_dead_strip	_firebird_stmt_fetch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function firebird_stmt_fetch
_firebird_stmt_fetch:                   ; @firebird_stmt_fetch
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x20, [x0, #16]
	ldr	x21, [x20, #24]
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w8, [x20]
	cbz	w8, LBB0_4
; %bb.2:
	mov	w0, #0
	b	LBB0_12
LBB0_3:
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcpy
	mov	w0, #0
Lloh2:
	adrp	x8, l_.str.1@PAGE
Lloh3:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [x21]
	b	LBB0_12
LBB0_4:
	ldr	x8, [x20, #8]
Lloh4:
	adrp	x9, _isc_info_sql_stmt_exec_procedure@GOTPAGE
Lloh5:
	ldr	x9, [x9, _isc_info_sql_stmt_exec_procedure@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	mov	w0, #1
	str	w0, [x19]
	str	w0, [x20]
	b	LBB0_12
LBB0_6:
	ldr	x0, [x21, #8]
	add	x1, x20, #20
Lloh7:
	adrp	x8, _PDO_FB_SQLDA_VERSION@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PDO_FB_SQLDA_VERSION@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	add	x3, x20, #16
	bl	_isc_dsql_fetch
	cbz	x0, LBB0_11
; %bb.7:
	ldr	x8, [x21, #8]
	ldr	x9, [x8]
	cbz	x9, LBB0_10
; %bb.8:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_RECORD_ERROR
LBB0_10:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_12
LBB0_11:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	mov	w0, #1
LBB0_12:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HY000"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot fetch from a closed cursor"

	.comm	_isc_info_sql_stmt_exec_procedure,8,3 ; @isc_info_sql_stmt_exec_procedure
	.comm	_PDO_FB_SQLDA_VERSION,4,2       ; @PDO_FB_SQLDA_VERSION
	.no_dead_strip	_firebird_stmt_fetch
.subsections_via_symbols
