	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eap_mschapv2_build_challenge
_eap_mschapv2_build_challenge:          ## @eap_mschapv2_build_challenge
	.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	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r14
	cmpl	$0, 4(%rsi)
	je	LBB0_1
LBB0_4:
	movq	_CHALLENGE_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movslq	(%r14), %rcx
	leaq	(%rax,%rcx), %r13
	addq	$13, %r13
	movq	_EAP_VENDOR_IETF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EAP_TYPE_MSCHAPV2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_EAP_CODE_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdx
	movl	%r12d, %r8d
	callq	_eap_msg_alloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %rbx
	movq	%rax, %rdi
	movl	$12, %esi
	callq	_wpabuf_put
	movq	_MSCHAPV2_OP_CHALLENGE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rax)
	movl	%r12d, 4(%rax)
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_WPA_PUT_BE16
	movq	_CHALLENGE_LEN@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_wpabuf_put_u8
	cmpl	$0, 4(%r15)
	je	LBB0_7
## %bb.8:
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_wpabuf_put
	jmp	LBB0_9
LBB0_1:
	movl	(%r15), %edi
	movq	_CHALLENGE_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_random_get_bytes
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_3
LBB0_5:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_3:
	callq	_wpa_printf
	movq	_FAILURE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_7:
	movl	(%r15), %esi
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_wpabuf_put_data
LBB0_9:
	movq	_MSG_MSGDUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %edx
	movl	(%r12), %ecx
	leaq	L_.str.2(%rip), %rsi
	callq	_wpa_hexdump
	movl	(%r14), %edx
	movl	4(%r14), %esi
	movq	%rbx, %rdi
	callq	_wpabuf_put_data
LBB0_10:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHALLENGE_LEN,4,2              ## @CHALLENGE_LEN
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EAP-MSCHAPV2: Failed to get random data"

	.comm	_FAILURE,8,3                    ## @FAILURE
	.comm	_EAP_VENDOR_IETF,4,2            ## @EAP_VENDOR_IETF
	.comm	_EAP_TYPE_MSCHAPV2,4,2          ## @EAP_TYPE_MSCHAPV2
	.comm	_EAP_CODE_REQUEST,4,2           ## @EAP_CODE_REQUEST
L_.str.1:                               ## @.str.1
	.asciz	"EAP-MSCHAPV2: Failed to allocate memory for request"

	.comm	_MSCHAPV2_OP_CHALLENGE,4,2      ## @MSCHAPV2_OP_CHALLENGE
	.comm	_MSG_MSGDUMP,4,2                ## @MSG_MSGDUMP
L_.str.2:                               ## @.str.2
	.asciz	"EAP-MSCHAPV2: Challenge"

	.no_dead_strip	_eap_mschapv2_build_challenge
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eap_mschapv2_build_challenge
_eap_mschapv2_build_challenge:          ; @eap_mschapv2_build_challenge
	.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	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x1, #4]
Lloh0:
	adrp	x24, _CHALLENGE_LEN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _CHALLENGE_LEN@GOTPAGEOFF]
	cbz	w8, LBB0_4
LBB0_1:
	ldrsw	x8, [x24]
	ldrsw	x9, [x20]
	add	x8, x8, x9
	add	x23, x8, #13
Lloh2:
	adrp	x8, _EAP_VENDOR_IETF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EAP_VENDOR_IETF@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _EAP_TYPE_MSCHAPV2@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EAP_TYPE_MSCHAPV2@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _EAP_CODE_REQUEST@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EAP_CODE_REQUEST@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x2, x23
	mov	x4, x22
	bl	_eap_msg_alloc
	mov	x21, x0
	cbz	x0, LBB0_6
; %bb.2:
	mov	x0, x21
	mov	w1, #12
	bl	_wpabuf_put
Lloh11:
	adrp	x8, _MSCHAPV2_OP_CHALLENGE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MSCHAPV2_OP_CHALLENGE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	stp	w22, w8, [x0, #4]
	ldr	w0, [x0]
	mov	x1, x23
	bl	_WPA_PUT_BE16
	ldr	w1, [x24]
	mov	x0, x21
	bl	_wpabuf_put_u8
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_8
; %bb.3:
	ldr	w1, [x24]
	mov	x0, x21
	bl	_wpabuf_put
	b	LBB0_9
LBB0_4:
	ldr	w0, [x19]
	ldr	w1, [x24]
	bl	_random_get_bytes
	cbz	x0, LBB0_1
; %bb.5:
Lloh14:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	mov	x21, #0
	b	LBB0_7
LBB0_6:
Lloh19:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
LBB0_7:
Lloh24:
	adrp	x8, _FAILURE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _FAILURE@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	b	LBB0_10
LBB0_8:
	ldr	w1, [x19]
	ldr	w2, [x24]
	mov	x0, x21
	bl	_wpabuf_put_data
LBB0_9:
Lloh27:
	adrp	x8, _MSG_MSGDUMP@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MSG_MSGDUMP@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	ldr	w2, [x19]
	ldr	w3, [x24]
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_hexdump
	ldp	w2, w1, [x20]
	mov	x0, x21
	bl	_wpabuf_put_data
LBB0_10:
	mov	x0, x21
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_CHALLENGE_LEN,4,2              ; @CHALLENGE_LEN
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EAP-MSCHAPV2: Failed to get random data"

	.comm	_FAILURE,8,3                    ; @FAILURE
	.comm	_EAP_VENDOR_IETF,4,2            ; @EAP_VENDOR_IETF
	.comm	_EAP_TYPE_MSCHAPV2,4,2          ; @EAP_TYPE_MSCHAPV2
	.comm	_EAP_CODE_REQUEST,4,2           ; @EAP_CODE_REQUEST
l_.str.1:                               ; @.str.1
	.asciz	"EAP-MSCHAPV2: Failed to allocate memory for request"

	.comm	_MSCHAPV2_OP_CHALLENGE,4,2      ; @MSCHAPV2_OP_CHALLENGE
	.comm	_MSG_MSGDUMP,4,2                ; @MSG_MSGDUMP
l_.str.2:                               ; @.str.2
	.asciz	"EAP-MSCHAPV2: Challenge"

	.no_dead_strip	_eap_mschapv2_build_challenge
.subsections_via_symbols
