	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_scram_build_secret             ## -- Begin function scram_build_secret
	.p2align	4, 0x90
_scram_build_secret:                    ## @scram_build_secret
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %r13d
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SCRAM_KEY_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	shlq	$2, %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	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, %r15
	testl	%r13d, %r13d
	jg	LBB0_2
## %bb.1:
	movq	_SCRAM_DEFAULT_ITERATIONS@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_2:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	movl	%r13d, -68(%rbp)                ## 4-byte Spill
	movl	%r13d, %ecx
	movq	%r12, %r8
	callq	_scram_SaltedPassword
	movq	%r12, %rdi
	movq	%r14, %r13
	movq	%r14, %rsi
	callq	_scram_ClientKey
	movq	_SCRAM_KEY_LEN@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r13, %rdi
	movq	%r13, %rdx
	callq	_scram_H
	movq	%r12, %rdi
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rsi
	callq	_scram_ServerKey
	movl	%ebx, %edi
	callq	_pg_b64_enc_len
	movl	%eax, %r15d
	movl	(%r14), %edi
	callq	_pg_b64_enc_len
	movl	%eax, %r12d
	movl	(%r14), %edi
	callq	_pg_b64_enc_len
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	movl	%r12d, -72(%rbp)                ## 4-byte Spill
	movl	%r12d, %ecx
	addl	%r15d, %ecx
	movl	%ebx, -76(%rbp)                 ## 4-byte Spill
	addl	%ebx, %ecx
	leal	(%rax,%rcx), %edi
	addl	$15, %edi
	movl	%edi, -80(%rbp)                 ## 4-byte Spill
	callq	_palloc
	movq	%rax, %r12
	leaq	L_.str.1(%rip), %rsi
	movq	%rax, %rdi
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	callq	_sprintf
	movslq	%eax, %rbx
	addq	%r12, %rbx
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movq	%rbx, %rdx
	movl	%r15d, %ecx
	callq	_pg_b64_encode
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_4
## %bb.3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_elog
LBB0_4:
	movslq	%r14d, %rax
	leaq	(%rbx,%rax), %r14
	incq	%r14
	movb	$36, (%rbx,%rax)
	movq	_SCRAM_KEY_LEN@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r13, %rdi
	movq	%r14, %rdx
	movl	-72(%rbp), %ecx                 ## 4-byte Reload
	callq	_pg_b64_encode
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_6
## %bb.5:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_elog
LBB0_6:
	movslq	%ebx, %rax
	leaq	(%r14,%rax), %rbx
	incq	%rbx
	movb	$58, (%r14,%rax)
	movl	(%r15), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rdx
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
	callq	_pg_b64_encode
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_8
## %bb.7:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_elog
LBB0_8:
	movslq	%r14d, %rax
	leaq	(%rbx,%rax), %rcx
	movb	$0, (%rbx,%rax)
	subq	%r12, %rcx
	incq	%rcx
	movslq	-80(%rbp), %rax                 ## 4-byte Folded Reload
	xorl	%edi, %edi
	cmpq	%rax, %rcx
	setle	%dil
	callq	_Assert
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	movq	%r12, %rax
	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	_SCRAM_DEFAULT_ITERATIONS,4,2   ## @SCRAM_DEFAULT_ITERATIONS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SCRAM-SHA-256"

L_.str.1:                               ## @.str.1
	.asciz	"SCRAM-SHA-256$%d:"

	.comm	_ERROR,4,2                      ## @ERROR
L_.str.2:                               ## @.str.2
	.asciz	"could not encode salt"

L_.str.3:                               ## @.str.3
	.asciz	"could not encode stored key"

L_.str.4:                               ## @.str.4
	.asciz	"could not encode server key"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_scram_build_secret             ; -- Begin function scram_build_secret
	.p2align	2
_scram_build_secret:                    ; @scram_build_secret
	.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, #16
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x24, _SCRAM_KEY_LEN@GOTPAGE
Lloh4:
	ldr	x24, [x24, _SCRAM_KEY_LEN@GOTPAGEOFF]
	ldr	w8, [x24]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x7fffffff0
	sub	x23, x9, x12
	mov	sp, x23
	mov	x9, x8
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x20, x9, x12
	mov	sp, x20
	mov	x9, x8
Lloh9:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh10:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x19, x8, x12
	mov	sp, x19
Lloh11:
	adrp	x8, _SCRAM_DEFAULT_ITERATIONS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SCRAM_DEFAULT_ITERATIONS@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w2, #1
	csel	w27, w8, w2, lt
	mov	x0, x3
	mov	x1, x22
	mov	x2, x21
	mov	x3, x27
	mov	x4, x23
	bl	_scram_SaltedPassword
	mov	x0, x23
	mov	x1, x20
	bl	_scram_ClientKey
	ldr	w1, [x24]
	mov	x0, x20
	mov	x2, x20
	bl	_scram_H
	mov	x0, x23
	mov	x1, x19
	bl	_scram_ServerKey
	mov	x0, x21
	bl	_pg_b64_enc_len
	mov	x28, x0
	ldr	w0, [x24]
	bl	_pg_b64_enc_len
	mov	x26, x0
	ldr	w0, [x24]
	bl	_pg_b64_enc_len
	mov	x25, x0
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_strlen
	add	w8, w28, w26
	add	w8, w8, w25
	add	w8, w8, w0
	add	w24, w8, #15
	mov	x0, x24
	bl	_palloc
	mov	x23, x0
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x27
	bl	_sprintf
	add	x27, x23, w0, sxtw
	mov	x0, x22
	mov	x1, x21
	mov	x2, x27
	mov	x3, x28
	bl	_pg_b64_encode
	mov	x21, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
Lloh18:
	adrp	x8, _ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_elog
LBB0_2:
	add	x21, x27, w21, sxtw
	mov	w8, #36
	strb	w8, [x21], #1
Lloh23:
	adrp	x22, _SCRAM_KEY_LEN@GOTPAGE
Lloh24:
	ldr	x22, [x22, _SCRAM_KEY_LEN@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	mov	x2, x21
	mov	x3, x26
	bl	_pg_b64_encode
	mov	x20, x0
	tbz	w0, #31, LBB0_4
; %bb.3:
Lloh25:
	adrp	x8, _ERROR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x1, l_.str.3@PAGE
Lloh29:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_elog
LBB0_4:
	add	x20, x21, w20, sxtw
	mov	w8, #58
	strb	w8, [x20], #1
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	mov	x3, x25
	bl	_pg_b64_encode
	mov	x19, x0
	tbz	w0, #31, LBB0_6
; %bb.5:
Lloh30:
	adrp	x8, _ERROR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
Lloh33:
	adrp	x1, l_.str.4@PAGE
Lloh34:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_elog
LBB0_6:
	add	x8, x20, w19, sxtw
	strb	wzr, [x8]
	sub	x8, x8, x23
	add	x8, x8, #1
	cmp	x8, w24, sxtw
	cset	w0, le
	bl	_Assert
	ldur	x8, [x29, #-88]
Lloh35:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh36:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x23
	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 AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_SCRAM_KEY_LEN,4,2              ; @SCRAM_KEY_LEN
	.comm	_SCRAM_DEFAULT_ITERATIONS,4,2   ; @SCRAM_DEFAULT_ITERATIONS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SCRAM-SHA-256"

l_.str.1:                               ; @.str.1
	.asciz	"SCRAM-SHA-256$%d:"

	.comm	_ERROR,4,2                      ; @ERROR
l_.str.2:                               ; @.str.2
	.asciz	"could not encode salt"

l_.str.3:                               ; @.str.3
	.asciz	"could not encode stored key"

l_.str.4:                               ; @.str.4
	.asciz	"could not encode server key"

.subsections_via_symbols
