	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atalk_autobind
_atalk_autobind:                        ## @atalk_autobind
	.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	%rdi, %r14
	callq	_at_sk
	movq	%rax, %r15
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_atalk_find_primary
	movq	%rax, %r12
	movq	_EADDRNOTAVAIL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	testq	%r12, %r12
	je	LBB0_4
## %bb.1:
	movq	(%r12), %r13
	movq	_ATADDR_ANYNET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	cmpq	%rax, %r13
	je	LBB0_4
## %bb.2:
	movq	(%r12), %rax
	movq	%rax, -56(%rbp)
	movq	%rax, (%r15)
	movl	8(%r12), %eax
	movl	%eax, -48(%rbp)
	movl	%eax, 8(%r15)
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	callq	_atalk_pick_and_bind_port
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_SOCK_ZAPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_sock_reset_flag
	xorl	%ebx, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EADDRNOTAVAIL,4,2              ## @EADDRNOTAVAIL
	.comm	_ATADDR_ANYNET,4,2              ## @ATADDR_ANYNET
	.comm	_SOCK_ZAPPED,4,2                ## @SOCK_ZAPPED
	.no_dead_strip	_atalk_autobind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atalk_autobind
_atalk_autobind:                        ; @atalk_autobind
	.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, x0
	bl	_at_sk
	mov	x20, x0
	bl	_atalk_find_primary
Lloh0:
	adrp	x8, _EADDRNOTAVAIL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EADDRNOTAVAIL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	cbz	x0, LBB0_4
; %bb.1:
	mov	x22, x0
	ldr	x23, [x0]
Lloh3:
	adrp	x8, _ATADDR_ANYNET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATADDR_ANYNET@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_htons
	cmp	x23, x0
	b.eq	LBB0_4
; %bb.2:
	ldr	x8, [x22]
	str	x8, [sp]
	str	x8, [x20]
	ldr	w8, [x22, #8]
	str	w8, [sp, #8]
	str	w8, [x20, #8]
	mov	x1, sp
	mov	x0, x19
	bl	_atalk_pick_and_bind_port
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _SOCK_ZAPPED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SOCK_ZAPPED@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sock_reset_flag
LBB0_4:
	mov	x0, x21
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_EADDRNOTAVAIL,4,2              ; @EADDRNOTAVAIL
	.comm	_ATADDR_ANYNET,4,2              ; @ATADDR_ANYNET
	.comm	_SOCK_ZAPPED,4,2                ; @SOCK_ZAPPED
	.no_dead_strip	_atalk_autobind
.subsections_via_symbols
