	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radius_msg_add_attr            ## -- Begin function radius_msg_add_attr
	.p2align	4, 0x90
_radius_msg_add_attr:                   ## @radius_msg_add_attr
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %r13
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_TEST_FAIL
	testq	%rax, %rax
	jne	LBB0_8
## %bb.1:
	movq	_RADIUS_MAX_ATTR_LEN@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jae	LBB0_3
## %bb.2:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	callq	_wpa_printf
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_3:
	leaq	8(%r14), %rbx
	movl	(%r13), %edi
	callq	_wpabuf_tailroom
	cmpq	%rbx, %rax
	jae	LBB0_6
## %bb.4:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_wpabuf_resize
	testq	%rax, %rax
	js	LBB0_7
## %bb.5:
	movl	(%r13), %edi
	callq	_wpabuf_mhead
	movl	%eax, 4(%r13)
LBB0_6:
	movl	(%r13), %edi
	movl	$8, %esi
	callq	_wpabuf_put
	movq	%r15, %rsi
	movq	%rax, %r15
	movl	%r12d, 4(%rax)
	movl	%ebx, (%rax)
	movl	(%r13), %edi
	movq	%r14, %rdx
	callq	_wpabuf_put_data
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_radius_msg_add_attr_to_array
	xorl	%ebx, %ebx
	testq	%rax, %rax
	cmoveq	%r15, %rbx
LBB0_8:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RADIUS_MAX_ATTR_LEN,8,3        ## @RADIUS_MAX_ATTR_LEN
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"radius_msg_add_attr: too long attribute (%lu bytes)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radius_msg_add_attr            ; -- Begin function radius_msg_add_attr
	.p2align	2
_radius_msg_add_attr:                   ; @radius_msg_add_attr
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	bl	_TEST_FAIL
	cbnz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _RADIUS_MAX_ATTR_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RADIUS_MAX_ATTR_LEN@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x19
	b.hs	LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_wpa_printf
LBB0_3:
	mov	x0, #0
LBB0_4:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
	add	x23, x19, #8
	ldr	w0, [x20]
	bl	_wpabuf_tailroom
	cmp	x0, x23
	b.hs	LBB0_8
; %bb.6:
	mov	x0, x20
	mov	x1, x23
	bl	_wpabuf_resize
	tbnz	x0, #63, LBB0_3
; %bb.7:
	ldr	w0, [x20]
	bl	_wpabuf_mhead
	str	w0, [x20, #4]
LBB0_8:
	ldr	w0, [x20]
	mov	w1, #8
	bl	_wpabuf_put
	mov	x24, x0
	stp	w23, w22, [x0]
	ldr	w0, [x20]
	mov	x1, x21
	mov	x2, x19
	bl	_wpabuf_put_data
	mov	x0, x20
	mov	x1, x24
	bl	_radius_msg_add_attr_to_array
	cmp	x0, #0
	csel	x0, x24, xzr, eq
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_RADIUS_MAX_ATTR_LEN,8,3        ; @RADIUS_MAX_ATTR_LEN
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"radius_msg_add_attr: too long attribute (%lu bytes)"

.subsections_via_symbols
