	.file	"extr_device.c_hl_device_set_debug_mode.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Failed to disable debug mode because device was not in debug mode\n"
	.align 8
.LC1:
	.string	"Failed to enable debug mode because device is already in debug mode\n"
	.text
	.p2align 4
	.globl	hl_device_set_debug_mode
	.type	hl_device_set_debug_mode, @function
hl_device_set_debug_mode:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	lea	r13, 4[rdi]
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	mov	rdi, r13
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	mutex_lock@PLT
	test	ebp, ebp
	jne	.L2
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	je	.L8
	mov	rax, QWORD PTR 16[rbx]
	mov	rdi, rbx
	xor	r12d, r12d
	call	[QWORD PTR [rax]]
	mov	DWORD PTR [rbx], 0
.L4:
	mov	rdi, r13
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	r12d, DWORD PTR [rbx]
	test	r12d, r12d
	jne	.L9
	mov	DWORD PTR [rbx], 1
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edi, DWORD PTR 8[rbx]
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	r12d, DWORD PTR EFAULT[rip]
	neg	r12d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edi, DWORD PTR 8[rbx]
	lea	rsi, .LC1[rip]
	call	dev_err@PLT
	mov	r12d, DWORD PTR EFAULT[rip]
	neg	r12d
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	hl_device_set_debug_mode, .-hl_device_set_debug_mode
	.comm	EFAULT,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_device.c_hl_device_set_debug_mode.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed to disable debug mode because device was not"
	.ascii	" in debug mode\012\000"
	.align	2
.LC1:
	.ascii	"Failed to enable debug mode because device is alrea"
	.ascii	"dy in debug mode\012\000"
	.text
	.align	2
	.global	hl_device_set_debug_mode
	.syntax unified
	.arm
	.fpu softvfp
	.type	hl_device_set_debug_mode, %function
hl_device_set_debug_mode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	add	r7, r0, #4
	mov	r4, r0
	mov	r0, r7
	bl	mutex_lock
	cmp	r5, #0
	bne	.L2
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L8
	mov	r6, r5
	ldr	r3, [r4, #12]
	mov	r0, r4
	ldr	r3, [r3]
	blx	r3
	str	r5, [r4]
.L4:
	mov	r0, r7
	bl	mutex_unlock
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r6, [r4]
	cmp	r6, #0
	moveq	r3, #1
	streq	r3, [r4]
	beq	.L4
	ldr	r0, [r4, #8]
	ldr	r1, .L9
	bl	dev_err
	ldr	r3, .L9+4
	ldr	r6, [r3]
	rsb	r6, r6, #0
	b	.L4
.L8:
	ldr	r0, [r4, #8]
	ldr	r1, .L9+8
	bl	dev_err
	ldr	r3, .L9+4
	ldr	r6, [r3]
	rsb	r6, r6, #0
	b	.L4
.L10:
	.align	2
.L9:
	.word	.LC1
	.word	EFAULT
	.word	.LC0
	.size	hl_device_set_debug_mode, .-hl_device_set_debug_mode
	.comm	EFAULT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
