	.file	"758991.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"calling gethostname() ...\n"
.LC1:
	.string	"gethostname"
.LC2:
	.string	"host name is %s\n"
	.align 8
.LC3:
	.string	"calling getaddrinfo (preferred) ...\n"
.LC4:
	.string	"getaddrinfo rtn: %d %s\n"
.LC5:
	.string	"getaddrinfo"
.LC6:
	.string	"getaddrinfo() succeeded\n"
	.align 8
.LC7:
	.string	"printing ip address via getaddrinfo ...\n"
.LC8:
	.string	"%x (canonical: %s)\n"
.LC9:
	.string	"ERROR: can't look up: %s\n"
	.align 8
.LC10:
	.string	"calling gethostbyname (obsolete) ...\n"
.LC11:
	.string	"gethostbyname"
.LC12:
	.string	"gethostbyname() succeeded\n"
	.align 8
.LC13:
	.string	"printing ip address(es) via gethostbyname ...\n"
.LC14:
	.string	"%x\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, 1104
	mov	DWORD PTR -1092[rbp], edi
	mov	QWORD PTR -1104[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -1064[rbp], 0
	mov	QWORD PTR -1072[rbp], 0
	cmp	DWORD PTR -1092[rbp], 1
	jle	.L2
	mov	rax, QWORD PTR -1104[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -1040[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	jmp	.L3
.L2:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	gethostname@PLT
	cmp	eax, -1
	jne	.L4
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -1040[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L3:
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 36
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	esi, 48
	mov	edi, 1
	call	calloc@PLT
	mov	QWORD PTR -1064[rbp], rax
	mov	rax, QWORD PTR -1064[rbp]
	mov	eax, DWORD PTR [rax]
	or	eax, 2
	mov	edx, eax
	mov	rax, QWORD PTR -1064[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -1064[rbp]
	mov	DWORD PTR 4[rax], 2
	lea	rcx, -1072[rbp]
	mov	rdx, QWORD PTR -1064[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	getaddrinfo@PLT
	mov	DWORD PTR -1076[rbp], eax
	cmp	DWORD PTR -1076[rbp], 0
	je	.L5
	mov	eax, DWORD PTR -1076[rbp]
	mov	edi, eax
	call	gai_strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -1076[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 24
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 40
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -1072[rbp]
	test	rax, rax
	je	.L6
	mov	rax, QWORD PTR -1072[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -1056[rbp], rax
	mov	rax, QWORD PTR -1072[rbp]
	mov	rcx, QWORD PTR 32[rax]
	mov	rax, QWORD PTR -1056[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -1072[rbp]
	mov	rdi, rax
	call	freeaddrinfo@PLT
	cmp	QWORD PTR -1064[rbp], 0
	je	.L7
	mov	rax, QWORD PTR -1064[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L7
.L6:
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -1040[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L7:
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 37
	mov	esi, 1
	lea	rdi, .LC10[rip]
	call	fwrite@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	gethostbyname@PLT
	mov	QWORD PTR -1048[rbp], rax
	cmp	QWORD PTR -1048[rbp], 0
	jne	.L8
	lea	rdi, .LC11[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC12[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 46
	mov	esi, 1
	lea	rdi, .LC13[rip]
	call	fwrite@PLT
	cmp	QWORD PTR -1048[rbp], 0
	je	.L9
	mov	DWORD PTR -1080[rbp], 0
	jmp	.L10
.L11:
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdx, QWORD PTR 24[rax]
	mov	eax, DWORD PTR -1080[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -1080[rbp], 1
.L10:
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdx, QWORD PTR 24[rax]
	mov	eax, DWORD PTR -1080[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L11
	jmp	.L12
.L9:
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -1040[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L12:
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.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	"758991.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"calling gethostname() ...\012\000"
	.align	2
.LC1:
	.ascii	"gethostname\000"
	.align	2
.LC2:
	.ascii	"host name is %s\012\000"
	.align	2
.LC3:
	.ascii	"calling getaddrinfo (preferred) ...\012\000"
	.align	2
.LC4:
	.ascii	"getaddrinfo rtn: %d %s\012\000"
	.align	2
.LC5:
	.ascii	"getaddrinfo\000"
	.align	2
.LC6:
	.ascii	"getaddrinfo() succeeded\012\000"
	.align	2
.LC7:
	.ascii	"printing ip address via getaddrinfo ...\012\000"
	.align	2
.LC8:
	.ascii	"%x (canonical: %s)\012\000"
	.align	2
.LC9:
	.ascii	"ERROR: can't look up: %s\012\000"
	.align	2
.LC10:
	.ascii	"calling gethostbyname (obsolete) ...\012\000"
	.align	2
.LC11:
	.ascii	"gethostbyname\000"
	.align	2
.LC12:
	.ascii	"gethostbyname() succeeded\012\000"
	.align	2
.LC13:
	.ascii	"printing ip address(es) via gethostbyname ...\012\000"
	.align	2
.LC14:
	.ascii	"%x\012\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1064
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #1056
	sub	sp, sp, #12
	str	r0, [fp, #-1072]
	str	r1, [fp, #-1076]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1056]
	mov	r3, #0
	str	r3, [fp, #-1064]
	ldr	r3, [fp, #-1072]
	cmp	r3, #1
	ble	.L2
	ldr	r3, [fp, #-1076]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	b	.L3
.L2:
	ldr	r3, .L15+4
	ldr	r3, [r3]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L15+8
	bl	fwrite
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, #1024
	mov	r0, r3
	bl	gethostname
	mov	r3, r0
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L15+12
	bl	perror
	mov	r0, #1
	bl	exit
.L4:
	ldr	r3, .L15+4
	ldr	r0, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L15+16
	bl	fprintf
.L3:
	ldr	r3, .L15+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	ldr	r3, .L15+4
	ldr	r3, [r3]
	mov	r2, #36
	mov	r1, #1
	ldr	r0, .L15+20
	bl	fwrite
	mov	r1, #32
	mov	r0, #1
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-1056]
	ldr	r3, [fp, #-1056]
	ldr	r3, [r3]
	orr	r2, r3, #2
	ldr	r3, [fp, #-1056]
	str	r2, [r3]
	ldr	r3, [fp, #-1056]
	mov	r2, #2
	str	r2, [r3, #4]
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #12
	sub	r0, fp, #1024
	sub	r0, r0, #12
	sub	r0, r0, #4
	ldr	r2, [fp, #-1056]
	mov	r1, #0
	bl	getaddrinfo
	str	r0, [fp, #-1052]
	ldr	r3, [fp, #-1052]
	cmp	r3, #0
	beq	.L5
	ldr	r3, .L15+4
	ldr	r4, [r3]
	ldr	r0, [fp, #-1052]
	bl	gai_strerror
	mov	r3, r0
	ldr	r2, [fp, #-1052]
	ldr	r1, .L15+24
	mov	r0, r4
	bl	fprintf
	ldr	r0, .L15+28
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	ldr	r3, .L15+4
	ldr	r3, [r3]
	mov	r2, #24
	mov	r1, #1
	ldr	r0, .L15+32
	bl	fwrite
	ldr	r3, .L15+4
	ldr	r3, [r3]
	mov	r2, #40
	mov	r1, #1
	ldr	r0, .L15+36
	bl	fwrite
	ldr	r3, [fp, #-1064]
	cmp	r3, #0
	beq	.L6
	ldr	r3, [fp, #-1064]
	ldr	r3, [r3, #20]
	str	r3, [fp, #-1048]
	ldr	r3, .L15+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-1048]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-1064]
	ldr	r3, [r3, #24]
	ldr	r1, .L15+40
	bl	fprintf
	ldr	r3, [fp, #-1064]
	mov	r0, r3
	bl	freeaddrinfo
	ldr	r3, [fp, #-1056]
	cmp	r3, #0
	beq	.L7
	ldr	r0, [fp, #-1056]
	bl	free
	b	.L7
.L6:
	ldr	r3, .L15+4
	ldr	r0, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L15+44
	bl	fprintf
.L7:
	ldr	r3, .L15+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	ldr	r3, .L15+4
	ldr	r3, [r3]
	mov	r2, #37
	mov	r1, #1
	ldr	r0, .L15+48
	bl	fwrite
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	gethostbyname
	str	r0, [fp, #-1044]
	ldr	r3, [fp, #-1044]
	cmp	r3, #0
	bne	.L8
	ldr	r0, .L15+52
	bl	perror
	mov	r0, #1
	bl	exit
.L8:
	ldr	r3, .L15+4
	ldr	r3, [r3]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L15+56
	bl	fwrite
	ldr	r3, .L15+4
	ldr	r3, [r3]
	mov	r2, #46
	mov	r1, #1
	ldr	r0, .L15+60
	bl	fwrite
	ldr	r3, [fp, #-1044]
	cmp	r3, #0
	beq	.L9
	mov	r3, #0
	str	r3, [fp, #-1060]
	b	.L10
.L11:
	ldr	r3, .L15+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-1044]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-1060]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L15+64
	bl	fprintf
	ldr	r3, [fp, #-1060]
	add	r3, r3, #1
	str	r3, [fp, #-1060]
.L10:
	ldr	r3, [fp, #-1044]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-1060]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L11
	b	.L12
.L9:
	ldr	r3, .L15+4
	ldr	r0, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L15+44
	bl	fprintf
.L12:
	ldr	r3, .L15+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r3, #0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC15
	.word	stderr
	.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
	.word	.LC14
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
