	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_hex_pkt                   ## -- Begin function read_hex_pkt
	.p2align	4, 0x90
_read_hex_pkt:                          ## @read_hex_pkt
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	$0, -32(%rbp)
	movq	_LDNS_STATUS_ERR@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_LDNS_MAX_PACKETLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_xmalloc
	movq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_packetbuffromfile
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	-32(%rbp), %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_ldns_wire2pkt
	movq	%rax, %r14
LBB0_2:
	movq	%rbx, %rdi
	callq	_xfree
	movq	_LDNS_STATUS_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_4
## %bb.3:
	movq	-32(%rbp), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_ldns_get_errorstr_by_id
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	callq	_fprintf
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_STATUS_ERR,8,3            ## @LDNS_STATUS_ERR
	.comm	_LDNS_MAX_PACKETLEN,4,2         ## @LDNS_MAX_PACKETLEN
	.comm	_LDNS_STATUS_OK,8,3             ## @LDNS_STATUS_OK
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error parsing hex file: %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_hex_pkt                   ; -- Begin function read_hex_pkt
	.p2align	2
_read_hex_pkt:                          ; @read_hex_pkt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _LDNS_STATUS_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LDNS_STATUS_ERR@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
Lloh3:
	adrp	x8, _LDNS_MAX_PACKETLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LDNS_MAX_PACKETLEN@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_xmalloc
	mov	x20, x0
	mov	x0, x21
	mov	x1, x20
	bl	_packetbuffromfile
	cbz	x0, LBB0_2
; %bb.1:
	mov	x2, x0
	add	x0, sp, #8
	mov	x1, x20
	bl	_ldns_wire2pkt
	mov	x19, x0
LBB0_2:
	mov	x0, x20
	bl	_xfree
Lloh6:
	adrp	x8, _LDNS_STATUS_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LDNS_STATUS_OK@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x19, x8
	b.ne	LBB0_4
; %bb.3:
	ldr	x0, [sp, #8]
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x8, _stderr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_ldns_get_errorstr_by_id
	mov	x2, x0
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	mov	x0, #0
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_STATUS_ERR,8,3            ; @LDNS_STATUS_ERR
	.comm	_LDNS_MAX_PACKETLEN,4,2         ; @LDNS_MAX_PACKETLEN
	.comm	_LDNS_STATUS_OK,8,3             ; @LDNS_STATUS_OK
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error parsing hex file: %s\n"

.subsections_via_symbols
