	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smi_ir_init                    ## -- Begin function smi_ir_init
	.p2align	4, 0x90
_smi_ir_init:                           ## @smi_ir_init
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_RC_DRIVER_IR_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rc_allocate_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	leaq	16(%r14), %r15
	movl	32(%r14), %edi
	movq	(%r14), %rax
	movq	(%rax), %rcx
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	movl	36(%r14), %r12d
	movq	8(%r14), %rdi
	callq	_pci_name
	leaq	L_.str.1(%rip), %rdx
	movl	%r12d, %edi
	movl	$4, %esi
	movq	%rax, %rcx
	callq	_snprintf
	movq	_RC_PROTO_BIT_ALL_IR_DECODER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
	leaq	L_.str.2(%rip), %rax
	movq	%rax, (%rbx)
	movl	36(%r14), %eax
	movl	%eax, 52(%rbx)
	movl	32(%r14), %eax
	movl	%eax, 48(%rbx)
	movq	_BUS_PCI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movl	$1, 32(%rbx)
	movq	8(%r14), %rax
	movl	8(%rax), %ecx
	movl	%ecx, 40(%rbx)
	movl	4(%rax), %ecx
	movl	%ecx, 36(%rbx)
	movq	%rax, 24(%rbx)
	movq	(%r14), %rax
	movl	8(%rax), %eax
	movl	%eax, 16(%rbx)
	movl	$100, %edi
	callq	_MS_TO_NS
	movl	%eax, 12(%rbx)
	movq	_SMI_SAMPLE_PERIOD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_US_TO_NS
	movl	%eax, 8(%rbx)
	movq	%rbx, 24(%r14)
	movq	%r14, 16(%r14)
	movq	%r15, %rdi
	callq	_smi_ir_disableInterrupt
	movq	%rbx, %rdi
	callq	_rc_register_device
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_rc_free_device
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_5
LBB0_3:
	xorl	%r14d, %r14d
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RC_DRIVER_IR_RAW,4,2           ## @RC_DRIVER_IR_RAW
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IR (%s)"

L_.str.1:                               ## @.str.1
	.asciz	"pci-%s/ir0"

	.comm	_RC_PROTO_BIT_ALL_IR_DECODER,4,2 ## @RC_PROTO_BIT_ALL_IR_DECODER
L_.str.2:                               ## @.str.2
	.asciz	"SMI_PCIe"

	.comm	_BUS_PCI,4,2                    ## @BUS_PCI
	.comm	_SMI_SAMPLE_PERIOD,4,2          ## @SMI_SAMPLE_PERIOD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smi_ir_init                    ; -- Begin function smi_ir_init
	.p2align	2
_smi_ir_init:                           ; @smi_ir_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _RC_DRIVER_IR_RAW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RC_DRIVER_IR_RAW@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_rc_allocate_device
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	add	x21, x20, #16
	ldr	w0, [x20, #32]
	ldr	x8, [x20]
	ldr	x3, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #4
	bl	_snprintf
	ldr	w22, [x20, #36]
	ldr	x0, [x20, #8]
	bl	_pci_name
	mov	x3, x0
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	w1, #4
	bl	_snprintf
Lloh7:
	adrp	x8, _RC_PROTO_BIT_ALL_IR_DECODER@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RC_PROTO_BIT_ALL_IR_DECODER@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19, #56]
Lloh10:
	adrp	x8, l_.str.2@PAGE
Lloh11:
	add	x8, x8, l_.str.2@PAGEOFF
	str	x8, [x19]
	ldr	d0, [x20, #32]
Lloh12:
	adrp	x8, _BUS_PCI@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BUS_PCI@GOTPAGEOFF]
	str	d0, [x19, #48]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x19, #44]
	mov	w8, #1
	str	w8, [x19, #32]
	ldp	x9, x8, [x20]
	ldur	d0, [x8, #4]
	str	x8, [x19, #24]
	stur	d0, [x19, #36]
	ldr	w8, [x9, #8]
	str	w8, [x19, #16]
	mov	w0, #100
	bl	_MS_TO_NS
	str	w0, [x19, #12]
Lloh15:
	adrp	x8, _SMI_SAMPLE_PERIOD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SMI_SAMPLE_PERIOD@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_US_TO_NS
	str	w0, [x19, #8]
	stp	x20, x19, [x20, #16]
	mov	x0, x21
	bl	_smi_ir_disableInterrupt
	mov	x0, x19
	bl	_rc_register_device
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_rc_free_device
	b	LBB0_4
LBB0_3:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_RC_DRIVER_IR_RAW,4,2           ; @RC_DRIVER_IR_RAW
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IR (%s)"

l_.str.1:                               ; @.str.1
	.asciz	"pci-%s/ir0"

	.comm	_RC_PROTO_BIT_ALL_IR_DECODER,4,2 ; @RC_PROTO_BIT_ALL_IR_DECODER
l_.str.2:                               ; @.str.2
	.asciz	"SMI_PCIe"

	.comm	_BUS_PCI,4,2                    ; @BUS_PCI
	.comm	_SMI_SAMPLE_PERIOD,4,2          ; @SMI_SAMPLE_PERIOD
.subsections_via_symbols
