	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DoFormatMessage                ## -- Begin function DoFormatMessage
	.p2align	4, 0x90
_DoFormatMessage:                       ## @DoFormatMessage
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	testq	%rdi, %rdi
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_GetLastError
	movq	%rax, %r14
LBB0_2:
	movq	_FORMAT_MESSAGE_ALLOCATE_BUFFER@GOTPCREL(%rip), %rax
	movq	_FORMAT_MESSAGE_FROM_SYSTEM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	_FORMAT_MESSAGE_IGNORE_INSERTS@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_LANG_NEUTRAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SUBLANG_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MAKELANGID
	leaq	-24(%rbp), %r8
	movq	$0, (%rsp)
	movl	%ebx, %edi
	xorl	%esi, %esi
	movq	%r14, %rdx
	movl	%eax, %ecx
                                        ## kill: def $r8d killed $r8d killed $r8
	xorl	%r9d, %r9d
	callq	_FormatMessage
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	__T
	movl	-24(%rbp), %esi
	movl	%eax, %edi
	callq	__tprintf
	movq	-24(%rbp), %rdi
	callq	_LocalFree
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.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	_FORMAT_MESSAGE_IGNORE_INSERTS,4,2 ## @FORMAT_MESSAGE_IGNORE_INSERTS
	.comm	_LANG_NEUTRAL,4,2               ## @LANG_NEUTRAL
	.comm	_SUBLANG_DEFAULT,4,2            ## @SUBLANG_DEFAULT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DoFormatMessage                ; -- Begin function DoFormatMessage
	.p2align	2
_DoFormatMessage:                       ; @DoFormatMessage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	cbnz	x0, LBB0_2
; %bb.1:
	bl	_GetLastError
	mov	x19, x0
LBB0_2:
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	w8, w9, w8
Lloh6:
	adrp	x9, _FORMAT_MESSAGE_IGNORE_INSERTS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _FORMAT_MESSAGE_IGNORE_INSERTS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w20, w8, w9
Lloh9:
	adrp	x8, _LANG_NEUTRAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LANG_NEUTRAL@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _SUBLANG_DEFAULT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SUBLANG_DEFAULT@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_MAKELANGID
	mov	x3, x0
	add	x4, sp, #8
	mov	x0, x20
	mov	x1, #0
	mov	x2, x19
	mov	w5, #0
	mov	x6, #0
	bl	_FormatMessage
	cbz	x0, LBB0_4
; %bb.3:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	__T
	ldr	w1, [sp, #8]
	bl	__tprintf
	ldr	x0, [sp, #8]
	bl	_LocalFree
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.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	_FORMAT_MESSAGE_IGNORE_INSERTS,4,2 ; @FORMAT_MESSAGE_IGNORE_INSERTS
	.comm	_LANG_NEUTRAL,4,2               ; @LANG_NEUTRAL
	.comm	_SUBLANG_DEFAULT,4,2            ; @SUBLANG_DEFAULT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

.subsections_via_symbols
