	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fmtmsg                         ## -- Begin function fmtmsg
	.p2align	4, 0x90
_fmtmsg:                                ## @fmtmsg
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r13
	movq	%r8, %r9
	movq	%rcx, %r8
	movl	%edx, %ecx
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	_MM_PRINT@GOTPCREL(%rip), %rax
	testq	%rdi, (%rax)
	je	LBB0_12
## %bb.1:
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %rbx
	cmpb	$0, (%rax)
	je	LBB0_7
## %bb.3:
	movq	%rbx, %rdi
	callq	_strlen
	movq	%rax, %r15
	movq	_DFLT_MSGVERB@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strlen
	cmpq	%rax, %r15
	jg	LBB0_7
## %bb.4:
	movq	%rbx, %rdi
	callq	_strdup
	testq	%rax, %rax
	je	LBB0_24
## %bb.5:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_validmsgverb
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	%r15, %rdi
	callq	_free
LBB0_7:
	movq	_DFLT_MSGVERB@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strdup
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_24
LBB0_8:
	movq	%r13, (%rsp)
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	callq	_printfmt
	testq	%rax, %rax
	je	LBB0_20
## %bb.9:
	movq	%rax, %rbx
	cmpb	$0, (%rax)
	je	LBB0_11
## %bb.10:
	movq	_stderr@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	callq	_fputs
LBB0_11:
	movq	%r15, %rdi
	callq	_free
	movq	%rbx, %rdi
	callq	_free
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
LBB0_12:
	movq	_MM_CONSOLE@GOTPCREL(%rip), %rax
	testq	%r14, (%rax)
	je	LBB0_17
## %bb.13:
	movq	_DFLT_MSGVERB@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r13, (%rsp)
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_printfmt
	testq	%rax, %rax
	je	LBB0_19
## %bb.14:
	movq	%rax, %r15
	movq	_MM_OK@GOTPCREL(%rip), %rbx
	cmpb	$0, (%rax)
	je	LBB0_22
## %bb.15:
	leaq	L_.str.2(%rip), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_21
## %bb.16:
	movq	%rax, %r14
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_fputs
	movq	%r14, %rdi
	callq	_fclose
	jmp	LBB0_22
LBB0_24:
	movq	_MM_NOTOK@GOTPCREL(%rip), %rbx
	jmp	LBB0_23
LBB0_17:
	movq	_MM_OK@GOTPCREL(%rip), %rbx
	jmp	LBB0_23
LBB0_19:
	movq	_MM_NOCON@GOTPCREL(%rip), %rbx
	jmp	LBB0_23
LBB0_20:
	movq	_MM_NOTOK@GOTPCREL(%rip), %rbx
	jmp	LBB0_22
LBB0_21:
	movq	_MM_NOCON@GOTPCREL(%rip), %rbx
LBB0_22:
	movq	%r15, %rdi
	callq	_free
LBB0_23:
	movl	(%rbx), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MM_PRINT,8,3                   ## @MM_PRINT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MSGVERB"

	.comm	_DFLT_MSGVERB,8,3               ## @DFLT_MSGVERB
	.comm	_MM_NOTOK,4,2                   ## @MM_NOTOK
	.comm	_stderr,8,3                     ## @stderr
	.comm	_MM_CONSOLE,8,3                 ## @MM_CONSOLE
	.comm	_MM_NOCON,4,2                   ## @MM_NOCON
L_.str.2:                               ## @.str.2
	.asciz	"/dev/console"

L_.str.3:                               ## @.str.3
	.asciz	"ae"

	.comm	_MM_OK,4,2                      ## @MM_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fmtmsg                         ; -- Begin function fmtmsg
	.p2align	2
_fmtmsg:                                ; @fmtmsg
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
Lloh0:
	adrp	x8, _MM_PRINT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MM_PRINT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x27, _DFLT_MSGVERB@GOTPAGE
Lloh4:
	ldr	x27, [x27, _DFLT_MSGVERB@GOTPAGEOFF]
	tst	x8, x0
	b.eq	LBB0_12
; %bb.1:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_7
; %bb.2:
	mov	x25, x0
	ldrb	w8, [x0]
	cbz	w8, LBB0_7
; %bb.3:
	mov	x0, x25
	bl	_strlen
	mov	x26, x0
	ldr	x0, [x27]
	bl	_strlen
	cmp	x26, x0
	b.gt	LBB0_7
; %bb.4:
	mov	x0, x25
	bl	_strdup
	cbz	x0, LBB0_18
; %bb.5:
	mov	x25, x0
	bl	_validmsgverb
	cbnz	x0, LBB0_8
; %bb.6:
	mov	x0, x25
	bl	_free
LBB0_7:
	ldr	x0, [x27]
	bl	_strdup
	mov	x25, x0
	cbz	x0, LBB0_18
LBB0_8:
	mov	x0, x25
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	mov	x4, x21
	mov	x5, x20
	mov	x6, x19
	bl	_printfmt
	cbz	x0, LBB0_21
; %bb.9:
	mov	x26, x0
	ldrb	w8, [x0]
	cbz	w8, LBB0_11
; %bb.10:
Lloh7:
	adrp	x8, _stderr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh9:
	ldr	x1, [x8]
	mov	x0, x26
	bl	_fputs
LBB0_11:
	mov	x0, x25
	bl	_free
	mov	x0, x26
	bl	_free
LBB0_12:
Lloh10:
	adrp	x8, _MM_CONSOLE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MM_CONSOLE@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	tst	x8, x24
	b.eq	LBB0_19
; %bb.13:
	ldr	x0, [x27]
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	mov	x4, x21
	mov	x5, x20
	mov	x6, x19
	bl	_printfmt
	cbz	x0, LBB0_20
; %bb.14:
	mov	x25, x0
	ldrb	w8, [x0]
	cbz	w8, LBB0_17
; %bb.15:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_22
; %bb.16:
	mov	x19, x0
	mov	x0, x25
	mov	x1, x19
	bl	_fputs
	mov	x0, x19
	bl	_fclose
LBB0_17:
Lloh17:
	adrp	x19, _MM_OK@GOTPAGE
Lloh18:
	ldr	x19, [x19, _MM_OK@GOTPAGEOFF]
	b	LBB0_23
LBB0_18:
Lloh19:
	adrp	x19, _MM_NOTOK@GOTPAGE
Lloh20:
	ldr	x19, [x19, _MM_NOTOK@GOTPAGEOFF]
	b	LBB0_24
LBB0_19:
Lloh21:
	adrp	x19, _MM_OK@GOTPAGE
Lloh22:
	ldr	x19, [x19, _MM_OK@GOTPAGEOFF]
	b	LBB0_24
LBB0_20:
Lloh23:
	adrp	x19, _MM_NOCON@GOTPAGE
Lloh24:
	ldr	x19, [x19, _MM_NOCON@GOTPAGEOFF]
	b	LBB0_24
LBB0_21:
Lloh25:
	adrp	x19, _MM_NOTOK@GOTPAGE
Lloh26:
	ldr	x19, [x19, _MM_NOTOK@GOTPAGEOFF]
	b	LBB0_23
LBB0_22:
Lloh27:
	adrp	x19, _MM_NOCON@GOTPAGE
Lloh28:
	ldr	x19, [x19, _MM_NOCON@GOTPAGEOFF]
LBB0_23:
	mov	x0, x25
	bl	_free
LBB0_24:
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_MM_PRINT,8,3                   ; @MM_PRINT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MSGVERB"

	.comm	_DFLT_MSGVERB,8,3               ; @DFLT_MSGVERB
	.comm	_MM_NOTOK,4,2                   ; @MM_NOTOK
	.comm	_stderr,8,3                     ; @stderr
	.comm	_MM_CONSOLE,8,3                 ; @MM_CONSOLE
	.comm	_MM_NOCON,4,2                   ; @MM_NOCON
l_.str.2:                               ; @.str.2
	.asciz	"/dev/console"

l_.str.3:                               ; @.str.3
	.asciz	"ae"

	.comm	_MM_OK,4,2                      ; @MM_OK
.subsections_via_symbols
