xunge/DecIR huggingface dataset:
void TestIf(_Bool b) {
  if (b)
    ;
  if (b) {
  }
  if (b)
    ;
  else
    ;
  if (b) {
  } else {
  }
  if (b)
    ;
  else if (b)
    ;
  if (b)
    ;
  else if (b)
    ;
  else
    ;
}


x86 assembly (clang, -O0):
<TestIf>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
and    $0x1,%al
mov    %al,-0x1(%rbp)
testb  $0x1,-0x1(%rbp)
je     111b <TestIf+0x1b>
jmp    111b <TestIf+0x1b>
testb  $0x1,-0x1(%rbp)
je     112a <TestIf+0x2a>
jmp    112a <TestIf+0x2a>
testb  $0x1,-0x1(%rbp)
je     1139 <TestIf+0x39>
jmp    113e <TestIf+0x3e>
jmp    113e <TestIf+0x3e>
testb  $0x1,-0x1(%rbp)
je     114d <TestIf+0x4d>
jmp    1152 <TestIf+0x52>
jmp    1152 <TestIf+0x52>
testb  $0x1,-0x1(%rbp)
je     1161 <TestIf+0x61>
jmp    1175 <TestIf+0x75>
testb  $0x1,-0x1(%rbp)
je     1170 <TestIf+0x70>
jmp    1170 <TestIf+0x70>
jmp    1175 <TestIf+0x75>
testb  $0x1,-0x1(%rbp)
je     1184 <TestIf+0x84>
jmp    119d <TestIf+0x9d>
testb  $0x1,-0x1(%rbp)
je     1193 <TestIf+0x93>
jmp    1198 <TestIf+0x98>
jmp    1198 <TestIf+0x98>
jmp    119d <TestIf+0x9d>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TestIf>:
ret

LLVM IR (-O0):
define void @TestIf(i1 zeroext %0) {
%2 = alloca i8
%3 = zext i1 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = trunc i8 %4 to i1
br i1 %5, label %6, label %7
6: ; preds = %1
br label %7
7: ; preds = %6, %1
%8 = load i8, i8* %2
%9 = trunc i8 %8 to i1
br i1 %9, label %10, label %11
10: ; preds = %7
br label %11
11: ; preds = %10, %7
%12 = load i8, i8* %2
%13 = trunc i8 %12 to i1
br i1 %13, label %14, label %15
14: ; preds = %11
br label %16
15: ; preds = %11
br label %16
16: ; preds = %15, %14
%17 = load i8, i8* %2
%18 = trunc i8 %17 to i1
br i1 %18, label %19, label %20
19: ; preds = %16
br label %21
20: ; preds = %16
br label %21
21: ; preds = %20, %19
%22 = load i8, i8* %2
%23 = trunc i8 %22 to i1
br i1 %23, label %24, label %25
24: ; preds = %21
br label %30
25: ; preds = %21
%26 = load i8, i8* %2
%27 = trunc i8 %26 to i1
br i1 %27, label %28, label %29
28: ; preds = %25
br label %29
29: ; preds = %28, %25
br label %30
30: ; preds = %29, %24
%31 = load i8, i8* %2
%32 = trunc i8 %31 to i1
br i1 %32, label %33, label %34
33: ; preds = %30
br label %40
34: ; preds = %30
%35 = load i8, i8* %2
%36 = trunc i8 %35 to i1
br i1 %36, label %37, label %38
37: ; preds = %34
br label %39
38: ; preds = %34
br label %39
39: ; preds = %38, %37
br label %40
40: ; preds = %39, %33
ret void
}

LLVM IR (-O2):
define void @TestIf(i1 zeroext %0) {
ret void
}
/* Variables and functions */
double atof(char const *);
double c_atof(const char *str) { return atof(str); }


x86 assembly (clang, -O0):
<c_atof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <atof@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_atof>:
jmp    1030 <atof@plt>

LLVM IR (-O0):
define double @c_atof(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call double @atof(i8* %3)
ret double %4
}

LLVM IR (-O2):
define double @c_atof(i8* nocapture %0) {
%2 = tail call double @atof(i8* %0)
ret double %2
}
/* Variables and functions */
int GCD(int, int);
int GCDNums(int *A, int n) {
  if (n == 1)
    return *A;
  return GCD(A[n - 1], GCDNums(A, n - 1));
}


x86 assembly (clang, -O0):
<GCDNums>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    1147 <GCDNums+0x27>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1176 <GCDNums+0x56>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
sub    $0x1,%esi
call   1040 <GCDNums@plt>
mov    -0x18(%rbp),%edi
mov    %eax,%esi
call   1030 <GCD@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GCDNums>:
push   %rbx
cmp    $0x1,%esi
jne    112a <GCDNums+0xa>
mov    (%rdi),%eax
pop    %rbx
ret
movslq %esi,%rax
add    $0xffffffff,%esi
mov    -0x4(%rdi,%rax,4),%ebx
call   1040 <GCDNums@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <GCD@plt>

LLVM IR (-O0):
define i32 @GCDNums(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
store i32 %10, i32* %3
br label %23
11: ; preds = %2
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = sub nsw i32 %13, 1
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %12, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sub nsw i32 %19, 1
%21 = call i32 @GCDNums(i32* %18, i32 %20)
%22 = call i32 @GCD(i32 %17, i32 %21)
store i32 %22, i32* %3
br label %23
23: ; preds = %11, %8
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @GCDNums(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* %0
br label %6
6: ; preds = %4, %8
%7 = phi i32 [ %14, %8 ], [ %5, %4 ]
ret i32 %7
8: ; preds = %2
%9 = add nsw i32 %1, -1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = tail call i32 @GCDNums(i32* %0, i32 %9)
%14 = tail call i32 @GCD(i32 %12, i32 %13)
br label %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 10;
  int *b = &a;
  int *c;
  c = &a;
  printf("a=%d\n", a);
  printf("b=%d\n", *b);
  printf("c=%d\n", *c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"a=%d\0A\00"
@.str.1 = [6 x i8] c"b=%d\0A\00"
@.str.2 = [6 x i8] c"c=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32*
store i32 0, i32* %1
store i32 10, i32* %2
store i32* %2, i32** %3
store i32* %2, i32** %4
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32*, i32** %4
%11 = load i32, i32* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"a=%d\0A\00"
@.str.1 = [6 x i8] c"b=%d\0A\00"
@.str.2 = [6 x i8] c"c=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 10)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 10)
ret i32 0
}
int st_internal_strhash(string)
register const char *string;
{
  register int c;
  register int val = 0;
  while ((c = *string++) != '\0') {
    val = val * 997 + c;
  }
  return val + (val >> 5);
}


x86 assembly (clang, -O0):
<st_internal_strhash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     113f <st_internal_strhash+0x3f>
imul   $0x3e5,-0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    110f <st_internal_strhash+0xf>
mov    -0x10(%rbp),%eax
mov    -0x10(%rbp),%ecx
sar    $0x5,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<st_internal_strhash>:
mov    (%rdi),%al
test   %al,%al
je     1128 <st_internal_strhash+0x28>
add    $0x1,%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
movsbl %al,%eax
imul   $0x3e5,%ecx,%ecx
add    %eax,%ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <st_internal_strhash+0x10>
jmp    112a <st_internal_strhash+0x2a>
xor    %ecx,%ecx
mov    %ecx,%eax
sar    $0x5,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @st_internal_strhash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %4
br label %5
5: ; preds = %11, %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %2
%8 = load i8, i8* %6
%9 = sext i8 %8 to i32
store i32 %9, i32* %3
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %5
%12 = load i32, i32* %4
%13 = mul nsw i32 %12, 997
%14 = load i32, i32* %3
%15 = add nsw i32 %13, %14
store i32 %15, i32* %4
br label %5
16: ; preds = %5
%17 = load i32, i32* %4
%18 = load i32, i32* %4
%19 = ashr i32 %18, 5
%20 = add nsw i32 %17, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @st_internal_strhash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = mul nsw i32 %6, 997
%11 = add nsw i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
%16 = ashr i32 %15, 5
%17 = add nsw i32 %16, %15
ret i32 %17
}
/* Variables and functions */
int f135(int *);
int f136(int *p) { return f135(p); }


x86 assembly (clang, -O0):
<f136>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <f135@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f136>:
jmp    1030 <f135@plt>

LLVM IR (-O0):
define i32 @f136(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @f135(i32* %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @f136(i32* %0) {
%2 = tail call i32 @f135(i32* %0)
ret i32 %2
}
int isHighOrderBitSet(char byte) {
  int result = byte & 255;
  int hobIsSet = 0;
  if (result > 0)
    hobIsSet = 1;
  return hobIsSet;
}


x86 assembly (clang, -O0):
<isHighOrderBitSet>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    112e <isHighOrderBitSet+0x2e>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isHighOrderBitSet>:
xor    %eax,%eax
test   %dil,%dil
setne  %al
ret

LLVM IR (-O0):
define i32 @isHighOrderBitSet(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
store i8 %0, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = and i32 %6, 255
store i32 %7, i32* %3
store i32 0, i32* %4
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 1, i32* %4
br label %11
11: ; preds = %10, %1
%12 = load i32, i32* %4
ret i32 %12
}

LLVM IR (-O2):
define i32 @isHighOrderBitSet(i8 signext %0) {
%2 = icmp ne i8 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
void mdp4_lcdc_pipe_queue(int cndx, struct mdp4_overlay_pipe *pipe) {}


x86 assembly (clang, -O0):
<mdp4_lcdc_pipe_queue>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdp4_lcdc_pipe_queue>:
ret

LLVM IR (-O0):
%struct.mdp4_overlay_pipe = type opaque
define void @mdp4_lcdc_pipe_queue(i32 %0, %struct.mdp4_overlay_pipe* %1) {
%3 = alloca i32
%4 = alloca %struct.mdp4_overlay_pipe*
store i32 %0, i32* %3
store %struct.mdp4_overlay_pipe* %1, %struct.mdp4_overlay_pipe** %4
ret void
}

LLVM IR (-O2):
%struct.mdp4_overlay_pipe = type opaque
define void @mdp4_lcdc_pipe_queue(i32 %0, %struct.mdp4_overlay_pipe* nocapture %1) {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ dbg_set_chain(int /*<<< orphan*/);
int /*<<< orphan*/ get_response_from_vpi();
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ send_block_data_to_vpi(int, int *);
int /*<<< orphan*/ send_command_to_vpi(int);
int /*<<< orphan*/ send_data_to_vpi(int);
int dbg_wb_write_block32(uint32_t adr, uint32_t *data, int len) {
  if (0)
    printf("dbg_wb_block32: adr 0x%.8x len %d bytes\n", adr, len);
  dbg_set_chain(0);
  send_command_to_vpi(0x9);
  send_data_to_vpi(adr);
  send_data_to_vpi(len);
  send_block_data_to_vpi(len, data);
  get_response_from_vpi();
  return 0;
}


x86 assembly (clang, -O0):
<dbg_wb_write_block32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %edi,%edi
call   1050 <dbg_set_chain@plt>
mov    $0x9,%edi
call   1030 <send_command_to_vpi@plt>
mov    -0x4(%rbp),%edi
call   1070 <send_data_to_vpi@plt>
mov    -0x14(%rbp),%edi
call   1070 <send_data_to_vpi@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <send_block_data_to_vpi@plt>
mov    $0x0,%al
call   1060 <get_response_from_vpi@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbg_wb_write_block32>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %rsi,%r14
mov    %edi,%ebp
xor    %edi,%edi
call   1050 <dbg_set_chain@plt>
mov    $0x9,%edi
call   1030 <send_command_to_vpi@plt>
mov    %ebp,%edi
call   1070 <send_data_to_vpi@plt>
mov    %ebx,%edi
call   1070 <send_data_to_vpi@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1040 <send_block_data_to_vpi@plt>
xor    %eax,%eax
call   1060 <get_response_from_vpi@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @dbg_wb_write_block32(i32 %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = call i32 @dbg_set_chain(i32 0)
%8 = call i32 @send_command_to_vpi(i32 9)
%9 = load i32, i32* %4
%10 = call i32 @send_data_to_vpi(i32 %9)
%11 = load i32, i32* %6
%12 = call i32 @send_data_to_vpi(i32 %11)
%13 = load i32, i32* %6
%14 = load i32*, i32** %5
%15 = call i32 @send_block_data_to_vpi(i32 %13, i32* %14)
%16 = call i32 (...) @get_response_from_vpi()
ret i32 0
}

LLVM IR (-O2):
define i32 @dbg_wb_write_block32(i32 %0, i32* %1, i32 %2) {
%4 = tail call i32 @dbg_set_chain(i32 0)
%5 = tail call i32 @send_command_to_vpi(i32 9)
%6 = tail call i32 @send_data_to_vpi(i32 %0)
%7 = tail call i32 @send_data_to_vpi(i32 %2)
%8 = tail call i32 @send_block_data_to_vpi(i32 %2, i32* %1)
%9 = tail call i32 (...) @get_response_from_vpi()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ deen_log_error_and_exit(char *);
scalar_t__ realloc(void *, size_t);
void *deen_erealloc(void *ptr, size_t size) {
  void *r = (void *)realloc(ptr, size);
  if (NULL == r) {
    deen_log_error_and_exit("memory exhaustion on realloc");
  }
  return r;
}


x86 assembly (clang, -O0):
<deen_erealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
jne    1159 <deen_erealloc+0x39>
lea    0xeac(%rip),%rdi
call   1030 <deen_log_error_and_exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deen_erealloc>:
push   %rbx
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <deen_erealloc+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <deen_log_error_and_exit@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"memory exhaustion on realloc\00"
define i8* @deen_erealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i64 @realloc(i8* %6, i64 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp eq i8* null, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @deen_log_error_and_exit(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
@.str = [29 x i8] c"memory exhaustion on realloc\00"
define i8* @deen_erealloc(i8* %0, i64 %1) {
%3 = tail call i64 @realloc(i8* %0, i64 %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @deen_log_error_and_exit(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
%8 = inttoptr i64 %3 to i8*
ret i8* %8
}
/* Type definitions */
typedef int /*<<< orphan*/ signum;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, int);
char const *sigstr(int sign) {
  static char signum[4];
  snprintf(signum, sizeof(signum), "%d", sign);
  return signum;
}


x86 assembly (clang, -O0):
<sigstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0x2f04(%rip),%rdi
mov    $0x4,%esi
lea    0xecf(%rip),%rdx
call   1030 <snprintf@plt>
lea    0x2eec(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigstr>:
push   %rbx
mov    %edi,%ecx
lea    0x2f0f(%rip),%rbx
lea    0xedf(%rip),%rdx
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@sigstr.signum = internal global [4 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @sigstr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @snprintf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @sigstr.signum, i64 0, i64 0), i32 4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @sigstr.signum, i64 0, i64 0)
}

LLVM IR (-O2):
@sigstr.signum = internal global [4 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @sigstr(i32 %0) {
%2 = tail call i32 @snprintf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @sigstr.signum, i64 0, i64 0), i32 4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @sigstr.signum, i64 0, i64 0)
}
/* Variables and functions */
int core7_safe(char const *);
int U_EMRMOVETOEX_safe(const char *record) { return (core7_safe(record)); }


x86 assembly (clang, -O0):
<U_EMRMOVETOEX_safe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <core7_safe@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_EMRMOVETOEX_safe>:
jmp    1030 <core7_safe@plt>

LLVM IR (-O0):
define i32 @U_EMRMOVETOEX_safe(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @core7_safe(i8* %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @U_EMRMOVETOEX_safe(i8* %0) {
%2 = tail call i32 @core7_safe(i8* %0)
ret i32 %2
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ basic_test(int);
int /*<<< orphan*/ cleanup_test();
int /*<<< orphan*/ init_test();
int log_read_middle(int);
void read_one_meg_middle(void) {
  ssize_t n;
  init_test();
  n = log_read_middle(1048576);
  basic_test(n == 1048576);
  cleanup_test();
}


x86 assembly (clang, -O0):
<read_one_meg_middle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <init_test@plt>
mov    $0x100000,%edi
call   1040 <log_read_middle@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x100000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <basic_test@plt>
mov    $0x0,%al
call   1050 <cleanup_test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_one_meg_middle>:
push   %rax
xor    %eax,%eax
call   1060 <init_test@plt>
mov    $0x100000,%edi
call   1040 <log_read_middle@plt>
xor    %edi,%edi
cmp    $0x100000,%eax
sete   %dil
call   1030 <basic_test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <cleanup_test@plt>

LLVM IR (-O0):
define void @read_one_meg_middle() {
%1 = alloca i32
%2 = call i32 (...) @init_test()
%3 = call i32 @log_read_middle(i32 1048576)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 1048576
%6 = zext i1 %5 to i32
%7 = call i32 @basic_test(i32 %6)
%8 = call i32 (...) @cleanup_test()
ret void
}

LLVM IR (-O2):
define void @read_one_meg_middle() {
%1 = tail call i32 (...) @init_test()
%2 = tail call i32 @log_read_middle(i32 1048576)
%3 = icmp eq i32 %2, 1048576
%4 = zext i1 %3 to i32
%5 = tail call i32 @basic_test(i32 %4)
%6 = tail call i32 (...) @cleanup_test()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printit(int *x, int n) {
  int i;
  for (i = 0; i < n; i++) {
    printf("%i ", x[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <printit+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printit+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printit>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printit+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printit+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%i \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @printit(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%i \00"
define void @printit(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int fwrite(unsigned short *, int, int, int /*<<< orphan*/ *);
int copyFat(int fatPos, int fatClusterSize, FILE *file, unsigned short *cfat) {
  fseek(file, fatPos, SEEK_SET);
  int ret = fwrite(cfat, 2, fatClusterSize, file);
  return 1;
}


x86 assembly (clang, -O0):
<copyFat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    0x2e9c(%rip),%rax
mov    (%rax),%edx
call   1030 <fseek@plt>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    $0x2,%esi
call   1040 <fwrite@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copyFat>:
push   %rbp
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %edi,%esi
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
call   1030 <fseek@plt>
mov    %r14,%rdi
mov    $0x2,%esi
mov    %ebp,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@SEEK_SET = global i32 0
define i32 @copyFat(i32 %0, i32 %1, i32* %2, i16* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i16*
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i16* %3, i16** %8
%10 = load i32*, i32** %7
%11 = load i32, i32* %5
%12 = load i32, i32* @SEEK_SET
%13 = call i32 @fseek(i32* %10, i32 %11, i32 %12)
%14 = load i16*, i16** %8
%15 = load i32, i32* %6
%16 = load i32*, i32** %7
%17 = call i32 @fwrite(i16* %14, i32 2, i32 %15, i32* %16)
store i32 %17, i32* %9
ret i32 1
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define i32 @copyFat(i32 %0, i32 %1, i32* nocapture %2, i16* nocapture %3) {
%5 = load i32, i32* @SEEK_SET
%6 = tail call i32 @fseek(i32* %2, i32 %0, i32 %5)
%7 = tail call i32 @fwrite(i16* %3, i32 2, i32 %1, i32* %2)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *);
void *print_it(void *data) {
  const char **strings = (const char **)data;
  printf("%s from %s!\n", strings[0], strings[1]);
  return 0;
}


x86 assembly (clang, -O0):
<print_it>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_it>:
push   %rax
mov    (%rdi),%rsi
mov    0x8(%rdi),%rdx
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%s from %s!\0A\00"
define i8* @print_it(i8* %0) {
%2 = alloca i8*
%3 = alloca i8**
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i8**
store i8** %5, i8*** %3
%6 = load i8**, i8*** %3
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = load i8**, i8*** %3
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %11)
ret i8* null
}

LLVM IR (-O2):
@.str = [13 x i8] c"%s from %s!\0A\00"
define noalias i8* @print_it(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %0, i64 8
%5 = bitcast i8* %4 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %6)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ lua_call(char *, int);
int /*<<< orphan*/ lua_getparam(int);
int /*<<< orphan*/ lua_pushobject(int /*<<< orphan*/);
void test(void) {
  lua_pushobject(lua_getparam(1));
  lua_call("c", 1);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1040 <lua_getparam@plt>
mov    %eax,%edi
call   1050 <lua_pushobject@plt>
lea    0xeb4(%rip),%rdi
mov    $0x1,%esi
call   1030 <lua_call@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    $0x1,%edi
call   1040 <lua_getparam@plt>
mov    %eax,%edi
call   1050 <lua_pushobject@plt>
lea    0xeb7(%rip),%rdi
mov    $0x1,%esi
pop    %rax
jmp    1030 <lua_call@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"c\00"
define void @test() {
%1 = call i32 @lua_getparam(i32 1)
%2 = call i32 @lua_pushobject(i32 %1)
%3 = call i32 @lua_call(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"c\00"
define void @test() {
%1 = tail call i32 @lua_getparam(i32 1)
%2 = tail call i32 @lua_pushobject(i32 %1)
%3 = tail call i32 @lua_call(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
int test_imm_46uint8_reg(unsigned char val) {
  return ((val) & (0x46 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_46uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x46,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_46uint8_reg>:
test   $0x46,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_46uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 70
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_46uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 70
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
char const *rt_addr_n2a(int, int, void const *, char *, int);
const char *format_host(int af, int len, const void *addr, char *buf,
                        int buflen) {
  return rt_addr_n2a(af, len, addr, buf, buflen);
}


x86 assembly (clang, -O0):
<format_host>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
call   1030 <rt_addr_n2a@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<format_host>:
jmp    1030 <rt_addr_n2a@plt>

LLVM IR (-O0):
define i8* @format_host(i32 %0, i32 %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i8*, i8** %8
%14 = load i8*, i8** %9
%15 = load i32, i32* %10
%16 = call i8* @rt_addr_n2a(i32 %11, i32 %12, i8* %13, i8* %14, i32 %15)
ret i8* %16
}

LLVM IR (-O2):
define i8* @format_host(i32 %0, i32 %1, i8* %2, i8* %3, i32 %4) {
%6 = tail call i8* @rt_addr_n2a(i32 %0, i32 %1, i8* %2, i8* %3, i32 %4)
ret i8* %6
}
int fn4(int a, int b) {
  int tem1 = b + a;
  int tem2 = b | a;
  return tem1 - tem2;
}


x86 assembly (clang, -O0):
<fn4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn4>:
mov    %edi,%eax
and    %esi,%eax
ret

LLVM IR (-O0):
define i32 @fn4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = add nsw i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = or i32 %10, %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = sub nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @fn4(i32 %0, i32 %1) {
%3 = and i32 %1, %0
ret i32 %3
}
void foo1(void) {}


x86 assembly (clang, -O0):
<foo1>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo1>:
ret

LLVM IR (-O0):
define void @foo1() {
ret void
}

LLVM IR (-O2):
define void @foo1() {
ret void
}
int xfuse_add_clip_dir_item(char *filename, int flags, int size, int lindex) {
  return 0;
}


x86 assembly (clang, -O0):
<xfuse_add_clip_dir_item>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xfuse_add_clip_dir_item>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @xfuse_add_clip_dir_item(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @xfuse_add_clip_dir_item(i8* nocapture readnone %0, i32 %1, i32 %2, i32 %3) {
ret i32 0
}
void foo415(int p) {}


x86 assembly (clang, -O0):
<foo415>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo415>:
ret

LLVM IR (-O0):
define void @foo415(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @foo415(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
double func_double(double f1, double f2) {
  printf("%f %f\n", f1, f2);
  return f2;
}


x86 assembly (clang, -O0):
<func_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_double>:
push   %rax
movsd  %xmm1,(%rsp)
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%f %f\0A\00"
define double @func_double(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %5, double %6)
%8 = load double, double* %4
ret double %8
}

LLVM IR (-O2):
@.str = [7 x i8] c"%f %f\0A\00"
define double @func_double(double %0, double returned %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %0, double %1)
ret double %1
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void Cyc_dump_begin() {
  ({
    puts(
        "%%HEVEA "
        "\\begin{latexonly}\n\\begin{list}{}{\\setlength\\itemsep{0pt}"
        "\\setlength\\topsep{0pt}\\setlength\\leftmargin{\\parindent}"
        "\\setlength\\itemindent{-\\leftmargin}}\\item[]\\colorbox{"
        "cycdochighlight}{\\ttfamily\\begin{minipage}[b]{\\textwidth}\n%%HEVEA "
        "\\end{latexonly}\n%%HEVEA \\begin{rawhtml}<dl><dt><table><tr><td "
        "bgcolor=\"c0d0ff\">\\end{rawhtml}\n\\begin{tabbing}");
  });
}


x86 assembly (clang, -O0):
<Cyc_dump_begin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <puts@plt>
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_dump_begin>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [347 x i8] c"%%HEVEA \\begin{latexonly}\0A\\begin{list}{}{\\setlength\\itemsep{0pt}\\setlength\\topsep{0pt}\\setlength\\leftmargin{\\parindent}\\setlength\\itemindent{-\\leftmargin}}\\item[]\\colorbox{cycdochighlight}{\\ttfamily\\begin{minipage}[b]{\\textwidth}\0A%%HEVEA \\end{latexonly}\0A%%HEVEA \\begin{rawhtml}<dl><dt><table><tr><td bgcolor=\22c0d0ff\22>\\end{rawhtml}\0A\\begin{tabbing}\00"
define void @Cyc_dump_begin() {
%1 = alloca i32
%2 = call i32 @puts(i8* getelementptr inbounds ([347 x i8], [347 x i8]* @.str, i64 0, i64 0))
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret void
}

LLVM IR (-O2):
@.str = [347 x i8] c"%%HEVEA \\begin{latexonly}\0A\\begin{list}{}{\\setlength\\itemsep{0pt}\\setlength\\topsep{0pt}\\setlength\\leftmargin{\\parindent}\\setlength\\itemindent{-\\leftmargin}}\\item[]\\colorbox{cycdochighlight}{\\ttfamily\\begin{minipage}[b]{\\textwidth}\0A%%HEVEA \\end{latexonly}\0A%%HEVEA \\begin{rawhtml}<dl><dt><table><tr><td bgcolor=\22c0d0ff\22>\\end{rawhtml}\0A\\begin{tabbing}\00"
define void @Cyc_dump_begin() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([347 x i8], [347 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *GetConfigValue(char const *, char const *, char *);
int strtol(char const *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int ConfigValueInt(const char *blockName, const char *keyName, int *ret) {
  const char *val = GetConfigValue(blockName, keyName, "");
  if (!val[0])
    return 0;
  *ret = strtol(val, NULL, 0);
  return 1;
}


x86 assembly (clang, -O0):
<ConfigValueInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xebd(%rip),%rdx
call   1040 <GetConfigValue@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1165 <ConfigValueInt+0x45>
movl   $0x0,-0x4(%rbp)
jmp    1183 <ConfigValueInt+0x63>
mov    -0x28(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <strtol@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConfigValueInt>:
push   %rbx
mov    %rdx,%rbx
lea    0xed5(%rip),%rdx
call   1040 <GetConfigValue@plt>
cmpb   $0x0,(%rax)
je     114a <ConfigValueInt+0x2a>
mov    %rax,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <strtol@plt>
mov    %eax,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @ConfigValueInt(i8* %0, i8* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32* %2, i32** %7
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i8* @GetConfigValue(i8* %9, i8* %10, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i8* %11, i8** %8
%12 = load i8*, i8** %8
%13 = getelementptr inbounds i8, i8* %12, i64 0
%14 = load i8, i8* %13
%15 = icmp ne i8 %14, 0
br i1 %15, label %17, label %16
16: ; preds = %3
store i32 0, i32* %4
br label %21
17: ; preds = %3
%18 = load i8*, i8** %8
%19 = call i32 @strtol(i8* %18, i32* null, i32 0)
%20 = load i32*, i32** %7
store i32 %19, i32* %20
store i32 1, i32* %4
br label %21
21: ; preds = %17, %16
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @ConfigValueInt(i8* %0, i8* %1, i32* nocapture writeonly %2) {
%4 = tail call i8* @GetConfigValue(i8* %0, i8* %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 @strtol(i8* nocapture %4, i32* null, i32 0)
store i32 %8, i32* %2
br label %9
9: ; preds = %3, %7
%10 = phi i32 [ 1, %7 ], [ 0, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xdb() {
  Assert_real((ispunct(219) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              1100, ("ispunct should be 0 for 0xdb"));
}


x86 assembly (clang, -O0):
<t_ispunct_0xdb>:
push   %rbp
mov    %rsp,%rbp
mov    $0xdb,%edi
call   1030 <ispunct@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x44c,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0xdb>:
push   %rax
mov    $0xdb,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x44c,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xdb\00"
define void @t_ispunct_0xdb() {
%1 = call i64 @ispunct(i32 219)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1100, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xdb\00"
define void @t_ispunct_0xdb() {
%1 = tail call i64 @ispunct(i32 219)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1100, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int main(int, char **, char **);
void _start(void) {
  int argc = 1;
  char *argv[0];
  char *envp[0];
  int res;
  res = main(argc, argv, envp);
  exit(res);
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <main@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<_start>:
push   %rax
mov    %rsp,%rdx
mov    $0x1,%edi
mov    %rdx,%rsi
call   1030 <main@plt>
mov    %eax,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @_start() {
%1 = alloca i32
%2 = alloca [0 x i8*]
%3 = alloca [0 x i8*]
%4 = alloca i32
store i32 1, i32* %1
%5 = load i32, i32* %1
%6 = getelementptr inbounds [0 x i8*], [0 x i8*]* %2, i64 0, i64 0
%7 = getelementptr inbounds [0 x i8*], [0 x i8*]* %3, i64 0, i64 0
%8 = call i32 @main(i32 %5, i8** %6, i8** %7)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = call i32 @exit(i32 %9)
unreachable
}

LLVM IR (-O2):
define void @_start() {
%1 = alloca [0 x i8*]
%2 = bitcast [0 x i8*]* %1 to i8*
%3 = getelementptr inbounds [0 x i8*], [0 x i8*]* %1, i64 0, i64 0
%4 = call i32 @main(i32 1, i8** %3, i8** %3)
%5 = call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
double InGamma(long, double);
double cdfChisquare(long n, double x) { return (InGamma(n / 2.0, x / 2)); }


x86 assembly (clang, -O0):
<cdfChisquare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  0xed1(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
movsd  -0x10(%rbp),%xmm0
movsd  0xebb(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <InGamma@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdfChisquare>:
cvtsi2sd %rdi,%xmm1
movsd  0xee3(%rip),%xmm2
mulsd  %xmm2,%xmm1
cvttsd2si %xmm1,%rdi
mulsd  %xmm2,%xmm0
jmp    1030 <InGamma@plt>

LLVM IR (-O0):
define double @cdfChisquare(i64 %0, double %1) {
%3 = alloca i64
%4 = alloca double
store i64 %0, i64* %3
store double %1, double* %4
%5 = load i64, i64* %3
%6 = sitofp i64 %5 to double
%7 = fdiv double %6, 2.000000e+00
%8 = fptosi double %7 to i64
%9 = load double, double* %4
%10 = fdiv double %9, 2.000000e+00
%11 = call double @InGamma(i64 %8, double %10)
ret double %11
}

LLVM IR (-O2):
define double @cdfChisquare(i64 %0, double %1) {
%3 = sitofp i64 %0 to double
%4 = fmul double %3, 5.000000e-01
%5 = fptosi double %4 to i64
%6 = fmul double %1, 5.000000e-01
%7 = tail call double @InGamma(i64 %5, double %6)
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ ds_set_boolean(int /*<<< orphan*/, int, int);
void snmp_set_mib_comment_term(int save) { ds_set_boolean(0, 2, save); }


x86 assembly (clang, -O0):
<snmp_set_mib_comment_term>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
xor    %edi,%edi
mov    $0x2,%esi
call   1030 <ds_set_boolean@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<snmp_set_mib_comment_term>:
mov    %edi,%edx
xor    %edi,%edi
mov    $0x2,%esi
jmp    1030 <ds_set_boolean@plt>

LLVM IR (-O0):
define void @snmp_set_mib_comment_term(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ds_set_boolean(i32 0, i32 2, i32 %3)
ret void
}

LLVM IR (-O2):
define void @snmp_set_mib_comment_term(i32 %0) {
%2 = tail call i32 @ds_set_boolean(i32 0, i32 2, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ replace_char(char *, char, char);
int /*<<< orphan*/ shm_unlink(char const *);
int /*<<< orphan*/ strcpy(char *, char const *);
void destroy_shared_memory(const char *name) {
  char mem_name[255];
  mem_name[0] = '/';
  strcpy(mem_name + 1, name);
  replace_char(mem_name, '/', '_');
  shm_unlink(name);
}


x86 assembly (clang, -O0):
<destroy_shared_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
movb   $0x2f,-0x110(%rbp)
lea    -0x110(%rbp),%rdi
add    $0x1,%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x110(%rbp),%rdi
mov    $0x2f,%esi
mov    $0x5f,%edx
call   1040 <replace_char@plt>
mov    -0x8(%rbp),%rdi
call   1050 <shm_unlink@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_shared_memory>:
push   %rbx
sub    $0x100,%rsp
mov    %rdi,%rbx
movb   $0x2f,(%rsp)
lea    0x1(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %rsp,%rdi
mov    $0x2f,%esi
mov    $0x5f,%edx
call   1040 <replace_char@plt>
mov    %rbx,%rdi
call   1050 <shm_unlink@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @destroy_shared_memory(i8* %0) {
%2 = alloca i8*
%3 = alloca [255 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
store i8 47, i8* %4
%5 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8*, i8** %2
%8 = call i32 @strcpy(i8* %6, i8* %7)
%9 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%10 = call i32 @replace_char(i8* %9, i8 signext 47, i8 signext 95)
%11 = load i8*, i8** %2
%12 = call i32 @shm_unlink(i8* %11)
ret void
}

LLVM IR (-O2):
define void @destroy_shared_memory(i8* %0) {
%2 = alloca [255 x i8]
%3 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
store i8 47, i8* %3
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 1
%5 = call i32 @strcpy(i8* %4, i8* %0)
%6 = call i32 @replace_char(i8* %3, i8 signext 47, i8 signext 95)
%7 = call i32 @shm_unlink(i8* %0)
ret void
}
int Fah2Cel(int fahr) { return (5 * (fahr - 32) / 9); }


x86 assembly (clang, -O0):
<Fah2Cel>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x20,%eax
imul   $0x5,%eax,%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fah2Cel>:
lea    (%rdi,%rdi,4),%eax
add    $0xffffff60,%eax
cltq
imul   $0x38e38e39,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @Fah2Cel(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 32
%5 = mul nsw i32 5, %4
%6 = sdiv i32 %5, 9
ret i32 %6
}

LLVM IR (-O2):
define i32 @Fah2Cel(i32 %0) {
%2 = mul i32 %0, 5
%3 = add i32 %2, -160
%4 = sdiv i32 %3, 9
ret i32 %4
}