	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpphy_pr41573_workaround
_lpphy_pr41573_workaround:              ## @lpphy_pr41573_workaround
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$256, %edi                      ## imm = 0x100
	movl	$4, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_lpphy_read_tx_pctl_mode_from_hardware
	movl	(%r13), %r15d
	xorl	%eax, %eax
	cmpl	$2, (%rbx)
	movl	4(%r13), %r12d
	setl	%al
	leal	(%rax,%rax,2), %edi
	addl	$7, %edi
	movups	32(%r13), %xmm0
	movaps	%xmm0, -64(%rbp)                ## 16-byte Spill
	movl	$320, %esi                      ## imm = 0x140
	callq	_B43_LPTAB32
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	$256, %edx                      ## imm = 0x100
	movq	%r14, %rcx
	callq	_b43_lptab_read_bulk
	movq	%rbx, %rdi
	callq	_lpphy_table_init
	movq	%rbx, %rdi
	callq	_lpphy_baseband_init
	movq	%rbx, %rdi
	callq	_lpphy_tx_pctl_init
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_b43_lpphy_op_software_rfkill
	movq	_B43_LPPHY_TXPCTL_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_lpphy_set_tx_power_control
	xorl	%eax, %eax
	cmpl	$2, (%rbx)
	setl	%al
	leal	(%rax,%rax,2), %edi
	addl	$7, %edi
	movl	$320, %esi                      ## imm = 0x140
	callq	_B43_LPTAB32
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	$256, %edx                      ## imm = 0x100
	movq	%r14, %rcx
	callq	_b43_lptab_write_bulk
	movq	_B43_MMIO_CHANNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	24(%r13), %edx
	movq	%rbx, %rdi
	callq	_b43_write16
	movaps	-64(%rbp), %xmm0                ## 16-byte Reload
	movups	%xmm0, 32(%r13)
	movl	24(%r13), %esi
	movq	%rbx, %rdi
	callq	_lpphy_set_analog_filter
	cmpl	$-1, %r12d
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_lpphy_set_tx_power_by_index
LBB0_3:
	cmpq	$0, 16(%r13)
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_lpphy_set_rc_cap
LBB0_5:
	movl	8(%r13), %esi
	movq	%rbx, %rdi
	callq	_b43_lpphy_op_set_rx_antenna
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_lpphy_set_tx_power_control
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
LBB0_6:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_b43err                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PR41573 failed. Out of memory!\n"

	.comm	_B43_LPPHY_TXPCTL_OFF,4,2       ## @B43_LPPHY_TXPCTL_OFF
	.comm	_B43_MMIO_CHANNEL,4,2           ## @B43_MMIO_CHANNEL
	.no_dead_strip	_lpphy_pr41573_workaround
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpphy_pr41573_workaround
_lpphy_pr41573_workaround:              ; @lpphy_pr41573_workaround
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x23, [x0, #8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w0, #256
	mov	w1, #4
	bl	_kcalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_lpphy_read_tx_pctl_mode_from_hardware
	ldp	w21, w22, [x23]
	ldp	x25, x24, [x23, #32]
	ldr	w8, [x19]
	mov	w26, #7
	mov	w27, #10
	cmp	w8, #2
	csel	w0, w27, w26, lt
	mov	w1, #320
	bl	_B43_LPTAB32
	mov	x1, x0
	mov	x0, x19
	mov	w2, #256
	mov	x3, x20
	bl	_b43_lptab_read_bulk
	mov	x0, x19
	bl	_lpphy_table_init
	mov	x0, x19
	bl	_lpphy_baseband_init
	mov	x0, x19
	bl	_lpphy_tx_pctl_init
	mov	x0, x19
	mov	w1, #0
	bl	_b43_lpphy_op_software_rfkill
Lloh3:
	adrp	x8, _B43_LPPHY_TXPCTL_OFF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _B43_LPPHY_TXPCTL_OFF@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_lpphy_set_tx_power_control
	ldr	w8, [x19]
	cmp	w8, #2
	csel	w0, w27, w26, lt
	mov	w1, #320
	bl	_B43_LPTAB32
	mov	x1, x0
	mov	x0, x19
	mov	w2, #256
	mov	x3, x20
	bl	_b43_lptab_write_bulk
Lloh6:
	adrp	x8, _B43_MMIO_CHANNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _B43_MMIO_CHANNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w2, [x23, #24]
	mov	x0, x19
	bl	_b43_write16
	stp	x25, x24, [x23, #32]
	ldr	w1, [x23, #24]
	mov	x0, x19
	bl	_lpphy_set_analog_filter
	cmn	w22, #1
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x19
	mov	x1, x22
	bl	_lpphy_set_tx_power_by_index
LBB0_3:
	ldr	x8, [x23, #16]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_lpphy_set_rc_cap
LBB0_5:
	ldr	w1, [x23, #8]
	mov	x0, x19
	bl	_b43_lpphy_op_set_rx_antenna
	mov	x0, x19
	mov	x1, x21
	bl	_lpphy_set_tx_power_control
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_kfree
LBB0_6:
	ldr	w0, [x19, #16]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_b43err
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PR41573 failed. Out of memory!\n"

	.comm	_B43_LPPHY_TXPCTL_OFF,4,2       ; @B43_LPPHY_TXPCTL_OFF
	.comm	_B43_MMIO_CHANNEL,4,2           ; @B43_MMIO_CHANNEL
	.no_dead_strip	_lpphy_pr41573_workaround
.subsections_via_symbols
