	.file	"87708.c"
	.intel_syntax noprefix
	.text
	.globl	sa
	.bss
	.align 32
	.type	sa, @object
	.size	sa, 152
sa:
	.zero	152
	.globl	tc
	.align 32
	.type	tc, @object
	.size	tc, 60
tc:
	.zero	60
	.section	.rodata
.LC0:
	.string	"SIGTTOU received\n"
	.text
	.globl	ttou_hdlr
	.type	ttou_hdlr, @function
ttou_hdlr:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	lea	rax, .LC0[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	esi, 1
	mov	edi, 22
	call	signal@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	ttou_hdlr, .-ttou_hdlr
	.section	.rodata
	.align 8
.LC1:
	.string	"Attempting to write to terminal from background process"
.LC2:
	.string	"Error setting sigaction"
.LC3:
	.string	"fork error"
	.text
	.globl	test_sigttou
	.type	test_sigttou, @function
test_sigttou:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC1[rip]
	mov	QWORD PTR -16[rbp], rax
	lea	rax, ttou_hdlr[rip]
	mov	QWORD PTR sa[rip], rax
	mov	DWORD PTR sa[rip+136], 0
	mov	eax, DWORD PTR sa[rip+136]
	or	eax, 536870912
	mov	DWORD PTR sa[rip+136], eax
	lea	rdi, sa[rip+8]
	call	sigemptyset@PLT
	mov	edx, 0
	lea	rsi, sa[rip]
	mov	edi, 22
	call	sigaction@PLT
	test	eax, eax
	jns	.L3
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L8
.L3:
	call	fork@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	test	eax, eax
	jns	.L5
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L8
.L5:
	mov	eax, DWORD PTR -20[rbp]
	test	eax, eax
	jne	.L6
	mov	esi, 0
	mov	edi, 0
	call	setpgid@PLT
	lea	rsi, tc[rip]
	mov	edi, 1
	call	tcgetattr@PLT
	mov	eax, DWORD PTR tc[rip+12]
	cmp	eax, 256
	je	.L7
	mov	DWORD PTR tc[rip+12], 256
	lea	rdx, tc[rip]
	mov	esi, 0
	mov	edi, 1
	call	tcsetattr@PLT
.L7:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	eax, 0
	jmp	.L8
.L6:
	lea	rax, -20[rbp]
	mov	rdi, rax
	call	wait@PLT
	mov	eax, 0
.L8:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	test_sigttou, .-test_sigttou
	.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	"87708.c"
	.text
	.comm	sa,140,4
	.comm	tc,60,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"SIGTTOU received\012\000"
	.text
	.align	2
	.global	ttou_hdlr
	.syntax unified
	.arm
	.fpu softvfp
	.type	ttou_hdlr, %function
ttou_hdlr:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, .L2
	str	r3, [fp, #-8]
	mov	r1, #1
	mov	r0, #22
	bl	signal
	ldr	r0, [fp, #-8]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-8]
	mov	r0, #1
	bl	write
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	ttou_hdlr, .-ttou_hdlr
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Attempting to write to terminal from background pro"
	.ascii	"cess\000"
	.align	2
.LC2:
	.ascii	"Error setting sigaction\000"
	.align	2
.LC3:
	.ascii	"fork error\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	test_sigttou
	.syntax unified
	.arm
	.fpu softvfp
	.type	test_sigttou, %function
test_sigttou:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L12+4
	str	r3, [fp, #-12]
	ldr	r3, .L12+8
	ldr	r2, .L12+12
	str	r2, [r3]
	ldr	r3, .L12+8
	mov	r2, #0
	str	r2, [r3, #132]
	ldr	r3, .L12+8
	ldr	r3, [r3, #132]
	orr	r3, r3, #536870912
	ldr	r2, .L12+8
	str	r3, [r2, #132]
	ldr	r0, .L12+16
	bl	sigemptyset
	mov	r2, #0
	ldr	r1, .L12+8
	mov	r0, #22
	bl	sigaction
	mov	r3, r0
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L12+20
	bl	perror
	mvn	r3, #0
	b	.L10
.L5:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L12+24
	bl	perror
	mvn	r3, #0
	b	.L10
.L7:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L8
	mov	r1, #0
	mov	r0, #0
	bl	setpgid
	ldr	r1, .L12+28
	mov	r0, #1
	bl	tcgetattr
	ldr	r3, .L12+28
	ldr	r3, [r3, #12]
	cmp	r3, #256
	beq	.L9
	ldr	r3, .L12+28
	mov	r2, #256
	str	r2, [r3, #12]
	ldr	r2, .L12+28
	mov	r1, #0
	mov	r0, #1
	bl	tcsetattr
.L9:
	ldr	r0, [fp, #-12]
	bl	puts
	mov	r3, #0
	b	.L10
.L8:
	sub	r3, fp, #16
	mov	r0, r3
	bl	wait
	mov	r3, #0
.L10:
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC4
	.word	.LC1
	.word	sa
	.word	ttou_hdlr
	.word	sa+4
	.word	.LC2
	.word	.LC3
	.word	tc
	.size	test_sigttou, .-test_sigttou
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
