	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function packet_bind
_packet_bind:                           ## @packet_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$23, %edx
	jbe	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	movq	(%rsi), %rax
	movq	_AF_PACKET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.3:
	movq	(%rdi), %r14
	xorl	%ebx, %ebx
	cmpq	$0, 16(%r15)
	je	LBB0_4
## %bb.5:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_sock_net
	movq	16(%r15), %rsi
	movl	%eax, %edi
	callq	_dev_get_by_index
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_6
	jmp	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	xorl	%r12d, %r12d
LBB0_6:
	movq	8(%r15), %rdx
	testq	%rdx, %rdx
	jne	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_pkt_sk
	movl	(%rax), %edx
LBB0_8:
	movq	%r14, %rdi
	movq	%r12, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_packet_do_bind
	movl	%eax, %ebx
	testq	%r12, %r12
	je	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	callq	_dev_put
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AF_PACKET,8,3                  ## @AF_PACKET
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_packet_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function packet_bind
_packet_bind:                           ; @packet_bind
	.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
	cmp	w2, #23
	b.ls	LBB0_5
; %bb.1:
	mov	x20, x1
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _AF_PACKET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AF_PACKET@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	ldr	x19, [x0]
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_7
; %bb.3:
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_sock_net
	ldr	x1, [x20, #16]
	bl	_dev_get_by_index
	mov	x21, x0
	cbnz	x0, LBB0_8
; %bb.4:
	neg	w19, w22
	b	LBB0_6
LBB0_5:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_6:
	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
LBB0_7:
	mov	x21, #0
LBB0_8:
	ldr	x2, [x20, #8]
	cbnz	x2, LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_pkt_sk
	ldr	w2, [x0]
LBB0_10:
	mov	x0, x19
	mov	x1, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_packet_do_bind
	mov	x19, x0
	cbz	x21, LBB0_6
; %bb.11:
	mov	x0, x21
	bl	_dev_put
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AF_PACKET,8,3                  ; @AF_PACKET
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_packet_bind
.subsections_via_symbols
