	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	cmpl	$2, %edi
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$-1, %edi
	callq	_errx
LBB0_2:
	leaq	-48(%rbp), %rdi
	movl	$16, %esi
	callq	_bzero
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movl	$16, -48(%rbp)
	movq	8(%rbx), %rdi
	callq	_inet_addr
	movl	%eax, -40(%rbp)
	movq	_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	movl	%eax, -44(%rbp)
	movq	_SIGALRM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_alarm_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_signal
	movq	_SIG_ERR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$-1, %edi
	callq	_err
LBB0_4:
	movq	_SECONDS@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_alarm
	movq	_timer_fired@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	cmpl	$0, (%r12)
	jne	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_try_connect
	cmpq	$1, %rax
	adcl	$0, %ebx
	cmpl	$0, (%r12)
	je	LBB0_6
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	callq	_printf
	movl	%ebx, %eax
	cltd
	idivl	(%r15)
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	callq	_printf
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"usage: tcpconnect [ip]"

	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_PORT,4,2                       ## @PORT
	.comm	_SIGALRM,4,2                    ## @SIGALRM
	.comm	_alarm_handler,4,2              ## @alarm_handler
	.comm	_SIG_ERR,8,3                    ## @SIG_ERR
L_.str.1:                               ## @.str.1
	.asciz	"signal(SIGALRM)"

	.comm	_SECONDS,4,2                    ## @SECONDS
	.comm	_timer_fired,4,2                ## @timer_fired
L_.str.2:                               ## @.str.2
	.asciz	"%ju count\n"

L_.str.3:                               ## @.str.3
	.asciz	"%ju connections/second\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, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	cmp	w0, #2
	b.eq	LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_2:
	mov	w20, #16
	mov	x0, sp
	mov	w1, #16
	bl	_bzero
Lloh2:
	adrp	x8, _AF_INET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #12]
	str	w20, [sp]
	ldr	x0, [x19, #8]
	bl	_inet_addr
	str	w0, [sp, #8]
Lloh5:
	adrp	x8, _PORT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PORT@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_htons
	str	w0, [sp, #4]
Lloh8:
	adrp	x8, _SIGALRM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SIGALRM@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _alarm_handler@GOTPAGE
Lloh12:
	ldr	x8, [x8, _alarm_handler@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_signal
Lloh14:
	adrp	x8, _SIG_ERR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SIG_ERR@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.3:
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_4:
Lloh19:
	adrp	x20, _SECONDS@GOTPAGE
Lloh20:
	ldr	x20, [x20, _SECONDS@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_alarm
Lloh21:
	adrp	x21, _timer_fired@GOTPAGE
Lloh22:
	ldr	x21, [x21, _timer_fired@GOTPAGEOFF]
	ldr	w8, [x21]
	cbz	w8, LBB0_6
; %bb.5:
	mov	w19, #0
	b	LBB0_8
LBB0_6:
	mov	w19, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, sp
	bl	_try_connect
	cmp	x0, #0
	cinc	w19, w19, eq
	ldr	w8, [x21]
	cbz	w8, LBB0_7
LBB0_8:
Lloh23:
	adrp	x0, l_.str.2@PAGE
Lloh24:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_printf
	ldr	w8, [x20]
	sdiv	w1, w19, w8
Lloh25:
	adrp	x0, l_.str.3@PAGE
Lloh26:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printf
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"usage: tcpconnect [ip]"

	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_PORT,4,2                       ; @PORT
	.comm	_SIGALRM,4,2                    ; @SIGALRM
	.comm	_alarm_handler,4,2              ; @alarm_handler
	.comm	_SIG_ERR,8,3                    ; @SIG_ERR
l_.str.1:                               ; @.str.1
	.asciz	"signal(SIGALRM)"

	.comm	_SECONDS,4,2                    ; @SECONDS
	.comm	_timer_fired,4,2                ; @timer_fired
l_.str.2:                               ; @.str.2
	.asciz	"%ju count\n"

l_.str.3:                               ; @.str.3
	.asciz	"%ju connections/second\n"

.subsections_via_symbols
