	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cgetservbyport
_cgetservbyport:                        ## @cgetservbyport
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	_servicelist@GOTPCREL(%rip), %r13
	movq	(%r13), %rbx
	callq	_ntohs
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	24(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_11
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	8(%rbx), %r12
	jne	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_strcasecmp
	testq	%rax, %rax
	jne	LBB0_10
## %bb.5:
	movq	(%r13), %rax
	cmpq	%rax, %rbx
	je	LBB0_9
## %bb.6:
	movq	24(%rbx), %rdx
	movq	32(%rbx), %rcx
	movq	%rdx, 24(%rcx)
	movq	24(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_8
## %bb.7:
	movq	%rcx, 32(%rdx)
LBB0_8:
	movq	%rbx, 32(%rax)
	movq	%rax, 24(%rbx)
	movq	%rbx, (%r13)
LBB0_9:
	movl	16(%rbx), %eax
	movl	%eax, _cgetservbyport.serv+8(%rip)
	leaq	_cgetservbyport.serv(%rip), %r14
	movq	8(%rbx), %rdi
	callq	_htons
	movl	%eax, _cgetservbyport.serv+4(%rip)
	movl	(%rbx), %eax
	movl	%eax, _cgetservbyport.serv(%rip)
	jmp	LBB0_11
LBB0_1:
	xorl	%r14d, %r14d
LBB0_11:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_servicelist,8,3                ## @servicelist
.zerofill __DATA,__bss,_cgetservbyport.serv,12,2 ## @cgetservbyport.serv
	.no_dead_strip	_cgetservbyport
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cgetservbyport
_cgetservbyport:                        ; @cgetservbyport
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
Lloh0:
	adrp	x22, _servicelist@GOTPAGE
Lloh1:
	ldr	x22, [x22, _servicelist@GOTPAGEOFF]
	ldr	x21, [x22]
	bl	_ntohs
	cbz	x21, LBB0_10
; %bb.1:
	mov	x20, x0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x21, [x21, #24]
	cbz	x21, LBB0_10
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	cmp	x20, x8
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x21]
	mov	x1, x19
	bl	_strcasecmp
	cbnz	x0, LBB0_2
; %bb.5:
	ldr	x8, [x22]
	cmp	x21, x8
	b.eq	LBB0_9
; %bb.6:
	ldp	x10, x9, [x21, #24]
	str	x10, [x9, #24]
	ldr	x10, [x21, #24]
	cbz	x10, LBB0_8
; %bb.7:
	str	x9, [x10, #32]
LBB0_8:
	str	x21, [x8, #32]
	str	x8, [x21, #24]
	str	x21, [x22]
LBB0_9:
	ldr	w8, [x21, #16]
Lloh2:
	adrp	x19, _cgetservbyport.serv@PAGE
Lloh3:
	add	x19, x19, _cgetservbyport.serv@PAGEOFF
	str	w8, [x19, #8]
	ldr	x0, [x21, #8]
	bl	_htons
	ldr	w8, [x21]
	stp	w8, w0, [x19]
	b	LBB0_11
LBB0_10:
	mov	x19, #0
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_servicelist,8,3                ; @servicelist
.zerofill __DATA,__bss,_cgetservbyport.serv,12,2 ; @cgetservbyport.serv
	.no_dead_strip	_cgetservbyport
.subsections_via_symbols
