	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ndef_parse_record
_ndef_parse_record:                     ## @ndef_parse_record
	.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
	movl	$-1, %r14d
	cmpl	$2, %esi
	jl	LBB0_14
## %bb.1:
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movl	4(%rdi), %eax
	movl	%eax, 40(%rdx)
	movq	_FLAG_SHORT_RECORD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_4
## %bb.2:
	cmpl	$3, %r12d
	jb	LBB0_14
## %bb.3:
	leaq	12(%rbx), %rcx
	movl	8(%rbx), %eax
	movl	%eax, (%r15)
	jmp	LBB0_8
LBB0_4:
	cmpl	$6, %r12d
	jb	LBB0_14
## %bb.5:
	leaq	8(%rbx), %rdi
	callq	_WPA_GET_BE32
                                        ## kill: def $eax killed $eax def $rax
	leal	-6(%r12), %ecx
	cmpl	%ecx, %eax
	jg	LBB0_14
## %bb.6:
	cmpl	$20000, %eax                    ## imm = 0x4E20
	jg	LBB0_14
## %bb.7:
	movl	%eax, (%r15)
	leaq	24(%rbx), %rcx
LBB0_8:
	movq	_FLAG_ID_LENGTH_PRESENT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rbx)
	je	LBB0_15
## %bb.9:
	movl	%r12d, %edx
	movq	%rcx, %rsi
	subq	%rbx, %rsi
	sarq	$2, %rsi
	cmpq	%rdx, %rsi
	jge	LBB0_14
## %bb.10:
	leaq	4(%rcx), %rsi
	movl	(%rcx), %edx
	movl	%edx, 36(%r15)
	movslq	40(%r15), %rdi
	testq	%rdi, %rdi
	cmoveq	%rdi, %rsi
	movq	%rsi, 8(%r15)
	leaq	(%rcx,%rdi,4), %rcx
	addq	$4, %rcx
	movq	%rcx, %rsi
	testl	%edx, %edx
	jne	LBB0_12
	jmp	LBB0_11
LBB0_15:
	movl	$0, 36(%r15)
	movslq	40(%r15), %rdx
	testq	%rdx, %rdx
	movq	%rcx, %rsi
	cmoveq	%rdx, %rsi
	movq	%rsi, 8(%r15)
	leaq	(%rcx,%rdx,4), %rcx
LBB0_11:
	xorl	%edx, %edx
	xorl	%esi, %esi
LBB0_12:
	movq	%rsi, 16(%r15)
	movslq	%edx, %rdx
	leaq	(%rcx,%rdx,4), %rcx
	xorl	%edx, %edx
	testl	%eax, %eax
	cmovneq	%rcx, %rdx
	movq	%rdx, 24(%r15)
	leaq	(%rcx,%rax,4), %rcx
	subq	%rbx, %rcx
	shrq	$2, %rcx
	movl	%ecx, 32(%r15)
	cmpl	%r12d, %ecx
	jg	LBB0_14
## %bb.13:
	xorl	%r14d, %r14d
	cmpl	%ecx, %eax
	setg	%r14b
	negl	%r14d
LBB0_14:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FLAG_SHORT_RECORD,4,2          ## @FLAG_SHORT_RECORD
	.comm	_FLAG_ID_LENGTH_PRESENT,4,2     ## @FLAG_ID_LENGTH_PRESENT
	.no_dead_strip	_ndef_parse_record
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ndef_parse_record
_ndef_parse_record:                     ; @ndef_parse_record
	.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	w1, #2
	b.lt	LBB0_14
; %bb.1:
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	w8, [x0, #4]
	str	w8, [x2, #40]
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _FLAG_SHORT_RECORD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FLAG_SHORT_RECORD@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	cmp	w19, #3
	b.lo	LBB0_14
; %bb.3:
	add	x8, x21, #12
	ldr	w0, [x21, #8]
	str	w0, [x20]
	b	LBB0_8
LBB0_4:
	subs	w22, w19, #6
	b.lo	LBB0_14
; %bb.5:
	add	x0, x21, #8
	bl	_WPA_GET_BE32
	mov	w8, #-1
	cmp	w0, w22
	b.gt	LBB0_15
; %bb.6:
	mov	w9, #20000
	cmp	w0, w9
	b.gt	LBB0_15
; %bb.7:
	str	w0, [x20]
	add	x8, x21, #24
LBB0_8:
	ldr	w9, [x21]
Lloh3:
	adrp	x10, _FLAG_ID_LENGTH_PRESENT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _FLAG_ID_LENGTH_PRESENT@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_11
; %bb.9:
	mov	w9, w19
	sub	x10, x8, x21
	cmp	x9, x10, asr #2
	b.le	LBB0_14
; %bb.10:
	ldr	w9, [x8], #4
	str	w9, [x20, #36]
	ldrsw	x10, [x20, #40]
	cmp	x10, #0
	csel	x11, xzr, x8, eq
	str	x11, [x20, #8]
	add	x8, x8, x10, lsl #2
	mov	x10, x8
	cbnz	w9, LBB0_13
	b	LBB0_12
LBB0_11:
	str	wzr, [x20, #36]
	ldrsw	x9, [x20, #40]
	cmp	x9, #0
	csel	x10, xzr, x8, eq
	str	x10, [x20, #8]
	add	x8, x8, x9, lsl #2
LBB0_12:
	mov	w9, #0
	mov	x10, #0
LBB0_13:
	add	x8, x8, w9, sxtw #2
	cmp	w0, #0
	csel	x9, xzr, x8, eq
	stp	x10, x9, [x20, #16]
	add	x8, x8, w0, uxtw #2
	sub	x8, x8, x21
	lsr	x8, x8, #2
	str	w8, [x20, #32]
	cmp	w8, w19
	b.le	LBB0_16
LBB0_14:
	mov	w8, #-1
LBB0_15:
	mov	x0, x8
	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_16:
	cmp	w0, w8
	csetm	w8, gt
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_FLAG_SHORT_RECORD,4,2          ; @FLAG_SHORT_RECORD
	.comm	_FLAG_ID_LENGTH_PRESENT,4,2     ; @FLAG_ID_LENGTH_PRESENT
	.no_dead_strip	_ndef_parse_record
.subsections_via_symbols
