	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function packetbuffromfile
_packetbuffromfile:                     ## @packetbuffromfile
	.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	%rsi, %r15
	movq	%rdi, %rbx
	movq	_LDNS_MAX_PACKETLEN@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_xmalloc
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	movq	%rax, %r12
	testq	%r12, %r12
	je	LBB0_4
LBB0_5:
	movq	%r12, %rdi
	callq	_fgetc
                                        ## kill: def $eax killed $eax def $rax
	movq	_EOF@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	xorl	%ebx, %ebx
	movl	(%r13), %r8d
	cmpl	%ecx, %eax
	je	LBB0_24
## %bb.6:
	testl	%r8d, %r8d
	jle	LBB0_24
## %bb.7:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edx
	cmpl	$128, %eax
	movl	$2, %r15d
	cmovbl	%edx, %r15d
	cmpl	$2, %edx
	movl	$2, %edx
	cmovll	%r15d, %edx
	cmpl	$2, %edx
	je	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$1, %edx
	je	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	testl	%edx, %edx
	jne	LBB0_18
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	leal	-48(%rax), %ecx
	cmpl	$10, %ecx
	jb	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	leal	-65(%rax), %ecx
	cmpl	$37, %ecx
	ja	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	movabsq	$270582939711, %rdx             ## imm = 0x3F0000003F
	btq	%rcx, %rdx
	jae	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	%eax, %eax
	movslq	%ebx, %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, (%rdx,%rcx,8)
	incl	%ebx
	xorl	%r15d, %r15d
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_8 Depth=1
	cltq
	movslq	%ebx, %rbx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx,%rbx,8)
	incl	%ebx
	movl	$2, %r15d
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$10, %eax
	setne	%dl
	cmpl	%ecx, %eax
	setne	%al
	andb	%dl, %al
	movzbl	%al, %r15d
LBB0_18:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r12, %rdi
	callq	_fgetc
                                        ## kill: def $eax killed $eax def $rax
	movl	(%r14), %ecx
	movl	(%r13), %r8d
	cmpl	%ecx, %eax
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	%r8d, %ebx
	jl	LBB0_8
	jmp	LBB0_20
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=1
	xorl	%r15d, %r15d
	cmpl	$59, %eax
	sete	%r15b
	jmp	LBB0_18
LBB0_20:
	testb	$1, %bl
	je	LBB0_22
## %bb.21:
	movslq	%ebx, %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	$48, (%rcx,%rax,8)
	incl	%ebx
LBB0_22:
	cmpl	$1, %r15d
	jg	LBB0_25
## %bb.23:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_24:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	callq	_hexstr2bin
	movq	%rax, %rbx
	jmp	LBB0_26
LBB0_1:
	movq	_stdin@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	testq	%r12, %r12
	jne	LBB0_5
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	xorl	%ebx, %ebx
	jmp	LBB0_28
LBB0_25:
	movslq	%ebx, %rbx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_memcpy
LBB0_26:
	movq	_stdin@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	je	LBB0_28
## %bb.27:
	movq	%r12, %rdi
	callq	_fclose
LBB0_28:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_xfree
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_MAX_PACKETLEN,4,2         ## @LDNS_MAX_PACKETLEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-"

	.comm	_stdin,8,3                      ## @stdin
L_.str.1:                               ## @.str.1
	.asciz	"r"

L_.str.2:                               ## @.str.2
	.asciz	"Unable to open file for reading"

	.comm	_EOF,4,2                        ## @EOF
	.no_dead_strip	_packetbuffromfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function packetbuffromfile
_packetbuffromfile:                     ; @packetbuffromfile
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x24, _LDNS_MAX_PACKETLEN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _LDNS_MAX_PACKETLEN@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_xmalloc
	mov	x19, x0
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	w2, #2
	bl	_strncmp
Lloh4:
	adrp	x23, _stdin@GOTPAGE
Lloh5:
	ldr	x23, [x23, _stdin@GOTPAGEOFF]
	cbz	x0, LBB0_19
; %bb.1:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_fopen
	mov	x21, x0
	cbz	x21, LBB0_20
LBB0_2:
	mov	x0, x21
	bl	_fgetc
                                        ; kill: def $w0 killed $w0 def $x0
Lloh8:
	adrp	x25, _EOF@GOTPAGE
Lloh9:
	ldr	x25, [x25, _EOF@GOTPAGEOFF]
	ldr	w8, [x25]
	ldr	w4, [x24]
	cmp	w0, w8
	mov	w22, #0
	ccmp	w4, #1, #8, ne
	b.lt	LBB0_18
; %bb.3:
	mov	w28, #0
	mov	w26, #2
	mov	w27, #1
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	sxtw	x8, w0
	str	x8, [x19, w22, sxtw #3]
	add	w22, w22, #1
	mov	w28, #2
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	bl	_fgetc
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x25]
	ldr	w4, [x24]
	cmp	w0, w8
	ccmp	w22, w4, #0, ne
	b.ge	LBB0_15
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x9, x28
	cmp	w0, #128
	csel	w28, w28, w26, lo
	cmp	w9, #2
	csel	w9, w28, w26, lt
	cmp	w9, #2
	b.eq	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w9, #1
	b.eq	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	cbnz	w9, LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	sub	w8, w0, #48
	cmp	w8, #10
	b.lo	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	sub	w8, w0, #65
	cmp	w8, #37
	b.hi	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	lsl	x8, x27, x8
	tst	x8, #0x3f0000003f
	b.eq	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w28, #0
	mov	w8, w0
	str	x8, [x19, w22, sxtw #3]
	add	w22, w22, #1
	b	LBB0_5
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w0, #10
	ccmp	w0, w8, #4, ne
	cset	w28, ne
	b	LBB0_5
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w0, #59
	cset	w28, eq
	b	LBB0_5
LBB0_15:
	tbz	w22, #0, LBB0_17
; %bb.16:
	mov	w8, #48
	str	x8, [x19, w22, sxtw #3]
	add	w22, w22, #1
LBB0_17:
	cmp	w28, #1
	b.gt	LBB0_21
LBB0_18:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	mov	w3, #0
	bl	_hexstr2bin
	mov	x22, x0
	b	LBB0_22
LBB0_19:
	ldr	x21, [x23]
	cbnz	x21, LBB0_2
LBB0_20:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
	mov	x22, #0
	b	LBB0_24
LBB0_21:
	sxtw	x22, w22
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	bl	_memcpy
LBB0_22:
	ldr	x8, [x23]
	cmp	x21, x8
	b.eq	LBB0_24
; %bb.23:
	mov	x0, x21
	bl	_fclose
LBB0_24:
	mov	x0, x19
	bl	_xfree
	mov	x0, x22
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_MAX_PACKETLEN,4,2         ; @LDNS_MAX_PACKETLEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-"

	.comm	_stdin,8,3                      ; @stdin
l_.str.1:                               ; @.str.1
	.asciz	"r"

l_.str.2:                               ; @.str.2
	.asciz	"Unable to open file for reading"

	.comm	_EOF,4,2                        ; @EOF
	.no_dead_strip	_packetbuffromfile
.subsections_via_symbols
