	.file	"extr_zd_chip.c_set_beacon_interval.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	set_beacon_interval, @function
set_beacon_interval:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, edx
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	mutex_is_locked@PLT
	mov	edi, eax
	call	ZD_ASSERT@PLT
	test	ebp, ebp
	jle	.L2
	sal	ebx, 16
	cmp	r13d, 129
	je	.L3
	and	r13d, -3
	cmp	r13d, 128
	je	.L4
	or	ebp, ebx
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edx, DWORD PTR CR_BCN_INTERVAL[rip]
	mov	esi, ebp
	mov	rdi, r12
	call	zd_iowrite32_locked@PLT
	test	eax, eax
	je	.L10
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L11
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	lea	rbp, 4[rsp]
	mov	rdi, r12
	mov	rsi, rbp
	call	get_aw_pt_bi@PLT
	test	eax, eax
	jne	.L1
	mov	rsi, rbp
	mov	rdi, r12
	call	set_aw_pt_bi@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	or	ebx, DWORD PTR BCN_MODE_AP[rip]
	or	ebp, ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	or	ebx, DWORD PTR BCN_MODE_IBSS[rip]
	or	ebp, ebx
	jmp	.L2
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	set_beacon_interval, .-set_beacon_interval
	.comm	CR_BCN_INTERVAL,4,4
	.comm	BCN_MODE_IBSS,4,4
	.comm	BCN_MODE_AP,4,4
	.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_zd_chip.c_set_beacon_interval.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_beacon_interval, %function
set_beacon_interval:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r4, r1
	mov	r7, r3
	ldr	r3, .L12
	sub	sp, sp, #12
	mov	r5, r2
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r6, r0
	bl	mutex_is_locked
	bl	ZD_ASSERT
	cmp	r4, #0
	ble	.L2
	cmp	r7, #129
	lsl	r2, r5, #16
	beq	.L3
	bic	r7, r7, #2
	cmp	r7, #128
	beq	.L4
	orr	r4, r4, r2
.L2:
	ldr	r3, .L12+4
	mov	r1, r4
	mov	r0, r6
	ldr	r2, [r3]
	bl	zd_iowrite32_locked
	cmp	r0, #0
	beq	.L10
.L1:
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L10:
	mov	r1, sp
	mov	r0, r6
	bl	get_aw_pt_bi
	cmp	r0, #0
	bne	.L1
	mov	r1, sp
	mov	r0, r6
	bl	set_aw_pt_bi
	b	.L1
.L3:
	ldr	r3, .L12+8
	ldr	r5, [r3]
	orr	r2, r2, r5
	orr	r4, r4, r2
	b	.L2
.L4:
	ldr	r3, .L12+12
	ldr	r5, [r3]
	orr	r2, r2, r5
	orr	r4, r4, r2
	b	.L2
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	CR_BCN_INTERVAL
	.word	BCN_MODE_AP
	.word	BCN_MODE_IBSS
	.size	set_beacon_interval, .-set_beacon_interval
	.comm	CR_BCN_INTERVAL,4,4
	.comm	BCN_MODE_IBSS,4,4
	.comm	BCN_MODE_AP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
