	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kdb_gethostbyname              ## -- Begin function kdb_gethostbyname
	.p2align	4, 0x90
_kdb_gethostbyname:                     ## @kdb_gethostbyname
	.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	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_kdb_hosts_loaded@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_kdb_load_hosts
LBB0_2:
	movq	%rbx, %rdi
	callq	_strlen
	cmpb	$91, (%rbx)
	jne	LBB0_6
## %bb.3:
	movslq	%eax, %r15
	cmpb	$93, -1(%r15,%rbx)
	jne	LBB0_6
## %bb.4:
	cmpl	$64, %eax
	jg	LBB0_6
## %bb.5:
	incq	%rbx
	leaq	-2(%r15), %rdx
	leaq	-96(%rbp), %r14
	movq	%r14, %rdi
	movq	%rbx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	movb	$0, -98(%rbp,%r15)
	movq	_AF_INET6@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_gethostbyname2
	movq	%rax, %r14
	jmp	LBB0_19
LBB0_6:
	cmpq	$0, (%r14)
	jle	LBB0_9
## %bb.7:
	cmpl	$128, %eax
	jl	LBB0_11
LBB0_9:
	movq	%rbx, %rdi
	callq	_gethostbyname
	testq	%rax, %rax
	je	LBB0_16
## %bb.10:
	movq	%rax, %r14
	jmp	LBB0_19
LBB0_11:
	movq	_Hosts@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_getHash
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_hret@GOTPCREL(%rip), %r14
	movq	%rbx, (%r14)
	movl	(%rax), %edi
	callq	_htonl
	movq	_ipaddr@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	movq	%r14, %rax
	addq	$72, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	_AF_INET6@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_21
## %bb.17:
	movq	%rbx, %rdi
	addq	$72, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gethostbyname2                 ## TAILCALL
LBB0_13:
	movq	%rbx, %rdi
	movl	$46, %esi
	callq	_strchr
	testq	%rax, %rax
	jne	LBB0_9
## %bb.14:
	movq	%rbx, %rdi
	movl	$58, %esi
	callq	_strchr
	testq	%rax, %rax
	jne	LBB0_9
## %bb.18:
	xorl	%r14d, %r14d
	jmp	LBB0_19
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_kdb_hosts_loaded,8,3           ## @kdb_hosts_loaded
	.comm	_AF_INET6,4,2                   ## @AF_INET6
	.comm	_Hosts,4,2                      ## @Hosts
	.comm	_hret,8,3                       ## @hret
	.comm	_ipaddr,4,2                     ## @ipaddr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kdb_gethostbyname              ; -- Begin function kdb_gethostbyname
	.p2align	2
_kdb_gethostbyname:                     ; @kdb_gethostbyname
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x20, _kdb_hosts_loaded@GOTPAGE
Lloh4:
	ldr	x20, [x20, _kdb_hosts_loaded@GOTPAGEOFF]
	ldr	x8, [x20]
	cbnz	x8, LBB0_2
; %bb.1:
	bl	_kdb_load_hosts
LBB0_2:
	mov	x0, x19
	bl	_strlen
	mov	x2, x0
	ldrb	w8, [x19]
	cmp	w8, #91
	b.ne	LBB0_6
; %bb.3:
	sxtw	x8, w2
	add	x9, x8, x19
	ldurb	w9, [x9, #-1]
	cmp	w9, #93
	b.ne	LBB0_6
; %bb.4:
	cmp	w2, #64
	b.gt	LBB0_6
; %bb.5:
	add	x1, x19, #1
	sub	x19, x8, #2
	add	x20, sp, #8
	add	x0, sp, #8
	mov	x2, x19
	bl	_memcpy
	strb	wzr, [x20, x19]
Lloh5:
	adrp	x8, _AF_INET6@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AF_INET6@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_gethostbyname2
	mov	x20, x0
	b	LBB0_12
LBB0_6:
	ldr	x8, [x20]
	cmp	x8, #0
	b.le	LBB0_8
; %bb.7:
	cmp	w2, #128
	b.lt	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_gethostbyname
	cbz	x0, LBB0_14
; %bb.9:
	mov	x20, x0
	b	LBB0_12
LBB0_10:
Lloh8:
	adrp	x0, _Hosts@GOTPAGE
Lloh9:
	ldr	x0, [x0, _Hosts@GOTPAGEOFF]
	mov	x1, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	w3, #0
	bl	_getHash
	cbz	x0, LBB0_16
; %bb.11:
Lloh10:
	adrp	x20, _hret@GOTPAGE
Lloh11:
	ldr	x20, [x20, _hret@GOTPAGEOFF]
	str	x19, [x20]
	ldr	w0, [x0]
	bl	_htonl
Lloh12:
	adrp	x8, _ipaddr@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ipaddr@GOTPAGEOFF]
Lloh14:
	str	w0, [x8]
LBB0_12:
	ldur	x8, [x29, #-24]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.13:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_14:
Lloh18:
	adrp	x8, _AF_INET6@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AF_INET6@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldur	x8, [x29, #-24]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.15:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_gethostbyname2
LBB0_16:
	mov	x0, x19
	mov	w1, #46
	bl	_strchr
	cbnz	x0, LBB0_8
; %bb.17:
	mov	x0, x19
	mov	w1, #58
	bl	_strchr
	cbnz	x0, LBB0_8
; %bb.18:
	mov	x20, #0
	b	LBB0_12
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_kdb_hosts_loaded,8,3           ; @kdb_hosts_loaded
	.comm	_AF_INET6,4,2                   ; @AF_INET6
	.comm	_Hosts,4,2                      ; @Hosts
	.comm	_hret,8,3                       ; @hret
	.comm	_ipaddr,4,2                     ; @ipaddr
.subsections_via_symbols
