	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ping_bind
_ping_bind:                             ## @ping_bind
	.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
	movl	%edx, %ebx
	movq	%rsi, %r12
	movq	%rdi, %r15
	callq	_inet_sk
	cmpl	$15, %ebx
	ja	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	%rax, %r14
	movq	8(%r12), %rbx
	movl	(%r12), %edi
	callq	_ntohs
	movzwl	%ax, %ecx
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_pr_debug
	movq	%r15, %rdi
	callq	_sock_net
	movq	8(%r12), %rsi
	movl	%eax, %edi
	callq	_inet_addr_type
	movl	%eax, %ebx
	movq	8(%r12), %r13
	movq	_INADDR_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htonl
	cmpq	%rax, %r13
	movq	_RTN_LOCAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmovel	%eax, %ebx
	movq	_sysctl_ip_nonlocal_bind@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	jne	LBB0_6
## %bb.4:
	cmpq	$0, (%r14)
	jne	LBB0_6
## %bb.5:
	cmpq	$0, 8(%r14)
	sete	%cl
	cmpl	%eax, %ebx
	setne	%al
	testb	%al, %cl
	jne	LBB0_8
LBB0_6:
	movq	_RTN_MULTICAST@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_8
## %bb.7:
	movq	_RTN_BROADCAST@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_9
LBB0_8:
	movq	_EADDRNOTAVAIL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_19:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r15, %rdi
	callq	_lock_sock
	cmpq	$0, 16(%r14)
	je	LBB0_11
## %bb.10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_11:
	movq	_EADDRINUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	8(%r12), %rax
	movq	%rax, 32(%r14)
	movq	%r14, %r13
	addq	$24, %r13
	movq	%rax, 24(%r14)
	movl	(%r12), %edi
	callq	_ntohs
	movl	%eax, %r12d
	movzwl	%ax, %esi
	movq	%r15, %rdi
	callq	_ping_v4_get_port
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	negl	%ebx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r13)
	jmp	LBB0_18
LBB0_13:
	movl	16(%r14), %esi
	movl	8(%r15), %ecx
	leaq	L_.str.1(%rip), %rdi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_pr_debug
	cmpq	$0, 24(%r14)
	je	LBB0_15
## %bb.14:
	movq	_SOCK_BINDADDR_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
LBB0_15:
	testw	%r12w, %r12w
	je	LBB0_17
## %bb.16:
	movq	_SOCK_BINDPORT_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
LBB0_17:
	movq	16(%r14), %rdi
	callq	_htons
	movl	%eax, 56(%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%r14)
	movq	%r15, %rdi
	callq	_sk_dst_reset
	xorl	%ebx, %ebx
LBB0_18:
	movq	%r15, %rdi
	callq	_release_sock
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ping_v4_bind(sk=%p,sa_addr=%08x,sa_port=%d)\n"

	.comm	_INADDR_ANY,4,2                 ## @INADDR_ANY
	.comm	_RTN_LOCAL,4,2                  ## @RTN_LOCAL
	.comm	_sysctl_ip_nonlocal_bind,8,3    ## @sysctl_ip_nonlocal_bind
	.comm	_RTN_MULTICAST,4,2              ## @RTN_MULTICAST
	.comm	_RTN_BROADCAST,4,2              ## @RTN_BROADCAST
	.comm	_EADDRNOTAVAIL,4,2              ## @EADDRNOTAVAIL
	.comm	_EADDRINUSE,4,2                 ## @EADDRINUSE
L_.str.1:                               ## @.str.1
	.asciz	"after bind(): num = %d, daddr = %pI4, dif = %d\n"

	.comm	_SOCK_BINDADDR_LOCK,4,2         ## @SOCK_BINDADDR_LOCK
	.comm	_SOCK_BINDPORT_LOCK,4,2         ## @SOCK_BINDPORT_LOCK
L_.str.2:                               ## @.str.2
	.asciz	"ping_v4_bind -> %d\n"

	.no_dead_strip	_ping_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ping_bind
_ping_bind:                             ; @ping_bind
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x2
	mov	x21, x1
	mov	x19, x0
	bl	_inet_sk
	cmp	w22, #15
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_2:
	mov	x20, x0
	ldr	x22, [x21, #8]
	ldr	w0, [x21]
	bl	_ntohs
	mov	w8, w0
	stp	x22, x8, [sp, #8]
	str	x19, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	mov	x0, x19
	bl	_sock_net
	ldr	x1, [x21, #8]
	bl	_inet_addr_type
	mov	x22, x0
	ldr	x23, [x21, #8]
Lloh4:
	adrp	x8, _INADDR_ANY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _INADDR_ANY@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_htonl
Lloh7:
	adrp	x8, _RTN_LOCAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RTN_LOCAL@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x8]
	cmp	x23, x0
	csel	w8, w9, w22, eq
Lloh10:
	adrp	x10, _sysctl_ip_nonlocal_bind@GOTPAGE
Lloh11:
	ldr	x10, [x10, _sysctl_ip_nonlocal_bind@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	cbnz	x10, LBB0_4
; %bb.3:
	ldr	x10, [x20]
	cbz	x10, LBB0_8
LBB0_4:
Lloh13:
	adrp	x9, _RTN_MULTICAST@GOTPAGE
Lloh14:
	ldr	x9, [x9, _RTN_MULTICAST@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_9
LBB0_5:
Lloh16:
	adrp	x9, _RTN_BROADCAST@GOTPAGE
Lloh17:
	ldr	x9, [x9, _RTN_BROADCAST@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_9
; %bb.6:
	mov	x0, x19
	bl	_lock_sock
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_12
; %bb.7:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_19
LBB0_8:
	ldr	x10, [x20, #8]
	cmp	w8, w9
	ccmp	x10, #0, #0, ne
Lloh22:
	adrp	x9, _RTN_MULTICAST@GOTPAGE
Lloh23:
	ldr	x9, [x9, _RTN_MULTICAST@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	ccmp	w8, w9, #4, ne
	b.ne	LBB0_5
LBB0_9:
Lloh25:
	adrp	x8, _EADDRNOTAVAIL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EADDRNOTAVAIL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_12:
Lloh27:
	adrp	x8, _EADDRINUSE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EADDRINUSE@GOTPAGEOFF]
Lloh29:
	ldr	w23, [x8]
	ldr	x8, [x21, #8]
	mov	x22, x20
	stp	x8, x8, [x22, #24]!
	ldr	w0, [x21]
	bl	_ntohs
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	bl	_ping_v4_get_port
	cbz	x0, LBB0_14
; %bb.13:
	neg	w20, w23
	stp	xzr, xzr, [x22]
	b	LBB0_19
LBB0_14:
	ldr	x8, [x20, #16]
	ldr	x9, [x19, #8]
	stp	x22, x9, [sp, #8]
	str	x8, [sp]
Lloh30:
	adrp	x0, l_.str.1@PAGE
Lloh31:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_16
; %bb.15:
Lloh32:
	adrp	x8, _SOCK_BINDADDR_LOCK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _SOCK_BINDADDR_LOCK@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_16:
	cbz	w21, LBB0_18
; %bb.17:
Lloh35:
	adrp	x8, _SOCK_BINDPORT_LOCK@GOTPAGE
Lloh36:
	ldr	x8, [x8, _SOCK_BINDPORT_LOCK@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_18:
	ldr	x0, [x20, #16]
	bl	_htons
	str	w0, [x20, #56]
	stp	xzr, xzr, [x20, #40]
	mov	x0, x19
	bl	_sk_dst_reset
	mov	w20, #0
LBB0_19:
	mov	x0, x19
	bl	_release_sock
	str	x20, [sp]
Lloh38:
	adrp	x0, l_.str.2@PAGE
Lloh39:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_debug
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ping_v4_bind(sk=%p,sa_addr=%08x,sa_port=%d)\n"

	.comm	_INADDR_ANY,4,2                 ; @INADDR_ANY
	.comm	_RTN_LOCAL,4,2                  ; @RTN_LOCAL
	.comm	_sysctl_ip_nonlocal_bind,8,3    ; @sysctl_ip_nonlocal_bind
	.comm	_RTN_MULTICAST,4,2              ; @RTN_MULTICAST
	.comm	_RTN_BROADCAST,4,2              ; @RTN_BROADCAST
	.comm	_EADDRNOTAVAIL,4,2              ; @EADDRNOTAVAIL
	.comm	_EADDRINUSE,4,2                 ; @EADDRINUSE
l_.str.1:                               ; @.str.1
	.asciz	"after bind(): num = %d, daddr = %pI4, dif = %d\n"

	.comm	_SOCK_BINDADDR_LOCK,4,2         ; @SOCK_BINDADDR_LOCK
	.comm	_SOCK_BINDPORT_LOCK,4,2         ; @SOCK_BINDPORT_LOCK
l_.str.2:                               ; @.str.2
	.asciz	"ping_v4_bind -> %d\n"

	.no_dead_strip	_ping_bind
.subsections_via_symbols
