#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
char *Scan_Octal(char const *, unsigned long *);
int /*<<< orphan*/ putchar(char);
const char *Handle_Backslash(const char *dformat) {
  char c;
  unsigned long i;
  if (!(c = *(dformat++)))
    return dformat;
  switch (c) {
  case 'n':
    putchar('\n');
    break;
  case 't':
    putchar('\t');
    break;
  case '0':
  case '1':
  case '2':
  case '3':
  case '4':
  case '5':
  case '6':
  case '7':
    dformat = Scan_Octal(dformat, &i);
    putchar((int)i);
    break;
  default:
    putchar(c);
    break;
  }
  return dformat;
}


x86 assembly (clang, -O0):
<Handle_Backslash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
cmp    $0x0,%al
jne    1155 <Handle_Backslash+0x35>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    11e0 <Handle_Backslash+0xc0>
movsbl -0x11(%rbp),%eax
mov    %eax,-0x24(%rbp)
add    $0xffffffd0,%eax
sub    $0x8,%eax
jb     11ad <Handle_Backslash+0x8d>
jmp    116d <Handle_Backslash+0x4d>
mov    -0x24(%rbp),%eax
sub    $0x6e,%eax
je     118f <Handle_Backslash+0x6f>
jmp    117e <Handle_Backslash+0x5e>
mov    -0x24(%rbp),%eax
sub    $0x74,%eax
je     119e <Handle_Backslash+0x7e>
jmp    11cf <Handle_Backslash+0xaf>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    11d8 <Handle_Backslash+0xb8>
mov    $0x9,%edi
call   1030 <putchar@plt>
jmp    11d8 <Handle_Backslash+0xb8>
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <Scan_Octal@plt>
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    11d8 <Handle_Backslash+0xb8>
movsbl -0x11(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Handle_Backslash>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsbl (%rdi),%edi
add    $0x1,%rbx
test   %edi,%edi
je     1155 <Handle_Backslash+0x35>
lea    -0x30(%rdi),%eax
cmp    $0x8,%eax
jae    115e <Handle_Backslash+0x3e>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <Scan_Octal@plt>
mov    %rax,%rbx
movsbl 0x8(%rsp),%edi
call   1030 <putchar@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret
cmp    $0x74,%edi
je     116f <Handle_Backslash+0x4f>
cmp    $0x6e,%edi
jne    1176 <Handle_Backslash+0x56>
mov    $0xa,%edi
jmp    1150 <Handle_Backslash+0x30>
mov    $0x9,%edi
jmp    1150 <Handle_Backslash+0x30>
jmp    1150 <Handle_Backslash+0x30>

LLVM IR (-O0):
define i8* @Handle_Backslash(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i64
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %3
%8 = load i8, i8* %6
store i8 %8, i8* %4
%9 = icmp ne i8 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %1
%11 = load i8*, i8** %3
store i8* %11, i8** %2
br label %31
12: ; preds = %1
%13 = load i8, i8* %4
%14 = sext i8 %13 to i32
switch i32 %14, label %26 [
i32 110, label %15
i32 116, label %17
i32 48, label %19
i32 49, label %19
i32 50, label %19
i32 51, label %19
i32 52, label %19
i32 53, label %19
i32 54, label %19
i32 55, label %19
]
15: ; preds = %12
%16 = call i32 @putchar(i8 signext 10)
br label %29
17: ; preds = %12
%18 = call i32 @putchar(i8 signext 9)
br label %29
19: ; preds = %12, %12, %12, %12, %12, %12, %12, %12
%20 = load i8*, i8** %3
%21 = call i8* @Scan_Octal(i8* %20, i64* %5)
store i8* %21, i8** %3
%22 = load i64, i64* %5
%23 = trunc i64 %22 to i32
%24 = trunc i32 %23 to i8
%25 = call i32 @putchar(i8 signext %24)
br label %29
26: ; preds = %12
%27 = load i8, i8* %4
%28 = call i32 @putchar(i8 signext %27)
br label %29
29: ; preds = %26, %19, %17, %15
%30 = load i8*, i8** %3
store i8* %30, i8** %2
br label %31
31: ; preds = %29, %10
%32 = load i8*, i8** %2
ret i8* %32
}

LLVM IR (-O2):
define i8* @Handle_Backslash(i8* %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %20, label %7
7: ; preds = %1
%8 = sext i8 %5 to i32
switch i32 %8, label %18 [
i32 110, label %9
i32 116, label %11
i32 48, label %13
i32 49, label %13
i32 50, label %13
i32 51, label %13
i32 52, label %13
i32 53, label %13
i32 54, label %13
i32 55, label %13
]
9: ; preds = %7
%10 = tail call i32 @putchar(i8 signext 10)
br label %20
11: ; preds = %7
%12 = tail call i32 @putchar(i8 signext 9)
br label %20
13: ; preds = %7, %7, %7, %7, %7, %7, %7, %7
%14 = call i8* @Scan_Octal(i8* %4, i64* %2)
%15 = load i64, i64* %2
%16 = trunc i64 %15 to i8
%17 = call i32 @putchar(i8 signext %16)
br label %20
18: ; preds = %7
%19 = tail call i32 @putchar(i8 signext %5)
br label %20
20: ; preds = %9, %11, %13, %18, %1
%21 = phi i8* [ %4, %1 ], [ %4, %18 ], [ %14, %13 ], [ %4, %11 ], [ %4, %9 ]
ret i8* %21
}