	.file	"299039.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"bind"
.LC1:
	.string	"LD_PRELOAD"
	.text
	.globl	bind
	.type	bind, @function
bind:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 168
	.cfi_offset 3, -24
	mov	DWORD PTR -164[rbp], edi
	mov	QWORD PTR -176[rbp], rsi
	mov	DWORD PTR -168[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR orig.0[rip]
	test	rax, rax
	jne	.L2
	lea	rsi, .LC0[rip]
	mov	rdi, -1
	call	dlsym@PLT
	mov	QWORD PTR orig.0[rip], rax
.L2:
	mov	rax, QWORD PTR -176[rbp]
	movzx	eax, WORD PTR [rax]
	cmp	ax, 10
	jne	.L3
	mov	rax, QWORD PTR -176[rbp]
	mov	QWORD PTR -152[rbp], rax
	mov	rax, QWORD PTR -152[rbp]
	movzx	ebx, WORD PTR 2[rax]
	mov	edi, 80
	call	htons@PLT
	cmp	bx, ax
	jne	.L3
	mov	rax, QWORD PTR -152[rbp]
	add	rax, 8
	mov	edx, 16
	lea	rsi, in6addr_any[rip]
	mov	rdi, rax
	call	memcmp@PLT
	test	eax, eax
	jne	.L3
	mov	WORD PTR -144[rbp], 1
	movabs	rax, 7165064483209180463
	movabs	rdx, 7521962937933589601
	mov	QWORD PTR -142[rbp], rax
	mov	QWORD PTR -134[rbp], rdx
	movabs	rax, 6875698586436186725
	movabs	rdx, 8391166444094777700
	mov	QWORD PTR -126[rbp], rax
	mov	QWORD PTR -118[rbp], rdx
	movabs	rax, 30227152832982629
	mov	edx, 0
	mov	QWORD PTR -110[rbp], rax
	mov	QWORD PTR -102[rbp], rdx
	mov	QWORD PTR -94[rbp], 0
	mov	QWORD PTR -86[rbp], 0
	mov	QWORD PTR -78[rbp], 0
	mov	QWORD PTR -70[rbp], 0
	mov	QWORD PTR -62[rbp], 0
	mov	QWORD PTR -54[rbp], 0
	mov	QWORD PTR -46[rbp], 0
	mov	DWORD PTR -38[rbp], 0
	lea	rdi, .LC1[rip]
	call	unsetenv@PLT
	mov	eax, DWORD PTR -164[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edx, 0
	mov	esi, 524289
	mov	edi, 1
	call	socket@PLT
	mov	DWORD PTR -160[rbp], eax
	cmp	DWORD PTR -160[rbp], -1
	jne	.L4
	call	abort@PLT
.L4:
	mov	eax, DWORD PTR -160[rbp]
	cmp	eax, DWORD PTR -164[rbp]
	je	.L5
	mov	ecx, DWORD PTR -164[rbp]
	mov	eax, DWORD PTR -160[rbp]
	mov	edx, 524288
	mov	esi, ecx
	mov	edi, eax
	call	dup3@PLT
	cmp	eax, -1
	jne	.L6
	call	abort@PLT
.L6:
	mov	eax, DWORD PTR -160[rbp]
	mov	edi, eax
	call	close@PLT
.L5:
	lea	rax, -144[rbp]
	add	rax, 2
	mov	rdi, rax
	call	unlink@PLT
	test	eax, eax
	je	.L7
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 2
	je	.L7
	call	abort@PLT
.L7:
	mov	r8, QWORD PTR orig.0[rip]
	lea	rcx, -144[rbp]
	mov	eax, DWORD PTR -164[rbp]
	mov	edx, 110
	mov	rsi, rcx
	mov	edi, eax
	call	r8
	mov	DWORD PTR -156[rbp], eax
	cmp	DWORD PTR -156[rbp], 0
	jne	.L8
	lea	rax, -144[rbp]
	add	rax, 2
	mov	esi, 511
	mov	rdi, rax
	call	chmod@PLT
.L8:
	mov	eax, DWORD PTR -156[rbp]
	jmp	.L9
.L3:
	mov	r8, QWORD PTR orig.0[rip]
	mov	edx, DWORD PTR -168[rbp]
	mov	rcx, QWORD PTR -176[rbp]
	mov	eax, DWORD PTR -164[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	r8
.L9:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	bind, .-bind
	.local	orig.0
	.comm	orig.0,8,8
	.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	"299039.c"
	.text
	.section	.rodata
	.align	2
.LC1:
	.ascii	"bind\000"
	.align	2
.LC2:
	.ascii	"LD_PRELOAD\000"
	.align	2
.LC0:
	.short	1
	.ascii	"/usr/local/apache2/sock_dir/listen.sock\000"
	.space	68
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	bind
	.syntax unified
	.arm
	.fpu softvfp
	.type	bind, %function
bind:
	@ args = 0, pretend = 0, frame = 144
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #148
	str	r0, [fp, #-144]
	str	r1, [fp, #-148]
	str	r2, [fp, #-152]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L11+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L2
	ldr	r1, .L11+8
	mvn	r0, #0
	bl	dlsym
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L11+4
	str	r2, [r3]
.L2:
	ldr	r3, [fp, #-148]
	ldrh	r3, [r3]
	cmp	r3, #10
	bne	.L3
	ldr	r3, [fp, #-148]
	str	r3, [fp, #-140]
	ldr	r3, [fp, #-140]
	ldrh	r4, [r3, #2]
	mov	r0, #80
	bl	htons
	mov	r3, r0
	cmp	r4, r3
	bne	.L3
	ldr	r3, [fp, #-140]
	add	r3, r3, #8
	mov	r2, #16
	ldr	r1, .L11+12
	mov	r0, r3
	bl	memcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
	ldr	r2, .L11+16
	sub	r3, fp, #128
	mov	r1, r2
	mov	r2, #110
	mov	r0, r3
	bl	memcpy
	ldr	r0, .L11+20
	bl	unsetenv
	ldr	r0, [fp, #-144]
	bl	close
	mov	r2, #0
	ldr	r1, .L11+24
	mov	r0, #1
	bl	socket
	str	r0, [fp, #-136]
	ldr	r3, [fp, #-136]
	cmn	r3, #1
	bne	.L4
	bl	abort
.L4:
	ldr	r2, [fp, #-136]
	ldr	r3, [fp, #-144]
	cmp	r2, r3
	beq	.L5
	mov	r2, #524288
	ldr	r1, [fp, #-144]
	ldr	r0, [fp, #-136]
	bl	dup3
	mov	r3, r0
	cmn	r3, #1
	bne	.L6
	bl	abort
.L6:
	ldr	r0, [fp, #-136]
	bl	close
.L5:
	sub	r3, fp, #128
	add	r3, r3, #2
	mov	r0, r3
	bl	unlink
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #2
	beq	.L7
	bl	abort
.L7:
	ldr	r3, .L11+4
	ldr	r3, [r3]
	sub	r1, fp, #128
	mov	r2, #110
	ldr	r0, [fp, #-144]
	blx	r3
	str	r0, [fp, #-132]
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	bne	.L8
	sub	r3, fp, #128
	add	r3, r3, #2
	ldr	r1, .L11+28
	mov	r0, r3
	bl	chmod
.L8:
	ldr	r3, [fp, #-132]
	b	.L9
.L3:
	ldr	r3, .L11+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-152]
	ldr	r1, [fp, #-148]
	ldr	r0, [fp, #-144]
	blx	r3
	mov	r3, r0
.L9:
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC3
	.word	orig.7230
	.word	.LC1
	.word	in6addr_any
	.word	.LC0
	.word	.LC2
	.word	524289
	.word	511
	.size	bind, .-bind
	.local	orig.7230
	.comm	orig.7230,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
