	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amq_fork
_amq_fork:                              ## @amq_fork
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rdi
	callq	_find_ap
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	(%rax), %rdi
	callq	_pipe
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:
	movq	_SIGHUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sigmask
	movl	%eax, %r15d
	movq	_SIGINT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sigmask
	orl	%eax, %r15d
	movq	_SIGQUIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sigmask
	movl	%eax, %ebx
	movq	_SIGCHLD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sigmask
	orl	%eax, %ebx
	orl	%r15d, %ebx
	movl	%ebx, %edi
	callq	_sigblock
	movl	%eax, %r15d
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_background
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, %r12d
	cmpl	$-1, %eax
	jne	LBB0_8
## %bb.6:
	leaq	L_.str(%rip), %rdi
	callq	_dlog
	movl	$-1, %ebx
	jmp	LBB0_9
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movl	$-1, %ebx
	jmp	LBB0_9
LBB0_3:
	movq	(%r14), %rax
	movq	$-1, (%rax)
	movl	$-1, %ebx
	jmp	LBB0_9
LBB0_7:
	movq	(%r14), %rax
	movl	4(%rax), %edi
	callq	_close
	movq	(%r14), %rax
	movl	$-1, 4(%rax)
	jmp	LBB0_9
LBB0_8:
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_close
	movq	(%r14), %rax
	movl	$-1, (%rax)
	movl	%r15d, %edi
	callq	_sigsetmask
	movl	%r12d, %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.comm	_SIGHUP,4,2                     ## @SIGHUP
	.comm	_SIGINT,4,2                     ## @SIGINT
	.comm	_SIGQUIT,4,2                    ## @SIGQUIT
	.comm	_SIGCHLD,4,2                    ## @SIGCHLD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"amq_fork failed"

	.comm	_SIG_BLOCK,4,2                  ## @SIG_BLOCK
	.comm	_SIG_SETMASK,4,2                ## @SIG_SETMASK
	.no_dead_strip	_amq_fork
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amq_fork
_amq_fork:                              ; @amq_fork
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x0, [x0]
	bl	_find_ap
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	x0, [x0]
	bl	_pipe
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.2:
Lloh0:
	adrp	x8, _SIGHUP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIGHUP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_sigmask
	mov	x20, x0
Lloh3:
	adrp	x8, _SIGINT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIGINT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_sigmask
	orr	w20, w0, w20
Lloh6:
	adrp	x8, _SIGQUIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SIGQUIT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_sigmask
	orr	w20, w20, w0
Lloh9:
	adrp	x8, _SIGCHLD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SIGCHLD@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_sigmask
	orr	w0, w20, w0
	bl	_sigblock
	mov	x21, x0
	bl	_background
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.3:
	cmn	w20, #1
	b.ne	LBB0_8
; %bb.4:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dlog
	b	LBB0_9
LBB0_5:
Lloh14:
	adrp	x8, _errno@GOTPAGE
Lloh15:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh16:
	str	xzr, [x8]
	mov	w20, #-1
	b	LBB0_9
LBB0_6:
	ldr	x8, [x19]
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x8]
	mov	w20, #-1
	b	LBB0_9
LBB0_7:
	ldr	x8, [x19]
	ldr	w0, [x8, #4]
	bl	_close
	ldr	x8, [x19]
	mov	w9, #-1
	str	w9, [x8, #4]
	b	LBB0_9
LBB0_8:
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_close
	ldr	x8, [x19]
	mov	w9, #-1
	str	w9, [x8]
	mov	x0, x21
	bl	_sigsetmask
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.comm	_SIGHUP,4,2                     ; @SIGHUP
	.comm	_SIGINT,4,2                     ; @SIGINT
	.comm	_SIGQUIT,4,2                    ; @SIGQUIT
	.comm	_SIGCHLD,4,2                    ; @SIGCHLD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"amq_fork failed"

	.comm	_SIG_BLOCK,4,2                  ; @SIG_BLOCK
	.comm	_SIG_SETMASK,4,2                ; @SIG_SETMASK
	.no_dead_strip	_amq_fork
.subsections_via_symbols
