	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function build_client_first_message
_build_client_first_message:            ## @build_client_first_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
	subq	$24, %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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	24(%rdi), %r12
	movq	_SCRAM_RAW_NONCE_LEN@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	leal	1(%rbx), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_pg_strong_random
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%r12, %rbx
	movl	(%r14), %edi
	callq	_pg_b64_enc_len
	movl	%eax, %r12d
	leal	1(%r12), %edi
	callq	_malloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movl	(%r14), %esi
	movq	%r13, %rdi
	movq	%rax, %rdx
	movl	%r12d, %ecx
	callq	_pg_b64_encode
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	(%r15), %rcx
	movl	%eax, %eax
	movb	$0, (%rcx,%rax)
	leaq	-64(%rbp), %rdi
	callq	_initPQExpBuffer
	movl	16(%r15), %edi
	movq	_SCRAM_SHA_256_PLUS_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_strcmp
	testq	%rax, %rax
	movq	%rbx, %r14
	je	LBB0_8
## %bb.9:
	leaq	-64(%rbp), %rdi
	movl	$110, %esi
	callq	_appendPQExpBufferChar
	jmp	LBB0_10
LBB0_1:
	addq	$8, %r12
	leaq	L_.str(%rip), %rdi
	callq	_libpq_gettext
	movq	%r12, %rdi
	jmp	LBB0_16
LBB0_3:
	addq	$8, %rbx
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_4
LBB0_6:
	addq	$8, %rbx
	leaq	L_.str.2(%rip), %rdi
LBB0_4:
	callq	_libpq_gettext
	movq	%rbx, %rdi
	jmp	LBB0_16
LBB0_8:
	movq	16(%r14), %rdi
	callq	_Assert
	leaq	L_.str.3(%rip), %rsi
	leaq	-64(%rbp), %rdi
	callq	_appendPQExpBufferStr
LBB0_10:
	movl	-64(%rbp), %edi
	movq	-56(%rbp), %rsi
	callq	_PQExpBufferDataBroken
	testq	%rax, %rax
	jne	LBB0_15
## %bb.11:
	movslq	-64(%rbp), %rbx
	movq	(%r15), %rdx
	leaq	L_.str.4(%rip), %rsi
	leaq	-64(%rbp), %rdi
	callq	_appendPQExpBuffer
	movl	-64(%rbp), %edi
	movq	-56(%rbp), %rsi
	callq	_PQExpBufferDataBroken
	testq	%rax, %rax
	je	LBB0_12
LBB0_15:
	leaq	-64(%rbp), %rdi
	callq	_termPQExpBuffer
	addq	$8, %r14
	leaq	L_.str.1(%rip), %rdi
	callq	_libpq_gettext
	movq	%r14, %rdi
LBB0_16:
	movl	%eax, %esi
	callq	_printfPQExpBuffer
	xorl	%ebx, %ebx
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.18:
	movq	%rbx, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	-56(%rbp), %rax
	leaq	(%rbx,%rax), %rdi
	addq	$2, %rdi
	callq	_strdup
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	movq	-56(%rbp), %rdi
	callq	_strdup
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	%rax, %rbx
	leaq	-64(%rbp), %rdi
	callq	_termPQExpBuffer
	jmp	LBB0_17
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SCRAM_RAW_NONCE_LEN,4,2        ## @SCRAM_RAW_NONCE_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not generate nonce\n"

L_.str.1:                               ## @.str.1
	.asciz	"out of memory\n"

L_.str.2:                               ## @.str.2
	.asciz	"could not encode nonce\n"

	.comm	_SCRAM_SHA_256_PLUS_NAME,4,2    ## @SCRAM_SHA_256_PLUS_NAME
L_.str.3:                               ## @.str.3
	.asciz	"p=tls-server-end-point"

L_.str.4:                               ## @.str.4
	.asciz	",,n=,r=%s"

	.no_dead_strip	_build_client_first_message
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function build_client_first_message
_build_client_first_message:            ; @build_client_first_message
	.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
	sub	sp, sp, #32
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x22, [x0, #24]
Lloh3:
	adrp	x23, _SCRAM_RAW_NONCE_LEN@GOTPAGE
Lloh4:
	ldr	x23, [x23, _SCRAM_RAW_NONCE_LEN@GOTPAGEOFF]
	ldr	w1, [x23]
	add	w8, w1, #1
	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
	mov	x0, x20
	bl	_pg_strong_random
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x23]
	bl	_pg_b64_enc_len
	mov	x21, x0
	add	w0, w0, #1
	bl	_malloc
	str	x0, [x19]
	cbz	x0, LBB0_11
; %bb.2:
	mov	x2, x0
	ldr	w1, [x23]
	mov	x0, x20
	mov	x3, x21
	bl	_pg_b64_encode
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	x8, [x19]
	strb	wzr, [x8, w0, uxtw]
	sub	x0, x29, #72
	bl	_initPQExpBuffer
	ldr	w0, [x19, #16]
Lloh7:
	adrp	x8, _SCRAM_SHA_256_PLUS_NAME@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SCRAM_SHA_256_PLUS_NAME@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_strcmp
	cbz	x0, LBB0_7
; %bb.4:
	sub	x0, x29, #72
	mov	w1, #110
	bl	_appendPQExpBufferChar
	b	LBB0_8
LBB0_5:
	add	x19, x22, #8
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_12
LBB0_6:
	add	x19, x22, #8
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_7:
	ldr	x0, [x22, #16]
	bl	_Assert
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	sub	x0, x29, #72
	bl	_appendPQExpBufferStr
LBB0_8:
	ldp	x0, x1, [x29, #-72]
	bl	_PQExpBufferDataBroken
	cbnz	x0, LBB0_10
; %bb.9:
	ldursw	x20, [x29, #-72]
	ldr	x2, [x19]
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	sub	x0, x29, #72
	bl	_appendPQExpBuffer
	ldp	x0, x1, [x29, #-72]
	bl	_PQExpBufferDataBroken
	cbz	x0, LBB0_15
LBB0_10:
	sub	x0, x29, #72
	bl	_termPQExpBuffer
LBB0_11:
	add	x19, x22, #8
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_12:
	bl	_libpq_gettext
	mov	x1, x0
	mov	x0, x19
	bl	_printfPQExpBuffer
	mov	x19, #0
LBB0_13:
	ldur	x8, [x29, #-56]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.14:
	mov	x0, x19
	sub	sp, x29, #48
	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
	ret
LBB0_15:
	ldur	x8, [x29, #-64]
	add	x8, x20, x8
	add	x0, x8, #2
	bl	_strdup
	str	x0, [x19, #8]
	cbz	x0, LBB0_10
; %bb.16:
	ldur	x0, [x29, #-64]
	bl	_strdup
	cbz	x0, LBB0_10
; %bb.17:
	mov	x19, x0
	sub	x0, x29, #72
	bl	_termPQExpBuffer
	b	LBB0_13
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_SCRAM_RAW_NONCE_LEN,4,2        ; @SCRAM_RAW_NONCE_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not generate nonce\n"

l_.str.1:                               ; @.str.1
	.asciz	"out of memory\n"

l_.str.2:                               ; @.str.2
	.asciz	"could not encode nonce\n"

	.comm	_SCRAM_SHA_256_PLUS_NAME,4,2    ; @SCRAM_SHA_256_PLUS_NAME
l_.str.3:                               ; @.str.3
	.asciz	"p=tls-server-end-point"

l_.str.4:                               ; @.str.4
	.asciz	",,n=,r=%s"

	.no_dead_strip	_build_client_first_message
.subsections_via_symbols
