	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipmi_validate_addr             ## -- Begin function ipmi_validate_addr
	.p2align	4, 0x90
_ipmi_validate_addr:                    ## @ipmi_validate_addr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpl	$3, %esi
	ja	LBB0_1
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %r14
	movq	_IPMI_SYSTEM_INTERFACE_ADDR_TYPE@GOTPCREL(%rip), %rdx
	movq	(%rdi), %rsi
	movq	8(%rdi), %rax
	movq	_IPMI_BMC_CHANNEL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rdx), %rsi
	jne	LBB0_3
## %bb.2:
	xorl	%ebx, %ebx
	cmpq	%rcx, %rax
	jne	LBB0_9
	jmp	LBB0_10
LBB0_3:
	testq	%rax, %rax
	js	LBB0_9
## %bb.4:
	cmpq	%rcx, %rax
	je	LBB0_9
## %bb.5:
	movq	_IPMI_MAX_CHANNELS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_9
## %bb.6:
	movq	%r14, %rdi
	callq	_is_ipmb_addr
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_10
## %bb.7:
	movq	%r14, %rdi
	callq	_is_ipmb_bcast_addr
	testq	%rax, %rax
	jne	LBB0_10
## %bb.8:
	movq	%r14, %rdi
	callq	_is_lan_addr
	testq	%rax, %rax
	jne	LBB0_10
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IPMI_SYSTEM_INTERFACE_ADDR_TYPE,8,3 ## @IPMI_SYSTEM_INTERFACE_ADDR_TYPE
	.comm	_IPMI_BMC_CHANNEL,8,3           ## @IPMI_BMC_CHANNEL
	.comm	_IPMI_MAX_CHANNELS,8,3          ## @IPMI_MAX_CHANNELS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipmi_validate_addr             ; -- Begin function ipmi_validate_addr
	.p2align	2
_ipmi_validate_addr:                    ; @ipmi_validate_addr
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cmp	w1, #3
	b.ls	LBB0_9
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _IPMI_SYSTEM_INTERFACE_ADDR_TYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IPMI_SYSTEM_INTERFACE_ADDR_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x8]
	ldp	x11, x8, [x0]
Lloh3:
	adrp	x9, _IPMI_BMC_CHANNEL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IPMI_BMC_CHANNEL@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x11, x10
	b.ne	LBB0_3
; %bb.2:
	cmp	x8, x9
	b.ne	LBB0_9
	b	LBB0_8
LBB0_3:
	tbnz	x8, #63, LBB0_9
; %bb.4:
Lloh6:
	adrp	x10, _IPMI_MAX_CHANNELS@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IPMI_MAX_CHANNELS@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #0, ne
	b.ge	LBB0_9
; %bb.5:
	mov	x0, x19
	bl	_is_ipmb_addr
	cbnz	x0, LBB0_8
; %bb.6:
	mov	x0, x19
	bl	_is_ipmb_bcast_addr
	cbnz	x0, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_is_lan_addr
	cbz	x0, LBB0_9
LBB0_8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IPMI_SYSTEM_INTERFACE_ADDR_TYPE,8,3 ; @IPMI_SYSTEM_INTERFACE_ADDR_TYPE
	.comm	_IPMI_BMC_CHANNEL,8,3           ; @IPMI_BMC_CHANNEL
	.comm	_IPMI_MAX_CHANNELS,8,3          ; @IPMI_MAX_CHANNELS
.subsections_via_symbols
