	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_query_device_ex           ## -- Begin function mlx4_query_device_ex
	.p2align	4, 0x90
_mlx4_query_device_ex:                  ## @mlx4_query_device_ex
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %rbx
	callq	_to_mctx
	movq	%rax, %r14
	movl	$0, -56(%rbp)
	movq	$0, -64(%rbp)
	leaq	-56(%rbp), %rax
	movl	$0, -48(%rbp)
	subq	$8, %rsp
	leaq	-52(%rbp), %r8
	leaq	-48(%rbp), %r9
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	%r12, %rcx
	pushq	$12
	pushq	$4
	pushq	%rax
	pushq	$4
	pushq	$4
	callq	_ibv_cmd_query_device_ex
	addq	$48, %rsp
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	_MLX4_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -64(%rbp)
	je	LBB0_3
## %bb.2:
	movl	-60(%rbp), %eax
	movl	%eax, 4(%r14)
	movl	$1, (%r14)
LBB0_3:
	movl	-52(%rbp), %r8d
	movzwl	%r8w, %r9d
	shrl	$16, %r8d
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
LBB0_4:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET,4,2 ## @MLX4_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d.%d.%03d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_query_device_ex           ; -- Begin function mlx4_query_device_ex
	.p2align	2
_mlx4_query_device_ex:                  ; @mlx4_query_device_ex
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x19, x2
	mov	x22, x1
	mov	x23, x0
	bl	_to_mctx
	mov	x20, x0
	str	wzr, [sp, #40]
	str	xzr, [sp, #32]
	add	x8, sp, #32
	add	x8, x8, #8
	str	wzr, [sp, #24]
	mov	x9, #4
	movk	x9, #12, lsl #32
	stp	x8, x9, [sp]
	add	x4, sp, #20
	add	x5, sp, #24
	mov	x0, x23
	mov	x1, x22
	mov	x2, x19
	mov	x3, x21
	mov	w6, #4
	mov	w7, #4
	bl	_ibv_cmd_query_device_ex
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	w8, [sp, #32]
Lloh0:
	adrp	x9, _MLX4_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX4_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	ldr	w8, [sp, #36]
	mov	w9, #1
	stp	w9, w8, [x20]
LBB0_3:
	ldr	w8, [sp, #20]
	lsr	w4, w8, #16
	and	w5, w8, #0xffff
	ldr	w0, [x19]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #4
	bl	_snprintf
LBB0_4:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET,4,2 ; @MLX4_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d.%d.%03d"

.subsections_via_symbols
