	.file	"247016923.c"
	.intel_syntax noprefix
	.text
	.local	name
	.comm	name,33,32
	.globl	getlogin
	.type	getlogin, @function
getlogin:
.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, 1328
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -528[rbp]
	mov	QWORD PTR -1304[rbp], rax
	mov	QWORD PTR -1312[rbp], 0
	mov	rax, QWORD PTR -1304[rbp]
	mov	edx, 512
	mov	rsi, rax
	mov	edi, 0
	mov	eax, 0
	call	__ttyname_r@PLT
	mov	DWORD PTR -1324[rbp], eax
	cmp	DWORD PTR -1324[rbp], 0
	je	.L2
	mov	eax, DWORD PTR -1324[rbp]
	mov	edi, eax
	mov	eax, 0
	call	__set_errno@PLT
	mov	eax, 0
	jmp	.L7
.L2:
	add	QWORD PTR -1304[rbp], 5
	mov	eax, 0
	call	__setutent@PLT
	mov	rax, QWORD PTR -1304[rbp]
	lea	rdx, -1296[rbp]
	lea	rcx, 8[rdx]
	mov	edx, 32
	mov	rsi, rax
	mov	rdi, rcx
	call	strncpy@PLT
	lea	rdx, -1320[rbp]
	lea	rcx, -912[rbp]
	lea	rax, -1296[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	mov	eax, 0
	call	__getutline_r@PLT
	test	eax, eax
	jns	.L4
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 3
	jne	.L5
	mov	edi, 2
	mov	eax, 0
	call	__set_errno@PLT
.L5:
	mov	QWORD PTR -1312[rbp], 0
	jmp	.L6
.L4:
	mov	rax, QWORD PTR -1320[rbp]
	add	rax, 44
	mov	edx, 32
	mov	rsi, rax
	lea	rdi, name[rip]
	call	strncpy@PLT
	mov	BYTE PTR name[rip+32], 0
	lea	rax, name[rip]
	mov	QWORD PTR -1312[rbp], rax
.L6:
	mov	eax, 0
	call	__endutent@PLT
	mov	rax, QWORD PTR -1312[rbp]
.L7:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	getlogin, .-getlogin
	.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	"247016923.c"
	.text
	.local	name
	.comm	name,33,4
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	getlogin
	.syntax unified
	.arm
	.fpu softvfp
	.type	getlogin, %function
getlogin:
	@ args = 0, pretend = 0, frame = 1304
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1296
	sub	sp, sp, #8
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #520
	str	r3, [fp, #-1296]
	mov	r3, #0
	str	r3, [fp, #-1300]
	mov	r2, #512
	ldr	r1, [fp, #-1296]
	mov	r0, #0
	bl	__ttyname_r
	str	r0, [fp, #-1292]
	ldr	r3, [fp, #-1292]
	cmp	r3, #0
	beq	.L2
	ldr	r0, [fp, #-1292]
	bl	__set_errno
	mov	r3, #0
	b	.L7
.L2:
	ldr	r3, [fp, #-1296]
	add	r3, r3, #5
	str	r3, [fp, #-1296]
	bl	__setutent
	sub	r3, fp, #1280
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #8
	mov	r2, #32
	ldr	r1, [fp, #-1296]
	mov	r0, r3
	bl	strncpy
	sub	r2, fp, #1296
	sub	r2, r2, #4
	sub	r2, r2, #4
	sub	r1, fp, #904
	sub	r3, fp, #1280
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	__getutline_r
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L5
	mov	r0, #2
	bl	__set_errno
.L5:
	mov	r3, #0
	str	r3, [fp, #-1300]
	b	.L6
.L4:
	ldr	r3, [fp, #-1304]
	add	r3, r3, #44
	mov	r2, #32
	mov	r1, r3
	ldr	r0, .L9+4
	bl	strncpy
	ldr	r3, .L9+4
	mov	r2, #0
	strb	r2, [r3, #32]
	ldr	r3, .L9+4
	str	r3, [fp, #-1300]
.L6:
	bl	__endutent
	ldr	r3, [fp, #-1300]
.L7:
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC0
	.word	name
	.size	getlogin, .-getlogin
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
