	.file	"86197.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"/dev/tty"
	.align 8
.LC1:
	.string	"minopen: could not open /dev/tty"
	.align 8
.LC2:
	.string	"minopen: tty is not virtual console"
	.align 8
.LC3:
	.string	"minopen: no free virtual consoles"
.LC4:
	.string	"/dev/tty%d"
	.align 8
.LC5:
	.string	"minopen: insufficient permission on tty"
.LC6:
	.string	"bash"
.LC7:
	.string	"/bin/bash"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 2
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -60[rbp], eax
	cmp	DWORD PTR -60[rbp], 0
	jns	.L2
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	lea	rdx, -54[rbp]
	mov	eax, DWORD PTR -60[rbp]
	mov	esi, 22019
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L3
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	lea	rdx, -68[rbp]
	mov	eax, DWORD PTR -60[rbp]
	mov	esi, 22016
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L4
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	edx, DWORD PTR -68[rbp]
	lea	rax, -48[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -48[rbp]
	mov	esi, 6
	mov	rdi, rax
	call	access@PLT
	test	eax, eax
	jns	.L5
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	call	fork@PLT
	mov	DWORD PTR -64[rbp], eax
	mov	eax, DWORD PTR -64[rbp]
	test	eax, eax
	jne	.L6
	mov	edx, DWORD PTR -68[rbp]
	mov	eax, DWORD PTR -60[rbp]
	mov	esi, 22022
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	edx, DWORD PTR -68[rbp]
	mov	eax, DWORD PTR -60[rbp]
	mov	esi, 22023
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	call	setsid@PLT
	mov	edi, 0
	call	close@PLT
	mov	edi, 1
	call	close@PLT
	mov	edi, 2
	call	close@PLT
	mov	eax, DWORD PTR -60[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rax, -48[rbp]
	mov	edx, 0
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -60[rbp], eax
	mov	eax, DWORD PTR -60[rbp]
	mov	edi, eax
	call	dup@PLT
	mov	eax, DWORD PTR -60[rbp]
	mov	edi, eax
	call	dup@PLT
	mov	edx, 0
	lea	rsi, .LC6[rip]
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	execlp@PLT
.L6:
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	wait@PLT
	movzx	eax, WORD PTR -54[rbp]
	movzx	edx, ax
	mov	eax, DWORD PTR -60[rbp]
	mov	esi, 22022
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	movzx	eax, WORD PTR -54[rbp]
	movzx	edx, ax
	mov	eax, DWORD PTR -60[rbp]
	mov	esi, 22023
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	edx, DWORD PTR -68[rbp]
	mov	eax, DWORD PTR -60[rbp]
	mov	esi, 22024
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"86197.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/dev/tty\000"
	.align	2
.LC1:
	.ascii	"minopen: could not open /dev/tty\000"
	.align	2
.LC2:
	.ascii	"minopen: tty is not virtual console\000"
	.align	2
.LC3:
	.ascii	"minopen: no free virtual consoles\000"
	.align	2
.LC4:
	.ascii	"/dev/tty%d\000"
	.align	2
.LC5:
	.ascii	"minopen: insufficient permission on tty\000"
	.align	2
.LC6:
	.ascii	"bash\000"
	.align	2
.LC7:
	.ascii	"/bin/bash\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #2
	ldr	r0, .L8+4
	bl	open
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L8+8
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	sub	r3, fp, #48
	mov	r2, r3
	ldr	r1, .L8+12
	ldr	r0, [fp, #-52]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L8+16
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	sub	r3, fp, #60
	mov	r2, r3
	mov	r1, #22016
	ldr	r0, [fp, #-52]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L8+20
	bl	perror
	mov	r0, #1
	bl	exit
.L4:
	ldr	r2, [fp, #-60]
	sub	r3, fp, #40
	ldr	r1, .L8+24
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #40
	mov	r1, #6
	mov	r0, r3
	bl	access
	mov	r3, r0
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L8+28
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L6
	ldr	r3, [fp, #-60]
	mov	r2, r3
	ldr	r1, .L8+32
	ldr	r0, [fp, #-52]
	bl	ioctl
	ldr	r3, [fp, #-60]
	mov	r2, r3
	ldr	r1, .L8+36
	ldr	r0, [fp, #-52]
	bl	ioctl
	bl	setsid
	mov	r0, #0
	bl	close
	mov	r0, #1
	bl	close
	mov	r0, #2
	bl	close
	ldr	r0, [fp, #-52]
	bl	close
	sub	r3, fp, #40
	mov	r2, #0
	mov	r1, #2
	mov	r0, r3
	bl	open
	str	r0, [fp, #-52]
	ldr	r0, [fp, #-52]
	bl	dup
	ldr	r0, [fp, #-52]
	bl	dup
	mov	r2, #0
	ldr	r1, .L8+40
	ldr	r0, .L8+44
	bl	execlp
.L6:
	sub	r3, fp, #56
	mov	r0, r3
	bl	wait
	ldrh	r3, [fp, #-48]
	mov	r2, r3
	ldr	r1, .L8+32
	ldr	r0, [fp, #-52]
	bl	ioctl
	ldrh	r3, [fp, #-48]
	mov	r2, r3
	ldr	r1, .L8+36
	ldr	r0, [fp, #-52]
	bl	ioctl
	ldr	r3, [fp, #-60]
	mov	r2, r3
	ldr	r1, .L8+48
	ldr	r0, [fp, #-52]
	bl	ioctl
	mov	r0, #0
	bl	exit
.L9:
	.align	2
.L8:
	.word	.LC8
	.word	.LC0
	.word	.LC1
	.word	22019
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	22022
	.word	22023
	.word	.LC6
	.word	.LC7
	.word	22024
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
