	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_config_mad_demux          ## -- Begin function mlx4_config_mad_demux
	.p2align	4, 0x90
_mlx4_config_mad_demux:                 ## @mlx4_config_mad_demux
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_MLX4_DEV_CAP_FLAG2_MAD_DEMUX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r15
	callq	_mlx4_alloc_cmd_mailbox
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_mlx4_warn
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_4:
	movl	(%r14), %edx
	movq	_MLX4_CMD_MAD_DEMUX_QUERY_RESTR@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MLX4_CMD_MAD_DEMUX@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MLX4_CMD_TIME_CLASS_B@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movq	_MLX4_CMD_NATIVE@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$1, %ecx
	pushq	%rbx
	pushq	%rax
	callq	_mlx4_cmd_box
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_7:
	movq	%r13, %rbx
	movq	_MLX4_CMD_MAD_DEMUX@GOTPCREL(%rip), %r13
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_mlx4_check_smp_firewall_active
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_MLX4_FLAG_SECURE_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
LBB0_9:
	movl	(%r14), %esi
	movq	_MLX4_CMD_MAD_DEMUX_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r13), %r8d
	movl	(%r12), %r9d
	movl	(%rbx), %eax
	subq	$8, %rsp
	movq	%r15, %rdi
	movl	$1, %edx
	pushq	%rax
	callq	_mlx4_cmd
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
LBB0_6:
	movq	%r15, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_mlx4_warn
LBB0_14:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_mlx4_free_cmd_mailbox
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_MLX4_FLAG_SECURE_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_12
## %bb.13:
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_mlx4_warn
	jmp	LBB0_14
LBB0_12:
	xorl	%ebx, %ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_DEV_CAP_FLAG2_MAD_DEMUX,4,2 ## @MLX4_DEV_CAP_FLAG2_MAD_DEMUX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate mailbox for cmd MAD_DEMUX"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MLX4_CMD_MAD_DEMUX_QUERY_RESTR,4,2 ## @MLX4_CMD_MAD_DEMUX_QUERY_RESTR
	.comm	_MLX4_CMD_MAD_DEMUX,4,2         ## @MLX4_CMD_MAD_DEMUX
	.comm	_MLX4_CMD_TIME_CLASS_B,4,2      ## @MLX4_CMD_TIME_CLASS_B
	.comm	_MLX4_CMD_NATIVE,4,2            ## @MLX4_CMD_NATIVE
L_.str.1:                               ## @.str.1
	.asciz	"MLX4_CMD_MAD_DEMUX: query restrictions failed (%d)\n"

	.comm	_MLX4_FLAG_SECURE_HOST,4,2      ## @MLX4_FLAG_SECURE_HOST
	.comm	_MLX4_CMD_MAD_DEMUX_CONFIG,4,2  ## @MLX4_CMD_MAD_DEMUX_CONFIG
L_.str.2:                               ## @.str.2
	.asciz	"MLX4_CMD_MAD_DEMUX: configure failed (%d)\n"

L_.str.3:                               ## @.str.3
	.asciz	"HCA operating in secure-host mode. SMP firewall activated.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_config_mad_demux          ; -- Begin function mlx4_config_mad_demux
	.p2align	2
_mlx4_config_mad_demux:                 ; @mlx4_config_mad_demux
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w8, [x0, #4]
Lloh0:
	adrp	x9, _MLX4_DEV_CAP_FLAG2_MAD_DEMUX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX4_DEV_CAP_FLAG2_MAD_DEMUX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	mov	x19, x0
	bl	_mlx4_alloc_cmd_mailbox
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mlx4_warn
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_14
LBB0_3:
	mov	w21, #0
	b	LBB0_14
LBB0_4:
	ldr	w2, [x20]
Lloh8:
	adrp	x8, _MLX4_CMD_MAD_DEMUX_QUERY_RESTR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MLX4_CMD_MAD_DEMUX_QUERY_RESTR@GOTPAGEOFF]
Lloh10:
	ldr	w4, [x8]
Lloh11:
	adrp	x22, _MLX4_CMD_MAD_DEMUX@GOTPAGE
Lloh12:
	ldr	x22, [x22, _MLX4_CMD_MAD_DEMUX@GOTPAGEOFF]
	ldr	w5, [x22]
Lloh13:
	adrp	x23, _MLX4_CMD_TIME_CLASS_B@GOTPAGE
Lloh14:
	ldr	x23, [x23, _MLX4_CMD_TIME_CLASS_B@GOTPAGEOFF]
	ldr	w6, [x23]
Lloh15:
	adrp	x24, _MLX4_CMD_NATIVE@GOTPAGE
Lloh16:
	ldr	x24, [x24, _MLX4_CMD_NATIVE@GOTPAGEOFF]
	ldr	w7, [x24]
	mov	x0, x19
	mov	w1, #0
	mov	w3, #1
	bl	_mlx4_cmd_box
	cbz	w0, LBB0_6
; %bb.5:
	mov	x21, x0
	str	x21, [sp]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mlx4_warn
	b	LBB0_13
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	bl	_mlx4_check_smp_firewall_active
	cbz	x0, LBB0_8
; %bb.7:
Lloh19:
	adrp	x8, _MLX4_FLAG_SECURE_HOST@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MLX4_FLAG_SECURE_HOST@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_8:
	ldr	w1, [x20]
Lloh22:
	adrp	x8, _MLX4_CMD_MAD_DEMUX_CONFIG@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MLX4_CMD_MAD_DEMUX_CONFIG@GOTPAGEOFF]
Lloh24:
	ldr	w3, [x8]
	ldr	w4, [x22]
	ldr	w5, [x23]
	ldr	w6, [x24]
	mov	x0, x19
	mov	w2, #1
	bl	_mlx4_cmd
	cbz	w0, LBB0_10
; %bb.9:
	mov	x21, x0
	str	x21, [sp]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_mlx4_warn
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_13
LBB0_10:
	ldr	w8, [x19]
Lloh27:
	adrp	x9, _MLX4_FLAG_SECURE_HOST@GOTPAGE
Lloh28:
	ldr	x9, [x9, _MLX4_FLAG_SECURE_HOST@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_mlx4_warn
LBB0_12:
	mov	w21, #0
LBB0_13:
	mov	x0, x19
	mov	x1, x20
	bl	_mlx4_free_cmd_mailbox
LBB0_14:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_DEV_CAP_FLAG2_MAD_DEMUX,4,2 ; @MLX4_DEV_CAP_FLAG2_MAD_DEMUX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate mailbox for cmd MAD_DEMUX"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MLX4_CMD_MAD_DEMUX_QUERY_RESTR,4,2 ; @MLX4_CMD_MAD_DEMUX_QUERY_RESTR
	.comm	_MLX4_CMD_MAD_DEMUX,4,2         ; @MLX4_CMD_MAD_DEMUX
	.comm	_MLX4_CMD_TIME_CLASS_B,4,2      ; @MLX4_CMD_TIME_CLASS_B
	.comm	_MLX4_CMD_NATIVE,4,2            ; @MLX4_CMD_NATIVE
l_.str.1:                               ; @.str.1
	.asciz	"MLX4_CMD_MAD_DEMUX: query restrictions failed (%d)\n"

	.comm	_MLX4_FLAG_SECURE_HOST,4,2      ; @MLX4_FLAG_SECURE_HOST
	.comm	_MLX4_CMD_MAD_DEMUX_CONFIG,4,2  ; @MLX4_CMD_MAD_DEMUX_CONFIG
l_.str.2:                               ; @.str.2
	.asciz	"MLX4_CMD_MAD_DEMUX: configure failed (%d)\n"

l_.str.3:                               ; @.str.3
	.asciz	"HCA operating in secure-host mode. SMP firewall activated.\n"

.subsections_via_symbols
