	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function REGPROC_print_error
_REGPROC_print_error:                   ## @REGPROC_print_error
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	callq	_GetLastError
	movl	%eax, %ebx
	movq	_FORMAT_MESSAGE_ALLOCATE_BUFFER@GOTPCREL(%rip), %rax
	movq	_FORMAT_MESSAGE_FROM_SYSTEM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	leaq	-28(%rbp), %r8
	movq	$0, (%rsp)
	xorl	%esi, %esi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
                                        ## kill: def $r8d killed $r8d killed $r8
	xorl	%r9d, %r9d
	callq	_FormatMessageA
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_getAppName
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_GetLastError
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
LBB0_2:
	movl	-28(%rbp), %edi
	callq	_puts
	movl	-28(%rbp), %edi
	callq	_LocalFree
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_FORMAT_MESSAGE_ALLOCATE_BUFFER,4,2 ## @FORMAT_MESSAGE_ALLOCATE_BUFFER
	.comm	_FORMAT_MESSAGE_FROM_SYSTEM,4,2 ## @FORMAT_MESSAGE_FROM_SYSTEM
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%S: Cannot display message for error %lu, status %lu\n"

	.no_dead_strip	_REGPROC_print_error
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function REGPROC_print_error
_REGPROC_print_error:                   ; @REGPROC_print_error
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	bl	_GetLastError
	mov	x19, x0
Lloh0:
	adrp	x8, _FORMAT_MESSAGE_ALLOCATE_BUFFER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FORMAT_MESSAGE_ALLOCATE_BUFFER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _FORMAT_MESSAGE_FROM_SYSTEM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FORMAT_MESSAGE_FROM_SYSTEM@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w0, w9, w8
	add	x4, sp, #12
	mov	x1, #0
	mov	x2, x19
	mov	w3, #0
	mov	w5, #0
	mov	x6, #0
	bl	_FormatMessageA
	cbnz	w0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _stderr@GOTPAGE
Lloh7:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
	bl	_getAppName
	mov	x21, x0
	bl	_GetLastError
	mov	x4, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	mov	x3, x19
	bl	_fprintf
	mov	w0, #1
	bl	_exit
LBB0_2:
	ldr	w0, [sp, #12]
	bl	_puts
	ldr	w0, [sp, #12]
	bl	_LocalFree
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_FORMAT_MESSAGE_ALLOCATE_BUFFER,4,2 ; @FORMAT_MESSAGE_ALLOCATE_BUFFER
	.comm	_FORMAT_MESSAGE_FROM_SYSTEM,4,2 ; @FORMAT_MESSAGE_FROM_SYSTEM
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%S: Cannot display message for error %lu, status %lu\n"

	.no_dead_strip	_REGPROC_print_error
.subsections_via_symbols
