	.file	"820575.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"PMI_RANK"
.LC1:
	.string	"PMI_PORT"
	.align 8
.LC2:
	.string	"%d: pmi_rank=%d pmi_host_port=%s\n"
	.align 8
.LC3:
	.string	"%d: I must have been spawned with arg1=:%s:\n"
.LC4:
	.string	"sent init"
.LC5:
	.string	"%d: recvd msg=:%s:\n"
	.align 8
.LC6:
	.string	"cmd=publish_name service=rmb port=9999\n"
.LC7:
	.string	"sent publish_name"
.LC8:
	.string	"cmd=lookup_name service=rmb\n"
.LC9:
	.string	"sent lookup_name"
	.align 8
.LC10:
	.string	"cmd=unpublish_name service=rmb\n"
.LC11:
	.string	"sent unpublish_name"
	.text
	.globl	main
	.type	main, @function
main:
.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, 3144
	.cfi_offset 3, -24
	mov	DWORD PTR -3140[rbp], edi
	mov	QWORD PTR -3152[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR stdout[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
	lea	rdi, .LC0[rip]
	call	getenv@PLT
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -3128[rbp], eax
	lea	rdi, .LC1[rip]
	call	getenv@PLT
	mov	rdx, rax
	lea	rax, -1056[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, 0
	call	getpid@PLT
	mov	esi, eax
	lea	rdx, -1056[rbp]
	mov	eax, DWORD PTR -3128[rbp]
	mov	rcx, rdx
	mov	edx, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -1056[rbp]
	mov	esi, 58
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -3112[rbp], rax
	mov	rax, QWORD PTR -3112[rbp]
	add	rax, 1
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -3124[rbp], eax
	mov	rax, QWORD PTR -3112[rbp]
	mov	BYTE PTR [rax], 0
	mov	edx, DWORD PTR -3124[rbp]
	lea	rax, -1056[rbp]
	mov	esi, edx
	mov	rdi, rax
	mov	eax, 0
	call	connect_to_pm
	mov	DWORD PTR -3120[rbp], eax
	cmp	DWORD PTR -3140[rbp], 1
	jle	.L2
	mov	rax, QWORD PTR -3152[rbp]
	add	rax, 8
	mov	rbx, QWORD PTR [rax]
	mov	eax, 0
	call	getpid@PLT
	mov	rdx, rbx
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L2:
	lea	rax, -3104[rbp]
	movabs	rbx, 8388357179234872675
	movabs	rsi, 8243124845134311456
	mov	QWORD PTR [rax], rbx
	mov	QWORD PTR 8[rax], rsi
	movabs	rbx, 8079511871418231155
	movabs	rsi, 7311139301668907373
	mov	QWORD PTR 16[rax], rbx
	mov	QWORD PTR 24[rax], rsi
	movabs	rbx, 734435758762980210
	mov	QWORD PTR 32[rax], rbx
	mov	BYTE PTR 40[rax], 0
	lea	rax, -3104[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -3104[rbp]
	mov	eax, DWORD PTR -3120[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	write@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rcx, -2080[rbp]
	mov	eax, DWORD PTR -3120[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	mov	DWORD PTR -3116[rbp], eax
	cmp	DWORD PTR -3116[rbp], 0
	js	.L3
	mov	eax, DWORD PTR -3116[rbp]
	cdqe
	mov	BYTE PTR -2080[rbp+rax], 0
.L3:
	lea	rdx, -2080[rbp]
	mov	eax, DWORD PTR -3128[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -3104[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -3104[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -3104[rbp]
	mov	eax, DWORD PTR -3120[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	write@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rcx, -2080[rbp]
	mov	eax, DWORD PTR -3120[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	mov	DWORD PTR -3116[rbp], eax
	cmp	DWORD PTR -3116[rbp], 0
	js	.L4
	mov	eax, DWORD PTR -3116[rbp]
	cdqe
	mov	BYTE PTR -2080[rbp+rax], 0
.L4:
	lea	rdx, -2080[rbp]
	mov	eax, DWORD PTR -3128[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -3104[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -3104[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -3104[rbp]
	mov	eax, DWORD PTR -3120[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	write@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rcx, -2080[rbp]
	mov	eax, DWORD PTR -3120[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	mov	DWORD PTR -3116[rbp], eax
	cmp	DWORD PTR -3116[rbp], 0
	js	.L5
	mov	eax, DWORD PTR -3116[rbp]
	cdqe
	mov	BYTE PTR -2080[rbp+rax], 0
.L5:
	lea	rdx, -2080[rbp]
	mov	eax, DWORD PTR -3128[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -3104[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -3104[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -3104[rbp]
	mov	eax, DWORD PTR -3120[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	write@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	lea	rcx, -2080[rbp]
	mov	eax, DWORD PTR -3120[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	mov	DWORD PTR -3116[rbp], eax
	cmp	DWORD PTR -3116[rbp], 0
	js	.L6
	mov	eax, DWORD PTR -3116[rbp]
	cdqe
	mov	BYTE PTR -2080[rbp+rax], 0
.L6:
	lea	rdx, -2080[rbp]
	mov	eax, DWORD PTR -3128[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -3104[rbp]
	movabs	rbx, 7020664756954754403
	mov	QWORD PTR [rax], rbx
	mov	DWORD PTR 8[rax], 1702521196
	mov	WORD PTR 12[rax], 10
	lea	rax, -3104[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -3104[rbp]
	mov	eax, DWORD PTR -3120[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	write@PLT
	mov	eax, 0
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC12:
	.string	"gethostbyname failed"
.LC13:
	.string	"socket failed"
.LC14:
	.string	"Error calling setsockopt:"
.LC15:
	.string	"connect failed"
	.text
	.globl	connect_to_pm
	.type	connect_to_pm, @function
connect_to_pm:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -48[rbp], 1
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	gethostbyname@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L10
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L10:
	lea	rax, -32[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 20[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR [rax]
	lea	rcx, -32[rbp]
	add	rcx, 4
	mov	rsi, rax
	mov	rdi, rcx
	call	memmove@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	WORD PTR -32[rbp], ax
	mov	eax, DWORD PTR -60[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -44[rbp], eax
	cmp	DWORD PTR -44[rbp], 0
	jns	.L11
	lea	rdi, .LC13[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L11:
	lea	rdx, -48[rbp]
	mov	eax, DWORD PTR -44[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 6
	mov	edi, eax
	call	setsockopt@PLT
	test	eax, eax
	je	.L12
	lea	rdi, .LC14[rip]
	call	perror@PLT
.L12:
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -44[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	jns	.L13
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L13:
	mov	eax, DWORD PTR -44[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	connect_to_pm, .-connect_to_pm
	.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	"820575.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"PMI_RANK\000"
	.align	2
.LC1:
	.ascii	"PMI_PORT\000"
	.align	2
.LC2:
	.ascii	"%d: pmi_rank=%d pmi_host_port=%s\012\000"
	.align	2
.LC3:
	.ascii	"%d: I must have been spawned with arg1=:%s:\012\000"
	.align	2
.LC4:
	.ascii	"cmd=init pmi_version=1 pmi_subversion=1\012\000"
	.align	2
.LC5:
	.ascii	"sent init\000"
	.align	2
.LC6:
	.ascii	"%d: recvd msg=:%s:\012\000"
	.align	2
.LC7:
	.ascii	"cmd=publish_name service=rmb port=9999\012\000"
	.align	2
.LC8:
	.ascii	"sent publish_name\000"
	.align	2
.LC9:
	.ascii	"cmd=lookup_name service=rmb\012\000"
	.align	2
.LC10:
	.ascii	"sent lookup_name\000"
	.align	2
.LC11:
	.ascii	"cmd=unpublish_name service=rmb\012\000"
	.align	2
.LC12:
	.ascii	"sent unpublish_name\000"
	.align	2
.LC13:
	.ascii	"cmd=finalize\012\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 3104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #3104
	str	r0, [fp, #-3104]
	str	r1, [fp, #-3108]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L9+4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
	ldr	r0, .L9+8
	bl	getenv
	mov	r3, r0
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-3100]
	ldr	r0, .L9+12
	bl	getenv
	mov	r2, r0
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	bl	getpid
	mov	r1, r0
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-3100]
	ldr	r0, .L9+16
	bl	printf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, #58
	mov	r0, r3
	bl	strchr
	str	r0, [fp, #-3096]
	ldr	r3, [fp, #-3096]
	add	r3, r3, #1
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-3092]
	ldr	r3, [fp, #-3096]
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, [fp, #-3092]
	mov	r0, r3
	bl	connect_to_pm
	str	r0, [fp, #-3088]
	ldr	r3, [fp, #-3104]
	cmp	r3, #1
	ble	.L2
	bl	getpid
	mov	r1, r0
	ldr	r3, [fp, #-3108]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r0, .L9+20
	bl	printf
	mov	r0, #0
	bl	exit
.L2:
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, .L9+24
	mov	ip, r3
	mov	lr, r2
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stmia	ip!, {r0, r1}
	strb	r2, [ip]
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-3088]
	bl	write
	ldr	r0, .L9+28
	bl	puts
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-3088]
	bl	read
	str	r0, [fp, #-3084]
	ldr	r3, [fp, #-3084]
	cmp	r3, #0
	blt	.L3
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-3084]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
.L3:
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, r3
	ldr	r1, [fp, #-3100]
	ldr	r0, .L9+32
	bl	printf
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L9+36
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-3088]
	bl	write
	ldr	r0, .L9+40
	bl	puts
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-3088]
	bl	read
	str	r0, [fp, #-3084]
	ldr	r3, [fp, #-3084]
	cmp	r3, #0
	blt	.L4
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-3084]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
.L4:
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, r3
	ldr	r1, [fp, #-3100]
	ldr	r0, .L9+32
	bl	printf
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L9+44
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-3088]
	bl	write
	ldr	r0, .L9+48
	bl	puts
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-3088]
	bl	read
	str	r0, [fp, #-3084]
	ldr	r3, [fp, #-3084]
	cmp	r3, #0
	blt	.L5
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-3084]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
.L5:
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, r3
	ldr	r1, [fp, #-3100]
	ldr	r0, .L9+32
	bl	printf
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L9+52
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-3088]
	bl	write
	ldr	r0, .L9+56
	bl	puts
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-3088]
	bl	read
	str	r0, [fp, #-3084]
	ldr	r3, [fp, #-3084]
	cmp	r3, #0
	blt	.L6
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-3084]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
.L6:
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, r3
	ldr	r1, [fp, #-3100]
	ldr	r0, .L9+32
	bl	printf
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, .L9+60
	mov	ip, r3
	mov	r3, r2
	ldm	r3, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2}
	strh	r3, [ip]	@ movhi
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-3088]
	bl	write
	mov	r3, #0
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC14
	.word	stdout
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	main, .-main
	.section	.rodata
	.align	2
.LC15:
	.ascii	"gethostbyname failed\000"
	.align	2
.LC16:
	.ascii	"socket failed\000"
	.align	2
.LC17:
	.ascii	"Error calling setsockopt:\000"
	.align	2
.LC18:
	.ascii	"connect failed\000"
	.align	2
.LC19:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	connect_to_pm
	.syntax unified
	.arm
	.fpu softvfp
	.type	connect_to_pm, %function
connect_to_pm:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-36]
	ldr	r0, [fp, #-40]
	bl	gethostbyname
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L12
	ldr	r0, .L18+4
	bl	puts
	mvn	r0, #0
	bl	exit
.L12:
	sub	r3, fp, #24
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #12]
	mov	r2, r3
	sub	r3, fp, #24
	add	r3, r3, #4
	mov	r0, r3
	bl	memmove
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-24]	@ movhi
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L13
	ldr	r0, .L18+8
	bl	puts
	mvn	r0, #0
	bl	exit
.L13:
	sub	r3, fp, #36
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #1
	mov	r1, #6
	ldr	r0, [fp, #-28]
	bl	setsockopt
	mov	r3, r0
	cmp	r3, #0
	beq	.L14
	ldr	r0, .L18+12
	bl	perror
.L14:
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	bge	.L15
	ldr	r0, .L18+16
	bl	puts
	mvn	r0, #0
	bl	exit
.L15:
	ldr	r3, [fp, #-28]
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC19
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.size	connect_to_pm, .-connect_to_pm
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
