	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sigchld_handler                ## -- Begin function sigchld_handler
	.p2align	4, 0x90
_sigchld_handler:                       ## @sigchld_handler
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_child_pid@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	leaq	-12(%rbp), %rsi
	xorl	%edx, %edx
	callq	_waitpid
	cmpq	(%rbx), %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_2:
	movl	-12(%rbp), %edi
	callq	_WIFEXITED
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_4:
	movl	-12(%rbp), %edi
	callq	_WEXITSTATUS
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	-12(%rbp), %edi
	callq	_WEXITSTATUS
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_errx
LBB0_6:
	movq	_sender_msqid@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IPC_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-16(%rbp), %rdx
	callq	_msgctl
	cmpl	$-1, %eax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_8:
	leaq	-16(%rbp), %rdi
	movl	$384, %esi                      ## imm = 0x180
	callq	_print_msqid_ds
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_child_pid,8,3                  ## @child_pid
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"waitpid"

L_.str.1:                               ## @.str.1
	.asciz	"receiver exited abnormally"

L_.str.2:                               ## @.str.2
	.asciz	"receiver exited with status %d"

	.comm	_sender_msqid,4,2               ## @sender_msqid
	.comm	_IPC_STAT,4,2                   ## @IPC_STAT
L_.str.3:                               ## @.str.3
	.asciz	"msgctl IPC_STAT"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sigchld_handler                ; -- Begin function sigchld_handler
	.p2align	2
_sigchld_handler:                       ; @sigchld_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
Lloh0:
	adrp	x19, _child_pid@GOTPAGE
Lloh1:
	ldr	x19, [x19, _child_pid@GOTPAGEOFF]
	ldr	x0, [x19]
	add	x1, sp, #20
	mov	w2, #0
	bl	_waitpid
	ldr	x8, [x19]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
	ldr	w0, [sp, #20]
	bl	_WIFEXITED
	cbnz	x0, LBB0_4
; %bb.3:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_4:
	ldr	w0, [sp, #20]
	bl	_WEXITSTATUS
	cbz	x0, LBB0_6
; %bb.5:
	ldr	w0, [sp, #20]
	bl	_WEXITSTATUS
	str	x0, [sp]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_6:
Lloh8:
	adrp	x8, _sender_msqid@GOTPAGE
Lloh9:
	ldr	x8, [x8, _sender_msqid@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _IPC_STAT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IPC_STAT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x2, sp, #24
	bl	_msgctl
	cmn	w0, #1
	b.ne	LBB0_8
; %bb.7:
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_8:
	add	x0, sp, #24
	mov	w1, #384
	bl	_print_msqid_ds
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_child_pid,8,3                  ; @child_pid
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"waitpid"

l_.str.1:                               ; @.str.1
	.asciz	"receiver exited abnormally"

l_.str.2:                               ; @.str.2
	.asciz	"receiver exited with status %d"

	.comm	_sender_msqid,4,2               ; @sender_msqid
	.comm	_IPC_STAT,4,2                   ; @IPC_STAT
l_.str.3:                               ; @.str.3
	.asciz	"msgctl IPC_STAT"

.subsections_via_symbols
