	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ali_program_modes
_ali_program_modes:                     ## @ali_program_modes
	.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	%ecx, %r15d
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %r14
	movl	(%r13), %r13d
	movl	(%r12), %r12d
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	leal	(%r12,%r13,4), %eax
	addl	$90, %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	leal	89(,%r13,4), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	leal	88(,%r13,4), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	(%rbx), %edi
	movl	$1, %esi
	movl	$8, %edx
	callq	_clamp_val
	andl	$7, %eax
	movl	%eax, (%rbx)
	movl	4(%rbx), %edi
	movl	$1, %esi
	movl	$8, %edx
	callq	_clamp_val
	andl	$7, %eax
	movl	%eax, 4(%rbx)
	movl	8(%rbx), %edi
	movl	$1, %esi
	movl	$16, %edx
	callq	_clamp_val
	andl	$15, %eax
	movl	%eax, 8(%rbx)
	movl	12(%rbx), %edi
	movl	$1, %esi
	movl	$8, %edx
	callq	_clamp_val
	andl	$7, %eax
	movl	%eax, 12(%rbx)
	movl	16(%rbx), %edi
	movl	$1, %esi
	movl	$16, %edx
	callq	_clamp_val
	andl	$15, %eax
	movl	%eax, 16(%rbx)
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_pci_write_config_byte
	movl	4(%rbx), %edx
	shll	$4, %edx
	orl	8(%rbx), %edx
	movq	%r14, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_pci_write_config_byte
	movl	12(%rbx), %edx
	shll	$4, %edx
	orl	16(%rbx), %edx
	movq	%r14, %rdi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	callq	_pci_write_config_byte
LBB0_2:
	shll	$2, %r12d
	addl	$86, %r13d
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_pci_read_config_byte
	movl	$15, %eax
	movl	%r12d, %ecx
	shll	%cl, %eax
	notl	%eax
	shll	%cl, %r15d
	andl	-44(%rbp), %eax
	orl	%eax, %r15d
	movl	%r15d, -44(%rbp)
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%r15d, %edx
	callq	_pci_write_config_byte
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ali_program_modes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ali_program_modes
_ali_program_modes:                     ; @ali_program_modes
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x20, x0
	ldr	w25, [x23]
	ldr	w26, [x22]
	cbz	x21, LBB0_2
; %bb.1:
	lsl	w8, w25, #2
	add	w9, w8, w26
	add	w22, w9, #90
	add	w23, w8, #89
	add	w24, w8, #88
	ldr	w0, [x21]
	mov	w1, #1
	mov	w2, #8
	bl	_clamp_val
	and	w8, w0, #0x7
	str	w8, [x21]
	ldr	w0, [x21, #4]
	mov	w1, #1
	mov	w2, #8
	bl	_clamp_val
	and	w8, w0, #0x7
	str	w8, [x21, #4]
	ldr	w0, [x21, #8]
	mov	w1, #1
	mov	w2, #16
	bl	_clamp_val
	and	w8, w0, #0xf
	str	w8, [x21, #8]
	ldr	w0, [x21, #12]
	mov	w1, #1
	mov	w2, #8
	bl	_clamp_val
	and	w8, w0, #0x7
	str	w8, [x21, #12]
	ldr	w0, [x21, #16]
	mov	w1, #1
	mov	w2, #16
	bl	_clamp_val
	and	w8, w0, #0xf
	str	w8, [x21, #16]
	ldr	w2, [x21]
	mov	x0, x20
	mov	x1, x24
	bl	_pci_write_config_byte
	ldp	w8, w9, [x21, #4]
	orr	w2, w9, w8, lsl #4
	mov	x0, x20
	mov	x1, x23
	bl	_pci_write_config_byte
	ldp	w8, w9, [x21, #12]
	orr	w2, w9, w8, lsl #4
	mov	x0, x20
	mov	x1, x22
	bl	_pci_write_config_byte
LBB0_2:
	lsl	w22, w26, #2
	add	w21, w25, #86
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x21
	bl	_pci_read_config_byte
	mov	w8, #15
	lsl	w8, w8, w22
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
	lsl	w9, w19, w22
	orr	w2, w8, w9
	str	w2, [sp, #12]
	mov	x0, x20
	mov	x1, x21
	bl	_pci_write_config_byte
	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
	add	sp, sp, #96
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ali_program_modes
.subsections_via_symbols
