void pulseaudio_set_environment(const char *path) {
  assert(path);
  if (setenv("PULSE_CLIENTCONFIG", path, 1) < 0)
    do {
      char msgout[500];
      snprintf(msgout, 500, "Error %s: %s:%d %s", "setenv",
               "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/Fred-Barclay/firejail/refs/"
               "heads/master/src/firejail/pulseaudio.c",
               78, __FUNCTION__);
      perror(msgout);
      exit(1);
    } while (0);
}


x86 assembly (clang, -O0):
<pulseaudio_set_environment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1050 <assert@plt>
mov    -0x8(%rbp),%rsi
lea    0xe8b(%rip),%rdi
mov    $0x1,%edx
mov    $0x0,%al
call   1030 <setenv@plt>
cmp    $0x0,%eax
jge    11e0 <pulseaudio_set_environment+0x90>
jmp    118f <pulseaudio_set_environment+0x3f>
lea    -0x200(%rbp),%rdi
mov    $0x1f4,%esi
lea    0xe71(%rip),%rdx
lea    0xe7d(%rip),%rcx
lea    0xe7d(%rip),%r8
mov    $0x4e,%r9d
lea    0xf0c(%rip),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   1040 <snprintf@plt>
lea    -0x200(%rbp),%rdi
mov    $0x0,%al
call   1060 <perror@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pulseaudio_set_environment>:
push   %rbx
sub    $0x210,%rsp
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <assert@plt>
lea    0xe97(%rip),%rdi
mov    %rbx,%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <setenv@plt>
test   %eax,%eax
js     1185 <pulseaudio_set_environment+0x35>
add    $0x210,%rsp
pop    %rbx
ret
lea    0xf3d(%rip),%rax
mov    %rax,(%rsp)
lea    0xe7c(%rip),%rdx
lea    0xe88(%rip),%rcx
lea    0xe88(%rip),%r8
lea    0x10(%rsp),%rbx
mov    $0x1f4,%esi
mov    %rbx,%rdi
mov    $0x4e,%r9d
xor    %eax,%eax
call   1040 <snprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <perror@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"PULSE_CLIENTCONFIG\00"
@.str.1 = [19 x i8] c"Error %s: %s:%d %s\00"
@.str.2 = [7 x i8] c"setenv\00"
@.str.3 = [156 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Fred-Barclay/firejail/refs/heads/master/src/firejail/pulseaudio.c\00"
@__FUNCTION__.pulseaudio_set_environment = [27 x i8] c"pulseaudio_set_environment\00"
define void @pulseaudio_set_environment(i8* %0) {
%2 = alloca i8*
%3 = alloca [500 x i8]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %4)
%6 = load i8*, i8** %2
%7 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @setenv to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %6, i32 1)
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %1
br label %10
10: ; preds = %9
%11 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 0
%12 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %11, i64 500, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str.3, i64 0, i64 0), i32 78, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @__FUNCTION__.pulseaudio_set_environment, i64 0, i64 0))
%13 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 0
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* %13)
unreachable
15: ; No predecessors!
br label %16
16: ; preds = %15, %1
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"PULSE_CLIENTCONFIG\00"
@.str.1 = [19 x i8] c"Error %s: %s:%d %s\00"
@.str.2 = [7 x i8] c"setenv\00"
@.str.3 = [156 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Fred-Barclay/firejail/refs/heads/master/src/firejail/pulseaudio.c\00"
@__FUNCTION__.pulseaudio_set_environment = [27 x i8] c"pulseaudio_set_environment\00"
define void @pulseaudio_set_environment(i8* %0) {
%2 = alloca [500 x i8]
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %0)
%4 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @setenv to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0, i32 1)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = getelementptr inbounds [500 x i8], [500 x i8]* %2, i64 0, i64 0
%8 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %7, i64 500, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str.3, i64 0, i64 0), i32 78, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @__FUNCTION__.pulseaudio_set_environment, i64 0, i64 0))
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* %7)
unreachable
10: ; preds = %1
ret void
}