	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_regerror                       ## -- Begin function regerror
	.p2align	4, 0x90
_regerror:                              ## @regerror
	.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	%r12
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_REG_ATOI@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jne	LBB0_2
## %bb.1:
	leaq	-96(%rbp), %rax
	movq	%rsi, %rdi
	movq	%rax, %rsi
	callq	_regatoi
	movq	%rax, %r12
	jmp	LBB0_11
LBB0_2:
	movq	_REG_ITOA@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %edx
	notl	%edx
	andl	%edi, %edx
	movq	_rerrs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rax), %esi
	addq	$24, %rax
	testl	%esi, %esi
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%edx, %esi
	jne	LBB0_3
LBB0_5:
	testl	%edi, %ecx
	je	LBB0_10
## %bb.6:
	testl	%esi, %esi
	je	LBB0_8
## %bb.7:
	movq	-16(%rax), %rsi
	leaq	-96(%rbp), %rdi
	callq	_strcpy
	jmp	LBB0_9
LBB0_10:
	movq	-8(%rax), %r12
	jmp	LBB0_11
LBB0_8:
	leaq	L_.str(%rip), %rsi
	leaq	-96(%rbp), %rdi
	callq	_sprintf
LBB0_9:
	leaq	-96(%rbp), %r12
	movq	%r12, %rdi
	callq	_strlen
	xorl	%edi, %edi
	cmpl	$50, %eax
	setb	%dil
	callq	_assert
LBB0_11:
	movq	%r12, %rdi
	callq	_strlen
	incl	%eax
	movslq	%eax, %rbx
	testq	%r15, %r15
	je	LBB0_15
## %bb.12:
	cmpq	%r15, %rbx
	jae	LBB0_14
## %bb.13:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_strcpy
	jmp	LBB0_15
LBB0_14:
	leaq	-1(%r15), %rdx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_strncpy
	movb	$0, -1(%r14,%r15)
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	movq	%rbx, %rax
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_ITOA,4,2                   ## @REG_ITOA
	.comm	_REG_ATOI,4,2                   ## @REG_ATOI
	.comm	_rerrs,8,3                      ## @rerrs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"REG_0x%x"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_regerror                       ; -- Begin function regerror
	.p2align	2
_regerror:                              ; @regerror
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x20, x3
	mov	x19, x2
Lloh0:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	stur	x9, [x29, #-40]
Lloh3:
	adrp	x9, _REG_ATOI@GOTPAGE
Lloh4:
	ldr	x9, [x9, _REG_ATOI@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w9, w0
	b.ne	LBB0_2
; %bb.1:
	mov	x8, x1
	add	x1, sp, #6
	mov	x0, x8
	bl	_regatoi
	mov	x21, x0
	b	LBB0_10
LBB0_2:
Lloh6:
	adrp	x8, _REG_ITOA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_ITOA@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x8]
	bic	w2, w0, w9
Lloh9:
	adrp	x8, _rerrs@GOTPAGE
Lloh10:
	ldr	x8, [x8, _rerrs@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x8], #24
	cmp	w10, #0
	ccmp	w10, w2, #4, ne
	b.ne	LBB0_3
; %bb.4:
	tst	w9, w0
	b.eq	LBB0_7
; %bb.5:
	cbz	w10, LBB0_8
; %bb.6:
	ldur	x1, [x8, #-16]
	add	x0, sp, #6
	bl	_strcpy
	b	LBB0_9
LBB0_7:
	ldur	x21, [x8, #-8]
	b	LBB0_10
LBB0_8:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #6
	bl	_sprintf
LBB0_9:
	add	x21, sp, #6
	add	x0, sp, #6
	bl	_strlen
	cmp	w0, #50
	cset	w0, lo
	bl	_assert
LBB0_10:
	mov	x0, x21
	bl	_strlen
	add	w8, w0, #1
	sxtw	x22, w8
	cbz	x20, LBB0_14
; %bb.11:
	cmp	x22, x20
	b.hs	LBB0_13
; %bb.12:
	mov	x0, x19
	mov	x1, x21
	bl	_strcpy
	b	LBB0_14
LBB0_13:
	sub	x20, x20, #1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_strncpy
	strb	wzr, [x19, x20]
LBB0_14:
	ldur	x8, [x29, #-40]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x22
	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
	add	sp, sp, #112
	ret
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_ITOA,4,2                   ; @REG_ITOA
	.comm	_REG_ATOI,4,2                   ; @REG_ATOI
	.comm	_rerrs,8,3                      ; @rerrs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"REG_0x%x"

.subsections_via_symbols
