	.file	"extr_sa_query.c_ib_sa_service_rec_query.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ib_sa_service_rec_query
	.type	ib_sa_service_rec_query, @function
ib_sa_service_rec_query:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, r9d
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, r8
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	mov	rdi, rsi
	lea	rsi, sa_client[rip]
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rcx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	ib_get_client_data@PLT
	mov	r8d, DWORD PTR ENODEV[rip]
	neg	r8d
	test	rax, rax
	je	.L1
	cmp	QWORD PTR IB_MGMT_METHOD_GET[rip], rbx
	je	.L4
	cmp	QWORD PTR IB_MGMT_METHOD_SET[rip], rbx
	je	.L4
	cmp	QWORD PTR IB_SA_METHOD_DELETE[rip], rbx
	je	.L4
	mov	r8d, DWORD PTR EINVAL[rip]
	neg	r8d
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	pop	rbx
	.cfi_def_cfa_offset 48
	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
.L4:
	.cfi_restore_state
	sub	r14, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	mov	edi, 56
	mov	esi, DWORD PTR 88[rsp]
	lea	r14, [rax+r14*8]
	mov	rax, QWORD PTR [r14]
	mov	QWORD PTR 8[rsp], rax
	call	kzalloc@PLT
	mov	r8d, DWORD PTR ENOMEM[rip]
	mov	r15, rax
	neg	r8d
	test	rax, rax
	je	.L1
	mov	QWORD PTR 40[rax], r14
	mov	esi, DWORD PTR 88[rsp]
	lea	r14, 8[rax]
	mov	rdi, r14
	call	alloc_mad@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L6
	mov	rdi, rbp
	call	ib_sa_client_get@PLT
	mov	rax, QWORD PTR 96[rsp]
	mov	QWORD PTR 8[r15], rbp
	mov	rdi, r14
	mov	rsi, QWORD PTR 8[rsp]
	mov	QWORD PTR [r15], rax
	mov	rax, QWORD PTR 104[rsp]
	mov	QWORD PTR 48[r15], rax
	mov	rax, QWORD PTR 32[r15]
	mov	rbp, QWORD PTR [rax]
	call	init_mad@PLT
	cmp	QWORD PTR 96[rsp], 0
	mov	eax, 0
	cmovne	rax, QWORD PTR ib_sa_service_rec_callback[rip]
	mov	edi, DWORD PTR IB_SA_ATTR_SERVICE_REC[rip]
	mov	QWORD PTR 24[r15], rax
	mov	eax, DWORD PTR ib_sa_service_rec_release[rip]
	mov	DWORD PTR 16[r15], eax
	mov	QWORD PTR 8[rbp], rbx
	call	cpu_to_be16@PLT
	mov	DWORD PTR 4[rbp], r13d
	mov	edi, DWORD PTR service_rec_table[rip]
	mov	DWORD PTR 16[rbp], eax
	mov	r13d, DWORD PTR 0[rbp]
	call	ARRAY_SIZE@PLT
	mov	edi, DWORD PTR service_rec_table[rip]
	mov	ecx, r13d
	mov	rdx, r12
	mov	esi, eax
	call	ib_pack@PLT
	mov	rax, QWORD PTR 112[rsp]
	mov	edx, DWORD PTR 88[rsp]
	mov	rdi, r14
	mov	rsi, QWORD PTR 80[rsp]
	mov	QWORD PTR [rax], r14
	call	send_mad@PLT
	mov	r8d, eax
	test	eax, eax
	jns	.L1
	mov	DWORD PTR 8[rsp], eax
	mov	rax, QWORD PTR 112[rsp]
	mov	rdi, QWORD PTR 8[r15]
	mov	QWORD PTR [rax], 0
	call	ib_sa_client_put@PLT
	mov	rdi, r14
	call	free_mad@PLT
	mov	r8d, DWORD PTR 8[rsp]
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, r15
	mov	DWORD PTR 8[rsp], r8d
	call	kfree@PLT
	mov	r8d, DWORD PTR 8[rsp]
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ib_sa_service_rec_query, .-ib_sa_service_rec_query
	.comm	service_rec_table,4,4
	.comm	sa_client,4,4
	.comm	ib_sa_service_rec_release,4,4
	.comm	ib_sa_service_rec_callback,8,8
	.comm	IB_SA_METHOD_DELETE,8,8
	.comm	IB_SA_ATTR_SERVICE_REC,4,4
	.comm	IB_MGMT_METHOD_SET,8,8
	.comm	IB_MGMT_METHOD_GET,8,8
	.comm	ENOMEM,4,4
	.comm	ENODEV,4,4
	.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_sa_query.c_ib_sa_service_rec_query.c"
	.text
	.align	2
	.global	ib_sa_service_rec_query
	.syntax unified
	.arm
	.fpu softvfp
	.type	ib_sa_service_rec_query, %function
ib_sa_service_rec_query:
	@ args = 28, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	mov	r0, r1
	ldr	r1, .L13
	mov	r4, r2
	mov	r6, r3
	bl	ib_get_client_data
	subs	r1, r0, #0
	beq	.L11
	ldr	r3, .L13+4
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L4
	ldr	r3, .L13+8
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L4
	ldr	r3, .L13+12
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L4
	ldr	r3, .L13+16
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	ldm	r1, {r2, r3}
	mov	r0, #28
	sub	r2, r4, r2
	ldr	r1, [sp, #44]
	ldr	r9, [r3, r2, lsl #2]
	add	r4, r3, r2, lsl #2
	bl	kzalloc
	subs	r7, r0, #0
	beq	.L12
	add	r8, r7, #4
	str	r4, [r7, #20]
	mov	r0, r8
	ldr	r1, [sp, #44]
	bl	alloc_mad
	subs	r4, r0, #0
	bne	.L6
	mov	r0, r5
	bl	ib_sa_client_get
	ldr	r2, [sp, #48]
	ldr	r3, [r7, #16]
	str	r2, [r7]
	ldr	r2, [sp, #52]
	mov	r1, r9
	str	r5, [r7, #4]
	str	r2, [r7, #24]
	mov	r0, r8
	ldr	r4, [r3]
	bl	init_mad
	ldr	r3, [sp, #48]
	ldr	r1, .L13+20
	cmp	r3, #0
	ldrne	r3, .L13+24
	ldreq	r3, [sp, #48]
	ldrne	r3, [r3]
	ldr	r2, .L13+28
	ldr	r1, [r1]
	ldr	r0, [r2]
	str	r1, [r7, #8]
	str	r3, [r7, #12]
	str	r6, [r4, #8]
	bl	cpu_to_be16
	ldr	r3, .L13+32
	str	r0, [r4, #12]
	ldr	r5, [r3]
	ldr	r3, [sp, #36]
	mov	r0, r5
	str	r3, [r4, #4]
	bl	ARRAY_SIZE
	ldr	r3, [r4]
	mov	r1, r0
	ldr	r2, [sp, #32]
	mov	r0, r5
	bl	ib_pack
	ldr	r3, [sp, #56]
	mov	r0, r8
	ldr	r2, [sp, #44]
	ldr	r1, [sp, #40]
	str	r8, [r3]
	bl	send_mad
	subs	r4, r0, #0
	bge	.L1
	mov	r3, #0
	ldr	r2, [sp, #56]
	ldr	r0, [r7, #4]
	str	r3, [r2]
	bl	ib_sa_client_put
	mov	r0, r8
	bl	free_mad
.L6:
	mov	r0, r7
	bl	kfree
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L12:
	ldr	r3, .L13+36
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	ldr	r3, .L13+40
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L14:
	.align	2
.L13:
	.word	sa_client
	.word	IB_MGMT_METHOD_GET
	.word	IB_MGMT_METHOD_SET
	.word	IB_SA_METHOD_DELETE
	.word	EINVAL
	.word	ib_sa_service_rec_release
	.word	ib_sa_service_rec_callback
	.word	IB_SA_ATTR_SERVICE_REC
	.word	service_rec_table
	.word	ENOMEM
	.word	ENODEV
	.size	ib_sa_service_rec_query, .-ib_sa_service_rec_query
	.comm	service_rec_table,4,4
	.comm	sa_client,4,4
	.comm	ib_sa_service_rec_release,4,4
	.comm	ib_sa_service_rec_callback,4,4
	.comm	IB_SA_METHOD_DELETE,4,4
	.comm	IB_SA_ATTR_SERVICE_REC,4,4
	.comm	IB_MGMT_METHOD_SET,4,4
	.comm	IB_MGMT_METHOD_GET,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
