	.file	"137229.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"/dev/stdin"
.LC1:
	.string	"/dev/null"
.LC2:
	.string	"/dev"
.LC3:
	.string	"/dev/tty"
.LC4:
	.string	"the_stack_data/137229.c"
.LC5:
	.string	"!strcmp(result, \"/dev/tty\")"
.LC6:
	.string	"!err"
.LC7:
	.string	"strstr(buffer, \"/dev/tty\")"
.LC8:
	.string	"err == ERANGE"
.LC9:
	.string	"strstr(result, \"/dev/tty\")"
.LC10:
	.string	"!result"
.LC11:
	.string	"success"
	.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, 304
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 0
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -296[rbp], eax
	mov	esi, 0
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -292[rbp], eax
	mov	esi, 0
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -288[rbp], eax
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	ctermid@PLT
	mov	QWORD PTR -280[rbp], rax
	mov	rax, QWORD PTR -280[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L2
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 27
	lea	rsi, .LC4[rip]
	lea	rdi, .LC5[rip]
	call	__assert_fail@PLT
.L2:
	lea	rcx, -272[rbp]
	mov	eax, DWORD PTR -296[rbp]
	mov	edx, 256
	mov	rsi, rcx
	mov	edi, eax
	call	ttyname_r@PLT
	mov	DWORD PTR -284[rbp], eax
	cmp	DWORD PTR -284[rbp], 0
	je	.L3
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 32
	lea	rsi, .LC4[rip]
	lea	rdi, .LC6[rip]
	call	__assert_fail@PLT
.L3:
	lea	rax, -272[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strstr@PLT
	test	rax, rax
	jne	.L4
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 33
	lea	rsi, .LC4[rip]
	lea	rdi, .LC7[rip]
	call	__assert_fail@PLT
.L4:
	lea	rcx, -272[rbp]
	mov	eax, DWORD PTR -296[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	edi, eax
	call	ttyname_r@PLT
	mov	DWORD PTR -284[rbp], eax
	cmp	DWORD PTR -284[rbp], 34
	je	.L5
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 36
	lea	rsi, .LC4[rip]
	lea	rdi, .LC8[rip]
	call	__assert_fail@PLT
.L5:
	mov	eax, DWORD PTR -296[rbp]
	mov	edi, eax
	call	ttyname@PLT
	mov	QWORD PTR -280[rbp], rax
	mov	rax, QWORD PTR -280[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strstr@PLT
	test	rax, rax
	jne	.L6
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 39
	lea	rsi, .LC4[rip]
	lea	rdi, .LC9[rip]
	call	__assert_fail@PLT
.L6:
	mov	eax, DWORD PTR -292[rbp]
	mov	edi, eax
	call	ttyname@PLT
	mov	QWORD PTR -280[rbp], rax
	cmp	QWORD PTR -280[rbp], 0
	je	.L7
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 42
	lea	rsi, .LC4[rip]
	lea	rdi, .LC10[rip]
	call	__assert_fail@PLT
.L7:
	mov	eax, DWORD PTR -288[rbp]
	mov	edi, eax
	call	ttyname@PLT
	mov	QWORD PTR -280[rbp], rax
	cmp	QWORD PTR -280[rbp], 0
	je	.L8
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 45
	lea	rsi, .LC4[rip]
	lea	rdi, .LC10[rip]
	call	__assert_fail@PLT
.L8:
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 5
__PRETTY_FUNCTION__.0:
	.string	"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	"137229.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/dev/stdin\000"
	.align	2
.LC1:
	.ascii	"/dev/null\000"
	.align	2
.LC2:
	.ascii	"/dev\000"
	.align	2
.LC3:
	.ascii	"/dev/tty\000"
	.align	2
.LC4:
	.ascii	"the_stack_data/137229.c\000"
	.align	2
.LC5:
	.ascii	"!strcmp(result, \"/dev/tty\")\000"
	.align	2
.LC6:
	.ascii	"!err\000"
	.align	2
.LC7:
	.ascii	"strstr(buffer, \"/dev/tty\")\000"
	.align	2
.LC8:
	.ascii	"err == ERANGE\000"
	.align	2
.LC9:
	.ascii	"strstr(result, \"/dev/tty\")\000"
	.align	2
.LC10:
	.ascii	"!result\000"
	.align	2
.LC11:
	.ascii	"success\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 280
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #280
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #0
	ldr	r0, .L11+4
	bl	open
	str	r0, [fp, #-284]
	mov	r1, #0
	ldr	r0, .L11+8
	bl	open
	str	r0, [fp, #-280]
	mov	r1, #0
	ldr	r0, .L11+12
	bl	open
	str	r0, [fp, #-276]
	sub	r3, fp, #264
	mov	r0, r3
	bl	ctermid
	str	r0, [fp, #-272]
	ldr	r1, .L11+16
	ldr	r0, [fp, #-272]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L2
	ldr	r3, .L11+20
	mov	r2, #27
	ldr	r1, .L11+24
	ldr	r0, .L11+28
	bl	__assert_fail
.L2:
	sub	r3, fp, #264
	mov	r2, #256
	mov	r1, r3
	ldr	r0, [fp, #-284]
	bl	ttyname_r
	str	r0, [fp, #-268]
	ldr	r3, [fp, #-268]
	cmp	r3, #0
	beq	.L3
	ldr	r3, .L11+20
	mov	r2, #32
	ldr	r1, .L11+24
	ldr	r0, .L11+32
	bl	__assert_fail
.L3:
	sub	r3, fp, #264
	ldr	r1, .L11+16
	mov	r0, r3
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L11+20
	mov	r2, #33
	ldr	r1, .L11+24
	ldr	r0, .L11+36
	bl	__assert_fail
.L4:
	sub	r3, fp, #264
	mov	r2, #2
	mov	r1, r3
	ldr	r0, [fp, #-284]
	bl	ttyname_r
	str	r0, [fp, #-268]
	ldr	r3, [fp, #-268]
	cmp	r3, #34
	beq	.L5
	ldr	r3, .L11+20
	mov	r2, #36
	ldr	r1, .L11+24
	ldr	r0, .L11+40
	bl	__assert_fail
.L5:
	ldr	r0, [fp, #-284]
	bl	ttyname
	str	r0, [fp, #-272]
	ldr	r1, .L11+16
	ldr	r0, [fp, #-272]
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	bne	.L6
	ldr	r3, .L11+20
	mov	r2, #39
	ldr	r1, .L11+24
	ldr	r0, .L11+44
	bl	__assert_fail
.L6:
	ldr	r0, [fp, #-280]
	bl	ttyname
	str	r0, [fp, #-272]
	ldr	r3, [fp, #-272]
	cmp	r3, #0
	beq	.L7
	ldr	r3, .L11+20
	mov	r2, #42
	ldr	r1, .L11+24
	ldr	r0, .L11+48
	bl	__assert_fail
.L7:
	ldr	r0, [fp, #-276]
	bl	ttyname
	str	r0, [fp, #-272]
	ldr	r3, [fp, #-272]
	cmp	r3, #0
	beq	.L8
	ldr	r3, .L11+20
	mov	r2, #45
	ldr	r1, .L11+24
	ldr	r0, .L11+48
	bl	__assert_fail
.L8:
	ldr	r0, .L11+52
	bl	puts
	mov	r3, #0
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC12
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	__PRETTY_FUNCTION__.5971
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.5971, %object
	.size	__PRETTY_FUNCTION__.5971, 5
__PRETTY_FUNCTION__.5971:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
