	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gethostent_r                   ## -- Begin function gethostent_r
	.p2align	4, 0x90
_gethostent_r:                          ## @gethostent_r
	.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	%r8, %r14
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %r12
	xorl	%eax, %eax
	callq	___res_state
	movq	%rax, %rbx
	movq	_RES_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_res_ninit
	cmpl	$-1, %eax
	je	LBB0_2
LBB0_3:
	xorl	%eax, %eax
	callq	___hostent_data_init
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	_RES_USE_INET6@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	(%rbx), %edx
	leaq	-48(%rbp), %rdi
	movq	%rax, %rsi
	movq	%rbx, %rcx
	callq	_gethostent_p
	movq	%rax, %rcx
	movl	$-1, %eax
	testq	%rcx, %rcx
	jne	LBB0_8
## %bb.5:
	leaq	-48(%rbp), %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	%r13, %rcx
	callq	___copy_hostent
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_NETDB_INTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_RES_SET_H_ERRNO
	movl	4(%rbx), %eax
	movl	%eax, (%r14)
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	xorl	%eax, %eax
	cmpq	$1, %rcx
	sbbl	%eax, %eax
	orl	%ecx, %eax
	jmp	LBB0_8
LBB0_2:
	movq	_NETDB_INTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_RES_SET_H_ERRNO
	movl	4(%rbx), %eax
	movl	%eax, (%r14)
	movl	$-1, %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_RES_INIT,4,2                   ## @RES_INIT
	.comm	_NETDB_INTERNAL,4,2             ## @NETDB_INTERNAL
	.comm	_RES_USE_INET6,4,2              ## @RES_USE_INET6
	.comm	_errno,8,3                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gethostent_r                   ; -- Begin function gethostent_r
	.p2align	2
_gethostent_r:                          ; @gethostent_r
	.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	x19, x4
	mov	x21, x3
	mov	x23, x2
	mov	x24, x1
	mov	x22, x0
	bl	___res_state
	mov	x20, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _RES_INIT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RES_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_res_ninit
	cmn	w0, #1
	b.eq	LBB0_5
LBB0_2:
	bl	___hostent_data_init
	cbz	x0, LBB0_5
; %bb.3:
	mov	x1, x0
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _RES_USE_INET6@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RES_USE_INET6@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w2, w9, w8
	add	x0, sp, #8
	mov	x3, x20
	bl	_gethostent_p
	cbz	x0, LBB0_6
; %bb.4:
	mov	w0, #-1
	b	LBB0_9
LBB0_5:
Lloh6:
	adrp	x8, _NETDB_INTERNAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NETDB_INTERNAL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_RES_SET_H_ERRNO
	ldr	w8, [x20, #4]
	str	w8, [x19]
	mov	w0, #-1
	b	LBB0_9
LBB0_6:
	add	x0, sp, #8
	mov	x1, x22
	mov	x2, x24
	mov	x3, x23
	bl	___copy_hostent
	cbz	x0, LBB0_8
; %bb.7:
Lloh9:
	adrp	x8, _NETDB_INTERNAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NETDB_INTERNAL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_RES_SET_H_ERRNO
	ldr	w8, [x20, #4]
	str	w8, [x19]
Lloh12:
	adrp	x8, _errno@GOTPAGE
Lloh13:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x8, #0
	csinv	w0, w8, wzr, ne
	b	LBB0_9
LBB0_8:
	str	x22, [x21]
LBB0_9:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_RES_INIT,4,2                   ; @RES_INIT
	.comm	_NETDB_INTERNAL,4,2             ; @NETDB_INTERNAL
	.comm	_RES_USE_INET6,4,2              ; @RES_USE_INET6
	.comm	_errno,8,3                      ; @errno
.subsections_via_symbols
