	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drv_sgmode
_drv_sgmode:                            ## @drv_sgmode
	.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	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	(%rdi), %r13
	movq	_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_AssertTCB
	testl	%r12d, %r12d
	je	LBB0_1
## %bb.4:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	_errno@GOTPCREL(%rip), %r12
	movq	_EINTR@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_SET_TTY
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r12), %rax
	cmpq	(%r13), %rax
	je	LBB0_5
## %bb.7:
	movq	_ENOTTY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	jne	LBB0_10
## %bb.8:
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.9:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rcx)
	jmp	LBB0_10
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %r12
	movq	_EINTR@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_GET_TTY
	testq	%rax, %rax
	je	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rax
	cmpq	(%r13), %rax
	je	LBB0_2
LBB0_10:
	movq	_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OK,4,2                         ## @OK
	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
	.comm	_ENOTTY,8,3                     ## @ENOTTY
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_ERR,4,2                        ## @ERR
	.no_dead_strip	_drv_sgmode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drv_sgmode
_drv_sgmode:                            ; @drv_sgmode
	.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
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x23, [x0]
Lloh0:
	adrp	x8, _OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OK@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	bl	_AssertTCB
	cbz	w22, LBB0_6
; %bb.1:
Lloh3:
	adrp	x22, _errno@GOTPAGE
Lloh4:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
Lloh5:
	adrp	x24, _EINTR@GOTPAGE
Lloh6:
	ldr	x24, [x24, _EINTR@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	mov	x1, x20
	bl	_SET_TTY
	cbz	x0, LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x22]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.4:
Lloh7:
	adrp	x9, _ENOTTY@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ENOTTY@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	ccmp	x23, #0, #4, eq
	b.eq	LBB0_9
; %bb.5:
Lloh10:
	adrp	x8, _TRUE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x23]
	b	LBB0_9
LBB0_6:
Lloh13:
	adrp	x22, _errno@GOTPAGE
Lloh14:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
Lloh15:
	adrp	x23, _EINTR@GOTPAGE
Lloh16:
	ldr	x23, [x23, _EINTR@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	mov	x1, x20
	bl	_GET_TTY
	cbz	x0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x22]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_7
LBB0_9:
Lloh17:
	adrp	x8, _ERR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ERR@GOTPAGEOFF]
Lloh19:
	ldr	w19, [x8]
LBB0_10:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_OK,4,2                         ; @OK
	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
	.comm	_ENOTTY,8,3                     ; @ENOTTY
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_ERR,4,2                        ; @ERR
	.no_dead_strip	_drv_sgmode
.subsections_via_symbols
