	.file	"extr_tinfo_driver.c_drv_sgmode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	drv_sgmode, @function
drv_sgmode:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xor	eax, eax
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, DWORD PTR OK[rip]
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	mov	r14, QWORD PTR [rdi]
	call	AssertTCB@PLT
	test	r12d, r12d
	je	.L2
.L4:
	mov	edi, DWORD PTR [rbx]
	mov	rsi, rbp
	call	SET_TTY@PLT
	test	rax, rax
	je	.L1
	mov	rax, QWORD PTR errno[rip]
	cmp	rax, QWORD PTR EINTR[rip]
	je	.L4
	cmp	QWORD PTR ENOTTY[rip], rax
	jne	.L23
	test	r14, r14
	jne	.L25
	.p2align 4,,10
	.p2align 3
.L23:
	mov	r13d, DWORD PTR ERR[rip]
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edi, DWORD PTR [rbx]
	mov	rsi, rbp
	call	GET_TTY@PLT
	test	rax, rax
	je	.L1
	mov	rax, QWORD PTR EINTR[rip]
	cmp	QWORD PTR errno[rip], rax
	jne	.L23
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L25:
	mov	eax, DWORD PTR TRUE[rip]
	mov	DWORD PTR [r14], eax
	jmp	.L23
	.cfi_endproc
.LFE0:
	.size	drv_sgmode, .-drv_sgmode
	.comm	errno,8,8
	.comm	TRUE,4,4
	.comm	OK,4,4
	.comm	ERR,4,4
	.comm	ENOTTY,8,8
	.comm	EINTR,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_tinfo_driver.c_drv_sgmode.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	drv_sgmode, %function
drv_sgmode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r1
	ldr	r3, .L22
	mov	r4, r0
	mov	r5, r2
	ldr	r8, [r0]
	ldr	r7, [r3]
	bl	AssertTCB
	cmp	r6, #0
	beq	.L6
	ldr	r6, .L22+4
	ldr	r9, .L22+8
.L4:
	mov	r1, r5
	ldr	r0, [r4]
	bl	SET_TTY
	cmp	r0, #0
	beq	.L1
	ldr	r2, [r6]
	ldr	r3, [r9]
	cmp	r2, r3
	beq	.L4
	ldr	r3, .L22+12
	cmp	r8, #0
	ldr	r3, [r3]
	sub	r3, r3, r2
	clz	r3, r3
	lsr	r3, r3, #5
	moveq	r3, #0
	cmp	r3, #0
	bne	.L21
	ldr	r3, .L22+16
	ldr	r7, [r3]
.L1:
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L6:
	ldr	r8, .L22+4
	ldr	r6, .L22+8
.L2:
	mov	r1, r5
	ldr	r0, [r4]
	bl	GET_TTY
	cmp	r0, #0
	beq	.L1
	ldr	r2, [r8]
	ldr	r3, [r6]
	cmp	r2, r3
	beq	.L2
	ldr	r3, .L22+16
	ldr	r7, [r3]
	b	.L1
.L21:
	ldr	r3, .L22+20
	ldr	r3, [r3]
	str	r3, [r8]
	ldr	r3, .L22+16
	ldr	r7, [r3]
	b	.L1
.L23:
	.align	2
.L22:
	.word	OK
	.word	errno
	.word	EINTR
	.word	ENOTTY
	.word	ERR
	.word	TRUE
	.size	drv_sgmode, .-drv_sgmode
	.comm	errno,4,4
	.comm	TRUE,4,4
	.comm	OK,4,4
	.comm	ERR,4,4
	.comm	ENOTTY,4,4
	.comm	EINTR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
