	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_SIGHUP@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	-48(%rbp), %rdx
	xorl	%esi, %esi
	callq	_sigaction
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$-1, %edi
	callq	_err
LBB0_2:
	movq	_signal_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movl	-48(%rbp), %eax
	movq	_SA_RESTART@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	testl	%eax, %ecx
	je	LBB0_4
## %bb.3:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movl	(%rbx), %ecx
	movl	-48(%rbp), %eax
LBB0_4:
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, -48(%rbp)
	movl	(%r14), %edi
	leaq	-48(%rbp), %rsi
	xorl	%edx, %edx
	callq	_sigaction
	testq	%rax, %rax
	jns	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movl	$-1, %edi
	callq	_err
LBB0_6:
	movq	_PF_LOCAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rcx
	xorl	%edx, %edx
	callq	_socketpair
	testq	%rax, %rax
	jns	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	movl	$-1, %edi
	callq	_err
LBB0_8:
	movl	-56(%rbp), %r14d
	movl	-52(%rbp), %r15d
	xorl	%eax, %eax
	callq	_fork
	movq	%rax, %r12
	testq	%rax, %rax
	jns	LBB0_10
## %bb.9:
	leaq	L_.str.4(%rip), %rsi
	movl	$-1, %edi
	callq	_err
	jmp	LBB0_11
LBB0_10:
	jne	LBB0_11
## %bb.15:
	movl	%r14d, %edi
	callq	_close
	movl	%r15d, %edi
	callq	_blocking_recver
	xorl	%edi, %edi
	callq	_exit
LBB0_11:
	xorl	%eax, %eax
	callq	_fork
	movq	%rax, %rbx
	testq	%rax, %rax
	jns	LBB0_13
## %bb.12:
	movq	_errno@GOTPCREL(%rip), %r15
	movl	(%r15), %r13d
	movq	_SIGKILL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_kill
	movl	%r13d, (%r15)
	leaq	L_.str.4(%rip), %rsi
	movl	$-1, %edi
	callq	_err
	jmp	LBB0_14
LBB0_13:
	jne	LBB0_14
## %bb.16:
	movl	%r14d, %edi
	callq	_close
	movl	%r15d, %edi
	callq	_locking_recver
	xorl	%edi, %edi
	callq	_exit
LBB0_14:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_signaller
	movq	_SIGKILL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_kill
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_kill
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_SIGHUP,4,2                     ## @SIGHUP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FAIL: sigaction(SIGHUP, NULL, &sa)"

	.comm	_signal_handler,4,2             ## @signal_handler
	.comm	_SA_RESTART,4,2                 ## @SA_RESTART
L_.str.2:                               ## @.str.2
	.asciz	"FAIL: sigaction(SIGHUP, &sa, NULL)"

	.comm	_PF_LOCAL,4,2                   ## @PF_LOCAL
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
L_.str.3:                               ## @.str.3
	.asciz	"FAIL: socketpair(PF_LOCAL, SOGK_STREAM, 0)"

L_.str.4:                               ## @.str.4
	.asciz	"FAIL: fork"

	.comm	_errno,4,2                      ## @errno
	.comm	_SIGKILL,4,2                    ## @SIGKILL
	.comm	_SIG_ERR,8,3                    ## @SIG_ERR
L_str:                                  ## @str
	.asciz	"SIGHUP restartable by default (cleared)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x19, _SIGHUP@GOTPAGE
Lloh1:
	ldr	x19, [x19, _SIGHUP@GOTPAGEOFF]
	ldr	w0, [x19]
	mov	x2, sp
	mov	x1, #0
	bl	_sigaction
	tbz	x0, #63, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_2:
Lloh4:
	adrp	x8, _signal_handler@GOTPAGE
Lloh5:
	ldr	x8, [x8, _signal_handler@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [sp, #4]
	ldr	w8, [sp]
Lloh7:
	adrp	x20, _SA_RESTART@GOTPAGE
Lloh8:
	ldr	x20, [x20, _SA_RESTART@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh9:
	adrp	x0, l_str@PAGE
Lloh10:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	ldr	w9, [x20]
	ldr	w8, [sp]
LBB0_4:
	bic	w8, w8, w9
	str	w8, [sp]
	ldr	w0, [x19]
	mov	x1, sp
	mov	x2, #0
	bl	_sigaction
	tbz	x0, #63, LBB0_6
; %bb.5:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_6:
Lloh13:
	adrp	x8, _PF_LOCAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PF_LOCAL@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x3, sp, #8
	mov	w2, #0
	bl	_socketpair
	tbz	x0, #63, LBB0_8
; %bb.7:
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_8:
	ldp	w19, w21, [sp, #8]
	bl	_fork
	mov	x20, x0
	tbz	x0, #63, LBB0_10
; %bb.9:
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #-1
	bl	_err
	b	LBB0_12
LBB0_10:
	cbnz	x20, LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_close
	mov	x0, x21
	bl	_blocking_recver
	mov	w0, #0
	bl	_exit
LBB0_12:
	bl	_fork
	mov	x22, x0
Lloh23:
	adrp	x23, _SIGKILL@GOTPAGE
Lloh24:
	ldr	x23, [x23, _SIGKILL@GOTPAGEOFF]
	tbz	x0, #63, LBB0_14
; %bb.13:
Lloh25:
	adrp	x21, _errno@GOTPAGE
Lloh26:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	w24, [x21]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_kill
	str	w24, [x21]
Lloh27:
	adrp	x1, l_.str.4@PAGE
Lloh28:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #-1
	bl	_err
	b	LBB0_16
LBB0_14:
	cbnz	x22, LBB0_16
; %bb.15:
	mov	x0, x19
	bl	_close
	mov	x0, x21
	bl	_locking_recver
	mov	w0, #0
	bl	_exit
LBB0_16:
	mov	x0, x22
	mov	x1, x19
	bl	_signaller
	ldr	w1, [x23]
	mov	x0, x20
	bl	_kill
	ldr	w1, [x23]
	mov	x0, x22
	bl	_kill
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_SIGHUP,4,2                     ; @SIGHUP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FAIL: sigaction(SIGHUP, NULL, &sa)"

	.comm	_signal_handler,4,2             ; @signal_handler
	.comm	_SA_RESTART,4,2                 ; @SA_RESTART
l_.str.2:                               ; @.str.2
	.asciz	"FAIL: sigaction(SIGHUP, &sa, NULL)"

	.comm	_PF_LOCAL,4,2                   ; @PF_LOCAL
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
l_.str.3:                               ; @.str.3
	.asciz	"FAIL: socketpair(PF_LOCAL, SOGK_STREAM, 0)"

l_.str.4:                               ; @.str.4
	.asciz	"FAIL: fork"

	.comm	_errno,4,2                      ; @errno
	.comm	_SIGKILL,4,2                    ; @SIGKILL
	.comm	_SIG_ERR,8,3                    ; @SIG_ERR
l_str:                                  ; @str
	.asciz	"SIGHUP restartable by default (cleared)"

.subsections_via_symbols
