	.file	"175143611.c"
	.intel_syntax noprefix
	.text
	.local	mutex
	.comm	mutex,40,32
	.globl	getprotobyname
	.type	getprotobyname, @function
getprotobyname:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -24[rbp], 0
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -32[rbp], eax
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR buf.2[rip]
	test	rax, rax
	jne	.L3
	mov	QWORD PTR blen.1[rip], 1024
	mov	rax, QWORD PTR blen.1[rip]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR buf.2[rip], rax
	jmp	.L3
.L6:
	mov	rax, QWORD PTR blen.1[rip]
	add	rax, rax
	mov	QWORD PTR blen.1[rip], rax
	mov	rdx, QWORD PTR blen.1[rip]
	mov	rax, QWORD PTR buf.2[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L4
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -32[rbp], eax
	mov	rax, QWORD PTR buf.2[rip]
	mov	rdi, rax
	call	free@PLT
.L4:
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR buf.2[rip], rax
.L3:
	mov	rax, QWORD PTR buf.2[rip]
	test	rax, rax
	je	.L5
	mov	rcx, QWORD PTR blen.1[rip]
	mov	rdx, QWORD PTR buf.2[rip]
	lea	rsi, -32[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	r8, rsi
	lea	rsi, resbuf.0[rip]
	mov	rdi, rax
	call	_nss_files_getprotobyname_r@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], -2
	je	.L6
.L5:
	cmp	DWORD PTR -28[rbp], 1
	jne	.L7
	mov	rax, QWORD PTR buf.2[rip]
	test	rax, rax
	jne	.L8
.L7:
	call	__errno_location@PLT
	mov	edx, DWORD PTR -32[rbp]
	mov	DWORD PTR [rax], edx
	mov	QWORD PTR -24[rbp], 0
	jmp	.L9
.L8:
	lea	rax, resbuf.0[rip]
	mov	QWORD PTR -24[rbp], rax
.L9:
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	getprotobyname, .-getprotobyname
	.local	buf.2
	.comm	buf.2,8,8
	.local	blen.1
	.comm	blen.1,8,8
	.local	resbuf.0
	.comm	resbuf.0,24,16
	.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	"175143611.c"
	.text
	.local	mutex
	.comm	mutex,24,4
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	getprotobyname
	.syntax unified
	.arm
	.fpu softvfp
	.type	getprotobyname, %function
getprotobyname:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-32]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-20]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	ldr	r0, .L12+4
	bl	pthread_mutex_lock
	ldr	r3, .L12+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L3
	ldr	r3, .L12+12
	mov	r2, #1024
	str	r2, [r3]
	ldr	r3, .L12+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L12+8
	str	r2, [r3]
	b	.L3
.L6:
	ldr	r3, .L12+12
	ldr	r3, [r3]
	lsl	r3, r3, #1
	ldr	r2, .L12+12
	str	r3, [r2]
	ldr	r3, .L12+8
	ldr	r3, [r3]
	ldr	r2, .L12+12
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	realloc
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L4
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	ldr	r3, .L12+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
.L4:
	ldr	r2, .L12+8
	ldr	r3, [fp, #-12]
	str	r3, [r2]
.L3:
	ldr	r3, .L12+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L5
	ldr	r3, .L12+8
	ldr	r2, [r3]
	ldr	r3, .L12+12
	ldr	r1, [r3]
	sub	r3, fp, #24
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L12+16
	ldr	r0, [fp, #-32]
	bl	_nss_files_getprotobyname_r
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #2
	beq	.L6
.L5:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L7
	ldr	r3, .L12+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L8
.L7:
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-24]
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L9
.L8:
	ldr	r3, .L12+16
	str	r3, [fp, #-20]
.L9:
	ldr	r0, .L12+4
	bl	pthread_mutex_unlock
	ldr	r3, [fp, #-20]
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	mutex
	.word	buf.5961
	.word	blen.5959
	.word	resbuf.5960
	.size	getprotobyname, .-getprotobyname
	.local	buf.5961
	.comm	buf.5961,4,4
	.local	blen.5959
	.comm	blen.5959,4,4
	.local	resbuf.5960
	.comm	resbuf.5960,12,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
