	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43legacy_gpio_init
_b43legacy_gpio_init:                   ## @b43legacy_gpio_init
	.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
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movq	8(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_B43legacy_MMIO_MACCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %esi
	callq	_b43legacy_read32
	andl	$-49153, %eax                   ## imm = 0xFFFF3FFF
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_b43legacy_write32
	movq	_B43legacy_MMIO_GPIO_MASK@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_b43legacy_read16
	orl	$15, %eax
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_b43legacy_write16
	movq	(%r15), %rax
	movq	8(%rax), %rax
	cmpl	$17153, (%rax)                  ## imm = 0x4301
	movl	$127, %ecx
	movl	$31, %r13d
	cmovel	%ecx, %r13d
	movl	$111, %ecx
	movl	$15, %r12d
	cmovel	%ecx, %r12d
	movq	_B43legacy_BFL_PACTRL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 24(%rax)
	je	LBB0_2
## %bb.1:
	movl	(%r14), %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_b43legacy_read16
	orl	$512, %eax                      ## imm = 0x200
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_b43legacy_write16
	orl	$512, %r13d                     ## imm = 0x200
	orl	$512, %r12d                     ## imm = 0x200
LBB0_2:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %r14
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:
	movq	(%r15), %rax
	movl	%r13d, %ebx
	orl	$16, %ebx
	cmpl	$2, (%rax)
	cmovll	%r13d, %ebx
	movq	_B43legacy_GPIO_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_ssb_read32
	notl	%ebx
	andl	%eax, %ebx
	orl	%r12d, %ebx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_ssb_write32
LBB0_4:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_B43legacy_MMIO_MACCTL,4,2      ## @B43legacy_MMIO_MACCTL
	.comm	_B43legacy_MMIO_GPIO_MASK,4,2   ## @B43legacy_MMIO_GPIO_MASK
	.comm	_B43legacy_BFL_PACTRL,4,2       ## @B43legacy_BFL_PACTRL
	.comm	_B43legacy_GPIO_CONTROL,4,2     ## @B43legacy_GPIO_CONTROL
	.no_dead_strip	_b43legacy_gpio_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b43legacy_gpio_init
_b43legacy_gpio_init:                   ; @b43legacy_gpio_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x21, [x8, #8]
Lloh0:
	adrp	x8, _B43legacy_MMIO_MACCTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _B43legacy_MMIO_MACCTL@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	mov	x1, x20
	bl	_b43legacy_read32
	and	w2, w0, #0xffff3fff
	mov	x0, x19
	mov	x1, x20
	bl	_b43legacy_write32
Lloh3:
	adrp	x24, _B43legacy_MMIO_GPIO_MASK@GOTPAGE
Lloh4:
	ldr	x24, [x24, _B43legacy_MMIO_GPIO_MASK@GOTPAGEOFF]
	ldr	w20, [x24]
	mov	x0, x19
	mov	x1, x20
	bl	_b43legacy_read16
	orr	w2, w0, #0xf
	mov	x0, x19
	mov	x1, x20
	bl	_b43legacy_write16
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	ldr	w9, [x8]
	mov	w10, #17153
	mov	w11, #31
	mov	w12, #127
	cmp	w9, w10
	csel	w23, w12, w11, eq
	mov	w9, #15
	mov	w10, #111
	csel	w22, w10, w9, eq
	ldr	w8, [x8, #24]
Lloh5:
	adrp	x9, _B43legacy_BFL_PACTRL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _B43legacy_BFL_PACTRL@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w20, [x24]
	mov	x0, x19
	mov	x1, x20
	bl	_b43legacy_read16
	orr	w2, w0, #0x200
	mov	x0, x19
	mov	x1, x20
	bl	_b43legacy_write16
	orr	w23, w23, #0x200
	orr	w22, w22, #0x200
LBB0_2:
	ldr	x20, [x21, #8]
	cbz	x20, LBB0_4
; %bb.3:
	ldr	x8, [x19]
	ldr	w8, [x8]
	orr	w9, w23, #0x10
	cmp	w8, #1
	csel	w21, w9, w23, gt
Lloh8:
	adrp	x8, _B43legacy_GPIO_CONTROL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _B43legacy_GPIO_CONTROL@GOTPAGEOFF]
Lloh10:
	ldr	w19, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_ssb_read32
	bic	w8, w0, w21
	orr	w2, w8, w22
	mov	x0, x20
	mov	x1, x19
	bl	_ssb_write32
LBB0_4:
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_B43legacy_MMIO_MACCTL,4,2      ; @B43legacy_MMIO_MACCTL
	.comm	_B43legacy_MMIO_GPIO_MASK,4,2   ; @B43legacy_MMIO_GPIO_MASK
	.comm	_B43legacy_BFL_PACTRL,4,2       ; @B43legacy_BFL_PACTRL
	.comm	_B43legacy_GPIO_CONTROL,4,2     ; @B43legacy_GPIO_CONTROL
	.no_dead_strip	_b43legacy_gpio_init
.subsections_via_symbols
