	.file	"extr_session.c_session_pty_cleanup2.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"session_pty_cleanup: no session"
	.align 8
.LC1:
	.string	"session_pty_cleanup: session %d release %s"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"close(s->ptymaster/%d): %s"
	.text
	.p2align 4
	.globl	session_pty_cleanup2
	.type	session_pty_cleanup2, @function
session_pty_cleanup2:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdi, rdi
	je	.L15
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	cmp	DWORD PTR [rdi], -1
	mov	rbx, rdi
	je	.L1
	mov	edx, DWORD PTR 20[rdi]
	mov	esi, DWORD PTR 32[rdi]
	lea	rdi, .LC1[rip]
	call	debug@PLT
	mov	rdi, QWORD PTR 8[rbx]
	test	rdi, rdi
	jne	.L16
	xor	eax, eax
	call	getuid@PLT
	test	rax, rax
	je	.L17
.L5:
	mov	edi, DWORD PTR 16[rbx]
	cmp	edi, -1
	jne	.L18
.L7:
	mov	DWORD PTR [rbx], -1
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	call	close@PLT
	test	rax, rax
	jns	.L7
	mov	edi, DWORD PTR errno[rip]
	call	strerror@PLT
	mov	esi, DWORD PTR 16[rbx]
	lea	rdi, .LC2[rip]
	mov	rdx, rax
	xor	eax, eax
	call	error@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edi, DWORD PTR 20[rbx]
	call	pty_release@PLT
	mov	edi, DWORD PTR 16[rbx]
	cmp	edi, -1
	je	.L7
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rax, QWORD PTR 24[rbx]
	mov	esi, DWORD PTR 20[rbx]
	mov	edx, DWORD PTR [rax]
	call	record_logout@PLT
	xor	eax, eax
	call	getuid@PLT
	test	rax, rax
	jne	.L5
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	lea	rdi, .LC0[rip]
	xor	eax, eax
	jmp	error@PLT
	.cfi_endproc
.LFE0:
	.size	session_pty_cleanup2, .-session_pty_cleanup2
	.comm	errno,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_session.c_session_pty_cleanup2.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"session_pty_cleanup: no session\000"
	.align	2
.LC1:
	.ascii	"session_pty_cleanup: session %d release %s\000"
	.align	2
.LC2:
	.ascii	"close(s->ptymaster/%d): %s\000"
	.text
	.align	2
	.global	session_pty_cleanup2
	.syntax unified
	.arm
	.fpu softvfp
	.type	session_pty_cleanup2, %function
session_pty_cleanup2:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	subs	r4, r0, #0
	beq	.L17
	ldr	r3, [r4]
	cmn	r3, #1
	popeq	{r4, r5, r6, pc}
	ldr	r2, [r4, #12]
	ldr	r1, [r4, #20]
	ldr	r0, .L21
	bl	debug
	ldr	r0, [r4, #4]
	cmp	r0, #0
	bne	.L18
	bl	getuid
	cmp	r0, #0
	beq	.L19
.L5:
	ldr	r0, [r4, #8]
	cmn	r0, #1
	bne	.L20
.L7:
	mvn	r3, #0
	str	r3, [r4]
	pop	{r4, r5, r6, pc}
.L20:
	bl	close
	cmp	r0, #0
	bge	.L7
	ldr	r3, .L21+4
	ldr	r5, [r4, #8]
	ldr	r0, [r3]
	bl	strerror
	mov	r1, r5
	mov	r2, r0
	ldr	r0, .L21+8
	bl	error
	b	.L7
.L19:
	ldr	r0, [r4, #12]
	bl	pty_release
	ldr	r0, [r4, #8]
	cmn	r0, #1
	beq	.L7
	b	.L20
.L18:
	ldr	r3, [r4, #16]
	ldr	r1, [r4, #12]
	ldr	r2, [r3]
	bl	record_logout
	bl	getuid
	cmp	r0, #0
	bne	.L5
	b	.L19
.L17:
	ldr	r0, .L21+12
	pop	{r4, r5, r6, lr}
	b	error
.L22:
	.align	2
.L21:
	.word	.LC1
	.word	errno
	.word	.LC2
	.word	.LC0
	.size	session_pty_cleanup2, .-session_pty_cleanup2
	.comm	errno,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
