	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r12d
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	callq	_getwhoisserver
	movq	_optset@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	subl	%r15d, %r12d
	movq	_host@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_2
## %bb.1:
	testl	%r12d, %r12d
	jne	LBB0_3
LBB0_2:
	xorl	%eax, %eax
	callq	_usage
LBB0_3:
	movl	$1, %edi
	movl	$1, %esi
	callq	_MAKEWORD
	leaq	-68(%rbp), %rsi
	movl	%eax, %edi
	callq	_WSAStartup
	testl	%eax, %eax
	jne	LBB0_4
LBB0_5:
	movq	(%r14), %rdi
	callq	_gethostbyname
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r14), %rdx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_cleanup
LBB0_7:
	movq	(%rbx), %rax
	movq	%rax, (%r14)
	movl	16(%rbx), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movq	%rax, %r14
	movq	_INVALID_SOCKET@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	je	LBB0_8
LBB0_9:
	leaq	-56(%rbp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movl	16(%rbx), %eax
	movl	%eax, -48(%rbp)
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	$12, %edx
	callq	_bind
	testq	%rax, %rax
	js	LBB0_10
LBB0_11:
	leaq	-52(%rbp), %rdi
	movl	8(%rbx), %edx
	movl	12(%rbx), %esi
	callq	_memcpy
	leaq	L_.str.4(%rip), %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_getservbyname
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_cleanup
LBB0_13:
	movl	(%r13), %eax
	movl	%eax, -56(%rbp)
	movq	(%rbx), %rsi
	leaq	L_.str.7(%rip), %rdi
	callq	_printf
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	movl	$12, %edx
	callq	_connect
	testq	%rax, %rax
	jns	LBB0_15
## %bb.14:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_WSAGetLastError
	leaq	L_.str.8(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_cleanup
LBB0_15:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15,8), %rbx
	cmpl	$2, %r12d
	jl	LBB0_18
## %bb.16:
	incl	%r12d
	leaq	L_.str.9(%rip), %r15
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %r13
	movq	%r13, %rdi
	callq	_strlen
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_send
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_send
	addq	$8, %rbx
	decl	%r12d
	cmpl	$2, %r12d
	ja	LBB0_17
LBB0_18:
	movq	(%rbx), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_send
	leaq	L_.str.10(%rip), %rsi
	movq	%r14, %rdi
	movl	$2, %edx
	xorl	%ecx, %ecx
	callq	_send
	leaq	-41(%rbp), %rsi
	movq	%r14, %rdi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_recv
	cmpl	$1, %eax
	jne	LBB0_21
## %bb.19:
	leaq	-41(%rbp), %rbx
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movsbl	-41(%rbp), %edi
	callq	_putchar
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_recv
	cmpl	$1, %eax
	je	LBB0_20
LBB0_21:
	xorl	%edi, %edi
	callq	_cleanup
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	_main.cold.3
	jmp	LBB0_5
LBB0_8:
	callq	_main.cold.2
	jmp	LBB0_9
LBB0_10:
	callq	_main.cold.1
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function main.cold.1
_main.cold.1:                           ## @main.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.3(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_cleanup
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function main.cold.2
_main.cold.2:                           ## @main.cold.2
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_cleanup
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function main.cold.3
_main.cold.3:                           ## @main.cold.3
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_cleanup
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_optset,8,3                     ## @optset
	.comm	_host,8,3                       ## @host
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"whois: WSAStartup failed"

	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"whois: %s: "

	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_INVALID_SOCKET,8,3             ## @INVALID_SOCKET
L_.str.2:                               ## @.str.2
	.asciz	"whois: socket"

L_.str.3:                               ## @.str.3
	.asciz	"whois: bind"

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

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

L_.str.6:                               ## @.str.6
	.asciz	"whois: nicname/tcp: unknown service\n"

L_.str.7:                               ## @.str.7
	.asciz	"[%s]\n"

L_.str.8:                               ## @.str.8
	.asciz	"whois: connect error = %d\n"

L_.str.9:                               ## @.str.9
	.asciz	" "

L_.str.10:                              ## @.str.10
	.asciz	"\r\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, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
	bl	_getwhoisserver
Lloh0:
	adrp	x8, _optset@GOTPAGE
Lloh1:
	ldr	x8, [x8, _optset@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x8]
	sub	w23, w19, w24
Lloh3:
	adrp	x19, _host@GOTPAGE
Lloh4:
	ldr	x19, [x19, _host@GOTPAGEOFF]
	ldr	x8, [x19]
	cmp	x8, #0
	ccmp	w23, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
	bl	_usage
LBB0_2:
	mov	w0, #1
	mov	w1, #1
	bl	_MAKEWORD
	add	x1, sp, #12
	bl	_WSAStartup
	cbnz	w0, LBB0_18
LBB0_3:
	ldr	x0, [x19]
	bl	_gethostbyname
	mov	x21, x0
	cbnz	x0, LBB0_5
; %bb.4:
Lloh5:
	adrp	x8, _stderr@GOTPAGE
Lloh6:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	x8, [x19]
	str	x8, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	mov	w0, #1
	bl	_cleanup
LBB0_5:
	ldr	x8, [x21]
	str	x8, [x19]
	ldr	w0, [x21, #16]
Lloh10:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	mov	x19, x0
Lloh13:
	adrp	x8, _INVALID_SOCKET@GOTPAGE
Lloh14:
	ldr	x8, [x8, _INVALID_SOCKET@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_19
LBB0_6:
	add	x22, sp, #16
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #12
	bl	_memset
	ldr	w8, [x21, #16]
	str	w8, [sp, #24]
	add	x1, sp, #16
	mov	x0, x19
	mov	w2, #12
	bl	_bind
	tbnz	x0, #63, LBB0_20
LBB0_7:
	orr	x0, x22, #0x4
	ldp	w2, w1, [x21, #8]
	bl	_memcpy
Lloh16:
	adrp	x0, l_.str.4@PAGE
Lloh17:
	add	x0, x0, l_.str.4@PAGEOFF
Lloh18:
	adrp	x1, l_.str.5@PAGE
Lloh19:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_getservbyname
	mov	x22, x0
	cbnz	x0, LBB0_9
; %bb.8:
Lloh20:
	adrp	x8, _stderr@GOTPAGE
Lloh21:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x1, l_.str.6@PAGE
Lloh24:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_fprintf
	mov	w0, #1
	bl	_cleanup
LBB0_9:
	add	x24, x20, x24, lsl #3
	ldr	w8, [x22]
	str	w8, [sp, #16]
	ldr	x1, [x21]
Lloh25:
	adrp	x0, l_.str.7@PAGE
Lloh26:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_printf
	add	x1, sp, #16
	mov	x0, x19
	mov	w2, #12
	bl	_connect
	tbnz	x0, #63, LBB0_11
; %bb.10:
	cmp	w23, #2
	b.ge	LBB0_12
	b	LBB0_14
LBB0_11:
Lloh27:
	adrp	x8, _stderr@GOTPAGE
Lloh28:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh29:
	ldr	w20, [x8]
	bl	_WSAGetLastError
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh30:
	adrp	x1, l_.str.8@PAGE
Lloh31:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	mov	w0, #1
	bl	_cleanup
	cmp	w23, #2
	b.lt	LBB0_14
LBB0_12:
	add	w22, w23, #1
Lloh32:
	adrp	x20, l_.str.9@PAGE
Lloh33:
	add	x20, x20, l_.str.9@PAGEOFF
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x21, [x24], #8
	mov	x0, x21
	bl	_strlen
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	mov	w3, #0
	bl	_send
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	mov	w3, #0
	bl	_send
	sub	w22, w22, #1
	cmp	w22, #2
	b.hi	LBB0_13
LBB0_14:
	ldr	x20, [x24]
	mov	x0, x20
	bl	_strlen
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	bl	_send
Lloh34:
	adrp	x1, l_.str.10@PAGE
Lloh35:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x19
	mov	w2, #2
	mov	w3, #0
	bl	_send
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #31
	mov	x0, x19
	mov	w2, #1
	mov	w3, #0
	bl	_recv
	cmp	w0, #1
	b.ne	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldrsb	w0, [sp, #31]
	bl	_putchar
	b	LBB0_15
LBB0_17:
	mov	w0, #0
	bl	_cleanup
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_18:
	bl	_main.cold.3
	b	LBB0_3
LBB0_19:
	bl	_main.cold.2
	b	LBB0_6
LBB0_20:
	bl	_main.cold.1
	b	LBB0_7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function main.cold.1
_main.cold.1:                           ; @main.cold.1
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh36:
	adrp	x0, l_.str.3@PAGE
Lloh37:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_perror
	bl	_OUTLINED_FUNCTION_0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function main.cold.2
_main.cold.2:                           ; @main.cold.2
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh38:
	adrp	x0, l_.str.2@PAGE
Lloh39:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
	bl	_OUTLINED_FUNCTION_0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function main.cold.3
_main.cold.3:                           ; @main.cold.3
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh40:
	adrp	x0, l_.str@PAGE
Lloh41:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
	bl	_OUTLINED_FUNCTION_0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function OUTLINED_FUNCTION_0
_OUTLINED_FUNCTION_0:                   ; @OUTLINED_FUNCTION_0 Thunk
	.cfi_startproc
; %bb.0:
	mov	w0, #1
	b	_cleanup
	.cfi_endproc
                                        ; -- End function
	.comm	_optset,8,3                     ; @optset
	.comm	_host,8,3                       ; @host
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"whois: WSAStartup failed"

	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"whois: %s: "

	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_INVALID_SOCKET,8,3             ; @INVALID_SOCKET
l_.str.2:                               ; @.str.2
	.asciz	"whois: socket"

l_.str.3:                               ; @.str.3
	.asciz	"whois: bind"

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

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

l_.str.6:                               ; @.str.6
	.asciz	"whois: nicname/tcp: unknown service\n"

l_.str.7:                               ; @.str.7
	.asciz	"[%s]\n"

l_.str.8:                               ; @.str.8
	.asciz	"whois: connect error = %d\n"

l_.str.9:                               ; @.str.9
	.asciz	" "

l_.str.10:                              ; @.str.10
	.asciz	"\r\n"

.subsections_via_symbols
