	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_sgr
_check_sgr:                             ## @check_sgr
	.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
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r12
	movl	%edx, %r14d
	movq	%rsi, %r13
	movq	__nc_tparm_err@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_set_attributes@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	cmpl	$1, %edx
	sete	%sil
	xorl	%edx, %edx
	cmpl	$2, %r14d
	sete	%dl
	xorl	%ecx, %ecx
	cmpl	$3, %r14d
	sete	%cl
	xorl	%r8d, %r8d
	cmpl	$4, %r14d
	sete	%r8b
	xorl	%r9d, %r9d
	cmpl	$5, %r14d
	sete	%r9b
	xorl	%r10d, %r10d
	cmpl	$6, %r14d
	sete	%r10b
	xorl	%r11d, %r11d
	cmpl	$7, %r14d
	sete	%r11b
	xorl	%eax, %eax
	cmpl	$8, %r14d
	sete	%al
	xorl	%ebx, %ebx
	cmpl	$9, %r14d
	sete	%bl
	pushq	%rbx
	pushq	%rax
	pushq	%r11
	pushq	%r10
	callq	_TPARM_9
	addq	$32, %rsp
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_PRESENT
	testq	%r15, %r15
	je	LBB0_6
## %bb.1:
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	%r14d, %edi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_similar_sgr
	testl	%eax, %eax
	movq	__nc_tparm_err@GOTPCREL(%rip), %rbx
	jne	LBB0_9
## %bb.3:
	movl	$1, %edi
	movq	%r12, %rsi
	callq	__nc_visbuf2
	movl	%eax, %r12d
	movl	$2, %edi
	movq	%r15, %rsi
	callq	__nc_visbuf2
	movl	%eax, %r10d
	subq	$8, %rsp
	leaq	L_.str(%rip), %rdi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, %rsi
	movl	%r14d, %edx
	movl	%r12d, %r8d
	movl	%r14d, %r9d
	xorl	%eax, %eax
	pushq	%r10
	callq	__nc_warning
	addq	$16, %rsp
	jmp	LBB0_9
LBB0_6:
	testq	%rax, %rax
	movq	__nc_tparm_err@GOTPCREL(%rip), %rbx
	je	LBB0_9
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_8
LBB0_4:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	__nc_capcmp
	testq	%rax, %rax
	movq	__nc_tparm_err@GOTPCREL(%rip), %rbx
	je	LBB0_9
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
LBB0_8:
	movl	%r14d, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	__nc_warning
LBB0_9:
	cmpq	$0, (%rbx)
	je	LBB0_11
## %bb.10:
	leaq	L_.str.3(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	__nc_warning
LBB0_11:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__nc_tparm_err,8,3              ## @_nc_tparm_err
	.comm	_set_attributes,4,2             ## @set_attributes
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s differs from sgr(%d)\n\t%s=%s\n\tsgr(%d)=%s"

L_.str.1:                               ## @.str.1
	.asciz	"sgr(%d) present, but not %s"

L_.str.2:                               ## @.str.2
	.asciz	"sgr(%d) missing, but %s present"

L_.str.3:                               ## @.str.3
	.asciz	"stack error in sgr(%d) string"

	.no_dead_strip	_check_sgr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_sgr
_check_sgr:                             ; @check_sgr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x20, x4
	mov	x22, x3
	mov	x19, x2
	mov	x23, x1
Lloh0:
	adrp	x24, __nc_tparm_err@GOTPAGE
Lloh1:
	ldr	x24, [x24, __nc_tparm_err@GOTPAGEOFF]
	str	xzr, [x24]
Lloh2:
	adrp	x8, _set_attributes@GOTPAGE
Lloh3:
	ldr	x8, [x8, _set_attributes@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	cmp	w2, #1
	cset	w1, eq
	cmp	w2, #2
	cset	w2, eq
	cmp	w19, #3
	cset	w3, eq
	cmp	w19, #4
	cset	w4, eq
	cmp	w19, #5
	cset	w5, eq
	cmp	w19, #6
	cset	w6, eq
	cmp	w19, #7
	cset	w7, eq
	cmp	w19, #8
	cset	w8, eq
	cmp	w19, #9
	cset	w9, eq
	stp	w8, w9, [sp]
	bl	_TPARM_9
	mov	x21, x0
	mov	x0, x22
	bl	_PRESENT
	cbz	x21, LBB0_4
; %bb.1:
	cbz	x0, LBB0_6
; %bb.2:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_similar_sgr
	cbnz	w0, LBB0_9
; %bb.3:
	mov	w0, #1
	mov	x1, x22
	bl	__nc_visbuf2
	mov	x22, x0
	mov	w0, #2
	mov	x1, x21
	bl	__nc_visbuf2
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x19, x0, [sp, #32]
	stp	x20, x22, [sp, #16]
	stp	x20, x19, [sp]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_4:
	cbz	x0, LBB0_9
; %bb.5:
	mov	x8, x19
	stp	x8, x20, [sp]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_6:
	mov	x0, x21
	mov	x1, x23
	bl	__nc_capcmp
	cbz	x0, LBB0_9
; %bb.7:
	mov	x8, x19
	stp	x8, x20, [sp]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	__nc_warning
LBB0_9:
	ldr	x8, [x24]
	cbz	x8, LBB0_11
; %bb.10:
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	str	x19, [sp]
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	__nc_warning
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	__nc_tparm_err,8,3              ; @_nc_tparm_err
	.comm	_set_attributes,4,2             ; @set_attributes
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s differs from sgr(%d)\n\t%s=%s\n\tsgr(%d)=%s"

l_.str.1:                               ; @.str.1
	.asciz	"sgr(%d) present, but not %s"

l_.str.2:                               ; @.str.2
	.asciz	"sgr(%d) missing, but %s present"

l_.str.3:                               ; @.str.3
	.asciz	"stack error in sgr(%d) string"

	.no_dead_strip	_check_sgr
.subsections_via_symbols
