	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pg_fe_scram_exchange           ## -- Begin function pg_fe_scram_exchange
	.p2align	4, 0x90
_pg_fe_scram_exchange:                  ## @pg_fe_scram_exchange
	.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
	movq	%r8, %r15
	movq	%rcx, %rbx
	movq	%rdi, %r13
	movq	16(%rbp), %rax
	movq	8(%rdi), %rcx
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	movl	$0, (%r9)
	movl	$0, (%rax)
	movq	$0, (%rbx)
	movl	$0, (%r8)
	cmpl	$130, (%rdi)
	jne	LBB0_1
LBB0_11:
	movq	%r13, %rdi
	callq	_build_client_first_message
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.12:
	movq	%rax, %rdi
	callq	_strlen
	movl	%eax, (%r15)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	movl	$129, (%r13)
	jmp	LBB0_21
LBB0_1:
	movl	%edx, %r14d
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	testl	%edx, %edx
	je	LBB0_2
## %bb.5:
	movq	%rsi, %r12
	movq	%rsi, %rdi
	callq	_strlen
	cmpl	%r14d, %eax
	jne	LBB0_6
## %bb.7:
	movl	(%r13), %eax
	cmpl	$128, %eax
	je	LBB0_16
## %bb.8:
	cmpl	$129, %eax
	je	LBB0_13
## %bb.9:
	cmpl	$130, %eax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_3
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
LBB0_3:
	callq	_libpq_gettext
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_printfPQExpBuffer
LBB0_4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	movq	16(%rbp), %rax
	movl	$0, (%rax)
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_read_server_final_message
	testl	%eax, %eax
	je	LBB0_4
## %bb.17:
	movq	%r13, %rdi
	callq	_verify_server_signature
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movq	16(%rbp), %rax
	movl	$1, (%rax)
	jmp	LBB0_20
LBB0_13:
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_read_server_first_message
	testl	%eax, %eax
	je	LBB0_4
## %bb.14:
	movq	%r13, %rdi
	callq	_build_client_final_message
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.15:
	movq	%rax, %rdi
	callq	_strlen
	movl	%eax, (%r15)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	movl	$128, (%r13)
	jmp	LBB0_21
LBB0_19:
	movq	16(%rbp), %rax
	movl	$0, (%rax)
	leaq	L_.str.2(%rip), %rdi
	callq	_libpq_gettext
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_printfPQExpBuffer
LBB0_20:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	movq	_FE_SCRAM_FINISHED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malformed SCRAM message (empty message)\n"

L_.str.1:                               ## @.str.1
	.asciz	"malformed SCRAM message (length mismatch)\n"

L_.str.2:                               ## @.str.2
	.asciz	"incorrect server signature\n"

	.comm	_FE_SCRAM_FINISHED,4,2          ## @FE_SCRAM_FINISHED
L_.str.3:                               ## @.str.3
	.asciz	"invalid SCRAM exchange state\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pg_fe_scram_exchange           ; -- Begin function pg_fe_scram_exchange
	.p2align	2
_pg_fe_scram_exchange:                  ; @pg_fe_scram_exchange
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x6
	mov	x19, x5
	mov	x23, x4
	mov	x24, x3
	mov	x20, x0
	ldr	x22, [x0, #8]
	str	wzr, [x5]
	str	wzr, [x6]
	str	xzr, [x3]
	str	wzr, [x4]
	ldr	w8, [x0]
	cmp	w8, #130
	b.ne	LBB0_4
LBB0_1:
	mov	x0, x20
	bl	_build_client_first_message
	str	x0, [x24]
	cbz	x0, LBB0_13
; %bb.2:
	bl	_strlen
	str	w0, [x23]
	str	wzr, [x19]
	mov	w8, #129
LBB0_3:
	str	w8, [x20]
	b	LBB0_14
LBB0_4:
	mov	x26, x2
	cbz	w2, LBB0_10
; %bb.5:
	mov	x25, x1
	mov	x0, x1
	bl	_strlen
	cmp	w0, w26
	b.ne	LBB0_11
; %bb.6:
	ldr	w8, [x20]
	cmp	w8, #128
	b.eq	LBB0_15
; %bb.7:
	cmp	w8, #129
	b.eq	LBB0_18
; %bb.8:
	cmp	w8, #130
	b.eq	LBB0_1
; %bb.9:
Lloh0:
	adrp	x0, l_.str.3@PAGE
Lloh1:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_10:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_12
LBB0_11:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_12:
	bl	_libpq_gettext
	mov	x1, x0
	mov	x0, x22
	bl	_printfPQExpBuffer
LBB0_13:
	mov	w8, #1
	str	w8, [x19]
	str	wzr, [x21]
LBB0_14:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	x0, x20
	mov	x1, x25
	bl	_read_server_final_message
	cbz	w0, LBB0_13
; %bb.16:
	mov	x0, x20
	bl	_verify_server_signature
	cbz	w0, LBB0_21
; %bb.17:
	mov	w8, #1
	str	w8, [x21]
	b	LBB0_22
LBB0_18:
	mov	x0, x20
	mov	x1, x25
	bl	_read_server_first_message
	cbz	w0, LBB0_13
; %bb.19:
	mov	x0, x20
	bl	_build_client_final_message
	str	x0, [x24]
	cbz	x0, LBB0_13
; %bb.20:
	bl	_strlen
	str	w0, [x23]
	str	wzr, [x19]
	mov	w8, #128
	b	LBB0_3
LBB0_21:
	str	wzr, [x21]
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_libpq_gettext
	mov	x1, x0
	mov	x0, x22
	bl	_printfPQExpBuffer
LBB0_22:
	mov	w8, #1
	str	w8, [x19]
Lloh8:
	adrp	x8, _FE_SCRAM_FINISHED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FE_SCRAM_FINISHED@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malformed SCRAM message (empty message)\n"

l_.str.1:                               ; @.str.1
	.asciz	"malformed SCRAM message (length mismatch)\n"

l_.str.2:                               ; @.str.2
	.asciz	"incorrect server signature\n"

	.comm	_FE_SCRAM_FINISHED,4,2          ; @FE_SCRAM_FINISHED
l_.str.3:                               ; @.str.3
	.asciz	"invalid SCRAM exchange state\n"

.subsections_via_symbols
