	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ndef_build_record
_ndef_build_record:                     ## @ndef_build_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	%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	%r8, %r12
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r9, %rdi
	callq	_wpabuf_len
	movq	%rax, %r15
	xorl	%eax, %eax
	cmpq	$256, %r15                      ## imm = 0x100
	setb	%al
	leaq	(%r12,%r13), %rcx
	cmpq	$1, %r12
	sbbq	$-1, %rcx
	addq	%r15, %rcx
	leaq	(%rcx,%rax,4), %rdi
	addq	$6, %rdi
	callq	_wpabuf_alloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r12, %rsi
	testq	%r12, %r12
	je	LBB0_4
## %bb.3:
	movq	_FLAG_ID_LENGTH_PRESENT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
LBB0_4:
	orq	%r14, %rsi
	cmpq	$256, %r15                      ## imm = 0x100
	jae	LBB0_5
## %bb.6:
	movq	_FLAG_SHORT_RECORD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_7
LBB0_1:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	jmp	LBB0_13
LBB0_5:
	xorl	%eax, %eax
LBB0_7:
	orq	%rax, %rsi
	movq	%rbx, %rdi
	callq	_wpabuf_put_u8
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_wpabuf_put_u8
	movq	%rbx, %rdi
	movq	%r15, %rsi
	cmpq	$255, %r15
	ja	LBB0_9
## %bb.8:
	callq	_wpabuf_put_u8
	testq	%r12, %r12
	jne	LBB0_11
	jmp	LBB0_12
LBB0_9:
	callq	_wpabuf_put_be32
	testq	%r12, %r12
	je	LBB0_12
LBB0_11:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_wpabuf_put_u8
LBB0_12:
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_wpabuf_put_data
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	callq	_wpabuf_put_data
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_wpabuf_put_buf
LBB0_13:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NDEF : Failed to allocate record for build"

	.comm	_FLAG_ID_LENGTH_PRESENT,8,3     ## @FLAG_ID_LENGTH_PRESENT
	.comm	_FLAG_SHORT_RECORD,8,3          ## @FLAG_SHORT_RECORD
	.no_dead_strip	_ndef_build_record
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ndef_build_record
_ndef_build_record:                     ; @ndef_build_record
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x23, x2
	mov	x24, x1
	mov	x26, x0
	mov	x0, x5
	bl	_wpabuf_len
	mov	x25, x0
	mov	w8, #6
	mov	w9, #10
	cmp	x0, #256
	csel	x8, x9, x8, lo
	cmp	x20, #0
	add	x9, x20, x23
	cinc	x9, x9, ne
	add	x9, x9, x0
	add	x0, x9, x8
	bl	_wpabuf_alloc
	mov	x22, x0
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _FLAG_ID_LENGTH_PRESENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FLAG_ID_LENGTH_PRESENT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x20, #0
	csel	x8, xzr, x8, eq
	orr	x8, x8, x26
Lloh3:
	adrp	x9, _FLAG_SHORT_RECORD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FLAG_SHORT_RECORD@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x25, #256
	csel	x9, x9, xzr, lo
	orr	x1, x8, x9
	mov	x0, x22
	bl	_wpabuf_put_u8
	mov	x0, x22
	mov	x1, x23
	bl	_wpabuf_put_u8
	mov	x0, x22
	mov	x1, x25
	cmp	x25, #255
	b.hi	LBB0_4
; %bb.2:
	bl	_wpabuf_put_u8
	cbnz	x20, LBB0_5
	b	LBB0_6
LBB0_3:
Lloh6:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	b	LBB0_7
LBB0_4:
	bl	_wpabuf_put_be32
	cbz	x20, LBB0_6
LBB0_5:
	mov	x0, x22
	mov	x1, x20
	bl	_wpabuf_put_u8
LBB0_6:
	mov	x0, x22
	mov	x1, x24
	mov	x2, x23
	bl	_wpabuf_put_data
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_wpabuf_put_data
	mov	x0, x22
	mov	x1, x19
	bl	_wpabuf_put_buf
LBB0_7:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NDEF : Failed to allocate record for build"

	.comm	_FLAG_ID_LENGTH_PRESENT,8,3     ; @FLAG_ID_LENGTH_PRESENT
	.comm	_FLAG_SHORT_RECORD,8,3          ; @FLAG_SHORT_RECORD
	.no_dead_strip	_ndef_build_record
.subsections_via_symbols
