	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pg_SASL_init
_pg_SASL_init:                          ## @pg_SASL_init
	.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	$40, %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	$0, -56(%rbp)
	leaq	-48(%rbp), %rdi
	callq	_initPQExpBuffer
	movq	(%rbx), %rax
	cmpb	$114, (%rax)
	jne	LBB0_2
## %bb.1:
	cmpq	$0, 48(%rbx)
	je	LBB0_6
LBB0_2:
	cmpl	$0, 36(%rbx)
	je	LBB0_4
## %bb.3:
	addq	$32, %rbx
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_7
LBB0_4:
	leaq	-48(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_pqGets
	testq	%rax, %rax
	je	LBB0_12
LBB0_5:
	addq	$32, %rbx
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	jmp	LBB0_8
LBB0_6:
	addq	$32, %rbx
	leaq	L_.str(%rip), %rdi
LBB0_7:
	callq	_libpq_gettext
	movq	%rbx, %rdi
	movq	%rax, %rsi
LBB0_8:
	callq	_printfPQExpBuffer
LBB0_9:
	leaq	-48(%rbp), %rdi
	callq	_termPQExpBuffer
	movq	-56(%rbp), %rdi
	movq	_STATUS_ERROR@GOTPCREL(%rip), %rbx
	testq	%rdi, %rdi
	je	LBB0_11
LBB0_10:
	callq	_free
LBB0_11:
	movl	(%rbx), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%r14d, %r14d
	movq	_SCRAM_SHA_256_PLUS_NAME@GOTPCREL(%rip), %r12
	leaq	-48(%rbp), %r15
	movq	_SCRAM_SHA_256_NAME@GOTPCREL(%rip), %r13
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_pqGets
	testq	%rax, %rax
	jne	LBB0_5
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rdi
	callq	_PQExpBufferDataBroken
	testq	%rax, %rax
	jne	LBB0_41
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	-48(%rbp), %rdi
	cmpb	$0, (%rdi)
	je	LBB0_22
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	(%r12), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	-48(%rbp), %rdi
	movq	(%r13), %rsi
	callq	_strcmp
	orq	%r14, %rax
	jne	LBB0_13
## %bb.18:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	(%r13), %r14
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_14 Depth=1
	cmpq	$0, 48(%rbx)
	je	LBB0_43
## %bb.20:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	(%rbx), %rax
	cmpb	$114, (%rax)
	jne	LBB0_13
## %bb.21:
	addq	$32, %rbx
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_7
LBB0_22:
	testq	%r14, %r14
	je	LBB0_42
## %bb.23:
	movq	(%rbx), %rax
	cmpb	$114, (%rax)
	jne	LBB0_26
## %bb.24:
	movq	(%r12), %rsi
	movq	%r14, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_26
## %bb.25:
	addq	$32, %rbx
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_7
LBB0_26:
	movl	$1, 8(%rbx)
	movq	16(%rbx), %rax
	movq	40(%rbx), %rcx
	movq	(%rcx,%rax,8), %rsi
	testq	%rsi, %rsi
	jne	LBB0_28
## %bb.27:
	movq	24(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_44
LBB0_28:
	cmpb	$0, (%rsi)
	je	LBB0_44
## %bb.29:
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_pg_fe_scram_init
	movl	%eax, 36(%rbx)
	testl	%eax, %eax
	je	LBB0_41
## %bb.30:
	leaq	-64(%rbp), %rcx
	movq	%rcx, (%rsp)
	leaq	-56(%rbp), %rcx
	leaq	-60(%rbp), %r8
	leaq	-68(%rbp), %r9
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	$-1, %edx
	callq	_pg_fe_scram_exchange
	cmpl	$0, -68(%rbp)
	je	LBB0_32
## %bb.31:
	cmpl	$0, -64(%rbp)
	je	LBB0_9
LBB0_32:
	movl	$112, %edi
	movl	$1, %esi
	movq	%rbx, %rdx
	callq	_pqPutMsgStart
	testq	%rax, %rax
	jne	LBB0_9
## %bb.33:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_pqPuts
	testq	%rax, %rax
	jne	LBB0_9
## %bb.34:
	cmpq	$0, -56(%rbp)
	je	LBB0_37
## %bb.35:
	movl	-60(%rbp), %edi
	movl	$4, %esi
	movq	%rbx, %rdx
	callq	_pqPutInt
	testq	%rax, %rax
	jne	LBB0_9
## %bb.36:
	movq	-56(%rbp), %rdi
	movl	-60(%rbp), %esi
	movq	%rbx, %rdx
	callq	_pqPutnchar
	testq	%rax, %rax
	jne	LBB0_9
LBB0_37:
	movq	%rbx, %rdi
	callq	_pqPutMsgEnd
	testq	%rax, %rax
	jne	LBB0_9
## %bb.38:
	movq	%rbx, %rdi
	callq	_pqFlush
	testq	%rax, %rax
	jne	LBB0_9
## %bb.39:
	leaq	-48(%rbp), %rdi
	callq	_termPQExpBuffer
	movq	-56(%rbp), %rdi
	movq	_STATUS_OK@GOTPCREL(%rip), %rbx
	testq	%rdi, %rdi
	jne	LBB0_10
	jmp	LBB0_11
LBB0_41:
	leaq	-48(%rbp), %rdi
	callq	_termPQExpBuffer
	addq	$32, %rbx
	leaq	L_.str.7(%rip), %rdi
	callq	_libpq_gettext
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_printfPQExpBuffer
	movq	_STATUS_ERROR@GOTPCREL(%rip), %rbx
	jmp	LBB0_11
LBB0_42:
	addq	$32, %rbx
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_7
LBB0_43:
	addq	$32, %rbx
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_7
LBB0_44:
	addq	$32, %rbx
	movq	_PQnoPasswordSupplied@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Channel binding required, but SSL not in use\n"

L_.str.1:                               ## @.str.1
	.asciz	"duplicate SASL authentication request\n"

L_.str.2:                               ## @.str.2
	.asciz	"fe_sendauth: invalid authentication request from server: invalid list of authentication mechanisms\n"

	.comm	_SCRAM_SHA_256_PLUS_NAME,8,3    ## @SCRAM_SHA_256_PLUS_NAME
L_.str.3:                               ## @.str.3
	.asciz	"channel binding is required, but client does not support it\n"

L_.str.4:                               ## @.str.4
	.asciz	"server offered SCRAM-SHA-256-PLUS authentication over a non-SSL connection\n"

	.comm	_SCRAM_SHA_256_NAME,8,3         ## @SCRAM_SHA_256_NAME
L_.str.5:                               ## @.str.5
	.asciz	"none of the server's SASL authentication mechanisms are supported\n"

L_.str.6:                               ## @.str.6
	.asciz	"channel binding is required, but server did not offer an authentication method that supports channel binding\n"

	.comm	_PQnoPasswordSupplied,8,3       ## @PQnoPasswordSupplied
	.comm	_STATUS_OK,4,2                  ## @STATUS_OK
	.comm	_STATUS_ERROR,4,2               ## @STATUS_ERROR
L_.str.7:                               ## @.str.7
	.asciz	"out of memory\n"

	.no_dead_strip	_pg_SASL_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pg_SASL_init
_pg_SASL_init:                          ; @pg_SASL_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	str	xzr, [sp, #24]
	mov	x0, sp
	bl	_initPQExpBuffer
	ldr	x8, [x19]
	ldrb	w8, [x8]
	cmp	w8, #114
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_6
LBB0_2:
	ldr	w8, [x19, #36]
	cbz	w8, LBB0_4
; %bb.3:
	add	x19, x19, #32
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_4:
	mov	x0, sp
	mov	x1, x19
	bl	_pqGets
	cbz	x0, LBB0_13
LBB0_5:
	add	x0, x19, #32
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_6:
	add	x19, x19, #32
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
LBB0_7:
	bl	_libpq_gettext
	mov	x1, x0
	mov	x0, x19
LBB0_8:
	bl	_printfPQExpBuffer
LBB0_9:
	mov	x0, sp
	bl	_termPQExpBuffer
	ldr	x0, [sp, #24]
	cbz	x0, LBB0_11
; %bb.10:
	bl	_free
LBB0_11:
Lloh6:
	adrp	x8, _STATUS_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STATUS_ERROR@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_13:
	mov	x20, #0
Lloh8:
	adrp	x21, _SCRAM_SHA_256_PLUS_NAME@GOTPAGE
Lloh9:
	ldr	x21, [x21, _SCRAM_SHA_256_PLUS_NAME@GOTPAGEOFF]
Lloh10:
	adrp	x22, _SCRAM_SHA_256_NAME@GOTPAGE
Lloh11:
	ldr	x22, [x22, _SCRAM_SHA_256_NAME@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	x0, [sp]
	ldr	x1, [x22]
	bl	_strcmp
	orr	x8, x0, x20
	ldr	x9, [x22]
	cmp	x8, #0
	csel	x20, x20, x9, ne
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, sp
	mov	x1, x19
	bl	_pqGets
	cbnz	x0, LBB0_5
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [sp]
	bl	_PQExpBufferDataBroken
	cbnz	x0, LBB0_42
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	x0, [sp]
	ldrb	w8, [x0]
	cbz	w8, LBB0_22
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	x1, [x21]
	bl	_strcmp
	cbnz	x0, LBB0_14
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_44
; %bb.20:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	x8, [x19]
	ldrb	w8, [x8]
	cmp	w8, #114
	b.ne	LBB0_15
; %bb.21:
	add	x19, x19, #32
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_7
LBB0_22:
	cbz	x20, LBB0_43
; %bb.23:
	ldr	x8, [x19]
	ldrb	w8, [x8]
	cmp	w8, #114
	b.ne	LBB0_26
; %bb.24:
	ldr	x1, [x21]
	mov	x0, x20
	bl	_strcmp
	cbz	x0, LBB0_26
; %bb.25:
	add	x19, x19, #32
Lloh14:
	adrp	x0, l_.str.6@PAGE
Lloh15:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_7
LBB0_26:
	mov	w8, #1
	str	w8, [x19, #8]
	ldr	x8, [x19, #40]
	ldr	x9, [x19, #16]
	ldr	x1, [x8, x9, lsl #3]
	cbnz	x1, LBB0_28
; %bb.27:
	ldr	x1, [x19, #24]
	cbz	x1, LBB0_45
LBB0_28:
	ldrb	w8, [x1]
	cbz	w8, LBB0_45
; %bb.29:
	mov	x0, x19
	mov	x2, x20
	bl	_pg_fe_scram_init
	str	w0, [x19, #36]
	cbz	w0, LBB0_42
; %bb.30:
	add	x3, sp, #24
	add	x4, sp, #20
	add	x5, sp, #16
	add	x6, sp, #12
	mov	x1, #0
	mov	w2, #-1
	bl	_pg_fe_scram_exchange
	ldr	w8, [sp, #16]
	cbz	w8, LBB0_32
; %bb.31:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_9
LBB0_32:
	mov	w0, #112
	mov	w1, #1
	mov	x2, x19
	bl	_pqPutMsgStart
	cbnz	x0, LBB0_9
; %bb.33:
	mov	x0, x20
	mov	x1, x19
	bl	_pqPuts
	cbnz	x0, LBB0_9
; %bb.34:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_37
; %bb.35:
	ldr	w0, [sp, #20]
	mov	w1, #4
	mov	x2, x19
	bl	_pqPutInt
	cbnz	x0, LBB0_9
; %bb.36:
	ldr	x0, [sp, #24]
	ldr	w1, [sp, #20]
	mov	x2, x19
	bl	_pqPutnchar
	cbnz	x0, LBB0_9
LBB0_37:
	mov	x0, x19
	bl	_pqPutMsgEnd
	cbnz	x0, LBB0_9
; %bb.38:
	mov	x0, x19
	bl	_pqFlush
	cbnz	x0, LBB0_9
; %bb.39:
	mov	x0, sp
	bl	_termPQExpBuffer
	ldr	x0, [sp, #24]
	cbz	x0, LBB0_41
; %bb.40:
	bl	_free
LBB0_41:
Lloh16:
	adrp	x8, _STATUS_OK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _STATUS_OK@GOTPAGEOFF]
	b	LBB0_12
LBB0_42:
	mov	x0, sp
	bl	_termPQExpBuffer
	add	x19, x19, #32
Lloh18:
	adrp	x0, l_.str.7@PAGE
Lloh19:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_libpq_gettext
	mov	x1, x0
	mov	x0, x19
	bl	_printfPQExpBuffer
	b	LBB0_11
LBB0_43:
	add	x19, x19, #32
Lloh20:
	adrp	x0, l_.str.5@PAGE
Lloh21:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_7
LBB0_44:
	add	x19, x19, #32
Lloh22:
	adrp	x0, l_.str.4@PAGE
Lloh23:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_7
LBB0_45:
	add	x0, x19, #32
Lloh24:
	adrp	x8, _PQnoPasswordSupplied@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PQnoPasswordSupplied@GOTPAGEOFF]
Lloh26:
	ldr	x1, [x8]
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Channel binding required, but SSL not in use\n"

l_.str.1:                               ; @.str.1
	.asciz	"duplicate SASL authentication request\n"

l_.str.2:                               ; @.str.2
	.asciz	"fe_sendauth: invalid authentication request from server: invalid list of authentication mechanisms\n"

	.comm	_SCRAM_SHA_256_PLUS_NAME,8,3    ; @SCRAM_SHA_256_PLUS_NAME
l_.str.3:                               ; @.str.3
	.asciz	"channel binding is required, but client does not support it\n"

l_.str.4:                               ; @.str.4
	.asciz	"server offered SCRAM-SHA-256-PLUS authentication over a non-SSL connection\n"

	.comm	_SCRAM_SHA_256_NAME,8,3         ; @SCRAM_SHA_256_NAME
l_.str.5:                               ; @.str.5
	.asciz	"none of the server's SASL authentication mechanisms are supported\n"

l_.str.6:                               ; @.str.6
	.asciz	"channel binding is required, but server did not offer an authentication method that supports channel binding\n"

	.comm	_PQnoPasswordSupplied,8,3       ; @PQnoPasswordSupplied
	.comm	_STATUS_OK,4,2                  ; @STATUS_OK
	.comm	_STATUS_ERROR,4,2               ; @STATUS_ERROR
l_.str.7:                               ; @.str.7
	.asciz	"out of memory\n"

	.no_dead_strip	_pg_SASL_init
.subsections_via_symbols
