int callback(void *NotUsed, int argc, char **argv, char **azColName) {
  int i;
  NotUsed = 0;
  for (i = 0; i < argc; i++) {
    msg_work(34,
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/tumi8/trumanbox/refs/heads/master/src/"
             "log_sqlite.c",
             __PRETTY_FUNCTION__, __func__, 3, "%s = %s\n", azColName[i],
             argv[i] ? argv[i] : "NULL");
  }
  return 0;
}


x86 assembly (clang, -O0):
<callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movq   $0x0,-0x8(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11d7 <callback+0xc7>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     117a <callback+0x6a>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x38(%rbp)
jmp    118a <callback+0x7a>
lea    0xf4a(%rip),%rax
mov    %rax,-0x38(%rbp)
jmp    118a <callback+0x7a>
mov    -0x30(%rbp),%r10
mov    -0x38(%rbp),%rax
mov    $0x22,%edi
lea    0xe62(%rip),%rsi
lea    0xee8(%rip),%rdx
lea    0xf0d(%rip),%rcx
mov    $0x3,%r8d
lea    0xf09(%rip),%r9
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1030 <msg_work@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1136 <callback+0x26>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<callback>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    118e <callback+0x7e>
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %esi,%r15d
lea    0xf93(%rip),%r13
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rbx,%r12,8),%rbp
test   %rbp,%rbp
lea    0xf7d(%rip),%rax
cmove  %rax,%rbp
mov    $0x22,%edi
lea    0xea2(%rip),%rsi
lea    0xf28(%rip),%rdx
lea    0xf4d(%rip),%rcx
mov    $0x3,%r8d
mov    %r13,%r9
xor    %eax,%eax
push   %rbp
push   (%r14,%r12,8)
call   1030 <msg_work@plt>
add    $0x10,%rsp
add    $0x1,%r12
cmp    %r12,%r15
jne    1140 <callback+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [141 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tumi8/trumanbox/refs/heads/master/src/log_sqlite.c\00"
@__PRETTY_FUNCTION__.callback = [44 x i8] c"int callback(void *, int, char **, char **)\00"
@__func__.callback = [9 x i8] c"callback\00"
@.str.1 = [9 x i8] c"%s = %s\0A\00"
@.str.2 = [5 x i8] c"NULL\00"
define i32 @callback(i8* %0, i32 %1, i8** %2, i8** %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8**
%9 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
store i8** %3, i8*** %8
store i8* null, i8** %5
store i32 0, i32* %9
br label %10
10: ; preds = %36, %4
%11 = load i32, i32* %9
%12 = load i32, i32* %6
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %39
14: ; preds = %10
%15 = load i8**, i8*** %8
%16 = load i32, i32* %9
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8*, i8** %15, i64 %17
%19 = load i8*, i8** %18
%20 = load i8**, i8*** %7
%21 = load i32, i32* %9
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8*, i8** %20, i64 %22
%24 = load i8*, i8** %23
%25 = icmp ne i8* %24, null
br i1 %25, label %26, label %32
26: ; preds = %14
%27 = load i8**, i8*** %7
%28 = load i32, i32* %9
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8*, i8** %27, i64 %29
%31 = load i8*, i8** %30
br label %33
32: ; preds = %14
br label %33
33: ; preds = %32, %26
%34 = phi i8* [ %31, %26 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), %32 ]
%35 = call i32 (i32, i8*, i8*, i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @msg_work to i32 (i32, i8*, i8*, i8*, i32, i8*, i8*, i8*, ...)*)(i32 34, i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @__PRETTY_FUNCTION__.callback, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.callback, i64 0, i64 0), i32 3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %19, i8* %34)
br label %36
36: ; preds = %33
%37 = load i32, i32* %9
%38 = add nsw i32 %37, 1
store i32 %38, i32* %9
br label %10
39: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [141 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tumi8/trumanbox/refs/heads/master/src/log_sqlite.c\00"
@__PRETTY_FUNCTION__.callback = [44 x i8] c"int callback(void *, int, char **, char **)\00"
@__func__.callback = [9 x i8] c"callback\00"
@.str.1 = [9 x i8] c"%s = %s\0A\00"
@.str.2 = [5 x i8] c"NULL\00"
define i32 @callback(i8* nocapture readnone %0, i32 %1, i8** nocapture %2, i8** nocapture %3) {
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %19
6: ; preds = %4
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %17, %8 ]
%10 = getelementptr inbounds i8*, i8** %3, i64 %9
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8*, i8** %2, i64 %9
%13 = load i8*, i8** %12
%14 = icmp eq i8* %13, null
%15 = select i1 %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %13
%16 = tail call i32 (i32, i8*, i8*, i8*, i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @msg_work to i32 (i32, i8*, i8*, i8*, i32, i8*, i8*, i8*, ...)*)(i32 34, i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @__PRETTY_FUNCTION__.callback, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.callback, i64 0, i64 0), i32 3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %11, i8* %15)
%17 = add nuw nsw i64 %9, 1
%18 = icmp eq i64 %17, %7
br i1 %18, label %19, label %8
19: ; preds = %8, %4
ret i32 0
}