	.file	"extr_saslprep.c_pg_saslprep.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"password too long"
	.text
	.p2align 4
	.globl	pg_saslprep
	.type	pg_saslprep, @function
pg_saslprep:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	QWORD PTR [rsp], rsi
	mov	rcx, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rcx
	xor	ecx, ecx
	mov	QWORD PTR [rsi], 0
	call	strlen@PLT
	cmp	rax, QWORD PTR MAX_PASSWORD_LENGTH[rip]
	jg	.L55
.L2:
	mov	rdi, r13
	call	pg_is_ascii_string@PLT
	mov	rdi, r13
	test	rax, rax
	je	.L3
	call	STRDUP@PLT
	mov	rcx, QWORD PTR [rsp]
	mov	r8d, DWORD PTR SASLPREP_SUCCESS[rip]
	mov	QWORD PTR [rcx], rax
	test	rax, rax
	je	.L5
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L56
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	call	pg_utf8_string_len@PLT
	mov	r8d, DWORD PTR SASLPREP_INVALID_UTF8[rip]
	movsx	r15, eax
	test	r15d, r15d
	js	.L1
	lea	edi, 4[0+r15*4]
	call	ALLOC@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L5
	test	r15d, r15d
	je	.L9
	mov	QWORD PTR 16[rsp], rax
	lea	eax, -1[r15]
	mov	r12, rbp
	lea	r14, 4[rbp+rax*4]
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdi, r13
	add	r12, 4
	call	utf8_to_unicode@PLT
	mov	rdi, r13
	mov	DWORD PTR -4[r12], eax
	call	pg_utf_mblen@PLT
	add	r13, rax
	cmp	r12, r14
	jne	.L10
	mov	DWORD PTR 0[rbp+r15*4], 0
	xor	r12d, r12d
	mov	r15, rbp
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L58:
	add	r13, 4
	mov	DWORD PTR [rdx], 32
	add	r12d, 1
	lea	rdx, 0[rbp+r13]
.L13:
	add	r15, 4
	cmp	r14, r15
	je	.L57
.L14:
	mov	ebx, DWORD PTR [r15]
	mov	esi, DWORD PTR non_ascii_space_ranges[rip]
	mov	edi, ebx
	call	IS_CODE_IN_TABLE@PLT
	movsx	rdx, r12d
	lea	r13, 0[0+rdx*4]
	lea	rdx, 0[rbp+r13]
	test	rax, rax
	jne	.L58
	mov	esi, DWORD PTR commonly_mapped_to_nothing_ranges[rip]
	mov	edi, ebx
	mov	QWORD PTR 8[rsp], rdx
	call	IS_CODE_IN_TABLE@PLT
	mov	rdx, QWORD PTR 8[rsp]
	test	rax, rax
	jne	.L13
	add	r13, 4
	add	r15, 4
	mov	DWORD PTR [rdx], ebx
	add	r12d, 1
	lea	rdx, 0[rbp+r13]
	cmp	r14, r15
	jne	.L14
	.p2align 4,,10
	.p2align 3
.L57:
	mov	DWORD PTR [rdx], 0
	test	r12d, r12d
	je	.L15
	mov	rdi, rbp
	call	unicode_normalize_kc@PLT
	mov	QWORD PTR 8[rsp], rax
	test	rax, rax
	je	.L16
	lea	rcx, 4[rbp]
	lea	eax, -1[r12]
	mov	r12, rbp
	mov	QWORD PTR 24[rsp], rcx
	lea	r14, [rcx+rax*4]
	.p2align 4,,10
	.p2align 3
.L18:
	mov	r15d, DWORD PTR [r12]
	mov	esi, DWORD PTR prohibited_output_ranges[rip]
	mov	edi, r15d
	call	IS_CODE_IN_TABLE@PLT
	test	rax, rax
	jne	.L17
	mov	esi, DWORD PTR unassigned_codepoint_ranges[rip]
	mov	edi, r15d
	call	IS_CODE_IN_TABLE@PLT
	test	rax, rax
	jne	.L17
	add	r12, 4
	cmp	r12, r14
	jne	.L18
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rbx, QWORD PTR 16[rsp]
	mov	esi, DWORD PTR RandALCat_codepoint_ranges[rip]
	mov	edi, DWORD PTR [rbx]
	call	IS_CODE_IN_TABLE@PLT
	test	rax, rax
	jne	.L19
	add	rbx, 4
	mov	QWORD PTR 16[rsp], rbx
	cmp	rbx, r14
	jne	.L20
.L24:
	mov	r14, QWORD PTR 8[rsp]
	xor	r13d, r13d
	lea	r12, 36[rsp]
	mov	edi, DWORD PTR [r14]
	test	edi, edi
	je	.L59
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rsi, r12
	add	r14, 4
	call	unicode_to_utf8@PLT
	mov	rdi, r12
	call	pg_utf_mblen@PLT
	mov	edi, DWORD PTR [r14]
	add	r13d, eax
	test	edi, edi
	jne	.L21
	lea	edi, 1[r13]
.L22:
	call	ALLOC@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L25
	mov	r14, QWORD PTR 8[rsp]
	mov	r12, rax
	mov	edi, DWORD PTR [r14]
	test	edi, edi
	je	.L26
	.p2align 4,,10
	.p2align 3
.L27:
	mov	rsi, r12
	add	r14, 4
	call	unicode_to_utf8@PLT
	mov	rdi, r12
	call	pg_utf_mblen@PLT
	mov	edi, DWORD PTR [r14]
	add	r12, rax
	test	edi, edi
	jne	.L27
.L26:
	movsx	rax, r13d
	xor	edi, edi
	add	rax, rbx
	cmp	r12, rax
	sete	dil
	call	Assert@PLT
	mov	BYTE PTR [r12], 0
	mov	rdi, rbp
	call	FREE@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	FREE@PLT
	mov	rax, QWORD PTR [rsp]
	mov	r8d, DWORD PTR SASLPREP_SUCCESS[rip]
	mov	QWORD PTR [rax], rbx
	jmp	.L1
.L25:
	mov	rdi, rbp
	call	FREE@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	FREE@PLT
.L5:
	mov	r8d, DWORD PTR SASLPREP_OOM[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L55:
	mov	edi, DWORD PTR ERRCODE_PROGRAM_LIMIT_EXCEEDED[rip]
	call	errcode@PLT
	lea	rdi, .LC0[rip]
	call	errmsg@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L9:
	mov	DWORD PTR [rax], 0
.L15:
	mov	rdi, rbp
	call	FREE@PLT
.L28:
	mov	r8d, DWORD PTR SASLPREP_PROHIBITED[rip]
	jmp	.L1
.L19:
	mov	r12d, DWORD PTR 0[rbp]
	mov	r15d, DWORD PTR -4[rbp+r13]
	mov	r13, QWORD PTR 24[rsp]
	mov	edi, r12d
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L23:
	mov	edi, DWORD PTR 0[r13]
	add	r13, 4
.L29:
	mov	esi, DWORD PTR LCat_codepoint_ranges[rip]
	call	IS_CODE_IN_TABLE@PLT
	test	rax, rax
	jne	.L17
	cmp	r13, r14
	jne	.L23
	mov	esi, DWORD PTR RandALCat_codepoint_ranges[rip]
	mov	edi, r12d
	call	IS_CODE_IN_TABLE@PLT
	test	rax, rax
	je	.L17
	mov	esi, DWORD PTR RandALCat_codepoint_ranges[rip]
	mov	edi, r15d
	call	IS_CODE_IN_TABLE@PLT
	test	rax, rax
	jne	.L24
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdi, rbp
	call	FREE@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	FREE@PLT
	jmp	.L28
.L16:
	mov	rdi, rbp
	call	FREE@PLT
	jmp	.L5
.L59:
	mov	edi, 1
	jmp	.L22
.L56:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	pg_saslprep, .-pg_saslprep
	.comm	unassigned_codepoint_ranges,4,4
	.comm	prohibited_output_ranges,4,4
	.comm	non_ascii_space_ranges,4,4
	.comm	commonly_mapped_to_nothing_ranges,4,4
	.comm	SASLPREP_SUCCESS,4,4
	.comm	SASLPREP_PROHIBITED,4,4
	.comm	SASLPREP_OOM,4,4
	.comm	SASLPREP_INVALID_UTF8,4,4
	.comm	RandALCat_codepoint_ranges,4,4
	.comm	MAX_PASSWORD_LENGTH,8,8
	.comm	LCat_codepoint_ranges,4,4
	.comm	ERROR,4,4
	.comm	ERRCODE_PROGRAM_LIMIT_EXCEEDED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_saslprep.c_pg_saslprep.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"password too long\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	pg_saslprep
	.syntax unified
	.arm
	.fpu softvfp
	.type	pg_saslprep, %function
pg_saslprep:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	mov	r2, r1
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #28
	str	r1, [sp]
	ldr	r1, .L62
	mov	r10, r0
	ldr	r1, [r1]
	str	r1, [sp, #20]
	mov	r1,#0
	str	r3, [r2]
	bl	strlen
	ldr	r3, .L62+4
	ldr	r3, [r3]
	cmp	r0, r3
	bgt	.L57
.L2:
	mov	r0, r10
	bl	pg_is_ascii_string
	subs	r6, r0, #0
	mov	r0, r10
	beq	.L3
	bl	STRDUP
	ldr	r3, [sp]
	cmp	r0, #0
	str	r0, [r3]
	beq	.L5
	ldr	r3, .L62+8
	ldr	r0, [r3]
.L1:
	ldr	r3, .L62
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L58
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	bl	pg_utf8_string_len
	subs	r4, r0, #0
	blt	.L59
	add	r8, r4, #1
	lsl	r8, r8, #2
	mov	r0, r8
	bl	ALLOC
	subs	r5, r0, #0
	beq	.L5
	cmp	r4, #0
	beq	.L9
	sub	r4, r5, #4
	sub	r9, r8, #8
	str	r4, [sp, #4]
	str	r4, [sp, #8]
	str	r5, [sp, #12]
	add	r7, r5, r9
.L10:
	mov	r0, r10
	bl	utf8_to_unicode
	str	r0, [r4, #4]!
	mov	r0, r10
	bl	pg_utf_mblen
	cmp	r7, r4
	add	r10, r10, r0
	bne	.L10
	mov	r4, #0
	add	r8, r5, r8
	str	r4, [r8, #-4]
	add	r9, r5, r9
	ldr	r8, [sp, #4]
	b	.L14
.L61:
	mov	r3, #32
	add	r7, r10, #4
	cmp	r8, r9
	add	r4, r4, #1
	str	r3, [r5, r10]
	add	r7, r5, r7
	beq	.L60
.L14:
	ldr	fp, [r8, #4]!
	ldr	r3, .L62+12
	mov	r0, fp
	ldr	r1, [r3]
	bl	IS_CODE_IN_TABLE
	cmp	r0, #0
	lsl	r10, r4, #2
	add	r7, r5, r4, lsl #2
	bne	.L61
	ldr	r3, .L62+16
	mov	r0, fp
	ldr	r1, [r3]
	bl	IS_CODE_IN_TABLE
	cmp	r0, #0
	addeq	r7, r10, #4
	addeq	r4, r4, #1
	streq	fp, [r5, r10]
	addeq	r7, r5, r7
	cmp	r8, r9
	bne	.L14
.L60:
	mov	r3, #0
	cmp	r4, r3
	str	r3, [r7]
	beq	.L15
	mov	r0, r5
	bl	unicode_normalize_kc
	subs	fp, r0, #0
	beq	.L16
	ldr	r8, [sp, #4]
	ldr	r9, .L62+20
	ldr	r10, .L62+24
.L18:
	ldr	r7, [r8, #4]!
	ldr	r1, [r9]
	mov	r0, r7
	bl	IS_CODE_IN_TABLE
	cmp	r0, #0
	bne	.L17
	mov	r0, r7
	ldr	r1, [r10]
	bl	IS_CODE_IN_TABLE
	cmp	r0, #0
	bne	.L17
	add	r6, r6, #1
	cmp	r4, r6
	bne	.L18
	mov	r7, r0
	mov	r8, r0
	ldr	r6, .L62+28
	ldr	r9, [sp, #8]
.L20:
	ldr	r1, [r6]
	ldr	r0, [r9, #4]!
	bl	IS_CODE_IN_TABLE
	cmp	r0, #0
	bne	.L19
	add	r8, r8, #1
	cmp	r4, r8
	bne	.L20
.L24:
	ldr	r3, [fp]
	cmp	r3, #0
	moveq	r7, r3
	moveq	r0, #1
	beq	.L22
	mov	r4, fp
.L21:
	mov	r0, r3
	add	r1, sp, #16
	bl	unicode_to_utf8
	add	r0, sp, #16
	bl	pg_utf_mblen
	ldr	r3, [r4, #4]!
	add	r7, r7, r0
	cmp	r3, #0
	bne	.L21
	add	r0, r7, #1
.L22:
	bl	ALLOC
	subs	r8, r0, #0
	beq	.L25
	ldr	r3, [fp]
	cmp	r3, #0
	beq	.L32
	mov	r6, fp
	mov	r4, r8
.L27:
	mov	r0, r3
	mov	r1, r4
	bl	unicode_to_utf8
	mov	r0, r4
	bl	pg_utf_mblen
	ldr	r3, [r6, #4]!
	add	r4, r4, r0
	cmp	r3, #0
	bne	.L27
.L26:
	add	r0, r8, r7
	sub	r0, r4, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	Assert
	mov	r3, #0
	mov	r0, r5
	strb	r3, [r4]
	bl	FREE
	mov	r0, fp
	bl	FREE
	ldr	r3, .L62+8
	ldr	r2, [sp]
	ldr	r0, [r3]
	str	r8, [r2]
	b	.L1
.L59:
	ldr	r3, .L62+32
	ldr	r0, [r3]
	b	.L1
.L25:
	mov	r0, r5
	bl	FREE
	mov	r0, fp
	bl	FREE
.L5:
	ldr	r3, .L62+36
	ldr	r0, [r3]
	b	.L1
.L57:
	ldr	r2, .L62+40
	ldr	r3, .L62+44
	ldr	r0, [r2]
	ldr	r4, [r3]
	bl	errcode
	ldr	r0, .L62+48
	bl	errmsg
	mov	r1, r0
	mov	r0, r4
	bl	ereport
	b	.L2
.L9:
	str	r4, [r5]
.L15:
	mov	r0, r5
	bl	FREE
.L28:
	ldr	r3, .L62+52
	ldr	r0, [r3]
	b	.L1
.L19:
	ldr	r2, [sp, #4]
	ldr	r8, [r5]
	sub	r3, r4, #-1073741823
	str	r7, [sp, #4]
	mov	r0, r8
	ldr	r10, [r5, r3, lsl #2]
	ldr	r9, .L62+56
	ldr	r7, [sp, #12]
	add	r4, r2, r4, lsl #2
	b	.L29
.L23:
	ldr	r0, [r7, #4]!
.L29:
	ldr	r1, [r9]
	bl	IS_CODE_IN_TABLE
	cmp	r0, #0
	bne	.L17
	cmp	r7, r4
	bne	.L23
	mov	r0, r8
	ldr	r1, [r6]
	ldr	r7, [sp, #4]
	bl	IS_CODE_IN_TABLE
	cmp	r0, #0
	beq	.L17
	mov	r0, r10
	ldr	r1, [r6]
	bl	IS_CODE_IN_TABLE
	cmp	r0, #0
	bne	.L24
.L17:
	mov	r0, r5
	bl	FREE
	mov	r0, fp
	bl	FREE
	b	.L28
.L16:
	mov	r0, r5
	bl	FREE
	b	.L5
.L32:
	mov	r4, r8
	b	.L26
.L58:
	bl	__stack_chk_fail
.L63:
	.align	2
.L62:
	.word	.LC1
	.word	MAX_PASSWORD_LENGTH
	.word	SASLPREP_SUCCESS
	.word	non_ascii_space_ranges
	.word	commonly_mapped_to_nothing_ranges
	.word	prohibited_output_ranges
	.word	unassigned_codepoint_ranges
	.word	RandALCat_codepoint_ranges
	.word	SASLPREP_INVALID_UTF8
	.word	SASLPREP_OOM
	.word	ERRCODE_PROGRAM_LIMIT_EXCEEDED
	.word	ERROR
	.word	.LC0
	.word	SASLPREP_PROHIBITED
	.word	LCat_codepoint_ranges
	.size	pg_saslprep, .-pg_saslprep
	.comm	unassigned_codepoint_ranges,4,4
	.comm	prohibited_output_ranges,4,4
	.comm	non_ascii_space_ranges,4,4
	.comm	commonly_mapped_to_nothing_ranges,4,4
	.comm	SASLPREP_SUCCESS,4,4
	.comm	SASLPREP_PROHIBITED,4,4
	.comm	SASLPREP_OOM,4,4
	.comm	SASLPREP_INVALID_UTF8,4,4
	.comm	RandALCat_codepoint_ranges,4,4
	.comm	MAX_PASSWORD_LENGTH,4,4
	.comm	LCat_codepoint_ranges,4,4
	.comm	ERROR,4,4
	.comm	ERRCODE_PROGRAM_LIMIT_EXCEEDED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
