	.file	"93843.c"
	.intel_syntax noprefix
	.text
	.local	response
	.comm	response,1024,32
	.section	.rodata
	.align 8
.LC0:
	.string	"addrinfo @%p: fam=%d, socktype=%d, proto=%d, addr_fam=%d, addr_port=%x\n"
	.text
	.globl	dump_addrinfo
	.type	dump_addrinfo, @function
dump_addrinfo:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	movzx	eax, WORD PTR 2[rax]
	movzx	esi, ax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	movzx	eax, WORD PTR [rax]
	movzx	r8d, ax
	mov	rax, QWORD PTR -8[rbp]
	mov	edi, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -8[rbp]
	sub	rsp, 8
	push	rsi
	mov	r9d, r8d
	mov	r8d, edi
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 16
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dump_addrinfo, .-dump_addrinfo
	.section	.rodata
.LC1:
	.string	"80"
.LC2:
	.string	"google.com"
.LC3:
	.string	"getaddrinfo status: %d\n"
	.align 8
.LC4:
	.string	"Unable to resolve address, quitting"
.LC5:
	.string	"Error: sock"
.LC6:
	.string	"sock = %d\n"
	.align 8
.LC7:
	.string	"Error: connect(sock, res->ai_addr, res->ai_addrlen)"
.LC8:
	.string	"GET / HTTP/1.0\r\n\r\n"
.LC9:
	.string	"Response:"
.LC10:
	.string	"Error reading response"
.LC11:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.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, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR hints.0[rip+4], 2
	mov	DWORD PTR hints.0[rip+8], 1
	lea	rax, -16[rbp]
	mov	rcx, rax
	lea	rdx, hints.0[rip]
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	getaddrinfo@PLT
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -28[rbp], 0
	je	.L3
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L11
.L3:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	dump_addrinfo
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, ecx
	mov	edi, eax
	call	socket@PLT
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], -1
	jne	.L5
	lea	rdi, .LC5[rip]
	call	puts@PLT
.L5:
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, QWORD PTR 24[rax]
	mov	eax, DWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	cmp	eax, -1
	jne	.L6
	lea	rdi, .LC7[rip]
	call	puts@PLT
.L6:
	mov	eax, DWORD PTR -24[rbp]
	mov	ecx, 0
	mov	edx, 18
	lea	rsi, .LC8[rip]
	mov	edi, eax
	call	send@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
.L10:
	mov	eax, DWORD PTR -24[rbp]
	mov	ecx, 0
	mov	edx, 1023
	lea	rsi, response[rip]
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jns	.L7
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L11
.L7:
	cmp	DWORD PTR -20[rbp], 0
	je	.L14
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, response[rip]
	mov	BYTE PTR [rax+rdx], 0
	lea	rsi, response[rip]
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L10
.L14:
	nop
	mov	eax, 0
.L11:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.local	hints.0
	.comm	hints.0,48,32
	.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	"93843.c"
	.text
	.local	response
	.comm	response,1024,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"addrinfo @%p: fam=%d, socktype=%d, proto=%d, addr_f"
	.ascii	"am=%d, addr_port=%x\012\000"
	.text
	.align	2
	.global	dump_addrinfo
	.syntax unified
	.arm
	.fpu softvfp
	.type	dump_addrinfo, %function
dump_addrinfo:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r1, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r0, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-8]
	ldr	r2, [r2, #20]
	ldrh	r2, [r2]
	mov	ip, r2
	ldr	r2, [fp, #-8]
	ldr	r2, [r2, #20]
	ldrh	r2, [r2, #2]
	str	r2, [sp, #8]
	str	ip, [sp, #4]
	str	r3, [sp]
	mov	r3, r0
	mov	r2, r1
	ldr	r1, [fp, #-8]
	ldr	r0, .L2
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	dump_addrinfo, .-dump_addrinfo
	.section	.rodata
	.align	2
.LC1:
	.ascii	"80\000"
	.align	2
.LC2:
	.ascii	"google.com\000"
	.align	2
.LC3:
	.ascii	"getaddrinfo status: %d\012\000"
	.align	2
.LC4:
	.ascii	"Unable to resolve address, quitting\000"
	.align	2
.LC5:
	.ascii	"Error: sock\000"
	.align	2
.LC6:
	.ascii	"sock = %d\012\000"
	.align	2
.LC7:
	.ascii	"Error: connect(sock, res->ai_addr, res->ai_addrlen)"
	.ascii	"\000"
	.align	2
.LC8:
	.ascii	"GET / HTTP/1.0\015\012\015\012\000"
	.align	2
.LC9:
	.ascii	"Response:\000"
	.align	2
.LC10:
	.ascii	"Error reading response\000"
	.align	2
.LC11:
	.ascii	"%s\000"
	.align	2
.LC12:
	.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, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L17+4
	mov	r2, #2
	str	r2, [r3, #4]
	ldr	r3, .L17+4
	mov	r2, #1
	str	r2, [r3, #8]
	sub	r3, fp, #24
	ldr	r2, .L17+4
	ldr	r1, .L17+8
	ldr	r0, .L17+12
	bl	getaddrinfo
	str	r0, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, .L17+16
	bl	printf
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L5
	ldr	r0, .L17+20
	bl	puts
	mov	r3, #1
	b	.L13
.L5:
	ldr	r3, [fp, #-24]
	mov	r0, r3
	bl	dump_addrinfo
	ldr	r3, [fp, #-24]
	ldr	r0, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	mov	r2, r3
	bl	socket
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L7
	ldr	r0, .L17+24
	bl	puts
.L7:
	ldr	r1, [fp, #-16]
	ldr	r0, .L17+28
	bl	printf
	ldr	r3, [fp, #-24]
	ldr	r1, [r3, #20]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #16]
	mov	r2, r3
	ldr	r0, [fp, #-16]
	bl	connect
	mov	r3, r0
	cmn	r3, #1
	bne	.L8
	ldr	r0, .L17+32
	bl	puts
.L8:
	mov	r3, #0
	mov	r2, #18
	ldr	r1, .L17+36
	ldr	r0, [fp, #-16]
	bl	send
	ldr	r0, .L17+40
	bl	puts
.L12:
	mov	r3, #0
	ldr	r2, .L17+44
	ldr	r1, .L17+48
	ldr	r0, [fp, #-16]
	bl	recv
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L9
	ldr	r0, .L17+52
	bl	puts
	mov	r3, #1
	b	.L13
.L9:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L16
	ldr	r2, .L17+48
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r1, .L17+48
	ldr	r0, .L17+56
	bl	printf
	b	.L12
.L16:
	nop
	mov	r3, #0
.L13:
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC12
	.word	hints.6067
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	1023
	.word	response
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.local	hints.6067
	.comm	hints.6067,32,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
