	.file	"extr_resolve.c_ib_resolve_portid_str_via.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"bad dest_type %d"
	.text
	.p2align 4
	.globl	ib_resolve_portid_str_via
	.type	ib_resolve_portid_str_via, @function
ib_resolve_portid_str_via:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	xor	esi, esi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, r8
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	mov	edx, 12
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	sub	rsp, 48
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	DWORD PTR 36[rsp], 0
	mov	QWORD PTR 28[rsp], 0
	mov	DWORD PTR 12[rsp], 0
	call	memset@PLT
	lea	eax, -128[r12]
	cmp	eax, 4
	ja	.L2
	lea	rdx, .L4[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L4:
	.long	.L8-.L4
	.long	.L7-.L4
	.long	.L6-.L4
	.long	.L5-.L4
	.long	.L3-.L4
	.text
	.p2align 4,,10
	.p2align 3
.L5:
	xor	edx, edx
	mov	rdi, r15
	lea	rsi, 16[rsp]
	call	strtol@PLT
	add	QWORD PTR 16[rsp], 1
	mov	edi, eax
	mov	r12d, eax
	call	IB_LID_VALID@PLT
	test	eax, eax
	je	.L19
	xor	ecx, ecx
	xor	edx, edx
	mov	esi, r12d
	mov	rdi, rbp
	call	ib_portid_set@PLT
	xor	edx, edx
	lea	rsi, 12[rsp]
	mov	rcx, r13
	lea	rdi, 28[rsp]
	call	ib_resolve_self_via@PLT
	test	eax, eax
	js	.L20
	mov	edx, DWORD PTR 28[rsp]
	mov	rsi, QWORD PTR 16[rsp]
	xor	ecx, ecx
	lea	rdi, 4[rbp]
	call	str2drpath@PLT
	test	eax, eax
	js	.L19
.L15:
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	xor	ecx, ecx
	xor	edx, edx
	lea	rdi, 4[rbp]
	mov	rsi, r15
	call	str2drpath@PLT
	test	eax, eax
	jns	.L15
	.p2align 4,,10
	.p2align 3
.L19:
	mov	eax, DWORD PTR EINVAL[rip]
	mov	DWORD PTR errno[rip], eax
.L20:
	mov	eax, -1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	xor	edx, edx
	xor	esi, esi
	mov	rdi, r15
	call	strtoull@PLT
	mov	DWORD PTR 16[rsp], eax
	test	eax, eax
	je	.L19
	lea	rsi, 16[rsp]
	mov	r8, r13
	xor	ecx, ecx
	mov	rdx, r14
	mov	rdi, rbp
	call	ib_resolve_guid_via@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L22
	add	rsp, 48
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	edi, DWORD PTR AF_INET6[rip]
	lea	rdx, 16[rsp]
	mov	rsi, r15
	call	inet_pton@PLT
	test	eax, eax
	jle	.L20
	mov	esi, DWORD PTR 16[rsp]
	mov	r8, r13
	xor	ecx, ecx
	mov	rdx, r14
	mov	rdi, rbp
	call	ib_resolve_gid_via@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	xor	edx, edx
	xor	esi, esi
	mov	rdi, r15
	call	strtol@PLT
	mov	edi, eax
	mov	r12d, eax
	call	IB_LID_VALID@PLT
	test	eax, eax
	je	.L19
	xor	ecx, ecx
	xor	edx, edx
	mov	esi, r12d
	mov	rdi, rbp
	call	ib_portid_set@PLT
	jmp	.L1
.L2:
	mov	esi, r12d
	lea	rdi, .LC0[rip]
	call	IBWARN@PLT
	jmp	.L19
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ib_resolve_portid_str_via, .-ib_resolve_portid_str_via
	.comm	errno,4,4
	.comm	EINVAL,4,4
	.comm	AF_INET6,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_resolve.c_ib_resolve_portid_str_via.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"bad dest_type %d\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ib_resolve_portid_str_via
	.syntax unified
	.arm
	.fpu softvfp
	.type	ib_resolve_portid_str_via, %function
ib_resolve_portid_str_via:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, #0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r2
	mov	r6, r3
	ldr	r3, .L22
	sub	sp, sp, #32
	mov	r2, #12
	mov	r7, r1
	mov	r1, ip
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	mov	r5, r0
	ldr	r8, [sp, #56]
	str	ip, [sp, #16]
	str	ip, [sp, #12]
	str	ip, [sp, #20]
	str	ip, [sp, #24]
	bl	memset
	sub	r2, r4, #128
	cmp	r2, #4
	ldrls	pc, [pc, r2, asl #2]
	b	.L2
.L4:
	.word	.L8
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L3:
	mov	r3, #0
	mov	r1, r7
	mov	r2, r3
	add	r0, r5, #4
	bl	str2drpath
	cmp	r0, #0
	blt	.L19
.L15:
	mov	r0, #0
.L1:
	ldr	r3, .L22
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L21
	add	sp, sp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	mov	r2, #0
	mov	r0, r7
	mov	r1, r2
	bl	strtol
	mov	r4, r0
	bl	IB_LID_VALID
	cmp	r0, #0
	beq	.L19
	mov	r3, #0
	mov	r1, r4
	mov	r0, r5
	mov	r2, r3
	bl	ib_portid_set
	b	.L1
.L7:
	mov	r2, #0
	mov	r0, r7
	mov	r1, r2
	bl	strtoull
	cmp	r0, #0
	str	r0, [sp, #8]
	beq	.L19
	mov	r2, r6
	mov	r0, r5
	mov	r3, #0
	str	r8, [sp]
	add	r1, sp, #8
	bl	ib_resolve_guid_via
	b	.L1
.L6:
	ldr	r3, .L22+4
	mov	r1, r7
	ldr	r0, [r3]
	add	r2, sp, #8
	bl	inet_pton
	cmp	r0, #0
	ble	.L16
	mov	r2, r6
	mov	r0, r5
	mov	r3, #0
	ldr	r1, [sp, #8]
	str	r8, [sp]
	bl	ib_resolve_gid_via
	b	.L1
.L5:
	mov	r2, #0
	add	r1, sp, #8
	mov	r0, r7
	bl	strtol
	ldr	r3, [sp, #8]
	mov	r4, r0
	add	r3, r3, #1
	str	r3, [sp, #8]
	bl	IB_LID_VALID
	cmp	r0, #0
	beq	.L19
	mov	r3, #0
	mov	r1, r4
	mov	r2, r3
	mov	r0, r5
	bl	ib_portid_set
	mov	r3, r8
	mov	r2, #0
	add	r0, sp, #16
	add	r1, sp, #12
	bl	ib_resolve_self_via
	cmp	r0, #0
	blt	.L16
	mov	r3, #0
	ldr	r2, [sp, #16]
	ldr	r1, [sp, #8]
	add	r0, r5, #4
	bl	str2drpath
	cmp	r0, #0
	bge	.L15
.L19:
	ldr	r2, .L22+8
	ldr	r3, .L22+12
	ldr	r2, [r2]
	mvn	r0, #0
	str	r2, [r3]
	b	.L1
.L16:
	mvn	r0, #0
	b	.L1
.L21:
	bl	__stack_chk_fail
.L2:
	mov	r1, r4
	ldr	r0, .L22+16
	bl	IBWARN
	ldr	r2, .L22+8
	ldr	r3, .L22+12
	ldr	r2, [r2]
	mvn	r0, #0
	str	r2, [r3]
	b	.L1
.L23:
	.align	2
.L22:
	.word	.LC1
	.word	AF_INET6
	.word	EINVAL
	.word	errno
	.word	.LC0
	.size	ib_resolve_portid_str_via, .-ib_resolve_portid_str_via
	.comm	errno,4,4
	.comm	EINVAL,4,4
	.comm	AF_INET6,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
