	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcap_set_datalink              ## -- Begin function pcap_set_datalink
	.p2align	4, 0x90
_pcap_set_datalink:                     ## @pcap_set_datalink
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	testl	%esi, %esi
	js	LBB0_13
## %bb.1:
	movl	(%rbx), %ecx
	testq	%rcx, %rcx
	je	LBB0_12
## %bb.2:
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.3:
	testl	%ecx, %ecx
	jle	LBB0_13
## %bb.4:
	movq	24(%rbx), %rdx
	movl	%r14d, %esi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rsi, (%rdx,%rdi,8)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rdi
	cmpq	%rdi, %rcx
	jne	LBB0_6
	jmp	LBB0_13
LBB0_12:
	xorl	%eax, %eax
	cmpl	%r14d, 16(%rbx)
	je	LBB0_17
LBB0_13:
	movl	%r14d, %edi
	callq	_pcap_datalink_val_to_name
	movl	32(%rbx), %edi
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_pcap_snprintf
	jmp	LBB0_16
LBB0_15:
	leaq	L_.str.1(%rip), %rdx
	movl	$4, %esi
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_pcap_snprintf
LBB0_16:
	movl	$-1, %eax
LBB0_17:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	cmpl	$2, %ecx
	jne	LBB0_11
## %bb.8:
	movq	(%rdx), %rcx
	movq	_DLT_EN10MB@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_11
## %bb.9:
	movq	_DLT_DOCSIS@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	je	LBB0_10
LBB0_11:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	*%rax
	cmpl	$-1, %eax
	je	LBB0_16
LBB0_10:
	movl	%r14d, 16(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_DLT_EN10MB,8,3                 ## @DLT_EN10MB
	.comm	_DLT_DOCSIS,4,2                 ## @DLT_DOCSIS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s is not one of the DLTs supported by this device"

L_.str.1:                               ## @.str.1
	.asciz	"DLT %d is not one of the DLTs supported by this device"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcap_set_datalink              ; -- Begin function pcap_set_datalink
	.p2align	2
_pcap_set_datalink:                     ; @pcap_set_datalink
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	tbnz	w1, #31, LBB0_9
; %bb.1:
	ldr	w9, [x20]
	cbz	w9, LBB0_7
; %bb.2:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_7
; %bb.3:
	cmp	w9, #1
	b.lt	LBB0_9
; %bb.4:
	mov	x11, #0
	ldr	x10, [x20, #24]
	lsl	x12, x9, #3
	mov	w13, w19
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x10, x11]
	cmp	x14, x13
	b.eq	LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x11, x11, #8
	cmp	x12, x11
	b.ne	LBB0_5
	b	LBB0_9
LBB0_7:
	ldr	w8, [x20, #16]
	cmp	w8, w19
	b.ne	LBB0_9
; %bb.8:
	mov	w0, #0
	b	LBB0_13
LBB0_9:
	mov	x0, x19
	bl	_pcap_datalink_val_to_name
	mov	x8, x0
	ldr	w0, [x20, #32]
	cbz	x8, LBB0_11
; %bb.10:
	str	x8, [sp]
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_12
LBB0_11:
	str	x19, [sp]
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_12:
	mov	w1, #4
	bl	_pcap_snprintf
	mov	w0, #-1
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_14:
	cmp	w9, #2
	b.ne	LBB0_16
; %bb.15:
	ldr	x9, [x10]
Lloh4:
	adrp	x10, _DLT_EN10MB@GOTPAGE
Lloh5:
	ldr	x10, [x10, _DLT_EN10MB@GOTPAGEOFF]
Lloh6:
	ldr	x10, [x10]
Lloh7:
	adrp	x11, _DLT_DOCSIS@GOTPAGE
Lloh8:
	ldr	x11, [x11, _DLT_DOCSIS@GOTPAGEOFF]
Lloh9:
	ldr	w11, [x11]
	cmp	x9, x10
	ccmp	w11, w19, #0, eq
	b.eq	LBB0_17
LBB0_16:
	mov	x0, x20
	mov	x1, x19
	blr	x8
	cmn	w0, #1
	b.eq	LBB0_13
LBB0_17:
	mov	w0, #0
	str	w19, [x20, #16]
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_DLT_EN10MB,8,3                 ; @DLT_EN10MB
	.comm	_DLT_DOCSIS,4,2                 ; @DLT_DOCSIS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s is not one of the DLTs supported by this device"

l_.str.1:                               ; @.str.1
	.asciz	"DLT %d is not one of the DLTs supported by this device"

.subsections_via_symbols
