	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath5k_hw_set_opmode            ## -- Begin function ath5k_hw_set_opmode
	.p2align	4, 0x90
_ath5k_hw_set_opmode:                   ## @ath5k_hw_set_opmode
	.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	%esi, %ebx
	movq	%rdi, %r15
	callq	_ath5k_hw_common
	movq	%rax, %r14
	movq	_ATH5K_DEBUG_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%ebx, %ecx
	callq	_ATH5K_DBG
	movq	_AR5K_STA_ID1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ath5k_hw_reg_read
	movl	%eax, %r13d
	movq	(%r15), %r8
	movq	_AR5K_AR5210@GOTPCREL(%rip), %rax
	movq	(%rax), %r10
	movq	_AR5K_STA_ID1_PWR_SV@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_AR5K_STA_ID1_NO_PSPOLL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %eax
	orl	%r9d, %eax
	xorl	%r12d, %r12d
	cmpq	%r10, %r8
	cmovnel	%r12d, %eax
	addl	$-128, %ebx
	cmpl	$4, %ebx
	ja	LBB0_6
## %bb.1:
	movq	_AR5K_STA_ID1_ADHOC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r11d
	movq	_AR5K_STA_ID1_AP@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movq	_AR5K_STA_ID1_KEYSRCH_MODE@GOTPCREL(%rip), %rdi
	movl	(%rdi), %ecx
	movl	%ecx, %edi
	orl	%esi, %edi
	orl	%r11d, %edi
	orl	%eax, %edi
	notl	%edi
	andl	%edi, %r13d
	andl	$-65536, %r13d                  ## imm = 0xFFFF0000
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rdi
	addq	%rax, %rdi
	jmpq	*%rdi
LBB0_2:
	orl	%ecx, %r13d
	orl	%esi, %r13d
	movq	_AR5K_BCR_AP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpq	%r10, %r8
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	je	LBB0_5
## %bb.9:
	movq	_AR5K_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR5K_CFG_IBSS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_AR5K_REG_DISABLE_BITS
	jmp	LBB0_11
LBB0_4:
	orl	%ecx, %r13d
	orl	%r11d, %r13d
	movq	_AR5K_BCR_ADHOC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpq	%r10, %r8
	jne	LBB0_10
LBB0_5:
	orl	%edx, %r13d
	jmp	LBB0_11
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_13
LBB0_7:
	xorl	%eax, %eax
	cmpq	%r10, %r8
	cmovel	%r9d, %eax
	orl	%ecx, %r13d
	orl	%eax, %r13d
LBB0_8:
	xorl	%eax, %eax
	cmpq	%r10, %r8
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	cmovnel	%eax, %edx
	orl	%ecx, %edx
	orl	%edx, %r13d
	jmp	LBB0_11
LBB0_10:
	movq	_AR5K_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR5K_CFG_IBSS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_AR5K_REG_ENABLE_BITS
LBB0_11:
	movq	(%r14), %rdi
	callq	_get_unaligned_le32
	movl	%eax, %r12d
	movq	(%r14), %rdi
	addq	$4, %rdi
	callq	_get_unaligned_le16
	movl	%eax, %ebx
	movq	_AR5K_STA_ID0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_ath5k_hw_reg_write
	orl	%r13d, %ebx
	movq	_AR5K_STA_ID1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_ath5k_hw_reg_write
	movq	(%r15), %rax
	xorl	%r12d, %r12d
	movq	_AR5K_AR5210@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:
	movq	_AR5K_BCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_ath5k_hw_reg_write
LBB0_13:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_4
	.end_data_region
                                        ## -- End function
	.comm	_ATH5K_DEBUG_MODE,4,2           ## @ATH5K_DEBUG_MODE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mode %d\n"

	.comm	_AR5K_STA_ID1,4,2               ## @AR5K_STA_ID1
	.comm	_AR5K_STA_ID1_ADHOC,4,2         ## @AR5K_STA_ID1_ADHOC
	.comm	_AR5K_STA_ID1_AP,4,2            ## @AR5K_STA_ID1_AP
	.comm	_AR5K_STA_ID1_KEYSRCH_MODE,4,2  ## @AR5K_STA_ID1_KEYSRCH_MODE
	.comm	_AR5K_AR5210,8,3                ## @AR5K_AR5210
	.comm	_AR5K_STA_ID1_PWR_SV,4,2        ## @AR5K_STA_ID1_PWR_SV
	.comm	_AR5K_STA_ID1_NO_PSPOLL,4,2     ## @AR5K_STA_ID1_NO_PSPOLL
	.comm	_AR5K_BCR_ADHOC,4,2             ## @AR5K_BCR_ADHOC
	.comm	_AR5K_CFG,4,2                   ## @AR5K_CFG
	.comm	_AR5K_CFG_IBSS,4,2              ## @AR5K_CFG_IBSS
	.comm	_AR5K_BCR_AP,4,2                ## @AR5K_BCR_AP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AR5K_STA_ID0,4,2               ## @AR5K_STA_ID0
	.comm	_AR5K_BCR,4,2                   ## @AR5K_BCR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath5k_hw_set_opmode            ; -- Begin function ath5k_hw_set_opmode
	.p2align	2
_ath5k_hw_set_opmode:                   ; @ath5k_hw_set_opmode
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x19, x0
	bl	_ath5k_hw_common
	mov	x20, x0
Lloh0:
	adrp	x8, _ATH5K_DEBUG_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH5K_DEBUG_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	bl	_ATH5K_DBG
Lloh5:
	adrp	x23, _AR5K_STA_ID1@GOTPAGE
Lloh6:
	ldr	x23, [x23, _AR5K_STA_ID1@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_ath5k_hw_reg_read
	ldr	x9, [x19]
Lloh7:
	adrp	x24, _AR5K_AR5210@GOTPAGE
Lloh8:
	ldr	x24, [x24, _AR5K_AR5210@GOTPAGEOFF]
	ldr	x10, [x24]
Lloh9:
	adrp	x8, _AR5K_STA_ID1_PWR_SV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AR5K_STA_ID1_PWR_SV@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x8]
Lloh12:
	adrp	x8, _AR5K_STA_ID1_NO_PSPOLL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AR5K_STA_ID1_NO_PSPOLL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w12, w8, w11
	cmp	x9, x10
	csel	w13, w12, wzr, eq
	sub	w14, w21, #128
	cmp	w14, #4
	b.hi	LBB0_6
; %bb.1:
Lloh15:
	adrp	x12, _AR5K_STA_ID1_ADHOC@GOTPAGE
Lloh16:
	ldr	x12, [x12, _AR5K_STA_ID1_ADHOC@GOTPAGEOFF]
Lloh17:
	ldr	w15, [x12]
Lloh18:
	adrp	x12, _AR5K_STA_ID1_AP@GOTPAGE
Lloh19:
	ldr	x12, [x12, _AR5K_STA_ID1_AP@GOTPAGEOFF]
Lloh20:
	ldr	w16, [x12]
Lloh21:
	adrp	x12, _AR5K_STA_ID1_KEYSRCH_MODE@GOTPAGE
Lloh22:
	ldr	x12, [x12, _AR5K_STA_ID1_KEYSRCH_MODE@GOTPAGEOFF]
Lloh23:
	ldr	w12, [x12]
	orr	w17, w12, w16
	orr	w17, w17, w15
	orr	w13, w17, w13
	bic	w13, w0, w13
	and	w13, w13, #0xffff0000
Lloh24:
	adrp	x17, lJTI0_0@PAGE
Lloh25:
	add	x17, x17, lJTI0_0@PAGEOFF
	adr	x0, LBB0_2
	ldrb	w1, [x17, x14]
	add	x0, x0, x1, lsl #2
	br	x0
LBB0_2:
	orr	w11, w13, w12
	orr	w25, w11, w16
Lloh26:
	adrp	x11, _AR5K_BCR_AP@GOTPAGE
Lloh27:
	ldr	x11, [x11, _AR5K_BCR_AP@GOTPAGEOFF]
Lloh28:
	ldr	w21, [x11]
	cmp	x9, x10
	b.eq	LBB0_5
; %bb.3:
Lloh29:
	adrp	x8, _AR5K_CFG@GOTPAGE
Lloh30:
	ldr	x8, [x8, _AR5K_CFG@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	adrp	x8, _AR5K_CFG_IBSS@GOTPAGE
Lloh33:
	ldr	x8, [x8, _AR5K_CFG_IBSS@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_AR5K_REG_DISABLE_BITS
	b	LBB0_10
LBB0_4:
	orr	w11, w13, w12
	orr	w25, w11, w15
Lloh35:
	adrp	x11, _AR5K_BCR_ADHOC@GOTPAGE
Lloh36:
	ldr	x11, [x11, _AR5K_BCR_ADHOC@GOTPAGEOFF]
Lloh37:
	ldr	w21, [x11]
	cmp	x9, x10
	b.ne	LBB0_9
LBB0_5:
	orr	w25, w8, w25
	b	LBB0_10
LBB0_6:
Lloh38:
	adrp	x8, _EINVAL@GOTPAGE
Lloh39:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_7:
	cmp	x9, x10
	csel	w11, w11, wzr, eq
	orr	w13, w13, w12
	orr	w13, w13, w11
LBB0_8:
	mov	w21, #0
	cmp	x9, x10
	csel	w8, w8, wzr, eq
	orr	w8, w8, w12
	orr	w25, w8, w13
	b	LBB0_10
LBB0_9:
Lloh41:
	adrp	x8, _AR5K_CFG@GOTPAGE
Lloh42:
	ldr	x8, [x8, _AR5K_CFG@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
Lloh44:
	adrp	x8, _AR5K_CFG_IBSS@GOTPAGE
Lloh45:
	ldr	x8, [x8, _AR5K_CFG_IBSS@GOTPAGEOFF]
Lloh46:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_AR5K_REG_ENABLE_BITS
LBB0_10:
	ldr	x0, [x20]
	bl	_get_unaligned_le32
	mov	x22, x0
	ldr	x8, [x20]
	add	x0, x8, #4
	bl	_get_unaligned_le16
	mov	x20, x0
Lloh47:
	adrp	x8, _AR5K_STA_ID0@GOTPAGE
Lloh48:
	ldr	x8, [x8, _AR5K_STA_ID0@GOTPAGEOFF]
Lloh49:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x22
	bl	_ath5k_hw_reg_write
	orr	w1, w20, w25
	ldr	w2, [x23]
	mov	x0, x19
	bl	_ath5k_hw_reg_write
	ldr	x8, [x19]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.11:
Lloh50:
	adrp	x8, _AR5K_BCR@GOTPAGE
Lloh51:
	ldr	x8, [x8, _AR5K_BCR@GOTPAGEOFF]
Lloh52:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_ath5k_hw_reg_write
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
                                        ; -- End function
	.comm	_ATH5K_DEBUG_MODE,4,2           ; @ATH5K_DEBUG_MODE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mode %d\n"

	.comm	_AR5K_STA_ID1,4,2               ; @AR5K_STA_ID1
	.comm	_AR5K_STA_ID1_ADHOC,4,2         ; @AR5K_STA_ID1_ADHOC
	.comm	_AR5K_STA_ID1_AP,4,2            ; @AR5K_STA_ID1_AP
	.comm	_AR5K_STA_ID1_KEYSRCH_MODE,4,2  ; @AR5K_STA_ID1_KEYSRCH_MODE
	.comm	_AR5K_AR5210,8,3                ; @AR5K_AR5210
	.comm	_AR5K_STA_ID1_PWR_SV,4,2        ; @AR5K_STA_ID1_PWR_SV
	.comm	_AR5K_STA_ID1_NO_PSPOLL,4,2     ; @AR5K_STA_ID1_NO_PSPOLL
	.comm	_AR5K_BCR_ADHOC,4,2             ; @AR5K_BCR_ADHOC
	.comm	_AR5K_CFG,4,2                   ; @AR5K_CFG
	.comm	_AR5K_CFG_IBSS,4,2              ; @AR5K_CFG_IBSS
	.comm	_AR5K_BCR_AP,4,2                ; @AR5K_BCR_AP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AR5K_STA_ID0,4,2               ; @AR5K_STA_ID0
	.comm	_AR5K_BCR,4,2                   ; @AR5K_BCR
.subsections_via_symbols
