	.file	"22905.c"
	.intel_syntax noprefix
	.text
	.local	what
	.comm	what,4,4
	.section	.rodata
.LC0:
	.string	"ioctl() failed"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d %d\n"
	.text
	.type	print_terminal_size, @function
print_terminal_size:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -16[rbp]
	mov	rdx, rax
	mov	esi, 21523
	mov	edi, 0
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
.L2:
	mov	eax, DWORD PTR what[rip]
	cmp	eax, 2
	je	.L3
	cmp	eax, 3
	je	.L4
	jmp	.L8
.L3:
	movzx	eax, WORD PTR -16[rbp]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L6
.L4:
	movzx	eax, WORD PTR -14[rbp]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L6
.L8:
	movzx	eax, WORD PTR -14[rbp]
	movzx	edx, ax
	movzx	eax, WORD PTR -16[rbp]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	nop
.L6:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	print_terminal_size, .-print_terminal_size
	.section	.rodata
.LC3:
	.string	"-c"
.LC4:
	.string	"%s: cannot combine -c and -r\n"
.LC5:
	.string	"-r"
.LC6:
	.string	"-w"
	.align 8
.LC7:
	.string	"%s: illegal option '%s'\nusage: %s [-c] [-r] [-w]\n"
.LC8:
	.string	"stdin is not a TTY\n"
.LC9:
	.string	"sigaction() failed"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 352
	mov	DWORD PTR -340[rbp], edi
	mov	QWORD PTR -352[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	BYTE PTR -325[rbp], 0
	mov	DWORD PTR what[rip], 1
	mov	DWORD PTR -324[rbp], 1
	jmp	.L10
.L18:
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -352[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L11
	mov	eax, DWORD PTR what[rip]
	cmp	eax, 2
	jne	.L12
	mov	rax, QWORD PTR -352[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L13
.L12:
	mov	DWORD PTR what[rip], 3
	jmp	.L14
.L11:
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -352[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L15
	mov	eax, DWORD PTR what[rip]
	cmp	eax, 3
	jne	.L16
	mov	rax, QWORD PTR -352[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L13
.L16:
	mov	DWORD PTR what[rip], 2
	jmp	.L14
.L15:
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -352[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L17
	mov	BYTE PTR -325[rbp], 1
	jmp	.L14
.L17:
	mov	rax, QWORD PTR -352[rbp]
	mov	rsi, QWORD PTR [rax]
	mov	eax, DWORD PTR -324[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -352[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR [rax]
	mov	rax, QWORD PTR -352[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rsi
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L13
.L14:
	add	DWORD PTR -324[rbp], 1
.L10:
	mov	eax, DWORD PTR -324[rbp]
	cmp	eax, DWORD PTR -340[rbp]
	jl	.L18
	mov	edi, 0
	call	isatty@PLT
	test	eax, eax
	jne	.L19
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 19
	mov	esi, 1
	lea	rdi, .LC8[rip]
	call	fwrite@PLT
	mov	eax, 0
	jmp	.L13
.L19:
	mov	eax, 0
	call	print_terminal_size
	cmp	BYTE PTR -325[rbp], 0
	je	.L20
	lea	rdx, -320[rbp]
	mov	eax, 0
	mov	ecx, 19
	mov	rdi, rdx
	rep stosq
	lea	rax, print_terminal_size[rip]
	mov	QWORD PTR -320[rbp], rax
	lea	rdx, -160[rbp]
	lea	rax, -320[rbp]
	mov	rsi, rax
	mov	edi, 28
	call	sigaction@PLT
	test	eax, eax
	jns	.L21
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L13
.L21:
	mov	edi, 100
	call	sleep@PLT
	jmp	.L21
.L20:
	mov	eax, 0
.L13:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	"22905.c"
	.text
	.local	what
	.comm	what,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"ioctl() failed\000"
	.align	2
.LC1:
	.ascii	"%d\012\000"
	.align	2
.LC2:
	.ascii	"%d %d\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_terminal_size, %function
print_terminal_size:
	@ 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, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #16
	mov	r2, r3
	ldr	r1, .L9+4
	mov	r0, #0
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L9+8
	bl	perror
.L2:
	ldr	r3, .L9+12
	ldr	r3, [r3]
	cmp	r3, #2
	beq	.L3
	cmp	r3, #3
	beq	.L4
	b	.L8
.L3:
	ldrh	r3, [fp, #-16]
	mov	r1, r3
	ldr	r0, .L9+16
	bl	printf
	b	.L6
.L4:
	ldrh	r3, [fp, #-14]
	mov	r1, r3
	ldr	r0, .L9+16
	bl	printf
	b	.L6
.L8:
	ldrh	r3, [fp, #-16]
	mov	r1, r3
	ldrh	r3, [fp, #-14]
	mov	r2, r3
	ldr	r0, .L9+20
	bl	printf
	nop
.L6:
	nop
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC3
	.word	21523
	.word	.LC0
	.word	what
	.word	.LC1
	.word	.LC2
	.size	print_terminal_size, .-print_terminal_size
	.section	.rodata
	.align	2
.LC4:
	.ascii	"-c\000"
	.align	2
.LC5:
	.ascii	"%s: cannot combine -c and -r\012\000"
	.align	2
.LC6:
	.ascii	"-r\000"
	.align	2
.LC7:
	.ascii	"-w\000"
	.align	2
.LC8:
	.ascii	"%s: illegal option '%s'\012usage: %s [-c] [-r] [-w]"
	.ascii	"\012\000"
	.align	2
.LC9:
	.ascii	"stdin is not a TTY\012\000"
	.align	2
.LC10:
	.ascii	"sigaction() failed\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 304
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #312
	str	r0, [fp, #-304]
	str	r1, [fp, #-308]
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	strb	r3, [fp, #-293]
	ldr	r3, .L25+4
	mov	r2, #1
	str	r2, [r3]
	mov	r3, #1
	str	r3, [fp, #-292]
	b	.L12
.L20:
	ldr	r3, [fp, #-292]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-308]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L25+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L13
	ldr	r3, .L25+4
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L14
	ldr	r3, .L25+12
	ldr	r0, [r3]
	ldr	r3, [fp, #-308]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L25+16
	bl	fprintf
	mov	r3, #1
	b	.L15
.L14:
	ldr	r3, .L25+4
	mov	r2, #3
	str	r2, [r3]
	b	.L16
.L13:
	ldr	r3, [fp, #-292]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-308]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L25+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L17
	ldr	r3, .L25+4
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L18
	ldr	r3, .L25+12
	ldr	r0, [r3]
	ldr	r3, [fp, #-308]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L25+16
	bl	fprintf
	mov	r3, #1
	b	.L15
.L18:
	ldr	r3, .L25+4
	mov	r2, #2
	str	r2, [r3]
	b	.L16
.L17:
	ldr	r3, [fp, #-292]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-308]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L25+24
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L19
	mov	r3, #1
	strb	r3, [fp, #-293]
	b	.L16
.L19:
	ldr	r3, .L25+12
	ldr	r0, [r3]
	ldr	r3, [fp, #-308]
	ldr	r1, [r3]
	ldr	r3, [fp, #-292]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-308]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-308]
	ldr	r3, [r3]
	str	r3, [sp]
	mov	r3, r2
	mov	r2, r1
	ldr	r1, .L25+28
	bl	fprintf
	mov	r3, #1
	b	.L15
.L16:
	ldr	r3, [fp, #-292]
	add	r3, r3, #1
	str	r3, [fp, #-292]
.L12:
	ldr	r2, [fp, #-292]
	ldr	r3, [fp, #-304]
	cmp	r2, r3
	blt	.L20
	mov	r0, #0
	bl	isatty
	mov	r3, r0
	cmp	r3, #0
	bne	.L21
	ldr	r3, .L25+12
	ldr	r3, [r3]
	mov	r2, #19
	mov	r1, #1
	ldr	r0, .L25+32
	bl	fwrite
	mov	r3, #0
	b	.L15
.L21:
	bl	print_terminal_size
	ldrb	r3, [fp, #-293]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L22
	sub	r3, fp, #288
	mov	r2, #140
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, .L25+36
	str	r3, [fp, #-288]
	sub	r2, fp, #148
	sub	r3, fp, #288
	mov	r1, r3
	mov	r0, #28
	bl	sigaction
	mov	r3, r0
	cmp	r3, #0
	bge	.L23
	ldr	r0, .L25+40
	bl	perror
	mov	r3, #1
	b	.L15
.L23:
	mov	r0, #100
	bl	sleep
	b	.L23
.L22:
	mov	r3, #0
.L15:
	ldr	r2, .L25
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L24
	bl	__stack_chk_fail
.L24:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC11
	.word	what
	.word	.LC4
	.word	stderr
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	print_terminal_size
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
