	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pg_fe_scram_build_secret       ## -- Begin function pg_fe_scram_build_secret
	.p2align	4, 0x90
_pg_fe_scram_build_secret:              ## @pg_fe_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	%rsp, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SCRAM_DEFAULT_SALT_LEN@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_pg_saslprep
	movq	%rax, %rbx
	movq	_SASLPREP_OOM@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_2
## %bb.1:
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_2:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	_SASLPREP_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	-56(%rbp), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_pg_strong_random
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	cmpq	%r12, %rbx
	cmoveq	-72(%rbp), %r15                 ## 8-byte Folded Reload
	movl	(%r13), %esi
	movq	_SCRAM_DEFAULT_ITERATIONS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rcx
	callq	_scram_build_secret
	movq	%rax, %rbx
	movq	-56(%rbp), %rdi
	jmp	LBB0_5
LBB0_3:
	movq	-56(%rbp), %rdi
	xorl	%ebx, %ebx
LBB0_5:
	testq	%rdi, %rdi
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_7
## %bb.6:
	callq	_free
LBB0_7:
	movq	%r12, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movq	%rbx, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SCRAM_DEFAULT_SALT_LEN,4,2     ## @SCRAM_DEFAULT_SALT_LEN
	.comm	_SASLPREP_OOM,8,3               ## @SASLPREP_OOM
	.comm	_SASLPREP_SUCCESS,8,3           ## @SASLPREP_SUCCESS
	.comm	_SCRAM_DEFAULT_ITERATIONS,4,2   ## @SCRAM_DEFAULT_ITERATIONS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pg_fe_scram_build_secret       ; -- Begin function pg_fe_scram_build_secret
	.p2align	2
_pg_fe_scram_build_secret:              ; @pg_fe_scram_build_secret
	.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
	sub	sp, sp, #16
	mov	x19, x0
	mov	x22, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x23, _SCRAM_DEFAULT_SALT_LEN@GOTPAGE
Lloh4:
	ldr	x23, [x23, _SCRAM_DEFAULT_SALT_LEN@GOTPAGEOFF]
	ldr	w8, [x23]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	sub	x1, x29, #80
	bl	_pg_saslprep
Lloh7:
	adrp	x8, _SASLPREP_OOM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SASLPREP_OOM@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, #0
	b	LBB0_5
LBB0_2:
	mov	x21, x0
Lloh10:
	adrp	x8, _SASLPREP_SUCCESS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SASLPREP_SUCCESS@GOTPAGEOFF]
Lloh12:
	ldr	x24, [x8]
	ldur	x25, [x29, #-80]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_pg_strong_random
	cbz	w0, LBB0_7
; %bb.3:
	cmp	x21, x24
	csel	x3, x25, x19, eq
	ldr	w1, [x23]
Lloh13:
	adrp	x8, _SCRAM_DEFAULT_ITERATIONS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SCRAM_DEFAULT_ITERATIONS@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_scram_build_secret
	mov	x19, x0
	ldur	x8, [x29, #-80]
	cbz	x8, LBB0_5
LBB0_4:
	mov	x0, x8
	bl	_free
	mov	x0, x19
LBB0_5:
	mov	sp, x22
	ldur	x8, [x29, #-72]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.6:
	sub	sp, x29, #64
	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_7:
	mov	x19, #0
	mov	x0, #0
	ldur	x8, [x29, #-80]
	cbnz	x8, LBB0_4
	b	LBB0_5
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_SCRAM_DEFAULT_SALT_LEN,4,2     ; @SCRAM_DEFAULT_SALT_LEN
	.comm	_SASLPREP_OOM,8,3               ; @SASLPREP_OOM
	.comm	_SASLPREP_SUCCESS,8,3           ; @SASLPREP_SUCCESS
	.comm	_SCRAM_DEFAULT_ITERATIONS,4,2   ; @SCRAM_DEFAULT_ITERATIONS
.subsections_via_symbols
