	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eap_wsc_build_msg
_eap_wsc_build_msg:                     ## @eap_wsc_build_msg
	.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
	movl	%esi, %r14d
	movq	%rdi, %r13
	movq	16(%rdi), %rdi
	callq	_wpabuf_len
	movq	%rax, %r15
	movq	(%r13), %rcx
	subq	%rcx, %r15
	leaq	2(%r15), %rdx
	movslq	8(%r13), %rax
	xorl	%r12d, %r12d
	cmpq	%rax, %rdx
	jbe	LBB0_4
## %bb.1:
	addq	$-2, %rax
	movq	_WSC_FLAGS_MF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r12d
	testq	%rcx, %rcx
	jne	LBB0_3
## %bb.2:
	movq	_WSC_FLAGS_LF@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r12d
	addq	$-2, %rax
LBB0_3:
	movq	%rax, %r15
LBB0_4:
	movq	_WSC_FLAGS_LF@GOTPCREL(%rip), %rbx
	xorl	%eax, %eax
	movl	(%rbx), %ecx
	andl	%r12d, %ecx
	setne	%al
	leaq	2(%r15,%rax,2), %rdx
	movq	_EAP_VENDOR_WFA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EAP_VENDOR_TYPE_WSC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_EAP_CODE_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %r8d
	callq	_eap_msg_alloc
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movl	12(%r13), %esi
	movq	%r14, %rdi
	callq	_wpabuf_put_u8
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_wpabuf_put_u8
	testl	%r12d, (%rbx)
	je	LBB0_8
## %bb.7:
	movq	16(%r13), %rdi
	callq	_wpabuf_len
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_wpabuf_put_be16
LBB0_8:
	movq	16(%r13), %rdi
	callq	_wpabuf_head_u8
	addq	(%r13), %rax
	movq	%r14, %rdi
	movq	%rax, %rsi
	movq	%r15, %rdx
	callq	_wpabuf_put_data
	movq	(%r13), %rbx
	addq	%r15, %rbx
	movq	%rbx, (%r13)
	movq	16(%r13), %rdi
	callq	_wpabuf_len
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	cmpq	%rax, %rbx
	jne	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	16(%r13), %rdi
	callq	_wpabuf_free
	movq	$0, 16(%r13)
	movq	$0, (%r13)
	movq	_MESG@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_5:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_12
LBB0_10:
	movq	16(%r13), %rdi
	callq	_wpabuf_len
	subq	(%r13), %rax
	leaq	L_.str.2(%rip), %rsi
	movl	%r12d, %edi
	movq	%r15, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	_WAIT_FRAG_ACK@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_eap_wsc_state
LBB0_12:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WSC_FLAGS_MF,4,2               ## @WSC_FLAGS_MF
	.comm	_WSC_FLAGS_LF,4,2               ## @WSC_FLAGS_LF
	.comm	_EAP_VENDOR_WFA,4,2             ## @EAP_VENDOR_WFA
	.comm	_EAP_VENDOR_TYPE_WSC,4,2        ## @EAP_VENDOR_TYPE_WSC
	.comm	_EAP_CODE_REQUEST,4,2           ## @EAP_CODE_REQUEST
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EAP-WSC: Failed to allocate memory for request"

	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"EAP-WSC: Sending out %lu bytes (message sent completely)"

	.comm	_MESG,4,2                       ## @MESG
L_.str.2:                               ## @.str.2
	.asciz	"EAP-WSC: Sending out %lu bytes (%lu more to send)"

	.comm	_WAIT_FRAG_ACK,4,2              ## @WAIT_FRAG_ACK
	.no_dead_strip	_eap_wsc_build_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eap_wsc_build_msg
_eap_wsc_build_msg:                     ; @eap_wsc_build_msg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	x0, [x0, #16]
	bl	_wpabuf_len
	ldr	x8, [x19]
	sub	x20, x0, x8
	add	x10, x20, #2
	ldrsw	x9, [x19, #8]
Lloh0:
	adrp	x23, _WSC_FLAGS_LF@GOTPAGE
Lloh1:
	ldr	x23, [x23, _WSC_FLAGS_LF@GOTPAGEOFF]
	cmp	x10, x9
	b.ls	LBB0_3
; %bb.1:
	sub	x20, x9, #2
Lloh2:
	adrp	x9, _WSC_FLAGS_MF@GOTPAGE
Lloh3:
	ldr	x9, [x9, _WSC_FLAGS_MF@GOTPAGEOFF]
Lloh4:
	ldr	w22, [x9]
	cbnz	x8, LBB0_4
; %bb.2:
	ldr	w8, [x23]
	orr	w22, w8, w22
	sub	x20, x20, #2
	b	LBB0_4
LBB0_3:
	mov	w22, #0
LBB0_4:
	ldr	w8, [x23]
	tst	w8, w22
	mov	w8, #4
	mov	w9, #2
	csel	x8, x9, x8, eq
	add	x2, x8, x20
Lloh5:
	adrp	x8, _EAP_VENDOR_WFA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EAP_VENDOR_WFA@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _EAP_VENDOR_TYPE_WSC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EAP_VENDOR_TYPE_WSC@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _EAP_CODE_REQUEST@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EAP_CODE_REQUEST@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x4, x21
	bl	_eap_msg_alloc
	mov	x21, x0
	cbz	x0, LBB0_9
; %bb.5:
	ldr	w1, [x19, #12]
	mov	x0, x21
	bl	_wpabuf_put_u8
	mov	x0, x21
	mov	x1, x22
	bl	_wpabuf_put_u8
	ldr	w8, [x23]
	tst	w8, w22
	b.eq	LBB0_7
; %bb.6:
	ldr	x0, [x19, #16]
	bl	_wpabuf_len
	mov	x1, x0
	mov	x0, x21
	bl	_wpabuf_put_be16
LBB0_7:
	ldr	x0, [x19, #16]
	bl	_wpabuf_head_u8
	ldr	x8, [x19]
	add	x1, x8, x0
	mov	x0, x21
	mov	x2, x20
	bl	_wpabuf_put_data
	ldr	x8, [x19]
	add	x23, x8, x20
	str	x23, [x19]
	ldr	x0, [x19, #16]
	bl	_wpabuf_len
Lloh14:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh16:
	ldr	w22, [x8]
	cmp	x23, x0
	b.ne	LBB0_10
; %bb.8:
	str	x20, [sp]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_wpa_printf
	ldr	x0, [x19, #16]
	bl	_wpabuf_free
	str	xzr, [x19, #16]
	str	xzr, [x19]
Lloh19:
	adrp	x8, _MESG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MESG@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh21:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	b	LBB0_12
LBB0_10:
	ldr	x0, [x19, #16]
	bl	_wpabuf_len
	ldr	x8, [x19]
	sub	x8, x0, x8
	stp	x20, x8, [sp]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_wpa_printf
Lloh28:
	adrp	x8, _WAIT_FRAG_ACK@GOTPAGE
Lloh29:
	ldr	x8, [x8, _WAIT_FRAG_ACK@GOTPAGEOFF]
LBB0_11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_eap_wsc_state
LBB0_12:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_WSC_FLAGS_MF,4,2               ; @WSC_FLAGS_MF
	.comm	_WSC_FLAGS_LF,4,2               ; @WSC_FLAGS_LF
	.comm	_EAP_VENDOR_WFA,4,2             ; @EAP_VENDOR_WFA
	.comm	_EAP_VENDOR_TYPE_WSC,4,2        ; @EAP_VENDOR_TYPE_WSC
	.comm	_EAP_CODE_REQUEST,4,2           ; @EAP_CODE_REQUEST
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EAP-WSC: Failed to allocate memory for request"

	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"EAP-WSC: Sending out %lu bytes (message sent completely)"

	.comm	_MESG,4,2                       ; @MESG
l_.str.2:                               ; @.str.2
	.asciz	"EAP-WSC: Sending out %lu bytes (%lu more to send)"

	.comm	_WAIT_FRAG_ACK,4,2              ; @WAIT_FRAG_ACK
	.no_dead_strip	_eap_wsc_build_msg
.subsections_via_symbols
