	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getserv
_getserv:                               ## @getserv
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	leaq	-48(%rbp), %rdi
	callq	_servent_getstate
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movl	%eax, %ebx
LBB0_2:
	xorl	%eax, %eax
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%ebx, (%rcx)
LBB0_4:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	-48(%rbp), %rbx
	cmpq	$0, (%rbx)
	jne	LBB0_8
## %bb.6:
	movq	_SERVENT_STORAGE_INITIAL@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	%r12, %rdi
	callq	_malloc
	movq	%rax, (%rbx)
	movq	-48(%rbp), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_20
## %bb.7:
	movq	%r12, 8(%rbx)
LBB0_8:
	leaq	-56(%rbp), %r13
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	leaq	16(%rbx), %rsi
	movq	(%rbx), %rdx
	movq	8(%rbx), %rcx
	movl	%r14d, %edi
	movq	%r13, %r8
	callq	*%r15
	movl	%eax, %ebx
	movq	-56(%rbp), %rax
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testq	%rax, %rax
	jne	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	%ecx, %ebx
	jne	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-48(%rbp), %rax
	movq	(%rax), %rdi
	callq	_free
	movq	-48(%rbp), %r12
	movq	8(%r12), %rdi
	addq	%rdi, %rdi
	movq	_SERVENT_STORAGE_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rdi
	ja	LBB0_18
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rdi, 8(%r12)
	callq	_malloc
	movq	%rax, (%r12)
	movq	-48(%rbp), %rax
	cmpq	$0, (%rax)
	je	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-56(%rbp), %rax
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	testq	%rax, %rax
	jne	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	%ecx, %ebx
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-48(%rbp), %rbx
	jmp	LBB0_9
LBB0_17:
	testl	%ebx, %ebx
	jne	LBB0_3
	jmp	LBB0_4
LBB0_20:
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_18:
	movq	$0, (%r12)
	movq	_ERANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.comm	_SERVENT_STORAGE_INITIAL,8,3    ## @SERVENT_STORAGE_INITIAL
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_SERVENT_STORAGE_MAX,4,2        ## @SERVENT_STORAGE_MAX
	.no_dead_strip	_getserv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getserv
_getserv:                               ; @getserv
	.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	x21, x1
	mov	x19, x0
	mov	x0, sp
	bl	_servent_getstate
	cbz	w0, LBB0_4
; %bb.1:
	mov	x20, x0
	mov	x0, #0
LBB0_2:
Lloh0:
	adrp	x8, _errno@GOTPAGE
Lloh1:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh2:
	str	w20, [x8]
LBB0_3:
	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
LBB0_4:
	ldr	x24, [sp]
	ldr	x8, [x24]
	cbnz	x8, LBB0_7
; %bb.5:
Lloh3:
	adrp	x8, _SERVENT_STORAGE_INITIAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SERVENT_STORAGE_INITIAL@GOTPAGEOFF]
Lloh5:
	ldr	x20, [x8]
	mov	x0, x20
	bl	_malloc
	str	x0, [x24]
	ldr	x24, [sp]
	ldr	x8, [x24]
	cbz	x8, LBB0_15
; %bb.6:
	str	x20, [x24, #8]
LBB0_7:
	and	x21, x21, #0xffffffff
Lloh6:
	adrp	x22, _ERANGE@GOTPAGE
Lloh7:
	ldr	x22, [x22, _ERANGE@GOTPAGEOFF]
Lloh8:
	adrp	x23, _SERVENT_STORAGE_MAX@GOTPAGE
Lloh9:
	ldr	x23, [x23, _SERVENT_STORAGE_MAX@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, x24, #16
	ldp	x2, x3, [x24]
	add	x4, sp, #8
	mov	x0, x21
	blr	x19
	mov	x20, x0
	ldr	x0, [sp, #8]
	ldr	w8, [x22]
	cmp	x0, #0
	ccmp	w20, w8, #0, eq
	b.ne	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [sp]
	ldr	x0, [x8]
	bl	_free
	ldr	x24, [sp]
	ldr	x8, [x24, #8]
	lsl	x0, x8, #1
	ldrsw	x8, [x23]
	cmp	x0, x8
	b.hi	LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	str	x0, [x24, #8]
	bl	_malloc
	str	x0, [x24]
	ldr	x8, [sp]
	ldr	x8, [x8]
	cbz	x8, LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x0, [sp, #8]
	ldr	w8, [x22]
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
	cmp	x0, #0
	ccmp	w20, w8, #0, eq
	b.ne	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x24, [sp]
	b	LBB0_8
LBB0_14:
	cbnz	w20, LBB0_2
	b	LBB0_3
LBB0_15:
	mov	x0, #0
	b	LBB0_3
LBB0_16:
	mov	x0, #0
	str	xzr, [x24]
	ldr	w20, [x22]
	b	LBB0_2
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.comm	_SERVENT_STORAGE_INITIAL,8,3    ; @SERVENT_STORAGE_INITIAL
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_SERVENT_STORAGE_MAX,4,2        ; @SERVENT_STORAGE_MAX
	.no_dead_strip	_getserv
.subsections_via_symbols
