	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_scram_verify_plain_password    ## -- Begin function scram_verify_plain_password
	.p2align	4, 0x90
_scram_verify_plain_password:           ## @scram_verify_plain_password
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	%rsp, -104(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SCRAM_KEY_LEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -88(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %ebx
	shlq	$2, %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	leaq	-52(%rbp), %rsi
	leaq	-72(%rbp), %rdx
	movq	%r12, %rdi
	movq	%r15, %rcx
	movq	%r14, %r8
	callq	_parse_scram_secret
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rdi
	callq	_strlen
	movl	%eax, %edi
	callq	_pg_b64_dec_len
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_palloc
	movq	%rax, %r12
	movq	-72(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%r12, %rdx
	movl	%r15d, %ecx
	callq	_pg_b64_decode
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movl	%eax, %r15d
	leaq	-64(%rbp), %rsi
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_pg_saslprep
	movq	_SASLPREP_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	-64(%rbp), %rbx
LBB0_5:
	movl	-52(%rbp), %ecx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %r8
	callq	_scram_SaltedPassword
	movq	%rbx, %rdi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_scram_ServerKey
	movq	-64(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_pfree
LBB0_7:
	movq	_SCRAM_KEY_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_memcmp
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	sete	%al
	jmp	LBB0_8
LBB0_1:
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
	xorl	%eax, %eax
LBB0_8:
	movq	-104(%rbp), %rsp                ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_10
## %bb.9:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SCRAM_KEY_LEN,4,2              ## @SCRAM_KEY_LEN
	.comm	_LOG,4,2                        ## @LOG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid SCRAM secret for user \"%s\""

	.comm	_SASLPREP_SUCCESS,8,3           ## @SASLPREP_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_scram_verify_plain_password    ; -- Begin function scram_verify_plain_password
	.p2align	2
_scram_verify_plain_password:           ; @scram_verify_plain_password
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #32
	mov	x8, x2
	mov	x19, x1
	mov	x21, x0
	mov	x27, sp
Lloh0:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	stur	x9, [x29, #-88]
Lloh3:
	adrp	x28, _SCRAM_KEY_LEN@GOTPAGE
Lloh4:
	ldr	x28, [x28, _SCRAM_KEY_LEN@GOTPAGEOFF]
	ldr	w9, [x28]
	lsl	x12, x9, #2
	mov	x9, x12
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x12, #15
	and	x10, x10, #0x7fffffff0
	sub	x20, x9, x10
	mov	sp, x20
	ldr	w9, [x28]
	lsl	x12, x9, #2
	mov	x9, x12
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x12, #15
	and	x13, x10, #0x7fffffff0
	sub	x3, x9, x13
	mov	sp, x3
	mov	x9, x12
Lloh9:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh10:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x22, x9, x13
	mov	sp, x22
	mov	x9, x12
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x23, x9, x13
	mov	sp, x23
	sub	x1, x29, #100
	sub	x2, x29, #96
	mov	x0, x8
	mov	x4, x22
	bl	_parse_scram_secret
	cbz	w0, LBB0_5
; %bb.1:
	ldur	x0, [x29, #-96]
	bl	_strlen
	bl	_pg_b64_dec_len
	mov	x25, x0
	bl	_palloc
	mov	x24, x0
	ldur	x26, [x29, #-96]
	mov	x0, x26
	bl	_strlen
	mov	x1, x0
	mov	x0, x26
	mov	x2, x24
	mov	x3, x25
	bl	_pg_b64_decode
	tbnz	w0, #31, LBB0_5
; %bb.2:
	mov	x25, x0
	sub	x1, x29, #112
	mov	x0, x19
	bl	_pg_saslprep
Lloh13:
	adrp	x8, _SASLPREP_SUCCESS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SASLPREP_SUCCESS@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	ldur	x9, [x29, #-112]
	cmp	x0, x8
	csel	x0, x9, x19, eq
	ldur	w3, [x29, #-100]
	mov	x1, x24
	mov	x2, x25
	mov	x4, x20
	bl	_scram_SaltedPassword
	mov	x0, x20
	mov	x1, x23
	bl	_scram_ServerKey
	ldur	x0, [x29, #-112]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_pfree
LBB0_4:
	ldr	w2, [x28]
	mov	x0, x23
	mov	x1, x22
	bl	_memcmp
	cmp	x0, #0
	cset	w0, eq
	b	LBB0_6
LBB0_5:
Lloh16:
	adrp	x8, _LOG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh18:
	ldr	w19, [x8]
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_errmsg
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
	mov	w0, #0
LBB0_6:
	mov	sp, x27
	ldur	x8, [x29, #-88]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_SCRAM_KEY_LEN,4,2              ; @SCRAM_KEY_LEN
	.comm	_LOG,4,2                        ; @LOG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid SCRAM secret for user \"%s\""

	.comm	_SASLPREP_SUCCESS,8,3           ; @SASLPREP_SUCCESS
.subsections_via_symbols
