	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function pg_GSS_write
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_pg_GSS_write
	.p2align	4, 0x90
_pg_GSS_write:                          ## @pg_GSS_write
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_GSS_C_EMPTY_BUFFER@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movaps	%xmm0, -80(%rbp)
	testq	%rdx, %rdx
	setne	%bl
	movq	_PqGSSSendPointer@GOTPCREL(%rip), %r14
	movq	(%r14), %r13
	movq	%rdx, %rax
	orq	%r13, %rax
	je	LBB0_13
## %bb.1:
	movq	%rdx, %r12
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_PqGSSSendStart@GOTPCREL(%rip), %rcx
	addq	%rax, (%rcx)
	movq	(%r14), %r13
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testq	%r12, %r12
	setne	%bl
	movq	%r12, %rax
	orq	%r13, %rax
	je	LBB0_14
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, -60(%rbp)
	testq	%r13, %r13
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_PqGSSSendStart@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	subq	%rsi, %r13
	movq	_PqGSSSendBuffer@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movq	%r13, %rdx
	callq	_pqsecure_raw_write
	testq	%rax, %rax
	js	LBB0_19
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%r13, %rax
	jne	LBB0_2
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_PqGSSSendStart@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	$0, (%r14)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	testb	$1, %bl
	je	LBB0_16
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_max_packet_size@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %r12
	cmovbq	%r12, %rax
	movq	%rax, -104(%rbp)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	addq	%r15, %rax
	movq	%rax, -96(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movl	4(%rdi), %esi
	movq	_GSS_C_QOP_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-80(%rbp), %rax
	movq	%rax, (%rsp)
	leaq	-64(%rbp), %rdi
	movl	$1, %edx
	leaq	-104(%rbp), %r8
	leaq	-60(%rbp), %r9
	callq	_gss_wrap
	movl	%eax, %ebx
	movq	_GSS_S_COMPLETE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_17
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$0, -60(%rbp)
	je	LBB0_18
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-80(%rbp), %rdi
	movq	_PQ_GSS_SEND_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	decq	%rax
	cmpq	%rax, %rdi
	ja	LBB0_24
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-104(%rbp), %rax
	addq	%rax, %r15
	subq	%rax, %r12
	callq	_htonl
	movb	%al, -41(%rbp)
	movq	(%r14), %rdi
	movq	_PqGSSSendBuffer@GOTPCREL(%rip), %rbx
	addq	(%rbx), %rdi
	leaq	-41(%rbp), %rsi
	movl	$1, %edx
	callq	_memcpy
	movq	(%r14), %rdi
	incq	%rdi
	movq	%rdi, (%r14)
	addq	(%rbx), %rdi
	movq	-72(%rbp), %rsi
	movl	-80(%rbp), %edx
	callq	_memcpy
	movq	(%r14), %r13
	addq	-80(%rbp), %r13
	movq	%r13, (%r14)
	jmp	LBB0_3
LBB0_13:
	xorl	%r15d, %r15d
LBB0_14:
	cmpq	$0, -72(%rbp)
	je	LBB0_16
## %bb.15:
	leaq	-64(%rbp), %rdi
	leaq	-80(%rbp), %rsi
	callq	_gss_release_buffer
LBB0_16:
	movq	%r15, %rax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	leaq	L_.str(%rip), %rdi
	callq	_libpq_gettext
	movl	-64(%rbp), %ecx
	movl	%eax, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_pg_GSS_error
	movq	$-1, %r15
	jmp	LBB0_14
LBB0_18:
	leaq	L_.str.1(%rip), %rdi
	callq	_libpq_gettext
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printfPQExpBuffer
	movq	$-1, %r15
	jmp	LBB0_14
LBB0_19:
	testq	%r15, %r15
	je	LBB0_25
## %bb.20:
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_EAGAIN@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_16
## %bb.21:
	movq	_EWOULDBLOCK@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_16
## %bb.22:
	movq	_EINTR@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_16
LBB0_25:
	movq	%rax, %r15
	jmp	LBB0_16
LBB0_24:
	leaq	L_.str.2(%rip), %rdi
	callq	_libpq_gettext
	movq	-80(%rbp), %rdx
	movq	_PQ_GSS_SEND_BUFFER_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	decq	%rcx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printfPQExpBuffer
	movq	$-1, %r15
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_GSS_C_EMPTY_BUFFER,16,3        ## @GSS_C_EMPTY_BUFFER
	.comm	_PqGSSSendPointer,8,3           ## @PqGSSSendPointer
	.comm	_PqGSSSendStart,8,3             ## @PqGSSSendStart
	.comm	_PqGSSSendBuffer,8,3            ## @PqGSSSendBuffer
	.comm	_errno,8,3                      ## @errno
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.comm	_EWOULDBLOCK,8,3                ## @EWOULDBLOCK
	.comm	_EINTR,8,3                      ## @EINTR
	.comm	_max_packet_size,8,3            ## @max_packet_size
	.comm	_GSS_C_QOP_DEFAULT,4,2          ## @GSS_C_QOP_DEFAULT
	.comm	_GSS_S_COMPLETE,4,2             ## @GSS_S_COMPLETE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GSSAPI wrap error"

L_.str.1:                               ## @.str.1
	.asciz	"outgoing GSSAPI message would not use confidentiality\n"

	.comm	_PQ_GSS_SEND_BUFFER_SIZE,4,2    ## @PQ_GSS_SEND_BUFFER_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"client tried to send oversize GSSAPI packet (%zu > %zu)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pg_GSS_write                   ; -- Begin function pg_GSS_write
	.p2align	2
_pg_GSS_write:                          ; @pg_GSS_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, _GSS_C_EMPTY_BUFFER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GSS_C_EMPTY_BUFFER@GOTPAGEOFF]
Lloh2:
	ldr	q0, [x8]
	str	q0, [sp, #32]
Lloh3:
	adrp	x24, _PqGSSSendPointer@GOTPAGE
Lloh4:
	ldr	x24, [x24, _PqGSSSendPointer@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x2, #0
	cset	w27, ne
	orr	x9, x2, x8
	cbz	x9, LBB0_13
; %bb.1:
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	mov	x19, #0
Lloh5:
	adrp	x28, _GSS_S_COMPLETE@GOTPAGE
Lloh6:
	ldr	x28, [x28, _GSS_S_COMPLETE@GOTPAGEOFF]
Lloh7:
	adrp	x25, _PqGSSSendBuffer@GOTPAGE
Lloh8:
	ldr	x25, [x25, _PqGSSSendBuffer@GOTPAGEOFF]
Lloh9:
	adrp	x26, _PqGSSSendStart@GOTPAGE
Lloh10:
	ldr	x26, [x26, _PqGSSSendStart@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x26]
	add	x8, x8, x0
	str	x8, [x26]
	ldr	x8, [x24]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	x21, #0
	cset	w27, ne
	orr	x9, x21, x8
	cbz	x9, LBB0_14
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [sp, #24]
	cbz	x8, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x26]
	sub	x23, x8, x9
	ldr	x8, [x25]
	add	x1, x8, x9
	mov	x0, x20
	mov	x2, x23
	bl	_pqsecure_raw_write
	tbnz	x0, #63, LBB0_16
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x0, x23
	b.ne	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	str	xzr, [x26]
	str	xzr, [x24]
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	tbz	w27, #0, LBB0_23
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh11:
	adrp	x8, _max_packet_size@GOTPAGE
Lloh12:
	ldr	x8, [x8, _max_packet_size@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x21, x8
	csel	x8, x21, x8, lo
	add	x9, x22, x19
	stp	x8, x9, [sp, #48]
	stp	xzr, xzr, [sp, #32]
	ldr	w1, [x20, #4]
Lloh14:
	adrp	x8, _GSS_C_QOP_DEFAULT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GSS_C_QOP_DEFAULT@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	add	x0, sp, #28
	add	x4, sp, #48
	add	x5, sp, #24
	add	x6, sp, #32
	mov	w2, #1
	bl	_gss_wrap
	ldr	w8, [x28]
	cmp	w0, w8
	b.ne	LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [sp, #24]
	cbz	w8, LBB0_18
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [sp, #32]
Lloh17:
	adrp	x8, _PQ_GSS_SEND_BUFFER_SIZE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PQ_GSS_SEND_BUFFER_SIZE@GOTPAGEOFF]
Lloh19:
	ldrsw	x8, [x8]
	sub	x8, x8, #1
	cmp	x0, x8
	b.hi	LBB0_19
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #48]
	add	x19, x8, x19
	sub	x21, x21, x8
	bl	_htonl
	strb	w0, [sp, #23]
	ldr	x8, [x25]
	ldr	x9, [x24]
	add	x0, x9, x8
	add	x1, sp, #23
	mov	w2, #1
	bl	_memcpy
	ldr	x8, [x24]
	add	x8, x8, #1
	str	x8, [x24]
	ldr	x9, [x25]
	add	x0, x9, x8
	ldr	x1, [sp, #40]
	ldr	w2, [sp, #32]
	bl	_memcpy
	ldr	x8, [sp, #32]
	ldr	x9, [x24]
	add	x8, x9, x8
	str	x8, [x24]
	b	LBB0_3
LBB0_13:
	mov	x19, #0
LBB0_14:
	ldr	x8, [sp, #40]
	cbnz	x8, LBB0_22
	b	LBB0_23
LBB0_15:
	mov	x23, x0
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	bl	_libpq_gettext
	ldr	w3, [sp, #28]
	mov	x1, x20
	mov	x2, x23
	bl	_pg_GSS_error
	b	LBB0_21
LBB0_16:
	cbz	x19, LBB0_24
; %bb.17:
Lloh22:
	adrp	x8, _errno@GOTPAGE
Lloh23:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh24:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh25:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
Lloh27:
	ldr	x9, [x9]
Lloh28:
	adrp	x10, _EWOULDBLOCK@GOTPAGE
Lloh29:
	ldr	x10, [x10, _EWOULDBLOCK@GOTPAGEOFF]
Lloh30:
	adrp	x11, _EINTR@GOTPAGE
Lloh31:
	ldr	x11, [x11, _EINTR@GOTPAGEOFF]
Lloh32:
	ldr	x10, [x10]
Lloh33:
	ldr	x11, [x11]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	csel	x19, x19, x0, eq
	b	LBB0_23
LBB0_18:
Lloh34:
	adrp	x0, l_.str.1@PAGE
Lloh35:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_libpq_gettext
	mov	x1, x0
	b	LBB0_20
LBB0_19:
Lloh36:
	adrp	x0, l_.str.2@PAGE
Lloh37:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_libpq_gettext
	mov	x1, x0
	ldr	x8, [sp, #32]
Lloh38:
	adrp	x9, _PQ_GSS_SEND_BUFFER_SIZE@GOTPAGE
Lloh39:
	ldr	x9, [x9, _PQ_GSS_SEND_BUFFER_SIZE@GOTPAGEOFF]
Lloh40:
	ldrsw	x9, [x9]
	sub	x9, x9, #1
	stp	x8, x9, [sp]
LBB0_20:
	mov	x0, x20
	bl	_printfPQExpBuffer
LBB0_21:
	mov	x19, #-1
	ldr	x8, [sp, #40]
	cbz	x8, LBB0_23
LBB0_22:
	add	x0, sp, #28
	add	x1, sp, #32
	bl	_gss_release_buffer
LBB0_23:
	mov	x0, x19
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_24:
	mov	x19, x0
	b	LBB0_23
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh32
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh26
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_GSS_C_EMPTY_BUFFER,16,3        ; @GSS_C_EMPTY_BUFFER
	.comm	_PqGSSSendPointer,8,3           ; @PqGSSSendPointer
	.comm	_PqGSSSendStart,8,3             ; @PqGSSSendStart
	.comm	_PqGSSSendBuffer,8,3            ; @PqGSSSendBuffer
	.comm	_errno,8,3                      ; @errno
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.comm	_EWOULDBLOCK,8,3                ; @EWOULDBLOCK
	.comm	_EINTR,8,3                      ; @EINTR
	.comm	_max_packet_size,8,3            ; @max_packet_size
	.comm	_GSS_C_QOP_DEFAULT,4,2          ; @GSS_C_QOP_DEFAULT
	.comm	_GSS_S_COMPLETE,4,2             ; @GSS_S_COMPLETE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GSSAPI wrap error"

l_.str.1:                               ; @.str.1
	.asciz	"outgoing GSSAPI message would not use confidentiality\n"

	.comm	_PQ_GSS_SEND_BUFFER_SIZE,4,2    ; @PQ_GSS_SEND_BUFFER_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"client tried to send oversize GSSAPI packet (%zu > %zu)\n"

.subsections_via_symbols
