// File: /workspace/github_c_makefile_star2_O3/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 0x10f3b
cmpl $0x5, %edx
je 0x10f4c
cmpl $0x2, %edx
jne 0x11000
leaq 0x634e(%rip), %rsi      # 0x17223
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 0x10d43
testl %eax, %eax
jne 0x10ff5
movl 0x18(%rbx), %esi
movq %rbx, %rdi
callq 0x10cb1
leaq 0x39a63(%rip), %rdi     # 0x4a970
movl $0x3f, %esi
callq 0x31c0
testq %rax, %rax
je 0x1107a
leaq 0x6300(%rip), %rsi      # 0x17227
movl $0xfffffff6, %edi       # imm = 0xFFFFFFF6
movl %r15d, %edx
xorl %eax, %eax
callq 0x9f73
jmp 0x11066
movl 0x28(%rbx), %eax
addl $0x2, %eax
cmpl %r15d, %eax
jne 0x10fbb
movl %r15d, 0x28(%rbx)
jmp 0x10fca
leaq 0x636c(%rip), %rsi      # 0x172bf
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 0x10d43
testl %eax, %eax
jne 0x10ff5
leaq 0x6188(%rip), %rsi      # 0x17109
movq %rbx, %rdi
callq 0x10bb8
movl 0x18(%rbx), %esi
movq %rbx, %rdi
callq 0x10cb1
leaq 0x399d5(%rip), %rsi     # 0x4a970
movq %rbx, %rdi
callq 0x10c03
testl %eax, %eax
je 0x11068
movq 0x8(%rbx), %rdx
leaq 0x6311(%rip), %rsi      # 0x172c7
jmp 0x1105a
movq %rbx, %rdi
movl %r15d, %esi
callq 0x1126d
testl %eax, %eax
jne 0x10ff5
leaq 0x628d(%rip), %rsi      # 0x1725e
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 0x10d43
testl %eax, %eax
je 0x11022
leaq 0xd23c(%rip), %rax      # 0x1e238
movl (%rax), %ebp
jmp 0x11068
leaq 0x61b9(%rip), %rsi      # 0x171c0
movl $0xfffffff6, %edi       # imm = 0xFFFFFFF6
xorl %eax, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9f73
leaq 0x60e0(%rip), %rsi      # 0x17109
movq %rbx, %rdi
callq 0x10bb8
movl 0x18(%rbx), %esi
movq %rbx, %rdi
callq 0x10cb1
leaq 0x3992d(%rip), %rsi     # 0x4a970
movq %rbx, %rdi
callq 0x10c03
testl %eax, %eax
je 0x11068
movq 0x8(%rbx), %rdx
leaq 0x6209(%rip), %rsi      # 0x17263
movl $0xfffffff6, %edi       # imm = 0xFFFFFFF6
xorl %eax, %eax
callq 0x9f73
movl %eax, %ebp
movl %ebp, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x61df(%rip), %rsi      # 0x17260
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 0x10d43
testl %eax, %eax
jne 0x10ff5
leaq 0x6059(%rip), %rsi      # 0x17109
movq %rbx, %rdi
callq 0x10bb8
movl 0x18(%rbx), %esi
movq %rbx, %rdi
callq 0x10cb1
leaq 0x398a6(%rip), %rsi     # 0x4a970
movq %rbx, %rdi
callq 0x10c03
testl %eax, %eax
je 0x11068
leaq 0x6161(%rip), %rsi      # 0x1723e
movl $0xfffffff6, %edi       # imm = 0xFFFFFFF6
xorl %eax, %eax
callq 0x9f73
jmp 0x11066