	.file	"extr_wifi.c_wifi_setmode.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Invalid mode"
	.text
	.p2align 4
	.type	wifi_setmode, @function
wifi_setmode:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	esi, 1
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	luaL_checkinteger@PLT
	cmp	DWORD PTR STATION_MODE[rip], eax
	mov	esi, 1
	mov	r12d, eax
	je	.L2
	cmp	DWORD PTR SOFTAP_MODE[rip], eax
	je	.L2
	cmp	DWORD PTR STATIONAP_MODE[rip], eax
	je	.L2
	xor	esi, esi
	cmp	DWORD PTR NULL_MODE[rip], eax
	sete	sil
.L2:
	mov	rdi, rbp
	lea	rcx, .LC0[rip]
	mov	edx, 1
	call	luaL_argcheck@PLT
	mov	esi, 2
	mov	rdi, rbp
	call	lua_isnoneornil@PLT
	test	eax, eax
	jne	.L6
	mov	esi, 2
	mov	rdi, rbp
	call	lua_isboolean@PLT
	test	eax, eax
	je	.L12
.L5:
	mov	esi, 2
	mov	rdi, rbp
	call	lua_toboolean@PLT
	test	eax, eax
	je	.L13
.L6:
	mov	edi, r12d
	call	wifi_set_opmode@PLT
.L4:
	xor	eax, eax
	call	wifi_get_opmode@PLT
	mov	rdi, rbp
	mov	rsi, rax
	call	lua_pushinteger@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, 1
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	edi, r12d
	call	wifi_set_opmode_current@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L12:
	mov	esi, DWORD PTR LUA_TBOOLEAN[rip]
	mov	rdi, rbp
	call	lua_typename@PLT
	mov	esi, 2
	mov	rdi, rbp
	mov	edx, eax
	call	luaL_typerror@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	wifi_setmode, .-wifi_setmode
	.comm	STATION_MODE,4,4
	.comm	STATIONAP_MODE,4,4
	.comm	SOFTAP_MODE,4,4
	.comm	NULL_MODE,4,4
	.comm	LUA_TBOOLEAN,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_wifi.c_wifi_setmode.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Invalid mode\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wifi_setmode, %function
wifi_setmode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r1, #1
	mov	r4, r0
	bl	luaL_checkinteger
	ldr	r3, .L14
	mov	r5, r0
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L9
	ldr	r3, .L14+4
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L9
	ldr	r3, .L14+8
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L9
	ldr	r3, .L14+12
	ldr	r1, [r3]
	sub	r1, r1, r0
	clz	r1, r1
	lsr	r1, r1, #5
	b	.L2
.L9:
	mov	r1, #1
.L2:
	mov	r2, #1
	ldr	r3, .L14+16
	mov	r0, r4
	bl	luaL_argcheck
	mov	r1, #2
	mov	r0, r4
	bl	lua_isnoneornil
	cmp	r0, #0
	bne	.L6
	mov	r1, #2
	mov	r0, r4
	bl	lua_isboolean
	cmp	r0, #0
	beq	.L12
.L5:
	mov	r1, #2
	mov	r0, r4
	bl	lua_toboolean
	cmp	r0, #0
	beq	.L13
.L6:
	mov	r0, r5
	bl	wifi_set_opmode
.L4:
	bl	wifi_get_opmode
	mov	r1, r0
	mov	r0, r4
	bl	lua_pushinteger
	mov	r0, #1
	pop	{r4, r5, r6, pc}
.L13:
	mov	r0, r5
	bl	wifi_set_opmode_current
	b	.L4
.L12:
	ldr	r3, .L14+20
	mov	r0, r4
	ldr	r1, [r3]
	bl	lua_typename
	mov	r1, #2
	mov	r2, r0
	mov	r0, r4
	bl	luaL_typerror
	b	.L5
.L15:
	.align	2
.L14:
	.word	STATION_MODE
	.word	SOFTAP_MODE
	.word	STATIONAP_MODE
	.word	NULL_MODE
	.word	.LC0
	.word	LUA_TBOOLEAN
	.size	wifi_setmode, .-wifi_setmode
	.comm	STATION_MODE,4,4
	.comm	STATIONAP_MODE,4,4
	.comm	SOFTAP_MODE,4,4
	.comm	NULL_MODE,4,4
	.comm	LUA_TBOOLEAN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
