	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_mobile_i2c_hook_irqs
_sh_mobile_i2c_hook_irqs:               ## @sh_mobile_i2c_hook_irqs
	.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
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	_IORESOURCE_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movl	$0, %r14d
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %r13
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	(%r13), %r15d
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	4(%r13), %r15d
	jle	LBB0_7
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%r15d, %r14d
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	incl	%r15d
	movq	_IORESOURCE_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_platform_get_resource
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_4
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_sh_mobile_i2c_isr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_IRQF_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r12, %rdi
	callq	_dev_name
	movl	%r15d, %edi
	movl	%ebx, %esi
	movl	%r14d, %edx
	movl	%eax, %ecx
	movq	%r12, %r8
	callq	_request_irq
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	leal	1(%r15), %r14d
	cmpl	4(%r13), %r15d
	movl	%r14d, %r15d
	jl	LBB0_7
	jmp	LBB0_3
LBB0_9:
	movl	%r15d, %r14d
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	testl	%r15d, %r15d
	jns	LBB0_16
	jmp	LBB0_13
LBB0_10:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_12
## %bb.11:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	xorl	%ecx, %ecx
	testl	%r15d, %r15d
	cmovnel	%ecx, %eax
	jmp	LBB0_14
LBB0_12:
	decl	%r15d
	xorl	%r13d, %r13d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	testl	%r15d, %r15d
	jns	LBB0_16
LBB0_13:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	_IORESOURCE_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	-1(%r15), %ebx
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_platform_get_resource
	movq	%rax, %r13
	testl	%r15d, %r15d
	movl	%ebx, %r15d
	jle	LBB0_13
LBB0_16:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_18 Depth 2
	cmpl	(%r13), %r14d
	jl	LBB0_15
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	%r14d, %ebx
	.p2align	4, 0x90
LBB0_18:                                ##   Parent Loop BB0_16 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	_free_irq
	leal	-1(%rbx), %eax
	cmpl	(%r13), %ebx
	movl	%eax, %ebx
	jg	LBB0_18
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_IORESOURCE_IRQ,4,2             ## @IORESOURCE_IRQ
	.comm	_sh_mobile_i2c_isr,4,2          ## @sh_mobile_i2c_isr
	.comm	_IRQF_DISABLED,4,2              ## @IRQF_DISABLED
	.comm	_ENOENT,4,2                     ## @ENOENT
	.no_dead_strip	_sh_mobile_i2c_hook_irqs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_mobile_i2c_hook_irqs
_sh_mobile_i2c_hook_irqs:               ; @sh_mobile_i2c_hook_irqs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _ENXIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x27, _IORESOURCE_IRQ@GOTPAGE
Lloh4:
	ldr	x27, [x27, _IORESOURCE_IRQ@GOTPAGEOFF]
	ldr	w1, [x27]
	mov	w2, #0
	bl	_platform_get_resource
	cbz	x0, LBB0_9
; %bb.1:
	mov	x22, x0
	mov	w20, #0
	neg	w8, w21
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
Lloh5:
	adrp	x28, _sh_mobile_i2c_isr@GOTPAGE
Lloh6:
	ldr	x28, [x28, _sh_mobile_i2c_isr@GOTPAGEOFF]
Lloh7:
	adrp	x21, _IRQF_DISABLED@GOTPAGE
Lloh8:
	ldr	x21, [x21, _IRQF_DISABLED@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w24, [x22]
	cbz	w23, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x22, #4]
	cmp	w24, w8
	b.le	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x25, x24
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	w20, w20, #1
	ldr	w1, [x27]
	mov	x0, x19
	mov	x2, x20
	bl	_platform_get_resource
	mov	x22, x0
	cbnz	x0, LBB0_2
	b	LBB0_10
LBB0_6:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w25, [x28]
	ldr	w26, [x21]
	mov	x0, x19
	bl	_dev_name
	mov	x3, x0
	mov	x0, x24
	mov	x1, x25
	mov	x2, x26
	mov	x4, x19
	bl	_request_irq
	cbnz	x0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	add	w25, w24, #1
	ldr	w8, [x22, #4]
	cmp	w24, w8
	mov	x24, x25
	b.lt	LBB0_6
	b	LBB0_5
LBB0_8:
	mov	x25, x24
	ldr	w21, [sp, #12]                  ; 4-byte Folded Reload
	tbz	w20, #31, LBB0_15
	b	LBB0_13
LBB0_9:
	mov	w20, #0
	mov	w25, #0
LBB0_10:
	cbz	w23, LBB0_12
; %bb.11:
Lloh9:
	adrp	x8, _ENOENT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w20, #0
	csneg	w21, wzr, w8, ne
	b	LBB0_13
LBB0_12:
	mov	x22, #0
	mov	w21, #0
	sub	w20, w20, #1
	tbz	w20, #31, LBB0_15
LBB0_13:
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	w1, [x27]
	sub	w23, w20, #1
	mov	x0, x19
	mov	x2, x23
	bl	_platform_get_resource
	mov	x22, x0
	cmp	w20, #0
	mov	x20, x23
	b.le	LBB0_13
LBB0_15:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_17 Depth 2
	ldr	w8, [x22]
	cmp	w25, w8
	b.lt	LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x23, x25
LBB0_17:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x23
	mov	x1, x19
	bl	_free_irq
	sub	w8, w23, #1
	ldr	w9, [x22]
	cmp	w23, w9
	mov	x23, x8
	b.gt	LBB0_17
	b	LBB0_14
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_IORESOURCE_IRQ,4,2             ; @IORESOURCE_IRQ
	.comm	_sh_mobile_i2c_isr,4,2          ; @sh_mobile_i2c_isr
	.comm	_IRQF_DISABLED,4,2              ; @IRQF_DISABLED
	.comm	_ENOENT,4,2                     ; @ENOENT
	.no_dead_strip	_sh_mobile_i2c_hook_irqs
.subsections_via_symbols
