xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ p1(char, double, int, double, int, double, int, double);
int /*<<< orphan*/ p2(char, double, int, double, int, double, int, double);
int main(int argc, const char *argv[]) {
  p1('a', 4.0, 1, 5.0, 2, 4.0, 3, 5.0);
  p2('a', 4.0, 1, 5.0, 2, 4.0, 3, 5.0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x61,%edi
movsd  0xebd(%rip),%xmm2
mov    $0x1,%esi
movsd  0xeb8(%rip),%xmm3
mov    $0x2,%edx
mov    $0x3,%ecx
movaps %xmm2,%xmm0
movaps %xmm3,%xmm1
call   1040 <p1@plt>
mov    $0x61,%edi
movsd  0xe8e(%rip),%xmm2
mov    $0x1,%esi
movsd  0xe89(%rip),%xmm3
mov    $0x2,%edx
mov    $0x3,%ecx
movaps %xmm2,%xmm0
movaps %xmm3,%xmm1
call   1030 <p2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
mov    $0x61,%edi
mov    $0x1,%esi
mov    $0x2,%edx
movaps %xmm0,%xmm2
mov    $0x3,%ecx
movaps %xmm1,%xmm3
call   1040 <p1@plt>
mov    $0x61,%edi
movsd  0xea3(%rip),%xmm0
mov    $0x1,%esi
movsd  0xe9e(%rip),%xmm1
mov    $0x2,%edx
movaps %xmm0,%xmm2
mov    $0x3,%ecx
movaps %xmm1,%xmm3
call   1030 <p2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @p1(i8 signext 97, double 4.000000e+00, i32 1, double 5.000000e+00, i32 2, double 4.000000e+00, i32 3, double 5.000000e+00)
%7 = call i32 @p2(i8 signext 97, double 4.000000e+00, i32 1, double 5.000000e+00, i32 2, double 4.000000e+00, i32 3, double 5.000000e+00)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @p1(i8 signext 97, double 4.000000e+00, i32 1, double 5.000000e+00, i32 2, double 4.000000e+00, i32 3, double 5.000000e+00)
%4 = tail call i32 @p2(i8 signext 97, double 4.000000e+00, i32 1, double 5.000000e+00, i32 2, double 4.000000e+00, i32 3, double 5.000000e+00)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Delay_ms(int);
int /*<<< orphan*/ UART1_Init(int);
int /*<<< orphan*/ UART_Write_Text(char *);
int /*<<< orphan*/ test_squeue();
int /*<<< orphan*/ test_sstack();
void main() {
  UART1_Init(38400);
  Delay_ms(100);
  UART_Write_Text("Starting Stuctures Tests\r\n");
  test_sstack();
  test_squeue();
  UART_Write_Text("Tests Ended");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x9600,%edi
call   1030 <UART1_Init@plt>
mov    $0x64,%edi
call   1060 <Delay_ms@plt>
lea    0xe91(%rip),%rdi
call   1040 <UART_Write_Text@plt>
mov    $0x0,%al
call   1070 <test_sstack@plt>
mov    $0x0,%al
call   1050 <test_squeue@plt>
lea    0xe92(%rip),%rdi
call   1040 <UART_Write_Text@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x9600,%edi
call   1030 <UART1_Init@plt>
mov    $0x64,%edi
call   1060 <Delay_ms@plt>
lea    0xe94(%rip),%rdi
call   1040 <UART_Write_Text@plt>
xor    %eax,%eax
call   1070 <test_sstack@plt>
xor    %eax,%eax
call   1050 <test_squeue@plt>
lea    0xe95(%rip),%rdi
pop    %rax
jmp    1040 <UART_Write_Text@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Starting Stuctures Tests\0D\0A\00"
@.str.1 = [12 x i8] c"Tests Ended\00"
define void @main() {
%1 = call i32 @UART1_Init(i32 38400)
%2 = call i32 @Delay_ms(i32 100)
%3 = call i32 @UART_Write_Text(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @test_sstack()
%5 = call i32 (...) @test_squeue()
%6 = call i32 @UART_Write_Text(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Starting Stuctures Tests\0D\0A\00"
@.str.1 = [12 x i8] c"Tests Ended\00"
define void @main() {
%1 = tail call i32 @UART1_Init(i32 38400)
%2 = tail call i32 @Delay_ms(i32 100)
%3 = tail call i32 @UART_Write_Text(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (...) @test_sstack()
%5 = tail call i32 (...) @test_squeue()
%6 = tail call i32 @UART_Write_Text(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int XGetWMIconName() {}


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

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

LLVM IR (-O0):
define i32 @XGetWMIconName() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XGetWMIconName() {
ret i32 undef
}
int test_imm_C6uint32_mem(unsigned int *val) {
  return ((*val) & (0xC6 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C6uint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0xc6,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C6uint32_mem>:
testb  $0xc6,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_C6uint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 198
%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_C6uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 198
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void update_curr_idle(struct rq *rq) {}


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

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

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

LLVM IR (-O2):
%struct.rq = type opaque
define void @update_curr_idle(%struct.rq* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, long);
void platform_copy_memory(void *destination, void *source, long size) {
  memcpy(destination, source, size);
}


x86 assembly (clang, -O0):
<platform_copy_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<platform_copy_memory>:
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @platform_copy_memory(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @memcpy(i8* %7, i8* %8, i64 %9)
ret void
}

LLVM IR (-O2):
define void @platform_copy_memory(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void closeLinkHTML() { printf("%s", ".css\">"); }


x86 assembly (clang, -O0):
<closeLinkHTML>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee1(%rip),%rsi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeLinkHTML>:
lea    0xee9(%rip),%rdi
lea    0xee5(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [7 x i8] c".css\22>\00"
define void @closeLinkHTML() {
%1 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [7 x i8] c".css\22>\00"
define void @closeLinkHTML() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int remove(__attribute__((unused)) const char *path) { return -1; }


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

x86 assembly (clang, -O2):
<remove>:
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @remove(i8* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int execve(char *, char **, char **);
int run_process_sandbox(char *filename) {
  char *new_argv[] = {filename, "/virt/sandbox.sh", NULL};
  char *new_env[] = {"TERM=linux", NULL};
  return execve(filename, new_argv, new_env);
}


x86 assembly (clang, -O0):
<run_process_sandbox>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    0xed5(%rip),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
mov    0x2cd2(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2ccf(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1030 <execve@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_process_sandbox>:
sub    $0x38,%rsp
mov    %rdi,(%rsp)
lea    0xee1(%rip),%rax
mov    %rax,0x8(%rsp)
movq   $0x0,0x10(%rsp)
movaps 0x2cdc(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
mov    %rsp,%rsi
lea    0x20(%rsp),%rdx
call   1030 <execve@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"/virt/sandbox.sh\00"
@.str.1 = [11 x i8] c"TERM=linux\00"
@__const.run_process_sandbox.new_env = [2 x i8*] [i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i32 0, i32 0), i8* null]
define i32 @run_process_sandbox(i8* %0) {
%2 = alloca i8*
%3 = alloca [3 x i8*]
%4 = alloca [2 x i8*]
store i8* %0, i8** %2
%5 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
store i8* %6, i8** %5
%7 = getelementptr inbounds i8*, i8** %5, i64 1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds i8*, i8** %7, i64 1
store i8* null, i8** %8
%9 = bitcast [2 x i8*]* %4 to i8*
%10 = load i8*, i8** %2
%11 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 0
%12 = getelementptr inbounds [2 x i8*], [2 x i8*]* %4, i64 0, i64 0
%13 = call i32 @execve(i8* %10, i8** %11, i8** %12)
ret i32 %13
}

LLVM IR (-O2):
@.str = [17 x i8] c"/virt/sandbox.sh\00"
@.str.1 = [11 x i8] c"TERM=linux\00"
@__const.run_process_sandbox.new_env = [2 x i8*] [i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i32 0, i32 0), i8* null]
define i32 @run_process_sandbox(i8* %0) {
%2 = alloca [3 x i8*]
%3 = alloca [2 x i8*]
%4 = bitcast [3 x i8*]* %2 to i8*
%5 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 0
store i8* %0, i8** %5
%6 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 2
store i8* null, i8** %7
%8 = bitcast [2 x i8*]* %3 to i8*
%9 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
%10 = call i32 @execve(i8* %0, i8** %5, i8** %9)
ret i32 %10
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int j = __VERIFIER_nondet_int();
  int N = __VERIFIER_nondet_int();
  int i = N;
  while (i > 0) {
    if (j > 0) {
      j--;
    } else {
      j = N;
      i--;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    116f <main+0x5f>
cmpl   $0x0,-0x8(%rbp)
jle    115b <main+0x4b>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    116a <main+0x5a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1139 <main+0x29>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jle    1143 <main+0x33>
mov    %eax,%ecx
nopw   0x0(%rax,%rax,1)
xor    %edx,%edx
test   %ebx,%ebx
lea    -0x1(%rbx),%esi
setle  %dl
cmovle %eax,%esi
mov    %esi,%ebx
sub    %edx,%ecx
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %2
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %3
%7 = load i32, i32* %3
store i32 %7, i32* %4
br label %8
8: ; preds = %21, %0
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %22
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i32, i32* %2
%16 = add nsw i32 %15, -1
store i32 %16, i32* %2
br label %21
17: ; preds = %11
%18 = load i32, i32* %3
store i32 %18, i32* %2
%19 = load i32, i32* %4
%20 = add nsw i32 %19, -1
store i32 %20, i32* %4
br label %21
21: ; preds = %17, %14
br label %8
22: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %14
4: ; preds = %0, %4
%5 = phi i32 [ %12, %4 ], [ %2, %0 ]
%6 = phi i32 [ %9, %4 ], [ %1, %0 ]
%7 = icmp sgt i32 %6, 0
%8 = add nsw i32 %6, -1
%9 = select i1 %7, i32 %8, i32 %2
%10 = xor i1 %7, true
%11 = sext i1 %10 to i32
%12 = add nsw i32 %5, %11
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void DebugVersion(const char *version) {
  printf("DEBUG VERSION: %s\n", version);
}


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

x86 assembly (clang, -O2):
<DebugVersion>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [19 x i8] c"DEBUG VERSION: %s\0A\00"
define void @DebugVersion(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
const char *starref(name) const char *name;
{ return (concat(name, '*')); }


x86 assembly (clang, -O0):
<starref>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2a,%esi
mov    $0x0,%al
call   1030 <concat@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<starref>:
push   %rax
mov    $0x2a,%esi
xor    %eax,%eax
call   1030 <concat@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @starref(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @concat to i32 (i8*, i32, ...)*)(i8* %3, i32 42)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}

LLVM IR (-O2):
define i8* @starref(i8* %0) {
%2 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @concat to i32 (i8*, i32, ...)*)(i8* %0, i32 42)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Type definitions */
struct storage_backend {
  int dummy;
};

/* Variables and functions */
scalar_t__ PATH_MAX;
int /*<<< orphan*/ snprintf(char *, scalar_t__, char *);
char *tile_storage_id(struct storage_backend *store, const char *xmlconfig,
                      const char *options, int x, int y, int z, char *string) {
  snprintf(string, PATH_MAX - 1, "null://");
  return string;
}


x86 assembly (clang, -O0):
<tile_storage_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    0x10(%rbp),%rdi
mov    0x2eb2(%rip),%rax
mov    (%rax),%rsi
sub    $0x1,%rsi
lea    0xeb4(%rip),%rdx
call   1030 <snprintf@plt>
mov    0x10(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tile_storage_id>:
push   %rbx
mov    0x10(%rsp),%rbx
mov    0x2ed3(%rip),%rax
mov    (%rax),%rsi
add    $0xffffffffffffffff,%rsi
lea    0xed5(%rip),%rdx
mov    %rbx,%rdi
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.storage_backend = type { i32 }
@PATH_MAX = global i64 0
@.str = [8 x i8] c"null://\00"
define i8* @tile_storage_id(%struct.storage_backend* %0, i8* %1, i8* %2, i32 %3, i32 %4, i32 %5, i8* %6) {
%8 = alloca %struct.storage_backend*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
store %struct.storage_backend* %0, %struct.storage_backend** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i8* %6, i8** %14
%15 = load i8*, i8** %14
%16 = load i64, i64* @PATH_MAX
%17 = sub nsw i64 %16, 1
%18 = call i32 @snprintf(i8* %15, i64 %17, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%19 = load i8*, i8** %14
ret i8* %19
}

LLVM IR (-O2):
%struct.storage_backend = type { i32 }
@PATH_MAX = global i64 0
@.str = [8 x i8] c"null://\00"
define i8* @tile_storage_id(%struct.storage_backend* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3, i32 %4, i32 %5, i8* returned writeonly %6) {
%8 = load i64, i64* @PATH_MAX
%9 = add nsw i64 %8, -1
%10 = tail call i32 @snprintf(i8* %6, i64 %9, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %6
}
/* Variables and functions */
unsigned char *fileReadLine();
const unsigned char *readVimballLine(void) {
  const unsigned char *line;
  while ((line = fileReadLine()) != NULL) {
    break;
  }
  return line;
}


x86 assembly (clang, -O0):
<readVimballLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <fileReadLine@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
je     1132 <readVimballLine+0x22>
jmp    1132 <readVimballLine+0x22>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readVimballLine>:
xor    %eax,%eax
jmp    1030 <fileReadLine@plt>

LLVM IR (-O0):
define i8* @readVimballLine() {
%1 = alloca i8*
br label %2
2: ; preds = %0
%3 = call i8* (...) @fileReadLine()
store i8* %3, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %6
5: ; preds = %2
br label %6
6: ; preds = %5, %2
%7 = load i8*, i8** %1
ret i8* %7
}

LLVM IR (-O2):
define i8* @readVimballLine() {
%1 = tail call i8* (...) @fileReadLine()
ret i8* %1
}
unsigned long hash(char *s) {
  unsigned long res = 17;
  while (*s != '\0') {
    res = (res * 37) + *s;
    s++;
  }
  return res;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x11,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1145 <hash+0x45>
imul   $0x25,-0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
movsbq (%rcx),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112b <hash+0x2b>
add    $0x1,%rdi
mov    $0x11,%eax
nop
lea    (%rax,%rax,8),%rdx
lea    (%rax,%rdx,4),%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
ret
mov    $0x11,%eax
ret

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

LLVM IR (-O2):
define i64 @hash(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 i64 [ %10, %4 ], [ 17, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = mul i64 %6, 37
%9 = sext i8 %5 to i64
%10 = add i64 %8, %9
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 17, %1 ], [ %10, %4 ]
ret i64 %15
}
void DBGFR3Info(void) {}


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

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

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

LLVM IR (-O2):
define void @DBGFR3Info() {
ret void
}
void foo021() {}


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

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

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

LLVM IR (-O2):
define void @foo021() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
int main() {
  int t;
  for (t = 0;; t++)
    putchar((t * (t >> 5 | t >> 8)) >> (t >> 16));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%eax
sar    $0x5,%eax
mov    -0x8(%rbp),%ecx
sar    $0x8,%ecx
or     %ecx,%eax
imul   %eax,%edi
mov    -0x8(%rbp),%ecx
sar    $0x10,%ecx
sar    %cl,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%eax
shr    $0x5,%eax
mov    %ebx,%edi
shr    $0x8,%edi
or     %eax,%edi
imul   %ebx,%edi
mov    %ebx,%ecx
shr    $0x10,%ecx
shr    %cl,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %15, %0
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = ashr i32 %5, 5
%7 = load i32, i32* %2
%8 = ashr i32 %7, 8
%9 = or i32 %6, %8
%10 = mul nsw i32 %4, %9
%11 = load i32, i32* %2
%12 = ashr i32 %11, 16
%13 = ashr i32 %10, %12
%14 = call i32 @putchar(i32 %13)
br label %15
15: ; preds = %3
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %3
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %10, %1 ]
%3 = lshr i32 %2, 5
%4 = lshr i32 %2, 8
%5 = or i32 %3, %4
%6 = mul nuw nsw i32 %5, %2
%7 = lshr i32 %2, 16
%8 = lshr i32 %6, %7
%9 = tail call i32 @putchar(i32 %8)
%10 = add nuw nsw i32 %2, 1
br label %1
}
void foo() { int x __attribute__((__used__)); }


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

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PWMGenPeriodSet(int, int, unsigned long);
int /*<<< orphan*/ PWMPulseWidthSet(int, int, unsigned long);
void wave_pwm_value(unsigned long value) {
  PWMGenPeriodSet(0x40028000, 0x00000040, value);
  PWMPulseWidthSet(0x40028000, 0x00000040, value >> 1);
}


x86 assembly (clang, -O0):
<wave_pwm_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x40028000,%edi
mov    $0x40,%esi
call   1040 <PWMGenPeriodSet@plt>
mov    -0x8(%rbp),%rdx
shr    $0x1,%rdx
mov    $0x40028000,%edi
mov    $0x40,%esi
call   1030 <PWMPulseWidthSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wave_pwm_value>:
push   %rbx
mov    %rdi,%rbx
mov    $0x40028000,%edi
mov    $0x40,%esi
mov    %rbx,%rdx
call   1040 <PWMGenPeriodSet@plt>
shr    %rbx
mov    $0x40028000,%edi
mov    $0x40,%esi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <PWMPulseWidthSet@plt>

LLVM IR (-O0):
define void @wave_pwm_value(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @PWMGenPeriodSet(i32 1073905664, i32 64, i64 %3)
%5 = load i64, i64* %2
%6 = lshr i64 %5, 1
%7 = call i32 @PWMPulseWidthSet(i32 1073905664, i32 64, i64 %6)
ret void
}

LLVM IR (-O2):
define void @wave_pwm_value(i64 %0) {
%2 = tail call i32 @PWMGenPeriodSet(i32 1073905664, i32 64, i64 %0)
%3 = lshr i64 %0, 1
%4 = tail call i32 @PWMPulseWidthSet(i32 1073905664, i32 64, i64 %3)
ret void
}
/* Variables and functions */
int houston_init();
int config_init(void) {
  int err;
  {}
  err = houston_init();
  if (err)
    return err;
  return 0;
}


x86 assembly (clang, -O0):
<config_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <houston_init@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1137 <config_init+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113e <config_init+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_init>:
xor    %eax,%eax
jmp    1030 <houston_init@plt>

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

LLVM IR (-O2):
define i32 @config_init() {
%1 = tail call i32 (...) @houston_init()
ret i32 %1
}
/* Type definitions */
struct fsverity_enable_arg {
  int dummy;
};
typedef int /*<<< orphan*/ enable;

/* Variables and functions */
int main(void) {
  struct fsverity_enable_arg enable;
  (void)enable;
  return sizeof(enable);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x4,%eax
ret

LLVM IR (-O0):
%struct.fsverity_enable_arg = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.fsverity_enable_arg
store i32 0, i32* %1
ret i32 4
}

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
/* Variables and functions */
int atoi(char *);
int f(char *arg) {
  int x = atoi(arg);
  switch (x) {
  case 1:
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <atoi@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
jne    113e <f+0x2e>
jmp    1139 <f+0x29>
jmp    113e <f+0x2e>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @atoi(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
switch i32 %6, label %8 [
i32 1, label %7
]
7: ; preds = %1
br label %8
8: ; preds = %1, %7
ret i32 0
}

LLVM IR (-O2):
define i32 @f(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, ...);
int set_nonblock(int fd) {
  return fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK);
}


x86 assembly (clang, -O0):
<set_nonblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    %eax,%edx
mov    0x2e99(%rip),%rax
or     (%rax),%edx
mov    $0x0,%al
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_nonblock>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2ebc(%rip),%rax
mov    (%rax),%ebp
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
call   1030 <fcntl@plt>
mov    0x2eb3(%rip),%rcx
or     (%rcx),%eax
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_SETFL = global i32 0
@F_GETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @set_nonblock(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @F_SETFL
%5 = load i32, i32* %2
%6 = load i32, i32* @F_GETFL
%7 = call i32 (i32, i32, ...) @fcntl(i32 %5, i32 %6)
%8 = load i32, i32* @O_NONBLOCK
%9 = or i32 %7, %8
%10 = call i32 (i32, i32, ...) @fcntl(i32 %3, i32 %4, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
@F_SETFL = global i32 0
@F_GETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @set_nonblock(i32 %0) {
%2 = load i32, i32* @F_SETFL
%3 = load i32, i32* @F_GETFL
%4 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %3)
%5 = load i32, i32* @O_NONBLOCK
%6 = or i32 %5, %4
%7 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %2, i32 %6)
ret i32 %7
}
int test_imm_70uint32_reg(unsigned int val) {
  return ((val) & (0x70 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_70uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x70,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_70uint32_reg(i32 %0) {
%2 = and i32 %0, 112
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void plainFunction() {
  printf("__func__ %s\n", __func__);
  printf("__FUNCTION__ %s\n", __FUNCTION__);
  printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__);
}


x86 assembly (clang, -O0):
<plainFunction>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeeb(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
lea    0xed6(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
lea    0xef9(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<plainFunction>:
push   %rbx
lea    0xee8(%rip),%rdi
lea    0xeee(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
lea    0xefd(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"__func__ %s\0A\00"
@__func__.plainFunction = [14 x i8] c"plainFunction\00"
@.str.1 = [17 x i8] c"__FUNCTION__ %s\0A\00"
@.str.2 = [25 x i8] c"__PRETTY_FUNCTION__ %s\0A\0A\00"
@__PRETTY_FUNCTION__.plainFunction = [21 x i8] c"void plainFunction()\00"
define void @plainFunction() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.plainFunction, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.plainFunction, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__PRETTY_FUNCTION__.plainFunction, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"__func__ %s\0A\00"
@__func__.plainFunction = [14 x i8] c"plainFunction\00"
@.str.1 = [17 x i8] c"__FUNCTION__ %s\0A\00"
@.str.2 = [25 x i8] c"__PRETTY_FUNCTION__ %s\0A\0A\00"
@__PRETTY_FUNCTION__.plainFunction = [21 x i8] c"void plainFunction()\00"
define void @plainFunction() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.plainFunction, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.plainFunction, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @__PRETTY_FUNCTION__.plainFunction, i64 0, i64 0))
ret void
}
float foo02(float a, float b, float c) { return (a - b * c); }


x86 assembly (clang, -O0):
<foo02>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm2
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo02>:
mulss  %xmm2,%xmm1
subss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @foo02(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = load float, float* %6
%10 = fneg float %8
%11 = call float @llvm.fmuladd.f32(float %10, float %9, float %7)
ret float %11
}

LLVM IR (-O2):
define float @foo02(float %0, float %1, float %2) {
%4 = fneg float %1
%5 = tail call float @llvm.fmuladd.f32(float %4, float %2, float %0)
ret float %5
}
int foo() { return 0; }


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

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

LLVM IR (-O0):
define i32 @foo() {
ret i32 0
}

LLVM IR (-O2):
define i32 @foo() {
ret i32 0
}
int test_imm_A7uint16_mem(unsigned short *val) {
  return ((*val) & (0xA7 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A7uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xa7,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A7uint16_mem>:
testb  $0xa7,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_A7uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 167
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_RenderingControl_GetVerticalKeystone(void *,
                                                                     int);
int /*<<< orphan*/ printf(char *, unsigned int);
void UPnPRenderingControl_GetVerticalKeystone(void *upnptoken,
                                              unsigned int InstanceID) {
  printf("Invoke: UPnPRenderingControl_GetVerticalKeystone(%u);\r\n",
         InstanceID);
  UPnPResponse_RenderingControl_GetVerticalKeystone(upnptoken, 25000);
}


x86 assembly (clang, -O0):
<UPnPRenderingControl_GetVerticalKeystone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    $0x61a8,%esi
call   1030 <UPnPResponse_RenderingControl_GetVerticalKeystone@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UPnPRenderingControl_GetVerticalKeystone>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x61a8,%esi
pop    %rbx
jmp    1030 <UPnPResponse_RenderingControl_GetVerticalKeystone@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"Invoke: UPnPRenderingControl_GetVerticalKeystone(%u);\0D\0A\00"
define void @UPnPRenderingControl_GetVerticalKeystone(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @UPnPResponse_RenderingControl_GetVerticalKeystone(i8* %7, i32 25000)
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"Invoke: UPnPRenderingControl_GetVerticalKeystone(%u);\0D\0A\00"
define void @UPnPRenderingControl_GetVerticalKeystone(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = tail call i32 @UPnPResponse_RenderingControl_GetVerticalKeystone(i8* %0, i32 25000)
ret void
}
/* Variables and functions */
int fork();
int /*<<< orphan*/ printf(char *, int);
void forktest2() {
  int pid = fork();
  printf("Hallo, pid = %d\n", pid);
}


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

x86 assembly (clang, -O2):
<forktest2>:
push   %rax
xor    %eax,%eax
call   1040 <fork@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [17 x i8] c"Hallo, pid = %d\0A\00"
define void @forktest2() {
%1 = tail call i32 (...) @fork()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void foo036(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo036(i32 %0) {
ret void
}
void write_beword(unsigned char *p, unsigned short v) {
  p[0] = (v >> 8) & 0xff;
  p[1] = (v)&0xff;
}


x86 assembly (clang, -O0):
<write_beword>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
movzwl -0xa(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_beword>:
rol    $0x8,%si
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @write_beword(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = zext i16 %5 to i32
%7 = ashr i32 %6, 8
%8 = and i32 %7, 255
%9 = trunc i32 %8 to i8
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i16, i16* %4
%13 = zext i16 %12 to i32
%14 = and i32 %13, 255
%15 = trunc i32 %14 to i8
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 1
store i8 %15, i8* %17
ret void
}

LLVM IR (-O2):
define void @write_beword(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = lshr i16 %1, 8
%4 = trunc i16 %3 to i8
store i8 %4, i8* %0
%5 = trunc i16 %1 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_lseek;
int /*<<< orphan*/ syscall_3(int /*<<< orphan*/, int, int /*<<< orphan*/, int);
off_t lseek(int fildes, off_t offset, int whence) {
  return syscall_3(SYS_lseek, fildes, offset, whence);
}


x86 assembly (clang, -O0):
<lseek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
call   1030 <syscall_3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lseek>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    0x2ed3(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall_3@plt>

LLVM IR (-O0):
@SYS_lseek = global i32 0
define i32 @lseek(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 = load i32, i32* @SYS_lseek
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @syscall_3(i32 %7, i32 %8, i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@SYS_lseek = global i32 0
define i32 @lseek(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @SYS_lseek
%5 = tail call i32 @syscall_3(i32 %4, i32 %0, i32 %1, i32 %2)
ret i32 %5
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
long long mstime(void) {
  struct timeval tv;
  long long ust;
  gettimeofday(&tv, NULL);
  ust = ((long long)tv.tv_sec) * 1000000;
  ust += tv.tv_usec;
  return ust / 1000;
}


x86 assembly (clang, -O0):
<mstime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mstime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x10(%rsp),%rax
add    0x8(%rsp),%rax
movabs $0x20c49ba5e353f7cf,%rcx
9b c4 20
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x7,%rdx
add    %rdx,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @mstime() {
%1 = alloca %struct.timeval
%2 = alloca i64
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000000
store i64 %6, i64* %2
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i64, i64* %7
%9 = load i64, i64* %2
%10 = add nsw i64 %9, %8
store i64 %10, i64* %2
%11 = load i64, i64* %2
%12 = sdiv i64 %11, 1000
ret i64 %12
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @mstime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = add nsw i64 %6, %8
%10 = sdiv i64 %9, 1000
ret i64 %10
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t detexPack32RG8(uint32_t r8, uint32_t g8) {
  return r8 | (g8 << 8);
}


x86 assembly (clang, -O0):
<detexPack32RG8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<detexPack32RG8>:
mov    %esi,%eax
shl    $0x8,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @detexPack32RG8(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 %6, 8
%8 = or i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @detexPack32RG8(i32 %0, i32 %1) {
%3 = shl i32 %1, 8
%4 = or i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x8b() {
  Assert_real((isalpha(139) == 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_isalpha.c",
              700, ("isalpha should be 0 for 0x8b"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x8b>:
push   %rax
mov    $0x8b,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2bc,%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 = [29 x i8] c"isalpha should be 0 for 0x8b\00"
define void @t_isalpha_0x8b() {
%1 = call i64 @isalpha(i32 139)
%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 700, 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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x8b\00"
define void @t_isalpha_0x8b() {
%1 = tail call i64 @isalpha(i32 139)
%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 700, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
long NET_open(unsigned long *gpuDisp) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @NET_open(i64* nocapture readnone %0) {
ret i64 0
}
void prune_alias_ne_Ok(int x) {
  int a[1];
  if (x != x) {
    a[1] = 0;
  }
}


x86 assembly (clang, -O0):
<prune_alias_ne_Ok>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x4(%rbp),%eax
je     111a <prune_alias_ne_Ok+0x1a>
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @prune_alias_ne_Ok(i32 %0) {
%2 = alloca i32
%3 = alloca [1 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 1
store i32 0, i32* %8
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @prune_alias_ne_Ok(i32 %0) {
ret void
}