	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_encrypt_password               ## -- Begin function encrypt_password
	.p2align	4, 0x90
_encrypt_password:                      ## @encrypt_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	%rdx, %rdi
	callq	_get_password_type
	cmpq	$129, %rax
	jne	LBB0_10
## %bb.1:
	cmpq	$128, %rbx
	je	LBB0_6
## %bb.2:
	cmpq	$129, %rbx
	je	LBB0_7
## %bb.3:
	cmpq	$130, %rbx
	jne	LBB0_8
## %bb.4:
	movq	_MD5_PASSWD_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	incl	%edi
	callq	_palloc
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_strlen
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	movq	%r15, %rcx
	callq	_pg_md5_encrypt
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_elog
	jmp	LBB0_9
LBB0_10:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pstrdup                        ## TAILCALL
LBB0_6:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pg_be_scram_build_secret       ## TAILCALL
LBB0_7:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_elog
LBB0_8:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_elog
	xorl	%r15d, %r15d
LBB0_9:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MD5_PASSWD_LEN,4,2             ## @MD5_PASSWD_LEN
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"password encryption failed"

L_.str.1:                               ## @.str.1
	.asciz	"cannot encrypt password with 'plaintext'"

L_.str.2:                               ## @.str.2
	.asciz	"cannot encrypt password to requested type"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_encrypt_password               ; -- Begin function encrypt_password
	.p2align	2
_encrypt_password:                      ; @encrypt_password
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x0, x2
	bl	_get_password_type
	cmp	x0, #129
	b.ne	LBB0_6
; %bb.1:
	cmp	x21, #128
	b.eq	LBB0_7
; %bb.2:
	cmp	x21, #129
	b.eq	LBB0_8
; %bb.3:
	cmp	x21, #130
	b.ne	LBB0_9
; %bb.4:
Lloh0:
	adrp	x8, _MD5_PASSWD_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MD5_PASSWD_LEN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w0, w8, #1
	bl	_palloc
	mov	x21, x0
	mov	x0, x20
	bl	_strlen
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	mov	x3, x21
	bl	_pg_md5_encrypt
	cbnz	w0, LBB0_10
; %bb.5:
Lloh3:
	adrp	x8, _ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
	b	LBB0_10
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_pstrdup
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_pg_be_scram_build_secret
LBB0_8:
Lloh8:
	adrp	x8, _ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
LBB0_9:
Lloh13:
	adrp	x8, _ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_elog
	mov	x21, #0
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MD5_PASSWD_LEN,4,2             ; @MD5_PASSWD_LEN
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"password encryption failed"

l_.str.1:                               ; @.str.1
	.asciz	"cannot encrypt password with 'plaintext'"

l_.str.2:                               ; @.str.2
	.asciz	"cannot encrypt password to requested type"

.subsections_via_symbols
