	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function osmesa_fifo_write
_osmesa_fifo_write:                     ## @osmesa_fifo_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 16(%rdi)
	js	LBB0_5
## %bb.1:
	movq	%rdi, %r14
	movq	(%rdi), %r15
	imulq	8(%rdi), %r15
	movl	20(%rdi), %esi
	leal	1(%rsi), %ebx
	decq	%rsi
	imulq	%r15, %rsi
	movq	_MSG_NOSIGNAL@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	decl	%ebx
	testl	%ebx, %ebx
	jle	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rsi, %r13
	subq	%r15, %r13
	movl	16(%r14), %edi
	addq	24(%r14), %rsi
	movl	(%r12), %ecx
	movq	%r15, %rdx
	callq	_send
	movq	%r13, %rsi
	testl	%eax, %eax
	jns	LBB0_2
## %bb.4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	16(%r14), %r15d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%r15d, %edx
	movq	%rax, %rcx
	callq	_fprintf
	movl	16(%r14), %edi
	callq	_close
	movl	$-1, 16(%r14)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_NOSIGNAL,4,2               ## @MSG_NOSIGNAL
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[osmesa] Lost connection to %i: %s\n"

	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_osmesa_fifo_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function osmesa_fifo_write
_osmesa_fifo_write:                     ; @osmesa_fifo_write
	.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
	ldr	w8, [x0, #16]
	tbnz	w8, #31, LBB0_5
; %bb.1:
	mov	x19, x0
	ldp	x8, x9, [x0]
	mul	x20, x9, x8
	ldr	w8, [x0, #20]
	add	w21, w8, #1
	sub	x8, x8, #1
	mul	x8, x20, x8
Lloh0:
	adrp	x22, _MSG_NOSIGNAL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MSG_NOSIGNAL@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sub	w21, w21, #1
	cmp	w21, #1
	b.lt	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	x23, x8, x20
	ldr	w0, [x19, #16]
	ldr	x9, [x19, #24]
	add	x1, x8, x9
	ldr	w3, [x22]
	mov	x2, x20
	bl	_send
	mov	x8, x23
	tbz	w0, #31, LBB0_2
; %bb.4:
Lloh2:
	adrp	x8, _stderr@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh4:
	ldr	w20, [x8]
	ldr	w21, [x19, #16]
Lloh5:
	adrp	x8, _errno@GOTPAGE
Lloh6:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_fprintf
	ldr	w0, [x19, #16]
	bl	_close
	mov	w8, #-1
	str	w8, [x19, #16]
LBB0_5:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_NOSIGNAL,4,2               ; @MSG_NOSIGNAL
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[osmesa] Lost connection to %i: %s\n"

	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_osmesa_fifo_write
.subsections_via_symbols
