	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r15d
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_sigemptyset
	xorl	%edi, %edi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_sigprocmask
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_getprogname
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_2:
	movq	_SIGUSR1@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-40(%rbp), %rdi
	callq	_sigismember
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	xorl	%eax, %eax
	callq	_getprogname
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_4:
	movl	(%rbx), %edi
	leaq	-48(%rbp), %rdx
	xorl	%esi, %esi
	callq	_sigaction
	testq	%rax, %rax
	jns	LBB0_6
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_getprogname
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_6:
	movq	-48(%rbp), %rax
	movq	_SIG_DFL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_getprogname
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	callq	_fprintf
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_8:
	cmpl	$2, %r15d
	jl	LBB0_14
## %bb.9:
	movq	8(%r14), %rdi
	callq	_atoi
	cmpl	$3, %eax
	jl	LBB0_14
## %bb.10:
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_getprogname
	leaq	L_.str.4(%rip), %rdi
	movq	%rax, %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_printf
	leaq	-33(%rbp), %rsi
	movl	%r14d, %edi
	movl	$1, %edx
	callq	_read
	cmpl	$-1, %eax
	je	LBB0_13
## %bb.11:
	cmpl	$1, %eax
	jne	LBB0_14
## %bb.12:
	xorl	%eax, %eax
	callq	_getprogname
	movsbl	-33(%rbp), %edx
	leaq	L_.str.5(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_14
LBB0_13:
	xorl	%eax, %eax
	callq	_getprogname
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	L_.str.6(%rip), %rdi
	movq	%rax, %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_printf
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_14:
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXIT_SUCCESS,4,2               ## @EXIT_SUCCESS
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: sigprocmask error\n"

	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.comm	_SIGUSR1,4,2                    ## @SIGUSR1
L_.str.1:                               ## @.str.1
	.asciz	"%s: SIGUSR not in procmask\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s: sigaction error\n"

	.comm	_SIG_DFL,8,3                    ## @SIG_DFL
L_.str.3:                               ## @.str.3
	.asciz	"%s: SIGUSR1 action != SIG_DFL\n"

L_.str.4:                               ## @.str.4
	.asciz	"%s: waiting for command from parent on pipe %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"%s: got command %c from parent\n"

L_.str.6:                               ## @.str.6
	.asciz	"%s: %d is no pipe, errno %d\n"

	.comm	_errno,4,2                      ## @errno
.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	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
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _EXIT_SUCCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXIT_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	add	x0, sp, #28
	bl	_sigemptyset
	add	x2, sp, #28
	mov	w0, #0
	mov	x1, #0
	bl	_sigprocmask
	tbz	x0, #63, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _stderr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh5:
	ldr	w19, [x8]
	bl	_getprogname
	mov	x2, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_fprintf
Lloh8:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh10:
	ldr	w19, [x8]
LBB0_2:
Lloh11:
	adrp	x22, _SIGUSR1@GOTPAGE
Lloh12:
	ldr	x22, [x22, _SIGUSR1@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x0, sp, #28
	bl	_sigismember
	cbnz	w0, LBB0_4
; %bb.3:
Lloh13:
	adrp	x8, _stderr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh15:
	ldr	w19, [x8]
	bl	_getprogname
	mov	x2, x0
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_fprintf
Lloh18:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh20:
	ldr	w19, [x8]
LBB0_4:
	ldr	w0, [x22]
	add	x2, sp, #16
	mov	x1, #0
	bl	_sigaction
	tbz	x0, #63, LBB0_6
; %bb.5:
Lloh21:
	adrp	x8, _stderr@GOTPAGE
Lloh22:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh23:
	ldr	w19, [x8]
	bl	_getprogname
	mov	x2, x0
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_fprintf
Lloh26:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh28:
	ldr	w19, [x8]
LBB0_6:
	ldr	x8, [sp, #16]
Lloh29:
	adrp	x9, _SIG_DFL@GOTPAGE
Lloh30:
	ldr	x9, [x9, _SIG_DFL@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.7:
Lloh32:
	adrp	x8, _stderr@GOTPAGE
Lloh33:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh34:
	ldr	w19, [x8]
	bl	_getprogname
	mov	x2, x0
Lloh35:
	adrp	x1, l_.str.3@PAGE
Lloh36:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_fprintf
Lloh37:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh39:
	ldr	w19, [x8]
LBB0_8:
	cmp	w21, #2
	b.lt	LBB0_14
; %bb.9:
	ldr	x0, [x20, #8]
	bl	_atoi
	cmp	w0, #3
	b.lt	LBB0_14
; %bb.10:
	mov	x20, x0
	bl	_getprogname
	mov	x1, x0
Lloh40:
	adrp	x0, l_.str.4@PAGE
Lloh41:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x2, x20
	bl	_printf
	add	x1, sp, #15
	mov	x0, x20
	mov	w2, #1
	bl	_read
	cmn	w0, #1
	b.eq	LBB0_13
; %bb.11:
	cmp	w0, #1
	b.ne	LBB0_14
; %bb.12:
	bl	_getprogname
	mov	x1, x0
	ldrsb	w2, [sp, #15]
Lloh42:
	adrp	x0, l_.str.5@PAGE
Lloh43:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_printf
	b	LBB0_14
LBB0_13:
	bl	_getprogname
	mov	x1, x0
Lloh44:
	adrp	x8, _errno@GOTPAGE
Lloh45:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh47:
	adrp	x0, l_.str.6@PAGE
Lloh48:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	x2, x20
	bl	_printf
Lloh49:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh50:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh51:
	ldr	w19, [x8]
LBB0_14:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_EXIT_SUCCESS,4,2               ; @EXIT_SUCCESS
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: sigprocmask error\n"

	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.comm	_SIGUSR1,4,2                    ; @SIGUSR1
l_.str.1:                               ; @.str.1
	.asciz	"%s: SIGUSR not in procmask\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s: sigaction error\n"

	.comm	_SIG_DFL,8,3                    ; @SIG_DFL
l_.str.3:                               ; @.str.3
	.asciz	"%s: SIGUSR1 action != SIG_DFL\n"

l_.str.4:                               ; @.str.4
	.asciz	"%s: waiting for command from parent on pipe %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"%s: got command %c from parent\n"

l_.str.6:                               ; @.str.6
	.asciz	"%s: %d is no pipe, errno %d\n"

	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
