	.file	"877078.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"This is a remote printer!"
.LC1:
	.string	"Enter IPv4 address:"
.LC2:
	.string	"%15s"
.LC3:
	.string	"Enter port:"
.LC4:
	.string	"%d"
	.align 8
.LC5:
	.string	"Thank you, I'm trying to print %s:%d now!\n"
	.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
	sub	rsp, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR stdout[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
	mov	DWORD PTR -36[rbp], 0
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -36[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -36[rbp]
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -36[rbp]
	lea	rax, -32[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	print
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC6:
	.string	"No socket :("
.LC7:
	.string	"No communication :(\n"
.LC8:
	.string	"No data :("
	.text
	.globl	print
	.type	print, @function
print:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 64
	mov	QWORD PTR -8248[rbp], rdi
	mov	DWORD PTR -8252[rbp], esi
	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 -8228[rbp], eax
	cmp	DWORD PTR -8228[rbp], -1
	jne	.L5
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L4
.L5:
	mov	rax, QWORD PTR -8248[rbp]
	mov	rdi, rax
	call	inet_addr@PLT
	mov	DWORD PTR -8220[rbp], eax
	mov	WORD PTR -8224[rbp], 2
	mov	eax, DWORD PTR -8252[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -8222[rbp], ax
	lea	rcx, -8224[rbp]
	mov	eax, DWORD PTR -8228[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	jns	.L7
	lea	rdi, .LC7[rip]
	call	perror@PLT
	jmp	.L4
.L7:
	lea	rsi, -8208[rbp]
	mov	eax, DWORD PTR -8228[rbp]
	mov	ecx, 0
	mov	edx, 8192
	mov	edi, eax
	call	recv@PLT
	test	rax, rax
	jns	.L8
	lea	rdi, .LC8[rip]
	call	puts@PLT
	jmp	.L4
.L8:
	lea	rax, -8208[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -8228[rbp]
	mov	edi, eax
	call	close@PLT
	nop
.L4:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	print, .-print
	.section	.rodata
.LC9:
	.string	"r"
.LC10:
	.string	"flag.txt"
.LC11:
	.string	"YAY, FLAG: %s\n"
	.text
	.globl	print_flag
	.type	print_flag, @function
print_flag:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, .LC9[rip]
	lea	rdi, .LC10[rip]
	call	fopen@PLT
	mov	QWORD PTR -72[rbp], rax
	mov	rdx, QWORD PTR -72[rbp]
	lea	rax, -64[rbp]
	mov	esi, 50
	mov	rdi, rax
	call	fgets@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rax, -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	print_flag, .-print_flag
	.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	"877078.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"This is a remote printer!\000"
	.align	2
.LC1:
	.ascii	"Enter IPv4 address:\000"
	.align	2
.LC2:
	.ascii	"%15s\000"
	.align	2
.LC3:
	.ascii	"Enter port:\000"
	.align	2
.LC4:
	.ascii	"%d\000"
	.align	2
.LC5:
	.ascii	"Thank you, I'm trying to print %s:%d now!\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L4+4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r0, .L4+8
	bl	puts
	ldr	r0, .L4+12
	bl	printf
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L4+16
	bl	__isoc99_scanf
	ldr	r0, .L4+20
	bl	printf
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L4+24
	bl	__isoc99_scanf
	ldr	r2, [fp, #-28]
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L4+28
	bl	printf
	ldr	r2, [fp, #-28]
	sub	r3, fp, #24
	mov	r1, r2
	mov	r0, r3
	bl	print
	mov	r3, #0
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC6
	.word	stdout
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.section	.rodata
	.align	2
.LC7:
	.ascii	"No socket :(\000"
	.align	2
.LC8:
	.ascii	"No communication :(\012\000"
	.align	2
.LC9:
	.ascii	"No data :(\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	print
	.syntax unified
	.arm
	.fpu softvfp
	.type	print, %function
print:
	@ args = 0, pretend = 0, frame = 8224
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #8192
	sub	sp, sp, #36
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r0, [r3, #-28]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r1, [r3, #-32]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [r4, #-24]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-24]
	cmn	r3, #1
	bne	.L7
	ldr	r0, .L13+4
	bl	puts
	b	.L6
.L7:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-28]
	bl	inet_addr
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-16]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, #2
	strh	r2, [r3, #-20]	@ movhi
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	strh	r2, [r3, #-18]	@ movhi
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #20
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [r0, #-24]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	bge	.L9
	ldr	r0, .L13+8
	bl	perror
	b	.L6
.L9:
	sub	r1, fp, #8192
	sub	r1, r1, #12
	sub	r1, r1, #4
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, #0
	mov	r2, #8192
	ldr	r0, [r0, #-24]
	bl	recv
	mov	r3, r0
	cmp	r3, #0
	bge	.L10
	ldr	r0, .L13+12
	bl	puts
	b	.L6
.L10:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	printf
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-24]
	bl	close
	nop
.L6:
	ldr	r3, .L13
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC10
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	print, .-print
	.section	.rodata
	.align	2
.LC11:
	.ascii	"r\000"
	.align	2
.LC12:
	.ascii	"flag.txt\000"
	.align	2
.LC13:
	.ascii	"YAY, FLAG: %s\012\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	print_flag
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_flag, %function
print_flag:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L18+4
	ldr	r0, .L18+8
	bl	fopen
	str	r0, [fp, #-64]
	sub	r3, fp, #60
	ldr	r2, [fp, #-64]
	mov	r1, #50
	mov	r0, r3
	bl	fgets
	ldr	r0, [fp, #-64]
	bl	fclose
	sub	r3, fp, #60
	mov	r1, r3
	ldr	r0, .L18+12
	bl	printf
	nop
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC14
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	print_flag, .-print_flag
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
