	.file	"extr_w1_ds2438.c_w1_ds2438_change_config_bit.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	w1_ds2438_change_config_bit, @function
w1_ds2438_change_config_bit:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR W1_DS2438_RETRIES[rip]
	test	eax, eax
	je	.L2
	mov	rbx, rdi
	mov	r14d, esi
	lea	ebp, -1[rax]
	mov	r12d, edx
	lea	r13, 12[rsp]
.L7:
	mov	rdi, rbx
	call	w1_reset_select_slave@PLT
	test	rax, rax
	jne	.L3
	mov	eax, DWORD PTR W1_DS2438_RECALL_MEMORY[rip]
	mov	edi, DWORD PTR [rbx]
	mov	edx, 2
	mov	rsi, r13
	mov	DWORD PTR 16[rsp], 0
	mov	DWORD PTR 12[rsp], eax
	call	w1_write_block@PLT
	mov	rdi, rbx
	call	w1_reset_select_slave@PLT
	test	rax, rax
	jne	.L3
	mov	eax, DWORD PTR W1_DS2438_READ_SCRATCH[rip]
	mov	edi, DWORD PTR [rbx]
	mov	edx, 2
	mov	rsi, r13
	mov	DWORD PTR 16[rsp], 0
	mov	DWORD PTR 12[rsp], eax
	call	w1_write_block@PLT
	mov	edi, DWORD PTR [rbx]
	call	w1_read_8@PLT
	test	r12d, r12d
	cmovne	r12d, r14d
	mov	edx, eax
	xor	r8d, r8d
	and	edx, r14d
	cmp	edx, r12d
	je	.L1
	xor	r14d, eax
	mov	eax, DWORD PTR W1_DS2438_RETRIES[rip]
	lea	ebp, -1[rax]
	test	eax, eax
	je	.L2
.L6:
	mov	rdi, rbx
	call	w1_reset_select_slave@PLT
	test	rax, rax
	jne	.L8
	mov	eax, DWORD PTR W1_DS2438_WRITE_SCRATCH[rip]
	mov	edi, DWORD PTR [rbx]
	mov	edx, 3
	mov	rsi, r13
	mov	DWORD PTR 16[rsp], 0
	mov	DWORD PTR 12[rsp], eax
	mov	DWORD PTR 20[rsp], r14d
	call	w1_write_block@PLT
	mov	rdi, rbx
	call	w1_reset_select_slave@PLT
	test	rax, rax
	je	.L20
.L8:
	sub	ebp, 1
	cmp	ebp, -1
	jne	.L6
.L2:
	mov	r8d, -1
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L21
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r8d
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	sub	ebp, 1
	cmp	ebp, -1
	jne	.L7
	mov	r8d, -1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	mov	eax, DWORD PTR W1_DS2438_COPY_SCRATCH[rip]
	mov	edi, DWORD PTR [rbx]
	mov	edx, 2
	mov	rsi, r13
	mov	DWORD PTR 16[rsp], 0
	mov	DWORD PTR 12[rsp], eax
	call	w1_write_block@PLT
	xor	r8d, r8d
	jmp	.L1
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	w1_ds2438_change_config_bit, .-w1_ds2438_change_config_bit
	.comm	W1_DS2438_WRITE_SCRATCH,4,4
	.comm	W1_DS2438_RETRIES,4,4
	.comm	W1_DS2438_RECALL_MEMORY,4,4
	.comm	W1_DS2438_READ_SCRATCH,4,4
	.comm	W1_DS2438_COPY_SCRATCH,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_w1_ds2438.c_w1_ds2438_change_config_bit.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	w1_ds2438_change_config_bit, %function
w1_ds2438_change_config_bit:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r9, .L21
	ldr	r3, .L21+4
	ldr	r6, [r9]
	sub	sp, sp, #16
	cmp	r6, #0
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	beq	.L2
	mov	r4, r0
	mov	r8, r1
	mov	r7, r2
	ldr	r10, .L21+8
	sub	r6, r6, #1
.L7:
	mov	r0, r4
	bl	w1_reset_select_slave
	cmp	r0, #0
	bne	.L3
	ldr	r3, [r10]
	mov	r2, #2
	mov	r1, sp
	str	r0, [sp, #4]
	ldr	r0, [r4]
	str	r3, [sp]
	bl	w1_write_block
	mov	r0, r4
	bl	w1_reset_select_slave
	subs	r5, r0, #0
	bne	.L3
	ldr	r3, .L21+12
	mov	r2, #2
	ldr	r3, [r3]
	mov	r1, sp
	ldr	r0, [r4]
	stm	sp, {r3, r5}
	bl	w1_write_block
	ldr	r0, [r4]
	bl	w1_read_8
	cmp	r7, #0
	movne	r7, r8
	and	r3, r0, r8
	cmp	r3, r7
	beq	.L1
	ldr	r6, [r9]
	eor	r8, r8, r0
	cmp	r6, #0
	sub	r6, r6, #1
	beq	.L2
	ldr	r7, .L21+16
.L6:
	mov	r0, r4
	bl	w1_reset_select_slave
	cmp	r0, #0
	bne	.L8
	ldr	r3, [r7]
	mov	r2, #3
	mov	r1, sp
	str	r0, [sp, #4]
	ldr	r0, [r4]
	str	r3, [sp]
	str	r8, [sp, #8]
	bl	w1_write_block
	mov	r0, r4
	bl	w1_reset_select_slave
	subs	r5, r0, #0
	beq	.L19
.L8:
	subs	r6, r6, #1
	bcs	.L6
.L2:
	mvn	r5, #0
.L1:
	ldr	r3, .L21+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	mov	r0, r5
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L3:
	subs	r6, r6, #1
	bcs	.L7
	mvn	r5, #0
	b	.L1
.L19:
	ldr	r3, .L21+20
	mov	r1, sp
	ldr	r3, [r3]
	mov	r2, #2
	ldr	r0, [r4]
	stm	sp, {r3, r5}
	bl	w1_write_block
	b	.L1
.L20:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	W1_DS2438_RETRIES
	.word	.LC0
	.word	W1_DS2438_RECALL_MEMORY
	.word	W1_DS2438_READ_SCRATCH
	.word	W1_DS2438_WRITE_SCRATCH
	.word	W1_DS2438_COPY_SCRATCH
	.size	w1_ds2438_change_config_bit, .-w1_ds2438_change_config_bit
	.comm	W1_DS2438_WRITE_SCRATCH,4,4
	.comm	W1_DS2438_RETRIES,4,4
	.comm	W1_DS2438_RECALL_MEMORY,4,4
	.comm	W1_DS2438_READ_SCRATCH,4,4
	.comm	W1_DS2438_COPY_SCRATCH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
