	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BupGetDeviceList               ## -- Begin function BupGetDeviceList
	.p2align	4, 0x90
_BupGetDeviceList:                      ## @BupGetDeviceList
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_CartridgeArea@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	$240, %ecx
	andl	(%rax), %ecx
	xorl	%ebx, %ebx
	cmpl	$32, %ecx
	sete	%bl
	leal	8(,%rbx,8), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	incl	%ebx
	movl	%ebx, (%r14)
	movl	$0, (%rax)
	movl	4(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_sprintf
	movq	(%r15), %rax
	movl	(%rax), %ecx
	movl	%ecx, %eax
	andl	$240, %eax
	cmpl	$32, %eax
	jne	LBB0_4
## %bb.3:
	movl	$1, 8(%r12)
	movl	12(%r12), %edi
	andb	$15, %cl
	movl	$2, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_sprintf
	jmp	LBB0_4
LBB0_1:
	movl	$0, (%r14)
	xorl	%r12d, %r12d
LBB0_4:
	movq	%r12, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CartridgeArea,8,3              ## @CartridgeArea
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Internal Backup RAM"

L_.str.1:                               ## @.str.1
	.asciz	"%d Mbit Backup RAM Cartridge"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BupGetDeviceList               ; -- Begin function BupGetDeviceList
	.p2align	2
_BupGetDeviceList:                      ; @BupGetDeviceList
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
Lloh0:
	adrp	x21, _CartridgeArea@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CartridgeArea@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	w8, [x8]
	and	w8, w8, #0xf0
	cmp	w8, #32
	mov	w8, #1
	cinc	w22, w8, eq
	lsl	w0, w22, #3
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_3
; %bb.1:
	str	w22, [x20]
	str	wzr, [x19]
	ldr	w0, [x19, #4]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_sprintf
	ldr	x8, [x21]
	ldr	w8, [x8]
	and	w9, w8, #0xf0
	cmp	w9, #32
	b.ne	LBB0_4
; %bb.2:
	mov	w9, #1
	str	w9, [x19, #8]
	ldr	w0, [x19, #12]
	and	w8, w8, #0xf
	mov	w9, #2
	lsl	w8, w9, w8
	str	x8, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_sprintf
	b	LBB0_4
LBB0_3:
	str	wzr, [x20]
LBB0_4:
	mov	x0, x19
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_CartridgeArea,8,3              ; @CartridgeArea
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Internal Backup RAM"

l_.str.1:                               ; @.str.1
	.asciz	"%d Mbit Backup RAM Cartridge"

.subsections_via_symbols
