	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setjobctl                      ## -- Begin function setjobctl
	.p2align	4, 0x90
_setjobctl:                             ## @setjobctl
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_jobctl@GOTPCREL(%rip), %r15
	cmpl	%edi, (%r15)
	je	LBB0_24
## %bb.1:
	movq	_rootshell@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_24
## %bb.2:
	movl	%edi, %r14d
	testl	%edi, %edi
	je	LBB0_20
## %bb.3:
	movq	_ttyfd@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	cmpl	$-1, %edi
	je	LBB0_5
## %bb.4:
	callq	_close
LBB0_5:
	movq	__PATH_TTY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movq	_O_CLOEXEC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_open
	movl	%eax, %ebx
	movl	%eax, (%r12)
	testl	%eax, %eax
	jns	LBB0_10
## %bb.6:
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_isatty
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movl	$1, %ebx
	movl	$1, %edi
	callq	_isatty
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movl	$2, %ebx
	movl	$2, %edi
	callq	_isatty
	testl	%eax, %eax
	je	LBB0_17
LBB0_9:
	movq	_F_DUPFD_CLOEXEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movl	$10, %edx
	callq	_fcntl
	movl	%eax, %ebx
	movl	%eax, (%r12)
	testl	%eax, %eax
	js	LBB0_17
LBB0_10:
	cmpl	$9, %ebx
	ja	LBB0_13
## %bb.11:
	movq	_F_DUPFD_CLOEXEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movl	$10, %edx
	callq	_fcntl
	testl	%eax, %eax
	js	LBB0_17
## %bb.12:
	movl	%eax, %ebx
	movl	(%r12), %edi
	callq	_close
	movl	%ebx, (%r12)
LBB0_13:
	movl	%ebx, %edi
	callq	_tcgetpgrp
	movq	_initialpgrp@GOTPCREL(%rip), %r13
	movl	%eax, (%r13)
	testl	%eax, %eax
	js	LBB0_17
## %bb.14:
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_getpgrp
	cmpl	%eax, %ebx
	je	LBB0_19
## %bb.15:
	movq	_iflag@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_16
## %bb.18:
	movq	_SIGTTIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_kill
LBB0_19:
	movq	_SIGTSTP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_setsignal
	movq	_SIGTTOU@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_setsignal
	movq	_SIGTTIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_setsignal
	movq	_rootpid@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	xorl	%edi, %edi
	callq	_setpgid
	movl	(%r12), %edi
	movl	(%rbx), %esi
	callq	_tcsetpgrp
	jmp	LBB0_23
LBB0_20:
	movq	_initialpgrp@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	xorl	%edi, %edi
	callq	_setpgid
	movq	_ttyfd@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	testl	%edi, %edi
	js	LBB0_22
## %bb.21:
	movl	(%r12), %esi
	callq	_tcsetpgrp
	movl	(%rbx), %edi
	callq	_close
	movl	$-1, (%rbx)
LBB0_22:
	movq	_SIGTSTP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_setsignal
	movq	_SIGTTOU@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_setsignal
	movq	_SIGTTIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_setsignal
LBB0_23:
	movl	%r14d, (%r15)
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	$-1, (%r13)
LBB0_17:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_jobctl_notty                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_jobctl,4,2                     ## @jobctl
	.comm	_rootshell,8,3                  ## @rootshell
	.comm	_ttyfd,4,2                      ## @ttyfd
	.comm	__PATH_TTY,4,2                  ## @_PATH_TTY
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_CLOEXEC,4,2                  ## @O_CLOEXEC
	.comm	_F_DUPFD_CLOEXEC,4,2            ## @F_DUPFD_CLOEXEC
	.comm	_initialpgrp,4,2                ## @initialpgrp
	.comm	_iflag,4,2                      ## @iflag
	.comm	_SIGTTIN,4,2                    ## @SIGTTIN
	.comm	_SIGTSTP,4,2                    ## @SIGTSTP
	.comm	_SIGTTOU,4,2                    ## @SIGTTOU
	.comm	_rootpid,4,2                    ## @rootpid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setjobctl                      ; -- Begin function setjobctl
	.p2align	2
_setjobctl:                             ; @setjobctl
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x21, _jobctl@GOTPAGE
Lloh1:
	ldr	x21, [x21, _jobctl@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh2:
	adrp	x9, _rootshell@GOTPAGE
Lloh3:
	ldr	x9, [x9, _rootshell@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	w8, w0
	ccmp	x9, #0, #4, ne
	b.eq	LBB0_21
; %bb.1:
	mov	x19, x0
	cbz	w0, LBB0_17
; %bb.2:
Lloh5:
	adrp	x22, _ttyfd@GOTPAGE
Lloh6:
	ldr	x22, [x22, _ttyfd@GOTPAGEOFF]
	ldr	w0, [x22]
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.3:
	bl	_close
LBB0_4:
Lloh7:
	adrp	x8, __PATH_TTY@GOTPAGE
Lloh8:
	ldr	x8, [x8, __PATH_TTY@GOTPAGEOFF]
Lloh9:
	adrp	x9, _O_RDWR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _O_RDWR@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	ldr	w8, [x9]
Lloh13:
	adrp	x9, _O_CLOEXEC@GOTPAGE
Lloh14:
	ldr	x9, [x9, _O_CLOEXEC@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_open
	mov	x20, x0
	str	w0, [x22]
	tbz	w0, #31, LBB0_9
; %bb.5:
	mov	w0, #0
	bl	_isatty
	mov	w20, #0
	cbnz	w0, LBB0_8
; %bb.6:
	mov	w20, #1
	mov	w0, #1
	bl	_isatty
	cbnz	w0, LBB0_8
; %bb.7:
	mov	w20, #2
	mov	w0, #2
	bl	_isatty
	cbz	w0, LBB0_23
LBB0_8:
Lloh16:
	adrp	x8, _F_DUPFD_CLOEXEC@GOTPAGE
Lloh17:
	ldr	x8, [x8, _F_DUPFD_CLOEXEC@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #10
	bl	_fcntl
	mov	x20, x0
	str	w0, [x22]
	tbnz	w0, #31, LBB0_23
LBB0_9:
	cmp	w20, #9
	b.hi	LBB0_12
; %bb.10:
Lloh19:
	adrp	x8, _F_DUPFD_CLOEXEC@GOTPAGE
Lloh20:
	ldr	x8, [x8, _F_DUPFD_CLOEXEC@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #10
	bl	_fcntl
	tbnz	w0, #31, LBB0_23
; %bb.11:
	mov	x20, x0
	ldr	w0, [x22]
	bl	_close
	str	w20, [x22]
LBB0_12:
	mov	x0, x20
	bl	_tcgetpgrp
Lloh22:
	adrp	x24, _initialpgrp@GOTPAGE
Lloh23:
	ldr	x24, [x24, _initialpgrp@GOTPAGEOFF]
	str	w0, [x24]
	tbnz	w0, #31, LBB0_23
; %bb.13:
	mov	x20, x0
	bl	_getpgrp
Lloh24:
	adrp	x23, _SIGTTIN@GOTPAGE
Lloh25:
	ldr	x23, [x23, _SIGTTIN@GOTPAGEOFF]
	cmp	w20, w0
	b.eq	LBB0_16
; %bb.14:
Lloh26:
	adrp	x8, _iflag@GOTPAGE
Lloh27:
	ldr	x8, [x8, _iflag@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	cbz	w8, LBB0_22
; %bb.15:
	ldr	w1, [x23]
	mov	w0, #0
	bl	_kill
LBB0_16:
Lloh29:
	adrp	x8, _SIGTSTP@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SIGTSTP@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	bl	_setsignal
Lloh32:
	adrp	x8, _SIGTTOU@GOTPAGE
Lloh33:
	ldr	x8, [x8, _SIGTTOU@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	bl	_setsignal
	ldr	w0, [x23]
	bl	_setsignal
Lloh35:
	adrp	x20, _rootpid@GOTPAGE
Lloh36:
	ldr	x20, [x20, _rootpid@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w0, #0
	bl	_setpgid
	ldr	w0, [x22]
	ldr	w1, [x20]
	bl	_tcsetpgrp
	b	LBB0_20
LBB0_17:
Lloh37:
	adrp	x22, _initialpgrp@GOTPAGE
Lloh38:
	ldr	x22, [x22, _initialpgrp@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #0
	bl	_setpgid
Lloh39:
	adrp	x20, _ttyfd@GOTPAGE
Lloh40:
	ldr	x20, [x20, _ttyfd@GOTPAGEOFF]
	ldr	w0, [x20]
	tbnz	w0, #31, LBB0_19
; %bb.18:
	ldr	w1, [x22]
	bl	_tcsetpgrp
	ldr	w0, [x20]
	bl	_close
	mov	w8, #-1
	str	w8, [x20]
LBB0_19:
Lloh41:
	adrp	x8, _SIGTSTP@GOTPAGE
Lloh42:
	ldr	x8, [x8, _SIGTSTP@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
	bl	_setsignal
Lloh44:
	adrp	x8, _SIGTTOU@GOTPAGE
Lloh45:
	ldr	x8, [x8, _SIGTTOU@GOTPAGEOFF]
Lloh46:
	ldr	w0, [x8]
	bl	_setsignal
Lloh47:
	adrp	x8, _SIGTTIN@GOTPAGE
Lloh48:
	ldr	x8, [x8, _SIGTTIN@GOTPAGEOFF]
Lloh49:
	ldr	w0, [x8]
	bl	_setsignal
LBB0_20:
	str	w19, [x21]
LBB0_21:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_22:
	mov	w8, #-1
	str	w8, [x24]
LBB0_23:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_jobctl_notty
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh11
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_jobctl,4,2                     ; @jobctl
	.comm	_rootshell,8,3                  ; @rootshell
	.comm	_ttyfd,4,2                      ; @ttyfd
	.comm	__PATH_TTY,4,2                  ; @_PATH_TTY
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_CLOEXEC,4,2                  ; @O_CLOEXEC
	.comm	_F_DUPFD_CLOEXEC,4,2            ; @F_DUPFD_CLOEXEC
	.comm	_initialpgrp,4,2                ; @initialpgrp
	.comm	_iflag,4,2                      ; @iflag
	.comm	_SIGTTIN,4,2                    ; @SIGTTIN
	.comm	_SIGTSTP,4,2                    ; @SIGTSTP
	.comm	_SIGTTOU,4,2                    ; @SIGTTOU
	.comm	_rootpid,4,2                    ; @rootpid
.subsections_via_symbols
