	.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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	8(%rsi), %rdi
	testq	%rdi, %rdi
	jne	LBB0_2
## %bb.1:
	movq	_EX_USAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_errx
	movq	8(%r14), %rdi
LBB0_2:
	callq	_gethostbyname
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_EX_NOHOST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r14), %rdx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_errx
LBB0_4:
	movq	%r14, -104(%rbp)                ## 8-byte Spill
	leaq	-92(%rbp), %rdi
	movq	(%rbx), %rax
	movl	(%rax), %esi
	movl	$4, %edx
	callq	_memcpy
	movl	$60000, %edi                    ## imm = 0xEA60
	callq	_htons
	movq	%rax, -88(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	%rax, -80(%rbp)
	movl	$24, -96(%rbp)
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htonl
	movl	%eax, -68(%rbp)
	movl	$60000, %edi                    ## imm = 0xEA60
	callq	_htons
	movq	%rax, -64(%rbp)
	movq	(%rbx), %rax
	movq	%rax, -56(%rbp)
	movl	$24, -72(%rbp)
	movq	_PF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %r12d
	testl	%eax, %eax
	jns	LBB0_6
## %bb.5:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_err
LBB0_6:
	leaq	-72(%rbp), %r15
	movq	_errno@GOTPCREL(%rip), %r13
	movq	_EADDRINUSE@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	movq	%r15, %rsi
	movl	$24, %edx
	callq	_bind
	movl	%eax, %ebx
	movq	-64(%rbp), %rdi
	callq	_ntohs
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %edi
	callq	_htons
	movq	%rax, -64(%rbp)
	testl	%ebx, %ebx
	jns	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r14), %rax
	cmpq	%rax, (%r13)
	je	LBB0_7
LBB0_9:
	testl	%ebx, %ebx
	jns	LBB0_11
## %bb.10:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_err
LBB0_11:
	leaq	-96(%rbp), %r15
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	movq	%r15, %rsi
	movl	$24, %edx
	callq	_connect
	movl	%eax, %ebx
	movq	-88(%rbp), %rdi
	callq	_ntohs
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %edi
	callq	_htons
	movq	%rax, -88(%rbp)
	testl	%ebx, %ebx
	jns	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	(%r14), %rax
	cmpq	%rax, (%r13)
	je	LBB0_12
LBB0_14:
	testl	%ebx, %ebx
	jns	LBB0_16
## %bb.15:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_err
LBB0_16:
	movl	$24, -44(%rbp)
	leaq	-72(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movl	%r12d, %edi
	callq	_getsockname
	testl	%eax, %eax
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	jns	LBB0_18
## %bb.17:
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_err
LBB0_18:
	movq	8(%rbx), %rbx
	movl	-68(%rbp), %edi
	callq	_inet_ntoa
	leaq	L_.str.6(%rip), %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_printf
	xorl	%eax, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EX_USAGE,4,2                   ## @EX_USAGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"must supply a hostname"

	.comm	_EX_NOHOST,4,2                  ## @EX_NOHOST
L_.str.1:                               ## @.str.1
	.asciz	"cannot resolve hostname: %s"

	.comm	_AF_INET,8,3                    ## @AF_INET
	.comm	_INADDR_ANY,4,2                 ## @INADDR_ANY
	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.comm	_EX_OSERR,4,2                   ## @EX_OSERR
L_.str.2:                               ## @.str.2
	.asciz	"socket"

	.comm	_errno,8,3                      ## @errno
	.comm	_EADDRINUSE,8,3                 ## @EADDRINUSE
L_.str.3:                               ## @.str.3
	.asciz	"bind"

L_.str.4:                               ## @.str.4
	.asciz	"connect"

L_.str.5:                               ## @.str.5
	.asciz	"getsockname"

L_.str.6:                               ## @.str.6
	.asciz	"Route to %s is out %s\n"

.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, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	ldr	x0, [x1, #8]
	cbnz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EX_USAGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EX_USAGE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_errx
	ldr	x0, [x19, #8]
LBB0_2:
	bl	_gethostbyname
	mov	x20, x0
	cbnz	x0, LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _EX_NOHOST@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EX_NOHOST@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
	str	x8, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_errx
LBB0_4:
	add	x8, sp, #16
	orr	x0, x8, #0x4
	ldr	x8, [x20]
	ldr	w1, [x8]
	mov	w2, #4
	bl	_memcpy
	mov	w0, #60000
	bl	_htons
Lloh10:
	adrp	x20, _AF_INET@GOTPAGE
Lloh11:
	ldr	x20, [x20, _AF_INET@GOTPAGEOFF]
	ldr	x8, [x20]
	stp	x0, x8, [sp, #24]
	mov	w21, #24
	str	w21, [sp, #16]
Lloh12:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_htonl
	str	w0, [sp, #44]
	mov	w0, #60000
	bl	_htons
	ldr	x8, [x20]
	stp	x0, x8, [sp, #48]
	str	w21, [sp, #40]
Lloh15:
	adrp	x8, _PF_INET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	mov	x20, x0
	tbz	w0, #31, LBB0_6
; %bb.5:
Lloh21:
	adrp	x8, _EX_OSERR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EX_OSERR@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_err
LBB0_6:
Lloh26:
	adrp	x22, _errno@GOTPAGE
Lloh27:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
Lloh28:
	adrp	x23, _EADDRINUSE@GOTPAGE
Lloh29:
	ldr	x23, [x23, _EADDRINUSE@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #40
	mov	x0, x20
	mov	w2, #24
	bl	_bind
	mov	x21, x0
	ldr	x0, [sp, #48]
	bl	_ntohs
	add	w0, w0, #1
	bl	_htons
	str	x0, [sp, #48]
	tbz	w21, #31, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x22]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_7
LBB0_9:
	tbz	w21, #31, LBB0_11
; %bb.10:
Lloh30:
	adrp	x8, _EX_OSERR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EX_OSERR@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
Lloh33:
	adrp	x1, l_.str.3@PAGE
Lloh34:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_err
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #16
	mov	x0, x20
	mov	w2, #24
	bl	_connect
	mov	x21, x0
	ldr	x0, [sp, #24]
	bl	_ntohs
	add	w0, w0, #1
	bl	_htons
	str	x0, [sp, #24]
	tbz	w21, #31, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x22]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_11
LBB0_13:
	tbz	w21, #31, LBB0_15
; %bb.14:
Lloh35:
	adrp	x8, _EX_OSERR@GOTPAGE
Lloh36:
	ldr	x8, [x8, _EX_OSERR@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
Lloh38:
	adrp	x1, l_.str.4@PAGE
Lloh39:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_err
LBB0_15:
	mov	w8, #24
	str	w8, [sp, #12]
	add	x1, sp, #40
	add	x2, sp, #12
	mov	x0, x20
	bl	_getsockname
	tbz	w0, #31, LBB0_17
; %bb.16:
Lloh40:
	adrp	x8, _EX_OSERR@GOTPAGE
Lloh41:
	ldr	x8, [x8, _EX_OSERR@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
Lloh43:
	adrp	x1, l_.str.5@PAGE
Lloh44:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_err
LBB0_17:
	ldr	x19, [x19, #8]
	ldr	w0, [sp, #44]
	bl	_inet_ntoa
	mov	x2, x0
Lloh45:
	adrp	x0, l_.str.6@PAGE
Lloh46:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	x1, x19
	bl	_printf
	mov	w0, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_EX_USAGE,4,2                   ; @EX_USAGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"must supply a hostname"

	.comm	_EX_NOHOST,4,2                  ; @EX_NOHOST
l_.str.1:                               ; @.str.1
	.asciz	"cannot resolve hostname: %s"

	.comm	_AF_INET,8,3                    ; @AF_INET
	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.comm	_EX_OSERR,4,2                   ; @EX_OSERR
l_.str.2:                               ; @.str.2
	.asciz	"socket"

	.comm	_errno,8,3                      ; @errno
	.comm	_EADDRINUSE,8,3                 ; @EADDRINUSE
l_.str.3:                               ; @.str.3
	.asciz	"bind"

l_.str.4:                               ; @.str.4
	.asciz	"connect"

l_.str.5:                               ; @.str.5
	.asciz	"getsockname"

l_.str.6:                               ; @.str.6
	.asciz	"Route to %s is out %s\n"

.subsections_via_symbols
