	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_InitializeSessionUserId        ## -- Begin function InitializeSessionUserId
	.p2align	4, 0x90
_InitializeSessionUserId:               ## @InitializeSessionUserId
	.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, %r15
	movq	%rdi, %r12
	xorl	%eax, %eax
	callq	_IsBootstrapProcessingMode
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_AssertState
	movq	_AuthenticatedUserId@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_OidIsValid
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_AssertState
	xorl	%eax, %eax
	callq	_AcceptInvalidationMessages
	testq	%r12, %r12
	je	LBB0_3
## %bb.1:
	movq	_AUTHNAME@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_PointerGetDatum
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_SearchSysCache1
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_HeapTupleIsValid
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	movq	_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	jmp	LBB0_5
LBB0_3:
	movq	_AUTHOID@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_ObjectIdGetDatum
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_SearchSysCache1
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_HeapTupleIsValid
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
LBB0_5:
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_6:
	movl	%r14d, %edi
	callq	_GETSTRUCT
	movq	%rax, %rbx
	movq	(%rax), %r12
	movl	32(%rax), %edi
	callq	_NameStr
	movq	%rax, %r15
	movq	%r12, (%r13)
	movq	24(%rbx), %rsi
	movq	_AuthenticatedUserIsSuperuser@GOTPCREL(%rip), %r13
	movq	%rsi, (%r13)
	movq	%r12, %rdi
	callq	_SetSessionUserId
	movq	_MyProc@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%r12, (%rax)
	movq	_IsUnderPostmaster@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_13
## %bb.7:
	cmpl	$0, 16(%rbx)
	jne	LBB0_9
## %bb.8:
	movq	_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	callq	_errmsg
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%eax, %esi
	callq	_ereport
LBB0_9:
	cmpq	$0, 8(%rbx)
	js	LBB0_13
## %bb.10:
	cmpq	$0, (%r13)
	jne	LBB0_13
## %bb.11:
	movq	%r12, %rdi
	callq	_CountUserBackends
	cmpq	8(%rbx), %rax
	jle	LBB0_13
## %bb.12:
	movq	_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ERRCODE_TOO_MANY_CONNECTIONS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.3(%rip), %rdi
	movq	%r15, %rsi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_13:
	movq	_PGC_BACKEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PGC_S_OVERRIDE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	leaq	L_.str.4(%rip), %rdi
	movq	%r15, %rsi
	callq	_SetConfigOption
	cmpq	$0, (%r13)
	leaq	L_.str.7(%rip), %rax
	leaq	L_.str.6(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	_PGC_INTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%rbx), %ecx
	leaq	L_.str.5(%rip), %rdi
	callq	_SetConfigOption
	movl	%r14d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ReleaseSysCache                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AuthenticatedUserId,8,3        ## @AuthenticatedUserId
	.comm	_AUTHNAME,4,2                   ## @AUTHNAME
	.comm	_FATAL,4,2                      ## @FATAL
	.comm	_ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION,4,2 ## @ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"role \"%s\" does not exist"

	.comm	_AUTHOID,4,2                    ## @AUTHOID
L_.str.1:                               ## @.str.1
	.asciz	"role with OID %u does not exist"

	.comm	_AuthenticatedUserIsSuperuser,8,3 ## @AuthenticatedUserIsSuperuser
	.comm	_MyProc,8,3                     ## @MyProc
	.comm	_IsUnderPostmaster,8,3          ## @IsUnderPostmaster
L_.str.2:                               ## @.str.2
	.asciz	"role \"%s\" is not permitted to log in"

	.comm	_ERRCODE_TOO_MANY_CONNECTIONS,4,2 ## @ERRCODE_TOO_MANY_CONNECTIONS
L_.str.3:                               ## @.str.3
	.asciz	"too many connections for role \"%s\""

L_.str.4:                               ## @.str.4
	.asciz	"session_authorization"

	.comm	_PGC_BACKEND,4,2                ## @PGC_BACKEND
	.comm	_PGC_S_OVERRIDE,4,2             ## @PGC_S_OVERRIDE
L_.str.5:                               ## @.str.5
	.asciz	"is_superuser"

L_.str.6:                               ## @.str.6
	.asciz	"on"

L_.str.7:                               ## @.str.7
	.asciz	"off"

	.comm	_PGC_INTERNAL,4,2               ## @PGC_INTERNAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_InitializeSessionUserId        ; -- Begin function InitializeSessionUserId
	.p2align	2
_InitializeSessionUserId:               ; @InitializeSessionUserId
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x21, x0
	bl	_IsBootstrapProcessingMode
	cmp	w0, #0
	cset	w0, eq
	bl	_AssertState
Lloh0:
	adrp	x23, _AuthenticatedUserId@GOTPAGE
Lloh1:
	ldr	x23, [x23, _AuthenticatedUserId@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_OidIsValid
	cmp	w0, #0
	cset	w0, eq
	bl	_AssertState
	bl	_AcceptInvalidationMessages
	cbz	x21, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _AUTHNAME@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AUTHNAME@GOTPAGEOFF]
Lloh4:
	ldr	w19, [x8]
	mov	x0, x21
	bl	_PointerGetDatum
	mov	x1, x0
	mov	x0, x19
	bl	_SearchSysCache1
	mov	x19, x0
	bl	_HeapTupleIsValid
	cbnz	w0, LBB0_6
; %bb.2:
Lloh5:
	adrp	x8, _FATAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FATAL@GOTPAGEOFF]
Lloh7:
	ldr	w20, [x8]
Lloh8:
	adrp	x8, _ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_errcode
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
	b	LBB0_5
LBB0_3:
Lloh13:
	adrp	x8, _AUTHOID@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AUTHOID@GOTPAGEOFF]
Lloh15:
	ldr	w19, [x8]
	mov	x0, x20
	bl	_ObjectIdGetDatum
	mov	x1, x0
	mov	x0, x19
	bl	_SearchSysCache1
	mov	x19, x0
	bl	_HeapTupleIsValid
	cbnz	w0, LBB0_6
; %bb.4:
Lloh16:
	adrp	x8, _FATAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _FATAL@GOTPAGEOFF]
Lloh18:
	ldr	w21, [x8]
Lloh19:
	adrp	x8, _ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_errcode
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
LBB0_5:
	bl	_ereport
LBB0_6:
	mov	x0, x19
	bl	_GETSTRUCT
	mov	x21, x0
	ldr	x22, [x0]
	ldr	w0, [x0, #32]
	bl	_NameStr
	mov	x20, x0
	str	x22, [x23]
	ldr	x1, [x21, #24]
Lloh24:
	adrp	x24, _AuthenticatedUserIsSuperuser@GOTPAGE
Lloh25:
	ldr	x24, [x24, _AuthenticatedUserIsSuperuser@GOTPAGEOFF]
	str	x1, [x24]
	mov	x0, x22
	bl	_SetSessionUserId
Lloh26:
	adrp	x8, _MyProc@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MyProc@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	str	x22, [x8]
Lloh29:
	adrp	x8, _IsUnderPostmaster@GOTPAGE
Lloh30:
	ldr	x8, [x8, _IsUnderPostmaster@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	cbz	x8, LBB0_13
; %bb.7:
	ldr	w8, [x21, #16]
	cbnz	w8, LBB0_9
; %bb.8:
Lloh32:
	adrp	x8, _FATAL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _FATAL@GOTPAGEOFF]
Lloh34:
	ldr	w23, [x8]
Lloh35:
	adrp	x8, _ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	bl	_errcode
Lloh38:
	adrp	x0, l_.str.2@PAGE
Lloh39:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_errmsg
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
LBB0_9:
	ldr	x8, [x21, #8]
	tbnz	x8, #63, LBB0_13
; %bb.10:
	ldr	x8, [x24]
	cbnz	x8, LBB0_13
; %bb.11:
	mov	x0, x22
	bl	_CountUserBackends
	ldr	x8, [x21, #8]
	cmp	x0, x8
	b.le	LBB0_13
; %bb.12:
Lloh40:
	adrp	x8, _FATAL@GOTPAGE
Lloh41:
	ldr	x8, [x8, _FATAL@GOTPAGEOFF]
Lloh42:
	ldr	w21, [x8]
Lloh43:
	adrp	x8, _ERRCODE_TOO_MANY_CONNECTIONS@GOTPAGE
Lloh44:
	ldr	x8, [x8, _ERRCODE_TOO_MANY_CONNECTIONS@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
	bl	_errcode
Lloh46:
	adrp	x0, l_.str.3@PAGE
Lloh47:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
LBB0_13:
Lloh48:
	adrp	x8, _PGC_BACKEND@GOTPAGE
Lloh49:
	ldr	x8, [x8, _PGC_BACKEND@GOTPAGEOFF]
Lloh50:
	ldr	w2, [x8]
Lloh51:
	adrp	x21, _PGC_S_OVERRIDE@GOTPAGE
Lloh52:
	ldr	x21, [x21, _PGC_S_OVERRIDE@GOTPAGEOFF]
	ldr	w3, [x21]
Lloh53:
	adrp	x0, l_.str.4@PAGE
Lloh54:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x20
	bl	_SetConfigOption
	ldr	x8, [x24]
Lloh55:
	adrp	x9, l_.str.6@PAGE
Lloh56:
	add	x9, x9, l_.str.6@PAGEOFF
Lloh57:
	adrp	x10, l_.str.7@PAGE
Lloh58:
	add	x10, x10, l_.str.7@PAGEOFF
	cmp	x8, #0
	csel	x1, x10, x9, eq
Lloh59:
	adrp	x8, _PGC_INTERNAL@GOTPAGE
Lloh60:
	ldr	x8, [x8, _PGC_INTERNAL@GOTPAGEOFF]
Lloh61:
	ldr	w2, [x8]
	ldr	w3, [x21]
Lloh62:
	adrp	x0, l_.str.5@PAGE
Lloh63:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_SetConfigOption
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ReleaseSysCache
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_AuthenticatedUserId,8,3        ; @AuthenticatedUserId
	.comm	_AUTHNAME,4,2                   ; @AUTHNAME
	.comm	_FATAL,4,2                      ; @FATAL
	.comm	_ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION,4,2 ; @ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"role \"%s\" does not exist"

	.comm	_AUTHOID,4,2                    ; @AUTHOID
l_.str.1:                               ; @.str.1
	.asciz	"role with OID %u does not exist"

	.comm	_AuthenticatedUserIsSuperuser,8,3 ; @AuthenticatedUserIsSuperuser
	.comm	_MyProc,8,3                     ; @MyProc
	.comm	_IsUnderPostmaster,8,3          ; @IsUnderPostmaster
l_.str.2:                               ; @.str.2
	.asciz	"role \"%s\" is not permitted to log in"

	.comm	_ERRCODE_TOO_MANY_CONNECTIONS,4,2 ; @ERRCODE_TOO_MANY_CONNECTIONS
l_.str.3:                               ; @.str.3
	.asciz	"too many connections for role \"%s\""

l_.str.4:                               ; @.str.4
	.asciz	"session_authorization"

	.comm	_PGC_BACKEND,4,2                ; @PGC_BACKEND
	.comm	_PGC_S_OVERRIDE,4,2             ; @PGC_S_OVERRIDE
l_.str.5:                               ; @.str.5
	.asciz	"is_superuser"

l_.str.6:                               ; @.str.6
	.asciz	"on"

l_.str.7:                               ; @.str.7
	.asciz	"off"

	.comm	_PGC_INTERNAL,4,2               ; @PGC_INTERNAL
.subsections_via_symbols
