	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pismo_add_one
_pismo_add_one:                         ## @pismo_add_one
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, %r12d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%ecx, -64(%rbp)
	movl	(%rdx), %r13d
	movl	%r13d, -88(%rbp)
	movl	8(%rdx), %edi
	callq	_pismo_width_to_bytes
	movq	%rax, %r15
	movq	%rax, -80(%rbp)
	movl	16(%rbx), %edi
	callq	_le16_to_cpu
	movl	%eax, %r14d
	movl	%eax, -68(%rbp)
	movl	12(%rbx), %edi
	callq	_le32_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, -72(%rbp)
	testq	%r15, %r15
	je	LBB0_6
## %bb.1:
	movl	4(%rbx), %ecx
	leal	1023(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$10, %edx
	movl	%edx, (%rsp)
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	movl	%r13d, %r8d
	movl	%r14d, %r9d
	callq	_dev_info
	cmpl	$3, %r13d
	je	LBB0_4
## %bb.2:
	cmpl	$2, %r13d
	jne	LBB0_5
## %bb.3:
	leaq	-88(%rbp), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	callq	_pismo_add_nor
	jmp	LBB0_5
LBB0_6:
	movl	8(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_4:
	leaq	-88(%rbp), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	callq	_pismo_add_sram
LBB0_5:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cs%u: bad width: %02x, ignoring\n"

L_.str.1:                               ## @.str.1
	.asciz	"cs%u: %.32s: type %02x access %u00ps size %uK\n"

	.no_dead_strip	_pismo_add_one
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pismo_add_one
_pismo_add_one:                         ; @pismo_add_one
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x23, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x22, [x0]
	ldr	w21, [x2]
	str	w3, [sp, #24]
	str	w21, [sp]
	ldr	w0, [x2, #8]
	bl	_pismo_width_to_bytes
	mov	x25, x0
	str	x0, [sp, #8]
	ldr	w0, [x23, #16]
	bl	_le16_to_cpu
	mov	x24, x0
	str	w0, [sp, #20]
	ldr	w0, [x23, #12]
	bl	_le32_to_cpu
	str	w0, [sp, #16]
	cbz	x25, LBB0_4
; %bb.1:
	ldr	w3, [x23, #4]
	add	w8, w0, #1023
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w6, w8, #10
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x2, x19
	mov	x4, x21
	mov	x5, x24
	bl	_dev_info
	cmp	w21, #3
	b.eq	LBB0_5
; %bb.2:
	cmp	w21, #2
	b.ne	LBB0_6
; %bb.3:
	mov	x2, sp
	mov	x0, x20
	mov	x1, x19
	bl	_pismo_add_nor
	b	LBB0_6
LBB0_4:
	ldr	w3, [x23, #8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_dev_err
LBB0_5:
	mov	x2, sp
	mov	x0, x20
	mov	x1, x19
	bl	_pismo_add_sram
LBB0_6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cs%u: bad width: %02x, ignoring\n"

l_.str.1:                               ; @.str.1
	.asciz	"cs%u: %.32s: type %02x access %u00ps size %uK\n"

	.no_dead_strip	_pismo_add_one
.subsections_via_symbols
