	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gethostbyname2_r               ## -- Begin function gethostbyname2_r
	.p2align	4, 0x90
_gethostbyname2_r:                      ## @gethostbyname2_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	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r12
	movq	%rdx, %r13
	movl	%esi, %r14d
	movq	%rdi, %r15
	xorl	%eax, %eax
	callq	___res_state
	movq	%rax, %rbx
	movq	_RES_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	callq	_res_ninit
	cmpl	$-1, %eax
	je	LBB0_2
LBB0_4:
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	movq	%r12, %rcx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	pushq	%rbx
	pushq	16(%rbp)
	callq	_gethostbyname_internal
	addq	$40, %rsp
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_NETDB_INTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_RES_SET_H_ERRNO
	movl	$-1, %eax
	addq	$24, %rsp
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_RES_INIT,4,2                   ## @RES_INIT
	.comm	_NETDB_INTERNAL,4,2             ## @NETDB_INTERNAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gethostbyname2_r               ; -- Begin function gethostbyname2_r
	.p2align	2
_gethostbyname2_r:                      ; @gethostbyname2_r
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x6
	mov	x20, x5
	mov	x21, x4
	mov	x23, x3
	mov	x24, x2
	mov	x25, x1
	mov	x26, x0
	bl	___res_state
	mov	x22, 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, x22
	bl	_res_ninit
	cmn	w0, #1
	b.eq	LBB0_3
LBB0_2:
	mov	x0, x26
	mov	x1, x25
	mov	x2, x24
	mov	x3, x23
	mov	x4, x21
	mov	x5, x20
	mov	x6, x19
	mov	x7, x22
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_gethostbyname_internal
LBB0_3:
Lloh3:
	adrp	x8, _NETDB_INTERNAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NETDB_INTERNAL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_RES_SET_H_ERRNO
	mov	w0, #-1
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_RES_INIT,4,2                   ; @RES_INIT
	.comm	_NETDB_INTERNAL,4,2             ; @NETDB_INTERNAL
.subsections_via_symbols
