	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sae_set_group                  ## -- Begin function sae_set_group
	.p2align	4, 0x90
_sae_set_group:                         ## @sae_set_group
	.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	%esi, %ebx
	movq	%rdi, %r15
	movl	%esi, %edi
	xorl	%esi, %esi
	callq	_dragonfly_suitable_group
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	callq	_sae_clear_data
	movl	$64, %edi
	callq	_os_zalloc
	movq	%rax, 8(%r15)
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_12
## %bb.3:
	movq	%rax, %r12
	movl	%ebx, %edi
	callq	_crypto_ec_init
	movq	%rax, 56(%r12)
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	callq	_wpa_printf
	movl	%ebx, (%r15)
	movq	56(%r12), %rdi
	callq	_crypto_ec_prime_len
	movq	%rax, (%r12)
	movq	56(%r12), %rdi
	callq	_crypto_ec_get_prime
	movq	%rax, 48(%r12)
	movq	56(%r12), %rdi
	callq	_crypto_ec_order_len
	movq	%rax, 8(%r12)
	movq	56(%r12), %rdi
	callq	_crypto_ec_get_order
LBB0_10:
	movq	%rax, 24(%r12)
	xorl	%r14d, %r14d
	jmp	LBB0_12
LBB0_1:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_wpa_printf
	movl	$-1, %r14d
LBB0_12:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	%ebx, %edi
	callq	_dh_groups_get
	movq	%rax, 32(%r12)
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	callq	_wpa_printf
	movl	%ebx, (%r15)
	movq	32(%r12), %rax
	movq	(%rax), %rsi
	movq	%rsi, (%r12)
	movq	_SAE_MAX_PRIME_LEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rsi
	jg	LBB0_7
## %bb.8:
	movl	20(%rax), %edi
	callq	_crypto_bignum_init_set
	movq	%rax, 40(%r12)
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	movq	%rax, 48(%r12)
	movq	32(%r12), %rax
	movq	8(%rax), %rsi
	movq	%rsi, 8(%r12)
	movl	16(%rax), %edi
	callq	_crypto_bignum_init_set
	movq	%rax, 16(%r12)
	testq	%rax, %rax
	jne	LBB0_10
LBB0_7:
	movq	%r15, %rdi
	callq	_sae_clear_data
	jmp	LBB0_12
LBB0_11:
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edx
	callq	_wpa_printf
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SAE: Reject unsuitable group %d"

L_.str.1:                               ## @.str.1
	.asciz	"SAE: Selecting supported ECC group %d"

L_.str.2:                               ## @.str.2
	.asciz	"SAE: Selecting supported FFC group %d"

	.comm	_SAE_MAX_PRIME_LEN,8,3          ## @SAE_MAX_PRIME_LEN
L_.str.3:                               ## @.str.3
	.asciz	"SAE: Group %d not supported by the crypto library"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sae_set_group                  ; -- Begin function sae_set_group
	.p2align	2
_sae_set_group:                         ; @sae_set_group
	.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
	mov	x21, x1
	mov	x20, x0
	mov	x0, x1
	mov	w1, #0
	bl	_dragonfly_suitable_group
	cbz	w0, LBB0_5
; %bb.1:
	mov	x0, x20
	bl	_sae_clear_data
	mov	w0, #64
	bl	_os_zalloc
	str	x0, [x20, #8]
	cbz	x0, LBB0_7
; %bb.2:
	mov	x19, x0
	mov	x0, x21
	bl	_crypto_ec_init
	str	x0, [x19, #56]
	cbz	x0, LBB0_9
; %bb.3:
Lloh0:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_wpa_printf
	str	w21, [x20]
	ldr	x0, [x19, #56]
	bl	_crypto_ec_prime_len
	str	x0, [x19]
	ldr	x0, [x19, #56]
	bl	_crypto_ec_get_prime
	str	x0, [x19, #48]
	ldr	x0, [x19, #56]
	bl	_crypto_ec_order_len
	str	x0, [x19, #8]
	ldr	x0, [x19, #56]
	bl	_crypto_ec_get_order
LBB0_4:
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19, #24]
	b	LBB0_8
LBB0_5:
Lloh5:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
LBB0_6:
	mov	x2, x21
	bl	_wpa_printf
LBB0_7:
	mov	w0, #-1
LBB0_8:
	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_9:
	mov	x0, x21
	bl	_dh_groups_get
	mov	x8, x0
	str	x0, [x19, #32]
Lloh10:
	adrp	x9, _MSG_DEBUG@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MSG_DEBUG@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x9]
	cbz	x8, LBB0_14
; %bb.10:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x21
	bl	_wpa_printf
	str	w21, [x20]
	ldr	x8, [x19, #32]
	ldr	x1, [x8]
	str	x1, [x19]
Lloh15:
	adrp	x9, _SAE_MAX_PRIME_LEN@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SAE_MAX_PRIME_LEN@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x1, x9
	b.gt	LBB0_13
; %bb.11:
	ldr	w0, [x8, #20]
	bl	_crypto_bignum_init_set
	str	x0, [x19, #40]
	cbz	x0, LBB0_13
; %bb.12:
	str	x0, [x19, #48]
	ldr	x8, [x19, #32]
	ldr	x1, [x8, #8]
	str	x1, [x19, #8]
	ldr	w0, [x8, #16]
	bl	_crypto_bignum_init_set
	str	x0, [x19, #16]
	cbnz	x0, LBB0_4
LBB0_13:
	mov	x0, x20
	bl	_sae_clear_data
	b	LBB0_7
LBB0_14:
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SAE: Reject unsuitable group %d"

l_.str.1:                               ; @.str.1
	.asciz	"SAE: Selecting supported ECC group %d"

l_.str.2:                               ; @.str.2
	.asciz	"SAE: Selecting supported FFC group %d"

	.comm	_SAE_MAX_PRIME_LEN,8,3          ; @SAE_MAX_PRIME_LEN
l_.str.3:                               ; @.str.3
	.asciz	"SAE: Group %d not supported by the crypto library"

.subsections_via_symbols
