	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_portname                       ## -- Begin function portname
	.p2align	4, 0x90
_portname:                              ## @portname
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	_opts@GOTPCREL(%rip), %rax
	movq	_OPT_NORESOLVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_1
LBB0_6:
	leaq	_portname.buf(%rip), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	callq	_sprintf
LBB0_10:
	leaq	_portname.buf(%rip), %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpl	$-2, %edi
	je	LBB0_6
## %bb.2:
	cmpl	$-1, %edi
	jne	LBB0_7
## %bb.3:
	movl	%ebx, %edi
	callq	_htons
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_getservbyport
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%rax, %r14
	movl	(%rax), %esi
	leaq	_portname.buf(%rip), %r12
	movq	%r12, %rdi
	movl	$31, %edx
	callq	_strncpy
	movb	$0, _portname.buf+31(%rip)
	movl	%ebx, %edi
	callq	_htons
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_getservbyport
	movq	%rax, %r15
	movl	(%r14), %r14d
	movq	%r12, %rdi
	callq	_strlen
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_strncasecmp
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	testq	%r15, %r15
	jne	LBB0_10
	jmp	LBB0_6
LBB0_7:
	callq	_getprotobynumber
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	%rax, %r14
	movl	%ebx, %edi
	callq	_htons
	movq	(%r14), %rsi
	movl	%eax, %edi
	callq	_getservbyport
	testq	%rax, %rax
	je	LBB0_6
## %bb.9:
	movl	(%rax), %esi
	leaq	_portname.buf(%rip), %rdi
	movl	$31, %edx
	callq	_strncpy
	movb	$0, _portname.buf+31(%rip)
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_portname.buf,32,4 ## @portname.buf
	.comm	_opts,4,2                       ## @opts
	.comm	_OPT_NORESOLVE,4,2              ## @OPT_NORESOLVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tcp"

L_.str.1:                               ## @.str.1
	.asciz	"udp"

L_.str.2:                               ## @.str.2
	.asciz	"%d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_portname                       ; -- Begin function portname
	.p2align	2
_portname:                              ; @portname
	.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	x8, _opts@GOTPAGE
Lloh1:
	ldr	x8, [x8, _opts@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _OPT_NORESOLVE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _OPT_NORESOLVE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w9, w8
	cmp	w8, #0
	ccmn	w0, #2, #4, eq
	b.ne	LBB0_3
LBB0_1:
Lloh6:
	adrp	x0, _portname.buf@PAGE
Lloh7:
	add	x0, x0, _portname.buf@PAGEOFF
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	bl	_sprintf
LBB0_2:
Lloh10:
	adrp	x0, _portname.buf@PAGE
Lloh11:
	add	x0, x0, _portname.buf@PAGEOFF
	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
LBB0_3:
	cmn	w0, #1
	b.ne	LBB0_7
; %bb.4:
	mov	x0, x19
	bl	_htons
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_getservbyport
	cbz	x0, LBB0_1
; %bb.5:
	mov	x20, x0
	ldr	w1, [x0]
Lloh14:
	adrp	x22, _portname.buf@PAGE
Lloh15:
	add	x22, x22, _portname.buf@PAGEOFF
	mov	x0, x22
	mov	w2, #31
	bl	_strncpy
	strb	wzr, [x22, #31]
	mov	x0, x19
	bl	_htons
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_getservbyport
	mov	x21, x0
	ldr	w20, [x20]
	mov	x0, x22
	bl	_strlen
	mov	x2, x0
	mov	x0, x22
	mov	x1, x20
	bl	_strncasecmp
	cbnz	x0, LBB0_1
; %bb.6:
	cbnz	x21, LBB0_2
	b	LBB0_1
LBB0_7:
	bl	_getprotobynumber
	cbz	x0, LBB0_1
; %bb.8:
	mov	x20, x0
	mov	x0, x19
	bl	_htons
	ldr	x1, [x20]
	bl	_getservbyport
	cbz	x0, LBB0_1
; %bb.9:
	ldr	w1, [x0]
Lloh18:
	adrp	x19, _portname.buf@PAGE
Lloh19:
	add	x19, x19, _portname.buf@PAGEOFF
	mov	x0, x19
	mov	w2, #31
	bl	_strncpy
	strb	wzr, [x19, #31]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_portname.buf,32,0 ; @portname.buf
	.comm	_opts,4,2                       ; @opts
	.comm	_OPT_NORESOLVE,4,2              ; @OPT_NORESOLVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tcp"

l_.str.1:                               ; @.str.1
	.asciz	"udp"

l_.str.2:                               ; @.str.2
	.asciz	"%d"

.subsections_via_symbols
