	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ParallelSlotsGetIdle           ## -- Begin function ParallelSlotsGetIdle
	.p2align	4, 0x90
_ParallelSlotsGetIdle:                  ## @ParallelSlotsGetIdle
	.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
	movl	%esi, %r15d
	movq	%rdi, %r13
	movl	%esi, %r14d
	testl	%esi, %esi
	jle	LBB0_4
## %bb.1:
	movq	%r14, %rcx
	movq	%r13, %rax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rax)
	jne	LBB0_26
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$8, %rax
	decq	%rcx
	jne	LBB0_2
LBB0_4:
	movl	$-1, %r12d
	leaq	-44(%rbp), %rdi
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##     Child Loop BB0_15 Depth 2
                                        ##       Child Loop BB0_18 Depth 3
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	callq	_FD_ZERO
	movl	$0, %ebx
	testl	%r15d, %r15d
	jle	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=2
	incq	%r15
	cmpq	%r15, %r14
	je	LBB0_10
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	4(%r13,%r15,8), %edi
	callq	_PQsocket
	testl	%eax, %eax
	js	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movl	%eax, %r12d
	movl	%eax, %edi
	leaq	-44(%rbp), %rsi
	callq	_FD_SET
	cmpl	%ebx, %r12d
	cmovgl	%r12d, %ebx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	4(%r13), %edi
	callq	_SetCancelConn
	movl	%ebx, %edi
	leaq	-44(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	callq	_select_loop
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_ResetCancelConn
	cmpl	$0, -56(%rbp)
	jne	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%edi, %edi
	testl	%ebx, %ebx
	setne	%dil
	callq	_Assert
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	testl	%r15d, %r15d
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	jle	LBB0_23
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%ebx, %ebx
LBB0_15:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_18 Depth 3
	movl	4(%r13,%rbx,8), %edi
	callq	_PQsocket
	testl	%eax, %eax
	js	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=2
	movl	%eax, %edi
	leaq	-44(%rbp), %rsi
	callq	_FD_ISSET
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=2
	movl	4(%r13,%rbx,8), %edi
	callq	_PQconsumeInput
	.p2align	4, 0x90
LBB0_18:                                ##   Parent Loop BB0_5 Depth=1
                                        ##     Parent Loop BB0_15 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	4(%r13,%rbx,8), %edi
	callq	_PQisBusy
	testl	%eax, %eax
	jne	LBB0_22
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=3
	movl	4(%r13,%rbx,8), %edi
	callq	_PQgetResult
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_18 Depth=3
	movl	4(%r13,%rbx,8), %edi
	movq	%rax, %rsi
	callq	_processQueryResult
	testl	%eax, %eax
	jne	LBB0_18
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_15 Depth=2
	movl	$1, (%r13,%rbx,8)
	testl	%r12d, %r12d
	cmovsl	%ebx, %r12d
LBB0_22:                                ##   in Loop: Header=BB0_15 Depth=2
	incq	%rbx
	cmpq	%r14, %rbx
	jne	LBB0_15
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_5 Depth=1
	testl	%r12d, %r12d
	leaq	-44(%rbp), %rdi
	js	LBB0_5
## %bb.24:
	movl	%r12d, %ecx
	leaq	(,%rcx,8), %rax
	addq	%r13, %rax
	movl	$0, (%r13,%rcx,8)
	jmp	LBB0_25
LBB0_26:
	movl	$0, (%rax)
	jmp	LBB0_25
LBB0_11:
	movl	4(%r13), %edi
	callq	_consumeQueryResult
LBB0_12:
	xorl	%eax, %eax
LBB0_25:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ParallelSlotsGetIdle           ; -- Begin function ParallelSlotsGetIdle
	.p2align	2
_ParallelSlotsGetIdle:                  ; @ParallelSlotsGetIdle
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x1
	mov	x19, x0
	mov	w23, w1
	cmp	w1, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x8, x23
	mov	x0, x19
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x0]
	cbnz	w9, LBB0_24
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x0, x0, #8
	subs	x8, x8, #1
	b.ne	LBB0_2
LBB0_4:
	add	x25, x19, #4
	mov	w24, #-1
	mov	w26, #1
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;     Child Loop BB0_14 Depth 2
                                        ;       Child Loop BB0_17 Depth 3
	add	x0, sp, #12
	bl	_FD_ZERO
	cmp	w20, #1
	b.lt	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w21, #0
	mov	x27, x23
	mov	x28, x25
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	x28, x28, #8
	subs	x27, x27, #1
	b.eq	LBB0_11
LBB0_8:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x28]
	bl	_PQsocket
	tbnz	w0, #31, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	x22, x0
	add	x1, sp, #12
	bl	_FD_SET
	cmp	w22, w21
	csel	w21, w22, w21, gt
	b	LBB0_7
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w21, #0
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19, #4]
	bl	_SetCancelConn
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x21
	bl	_select_loop
	mov	x21, x0
	bl	_ResetCancelConn
	ldr	w8, [sp, #8]
	cbnz	w8, LBB0_25
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	w21, #0
	cset	w0, ne
	bl	_Assert
	cmp	w20, #1
	b.lt	LBB0_22
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x21, #0
LBB0_14:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_17 Depth 3
	add	x22, x19, x21, lsl #3
	ldr	w0, [x22, #4]!
	bl	_PQsocket
	tbnz	w0, #31, LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x1, sp, #12
	bl	_FD_ISSET
	cbz	x0, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=2
	ldr	w0, [x22]
	bl	_PQconsumeInput
LBB0_17:                                ;   Parent Loop BB0_5 Depth=1
                                        ;     Parent Loop BB0_14 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w0, [x22]
	bl	_PQisBusy
	cbnz	w0, LBB0_21
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=3
	ldr	w0, [x22]
	bl	_PQgetResult
	cbz	x0, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=3
	mov	x1, x0
	ldr	w0, [x22]
	bl	_processQueryResult
	cbnz	w0, LBB0_17
	b	LBB0_26
LBB0_20:                                ;   in Loop: Header=BB0_14 Depth=2
	lsl	x8, x21, #3
	str	w26, [x19, x8]
	cmp	w24, #0
	csel	w24, w21, w24, lt
LBB0_21:                                ;   in Loop: Header=BB0_14 Depth=2
	add	x21, x21, #1
	cmp	x21, x23
	b.ne	LBB0_14
LBB0_22:                                ;   in Loop: Header=BB0_5 Depth=1
	tbnz	w24, #31, LBB0_5
; %bb.23:
	add	x0, x19, w24, uxtw #3
LBB0_24:
	str	wzr, [x0]
	b	LBB0_27
LBB0_25:
	ldr	w0, [x19, #4]
	bl	_consumeQueryResult
LBB0_26:
	mov	x0, #0
LBB0_27:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
