	.file	"extr_wps_common.c_wps_generate_pin.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	wps_generate_pin
	.type	wps_generate_pin, @function
wps_generate_pin:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	esi, 4
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	rdi, 4[rsp]
	call	random_get_bytes@PLT
	test	rax, rax
	js	.L4
	mov	ebx, DWORD PTR 4[rsp]
	mov	rax, rbx
	imul	rbx, rbx, 1801439851
	shr	rbx, 54
	imul	ebx, ebx, 10000000
	sub	eax, ebx
	mov	ebx, eax
	mov	edi, eax
	mov	DWORD PTR 4[rsp], eax
	call	wps_pin_checksum@PLT
	lea	edx, [rbx+rbx*4]
	lea	eax, [rax+rdx*2]
	mov	DWORD PTR 0[rbp], eax
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L7
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	eax, -1
	jmp	.L1
.L7:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	wps_generate_pin, .-wps_generate_pin
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_wps_common.c_wps_generate_pin.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	wps_generate_pin
	.syntax unified
	.arm
	.fpu softvfp
	.type	wps_generate_pin, %function
wps_generate_pin:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r3, .L8
	sub	sp, sp, #12
	mov	r5, r0
	mov	r1, #4
	mov	r0, sp
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	random_get_bytes
	cmp	r0, #0
	blt	.L4
	ldr	r2, [sp]
	ldr	r4, .L8+4
	umull	r3, r4, r2, r4
	lsr	r4, r4, #22
	rsb	r3, r4, r4, lsl #5
	rsb	r3, r3, r3, lsl #6
	add	r4, r4, r3, lsl #3
	add	r4, r4, r4, lsl #2
	sub	r4, r2, r4, lsl #7
	mov	r0, r4
	str	r4, [sp]
	bl	wps_pin_checksum
	add	r4, r4, r4, lsl #2
	add	r4, r0, r4, lsl #1
	mov	r0, #0
	str	r4, [r5]
.L1:
	ldr	r3, .L8
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L7
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L4:
	mvn	r0, #0
	b	.L1
.L7:
	bl	__stack_chk_fail
.L9:
	.align	2
.L8:
	.word	.LC0
	.word	1801439851
	.size	wps_generate_pin, .-wps_generate_pin
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
