	.file	"822367.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"LD_PRELOAD"
	.align 8
.LC1:
	.string	"usage: stdoutisatty command [args]\n"
.LC2:
	.string	""
.LC3:
	.string	"execve"
	.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -20[rbp], 0
	lea	rdi, .LC0[rip]
	call	getenv@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	DWORD PTR -36[rbp], 1
	jne	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 35
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L3
.L2:
	lea	rsi, .LC2[rip]
	mov	edi, 6
	call	setlocale@PLT
	mov	edi, 2048
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	movabs	rsi, 8462092676167264620
	movabs	rdi, 3348835841126656372
	mov	QWORD PTR [rax], rsi
	mov	QWORD PTR 8[rax], rdi
	mov	WORD PTR 16[rax], 28531
	mov	BYTE PTR 18[rax], 0
	cmp	QWORD PTR -16[rbp], 0
	je	.L4
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 58
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
.L4:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 1
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	call	setenv@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 8[rax]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 2
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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	"822367.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"LD_PRELOAD\000"
	.align	2
.LC1:
	.ascii	"usage: stdoutisatty command [args]\012\000"
	.align	2
.LC2:
	.ascii	"\000"
	.align	2
.LC3:
	.ascii	"libstdoutisatty.so\000"
	.align	2
.LC4:
	.ascii	"execve\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r0, .L5
	bl	getenv
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bne	.L2
	ldr	r3, .L5+4
	ldr	r3, [r3]
	mov	r2, #35
	mov	r1, #1
	ldr	r0, .L5+8
	bl	fwrite
	mov	r3, #1
	b	.L3
.L2:
	ldr	r1, .L5+12
	mov	r0, #6
	bl	setlocale
	mov	r0, #2048
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, .L5+16
	mov	r0, r3
	mov	r1, r2
	mov	r3, #19
	mov	r2, r3
	bl	memcpy
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L4
	ldr	r0, [fp, #-8]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #58
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	strcat
.L4:
	mov	r2, #1
	ldr	r1, [fp, #-8]
	ldr	r0, .L5
	bl	setenv
	ldr	r0, [fp, #-8]
	bl	free
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	execvp
	ldr	r0, .L5+20
	bl	perror
	mov	r3, #2
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
