	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function err_print_to_sgl
_err_print_to_sgl:                      ## @err_print_to_sgl
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.12:
	movq	%rbx, %rdi
	addq	$64, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movl	(%rbx), %edi
	callq	_READ_ONCE
	xorl	%r14d, %r14d
	testq	%rax, %rax
	jne	LBB0_11
## %bb.2:
	leaq	-72(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$56, %edx
	callq	_memset
	movl	4(%rbx), %eax
	movl	%eax, -20(%rbp)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	___err_print_to_sgl
	movq	-40(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.3:
	leaq	-40(%rbp), %r14
	movq	-72(%rbp), %rdi
	movq	-32(%rbp), %rdx
	leaq	1(%rdi), %rax
	movq	%rax, -72(%rbp)
	movl	-24(%rbp), %ecx
                                        ## kill: def $edi killed $edi killed $rdi
	callq	___sg_set_buf
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r14)
LBB0_4:
	movq	-72(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	xorl	%edi, %edi
	cmpq	%rax, -64(%rbp)
	setl	%dil
	callq	_GEM_BUG_ON
	movq	-72(%rbp), %rdi
	decq	%rdi
	callq	_sg_mark_end
	cmpq	$0, -72(%rbp)
	sete	%al
	jmp	LBB0_7
LBB0_5:
	movb	$1, %al
LBB0_7:
	cmpq	$0, -48(%rbp)
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_GEM_BUG_ON
	cmpl	$0, -56(%rbp)
	movq	-48(%rbp), %rdx
	je	LBB0_9
## %bb.8:
	movq	%rdx, %rdi
	callq	_err_free_sgl
	movl	-56(%rbp), %r14d
	jmp	LBB0_11
LBB0_9:
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_cmpxchg
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	-48(%rbp), %rdi
	callq	_err_free_sgl
LBB0_11:
	movl	%r14d, %eax
	addq	$64, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_err_print_to_sgl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function err_print_to_sgl
_err_print_to_sgl:                      ; @err_print_to_sgl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_PTR_ERR
LBB0_2:
	ldr	w0, [x19]
	bl	_READ_ONCE
	cbz	x0, LBB0_4
LBB0_3:
	mov	w0, #0
	b	LBB0_11
LBB0_4:
	add	x20, sp, #8
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #56
	bl	_memset
	ldr	w8, [x19, #4]
	str	w8, [sp, #60]
	add	x0, sp, #8
	mov	x1, x19
	bl	___err_print_to_sgl
	ldr	x1, [sp, #40]
	cbz	x1, LBB0_6
; %bb.5:
	ldr	x0, [sp, #8]
	ldr	x2, [sp, #48]
	add	x8, x0, #1
	str	x8, [sp, #8]
	ldr	w3, [sp, #56]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	___sg_set_buf
	stp	xzr, xzr, [x20, #32]!
LBB0_6:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_8
; %bb.7:
	ldr	x9, [sp, #16]
	cmp	x9, x8
	cset	w0, lt
	bl	_GEM_BUG_ON
	ldr	x8, [sp, #8]
	sub	x0, x8, #1
	bl	_sg_mark_end
	ldr	x8, [sp, #8]
	cmp	x8, #0
	cset	w8, eq
	b	LBB0_9
LBB0_8:
	mov	w8, #1
LBB0_9:
	ldr	x9, [sp, #32]
	cmp	x9, #0
	cset	w9, ne
	and	w0, w9, w8
	bl	_GEM_BUG_ON
	ldr	w8, [sp, #24]
	ldr	x2, [sp, #32]
	cbz	w8, LBB0_12
; %bb.10:
	mov	x0, x2
	bl	_err_free_sgl
	ldr	w0, [sp, #24]
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_12:
	mov	x0, x19
	mov	x1, #0
	bl	_cmpxchg
	cbz	x0, LBB0_11
; %bb.13:
	ldr	x0, [sp, #32]
	bl	_err_free_sgl
	b	LBB0_3
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_err_print_to_sgl
.subsections_via_symbols
