	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_shutdown                       ## -- Begin function shutdown
	.p2align	4, 0x90
_shutdown:                              ## @shutdown
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	_shutdown.in_shutdown(%rip), %eax
	leal	1(%rax), %ecx
	movl	%ecx, _shutdown.in_shutdown(%rip)
	testl	%eax, %eax
	je	LBB0_1
## %bb.18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%edx, %r14d
	movq	%rsi, %r15
	movl	%edi, %ebx
	xorl	%edi, %edi
	callq	_seteuid
	movq	_queue@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	cmpl	$-1, %edi
	je	LBB0_4
## %bb.2:
	callq	_mq_close
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_perror
LBB0_4:
	movq	_queue_path@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_mq_unlink
LBB0_6:
	movq	_default_settings@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.7:
	movq	_saved_def_msgs@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.8:
	movq	_def_msgs@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rdx
	callq	___set
LBB0_9:
	movq	_saved_def_msgsize@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.10:
	movq	_def_msgsize@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rdx
	callq	___set
LBB0_11:
	movq	_saved_max_msgs@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.12:
	movq	_max_msgs@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rdx
	callq	___set
LBB0_13:
	movq	_saved_max_msgsize@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	jne	LBB0_14
## %bb.15:
	testl	%ebx, %ebx
	jne	LBB0_16
LBB0_17:
	xorl	%edi, %edi
	callq	_exit
LBB0_14:
	movq	_max_msgsize@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rdx
	callq	___set
	testl	%ebx, %ebx
	je	LBB0_17
LBB0_16:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
	movl	%ebx, %edi
	movq	%r15, %rcx
	movl	%r14d, %r8d
	callq	_error
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_shutdown.in_shutdown,4,2 ## @shutdown.in_shutdown
	.comm	_queue,4,2                      ## @queue
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mq_close() during shutdown"

	.comm	_queue_path,8,3                 ## @queue_path
	.comm	_default_settings,8,3           ## @default_settings
	.comm	_saved_def_msgs,8,3             ## @saved_def_msgs
	.comm	_def_msgs,4,2                   ## @def_msgs
L_.str.1:                               ## @.str.1
	.asciz	"failed to restore saved_def_msgs"

	.comm	_saved_def_msgsize,8,3          ## @saved_def_msgsize
	.comm	_def_msgsize,4,2                ## @def_msgsize
L_.str.2:                               ## @.str.2
	.asciz	"failed to restore saved_def_msgsize"

	.comm	_saved_max_msgs,8,3             ## @saved_max_msgs
	.comm	_max_msgs,4,2                   ## @max_msgs
L_.str.3:                               ## @.str.3
	.asciz	"failed to restore saved_max_msgs"

	.comm	_saved_max_msgsize,8,3          ## @saved_max_msgsize
	.comm	_max_msgsize,4,2                ## @max_msgsize
L_.str.4:                               ## @.str.4
	.asciz	"failed to restore saved_max_msgsize"

	.comm	_errno,4,2                      ## @errno
L_.str.5:                               ## @.str.5
	.asciz	"%s at %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_shutdown                       ; -- Begin function shutdown
	.p2align	2
_shutdown:                              ; @shutdown
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	adrp	x8, _shutdown.in_shutdown@PAGE
	ldr	w9, [x8, _shutdown.in_shutdown@PAGEOFF]
	add	w10, w9, #1
	str	w10, [x8, _shutdown.in_shutdown@PAGEOFF]
	cbz	w9, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
LBB0_2:
	stur	w0, [x29, #-4]                  ; 4-byte Folded Spill
	str	x1, [sp]                        ; 8-byte Folded Spill
	str	w2, [sp, #8]                    ; 4-byte Folded Spill
	mov	w0, #0
	bl	_seteuid
Lloh0:
	adrp	x8, _queue@GOTPAGE
Lloh1:
	ldr	x8, [x8, _queue@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.3:
	bl	_mq_close
	cbz	x0, LBB0_5
; %bb.4:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
LBB0_5:
Lloh5:
	adrp	x8, _queue_path@GOTPAGE
Lloh6:
	ldr	x8, [x8, _queue_path@GOTPAGEOFF]
Lloh7:
	ldr	x0, [x8]
	cbz	x0, LBB0_7
; %bb.6:
	bl	_mq_unlink
LBB0_7:
Lloh8:
	adrp	x8, _default_settings@GOTPAGE
Lloh9:
	ldr	x8, [x8, _default_settings@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.8:
Lloh11:
	adrp	x8, _saved_def_msgs@GOTPAGE
Lloh12:
	ldr	x8, [x8, _saved_def_msgs@GOTPAGEOFF]
Lloh13:
	ldr	x1, [x8]
	cbz	x1, LBB0_10
; %bb.9:
Lloh14:
	adrp	x8, _def_msgs@GOTPAGE
Lloh15:
	ldr	x8, [x8, _def_msgs@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	___set
LBB0_10:
Lloh19:
	adrp	x8, _saved_def_msgsize@GOTPAGE
Lloh20:
	ldr	x8, [x8, _saved_def_msgsize@GOTPAGEOFF]
Lloh21:
	ldr	x1, [x8]
	cbz	x1, LBB0_12
; %bb.11:
Lloh22:
	adrp	x8, _def_msgsize@GOTPAGE
Lloh23:
	ldr	x8, [x8, _def_msgsize@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x2, l_.str.2@PAGE
Lloh26:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	___set
LBB0_12:
Lloh27:
	adrp	x8, _saved_max_msgs@GOTPAGE
Lloh28:
	ldr	x8, [x8, _saved_max_msgs@GOTPAGEOFF]
Lloh29:
	ldr	x1, [x8]
	cbz	x1, LBB0_14
; %bb.13:
Lloh30:
	adrp	x8, _max_msgs@GOTPAGE
Lloh31:
	ldr	x8, [x8, _max_msgs@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
Lloh33:
	adrp	x2, l_.str.3@PAGE
Lloh34:
	add	x2, x2, l_.str.3@PAGEOFF
	bl	___set
LBB0_14:
Lloh35:
	adrp	x8, _saved_max_msgsize@GOTPAGE
Lloh36:
	ldr	x8, [x8, _saved_max_msgsize@GOTPAGEOFF]
Lloh37:
	ldr	x1, [x8]
	cbnz	x1, LBB0_17
; %bb.15:
	ldur	w8, [x29, #-4]                  ; 4-byte Folded Reload
	cbnz	w8, LBB0_18
LBB0_16:
	mov	w0, #0
	bl	_exit
LBB0_17:
Lloh38:
	adrp	x8, _max_msgsize@GOTPAGE
Lloh39:
	ldr	x8, [x8, _max_msgsize@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
Lloh41:
	adrp	x2, l_.str.4@PAGE
Lloh42:
	add	x2, x2, l_.str.4@PAGEOFF
	bl	___set
	ldur	w8, [x29, #-4]                  ; 4-byte Folded Reload
	cbz	w8, LBB0_16
LBB0_18:
Lloh43:
	adrp	x8, _errno@GOTPAGE
Lloh44:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
Lloh46:
	adrp	x2, l_.str.5@PAGE
Lloh47:
	add	x2, x2, l_.str.5@PAGEOFF
	ldur	w0, [x29, #-4]                  ; 4-byte Folded Reload
	ldr	x3, [sp]                        ; 8-byte Folded Reload
	ldr	w4, [sp, #8]                    ; 4-byte Folded Reload
	bl	_error
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_shutdown.in_shutdown,4,2 ; @shutdown.in_shutdown
	.comm	_queue,4,2                      ; @queue
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mq_close() during shutdown"

	.comm	_queue_path,8,3                 ; @queue_path
	.comm	_default_settings,8,3           ; @default_settings
	.comm	_saved_def_msgs,8,3             ; @saved_def_msgs
	.comm	_def_msgs,4,2                   ; @def_msgs
l_.str.1:                               ; @.str.1
	.asciz	"failed to restore saved_def_msgs"

	.comm	_saved_def_msgsize,8,3          ; @saved_def_msgsize
	.comm	_def_msgsize,4,2                ; @def_msgsize
l_.str.2:                               ; @.str.2
	.asciz	"failed to restore saved_def_msgsize"

	.comm	_saved_max_msgs,8,3             ; @saved_max_msgs
	.comm	_max_msgs,4,2                   ; @max_msgs
l_.str.3:                               ; @.str.3
	.asciz	"failed to restore saved_max_msgs"

	.comm	_saved_max_msgsize,8,3          ; @saved_max_msgsize
	.comm	_max_msgsize,4,2                ; @max_msgsize
l_.str.4:                               ; @.str.4
	.asciz	"failed to restore saved_max_msgsize"

	.comm	_errno,4,2                      ; @errno
l_.str.5:                               ; @.str.5
	.asciz	"%s at %d"

.subsections_via_symbols
