	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %ebx
	movq	_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	L_.str(%rip), %r12
	movq	_optarg@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_getopt
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$112, %eax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_usage
	jmp	LBB0_1
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r13), %edi
	callq	_atoi
	movl	%eax, %r14d
	jmp	LBB0_1
LBB0_5:
	leaq	-56(%rbp), %r15
	movq	%r15, %rdi
	movl	$16, %esi
	callq	_bzero
	movl	$16, -56(%rbp)
	movq	_AF_INET@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	%eax, -44(%rbp)
	movl	%r14d, %edi
	callq	_htons
	movl	%eax, -48(%rbp)
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movl	(%r12), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %edi
	movq	%r15, %rsi
	movl	$16, %edx
	callq	_connect
	testl	%eax, %eax
	js	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	leaq	-56(%rbp), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	movl	%eax, %edi
	callq	_close
	movl	(%r12), %edi
	movl	(%r13), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, %edi
	movq	%r14, %rsi
	movl	$16, %edx
	callq	_connect
	testl	%eax, %eax
	jns	LBB0_7
LBB0_8:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	callq	_printf
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PORT,4,2                       ## @PORT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"p:"

	.comm	_optarg,4,2                     ## @optarg
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_INADDR_ANY,4,2                 ## @INADDR_ANY
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
L_.str.1:                               ## @.str.1
	.asciz	"Exiting at %d with errno %d\n"

	.comm	_errno,4,2                      ## @errno
.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	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _PORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PORT@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
Lloh3:
	adrp	x22, l_.str@PAGE
Lloh4:
	add	x22, x22, l_.str@PAGEOFF
Lloh5:
	adrp	x23, _optarg@GOTPAGE
Lloh6:
	ldr	x23, [x23, _optarg@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_getopt
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w0, #112
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_usage
	b	LBB0_1
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x23]
	bl	_atoi
	mov	x19, x0
	b	LBB0_1
LBB0_5:
	mov	w21, #16
	mov	x0, sp
	mov	w1, #16
	bl	_bzero
Lloh7:
	adrp	x20, _AF_INET@GOTPAGE
Lloh8:
	ldr	x20, [x20, _AF_INET@GOTPAGEOFF]
	ldr	w8, [x20]
	str	w21, [sp]
	str	w8, [sp, #12]
	mov	x0, x19
	bl	_htons
Lloh9:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	stp	w8, w0, [sp, #4]
	ldr	w0, [x20]
Lloh12:
	adrp	x21, _SOCK_STREAM@GOTPAGE
Lloh13:
	ldr	x21, [x21, _SOCK_STREAM@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w2, #0
	bl	_socket
	mov	x1, sp
	mov	w2, #16
	bl	_connect
	mov	w19, #0
	tbnz	w0, #31, LBB0_7
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	w19, w19, #1
	bl	_close
	ldr	w0, [x20]
	ldr	w1, [x21]
	mov	w2, #0
	bl	_socket
	mov	x1, sp
	mov	w2, #16
	bl	_connect
	tbz	w0, #31, LBB0_6
LBB0_7:
Lloh14:
	adrp	x8, _errno@GOTPAGE
Lloh15:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_printf
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PORT,4,2                       ; @PORT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"p:"

	.comm	_optarg,4,2                     ; @optarg
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
l_.str.1:                               ; @.str.1
	.asciz	"Exiting at %d with errno %d\n"

	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
