	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_server_final_message
_read_server_final_message:             ## @read_server_final_message
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	%rsi, -48(%rbp)
	movq	8(%rdi), %r14
	movq	%rsi, %rdi
	callq	_strdup
	movl	%eax, 4(%r13)
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	cmpb	$101, (%rbx)
	jne	LBB0_5
## %bb.4:
	leaq	-48(%rbp), %rdi
	movl	$101, %esi
	movq	%r14, %rdx
	callq	_read_attr_value
	movq	%rax, %r15
	leaq	L_.str.1(%rip), %rdi
	callq	_libpq_gettext
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_printfPQExpBuffer
	jmp	LBB0_13
LBB0_5:
	leaq	-48(%rbp), %rdi
	movl	$118, %esi
	movq	%r14, %rdx
	callq	_read_attr_value
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r15
	movq	-48(%rbp), %rax
	cmpb	$0, (%rax)
	je	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rdi
	callq	_libpq_gettext
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printfPQExpBuffer
LBB0_9:
	movq	%r15, %rdi
	callq	_strlen
	movl	%eax, %edi
	callq	_pg_b64_dec_len
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.10:
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_strlen
	movq	%r15, %rdi
	movl	%eax, %esi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	callq	_pg_b64_decode
	movq	_SCRAM_KEY_LEN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.12:
	movl	(%r13), %edi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_memcpy
	movq	%r12, %rdi
	callq	_free
	movl	$1, %ebx
	jmp	LBB0_13
LBB0_1:
	leaq	L_.str(%rip), %rdi
LBB0_2:
	callq	_libpq_gettext
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printfPQExpBuffer
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_11:
	movq	%r12, %rdi
	callq	_free
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of memory\n"

L_.str.1:                               ## @.str.1
	.asciz	"error received from server in SCRAM exchange: %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"malformed SCRAM message (garbage at end of server-final-message)\n"

	.comm	_SCRAM_KEY_LEN,4,2              ## @SCRAM_KEY_LEN
L_.str.3:                               ## @.str.3
	.asciz	"malformed SCRAM message (invalid server signature)\n"

	.no_dead_strip	_read_server_final_message
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_server_final_message
_read_server_final_message:             ; @read_server_final_message
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x1
	mov	x20, x0
	str	x1, [sp, #8]
	ldr	x19, [x0, #8]
	mov	x0, x1
	bl	_strdup
	str	w0, [x20, #4]
	cbz	w0, LBB0_9
; %bb.1:
	ldrb	w8, [x21]
	add	x0, sp, #8
	cmp	w8, #101
	b.ne	LBB0_3
; %bb.2:
	mov	w1, #101
	mov	x2, x19
	bl	_read_attr_value
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_libpq_gettext
	mov	x1, x0
	str	x20, [sp]
	b	LBB0_11
LBB0_3:
	mov	w1, #118
	mov	x2, x19
	bl	_read_attr_value
	cbz	x0, LBB0_12
; %bb.4:
	mov	x21, x0
	ldr	x8, [sp, #8]
	ldrb	w8, [x8]
	cbz	w8, LBB0_6
; %bb.5:
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_libpq_gettext
	mov	x1, x0
	mov	x0, x19
	bl	_printfPQExpBuffer
LBB0_6:
	mov	x0, x21
	bl	_strlen
	bl	_pg_b64_dec_len
	mov	x23, x0
	bl	_malloc
	cbz	x0, LBB0_9
; %bb.7:
	mov	x22, x0
	mov	x0, x21
	bl	_strlen
	mov	x1, x0
	mov	x0, x21
	mov	x2, x22
	mov	x3, x23
	bl	_pg_b64_decode
Lloh4:
	adrp	x8, _SCRAM_KEY_LEN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SCRAM_KEY_LEN@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_13
; %bb.8:
	mov	x2, x0
	ldr	w0, [x20]
	mov	x1, x22
	bl	_memcpy
	mov	x0, x22
	bl	_free
	mov	w0, #1
	b	LBB0_12
LBB0_9:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
LBB0_10:
	bl	_libpq_gettext
	mov	x1, x0
LBB0_11:
	mov	x0, x19
	bl	_printfPQExpBuffer
	mov	w0, #0
LBB0_12:
	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
	add	sp, sp, #80
	ret
LBB0_13:
	mov	x0, x22
	bl	_free
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of memory\n"

l_.str.1:                               ; @.str.1
	.asciz	"error received from server in SCRAM exchange: %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"malformed SCRAM message (garbage at end of server-final-message)\n"

	.comm	_SCRAM_KEY_LEN,4,2              ; @SCRAM_KEY_LEN
l_.str.3:                               ; @.str.3
	.asciz	"malformed SCRAM message (invalid server signature)\n"

	.no_dead_strip	_read_server_final_message
.subsections_via_symbols
