	.file	"extr_hn_nvs.c_hn_nvs_conn_chim.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"chim gpadl conn failed: %d\n"
.LC1:
	.string	"no xact for nvs chim conn\n"
.LC2:
	.string	"exec nvs chim conn failed\n"
.LC3:
	.string	"nvs chim conn failed: %x\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC4:
	.string	"zero chimney sending buffer section size\n"
	.align 8
.LC5:
	.string	"misaligned chimney sending buffers, section size: %u\n"
	.align 8
.LC6:
	.string	"chimney sending sections are not properly aligned\n"
	.align 8
.LC7:
	.string	"discard %d chimney sending sections\n"
	.section	.rodata.str1.1
.LC8:
	.string	"chimney sending buffer %d/%d\n"
	.text
	.p2align 4
	.type	hn_nvs_conn_chim, @function
hn_nvs_conn_chim:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	rcx, 24[rdi]
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	esi, DWORD PTR 32[rdi]
	mov	edx, DWORD PTR HN_CHIM_SIZE[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	edi, DWORD PTR 36[rdi]
	call	vmbus_chan_gpadl_connect@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L25
	mov	edi, DWORD PTR 28[rbp]
	mov	esi, 12
	call	vmbus_xact_get@PLT
	mov	r13, rax
	test	rax, rax
	je	.L26
	mov	rdi, rax
	call	vmbus_xact_req_data@PLT
	mov	r8, rsp
	mov	ecx, 12
	mov	rsi, r13
	mov	rdx, rax
	mov	eax, DWORD PTR HN_NVS_TYPE_CHIM_CONN[rip]
	mov	r9d, DWORD PTR HN_NVS_TYPE_CHIM_CONNRESP[rip]
	mov	rdi, rbp
	mov	DWORD PTR 8[rdx], eax
	mov	eax, DWORD PTR 24[rbp]
	mov	DWORD PTR 4[rdx], eax
	mov	eax, DWORD PTR HN_NVS_CHIM_SIG[rip]
	mov	DWORD PTR [rdx], eax
	mov	QWORD PTR [rsp], 8
	call	hn_nvs_xact_execute@PLT
	test	rax, rax
	je	.L27
	mov	rdi, r13
	mov	r15d, DWORD PTR [rax]
	mov	r14d, DWORD PTR 4[rax]
	call	vmbus_xact_put@PLT
	cmp	DWORD PTR HN_NVS_STATUS_OK[rip], r15d
	jne	.L28
	test	r14d, r14d
	je	.L7
	test	r14b, 3
	jne	.L29
	mov	eax, DWORD PTR HN_CHIM_SIZE[rip]
	mov	DWORD PTR 0[rbp], r14d
	cdq
	idiv	r14d
	mov	DWORD PTR 4[rbp], eax
	mov	edi, eax
	test	edx, edx
	jne	.L30
.L12:
	mov	eax, edi
	mov	ecx, DWORD PTR LONG_BIT[rip]
	cdq
	idiv	ecx
	test	edx, edx
	jne	.L31
.L13:
	mov	eax, edi
	mov	esi, DWORD PTR M_DEVBUF[rip]
	xor	r12d, r12d
	cdq
	idiv	ecx
	mov	edx, DWORD PTR M_WAITOK[rip]
	or	edx, DWORD PTR M_ZERO[rip]
	mov	DWORD PTR 8[rbp], eax
	mov	edi, eax
	sal	edi, 2
	call	malloc@PLT
	mov	DWORD PTR 20[rbp], eax
	mov	eax, DWORD PTR HN_FLAG_CHIM_CONNECTED[rip]
	or	DWORD PTR 16[rbp], eax
	cmp	QWORD PTR bootverbose[rip], 0
	je	.L1
	mov	ecx, DWORD PTR 4[rbp]
	mov	edi, DWORD PTR 12[rbp]
	lea	rsi, .LC8[rip]
	xor	eax, eax
	mov	edx, DWORD PTR 0[rbp]
	call	if_printf@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	mov	edi, DWORD PTR 12[rbp]
	mov	edx, eax
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	if_printf@PLT
.L3:
	mov	rdi, rbp
	call	hn_nvs_disconn_chim@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L32
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	edi, DWORD PTR 12[rbp]
	lea	rsi, .LC4[rip]
	xor	eax, eax
	call	if_printf@PLT
.L10:
	mov	QWORD PTR 0[rbp], 0
	mov	eax, DWORD PTR HN_FLAG_CHIM_CONNECTED[rip]
	or	DWORD PTR 16[rbp], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L27:
	mov	edi, DWORD PTR 12[rbp]
	lea	rsi, .LC2[rip]
	call	if_printf@PLT
	mov	rdi, r13
	mov	r12d, DWORD PTR EIO[rip]
	call	vmbus_xact_put@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L28:
	mov	edi, DWORD PTR 12[rbp]
	mov	edx, r15d
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	if_printf@PLT
	mov	r12d, DWORD PTR EIO[rip]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L26:
	mov	edi, DWORD PTR 12[rbp]
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	if_printf@PLT
	mov	r12d, DWORD PTR ENXIO[rip]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L29:
	mov	edi, DWORD PTR 12[rbp]
	mov	edx, r14d
	lea	rsi, .LC5[rip]
	xor	eax, eax
	call	if_printf@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L31:
	mov	edi, DWORD PTR 12[rbp]
	lea	rsi, .LC7[rip]
	xor	eax, eax
	call	if_printf@PLT
	mov	edi, DWORD PTR 4[rbp]
	mov	ecx, DWORD PTR LONG_BIT[rip]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L30:
	mov	edi, DWORD PTR 12[rbp]
	lea	rsi, .LC6[rip]
	xor	eax, eax
	call	if_printf@PLT
	mov	edi, DWORD PTR 4[rbp]
	jmp	.L12
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	hn_nvs_conn_chim, .-hn_nvs_conn_chim
	.comm	bootverbose,8,8
	.comm	M_ZERO,4,4
	.comm	M_WAITOK,4,4
	.comm	M_DEVBUF,4,4
	.comm	LONG_BIT,4,4
	.comm	HN_NVS_TYPE_CHIM_CONNRESP,4,4
	.comm	HN_NVS_TYPE_CHIM_CONN,4,4
	.comm	HN_NVS_STATUS_OK,4,4
	.comm	HN_NVS_CHIM_SIG,4,4
	.comm	HN_FLAG_CHIM_CONNECTED,4,4
	.comm	HN_CHIM_SIZE,4,4
	.comm	ENXIO,4,4
	.comm	EIO,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_hn_nvs.c_hn_nvs_conn_chim.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"chim gpadl conn failed: %d\012\000"
	.align	2
.LC1:
	.ascii	"no xact for nvs chim conn\012\000"
	.align	2
.LC2:
	.ascii	"exec nvs chim conn failed\012\000"
	.align	2
.LC3:
	.ascii	"nvs chim conn failed: %x\012\000"
	.align	2
.LC4:
	.ascii	"zero chimney sending buffer section size\012\000"
	.align	2
.LC5:
	.ascii	"misaligned chimney sending buffers, section size: %"
	.ascii	"u\012\000"
	.global	__aeabi_idivmod
	.align	2
.LC6:
	.ascii	"chimney sending sections are not properly aligned\012"
	.ascii	"\000"
	.align	2
.LC7:
	.ascii	"discard %d chimney sending sections\012\000"
	.global	__aeabi_idiv
	.align	2
.LC8:
	.ascii	"chimney sending buffer %d/%d\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hn_nvs_conn_chim, %function
hn_nvs_conn_chim:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, .L33
	ldr	ip, .L33+4
	ldr	r1, [r0, #32]
	sub	sp, sp, #16
	add	r3, r0, #24
	mov	r4, r0
	ldr	r2, [r6]
	ldr	r0, [r0, #36]
	ldr	ip, [ip]
	str	ip, [sp, #12]
	mov	ip,#0
	bl	vmbus_chan_gpadl_connect
	subs	r5, r0, #0
	bne	.L25
	mov	r1, #12
	ldr	r0, [r4, #28]
	bl	vmbus_xact_get
	subs	r7, r0, #0
	beq	.L26
	bl	vmbus_xact_req_data
	mov	r2, r0
	mov	ip, #8
	ldr	r0, .L33+8
	ldr	r3, .L33+12
	ldr	r0, [r0]
	ldr	r1, .L33+16
	ldr	r3, [r3]
	ldr	r1, [r1]
	str	r0, [r2, #8]
	ldr	r0, [r4, #24]
	str	r3, [r2]
	add	r3, sp, ip
	str	r0, [r2, #4]
	str	r1, [sp, #4]
	str	r3, [sp]
	mov	r1, r7
	mov	r3, #12
	mov	r0, r4
	str	ip, [sp, #8]
	bl	hn_nvs_xact_execute
	subs	r3, r0, #0
	beq	.L27
	mov	r0, r7
	ldr	r8, [r3]
	ldr	r7, [r3, #4]
	bl	vmbus_xact_put
	ldr	r3, .L33+20
	ldr	r3, [r3]
	cmp	r3, r8
	bne	.L28
	cmp	r7, #0
	beq	.L7
	tst	r7, #3
	bne	.L29
	ldr	r0, [r6]
	mov	r1, r7
	str	r7, [r4]
	bl	__aeabi_idivmod
	cmp	r1, #0
	mov	r6, r0
	str	r0, [r4, #4]
	bne	.L30
.L12:
	ldr	r8, .L33+24
	mov	r0, r6
	ldr	r7, [r8]
	mov	r1, r7
	bl	__aeabi_idivmod
	subs	r2, r1, #0
	bne	.L31
.L13:
	mov	r1, r7
	mov	r0, r6
	bl	__aeabi_idiv
	ldr	r2, .L33+28
	ldr	r3, .L33+32
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, .L33+36
	orr	r2, r1, r2
	str	r0, [r4, #8]
	ldr	r1, [r3]
	lsl	r0, r0, #2
	bl	malloc
	ldr	r2, .L33+40
	ldr	r3, .L33+44
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, [r4, #16]
	cmp	r2, #0
	orr	r3, r3, r1
	moveq	r5, r2
	str	r0, [r4, #20]
	str	r3, [r4, #16]
	beq	.L1
	ldm	r4, {r2, r3}
	ldr	r0, [r4, #12]
	ldr	r1, .L33+48
	bl	if_printf
	b	.L1
.L25:
	mov	r2, r5
	ldr	r1, .L33+52
	ldr	r0, [r4, #12]
	bl	if_printf
.L3:
	mov	r0, r4
	bl	hn_nvs_disconn_chim
.L1:
	ldr	r3, .L33+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L32
	mov	r0, r5
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	ldr	r1, .L33+56
	ldr	r0, [r4, #12]
	bl	if_printf
.L10:
	mov	r2, #0
	ldr	r1, .L33+40
	ldr	r3, [r4, #16]
	ldr	r1, [r1]
	str	r2, [r4, #4]
	orr	r3, r3, r1
	str	r2, [r4]
	str	r3, [r4, #16]
	b	.L1
.L27:
	ldr	r1, .L33+60
	ldr	r0, [r4, #12]
	bl	if_printf
	ldr	r3, .L33+64
	mov	r0, r7
	ldr	r5, [r3]
	bl	vmbus_xact_put
	b	.L3
.L28:
	mov	r2, r8
	ldr	r1, .L33+68
	ldr	r0, [r4, #12]
	bl	if_printf
	ldr	r3, .L33+64
	ldr	r5, [r3]
	b	.L3
.L26:
	ldr	r1, .L33+72
	ldr	r0, [r4, #12]
	bl	if_printf
	ldr	r3, .L33+76
	ldr	r5, [r3]
	b	.L3
.L29:
	mov	r2, r7
	ldr	r1, .L33+80
	ldr	r0, [r4, #12]
	bl	if_printf
	b	.L10
.L31:
	ldr	r1, .L33+84
	ldr	r0, [r4, #12]
	bl	if_printf
	ldr	r7, [r8]
	ldr	r6, [r4, #4]
	b	.L13
.L30:
	ldr	r1, .L33+88
	ldr	r0, [r4, #12]
	bl	if_printf
	ldr	r6, [r4, #4]
	b	.L12
.L32:
	bl	__stack_chk_fail
.L34:
	.align	2
.L33:
	.word	HN_CHIM_SIZE
	.word	.LC9
	.word	HN_NVS_TYPE_CHIM_CONN
	.word	HN_NVS_CHIM_SIG
	.word	HN_NVS_TYPE_CHIM_CONNRESP
	.word	HN_NVS_STATUS_OK
	.word	LONG_BIT
	.word	M_WAITOK
	.word	M_ZERO
	.word	M_DEVBUF
	.word	HN_FLAG_CHIM_CONNECTED
	.word	bootverbose
	.word	.LC8
	.word	.LC0
	.word	.LC4
	.word	.LC2
	.word	EIO
	.word	.LC3
	.word	.LC1
	.word	ENXIO
	.word	.LC5
	.word	.LC7
	.word	.LC6
	.size	hn_nvs_conn_chim, .-hn_nvs_conn_chim
	.comm	bootverbose,4,4
	.comm	M_ZERO,4,4
	.comm	M_WAITOK,4,4
	.comm	M_DEVBUF,4,4
	.comm	LONG_BIT,4,4
	.comm	HN_NVS_TYPE_CHIM_CONNRESP,4,4
	.comm	HN_NVS_TYPE_CHIM_CONN,4,4
	.comm	HN_NVS_STATUS_OK,4,4
	.comm	HN_NVS_CHIM_SIG,4,4
	.comm	HN_FLAG_CHIM_CONNECTED,4,4
	.comm	HN_CHIM_SIZE,4,4
	.comm	ENXIO,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
