// File: /workspace/github_c_makefile_star2_O2/j-hoppe[P]tu58fs/monitor.c
// Function: monitor_deposit
int monitor_deposit(monitor_t *_this, unsigned address, unsigned value) {
	switch (_this->monitor_type) {
	case monitor_odt:
		return monitor_odt_deposit(_this, address, value);
	case monitor_m9312:
	case monitor_m9301: // only difference is the prompt
		return monitor_m9312_deposit(_this, address, value);
        case monitor_1144:
            return monitor_1144_deposit(_this, address, value);
	default:
		return error_set(ERROR_MONITOR, "monitor_deposit(): Illegal boot monitor %u selected",
				_this->monitor_type);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
movl (%rdi), %edx
leal -0x3(%rdx), %eax
cmpl $0x2, %eax
jb 0xff07
cmpl $0x5, %edx
je 0xff18
cmpl $0x2, %edx
jne 0xffcc
leaq 0x632e(%rip), %rsi      # 0x161d3
movq %rsp, %r12
movq %r12, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x3530
movl 0x18(%rbx), %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xfcfa
testl %eax, %eax
jne 0xffc1
movl 0x18(%rbx), %esi
movq %rbx, %rdi
callq 0xfc70
leaq 0x3aa93(%rip), %rdi     # 0x4a970
pushq $0x3f
popq %rsi
callq 0x31c0
testq %rax, %rax
je 0x10042
leaq 0x62e2(%rip), %rsi      # 0x161d7
pushq $-0xa
popq %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x982c
jmp 0x1002e
movl 0x28(%rbx), %eax
addl $0x2, %eax
cmpl %r15d, %eax
jne 0xff87
movl %r15d, 0x28(%rbx)
jmp 0xff96
leaq 0x6350(%rip), %rsi      # 0x1626f
xorl %ebp, %ebp
movq %rsp, %r12
movq %r12, %rdi
movl %r15d, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x3530
movl 0x18(%rbx), %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xfcfa
testl %eax, %eax
jne 0xffc1
leaq 0x616c(%rip), %rsi      # 0x160b9
movq %rbx, %rdi
callq 0xfb75
movl 0x18(%rbx), %esi
movq %rbx, %rdi
callq 0xfc70
leaq 0x3aa09(%rip), %rsi     # 0x4a970
movq %rbx, %rdi
callq 0xfbbe
testl %eax, %eax
je 0x10030
movq 0x8(%rbx), %rdx
leaq 0x62f5(%rip), %rsi      # 0x16277
jmp 0x10024
movq %rbx, %rdi
movl %r15d, %esi
callq 0x10231
testl %eax, %eax
jne 0xffc1
leaq 0x6271(%rip), %rsi      # 0x1620e
xorl %ebp, %ebp
movq %rsp, %r15
movq %r15, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x3530
movl 0x18(%rbx), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xfcfa
testl %eax, %eax
je 0xffec
leaq 0xe270(%rip), %rax      # 0x1e238
movl (%rax), %ebp
jmp 0x10030
leaq 0x619d(%rip), %rsi      # 0x16170
pushq $-0xa
popq %rdi
xorl %eax, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x982c
leaq 0x60c6(%rip), %rsi      # 0x160b9
movq %rbx, %rdi
callq 0xfb75
movl 0x18(%rbx), %esi
movq %rbx, %rdi
callq 0xfc70
leaq 0x3a963(%rip), %rsi     # 0x4a970
movq %rbx, %rdi
callq 0xfbbe
testl %eax, %eax
je 0x10030
movq 0x8(%rbx), %rdx
leaq 0x61ef(%rip), %rsi      # 0x16213
pushq $-0xa
popq %rdi
xorl %eax, %eax
callq 0x982c
movl %eax, %ebp
movl %ebp, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x61c7(%rip), %rsi      # 0x16210
xorl %ebp, %ebp
movq %rsp, %r15
movq %r15, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x3530
movl 0x18(%rbx), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xfcfa
testl %eax, %eax
jne 0xffc1
leaq 0x6041(%rip), %rsi      # 0x160b9
movq %rbx, %rdi
callq 0xfb75
movl 0x18(%rbx), %esi
movq %rbx, %rdi
callq 0xfc70
leaq 0x3a8de(%rip), %rsi     # 0x4a970
movq %rbx, %rdi
callq 0xfbbe
testl %eax, %eax
je 0x10030
leaq 0x6149(%rip), %rsi      # 0x161ee
pushq $-0xa
popq %rdi
xorl %eax, %eax
callq 0x982c
jmp 0x1002e