	.file	"extr_os390.c_uv_exepath.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"PATH"
.LC1:
	.string	":"
.LC2:
	.string	"%s/%s"
	.text
	.p2align 4
	.globl	uv_exepath
	.type	uv_exepath, @function
uv_exepath:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12, rdi
	push	rbx
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR PATH_MAX[rip]
	mov	rsi, rsp
	mov	r15, rax
	add	rax, 15
	mov	rcx, rax
	mov	rdx, rax
	and	rcx, -4096
	and	rdx, -16
	sub	rsi, rcx
	mov	rcx, rsi
	cmp	rsp, rcx
	je	.L3
.L40:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rcx
	jne	.L40
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L41
.L4:
	mov	rdx, rax
	mov	rdi, rsp
	and	rax, -4096
	mov	r13, rsp
	sub	rdi, rax
	and	rdx, -16
	mov	rax, rdi
	cmp	rsp, rax
	je	.L6
.L42:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L42
.L6:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L43
.L7:
	mov	r14, rsp
	test	r12, r12
	je	.L38
	test	rbx, rbx
	je	.L38
	cmp	QWORD PTR [rbx], 0
	je	.L38
	xor	eax, eax
	call	getpid@PLT
	mov	edx, r15d
	mov	rsi, r13
	mov	edi, eax
	call	getexe@PLT
	test	eax, eax
	js	.L38
	mov	esi, 47
	mov	rdi, r13
	call	strchr@PLT
	test	rax, rax
	je	.L12
	mov	rsi, rsp
	mov	rdi, r13
	call	realpath@PLT
	cmp	rsp, rax
	je	.L13
	mov	edi, DWORD PTR errno[rip]
	call	UV__ERR@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rbx, QWORD PTR -56[rbp]
	xor	rbx, QWORD PTR fs:40
	jne	.L44
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L41:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L38:
	mov	eax, DWORD PTR UV_EINVAL[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rdi, rsp
	call	strlen@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	rsi, rsp
	lea	rdx, -1[rdi]
	mov	rdi, r12
	cmp	rdx, rax
	cmova	rdx, rax
	mov	QWORD PTR [rbx], rdx
	call	memcpy@PLT
	mov	rax, QWORD PTR [rbx]
	mov	BYTE PTR [r12+rax], 0
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	movsx	rax, DWORD PTR PATH_MAX[rip]
	mov	rdi, rsp
	mov	QWORD PTR -80[rbp], rsp
	mov	DWORD PTR -68[rbp], eax
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rdi, rax
	and	rdx, -16
	mov	rax, rdi
.L14:
	cmp	rsp, rax
	je	.L15
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L43:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L15:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L16
	or	QWORD PTR -8[rsp+rdx], 0
.L16:
	lea	rdi, .LC0[rip]
	mov	r15, rsp
	call	getenv@PLT
	mov	rdi, rax
	test	rax, rax
	je	.L37
	call	uv__strdup@PLT
	mov	QWORD PTR -88[rbp], rax
	test	rax, rax
	je	.L45
	mov	rdi, QWORD PTR -88[rbp]
	lea	rsi, .LC1[rip]
	call	strtok@PLT
	mov	rcx, rax
	mov	eax, DWORD PTR -68[rbp]
	sub	eax, 1
	mov	DWORD PTR -68[rbp], eax
	test	rcx, rcx
	jne	.L22
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L21:
	lea	rsi, .LC1[rip]
	xor	edi, edi
	call	strtok@PLT
	mov	rcx, rax
	test	rax, rax
	je	.L23
.L22:
	mov	esi, DWORD PTR -68[rbp]
	mov	rdi, r15
	mov	r8, r13
	lea	rdx, .LC2[rip]
	call	snprintf@PLT
	mov	rsi, r14
	mov	rdi, r15
	call	realpath@PLT
	cmp	r14, rax
	jne	.L21
	mov	esi, DWORD PTR X_OK[rip]
	mov	rdi, r14
	call	access@PLT
	test	rax, rax
	jne	.L21
	mov	rdi, r14
	call	strlen@PLT
	mov	rdi, QWORD PTR [rbx]
	mov	rsi, r14
	lea	rdx, -1[rdi]
	mov	rdi, r12
	cmp	rdx, rax
	cmova	rdx, rax
	mov	QWORD PTR [rbx], rdx
	call	memcpy@PLT
	mov	rax, QWORD PTR [rbx]
	mov	rdi, QWORD PTR -88[rbp]
	mov	BYTE PTR [r12+rax], 0
	call	uv__free@PLT
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rsp, QWORD PTR -80[rbp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	mov	rdi, QWORD PTR -88[rbp]
	call	uv__free@PLT
.L37:
	mov	eax, DWORD PTR UV_EINVAL[rip]
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L45:
	mov	eax, DWORD PTR UV_ENOMEM[rip]
	jmp	.L18
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	uv_exepath, .-uv_exepath
	.comm	errno,4,4
	.comm	X_OK,4,4
	.comm	UV_ENOMEM,4,4
	.comm	UV_EINVAL,4,4
	.comm	PATH_MAX,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_os390.c_uv_exepath.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"PATH\000"
	.align	2
.LC1:
	.ascii	":\000"
	.align	2
.LC2:
	.ascii	"%s/%s\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	uv_exepath
	.syntax unified
	.arm
	.fpu softvfp
	.type	uv_exepath, %function
uv_exepath:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	clz	r3, r1
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #36
	cmp	r0, #0
	lsr	r3, r3, #5
	movne	r8, r3
	moveq	r8, #1
	ldr	r9, .L23
	ldr	r3, .L23+4
	ldr	r10, [r9]
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	add	r3, r10, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	cmp	r8, #0
	add	r6, sp, #8
	sub	sp, sp, r3
	bne	.L19
	ldr	r3, [r1]
	mov	r4, r1
	cmp	r3, #0
	bne	.L3
.L19:
	ldr	r3, .L23+8
	ldr	r3, [r3]
.L1:
	ldr	r2, .L23+4
	ldr	r1, [r2]
	ldr	r2, [fp, #-40]
	eors	r1, r2, r1
	mov	r2, #0
	bne	.L21
	mov	r0, r3
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	mov	r5, r0
	bl	getpid
	mov	r2, r10
	mov	r1, r6
	bl	getexe
	cmp	r0, #0
	blt	.L19
	mov	r1, #47
	mov	r0, r6
	bl	strchr
	cmp	r0, #0
	add	r7, sp, #8
	beq	.L6
	mov	r0, r6
	mov	r1, r7
	bl	realpath
	cmp	r0, r7
	mov	r6, r0
	beq	.L7
	ldr	r3, .L23+12
	ldr	r0, [r3]
	bl	UV__ERR
	mov	r3, r0
	b	.L1
.L7:
	bl	strlen
	ldr	r2, [r4]
	mov	r1, r6
	sub	r2, r2, #1
	cmp	r2, r0
	movcs	r2, r0
	mov	r0, r5
	str	r2, [r4]
	bl	memcpy
	ldr	r2, [r4]
	mov	r3, r8
	strb	r8, [r5, r2]
	b	.L1
.L6:
	ldr	r9, [r9]
	str	sp, [fp, #-48]
	add	r3, r9, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r0, .L23+16
	bl	getenv
	cmp	r0, #0
	add	r8, sp, #8
	beq	.L18
	bl	uv__strdup
	subs	r3, r0, #0
	str	r3, [fp, #-52]
	beq	.L22
	ldr	r1, .L23+20
	bl	strtok
	subs	r3, r0, #0
	ldrne	r10, .L23+24
	subne	r9, r9, #1
	bne	.L13
	b	.L14
.L12:
	mov	r0, #0
	ldr	r1, .L23+20
	bl	strtok
	subs	r3, r0, #0
	beq	.L14
.L13:
	mov	r2, r10
	mov	r1, r9
	mov	r0, r8
	str	r6, [sp]
	bl	snprintf
	mov	r1, r7
	mov	r0, r8
	bl	realpath
	cmp	r7, r0
	bne	.L12
	ldr	r3, .L23+28
	ldr	r1, [r3]
	bl	access
	cmp	r0, #0
	bne	.L12
	str	r0, [fp, #-56]
	mov	r0, r7
	bl	strlen
	ldr	r2, [r4]
	mov	r1, r7
	sub	r2, r2, #1
	cmp	r2, r0
	movcs	r2, r0
	mov	r0, r5
	str	r2, [r4]
	bl	memcpy
	ldr	r3, [fp, #-56]
	ldr	r2, [r4]
	ldr	r0, [fp, #-52]
	strb	r3, [r5, r2]
	str	r3, [fp, #-52]
	bl	uv__free
	ldr	r3, [fp, #-52]
.L9:
	ldr	sp, [fp, #-48]
	b	.L1
.L14:
	ldr	r0, [fp, #-52]
	bl	uv__free
.L18:
	ldr	r3, .L23+8
	ldr	r3, [r3]
	b	.L9
.L22:
	ldr	r3, .L23+32
	ldr	r3, [r3]
	b	.L9
.L21:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	PATH_MAX
	.word	.LC3
	.word	UV_EINVAL
	.word	errno
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	X_OK
	.word	UV_ENOMEM
	.size	uv_exepath, .-uv_exepath
	.comm	errno,4,4
	.comm	X_OK,4,4
	.comm	UV_ENOMEM,4,4
	.comm	UV_EINVAL,4,4
	.comm	PATH_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
