xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void AESReset(uint32_t ui32Base) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000084))) |= 0x00000002;
  while (((*((volatile unsigned long *)(ui32Base + 0x00000088))) &
          0x00000001) == 0) {
  }
}


x86 assembly (clang, -O0):
<AESReset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x84(%rax),%rcx
or     $0x2,%rcx
mov    %rcx,0x84(%rax)
mov    -0x8(%rbp),%rax
mov    0x88(%rax),%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    113c <AESReset+0x3c>
jmp    111e <AESReset+0x1e>
pop    %rbp
ret

x86 assembly (clang, -O2):
<AESReset>:
orq    $0x2,0x84(%rdi)
02
nopl   0x0(%rax,%rax,1)
testq  $0x1,0x88(%rdi)
je     1110 <AESReset+0x10>
ret

LLVM IR (-O0):
define void @AESReset(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 132
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = or i64 %6, 2
store volatile i64 %7, i64* %5
br label %8
8: ; preds = %15, %1
%9 = load i64, i64* %2
%10 = add nsw i64 %9, 136
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
%13 = and i64 %12, 1
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %8
br label %8
16: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @AESReset(i64 %0) {
%2 = add nsw i64 %0, 132
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = or i64 %4, 2
store volatile i64 %5, i64* %3
%6 = add nsw i64 %0, 136
%7 = inttoptr i64 %6 to i64*
br label %8
8: ; preds = %8, %1
%9 = load volatile i64, i64* %7
%10 = and i64 %9, 1
%11 = icmp eq i64 %10, 0
br i1 %11, label %8, label %12
12: ; preds = %8
ret void
}
int main(void) {
  static long i = 100;
  return 0;
}


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

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

LLVM IR (-O0):
@main.i = internal global i64 100
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int netWaitForData(int, int);
int readReadyWait(int sd, int microseconds) {
  int readyCount = netWaitForData(sd, microseconds);
  return readyCount > 0;
}


x86 assembly (clang, -O0):
<readReadyWait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <netWaitForData@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readReadyWait>:
push   %rax
call   1030 <netWaitForData@plt>
xor    %ecx,%ecx
test   %eax,%eax
setg   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @readReadyWait(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @netWaitForData(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp sgt i32 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @readReadyWait(i32 %0, i32 %1) {
%3 = tail call i32 @netWaitForData(i32 %0, i32 %1)
%4 = icmp sgt i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void L4_KDB_ToggleBreakin(void) {
  __asm__ __volatile__("/* L4_KDB_"
                       "ToggleBreakin"
                       "() */		\n"
                       "	int	$3		\n"
                       "	cmpb	%0, %%al	\n"
                       :
                       : "i"(0x03));
}


x86 assembly (clang, -O0):
<L4_KDB_ToggleBreakin>:
push   %rbp
mov    %rsp,%rbp
int3
cmp    $0x3,%al
pop    %rbp
ret

x86 assembly (clang, -O2):
<L4_KDB_ToggleBreakin>:
int3
cmp    $0x3,%al
ret

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

LLVM IR (-O2):
define void @L4_KDB_ToggleBreakin() {
tail call void asm sideeffect "/* L4_KDB_ToggleBreakin() */\09\09\0A\09int\09$$3\09\09\0A\09cmpb\09$0, %al\09\0A", "i,~{dirflag},~{fpsr},~{flags}"(i32 3)
ret void
}
void cab(int a, int b, int c) {}


x86 assembly (clang, -O0):
<cab>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @cab(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
ret void
}

LLVM IR (-O2):
define void @cab(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIGQUIT;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
void set_signal(void) {
  signal(SIGINT, SIG_IGN);
  signal(SIGQUIT, SIG_IGN);
}


x86 assembly (clang, -O0):
<set_signal>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_signal>:
push   %rbx
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
mov    0x2eb7(%rip),%rbx
mov    (%rbx),%esi
call   1030 <signal@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%esi
pop    %rbx
jmp    1030 <signal@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@SIG_IGN = global i32 0
@SIGQUIT = global i32 0
define void @set_signal() {
%1 = load i32, i32* @SIGINT
%2 = load i32, i32* @SIG_IGN
%3 = call i32 @signal(i32 %1, i32 %2)
%4 = load i32, i32* @SIGQUIT
%5 = load i32, i32* @SIG_IGN
%6 = call i32 @signal(i32 %4, i32 %5)
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@SIG_IGN = global i32 0
@SIGQUIT = global i32 0
define void @set_signal() {
%1 = load i32, i32* @SIGINT
%2 = load i32, i32* @SIG_IGN
%3 = tail call i32 @signal(i32 %1, i32 %2)
%4 = load i32, i32* @SIGQUIT
%5 = load i32, i32* @SIG_IGN
%6 = tail call i32 @signal(i32 %4, i32 %5)
ret void
}
int solution(int X, int Y, int D) {
  int res = (Y - X) / D;
  return (Y - X) % D == 0 ? res : res + 1;
}


x86 assembly (clang, -O0):
<solution>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1138 <solution+0x38>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1141 <solution+0x41>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<solution>:
mov    %edx,%ecx
mov    %esi,%eax
sub    %edi,%eax
cltd
idiv   %ecx
cmp    $0x1,%edx
sbb    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @solution(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = sub nsw i32 %8, %9
%11 = load i32, i32* %6
%12 = sdiv i32 %10, %11
store i32 %12, i32* %7
%13 = load i32, i32* %5
%14 = load i32, i32* %4
%15 = sub nsw i32 %13, %14
%16 = load i32, i32* %6
%17 = srem i32 %15, %16
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %3
%20 = load i32, i32* %7
br label %24
21: ; preds = %3
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
br label %24
24: ; preds = %21, %19
%25 = phi i32 [ %20, %19 ], [ %23, %21 ]
ret i32 %25
}

LLVM IR (-O2):
define i32 @solution(i32 %0, i32 %1, i32 %2) {
%4 = sub nsw i32 %1, %0
%5 = sdiv i32 %4, %2
%6 = srem i32 %4, %2
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i32
%9 = add nsw i32 %5, %8
ret i32 %9
}
void add(int *x, int *y, int *r) { *r = *x + *y; }


x86 assembly (clang, -O0):
<add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
add    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<add>:
mov    (%rsi),%eax
add    (%rdi),%eax
mov    %eax,(%rdx)
ret

LLVM IR (-O0):
define void @add(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** %4
%8 = load i32, i32* %7
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = add nsw i32 %8, %10
%12 = load i32*, i32** %6
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @add(i32* nocapture %0, i32* nocapture %1, i32* nocapture writeonly %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
%6 = add nsw i32 %5, %4
store i32 %6, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void handle_signal(int signo) { exit(0); }


x86 assembly (clang, -O0):
<handle_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<handle_signal>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @handle_signal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @handle_signal(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ _unsupported();
void _Unwind_Resume(void *ptr) { _unsupported(); }


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

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

LLVM IR (-O0):
define void @_Unwind_Resume(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @_unsupported()
ret void
}

LLVM IR (-O2):
define void @_Unwind_Resume(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @_unsupported()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xdc() {
  Assert_real((isspace(220) == 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_isspace.c",
              1105, ("isspace should be 0 for 0xdc"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xdc>:
push   %rax
mov    $0xdc,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x451,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xdc\00"
define void @t_isspace_0xdc() {
%1 = call i64 @isspace(i32 220)
%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 1105, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xdc\00"
define void @t_isspace_0xdc() {
%1 = tail call i64 @isspace(i32 220)
%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 1105, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void deinit_rqueue_mutex() {}


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

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

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

LLVM IR (-O2):
define void @deinit_rqueue_mutex() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void csa_error(void) {
  printf("not supported.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<csa_error>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<csa_error>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"not supported.\0A\00"
define void @csa_error() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [15 x i8] c"not supported.\00"
define void @csa_error() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
unsigned long long int __attribute__((no, noclone))
bar(unsigned long long int i, unsigned long long int j) {
  asm("");
  return i << j;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    %cl,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
mov    %rsi,%rcx
mov    %rdi,%rax
shl    %cl,%rax
ret

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

LLVM IR (-O2):
define i64 @bar(i64 %0, i64 %1) {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
%3 = shl i64 %0, %1
ret i64 %3
}
/* Variables and functions */
unsigned long XCurses_get_input_fd();
unsigned long PDC_get_input_fd() { return XCurses_get_input_fd(); }


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

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

LLVM IR (-O0):
define i64 @PDC_get_input_fd() {
%1 = call i64 (...) @XCurses_get_input_fd()
ret i64 %1
}

LLVM IR (-O2):
define i64 @PDC_get_input_fd() {
%1 = tail call i64 (...) @XCurses_get_input_fd()
ret i64 %1
}
/* Variables and functions */
int av_match_name(char const *, char const *);
char *strrchr(char const *, char);
int av_match_ext(const char *filename, const char *extensions) {
  const char *ext;
  if (!filename)
    return 0;
  ext = strrchr(filename, '.');
  if (ext)
    return av_match_name(ext + 1, extensions);
  return 0;
}


x86 assembly (clang, -O0):
<av_match_ext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1147 <av_match_ext+0x27>
movl   $0x0,-0x4(%rbp)
jmp    1184 <av_match_ext+0x64>
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     117d <av_match_ext+0x5d>
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
mov    -0x18(%rbp),%rsi
call   1040 <av_match_name@plt>
mov    %eax,-0x4(%rbp)
jmp    1184 <av_match_ext+0x64>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_match_ext>:
push   %rbx
test   %rdi,%rdi
je     1148 <av_match_ext+0x28>
mov    %rsi,%rbx
mov    $0x2e,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     1148 <av_match_ext+0x28>
add    $0x1,%rax
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <av_match_name@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @av_match_ext(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = tail call i8* @strrchr(i8* %0, i8 signext 46)
%6 = icmp eq i8* %5, null
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = tail call i32 @av_match_name(i8* %8, i8* %1)
br label %10
10: ; preds = %4, %2, %7
%11 = phi i32 [ %9, %7 ], [ 0, %2 ], [ 0, %4 ]
ret i32 %11
}
/* Variables and functions */
double exp(double);
double expo1(double a) { return exp(a); }


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

x86 assembly (clang, -O2):
<expo1>:
jmp    1030 <exp@plt>

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

LLVM IR (-O2):
define double @expo1(double %0) {
%2 = tail call double @exp(double %0)
ret double %2
}
blah() {}


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

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

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

LLVM IR (-O2):
define i32 @blah() {
ret i32 undef
}
int heap_del() {}


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

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

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

LLVM IR (-O2):
define i32 @heap_del() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void version(void) {
  printf("rwmsr 1.0.0\nGauthier Voron\ngauthier.voron@lip6.fr\n");
}


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

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

LLVM IR (-O0):
@.str = [51 x i8] c"rwmsr 1.0.0\0AGauthier Voron\0Agauthier.voron@lip6.fr\0A\00"
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [50 x i8] c"rwmsr 1.0.0\0AGauthier Voron\0Agauthier.voron@lip6.fr\00"
define void @version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct dcadec_core_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ta_free(struct dcadec_core_info *);
void dcadec_context_free_core_info(struct dcadec_core_info *info) {
  ta_free(info);
}


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

x86 assembly (clang, -O2):
<dcadec_context_free_core_info>:
jmp    1030 <ta_free@plt>

LLVM IR (-O0):
%struct.dcadec_core_info = type { i32 }
define void @dcadec_context_free_core_info(%struct.dcadec_core_info* %0) {
%2 = alloca %struct.dcadec_core_info*
store %struct.dcadec_core_info* %0, %struct.dcadec_core_info** %2
%3 = load %struct.dcadec_core_info*, %struct.dcadec_core_info** %2
%4 = call i32 @ta_free(%struct.dcadec_core_info* %3)
ret void
}

LLVM IR (-O2):
%struct.dcadec_core_info = type { i32 }
define void @dcadec_context_free_core_info(%struct.dcadec_core_info* %0) {
%2 = tail call i32 @ta_free(%struct.dcadec_core_info* %0)
ret void
}
void idiv(int *stack, int *spointer, int operand) {
  int value1 = *(stack + *spointer);
  (*spointer)--;
  int value2 = *(stack + *spointer);
  *(stack + *spointer) = value2 / value1;
}


x86 assembly (clang, -O0):
<idiv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cltd
idivl  -0x18(%rbp)
mov    %eax,%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<idiv>:
movslq (%rsi),%rcx
mov    (%rdi,%rcx,4),%r8d
lea    -0x1(%rcx),%rax
mov    %eax,(%rsi)
mov    -0x4(%rdi,%rcx,4),%eax
cltd
idiv   %r8d
mov    %eax,-0x4(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @idiv(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%9 = load i32*, i32** %4
%10 = load i32*, i32** %5
%11 = load i32, i32* %10
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %9, i64 %12
%14 = load i32, i32* %13
store i32 %14, i32* %7
%15 = load i32*, i32** %5
%16 = load i32, i32* %15
%17 = add nsw i32 %16, -1
store i32 %17, i32* %15
%18 = load i32*, i32** %4
%19 = load i32*, i32** %5
%20 = load i32, i32* %19
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %18, i64 %21
%23 = load i32, i32* %22
store i32 %23, i32* %8
%24 = load i32, i32* %8
%25 = load i32, i32* %7
%26 = sdiv i32 %24, %25
%27 = load i32*, i32** %4
%28 = load i32*, i32** %5
%29 = load i32, i32* %28
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i32, i32* %27, i64 %30
store i32 %26, i32* %31
ret void
}

LLVM IR (-O2):
define void @idiv(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = load i32, i32* %1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = add nsw i32 %4, -1
store i32 %8, i32* %1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = sdiv i32 %11, %7
store i32 %12, i32* %10
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(int argc, char *argv[]) {
  fprintf(stderr, "%s [options]\n", argv[0]);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"%s [options]\0A\00"
define void @usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @stderr
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"%s [options]\0A\00"
define void @usage(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %1
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Variables and functions */
scalar_t__ isalpha(unsigned char);
char toupper(unsigned char);
char mytoupper(unsigned char ch) {
  if (isalpha(ch))
    return toupper(ch);
  else
    return ch % ('Z' - 'A') + 'A';
}


x86 assembly (clang, -O0):
<mytoupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%rax
je     1152 <mytoupper+0x32>
movzbl -0x2(%rbp),%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbp)
jmp    1166 <mytoupper+0x46>
movzbl -0x2(%rbp),%eax
mov    $0x19,%ecx
cltd
idiv   %ecx
add    $0x41,%edx
mov    %dl,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mytoupper>:
push   %rbx
mov    %edi,%ebx
call   1040 <isalpha@plt>
test   %rax,%rax
je     1136 <mytoupper+0x16>
movzbl %bl,%edi
pop    %rbx
jmp    1030 <toupper@plt>
movzbl %bl,%eax
lea    (%rax,%rax,4),%ecx
lea    (%rax,%rcx,8),%eax
shr    $0xa,%eax
lea    (%rax,%rax,4),%eax
lea    (%rax,%rax,4),%eax
sub    %al,%bl
add    $0x41,%bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @mytoupper(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @isalpha(i8 zeroext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8, i8* %3
%9 = call signext i8 @toupper(i8 zeroext %8)
store i8 %9, i8* %2
br label %16
10: ; preds = %1
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = srem i32 %12, 25
%14 = add nsw i32 %13, 65
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %16
16: ; preds = %10, %7
%17 = load i8, i8* %2
ret i8 %17
}

LLVM IR (-O2):
define signext i8 @mytoupper(i8 zeroext %0) {
%2 = tail call i64 @isalpha(i8 zeroext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call signext i8 @toupper(i8 zeroext %0)
br label %9
6: ; preds = %1
%7 = urem i8 %0, 25
%8 = add nuw nsw i8 %7, 65
br label %9
9: ; preds = %6, %4
%10 = phi i8 [ %5, %4 ], [ %8, %6 ]
ret i8 %10
}
int IntMin(int a, int b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<IntMin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <IntMin+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <IntMin+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IntMin>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @IntMin(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 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @IntMin(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
unsigned long ggt(unsigned long a, unsigned long b) {
  if (a == b)
    return a;
  else if (a < b)
    return ggt(a, b - a);
  else
    return ggt(a - b, b);
}


x86 assembly (clang, -O0):
<ggt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    113b <ggt+0x2b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <ggt+0x68>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1163 <ggt+0x53>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
sub    -0x10(%rbp),%rsi
call   1030 <ggt@plt>
mov    %rax,-0x8(%rbp)
jmp    1178 <ggt+0x68>
mov    -0x10(%rbp),%rdi
sub    -0x18(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <ggt@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ggt>:
cmp    %rsi,%rdi
jne    1109 <ggt+0x9>
mov    %rdi,%rax
ret
mov    %rsi,%rax
mov    %rax,%rcx
nop
sub    %rdi,%rcx
jbe    1120 <ggt+0x20>
mov    %rcx,%rax
cmp    %rcx,%rdi
jne    1110 <ggt+0x10>
jmp    1105 <ggt+0x5>
nop
sub    %rax,%rdi
cmp    %rdi,%rax
jne    110c <ggt+0xc>
ret

LLVM IR (-O0):
define i64 @ggt(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 eq 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 %27
11: ; preds = %2
%12 = load i64, i64* %4
%13 = load i64, i64* %5
%14 = icmp ult i64 %12, %13
br i1 %14, label %15, label %21
15: ; preds = %11
%16 = load i64, i64* %4
%17 = load i64, i64* %5
%18 = load i64, i64* %4
%19 = sub i64 %17, %18
%20 = call i64 @ggt(i64 %16, i64 %19)
store i64 %20, i64* %3
br label %27
21: ; preds = %11
%22 = load i64, i64* %4
%23 = load i64, i64* %5
%24 = sub i64 %22, %23
%25 = load i64, i64* %5
%26 = call i64 @ggt(i64 %24, i64 %25)
store i64 %26, i64* %3
br label %27
27: ; preds = %21, %15, %9
%28 = load i64, i64* %3
ret i64 %28
}

LLVM IR (-O2):
define i64 @ggt(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
br i1 %3, label %16, label %4
4: ; preds = %2, %13
%5 = phi i64 [ %8, %13 ], [ %1, %2 ]
%6 = phi i64 [ %14, %13 ], [ %0, %2 ]
br label %7
7: ; preds = %4, %10
%8 = phi i64 [ %5, %4 ], [ %11, %10 ]
%9 = icmp ugt i64 %8, %6
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = sub i64 %8, %6
%12 = icmp eq i64 %6, %11
br i1 %12, label %16, label %7
13: ; preds = %7
%14 = sub i64 %6, %8
%15 = icmp eq i64 %14, %8
br i1 %15, label %16, label %4
16: ; preds = %13, %10, %2
%17 = phi i64 [ %0, %2 ], [ %6, %10 ], [ %8, %13 ]
ret i64 %17
}
void gtk_color_selection_get_previous_color() {}


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

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

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

LLVM IR (-O2):
define void @gtk_color_selection_get_previous_color() {
ret void
}
/* Variables and functions */
int target_xfer_memory_partial(unsigned long long, char *, int, int, int *);
int target_write_memory_partial(unsigned long long memaddr, char *buf, int len,
                                int *err) {
  return target_xfer_memory_partial(memaddr, buf, len, 1, err);
}


x86 assembly (clang, -O0):
<target_write_memory_partial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%r8
mov    $0x1,%ecx
call   1030 <target_xfer_memory_partial@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<target_write_memory_partial>:
mov    %rcx,%r8
mov    $0x1,%ecx
jmp    1030 <target_xfer_memory_partial@plt>

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

LLVM IR (-O2):
define i32 @target_write_memory_partial(i64 %0, i8* %1, i32 %2, i32* %3) {
%5 = tail call i32 @target_xfer_memory_partial(i64 %0, i8* %1, i32 %2, i32 1, i32* %3)
ret i32 %5
}
void AiLenChanged(void) {}


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

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

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

LLVM IR (-O2):
define void @AiLenChanged() {
ret void
}
/* Variables and functions */
void *calloc(size_t nmemb, size_t size) {
  void *__libc_calloc(size_t nmemb, size_t size);
  return __libc_calloc(nmemb, size);
}


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

x86 assembly (clang, -O2):
<calloc>:
jmp    1030 <__libc_calloc@plt>

LLVM IR (-O0):
define i8* @calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = call i8* @__libc_calloc(i64 %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @calloc(i64 %0, i64 %1) {
%3 = tail call i8* @__libc_calloc(i64 %0, i64 %1)
ret i8* %3
}
void log_debug(const char *msg, ...) {}


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

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

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

LLVM IR (-O2):
define void @log_debug(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
char *gettext(char *);
int /*<<< orphan*/ stderr;
void warn(int line) {
  (void)fprintf(stderr, gettext("col: warning: can't back up %s.\n"),
                line < 0 ? gettext("past first line")
                         : gettext("-- line already flushed"));
}


x86 assembly (clang, -O0):
<warn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    0xec2(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1166 <warn+0x46>
lea    0xec9(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,-0x20(%rbp)
jmp    1176 <warn+0x56>
lea    0xec4(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rdx
call   1040 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warn>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
mov    0x2eb3(%rip),%rax
mov    (%rax),%r14d
lea    0xec9(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rbp
test   %ebx,%ebx
lea    0xed9(%rip),%rax
lea    0xee2(%rip),%rdi
cmovs  %rax,%rdi
call   1030 <gettext@plt>
mov    %r14d,%edi
mov    %rbp,%rsi
mov    %rax,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"col: warning: can't back up %s.\0A\00"
@.str.1 = [16 x i8] c"past first line\00"
@.str.2 = [24 x i8] c"-- line already flushed\00"
define void @warn(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i8* @gettext(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i8* @gettext(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %11
9: ; preds = %1
%10 = call i8* @gettext(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
%12 = phi i8* [ %8, %7 ], [ %10, %9 ]
%13 = call i32 @fprintf(i32 %3, i8* %4, i8* %12)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"col: warning: can't back up %s.\0A\00"
@.str.1 = [16 x i8] c"past first line\00"
@.str.2 = [24 x i8] c"-- line already flushed\00"
define void @warn(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i8* @gettext(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%4 = icmp slt i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0)
%6 = tail call i8* @gettext(i8* %5)
%7 = tail call i32 @fprintf(i32 %2, i8* %3, i8* %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __jmp_buf;

/* Variables and functions */
int /*<<< orphan*/ __dummy(int /*<<< orphan*/, int);
void __my_longjmp(__jmp_buf buf, int value) {
  __dummy(buf, value);
  return;
}


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

x86 assembly (clang, -O2):
<__my_longjmp>:
jmp    1030 <__dummy@plt>

LLVM IR (-O0):
define void @__my_longjmp(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 = call i32 @__dummy(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @__my_longjmp(i32 %0, i32 %1) {
%3 = tail call i32 @__dummy(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int mysql_library_init(int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/);
int am_mysql_library_init(void) { return mysql_library_init(0, 0, 0); }


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

x86 assembly (clang, -O2):
<am_mysql_library_init>:
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <mysql_library_init@plt>

LLVM IR (-O0):
define i32 @am_mysql_library_init() {
%1 = call i32 @mysql_library_init(i32 0, i32 0, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @am_mysql_library_init() {
%1 = tail call i32 @mysql_library_init(i32 0, i32 0, i32 0)
ret i32 %1
}
/* Variables and functions */
int atoi(char *);
scalar_t__ pair(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[], char *env[]) {
  int n = atoi(argv[1]);
  if (pair(n))
    printf("%i est pair !\n", n);
  else
    printf("%i est impair !\n", n);
}


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)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1040 <pair@plt>
cmp    $0x0,%rax
je     1180 <main+0x50>
mov    -0x1c(%rbp),%esi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
jmp    118f <main+0x5f>
mov    -0x1c(%rbp),%esi
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <pair@plt>
test   %rax,%rax
lea    0xec2(%rip),%rax
lea    0xeac(%rip),%rdi
cmove  %rax,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"%i est pair !\0A\00"
@.str.1 = [17 x i8] c"%i est impair !\0A\00"
define i32 @main(i32 %0, i8** nocapture %1, i8** nocapture readnone %2) {
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 @atoi(i8* %5)
%7 = tail call i64 @pair(i32 %6)
%8 = icmp eq i64 %7, 0
%9 = select i1 %8, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
%10 = tail call i32 @printf(i8* %9, i32 %6)
ret i32 0
}
void autogroup_free(struct task_group *tg) {}


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

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

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

LLVM IR (-O2):
%struct.task_group = type opaque
define void @autogroup_free(%struct.task_group* nocapture %0) {
ret void
}
/* Variables and functions */
int fixup_sgp_sgp(void **, int);
int fixup_codec(void **param, int param_no) {
  return fixup_sgp_sgp(param, param_no);
}


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

x86 assembly (clang, -O2):
<fixup_codec>:
jmp    1030 <fixup_sgp_sgp@plt>

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

LLVM IR (-O2):
define i32 @fixup_codec(i8** %0, i32 %1) {
%3 = tail call i32 @fixup_sgp_sgp(i8** %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int main() {
  foo();
  foo();
  foo();
  foo();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @foo()
%3 = call i32 (...) @foo()
%4 = call i32 (...) @foo()
%5 = call i32 (...) @foo()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
%2 = tail call i32 (...) @foo()
%3 = tail call i32 (...) @foo()
%4 = tail call i32 (...) @foo()
ret i32 0
}
/* Type definitions */
struct snd_kcontrol {
  int dummy;
};
struct snd_ctl_elem_info {
  int dummy;
};

/* Variables and functions */
int ac97_enum_text_info(struct snd_kcontrol *, struct snd_ctl_elem_info *,
                        char const **, int);
int snd_ac97_vt1618_aux_info(struct snd_kcontrol *kcontrol,
                             struct snd_ctl_elem_info *uinfo) {
  static const char *txt_aux[] = {"Aux In", "Back Surr Out"};
  return ac97_enum_text_info(kcontrol, uinfo, txt_aux, 2);
}


x86 assembly (clang, -O0):
<snd_ac97_vt1618_aux_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0x2f01(%rip),%rdx
mov    $0x2,%ecx
call   1030 <ac97_enum_text_info@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<snd_ac97_vt1618_aux_info>:
lea    0x2f19(%rip),%rdx
mov    $0x2,%ecx
jmp    1030 <ac97_enum_text_info@plt>

LLVM IR (-O0):
%struct.snd_kcontrol = type { i32 }
%struct.snd_ctl_elem_info = type { i32 }
@snd_ac97_vt1618_aux_info.txt_aux = internal global [2 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i32 0, i32 0)]
@.str = [7 x i8] c"Aux In\00"
@.str.1 = [14 x i8] c"Back Surr Out\00"
define i32 @snd_ac97_vt1618_aux_info(%struct.snd_kcontrol* %0, %struct.snd_ctl_elem_info* %1) {
%3 = alloca %struct.snd_kcontrol*
%4 = alloca %struct.snd_ctl_elem_info*
store %struct.snd_kcontrol* %0, %struct.snd_kcontrol** %3
store %struct.snd_ctl_elem_info* %1, %struct.snd_ctl_elem_info** %4
%5 = load %struct.snd_kcontrol*, %struct.snd_kcontrol** %3
%6 = load %struct.snd_ctl_elem_info*, %struct.snd_ctl_elem_info** %4
%7 = call i32 @ac97_enum_text_info(%struct.snd_kcontrol* %5, %struct.snd_ctl_elem_info* %6, i8** getelementptr inbounds ([2 x i8*], [2 x i8*]* @snd_ac97_vt1618_aux_info.txt_aux, i64 0, i64 0), i32 2)
ret i32 %7
}

LLVM IR (-O2):
%struct.snd_kcontrol = type { i32 }
%struct.snd_ctl_elem_info = type { i32 }
@snd_ac97_vt1618_aux_info.txt_aux = internal global [2 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i32 0, i32 0)]
@.str = [7 x i8] c"Aux In\00"
@.str.1 = [14 x i8] c"Back Surr Out\00"
define i32 @snd_ac97_vt1618_aux_info(%struct.snd_kcontrol* %0, %struct.snd_ctl_elem_info* %1) {
%3 = tail call i32 @ac97_enum_text_info(%struct.snd_kcontrol* %0, %struct.snd_ctl_elem_info* %1, i8** getelementptr inbounds ([2 x i8*], [2 x i8*]* @snd_ac97_vt1618_aux_info.txt_aux, i64 0, i64 0), i32 2)
ret i32 %3
}
void pred_constant_compute(const struct XCSF *xcsf, const struct Cl *c,
                           const double *x) {
  (void)xcsf;
  (void)c;
  (void)x;
}


x86 assembly (clang, -O0):
<pred_constant_compute>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.XCSF = type opaque
%struct.Cl = type opaque
define void @pred_constant_compute(%struct.XCSF* %0, %struct.Cl* %1, double* %2) {
%4 = alloca %struct.XCSF*
%5 = alloca %struct.Cl*
%6 = alloca double*
store %struct.XCSF* %0, %struct.XCSF** %4
store %struct.Cl* %1, %struct.Cl** %5
store double* %2, double** %6
%7 = load %struct.XCSF*, %struct.XCSF** %4
%8 = load %struct.Cl*, %struct.Cl** %5
%9 = load double*, double** %6
ret void
}

LLVM IR (-O2):
%struct.XCSF = type opaque
%struct.Cl = type opaque
define void @pred_constant_compute(%struct.XCSF* nocapture %0, %struct.Cl* nocapture %1, double* nocapture %2) {
ret void
}
unsigned int riscv_insn_length(unsigned int insn) {
  return (insn & 0x3) != 0x3 ? 2 : 4;
}


x86 assembly (clang, -O0):
<riscv_insn_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x3,%edx
mov    $0x4,%eax
mov    $0x2,%ecx
cmp    $0x3,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<riscv_insn_length>:
not    %edi
xor    %eax,%eax
test   $0x3,%dil
sete   %al
add    %eax,%eax
add    $0x2,%eax
ret

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

LLVM IR (-O2):
define i32 @riscv_insn_length(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 3
%4 = select i1 %3, i32 4, i32 2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fb_ConsoleGetXY(int /*<<< orphan*/, int *);
int fb_ConsoleGetY(void) {
  int y;
  fb_ConsoleGetXY(0, &y);
  return y;
}


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

x86 assembly (clang, -O2):
<fb_ConsoleGetY>:
push   %rax
lea    0x4(%rsp),%rsi
xor    %edi,%edi
call   1030 <fb_ConsoleGetXY@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fb_ConsoleGetY() {
%1 = alloca i32
%2 = call i32 @fb_ConsoleGetXY(i32 0, i32* %1)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @fb_ConsoleGetY() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @fb_ConsoleGetXY(i32 0, i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}