	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	$0, -56(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movl	%eax, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	leaq	-56(%rbp), %rdx
	leaq	-24(%rbp), %rcx
	xorl	%esi, %esi
	callq	_getaddrinfo
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	%eax, %edi
	callq	_gai_strerror
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	callq	_fprintf
LBB0_8:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_2:
	movl	(%rbx), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IPPROTO_TCP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_socket
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	movl	$0, -40(%rbp)
	movl	$80, %edi
	callq	_htons
	movl	%eax, -36(%rbp)
	movq	_AF_INET6@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rdi
	leaq	-40(%rbp), %r14
	movq	%r14, %rsi
	callq	_v4_to_v6
	movq	-24(%rbp), %rdi
	callq	_freeaddrinfo
	movl	%ebx, %edi
	movq	%r14, %rsi
	movl	$12, %edx
	callq	_connect
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.5:
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str.3(%rip), %rdi
LBB0_7:
	callq	_perror
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_INET,4,2                    ## @AF_INET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"www.example.com"

	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"error in getaddrinfo: %s\n"

	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_IPPROTO_TCP,4,2                ## @IPPROTO_TCP
L_.str.2:                               ## @.str.2
	.asciz	"socket"

	.comm	_AF_INET6,4,2                   ## @AF_INET6
L_.str.3:                               ## @.str.3
	.asciz	"connect"

	.comm	_EXIT_SUCCESS,4,2               ## @EXIT_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	str	xzr, [sp, #24]
Lloh0:
	adrp	x19, _AF_INET@GOTPAGE
Lloh1:
	ldr	x19, [x19, _AF_INET@GOTPAGEOFF]
	ldr	w8, [x19]
	str	w8, [sp, #32]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	add	x2, sp, #24
	sub	x3, x29, #24
	mov	x1, #0
	bl	_getaddrinfo
	cbz	w0, LBB0_3
; %bb.1:
Lloh4:
	adrp	x8, _stderr@GOTPAGE
Lloh5:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh6:
	ldr	w19, [x8]
	bl	_gai_strerror
	mov	x2, x0
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_fprintf
LBB0_2:
Lloh9:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
	ldr	w0, [x19]
Lloh11:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _IPPROTO_TCP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IPPROTO_TCP@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	bl	_socket
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.4:
	mov	x19, x0
	str	wzr, [sp, #8]
	mov	w0, #80
	bl	_htons
Lloh17:
	adrp	x8, _AF_INET6@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AF_INET6@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	stp	w0, w8, [sp, #12]
	ldur	x8, [x29, #-24]
	ldr	x0, [x8]
	add	x1, sp, #8
	bl	_v4_to_v6
	ldur	x0, [x29, #-24]
	bl	_freeaddrinfo
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #12
	bl	_connect
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.5:
Lloh20:
	adrp	x8, _EXIT_SUCCESS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EXIT_SUCCESS@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_7:
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_9:
	bl	_perror
	b	LBB0_2
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_INET,4,2                    ; @AF_INET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"www.example.com"

	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"error in getaddrinfo: %s\n"

	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_IPPROTO_TCP,4,2                ; @IPPROTO_TCP
l_.str.2:                               ; @.str.2
	.asciz	"socket"

	.comm	_AF_INET6,4,2                   ; @AF_INET6
l_.str.3:                               ; @.str.3
	.asciz	"connect"

	.comm	_EXIT_SUCCESS,4,2               ; @EXIT_SUCCESS
.subsections_via_symbols
