	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tty_ioctl
_tty_ioctl:                             ## @tty_ioctl
	.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	%rdx, %r14
	movl	%esi, %ebx
	movq	(%rdi), %r12
	movq	%r12, %rdi
	callq	_lock
	cmpq	$0, 32(%r12)
	je	LBB0_3
## %bb.1:
	movq	%r12, %rdi
	callq	_unlock
	cmpl	$128, %ebx
	jne	LBB0_8
## %bb.2:
	movq	__ENOTTY@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_24
LBB0_3:
	leal	-128(%rbx), %eax
	cmpl	$7, %eax
	ja	LBB0_14
## %bb.4:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_5:
	movq	%r12, %rdi
	callq	_unlock
	movq	_pids_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_lock
	movq	%r12, %rdi
	callq	_lock
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_unlock
	movq	%r12, %rdi
	callq	_tty_is_current
	testl	%eax, %eax
	je	LBB0_13
## %bb.6:
	cmpl	24(%r12), %ebx
	jne	LBB0_13
## %bb.7:
	movl	(%r14), %esi
	movl	%esi, 20(%r12)
	leaq	L_.str.1(%rip), %rdi
	callq	_STRACE
	jmp	LBB0_22
LBB0_8:
	movq	__EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_24
LBB0_9:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_tiocsctty
	jmp	LBB0_17
LBB0_10:
	movq	%r12, %rdi
	callq	_tty_is_current
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	movl	20(%r12), %esi
	testl	%esi, %esi
	je	LBB0_13
## %bb.12:
	leaq	L_.str(%rip), %rdi
	callq	_STRACE
	movl	20(%r12), %eax
	jmp	LBB0_21
LBB0_13:
	movq	__ENOTTY@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_23
LBB0_14:
	movq	%r12, %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	_tty_mode_ioctl
	movl	%eax, %r15d
	movq	__ENOTTY@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_23
## %bb.15:
	movq	8(%r12), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_23
## %bb.16:
	movq	%r12, %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	*%rax
LBB0_17:
	movl	%eax, %r15d
	jmp	LBB0_23
LBB0_18:
	xorl	%r15d, %r15d
	leal	-132(%r14), %eax
	cmpl	$2, %eax
	jae	LBB0_25
## %bb.19:
	movl	$0, 16(%r12)
	leaq	28(%r12), %rdi
	callq	_notify
	jmp	LBB0_23
LBB0_20:
	movl	16(%r12), %eax
LBB0_21:
	movl	%eax, (%r14)
LBB0_22:
	xorl	%r15d, %r15d
LBB0_23:
	movq	%r12, %rdi
	callq	_unlock
LBB0_24:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	cmpl	$131, %r14d
	je	LBB0_23
## %bb.26:
	movq	__EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_23
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_18
	.long	L0_0_set_20
	.end_data_region
                                        ## -- End function
	.comm	__ENOTTY,4,2                    ## @_ENOTTY
	.comm	__EIO,4,2                       ## @_EIO
	.comm	__EINVAL,4,2                    ## @_EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tty group = %d\n"

	.comm	_pids_lock,4,2                  ## @pids_lock
	.comm	_current,8,3                    ## @current
L_.str.1:                               ## @.str.1
	.asciz	"tty group set to = %d\n"

	.no_dead_strip	_tty_ioctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tty_ioctl
_tty_ioctl:                             ; @tty_ioctl
	.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
	mov	x20, x2
	mov	x22, x1
	ldr	x19, [x0]
	mov	x0, x19
	bl	_lock
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_unlock
	cmp	w22, #128
	b.ne	LBB0_8
; %bb.2:
Lloh0:
	adrp	x8, __ENOTTY@GOTPAGE
Lloh1:
	ldr	x8, [x8, __ENOTTY@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	b	LBB0_25
LBB0_3:
	sub	w8, w22, #128
	cmp	w8, #7
	b.hi	LBB0_15
; %bb.4:
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_5
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_5:
	mov	x0, x19
	bl	_unlock
Lloh5:
	adrp	x21, _pids_lock@GOTPAGE
Lloh6:
	ldr	x21, [x21, _pids_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_lock
	mov	x0, x19
	bl	_lock
Lloh7:
	adrp	x8, _current@GOTPAGE
Lloh8:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w22, [x8]
	mov	x0, x21
	bl	_unlock
	mov	x0, x19
	bl	_tty_is_current
	cbz	w0, LBB0_13
; %bb.6:
	ldr	w8, [x19, #24]
	cmp	w22, w8
	b.ne	LBB0_13
; %bb.7:
	ldr	w1, [x20]
	str	w1, [x19, #20]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_STRACE
	mov	w21, #0
	b	LBB0_24
LBB0_8:
Lloh12:
	adrp	x8, __EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, __EIO@GOTPAGEOFF]
Lloh14:
	ldr	w21, [x8]
	b	LBB0_25
LBB0_9:
	mov	x0, x19
	mov	x1, x20
	bl	_tiocsctty
	b	LBB0_18
LBB0_10:
	mov	x0, x19
	bl	_tty_is_current
	cbz	w0, LBB0_13
; %bb.11:
	ldr	w1, [x19, #20]
	cbz	w1, LBB0_13
; %bb.12:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_STRACE
	mov	w21, #0
	ldr	w8, [x19, #20]
	str	w8, [x20]
	b	LBB0_24
LBB0_13:
Lloh17:
	adrp	x8, __ENOTTY@GOTPAGE
Lloh18:
	ldr	x8, [x8, __ENOTTY@GOTPAGEOFF]
LBB0_14:
	ldr	w21, [x8]
	b	LBB0_24
LBB0_15:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_tty_mode_ioctl
	mov	x21, x0
Lloh19:
	adrp	x8, __ENOTTY@GOTPAGE
Lloh20:
	ldr	x8, [x8, __ENOTTY@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_24
; %bb.16:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_24
; %bb.17:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	blr	x8
LBB0_18:
	mov	x21, x0
	b	LBB0_24
LBB0_19:
	sub	w8, w20, #132
	cmp	w8, #2
	b.hs	LBB0_22
; %bb.20:
	str	wzr, [x19, #16]
	add	x0, x19, #28
	bl	_notify
	mov	w21, #0
	b	LBB0_24
LBB0_21:
	mov	w21, #0
	ldr	w8, [x19, #16]
	str	w8, [x20]
	b	LBB0_24
LBB0_22:
	cmp	w20, #131
	b.ne	LBB0_26
; %bb.23:
	mov	w21, #0
LBB0_24:
	mov	x0, x19
	bl	_unlock
LBB0_25:
	mov	x0, x21
	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
LBB0_26:
Lloh22:
	adrp	x8, __EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, __EINVAL@GOTPAGEOFF]
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_9-LBB0_5)>>2
	.byte	(LBB0_10-LBB0_5)>>2
	.byte	(LBB0_15-LBB0_5)>>2
	.byte	(LBB0_15-LBB0_5)>>2
	.byte	(LBB0_15-LBB0_5)>>2
	.byte	(LBB0_19-LBB0_5)>>2
	.byte	(LBB0_21-LBB0_5)>>2
                                        ; -- End function
	.comm	__ENOTTY,4,2                    ; @_ENOTTY
	.comm	__EIO,4,2                       ; @_EIO
	.comm	__EINVAL,4,2                    ; @_EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tty group = %d\n"

	.comm	_pids_lock,4,2                  ; @pids_lock
	.comm	_current,8,3                    ; @current
l_.str.1:                               ; @.str.1
	.asciz	"tty group set to = %d\n"

	.no_dead_strip	_tty_ioctl
.subsections_via_symbols
