	.file	"extr_b53_common.c_b53_switch_register.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"found switch: %s, rev %i\n"
	.text
	.p2align 4
	.globl	b53_switch_register
	.type	b53_switch_register, @function
b53_switch_register:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rax, QWORD PTR 16[rdi]
	mov	rbp, rdi
	test	rax, rax
	je	.L11
	mov	edx, DWORD PTR 8[rax]
	mov	ecx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR 12[rdi], edx
	mov	DWORD PTR 24[rdi], ecx
	mov	DWORD PTR 4[rdi], eax
.L3:
	test	edx, edx
	jne	.L4
	mov	rdi, rbp
	call	b53_switch_detect@PLT
	test	rax, rax
	jne	.L12
.L4:
	mov	rdi, rbp
	call	b53_switch_init@PLT
	test	eax, eax
	je	.L13
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	esi, DWORD PTR 0[rbp]
	mov	edx, DWORD PTR 8[rbp]
	lea	rdi, .LC0[rip]
	call	pr_info@PLT
	mov	rdi, rbp
	xor	esi, esi
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	register_switch@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	edx, DWORD PTR 12[rdi]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	mov	eax, DWORD PTR EINVAL[rip]
	pop	rbp
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.cfi_endproc
.LFE0:
	.size	b53_switch_register, .-b53_switch_register
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_b53_common.c_b53_switch_register.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"found switch: %s, rev %i\012\000"
	.text
	.align	2
	.global	b53_switch_register
	.syntax unified
	.arm
	.fpu softvfp
	.type	b53_switch_register, %function
b53_switch_register:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0, #16]
	push	{r4, r5, r6, lr}
	cmp	r3, #0
	ldmibne	r3, {r1, r2}
	ldreq	r2, [r0, #12]
	ldrne	r3, [r3]
	strne	r2, [r0, #12]
	strne	r1, [r0, #20]
	strne	r3, [r0, #4]
	cmp	r2, #0
	mov	r4, r0
	bne	.L4
	bl	b53_switch_detect
	cmp	r0, #0
	bne	.L11
.L4:
	mov	r0, r4
	bl	b53_switch_init
	subs	r5, r0, #0
	beq	.L12
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L12:
	ldr	r1, [r4]
	ldr	r2, [r4, #8]
	ldr	r0, .L13
	bl	pr_info
	mov	r1, r5
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	b	register_switch
.L11:
	ldr	r3, .L13+4
	ldr	r0, [r3]
	rsb	r5, r0, #0
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L14:
	.align	2
.L13:
	.word	.LC0
	.word	EINVAL
	.size	b53_switch_register, .-b53_switch_register
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
