	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	$1048, %rsp                     ## imm = 0x418
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_IB_SMI_CLASS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -1080(%rbp)
	movq	_IB_SMI_DIRECT_CLASS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -1076(%rbp)
	movups	L_.str+64(%rip), %xmm0
	movaps	%xmm0, -1008(%rbp)
	movups	L_.str+48(%rip), %xmm0
	movaps	%xmm0, -1024(%rbp)
	movups	L_.str+32(%rip), %xmm0
	movaps	%xmm0, -1040(%rbp)
	movups	L_.str+16(%rip), %xmm0
	movaps	%xmm0, -1056(%rbp)
	movups	L_.str(%rip), %xmm0
	movaps	%xmm0, -1072(%rbp)
	movb	$0, -992(%rbp)
	movq	_traps@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_1
## %bb.2:
	movq	%r14, -1088(%rbp)               ## 8-byte Spill
	movl	$80, %ebx
	movl	$8, %r14d
	leaq	L_.str.1(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rbx,%rbp), %rdi
	addq	$-1072, %rdi                    ## imm = 0xFBD0
	movl	$1024, %esi                     ## imm = 0x400
	subl	%ebx, %esi
	movq	%r13, %rdx
	callq	_snprintf
	addq	%rbx, %rax
	testl	$-1024, %eax                    ## imm = 0xFC00
	jne	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	%eax, %rbx
	movq	(%r12), %rax
	movq	(%rax,%r14), %rcx
	addq	$8, %r14
	testq	%rcx, %rcx
	jne	LBB0_3
## %bb.5:
	movq	(%rax), %rcx
	movq	-1088(%rbp), %r14               ## 8-byte Reload
	jmp	LBB0_6
LBB0_1:
	movl	$80, %ebx
	xorl	%ecx, %ecx
LBB0_6:
	leaq	(%rbx,%rbp), %rdi
	addq	$-1072, %rdi                    ## imm = 0xFBD0
	movl	$1024, %esi                     ## imm = 0x400
	subl	%ebx, %esi
	leaq	L_.str.2(%rip), %rdx
	callq	_snprintf
	leaq	-1072(%rbp), %rax
	leaq	L_.str.3(%rip), %rcx
	movl	%r15d, %edi
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$0
	pushq	%rax
	callq	_ibdiag_process_opts
	addq	$16, %rsp
	movq	_optind@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	subl	%eax, %r15d
	movq	(%r14,%rax,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.8:
	cmpl	$2, %r15d
	jl	LBB0_10
LBB0_9:
	movq	8(%r14,%rax,8), %rdi
	callq	_atoi
	movq	_error_port@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_10:
	movl	$1, %edi
	callq	_madrpc_show_errors
	movq	_ibd_ca@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_ibd_ca_port@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-1080(%rbp), %rdx
	movl	$2, %ecx
	callq	_mad_rpc_open_port
	movq	_srcport@GOTPCREL(%rip), %r14
	movl	%eax, (%r14)
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movl	(%r15), %esi
	movl	(%r12), %edx
	leaq	L_.str.4(%rip), %rdi
	callq	_IBEXIT
	movl	(%r14), %eax
LBB0_12:
	movq	_ibd_mkey@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_smp_mkey_set
	movq	%rbx, %rdi
	callq	_process_send_trap
	movl	%eax, %ebx
	movl	(%r14), %edi
	callq	_mad_rpc_close_port
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.13:
	movl	%ebx, %eax
	addq	$1048, %rsp                     ## imm = 0x418
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	(%r12), %rcx
	movq	(%rcx), %rbx
	cmpl	$2, %r15d
	jge	LBB0_9
	jmp	LBB0_10
LBB0_14:
	movl	$-1, %edi
	callq	_exit
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_SMI_CLASS,4,2               ## @IB_SMI_CLASS
	.comm	_IB_SMI_DIRECT_CLASS,4,2        ## @IB_SMI_DIRECT_CLASS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[<trap_name>] [<error_port>]\n\nArgument <trap_name> can be one of the following:\n"

	.comm	_traps,8,3                      ## @traps
L_.str.1:                               ## @.str.1
	.asciz	"  %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"\n  default behavior is to send \"%s\""

L_.str.3:                               ## @.str.3
	.asciz	"DGKL"

	.comm	_optind,8,3                     ## @optind
	.comm	_error_port,4,2                 ## @error_port
	.comm	_ibd_ca,4,2                     ## @ibd_ca
	.comm	_ibd_ca_port,4,2                ## @ibd_ca_port
	.comm	_srcport,4,2                    ## @srcport
L_.str.4:                               ## @.str.4
	.asciz	"Failed to open '%s' port '%d'"

	.comm	_ibd_mkey,4,2                   ## @ibd_mkey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #1056
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _IB_SMI_CLASS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IB_SMI_CLASS@GOTPAGEOFF]
	stur	x8, [x29, #-88]
Lloh5:
	ldr	w8, [x9]
Lloh6:
	adrp	x9, _IB_SMI_DIRECT_CLASS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IB_SMI_DIRECT_CLASS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #8]
Lloh9:
	adrp	x8, l_.str@PAGE
Lloh10:
	add	x8, x8, l_.str@PAGEOFF
	ldr	q2, [x8, #64]
	ldp	q3, q0, [x8, #32]
	stp	q0, q2, [sp, #64]
	ldp	q0, q1, [x8]
	str	q0, [sp, #16]
	stp	q1, q3, [sp, #32]
	strb	wzr, [sp, #96]
Lloh11:
	adrp	x22, _traps@GOTPAGE
Lloh12:
	ldr	x22, [x22, _traps@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x3, [x8]
	cbz	x3, LBB0_5
; %bb.1:
	mov	w23, #80
	mov	w24, #8
	add	x25, sp, #16
	mov	w26, #1024
Lloh13:
	adrp	x21, l_.str.1@PAGE
Lloh14:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x25, x23
	sub	w1, w26, w23
	mov	x2, x21
	bl	_snprintf
	add	x8, x0, x23
	tst	x8, #0xfffffc00
	b.ne	LBB0_14
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sxtw	x23, w8
	ldr	x8, [x22]
	ldr	x3, [x8, x24]
	add	x24, x24, #8
	cbnz	x3, LBB0_2
; %bb.4:
	ldr	x3, [x8]
	b	LBB0_6
LBB0_5:
	mov	w23, #80
LBB0_6:
	add	x8, sp, #16
	add	x0, x8, x23
	mov	w8, #1024
	sub	w1, w8, w23
Lloh15:
	adrp	x2, l_.str.2@PAGE
Lloh16:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_snprintf
Lloh17:
	adrp	x3, l_.str.3@PAGE
Lloh18:
	add	x3, x3, l_.str.3@PAGEOFF
	add	x6, sp, #16
	mov	x0, x20
	mov	x1, x19
	mov	x2, #0
	mov	x4, #0
	mov	x5, #0
	mov	x7, #0
	bl	_ibdiag_process_opts
Lloh19:
	adrp	x8, _optind@GOTPAGE
Lloh20:
	ldr	x8, [x8, _optind@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	sub	w9, w20, w8
	add	x8, x19, x8, lsl #3
	ldr	x19, [x8]
	cbz	x19, LBB0_13
; %bb.7:
	cmp	w9, #2
	b.lt	LBB0_9
LBB0_8:
	ldr	x0, [x8, #8]
	bl	_atoi
Lloh22:
	adrp	x8, _error_port@GOTPAGE
Lloh23:
	ldr	x8, [x8, _error_port@GOTPAGEOFF]
Lloh24:
	str	w0, [x8]
LBB0_9:
	mov	w0, #1
	bl	_madrpc_show_errors
Lloh25:
	adrp	x21, _ibd_ca@GOTPAGE
Lloh26:
	ldr	x21, [x21, _ibd_ca@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh27:
	adrp	x22, _ibd_ca_port@GOTPAGE
Lloh28:
	ldr	x22, [x22, _ibd_ca_port@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #8
	mov	w3, #2
	bl	_mad_rpc_open_port
Lloh29:
	adrp	x20, _srcport@GOTPAGE
Lloh30:
	ldr	x20, [x20, _srcport@GOTPAGEOFF]
	str	w0, [x20]
	cbnz	w0, LBB0_11
; %bb.10:
	ldr	w1, [x21]
	ldr	w2, [x22]
Lloh31:
	adrp	x0, l_.str.4@PAGE
Lloh32:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_IBEXIT
	ldr	w0, [x20]
LBB0_11:
Lloh33:
	adrp	x8, _ibd_mkey@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ibd_mkey@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	bl	_smp_mkey_set
	mov	x0, x19
	bl	_process_send_trap
	mov	x19, x0
	ldr	w0, [x20]
	bl	_mad_rpc_close_port
	ldur	x8, [x29, #-88]
Lloh36:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh37:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.12:
	mov	x0, x19
	add	sp, sp, #1056
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_13:
	ldr	x10, [x22]
	ldr	x19, [x10]
	cmp	w9, #2
	b.ge	LBB0_8
	b	LBB0_9
LBB0_14:
	mov	w0, #-1
	bl	_exit
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_SMI_CLASS,4,2               ; @IB_SMI_CLASS
	.comm	_IB_SMI_DIRECT_CLASS,4,2        ; @IB_SMI_DIRECT_CLASS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[<trap_name>] [<error_port>]\n\nArgument <trap_name> can be one of the following:\n"

	.comm	_traps,8,3                      ; @traps
l_.str.1:                               ; @.str.1
	.asciz	"  %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"\n  default behavior is to send \"%s\""

l_.str.3:                               ; @.str.3
	.asciz	"DGKL"

	.comm	_optind,8,3                     ; @optind
	.comm	_error_port,4,2                 ; @error_port
	.comm	_ibd_ca,4,2                     ; @ibd_ca
	.comm	_ibd_ca_port,4,2                ; @ibd_ca_port
	.comm	_srcport,4,2                    ; @srcport
l_.str.4:                               ; @.str.4
	.asciz	"Failed to open '%s' port '%d'"

	.comm	_ibd_mkey,4,2                   ; @ibd_mkey
.subsections_via_symbols
