	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lbc_banks_enable
_lbc_banks_enable:                      ## @lbc_banks_enable
	.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, -48(%rbp)                 ## 8-byte Spill
	movq	_LBC_DEV_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_17
## %bb.1:
	movl	$28, %r15d
	xorl	%r12d, %r12d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_5 Depth=1
	orq	$4087, %rax                     ## imm = 0xFF7
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %r14d
	movl	4(%rcx), %r13d
	movl	%r12d, %edi
	movq	%rax, %rbx
	callq	_LBC85XX_OR
	movl	%r13d, %edi
	movl	%r14d, %esi
	movl	%eax, %edx
	movq	%rbx, %rcx
	callq	_bus_space_write_4
	movq	_LBC_DEV_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%r12
	movslq	%ecx, %rax
	addq	$40, %r15
	cmpq	%rax, %r12
	jge	LBB0_17
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	-28(%rax,%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-20(%rax,%r15), %rcx
	movl	-12(%rax,%r15), %edx
	cmpl	$8, %edx
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$32, %edx
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$16, %edx
	jne	LBB0_19
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$4096, %edx                     ## imm = 0x1000
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	$2048, %edx                     ## imm = 0x800
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	$6144, %edx                     ## imm = 0x1800
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	orq	%rdx, %rcx
	movl	-8(%rax,%r15), %edx
	movl	-4(%rax,%r15), %esi
	shll	$9, %edx
	movslq	%edx, %rdx
	orq	%rcx, %rdx
	shll	$8, %esi
	movslq	%esi, %rcx
	movl	(%rax,%r15), %esi
	shll	$5, %esi
	movslq	%esi, %rsi
	orq	%rcx, %rsi
	orq	%rdx, %rsi
	movl	4(%rax,%r15), %eax
	shll	$2, %eax
	movslq	%eax, %rbx
	orq	%rsi, %rbx
	orq	$1, %rbx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movl	(%r13), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	4(%r13), %r14d
	movl	%r12d, %edi
	callq	_LBC85XX_BR
	movl	%r14d, %edi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	movq	%rbx, %rcx
	callq	_bus_space_write_4
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_lbc_address_mask
	movq	8(%r13), %rcx
	movl	(%rcx,%r15), %ecx
	cmpl	$131, %ecx
	je	LBB0_2
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$132, %ecx
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	addl	$-128, %ecx
	cmpl	$3, %ecx
	jae	LBB0_3
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	orq	$1942, %rax                     ## imm = 0x796
	jmp	LBB0_3
LBB0_17:
	xorl	%ebx, %ebx
	jmp	LBB0_21
LBB0_18:
	leaq	L_.str(%rip), %rdi
	callq	_printf
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_19:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_20:
	movl	(%rax), %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_lbc_banks_unmap
LBB0_21:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LBC_DEV_MAX,4,2                ## @LBC_DEV_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"UPM mode not supported yet!"

	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.no_dead_strip	_lbc_banks_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lbc_banks_enable
_lbc_banks_enable:                      ; @lbc_banks_enable
	.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
Lloh0:
	adrp	x25, _LBC_DEV_MAX@GOTPAGE
Lloh1:
	ldr	x25, [x25, _LBC_DEV_MAX@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.1:
	mov	x19, x0
	mov	x26, #0
	mov	x20, #0
	mov	w27, #4087
	mov	w28, #1942
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	orr	x21, x21, x27
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldp	w23, w22, [x19]
	mov	x0, x20
	bl	_LBC85XX_OR
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	mov	x3, x21
	bl	_bus_space_write_4
	ldr	w8, [x25]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x20, x20, #1
	add	x26, x26, #40
	cmp	x20, w8, sxtw
	b.ge	LBB0_16
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	ldr	x21, [x9, x26]
	cbz	x21, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x9, x26
	ldr	x9, [x8, #8]
	ldr	w10, [x8, #16]
	cmp	w10, #8
	b.eq	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w10, #32
	b.eq	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w10, #16
	b.ne	LBB0_18
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w10, #4096
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w10, #2048
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w10, #6144
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	orr	x9, x9, x10
	ldp	w10, w11, [x8, #20]
	lsl	w10, w10, #9
	sxtw	x10, w10
	lsl	w11, w11, #8
	sxtw	x11, w11
	ldp	w12, w8, [x8, #28]
	lsl	w12, w12, #5
	sxtw	x12, w12
	lsl	w8, w8, #2
	sxtw	x8, w8
	orr	x9, x9, x10
	orr	x9, x9, x11
	orr	x9, x9, x12
	orr	x8, x9, x8
	orr	x22, x8, #0x1
	ldp	w24, w23, [x19]
	mov	x0, x20
	bl	_LBC85XX_BR
	mov	x2, x0
	mov	x0, x23
	mov	x1, x24
	mov	x3, x22
	bl	_bus_space_write_4
	mov	x0, x21
	bl	_lbc_address_mask
	mov	x21, x0
	ldr	x8, [x19, #8]
	add	x8, x8, x26
	ldr	w8, [x8, #28]
	cmp	w8, #131
	b.eq	LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, #132
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	sub	w8, w8, #128
	cmp	w8, #3
	b.hs	LBB0_3
	b	LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_5 Depth=1
	orr	x21, x21, x28
	b	LBB0_3
LBB0_16:
	mov	w20, #0
	b	LBB0_20
LBB0_17:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
Lloh4:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
	b	LBB0_19
LBB0_18:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_19:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_lbc_banks_unmap
LBB0_20:
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_LBC_DEV_MAX,4,2                ; @LBC_DEV_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"UPM mode not supported yet!"

	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.no_dead_strip	_lbc_banks_enable
.subsections_via_symbols
