	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function irq_set_type
_irq_set_type:                          ## @irq_set_type
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	_ID_JZ4760@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	_JZ4760_GPIO_PAT0@GOTPCREL(%rip), %rcx
	cmovlq	_JZ4740_GPIO_DIR@GOTPCREL(%rip), %rcx
	movq	_JZ4760_GPIO_PAT1@GOTPCREL(%rip), %rdi
	cmovlq	_JZ4740_GPIO_TRIG@GOTPCREL(%rip), %rdi
	movl	%esi, %r14d
	movl	(%rcx), %esi
	movl	(%rdi), %r15d
	movq	_ID_X1000@GOTPCREL(%rip), %rcx
	cmpl	$129, %edx
	je	LBB0_13
## %bb.1:
	cmpl	$131, %edx
	je	LBB0_10
## %bb.2:
	cmpl	$130, %edx
	jne	LBB0_18
## %bb.3:
	cmpq	(%rcx), %rax
	jge	LBB0_4
## %bb.7:
	movq	%rbx, %rdi
	movl	%r14d, %edx
	movl	$1, %ecx
	jmp	LBB0_8
LBB0_13:
	cmpq	(%rcx), %rax
	jge	LBB0_14
## %bb.16:
	movq	%rbx, %rdi
	movl	%r14d, %edx
	movl	$1, %ecx
	jmp	LBB0_17
LBB0_10:
	cmpq	(%rcx), %rax
	jge	LBB0_11
## %bb.12:
	movq	%rbx, %rdi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
LBB0_8:
	callq	_ingenic_gpio_set_bit
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	$1, %ecx
	jmp	LBB0_9
LBB0_18:
	cmpq	(%rcx), %rax
	jge	LBB0_19
## %bb.20:
	movq	%rbx, %rdi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
LBB0_17:
	callq	_ingenic_gpio_set_bit
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ingenic_gpio_set_bit           ## TAILCALL
LBB0_4:
	movq	%rbx, %rdi
	movl	%r14d, %edx
	movl	$1, %ecx
	jmp	LBB0_5
LBB0_14:
	movq	%rbx, %rdi
	movl	%r14d, %edx
	movl	$1, %ecx
	jmp	LBB0_15
LBB0_11:
	movq	%rbx, %rdi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
LBB0_5:
	callq	_ingenic_gpio_shadow_set_bit
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	$1, %ecx
	jmp	LBB0_6
LBB0_19:
	movq	%rbx, %rdi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
LBB0_15:
	callq	_ingenic_gpio_shadow_set_bit
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
LBB0_6:
	callq	_ingenic_gpio_shadow_set_bit
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ingenic_gpio_shadow_set_bit_load ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ID_JZ4760,8,3                  ## @ID_JZ4760
	.comm	_JZ4760_GPIO_PAT1,4,2           ## @JZ4760_GPIO_PAT1
	.comm	_JZ4760_GPIO_PAT0,4,2           ## @JZ4760_GPIO_PAT0
	.comm	_JZ4740_GPIO_TRIG,4,2           ## @JZ4740_GPIO_TRIG
	.comm	_JZ4740_GPIO_DIR,4,2            ## @JZ4740_GPIO_DIR
	.comm	_ID_X1000,8,3                   ## @ID_X1000
	.no_dead_strip	_irq_set_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function irq_set_type
_irq_set_type:                          ; @irq_set_type
	.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, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _ID_JZ4760@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ID_JZ4760@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _JZ4740_GPIO_DIR@GOTPAGE
Lloh4:
	ldr	x10, [x10, _JZ4740_GPIO_DIR@GOTPAGEOFF]
Lloh5:
	adrp	x11, _JZ4760_GPIO_PAT0@GOTPAGE
Lloh6:
	ldr	x11, [x11, _JZ4760_GPIO_PAT0@GOTPAGEOFF]
	cmp	x8, x9
	csel	x9, x10, x11, lt
Lloh7:
	adrp	x10, _JZ4740_GPIO_TRIG@GOTPAGE
Lloh8:
	ldr	x10, [x10, _JZ4740_GPIO_TRIG@GOTPAGEOFF]
	ldr	w1, [x9]
Lloh9:
	adrp	x9, _JZ4760_GPIO_PAT1@GOTPAGE
Lloh10:
	ldr	x9, [x9, _JZ4760_GPIO_PAT1@GOTPAGEOFF]
	csel	x9, x10, x9, lt
	ldr	w21, [x9]
Lloh11:
	adrp	x9, _ID_X1000@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ID_X1000@GOTPAGEOFF]
	cmp	w2, #129
	b.eq	LBB0_4
; %bb.1:
	cmp	w2, #131
	b.eq	LBB0_5
; %bb.2:
	cmp	w2, #130
	b.ne	LBB0_8
; %bb.3:
	ldr	x9, [x9]
	mov	x0, x19
	mov	x2, x20
	mov	w3, #1
	cmp	x8, x9
	b.lt	LBB0_7
	b	LBB0_13
LBB0_4:
	ldr	x9, [x9]
	mov	x0, x19
	mov	x2, x20
	mov	w3, #1
	cmp	x8, x9
	b.lt	LBB0_10
	b	LBB0_15
LBB0_5:
	ldr	x9, [x9]
	mov	x0, x19
	mov	x2, x20
	cmp	x8, x9
	b.ge	LBB0_12
; %bb.6:
	mov	w3, #0
LBB0_7:
	bl	_ingenic_gpio_set_bit
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	w3, #1
	b	LBB0_11
LBB0_8:
	ldr	x9, [x9]
	mov	x0, x19
	mov	x2, x20
	cmp	x8, x9
	b.ge	LBB0_14
; %bb.9:
	mov	w3, #0
LBB0_10:
	bl	_ingenic_gpio_set_bit
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	w3, #0
LBB0_11:
	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
	b	_ingenic_gpio_set_bit
LBB0_12:
	mov	w3, #0
LBB0_13:
	bl	_ingenic_gpio_shadow_set_bit
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	w3, #1
	b	LBB0_16
LBB0_14:
	mov	w3, #0
LBB0_15:
	bl	_ingenic_gpio_shadow_set_bit
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	w3, #0
LBB0_16:
	bl	_ingenic_gpio_shadow_set_bit
	mov	x0, x19
	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
	b	_ingenic_gpio_shadow_set_bit_load
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ID_JZ4760,8,3                  ; @ID_JZ4760
	.comm	_JZ4760_GPIO_PAT1,4,2           ; @JZ4760_GPIO_PAT1
	.comm	_JZ4760_GPIO_PAT0,4,2           ; @JZ4760_GPIO_PAT0
	.comm	_JZ4740_GPIO_TRIG,4,2           ; @JZ4740_GPIO_TRIG
	.comm	_JZ4740_GPIO_DIR,4,2            ; @JZ4740_GPIO_DIR
	.comm	_ID_X1000,8,3                   ; @ID_X1000
	.no_dead_strip	_irq_set_type
.subsections_via_symbols
