	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_job_control_test               ## -- Begin function job_control_test
	.p2align	4, 0x90
_job_control_test:                      ## @job_control_test
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	leaq	-32(%rbp), %rdi
	callq	_sigemptyset
	movq	_SA_SIGINFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movq	_job_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	_SIGCHLD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-40(%rbp), %rsi
	xorl	%edx, %edx
	callq	_sigaction
	movq	_stop_received@GOTPCREL(%rip), %r14
	movq	$0, (%r14)
	movq	_cont_received@GOTPCREL(%rip), %rbx
	movq	$0, (%rbx)
	movq	_exit_received@GOTPCREL(%rip), %r15
	movq	$0, (%r15)
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
	xorl	%eax, %eax
	callq	_fork
	testq	%rax, %rax
	je	LBB0_37
## %bb.1:
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.3:
	movq	(%r15), %rdx
	testq	%rdx, %rdx
	jne	LBB0_32
LBB0_4:
	movl	$1, %edi
	callq	_sleep
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.6:
	movq	(%r15), %rdx
	testq	%rdx, %rdx
	jne	LBB0_32
LBB0_7:
	movl	$1, %edi
	callq	_sleep
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.9:
	movq	(%r15), %rdx
	testq	%rdx, %rdx
	jne	LBB0_32
LBB0_10:
	movl	$1, %edi
	callq	_sleep
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_13
## %bb.12:
	movq	(%r15), %rdx
	testq	%rdx, %rdx
	jne	LBB0_32
LBB0_13:
	movl	$1, %edi
	callq	_sleep
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.15:
	movq	(%r15), %rdx
	testq	%rdx, %rdx
	jne	LBB0_32
LBB0_16:
	movl	$1, %edi
	callq	_sleep
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_19
## %bb.17:
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_19
## %bb.18:
	movq	(%r15), %rdx
	testq	%rdx, %rdx
	jne	LBB0_32
LBB0_19:
	movl	$1, %edi
	callq	_sleep
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_22
## %bb.20:
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_22
## %bb.21:
	movq	(%r15), %rdx
	testq	%rdx, %rdx
	jne	LBB0_32
LBB0_22:
	movl	$1, %edi
	callq	_sleep
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_25
## %bb.23:
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_25
## %bb.24:
	movq	(%r15), %rdx
	testq	%rdx, %rdx
	jne	LBB0_32
LBB0_25:
	movl	$1, %edi
	callq	_sleep
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_28
## %bb.26:
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_28
## %bb.27:
	movq	(%r15), %rdx
	testq	%rdx, %rdx
	jne	LBB0_32
LBB0_28:
	movl	$1, %edi
	callq	_sleep
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_31
## %bb.29:
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_31
## %bb.30:
	movq	(%r15), %rdx
	testq	%rdx, %rdx
	jne	LBB0_32
LBB0_31:
	movl	$1, %edi
	callq	_sleep
	movq	(%rbx), %rax
	movq	(%r14), %rcx
	movq	(%r15), %rdx
LBB0_32:
	testq	%rax, %rax
	je	LBB0_35
## %bb.33:
	testq	%rcx, %rcx
	je	LBB0_35
## %bb.34:
	testq	%rdx, %rdx
	jne	LBB0_36
LBB0_35:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_errx
LBB0_36:
	leaq	L_str(%rip), %rdi
	callq	_puts
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_37:
	xorl	%eax, %eax
	callq	_getpid
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printf
	xorl	%eax, %eax
	callq	_getpid
	movq	_SIGSTOP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_kill
	movl	$2, %edi
	callq	_sleep
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_SA_SIGINFO,4,2                 ## @SA_SIGINFO
	.comm	_job_handler,4,2                ## @job_handler
	.comm	_SIGCHLD,4,2                    ## @SIGCHLD
	.comm	_stop_received,8,3              ## @stop_received
	.comm	_cont_received,8,3              ## @cont_received
	.comm	_exit_received,8,3              ## @exit_received
	.comm	_stdout,4,2                     ## @stdout
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"child %d\n"

	.comm	_SIGSTOP,4,2                    ## @SIGSTOP
L_.str.1:                               ## @.str.1
	.asciz	"job signals lost"

L_str:                                  ## @str
	.asciz	"job control test OK."

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_job_control_test               ; -- Begin function job_control_test
	.p2align	2
_job_control_test:                      ; @job_control_test
	.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
	add	x8, sp, #16
	add	x0, x8, #8
	bl	_sigemptyset
Lloh0:
	adrp	x8, _SA_SIGINFO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SA_SIGINFO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _job_handler@GOTPAGE
Lloh4:
	ldr	x9, [x9, _job_handler@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #16]
Lloh6:
	adrp	x8, _SIGCHLD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SIGCHLD@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	add	x1, sp, #16
	mov	x2, #0
	bl	_sigaction
Lloh9:
	adrp	x19, _stop_received@GOTPAGE
Lloh10:
	ldr	x19, [x19, _stop_received@GOTPAGEOFF]
	str	xzr, [x19]
Lloh11:
	adrp	x21, _cont_received@GOTPAGE
Lloh12:
	ldr	x21, [x21, _cont_received@GOTPAGEOFF]
	str	xzr, [x21]
Lloh13:
	adrp	x20, _exit_received@GOTPAGE
Lloh14:
	ldr	x20, [x20, _exit_received@GOTPAGEOFF]
	str	xzr, [x20]
Lloh15:
	adrp	x8, _stdout@GOTPAGE
Lloh16:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_fflush
	bl	_fork
	cbz	x0, LBB0_37
; %bb.1:
	ldr	x8, [x21]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	x9, [x19]
	cbz	x9, LBB0_4
; %bb.3:
	ldr	x10, [x20]
	cbnz	x10, LBB0_32
LBB0_4:
	mov	w0, #1
	bl	_sleep
	ldr	x8, [x21]
	cbz	x8, LBB0_7
; %bb.5:
	ldr	x9, [x19]
	cbz	x9, LBB0_7
; %bb.6:
	ldr	x10, [x20]
	cbnz	x10, LBB0_32
LBB0_7:
	mov	w0, #1
	bl	_sleep
	ldr	x8, [x21]
	cbz	x8, LBB0_10
; %bb.8:
	ldr	x9, [x19]
	cbz	x9, LBB0_10
; %bb.9:
	ldr	x10, [x20]
	cbnz	x10, LBB0_32
LBB0_10:
	mov	w0, #1
	bl	_sleep
	ldr	x8, [x21]
	cbz	x8, LBB0_13
; %bb.11:
	ldr	x9, [x19]
	cbz	x9, LBB0_13
; %bb.12:
	ldr	x10, [x20]
	cbnz	x10, LBB0_32
LBB0_13:
	mov	w0, #1
	bl	_sleep
	ldr	x8, [x21]
	cbz	x8, LBB0_16
; %bb.14:
	ldr	x9, [x19]
	cbz	x9, LBB0_16
; %bb.15:
	ldr	x10, [x20]
	cbnz	x10, LBB0_32
LBB0_16:
	mov	w0, #1
	bl	_sleep
	ldr	x8, [x21]
	cbz	x8, LBB0_19
; %bb.17:
	ldr	x9, [x19]
	cbz	x9, LBB0_19
; %bb.18:
	ldr	x10, [x20]
	cbnz	x10, LBB0_32
LBB0_19:
	mov	w0, #1
	bl	_sleep
	ldr	x8, [x21]
	cbz	x8, LBB0_22
; %bb.20:
	ldr	x9, [x19]
	cbz	x9, LBB0_22
; %bb.21:
	ldr	x10, [x20]
	cbnz	x10, LBB0_32
LBB0_22:
	mov	w0, #1
	bl	_sleep
	ldr	x8, [x21]
	cbz	x8, LBB0_25
; %bb.23:
	ldr	x9, [x19]
	cbz	x9, LBB0_25
; %bb.24:
	ldr	x10, [x20]
	cbnz	x10, LBB0_32
LBB0_25:
	mov	w0, #1
	bl	_sleep
	ldr	x8, [x21]
	cbz	x8, LBB0_28
; %bb.26:
	ldr	x9, [x19]
	cbz	x9, LBB0_28
; %bb.27:
	ldr	x10, [x20]
	cbnz	x10, LBB0_32
LBB0_28:
	mov	w0, #1
	bl	_sleep
	ldr	x8, [x21]
	cbz	x8, LBB0_31
; %bb.29:
	ldr	x9, [x19]
	cbz	x9, LBB0_31
; %bb.30:
	ldr	x10, [x20]
	cbnz	x10, LBB0_32
LBB0_31:
	mov	w0, #1
	bl	_sleep
	ldr	x8, [x21]
	ldr	x9, [x19]
	ldr	x10, [x20]
LBB0_32:
	cbz	x8, LBB0_35
; %bb.33:
	cbz	x9, LBB0_35
; %bb.34:
	cbnz	x10, LBB0_36
LBB0_35:
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_36:
Lloh20:
	adrp	x0, l_str@PAGE
Lloh21:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	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_37:
	bl	_getpid
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	bl	_getpid
Lloh24:
	adrp	x8, _SIGSTOP@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SIGSTOP@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	bl	_kill
	mov	w0, #2
	bl	_sleep
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_SA_SIGINFO,4,2                 ; @SA_SIGINFO
	.comm	_job_handler,4,2                ; @job_handler
	.comm	_SIGCHLD,4,2                    ; @SIGCHLD
	.comm	_stop_received,8,3              ; @stop_received
	.comm	_cont_received,8,3              ; @cont_received
	.comm	_exit_received,8,3              ; @exit_received
	.comm	_stdout,4,2                     ; @stdout
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"child %d\n"

	.comm	_SIGSTOP,4,2                    ; @SIGSTOP
l_.str.1:                               ; @.str.1
	.asciz	"job signals lost"

l_str:                                  ; @str
	.asciz	"job control test OK."

.subsections_via_symbols
