xunge/DecIR huggingface dataset:
/* Type definitions */
struct ts_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct ts_node *);
int /*<<< orphan*/ ts_destroy_node(struct ts_node *);
void ts_free_node(struct ts_node *node) {
  ts_destroy_node(node);
  free(node);
}


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

x86 assembly (clang, -O2):
<ts_free_node>:
push   %rbx
mov    %rdi,%rbx
call   1040 <ts_destroy_node@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.ts_node = type { i32 }
define void @ts_free_node(%struct.ts_node* %0) {
%2 = alloca %struct.ts_node*
store %struct.ts_node* %0, %struct.ts_node** %2
%3 = load %struct.ts_node*, %struct.ts_node** %2
%4 = call i32 @ts_destroy_node(%struct.ts_node* %3)
%5 = load %struct.ts_node*, %struct.ts_node** %2
%6 = call i32 @free(%struct.ts_node* %5)
ret void
}

LLVM IR (-O2):
%struct.ts_node = type { i32 }
define void @ts_free_node(%struct.ts_node* %0) {
%2 = tail call i32 @ts_destroy_node(%struct.ts_node* %0)
%3 = tail call i32 @free(%struct.ts_node* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalpha(int);
void t_isalpha_0x55() {
  Assert_real((isalpha(85)),
              "/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_isalpha.c",
              430, ("isalpha should be 1 for U"));
}


x86 assembly (clang, -O0):
<t_isalpha_0x55>:
push   %rbp
mov    %rsp,%rbp
mov    $0x55,%edi
call   1030 <isalpha@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x1ae,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalpha_0x55>:
push   %rax
mov    $0x55,%edi
call   1030 <isalpha@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1ae,%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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for U\00"
define void @t_isalpha_0x55() {
%1 = call i32 @isalpha(i32 85)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 430, i8* getelementptr inbounds ([26 x i8], [26 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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for U\00"
define void @t_isalpha_0x55() {
%1 = tail call i32 @isalpha(i32 85)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 430, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int, int, int);
void drawArc(int x, int y, int width, int height, int startAngle,
             int arcAngle) {
  printf("DA %i %i %i %i %i %i\n", x, y, width, height, startAngle, arcAngle);
}


x86 assembly (clang, -O0):
<drawArc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%eax
lea    0xeb9(%rip),%rdi
mov    %eax,(%rsp)
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawArc>:
push   %rax
mov    %r8d,%eax
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    %r9d,(%rsp)
lea    0xed8(%rip),%rdi
mov    %eax,%r9d
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [22 x i8] c"DA %i %i %i %i %i %i\0A\00"
define void @drawArc(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load i32, i32* %12
%19 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, i32 %15, i32 %16, i32 %17, i32 %18)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"DA %i %i %i %i %i %i\0A\00"
define void @drawArc(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5)
ret void
}
/* Variables and functions */
char **QuickSortEnhancedString_m(char **, int, int, char *, int /*<<< orphan*/);
char **SortStringNumerically_m(char **sorted, int sortedTot, int startIndices,
                               char *indicesPath) {
  return QuickSortEnhancedString_m(sorted, sortedTot, startIndices, indicesPath,
                                   0);
}


x86 assembly (clang, -O0):
<SortStringNumerically_m>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <QuickSortEnhancedString_m@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SortStringNumerically_m>:
xor    %r8d,%r8d
jmp    1030 <QuickSortEnhancedString_m@plt>

LLVM IR (-O0):
define i8** @SortStringNumerically_m(i8** %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i8** %0, i8*** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i8**, i8*** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call i8** @QuickSortEnhancedString_m(i8** %9, i32 %10, i32 %11, i8* %12, i32 0)
ret i8** %13
}

LLVM IR (-O2):
define i8** @SortStringNumerically_m(i8** %0, i32 %1, i32 %2, i8* %3) {
%5 = tail call i8** @QuickSortEnhancedString_m(i8** %0, i32 %1, i32 %2, i8* %3, i32 0)
ret i8** %5
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t max(uint32_t a, uint32_t b) {
  if (a > b) {
    return a;
  } else {
    return b;
  }
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1127 <max+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <max+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @max(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %4
%7 = load i64, i64* %5
%8 = icmp sgt i64 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i64, i64* %4
store i64 %10, i64* %3
br label %13
11: ; preds = %2
%12 = load i64, i64* %5
store i64 %12, i64* %3
br label %13
13: ; preds = %11, %9
%14 = load i64, i64* %3
ret i64 %14
}

LLVM IR (-O2):
define i64 @max(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int __uportsys_socket2(int, int, int, int *, int /*<<< orphan*/ *);
int /*<<< orphan*/ errno;
int socket2(int domain, int type, int protocol, int *sds) {
  return __uportsys_socket2(domain, type, protocol, sds, &errno);
}


x86 assembly (clang, -O0):
<socket2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    0x2ea7(%rip),%r8
call   1030 <__uportsys_socket2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket2>:
mov    0x2ec9(%rip),%r8
jmp    1030 <__uportsys_socket2@plt>

LLVM IR (-O0):
@errno = global i32 0
define i32 @socket2(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32*, i32** %8
%13 = call i32 @__uportsys_socket2(i32 %9, i32 %10, i32 %11, i32* %12, i32* @errno)
ret i32 %13
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @socket2(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = tail call i32 @__uportsys_socket2(i32 %0, i32 %1, i32 %2, i32* %3, i32* @errno)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ yyparse();
int main() { yyparse(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <yyparse@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <yyparse@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @yyparse()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @yyparse()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sleep(int);
int main(int argc, char *argv[]) {
  int i = 0;
  while (i < 3) {
    printf("%s\n", argv[1]);
    i++;
    sleep(4);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    1173 <main+0x53>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    $0x4,%edi
call   1040 <sleep@plt>
jmp    113d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x8(%rsi),%rsi
lea    0xece(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    $0x4,%edi
call   1040 <sleep@plt>
mov    0x8(%rbx),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    $0x4,%edi
call   1040 <sleep@plt>
mov    0x8(%rbx),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    $0x4,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = tail call i32 @sleep(i32 4)
%7 = load i8*, i8** %3
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = tail call i32 @sleep(i32 4)
%10 = load i8*, i8** %3
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = tail call i32 @sleep(i32 4)
ret i32 0
}
void repeatFn2(void (*f)(void), unsigned int n) {
  while (n-- > 0)
    f();
}


x86 assembly (clang, -O0):
<repeatFn2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jbe    112b <repeatFn2+0x2b>
call   *-0x8(%rbp)
jmp    110f <repeatFn2+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<repeatFn2>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
je     1118 <repeatFn2+0x18>
mov    %esi,%ebx
mov    %rdi,%r14
nopl   (%rax)
call   *%r14
add    $0xffffffff,%ebx
jne    1110 <repeatFn2+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @repeatFn2(void ()* %0, i32 %1) {
%3 = alloca void ()*
%4 = alloca i32
store void ()* %0, void ()** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %9, %2
%6 = load i32, i32* %4
%7 = add i32 %6, -1
store i32 %7, i32* %4
%8 = icmp ugt i32 %6, 0
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = load void ()*, void ()** %3
br label %5
11: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @repeatFn2(void ()* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %8, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %1, %2 ]
%6 = add i32 %5, -1
tail call void %0()
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %4
8: ; preds = %4, %2
ret void
}
/* Type definitions */
struct buffer_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ buffer_list_reset(struct buffer_list *);
int /*<<< orphan*/ free(struct buffer_list *);
void buffer_list_free(struct buffer_list *ol) {
  if (ol) {
    buffer_list_reset(ol);
    free(ol);
  }
}


x86 assembly (clang, -O0):
<buffer_list_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1149 <buffer_list_free+0x29>
mov    -0x8(%rbp),%rdi
call   1040 <buffer_list_reset@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_list_free>:
test   %rdi,%rdi
je     1137 <buffer_list_free+0x17>
push   %rbx
mov    %rdi,%rbx
call   1040 <buffer_list_reset@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.buffer_list = type { i32 }
define void @buffer_list_free(%struct.buffer_list* %0) {
%2 = alloca %struct.buffer_list*
store %struct.buffer_list* %0, %struct.buffer_list** %2
%3 = load %struct.buffer_list*, %struct.buffer_list** %2
%4 = icmp ne %struct.buffer_list* %3, null
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load %struct.buffer_list*, %struct.buffer_list** %2
%7 = call i32 @buffer_list_reset(%struct.buffer_list* %6)
%8 = load %struct.buffer_list*, %struct.buffer_list** %2
%9 = call i32 @free(%struct.buffer_list* %8)
br label %10
10: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.buffer_list = type { i32 }
define void @buffer_list_free(%struct.buffer_list* %0) {
%2 = icmp eq %struct.buffer_list* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @buffer_list_reset(%struct.buffer_list* %0)
%5 = tail call i32 @free(%struct.buffer_list* %0)
br label %6
6: ; preds = %3, %1
ret void
}
void H_Null(struct z26_state *s) {}


x86 assembly (clang, -O0):
<H_Null>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.z26_state = type opaque
define void @H_Null(%struct.z26_state* %0) {
%2 = alloca %struct.z26_state*
store %struct.z26_state* %0, %struct.z26_state** %2
ret void
}

LLVM IR (-O2):
%struct.z26_state = type opaque
define void @H_Null(%struct.z26_state* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char *, char const *);
int has_timestamp(const char *fmt) {
  if (strcmp("%s", fmt) == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<has_timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1142 <has_timestamp+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <has_timestamp+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_timestamp>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @has_timestamp(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @has_timestamp(i8* %0) {
%2 = tail call i64 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printArr(int *arr, int len) {
  int i = 0;
  for (; i < len; i++)
    printf("%d ", arr[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<printArr>:
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 <printArr+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 <printArr+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printArr+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 <printArr+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"%d \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @printArr(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"%d \00"
define void @printArr(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
}
void callee(i) int i;
{ printf("callee: %d\n", i); }


x86 assembly (clang, -O0):
<callee>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<callee>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"callee: %d\0A\00"
define void @callee(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"callee: %d\0A\00"
define void @callee(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ random();
void busy_cycle(void *in) {
  int *cycle;
  cycle = (int *)in;
  int i;
  for (i = 0; i < *cycle; i++)
    random();
}


x86 assembly (clang, -O0):
<busy_cycle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    114f <busy_cycle+0x3f>
mov    $0x0,%al
call   1030 <random@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112b <busy_cycle+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<busy_cycle>:
push   %rbp
push   %rbx
push   %rax
cmpl   $0x0,(%rdi)
jle    112e <busy_cycle+0x1e>
mov    %rdi,%rbx
xor    %ebp,%ebp
nopl   (%rax)
xor    %eax,%eax
call   1030 <random@plt>
add    $0x1,%ebp
cmp    (%rbx),%ebp
jl     1120 <busy_cycle+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @busy_cycle(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i32*
store i32* %6, i32** %3
store i32 0, i32* %4
br label %7
7: ; preds = %14, %1
%8 = load i32, i32* %4
%9 = load i32*, i32** %3
%10 = load i32, i32* %9
%11 = icmp slt i32 %8, %10
br i1 %11, label %12, label %17
12: ; preds = %7
%13 = call i32 (...) @random()
br label %14
14: ; preds = %12
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
br label %7
17: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @busy_cycle(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %1, %5
%6 = phi i32 [ %8, %5 ], [ 0, %1 ]
%7 = tail call i32 (...) @random()
%8 = add nuw nsw i32 %6, 1
%9 = load i32, i32* %2
%10 = icmp slt i32 %8, %9
br i1 %10, label %5, label %11
11: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cbuf_InsertText(char const *);
int Cmd_Argc();
int /*<<< orphan*/ Cmd_Argv(int);
int /*<<< orphan*/ Com_Printf(char *);
char *Cvar_VariableString(int /*<<< orphan*/);
void Cmd_Vstr_f(void) {
  const char *v;
  if (Cmd_Argc() != 2) {
    Com_Printf("vstr <variablename> : execute a variable command\n");
    return;
  }
  v = Cvar_VariableString(Cmd_Argv(1));
  Cbuf_InsertText(v);
}


x86 assembly (clang, -O0):
<Cmd_Vstr_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <Cmd_Argc@plt>
cmp    $0x2,%eax
je     1179 <Cmd_Vstr_f+0x29>
lea    0xe91(%rip),%rdi
call   1050 <Com_Printf@plt>
jmp    1197 <Cmd_Vstr_f+0x47>
mov    $0x1,%edi
call   1060 <Cmd_Argv@plt>
mov    %eax,%edi
call   1070 <Cvar_VariableString@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <Cbuf_InsertText@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cmd_Vstr_f>:
push   %rax
xor    %eax,%eax
call   1030 <Cmd_Argc@plt>
cmp    $0x2,%eax
jne    1177 <Cmd_Vstr_f+0x27>
mov    $0x1,%edi
call   1060 <Cmd_Argv@plt>
mov    %eax,%edi
call   1070 <Cvar_VariableString@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <Cbuf_InsertText@plt>
lea    0xe82(%rip),%rdi
pop    %rax
jmp    1050 <Com_Printf@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"vstr <variablename> : execute a variable command\0A\00"
define void @Cmd_Vstr_f() {
%1 = alloca i8*
%2 = call i32 (...) @Cmd_Argc()
%3 = icmp ne i32 %2, 2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @Com_Printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
br label %11
6: ; preds = %0
%7 = call i32 @Cmd_Argv(i32 1)
%8 = call i8* @Cvar_VariableString(i32 %7)
store i8* %8, i8** %1
%9 = load i8*, i8** %1
%10 = call i32 @Cbuf_InsertText(i8* %9)
br label %11
11: ; preds = %6, %4
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"vstr <variablename> : execute a variable command\0A\00"
define void @Cmd_Vstr_f() {
%1 = tail call i32 (...) @Cmd_Argc()
%2 = icmp eq i32 %1, 2
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @Com_Printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
br label %9
5: ; preds = %0
%6 = tail call i32 @Cmd_Argv(i32 1)
%7 = tail call i8* @Cvar_VariableString(i32 %6)
%8 = tail call i32 @Cbuf_InsertText(i8* %7)
br label %9
9: ; preds = %5, %3
ret void
}
char *hash_plugin_detailed(void) {
  return ("ipb2 - A simple md5(md5(salt).md5(pass)) plugin\n"
          "------------------------\n"
          "Use this module to crack md5(md5(salt).md5(pass)) hashes\n"
          "Input should be in form: \'user:hash\' or just \'hash\'\n"
          "Known software that uses this password hashing method:\n"
          "IPB > 2.0.0, myBB > 1.2.0\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


x86 assembly (clang, -O0):
<hash_plugin_detailed>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_plugin_detailed>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [309 x i8] c"ipb2 - A simple md5(md5(salt).md5(pass)) plugin\0A------------------------\0AUse this module to crack md5(md5(salt).md5(pass)) hashes\0AInput should be in form: 'user:hash' or just 'hash'\0AKnown software that uses this password hashing method:\0AIPB > 2.0.0, myBB > 1.2.0\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([309 x i8], [309 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [309 x i8] c"ipb2 - A simple md5(md5(salt).md5(pass)) plugin\0A------------------------\0AUse this module to crack md5(md5(salt).md5(pass)) hashes\0AInput should be in form: 'user:hash' or just 'hash'\0AKnown software that uses this password hashing method:\0AIPB > 2.0.0, myBB > 1.2.0\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([309 x i8], [309 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int atoi(char *);
int getRegisterNumber(char *reg) { return atoi(reg + 1); }


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

x86 assembly (clang, -O2):
<getRegisterNumber>:
add    $0x1,%rdi
jmp    1030 <atoi@plt>

LLVM IR (-O0):
define i32 @getRegisterNumber(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = call i32 @atoi(i8* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @getRegisterNumber(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = tail call i32 @atoi(i8* %2)
ret i32 %3
}
int SDL_main(int argc, char **argv) {}


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

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

LLVM IR (-O0):
define i32 @SDL_main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @SDL_main(i32 %0, i8** nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int __C_tolower(int);
int tolower(int c) { return __C_tolower(c); }


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <__C_tolower@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
jmp    1030 <__C_tolower@plt>

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

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i32 @__C_tolower(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fscanf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ printf(char *, char *);
void get_next_file_name(FILE *fd_list, char *file_name) {
  int ret;
  *file_name = '\0';
  ret = fscanf(fd_list, "%s\n", file_name);
  printf("Next file = %s\n", file_name);
}


x86 assembly (clang, -O0):
<get_next_file_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xec6(%rip),%rsi
call   1040 <fscanf@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_next_file_name>:
push   %rbx
mov    %rsi,%rbx
movb   $0x0,(%rsi)
lea    0xede(%rip),%rsi
mov    %rbx,%rdx
call   1040 <fscanf@plt>
lea    0xec3(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [16 x i8] c"Next file = %s\0A\00"
define void @get_next_file_name(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
store i8 0, i8* %6
%7 = load i32*, i32** %3
%8 = load i8*, i8** %4
%9 = call i32 @fscanf(i32* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
store i32 %9, i32* %5
%10 = load i8*, i8** %4
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [16 x i8] c"Next file = %s\0A\00"
define void @get_next_file_name(i32* nocapture %0, i8* %1) {
store i8 0, i8* %1
%3 = tail call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void configureBlePriv12Patch(void) {
  uint8_t *pPatchTab = (uint8_t *)(0x21000000 + 0x033C);
  uint32_t *pIrqPatch = (uint32_t *)(0x21000000 + 0x03AC);
  pPatchTab[1] = 0;
  pPatchTab[103] = 1;
  pPatchTab[60] = 2;
  pPatchTab[48] = 3;
  pIrqPatch[1] = 0x21000415;
  pIrqPatch[9] = 0x21000455;
}


x86 assembly (clang, -O0):
<configureBlePriv12Patch>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2100033c,%eax
mov    %rax,-0x8(%rbp)
mov    $0x210003ac,%eax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1,0x19c(%rax)
mov    -0x8(%rbp),%rax
movl   $0x2,0xf0(%rax)
mov    -0x8(%rbp),%rax
movl   $0x3,0xc0(%rax)
mov    -0x10(%rbp),%rax
movl   $0x21000415,0x4(%rax)
mov    -0x10(%rbp),%rax
movl   $0x21000455,0x24(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<configureBlePriv12Patch>:
movl   $0x0,0x21000340
movl   $0x1,0x210004d8
movl   $0x2,0x2100042c
movl   $0x3,0x210003fc
movl   $0x21000415,0x210003b0
movl   $0x21000455,0x210003d0
ret

LLVM IR (-O0):
define void @configureBlePriv12Patch() {
%1 = alloca i32*
%2 = alloca i32*
store i32* inttoptr (i64 553648956 to i32*), i32** %1
store i32* inttoptr (i64 553649068 to i32*), i32** %2
%3 = load i32*, i32** %1
%4 = getelementptr inbounds i32, i32* %3, i64 1
store i32 0, i32* %4
%5 = load i32*, i32** %1
%6 = getelementptr inbounds i32, i32* %5, i64 103
store i32 1, i32* %6
%7 = load i32*, i32** %1
%8 = getelementptr inbounds i32, i32* %7, i64 60
store i32 2, i32* %8
%9 = load i32*, i32** %1
%10 = getelementptr inbounds i32, i32* %9, i64 48
store i32 3, i32* %10
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 1
store i32 553649173, i32* %12
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 9
store i32 553649237, i32* %14
ret void
}

LLVM IR (-O2):
define void @configureBlePriv12Patch() {
store i32 0, i32* inttoptr (i64 553648960 to i32*)
store i32 1, i32* inttoptr (i64 553649368 to i32*)
store i32 2, i32* inttoptr (i64 553649196 to i32*)
store i32 3, i32* inttoptr (i64 553649148 to i32*)
store i32 553649173, i32* inttoptr (i64 553649072 to i32*)
store i32 553649237, i32* inttoptr (i64 553649104 to i32*)
ret void
}
/* Variables and functions */
int next_utf8(char const *, int *);
int fn_ch_62(const char *text) {
  int pos = 0;
  if (next_utf8(text, &pos) == 62)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_ch_62>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <next_utf8@plt>
cmp    $0x3e,%eax
jne    1144 <fn_ch_62+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_ch_62+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_ch_62>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <next_utf8@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    $0x3e,%ecx
jne    1133 <fn_ch_62+0x23>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fn_ch_62(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @next_utf8(i8* %5, i32* %4)
%7 = icmp eq i32 %6, 62
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i32, i32* %4
store i32 %9, i32* %2
br label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %11
11: ; preds = %10, %8
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @fn_ch_62(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @next_utf8(i8* %0, i32* %2)
%5 = icmp eq i32 %4, 62
%6 = load i32, i32* %2
%7 = select i1 %5, i32 %6, i32 -1
ret i32 %7
}
/* Variables and functions */
int gcd(int, int);
int lcm(int n, int m) { return m * n / gcd(n, m); }


x86 assembly (clang, -O0):
<lcm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <gcd@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcm>:
push   %rbx
mov    %esi,%ebx
imul   %edi,%ebx
call   1030 <gcd@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
pop    %rbx
ret

LLVM IR (-O0):
define i32 @lcm(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = mul nsw i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @gcd(i32 %8, i32 %9)
%11 = sdiv i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @lcm(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = tail call i32 @gcd(i32 %0, i32 %1)
%5 = sdiv i32 %3, %4
ret i32 %5
}
void mul_m32abs(unsigned int *m32) {
  if ((long)m32 & 0xFFFFFFFF80000000LL) {
    printf("Error: destination %lx not in lower 2GB for mul_m32abs()\n",
           (long)m32);
    asm(" int $3; ");
  }
  put8(0xF7);
  put8(0x24);
  put8(0x25);
  put32((int)(unsigned long)m32);
}


x86 assembly (clang, -O0):
<mul_m32abs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xffffffff80000000,%rax
cmp    $0x0,%rax
je     1163 <mul_m32abs+0x33>
mov    -0x8(%rbp),%rsi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
int3
mov    $0xf7,%edi
mov    $0x0,%al
call   1030 <put8@plt>
mov    $0x24,%edi
mov    $0x0,%al
call   1030 <put8@plt>
mov    $0x25,%edi
mov    $0x0,%al
call   1030 <put8@plt>
mov    -0x8(%rbp),%rax
mov    %eax,%edi
mov    $0x0,%al
call   1050 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul_m32abs>:
push   %rbx
mov    %rdi,%rbx
test   $0xffffffff80000000,%rdi
je     114f <mul_m32abs+0x1f>
lea    0xebc(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
int3
mov    $0xf7,%edi
xor    %eax,%eax
call   1030 <put8@plt>
mov    $0x24,%edi
xor    %eax,%eax
call   1030 <put8@plt>
mov    $0x25,%edi
xor    %eax,%eax
call   1030 <put8@plt>
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1050 <put32@plt>

LLVM IR (-O0):
@.str = [58 x i8] c"Error: destination %lx not in lower 2GB for mul_m32abs()\0A\00"
define void @mul_m32abs(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = ptrtoint i32* %3 to i64
%5 = and i64 %4, -2147483648
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32*, i32** %2
%9 = ptrtoint i32* %8 to i64
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i64 %9)
br label %11
11: ; preds = %7, %1
%12 = call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 247)
%13 = call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 36)
%14 = call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 37)
%15 = load i32*, i32** %2
%16 = ptrtoint i32* %15 to i64
%17 = trunc i64 %16 to i32
%18 = call i32 (i32, ...) bitcast (i32 (...)* @put32 to i32 (i32, ...)*)(i32 %17)
ret void
}

LLVM IR (-O2):
@.str = [58 x i8] c"Error: destination %lx not in lower 2GB for mul_m32abs()\0A\00"
define void @mul_m32abs(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = icmp ult i32* %0, inttoptr (i64 2147483648 to i32*)
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i64 %2)
tail call void asm sideeffect " int $$3; ", "~{dirflag},~{fpsr},~{flags}"()
br label %6
6: ; preds = %4, %1
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 247)
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 36)
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 37)
%10 = trunc i64 %2 to i32
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @put32 to i32 (i32, ...)*)(i32 %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int func_b(char arg) {
  printf("func_b\n");
  return 1;
}


x86 assembly (clang, -O0):
<func_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_b>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"func_b\0A\00"
define i32 @func_b(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [7 x i8] c"func_b\00"
define i32 @func_b(i8 signext %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 1
}
void foo(double s1, double s2) { long long int c = (long long)s1 + s2; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
cvttsd2si -0x8(%rbp),%rax
cvtsi2sd %rax,%xmm0
addsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i64
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = fptosi double %6 to i64
%8 = sitofp i64 %7 to double
%9 = load double, double* %4
%10 = fadd double %8, %9
%11 = fptosi double %10 to i64
store i64 %11, i64* %5
ret void
}

LLVM IR (-O2):
define void @foo(double %0, double %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setsda(int /*<<< orphan*/);
void i2c_start() { setsda(0); }


x86 assembly (clang, -O0):
<i2c_start>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <setsda@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_start>:
xor    %edi,%edi
jmp    1030 <setsda@plt>

LLVM IR (-O0):
define void @i2c_start() {
%1 = call i32 @setsda(i32 0)
ret void
}

LLVM IR (-O2):
define void @i2c_start() {
%1 = tail call i32 @setsda(i32 0)
ret void
}
int isblank(int c) {
  return ((unsigned char)c == ' ' || (unsigned char)c == '\t');
}


x86 assembly (clang, -O0):
<isblank>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movzbl %al,%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x5(%rbp)
je     112a <isblank+0x2a>
mov    -0x4(%rbp),%eax
movzbl %al,%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isblank>:
movzbl %dil,%eax
cmp    $0x20,%eax
sete   %cl
cmp    $0x9,%eax
sete   %al
or     %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @isblank(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
%5 = zext i8 %4 to i32
%6 = icmp eq i32 %5, 32
br i1 %6, label %12, label %7
7: ; preds = %1
%8 = load i32, i32* %2
%9 = trunc i32 %8 to i8
%10 = zext i8 %9 to i32
%11 = icmp eq i32 %10, 9
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ true, %1 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @isblank(i32 %0) {
%2 = and i32 %0, 255
%3 = icmp eq i32 %2, 32
%4 = icmp eq i32 %2, 9
%5 = or i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int M_PI;
int cos(int);
double GoertzelFilter_koef(double f, double fs) {
  return 2 * cos(2 * M_PI * f / fs);
}


x86 assembly (clang, -O0):
<GoertzelFilter_koef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <cos@plt>
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GoertzelFilter_koef>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%eax
add    %eax,%eax
cvtsi2sd %eax,%xmm2
mulsd  %xmm0,%xmm2
divsd  %xmm1,%xmm2
cvttsd2si %xmm2,%edi
call   1030 <cos@plt>
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global i32 0
define double @GoertzelFilter_koef(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load i32, i32* @M_PI
%6 = mul nsw i32 2, %5
%7 = sitofp i32 %6 to double
%8 = load double, double* %3
%9 = fmul double %7, %8
%10 = load double, double* %4
%11 = fdiv double %9, %10
%12 = fptosi double %11 to i32
%13 = call i32 @cos(i32 %12)
%14 = mul nsw i32 2, %13
%15 = sitofp i32 %14 to double
ret double %15
}

LLVM IR (-O2):
@M_PI = global i32 0
define double @GoertzelFilter_koef(double %0, double %1) {
%3 = load i32, i32* @M_PI
%4 = shl nsw i32 %3, 1
%5 = sitofp i32 %4 to double
%6 = fmul double %5, %0
%7 = fdiv double %6, %1
%8 = fptosi double %7 to i32
%9 = tail call i32 @cos(i32 %8)
%10 = shl nsw i32 %9, 1
%11 = sitofp i32 %10 to double
ret double %11
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
void _indent(FILE *fp, int indent) {
  for (int i = 0; i < indent; ++i)
    fputc(' ', fp);
}


x86 assembly (clang, -O0):
<_indent>:
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    114e <_indent+0x3e>
mov    -0x8(%rbp),%rsi
mov    $0x20,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <_indent+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_indent>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1132 <_indent+0x22>
mov    %esi,%ebx
mov    %rdi,%r14
nopl   (%rax)
mov    $0x20,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
add    $0xffffffff,%ebx
jne    1120 <_indent+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @_indent(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 = %13, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = call i32 @fputc(i8 signext 32, i32* %11)
br label %13
13: ; preds = %10
%14 = load i32, i32* %5
%15 = add nsw i32 %14, 1
store i32 %15, i32* %5
br label %6
16: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @_indent(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %5, %2
ret void
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ 0, %2 ]
%7 = tail call i32 @fputc(i8 signext 32, i32* %0)
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, %1
br i1 %9, label %4, label %5
}
void gtk_label_set_markup() {}


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

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

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

LLVM IR (-O2):
define void @gtk_label_set_markup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, int *, int);
int ft_printchar(int c) {
  write(1, &c, 1);
  return (1);
}


x86 assembly (clang, -O0):
<ft_printchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edx
lea    -0x4(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_printchar>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ft_printchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @write(i32 1, i32* %2, i32 1)
ret i32 1
}

LLVM IR (-O2):
define i32 @ft_printchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @write(i32 1, i32* %2, i32 1)
ret i32 1
}