	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_format_errmsg                  ## -- Begin function format_errmsg
	.p2align	4, 0x90
_format_errmsg:                         ## @format_errmsg
	.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	$280, %rsp                      ## imm = 0x118
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -308(%rbp)                ## 4-byte Spill
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movb	(%rdx), %al
	testb	%al, %al
	je	LBB0_7
## %bb.1:
	leaq	(%rbx,%rsi), %r13
	decq	%r13
	cmpq	%rbx, %r13
	jbe	LBB0_7
## %bb.2:
	movq	%rdx, %r15
	leaq	-304(%rbp), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	$37, %al
	jne	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movzbl	1(%r15), %eax
	addq	$2, %r15
	cmpb	$109, %al
	jne	LBB0_10
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	-308(%rbp), %edi                ## 4-byte Reload
	movq	%r12, %rsi
	movl	$256, %edx                      ## imm = 0x100
	callq	_errno_to_str
	movq	%r12, %rdi
	callq	_strlen
	leaq	(%rbx,%rax), %r14
	cmpq	%r13, %r14
	jae	LBB0_5
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%rax, %rdx
	callq	_memcpy
	movq	%r14, %rbx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movb	%al, (%rbx)
	incq	%rbx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movb	$37, (%rbx)
	testb	%al, %al
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movb	%al, 1(%rbx)
	addq	$2, %rbx
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movzbl	(%r15), %eax
	testb	%al, %al
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r13, %rbx
	jb	LBB0_3
	jmp	LBB0_7
LBB0_11:
	incq	%rbx
LBB0_7:
	movb	$0, (%rbx)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.15:
	addq	$280, %rsp                      ## imm = 0x118
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_format_errmsg                  ; -- Begin function format_errmsg
	.p2align	2
_format_errmsg:                         ; @format_errmsg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #352
	.cfi_def_cfa_offset 352
	stp	x28, x27, [sp, #272]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #288]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #304]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #320]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #336]            ; 16-byte Folded Spill
	add	x29, sp, #336
	.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 w27, -72
	.cfi_offset w28, -80
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	add	x8, x0, x1
	sub	x21, x8, #1
	ldrb	w8, [x2]
	cmp	w8, #0
	ccmp	x21, x0, #0, ne
	b.hi	LBB0_3
LBB0_1:
	strb	wzr, [x19]
	ldur	x8, [x29, #-72]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.2:
	ldp	x29, x30, [sp, #336]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #320]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #304]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #288]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #272]            ; 16-byte Folded Reload
	add	sp, sp, #352
	ret
LBB0_3:
	mov	x20, x3
	mov	w22, #37
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x2, #1
	strb	w8, [x19], #1
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x23]
	cmp	w8, #0
	ccmp	x19, x21, #2, ne
	mov	x2, x23
	b.hs	LBB0_1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w8, #37
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x2, #2
	ldrb	w8, [x2, #1]
	cmp	w8, #109
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x1, sp, #8
	mov	x0, x20
	mov	w2, #256
	bl	_errno_to_str
	add	x0, sp, #8
	bl	_strlen
	add	x24, x19, x0
	cmp	x24, x21
	b.hs	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x2, x0
	add	x1, sp, #8
	mov	x0, x19
	bl	_memcpy
	mov	x19, x24
	b	LBB0_5
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x9, x19
	strb	w22, [x9], #1
	cbz	w8, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	strb	w8, [x19, #1]
	add	x19, x19, #2
	b	LBB0_5
LBB0_12:
	mov	x19, x9
	b	LBB0_1
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
