	.file	"extr_radlib.c_rad_add_server_ex.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Too many RADIUS servers specified"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%s: host not found"
.LC2:
	.string	"udp"
.LC3:
	.string	"radius"
.LC4:
	.string	"radacct"
.LC5:
	.string	"Out of memory"
	.text
	.p2align 4
	.globl	rad_add_server_ex
	.type	rad_add_server_ex, @function
rad_add_server_ex:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR [rdi]
	cmp	rax, QWORD PTR MAXSERVERS[rip]
	mov	DWORD PTR 8[rsp], r8d
	mov	DWORD PTR 12[rsp], r9d
	jnb	.L17
	mov	r13d, edx
	lea	rdx, [rax+rax*8]
	mov	rax, QWORD PTR 16[rdi]
	mov	r12, rsi
	xor	esi, esi
	mov	r14, rcx
	lea	rbx, [rax+rdx*8]
	mov	edx, 24
	lea	rdi, 48[rbx]
	lea	r15, 64[rbx]
	call	memset@PLT
	mov	eax, DWORD PTR AF_INET[rip]
	mov	rsi, r15
	mov	rdi, r12
	mov	DWORD PTR 48[rbx], 24
	mov	DWORD PTR 68[rbx], eax
	call	inet_aton@PLT
	test	eax, eax
	je	.L18
	test	r13d, r13d
	jne	.L19
.L6:
	mov	rax, QWORD PTR RADIUS_AUTH[rip]
	lea	rsi, .LC2[rip]
	cmp	QWORD PTR 8[rbp], rax
	je	.L20
	lea	rdi, .LC4[rip]
	call	getservbyname@PLT
	test	rax, rax
	je	.L11
.L15:
	mov	rax, QWORD PTR [rax]
.L12:
	mov	QWORD PTR 56[rbx], rax
.L7:
	mov	rdi, r14
	call	strdup@PLT
	mov	QWORD PTR 40[rbx], rax
	test	rax, rax
	je	.L21
	mov	eax, DWORD PTR 8[rsp]
	mov	QWORD PTR 32[rbx], 0
	mov	QWORD PTR 24[rbx], 0
	mov	DWORD PTR [rbx], eax
	mov	eax, DWORD PTR 12[rsp]
	mov	QWORD PTR 16[rbx], 0
	mov	DWORD PTR 4[rbx], eax
	mov	eax, DWORD PTR 80[rsp]
	mov	DWORD PTR 8[rbx], eax
	mov	rax, QWORD PTR 88[rsp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR 12[rbx], eax
	xor	eax, eax
	add	QWORD PTR 0[rbp], 1
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.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
.L20:
	.cfi_restore_state
	lea	rdi, .LC3[rip]
	call	getservbyname@PLT
	test	rax, rax
	jne	.L15
	mov	edi, DWORD PTR RADIUS_PORT[rip]
	call	htons@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, r12
	call	gethostbyname@PLT
	test	rax, rax
	je	.L22
	mov	esi, DWORD PTR [rax]
	mov	edx, 4
	mov	rdi, r15
	call	memcpy@PLT
	test	r13d, r13d
	je	.L6
.L19:
	mov	edi, r13d
	call	htons@PLT
	mov	QWORD PTR 56[rbx], rax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L11:
	mov	edi, DWORD PTR RADACCT_PORT[rip]
	call	htons@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L17:
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	generr@PLT
	mov	eax, -1
	jmp	.L1
.L22:
	mov	rdx, r12
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	generr@PLT
	mov	eax, -1
	jmp	.L1
.L21:
	lea	rsi, .LC5[rip]
	mov	rdi, rbp
	call	generr@PLT
	or	eax, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	rad_add_server_ex, .-rad_add_server_ex
	.comm	RADIUS_PORT,4,4
	.comm	RADIUS_AUTH,8,8
	.comm	RADACCT_PORT,4,4
	.comm	MAXSERVERS,8,8
	.comm	AF_INET,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_radlib.c_rad_add_server_ex.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Too many RADIUS servers specified\000"
	.align	2
.LC1:
	.ascii	"%s: host not found\000"
	.align	2
.LC2:
	.ascii	"udp\000"
	.align	2
.LC3:
	.ascii	"radius\000"
	.align	2
.LC4:
	.ascii	"radacct\000"
	.align	2
.LC5:
	.ascii	"Out of memory\000"
	.text
	.align	2
	.global	rad_add_server_ex
	.syntax unified
	.arm
	.fpu softvfp
	.type	rad_add_server_ex, %function
rad_add_server_ex:
	@ args = 16, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	lr, .L23
	ldr	ip, [r0]
	ldr	lr, [lr]
	cmp	ip, lr
	bcs	.L17
	ldr	r9, [r0, #8]
	add	ip, ip, ip, lsl #1
	add	r4, r9, ip, lsl #4
	mov	r6, r1
	mov	r5, r0
	mov	r1, #0
	mov	r7, r2
	add	r0, r4, #36
	mov	r2, #8
	mov	r8, r3
	lsl	r10, ip, #4
	bl	memset
	mov	r2, #16
	ldr	r3, .L23+4
	add	fp, r4, #40
	ldr	r3, [r3]
	mov	r1, fp
	mov	r0, r6
	str	r2, [r4, #32]
	str	r3, [r4, #44]
	bl	inet_aton
	cmp	r0, #0
	beq	.L18
	cmp	r7, #0
	bne	.L19
.L6:
	ldr	r3, .L23+8
	ldr	r2, [r5, #4]
	ldr	r3, [r3]
	ldr	r1, .L23+12
	cmp	r2, r3
	beq	.L20
	ldr	r0, .L23+16
	bl	getservbyname
	cmp	r0, #0
	beq	.L11
.L15:
	ldr	r0, [r0]
.L12:
	str	r0, [r4, #36]
.L7:
	mov	r0, r8
	bl	strdup
	cmp	r0, #0
	str	r0, [r4, #28]
	beq	.L21
	mov	r3, #0
	ldr	r1, [sp, #40]
	ldr	r2, [r5]
	ldr	ip, [sp, #44]
	str	r1, [r9, r10]
	ldr	r1, [sp, #52]
	add	r2, r2, #1
	ldr	r1, [r1]
	str	ip, [r4, #4]
	ldr	ip, [sp, #48]
	str	r3, [r4, #24]
	str	ip, [r4, #8]
	str	r3, [r4, #20]
	str	r3, [r4, #16]
	str	r1, [r4, #12]
	mov	r0, r3
	str	r2, [r5]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	ldr	r0, .L23+20
	bl	getservbyname
	cmp	r0, #0
	bne	.L15
	ldr	r3, .L23+24
	ldr	r0, [r3]
	bl	htons
	b	.L12
.L18:
	mov	r0, r6
	bl	gethostbyname
	cmp	r0, #0
	beq	.L22
	ldr	r1, [r0]
	mov	r2, #4
	mov	r0, fp
	bl	memcpy
	cmp	r7, #0
	beq	.L6
.L19:
	mov	r0, r7
	bl	htons
	str	r0, [r4, #36]
	b	.L7
.L11:
	ldr	r3, .L23+28
	ldr	r0, [r3]
	bl	htons
	b	.L12
.L17:
	ldr	r1, .L23+32
	bl	generr
	mvn	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	mov	r2, r6
	mov	r0, r5
	ldr	r1, .L23+36
	bl	generr
	mvn	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L21:
	mov	r0, r5
	ldr	r1, .L23+40
	bl	generr
	mvn	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L24:
	.align	2
.L23:
	.word	MAXSERVERS
	.word	AF_INET
	.word	RADIUS_AUTH
	.word	.LC2
	.word	.LC4
	.word	.LC3
	.word	RADIUS_PORT
	.word	RADACCT_PORT
	.word	.LC0
	.word	.LC1
	.word	.LC5
	.size	rad_add_server_ex, .-rad_add_server_ex
	.comm	RADIUS_PORT,4,4
	.comm	RADIUS_AUTH,4,4
	.comm	RADACCT_PORT,4,4
	.comm	MAXSERVERS,4,4
	.comm	AF_INET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
