	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	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	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rsi, %r15
	movl	%edi, %r12d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	_num_cpus_to_pin@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	xorl	%r13d, %r13d
	movq	_cpu_threads@GOTPCREL(%rip), %r14
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	movslq	%eax, %rcx
	cmpq	%rcx, %r13
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rcx
	movq	(%rcx,%r13,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_SIGUSR1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pthread_kill
	movq	(%r14), %rax
	movq	(%rax,%r13,8), %rdi
	xorl	%esi, %esi
	callq	_pthread_join
	movq	_num_cpus_to_pin@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_6:
	movq	_queue@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	cmpl	$-1, %edi
	je	LBB0_9
## %bb.7:
	callq	_mq_close
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str(%rip), %rdi
	callq	_perror
LBB0_9:
	movq	_queue_path@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.10:
	callq	_mq_unlink
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.1(%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	%r12d, %r12d
	jne	LBB0_16
LBB0_17:
	xorl	%edi, %edi
	callq	_exit
LBB0_14:
	movq	_max_msgsize@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rdx
	callq	___set
	testl	%r12d, %r12d
	je	LBB0_17
LBB0_16:
	leaq	L_.str.3(%rip), %rdx
	movl	%r12d, %edi
	movl	%ebx, %esi
	movq	%r15, %rcx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_error
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_shutdown.in_shutdown,4,2 ## @shutdown.in_shutdown
	.comm	_errno,4,2                      ## @errno
	.comm	_num_cpus_to_pin,4,2            ## @num_cpus_to_pin
	.comm	_cpu_threads,8,3                ## @cpu_threads
	.comm	_SIGUSR1,4,2                    ## @SIGUSR1
	.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	_saved_max_msgs,8,3             ## @saved_max_msgs
	.comm	_max_msgs,4,2                   ## @max_msgs
L_.str.1:                               ## @.str.1
	.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.2:                               ## @.str.2
	.asciz	"failed to restore saved_max_msgsize"

L_.str.3:                               ## @.str.3
	.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, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x8, _errno@GOTPAGE
Lloh1:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	adrp	x9, _shutdown.in_shutdown@PAGE
	ldr	w10, [x9, _shutdown.in_shutdown@PAGEOFF]
	add	w11, w10, #1
	str	w11, [x9, _shutdown.in_shutdown@PAGEOFF]
	cbz	w10, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_2:
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	stp	w2, w0, [sp, #24]               ; 8-byte Folded Spill
	str	x1, [sp, #16]                   ; 8-byte Folded Spill
Lloh3:
	adrp	x19, _num_cpus_to_pin@GOTPAGE
Lloh4:
	ldr	x19, [x19, _num_cpus_to_pin@GOTPAGEOFF]
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x20, #0
Lloh5:
	adrp	x21, _cpu_threads@GOTPAGE
Lloh6:
	ldr	x21, [x21, _cpu_threads@GOTPAGEOFF]
Lloh7:
	adrp	x22, _SIGUSR1@GOTPAGE
Lloh8:
	ldr	x22, [x22, _SIGUSR1@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x20, x20, #1
	cmp	x20, w8, sxtw
	b.ge	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21]
	ldr	x0, [x9, x20, lsl #3]
	cbz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x22]
	bl	_pthread_kill
	ldr	x8, [x21]
	ldr	x0, [x8, x20, lsl #3]
	mov	x1, #0
	bl	_pthread_join
	ldr	w8, [x19]
	b	LBB0_4
LBB0_7:
Lloh9:
	adrp	x8, _queue@GOTPAGE
Lloh10:
	ldr	x8, [x8, _queue@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.8:
	bl	_mq_close
	cbz	x0, LBB0_10
; %bb.9:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
LBB0_10:
Lloh14:
	adrp	x8, _queue_path@GOTPAGE
Lloh15:
	ldr	x8, [x8, _queue_path@GOTPAGEOFF]
Lloh16:
	ldr	x0, [x8]
	cbz	x0, LBB0_12
; %bb.11:
	bl	_mq_unlink
LBB0_12:
Lloh17:
	adrp	x8, _saved_max_msgs@GOTPAGE
Lloh18:
	ldr	x8, [x8, _saved_max_msgs@GOTPAGEOFF]
Lloh19:
	ldr	x1, [x8]
	cbz	x1, LBB0_14
; %bb.13:
Lloh20:
	adrp	x8, _max_msgs@GOTPAGE
Lloh21:
	ldr	x8, [x8, _max_msgs@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x2, l_.str.1@PAGE
Lloh24:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	___set
LBB0_14:
Lloh25:
	adrp	x8, _saved_max_msgsize@GOTPAGE
Lloh26:
	ldr	x8, [x8, _saved_max_msgsize@GOTPAGEOFF]
Lloh27:
	ldr	x1, [x8]
	cbnz	x1, LBB0_17
; %bb.15:
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	cbnz	w8, LBB0_18
LBB0_16:
	mov	w0, #0
	bl	_exit
LBB0_17:
Lloh28:
	adrp	x8, _max_msgsize@GOTPAGE
Lloh29:
	ldr	x8, [x8, _max_msgsize@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
Lloh31:
	adrp	x2, l_.str.2@PAGE
Lloh32:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	___set
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_16
LBB0_18:
Lloh33:
	adrp	x2, l_.str.3@PAGE
Lloh34:
	add	x2, x2, l_.str.3@PAGEOFF
	ldp	w4, w0, [sp, #24]               ; 8-byte Folded Reload
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	ldr	x3, [sp, #16]                   ; 8-byte Folded Reload
	bl	_error
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_shutdown.in_shutdown,4,2 ; @shutdown.in_shutdown
	.comm	_errno,4,2                      ; @errno
	.comm	_num_cpus_to_pin,4,2            ; @num_cpus_to_pin
	.comm	_cpu_threads,8,3                ; @cpu_threads
	.comm	_SIGUSR1,4,2                    ; @SIGUSR1
	.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	_saved_max_msgs,8,3             ; @saved_max_msgs
	.comm	_max_msgs,4,2                   ; @max_msgs
l_.str.1:                               ; @.str.1
	.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.2:                               ; @.str.2
	.asciz	"failed to restore saved_max_msgsize"

l_.str.3:                               ; @.str.3
	.asciz	"%s at %d"

.subsections_via_symbols
