	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function connect_client
_connect_client:                        ## @connect_client
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	$1, %edi
	movl	$64, %esi
	callq	_ecalloc
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_estrdup
	movq	%rax, %r14
	movq	%rax, %rdi
	movl	$58, %esi
	callq	_strchr
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_errx
LBB0_2:
	movq	%rbx, %r13
	incq	%r13
	movb	$0, (%rbx)
	movq	%r12, %rdi
	callq	_estrdup
	movq	%rax, (%r15)
	leaq	-96(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	_PF_UNSPEC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)
	leaq	-56(%rbp), %rcx
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_getaddrinfo
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_errx
LBB0_4:
	movq	-56(%rbp), %rbx
	testq	%rbx, %rbx
	jne	LBB0_6
## %bb.5:
	movl	$-1, %r12d
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rdx
	callq	_err
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	%r12d, %edi
	callq	_close
	movl	$-1, %r12d
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	24(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%rbx), %edi
	movl	8(%rbx), %edx
	movl	12(%rbx), %esi
	callq	_socket
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	movl	%r12d, %edi
	callq	_connect
	testq	%rax, %rax
	js	LBB0_8
## %bb.28:
	movl	(%rbx), %esi
	movl	$1, %edi
	callq	_ecalloc
	movq	%rax, 56(%r15)
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	movq	%rax, %rdi
	callq	_memcpy
	movl	(%rbx), %eax
	movl	%eax, 8(%r15)
LBB0_11:
	movq	%rbx, %rdi
	callq	_freeaddrinfo
	movl	%r12d, %edi
	callq	_krb5_storage_from_fd
	movq	%rax, 48(%r15)
	movl	%r12d, %edi
	callq	_close
	cmpq	$0, 48(%r15)
	jne	LBB0_13
## %bb.12:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_13:
	movq	$0, -48(%rbp)
	leaq	12(%r15), %rbx
	leaq	-60(%rbp), %rsi
	leaq	-48(%rbp), %rcx
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_get_version_capa
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.14:
	callq	_free
LBB0_15:
	movl	(%rbx), %eax
	movq	_HAS_MONIKER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_17
## %bb.16:
	leaq	16(%r15), %rsi
	movq	%r15, %rdi
	callq	_get_moniker
	movl	12(%r15), %eax
	jmp	LBB0_18
LBB0_17:
	movq	(%r15), %rcx
	movq	%rcx, 16(%r15)
LBB0_18:
	movq	_ISSERVER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_20
## %bb.19:
	movq	%r15, %rsi
	addq	$40, %rsi
	movq	%r15, %rdi
	callq	_get_targetname
LBB0_20:
	movq	_logfile@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	je	LBB0_27
## %bb.21:
	movq	16(%r15), %rsi
	leaq	L_.str.4(%rip), %rdi
	callq	_printf
	movq	%r15, %rdi
	callq	_wait_log
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_krb5_storage_from_fd
	movq	%rax, 32(%r15)
	movl	%ebx, %edi
	callq	_close
	cmpq	$0, 32(%r15)
	jne	LBB0_23
## %bb.22:
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_23:
	xorl	%eax, %eax
	callq	_fork
	movl	%eax, 24(%r15)
	cmpl	$-1, %eax
	je	LBB0_26
## %bb.24:
	testl	%eax, %eax
	jne	LBB0_27
## %bb.25:
	movq	%r15, %rdi
	callq	_log_function
	movq	(%r12), %rdi
	callq	_fclose
	xorl	%edi, %edi
	callq	_exit
LBB0_26:
	leaq	L_.str.6(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_27:
	movq	_clients@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	movq	_num_clients@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	leal	8(,%rax,8), %esi
	callq	_erealloc
	movq	%rax, (%r12)
	movslq	(%rbx), %rcx
	movq	%r15, (%rax,%rcx,8)
	leal	1(%rcx), %eax
	movl	%eax, (%rbx)
	movq	%r14, %rdi
	callq	_free
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"port missing from %s"

	.comm	_PF_UNSPEC,4,2                  ## @PF_UNSPEC
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
L_.str.1:                               ## @.str.1
	.asciz	"error resolving %s"

L_.str.2:                               ## @.str.2
	.asciz	"connect to host: %s"

L_.str.3:                               ## @.str.3
	.asciz	"krb5_storage_from_fd"

	.comm	_HAS_MONIKER,4,2                ## @HAS_MONIKER
	.comm	_ISSERVER,4,2                   ## @ISSERVER
	.comm	_logfile,8,3                    ## @logfile
L_.str.4:                               ## @.str.4
	.asciz	"starting log socket to client %s\n"

L_.str.5:                               ## @.str.5
	.asciz	"failed to create log krb5_storage"

L_.str.6:                               ## @.str.6
	.asciz	"failed to fork"

	.comm	_clients,8,3                    ## @clients
	.comm	_num_clients,4,2                ## @num_clients
	.no_dead_strip	_connect_client
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function connect_client
_connect_client:                        ; @connect_client
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x22, x0
	mov	w0, #1
	mov	w1, #64
	bl	_ecalloc
	mov	x19, x0
	mov	x0, x22
	bl	_estrdup
	mov	x20, x0
	mov	w1, #58
	bl	_strchr
	mov	x21, x0
	cbnz	x0, LBB0_2
; %bb.1:
	str	x20, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_2:
	strb	wzr, [x21], #1
	mov	x0, x22
	bl	_estrdup
	str	x0, [x19]
	add	x0, sp, #32
	mov	w1, #0
	mov	w2, #32
	bl	_memset
Lloh2:
	adrp	x8, _PF_UNSPEC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PF_UNSPEC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _SOCK_STREAM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SOCK_STREAM@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #44]
	add	x2, sp, #32
	add	x3, sp, #24
	mov	x0, x20
	mov	x1, x21
	bl	_getaddrinfo
	cbz	w0, LBB0_4
; %bb.3:
	str	x20, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_4:
	ldr	x22, [sp, #24]
	cbnz	x22, LBB0_9
; %bb.5:
	mov	w21, #-1
LBB0_6:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	bl	_err
	mov	x22, #0
	b	LBB0_12
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x21
	bl	_close
	mov	w21, #-1
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	x22, [x22, #24]
	cbz	x22, LBB0_6
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w1, w0, [x22, #12]
	ldr	w2, [x22, #8]
	bl	_socket
	mov	x21, x0
	tbnz	w0, #31, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldp	w2, w1, [x22]
	mov	x0, x21
	bl	_connect
	tbnz	x0, #63, LBB0_7
; %bb.11:
	ldr	w1, [x22]
	mov	w0, #1
	bl	_ecalloc
	str	x0, [x19, #56]
	ldp	w2, w1, [x22]
	bl	_memcpy
	ldr	w8, [x22]
	str	w8, [x19, #8]
LBB0_12:
	mov	x0, x22
	bl	_freeaddrinfo
	mov	x0, x21
	bl	_krb5_storage_from_fd
	str	x0, [x19, #48]
	mov	x0, x21
	bl	_close
	ldr	x8, [x19, #48]
	cbnz	x8, LBB0_14
; %bb.13:
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_14:
	str	xzr, [sp, #8]
	add	x21, x19, #12
	add	x1, sp, #20
	add	x3, sp, #8
	mov	x0, x19
	mov	x2, x21
	bl	_get_version_capa
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_16
; %bb.15:
	bl	_free
LBB0_16:
	ldr	w8, [x21]
Lloh14:
	adrp	x9, _HAS_MONIKER@GOTPAGE
Lloh15:
	ldr	x9, [x9, _HAS_MONIKER@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.17:
	add	x1, x19, #16
	mov	x0, x19
	bl	_get_moniker
	ldr	w8, [x19, #12]
	b	LBB0_19
LBB0_18:
	ldr	x9, [x19]
	str	x9, [x19, #16]
LBB0_19:
Lloh17:
	adrp	x9, _ISSERVER@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ISSERVER@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.20:
	add	x1, x19, #40
	mov	x0, x19
	bl	_get_targetname
LBB0_21:
Lloh20:
	adrp	x22, _logfile@GOTPAGE
Lloh21:
	ldr	x22, [x22, _logfile@GOTPAGEOFF]
	ldr	x8, [x22]
	cbz	x8, LBB0_28
; %bb.22:
	ldr	x1, [x19, #16]
Lloh22:
	adrp	x0, l_.str.4@PAGE
Lloh23:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_printf
	mov	x0, x19
	bl	_wait_log
	mov	x21, x0
	bl	_krb5_storage_from_fd
	str	x0, [x19, #32]
	mov	x0, x21
	bl	_close
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_24
; %bb.23:
Lloh24:
	adrp	x1, l_.str.5@PAGE
Lloh25:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_24:
	bl	_fork
	str	w0, [x19, #24]
	cmn	w0, #1
	b.eq	LBB0_27
; %bb.25:
	cbnz	w0, LBB0_28
; %bb.26:
	mov	x0, x19
	bl	_log_function
	ldr	x0, [x22]
	bl	_fclose
	mov	w0, #0
	bl	_exit
LBB0_27:
Lloh26:
	adrp	x1, l_.str.6@PAGE
Lloh27:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_28:
Lloh28:
	adrp	x21, _clients@GOTPAGE
Lloh29:
	ldr	x21, [x21, _clients@GOTPAGEOFF]
	ldr	x0, [x21]
Lloh30:
	adrp	x22, _num_clients@GOTPAGE
Lloh31:
	ldr	x22, [x22, _num_clients@GOTPAGEOFF]
	ldr	w8, [x22]
	lsl	w8, w8, #3
	add	w1, w8, #8
	bl	_erealloc
	str	x0, [x21]
	ldrsw	x8, [x22]
	str	x19, [x0, x8, lsl #3]
	add	w8, w8, #1
	str	w8, [x22]
	mov	x0, x20
	bl	_free
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"port missing from %s"

	.comm	_PF_UNSPEC,4,2                  ; @PF_UNSPEC
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
l_.str.1:                               ; @.str.1
	.asciz	"error resolving %s"

l_.str.2:                               ; @.str.2
	.asciz	"connect to host: %s"

l_.str.3:                               ; @.str.3
	.asciz	"krb5_storage_from_fd"

	.comm	_HAS_MONIKER,4,2                ; @HAS_MONIKER
	.comm	_ISSERVER,4,2                   ; @ISSERVER
	.comm	_logfile,8,3                    ; @logfile
l_.str.4:                               ; @.str.4
	.asciz	"starting log socket to client %s\n"

l_.str.5:                               ; @.str.5
	.asciz	"failed to create log krb5_storage"

l_.str.6:                               ; @.str.6
	.asciz	"failed to fork"

	.comm	_clients,8,3                    ; @clients
	.comm	_num_clients,4,2                ; @num_clients
	.no_dead_strip	_connect_client
.subsections_via_symbols
